/* Election night page (Phase 04). Folio tokens (/p/_kit/ds/tokens.css); light only, no dark styles.
   Party colours: blue/red fills from the validated diverging pair (--div-pos/--div-neg); text uses darker
   steps (--dem-ink, --rep-ink) that pass 4.5:1 on paper. Every party colour is paired with a name or D/R. */
:root {
  color-scheme: light;
  --dem: #2a78d6;      /* --div-pos, fills */
  --dem-ink: #1b5ca8;  /* text, 6.3:1 on paper */
  --dem-wash: #e3eefb;
  --rep: #d63c3b;      /* --div-neg, fills */
  --rep-ink: #b02b2a;  /* text, 5.9:1 on paper */
  --rep-wash: #fbe6e5;
  /* needle bands, tinted by side: 38% and 72% of the party fill over paper (04b) */
  --dem-b90: #acc9ea; --dem-b50: #659cdf;
  --rep-b90: #edb2b0; --rep-b50: #e07170;
  --replay: #6b4a00; --replay-wash: #fbf0d6; --replay-rule: #e7cf96;
  --fixture: #4c4a8a; --fixture-wash: #ecebf7;
  --vt-mail: #1a8a66;  /* series-1 */
  --vt-early: #cf9c1c; /* series-4 */
  --vt-eday: #6450b8;  /* series-7 */
  --vt-late: #c9c3b6;
  --sim: var(--hold);
  --sim-wash: var(--hold-wash);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--text-base)/var(--leading-ui) var(--font-sans); }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

/* masthead */
.mast { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--gutter); border-bottom: 1px solid var(--rule); background: var(--surface); }
.mark { font: 600 var(--text-sm)/1 var(--font-mono); letter-spacing: .08em; color: var(--ink); text-decoration: none; border: 1.5px solid var(--ink); padding: 5px 6px; }
.crumbs { display: flex; gap: var(--s-2); font-size: var(--text-sm); color: var(--muted); min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs span::before, .crumbs a + span::before { content: "/"; margin-right: var(--s-2); color: var(--faint); }
.crumbs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
/* mode switch: Replay | Live */
.modes { margin-left: auto; display: flex; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; flex: none; }
.modes a { display: flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-3); font: 600 var(--text-xs)/1 var(--font-sans); letter-spacing: .04em; color: var(--ink-2); text-decoration: none; background: var(--surface); }
.modes a + a { border-left: 1px solid var(--rule-strong); }
.modes a[aria-current="true"] { background: var(--ink); color: var(--surface); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--surface); padding: var(--s-2) var(--s-3); z-index: 20; }
.skip:focus { left: var(--s-2); }

