/* Midterms 2026: phone first, one type scale, tabular numbers everywhere. */
:root {
  color-scheme: dark;
  --paper: #07110D;
  --card: #0C211A;
  --card-2: #102C22;
  --ink: #F4EEDC;
  --ink-2: #DCD3BC;
  --muted: #A69F8A;
  --rule: rgba(212, 175, 55, 0.38);
  --rule-2: #17382B;
  --gold: #D4AF37;
  --gold-hi: #F5DE8E;
  --gold-lo: #8E6C17;
  --gold-grad: linear-gradient(180deg, #F5DE8E 0%, #D4AF37 45%, #A8841F 100%);
  --on-gold: #1A1404;
  --emerald: #0B3D2E;
  --d: #3B6EF0;
  --d-2: #6F95F2;
  --d-3: #A9C0F4;
  --d-tint: rgba(59, 110, 240, 0.2);
  --r: #E5384A;
  --r-2: #EE727D;
  --r-3: #F4B0B5;
  --r-tint: rgba(229, 56, 74, 0.2);
  --o: #19A891;
  --o-tint: rgba(25, 168, 145, 0.2);
  --tu: #5F6B66;
  --tu-2: #808C86;
  --nr: #132A21;
  --sample: #F5D547;
  --focus: #F5DE8E;

  --f-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --f-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.75rem;
  --t-2xl: 2.5rem;
  --t-3xl: 3.5rem;
  --gut: 16px;
  --radius: 12px;
  --tabbar-h: 62px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--t-md);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 50; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
h1, h2, h3 { margin: 0; line-height: 1.1; }
.cond { font-stretch: 72%; }

/* SAMPLE banner */
.sample-banner { background: var(--sample); color: var(--ink); font-size: var(--t-sm); padding: 8px var(--gut); text-align: center; position: sticky; top: 0; z-index: 30; }
.sample-tag { display: inline-block; background: var(--sample); color: var(--ink); font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.06em; padding: 1px 6px; border-radius: 4px; vertical-align: middle; }

/* Header */
.top { display: flex; align-items: center; gap: 16px; padding: 12px var(--gut); border-bottom: 1px solid var(--rule); background: var(--paper); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: inline-flex; gap: 3px; }
.brand-mark i { width: 9px; height: 22px; border-radius: 2px; background: var(--d); }
.brand-mark i + i { background: var(--r); }
.brand-word { font-weight: 900; font-stretch: 75%; font-size: 1.35rem; letter-spacing: 0.01em; }
.brand-word b { font-weight: 500; color: var(--muted); }
.topnav { display: none; gap: 4px; margin-left: 12px; }
.topnav a { text-decoration: none; font-weight: 600; font-size: var(--t-sm); padding: 8px 12px; border-radius: 999px; color: var(--ink-2); }
.topnav a:hover { background: var(--rule-2); }
.topnav a.on { background: var(--gold-grad); color: var(--on-gold); }
body[data-view='map'] .top-count { visibility: hidden; }
.top-count { margin-left: auto; font-size: var(--t-sm); font-weight: 700; color: var(--ink-2); white-space: nowrap; }

/* Bottom tab bar on phones */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(6, 1fr); background: rgba(246, 243, 236, 0.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; height: var(--tabbar-h); justify-content: center; text-decoration: none; font-size: 0.65rem; font-weight: 600; color: var(--muted); }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on svg { stroke-width: 2.4; }

main { display: block; max-width: 1200px; margin: 0 auto; padding: 0 var(--gut) 32px; outline: none; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* Footer */
.foot { max-width: 1200px; margin: 0 auto; padding: 24px var(--gut) 32px; border-top: 1px solid var(--rule); }
.foot-line { font-weight: 800; margin: 0 0 6px; }
.foot-sub { color: var(--muted); font-size: var(--t-sm); margin: 0 0 4px; }

/* Section heads */
.sec { margin-top: 28px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: var(--t-lg); font-weight: 800; font-stretch: 80%; letter-spacing: 0.01em; text-transform: uppercase; }
.sec-h .aside { font-size: var(--t-sm); color: var(--muted); }
.kicker { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.empty { color: var(--muted); font-size: var(--t-sm); padding: 14px; border: 1px dashed var(--rule); border-radius: var(--radius); background: transparent; }

/* Hero / countdown */
.hero { padding: 22px 0 6px; display: grid; gap: 14px; }
.hero h1 { font-size: 2.25rem; font-weight: 900; font-stretch: 70%; line-height: 0.95; letter-spacing: -0.005em; }
.hero h1 .d { color: var(--d); }
.hero h1 .r { color: var(--r); }
.hero p { margin: 0; color: var(--ink-2); max-width: 46ch; }
.count { display: flex; gap: 8px; align-items: stretch; }
.count .u { background: var(--gold-grad); color: var(--on-gold); border-radius: 10px; padding: 8px 10px 6px; min-width: 66px; text-align: center; }
.count .u b { display: block; font-size: var(--t-xl); font-weight: 800; font-stretch: 85%; line-height: 1; }
.count .u span { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.count-note { font-size: var(--t-sm); color: var(--muted); }

/* Segmented controls */
.controls { display: flex; flex-wrap: wrap; row-gap: 8px; gap: 10px; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.seg { display: inline-flex; background: var(--rule-2); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: var(--t-sm); cursor: pointer; color: var(--ink-2); min-height: 36px; }
.seg button[aria-pressed='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.seg.dark button[aria-pressed='true'] { background: var(--gold-grad); color: var(--on-gold); }
.seg-label { font-size: var(--t-xs); color: var(--muted); font-weight: 700; margin-right: 6px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Map */
.mapwrap { position: relative; margin: 0 -6px; }
.usmap { width: 100%; height: auto; display: block; touch-action: manipulation; }
.usmap .st { stroke: var(--paper); stroke-width: 1; transition: fill 0.35s ease, opacity 0.2s; cursor: pointer; }
.usmap .st:hover, .usmap [data-st]:focus-visible .st, .usmap path.st:focus-visible { stroke: var(--ink); stroke-width: 2; paint-order: stroke; }
.usmap path.st:focus-visible { outline: none; }
.usmap .st.sel { stroke: var(--ink); stroke-width: 2.5; }
.usmap .lbl { font: 700 11px var(--f-sans); text-anchor: middle; fill: var(--ink-2); pointer-events: none; }
.usmap .inset { cursor: pointer; }
.usmap .inset-lbl { font-size: 13px; }
.usmap .on-r0, .usmap .on-r6, .usmap .on-r1, .usmap .on-r5 { fill: #fff; }
.usmap .badge circle { fill: var(--ink); }
.usmap .badge text { font: 800 10px var(--f-sans); fill: var(--paper); text-anchor: middle; pointer-events: none; }
.usmap .hatch-bg { fill: var(--tu); }
.usmap .hatch-line { stroke: var(--tu-2); stroke-width: 3; }
.r0 { fill: var(--d); } .r1 { fill: var(--d-2); } .r2 { fill: var(--d-3); }
.r3 { fill: url(#hatch); } .r4 { fill: var(--r-3); } .r5 { fill: var(--r-2); } .r6 { fill: var(--r); }
.rx { fill: var(--nr); }
.pd { fill: var(--d); } .pr { fill: var(--r); } .po { fill: var(--o); }
.maptip { position: absolute; z-index: 5; pointer-events: none; background: var(--gold-grad); color: var(--on-gold); border-radius: 10px; padding: 8px 10px; font-size: var(--t-sm); max-width: 260px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); }
.maptip b { display: block; font-size: var(--t-md); }
.maptip .row { display: flex; justify-content: space-between; gap: 12px; }
.sample-watermark { position: absolute; left: 8px; bottom: 6px; pointer-events: none; }

/* Legend */
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: var(--t-xs); color: var(--ink-2); margin: 8px 0 0; align-items: center; }
.legend .k { display: inline-flex; align-items: center; gap: 5px; }
.sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; flex: none; }
.sw.r0 { background: var(--d); } .sw.r1 { background: var(--d-2); } .sw.r2 { background: var(--d-3); }
.sw.r3 { background: repeating-linear-gradient(45deg, var(--tu) 0 3px, var(--tu-2) 3px 6px); }
.sw.r4 { background: var(--r-3); } .sw.r5 { background: var(--r-2); } .sw.r6 { background: var(--r); }
.sw.rx { background: var(--nr); } .sw.pd { background: var(--d); } .sw.pr { background: var(--r); } .sw.po { background: var(--o); }
.legend-note { font-size: var(--t-xs); color: var(--muted); margin-top: 4px; }

/* Rating pill */
.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: var(--t-sm); padding: 3px 9px 3px 7px; border-radius: 999px; white-space: nowrap; background: var(--rule-2); }
.pill::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--nr); }
.pill.r0::before { background: var(--d); } .pill.r1::before { background: var(--d-2); } .pill.r2::before { background: var(--d-3); }
.pill.r3::before { background: repeating-linear-gradient(45deg, var(--tu) 0 2px, var(--tu-2) 2px 4px); }
.pill.r4::before { background: var(--r-3); } .pill.r5::before { background: var(--r-2); } .pill.r6::before { background: var(--r); }
.pill.r0, .pill.r1, .pill.r2 { background: var(--d-tint); color: #12348F; }
.pill.r4, .pill.r5, .pill.r6 { background: var(--r-tint); color: #8E1724; }

/* Balance of power */
.bop { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; }
.bop + .bop { margin-top: 10px; }
.bop-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bop-h h3 { font-size: var(--t-md); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-stretch: 85%; }
.bop-totals { display: flex; justify-content: space-between; align-items: flex-end; margin: 10px 0 6px; gap: 8px; }
.bop-totals .side { font-weight: 800; }
.bop-totals .side b { display: block; font-size: var(--t-2xl); font-stretch: 75%; line-height: 0.9; }
.bop-totals .side.d b { color: var(--d); } .bop-totals .side.r b { color: var(--r); }
.bop-totals .side.r { text-align: right; }
.bop-totals .mid { text-align: center; font-size: var(--t-xs); color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.bop-totals .mid b { display: block; font-size: var(--t-lg); color: var(--ink); }
.bar { position: relative; display: flex; height: 26px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--paper); }
.bar > span { display: block; height: 100%; min-width: 0; transition: flex-grow 0.4s ease; position: relative; }
.bar .b-held-d { background: #102E7E; } .bar .b-held-r { background: #8E1724; } .bar .b-held-i { background: var(--o); }
.bar .r0 { background: var(--d); } .bar .r1 { background: var(--d-2); } .bar .r2 { background: var(--d-3); }
.bar .r3 { background: repeating-linear-gradient(45deg, var(--tu) 0 4px, var(--tu-2) 4px 8px); }
.bar .r4 { background: var(--r-3); } .bar .r5 { background: var(--r-2); } .bar .r6 { background: var(--r); }
.bar .pick-d { background: var(--d); } .bar .pick-r { background: var(--r); } .bar .pick-i { background: var(--o); }
.bar .undecided { background: repeating-linear-gradient(45deg, var(--tu) 0 4px, var(--tu-2) 4px 8px); }
.bar-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); left: 50%; }
.bar-wrap { position: relative; }
.bar-mark-l { position: absolute; top: -18px; transform: translateX(-50%); font-size: 0.6875rem; font-weight: 800; white-space: nowrap; }
.bop-counts { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 8px; text-align: center; font-size: 0.6875rem; color: var(--muted); }
.bop-counts b { display: block; font-size: var(--t-md); color: var(--ink); }
.bop-note { font-size: var(--t-xs); color: var(--muted); margin-top: 10px; }

/* Race cards (closest races) */
.cards { display: grid; gap: 10px; grid-template-columns: 1fr; }
.rc { display: block; position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; transition: border-color 0.15s, transform 0.15s; }
.rc:hover { border-color: var(--ink); }
.rc:active { transform: scale(0.99); }
.rc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rc-title { font-weight: 800; font-size: var(--t-md); text-decoration: none; }
.rc-title::after { content: ''; position: absolute; inset: 0; }
.rc .chip { position: relative; z-index: 1; }
.rc-ratings { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: var(--t-xs); color: var(--muted); align-items: center; }
.rc-names { display: flex; gap: 10px; margin-top: 8px; font-size: var(--t-sm); flex-wrap: wrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.d { background: var(--d); } .dot.r { background: var(--r); } .dot.o { background: var(--o); }

/* State chips grid */
.stategrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.stategrid a { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-decoration: none; padding: 9px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--rule-2); font-size: var(--t-sm); font-weight: 600; }
.stategrid a:hover { border-color: var(--ink); }
.stategrid .n { font-size: var(--t-xs); color: var(--muted); font-weight: 700; }

/* Source chip + popover */
.chip { display: inline-flex; align-items: center; border: 1px solid var(--rule); background: var(--card); color: var(--ink-2); font-size: 0.6875rem; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 999px; cursor: pointer; vertical-align: middle; white-space: nowrap; letter-spacing: 0.01em; min-height: 22px; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin-right: 5px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.popover { position: fixed; z-index: 60; background: var(--gold-grad); color: var(--on-gold); border-radius: 14px; padding: 14px; width: min(340px, calc(100vw - 24px)); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); font-size: var(--t-sm); }
.popover .src + .src { border-top: 1px solid rgba(255, 255, 255, 0.15); margin-top: 10px; padding-top: 10px; }
.popover .src-t { font-weight: 700; font-size: var(--t-md); line-height: 1.25; }
.popover .src-m { opacity: 0.75; margin: 3px 0 8px; }
.popover a.open { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); color: var(--gold-hi); text-decoration: none; font-weight: 800; padding: 7px 12px; border-radius: 999px; }
.popover .x { position: absolute; top: 8px; right: 8px; background: transparent; border: 0; color: var(--on-gold); font-size: 20px; width: 32px; height: 32px; cursor: pointer; opacity: 0.7; }
@media (max-width: 640px) { .popover { left: 12px !important; right: 12px; top: auto !important; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); width: auto; } }

/* State page */
.crumbs { font-size: var(--t-sm); padding-top: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; font-weight: 700; color: var(--ink-2); }
.state-head { display: flex; align-items: center; gap: 14px; padding: 10px 0 4px; }
.state-head svg { width: 64px; height: 64px; flex: none; }
.state-head svg path { fill: var(--ink); }
.state-head h1 { font-size: var(--t-2xl); font-weight: 900; font-stretch: 70%; line-height: 0.95; }
.state-head .sub { color: var(--muted); font-size: var(--t-sm); margin-top: 4px; }
.racenav { position: sticky; top: 0; z-index: 20; display: flex; gap: 6px; overflow-x: auto; padding: 10px var(--gut); margin: 8px calc(-1 * var(--gut)) 0; background: var(--paper); border-bottom: 1px solid var(--rule); scrollbar-width: none; }
.racenav::-webkit-scrollbar { display: none; }
.racenav a { flex: none; text-decoration: none; font-weight: 700; font-size: var(--t-sm); padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule); display: inline-flex; align-items: center; gap: 6px; }
.racenav a .sw { width: 10px; height: 10px; }
body.has-sample .racenav { top: 37px; }

.race { padding-top: 22px; scroll-margin-top: 64px; }
.race + .race { border-top: 2px solid var(--ink); margin-top: 28px; }
.race-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.race-h h2 { font-size: var(--t-xl); font-weight: 900; font-stretch: 75%; }
.race-h .meta { font-size: var(--t-sm); color: var(--muted); }
.ratings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.rating { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 10px; }
.rating .who { font-size: 0.6875rem; letter-spacing: 0.03em !important; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.rating .pill { margin: 6px 0 4px; }
.rating .when { font-size: var(--t-xs); color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.sub-h { font-size: var(--t-sm); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; margin: 22px 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sub-h .aside { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); font-size: var(--t-xs); text-align: right; }

/* Candidates side by side */
.cands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cands.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cand { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; }
.cand-band { height: 6px; }
.cand.d .cand-band { background: var(--d); } .cand.r .cand-band { background: var(--r); } .cand.o .cand-band { background: var(--o); }
.cand-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; font-stretch: 80%; color: #fff; flex: none; }
.avatar.d { background: var(--d); } .avatar.r { background: var(--r); } .avatar.o { background: var(--o); }
.cand-name { font-weight: 800; font-size: var(--t-md); line-height: 1.15; }
.cand-name a { text-decoration: none; }
.cand-party { font-size: var(--t-xs); font-weight: 700; color: var(--muted); }
.badge-inc { display: inline-block; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; background: var(--gold-grad); color: var(--on-gold); padding: 2px 6px; border-radius: 4px; }
.links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 6px; }
.links a { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--rule-2); text-decoration: none; font-size: var(--t-xs); font-weight: 800; }
.links a:hover { background: var(--gold-grad); color: var(--on-gold); }
.links svg { width: 16px; height: 16px; fill: currentColor; }
.cand-more { font-size: var(--t-sm); font-weight: 700; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; }
.photo-credit { font-size: 0.625rem; color: var(--muted); line-height: 1.2; }

/* Polls */
.avgbox { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; }
.avg-row { display: grid; grid-template-columns: minmax(80px, 34%) 1fr 48px; gap: 8px; align-items: center; font-size: var(--t-sm); margin: 6px 0; }
.avg-row .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avg-row .v { text-align: right; font-weight: 800; }
.hbar { height: 14px; background: var(--rule-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hbar i.d { background: var(--d); } .hbar i.r { background: var(--r); } .hbar i.o { background: var(--o); }
.avg-note { font-size: var(--t-xs); color: var(--muted); margin-top: 8px; }
.tbl-wrap { overflow-x: auto; margin-top: 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
table.tbl { border-collapse: collapse; width: 100%; font-size: var(--t-sm); }
.tbl th, .tbl td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.tbl th { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 800; background: var(--paper); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.n, .tbl th.n { text-align: right; }
.tbl .used td:first-child { box-shadow: inset 3px 0 0 var(--ink); }
.tbl .lead { font-weight: 800; }
.tbl.polls td { vertical-align: top; }
.tbl.polls td:first-child { white-space: normal; min-width: 150px; }
.tbl .pm { display: block; font-size: var(--t-xs); color: var(--muted); }

/* Money */
.money { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; }
.money-grp + .money-grp { margin-top: 12px; }
.money-grp .lab { font-size: var(--t-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.money-row { display: grid; grid-template-columns: minmax(70px, 30%) 1fr 64px; gap: 8px; align-items: center; font-size: var(--t-sm); margin: 4px 0; }
.money-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.money-row .v { text-align: right; font-weight: 800; }
.money-foot { font-size: var(--t-xs); color: var(--muted); margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Outside spending and sites */
.list { display: grid; gap: 8px; }
.item { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; display: grid; gap: 4px; }
.item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.item .amt { font-size: var(--t-xl); font-weight: 900; font-stretch: 80%; line-height: 1; }
.item .amt.d { color: var(--d); } .item .amt.r { color: var(--r); }
.item .k { font-size: var(--t-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.item .note { font-size: var(--t-sm); color: var(--ink-2); }
.item .ifoot { font-size: var(--t-xs); color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.site-url { font-weight: 800; word-break: break-all; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.site-url:hover { text-decoration: underline; }

/* Quotes */
.quotes { display: grid; gap: 10px; }
.q { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 14px 12px; position: relative; border-left: 4px solid var(--tu); }
.q.d { border-left-color: var(--d); } .q.r { border-left-color: var(--r); } .q.o { border-left-color: var(--o); }
.q blockquote { margin: 0; font-family: var(--f-serif); font-size: 1.1875rem; line-height: 1.35; font-weight: 450; }
.q blockquote::before { content: '\201C'; } .q blockquote::after { content: '\201D'; }
.q .by { margin-top: 10px; font-size: var(--t-sm); display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.q .by b a { text-decoration: none; }
.q .ctx { color: var(--muted); }
.q .orig { font-weight: 800; font-size: var(--t-xs); text-decoration: none; border-bottom: 1.5px solid currentColor; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
select.sel { font: inherit; font-size: var(--t-sm); font-weight: 600; padding: 8px 32px 8px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23D4AF37' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center / 10px; appearance: none; -webkit-appearance: none; min-height: 40px; max-width: 100%; color: var(--ink); }

/* Candidate profile */
.prof { padding-top: 10px; max-width: 920px; }
.prof-hero { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; }
.prof-band { height: 10px; }
.prof-hero.d .prof-band { background: var(--d); } .prof-hero.r .prof-band { background: var(--r); } .prof-hero.o .prof-band { background: var(--o); }
.prof-main { padding: 16px; display: flex; gap: 14px; align-items: center; }
.prof-main .avatar { width: 88px; height: 88px; font-size: 2rem; }
.prof-main h1 { font-size: var(--t-2xl); font-weight: 900; font-stretch: 72%; line-height: 0.95; }
.prof-main .sub { margin-top: 6px; font-size: var(--t-sm); color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prof-main .sub a { font-weight: 700; }
.biglinks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.biglinks a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--rule); text-decoration: none; font-weight: 700; font-size: var(--t-sm); min-width: 0; }
.biglinks a:hover { border-color: var(--ink); }
.biglinks svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.biglinks .h { display: block; font-weight: 500; font-size: var(--t-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biglinks .t { min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 10px; }
.tile .l { font-size: var(--t-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tile .v { font-size: var(--t-xl); font-weight: 900; font-stretch: 78%; line-height: 1.1; }
.bio { font-size: var(--t-md); color: var(--ink-2); max-width: 70ch; }

/* Build your own */
.build-head { padding: 20px 0 6px; }
.build-head h1 { font-size: var(--t-2xl); font-weight: 900; font-stretch: 70%; line-height: 0.95; }
.build-head p { color: var(--ink-2); margin: 8px 0 0; max-width: 56ch; }
.yours { display: inline-block; background: var(--gold-grad); color: var(--on-gold); font-weight: 800; font-size: var(--t-xs); letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; margin-top: 10px; }
.picks { display: grid; gap: 8px; }
.pick { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 8px; }
.pick-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pick-top b { font-size: var(--t-sm); }
.pick-top .pill { font-size: var(--t-xs); }
.pick-opts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.pick-opts button { border: 1.5px solid var(--rule); background: var(--paper); border-radius: 10px; padding: 8px 6px; font-weight: 700; font-size: var(--t-sm); cursor: pointer; min-height: 44px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; }
.pick-opts button small { display: block; font-size: 0.6875rem; font-weight: 600; color: var(--muted); }
.pick-opts button[aria-pressed='true'].d { background: var(--d); border-color: var(--d); color: #fff; }
.pick-opts button[aria-pressed='true'].r { background: var(--r); border-color: var(--r); color: #fff; }
.pick-opts button[aria-pressed='true'].o { background: var(--o); border-color: var(--o); color: #fff; }
.pick-opts button[aria-pressed='true'] small { color: inherit; opacity: 0.85; }
.build-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 800; font-size: var(--t-sm); cursor: pointer; text-decoration: none; min-height: 44px; }
.btn.primary { background: var(--gold-grad); color: var(--on-gold); }
.btn.ghost { background: transparent; border: 1.5px solid var(--gold); color: var(--gold-hi); }
.btn.big { font-size: var(--t-md); padding: 14px 22px; }
.sticky-readout { position: sticky; top: 0; z-index: 15; background: var(--paper); padding: 10px 0; }
body.has-sample .sticky-readout { top: 37px; }
.mini-readout { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mr { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; }
.mr .t { display: flex; justify-content: space-between; font-size: var(--t-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.mr .nums { display: flex; justify-content: space-between; align-items: baseline; font-weight: 900; font-size: var(--t-lg); font-stretch: 80%; margin: 2px 0 4px; }
.mr .nums .d { color: var(--d); } .mr .nums .r { color: var(--r); }
.mr .bar { height: 10px; border-radius: 4px; gap: 1px; }
.mr .verdict { font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); margin-top: 4px; line-height: 1.3; }
.share-preview { margin-top: 14px; }
.share-preview img { width: 100%; max-width: 420px; border-radius: 12px; border: 1px solid var(--rule); display: block; }

/* How to vote */
.vote { padding: 22px 0; max-width: 680px; }
.vote h1 { font-size: var(--t-2xl); font-weight: 900; font-stretch: 70%; line-height: 0.95; }
.vote p { color: var(--ink-2); }
.vote-card { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 18px; margin-top: 14px; display: grid; gap: 12px; }
.vote-card h2 { font-size: var(--t-lg); font-weight: 800; }

/* Sources page */
.srcs { display: grid; gap: 8px; }
.srcrow { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.srcrow a { font-weight: 700; text-decoration: none; word-break: break-word; }
.srcrow a:hover { text-decoration: underline; }
.srcrow .m { font-size: var(--t-xs); color: var(--muted); }
.status-tbl td:nth-child(2) { font-weight: 700; }

.page-h { padding: 22px 0 6px; }
.page-h h1 { font-size: var(--t-2xl); font-weight: 900; font-stretch: 70%; line-height: 0.95; }
.page-h p { color: var(--ink-2); margin: 8px 0 0; max-width: 60ch; }

/* Desktop */
@media (min-width: 760px) {
  :root { --gut: 28px; }
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .hero { grid-template-columns: 1fr auto; align-items: end; padding-top: 34px; }
  .hero h1 { font-size: var(--t-3xl); }
  .count .u { min-width: 84px; padding: 10px 12px 8px; }
  .count .u b { font-size: var(--t-2xl); }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cands, .cands.n3 { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 300px)); }
  .race-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 28px; }
  .race-body > .full { grid-column: 1 / -1; }
  .state-head h1, .prof-main h1, .build-head h1, .page-h h1, .vote h1 { font-size: var(--t-3xl); }
  .biglinks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .build-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
  .build-side { position: sticky; top: 16px; }
  .quotes.wall { grid-template-columns: repeat(2, 1fr); }
  .racenav { margin: 8px 0 0; padding: 10px 0; }
  body.has-sample .racenav, body.has-sample .sticky-readout { top: 37px; }
}
@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .home-grid .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* The Pad (kept visually related but separate from the hub) */
.pad-hero { padding: 22px 0 8px; }

.pad-hero p { color: var(--ink-2); max-width: 56ch; margin: 10px 0 0; }
.pad-facts { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: var(--t-sm); color: var(--ink-2); }
.pad-facts li { padding-left: 14px; position: relative; }
.pad-facts li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 6px; height: 6px; border-radius: 2px; background: var(--ink); }
.pad-preview-note { margin-top: 14px; background: var(--sample); padding: 10px 12px; border-radius: 10px; font-size: var(--t-sm); }
.pad-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 18px 0 12px; }
.pad-search { flex: 1 1 220px; font: inherit; font-size: var(--t-md); padding: 10px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); min-height: 44px; color: var(--ink); }


.nom-av, .nom-logo { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-stretch: 80%; color: #fff; font-size: 1.15rem; object-fit: cover; }
.nom-av.d { background: var(--d); } .nom-av.r { background: var(--r); } .nom-av.o { background: var(--o); }
.nom-name { font-weight: 800; line-height: 1.15; }
.nom-race { font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }
.nom-coin { font-size: var(--t-xs); font-weight: 800; margin-top: 2px; }
.btn.sm { padding: 8px 14px; min-height: 40px; font-size: var(--t-sm); }
.btn.launch { background: var(--gold-grad); color: var(--on-gold); }
.btn.launch:hover { background: #000; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; }
.btn.wide { width: 100%; }
.pad-risk { font-size: var(--t-xs); color: var(--muted); margin-top: 22px; }
.treasury { display: grid; gap: 10px; }
.tre-w { font-size: var(--t-sm); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.85em; }
.small { font-size: var(--t-xs); }
.center { text-align: center; }
.linkbtn { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-size: var(--t-sm); }
body.noscroll { overflow: hidden; }
.sheet-bg { position: fixed; inset: 0; background: rgba(19, 21, 28, 0.5); z-index: 70; }
.sheet { position: fixed; z-index: 71; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: var(--paper); border-radius: 18px 18px 0 0; padding: 20px var(--gut) calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25); }
.sheet h2 { font-size: var(--t-xl); font-weight: 900; font-stretch: 75%; margin: 2px 0 12px; padding-right: 40px; }
.sheet .x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; background: var(--rule-2); border-radius: 50%; font-size: 22px; cursor: pointer; }
.prev { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; }
.prev-logo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; display: block; background: var(--rule-2); }
.prev-name { font-weight: 900; font-size: var(--t-lg); font-stretch: 80%; line-height: 1.1; }
.prev-tick { font-weight: 800; font-size: var(--t-sm); color: var(--ink-2); margin-top: 2px; }
.prev-desc { font-size: var(--t-sm); color: var(--ink-2); margin: 6px 0 0; }
.skel { animation: pulse 1.2s ease-in-out infinite; }
.skel-line { height: 14px; border-radius: 6px; background: var(--rule-2); margin: 6px 0; animation: pulse 1.2s ease-in-out infinite; }
.skel-line.short { width: 50%; }
@keyframes pulse { 50% { opacity: 0.5; } }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-left: 36px; font-size: var(--t-sm); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-grad); color: var(--on-gold); display: grid; place-items: center; font-weight: 800; font-size: var(--t-xs); }
.steps li.ok::before { content: '✓'; background: var(--o); }
.steps p { margin: 4px 0 0; }
.wbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.buy { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 4px 12px; }
.buy input { border: 0; background: transparent; font: inherit; font-size: var(--t-lg); font-weight: 800; width: 110px; padding: 6px 0; color: var(--ink); }
.buy input:focus { outline: none; }
.agree { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.agree input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--ink); }
.err { background: var(--r-tint); color: #8E1724; padding: 10px 12px; border-radius: 10px; font-size: var(--t-sm); margin-bottom: 10px; }
.done { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 10px 0; }
.done p { margin: 0; color: var(--ink-2); }
@media (min-width: 760px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 520px; border-radius: 18px; padding: 24px; }
}

.nom-a .btn { white-space: nowrap; }
#reset { padding: 8px 14px; min-height: 36px; }
.pending { font-size: var(--t-sm); color: var(--muted); margin: 14px 0 0; padding: 10px 12px; border: 1px dashed var(--rule); border-radius: 10px; }

.pad-more { grid-column: 1 / -1; justify-self: center; margin-top: 8px; }

/* Pad home (round 2) */
.pad-hero { padding: 26px 0 6px; text-align: center; display: grid; justify-items: center; gap: 14px; }
.pad-word { display: flex; align-items: center; gap: 12px; }
.pad-word h1 { font-size: 2.6rem; font-weight: 900; font-stretch: 68%; line-height: 0.9; letter-spacing: 0.005em; }
.pad-word h1 b { font-weight: 500; color: var(--muted); }
.brand-mark.big i { width: 13px; height: 36px; border-radius: 4px; }
.faces img:nth-child(n+9) { display: none; }
@media (min-width: 760px) { .faces img:nth-child(n+9) { display: block; } .brand-mark.big i { width: 16px; height: 46px; } }
.pad-coin { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ticker { font-weight: 900; font-stretch: 80%; font-size: var(--t-lg); background: var(--gold-grad); color: var(--on-gold); padding: 6px 14px; border-radius: 999px; letter-spacing: 0.02em; }
.ca { display: inline-flex; gap: 8px; align-items: center; border: 1.5px solid var(--ink); background: var(--card); border-radius: 999px; padding: 6px 6px 6px 14px; cursor: pointer; }
.ca-c { background: var(--gold-grad); color: var(--on-gold); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: var(--t-xs); }
.faces { display: flex; justify-content: center; margin: 4px 0; }
.faces img { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--paper); margin-left: -12px; object-fit: cover; background: var(--rule-2); }
.faces img:first-child { margin-left: 0; }
.pad-cta { width: min(100%, 440px); font-size: var(--t-lg); min-height: 58px; }
.pad-sub { margin: 0; color: var(--ink-2); font-size: var(--t-sm); max-width: 40ch; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; min-height: 46px; font-size: var(--t-md); }
.nomgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nom { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 12px 10px 12px; display: grid; justify-items: center; text-align: center; gap: 4px; align-content: start; }
.nom-art { position: relative; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 900; font-stretch: 80%; font-size: 1.8rem; margin-bottom: 4px; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--rule); }
.nom-art.d { background: var(--d); } .nom-art.r { background: var(--r); } .nom-art.o { background: var(--o); }
.nom-art img { width: 100%; height: 100%; object-fit: cover; }
.nom-live { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); background: var(--gold-grad); color: var(--on-gold); font-size: 0.625rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.nom-name { font-weight: 800; line-height: 1.15; font-size: var(--t-md); }
.nom-race { font-size: var(--t-xs); color: var(--muted); margin-bottom: 6px; }
.nom .btn { width: 100%; margin-top: auto; }
.pad-rules .pad-facts { margin-top: 0; }
.tre-w { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (min-width: 760px) {
  .pad-word h1 { font-size: 4.5rem; }
  .faces img { width: 64px; height: 64px; }
  .nomgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .seg.wide { width: auto; display: inline-flex; }
  .seg.wide button { flex: none; padding: 10px 26px; }
  #pick { text-align: left; }
}
@media (min-width: 1100px) { .nomgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pad-tools .seg { display: flex; width: 100%; }
.pad-tools .seg button { flex: 1; padding: 8px 4px; }
@media (min-width: 760px) { .pad-tools .seg { width: auto; } .pad-tools .seg button { flex: none; padding: 8px 14px; } }

/* Map page (round 2) */
.map-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 18px 0 4px; flex-wrap: wrap; }
.map-head h1 { font-size: var(--t-xl); font-weight: 900; font-stretch: 72%; }
.count.small .u { min-width: 0; padding: 5px 8px 4px; border-radius: 8px; }
.count.small .u b { font-size: var(--t-lg); }
.count.small .u span { font-size: 0.5625rem; }
.count-line .count-note { font-size: var(--t-xs); text-align: right; margin-top: 2px; }
.map-switches { display: grid; gap: 10px; margin: 14px 0 6px; }
.seg.big button { min-height: 52px; font-size: var(--t-lg); font-weight: 800; }
.rater { display: grid; gap: 4px; }
.rater .seg button { min-height: 42px; font-size: var(--t-sm); }
.allstates summary { list-style: none; cursor: pointer; }
.allstates summary::-webkit-details-marker { display: none; }
.rc-names { flex-direction: column; gap: 6px; }
.rc-c { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.avatar.xs { width: 30px; height: 30px; font-size: 0.75rem; }
@media (min-width: 760px) {
  .map-head h1 { font-size: var(--t-2xl); }
  .map-switches { grid-template-columns: auto 1fr; align-items: end; justify-content: space-between; }
  .map-switches .seg.wide { display: inline-flex; width: auto; }
  .seg.big button { padding: 10px 34px; }
  .rater { justify-items: end; }
  .rater .seg button { padding: 8px 18px; }
}

/* Quotes (round 2) */
.q { margin: 0; padding: 12px 14px; display: grid; gap: 8px; }
.q blockquote { font-size: 1.0625rem; }
.q-who { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); }
.q-who b a { text-decoration: none; }
.q-meta { display: block; color: var(--muted); font-size: var(--t-xs); }
.q-meta a { color: inherit; }
.q-foot { display: flex; gap: 8px; align-items: center; }
.avatar.sm { width: 42px; height: 42px; font-size: 0.95rem; }
.qgroup { margin-top: 18px; }
.qg-h { font-size: var(--t-md); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.qg-h a { text-decoration: none; }
.qg-h .aside { font-size: var(--t-xs); color: var(--muted); font-weight: 600; }
#qoff { margin-bottom: 8px; }

/* Build quiz (round 2) */
.quiz { max-width: 560px; margin: 0 auto; padding: 16px 0 10px; display: grid; gap: 12px; }
.quiz.result { max-width: 760px; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; }
.qbar { height: 6px; background: var(--rule-2); border-radius: 99px; overflow: hidden; }
.qbar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width 0.3s ease; }
.quiz-k { font-size: var(--t-sm); font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }
.quiz-h { font-size: var(--t-2xl); font-weight: 900; font-stretch: 72%; line-height: 0.95; }
.quiz-r { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: var(--t-sm); }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.quiz-opts.n3 { grid-template-columns: 1fr 1fr 1fr; }
.qopt { display: grid; justify-items: center; gap: 4px; padding: 16px 8px; border-radius: 18px; border: 2px solid var(--rule); background: var(--card); cursor: pointer; text-align: center; transition: transform 0.12s, border-color 0.15s, background 0.15s; }
.qopt:active { transform: scale(0.97); }
.qopt b { font-size: var(--t-md); line-height: 1.15; margin-top: 4px; }
.qopt small { color: var(--muted); font-size: var(--t-xs); }
.qopt[aria-pressed='true'].d { border-color: var(--d); background: var(--d-tint); }
.qopt[aria-pressed='true'].r { border-color: var(--r); background: var(--r-tint); }
.qopt[aria-pressed='true'].o { border-color: var(--o); background: var(--o-tint); }
.avatar.lg { width: 104px; height: 104px; font-size: 2rem; }
.quiz-nav { display: flex; justify-content: space-between; gap: 10px; }
.quiz-nav .btn { flex: 1; }
.quiz-nav.col { flex-direction: column; }
.quiz-note { text-align: center; font-size: var(--t-xs); color: var(--muted); margin: 0; }
.quiz .mapwrap { margin-top: 6px; }

/* How it works */
.how { list-style: none; counter-reset: h; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.how li { counter-increment: h; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 14px 14px 14px 58px; position: relative; display: grid; gap: 2px; }
.how li::before { content: counter(h); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-grad); color: var(--on-gold); display: grid; place-items: center; font-weight: 900; }
.how b { font-size: var(--t-md); }
.how span { color: var(--ink-2); font-size: var(--t-sm); }
@media (min-width: 760px) { .how { grid-template-columns: repeat(2, 1fr); } }
.filters .sel { flex: 1 1 45%; min-width: 0; }

/* Launch sheet image (circle crop preview) */
.crop { position: relative; width: 112px; height: 112px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--rule-2); flex: none; }
.crop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.crop::after { content: ''; position: absolute; inset: 0; border-radius: 12px; pointer-events: none; background: radial-gradient(circle at center, transparent 0 69%, rgba(19, 21, 28, 0.55) 70%); }
.crop.up { cursor: pointer; border: 2px dashed var(--muted); }
.crop.up.has { border-style: solid; border-color: var(--ink); }
.crop:not(.has).up::after { display: none; }
.up-t { display: grid; text-align: center; gap: 2px; padding: 6px; font-size: var(--t-sm); }
.up-t small { font-size: 0.625rem; color: var(--muted); }
.crop-tag { position: absolute; z-index: 1; bottom: 5px; left: 50%; transform: translateX(-50%); background: var(--gold-grad); color: var(--on-gold); font-size: 0.625rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.tre-burn { display: flex; justify-content: space-between; align-items: baseline; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; }
.tre-burn .l { font-size: var(--t-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tre-burn b { font-size: var(--t-xl); font-weight: 900; font-stretch: 78%; }
.tbl tr.ev-burn td:nth-child(2) { font-weight: 800; }

/* ===== Election Pad brand: engraved gold on emerald and black (round 3) ===== */
body {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(11, 61, 46, 0.75), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23D4AF37' stroke-opacity='0.045' stroke-width='0.7'%3E%3Ccircle cx='60' cy='60' r='56'/%3E%3Ccircle cx='0' cy='0' r='56'/%3E%3Ccircle cx='120' cy='0' r='56'/%3E%3Ccircle cx='0' cy='120' r='56'/%3E%3Ccircle cx='120' cy='120' r='56'/%3E%3Ccircle cx='60' cy='60' r='30'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed, scroll;
}
a { color: var(--gold-hi); }
.muted { color: var(--muted); }
h1, h2, .brand-word, .sec-h h2, .race-h h2, .quiz-h, .pad-word h1, .state-head h1, .prof-main h1, .page-h h1, .build-head h1, .vote h1, .map-head h1, .sheet h2, .qg-h, .bop-h h3, .sub-h {
  font-family: var(--f-display); font-stretch: normal; letter-spacing: 0.02em; color: var(--gold-hi);
}
h1, .quiz-h, .state-head h1, .prof-main h1, .page-h h1, .map-head h1, .vote h1, .build-head h1 { font-weight: 800; line-height: 1.02; }
.page-h h1, .state-head h1, .prof-main h1, .quiz-h, .vote h1, .build-head h1 { font-size: 2.1rem; }
.map-head h1 { font-size: 1.5rem; }
.sec-h h2 { font-size: 1.15rem; font-weight: 800; }
.sub-h { font-size: 0.8rem; font-weight: 700; }
.race-h h2 { font-size: 1.6rem; font-weight: 800; }
.kicker { color: var(--gold); }

/* numbers */
.count .u b, .bop-totals .side b, .bop-totals .mid b, .bop-counts b, .tile .v, .item .amt, .avg-row .v, .money-row .v, .mr .nums, .tre-burn b, .tbl td.n, .ticker, .mono { font-family: var(--f-mono); font-stretch: normal; letter-spacing: -0.01em; }
.tile .v, .item .amt { font-weight: 700; }

/* header */
.top { background: rgba(7, 17, 13, 0.92); border-bottom: 3px double var(--gold); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.brand-logo { width: 38px; height: 38px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.5); }
.brand-word { font-family: var(--f-display); font-weight: 900; font-size: 1.15rem; letter-spacing: 0.06em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-word b { font-weight: 900; color: transparent; }
.topnav a { color: var(--ink-2); }
.topnav a:hover { background: var(--rule-2); color: var(--gold-hi); }
.top-count { color: var(--gold); font-family: var(--f-mono); font-size: var(--t-xs); }
.tabbar { background: rgba(7, 17, 13, 0.96); border-top: 3px double var(--gold); }
.tabbar a { color: var(--muted); }
.tabbar a.on { color: var(--gold-hi); }
.foot { border-top: 1px solid var(--rule); }
.foot-line { color: var(--gold-hi); font-family: var(--f-display); letter-spacing: 0.03em; }

/* buttons, tabs */
.btn.primary, .btn.launch { background: var(--gold-grad); color: var(--on-gold); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 10px rgba(212, 175, 55, 0.18); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.primary:hover, .btn.launch:hover { filter: brightness(1.07); background: var(--gold-grad); }
.btn[disabled] { background: #2A3B33; color: #7D877F; box-shadow: none; text-shadow: none; opacity: 1; }
.seg { background: var(--card); border: 1px solid var(--rule); }
.seg button { color: var(--ink-2); }
.seg button[aria-pressed='true'], .seg.dark button[aria-pressed='true'] { background: var(--gold-grad); color: var(--on-gold); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.seg-label { color: var(--gold); }
:focus-visible { outline-color: var(--gold-hi); }

/* surfaces */
.rc, .cand, .rating, .avgbox, .tbl-wrap, .money, .item, .q, .prof-hero, .biglinks a, .tile, .vote-card, .srcrow, .bop, .mr, .nom, .prev, .pick, .how li, .stategrid a, .tre-burn, .qopt, .buy, .pad-search, select.sel, .racenav a, .ca {
  background-color: var(--card); border-color: var(--rule); color: var(--ink);
}
.rc:hover, .stategrid a:hover, .biglinks a:hover { border-color: var(--gold); }
.empty, .pending { border-color: var(--rule); color: var(--muted); }
.tbl th { background: var(--card-2); color: var(--gold); }
.tbl th, .tbl td { border-bottom-color: var(--rule-2); }
.tbl .used td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.hbar { background: var(--rule-2); }
.links a { background: var(--rule-2); color: var(--ink); }
.links a:hover { background: var(--gold-grad); color: var(--on-gold); }
.chip { background: var(--card-2); border-color: var(--rule); color: var(--ink-2); }
.chip::before { background: var(--gold); }
.chip:hover { border-color: var(--gold); color: var(--gold-hi); }
.popover, .maptip { background: var(--card-2); color: var(--ink); border: 1px solid var(--gold); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); }
.popover .x { color: var(--ink); }
.popover a.open { background: var(--gold-grad); color: var(--on-gold); }
.sheet { background: var(--paper); border-top: 3px double var(--gold); }
.sheet .x { background: var(--card-2); color: var(--ink); }
.sheet-bg { background: rgba(0, 0, 0, 0.7); }
.racenav { background: var(--paper); border-bottom-color: var(--rule); }
.state-head svg path { fill: var(--gold); }
.cand-more, .cand-name a, .rc-title, .q-who b a, .qg-h a, .biglinks a { color: var(--ink); }
.cand-more { color: var(--gold-hi); }
.avatar { box-shadow: 0 0 0 2px var(--card); }
.badge-inc { background: var(--gold-grad); color: var(--on-gold); }
.q { border-left-width: 4px; }
.q blockquote { color: var(--ink); }
.orig { color: var(--gold-hi); }
.pill { background: var(--rule-2); color: var(--ink); }
.pill.r0, .pill.r1, .pill.r2 { background: var(--d-tint); color: #BFD0FA; }
.pill.r4, .pill.r5, .pill.r6 { background: var(--r-tint); color: #F7C2C6; }
.pill.r3::before, .sw.r3, .bar .r3, .bar .undecided { background: repeating-linear-gradient(45deg, var(--tu) 0 3px, var(--tu-2) 3px 6px); }
.steps li.ok::before { background: var(--o); color: #fff; }
.err { background: var(--r-tint); color: #F7C2C6; }
.pad-preview-note { color: var(--on-gold); }
.yours, .ticker { background: var(--gold-grad); color: var(--on-gold); }
.qbar { background: var(--rule-2); }
.qbar i { background: var(--gold-grad); }
.bar { background: var(--paper); }
.bar-mark { background: var(--gold-hi); }
.bar .b-held-d { background: #1B3C9E; } .bar .b-held-r { background: #9A1C2A; }
.mr .nums .d, .bop-totals .side.d b { color: #7FA0F5; }
.mr .nums .r, .bop-totals .side.r b { color: #F0707C; }
.item .amt.d { color: #7FA0F5; } .item .amt.r { color: #F0707C; }
.dot.d, .sw.pd, .usmap .pd { background: var(--d); }
.agree input { accent-color: var(--gold); }
.buy input, .pad-search, select.sel { color: var(--ink); }
.pad-search::placeholder { color: var(--muted); }
.count .u { background: var(--card); color: var(--ink); border: 1px solid var(--gold); }
.count .u b { color: var(--gold-hi); }
.pad-facts li::before { background: var(--gold); border-radius: 50%; }
.how li::before, .steps li::before { background: var(--gold-grad); color: var(--on-gold); }
.qopt[aria-pressed='true'].d { background: var(--d-tint); }
.qopt[aria-pressed='true'].r { background: var(--r-tint); }
.crop { background: var(--card-2); }
.crop.up { border-color: var(--gold); }
.nom-art { box-shadow: 0 0 0 3px var(--card), 0 0 0 4.5px var(--gold); }
.faces img { border-color: var(--paper); box-shadow: 0 0 0 1.5px var(--gold); }
.brand-mark { display: none; }

/* map on dark */
.usmap .st { stroke: rgba(212, 175, 55, 0.55); stroke-width: 0.8; }
.usmap .st:hover, .usmap path.st:focus-visible, .usmap .st.sel { stroke: var(--gold-hi); stroke-width: 2; }
.usmap .lbl { fill: var(--ink-2); }
.usmap .on-r2, .usmap .on-r4 { fill: #07110D; }
.usmap .on-r3 { fill: #F4EEDC; }
.usmap .inset rect { stroke: rgba(212, 175, 55, 0.55); }
.usmap .badge circle { fill: var(--gold); }
.usmap .badge text { fill: var(--on-gold); }
.usmap .hatch-bg { fill: var(--tu); }
.usmap .hatch-line { stroke: var(--tu-2); }
.sample-watermark { color: var(--on-gold); }

/* Pad hero (round 3) */
.pad-hero { padding-top: 18px; }
.pad-seal { width: 168px; height: 168px; border-radius: 50%; display: block; filter: drop-shadow(0 6px 24px rgba(212, 175, 55, 0.25)); }
.pad-banner { display: none; }
.pad-word { display: none; }
.pad-sub { color: var(--ink-2); }
.pad-cta { font-family: var(--f-display); font-weight: 800; letter-spacing: 0.02em; }
@media (min-width: 760px) {
  .pad-seal { display: none; }
  .pad-banner { display: block; width: 100%; max-width: 1100px; border-radius: 14px; border: 1px solid var(--gold); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
  body[data-view='pad'] .brand-word { display: none; }
  .page-h h1, .state-head h1, .prof-main h1, .quiz-h, .vote h1, .build-head h1 { font-size: 2.8rem; }
  .map-head h1 { font-size: 2rem; }
}
.brand-word { white-space: nowrap; font-size: 1rem; }
.top { gap: 10px; }
.top-count { font-size: 0.6875rem; }
@media (max-width: 400px) { .top-count { max-width: 9.5em; white-space: normal; text-align: right; line-height: 1.2; } }
.sub-h .aside, .qg-h .aside, .sec-h .aside { font-family: var(--f-sans); letter-spacing: 0; text-transform: none; color: var(--muted); }
.mr .nums { font-size: var(--t-md); gap: 4px; }
.mr .nums > span { white-space: nowrap; }
.mr .nums .muted { font-family: var(--f-sans); font-size: var(--t-xs) !important; }
@media (min-width: 760px) { .brand-word { font-size: 1.15rem; } .top-count { font-size: var(--t-xs); } }
.foot-line { font-size: 0.95rem; }
@media (max-width: 759px) { .page-h h1, .state-head h1, .prof-main h1, .quiz-h, .vote h1, .build-head h1 { font-size: 1.8rem; } }

/* Simplify pass */
.ls { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 14px; }
.ls-t { display: grid; gap: 2px; min-width: 0; }
.ls .prev-name { font-size: var(--t-md); }
.ls .buy { margin-top: 8px; width: 100%; }
.ls .buy input { width: 100%; font-size: var(--t-md); }
.ls .buy input::placeholder { color: var(--muted); font-weight: 600; }
.sheet .agree { font-size: var(--t-sm); margin-bottom: 14px; }
.sheet .wbtns { margin-bottom: 10px; }
.how li { padding: 16px 16px 16px 60px; min-height: 64px; align-content: center; }
.how li::before { top: 50%; transform: translateY(-50%); }
.srcbox summary { list-style: none; cursor: pointer; }
.srcbox summary::-webkit-details-marker { display: none; }
.srcbox summary h2::after { content: ' ▾'; color: var(--gold); font-size: 0.8em; }
.srcbox[open] summary h2::after { content: ' ▴'; }
.quiz-top span:empty { display: none; }
.quiz-top { justify-content: flex-end; }
.ls-desc { font-size: var(--t-xs); color: var(--muted); margin: 0 0 14px; }
.crop.up { cursor: pointer; }
.fees { margin: 0; color: var(--ink-2); max-width: 60ch; }

/* Pad map hero (owner round) */
.pad-hero { gap: 12px; padding-top: 14px; }
.pad-seal, .pad-banner { display: none !important; }
.pad-top { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pad-name { font-family: var(--f-display); font-weight: 900; letter-spacing: 0.08em; font-size: 1rem; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pad-top .ticker { font-size: var(--t-md); padding: 4px 12px; }
.pad-map { width: 100%; max-width: 960px; margin: 0 auto; }
.pad-cta { width: min(100%, 360px); white-space: nowrap; }
.stchip { display: inline-flex; gap: 8px; align-items: center; background: var(--gold-grad); color: var(--on-gold); border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 800; margin: 0 0 10px; cursor: pointer; }
.wbtns.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.srctoggle { margin-top: 22px; }
#sources { margin-top: 8px; }

/* Live coin card */
.nom-tick { font-family: var(--f-mono); font-weight: 700; color: var(--gold-hi); font-size: var(--t-sm); margin: -2px 0 4px; }
.ca-row { display: flex; gap: 6px; width: 100%; align-items: stretch; }
.ca-row .ca { flex: 1; min-width: 0; justify-content: space-between; padding: 4px 4px 4px 10px; }
.ca-row .ca .mono { font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; }
.ca-row .btn { width: auto !important; margin: 0 !important; flex: none; }
.nom.live .btn.ghost { margin-top: 6px; }
.nom.live { border-color: var(--gold); }
.coinv { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.coinv .prev-logo { width: 72px; height: 72px; }
.nom { min-width: 0; }
.nom-ca { width: 100%; justify-content: space-between; padding: 4px 4px 4px 10px; margin-bottom: 6px; }
.nom-ca .mono { font-size: var(--t-xs); white-space: nowrap; }
.nom-act { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
.nom-act .btn { width: 100% !important; margin: 0 !important; padding-left: 6px; padding-right: 6px; }
.nom.live .btn.ghost { margin-top: 0; }

/* Sweep 2 */
.rline { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; align-items: center; }
.ri { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); }
.ri-w { font-weight: 800; color: var(--gold); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.06em; }
.ri-d { color: var(--muted); font-size: var(--t-xs); }
.vote-plain { display: grid; gap: 12px; margin-top: 16px; max-width: 420px; }
.nom.live .btn.primary { margin-top: 0; }
.tbl.polls tr.more { display: none; }
.tbl-wrap.open .tbl.polls tr.more { display: table-row; }
.polls-all { display: block; padding: 10px 12px; color: var(--gold-hi); font-weight: 700; }
.photo-credit { font-size: 0.5625rem; opacity: 0.8; }
