/* Poll Ledger — app.css
 * Layout: a fixed left rail (desktop) or top bar + bottom tabs (phone), with
 * one content column. The UI is monochrome ink on cool paper; only the data
 * wears color, so a reader's eye goes to the numbers.
 */
:root {
  --bg: #F3F5F8;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --ink: #0F1720;
  --ink-2: #4B5563;
  --muted: #8A94A3;
  --hair: #E3E7EC;
  --hair-2: #D1D7DF;
  --accent: #0F1720;
  --focus: #2A6FD6;
  --warn: #B45309;
  --c-dem: #2A6FD6; --c-rep: #D64545; --c-yes: #179E70; --c-no: #EB6834;
  --c-slot1: #6250D6; --c-slot2: #C98500; --c-slot3: #179E70; --c-slot4: #B23A86; --c-slot5: #6B7686;
  --shadow: 0 1px 2px rgba(15, 23, 32, .04), 0 12px 32px -16px rgba(15, 23, 32, .14);
  --shadow-sm: 0 1px 1px rgba(15, 23, 32, .04), 0 2px 6px -2px rgba(15, 23, 32, .08);
  --radius: 14px;
  --font-display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rail-w: 252px;
  --gutter: 40px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0F14; --surface: #121820; --surface-2: #171E27; --ink: #E8ECF1; --ink-2: #A5AFBC; --muted: #6F7A88;
    --hair: #222B36; --hair-2: #2C3642; --accent: #E8ECF1; --focus: #4F8DE8; --warn: #E0A458;
    --c-dem: #4F8DE8; --c-rep: #E66767; --c-yes: #199E70; --c-no: #D95926;
    --c-slot1: #9085E9; --c-slot2: #C98500; --c-slot3: #199E70; --c-slot4: #C85BA0; --c-slot5: #8A94A3;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
    --shadow-sm: 0 1px 1px rgba(0, 0, 0, .3), 0 2px 6px -2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0F14; --surface: #121820; --surface-2: #171E27; --ink: #E8ECF1; --ink-2: #A5AFBC; --muted: #6F7A88;
  --hair: #222B36; --hair-2: #2C3642; --accent: #E8ECF1; --focus: #4F8DE8; --warn: #E0A458;
  --c-dem: #4F8DE8; --c-rep: #E66767; --c-yes: #199E70; --c-no: #D95926;
  --c-slot1: #9085E9; --c-slot2: #C98500; --c-slot3: #199E70; --c-slot4: #C85BA0; --c-slot5: #8A94A3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
  --shadow-sm: 0 1px 1px rgba(0, 0, 0, .3), 0 2px 6px -2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
b, strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.warn { color: var(--warn); }
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 12px; max-width: 72ch; }

/* ---------- shell ---------- */
.shell { min-height: 100%; }
.rail {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; bottom: 0; width: var(--rail-w);
  padding: 28px 20px 20px; display: flex; flex-direction: column; gap: 22px;
  border-right: 1px solid var(--hair); background: var(--bg);
}
.topbar, .tabbar { display: none; }
.main { margin-left: var(--rail-w); min-height: 100vh; }
.page { max-width: 1140px; margin: 0 auto; padding-block: 36px 64px; padding-inline: var(--gutter); display: flex; flex-direction: column; gap: 28px; }

