/* Admin dashboard — Broadsheet front page.
 *
 * The page is an open sheet: sections are separated by whitespace, not by
 * cards or dividers. The only rules that print are the masthead's thick-thin
 * pair and the hairlines inside tables. Tokens, the component layer and the
 * [hidden] rule live in theme.css, which loads first.
 *
 * `.card` appears exactly once here — the worst/best window listings, which
 * are genuinely discrete items. Do not reach for it to group layout. */

.sheet { max-width: 1440px; margin: 0 auto; padding: 0 48px 72px; }

/* ── masthead: front-page furniture, in full-strength ink ─── */
.masthead {
  display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap;
  border-top: 3px solid var(--color-text);
  border-bottom: 1px solid var(--color-text);
  padding: 12px 0; margin-bottom: 28px;
}
.masthead-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.masthead-meta { font-size: 13px; color: var(--muted); }
.masthead-meta em { font-style: italic; color: var(--color-text); }
.masthead-select {
  font: inherit; font-size: 13px; color: var(--color-text);
  background: transparent; border: 0; border-bottom: 1px solid var(--color-divider);
  padding: 2px 0; cursor: pointer; max-width: 320px;
}
.masthead-tail { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* ── the figures ───────────────────────────────────────────── */
.figures { display: flex; gap: 48px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 32px; }
.figures-sm { gap: 40px; margin-bottom: 12px; }
.figure b {
  display: block;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 34px; line-height: 1;
}
.figures-sm .figure b { font-size: 26px; }
.figure .label { display: block; margin-top: 6px; }
.figure .label i { font-style: normal; color: var(--color-text); }
.figures-tail { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chips button {
  font: inherit; font-size: 11px; cursor: pointer;
  padding: 3px 10px; border-radius: calc(var(--radius-md) * 0.75);
  border: 1px solid var(--color-divider); background: transparent; color: var(--muted);
}
.filter-chips button:hover { border-color: var(--color-accent); color: var(--color-accent); }
.filter-chips button[aria-pressed="true"] {
  border-color: var(--color-accent); background: var(--color-accent-100); color: var(--color-accent-800);
}

/* ── section heads: a kicker, a note, and whatever the section needs ── */
.section-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.section-head h6 { margin: 0; font-size: 11px; }
.section-head .h-neg { color: var(--color-accent-2-700); }
.section-head .h-pos { color: var(--color-accent-700); }
.section-head .text-muted { font-size: 11.5px; }
.section-head > :last-child:is(a, button) { margin-left: auto; }

.footnote { font-size: 11.5px; margin: 10px 0 0; }

/* ── master timeline ───────────────────────────────────────── */
.timeline { margin-bottom: 40px; }
.legend { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--color-neutral-600); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend .sw { width: 10px; height: 10px; display: inline-block; }
.legend .sw-line { height: 0; border-top: 2px dashed var(--color-neutral-600); }
.legend .sw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent-700); }

.lane-grid { display: grid; grid-template-columns: 130px 1fr; row-gap: 5px; align-items: center; }
.lane-grid > .label { text-align: right; padding-right: 12px; }
canvas.lane { width: 100%; display: block; cursor: crosshair; background: var(--tl-bg); }

.ruler { display: flex; justify-content: space-between; font-size: 10px; color: var(--color-neutral-600); }

.timeline-foot {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin-top: 10px; font-size: 11.5px; color: var(--muted);
}
.timeline-foot .mono { margin-left: auto; }
.readout { font-family: var(--font-heading); color: var(--color-text); min-width: 22em; }
.readout .text-muted { font-family: var(--font-body); font-weight: 400; }

/* ── the moment under review ───────────────────────────────── */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; margin-bottom: 32px; align-items: start; }
.viewer-frame { background: #141312; }
.viewer-frame video { width: 100%; display: block; max-height: 56vh; }
.viewer-at {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 26px; line-height: 1;
}
.viewer-note { font-size: 11.5px; margin: 8px 0 0; }
.viewer-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ── minting a reviewer link ───────────────────────────────── */
.mint { margin: 4px 0 14px; }
.mint-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.mint-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 200px; }
.mint-field .label { text-align: left; }
.mint-hint { font-size: 11.5px; margin: 8px 0 0; max-width: 60ch; }

