/* ============================================================
   WIRE & HERALDRY — application styles.
   Ledger geometry: hairlines, heavy section rules, 2–4px radii, tabular numerals.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 800; line-height: 1; margin: 0; letter-spacing: -.005em; text-transform: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* tabular numerals only where numbers align (body-wide tnum also widens , and . in Schibsted) */
.tbl td, .cand-val, .sb-pct, .sb-votes, .stat-num, .lr-lead b, .lr-margin, .lr-rep, .wire-item, .cd-num, .q-pct, .num, .reporting, .ix-count { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- masthead ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
/* Heraldic band: Calvert paly (gold/black, slanted) alternating every 80px with Crossland
   (red/white). Decorative only — never a data or state color. */
.herald-band { height: 6px; position: relative;
  background: repeating-linear-gradient(105deg, var(--flag-gold) 0 5px, var(--flag-black) 5px 10px); }
.herald-band::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, var(--flag-red) 0 8px, var(--flag-white) 8px 16px);
  -webkit-mask: repeating-linear-gradient(90deg, transparent 0 80px, #000 80px 160px);
          mask: repeating-linear-gradient(90deg, transparent 0 80px, #000 80px 160px); }
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 62px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; min-width: 0; color: var(--ink); }
.brand-mark { width: 30px; height: 35px; flex: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-title { font-family: var(--font-display); font-weight: 900; font-size: 25px; letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.brand-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-top: 4px; }
.brand-credit, .footer-credit { font-size: 11px; color: var(--ink-faint); font-style: italic; }
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav > a, .nav-more-btn {
  padding: 8px 12px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-soft); border: none; background: none; border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast); }
.main-nav > a:hover, .nav-more-btn:hover { color: var(--ink); }
.main-nav > a.active { color: var(--ink); border-bottom-color: var(--accent); }
.nav-more { position: relative; }
.nav-more-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: var(--bg-elev);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow); padding: 6px; z-index: 1100; }
.nav-more-menu[hidden] { display: none; }
.nav-more-menu a { display: block; padding: 9px 12px; font-size: 14px; font-weight: 500; color: var(--ink-soft); border-left: 2px solid transparent; }
.nav-more-menu a:hover { color: var(--ink); background: var(--bg-sunk); border-left-color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 8px; }
.refresh-pill { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  padding: 6px 10px; border: 1px solid var(--line); color: var(--ink-soft); background: var(--bg-elev); }
.live-word { text-transform: uppercase; letter-spacing: .14em; color: var(--ink); font-size: 10px; }
.refresh-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rep); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rep) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.theme-btn, .nav-toggle { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink); font-size: 16px; }
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle { display: none; }

