:root {
  --paper: #F6F4EE;
  --paper-2: #EDEAE1;
  --ink: #15181D;
  --ink-2: #3B4048;
  --steel: #6E7681;
  --rule: #D9D5CA;
  --dem: #2458B3;
  --dem-soft: #D7E1F4;
  --rep: #C9322B;
  --rep-soft: #F4D9D7;
  --ind: #5C8E3E;
  --ind-soft: #DDE8D4;
  --oth: #8A8F98;
  --np1: #1A8A82; --np2: #C7861A; --np3: #8A5A3C; --np4: #5E6B7A;
  --amber: #D48A00;
  --amber-soft: #FBEFD4;
  --link: #1D4F9C;
  --focus: #1D4F9C;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --top-h: 52px;
  --surface: #FFFFFF;
  --surface-2: #F6F4EE;
  --empty: #DCD8CC;
  --has: #B9C0C9;
  --lead-d: #8FAAD9; --lead-r: #E2958F; --lead-i: #A6C48F; --lead-o: #B4B8BF;
  --feed-news: #EFEDF5; --feed-news-b: #B9B2CF;
  --feed-exit: #E3EFEE; --feed-exit-b: #8DBDB8;
  --feed-soc: #EBEFE6; --feed-soc-b: #A9BE93;
  --feed-rep: #F7DDE4; --feed-rep-b: #D9748C;
  --kind-bg: #DCD8E6; --kind-fg: #3B3552;
  --exit-bg: #C9E3E1; --exit-fg: #1F4F4B;
  --pm-bg: #F3EEFB; --pm-b: #C9B8E6; --pm-fg: #4E3A80;
  --rating-d-fg: #173D80; --rating-r-fg: #7E1F1A; --rating-t-fg: #7A4F00;
  --head-bg: #15181D;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #121417;
  --paper-2: #1E2228;
  --ink: #F2F0EA;
  --ink-2: #C3C8CF;
  --steel: #8B929C;
  --rule: #2E333B;
  --dem: #5B8AE6;
  --dem-soft: #1B2B47;
  --rep: #E25A52;
  --rep-soft: #46201F;
  --ind: #7FB55C;
  --ind-soft: #22321A;
  --oth: #9AA0A8;
  --np1: #3DB5AC; --np2: #E3A53E; --np3: #B9825F; --np4: #8A97A6;
  --amber: #F0A52A;
  --amber-soft: #3B2B0E;
  --link: #8FB4F0;
  --focus: #8FB4F0;
  --surface: #181B20;
  --surface-2: #121417;
  --empty: #2A2F36;
  --has: #3A424D;
  --lead-d: #3A5E99; --lead-r: #9A4A46; --lead-i: #4F7A3A; --lead-o: #5A6069;
  --feed-news: #221F2C; --feed-news-b: #6F6692;
  --feed-exit: #19292A; --feed-exit-b: #4F8A85;
  --feed-soc: #1D2419; --feed-soc-b: #6E8C57;
  --feed-rep: #3A1F26; --feed-rep-b: #B2566C;
  --kind-bg: #2E2A3D; --kind-fg: #D4CCEA;
  --exit-bg: #1F3B39; --exit-fg: #BFE3DF;
  --pm-bg: #241F33; --pm-b: #5A4A86; --pm-fg: #CBB9F2;
  --rating-d-fg: #BFD3F6; --rating-r-fg: #F2C1BC; --rating-t-fg: #F2D6A0;
  --head-bg: #0B0D10;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
a { color: var(--link); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.num { text-align: right; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--top-h);
  background: var(--head-bg); color: #fff;
  display: flex; align-items: center; gap: 20px; padding: 0 16px;
}
.brand { color: #fff; text-decoration: none; font-family: var(--cond); font-weight: 600; font-size: 24px; letter-spacing: .01em; }
.brand span { color: var(--amber); }
.live { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #D6D9DE; }
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(212,138,0,.6); }
.live.stale .dot { background: var(--steel); box-shadow: none; }
.live .live-label { font-weight: 600; color: #fff; }
.live.stale .live-label { color: #D6D9DE; }
@media (prefers-reduced-motion: no-preference) {
  .live:not(.stale) .dot { animation: pulse 2s infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(212,138,0,.6); } 70% { box-shadow: 0 0 0 8px rgba(212,138,0,0); } 100% { box-shadow: 0 0 0 0 rgba(212,138,0,0); } }
}
.topnav { display: none; }
.theme-btn { margin-left: auto; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 3px; padding: 6px 10px; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.theme-btn:hover { background: rgba(255,255,255,.2); }
.theme-btn svg { width: 16px; height: 16px; display: block; }
.mobile-nav .theme-btn { flex: 0 0 auto; margin-left: 0; }
.topnav a, .mobile-nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 3px; font-weight: 500; }
.topnav a[aria-current="page"] { background: rgba(255,255,255,.14); }
.topnav a:hover { background: rgba(255,255,255,.1); }
.mobile-nav { display: none; }

/* Balance of power */
.bop { padding: 18px 16px 10px; max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bop-row { border-top: 2px solid var(--ink); padding-top: 8px; }
.bop-title { display: flex; justify-content: space-between; align-items: baseline; }
.bop-title h2 { margin: 0; font-size: 15px; font-weight: 600; }
.bop-title .need { font-size: 13px; color: var(--ink-2); }
.bop-nums { display: flex; justify-content: space-between; align-items: flex-end; margin: 4px 0 2px; }
.bop-num { font-family: var(--cond); font-weight: 600; font-size: 46px; line-height: 1; }
.bop-num.d { color: var(--dem); } .bop-num.r { color: var(--rep); }
.bop-mid { font-family: var(--cond); font-weight: 600; font-size: 30px; line-height: 1; color: var(--steel); text-align: center; align-self: flex-end; }
.bop-mid small { display: block; font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--ink-2); margin-top: 2px; }
.bop-num small { display: block; font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--ink-2); margin-top: 2px; }
.bop-bar { position: relative; height: 22px; background: var(--paper-2); overflow: hidden; }
.bop-bar .fill { position: absolute; top: 0; bottom: 0; }
.bop-bar .fill.d { left: 0; background: var(--dem); }
.bop-bar .fill.r { right: 0; background: var(--rep); }
.bop-bar .fill.i { background: var(--ind); }
.bop-bar .fill.hold { opacity: .55; }
@media (prefers-reduced-motion: no-preference) { .bop-bar .fill { transition: width .6s cubic-bezier(.2,.7,.2,1); } }
.bop-bar .line { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); left: 50%; transform: translateX(-50%); }
.bop-foot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.bop-foot b { color: var(--ink); font-weight: 600; }

/* Layout */
.split { max-width: 1480px; margin: 0 auto; padding: 8px 16px 24px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.board, .detail { min-width: 0; }

/* Map */
.map { position: relative; margin: 4px 0 10px; }
.map-stage svg { width: 100%; height: auto; display: block; }
.map .geo { max-height: 520px; }
.map .carto { max-height: 470px; }
.st { fill: var(--paper-2); stroke: var(--surface); stroke-width: 1; cursor: pointer; }
.st.none { fill: var(--paper-2); cursor: default; }
.st.empty { fill: var(--empty); }
.st.has { fill: var(--has); }
.st.lead.D { fill: var(--lead-d); } .st.lead.R { fill: var(--lead-r); } .st.lead.I { fill: var(--lead-i); } .st.lead.O { fill: var(--lead-o); }
.st.called.D { fill: var(--dem); } .st.called.R { fill: var(--rep); } .st.called.I { fill: var(--ind); } .st.called.O { fill: var(--oth); }
.st:hover, .st:focus-visible { stroke: var(--ink); stroke-width: 1.5; outline: none; }
.st.selected { stroke: var(--amber); stroke-width: 3; }
.lbl { font: 600 12px var(--font); fill: var(--ink); pointer-events: none; text-anchor: middle; paint-order: stroke; stroke: var(--paper); stroke-opacity: .75; stroke-width: 3px; }
.lbl.side { text-anchor: start; stroke: none; }
.lbl.pct { font-weight: 500; font-size: 10.5px; fill: var(--ink-2); }
.carto .tile-lbl.pct { text-anchor: end; font-weight: 500; }
.carto .tile-bg { fill: var(--surface); stroke: var(--rule); stroke-width: 1; cursor: pointer; }
.carto .tile-bg:hover, .carto .tile-bg:focus-visible { stroke: var(--ink); outline: none; }
.carto .tile-bg.selected { stroke: var(--amber); stroke-width: 3; }
.carto .tile-lbl { font: 600 11px var(--font); fill: var(--ink-2); pointer-events: none; }
.carto.sb { max-height: 520px; }
.carto.sb .tile-lbl { font-size: 12px; }
.carto .tile-lbl.sbpct { text-anchor: start; font-weight: 500; }
.cell { fill: var(--empty); cursor: pointer; }
.cell.lead.D { fill: var(--lead-d); } .cell.lead.R { fill: var(--lead-r); } .cell.lead.I { fill: var(--lead-i); } .cell.lead.O { fill: var(--lead-o); }
.cell.called.D { fill: var(--dem); } .cell.called.R { fill: var(--rep); } .cell.called.I { fill: var(--ind); } .cell.called.O { fill: var(--oth); }
.cell:hover, .cell:focus-visible { stroke: var(--ink); stroke-width: 1.5; outline: none; }
.map-zoom[hidden] { display: none; }
.map-zoom { display: flex; align-items: center; gap: 12px; padding: 6px 0 8px; }
.map-zoom .zoom-text { display: flex; flex-direction: column; min-width: 0; }
.map-zoom .zoom-title { font-weight: 600; }
.map-zoom .zoom-sub { font-size: 12.5px; color: var(--ink-2); }
.map-zoom button { background: var(--ink); color: var(--paper); border: 0; border-radius: 3px; padding: 6px 12px; font-weight: 500; white-space: nowrap; }
.map-zoom button:hover { background: var(--ink-2); }
.map-zoom .zoom-open { margin-left: auto; }
.geo.zoomed .st { fill-opacity: .35; pointer-events: none; }
.geo.zoomed .st.zoom-target { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.geo.zoomed .labels, .geo.zoomed .small { display: none; }
.cty { fill: var(--paper-2); stroke: var(--surface); stroke-width: .6; }
.cty.none { fill: var(--paper-2); } .cty.empty { fill: var(--empty); }
.cty.lead.D { fill: var(--lead-d); } .cty.lead.R { fill: var(--lead-r); } .cty.lead.I { fill: var(--lead-i); } .cty.lead.O { fill: var(--lead-o); }
.cty:hover { stroke: var(--ink); stroke-width: 1; }
.map-tip { position: absolute; z-index: 6; background: #15181D; color: #fff; padding: 8px 10px; border-radius: 3px; font-size: 13px; min-width: 200px; max-width: 300px; pointer-events: none; }
.map-tip .tr + .tr { border-top: 1px solid rgba(255,255,255,.2); margin-top: 6px; padding-top: 6px; }
.map-tip .tn { font-weight: 600; margin-bottom: 2px; }
.map-tip .tr-rating { font-weight: 500; color: #D6D9DE; font-size: 12px; }
.map-tip .tl { display: flex; justify-content: space-between; gap: 10px; }
.map-tip .tl.muted, .map-tip .tm { color: #C9CDD3; font-size: 12px; }
.map-tip .p-D { color: #9FBAF0; } .map-tip .p-R { color: #F0A49E; } .map-tip .p-I { color: #B9DBA0; }
.map-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw { display: inline-block; width: 12px; height: 12px; border: 1px solid rgba(0,0,0,.15); }
.sw.lead.D { background: var(--lead-d); } .sw.called.D { background: var(--dem); } .sw.lead.R { background: var(--lead-r); } .sw.called.R { background: var(--rep); } .sw.lead.I { background: var(--lead-i); } .sw.empty { background: var(--empty); } .sw.has { background: var(--has); }
.map-note { margin: 0; }
.map-clear { background: var(--ink); color: var(--paper); border: 0; border-radius: 3px; padding: 5px 10px; font-size: 12.5px; font-weight: 500; }
.map-clear:hover { background: var(--ink-2); }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--rule); }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 10px 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tabs.small button { padding: 6px 8px; font-size: 13px; }

.board-head { position: sticky; top: var(--top-h); background: var(--paper); z-index: 5; padding-top: 4px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px 0; }
.search input { width: 280px; max-width: 100%; padding: 8px 10px; border: 1px solid var(--steel); border-radius: 3px; background: var(--surface); color: var(--ink); }
.search input::placeholder { color: #6E7681; }
.check { display: flex; align-items: center; gap: 6px; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }
.sort select { padding: 7px 8px; border: 1px solid var(--steel); border-radius: 3px; background: var(--surface); color: var(--ink); }

/* Race table */
.table-wrap { overflow-x: auto; }
.races { width: 100%; border-collapse: collapse; }
.races th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 6px 8px; border-bottom: 1px solid var(--ink); }
.races td { padding: 9px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.races tbody tr { cursor: pointer; }
.races tbody tr:hover { background: var(--surface); }
.races tbody tr:focus-within { background: var(--surface); }
.races tbody tr.flash { background: var(--amber-soft); }
@media (prefers-reduced-motion: no-preference) { .races tbody tr { transition: background 1.2s ease; } .races tbody tr.flash { transition: none; } }
.race-name { display: block; font-weight: 600; }
.race-name button { all: unset; cursor: pointer; font-weight: 600; }
.race-name button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.race-name a { color: inherit; text-decoration: none; font-weight: 600; }
.race-name a:hover { text-decoration: underline; }
.race-name a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.race-sub { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; }
.rating { font-size: 12px; padding: 1px 6px; border-radius: 2px; background: var(--paper-2); color: var(--ink-2); }
.rating.D { background: var(--dem-soft); color: var(--rating-d-fg); }
.rating.R { background: var(--rep-soft); color: var(--rating-r-fg); }
.rating.T { background: var(--amber-soft); color: var(--rating-t-fg); }
.leader { min-width: 230px; }
.cand-line { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13.5px; }
.cand-line .nm { white-space: normal; line-height: 1.25; }
.cand-line { align-items: start; }
.races td { vertical-align: top; }
.cand-line .pc { font-weight: 600; }
.cand-line.w .nm::before { content: "✓ "; font-weight: 700; }
.bar { position: relative; height: 8px; background: var(--paper-2); margin-top: 5px; display: flex; overflow: hidden; }
.bar i { display: block; height: 100%; }
.bar i.D { background: var(--dem); } .bar i.R { background: var(--rep); } .bar i.I { background: var(--ind); } .bar i.O { background: var(--oth); }
.bar i.n1 { background: var(--np1); } .bar i.n2 { background: var(--np2); } .bar i.n3 { background: var(--np3); } .bar i.n4 { background: var(--np4); }
.p-D { color: var(--dem); } .p-R { color: var(--rep); } .p-I { color: var(--ind); } .p-O { color: var(--ink-2); }
.margin { font-weight: 600; white-space: nowrap; }
.margin .mv { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.leader .tot { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; font-variant-numeric: tabular-nums; }
.pct { white-space: nowrap; }
.pct .pbar { display: block; height: 4px; width: 56px; background: var(--paper-2); margin-top: 4px; margin-left: auto; }
.pct .pbar i { display: block; height: 100%; background: var(--ink-2); }
.calls { display: flex; flex-wrap: wrap; gap: 4px; min-width: 120px; }
.call-tag { font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 2px; background: var(--ink); color: var(--paper); text-decoration: none; line-height: 1.3; }
.call-tag:hover { background: var(--ink-2); }
.call-tag.civic { background: var(--amber); color: var(--ink); }
.call-tag.pg { background: var(--pm-fg); color: #fff; }
.call-tag.ddhq { background: var(--dem); color: #fff; }
.call-tag.pm { background: var(--pm-bg); color: var(--pm-fg); box-shadow: inset 0 0 0 1px var(--pm-b); }
.called-note { font-size: 12px; color: var(--ink-2); }
.cands .cn { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cands .cn .party, .cands .cn .inc { margin-left: 0; }
.inc-tag { display: inline-block; margin-left: 6px; padding: 0 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 2px; vertical-align: 1px; }
.upd { font-size: 12px; color: var(--ink-2); }
.src-tag { font-size: 11px; font-weight: 600; padding: 1px 5px; border-radius: 2px; background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--rule); }
.open-seat { font-size: 12px; padding: 1px 6px; border-radius: 2px; background: var(--paper-2); color: var(--ink-2); }
.map-tip .tinc { font-style: normal; font-size: 11px; padding: 0 4px; margin-left: 4px; background: rgba(255,255,255,.18); border-radius: 2px; }
.pm-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 1px 6px; border: 1px solid var(--pm-b); border-radius: 2px; background: var(--pm-bg); color: var(--ink); text-decoration: none; white-space: nowrap; }
.pm-chip:hover { border-color: #7A5FB0; }
.pm-chip .pm-lbl { font-weight: 600; color: var(--pm-fg); }
.pm-chip .pm-vol { color: var(--ink-2); }
.pm-chip .p-D, .pm-chip .p-R, .pm-chip .p-I { font-weight: 600; }
.subbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 0 0; }
.subbar .tabs { border-bottom: 0; }
.subbar .tabs button { padding: 6px 10px; border: 1px solid var(--rule); border-radius: 3px; margin: 0; }
.subbar .tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.empty { color: var(--ink-2); padding: 24px 8px; }

/* Detail */
.detail { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--ink); padding: 16px; }
.detail .back { background: none; border: 1px solid var(--steel); border-radius: 3px; padding: 6px 12px; font-weight: 500; color: var(--ink); }
.detail .back:hover { background: var(--paper); }
.detail h1 { font-family: var(--cond); font-weight: 600; font-size: 34px; margin: 12px 0 4px; line-height: 1.1; }
.detail .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 13.5px; margin-bottom: 14px; }
.detail .meta b { color: var(--ink); }
.detail .call-banner { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 12px; }
.detail .call-banner .lead { font-weight: 600; }
.cands { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.cands td { padding: 8px 6px; border-bottom: 1px solid var(--rule); }
.cands .cn { font-weight: 600; font-size: 17px; }
.cands .cn .party { font-weight: 500; font-size: 13px; margin-left: 6px; }
.cands .cn .inc { font-weight: 500; font-size: 12px; color: var(--ink-2); margin-left: 6px; }
.cands .cv { text-align: right; white-space: nowrap; font-size: 15px; }
.cands .cp { text-align: right; font-family: var(--cond); font-weight: 600; font-size: 28px; width: 90px; }
.cands .cb { width: 36%; }
.cands .cb .bar { height: 14px; margin: 0; }
.cands tr.w .cn::before { content: "✓ "; }
.detail h2 { font-size: 15px; margin: 18px 0 6px; }
.regions { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.regions th { text-align: left; font-size: 12px; color: var(--ink-2); padding: 6px; border-bottom: 1px solid var(--ink); cursor: pointer; user-select: none; }
.regions th.num { text-align: right; }
.regions td { padding: 5px 6px; border-bottom: 1px solid var(--rule); }
.regions .lead-D { color: var(--dem); font-weight: 600; } .regions .lead-R { color: var(--rep); font-weight: 600; } .regions .lead-I { color: var(--ind); font-weight: 600; }
.detail .feed-list { margin-top: 6px; }
.detail .civic-link { font-size: 13px; }

/* Feed */
.feed { position: sticky; top: calc(var(--top-h) + 8px); max-height: calc(100vh - var(--top-h) - 16px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--ink); }
.feed-head { padding: 10px 12px 0; }
.feed-head h2 { margin: 0 0 6px; font-size: 15px; }
.feed-legend { display: flex; flex-wrap: wrap; gap: 3px 12px; padding: 6px 12px; font-size: 12px; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.feed-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw.call { background: var(--amber-soft); border-left: 3px solid var(--amber); } .sw.news { background: var(--feed-news); border-left: 3px solid var(--feed-news-b); } .sw.exitpoll { background: var(--feed-exit); border-left: 3px solid var(--feed-exit-b); }
.sw.soc-D { background: var(--dem-soft); border-left: 3px solid var(--dem); } .sw.soc-R { background: var(--feed-rep); border-left: 3px solid var(--feed-rep-b); } .sw.soc-N { background: var(--feed-soc); border-left: 3px solid var(--feed-soc-b); }
.feed-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.feed-list li { padding: 10px 12px; border-bottom: 1px solid var(--rule); border-left: 4px solid transparent; background: var(--surface); }
.feed-list li.call { background: var(--amber-soft); border-left-color: var(--amber); }
.feed-list li.news { background: var(--feed-news); border-left-color: var(--feed-news-b); }
.feed-list li.exitpoll { background: var(--feed-exit); border-left-color: var(--feed-exit-b); }
.feed-list li.social { background: var(--feed-soc); border-left-color: var(--feed-soc-b); }
.feed-list li.social.p-D { background: var(--dem-soft); border-left-color: var(--dem); }
.feed-list li.social.p-R { background: var(--feed-rep); border-left-color: var(--feed-rep-b); }
.feed-list li.social.p-I { background: var(--ind-soft); border-left-color: var(--ind); }
.feed-list li.new { box-shadow: inset 0 0 0 2px var(--amber); }
@media (prefers-reduced-motion: no-preference) { .feed-list li { transition: box-shadow 2s ease; } }
.feed-list .who { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--ink-2); margin-bottom: 2px; }
.feed-list .outlet { font-weight: 600; color: var(--ink); }
.feed-list .kind { text-transform: none; padding: 0 5px; border-radius: 2px; background: var(--kind-bg); color: var(--kind-fg); }
.feed-list .kind.call { background: var(--amber); color: var(--ink); font-weight: 600; }
.feed-list .kind.exitpoll { background: var(--exit-bg); color: var(--exit-fg); }
.feed-list .plat { display: inline-flex; align-items: center; color: var(--ink); margin-right: 2px; }
.feed-list .plat svg { display: block; }
.feed-list .ttl { display: block; color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.35; }
.feed-list .ttl:hover { text-decoration: underline; }
.feed-list .race-link { all: unset; cursor: pointer; font-size: 12.5px; color: var(--link); text-decoration: underline; }
.feed-list .txt { margin: 2px 0 0; white-space: pre-wrap; }
.feed-list .handle { color: var(--ink-2); }
.feed-list .tag { font-size: 12px; color: var(--ink-2); margin-bottom: 2px; }
.feed-list .post-img { display: block; max-width: 100%; max-height: 220px; margin-top: 6px; border: 1px solid var(--rule); }
.feed-list .links { display: flex; gap: 12px; margin-top: 4px; }

/* Footer */
.foot { max-width: 1480px; margin: 0 auto; padding: 16px 16px 72px; color: var(--ink-2); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.foot p { margin: 0; }
.powered a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--amber); }
.powered a:hover { border-bottom-color: var(--ink); }

/* Big screen */
@media (min-width: 1700px) {
  body { font-size: 16px; }
  .bop-num { font-size: 60px; }
  .split { grid-template-columns: minmax(0, 1fr) 420px; }
}

/* Tablet */
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
  .leader { min-width: 180px; }
}

/* Mobile */
@media (max-width: 820px) {
  .topnav { display: none; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--head-bg); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 6px; }
  .mobile-nav a { flex: 1; text-align: center; padding: 10px; }
  .mobile-nav a[aria-current="page"] { background: rgba(255,255,255,.14); }
  .badge[hidden] { display: none; }
  .badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: var(--ink); font-size: 12px; font-weight: 600; margin-left: 4px; }
  .bop { grid-template-columns: 1fr; gap: 10px; padding: 12px 16px 4px; }
  .bop-row { border-top-width: 1px; }
  .bop-num { font-size: 34px; }
  .bop-bar { height: 16px; }
  .split { display: block; padding: 4px 16px 24px; }
  .feed { position: static; max-height: none; border: 0; background: transparent; }
  .feed-list { overflow: visible; }
  .feed-list li { border: 1px solid var(--rule); margin-bottom: 6px; }
  body[data-view="board"] .feed { display: none; }
  body[data-view="feed"] .board, body[data-view="feed"] .detail { display: none; }
  .board-head { top: var(--top-h); }
  .map .geo { max-height: none; }
  .lbl { font-size: 15px; }
  .lbl.pct { font-size: 12px; }
  .map-tip { min-width: 160px; max-width: 240px; font-size: 12px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .search input { width: 100%; }
  .search { flex: 1 1 100%; }
  .races th:nth-child(5), .races td:nth-child(5) { display: none; }
  .races td { padding: 8px 4px; }
  .leader { min-width: 120px; }
  .pct { font-size: 13px; }
  .pct .pbar { width: 28px; }
  .margin { font-size: 13px; }
  .races td { padding: 8px 3px; }
  /* Fixed columns so the table always fits the phone; long words wrap inside their cell. */
  .races { table-layout: fixed; }
  .races th:nth-child(1) { width: 34%; }
  .races th:nth-child(2) { width: 38%; }
  .races th:nth-child(3) { width: 17%; }
  .races th:nth-child(4) { width: 11%; }
  .races td { overflow-wrap: anywhere; }
  .leader { min-width: 0; }
  .cand-line { font-size: 12.5px; gap: 2px 6px; }
  .margin .mv { font-size: 10.5px; }
  .races .pm-chip { flex-wrap: wrap; gap: 0 6px; max-width: 100%; }
  .bop-foot span:nth-child(3) { display: none; }
  .detail { padding: 12px; }
  .detail h1 { font-size: 26px; }
  .cands .cp { font-size: 22px; width: 64px; }
  .cands .cb { width: 28%; }
  .cands .cn { font-size: 15px; }
  .foot { flex-direction: column; }
}

/* Who called it */
.hdr-link { margin-left: auto; color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 3px; font-weight: 500; font-size: 14px; }
.hdr-link:hover { background: rgba(255,255,255,.1); }
.hdr-link[aria-current="page"] { background: rgba(255,255,255,.14); }
.hdr-link + .theme-btn { margin-left: 0; }
.calls-view { min-width: 0; background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--ink); padding: 16px 20px 20px; }
.calls-view h1 { font-family: var(--cond); font-weight: 600; font-size: 34px; line-height: 1.1; margin: 4px 0 6px; text-wrap: balance; }
.ct-dek { max-width: 68ch; color: var(--ink-2); font-size: 14px; line-height: 1.5; margin: 0 0 16px; }
.ct-top { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.ct-boardwrap { min-width: 0; overflow-x: auto; }
.ct-board { list-style: none; margin: 0; padding: 0; min-width: 500px; }
.ct-row { display: grid; grid-template-columns: 30px 100px minmax(100px, 1fr) 44px 52px 92px 46px; gap: 8px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.ct-cols { padding: 4px; border-bottom: 2px solid var(--ink); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--steel); }
.ct-rank { font-family: var(--cond); font-weight: 600; font-size: 22px; color: var(--ink); text-align: right; }
.ct-boardwrap > .ct-board > .ct-row:nth-child(2) .ct-rank { color: var(--amber); }
.ct-src .call-tag { font-size: 12.5px; padding: 3px 7px; }
.ct-score { display: flex; align-items: center; gap: 8px; }
.ct-score b { font-family: var(--cond); font-size: 20px; min-width: 44px; }
.ct-bar { flex: 1; height: 8px; background: var(--paper-2); position: relative; }
.ct-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.ct-boardwrap > .ct-board > .ct-row:nth-child(2) .ct-bar i { background: var(--amber); }
.ct-stats { display: contents; }
.ct-stat { display: flex; flex-direction: column; line-height: 1.15; }
.ct-stat b { font-weight: 600; font-size: 14px; }
.ct-stat small { font-size: 11px; color: var(--steel); }
.ct-stat small { display: none; }
.ct-stat.bad b { color: var(--rep); }
.ct-rest h3 { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--steel); margin: 18px 0 2px; }
.ct-rest .ct-row { color: var(--ink-2); }
.ct-rest .ct-bar i { background: var(--steel); }
.ct-pmcard { border: 1px solid var(--pm-b); background: var(--pm-bg); padding: 12px 14px; font-size: 13.5px; line-height: 1.45; }
.ct-pmcard p { margin: 8px 0 0; }
.ct-pmhead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ct-pmhead b { color: var(--pm-fg); font-size: 15px; }
.ct-pmhead span:last-child { flex-basis: 100%; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--steel); }
.ct-dia { display: inline-block; width: 10px; height: 10px; background: var(--pm-fg); transform: rotate(45deg); flex: none; }
.ct-h2 { font-family: var(--cond); font-weight: 600; font-size: 24px; margin: 28px 0 4px; }
.ct-controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0 16px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.ct-controls .tabs { border-bottom: 0; }
.ct-controls .controls { padding: 6px 0; }
.ct-races { display: flex; flex-direction: column; }
.ct-race { padding: 14px 0 16px; border-bottom: 1px solid var(--rule); min-width: 0; }
.ct-race header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 8px; }
.ct-name { font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; }
.ct-name:hover { text-decoration: underline; }
.ct-win { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.ct-win .sw { border: 0; }
.ct-win .sw.D { background: var(--dem); } .ct-win .sw.R { background: var(--rep); } .ct-win .sw.I { background: var(--ind); } .ct-win .sw.O { background: var(--oth); }
.ct-line { min-width: 0; }
.ct-track { position: relative; margin: 0 9px; border-bottom: 2px solid var(--ink); box-sizing: content-box; }
.ct-track.pre::before { content: ""; position: absolute; left: -9px; bottom: -2px; width: 9px; border-bottom: 2px dashed var(--pm-b); }
.ct-mark { position: absolute; transform: translateX(-50%); display: grid; place-items: center; }
.ct-mark.call { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 9.5px; font-weight: 600; line-height: 1; box-shadow: 0 0 0 2px var(--surface); }
.ct-mark.call::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: var(--stem, 0); background: var(--steel); }
.ct-mark.call.civic { background: var(--amber); color: var(--ink); }
.ct-mark.call.pg { background: var(--pm-fg); color: #fff; }
.ct-mark.call.ddhq { background: var(--dem); color: #fff; }
.ct-mark.call.wrong { background: var(--surface); color: var(--rep); box-shadow: inset 0 0 0 2px var(--rep), 0 0 0 2px var(--surface); }
.ct-mark.pm { width: 12px; height: 12px; margin-top: 2px; background: var(--pm-fg); transform: translateX(-50%) rotate(45deg); box-shadow: 0 0 0 2px var(--surface); }
.ct-mark.pm.wrong { background: var(--surface); box-shadow: inset 0 0 0 2px var(--rep), 0 0 0 2px var(--surface); }
.ct-mark.pm.pre { background: var(--pm-bg); box-shadow: inset 0 0 0 2px var(--pm-fg), 0 0 0 2px var(--surface); }
.ct-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--steel); margin: 12px 0 8px; font-variant-numeric: tabular-nums; }
.ct-seq { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ct-step { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.ct-pos { display: inline-grid; place-items: center; min-width: 18px; height: 18px; font-family: var(--cond); font-weight: 600; font-size: 12.5px; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 50%; }
.ct-step.pm .ct-pos { border: 0; }
.ct-step.pm .pm-lbl { white-space: nowrap; font-weight: 600; color: var(--pm-fg); text-decoration: none; font-size: 12.5px; }
.ct-step.wrong .ct-pos { color: var(--rep); border-color: var(--rep); }
.ct-step.wrong .call-tag { text-decoration: line-through; }
.ct-when { color: var(--ink); white-space: nowrap; }
.ct-delta { color: var(--steel); }
.ct-step.wrong .ct-delta { color: var(--rep); }
.ct-note { margin: 8px 0 0; font-size: 12.5px; color: var(--steel); }
.ct-more { margin: 14px 0 0; align-self: center; background: none; border: 1px solid var(--steel); border-radius: 3px; padding: 8px 16px; font-weight: 500; color: var(--ink); }
.ct-more:hover { background: var(--paper); }
.ct-detail:empty { display: none; }
.ct-detail { margin: 4px 0 16px; padding: 10px 12px 12px; border: 1px solid var(--rule); background: var(--surface-2); }
.ct-detail h2 { margin-top: 0; }
.ct-all { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--link); }
@media (max-width: 1100px) { .ct-top { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .hdr-link { display: none; }
  body[data-view="calls"] .feed { display: none; }
  .calls-view { padding: 12px; }
  .calls-view h1 { font-size: 26px; }
  .ct-board { min-width: 0; }
  .ct-row { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "rank src score" "rank stats stats"; row-gap: 4px; }
  .ct-cols { display: none; }
  .ct-rank { grid-area: rank; align-self: start; }
  .ct-src { grid-area: src; }
  .ct-score { grid-area: score; }
  .ct-score .ct-bar { width: 72px; flex: none; }
  .ct-stats { grid-area: stats; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; }
  .ct-stat b { font-size: 13px; }
  .ct-row { padding: 8px 2px; }
  .ct-row .ct-stat { flex-direction: row; gap: 4px; align-items: baseline; }
  .ct-stat small { display: inline; }
  .ct-controls .controls { width: 100%; }
}
