/* ==========================================================================
   Overview — one screen, no scrolling at 1440×900 or 1280×800.
   What waits for you first (the greeting, then the review band: the one raised thing),
   then the agent systems, then the pipeline and its power.
   Bento: 12 columns, three rows. Correspondence 4 cols · Prioritization 3 cols · Grid-first 5 cols over two rows;
   Research as one line under Correspondence and Prioritization; then Sites 7 cols · Power 5 cols.
   ========================================================================== */
.view-overview .page { height: 100%; min-height: 660px; display: flex; flex-direction: column; gap: var(--gap); padding-top: 8px; padding-bottom: 24px; }

/* ---------- What waits for you ---------- */
.ov-hello { flex: none; display: flex; align-items: baseline; gap: 16px; min-width: 0; padding: 0 2px; }
.ov-date { white-space: nowrap; }

/* The review queue as a band, the heaviest thing on the page: one lifted frame, the title and its red count on the left,
   then the decisions side by side. The frame's 8px plus a large row's own padding give each decision ~24px of room. */
.ov-review { flex: none; animation: rise var(--dur-3) var(--ease) both; }
.ov-review .queue { flex-direction: row; align-items: stretch; }
.ov-review .queue-head { flex: none; align-self: flex-start; min-height: 0; padding: 16px 28px 16px 18px; }
.ov-review .queue-list { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1px; }
/* Vertical hairlines between the head and the decisions (the large rows' own horizontal hairline is for stacked rows). */
.ov-review .queue-list > .queue-row::before,
.ov-review .queue-list > .ov-review-more::before { content: ""; position: absolute; left: -1px; right: auto; top: 16px; bottom: 16px; width: 1px; height: auto; background: var(--line); transition: opacity var(--dur-1) var(--ease); }
.ov-review .queue-row:hover + .ov-review-more::before { opacity: 0; }
.ov-review .queue-none { padding: 16px 18px; }
.ov-review-more { position: relative; align-self: stretch; align-items: flex-start; padding: 18px; }

/* ---------- Bento ---------- */
.ov-bento {
  --ov-bottom: 184px;
  flex: 1 1 auto; min-height: 0; display: grid; gap: var(--gap);
  grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) auto var(--ov-bottom);
}
.ov-corr     { grid-area: 1 / 1 / 2 / 5; }
.ov-prio     { grid-area: 1 / 5 / 2 / 8; }
.ov-research { grid-area: 2 / 1 / 3 / 8; }
.ov-grid     { grid-area: 1 / 8 / 3 / 13; }
.ov-sites    { grid-area: 3 / 1 / 4 / 8; }
.ov-power    { grid-area: 3 / 8 / 4 / 13; }

.ov-tile { overflow: hidden; animation: rise var(--dur-3) var(--ease) both; }
.ov-tile .tile-actions { gap: 4px; }
.ov-tile .tile-foot { gap: 16px; padding-top: 12px; }
.ov-tile .tile-foot .live { flex: 1 1 auto; }

/* ---------- Correspondence: Wren and Vera in the middle of the outbox hour ---------- */
.ov-corr-body { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; gap: 24px; }
.ov-dial { --dial: 192px; position: relative; flex: none; width: var(--dial); height: var(--dial); }
.ov-dial-svg { width: 100%; height: 100%; overflow: visible; }
.ov-dial-ring { fill: none; stroke: var(--fill-2); stroke-width: 4; }
.ov-dial-ticks line { stroke: var(--stroke-faint); stroke-width: 1.25; stroke-linecap: round; }
.ov-dial-ticks line.q { stroke: var(--stroke); }
.ov-dial-now { fill: var(--ink); }
.ov-dial-dot { fill: var(--ink); stroke: var(--surface); stroke-width: 2.5; cursor: pointer; }
.ov-dial-dot:hover { fill: var(--ink-hover); }
.ov-dial-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ov-dial-center .busy { pointer-events: auto; }
.ov-corr.is-off .ov-dial-ring { stroke: var(--fill); }