/* ---------- wire rail ---------- */
.wire-rail { border-top: 1px solid var(--line); background: var(--bg-sunk); position: relative; }
.wire-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 38px; display: flex; align-items: center; gap: 18px; }
.wire-flag { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink); padding: 3px 7px; flex: none; }
.wire-status { display: flex; align-items: center; gap: 16px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; white-space: nowrap; }
.wire-status::-webkit-scrollbar { display: none; }
.wire-item { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.wire-item b { font-weight: 700; }
.wire-dim { color: var(--ink-faint); }
.wire-count { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: .02em; color: var(--accent); }
.wire-dot { width: 7px; height: 7px; border: 1.5px solid var(--ink-faint); border-radius: 50%; display: inline-block; }
.wire-dot.on { background: var(--good); border-color: var(--good); }
.wire-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.wire-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1.2s var(--ease); }
.filter-bar { display: flex; align-items: center; gap: 8px; flex: none; }
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg-btn { border: none; background: none; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--ink-soft); border-right: 1px solid var(--line); }
.seg-btn:last-child { border-right: none; }
.seg-btn.active { color: var(--accent-ink); background: var(--accent); }
.seg-btn.seg-dem.active { background: var(--dem); color: #fff; }
.seg-btn.seg-rep.active { background: var(--rep); color: #fff; }
.county-select { padding: 4px 8px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink);
  font-family: var(--font-mono); font-size: 11.5px; cursor: pointer; max-width: 180px; }
.county-select:focus { outline: none; border-color: var(--accent); }
.filter-clear { background: none; border: 1px solid var(--line); padding: 3px 9px; font-size: 11.5px; color: var(--ink-soft); }
.filter-clear:hover { border-color: var(--accent); color: var(--accent); }
.filter-active-note { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 14px; font-family: var(--font-mono); }

/* ---------- layout ---------- */
.app-main { max-width: var(--maxw); margin: 0 auto; padding: 30px 24px 90px; min-height: 60vh; }
.loading { display: grid; place-items: center; gap: 16px; padding: 120px 0; color: var(--ink-faint); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.spinner { width: 40px; height: 6px; background: repeating-linear-gradient(105deg, var(--flag-gold) 0 6px, var(--flag-black) 6px 12px);
  background-size: 200% 100%; animation: band 0.8s linear infinite; }
@keyframes band { to { background-position: -24px 0; } }
.page-head { margin-bottom: 26px; }
.kicker { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.page-title { font-size: clamp(38px, 6.4vw, 72px); font-weight: 900; letter-spacing: -.005em; text-transform: uppercase; line-height: .92; }
.page-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; text-transform: none; color: var(--accent); letter-spacing: 0; }
.page-sub { color: var(--ink-soft); font-size: 16px; max-width: 64ch; margin-top: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-top: var(--rule) solid var(--ink); padding-top: 10px; margin: 44px 0 18px; }
.section-head h2 { font-size: 30px; text-transform: uppercase; font-weight: 800; letter-spacing: .005em; }
.section-head .more { font-family: var(--font-mono); font-size: 11px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.race-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }

/* ---------- home ---------- */
.home-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 22px; }
.home-top:has(> :only-child) { grid-template-columns: 1fr; }
.hero-headline { font-size: clamp(54px, 9.5vw, 128px); font-weight: 900; text-transform: uppercase; line-height: .86; letter-spacing: -.01em; margin: 4px 0 14px; }
.hero-headline em { font-family: var(--font-serif); font-style: italic; font-weight: 400; text-transform: none; color: var(--accent); letter-spacing: -.01em; }
.hero-dek { font-size: 17px; color: var(--ink-soft); max-width: 56ch; margin: 0; }
.countdown-block { border: 1px solid var(--line-strong); border-top: var(--rule) solid var(--accent); padding: 16px 18px; background: var(--bg-elev); }
.cd-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.cd-num { font-family: var(--font-display); font-size: clamp(56px, 7vw, 92px); font-weight: 900; line-height: .95; color: var(--ink); letter-spacing: .01em; }
.cd-sub { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.unofficial-line { font-size: 12.5px; color: var(--ink-faint); margin: 10px 0 0; font-family: var(--font-mono); }
.unofficial-line a { color: var(--accent); }
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 14px; margin-top: 44px; }
.home-side > .card { margin-top: 0 !important; }
.side-block { border-top: var(--rule) solid var(--ink); padding-top: 10px; }
.flip-item { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.flip-item b { color: var(--ink); }
.expect { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-strong); }
.expect li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 12px 0 12px 18px; position: relative; border-bottom: 1px solid var(--line); }
.expect li::before { content: ""; position: absolute; left: -5px; top: 18px; width: 9px; height: 9px; background: var(--bg); border: 2px solid var(--accent); }
.expect .ex-t { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 600; padding-top: 2px; }
.expect b { font-family: var(--font-display); font-size: 21px; text-transform: uppercase; font-weight: 800; }
.expect p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }
.index-list { list-style: none; margin: 0; padding: 0; counter-reset: ix; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 32px; }
.index-list li { counter-increment: ix; border-bottom: 1px solid var(--line); }
.index-list a { display: grid; grid-template-columns: 44px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; padding: 14px 0; align-items: baseline; }
.index-list a::before { content: counter(ix, decimal-leading-zero); grid-row: 1 / 3; font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.ix-title { font-family: var(--font-display); font-weight: 800; font-size: 26px; text-transform: uppercase; transition: color var(--t-fast); }
.ix-sub { grid-column: 2; font-size: 13.5px; color: var(--ink-soft); }
.ix-count { grid-row: 1 / 3; grid-column: 3; font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); }
.index-list a:hover .ix-title { color: var(--accent); }
.map-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; padding: 18px 20px;
  background: var(--accent); color: var(--accent-ink); }
.map-banner span { font-family: var(--font-display); font-size: 30px; font-weight: 900; text-transform: uppercase; }
.map-banner b { font-size: 14px; }
.hero, .hero-lead, .hero-stats { all: unset; }
.stat { background: var(--bg-elev); padding: 18px; border: 1px solid var(--line); }
.stat-num { font-family: var(--font-display); font-weight: 900; font-size: 44px; line-height: .95; color: var(--ink); }
.stat-label { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-top: 6px; }

