:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f3f2ee;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6f6d68;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --focus: #2a78d6;

  /* party scales, light -> dark: tilt / lean / likely / safe (same in both themes: darker = surer) */
  --d-1: #c4defa; --d-2: #81b9f3; --d-3: #0077cd; --d-4: #00477e;
  --r-1: #ffcdc5; --r-2: #ff9081; --r-3: #e61d16; --r-4: #950001;
  --i-1: #eccff3; --i-2: #d79ae6; --i-3: #a848bf; --i-4: #6f1682;
  --d-bar: #0077cd; --r-bar: #e61d16; --i-bar: #a848bf;
  --norace: #ecebe6;
  --d-ink: #0077cd; --r-ink: #e61d16; --i-ink: #a848bf;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  /* Scoreboard look (Miles, Nov 27, 2026): the site's own accent, and the expanded width for headlines */
  --accent: #a848bf;
  --wide: 125%;
  /* good to bad (scores, grades, error): Chord Desk green and red, the same green as the 2026 "Right or wrong" map (live.js GREEN) */
  --good: #12b941;
  --bad: #e61d16;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0e0e0d;
    --surface: #151514;
    --surface-2: #1e1e1c;
    --ink: #f4f3ef;
    --ink-2: #c9c7bf;
    --muted: #a8a69d;
    --grid: #2a2a27;
    --axis: #3a3a36;
    --border: #2a2a27;
    --focus: #3987e5;
    --norace: #262625;
    --d-ink: #0077cd; --r-ink: #e61d16; --i-ink: #a848bf;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0e0e0d;
  --surface: #151514;
  --surface-2: #1e1e1c;
  --ink: #f4f3ef;
  --ink-2: #c9c7bf;
  --muted: #a8a69d;
  --grid: #2a2a27;
  --axis: #3a3a36;
  --border: #2a2a27;
  --focus: #3987e5;
  --norace: #262625;
  --d-ink: #0077cd; --r-ink: #e61d16; --i-ink: #a848bf;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