.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.wordmark:hover { text-decoration: none; }
.wm-mark { width: 26px; height: 26px; border-radius: 7px; flex: none; background-color: #101B2B; background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect x='17' y='17' width='19' height='19' rx='5' fill='%23fff' opacity='.9'/%3E%3Crect x='40.5' y='17' width='19' height='19' rx='5' fill='%234F8DE8'/%3E%3Crect x='64' y='17' width='19' height='19' rx='5' fill='%23fff' opacity='.9'/%3E%3Crect x='17' y='40.5' width='19' height='19' rx='5' fill='%23E66767'/%3E%3Crect x='40.5' y='40.5' width='19' height='19' rx='5' fill='%23EDA100'/%3E%3Crect x='64' y='40.5' width='19' height='19' rx='5' fill='%234F8DE8'/%3E%3Crect x='17' y='64' width='19' height='19' rx='5' fill='%23fff' opacity='.9'/%3E%3Crect x='40.5' y='64' width='19' height='19' rx='5' fill='%23E66767'/%3E%3Crect x='64' y='64' width='19' height='19' rx='5' fill='%23fff' opacity='.9'/%3E%3C/svg%3E"); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 500; font-size: 14px; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.nav-ico { width: 18px; height: 18px; flex: none; opacity: .8; }
.rail-count { margin-top: auto; padding: 16px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--hair); }
.rc-eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.rc-days { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.rc-num { font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.rc-unit { color: var(--ink-2); font-weight: 500; }
.rc-date { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.rail-status { font-size: 12.5px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--hair); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status-live .status-dot { background: var(--c-yes); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-yes) 20%, transparent); }
.status-snap .status-dot { background: var(--c-slot2); }
.status-warn .status-dot { background: var(--warn); }
.status-note { color: var(--muted); margin-top: 6px; line-height: 1.4; }
.rail-foot { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.rail-foot a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--hair-2); }

/* ---------- page head ---------- */
.page-head { display: flex; flex-direction: column; gap: 10px; max-width: 76ch; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.crumb-sep { opacity: .6; }
.eyebrow { font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -0.025em; }
.lede { color: var(--ink-2); font-size: 16px; max-width: 64ch; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { font-size: 20px; }
.more { font-size: 13px; color: var(--ink-2); font-weight: 500; }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.hero-h1 { font-size: clamp(34px, 5vw, 64px); line-height: 1; letter-spacing: -0.035em; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.hero-num { font-weight: 700; font-variant-numeric: lining-nums; }
.hero-rest { font-weight: 500; font-size: .62em; color: var(--ink-2); letter-spacing: -0.02em; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 16px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; transition: transform .18s, box-shadow .18s; }
a.tile:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 1px 2px rgba(15, 23, 32, .05), 0 18px 40px -18px rgba(15, 23, 32, .22); }
.tile-eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tile-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.tile-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 2px; }
.tile-net { font-family: var(--font-display); font-size: 36px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--hl, var(--ink)); }
.spark { flex: none; }
.tile-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.tile-foot { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.tile-fc .ctl-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.ctl-k { color: var(--ink-2); font-weight: 500; }
.ctl-v { white-space: nowrap; color: var(--ink-2); }
.sbar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); gap: 2px; width: 100%; }
.sbar-seg { height: 100%; display: block; min-width: 0; }
.sbar-seg:first-child { border-radius: 999px 0 0 999px; }
.sbar-seg:last-child { border-radius: 0 999px 999px 0; }
.delta { font-weight: 600; }
.delta.up { color: var(--c-yes); }
.delta.down { color: var(--c-no); }