/* ---------- scoreboard ---------- */
.scoreboard { display: block; background: var(--bg-elev); border: 1px solid var(--line-strong); border-top: var(--rule) solid var(--ink); position: relative; color: var(--ink); }
a.scoreboard:hover { border-color: var(--ink-faint); }
.sb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 18px 8px; border-bottom: 1px solid var(--line); }
.sb-kicker { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.sb-state { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; text-align: right; }
.sb-rows { padding: 4px 18px 6px; }
.sb-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name pct" "bar votes"; column-gap: 18px; padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.sb-row:last-child { border-bottom: none; }
.sb-name { grid-area: name; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.sb-lead { font-family: var(--font-display); font-weight: 800; font-size: 30px; text-transform: uppercase; line-height: 1; }
.sb-mate { font-size: 13px; color: var(--ink-faint); }
.sb-party { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.sb-call { color: var(--good); font-weight: 900; font-size: 22px; }
.sb-pct { grid-area: pct; font-family: var(--font-display); font-weight: 900; font-size: 64px; line-height: .85; text-align: right; letter-spacing: -.01em; position: relative; }
.sb-pct small { font-size: .42em; font-weight: 700; margin-left: 2px; color: var(--ink-soft); }
.sb-votes { grid-area: votes; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); text-align: right; align-self: center; white-space: nowrap; }
.sb-bar { grid-area: bar; align-self: center; height: 10px; background: var(--bg-sunk); position: relative; }
.sb-bar i { display: block; height: 100%; background: var(--oth); transition: width 1s var(--ease); }
.sb-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ink-faint); }
.sb-dem .sb-bar i { background: var(--dem); } .sb-rep .sb-bar i { background: var(--rep); }
.sb-dem .sb-lead { box-shadow: inset 0 -.12em 0 color-mix(in srgb, var(--dem) 55%, transparent); }
.sb-rep .sb-lead { box-shadow: inset 0 -.12em 0 color-mix(in srgb, var(--rep) 55%, transparent); }
.sb-row:not(.sb-leading) .sb-pct { color: var(--ink-soft); }
.sb-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 18px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.sb-none .sb-pct { color: var(--ink-faint); }
.sb-md .sb-lead { font-size: 24px; } .sb-md .sb-pct { font-size: 46px; }
.sb-sm .sb-lead { font-size: 20px; } .sb-sm .sb-pct { font-size: 34px; } .sb-sm .sb-row { padding: 9px 0 8px; } .sb-sm .sb-mate { display: none; }
.sb-lg .sb-lead { font-size: clamp(26px, 3.4vw, 40px); } .sb-lg .sb-pct { font-size: clamp(48px, 7vw, 88px); }

/* live-change motion */
.delta-chip { display: inline-block; margin-left: 6px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--good);
  animation: delta-in 3.5s var(--ease) forwards; }
@keyframes delta-in { 0% { opacity: 0; transform: translateY(4px); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: .55; } }
.bumped::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: var(--accent);
  transform-origin: left; animation: sweep 1.4s var(--ease) forwards; }
@keyframes sweep { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

/* ---------- ledger rows ---------- */
.ledger { border-top: 1px solid var(--line-strong); }
.ledger-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 170px 64px 52px 104px; gap: 12px; align-items: center;
  padding: 11px 6px; border-bottom: 1px solid var(--line); transition: background var(--t-fast); }