/* brand typeface for headings and big numbers (SIL OFL, see fonts/) */
/* the variable cut with a width axis (62-125%), so headlines can use the expanded width (var(--wide)) */
@font-face { font-family: "Archivo"; src: url("fonts/archivo-wide.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-wide-italic.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap; }
:root { --display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* map shapes: the outline is for keyboard focus only (a tap must never leave one), and no grey tap flash */
#map [data-race], #hexmap .hex { -webkit-tap-highlight-color: transparent; }
#map [data-race]:focus:not(:focus-visible), #hexmap .hex:focus:not(:focus-visible) { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.site-header { border-bottom: 0; background: none; }
/* the page header: one definition for every forecast page (STANDARDS: Header). Kicker line (with the family switch, if any),
   the h1, "Updated …", then the section tabs as an underline row. Pages don't restyle it. */
.header-row { display: block; padding-top: 36px; padding-bottom: 0; }
.race-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 36px; margin: 0 0 16px; }   /* 36px: the height of .race-switch, so pages with and without a switch line up */
.race-crumbs > span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.race-switch { display: inline-flex; border: 1px solid var(--axis); }
.race-switch a { padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.race-switch a + a { border-left: 1px solid var(--axis); }
.race-switch a:hover { color: var(--ink); }
.race-switch a[aria-current="page"] { background: var(--ink); color: var(--page); }
.header-row h1 { font-size: clamp(30px, 5.2vw, 60px); line-height: 1; }
.header-row .sub { margin-top: 10px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding-top: 14px; }
.brandbar .logo { display: inline-flex; }
.brandbar .logo svg { height: 32px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
/* light/dark toggle (theme.js); the site opens in dark mode */
.theme-toggle { width: 36px; height: 36px; border-radius: 0; border: 1px solid var(--axis, var(--border)); background: none; color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="light"] .theme-toggle .i-sun, :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
.site-nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav a[aria-current] { color: var(--ink); font-weight: 600; }
h1 { margin: 0; font-family: var(--display); font-stretch: var(--wide); font-weight: 800; font-size: 44px; line-height: 1.02; letter-spacing: -0.02em; }
h2 { margin: 0; font-family: var(--display); font-stretch: var(--wide); font-weight: 800; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.sub { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; }
.top-nav { display: flex; flex-wrap: nowrap; gap: 0 28px; margin-top: 26px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--grid); font-size: 14px; }
.top-nav::-webkit-scrollbar { display: none; }
.top-nav a { flex: none; padding: 12px 0 11px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 600; color: var(--muted); white-space: nowrap; text-decoration: none; }
.top-nav a:hover { color: var(--ink); text-decoration: none; }
.top-nav a[aria-current], .top-nav a.on { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 720px) {
  .header-row { padding-top: 26px; }
  /* the tabs scroll sideways inside their row (never the page), with a faded right edge as the cue */
  .top-nav { gap: 0 22px; margin-top: 20px; margin-right: -16px; padding-right: 16px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}

/* hero */
.hero { padding: 24px 0 8px; }
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-stat { background: none; border: 0; border-top: 1px solid var(--grid); border-radius: 0; padding: 16px 0 0; }
.hero-label { font-size: 13px; color: var(--ink-2); }
.hero-num { font-family: var(--display); font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.hero-stat[data-party="D"] .hero-num { color: var(--d-ink); }
.hero-stat[data-party="R"] .hero-num { color: var(--r-ink); }
.hero-stat[data-party="I"] .hero-num { color: var(--i-ink); }
.hero-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.control-bar { display: flex; height: 14px; border-radius: 0; overflow: hidden; margin-top: 14px; gap: 2px; background: var(--surface); }
.control-bar span { display: block; height: 100%; transition: width .35s ease; }
.hero-foot { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }

/* controls */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 16px 0; margin: 24px 0; background: none; border: 0; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); border-radius: 0; }
/* a label sits 12px from its control (STANDARDS: Interaction) */
.control { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.control-label { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
/* a value that changes with its control keeps one width in every state, so clicking never moves anything (STANDARDS: Interaction).
   Pages set --val-w to fit the longest text the value can show. */
.control-val { display: inline-block; font-size: 13px; font-variant-numeric: tabular-nums; width: var(--val-w, 3.5em); white-space: nowrap; color: var(--ink); }
.info { width: 20px; height: 20px; border-radius: 0; border: 1px solid var(--axis); background: none; color: var(--ink-2); font-size: 11px; line-height: 1; cursor: help; padding: 0; }
.seg { display: inline-flex; border: 1px solid var(--axis); border-radius: 0; overflow: hidden; }
.seg button { border: 0; background: none; color: var(--ink-2); padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--axis); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--surface); }
.seg.small button { padding: 4px 10px; }
/* election night: the map's view switch, on its own row under the map's title so it never pushes the other tools */
.view-seg { margin: 0 0 10px; }
.view-seg[hidden] { display: none; }
.view-seg button { white-space: nowrap; }
.view-seg button:disabled { color: var(--muted); opacity: .5; cursor: not-allowed; }
@media (max-width: 560px) {
  /* four equal buttons across the card; a label may take two lines, but every button keeps the same height */
  .view-seg { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
  .view-seg button { white-space: normal; min-height: 42px; padding: 4px 6px; font-size: 12.5px; line-height: 1.2; }
}
input[type="range"] { width: 160px; accent-color: var(--ink); }
.reset { margin-left: auto; font: inherit; font-size: 13px; background: none; border: 1px solid var(--axis); color: var(--ink-2); border-radius: 0; padding: 6px 12px; cursor: pointer; }
.reset:hover { color: var(--ink); }

/* cards */
/* Scoreboard: a section is a hairline and a heading, not a box */
.card { background: none; border: 0; border-top: 1px solid var(--grid); border-radius: 0; padding: 28px 0 0; margin: 56px 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 26px; }
.card-sub { font-size: 13px; color: var(--ink-2); }
.card-intro { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; max-width: 80ch; line-height: 1.55; }
.hint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.check { font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }   /* a checkbox and its own text: 8px (a separate label and its control: 12px) */
select { font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 0; border: 1px solid var(--axis); background: var(--surface); color: var(--ink); max-width: 100%; }

/* map */
.map-wrap { width: 100%; }
#map { width: 100%; height: auto; display: block; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#map .state { stroke: var(--surface); stroke-width: calc(1px / var(--zk, 1)); cursor: default; transition: fill .3s; }
#map .state.race { cursor: pointer; }
#map .ring { fill: none; stroke: var(--ink); stroke-width: calc(2.5px / var(--zk, 1)); stroke-linejoin: round; pointer-events: none; }
#map .zl { font-size: calc(12px / var(--zk, 1)); }
/* map zoom buttons (Senate and House maps) */
.map-tools { display: flex; gap: 10px; align-items: center; }
.zoom-ctl { display: inline-flex; border: 1px solid var(--axis); border-radius: 0; overflow: hidden; }
.zoom-ctl button { border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; padding: 4px 10px; cursor: pointer; min-width: 30px; }
.zoom-ctl button + button { border-left: 1px solid var(--axis); }
.zoom-ctl button:hover { color: var(--ink); }
.zoom-ctl[hidden] { display: none; }
/* the tile grid fills its box more than the map does, so it is drawn smaller to look the same size */
#map.tiles { max-width: 80%; margin-inline: auto; }
#map .tile rect { stroke: var(--surface); stroke-width: 2; transition: fill .3s; }
#map .tile.race { cursor: pointer; }
#map .tile.race:hover rect, #map .tile.race.hl rect { stroke: var(--ink); }
#map text { transition: fill .3s; pointer-events: none; font-size: 12px; font-weight: 600; text-anchor: middle; dominant-baseline: central; }
#map .lbl-dark { fill: #0b0b0b; }
#map .lbl-light { fill: #ffffff; }
#map .lbl-muted { fill: var(--muted); font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; align-items: center; }
.legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 0; vertical-align: -2px; margin-right: 5px; }
.legend .grp { display: inline-flex; gap: 2px; align-items: center; margin-right: 4px; }
.legend .grp .sw { margin-right: 0; }
/* election night: the map's "vs. results" view */
.legend .acc-grp .sw { width: 18px; }
.legend .acc-sum { flex-basis: 100%; color: var(--ink); }
.tt-live .acc-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }

/* tooltip */
.tooltip { position: fixed; z-index: 30; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 0; padding: 12px 14px; width: 300px; max-width: calc(100vw - 24px); font-size: 13px; }
.tt-title { font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.tt-rating { font-weight: 600; font-size: 12px; }
.tt-cands { margin: 8px 0 6px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.tt-cands .pct { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.tt-bar { display: flex; height: 8px; border-radius: 0; overflow: hidden; gap: 2px; margin: 4px 0 8px; }
.tt-row { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-2); font-size: 12.5px; }
.tt-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-news { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--ink-2); font-size: 12px; }
.tt-foot { margin-top: 6px; color: var(--muted); font-size: 11.5px; }
/* a tapped tooltip stays open with a button for the detail panel */
.tooltip.pinned { pointer-events: auto; }
.tt-more { display: block; width: 100%; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--axis); border-radius: 0;
  background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.tt-more::after { content: " →"; }

/* tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--ink-2); white-space: nowrap; }
td { padding: 7px 8px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
/* a hovered row keeps room on both sides of its text (STANDARDS: hover highlights keep a margin) */
th:first-child, td:first-child { padding-left: 14px; }
th:last-child, td:last-child { padding-right: 14px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.race-table tbody tr { cursor: pointer; }
.race-table tbody tr:hover { background: var(--surface-2); }
.race-table td:first-child { font-weight: 600; white-space: nowrap; }
.matchup { white-space: nowrap; }
.matchup .vs { color: var(--muted); margin: 0 4px; }
.w-bar { min-width: 170px; }
.pbar { display: flex; height: 18px; border-radius: 0; overflow: hidden; gap: 2px; position: relative; min-width: 150px; }
.pbar span { display: flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 0 5px; white-space: nowrap; overflow: hidden; }
.pbar .l { justify-content: flex-start; }
.pbar .r { justify-content: flex-end; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 0; white-space: nowrap; border: 1px solid currentColor; }
.d-ink { color: var(--d-ink); } .r-ink { color: var(--r-ink); } .i-ink { color: var(--i-ink); } .t-ink { color: var(--ink-2); }
.latest-table tbody tr { cursor: pointer; }
.latest-table tbody tr:hover { background: var(--surface-2); }
.latest-table td { white-space: nowrap; }
.new-badge { font-size: 10.5px; font-weight: 700; color: var(--surface); background: var(--ink); border-radius: 0; padding: 1px 5px; margin-left: 6px; }
.m-lab { display: none; }   /* labels the phone layouts of the tables show in place of column headers */
.pollster-table th[data-k] { cursor: pointer; user-select: none; }
.pollster-table th[aria-sort="ascending"]::after { content: " ▲"; font-size: 9px; }
.pollster-table th[aria-sort="descending"]::after { content: " ▼"; font-size: 9px; }
.grade { font-weight: 700; }

/* charts */
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); }
.chart .tick-label { fill: var(--muted); font-size: 11px; }
.chart .annot { fill: var(--ink-2); font-size: 11.5px; }
.chart-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.chart-key i { display: inline-block; width: 10px; height: 10px; border-radius: 0; margin-right: 6px; vertical-align: -1px; }

/* dialog */
/* dvh = the height actually visible right now (phone browsers' address bars grow and shrink; vh ignores that) */
dialog { border: 1px solid var(--axis); padding: 0; border-radius: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.detail-inner { padding: 20px; position: relative; }
/* the close button stays pinned at the top of the panel while its content scrolls */
.close { position: sticky; top: 10px; float: right; margin: -10px -8px 0 8px; z-index: 3; width: 36px; height: 36px; border-radius: 0; border: 1px solid var(--axis); background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.d-head { padding-right: 40px; }
.d-head h2 { font-size: 26px; }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 14px; }
.d-box { border: 0; border-top: 1px solid var(--grid); border-radius: 0; padding: 14px 0 0; }
.d-box h3 { margin: 0 0 8px; font-size: 14px; }
/* detail panel: the projected margin, the panel's headline number */
.proj { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.proj-k { width: 100%; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.proj-v { font-family: var(--display); font-weight: 800; font-size: 48px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.proj-r { font-size: 12.5px; color: var(--muted); }
.steps { width: 100%; font-size: 13px; }
.steps td { padding: 5px 6px; }
.steps td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.steps tr.total td { border-top: 1px solid var(--axis); font-weight: 700; }
.steps .why { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; border: 1px solid var(--border); border-radius: 0; padding: 3px 8px; background: var(--surface-2); }
.chip b { font-weight: 600; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 6px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.news-list .src { color: var(--muted); font-size: 11.5px; display: block; }
.polls-table td, .polls-table th { padding: 5px 6px; font-size: 12.5px; }
.tag { font-size: 10.5px; color: var(--muted); border: 1px solid var(--axis); border-radius: 0; padding: 0 3px; margin-left: 4px; }
.wbar { display: inline-block; height: 8px; background: var(--ink-2); border-radius: 0; vertical-align: middle; margin-right: 6px; opacity: .7; }

.method { font-size: 14px; }
/* "How the model works" (the short version): the opening line at one line length, then the numbered steps flow into two
   balanced columns across the section, so the text fills the width instead of leaving the right half empty (Miles, Nov 28, 2026).
   Markup: <div class="method-short"><p class="ms-lead">…</p><div class="ms-steps"><p>…</p>…</div><p class="ms-foot">…</p></div> */
.method-short { font-size: 14px; color: var(--ink-2); }
.method-short .ms-lead { max-width: 68ch; margin: 0 0 18px; font-size: 15px; color: var(--ink); }
.method-short .ms-steps { columns: 2 340px; column-gap: 56px; }
.method-short .ms-steps > * { break-inside: avoid; margin: 0 0 14px; line-height: 1.55; }
.method-short .ms-steps > :first-child { margin-top: 0; }
.method-short .ms-foot { margin: 8px 0 0; }
.method-short b { color: var(--ink); }
/* .method-short.flow: for longer, uneven text (the 2027 summary, the archived pages' text sections). Everything, opening line
   included, flows through two columns that end level, and a paragraph may continue from the bottom of the left column to the top
   of the right (Miles, Nov 28, 2026: steps of very different lengths left one column far longer). The closing line spans both. */
.method-short.flow { columns: 2 340px; column-gap: 56px; }
.method-short.flow .ms-lead { max-width: none; font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }
.method-short.flow .ms-steps { columns: auto; }
.method-short.flow .ms-steps > *, .method-short.flow > p { break-inside: auto; orphans: 3; widows: 3; }
.method-short.flow .ms-foot { column-span: all; margin-top: 18px; }
.method h3 { font-size: 15px; margin: 18px 0 6px; }
.method p, .method li { color: var(--ink-2); max-width: 82ch; }
.method .stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.method .stat { border: 0; border-top: 1px solid var(--grid); border-radius: 0; padding: 10px 0 0; min-width: 140px; }
.method .stat .v { font-size: 20px; font-weight: 700; color: var(--ink); }
.method .stat .k { font-size: 12px; color: var(--muted); }

.site-footer { font-size: 13px; color: var(--muted); padding-top: 20px; padding-bottom: 40px; border-top: 1px solid var(--grid); margin-top: 56px; }

/* Scoreboard pieces, shared by every page (sb- so they can't clash with a page's own classes) */
.sb-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sb-num { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1; }
.sec-num { font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--accent); font-variant-numeric: tabular-nums; margin-right: 14px; }
/* split bar: blue on the left, red on the right, split at the chance; the tick marks 50% */
.sb-split { position: relative; display: flex; height: 6px; background: var(--r-bar); }
.sb-split > i { display: block; height: 100%; background: var(--d-bar); }
.sb-split::after { content: ""; position: absolute; left: 50%; top: -4px; width: 1px; height: 14px; background: var(--ink); }
/* range strip: the 80% range on an R-to-D axis, with the projected margin as a tick */
.sb-range { position: relative; height: 28px; }
.sb-range::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 2px; background: linear-gradient(90deg, var(--r-bar) 0 50%, var(--d-bar) 50% 100%); opacity: .35; }
.sb-range::after { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 28px; background: var(--axis); }
.sb-range > .band { position: absolute; top: 8px; height: 12px; opacity: .45; }
.sb-range > .tick { position: absolute; top: 3px; width: 3px; height: 22px; margin-left: -1px; background: var(--ink); z-index: 1; }

@media (max-width: 720px) {
  h1 { font-size: 30px; }
  h2 { font-size: 20px; }
  .card { margin: 40px 0; padding-top: 22px; }
  .card-head h2 { font-size: 22px; }
  #map.tiles { max-width: 100%; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .hero-num { font-size: 40px; }
  .hero-note { width: 100%; }
  .reset { margin-left: 0; }
  .d-grid { grid-template-columns: 1fr; }
  input[type="range"] { width: 130px; }
  /* the market-weight slider: label on its own line, then the slider across the card with its value */
  .control:has(input[type="range"]) { width: 100%; }
  .control:has(input[type="range"]) .control-label { flex-basis: 100%; }
  .control input[type="range"] { flex: 1; width: auto; min-width: 0; }
  .detail-inner { padding: 16px; }
  /* latest polls on a phone: three short lines per poll, no sideways scrolling
     1: race · result · adjusted margin (right)   2: pollster · raw margin (right)   3: dates · sample · added */
  .latest-table, .latest-table tbody { display: block; }
  .latest-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .latest-table tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 3px; padding: 10px 2px; border-bottom: 1px solid var(--grid); }
  .latest-table tbody tr::before, .latest-table tbody tr::after { content: ""; flex-basis: 100%; height: 0; }
  .latest-table tbody tr::before { order: 4; }
  .latest-table tbody tr::after { order: 7; }
  .latest-table td { display: block; padding: 0; border: 0; white-space: nowrap; text-align: left; }
  .latest-table td[colspan] { flex-basis: 100%; white-space: normal; }
  .latest-table .lp-race { order: 1; }
  .latest-table .lp-race .tag { display: none; }   /* 2026's specials are each their state's only race */
  .latest-table .lp-res { order: 2; }
  .latest-table .lp-adj { order: 3; margin-left: auto; font-weight: 700; font-size: 14.5px; }
  .latest-table .lp-adj .m-lab { font-weight: 400; }
  .latest-table .lp-poll, .latest-table .lp-dates, .latest-table .lp-n, .latest-table .lp-raw, .latest-table .lp-added { font-size: 12px; color: var(--muted); }
  .latest-table .lp-poll { order: 5; flex: 1 1 0; min-width: 0; white-space: normal; color: var(--ink-2); }
  .latest-table .lp-raw { order: 6; margin-left: auto; }
  .latest-table .lp-dates { order: 8; }
  .latest-table .lp-n { order: 9; }
  .latest-table .lp-added { order: 10; }
  .latest-table .lp-empty { display: none; }
  .latest-table .m-lab { display: inline; color: var(--muted); font-size: 12px; }
  .latest-table .lp-n::before, .latest-table .lp-added::before { content: "·"; margin-right: 10px; }

  /* races and pollsters on a phone: the same idea, three short lines each */
  .race-table, .race-table tbody, .pollster-table, .pollster-table tbody { display: block; }
  .race-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .race-table tbody tr, .pollster-table tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 5px; padding: 10px 2px; border-bottom: 1px solid var(--grid); }
  .race-table td, .pollster-table td { display: block; padding: 0; border: 0; white-space: nowrap; text-align: left; }
  .race-table td[colspan], .pollster-table td[colspan] { flex-basis: 100%; white-space: normal; }
  .race-table .m-lab, .pollster-table .m-lab { display: inline; color: var(--muted); font-size: 12px; }
  /* race: 1 state · matchup · rating (right)   2 chance bar   3 projected · polls · markets (· experts) */
  .race-table .rt-st { order: 1; font-weight: 600; }
  .race-table .rt-st .who { display: inline; margin-left: 6px; }
  .race-table .rt-st .tag { display: none; }   /* 2026's specials are each their state's only race */
  .race-table .rt-mu { order: 2; flex: 1 1 0; min-width: 0; white-space: normal; }
  .race-table .rt-mu > span { display: inline-block; }   /* the names have no spaces between them: let each wrap as a unit */
  .race-table .rt-rate { order: 3; margin-left: auto; }
  .race-table .rt-bar { order: 4; flex-basis: 100%; }
  .race-table .rt-bar .pbar { min-width: 0; }
  .race-table .rt-proj, .race-table .rt-poll, .race-table .rt-mkt, .race-table .rt-exp { font-size: 12.5px; color: var(--ink-2); }
  .race-table .rt-proj { order: 5; }
  .race-table .rt-poll { order: 6; }
  .race-table .rt-mkt { order: 7; }
  .race-table .rt-exp { order: 8; flex-basis: 100%; white-space: normal; }
  .race-table .rt-poll::before, .race-table .rt-mkt::before { content: "·"; margin-right: 8px; color: var(--muted); }
  .race-table .rt-proj, .race-table .rt-poll, .race-table .rt-mkt { margin-right: -2px; }
  /* pollster: 1 name · grade · weight (right)   2 polls rated · avg. error · vs field   3 past lean · 2026 lean · 2026 polls */
  .pollster-table tbody tr::before, .pollster-table tbody tr::after { content: ""; flex-basis: 100%; height: 0; }
  .pollster-table tbody tr::before { order: 4; }
  .pollster-table tbody tr::after { order: 8; }
  .pollster-table .pt-name { order: 1; flex: 1 1 0; min-width: 0; white-space: normal; font-weight: 600; }
  .pollster-table .pt-grade { order: 2; }
  .pollster-table .pt-w { order: 3; margin-left: auto; font-weight: 600; }
  .pollster-table .pt-n, .pollster-table .pt-err, .pollster-table .pt-pm, .pollster-table .pt-hh, .pollster-table .pt-h26, .pollster-table .pt-n26 { font-size: 12.5px; color: var(--ink-2); }
  .pollster-table .pt-n { order: 5; } .pollster-table .pt-err { order: 6; } .pollster-table .pt-pm { order: 7; }
  .pollster-table .pt-hh { order: 9; } .pollster-table .pt-h26 { order: 10; } .pollster-table .pt-n26 { order: 11; }
  .pollster-table .pt-n26 { margin-left: -6px; }   /* "(17 polls)" sits right after the 2026 lean */
  .pollster-table .pt-err::before, .pollster-table .pt-pm::before, .pollster-table .pt-h26::before { content: "·"; margin-right: 10px; color: var(--muted); }
  /* the column headers stay as a row of sort buttons */
  .pollster-table thead { display: block; }
  .pollster-table thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--axis); }
  .pollster-table thead tr::before { content: "Sort by"; font-size: 12px; color: var(--muted); margin-right: 2px; }
  .pollster-table th { display: block; border: 1px solid var(--axis); border-radius: 0; padding: 4px 10px; font-size: 12px; }
  .pollster-table th[aria-sort] { background: var(--surface-2); color: var(--ink); }
}
@media (max-width: 720px) {
  /* a race's polls (and House fundraising) in the detail panel, phone layout
     polls   1: pollster · grade · adjusted margin (right)   2: end date · sample · result (raw margin) · weight (right)
     money   1: candidate · through (right)                   2: raised · cash on hand · self-funded */
  .polls-table, .polls-table tbody { display: block; }
  .polls-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .polls-table tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 7px; row-gap: 3px; padding: 9px 2px; border-bottom: 1px solid var(--grid); }
  .polls-table tbody tr::before { content: ""; flex-basis: 100%; height: 0; order: 4; }
  .polls-table td { display: block; padding: 0; border: 0; white-space: nowrap; text-align: left; }
  .polls-table .m-lab { display: inline; color: var(--muted); font-size: 12px; font-weight: 400; }
  .polls-table .dp-poll { order: 1; flex: 1 1 0; min-width: 0; white-space: normal; font-weight: 600; }
  .polls-table .dp-grade { order: 2; font-size: 12.5px; }
  .polls-table .dp-adj { order: 3; margin-left: auto; font-weight: 700; font-size: 14px; }
  .polls-table .dp-end, .polls-table .dp-n, .polls-table .dp-res, .polls-table .dp-w { font-size: 12px; color: var(--muted); }
  .polls-table .dp-end { order: 5; } .polls-table .dp-n { order: 6; } .polls-table .dp-res { order: 7; } .polls-table .dp-w { order: 9; margin-left: auto; }
  .polls-table .dp-raw { order: 8; font-size: 12px; color: var(--muted); margin-left: -3px; }
  .polls-table .dp-raw::before { content: "("; } .polls-table .dp-raw::after { content: ")"; }
  .polls-table .dp-n::before, .polls-table .dp-res::before { content: "·"; margin-right: 7px; }
  .polls-table .wbar { max-width: 24px; margin-right: 4px; }
  .money-table .mt-name { order: 1; flex: 1 1 0; min-width: 0; white-space: normal; font-weight: 600; }
  .money-table .mt-thru { order: 2; margin-left: auto; font-size: 12px; color: var(--muted); }
  .money-table .mt-raised, .money-table .mt-cash, .money-table .mt-self { font-size: 13px; }
  .money-table .mt-raised { order: 5; } .money-table .mt-cash { order: 6; } .money-table .mt-self { order: 7; }
  .money-table .mt-none { display: none; }
  .money-table .mt-cash::before, .money-table .mt-self::before { content: "·"; margin-right: 7px; color: var(--muted); }
}

/* election night: a pulsing red dot while results are coming in (shared/web/live.js) */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e61d16; vertical-align: 1px; animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(230, 29, 22, .55); } 50% { opacity: .55; box-shadow: 0 0 0 5px rgba(230, 29, 22, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
/* the "Live results" strip under each forecast page's title, and results in tables, tooltips and the detail panel */
.live-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.live-bar b { color: #e61d16; }
/* election night: a slim bar above the map while the first batch of results loads */
.live-loading { margin: 0 0 10px; }
.live-loading[hidden] { display: none; }
.ll-track { position: relative; height: 3px; border-radius: 2px; background: var(--grid); overflow: hidden; }
.ll-track span { position: absolute; top: 0; left: -35%; width: 35%; height: 100%; border-radius: 2px; background: #e61d16; animation: ll-slide 1.3s ease-in-out infinite; }
@keyframes ll-slide { to { left: 100%; } }
.ll-text { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .ll-track span { animation: none; left: 0; width: 100%; opacity: .5; } }
.live-dot.is-waiting { background: none; border: 2px solid #e61d16; animation: none; box-sizing: border-box; }
.live-bar .live-src { color: var(--muted); }
.live-bar .live-src a { color: inherit; }
.live-bar .live-err { color: var(--r-ink); }
.live-res { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; white-space: nowrap; }
.live-res b { font-weight: 600; }
.live-box { margin-bottom: 16px; }
.live-box table { width: 100%; font-size: 14px; }
.live-box td { padding: 5px 6px; }
.live-box td.num { text-align: right; font-variant-numeric: tabular-nums; }
.live-box .won { font-weight: 700; }
.won-mark { color: var(--ink); font-weight: 800; }
.tt-live { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--grid); font-size: 12.5px; }
/* the hover card's vote count: candidate · votes · share, then the total and margin */
.tt-live-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.tt-live-head span { color: var(--ink-2); }
.tt-vote { display: grid; grid-template-columns: 1fr auto 3.4em; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.5; }
.tt-vote > b, .tt-vote > span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.tt-vote > span:last-child { color: var(--ink-2); font-size: 12.5px; }
/* the total row's margin ("D+12") in its party's color */
.tt-vote.tt-vtot > span:last-child { font-size: 13px; font-weight: 700; color: var(--ink); }
.tt-vtot { font-size: 12.5px; color: var(--muted); }
.tt-vote.tt-vtot b { font-weight: 600; }
/* results sit at the top of the hover card on election night; the chances get a label below them */
.tt-title + .tt-live { margin-top: 2px; }
.tt-sub { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--grid); font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Line breaks: headings and short text split into even lines; paragraphs avoid a lone last word (STANDARDS: line breaks) */
h1, h2, h3, h4, .kicker, .intro, .lede, .sub, .view-caption, figcaption, dt, th, button, .callout b { text-wrap: balance; }
p, li, dd, td, .note { text-wrap: pretty; }
.intro, .lede, .view-caption { text-wrap: balance; }