.ov-out { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ov-out-row { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0 -10px; padding: 8px 10px; border-radius: var(--r-2); text-decoration: none; transition: background var(--dur-1) var(--ease); }
.ov-out-row:hover { background: var(--hover); }
.ov-out-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ov-out-name { font-weight: 500; }   /* names never truncate */
.ov-out-meta { display: flex; align-items: center; min-width: 0; font-size: var(--fs-meta); line-height: 1.4; white-space: nowrap; }
.ov-out-more { align-self: flex-start; margin-top: 6px; }

/* ---------- Prioritization: today's top three, each with the prioritizer's reason (two lines at every size) ---------- */
.ov-ranks { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.ov-rank { display: flex; align-items: baseline; gap: 12px; min-width: 0; margin: 0 -10px; padding: 3px 10px; border: 0; border-radius: var(--r-2); background: none; text-align: left; transition: background var(--dur-1) var(--ease); }
.ov-rank:hover { background: var(--hover); }
.ov-rank-n { flex: none; width: 10px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ov-rank-main { display: flex; flex-direction: column; min-width: 0; }
.ov-rank-name { min-width: 0; }
.ov-rank-name b { font-weight: 500; }
.ov-rank-why { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-meta); line-height: 1.4; }

/* ---------- Research: one line, four researchers, each on its site ---------- */
.ov-research { justify-content: center; }
.ov-research .tile-head { gap: 20px; }
.ov-res { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; margin: -4px 0; }
.ov-res-cell { flex: 0 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 36px; padding: 4px 10px 4px 6px; border: 0; border-radius: var(--r-2); background: none; text-align: left; }
.ov-res-cell.is-idle { padding-right: 6px; }
.ov-res-cell.is-idle .av { --av-fg: var(--stroke); }   /* idle: the glyph fades, no place */
button.ov-res-cell { transition: background var(--dur-1) var(--ease); }
button.ov-res-cell:hover { background: var(--hover); }
.ov-res-place { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-meta); line-height: 1.4; }
.ov-stopped { flex: none; width: 8px; height: 8px; margin: 0 -2px; border-radius: 2px; background: var(--ink); }

/* ---------- Grid-first: the world as dots ---------- */
.ov-map { position: relative; flex: 1 1 auto; min-height: 0; display: block; margin-top: 12px; color: inherit; }
.ov-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ov-dots, .ov-cc-dots, .ov-cc-core { fill: none; stroke-linecap: round; }
.ov-cc-core { stroke: var(--ink); }
.ov-dots { stroke: var(--stroke-faint); }
.ov-cc.is-queued .ov-cc-dots { stroke: var(--stroke); transition: stroke var(--dur-1) var(--ease); }
.ov-cc.is-queued:hover .ov-cc-dots { stroke: var(--ink); }
.ov-cc.is-mapped .ov-cc-dots,
.ov-cc.is-scanning .ov-cc-dots { stroke: var(--ink); }
.ov-map-svg.is-live .ov-cc.is-scanning .ov-cc-dots { animation: breathe var(--breath) var(--ease-io) infinite; }
.ov-cc-hit { fill: none; stroke: transparent; stroke-linecap: square; pointer-events: stroke; }
.ov-plot { fill: var(--ink); stroke: var(--surface); }

.ov-grid-facts { flex: none; display: flex; align-items: center; gap: 24px; margin-top: 12px; min-width: 0; }
.ov-plots { flex: none; display: inline-flex; align-items: baseline; }
.ov-scan { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; }
.ov-scan b { font-weight: 500; }
.ov-scan .progress { flex: 1 1 auto; min-width: 32px; }
.ov-scan-n { flex: none; font-size: var(--fs-meta); line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Sites: the pipeline, one tick per site. Ticks carry no colour and are never circles:
   circles are the certainty scale, and what waits for you is red once, in the review band. ---------- */
.ov-stages { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(6, auto); margin: 4px -12px 0; }
.ov-stage { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-width: 0; padding: 6px 12px 8px; border-radius: var(--r-3); text-decoration: none; transition: background var(--dur-1) var(--ease); }
.ov-stage:hover { background: var(--hover); }
.ov-stage + .ov-stage:not(.s-aside)::before { content: ""; position: absolute; left: -5px; bottom: 16px; width: 6px; height: 6px; border-top: 1.5px solid var(--stroke); border-right: 1.5px solid var(--stroke); transform: rotate(45deg); }
.ov-stage.s-aside { margin-left: 12px; }
.ov-stage.s-aside::after { content: ""; position: absolute; left: -6px; top: 12px; bottom: 8px; width: 1px; background: var(--line); }
.ov-stage-name { white-space: nowrap; font-weight: 500; }
.ov-ticks { display: flex; min-height: 22px; margin: 6px -2.5px 0; }
.ov-tick { position: relative; flex: none; width: 8px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.ov-tick::before { content: ""; position: absolute; left: 2.5px; top: 4px; width: 3px; height: 14px; border-radius: 1.5px; background: var(--ink); transition: transform var(--dur-1) var(--ease); }
.ov-tick:hover::before { transform: scaleY(1.3); }
.ov-stage.s-aside .ov-tick::before { background: var(--stroke); }   /* out of the pipeline: the quiet mark */

/* ---------- Power: how sure we are ---------- */
.ov-power-body { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; gap: 28px; }
.ov-donut { --donut: 108px; position: relative; flex: none; width: var(--donut); height: var(--donut); }
.ov-donut-svg { width: 100%; height: 100%; overflow: visible; }
.ov-arc { fill: none; }
.ov-arc.k-writing { stroke: var(--ink); }
.ov-arc.k-stated { stroke: var(--stroke); }
.ov-arc.k-estimate { stroke: var(--stroke-faint); }
.ov-arc.k-disagree { fill: transparent; stroke: var(--stroke); stroke-linejoin: round; }   /* hollow: not settled */
.ov-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.ov-donut-n { display: inline-flex; align-items: baseline; }
.ov-donut-l { margin-top: 2px; font-size: var(--fs-meta); line-height: 1.4; }
.ov-legend { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ov-leg { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ov-leg .src { font-size: var(--fs-body); gap: 10px; }
.ov-leg .src-glyph { width: 14px; }
.ov-leg-v { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-later { margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--fs-meta); line-height: 1.4; }

/* ---------- Smaller screens (1280×800) ---------- */
@media (max-height: 860px) {
  .view-overview .page { padding-top: 4px; padding-bottom: 16px; min-height: 600px; }
  .ov-hello { gap: 14px; }
  .ov-bento { --ov-bottom: 168px; }
  .ov-tile { padding: 16px 20px; }
  .ov-dial { --dial: 140px; }
  .ov-corr-body { gap: 20px; }
  .ov-out-row { padding: 6px 10px; }
  .ov-ranks { gap: 0; margin-top: 2px; }
  .ov-map, .ov-grid-facts { margin-top: 8px; }
  .ov-tile .tile-foot { padding-top: 8px; }
  .ov-donut { --donut: 100px; }
  .ov-power-body { gap: 24px; }
  .ov-legend { gap: 6px; }
}