/* mode banner: REPLAY (always on whenever replay data is shown), LIVE, or FIXTURE notice */
.modebar { padding: var(--s-2) var(--gutter); font-size: var(--text-sm); line-height: 1.45; border-bottom: 1px solid var(--rule); }
.modebar:empty { display: none; }
.modebar.replay { background: repeating-linear-gradient(135deg, var(--replay-wash) 0 12px, #f7e8c4 12px 24px); border-bottom-color: var(--replay-rule); color: #4a3300; }
.modebar.replay strong:first-child { font: 700 var(--text-xs)/1 var(--font-sans); letter-spacing: var(--tracking-label); text-transform: uppercase; background: #4a3300; color: #fff6df; padding: 4px 7px; border-radius: 3px; margin-right: var(--s-2); vertical-align: 1px; }
.modebar.live { background: var(--surface); }
.modebar.stale { background: var(--no-wash); color: var(--no); border-bottom-color: #efc4bc; }
.modebar .mb-sub { color: inherit; opacity: .85; }
.tag { display: inline-block; font: 600 0.625rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; padding: 3px 5px; border-radius: 3px; vertical-align: 2px; white-space: nowrap; }
.tag.real { background: var(--accent-wash); color: var(--accent-ink); }
.tag.replay { background: var(--replay-wash); color: var(--replay); border: 1px solid var(--replay-rule); }
.tag.fixture { background: var(--fixture-wash); color: var(--fixture); }
.tag.live { background: var(--ok-wash); color: var(--ok); }
.tag.none { background: var(--paper-sunk); color: var(--muted); }

/* replay clock */
.clock { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: auto auto 1fr; grid-template-areas: "play time scrub" ". . ends"; align-items: center; column-gap: var(--s-4); padding: var(--s-2) var(--gutter) 2px; background: rgba(251, 250, 247, .97); border-bottom: 1px solid var(--rule); }
.play { grid-area: play; min-width: 4.5rem; min-height: var(--tap); padding: 0 var(--s-3); font: 600 var(--text-sm) var(--font-sans); color: var(--surface); background: var(--ink); border: 0; border-radius: var(--radius); cursor: pointer; }
.play[aria-pressed="true"] { background: var(--accent); }
.clock-time { grid-area: time; display: flex; flex-direction: column; line-height: 1.1; }
.clock-time .mono { font-size: var(--text-lg); font-weight: 500; }
.clock-sub { font-size: var(--text-2xs); color: var(--muted); }
#scrub { grid-area: scrub; width: 100%; height: var(--tap); accent-color: var(--ink); }
.scrub-ends { grid-area: ends; display: flex; justify-content: space-between; font-size: var(--text-2xs); color: var(--faint); margin-top: -6px; }

/* tabs */
.tabs { display: flex; gap: 2px; padding: 0 var(--gutter); border-bottom: 1px solid var(--rule); background: var(--paper); overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: none; display: flex; align-items: center; padding: 0 var(--s-3); min-height: var(--tap); font-size: var(--text-sm); font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

.app { max-width: 84rem; margin: 0 auto; padding: var(--s-5) var(--gutter) var(--s-8); }
.foot { max-width: 84rem; margin: 0 auto; padding: var(--s-4) var(--gutter) var(--s-7); font-size: var(--text-xs); color: var(--muted); border-top: 1px solid var(--rule); }

/* type */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; letter-spacing: var(--tracking-display); margin: 0; }
h1 { font-size: var(--text-2xl); line-height: var(--leading-tight); }
h2 { font-size: var(--text-xl); line-height: var(--leading-snug); }
h3 { font-size: var(--text-lg); line-height: var(--leading-snug); }
.kicker { font: 600 var(--text-2xs)/1.2 var(--font-sans); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s-2); display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.lede { font: 400 var(--text-read)/var(--leading-read) var(--font-serif); margin: var(--s-2) 0 0; color: var(--ink-2); max-width: 46rem; }
.small { font-size: var(--text-xs); color: var(--muted); }
p { margin: 0; }

/* desk layout */
.desk { display: grid; gap: var(--s-6) var(--s-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .desk { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }  }
.block { border-top: 2px solid var(--ink); padding-top: var(--s-3); }
.block + .block { margin-top: var(--s-6); }
.block.thin { border-top-width: 1px; border-top-color: var(--rule-strong); }

/* balance of power */
.bop { display: grid; grid-template-columns: 1fr; gap: var(--s-5); margin-top: var(--s-3); }
@media (min-width: 620px) { .bop { grid-template-columns: 1fr 1fr; } }
.chamber h3 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.chamber .big { font: 500 var(--text-3xl)/1 var(--font-serif); letter-spacing: var(--tracking-display); }
.chamber .verdict { font: 400 var(--text-read)/1.35 var(--font-serif); margin-top: var(--s-1); }
.needle-wrap { max-width: 320px; margin: var(--s-2) auto 0; }
.needle-wrap svg { width: 100%; height: auto; display: block; }
.seatbar { position: relative; height: 22px; margin: var(--s-3) 0 var(--s-1); background: var(--paper-sunk); border-radius: 3px; overflow: hidden; }
.seatbar .seg { position: absolute; top: 0; bottom: 0; }
.seatbar .maj { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.seatbar-legend { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--muted); }
.realline { margin-top: var(--s-3); padding: var(--s-2) var(--s-3); background: var(--accent-wash); border-radius: var(--radius-sm); font-size: var(--text-xs); color: var(--accent-ink); line-height: 1.45; }

/* national margin strip */
.natl svg { width: 100%; height: auto; display: block; }

/* board */
.filters { display: flex; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-3) 0; }
.chip { min-height: var(--tap); padding: 0 var(--s-3); border: 1px solid var(--rule-strong); background: var(--surface); border-radius: var(--radius-pill); font: 500 var(--text-sm) var(--font-sans); color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.board { width: 100%; border-collapse: collapse; }
.board th { text-align: left; font: 600 var(--text-2xs)/1.2 var(--font-sans); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); padding: var(--s-2) var(--s-2) var(--s-2) 0; border-bottom: 1px solid var(--rule-strong); }
.board td { padding: var(--s-2) var(--s-2) var(--s-2) 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.board tr.group td { padding-top: var(--s-4); font: 600 var(--text-xs) var(--font-sans); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--rule-strong); }
.board tr.race { cursor: pointer; }
.board tr.race:hover td { background: var(--surface); }
.board .rname { font-weight: 600; }
.board .rname small { display: block; font-weight: 400; color: var(--muted); font-size: var(--text-xs); }
.board .mini { width: 64px; }
.board .mini svg { width: 64px; height: 36px; display: block; }
.board .est { font-variant-numeric: tabular-nums; white-space: nowrap; }
.board .state { font-size: var(--text-xs); color: var(--ink-2); max-width: 22rem; }
.board .inbar { width: 96px; }
.star { width: var(--tap); height: var(--tap); border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--faint); padding: 0; }
.star[aria-pressed="true"] { color: var(--hold); }
.d { color: var(--dem-ink); } .r { color: var(--rep-ink); }
.lbl { display: inline-block; font: 600 var(--text-2xs)/1 var(--font-sans); letter-spacing: .04em; padding: 4px 6px; border-radius: 3px; white-space: nowrap; }
.lbl.waiting, .lbl.early { background: var(--paper-sunk); color: var(--muted); }
.lbl.close { background: #efe9f9; color: #4b3a8f; }
.lbl.dlean { background: var(--dem-wash); color: var(--dem-ink); }
.lbl.rlean { background: var(--rep-wash); color: var(--rep-ink); }
.lbl.problem { background: var(--no-wash); color: var(--no); }

/* vote-type bars */
.vtbar { display: flex; height: 10px; background: var(--paper-sunk); border-radius: 2px; overflow: hidden; }
.vtbar span { display: block; height: 100%; }
.vt-mail { background: var(--vt-mail); } .vt-early { background: var(--vt-early); } .vt-eday { background: var(--vt-eday); } .vt-late { background: var(--vt-late); }
.vtkey { display: flex; gap: var(--s-3); flex-wrap: wrap; font-size: var(--text-xs); color: var(--muted); margin: var(--s-2) 0; }
.vtkey i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

/* side column: briefing, closings, feed */
.brief li { margin: 0 0 var(--s-3); font: 400 var(--text-base)/1.45 var(--font-serif); }
.brief { list-style: none; padding: 0; margin: var(--s-3) 0 0; }
.brief .when { font: 500 var(--text-xs) var(--font-mono); color: var(--muted); display: block; }
.closings { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.closings li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--s-2); padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: var(--text-sm); }
.closings li.past { color: var(--faint); }
.closings li.next { font-weight: 600; }
.closings .t { font-family: var(--font-mono); font-size: var(--text-xs); }
.feed { list-style: none; margin: var(--s-3) 0 0; padding: 0; max-height: 26rem; overflow: auto; }
.feed li { display: grid; grid-template-columns: 4.2rem 1fr; gap: var(--s-2); padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: var(--text-sm); line-height: 1.4; }
.feed .t { font: 500 var(--text-xs)/1.6 var(--font-mono); color: var(--muted); }
.feed li.k-control { background: linear-gradient(90deg, var(--accent-wash), transparent 70%); }
.feed button { all: unset; cursor: pointer; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; padding: 4px 0; }
.feed button:focus-visible { box-shadow: var(--focus); }
.out-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.out-list li { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2); padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: var(--text-sm); }

/* map */
.tilemap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: var(--s-3); max-width: 520px; }
.tile { aspect-ratio: 1; border-radius: 3px; display: flex; align-items: center; justify-content: center; font: 600 0.625rem/1 var(--font-sans); color: var(--muted); background: var(--paper-sunk); border: 0; padding: 0; }
.tile.up { color: var(--ink); background: #e9e6de; cursor: pointer; }
.tile.blank { background: transparent; }
.tile.sel { box-shadow: 0 0 0 2px var(--ink); }

/* race room */
.race-head { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 900px) { .race-head { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; } }
.picker { display: flex; gap: var(--s-2); align-items: center; margin-bottom: var(--s-4); }
.picker select { flex: 1; min-width: 0; max-width: 30rem !important; min-height: var(--tap); font: 500 var(--text-base) var(--font-sans); padding: 0 var(--s-3); border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); max-width: 100%; }
.status { font: 400 var(--text-xl)/1.3 var(--font-serif); margin-top: var(--s-2); }
.estline { display: flex; gap: var(--s-5); flex-wrap: wrap; margin-top: var(--s-4); }
.estline div { min-width: 7rem; }
.estline .v { font: 500 var(--text-2xl)/1.1 var(--font-serif); font-variant-numeric: tabular-nums; }
.estline .k { font-size: var(--text-xs); color: var(--muted); }
.bignd { max-width: 420px; margin: 0 auto; }
.bignd svg { width: 100%; height: auto; display: block; }
.ndlegend { display: flex; justify-content: center; gap: var(--s-4); font-size: var(--text-xs); color: var(--muted); margin-top: var(--s-1); }
.ndlegend i { display: inline-block; width: 14px; height: 8px; margin-right: 4px; vertical-align: 0; border-radius: 2px; }

.qbox { margin-top: var(--s-6); padding: var(--s-4); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.qbox form { display: flex; gap: var(--s-2); }
.qbox input { flex: 1; min-width: 0; min-height: var(--tap); font: 400 var(--text-base) var(--font-sans); padding: 0 var(--s-3); border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper); }
.qbox button[type=submit] { min-height: var(--tap); padding: 0 var(--s-4); background: var(--ink); color: var(--surface); border: 0; border-radius: var(--radius); font: 600 var(--text-sm) var(--font-sans); cursor: pointer; }
.qchips { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-3); }
.qchips .chip { min-height: var(--tap); text-align: left; line-height: 1.25; padding: 6px var(--s-3); }
.answer { margin-top: var(--s-4); padding: var(--s-4); border-left: 3px solid var(--accent); background: var(--paper); }
.answer h4 { margin: 0 0 var(--s-2); font: 600 var(--text-xs)/1.2 var(--font-sans); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); }
.answer .a { font: 400 var(--text-read)/1.5 var(--font-serif); }
.answer .a b { font-weight: 600; }