.ledger-row:hover { background: var(--bg-elev); }
.lr-rank { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.lr-race { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.lr-race b { font-family: var(--font-display); font-weight: 800; font-size: 19px; text-transform: uppercase; }
.lr-race span { color: var(--ink-soft); }
.lr-cty { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.lr-lead { display: flex; align-items: center; gap: 7px; font-size: 14px; white-space: nowrap; overflow: hidden; }
.lr-lead b { font-family: var(--font-mono); font-size: 13px; margin-left: auto; }
.lr-margin, .lr-rep { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); text-align: right; }
.lr-dim { color: var(--ink-faint); }
.lr-tier { justify-self: end; }

/* ---------- mobile tab bar ---------- */
.tabbar { display: none; }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), border-color var(--t-fast);
  position: relative;
}
.card:hover { border-color: var(--line-strong); }
a.card:hover { background: color-mix(in srgb, var(--bg-elev) 70%, var(--bg-sunk)); }
/* equal-height cards across a grid row: stretch to row height, push footer to bottom */
.grid { align-items: stretch; }
.grid > * { min-width: 0; }
.race-card { display: flex; flex-direction: column; border-top: var(--rule) solid var(--line-strong); }
.race-card.lead-dem { border-top-color: var(--dem); } .race-card.lead-rep { border-top-color: var(--rep); } .race-card.lead-oth { border-top-color: var(--ink-faint); }
.race-card .rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.rc-office { font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1; text-transform: uppercase; }
.rc-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.rc-tier, .lr-tier { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: 3px 7px; white-space: nowrap; border: 1px solid var(--line); }
.tier-Toss-up { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tier-Competitive { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.tier-Lean { background: var(--bg-sunk); color: var(--ink-soft); }
.tier-Safe { background: var(--bg-sunk); color: var(--ink-faint); }

/* candidate bar rows */
.cand-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  padding: 5px 0; font-size: 14px; }
.cand-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cand-name .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand-name .lead-check { font-weight: 800; }
.lead-check.clinched { color: var(--good); }
.lead-check.leading-now { color: var(--ink-faint); font-weight: 700; }
.lead-legend { font-size: 11.5px; color: var(--ink-faint); margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line); display: flex; gap: 16px; flex-wrap: wrap; }
.lead-legend .lead-check { margin-right: 3px; }
.inc-tag { font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; letter-spacing: .1em; background: var(--ink); color: var(--bg);
  padding: 2px 5px; flex: none; align-self: center; }
.inc-alert { color: var(--rep); font-weight: 800; }
.inc-warn { color: var(--accent); font-weight: 700; }
.inc-ok { color: var(--good); font-weight: 600; }
.inc-loss-banner { background: color-mix(in srgb, var(--rep) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--rep) 40%, transparent); border-left: 4px solid var(--rep);
  border-radius: var(--r-md); padding: 13px 18px; margin-top: 8px; font-size: 15px; color: var(--ink); }
.inc-loss-banner b { color: var(--rep); }
/* major flag: defeated incumbents banner (top of the incumbents page) */
.inc-defeat-banner { background: color-mix(in srgb, var(--rep) 10%, var(--bg-elev));
  border: 2px solid var(--rep); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 28px; box-shadow: var(--shadow); }
.inc-defeat-head { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--rep); margin-bottom: 14px; }
.inc-defeat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.inc-defeat-item { display: block; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--rep);
  border-radius: var(--r-sm); padding: 11px 13px; transition: all var(--t-fast); }
