/* Map-specific styles use Compute's canonical editorial tokens, in both themes. */
:root {
  --bg:var(--paper);--surface:var(--paper);--surface-2:var(--wash);
  --ink-2:var(--body);--muted:var(--gray);--line:var(--hair);--line-2:var(--faint);
  --display:var(--serif);--tech:var(--serif);--dem:var(--blue);--rep:var(--red);--ind:#318B83;
  --grn:var(--gold);--lib:var(--gold);--non:var(--gray);--live:var(--blue);--meas:var(--gold);
  --map-none:var(--wash);--map-line:var(--paper);--hover-line:var(--ink);
  --state-line:#767370;--nation-line:#1c1b1a;
  --shadow:0 8px 30px #1c1b1a12;
}
/* Dark theme: the same editorial roles on a warm near-black page. Party colors are lifted so they
   keep their contrast against it; the map's own palette is THEMES.dark in index.html. */
:root[data-theme="dark"] {
  color-scheme:dark;
  --ink:#f3f0e9;--body:#d9d5cc;--gray:#9c968c;--faint:#2a2825;--hair:#3a3733;
  --blue:#5b8ef2;--red:#e2654f;--gold:#d4aa3c;--paper:#141312;--wash:#1e1d1b;
  --ind:#3fae9f;--map-none:#2a2926;--state-line:#8f897f;--nation-line:#a39d93;
  --shadow:0 8px 30px #0000008c;
}
:root[data-theme="dark"] .yb-field button:hover{background:#fff}
:root[data-theme="dark"] .card{border-color:var(--hair)}
/* The sample ballot's black rules and header strips would invert to bright cream: soften them. */
:root[data-theme="dark"] .yb-contest{border-color:#4d4a45}
:root[data-theme="dark"] .yb-office{background:#2b2926;color:var(--ink)}
/* The theme switch sits with the header links and shows the theme it switches to. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:0 -10px 0 -4px;padding:0;border:0;background:none;color:var(--gray);cursor:pointer}
.theme-toggle:hover{color:var(--ink)}
.theme-toggle svg{display:block}
:root[data-theme="dark"] .theme-toggle .moon,:root:not([data-theme="dark"]) .theme-toggle .sun{display:none}
html,body{height:auto;overflow:auto}
body{font:400 1.06rem/1.62 var(--serif);color:var(--body)}
header.site{max-width:1600px;padding:8px 24px;border-bottom:1px solid var(--faint)}
.paper-head{max-width:1552px;margin:14px auto 18px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;text-align:left}
.paper-head h1{margin:0 0 6px;font-size:2.4rem}.paper-head .byline{justify-content:flex-start}
.paper-head .standfirst{margin-bottom:12px;color:var(--body)}
#app{height:auto;max-width:1600px;margin:0 auto;border-block:1px solid var(--hair);font:400 14px/1.5 var(--sans)}
.topbar{padding:10px 24px;gap:16px;background:var(--paper)}
.map-label{font:600 .68rem var(--serif);letter-spacing:.09em;text-transform:uppercase;display:flex;flex-direction:column;gap:6px}
.map-label .count{font:500 .68rem var(--tech);letter-spacing:0;color:var(--gray);text-transform:none}
.tabs{background:none;border:0;padding:0;gap:14px;border-radius:0}
.seg button{font-family:var(--serif);font-weight:500;border-radius:0}
.tabs button,.seg.small.sub button{padding:8px 0;font:500 16px/1.3 var(--serif);letter-spacing:-.005em;border:0;border-bottom:2px solid transparent;border-radius:0;background:none;color:var(--body);box-shadow:none}
.tabs button[aria-selected="true"],.seg.small.sub button.on{box-shadow:none;border-bottom-color:var(--ink);background:none}
.tab-short{display:none}
.live{font-size:10px;white-space:normal;max-width:145px;line-height:1.4}
.live.on i{animation:none;flex-shrink:0}
/* Keep map space independent of the House/Senate balance bar. */
#stage{padding:0;flex:none;min-height:0}
.map-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 24px;min-height:46px}
.sub,.tools{position:static;max-width:none;overflow:visible}
.sub{display:flex;flex-wrap:nowrap;gap:16px;background:none;border:0;padding:0;border-radius:0}
.tools{margin-left:auto;flex-shrink:0}
.tools .seg.small button,.btn{min-height:34px;padding:7px 11px;font:500 16px/1.3 var(--serif);box-shadow:none;border-radius:5px}
.tools .seg button.on{background:var(--ink);border-color:var(--ink);color:var(--paper);box-shadow:none}
.sub button:hover:not(.on){color:var(--ink);border-bottom-color:var(--hair)}
#exec-f{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.office-chevron{width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);flex:none}
#exec-f[aria-expanded="true"] .office-chevron{transform:translateY(1px) rotate(225deg)}
#exec-menu{position:fixed;inset:auto;margin:0;padding:5px;width:230px;max-width:calc(100vw - 16px);overflow-y:auto;border:1px solid var(--hair);border-radius:5px;background:var(--paper);color:var(--body);box-shadow:0 8px 24px #1c1b1a18}
#exec-menu button{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:38px;padding:8px 10px;text-align:left;font:500 16px/1.3 var(--serif);border:0;border-radius:2px;background:none;color:var(--body);box-shadow:none;cursor:pointer}
#exec-menu button:hover,#exec-menu button:focus-visible{outline:none;background:var(--wash);color:var(--ink)}
#exec-menu button[aria-checked="true"]{font-weight:700;background:var(--wash);color:var(--ink)}
.office-check{font:500 13px/1 var(--sans)}
.tools .seg{padding:2px;border-radius:7px;background:var(--wash)}
.tools .seg button{min-height:30px;padding:5px 10px}
.map-viewport{height:clamp(560px,calc(100vh - 290px),940px);overflow:auto;max-width:100%;overscroll-behavior-x:contain}
#map{height:100%;width:100%}
.legend{position:static;align-items:center;gap:8px;padding:12px 24px 20px;font:400 12px/1.5 var(--sans);letter-spacing:0}
.legend .keys{max-width:none;justify-content:center}
.map-hint{display:none}
.bop{padding:12px 24px 4px}.bop .side{font-family:var(--tech)}
.card{border-radius:4px;padding:18px;max-height:calc(100% - 24px)}
.card h2{font:600 1.3rem/1.2 var(--serif)}
.card .now,.ballot p{color:var(--body)}
.cand .p{font-family:var(--tech);font-weight:600}
.btn,.seg.small,.chip{border-radius:3px;box-shadow:none}
.legend .ramp{border-radius:0}.legend .keys i{border-radius:1px}
.source-notes{max-width:1080px;margin:24px auto 48px;padding:0 24px;font:400 .8rem/1.6 var(--sans);color:var(--gray)}
.source-notes summary{cursor:pointer;color:var(--ink);font-weight:500;min-height:30px}
.source-notes p{max-width:850px;margin:12px 0}.source-notes p:not(#source-status){color:var(--body)}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}

.election-countdown{text-align:right;flex-shrink:0;display:flex;flex-direction:column;gap:2px}
.count{font:600 1.9rem/1.2 var(--tech);color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.count small{font-size:.62em;font-weight:500;color:var(--gray)}
.election-date{font:400 .73rem var(--serif);color:var(--gray)}
#map [tabindex]:focus{outline:none}
#map [tabindex]:focus-visible{stroke:var(--ink)!important;stroke-width:3!important}
#map .noelec{opacity:1;fill:var(--map-none)!important;stroke:var(--hair);stroke-dasharray:3 2}
.legend .keys i{border:1px solid var(--hair)}
/* Serif headlines and prominent figures; sans-serif at reading and label sizes. */
header.site .brand,.source-notes summary{font-family:var(--serif)}
header.site nav a,.byline,.bop .side small,.election-date,
#map .lbl,#map .tlbl,#map .terr text,
.meas .p small,.ov .p small,.cs-t small,.lr small,.lr.muted{font-family:var(--sans)}
.card .now,.meas .b{font-family:var(--sans)}
#map .label-leader{stroke:var(--gray);stroke-width:.7;pointer-events:none}
#map .lbl{font-size:14px;font-weight:600;letter-spacing:0;stroke-width:2px}
#map .tlbl{font-weight:600;font-size:14px}
.source-notes{font-size:14px;line-height:1.65;color:var(--body)}
.source-notes summary{font-size:16px;min-height:44px;display:list-item;padding-block:10px}
.byline{font-size:14px;line-height:1.6}
.election-date{font-size:14px;line-height:1.5}
.card .subt,.cand .meta,.card .foot,.meas .m,.ov .s,.cs-t small,.cl em,.lk,.lkey,.leg .s,.leg .k{font-size:12px;line-height:1.5}
.card .now,.meas .b{font-size:13px;line-height:1.55}
.card .close{display:block;position:absolute;top:10px;right:10px;width:36px;height:36px;border:1px solid var(--hair);background:var(--wash);border-radius:50%;cursor:pointer}
.card .head{display:block;padding-right:36px}
.card .head .chips{justify-content:flex-start;margin-top:8px}
.card .keep-together{white-space:nowrap}
.card .market-credit{margin-top:6px;text-align:right;font:400 10px/1.4 var(--sans);color:var(--muted)}
.card .market-credit a{display:inline-block;padding:4px 0;text-decoration:none}
.card .market-credit a:hover{color:var(--ink)}
.card .market-credit a:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
@media(max-width:760px){
  header.site{padding:0 12px}
  header.site nav a{min-height:32px;font-size:11px}
  header.site .brand{font-size:11px}
  .paper-head{display:block;margin:9px auto 10px;padding:0 12px}
  .paper-head h1{font-size:clamp(1.45rem,6.5vw,1.8rem);line-height:1.12;margin-bottom:4px}
  .byline{font-size:12px;line-height:1.4}
  .election-countdown{margin-top:7px;text-align:left;flex-direction:row;align-items:baseline;flex-wrap:wrap;gap:4px}
  .count{font-size:15px;white-space:normal}
  .election-date{font-size:11px;line-height:1.3}
  .topbar{padding:0 12px 7px;gap:7px}
  .tabs{order:0;display:flex;flex-wrap:nowrap;width:100%;gap:12px;overflow-x:auto;scrollbar-width:none;justify-content:space-between}
  .tabs button,.seg.small.sub button{flex:none;font-size:14px;min-height:34px;padding:7px 0}
  .tab-full{display:none}.tab-short{display:inline}
  .bop{padding:13px 12px 3px;gap:8px}.bop .side{font-size:18px;min-width:36px}
  .bop .track{height:18px}.bop .sg{font-size:10px}.bop .sg.narrow{font-size:0}
  .map-controls{padding:5px 12px;gap:6px;flex-wrap:wrap;min-height:38px}
  .sub{width:100%;display:flex;gap:12px;overflow-x:auto;scrollbar-width:thin}
  .seg.small.sub button{width:auto;max-width:none;min-width:0;margin:0;min-height:34px;padding:7px 0;font:500 14px/1.3 var(--serif);border-radius:0;flex-shrink:0}
  .tools{margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
  .tools .seg button{min-height:28px;padding:5px 9px;font-size:14px}
  .map-viewport{height:350px}
  #map{touch-action:pan-y}
  .cartogram .map-viewport{height:540px}
  .cartogram #map{width:760px;min-width:760px;max-width:none;touch-action:auto}
  .cartogram .map-hint{display:block;margin:0;padding:8px 16px;font:400 12px/1.5 var(--sans);color:var(--gray)}
  .legend{padding:12px 16px 20px;font-size:12px}
  .legend .ramp,.legend .ends{width:min(280px,100%)}
  .legend .keys{max-width:100%;gap:8px 16px}
  .card{position:fixed;inset:auto 8px 8px!important;width:auto!important;max-width:none;max-height:65dvh;padding:20px;z-index:20;border-radius:12px;box-shadow:0 -8px 40px #1c1b1a26}
  .card h2{font-size:24px}.card .close{width:44px;height:44px;top:10px;right:10px}.card .head{padding-right:44px}
  .cand{grid-template-columns:40px minmax(0,1fr) auto;gap:12px;padding:10px 0}
  .cand .name,.compact .cand .name{font-size:15px}.cand .p{font-size:21px}
  .card .subt,.cand .meta,.card .foot,.meas .m,.ov .s,.cs-t small,.cl em,.lk,.lkey,.leg .s,.leg .k{font-size:13px}
  .card .pnums,.card .chip{font-size:12px}.card .now,.meas .b{font-size:14px}.meas .t,.ov .t,.leg .t,.cl{font-size:15px}
  .source-notes{padding:0 16px;margin:16px auto 36px}
}

@media(max-width:360px){.tabs{gap:6px}.tabs button,.seg.small.sub button,.tools .seg button{font-size:13px}}

/* Labels never intercept map taps. */
#map .geo-labels{pointer-events:none}
#map .geo-labels text{font:600 11px/1 var(--sans);text-anchor:middle;dominant-baseline:central;fill:var(--ink);stroke:var(--paper);stroke-width:3px;paint-order:stroke;stroke-linejoin:round}
#map .geo-labels line{stroke:var(--gray);stroke-width:.7;vector-effect:non-scaling-stroke}
#state-labels,.hide-called{white-space:nowrap;background:var(--paper);border:1px solid var(--hair);font:500 14px/1.3 var(--serif)}
#state-labels[aria-pressed="true"],.hide-called[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--paper)}
.hide-called[hidden],.pro-called-key[hidden]{display:none}
.pro-legend .hide-called{font-size:12px;padding:3px 9px}
@media(max-width:760px){#state-labels,.hide-called{font-size:13px;min-height:28px;padding:5px 8px}}

/* Rating filters describe themselves immediately, without outlining selected seats. */
.bop .sg{border:0;padding:0;font-family:var(--sans);overflow:visible}
.bop .sg:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.bop .bop-tooltip{position:absolute;bottom:calc(100% + 9px);left:50%;transform:translateX(-50%);width:max-content;max-width:240px;padding:5px 9px;border:1px solid var(--hair);border-radius:4px;background:var(--paper);color:var(--ink);font:500 12px/1.4 var(--sans);box-shadow:0 2px 8px #1c1b1a12;pointer-events:none;opacity:0;visibility:hidden;z-index:5}
.bop .sg:hover,.bop .sg:focus-visible{z-index:5}
.bop .sg:hover .bop-tooltip,.bop .sg:focus-visible .bop-tooltip{opacity:1;visibility:visible}
.bop-summary{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 14px;width:fit-content;max-width:calc(100% - 24px);margin:6px auto 4px;padding:6px 8px 6px 7px;border:1px solid var(--hair);border-radius:10px;background:var(--paper);font:400 12px/1.3 var(--sans);color:var(--body);font-variant-numeric:tabular-nums}
.bop-summary[hidden]{display:none}
.bs-odds{--accent:var(--muted);display:inline-flex;align-items:center;gap:6px;color:var(--accent);text-decoration:none;border-radius:6px}
.bs-odds.d{--accent:var(--dem)}.bs-odds.r{--accent:var(--rep)}
a.bs-odds:hover b{text-decoration:underline;text-underline-offset:3px}
a.bs-odds:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.bs-party{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:5px;background:var(--accent);color:var(--paper);font:700 11px/1 var(--serif)}
.bs-odds b{font:700 20px/1 var(--serif);letter-spacing:-.01em}
.bs-odds small{font:500 12px/1.2 var(--sans);color:var(--muted)}
.bs-seats{display:inline-flex;align-items:center;gap:8px;padding-left:14px;border-left:1px solid var(--hair)}
.bs-now{display:inline-flex;align-items:baseline;gap:3px;white-space:nowrap;color:var(--muted)}
.bs-now small{margin-right:4px;font:600 10px/1 var(--sans);letter-spacing:.08em;text-transform:uppercase}
.bs-now b{font:700 15px/1 var(--serif);margin-left:1px}.bs-now b.d{color:var(--dem)}.bs-now b.r{color:var(--rep)}
.bs-dot{margin:0 3px}
.bs-now em{margin-left:6px;font-style:normal;font-size:11px}
.bs-arrow{color:var(--muted);font-size:14px}
.bs-delta{--accent:var(--ind);padding:3px 8px;border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);border-radius:999px;background:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--accent);font:700 12px/1.2 var(--sans);white-space:nowrap;cursor:pointer;transition:background .15s,color .15s}
.bs-delta.d{--accent:var(--dem)}.bs-delta.r{--accent:var(--rep)}
.bs-delta+.bs-delta{margin-left:-2px}
.bs-delta:not([disabled]):hover{background:color-mix(in srgb,var(--accent) 18%,transparent)}
.bs-delta[aria-pressed="true"],.bs-delta[aria-pressed="true"]:hover{background:var(--accent);border-color:var(--accent);color:var(--paper)}
.bs-delta[disabled]{cursor:default;opacity:.75}
.bs-delta:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* Change pills explain themselves in a small card below, on hover or keyboard focus. */
.bs-delta{position:relative}
.bs-tip{position:absolute;top:calc(100% + 10px);left:50%;z-index:30;display:grid;gap:7px;width:max-content;min-width:180px;max-width:240px;padding:10px 12px 9px;border:1px solid var(--hair);border-radius:9px;background:var(--paper);box-shadow:0 8px 28px #1c1b1a24,0 1px 3px #1c1b1a14;color:var(--body);font:400 12px/1.4 var(--sans);text-align:left;white-space:normal;opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,-4px);transition:opacity .14s ease,transform .14s ease,visibility .14s}
.bs-tip::before{content:"";position:absolute;top:-6px;left:50%;width:10px;height:10px;border-left:1px solid var(--hair);border-top:1px solid var(--hair);background:var(--paper);transform:translateX(-50%) rotate(45deg)}
.bs-tip-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding-bottom:6px;border-bottom:1px solid var(--faint)}
.bs-tip-head b{font:700 14px/1.2 var(--serif);color:var(--accent)}
.bs-tip-head b:last-child{font-size:17px;font-variant-numeric:tabular-nums}
.bs-tip-stats{display:flex;gap:14px}
.bs-tip-stats span{display:grid;gap:1px;font-size:10.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.bs-tip-stats strong{font:600 15px/1.15 var(--sans);letter-spacing:0;text-transform:none;color:var(--ink);font-variant-numeric:tabular-nums}
.bs-tip small{font-size:11px;line-height:1.35;color:var(--muted)}
.bs-delta[aria-pressed="true"] .bs-tip-off,.bs-delta:not([aria-pressed="true"]) .bs-tip-on{display:none}
@media(hover:hover){.bs-delta:hover .bs-tip{opacity:1;visibility:visible;transform:translate(-50%,0)}}
.bs-delta:focus-visible .bs-tip{opacity:1;visibility:visible;transform:translate(-50%,0)}
@media(max-width:760px){.bop-summary{gap:6px 10px;padding:7px 10px}.bs-odds b{font-size:18px}.bs-seats{padding-left:0;border-left:0;gap:6px}.bs-now b{font-size:14px}}
/* Pinned seats: a dark outline drawn above neighbors, so small and gray (toss-up) seats stand out. */
#map .district.hit,#map .state.hit{stroke:var(--ink);stroke-width:2.2px;stroke-linejoin:round}
#map .hex.hit,#map .tile.hit{stroke:var(--ink);stroke-width:2.6px}
#map .zoom-surface{fill:transparent;stroke:transparent;stroke-width:24px;vector-effect:non-scaling-stroke;pointer-events:all}

/* One navigation link opens the complete source notes. */
header.site nav{display:flex;align-items:center;gap:20px}
dialog.source-notes{box-sizing:border-box;width:min(760px,calc(100vw - 32px));max-width:none;max-height:80dvh;margin:auto;padding:0 24px 20px;overflow-y:auto;border:1px solid var(--hair);border-radius:8px;background:var(--paper);color:var(--body);box-shadow:0 12px 48px #1c1b1a22;font:400 14px/1.65 var(--sans)}
dialog.source-notes::backdrop{background:#1c1b1a44}
.sources-heading{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 0 12px;background:var(--paper);border-bottom:1px solid var(--hair)}
.sources-heading h2{margin:0;font:600 22px/1.2 var(--serif);color:var(--ink)}
.sources-heading .btn{flex:none;width:36px;height:36px;padding:0}
@media(max-width:720px){header.site nav{gap:14px}dialog.source-notes{padding:0 16px 16px;max-height:85dvh}.sources-heading h2{font-size:19px}}

.odds-sources{display:flex;align-items:center;gap:10px;padding:6px 24px;font:400 12px/1.4 var(--sans);color:var(--muted)}
#odds-source{display:flex;gap:3px;padding:2px;background:var(--wash);border:1px solid var(--hair);border-radius:5px}
#odds-source button{border:0;background:none;color:var(--body);padding:5px 10px;border-radius:3px;font:500 14px/1.2 var(--serif);cursor:pointer}
#odds-source button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
#odds-source button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
#odds-coverage{margin-left:auto}
@media(max-width:720px){.odds-sources{padding:5px 12px;gap:6px;flex-wrap:wrap;font-size:10px}#odds-source button{font-size:13px;padding:5px 8px}#odds-coverage{flex:1 0 auto;text-align:right}}

/* ---------- Your ballot ---------- */
.yb-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.yb-entry{flex:0 1 440px;margin-left:auto;display:flex;flex-direction:column;gap:6px;min-width:0}
.yb-entry>label{font:600 12px/1.2 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--ink)}
.yb-search{position:relative;min-width:0}
.yb-field{display:flex;min-width:0;border:1.5px solid var(--ink);border-radius:6px;background:var(--paper);overflow:hidden;-webkit-tap-highlight-color:transparent}
/* Focus shows as a heavier ink edge, not a blue box. */
.yb-field:focus-within{outline:none;box-shadow:0 0 0 1px var(--ink)}
.yb-field input{flex:1;min-width:0;border:0;padding:10px 12px;font:400 16px/1.3 var(--sans);color:var(--ink);background:transparent;-webkit-tap-highlight-color:transparent}
.yb-field input:focus,.yb-field input:focus-visible{outline:none}
.yb-field input::placeholder{color:var(--gray)}
.yb-field button{flex:none;border:0;border-radius:0;background:var(--ink);color:var(--paper);padding:0 16px;min-height:44px;font:600 16px/1 var(--serif);cursor:pointer;white-space:nowrap}
.yb-field button:hover{background:#000}
.yb-field button:focus-visible{outline:2px solid var(--paper);outline-offset:-5px}
.yb-suggest{position:absolute;z-index:30;left:0;right:0;top:calc(100% + 4px);margin:0;padding:4px;list-style:none;background:var(--paper);border:1px solid var(--hair);border-radius:6px;box-shadow:0 10px 30px #1c1b1a1f;max-height:280px;overflow:auto}
.yb-suggest li{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:9px 10px;border-radius:4px;font:400 14px/1.35 var(--sans);color:var(--ink);cursor:pointer}
.yb-suggest li small{flex:none;font-size:11px;color:var(--gray)}
.yb-suggest li:hover,.yb-suggest li[aria-selected="true"]{background:var(--wash)}
.yb-saved{align-self:flex-start;border:0;background:none;padding:4px 0;font:500 14px/1.4 var(--sans);color:var(--blue);cursor:pointer;text-align:left}
.yb-saved:hover{text-decoration:underline;text-underline-offset:3px}
.election-countdown{margin-left:24px}
/* On the ballot tab the sidebar has the search; the header copy would repeat it. */
.on-ballot .yb-entry{display:none}
.tabs .tab-ballot::before{content:"";display:inline-block;width:9px;height:11px;margin-right:7px;border:1.5px solid currentColor;border-radius:1px;vertical-align:-1px;background:linear-gradient(currentColor,currentColor) 50% 35%/5px 1.5px no-repeat,linear-gradient(currentColor,currentColor) 50% 70%/5px 1.5px no-repeat}

/* The ballot view: a sticky sidebar beside the ballot itself. */
.yb{display:grid;grid-template-columns:minmax(260px,330px) minmax(0,760px);justify-content:center;gap:24px 40px;padding:22px 24px 56px;background:var(--wash);border-top:1px solid var(--faint);font:400 14px/1.5 var(--sans);color:var(--body)}
.yb[hidden]{display:none}
.yb-side{position:sticky;top:12px;align-self:start;min-width:0}
.yb-kicker{margin:0;font:600 11px/1.3 var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--gray)}
.yb-side h2{margin:4px 0 14px;max-width:none;font:600 28px/1.15 var(--serif);color:var(--ink)}
.yb-locate{margin-top:8px;border:0;background:none;padding:6px 0;font:600 13px/1.3 var(--sans);color:var(--blue);cursor:pointer}
.yb-locate::before{content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border:2px solid currentColor;border-radius:50%;vertical-align:0}
.yb-locate:hover,.yb-link:hover,.yb-saved:hover{text-decoration:underline;text-underline-offset:3px}
.yb-status{margin:10px 0 0;font-size:14px;color:var(--body);overflow-wrap:anywhere}
.yb-status:empty{display:none}
.yb-status[data-kind=error]{padding:10px 12px;border-left:3px solid var(--red);background:var(--paper);color:var(--ink)}
.yb-status[data-kind=busy]::before{content:"";display:inline-block;width:10px;height:10px;margin-right:8px;border:2px solid var(--hair);border-top-color:var(--ink);border-radius:50%;animation:yb-spin .8s linear infinite;vertical-align:-1px}
@keyframes yb-spin{to{transform:rotate(360deg)}}
.yb.busy .yb-body{opacity:.45;transition:opacity .2s}
.yb-summary{margin-top:16px}
.yb-summary:empty{display:none}
.yb-addr,.yb-shared{margin:0;font:600 17px/1.3 var(--serif);color:var(--ink)}
.yb-addr:focus{outline:none}
.yb-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:10px}
.yb-share{border:1.5px solid var(--ink);border-radius:6px;background:var(--paper);padding:7px 14px;min-height:36px;font:600 15px/1 var(--serif);color:var(--ink);cursor:pointer}
.yb-share::before{content:"↗";margin-right:7px;font-family:var(--sans)}
.yb-share:hover{background:var(--ink);color:var(--paper)}
.yb-link{border:0;background:none;padding:6px 0;font:500 13px/1.3 var(--sans);color:var(--blue);cursor:pointer;text-align:left}
.yb-link.quiet{color:var(--gray)}
.yb-body{min-width:0}
.yb-empty{margin:0;padding:36px 28px;border:1.5px dashed var(--hair);background:var(--paper);font:400 17px/1.5 var(--serif);color:var(--ink)}
.yb-empty p{margin:0}
.yb-cond{margin:0 0 10px;padding:8px 10px;background:color-mix(in srgb,var(--gold) 9%,var(--paper));border-left:3px solid var(--gold);font-size:13px;line-height:1.5;color:var(--ink)}
.yb-inner .yb-cond{margin:8px 0 4px}
.yb-section{margin-top:22px}
.yb-section:first-of-type{margin-top:4px}
.yb-section h3{display:flex;align-items:center;gap:10px;margin:0 0 10px;font:600 12px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--ink)}
.yb-section h3::after{content:"";flex:1;height:1px;background:var(--ink)}

/* A full contest: a black office bar over a paper box, as on a printed ballot. */
.yb-contest{margin:0 0 12px;border:1.5px solid var(--ink);background:var(--paper);scroll-margin-top:24px}
.yb-contest:focus{outline:2px solid var(--ink);outline-offset:2px}
.yb-office{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0;padding:6px 12px;background:var(--ink);color:var(--paper);font:700 12px/1.35 var(--sans);letter-spacing:.08em;text-transform:uppercase}
.yb-vote{flex:none;max-width:55%;font-weight:500;letter-spacing:.02em;text-transform:none;text-align:right}
.yb-src{flex:none;font:500 11px/1 var(--sans);letter-spacing:.02em;text-transform:none;color:inherit;opacity:.75;text-decoration:none;padding:2px 0}
.yb-src:hover{opacity:1;text-decoration:underline;text-underline-offset:3px}
.yb-contest.compact .yb-src{color:var(--gray);opacity:1}
/* A seat not up this year: one quiet line. */
.yb-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;margin:0 0 8px;padding:7px 10px;border:1px dashed var(--hair);font-size:13px;color:var(--gray)}
.yb-line b{font:600 11px/1.4 var(--sans);letter-spacing:.08em;text-transform:uppercase;color:var(--ink)}
.yb-inner{padding:6px 12px 8px}
/* Minor contests (retention votes, boards, local races) are compact rows. */
.yb-contest.compact{margin-bottom:8px;border:1px solid var(--hair)}
.yb-contest.compact .yb-office{padding:6px 10px 0;background:none;color:var(--ink);font-size:11px}
.yb-contest.compact .yb-vote{color:var(--gray)}
.yb-contest.compact .yb-inner{padding:2px 10px 6px}
.yb-contest.compact .yb-nm{font-size:14px}
.yb-contest.compact .yb-p{font-size:15px}
.yb-contest.compact .yb-choice{padding:4px 0}
.yb-contest.compact .yb-track{height:6px}
.yb-contest.compact .yb-q{margin:4px 0 0;font-size:14px}
.yb-inc{margin:6px 0 2px;font-size:13px;line-height:1.45;font-style:italic;color:var(--gray)}
.yb-contest.compact .yb-inc{margin:2px 0 0;font-size:12px}
.yb-q{margin:8px 0 2px;font:600 16px/1.35 var(--serif);color:var(--ink)}
.yb-q a{text-decoration-color:var(--hair)}
.yb-note{margin:6px 0 4px;font-size:13px;line-height:1.5;color:var(--body)}
/* One choice: name and party, a bar on a 0-100% track, the figure at the tip. */
.yb-choice{display:grid;grid-template-columns:minmax(0,1fr) minmax(90px,36%) minmax(48px,auto);align-items:center;gap:6px 12px;padding:7px 0;border-top:1px solid var(--faint)}
.yb-choice.nobar{grid-template-columns:minmax(0,1fr) auto}
.yb-choices .yb-choice:first-child{border-top:0}
.yb-who{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-width:0}
.yb-nm{font:600 16px/1.3 var(--serif);color:var(--ink);overflow-wrap:anywhere}
.yb-nm a{text-decoration:none;border-bottom:1px solid var(--hair)}
.yb-contest .yb-choices:first-child .yb-choice:first-child,.yb-inner>.yb-choice:first-child{border-top:0}
.yb-nm a:hover{border-bottom-color:var(--ink)}
.yb-mt{display:inline-flex;flex-wrap:wrap;align-items:center;gap:2px 8px;font-size:12px;line-height:1.5;color:var(--gray)}
.yb-mt .pp{height:17px;min-width:17px;font-size:10px}
.yb-mt em{font-style:italic}
/* A measure's figure is its chance of passing, labeled under it as on the map card. */
.yb-p small{display:block;margin-top:3px;font:500 9px/1 var(--sans);letter-spacing:.07em;text-transform:uppercase;color:var(--gray);white-space:nowrap}
.yb-track{display:block;height:9px;background:var(--faint);border-radius:0 2px 2px 0;overflow:hidden}
.yb-track i{display:block;height:100%;min-width:3px;background:var(--pc);border-radius:0 4px 4px 0}
.yb-p{font:600 17px/1 var(--serif);color:var(--ink);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.yb-p.none{color:var(--gray);font-weight:400}
.yb-choices.party{margin-top:4px}
.yb-control{margin-top:8px;padding-top:6px;border-top:1px solid var(--faint)}
.yb-control-h{margin:2px 0 0;font:600 13px/1.4 var(--sans);color:var(--ink)}
.yb-fine{margin:24px 0 0;font-size:12px;line-height:1.6;color:var(--gray)}

/* The looked-up address on the map. */
#map .home{pointer-events:none}
#map .home-ring{fill:none;stroke:var(--ink);stroke-width:2;vector-effect:non-scaling-stroke}
#map .home-dot{fill:var(--ink);stroke:var(--paper);stroke-width:1.5;vector-effect:non-scaling-stroke}

@media(max-width:1100px){.paper-head{flex-wrap:wrap}.yb-entry{order:3;flex:1 1 100%;max-width:640px;margin:6px 0 0}}
@media(max-width:900px){.yb{grid-template-columns:minmax(0,1fr);padding:16px 14px 40px}.yb-side{position:static}}
@media(max-width:760px){
  .yb-entry{margin-top:10px}
  .election-countdown{margin-left:0}
  .yb-field input{padding:9px 10px}
  .yb-field button{padding:0 12px;font-size:15px}
  .yb-side h2{font-size:23px}
  .yb-office{padding:6px 10px}
  .yb-inner{padding:4px 10px 8px}
  .yb-choice{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"who p" "bar bar"}
  .yb-choice .yb-who{grid-area:who}.yb-choice .yb-p{grid-area:p}.yb-choice .yb-track{grid-area:bar}
  .yb-choice.nobar{grid-template-areas:none}
}
@media(prefers-reduced-motion:reduce){.yb-status[data-kind=busy]::before{animation:none}}

/* Countdown clock: fixed-width digit cells keep the serif figures from shifting each second. */
.count .cd{display:inline-block;width:.6em;text-align:center}
.count .cc{display:inline-block;width:.3em;text-align:center;position:relative;top:-.06em}

/* Price history in the race card: every priced candidate's line, range tabs, a quiet y-axis. */
.spark{margin:2px 0 8px}
.spark-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:2px}
.spark-legend{display:flex;flex-wrap:wrap;gap:2px 10px;min-width:0;font:500 11px/1.3 var(--sans);color:var(--gray)}
.spark-key{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.spark-key i{display:inline-block;width:12px;height:0;border-top:2px solid var(--pc)}
.spark-key i.dash{border-top-style:dashed}
.spark-tabs{display:flex;gap:1px;flex:none}
.spark-tabs button{border:0;background:none;padding:3px 6px;border-radius:3px;font:600 10.5px/1 var(--sans);letter-spacing:.02em;color:var(--gray);cursor:pointer}
.spark-tabs button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
.spark-tabs button:hover:not([aria-pressed="true"]){color:var(--ink)}
.spark-svg{display:block;width:100%;height:72px;overflow:visible}
.spark-line{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.spark-line.dash{stroke-dasharray:4 3}
.spark-grid{stroke:var(--faint);stroke-width:1}
.spark-tick{font:400 9px/1 var(--sans);fill:var(--gray);font-variant-numeric:tabular-nums}
.spark-x{stroke:var(--gray);stroke-width:1}
.spark-dot{stroke:var(--paper);stroke-width:2}
.spark-foot{font:400 11px/1.4 var(--sans);color:var(--gray);font-variant-numeric:tabular-nums;min-height:15px}
@media(max-width:760px){.spark-tabs button{padding:6px 7px;font-size:12px}}

/* ---------- Pro view: every map on one screen, for large monitors ---------- */
.tabs .tab-pro::before{content:"";display:inline-block;width:10px;height:10px;margin-right:7px;vertical-align:-1px;background:linear-gradient(currentColor,currentColor) 0 0/4px 4px no-repeat,linear-gradient(currentColor,currentColor) 6px 0/4px 4px no-repeat,linear-gradient(currentColor,currentColor) 0 6px/4px 4px no-repeat,linear-gradient(currentColor,currentColor) 6px 6px/4px 4px no-repeat}
@media(max-width:1099px){.tabs .tab-pro{display:none}}
.pro{position:relative;padding:12px 20px 14px;border-top:1px solid var(--faint)}
.pro[hidden]{display:none}
.pro-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.pro-panel{display:flex;flex-direction:column;min-width:0;max-width:none;margin:0;padding:10px 12px 6px;border:1px solid var(--hair);border-radius:6px;background:var(--paper)}
.pro-panel header{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
.pro-panel h3{margin:0;font:600 17px/1.2 var(--serif);color:var(--ink)}
.pro-sum{margin:0;font:400 12px/1.4 var(--sans);color:var(--gray);font-variant-numeric:tabular-nums}
.pro-sum .d{color:var(--dem);font-weight:600}.pro-sum .r{color:var(--rep);font-weight:600}
.pro-sum strong{color:var(--ink);font-weight:600}
.pro-bar{position:relative;display:flex;gap:2px;height:7px;margin:7px 0 2px}
.pro-bar i{display:block;height:100%;border-radius:1px;min-width:0}
.pro-bar b{position:absolute;top:-3px;bottom:-3px;width:2px;margin-left:-1px;background:var(--ink)}
.pro-map{display:block;width:100%;aspect-ratio:1.6/1;height:auto;max-height:calc((100vh - 290px) / 2);min-height:200px}
/* Pro view uses the whole monitor. */
.on-pro #app,.on-pro header.site,.on-pro .paper-head{max-width:none}
.pro-shape{stroke:var(--paper);stroke-width:.5;cursor:pointer;vector-effect:non-scaling-stroke}
.pro-shape.none{cursor:default}
.pro-shape.noelec{fill:var(--map-none)!important;stroke:var(--hair);stroke-dasharray:2 2}
.pro-shape.pro-hl{stroke:var(--ink);stroke-width:1.5}
.pro-mesh{fill:none;stroke:var(--paper);stroke-width:1.2;pointer-events:none;vector-effect:non-scaling-stroke}
.pro-legend{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 18px;margin-top:10px;font:400 12px/1.4 var(--sans);color:var(--gray)}
.pro-ramp{display:inline-block;width:180px;height:8px;border-radius:1px}
.pro-legend b{color:var(--ink);font-weight:600}
.pro-legend i{display:inline-block;width:11px;height:11px;margin-right:6px;vertical-align:-1px;border:1px solid var(--hair)}
.pro-legend i.unpriced{background:var(--map-none);background-image:repeating-linear-gradient(135deg,color-mix(in srgb,var(--muted) 55%,transparent) 0 2px,transparent 2px 5px)}
.pro-legend i.norace{background:var(--map-none);border:1px dashed var(--gray)}
@media(min-width:2200px){.pro-panel h3{font-size:20px}.pro-sum{font-size:13px}}

/* Measure odds as bars: a 0-100% track filled to the chance of passing (no 50% mark; it is a probability, not a vote share). */
.mbar{position:relative;display:block;height:8px;background:var(--faint);border-radius:0 2px 2px 0}
.mbar i{display:block;height:100%;min-width:2px;background:var(--ink);border-radius:0 4px 4px 0}
.meas .mbar{grid-column:1/-1;margin:2px 0 2px}
.meas .p.none{color:var(--gray);font-weight:400}
/* A multiple-choice measure: one row per option, its chance of the most votes and a bar. */
.meas .opts{grid-column:1/-1;display:grid;gap:6px;margin:4px 0 2px}
.meas .opt{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:2px 10px;font:400 13px/1.35 var(--sans);color:var(--ink)}
.meas .opt .op{font:600 14px/1 var(--serif);font-variant-numeric:tabular-nums}
.meas .opt .op.none{color:var(--gray);font-weight:400}
.meas .opt .mbar{grid-column:1/-1;height:6px}
.meas .opts-h small{margin:0}

/* Pro view: a main panel across the top, the rest in a row beneath (double-click a panel's edge). */
.pro-panel{cursor:default;user-select:none}
.pro-panel header .pro-reset{margin-left:auto;margin-right:8px;border:0;background:none;padding:2px 0;font:500 12px/1 var(--sans);color:var(--blue);cursor:pointer}
.pro-panel header .pro-reset:hover{text-decoration:underline;text-underline-offset:3px}
.pro-panel header .pro-reset+.pro-sum{margin-left:0}
.pro-map{cursor:grab}.pro-map:active{cursor:grabbing}
.pro-grid.focused{grid-template-columns:repeat(5,minmax(0,1fr))}
.pro-grid.focused .pro-panel.main{grid-column:1/-1;order:-1}
/* The main panel's map fills the screen below the tabs; the other panels sit beneath it. */
.pro-grid.focused .pro-panel.main .pro-map{aspect-ratio:auto;height:calc(100vh - 240px);max-height:none;min-height:440px}
.pro-grid.focused .pro-panel:not(.main){padding:8px 10px 4px}
.pro-grid.focused .pro-panel:not(.main) h3{font-size:14px}
.pro-grid.focused .pro-panel:not(.main) .pro-sum{display:none}
.pro-grid.focused .pro-panel:not(.main) .pro-map{max-height:calc((100vh - 290px) * .26)}

/* A headline odds figure links to its market: same color, a dotted rule, and an arrow on hover. */
.odds-link{color:inherit;text-decoration:none;border-bottom:1px dotted color-mix(in srgb,currentColor 45%,transparent);cursor:pointer}
.odds-link:hover{border-bottom-style:solid}
.odds-link::after{content:"↗";display:inline-block;margin-left:3px;font:500 .62em/1 var(--sans);opacity:0;vertical-align:.35em;transition:opacity .12s}
.odds-link:hover::after,.odds-link:focus-visible::after{opacity:.75}
.chip .odds-link,.odds-link .chip{border-bottom:0}

/* Odds or live results: two sets of tabs over the same maps. */
.mode-seg[hidden]{display:none}
.mode-seg{display:inline-flex;gap:2px;padding:2px;margin-right:16px;border:1px solid var(--hair);border-radius:7px;background:var(--wash);flex:none;align-self:center}
.mode-seg button{border:0;background:none;padding:5px 11px;border-radius:5px;font:500 14px/1.2 var(--sans);color:var(--body);cursor:pointer;white-space:nowrap}
.mode-seg button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
.live-dot{display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:#e0453a;vertical-align:1px}
.mode-seg button[aria-pressed="true"] .live-dot{animation:live-pulse 1.6s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){.mode-seg button[aria-pressed="true"] .live-dot{animation:none}}
@keyframes live-pulse{50%{opacity:.35}}
.mode-results .tabs .tab-ballot{display:none}
/* Results mode has no odds provider to choose; the coverage line stays. */
.mode-results #odds-source,.mode-results .odds-sources-label{display:none}
.mode-results .odds-sources{justify-content:flex-end}
.rc-call{margin-right:4px;color:var(--pc,var(--ink))}
.rc-called{font-weight:600;color:var(--ink)}
.rs-live{display:inline-block;margin-right:6px;padding:1px 6px;border-radius:3px;background:#e0453a;color:#fff;font:600 10px/1.5 var(--sans);letter-spacing:.06em;text-transform:uppercase;vertical-align:1px}
/* Results cards */
.rc-sub{margin:2px 0 10px;font:400 12px/1.4 var(--sans);color:var(--gray)}
.rc-rows{display:grid;gap:7px;margin-bottom:8px}
.rc-row{display:grid;grid-template-columns:minmax(0,1fr) auto 54px;align-items:baseline;gap:3px 10px;font:400 13px/1.35 var(--sans);color:var(--ink)}
.rc-row.lead .rc-n{font-weight:600}
.rc-v{font-variant-numeric:tabular-nums;color:var(--body)}
.rc-p{font:600 14px/1 var(--serif);text-align:right;font-variant-numeric:tabular-nums}
.rc-b{grid-column:1/-1;height:6px;background:var(--faint);border-radius:0 2px 2px 0}
.rc-b i{display:block;height:100%;min-width:2px;background:var(--pc);border-radius:0 3px 3px 0}
.rc-market{margin:6px 0 2px;font:400 12px/1.4 var(--sans);color:var(--gray)}
.rc-meas,.rc-off,.rc-leg{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:3px 12px;padding:8px 0;border-top:1px solid var(--faint);font:400 13px/1.35 var(--sans)}
.rc-meas .mbar{grid-column:1/-1}
.rc-mt{color:var(--ink)}.rc-mt .measure-label{display:block;font-size:11px;color:var(--gray)}
.rc-mp{font:600 14px/1.1 var(--serif);text-align:right;font-variant-numeric:tabular-nums}
.rc-mp small{display:block;margin-top:3px;font:400 10.5px/1.2 var(--sans);color:var(--gray)}
.rc-lk{grid-column:1/-1;color:var(--body)}.rc-lk .d{color:var(--dem)}.rc-lk .r{color:var(--rep)}

/* Kalshi calls: ✓ on decided races, ✓/✗ on measures that passed or failed. */
#map .calls text,.pro-map .calls text,#map .tcall{font-family:var(--sans);font-weight:800;text-anchor:middle;dominant-baseline:central;fill:#fff;stroke:rgba(18,18,18,.72);paint-order:stroke;stroke-linejoin:round;pointer-events:none}
#map .tcall{stroke-width:2.4px}
.key-call{font:800 12px/1 var(--sans);color:var(--ink);margin-right:4px}
.chip.call{font-weight:600}
.cand .won{color:var(--pc)}
.meas .p.pass{color:var(--ok,#2f7d4f)}
.meas .p.fail{color:var(--rep)}

/* Seats changing hands: stripes over the seat's color; the shapes below still take the pointer. */
#map .flips path,#map .tflip,.pro-map .flips path{fill:url(#flip-hatch);stroke:none;pointer-events:none}
.flip-key{background:var(--gray) repeating-linear-gradient(-45deg,var(--paper) 0 1.6px,transparent 1.6px 4px)!important}
.pro-flip-key[hidden]{display:none}