.grid2 { display: grid; gap: var(--s-6); grid-template-columns: 1fr; margin-top: var(--s-6); }
@media (min-width: 1000px) { .grid2 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.io { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
table.io th { text-align: right; font: 600 var(--text-2xs)/1.2 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: var(--s-2) 0 var(--s-2) var(--s-3); border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
table.io th:first-child, table.io td:first-child { text-align: left; padding-left: 0; }
table.io td { text-align: right; padding: 7px 0 7px var(--s-3); border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.io td.cell { min-width: 4.6rem; }
table.io .pct { display: block; height: 4px; margin-top: 3px; background: var(--paper-sunk); border-radius: 2px; overflow: hidden; }
table.io .pct span { display: block; height: 100%; }
table.io tr.total td { font-weight: 600; border-top: 1px solid var(--rule-strong); }
.chart svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: var(--text-xs); color: var(--muted); margin-top: var(--s-2); }
.chart-legend i { display: inline-block; width: 16px; height: 8px; margin-right: 4px; vertical-align: 0; }

/* october + about */
.oct-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; margin-top: var(--s-5); }
@media (min-width: 1000px) { .oct-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.evrow { display: grid; grid-template-columns: 2.4rem 1fr 6.5rem; gap: var(--s-2); align-items: center; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: var(--text-sm); }
.evrow .bar { height: 12px; background: var(--paper-sunk); border-radius: 2px; overflow: hidden; }
.evrow .bar span { display: block; height: 100%; background: var(--vt-mail); }
.evrow .bar span.partial { background: repeating-linear-gradient(135deg, var(--vt-mail) 0 4px, #8cc9b5 4px 8px); }
.evrow .n { text-align: right; font-variant-numeric: tabular-nums; }
.evrow small { grid-column: 2 / 4; color: var(--muted); font-size: var(--text-2xs); margin-top: -4px; }
.trust { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.trust li { display: grid; grid-template-columns: 1.4rem 1fr; gap: var(--s-2); padding: var(--s-2) 0; border-bottom: 1px solid var(--rule); font-size: var(--text-sm); line-height: 1.45; }
.trust .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; }
.dot.ok { background: var(--ok); } .dot.hold { background: var(--hold); } .dot.no { background: var(--no); }
.prose-col { max-width: 44rem; font: 400 var(--text-read)/var(--leading-read) var(--font-serif); }
.prose-col p + p, .prose-col ul + p, .prose-col p + ul { margin-top: var(--s-3); }
.prose-col h2 { margin: var(--s-6) 0 var(--s-2); }
.prose-col ul { padding-left: 1.2rem; margin: 0; }
.prose-col li { margin-bottom: var(--s-2); }
.prose-col code { font: 400 0.85em var(--font-mono); background: var(--paper-sunk); padding: 1px 4px; border-radius: 3px; }

@media (max-width: 640px) {
  .board .state, .board th.state, .board .inbar, .board th.inbar { display: none; }
  .board .mini { width: 52px; } .board .mini svg { width: 52px; height: 30px; }
  h1 { font-size: 1.85rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.linkish { all: unset; cursor: pointer; padding: 6px 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.desk > *, .grid2 > *, .race-head > *, .oct-grid > *, .bop > * { min-width: 0; }
@media (max-width: 640px) { .crumbs a { display: none; } .crumbs span::before { content: none; } }

.phone-only { margin-top: var(--s-6); }
@media (min-width: 1000px) { .phone-only { display: none; } }
@media (max-width: 999px) { .desk-only { display: none; } }

/* ---- Phase 04 additions ---- */
.loading { color: var(--muted); }
.board tr.race td:first-child { padding-left: 2px; }
.board tr.race:focus-visible { outline: none; box-shadow: inset 0 0 0 3px rgba(31, 90, 72, 0.28); }
.board .when { font: 500 var(--text-xs) var(--font-mono); color: var(--muted); white-space: nowrap; }
.standin { display: inline-block; margin-top: 2px; font-size: var(--text-xs); color: var(--replay); }
.standin a { color: var(--replay); }

/* replayed race hero on Tonight */
.hero { display: grid; gap: var(--s-4); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 720px) { .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); } }
.hero .needle-wrap { max-width: 360px; }
.hero h1 a { color: inherit; text-decoration: none; }
.hero h1 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.hero .status { font-size: var(--text-lg); }
.cta { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-4); margin-top: var(--s-3); background: var(--ink); color: var(--surface); border-radius: var(--radius); font: 600 var(--text-sm) var(--font-sans); text-decoration: none; }
.cta.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule-strong); margin-left: var(--s-2); }

/* control bounds bar (no point estimate yet) */
.boundbar { position: relative; height: 28px; margin: var(--s-3) 0 var(--s-1); background: linear-gradient(90deg, var(--dem-wash) 0 50%, var(--rep-wash) 50% 100%); border-radius: 3px; }
.boundbar .rng { position: absolute; top: 4px; bottom: 4px; background: repeating-linear-gradient(90deg, rgba(27,26,23,.38) 0 2px, rgba(27,26,23,.12) 2px 5px); border-radius: 2px; }
.boundbar .mid { position: absolute; top: -4px; bottom: -4px; width: 2px; left: calc(50% - 1px); background: var(--ink); }
.boundlegend { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--muted); }
.chamber .big.none { color: var(--muted); font-size: var(--text-2xl); }

/* map */
.cmap { margin-top: var(--s-3); }
.cmap svg { width: 100%; height: auto; display: block; max-height: 460px; }
.cmap path { stroke: var(--paper); stroke-width: .8; cursor: pointer; }
.cmap path:hover, .cmap path:focus-visible { stroke: var(--ink); stroke-width: 1.6; outline: none; }
.cmap path.sel { stroke: var(--ink); stroke-width: 2; }
.cmap path.dim { opacity: .35; }
.mapkey { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font-size: var(--text-xs); color: var(--muted); margin-top: var(--s-2); }
.mapkey .ramp { display: inline-flex; height: 10px; border-radius: 2px; overflow: hidden; }
.mapkey .ramp i { width: 18px; height: 10px; display: block; }
.mapnote { font-size: var(--text-sm); margin-top: var(--s-2); min-height: 2.6em; }

table.io td.lean-d { color: var(--dem-ink); } table.io td.lean-r { color: var(--rep-ink); }
table.io tbody tr.hl td { background: var(--accent-wash); }
.more { margin-top: var(--s-2); }
.more button { min-height: var(--tap); padding: 0 var(--s-3); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); font: 500 var(--text-sm) var(--font-sans); color: var(--ink-2); cursor: pointer; }
.facts { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.facts li { padding: var(--s-2) 0; border-bottom: 1px solid var(--rule); font-size: var(--text-sm); line-height: 1.45; }
.facts b { font-weight: 600; }
.problem { margin-top: var(--s-3); padding: var(--s-3); border-left: 3px solid var(--hold); background: var(--hold-wash); font-size: var(--text-sm); }
.answer .copyq { margin-top: var(--s-3); min-height: var(--tap); padding: 0 var(--s-3); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); font: 500 var(--text-sm) var(--font-sans); cursor: pointer; }
.answer table.io { margin-top: var(--s-3); }
.ds-tableview { margin-top: var(--s-2); }
.ds-tableview > summary { cursor: pointer; font: 500 var(--text-xs)/1.3 var(--font-sans); color: var(--muted); min-height: var(--tap); display: flex; align-items: center; }
.ds-source { font-size: var(--text-xs); color: var(--muted); margin-top: var(--s-2); }
.fresh li { grid-template-columns: 1.4rem 1fr auto; }
.fresh .age { font: 500 var(--text-xs) var(--font-mono); color: var(--muted); white-space: nowrap; }
.shares { margin-top: var(--s-3); }
@media (max-width: 640px) { .ph-hide { display: none; } .hero .needle-wrap { max-width: 300px; } }
.answer table.io td:first-child { white-space: normal; }
table.io td.wrap { white-space: normal; text-align: left; min-width: 9rem; }
.ph-only { display: none !important; }
@media (max-width: 640px) { .ph-only { display: block !important; } }
.clock[hidden] { display: none; }

/* ---- Phase 04b design review (Claude Opus 5.5, 2026-10-07) ---- */
.muted { color: var(--muted); }
/* estimate figures: estimate with its range, chance, counted; one row on every width */
.estline { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3) var(--s-4); margin-top: var(--s-4); align-items: start; }
.estline div { min-width: 0; }
.estline .k { font: 600 var(--text-2xs)/1.25 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.estline .v { font: 500 var(--text-xl)/1.1 var(--font-serif); font-variant-numeric: tabular-nums; }
.estline .v.big { font-size: var(--text-2xl); }
.estline .v.muted { color: var(--muted); }
.estline .rng { font-size: var(--text-xs); color: var(--ink-2); margin-top: 3px; line-height: 1.35; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .estline { gap: var(--s-2) var(--s-3); } .estline .v.big { font-size: 1.75rem; } .estline .v { font-size: 1.375rem; } }
/* status sentence and its reason */
.status { font: 400 var(--text-lg)/1.4 var(--font-serif); margin-top: var(--s-4); }
.status .lbl { vertical-align: 3px; margin-right: 4px; }
.status .why { display: block; margin-top: var(--s-2); font: 400 var(--text-sm)/1.45 var(--font-sans); color: var(--muted); }
.standin-note { margin-top: var(--s-3); font-size: var(--text-sm); line-height: 1.45; color: var(--replay); }
.priorline { margin-top: var(--s-3); max-width: 40rem; line-height: 1.5; }
/* home hero: phone order is head, figures, needle, text; desktop puts the needle on the right */
.hero { display: grid; gap: var(--s-2) var(--s-6); grid-template-columns: 1fr; grid-template-areas: "head" "est" "needle" "text"; align-items: start; }
.hero .h-head { grid-area: head; } .hero .h-est { grid-area: est; } .hero .h-needle { grid-area: needle; } .hero .h-text { grid-area: text; }
@media (min-width: 720px) { .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); grid-template-areas: "head needle" "est needle" "text needle"; } .hero .h-needle { align-self: center; } }
.hero .needle-wrap { max-width: 340px; margin-top: var(--s-3); }
.hero .status { font-size: var(--text-lg); }
/* race head: needle right under the figures on a phone, in the right column on desktop */
.r-side { display: none; }
.r-needle { margin-top: var(--s-4); }
@media (min-width: 900px) { .r-side { display: block; } .r-needle { display: none; } }
.bignd { max-width: 400px; }
/* band key: swatches show both side tints */
.ndlegend { gap: var(--s-4); margin-top: var(--s-2); }
.ndlegend span { white-space: nowrap; display: inline-flex; align-items: center; }
.ndlegend i { width: 18px; height: 10px; }
.ndlegend i.b50 { background: linear-gradient(90deg, var(--dem-b50) 50%, var(--rep-b50) 50%); }
.ndlegend i.b90 { background: linear-gradient(90deg, var(--dem-b90) 50%, var(--rep-b90) 50%); }
/* control: the explanation is support, not the headline */
.chamber .verdict { font: 400 var(--text-sm)/1.45 var(--font-sans); color: var(--ink-2); margin-top: var(--s-2); }
/* feed: inline Open link keeps the line height */
.feed button { padding: 0; line-height: inherit; }
@media (max-width: 640px) {
  /* chrome: one-line replay banner and a one-row clock, so the answer starts on the first screen */
  .modebar { padding-top: 6px; padding-bottom: 6px; }
  .modebar .mb-sub { display: none; }
  .clock { grid-template-columns: auto auto 1fr; grid-template-areas: "play time scrub"; column-gap: var(--s-3); padding-bottom: var(--s-2); }
  .scrub-ends, .clock-sub .cap { display: none; }
  .play { min-width: 3.75rem; padding: 0 var(--s-2); }
  .clock-time .mono { font-size: var(--text-base); font-weight: 600; }
  .mast { padding-top: var(--s-2); padding-bottom: var(--s-2); }
  .app { padding-top: var(--s-4); }
  /* question chips: one scrolling row instead of a screenful */
  .qchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--s-4)); padding-right: var(--s-4); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .qchips .chip { flex: none; white-space: nowrap; }
  .qbox { margin-top: var(--s-5); }
}
.qbox + .block, .answer + .qbox { margin-top: var(--s-6); }
@media (max-width: 640px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filters .chip { flex: none; white-space: nowrap; }
}
.estline .none { font-size: var(--text-lg); color: var(--muted); }
.standin-note a { color: var(--replay); font-weight: 600; }
/* 04b, fresh-eyes fixes */
.estline .held { font-size: var(--text-lg); }
.status .lbl.early, .status .lbl.waiting { font-size: var(--text-xs); padding: 5px 8px; background: #e6e3db; color: var(--ink-2); }
.ndlegend.grey i.b50 { background: #b5b1a7; } .ndlegend.grey i.b90 { background: #d6d3cb; }
.block.pre { background: var(--paper-sunk); border-top-color: var(--rule-strong); padding: 0 var(--s-4) var(--s-4); margin-left: calc(-1 * var(--s-2)); margin-right: calc(-1 * var(--s-2)); border-radius: 0 0 var(--radius) var(--radius); }
.prestrip { margin: 0 calc(-1 * var(--s-4)) var(--s-3); padding: 6px var(--s-4); font: 600 var(--text-2xs)/1.3 var(--font-sans); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--fixture); background: var(--fixture-wash); }
.block.pre .board tr.race:hover td { background: transparent; }
.srcd { margin-top: var(--s-2); font-size: var(--text-xs); color: var(--muted); }
.srcd > summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.srcd p { word-break: break-word; }
.rp { display: none; }
@media (max-width: 640px) {
  .modebar.replay { display: block; }
  .rp { display: inline-block; font: 700 0.625rem/1 var(--font-sans); letter-spacing: var(--tracking-label); text-transform: uppercase; background: #4a3300; color: #fff6df; padding: 3px 5px; border-radius: 3px; margin-right: 5px; vertical-align: 1px; }
  .clock { background: var(--replay-wash); border-bottom-color: var(--replay-rule); }
}
@media (min-width: 720px) {
  .estline { grid-template-columns: minmax(max-content, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
  .estline .v.big { white-space: nowrap; }
  .estline .rng { width: 0; min-width: 100%; }
}
.estline .held { white-space: nowrap; }
@media (min-width: 720px) {
  .hero .estline { gap: var(--s-3); }
  .hero .estline .v.big { font-size: var(--text-xl); }
  .hero .estline .v { font-size: var(--text-lg); }
  .hero .estline .held { font-size: var(--text-base); }
}

/* Insights: four evidence panels, shared light-only design tokens. */
.ins-intro{max-width:850px;margin-bottom:30px}.ins-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:24px}.ins-panel{min-width:0;padding:26px;background:#fffdf7;border:1px solid var(--line,#ddd9ce);border-radius:10px}.ins-panel h2{font-size:27px;margin:4px 0 12px}.ins-panel h3{font-size:18px;margin:24px 0 10px}.ins-panel p{max-width:90ch}.ins-status{font-weight:650;color:#805b27;padding:13px 0}.ins-number{font-size:36px;font-variant-numeric:tabular-nums}.ins-number small{font-size:14px}.ins-chart{display:block;width:100%;max-width:950px;height:auto;margin:18px 0}.ins-chart text{font-family:system-ui,sans-serif;font-size:12px;fill:#5c605c}.ins-source{font-size:11px;color:#6b706b;overflow-wrap:anywhere}.ins-source code{font-size:inherit}.ins-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:14px 0}.ins-metrics span{font-size:12px;color:#656961}.ins-metrics b{display:block;color:#202e2d;font-size:23px;font-variant-numeric:tabular-nums}.ins-select{display:flex;align-items:center;justify-content:space-between;gap:16px}.ins-select select{font:inherit;padding:9px;border:1px solid #bcbeb7;background:#fff;border-radius:5px}.ins-matrix>div{display:grid;grid-template-columns:minmax(140px,1fr) minmax(80px,1fr) auto;gap:8px 14px;padding:14px 0;border-bottom:1px solid #e8e8df}.ins-matrix small{grid-column:1/-1;color:#777;overflow-wrap:anywhere}.ins-matrix strong,.ins-matrix span{font-size:14px}.ins-input-bar{height:9px;background:#ecebe4;border-radius:3px;align-self:center;overflow:hidden}.ins-input-bar i{display:block;height:100%;background:#839c96}.ins-hypotheses details{border-top:1px solid #dce0d8;padding:15px 0}.ins-hypotheses summary{display:flex;gap:14px;justify-content:space-between;cursor:pointer}.ins-hypotheses summary b{font-size:12px;color:#8a6742;white-space:nowrap}.ins-hypotheses dl{display:grid;grid-template-columns:135px 1fr;gap:9px;font-size:14px}.ins-hypotheses dd{margin:0}.ins-panel details>summary{cursor:pointer;margin:12px 0}.ins-panel table{width:100%;font-size:13px;border-collapse:collapse}.ins-panel th,.ins-panel td{padding:8px;text-align:left;border-bottom:1px solid #e4e5dc}.ins-poll-row{display:grid;grid-template-columns:215px minmax(80px,1fr) 50px;gap:9px;align-items:center;font-size:12px;margin:8px 0}.ins-poll-row small{color:#777}.ins-poll-axis{position:relative;height:13px;background:linear-gradient(to right,transparent 49.7%,#aaa 49.7%,#aaa 50.3%,transparent 50.3%)}.ins-poll-axis i{position:absolute;height:13px;border-radius:2px}.ins-poll-row b{text-align:right;font-variant-numeric:tabular-nums}@media(min-width:1200px){.ins-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.ins-panel:nth-child(2){grid-column:2;grid-row:1}.ins-panel:nth-child(1){grid-column:1;grid-row:1}}@media(max-width:600px){.ins-panel{padding:18px}.ins-panel h2{font-size:24px}.ins-metrics{grid-template-columns:1fr 1fr}.ins-matrix>div{grid-template-columns:1fr 90px}.ins-matrix>div>span:nth-child(3){grid-column:1/-1}.ins-hypotheses dl{grid-template-columns:1fr}.ins-hypotheses dt{font-weight:650}.ins-poll-row{grid-template-columns:125px minmax(50px,1fr) 35px;font-size:10px}.ins-poll-row>span:first-child{overflow-wrap:anywhere}.ins-select{align-items:flex-start}.ins-panel .tbl-wrap{max-width:100%;overflow-x:auto}}

/* Keep the motivating count/projection/composition answers together on phones. */
.key-answers { margin: .6rem 0; padding: .6rem; background: var(--paper-2, #f4f1e9); }
.key-answers p { margin: .25rem 0; font-size: .9rem; line-height: 1.3; }
@media (max-width: 600px) { .race-head .r-needle { display:none; } .race-head h1 { font-size:1.5rem; } .race-head .priorline { font-size:.75rem; } }

.closings .t { min-width: 0; white-space: normal; line-height: 1.35; }

@media(max-width:600px){.administrative,.administrative tbody,.administrative tr,.administrative td{display:block;width:100%;min-width:0}.administrative thead{display:none}.administrative tr{padding:12px 0;border-bottom:1px solid #ccc}.administrative td{padding:3px 0;white-space:normal}.administrative td:nth-child(2)::before{content:"Ballots: ";font-weight:bold}.administrative td:nth-child(3)::before{content:"Methods: ";font-weight:bold}.administrative td.ph-hide{display:none}}

@media(max-width:600px){.tabs,.filters{flex-wrap:wrap;overflow-x:visible}.tabs a{min-width:0}.filters .chip{max-width:100%;white-space:normal}}
.block,.prose-col{overflow-wrap:anywhere}.block details,.prose-col details{max-width:100%;overflow-x:auto}

/* Scoped counts stay at the top of the desk and selected race. */
.priority-desk { padding-top:.7rem; padding-bottom:.7rem; }
.priority-desk h2 { font-size:1.15rem; margin-bottom:.4rem; }
.priority-rows p { font-size:.8rem; line-height:1.35; margin:.35rem 0; }
.county-summary { background:var(--paper-2, #f4f1e9); padding:.6rem; font-size:.85rem; }
.county-summary p { margin:.3rem 0; }
.county-summary select { max-width:100%; font:inherit; }
.county-summary details, .priority-desk details { font-size:.75rem; overflow-wrap:anywhere; }

/* Selected reporting-unit comparisons retain full raw provenance on demand. */
.matched-comparison { border-left: 3px solid var(--rule-strong); padding-left: 16px; margin: 20px 0; }
.matched-comparison details p, .answer details p { overflow-wrap: anywhere; }

/* Keep count and consequence ahead of the detailed audit on small screens. */
.key-answers .count-head { font-size:1.15rem; }
.forecast-qualifications { margin:.75rem 0; font-size:.85rem; }
.forecast-qualifications summary { cursor:pointer; }

.administrative-card { margin: 1rem 0; padding: .8rem; border: 1px solid var(--rule); border-radius: var(--radius); overflow-wrap: anywhere; }
.administrative-card summary { cursor: pointer; font-weight: 600; }
.administrative-downloads { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Pre-election forecast view */
.fc .fc-lede { font-size: 1.1rem; max-width: 60rem; }
.fc-odds { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.fc-odds b { font-size: 1.8rem; }
.fc-d b { color: #2f5fb3; } .fc-r b { color: #c0392b; } .fc-n { color: #6b5b00; }
.fc-bar { display: flex; height: 10px; width: 100%; min-width: 90px; border-radius: 3px; overflow: hidden; background: #eee; margin: 4px 0; }
.fc-bar .d { background: #2f5fb3; } .fc-bar .o { background: #c9a227; } .fc-bar .r { background: #c0392b; }
.fc-hist { width: 100%; height: auto; display: block; margin-top: 6px; }
.fc-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.fc-table th, .fc-table td { text-align: left; padding: 6px 6px; border-bottom: 1px solid #e5e5e5; vertical-align: top; }
.fc-table td:nth-child(4) { min-width: 140px; }
.fc-ro th:first-child, .fc-ro td:first-child { min-width: 5.5rem; }
.fc-ro td:nth-child(5) { min-width: 9rem; }
.fc-ro-h { margin-top: 1.6rem; }
.fc-ro-wrap { overflow-x: auto; }
@media (max-width: 640px) { .fc-ro { min-width: 34rem; } .fc-ro td:nth-child(2), .fc-ro td:nth-child(4) { min-width: 9rem; } .fc-ro td:nth-child(3) { min-width: 6.5rem; } }
.fc-ro .fc-np { color: #767676; font-style: italic; }
.fc-ro-c td { padding-top: 0; }
.fc-ro-c .fc-table { margin: 4px 0 8px; }
.tag.fc-fb { background: #fff4d6; color: #6b5b00; border: 1px solid #e3c35a; }
#fcshift { width: 100%; max-width: 520px; }
.fc-shift-out { font-size: 1.02rem; }
.fc-race .fc-bar { max-width: 420px; }
.fc-ph { display: none; }
@media (max-width: 640px) { .fc-ph { display: inline; } .fc-table td:nth-child(4) { min-width: 110px; } }
.fc-rehearsal { background: #fff4d6; border: 1px solid #e3c35a; padding: 8px 12px; }
.fc-changes { background: #f3f6fb; padding: 6px 12px; border-left: 3px solid #2f5fb3; }
.fc-check { font-size: .85em; margin: 4px 0 10px; padding: 3px 8px; border-left: 3px solid #999; }
.fc-check-ok { border-color: #3a8a4a; }
.fc-check-part { border-color: #c99a1e; background: #fffaf0; }
.fc-check-no { border-color: #b3412f; background: #fdf3f1; }
.fc-counts { margin-top: 8px; }
.fc-closelist { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .9em; }
.fc-closelist .fc-closed { color: #666; }