.inc-defeat-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.idi-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.idi-race { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.idi-stat { font-size: 11.5px; color: var(--ink-faint); font-family: var(--font-mono); margin-top: 4px; }

.inc-trouble-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 12px; }
.inc-trouble-card { display: flex; flex-direction: column; border-left: 4px solid var(--accent); }
.itc-list { margin-top: 10px; display: flex; flex-direction: column; gap: 3px; }
.itc-cand { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.itc-pct { font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; }
.inc-trouble-card:has(.inc-alert) { border-left-color: var(--rep); }
@media (max-width: 720px) { .inc-trouble-list { grid-template-columns: 1fr; } }
.party-dot { width: 9px; height: 9px; border-radius: 1px; flex: none; display: inline-block; }
.pd-dem, .dot-dem { background: var(--dem); }
.pd-rep, .dot-rep { background: var(--rep); }
.pd-oth, .dot-oth { background: var(--oth); }
.cand-val { font-family: var(--font-mono); font-weight: 600; font-size: 13px; text-align: right; }
.cand-val .pct { color: var(--ink); }
.seat-chip { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; margin-right: 6px;
  text-transform: uppercase; letter-spacing: .03em; }
.seat-in { background: var(--good); color: #fff; }
.seat-likely { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.seat-tossup { background: var(--accent); color: #fff; }
.seat-longshot { background: var(--bg-sunk); color: var(--ink-soft); }
.seat-out { background: var(--bg-sunk); color: var(--ink-faint); }
.cand-val .votes { color: var(--ink-faint); font-size: 11.5px; margin-left: 6px; }
.bar-track { grid-column: 1/-1; height: 5px; background: var(--bg-sunk); overflow: hidden; }
.bar-fill { height: 100%; transition: width 1s var(--ease); }
.bf-dem { background: var(--dem); } .bf-rep { background: var(--rep); } .bf-oth { background: var(--oth); }
.leading .bar-fill { box-shadow: inset 0 0 0 99px color-mix(in srgb, currentColor 0%, transparent); }

/* reporting + footer of card */
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-faint); }
.reporting { font-family: var(--font-mono); }
.fav-btn { background: none; border: none; font-size: 17px; color: var(--ink-faint); transition: all var(--t-fast); line-height: 1; }
.fav-btn:hover { transform: scale(1.2); color: var(--gold); }
.fav-btn.on { color: var(--gold); }

/* ---------- needle component ---------- */
.needle-mini { width: 100%; height: 8px; border-radius: 999px; overflow: hidden; display: flex; background: var(--bg-sunk); }

/* "how the night unfolded" interactive chart */
.hist-wrap { position: relative; }
.hist-svg { display: block; overflow: visible; }
.hist-hit { cursor: crosshair; }
.hist-tip { position: absolute; top: 4px; min-width: 180px; background: var(--ink); color: var(--bg);
  border-radius: var(--r-sm); padding: 9px 11px; font-size: 12.5px; box-shadow: var(--shadow); pointer-events: none; z-index: 50; }
.hist-tip .ht-head { font-weight: 700; margin-bottom: 6px; font-family: var(--font-mono); font-size: 11.5px; opacity: .85; }
.hist-tip .ht-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 7px; align-items: center; padding: 1px 0; }
.hist-tip .ht-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-tip .ht-row b { font-family: var(--font-mono); }
.hist-tip .ht-v { font-family: var(--font-mono); opacity: .6; font-size: 11px; }

/* win-probability panel (replaces the needle gauge) */
.wp-row { display: grid; grid-template-columns: 1fr 120px 44px; gap: 10px; align-items: center; padding: 7px 0; }
.wp-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-width: 0; }
.wp-name .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-track { height: 10px; background: var(--bg-sunk); border-radius: 999px; overflow: hidden; }
.wp-fill { height: 100%; border-radius: 999px; transition: width var(--t-med) var(--ease); }
.wp-pct { font-family: var(--font-mono); font-weight: 700; font-size: 14px; text-align: right; }
@media (max-width: 520px) { .wp-row { grid-template-columns: 1fr 80px 40px; } }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-family: var(--font-mono); font-weight: 700; font-size: 10px;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint);
  padding: 10px 12px; border-bottom: 2px solid var(--ink); background: var(--bg-elev); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.tbl tr:hover td { background: var(--bg-sunk); }
.tbl .num { font-family: var(--font-mono); text-align: right; }
.tbl .lead-row td { font-weight: 600; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--accent); }

/* expandable precinct/county rows */
.expand-row td { padding: 0; background: var(--bg-sunk); }
.expand-inner { padding: 14px 18px; }
.disclosure { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 13px; }
.disclosure .chev { transition: transform var(--t-fast); }
.disclosure[aria-expanded="true"] .chev { transform: rotate(90deg); }

/* ---------- chips / filters ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  padding: 6px 12px; border: 1px solid var(--line); background: var(--bg-elev);
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft); transition: all var(--t-fast); text-transform: uppercase; letter-spacing: .05em;
}
.chip:hover { border-color: var(--line-strong); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search-box { width: 100%; padding: 13px 16px; font-size: 15px; font-family: var(--font-body);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink);
  margin-bottom: 16px; }
.search-box:focus { outline: none; border-color: var(--accent); }

/* ---------- map ---------- */
.map-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.map-panel { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px;
  position: sticky; top: calc(var(--header-h, 107px) + 12px); max-height: calc(100vh - 120px); overflow-y: auto; }
#map { height: calc(100vh - 150px); min-height: 560px; border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; }
.leaflet-container { background: var(--bg-sunk); font-family: var(--font-body); }
.map-legend { margin-top: 16px; }
.legend-row { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13.5px; }
.legend-swatch { width: 22px; height: 14px; border-radius: 3px; flex: none; border: 1px solid rgba(0,0,0,.15); }
.race-pick { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: none; color: var(--ink-soft); font-size: 14px; }
.race-pick:hover { background: var(--bg-sunk); color: var(--ink); }
.race-pick.active { background: var(--bg-sunk); color: var(--accent); font-weight: 600; border-color: var(--line); }

/* ---------- candidate page ---------- */
.cand-hero { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start; margin-bottom: 32px; }
.cand-photo { width: 180px; height: 220px; border-radius: var(--r-md); object-fit: cover; background: var(--bg-sunk);
  border: 1px solid var(--line); display: grid; place-items: center; font-size: 60px; color: var(--ink-faint); font-family: var(--font-display); }
