


.polar-slot {
  border-bottom: 1px solid var(--border);
  padding: 12px 0 14px;
}

.polar-slot-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.polar-slot-head h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  margin: 0;
}

.polar-slot-name { font-weight: 600; color: var(--accent-dark); }

.polar-path {
  margin: 2px 0 6px;
  font-size: 12px;
  word-break: break-all;
}

.polar-path span { word-break: normal; }

.polar-problem, .polar-problems li, .polar-verdict.bad {
  color: var(--fail);
  font-size: 13px;
}

.polar-problem { margin: 6px 0; }

.polar-problems {
  background: var(--bg-soft);
  border-left: 4px solid var(--fail);
  padding: 6px 12px;
  margin: 8px 0;
}

.polar-problems li + li { margin-top: 4px; }

.polar-verdict { margin: 0 0 8px; font-size: 13px; }
.polar-verdict.good { color: var(--ink); }

.polar-figure { margin: 6px 0 0; }

.polar-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.polar-canvas.big { max-width: 440px; }

.polar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 9px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.polar-legend span { display: inline-flex; align-items: center; gap: 3px; }

.polar-legend i {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.polar-readout { min-height: 1.5em; margin-top: 2px; font-size: 12px; }



#polar-sheet[hidden] { display: none; }

#polar-sheet {
  position: fixed;
  left: 0; top: 0; bottom: 0; right: 361px;
  z-index: 20;
  background: var(--bg);
  border-right: 2px solid var(--accent);
  display: flex;
  flex-direction: column;
  box-shadow: var(--bar-shadow);
}

.polar-bar {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}

.polar-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

.polar-close {
  margin-left: auto;
  border: none;
  font-size: 20px;
  padding: 2px 8px;
}

.polar-sheet-body {
  flex: 1;
  overflow: auto;
  padding: 14px 18px 18px;
}

.polar-work {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.polar-work > * { min-width: 0; }
.polar-source, .polar-grid-scroll { flex: 1 1 auto; }
.polar-grid-scroll { overflow-x: auto; padding-bottom: 4px; }
.polar-preview, .polar-side { flex: 0 0 min(360px, 40%); }

.polar-file {
  display: inline-block;
  margin: 0;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.polar-file:hover { border-color: var(--accent); }
.polar-file input { display: none; }
.polar-file-name { align-self: center; }

.polar-paste {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 8px 10px;
  font: 12px/1.45 ui-monospace, "DejaVu Sans Mono", monospace;
  tab-size: 6;
  white-space: pre;
  color: var(--body-text);
  background: var(--bg);
}

.polar-paste:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.polar-save {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.polar-save label { margin: 0; }
.polar-save .polar-name { width: 200px; display: block; margin-top: 4px; }
.polar-save select { width: auto; display: block; margin-top: 4px; }

#polar-sheet button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.polar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.polar-tools button { padding: 6px 11px; }

.polar-scale {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 0 8px;
  color: var(--body-text);
  font-size: 13px;
}

.polar-scale input { width: 52px; text-align: center; padding: 6px; }

.polar-note { min-height: 1.4em; margin: 8px 0 0; }

.polar-grid {
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.polar-grid th, .polar-grid td {
  padding: 0;
  border: 1px solid var(--border);
}

.polar-grid thead th, .polar-grid tbody th { background: var(--bg-soft); }

.polar-grid .polar-corner {
  color: var(--muted);
  font-weight: 600;
  padding: 0 6px;
  white-space: nowrap;
}

.polar-grid input {
  width: 40px;
  border: none;
  border-radius: 0;
  padding: 4px 5px;
  text-align: right;
  font: inherit;
  background: transparent;
  color: var(--body-text);
}

.polar-grid th input { font-weight: 700; color: var(--ink); }

.polar-grid input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--bg);
}

.polar-grid tr.bad th, .polar-grid tr.bad td { color: var(--fail); font-weight: 700; }
.polar-grid tr.bad th:first-child { box-shadow: inset 4px 0 0 var(--fail); }

.polar-summary { margin: 6px 0 0; }

@media (max-width: 760px) {
  #polar-sheet { right: 0; }
  .polar-work { flex-direction: column; }
  .polar-preview, .polar-side { flex-basis: auto; width: 100%; }
}