/* ---------- two column ---------- */
.two-col { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: start; }
.col { min-width: 0; }
.race-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.race-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) 110px 96px 72px; gap: 14px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--hair); transition: background .12s; min-width: 0; }
.race-row:last-child { border-bottom: 0; }
.race-row:hover { background: var(--surface-2); text-decoration: none; }
.rr-title { display: flex; flex-direction: column; min-width: 0; }
.rr-name { font-weight: 600; font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rr-sub { font-size: 12px; color: var(--muted); }
.rr-cands { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; min-width: 0; }
.rr-cand { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.rr-cand b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rr-margin { font-weight: 600; font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-mkt { text-align: right; min-width: 0; }
.rr-mkt .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.race-row-sk .rr-sub { color: var(--muted); }
.quiet { border-top: 1px solid var(--hair); }
.quiet summary { padding: 12px 18px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.quiet-row { grid-template-columns: 1fr; }
.mbar { position: relative; display: block; height: 10px; width: 100%; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mbar-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--hair-2); }
.mbar-fill { position: absolute; top: 2px; bottom: 2px; border-radius: 999px; }
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; flex: none; }
.ptag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; background: var(--surface-2); color: var(--ink-2); }
.ptag-D { color: var(--c-dem); background: color-mix(in srgb, var(--c-dem) 12%, transparent); }
.ptag-R { color: var(--c-rep); background: color-mix(in srgb, var(--c-rep) 12%, transparent); }

.feed { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.feed-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--hair); align-items: center; font-size: 13px; transition: background .12s; }
.feed-row:last-child { border-bottom: 0; }
.feed-row:hover { background: var(--surface-2); text-decoration: none; }
.feed-date { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.feed-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-res { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.feed-res b { color: var(--ink); }

.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.mini { padding: 14px 16px; background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 4px; }
.mini:hover { text-decoration: none; background: var(--surface-2); }
.mini-title { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.mini-row { display: flex; align-items: baseline; gap: 10px; }
.mini-net { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--hl, var(--ink)); }
.mini-vals { font-size: 12.5px; color: var(--ink-2); }
.mini-foot { font-size: 12px; color: var(--muted); }

/* ---------- controls ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink-2); transition: all .12s; }
.pill:hover { text-decoration: none; border-color: var(--hair-2); color: var(--ink); }
.pill.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--hair); border-radius: 9px; padding: 2px; gap: 2px; }
.seg-btn { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg-btn:hover { color: var(--ink); text-decoration: none; }
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.filterbar { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; padding: 4px 0 14px; }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fld select, .toolbar select { font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 500; padding: 6px 28px 6px 10px; border-radius: 8px; border: 1px solid var(--hair); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A94A3' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; -webkit-appearance: none; color: var(--ink); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar.wrap .search { flex: 1 1 260px; }
.spacer { flex: 1; }
.search { padding: 8px 12px; border-radius: 9px; border: 1px solid var(--hair); background: var(--surface); min-width: 220px; font-size: 13.5px; }
.search:focus { border-color: var(--hair-2); }
.btn { padding: 7px 13px; border-radius: 9px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; cursor: pointer; }
.btn:hover { opacity: .9; text-decoration: none; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--hair-2); }
.chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; letter-spacing: .01em; }
.chip-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.chip-mkt { background: var(--ink); color: var(--bg); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .card-head h3 { font-size: 18px; }
.card-head .muted { font-size: 13px; }
.hl-card { padding: 22px 26px; }
.headline { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 28px; align-items: end; }
.hl-cand, .hl-margin, .hl-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hl-name { font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hl-num { font-family: var(--font-display); font-size: clamp(34px, 4vw, 48px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; color: var(--hl, var(--ink)); white-space: nowrap; }
.hl-pct { font-size: .5em; font-weight: 600; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.hl-margin .hl-num { font-size: clamp(26px, 3vw, 36px); }
.hl-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.hl-meta-v { font-size: 15px; font-weight: 600; }
.race-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.chart-card { min-width: 0; }
.chart-box { position: relative; min-height: 240px; }
.matchups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.mu-card { padding: 12px 14px; border: 1px solid var(--hair); border-radius: 10px; background: var(--surface-2); }
.mu-title { font-weight: 600; font-size: 13.5px; }
.mu-vals { display: flex; gap: 14px; margin: 6px 0 4px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.mu-vals b { color: var(--ink); }
.mu-foot { font-size: 12px; color: var(--muted); }

/* side panels */
.mkt { position: sticky; top: 20px; }
.mkt-rows { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.mkt-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 44px; gap: 10px; align-items: center; font-size: 13.5px; }
.mkt-name { display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.pbar { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pbar-fill { display: block; height: 100%; border-radius: 999px; }
.mkt-p { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mkt-hist-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.mkt-foot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; }
.mkt-foot a { font-weight: 600; }

/* ---------- charts ---------- */
.chart { position: relative; }
.chart-wrap { width: 100%; }
.chart-svg { display: block; width: 100%; height: auto; font-family: var(--font-body); }
.chart-svg .grid { stroke: var(--hair); stroke-width: 1; }
.chart-svg .grid-mid { stroke: var(--hair-2); stroke-width: 1; }
.chart-svg .axis { stroke: var(--hair-2); stroke-width: 1; }
.chart-svg .tick { font-size: 11px; fill: var(--muted); }
.chart-svg .end-label { font-size: 12px; font-weight: 600; fill: var(--ink); }
.chart-svg .leader { stroke: var(--hair-2); stroke-width: 1; }
.chart-svg .annot { stroke: var(--hair-2); stroke-dasharray: 3 3; }
.chart-svg .annot-label { font-size: 10.5px; fill: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.chart-svg .dot { opacity: .42; }
.chart-svg .dot-partisan { opacity: .22; }
.chart-svg .crosshair { stroke: var(--ink); stroke-width: 1; opacity: .35; pointer-events: none; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--hair); box-shadow: var(--shadow); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; min-width: 150px; max-width: 240px; }
.tip-date { font-weight: 600; margin-bottom: 4px; display: flex; justify-content: space-between; gap: 10px; }
.tip-n { color: var(--muted); font-weight: 500; }
.tip-row { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
.tip-k { flex: 1; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.tip-foot { color: var(--muted); font-size: 11.5px; margin-top: 4px; border-top: 1px solid var(--hair); padding-top: 4px; }
.chart-empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.chart-empty.small { padding: 16px; font-size: 12.5px; text-align: left; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lg-note { color: var(--muted); }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.swatch-dot { border-radius: 50%; background: var(--muted); opacity: .5; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .date { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tbl .meta { white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.tbl .pollster { max-width: 280px; }
.tbl .pollster a { font-weight: 600; }
.sponsor { display: block; color: var(--muted); font-size: 12px; }
.th-sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.mtxt { font-weight: 600; }
.src a, a.src { color: var(--ink-2); font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.results { white-space: nowrap; }
.res { margin-right: 12px; font-variant-numeric: tabular-nums; }
.res-k { color: var(--ink-2); }
.lean { font-weight: 600; }
.lean-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.lean-item { padding: 12px 14px; border: 1px solid var(--hair); border-radius: 10px; background: var(--surface-2); }
.lean-k { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.lean-v { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0; }
.lean-n { font-size: 12px; color: var(--muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding-top: 14px; font-size: 13px; }

/* ---------- maps ---------- */
.tally-card { padding: 18px 22px; }
.tally-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-bottom: 12px; }
.tally-side { display: flex; align-items: center; gap: 12px; }
.tally-side.right { flex-direction: row-reverse; text-align: right; }
.tally-num { font-family: var(--font-display); font-size: clamp(34px, 4vw, 46px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.tally-lab { font-size: 13px; font-weight: 600; line-height: 1.3; }
.tally-lab .muted { font-weight: 500; font-size: 12px; }
.tally-mid { text-align: center; display: flex; flex-direction: column; gap: 2px; }
.tally-title { font-weight: 600; font-size: 13.5px; }
.tally-sub { font-size: 12.5px; color: var(--muted); }
.tally-bar { position: relative; display: flex; height: 26px; border-radius: 8px; overflow: visible; background: var(--surface-2); gap: 2px; }
.tally-seg { display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.25); min-width: 0; overflow: hidden; }
.tally-seg:first-child { border-radius: 8px 0 0 8px; }
.tally-seg:last-child { border-radius: 0 8px 8px 0; }
.tally-maj { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); transform: translateX(-50%); }
.tally-maj span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); white-space: nowrap; }
.tally-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12px; color: var(--ink-2); }
.tally-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tally-base { margin-top: 12px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tally-base input { width: 64px; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--hair); background: var(--surface); font-variant-numeric: tabular-nums; }
.map-card { padding: 18px 22px 16px; }
.map-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 18px; align-items: flex-end; margin-bottom: 14px; }
.brushes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.brush-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-right: 4px; }
.brush { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--hair); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.brush i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.brush:hover { border-color: var(--hair-2); color: var(--ink); }
.brush.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.map-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.map-box { position: relative; min-height: 240px; }
.map-svg { display: block; width: 100%; height: auto; max-height: 640px; margin: 0 auto; }
.tile-map .tile.has-race { cursor: pointer; }
.tile-map .tile.has-race:hover rect { filter: brightness(0.93); }
.tile-map .tile:focus-visible { outline: none; }
.tile-map .tile:focus-visible rect { stroke: var(--focus); stroke-width: 2.5; }
.tile-abbr { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: .02em; pointer-events: none; }
.tile-sub { font-family: var(--font-body); font-size: 10px; font-weight: 600; opacity: .9; pointer-events: none; }
.house-map .seat { cursor: pointer; }
.house-map .seat:hover { filter: brightness(0.9); }
.house-map .seat:focus-visible { outline: none; stroke: var(--focus); stroke-width: 2; }
.house-lab { font-family: var(--font-body); font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.map-tip { max-width: 260px; }
.colors { margin-top: 14px; border-top: 1px solid var(--hair); padding-top: 10px; }
.colors summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.color-grid { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 12px 0; }
.color-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.color-item input[type="color"] { width: 30px; height: 24px; border: 1px solid var(--hair); border-radius: 6px; padding: 0; background: none; cursor: pointer; }
.color-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.small-btn { padding: 4px 10px; font-size: 12px; }
.rating-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.mode-seg { align-self: flex-start; }
.mode-seg .seg-btn { padding: 7px 14px; font-size: 13px; }
.sel { font-size: 13px; padding: 5px 28px 5px 10px; border-radius: 8px; border: 1px solid var(--hair); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A94A3' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; -webkit-appearance: none; color: var(--ink); }
.chip-lock { background: var(--c-yes); color: #fff; }
.chip-won { background: var(--c-yes); color: #fff; margin-left: 6px; }
.changelog { display: flex; flex-direction: column; }
.cl-row { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.cl-row:last-child { border-bottom: 0; }
.cl-date { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.cl-body a { font-weight: 600; }
.cl-move { margin: 4px 0; font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cl-note { font-size: 13.5px; color: var(--ink-2); max-width: 70ch; }
.score-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.score { display: flex; flex-direction: column; gap: 4px; }
.score-num { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.score-lab { font-size: 13px; font-weight: 600; line-height: 1.35; }
.score-lab .muted { font-weight: 500; font-size: 12px; }
.verdicts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.verdict .card-head h3 { font-size: 15px; }
.verdict-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.verdict-note { font-size: 14px; color: var(--ink-2); line-height: 1.5; max-width: 60ch; }
.verdict-who { font-size: 15px; font-weight: 600; }
.rating-chip.big { font-size: 14px; padding: 5px 14px; }
.race-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.race-aside .mkt { position: static; }
.fund .card-head h3 { font-size: 15px; }
.fund-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.fund-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 60px; gap: 10px; align-items: center; font-size: 13.5px; margin-top: 6px; }
.fund-name { display: flex; align-items: center; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fund-v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.fund-sub { font-size: 12px; color: var(--muted); margin: 2px 0 4px 15px; }
.past-row { display: flex; gap: 12px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--hair); }
.past-row:last-child { border-bottom: 0; }
.past-year { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; width: 36px; }
.past-res { color: var(--ink-2); }
.p-D { color: var(--c-dem); } .p-R { color: var(--c-rep); }
.result-card.live { border-color: color-mix(in srgb, var(--c-yes) 45%, var(--hair)); }
.res-rows { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; }
.res-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(120px, 1fr) 64px 90px; gap: 12px; align-items: center; font-size: 14px; }
.res-row.won .res-name { font-weight: 700; }
.res-name { display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.res-votes { text-align: right; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fc-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 32px; align-items: start; margin-bottom: 18px; }
.fc-big { display: flex; flex-direction: column; gap: 4px; }
.fc-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fc-num { font-family: var(--font-display); font-size: clamp(40px, 5vw, 56px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.fc-num.small-num { font-size: clamp(28px, 3vw, 36px); }
.fc-of { font-size: .5em; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.fc-sub { font-size: 13px; color: var(--ink-2); }
.fc-hist { margin-top: 6px; }
.fc-hist-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.pbar-split { display: flex; gap: 2px; background: transparent; }
.pbar-split .pbar-fill { border-radius: 999px 0 0 999px; }
.pbar-rest { flex: 1; height: 100%; border-radius: 0 999px 999px 0; }
.bar-col { min-width: 120px; }
.more-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.more-item { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-bottom: 1px solid var(--hair); }
.more-item:last-child { border-bottom: 0; }
.more-item span { font-size: 13px; color: var(--muted); }
.more-item:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- prose ---------- */
.prose .card h2 { font-size: 19px; margin-bottom: 10px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15px; max-width: 72ch; }
.prose ol, .prose ul { padding-left: 20px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--hair-2); }
.empty { padding: 36px; text-align: center; color: var(--ink-2); }
.empty.small { padding: 18px; text-align: left; font-size: 13.5px; }
.empty h2 { font-size: 20px; margin-bottom: 8px; }

/* ---------- skeletons ---------- */
.sk { background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; border-radius: 10px; animation: shimmer 1.4s infinite linear; }
.sk-eyebrow { height: 12px; width: 180px; margin-bottom: 14px; }
.sk-title { height: 44px; width: 60%; margin-bottom: 20px; }
.sk-block { height: 260px; }
.sk-block.short { height: 120px; margin-top: 16px; }
.sk-tile { height: 190px; border-radius: var(--radius); }
.skeleton-page { padding: 36px var(--gutter); max-width: 1140px; margin: 0 auto; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- about ---------- */
.rail-links { margin-top: 10px; }
.rail-links a { color: var(--ink-2); font-weight: 500; }
.rail-copy { margin-top: 4px; color: var(--muted); }
.about-card p { font-size: 15px; line-height: 1.6; max-width: 70ch; }
.about-card p + p { margin-top: 10px; }
.about-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 20px; margin-top: 16px; }
.about-facts > div { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--hair); }
.about-facts b { color: var(--ink); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.sec-title { font-size: 22px; margin-top: 8px; }
.prose .lede { margin-top: -8px; }

/* ---------- races directory ---------- */
.race-nav { display: flex; flex-direction: column; gap: 12px; }
.pill-select { font-size: 13px; font-weight: 500; padding: 7px 30px 7px 12px; border-radius: 999px; border: 1px solid var(--hair); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A94A3' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; -webkit-appearance: none; color: var(--ink-2); cursor: pointer; max-width: 100%; }
.pill-select.on { background-color: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.howto { padding: 18px 22px; }
.howto-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; max-width: 78ch; margin-top: 12px; }
.howto-text b { color: var(--ink); }
.rbar { display: flex; height: 22px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.rbar-seg { display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.2); min-width: 0; }
.rbar-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.rbar-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rbar-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rc-solidD { background: var(--c-dem); color: #fff; }
.rc-solidR { background: var(--c-rep); color: #fff; }
.rc-leanD { background: color-mix(in srgb, var(--c-dem) 16%, var(--surface)); color: var(--c-dem); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-dem) 45%, transparent); }
.rc-leanR { background: color-mix(in srgb, var(--c-rep) 16%, var(--surface)); color: var(--c-rep); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-rep) 45%, transparent); }
.rc-toss { background: var(--c-slot2); color: #fff; }
.rc-unrated, .chip-none { background: var(--surface-2); color: var(--muted); }
.rbar-seg.rc-leanD { background: color-mix(in srgb, var(--c-dem) 50%, var(--surface)); color: #fff; box-shadow: none; }
.rbar-seg.rc-leanR { background: color-mix(in srgb, var(--c-rep) 50%, var(--surface)); color: #fff; box-shadow: none; }
.rbar-legend i.rc-leanD { background: color-mix(in srgb, var(--c-dem) 50%, var(--surface)); box-shadow: none; }
.rbar-legend i.rc-leanR { background: color-mix(in srgb, var(--c-rep) 50%, var(--surface)); box-shadow: none; }
.rgroup { display: flex; flex-direction: column; gap: 10px; }
.rgroup-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rgroup-head h2 { font-size: 18px; }
.rgroup-head .count { font-family: var(--font-display); font-weight: 600; color: var(--muted); font-size: 15px; margin-left: 4px; }
.rgroup-head .hint { font-size: 13px; color: var(--muted); }
.r2-head, .race-row2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 118px; gap: 16px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--hair); min-width: 0; }
.race-list.held .r2-head, .race-list.held .race-row2 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 128px; }
.r2-head { padding: 8px 18px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.r2-head span:last-child, .r2-rating { text-align: right; }
.race-row2 { transition: background .12s; }
.race-row2:last-child { border-bottom: 0; }
.race-row2:hover { background: var(--surface-2); text-decoration: none; }
.r2-main { min-width: 0; }
.r2-name { font-weight: 600; font-size: 14.5px; line-height: 1.3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.r2-cands { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }
.r2-cands .vs { color: var(--muted); margin: 0 3px; }
.r2-cands .ptag { margin-left: 4px; }
.r2-lead { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.r2-lead.muted { font-weight: 500; }
.r2-lead.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c-yes); margin-right: 6px; vertical-align: 1px; }
.r2-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.race-foot { margin-top: -6px; }
.race-foot a { font-weight: 600; }
.map-hint { flex-basis: 100%; font-size: 13px; color: var(--ink-2); margin: -4px 0 0; }
.map-opt { margin-top: 12px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.map-opt label { display: inline-flex; align-items: center; gap: 8px; }
.map-page .rgroup .race-list { background: var(--surface); }
.chart-opts { margin-top: 12px; border-top: 1px solid var(--hair); padding-top: 10px; }
.chart-opts summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chart-opts .filterbar { margin-top: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 28px; }
  .race-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 90px 90px 66px; }
}
@media (max-width: 1023px) {
  .rail { display: none; }
  .main { margin-left: 0; padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .topbar { display: flex; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--hair); }
  .topbar-right { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-top: 1px solid var(--hair); }
  .tab-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--muted); padding: 4px 0; border-radius: 8px; }
  .tab-item.active { color: var(--ink); font-weight: 600; }
  .tab-item .nav-ico { width: 20px; height: 20px; }
  .tab-item:hover { text-decoration: none; }
  .page { padding-block: 22px 40px; gap: 22px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .race-grid { grid-template-columns: 1fr; }
  .mkt { position: static; }
}
@media (max-width: 719px) {
  :root { --gutter: 16px; }
  body { font-size: 14.5px; }
  .tiles { grid-template-columns: 1fr; }
  .race-row { grid-template-columns: 1fr auto; grid-template-areas: "title margin" "cands mkt" "bar bar"; gap: 6px 10px; padding: 12px 14px; }
  .r2-head { display: none; }
  .race-row2, .race-list.held .race-row2 { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main rating" "polls polls"; gap: 6px 10px; padding: 12px 14px; }
  .race-list.held .race-row2 { grid-template-areas: "main rating" "polls final"; }
  .r2-main { grid-area: main; }
  .r2-rating { grid-area: rating; align-self: start; }
  .r2-polls { grid-area: polls; }
  .r2-polls.r2-final { grid-area: final; text-align: right; }
  .howto { padding: 14px 16px; }
  .rbar-legend { gap: 4px 12px; font-size: 12px; }
  .rr-title { grid-area: title; }
  .rr-cands { grid-area: cands; }
  .rr-bar { grid-area: bar; }
  .rr-margin { grid-area: margin; }
  .rr-mkt { grid-area: mkt; }
  .feed-row { grid-template-columns: 44px minmax(0, 1fr); }
  .feed-res { grid-column: 2; font-size: 12.5px; }
  .card { padding: 16px; border-radius: 12px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .hl-card { padding: 18px 16px; }
  .headline { grid-template-columns: 1fr 1fr; }
  .tb-count { display: none; }
  .hero-h1 { gap: 10px; }
  .tally-head { grid-template-columns: 1fr 1fr; }
  .verdicts { grid-template-columns: 1fr; }
  .res-row { grid-template-columns: minmax(0, 1fr) 56px; }
  .res-row .pbar, .res-votes { display: none; }
  .cl-row { grid-template-columns: 1fr; gap: 4px; }
  .tally-mid { grid-column: 1 / -1; order: -1; text-align: left; }
  .map-card { padding: 14px 12px; }
  .map-box { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .map-box .tile-map { min-width: 540px; }
  .toolbar .seg { overflow-x: auto; max-width: 100%; }
  .search { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