.cand-links a { display: inline-flex; gap: 6px; align-items: center; padding: 7px 13px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 13.5px; margin: 4px 6px 0 0; transition: all var(--t-fast); }
.cand-links a:hover { border-color: var(--accent); color: var(--accent); }
.news-item { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
.news-item .nt { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.news-item .ns { font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- vote-type stacked bar ---------- */
.vt-bar { display: flex; height: 28px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); }
.vt-seg { display: grid; place-items: center; font-size: 11px; font-weight: 600; font-family: var(--font-mono); color: #fff; min-width: 0; }
.vt-legend { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }
.vt-leg-item { display: inline-flex; align-items: center; gap: 6px; }
.vt-leg-item b { color: var(--ink); font-weight: 600; }
.vt-swatch { width: 14px; height: 14px; border-radius: 3px; flex: none; border: 1px solid rgba(0,0,0,.12); }

/* ---------- misc ---------- */
.badge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; }
.badge-dem { background: color-mix(in srgb, var(--dem) 16%, transparent); color: var(--dem); }
.badge-rep { background: color-mix(in srgb, var(--rep) 16%, transparent); color: var(--rep); }
.badge-inc { background: var(--accent); color: var(--accent-ink); }
.disclaimer { background: var(--bg-elev); border: 1px solid var(--line); border-left: var(--rule) solid var(--accent);
  padding: 12px 16px; font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; display: flex; gap: 12px; align-items: flex-start; }
.disclaimer b { color: var(--accent); }
.crumb { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: 16px; }
.crumb a:hover { color: var(--accent); }
.empty { text-align: center; padding: 80px 20px; color: var(--ink-faint); }
.empty .big { font-size: 48px; margin-bottom: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px;
  border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; line-height: 1.2; transition: all var(--t-fast); box-sizing: border-box;
  vertical-align: top; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--bg-elev); color: var(--ink); border: 1px solid var(--line); }

/* theme sheet */
.theme-sheet[hidden] { display: none !important; }
.theme-sheet { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.4);
  display: grid; place-items: center; backdrop-filter: blur(3px); }
.theme-sheet-inner { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; max-width: 520px; width: 90%; box-shadow: var(--shadow); }
.theme-sheet-inner h3 { font-size: 22px; margin-bottom: 18px; }
.theme-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.theme-card { border: 2px solid var(--line); border-radius: var(--r-md); overflow: hidden; cursor: pointer; transition: all var(--t-fast); }
.theme-card:hover { transform: translateY(-2px); }
.theme-card.active { border-color: var(--accent); }
.theme-swatch { height: 64px; display: flex; }
.theme-swatch span { flex: 1; }
.theme-card .tc-name { padding: 8px 10px; font-size: 13px; font-weight: 600; }
.btn-close { margin-top: 18px; width: 100%; padding: 11px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--ink); color: var(--bg); font-weight: 600; }

/* footer */
.site-footer { border-top: var(--rule) solid var(--ink); background: var(--bg-elev); margin-top: 60px; }
.footer-brand { font-family: var(--font-display); font-size: 18px; text-transform: uppercase; letter-spacing: .02em; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 28px 24px; display: flex; justify-content: space-between;
  gap: 20px; font-size: 13px; color: var(--ink-faint); flex-wrap: wrap; }

/* info tooltips (jargon explainers) */
.info-tip { position: relative; display: inline-flex; vertical-align: middle; margin-left: 6px; cursor: help; }
.info-i { width: 16px; height: 16px; border-radius: 50%; background: var(--ink-faint); color: var(--bg);
  font-size: 10px; font-weight: 700; font-family: var(--font-body); display: grid; place-items: center; font-style: normal; }
.info-tip:hover .info-i, .info-tip:focus .info-i { background: var(--accent); }
.info-pop { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 260px; background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.45; font-weight: 400;
  padding: 10px 12px; border-radius: var(--r-sm); box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity var(--t-fast); z-index: 500; text-transform: none; letter-spacing: normal; }
.info-pop::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--ink); }
.info-tip:hover .info-pop, .info-tip:focus .info-pop { opacity: 1; }
@media (max-width: 600px) { .info-pop { width: 200px; left: auto; right: 0; transform: none; } .info-pop::after { left: auto; right: 6px; } }