.mint-result { margin: 4px 0 14px; padding: 12px 14px; background: var(--color-accent-100); color: var(--color-accent-900); }
.mint-result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 8px; }
.mint-result-head :last-child { margin-left: auto; }
.mint-link {
  display: block; font: 12px var(--font-mono); word-break: break-all;
  padding: 8px 10px; background: var(--color-bg); color: var(--color-text);
  user-select: all;
}

/* ── worst / best windows: the one boxed component on the page ── */
.windows { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.win-cards { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; }
.win-card { gap: 6px; cursor: pointer; }
.win-card:hover { background: color-mix(in srgb, var(--color-text) 10%, transparent); }
.win-card .win-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.win-card .win-range { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 15px; }
.win-card .win-score { font-size: 11px; color: var(--muted); }
.win-card .win-verdict { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.win-card .win-quote { font-style: italic; font-size: 13px; margin: 0; color: var(--color-neutral-700); }
.win-empty { font-size: 12.5px; color: var(--muted); }

/* ── ledger: divergence / drop-off, as ruled rows ──────────── */
.ledger { margin-bottom: 40px; }
.tabs { display: flex; gap: 26px; align-items: baseline; border-bottom: 1px solid var(--color-divider); font-size: 12.5px; }
.tab {
  font: inherit; font-size: 12.5px; cursor: pointer; background: transparent;
  border: 0; border-bottom: 2px solid transparent; padding: 0 0 8px;
  color: var(--color-neutral-600);
}
.tab:hover { color: var(--color-text); }
.tab.is-on { border-bottom-color: var(--color-accent); font-weight: var(--font-heading-weight); color: var(--color-accent-700); }
.tabs .text-muted { margin-left: auto; font-size: 11px; align-self: center; }
.ledger-rows > div {
  display: flex; align-items: baseline; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--color-divider);
  font-size: 13px; cursor: pointer;
}
.ledger-rows > div:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.ledger-rows strong { font-family: var(--font-heading); }
.ledger-rows .go { margin-left: auto; font-size: 12px; color: var(--color-accent); }

/* ── transcript corrections ────────────────────────────────── */
.fixes { margin-bottom: 40px; }
.fix-list { max-height: 340px; overflow-y: auto; }
.fix-item { padding: 10px 0; border-bottom: 1px solid var(--color-divider); font-size: 13px; }
.fix-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 11.5px; color: var(--color-neutral-600); margin-bottom: 4px; }
.fix-head .at { font-family: var(--font-heading); font-weight: var(--font-heading-weight); color: var(--color-accent); cursor: pointer; }
.fix-orig { color: var(--muted); text-decoration: line-through; }
.fix-new  { color: var(--color-text); }
.fix-agree { color: var(--color-accent-2-700); }
.fix-alts { font-size: 11.5px; color: var(--muted); margin-top: 3px; font-style: italic; }
.fix-empty { font-size: 12.5px; color: var(--muted); padding: 8px 0; }

/* ── reviewers ─────────────────────────────────────────────── */
.reviewers { margin-bottom: 40px; }
.reviewers .table td a { font-weight: var(--font-heading-weight); }
.reviewers .cov-cell { display: flex; align-items: center; gap: 8px; }
.share-badge { color: var(--color-accent-2-700); cursor: help; }

/* ── exports ───────────────────────────────────────────────── */
.exports { margin-bottom: 40px; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.export-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: var(--space-3); background: var(--color-surface);
  border-radius: var(--radius-md); color: inherit; text-decoration: none;
}
.export-card:hover { background: color-mix(in srgb, var(--color-text) 10%, transparent); text-decoration: none; }
.export-card b {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; color: var(--accent-ink);
}
.export-card span { font-size: 11.5px; color: var(--muted); line-height: 1.45; }