/* "leader flipped" pulse (Expansionist) */
@keyframes flip-flash { 0%,100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 3px var(--gold); } }
.just-flipped { animation: flip-flash 1.4s var(--ease) 2; }
.projected-pill { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  background: var(--good); color: #fff; padding: 2px 7px; border-radius: 4px; margin-left: 6px; }

/* staggered entrance */
.stagger > * { opacity: 0; animation: rise .5s var(--ease) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* sticky "who's ahead" bar on race pages — keeps the result visible while scrolling */
.sticky-results { position: sticky; top: var(--header-h, 107px); z-index: 900; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--header-bg); backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid var(--line); border-left: var(--rule) solid var(--accent); padding: 8px 14px; margin: 0 0 18px; }
.srb-cands { display: flex; gap: 14px; flex-wrap: wrap; min-width: 0; }
.srb-cand { font-size: 14px; white-space: nowrap; }
.srb-cand b { font-family: var(--font-mono); }
.srb-meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }

/* tossup-board rows (was inline-styled; classed so it can collapse on mobile) */
.needle-row { display: grid; grid-template-columns: 38px 1fr auto 200px auto; gap: 16px;
  align-items: center; margin-bottom: 10px; padding: 14px 18px; }
.needle-rank { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--ink-faint); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .map-layout { grid-template-columns: 1fr; }
  .map-panel { position: static; max-height: none; }
  #map { height: 60vh; }
}
@media (max-width: 720px) {
  /* masthead shrinks; the bottom tab bar takes over navigation */
  :root { --header-h: 96px; }
  /* backdrop-filter makes the header the containing block for fixed children, which would
     trap the More sheet at the top; use a solid header on phones instead */
  .site-header { backdrop-filter: none; background: var(--bg); }
  .header-inner { gap: 10px; height: 52px; padding: 0 14px; }
  .brand-mark { width: 24px; height: 28px; }
  .brand-title { font-size: 20px; }
  .brand-sub, .brand-credit, .live-word { display: none; }
  .main-nav > a, .nav-more-btn { display: none; }
  .nav-more { position: static; }
  .nav-more-menu { position: fixed; left: 0; right: 0; top: auto; bottom: 64px; border-left: none; border-right: none; padding: 8px 6px 10px; }
  .nav-more-menu a { padding: 14px 16px; font-size: 16px; }
  .wire-inner { padding: 0 14px; gap: 10px; }
  .wire-flag { display: none; }
  .filter-bar .seg { display: none; }
  .county-select { max-width: 120px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050;
    background: var(--header-bg); backdrop-filter: blur(14px); border-top: 1px solid var(--line-strong); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 10px; background: none; border: none;
    color: var(--ink-soft); font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; border-top: 2px solid transparent; }
  .tabbar .tb-ico { font-size: 17px; line-height: 1; font-family: var(--font-body); }
  .tabbar a.active { color: var(--ink); border-top-color: var(--accent); }
  .app-main { padding: 20px 16px 100px; }
  .site-footer { padding-bottom: 70px; }
  .home-top, .home-grid { grid-template-columns: 1fr; gap: 16px; }
  .home-side { margin-top: 8px; }
  .index-list { grid-template-columns: 1fr; }
  .ledger-row { grid-template-columns: 26px minmax(0,1fr) auto; row-gap: 2px; }
  .ledger-row .lr-lead { grid-column: 2; }
  .ledger-row .lr-margin, .ledger-row .lr-rep { display: none; }
  .ledger-row .lr-tier { grid-column: 3; grid-row: 1; }
  .sb-row { column-gap: 10px; }
  .expect li { grid-template-columns: 1fr; gap: 2px; }
  .map-banner { flex-direction: column; align-items: flex-start; }
  .section-head h2 { font-size: 24px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .cand-hero { grid-template-columns: 1fr; }
  /* collapse the desktop two-up / multi-column race + needle grids to a single column */
  .grid-split { grid-template-columns: 1fr !important; }
  .needle-row { grid-template-columns: 28px 1fr auto !important; }
  .needle-row .needle-gauge-cell, .needle-row .needle-fav-cell { display: none; }
  /* tap targets >= 44px */
  .theme-btn, .nav-toggle { width: 44px; height: 44px; }
  .seg-btn { padding: 10px 15px; }
  .chip { padding: 10px 14px; }
  .fav-btn { padding: 6px; font-size: 20px; }
  /* tables scroll within their card instead of blowing out the viewport */
  .tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl-scroll .tbl { min-width: 460px; }
  /* map: smaller, no tall void; scroll handled by Leaflet opts */
  #map { height: 52vh; min-height: 300px; }
  .map-panel { padding: 14px; }
}

/* ---------- general election: reporting status + ballot questions ---------- */
.st-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); }
.st-good { color: var(--ink); background: color-mix(in srgb, #0ca30c 18%, transparent); border-color: #0ca30c; }
.st-wait { color: var(--ink); background: color-mix(in srgb, #fab219 18%, transparent); border-color: #fab219; }
.st-none { color: var(--ink-faint); }
.status-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 6px; }
.status-strip > div { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.status-strip b { font-family: var(--font-mono); font-size: 12.5px; }
.vt-ledger { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.vt-card-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 6px; }
.vt-explain { font-size: 13px; color: var(--ink-soft); margin-top: 8px; line-height: 1.45; }
.vt-pending { opacity: .75; }
.mini-bar { height: 6px; background: var(--bg-sunk); border-radius: 3px; overflow: hidden; width: 90px; display: inline-block; vertical-align: middle; margin-right: 6px; }
.mini-bar > div { height: 100%; background: var(--gold); border-radius: 3px; }
.rep-table td, .rep-table th { white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.seq-legend { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.seq-sw { width: 22px; height: 10px; border-radius: 2px; display: inline-block; }
.svgmap { position: relative; }
.svgmap svg { width: 100%; height: auto; display: block; }
.svgmap-shape { cursor: pointer; transition: opacity var(--t-fast); }
.svgmap-shape:hover, .svgmap-shape:focus { opacity: .8; outline: none; stroke: var(--ink); stroke-width: 2; }
.svgmap-label { font-size: 12px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--bg-elev); stroke-width: 3px; pointer-events: none; }
.svgmap-tip { position: absolute; z-index: 5; background: var(--bg-elev); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; font-size: 12px; line-height: 1.45; box-shadow: 0 6px 20px rgba(0,0,0,.25); pointer-events: none; max-width: 240px; }
.tl-wrap { position: relative; }
.tl-svg { width: 100%; height: auto; display: block; }
.tl-grid { stroke: var(--line); stroke-width: 1; }
.tl-axis { font-size: 11px; fill: var(--ink-faint); }
.tl-line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }
.tl-drop { fill: #d03b3b; stroke: var(--bg-elev); stroke-width: 2; }
.tl-cross { stroke: var(--ink-faint); stroke-dasharray: 3 3; }
.cal-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cal-list li { display: grid; grid-template-columns: 190px 1fr; gap: 12px; font-size: 14px; }
.cal-when { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }
.cal-past { opacity: .5; }
.chip-mini { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); margin-left: 4px; }
.chip-est { border-style: dashed; }
.prose p { margin: 0 0 10px; line-height: 1.6; color: var(--ink-soft); }
.prose p b { color: var(--ink); }
.rc-qtitle { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.q-split { display: flex; justify-content: space-between; gap: 12px; }
.q-split > div { display: flex; flex-direction: column; }
.q-side { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.q-pct { font-family: var(--font-display); font-size: 72px; font-weight: 900; line-height: .9; }
.q-bar { position: relative; display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--bg-elev); margin-top: 12px; }
.q-bar > div { height: 100%; }
.q-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.est-badge { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 999px; border: 1.5px dashed var(--gold); color: var(--ink); }
.est-wait { background: color-mix(in srgb, #fab219 12%, transparent); border-left: 3px solid #fab219; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; margin-bottom: 12px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.rep-strip { display: block; margin-top: 8px; }
.rep-strip-row { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 6px; font-size: 14px; }
.qi-card { display: block; margin-top: 12px; border-left: 4px solid #5e3c99; }
@media (max-width: 860px) {
  .status-strip, .vt-ledger { grid-template-columns: repeat(2, 1fr); }
  .cal-list li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 520px) {
  .status-strip, .vt-ledger { grid-template-columns: 1fr; }
  .q-pct { font-size: 34px; }
}
.rep-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
.rep-table { font-size: 13px; }
.rep-table .mini-bar { width: 60px; }
@media (max-width: 860px) { .rep-grid { grid-template-columns: 1fr; } }
.rep-strip .vt-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: 0; }
@media (max-width: 860px) { .rep-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 16px 12px; min-width: 0; }
  .stat-num { font-size: 26px; overflow-wrap: anywhere; }
}
.cal-src { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .tabbar, .site-footer, #grain { display: none !important; }
  body { background: #fff; color: #000; }
}
.sb-none .sb-pct { font-size: 30px !important; color: var(--ink-faint); align-self: center; }