/* ── per-reviewer portrait ─────────────────────────────────── */
.portrait { padding-top: 8px; }
.portrait-head {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  border-top: 3px solid var(--color-text); border-bottom: 1px solid var(--color-text);
  padding: 12px 0; margin-bottom: 20px;
}
.portrait-name { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 20px; }
.portrait-labels { display: flex; gap: 6px; flex-wrap: wrap; }
.portrait-tail { margin-left: auto; display: flex; gap: 10px; }
.caveat {
  margin: 0 0 2px auto; font-size: 12.5px; max-width: 440px; padding: 8px 12px;
  background: var(--evidence-bg); color: var(--evidence-fg);
}
.portrait-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 44px; margin-top: 32px; }

.ink-pos { color: var(--color-accent-600); }
.ink-neg { color: var(--color-accent-2-600); }

.rd-sharing { margin-top: 12px; font-size: 12px; }
.rd-sharing .evidence { padding: 8px 12px; background: var(--evidence-bg); color: var(--evidence-fg); }
.rd-sharing .evidence ul { margin: 6px 0 0; padding-left: 18px; }
.rd-sharing .evidence li + li { margin-top: 3px; }

.comment-list { display: flex; flex-direction: column; gap: 14px; max-height: 460px; overflow-y: auto; }
.comment-item { border-left: 2px solid var(--color-neutral-400); padding-left: 12px; }
.comment-item .c-head { font-size: 11.5px; color: var(--color-neutral-600); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.comment-item .c-at { font-family: var(--font-heading); font-weight: var(--font-heading-weight); color: var(--color-accent); cursor: pointer; }
.comment-item p { font-size: 13px; margin: 3px 0 0; font-style: italic; }

/* ── narrow screens: the grid collapses, labels move above ─── */
@media (max-width: 1100px) {
  .sheet { padding: 0 20px 48px; }
  .windows, .portrait-cols, .viewer { grid-template-columns: 1fr; gap: 28px; }
  .lane-grid { grid-template-columns: 1fr; row-gap: 2px; }
  .lane-grid > .label { text-align: left; padding: 6px 0 0; }
  .figures { gap: 28px; }
  .figures-tail { margin-left: 0; }
  .legend { margin-left: 0; }
}

/* ── phones ────────────────────────────────────────────────
 * The dashboard is a wide instrument, but "where did it die" is a question
 * people ask on a phone between other things. Everything stays present;
 * the sheet just stops pretending it has 1440px.
 *
 * Two things get bigger rather than smaller here: the lanes, because a
 * 14px stripe under a fingertip is unhittable, and the labels, which drop
 * their uppercase tracking — that treatment only reads at rest, not on a
 * screen held at arm's length. */
@media (max-width: 720px) {
  .sheet { padding: 0 14px 40px; }

  .masthead { gap: 10px 14px; padding: 10px 0; margin-bottom: 20px; }
  .masthead-brand { font-size: 17px; }
  .masthead-meta { font-size: 12px; width: 100%; order: 3; }
  .masthead-select { max-width: 100%; flex: 1; }
  .masthead-tail { margin-left: 0; width: 100%; justify-content: space-between; }

  /* Two columns of figures rather than a six-wide row that wraps raggedly. */
  .figures { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; margin-bottom: 24px; }
  .figure b { font-size: 26px; }
  .figures-tail { grid-column: 1 / -1; }
  .filter-chips button { padding: 5px 12px; }

  .lane-grid > .label {
    font-size: 11px; letter-spacing: 0; text-transform: none;
    color: var(--color-neutral-700); padding-top: 10px;
  }
  canvas.lane { min-height: 26px; }

  .section-head { gap: 8px; }
  .legend { font-size: 10.5px; gap: 10px; }
  .timeline-foot { font-size: 11px; }
  .timeline-foot .mono { margin-left: 0; width: 100%; }
  .readout { min-width: 0; width: 100%; }

  .win-cards { max-height: none; }
  .tabs { gap: 16px; }
  .tabs .text-muted { display: none; }

  /* Wide tables scroll in their own box — the page itself must never
     scroll sideways. */
  .reviewers, .portrait-cols > div { overflow-x: auto; }
  .reviewers .table, #rd-sessions { min-width: 560px; }

  .viewer-frame video { max-height: 40vh; }
  .portrait-head { gap: 10px; }
  .caveat { margin-left: 0; max-width: none; }
}
