/* K-Hits 106 — 2026 ND Election Results. Mobile-first, large type, high contrast. */
:root{
  --navy:#0b2545; --navy-2:#13315c; --yellow:#f6c419;
  --ink:#0f172a; --ink-2:#1f2937; --muted:#475569; --line:#d6dce4; --bg:#eef1f5; --card:#fff;
  --warn-bg:#fff7e0; --warn:#7a4f00; --err-bg:#fdecec; --err:#8b1a1a;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;scroll-padding-top:90px}
body{margin:0;font:18px/1.5 var(--font);color:var(--ink);background:var(--bg)}
a{color:#1d4ed8}
.wrap{max-width:1240px;margin:0 auto;padding:0 14px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:-999px;top:0;background:#fff;padding:8px;z-index:20}
.skip:focus{left:8px}
:focus-visible{outline:3px solid var(--navy);outline-offset:2px;box-shadow:0 0 0 6px #fff}
.muted{color:var(--muted)}
button,select,input{font:inherit}
button{background:var(--navy);color:#fff;border:0;border-radius:10px;padding:10px 16px;font-weight:700;cursor:pointer;min-height:48px}

button.ok{background:#047857}
.sw{display:inline-block;width:14px;height:14px;border-radius:3px;margin-right:6px;vertical-align:-2px;flex:none}

/* Masthead */
.masthead{background:var(--navy);color:#fff;padding:12px 0 12px;border-bottom:5px solid var(--yellow)}
.masthead-inner{display:flex;gap:14px;align-items:center}
.brand img{display:block;width:92px;height:auto}
.titles h1{margin:0;font-size:1.6rem;line-height:1.15}
.titles .date{margin:2px 0 0;font-size:1rem;opacity:.9}
.live{margin:10px 0 0;font-size:1rem;line-height:1.45;display:flex;gap:10px;align-items:flex-start}
.live .checked{opacity:.8;font-size:.9rem}
.dot{flex:none;width:12px;height:12px;border-radius:50%;background:#34d399;margin-top:7px;animation:pulse 2.4s infinite}
.dot.off{background:#f59e0b;animation:none}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(52,211,153,.55)}70%{box-shadow:0 0 0 9px rgba(52,211,153,0)}100%{box-shadow:0 0 0 0 rgba(52,211,153,0)}}
@media (prefers-reduced-motion:reduce){.dot{animation:none}*{transition:none!important;scroll-behavior:auto!important}}

/* Top bar (sticky): live status + search + share */
.topbar{position:sticky;top:0;z-index:20;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 2px 6px rgba(0,0,0,.06)}
.topbar-in{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding-top:8px;padding-bottom:8px}
.topbar-in .nav-ctx{grid-column:1/-1}
@media (max-width:760px){.topbar-in{grid-template-columns:1fr auto}.tsearch{grid-column:1/-1;grid-row:2}}
.live-pill{display:flex;align-items:center;gap:10px;border-radius:12px;padding:6px 12px;background:#ecfdf5;border:2px solid #a7f3d0;color:#064e3b;min-height:52px;transition:background .3s,border-color .3s}
.lp-text{display:flex;flex-direction:column;line-height:1.2}
.lp-text b{font-size:.98rem}
.lp-text small{font-size:.82rem;opacity:.85}
.lp-icon{flex:none;width:14px;height:14px;border-radius:50%;background:#10b981;box-shadow:0 0 0 0 rgba(16,185,129,.6);animation:pulse 2.4s infinite}
.live-pill.checking{background:#eff6ff;border-color:#bfdbfe;color:#1e3a8a}
.live-pill.checking .lp-icon{background:transparent;border:3px solid #93c5fd;border-top-color:#1d4ed8;animation:spin .8s linear infinite;box-shadow:none}
.live-pill.new{background:#16a34a;border-color:#15803d;color:#fff;animation:pop .6s ease}
.live-pill.new .lp-icon{background:#fff}
.live-pill.err{background:#fff7e0;border-color:#f3d27a;color:#7a4f00}
.live-pill.err .lp-icon{background:#f59e0b;animation:none}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes pop{0%{transform:scale(.96)}50%{transform:scale(1.03)}100%{transform:scale(1)}}
.tsearch{position:relative}
.tsearch input{width:100%;min-height:52px;padding:12px 14px 12px 42px;font-size:1.05rem;border:2px solid #94a3b8;border-radius:12px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center}
.tsearch input:focus{border-color:var(--navy)}
.q-res{position:absolute;left:0;right:0;top:calc(100% + 6px);background:#fff;border:2px solid var(--navy);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.18);overflow:hidden;z-index:30;max-height:70vh;overflow-y:auto}
.q-item{display:block;width:100%;text-align:left;background:#fff;color:var(--ink);border-radius:0;border-bottom:1px solid var(--line);padding:10px 14px;min-height:56px}
.q-item:hover,.q-item.act{background:#eef2ff}
.q-item b{display:block;font-size:1.02rem}
.q-item small{color:var(--muted);font-size:.88rem}
.q-none{margin:0;padding:12px 14px;font-size:.95rem;color:var(--muted)}
.share-btn{background:#fff;color:var(--navy);border:2px solid var(--navy)}
.share-btn:hover{background:#eef2ff}

/* Section links (not sticky) */
.jump{background:#fff;border-bottom:1px solid var(--line)}
.jump .wrap{display:flex;flex-wrap:wrap;gap:6px;padding-top:6px;padding-bottom:6px}
.jump a{padding:8px 12px;border-radius:10px;text-decoration:none;color:var(--navy);font-weight:700;font-size:1rem;min-height:44px;display:inline-flex;align-items:center;background:var(--bg)}
.jump a:hover{background:#dde3ea}

/* Cards that just changed */
article.race.just-updated{animation:updated 6s ease}
@keyframes updated{0%,40%{box-shadow:0 0 0 4px #22c55e;background:#f0fdf4}100%{box-shadow:0 1px 2px rgba(15,23,42,.04)}}

/* Banner */
.banner{max-width:1212px;margin:12px 14px 0;padding:12px 16px;border-radius:12px;font-size:1rem}
@media (min-width:1240px){.banner{margin:12px auto 0}}
.banner.warn{background:var(--warn-bg);color:var(--warn);border:2px solid #f3d27a}
.banner.err{background:var(--err-bg);color:var(--err);border:2px solid #f5b5b5}
.banner.info{background:#e0ecff;color:#0b3b75;border:2px solid #b9d5f7}

/* Bands: each section is its own full-width block */
.band{padding:26px 0 30px;border-top:6px solid var(--bg)}
.band-hq{padding-top:16px;border-top:0}
.band-ward,.band-region,.band-method{background:#fff}
.band-state,.band-all{background:#f6f8fb}
.band-ward{border-top:6px solid var(--yellow)}
.band-h{margin:0 0 16px}
.band-h h2{margin:0;font-size:1.75rem;line-height:1.2;color:var(--navy)}
.sub-h{font-size:1.25rem;margin:22px 0 8px;color:var(--navy)}
.band-h + .sub-h{margin-top:0}
.help{margin:0 0 12px;font-size:1rem;color:var(--ink-2)}
.loading{color:var(--muted)}
.panel{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px;min-width:0}
.panel-sub{margin:4px 0 12px;font-size:1rem;color:var(--muted)}
.big-btn{width:100%;max-width:560px;font-size:1.05rem;margin-top:14px}

/* How-much-is-counted status */
.status{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:16px}
@media (min-width:800px){.status{grid-template-columns:1fr 1fr}}
.st{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 16px}
.st-l{margin:0;font-weight:800;font-size:1.15rem;color:var(--navy)}
.st-m{margin:2px 0 8px;font-size:1.05rem}
.st-k{display:flex;flex-wrap:wrap;gap:4px 16px;margin:6px 0 0;font-size:.9rem;color:var(--muted)}
.st-e{margin:6px 0 0;font-size:.9rem;color:var(--muted)}
.prog{height:14px;border-radius:99px;background:#e2e8f0;overflow:hidden;display:flex}
.prog i{display:block;height:100%}
.prog .f,.sw.f{background:#1f5fbf}
.prog .p,.sw.p{background:repeating-linear-gradient(45deg,#7ea7e6 0 4px,#c9dcf7 4px 8px)}
.sw.n{background:#e2e8f0;box-shadow:inset 0 0 0 1px #cbd5e1}

/* HQ: races left, map right (desktop); races first, then map (phone) */
.hq{display:grid;grid-template-columns:1fr;gap:16px}
@media (min-width:1000px){.hq{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);align-items:start}.hq-map{position:sticky;top:90px;max-height:calc(100vh - 100px);overflow:auto}}
.board-head{outline:none}
.board-head h2{margin:0;font-size:1.6rem;color:var(--navy)}
.back-btn{display:block;width:100%;margin:0 0 12px;background:var(--yellow);color:var(--navy);font-size:1.05rem}
.back-btn:hover{background:#ffd84d}
.grp-h{font-size:1.15rem;margin:18px 0 8px;color:var(--navy)}
.grp-h span{font-weight:500;font-size:.95rem;color:var(--muted)}

/* Map */
.map-h{margin:0 0 10px;font-size:1.6rem;color:var(--navy)}
/* Race buttons for the map: wrapped grid, never a dropdown or a sideways strip */
.pick-l{margin:0 0 8px;font-weight:800;font-size:1rem;color:var(--navy)}
.race-btns{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:12px}
.rb{background:#fff;color:var(--navy);border:2px solid #b8c2cf;border-radius:12px;padding:10px 12px;font-size:.98rem;font-weight:700;text-align:left;line-height:1.25;min-height:52px}
.rb:hover{border-color:var(--navy);background:#f1f5ff}
.rb[aria-pressed="true"]{background:var(--navy);color:#fff;border-color:var(--navy)}
.rb[aria-pressed="true"]::before{content:"✓ "}
.rb.more{background:#f1f5f9;border-style:dashed;color:var(--ink-2)}

/* County finder */
.finder{margin-top:16px;border-top:2px solid var(--line);padding-top:14px}
.finder input{width:100%;min-height:52px;padding:12px 14px;font-size:1.05rem;border:2px solid #94a3b8;border-radius:12px}
.finder input:focus{border-color:var(--navy)}
.sug{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;align-items:center}
.sug-l{margin:0;width:100%;font-size:.92rem;color:var(--muted);font-weight:600}
.sug-b{background:#fff;color:var(--navy);border:2px solid #b8c2cf;border-radius:999px;padding:8px 14px;min-height:46px;font-size:.98rem}
.sug-b:hover{border-color:var(--navy);background:#f1f5ff}
.sug-b small{font-weight:500;color:var(--muted)}

/* "Viewing" context: map overlay, nav badge, breadcrumb */
.map-ctx{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;background:#f1f5f9;border:2px solid #cbd5e1;border-radius:12px;padding:8px 12px;font-size:1rem;margin:0 0 8px;min-height:52px}
.map-ctx.on{background:var(--yellow);border-color:var(--navy);color:var(--navy)}
.ctx-l{font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;opacity:.8}
.ctx-x{min-height:36px;padding:4px 10px;font-size:.9rem;border-radius:8px;background:var(--navy);color:#fff}
.nav-ctx{display:inline-flex;align-items:center;gap:8px;background:var(--yellow);color:var(--navy);border-radius:10px;padding:4px 6px 4px 12px;font-size:.98rem}
@media (max-width:520px){.nav-ctx{grid-column:1/-1;justify-content:space-between}}
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px}
.crumb-home{background:var(--yellow);color:var(--navy);min-height:48px;font-size:1.02rem}
.crumb-home:hover{background:#ffd84d}
.crumb-sep{font-size:1.4rem;color:var(--muted)}
.crumb-here{font-weight:800;font-size:1.05rem;color:var(--navy)}
#board-back-bottom{margin-top:16px}
.map-title{margin:4px 0 8px;font-weight:800;font-size:1.1rem}
.map-wrap{position:relative}
#nd-map{width:100%;height:auto;display:block;touch-action:manipulation}
#nd-map .under path{fill:#fff;stroke:#0f172a;stroke-width:6;stroke-linejoin:round}
#nd-map .fills path{stroke:#475569;stroke-width:1;stroke-linejoin:round;cursor:pointer;transition:fill .35s,opacity .2s}
#nd-map .fills path:hover{stroke:#0f172a;stroke-width:3}
#nd-map .labels text{text-anchor:middle;font-size:12.5px;font-weight:600;fill:#1f2937;pointer-events:none;paint-order:stroke;stroke:rgba(255,255,255,.9);stroke-width:3px;stroke-linejoin:round}
#nd-map .city{pointer-events:none}
#nd-map .city circle{fill:#fff;stroke:#0f172a;stroke-width:2.5}
#nd-map .city.home circle{fill:var(--yellow);stroke:#0f172a;stroke-width:3}
#nd-map .city text{font-size:16px;font-weight:800;fill:#0f172a;paint-order:stroke;stroke:#fff;stroke-width:4.5px;stroke-linejoin:round}
#nd-map .city.home text{font-size:21px}
@media (max-width:640px){#nd-map .labels{display:none}#nd-map .city text{font-size:26px;stroke-width:6px}#nd-map .city.home text{font-size:32px}}
.map-tip{position:absolute;z-index:4;background:#0f172a;color:#fff;font-size:.92rem;line-height:1.45;padding:9px 12px;border-radius:10px;pointer-events:none;box-shadow:0 4px 14px rgba(0,0,0,.25);white-space:nowrap}
.map-tip em{opacity:.75;font-size:.82rem}
.key{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:10px;font-size:.95rem;color:var(--ink-2);align-items:center}
.key .kc .sw{margin-right:2px}
.key .kc .sw + .sw{margin-right:6px}
.key .kn{color:var(--muted);font-size:.88rem;flex-basis:100%}
.map-hint{margin:10px 0 0;font-weight:700;font-size:1rem;color:var(--navy)}

/* Race cards */
.rows{display:grid;grid-template-columns:1fr;gap:12px}
.rows.grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,380px),1fr))}
article.race{background:var(--card);border:1px solid var(--line);border-radius:14px;min-width:0;box-shadow:0 1px 2px rgba(15,23,42,.04)}
article.race[open]{box-shadow:0 4px 18px rgba(15,23,42,.12);border-color:#94a3b8}
article.race > summary{list-style:none;cursor:pointer;padding:14px 16px}
article.race > summary::-webkit-details-marker{display:none}
.row-h{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.row-t{margin:0;font-weight:800;font-size:1.25rem;line-height:1.25;color:var(--navy)}
.scope{flex:none;font-size:.85rem;font-weight:700;color:#065f46;background:#d1fae5;padding:3px 8px;border-radius:6px}
.headline{margin:8px 0 2px;font-size:1.1rem;font-weight:800}
.unopposed{margin:8px 0 0;font-size:1.05rem}
.cands{list-style:none;margin:8px 0 0;padding:0}
.cand{padding:7px 0}
.cand-top{display:flex;justify-content:space-between;align-items:flex-end;gap:10px}
.cand-name{font-size:1.1rem;font-weight:600;line-height:1.3;min-width:0}
.cand.is-lead .cand-name{font-weight:800}
.cand-party{display:block;font-size:.9rem;font-weight:700;margin-left:20px}
.cand-num{text-align:right;flex:none;line-height:1.15}
.cand-num b{display:block;font-size:1.5rem;font-weight:800;font-variant-numeric:tabular-nums}
.cand-num small{font-size:.88rem;color:var(--muted);font-variant-numeric:tabular-nums}
.tag{display:inline-block;font-size:.8rem;font-weight:800;text-transform:uppercase;letter-spacing:.03em;padding:2px 7px;border-radius:5px;margin-left:8px;background:#e2e8f0;color:var(--ink);vertical-align:2px}
.tag.lead{background:var(--ink);color:#fff}
.tag.win{background:#065f46;color:#fff}
.bar{position:relative;height:12px;border-radius:99px;background:#e5e9ef;margin-top:5px;overflow:hidden}
.bar i{display:block;height:100%;border-radius:99px;transition:width .6s ease}
.bar .half{position:absolute;left:50%;top:0;bottom:0;width:2px;background:#0f172a;opacity:.6}
.cutoff{border-top:3px dashed #334155;margin:6px 0 4px;padding:0;text-align:right}
.cutoff span{display:inline-block;font-size:.85rem;font-weight:800;color:#334155;background:#fff;padding:0 0 0 8px;position:relative;top:-12px}
.row-f{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;justify-content:space-between;margin-top:8px;font-size:.95rem;color:var(--ink-2)}
.row-f .meta{font-weight:600}
.open-l{font-weight:800;color:#1d4ed8;white-space:nowrap}
.open-l::after{content:" ▾"}
details[open] .open-l{font-size:0}
details[open] .open-l::after{content:"Close ▴";font-size:.95rem}

/* Expanded detail */
.body{padding:0 16px 16px}
.detail{border-top:2px solid var(--line);padding-top:10px}
.small{font-size:.92rem;color:var(--muted);margin:8px 0 0}
.facts{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:12px 0 0;font-size:1rem}
.facts dt{font-weight:700;color:var(--muted)}
.facts dd{margin:0}
.note{font-size:.95rem;background:#f8fafc;border-left:4px solid var(--yellow);padding:8px 10px;margin:12px 0 0;border-radius:0 8px 8px 0}
.note.warn{background:var(--warn-bg);color:var(--warn)}
.est{margin-top:14px;border:2px dashed #94a3b8;border-radius:12px;padding:12px 14px;background:#fffdf5}
.est-h{margin:0;font-weight:800;font-size:1rem}
.est-h span{font-size:.85rem;font-weight:700;background:#fef3c7;color:#78350f;padding:2px 7px;border-radius:5px;margin-left:6px}
.est-t{margin:6px 0 0;font-size:1.05rem;font-weight:600}
.est-r{margin:6px 0 0;padding-left:20px;font-size:.95rem}
.est-n{margin:6px 0 0;font-size:.9rem;color:var(--muted)}
.actions{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin:14px 0 0;font-size:1rem}
button.ghost{background:#fff;color:var(--navy);border:2px solid var(--navy)}
button.ghost:hover{background:#eef2ff}

/* County buttons */
.county-chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.county-chips button{background:#fff;color:var(--navy);border:2px solid #94a3b8}
.county-chips button:hover{border-color:var(--navy);background:#eef2ff}

/* All races */
.filters{display:grid;grid-template-columns:1fr;gap:10px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:8px}
@media (min-width:800px){.filters{grid-template-columns:1fr auto;align-items:end}}
.filters span{display:block;font-weight:700;font-size:.9rem;margin-bottom:3px}
.filters input,.filters select{width:100%;min-height:48px;padding:10px 12px;border:2px solid #94a3b8;border-radius:10px;background:#fff;font-size:1rem}
details.group{background:#fff;border:1px solid var(--line);border-radius:14px;margin:10px 0}
details.group > summary{list-style:none;cursor:pointer;padding:16px;display:flex;justify-content:space-between;align-items:center;font-size:1.2rem;font-weight:800;color:var(--navy);min-height:56px}
details.group > summary::-webkit-details-marker{display:none}
details.group > summary small{font-size:.95rem;color:var(--muted);font-weight:600}
details.group > summary small::after{content:"  ▾"}
details.group[open] > summary small::after{content:"  ▴"}
details.group > .rows{padding:0 12px 14px}
.method{max-width:860px;font-size:1.02rem}
.method p{margin:0 0 12px}

/* Footer */
.site-foot{background:var(--navy);color:#e2e8f0;font-size:.95rem;padding:20px 0 30px}
.site-foot a{color:var(--yellow)}
.site-foot .copy{opacity:.8}

@media (min-width:700px){.titles h1{font-size:2rem}.brand img{width:118px}}
@media print{.jump,.filters,.share-btn,.race-btns,.finder{display:none}}
@media (max-width:600px){.row-h{flex-direction:column;gap:4px}.scope{align-self:flex-start}}

/* ===== Map v6: broadcast-style ===== */
.hq-map{padding:12px}
.map-bar{display:grid;grid-template-columns:52px 1fr 52px;gap:8px;align-items:stretch;margin-bottom:10px}
.mb-step{background:var(--navy);color:#fff;font-size:1.9rem;line-height:1;padding:0;border-radius:12px}
.mb-title{background:var(--navy);color:#fff;border-radius:12px;text-align:left;padding:8px 14px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;column-gap:10px;align-items:center}
.mb-title small{grid-column:1;font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:var(--yellow);font-weight:800}
.mb-title b{grid-column:1;font-size:1.15rem;line-height:1.2}
.mb-change{grid-column:2;grid-row:1/span 2;font-size:.85rem;font-weight:700;background:rgba(255,255,255,.15);padding:6px 10px;border-radius:8px;white-space:nowrap}
.mb-title:hover .mb-change{background:rgba(255,255,255,.28)}
.map-stage{position:relative}
.race-pop{position:absolute;inset:0 0 auto 0;z-index:6;background:#fff;border:2px solid var(--navy);border-radius:14px;box-shadow:0 14px 40px rgba(0,0,0,.25);padding:14px}
.pop-h{margin:0 0 10px;font-weight:800;color:var(--navy)}
.pop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:8px}
.rb{background:#fff;color:var(--navy);border:2px solid #b8c2cf;border-radius:12px;padding:10px 12px;font-size:.98rem;font-weight:700;text-align:left;line-height:1.25;min-height:52px}
.rb:hover{border-color:var(--navy);background:#f1f5ff}
.rb[aria-pressed="true"]{background:var(--navy);color:#fff;border-color:var(--navy)}
.rb[aria-pressed="true"]::before{content:"✓ "}
.rb.alt{border-style:dashed}
.map-ctx{position:absolute;left:10px;top:10px;z-index:4;display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;background:rgba(255,255,255,.94);border:2px solid #cbd5e1;border-radius:12px;padding:6px 10px;font-size:.95rem;max-width:calc(100% - 20px);margin:0;min-height:0}
.map-ctx.on{background:var(--yellow);border-color:var(--navy);color:var(--navy);box-shadow:0 4px 14px rgba(0,0,0,.18)}
.map-wrap{background:linear-gradient(#f8fafc,#eef2f7);border-radius:12px;overflow:hidden;border:1px solid var(--line)}
#nd-map{--z:1}
#nd-map path{vector-effect:non-scaling-stroke}
#nd-map .under path{fill:#fff;stroke:#0f172a;stroke-width:4;stroke-linejoin:round}
#nd-map .fills path{stroke:#5b6676;stroke-width:1;stroke-linejoin:round;cursor:pointer;transition:fill .35s}
#nd-map .fills path:hover{stroke:#0f172a;stroke-width:2.5}
#nd-map .labels text{font-size:calc(12.5px / var(--z))}
#nd-map .focus path{fill:none;pointer-events:none;stroke-linejoin:round}
#nd-map .focus .glow{stroke:var(--yellow);stroke-width:12;opacity:.55}
#nd-map .focus .pulse{stroke:var(--yellow);stroke-width:6;animation:countyPulse 1.6s ease-in-out infinite}
#nd-map .focus .edge{stroke:#0b2545;stroke-width:3.5}
@keyframes countyPulse{0%,100%{stroke-width:5;opacity:1}50%{stroke-width:16;opacity:.25}}
@media (prefers-reduced-motion:reduce){#nd-map .focus .pulse{animation:none}}
#nd-map .sel-label text{text-anchor:middle;font-size:calc(26px / var(--z));font-weight:900;letter-spacing:.06em;fill:#0b2545;paint-order:stroke;stroke:#fff;stroke-width:calc(7px / var(--z));stroke-linejoin:round;pointer-events:none}
#nd-map.has-sel .labels text{font-weight:700;fill:#334155}
@media (max-width:640px){#nd-map.has-sel .labels{display:block}#nd-map .labels text{font-size:calc(24px / var(--z))}#nd-map .sel-label text{font-size:calc(40px / var(--z))}}

/* Bold, boxed map key */
.key{display:block;margin-top:12px;border:2px solid #0f172a;border-radius:12px;padding:10px 14px;background:#fff}
.key-h{margin:0 0 8px;font-size:.8rem;font-weight:900;text-transform:uppercase;letter-spacing:.1em;color:var(--navy)}
.key-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px 16px}
.key-list li{display:flex;align-items:center;gap:10px;font-size:1.02rem;font-weight:700;color:var(--ink)}
.key-list small{font-weight:600;color:var(--muted)}
.kswatch{display:inline-flex;flex:none;border:2px solid #0f172a;border-radius:5px;overflow:hidden}
.kswatch i{display:block;width:22px;height:22px}
.key-note{margin:10px 0 0;font-size:.92rem;font-weight:600;color:var(--ink-2);display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.key-note .kswatch i{width:16px;height:16px}
.finder{margin-top:14px;border-top:0;padding-top:0}

/* Counting box (always shown in county view) */
.cbox{margin:12px 0 4px;border:2px solid #0b2545;border-radius:12px;padding:10px 14px;background:#f8fafc}
.cbox-h{margin:0 0 6px;font-size:.8rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:var(--navy)}
.cbox-nums{display:flex;flex-wrap:wrap;gap:4px 18px;font-size:1rem;margin-bottom:8px}
.cbox-nums b{font-size:1.2rem}
.st-k b{color:var(--ink)}
.ctx-n{font-size:.88rem;font-weight:700}
.sum{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 16px}
.sum-1{margin:0;font-size:1.25rem;line-height:1.35}
.sum-2{margin:6px 0 0;font-size:1.05rem}
.sum-more{margin-top:8px}
.sum-more > summary{cursor:pointer;font-weight:700;color:#1d4ed8;min-height:44px;display:flex;align-items:center}
.sum-bars{display:grid;gap:10px}
@media (min-width:800px){.sum-bars{grid-template-columns:1fr 1fr}}
.status{display:block}
.only{color:#065f46}
.county-only article.race{background:#f6fdf9}
.half-note{list-style:none;display:flex;align-items:center;gap:8px;font-size:.88rem;color:var(--muted);padding-top:4px}
.half-k{display:inline-block;width:2px;height:16px;background:#0f172a;opacity:.6}

/* ===== Race card v7 (results table) ===== */
article.race{border-radius:12px;overflow:hidden;border:1px solid #cfd6df}
article.race > summary{padding:0}
.rc-h{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;background:#f1f4f8;border-bottom:1px solid #dfe4ea}
.rc-h .row-t{font-size:1.12rem;margin:0;color:#0b2545;line-height:1.25}
.in{flex:none;font-size:.88rem;color:#334155;white-space:nowrap}
.in b{font-size:1.05rem;color:#0b2545}
.in.early{background:#e0ecff;color:#1e3a8a;padding:3px 8px;border-radius:6px;font-weight:700;font-size:.8rem}
.in.none{color:#64748b;font-size:.8rem;font-weight:700}
.headline{margin:0;padding:8px 14px 0;font-size:1rem;font-weight:700;color:#334155}
.res{list-style:none;margin:0;padding:4px 0}
.r{display:grid;grid-template-columns:1fr auto 5.2ch;grid-template-areas:"name votes pct" "bar bar bar";column-gap:12px;align-items:center;padding:8px 14px 8px 18px;position:relative;border-top:1px solid #eef1f5}
.r:first-child{border-top:0}
.r::before{content:"";position:absolute;left:0;top:6px;bottom:6px;width:6px;border-radius:0 4px 4px 0;background:var(--c)}
.r-name{grid-area:name;min-width:0;line-height:1.25}
.r-name b{font-size:1.05rem;font-weight:600}
.r.is-lead .r-name b{font-weight:800}
.r-name small{display:block;font-size:.82rem;color:#475569;font-weight:600}
.r-votes{grid-area:votes;font-size:.92rem;color:#475569;text-align:right}
.r-pct{grid-area:pct;font-size:1.35rem;font-weight:800;text-align:right;color:#0f172a}
.r.is-lead .r-pct{color:var(--c)}
.r-aw{grid-area:votes / votes / pct / pct;color:#94a3b8;text-align:right}
.r-bar{grid-area:bar;position:relative;height:8px;background:#e8ecf1;border-radius:99px;margin-top:6px;overflow:visible}
.r-bar i{display:block;height:100%;border-radius:99px;background:var(--c);transition:width .6s ease}
.r-bar .half{position:absolute;left:50%;top:-3px;bottom:-3px;width:2px;background:#0f172a;opacity:.7}
.r-bar .half[data-l]::after{content:attr(data-l);position:absolute;left:4px;top:-15px;font-size:.68rem;font-style:normal;font-weight:800;color:#334155}
.rtag{display:inline-block;margin-left:8px;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;padding:1px 6px;border-radius:5px;border:1.5px solid #64748b;color:#334155;vertical-align:2px;background:#fff}
.rtag.win{background:#065f46;border-color:#065f46;color:#fff}
.cut{list-style:none;border-top:2px dashed #334155;margin:2px 14px;padding:0;text-align:right}
.cut span{position:relative;top:-11px;background:#fff;padding-left:6px;font-size:.78rem;font-weight:800;color:#334155}
.rc-f{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 14px;border-top:1px solid #dfe4ea;font-size:.88rem;color:#334155;background:#fafbfc}
.rc-f .open-l{font-weight:800;color:#1d4ed8}
.rc-f .open-l::after{content:" ›"}
details[open] .rc-f .open-l{font-size:0}
details[open] .rc-f .open-l::after{content:"Close ˄";font-size:.88rem}
.unopposed{margin:0;padding:10px 14px;font-size:1rem}
.body{padding:12px 14px 14px;border-top:1px solid #dfe4ea}
.detail{border-top:0;padding-top:0}
.r-aw{font-weight:700}
/* compact "Viewing" badge on the map: bottom-left, one line */
.map-ctx{top:auto;bottom:10px;left:10px;padding:4px 6px 4px 10px;font-size:.88rem;gap:4px 8px}
.map-ctx .ctx-x{min-height:34px;font-size:.85rem;padding:2px 10px}
.map-ctx:not(.on){display:none}
@media (max-width:640px){.map-ctx .ctx-n{display:none}}

.live{display:block}
.map-ctx{flex-wrap:nowrap;white-space:nowrap;max-width:calc(100% - 20px);overflow:hidden}
.map-ctx .ctx-n{overflow:hidden;text-overflow:ellipsis}
@media (max-width:760px){.lp-text small{display:none}.live-pill{min-height:48px;padding:6px 10px}.lp-text b{font-size:.92rem}}

/* View tabs: Top / Statewide / Legislature / Measures */
.tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin:-4px -4px 14px;background:#e8ecf1;border-radius:12px;padding:4px}
.tabs button{background:transparent;color:#334155;border-radius:9px;min-height:48px;font-size:1rem;padding:8px 6px}
.tabs button:hover{background:#fff}
.tabs button[aria-selected="true"]{background:var(--navy);color:#fff;box-shadow:0 2px 6px rgba(11,37,69,.3)}
@media (max-width:520px){.tabs{grid-template-columns:1fr 1fr}}
.cbox-s{margin:0 0 8px;font-size:1.2rem;font-weight:800;color:var(--navy)}
.cbox-s small{font-size:.85rem;font-weight:600;color:var(--muted)}
.cbox.ph-done{border-color:#047857;background:#f0fdf4}
.cbox.ph-done .cbox-s{color:#065f46}
.cbox-d{display:grid;grid-template-columns:auto 1fr;gap:2px 12px;margin:8px 0 0;font-size:.98rem}
.cbox-d dt{font-weight:700;color:var(--muted)}
.cbox-d dd{margin:0;font-weight:600}
.in.done{background:#d1fae5;color:#065f46;padding:3px 8px;border-radius:6px;font-weight:800;font-size:.85rem}

/* ===== round 3 fixes ===== */
.tabs{grid-template-columns:repeat(5,1fr)}
@media (max-width:620px){.tabs{grid-template-columns:repeat(3,1fr)}.tabs button{font-size:.92rem}}
.all-link{margin:14px 0 0;font-weight:700}
.crumbs{font-size:1rem;color:var(--muted)}
.close-call{margin:0;padding:6px 14px 0;font-weight:800;color:#9a3412;font-size:.98rem}
/* selected county: others fade; hide the outline layer so internal borders don't thicken */
#nd-map.has-sel .fills path:not(.sel){opacity:.3}
#nd-map.has-sel .under path{stroke:transparent}
#nd-map.has-sel .labels text{opacity:.6}
#nd-map .focus .pulse{animation:countyPulse 1.4s ease-in-out 3}
.map-ctx{display:none!important}
.pop-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
.pop-top .pop-h{margin:0}
.pop-x{background:#fff;color:var(--navy);border:2px solid var(--navy);min-height:40px;padding:4px 12px;font-size:.9rem}
@media (max-width:620px){
  .map-bar{grid-template-columns:44px 1fr 44px}
  .mb-step{font-size:1.5rem}
  .mb-title{grid-template-columns:1fr;padding:6px 10px}
  .mb-title b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:1rem}
  .mb-change{grid-column:1;grid-row:auto;justify-self:start;margin-top:4px;padding:3px 8px}
  .lp-text small{display:block;font-size:.8rem}
}

.map-jump{display:block;width:100%;margin-top:10px;background:var(--yellow);color:var(--navy);font-size:1.05rem}
@media (prefers-reduced-motion:reduce){.lp-icon,.live-pill.checking .lp-icon,.live-pill.new{animation:none!important}article.race.just-updated{animation:none;box-shadow:0 0 0 4px #22c55e}}
@media (max-width:760px){.titles .date{display:none}.titles h1{font-size:1.35rem}.masthead{padding:8px 0}.live{margin-top:6px;font-size:.9rem}}

/* Facebook graphic */
.fb-btn{background:#1877f2;color:#fff}
.fb-btn:hover{background:#0f5fd0}
.share-modal{position:fixed;inset:0;z-index:50;background:rgba(15,23,42,.7);display:flex;align-items:flex-start;justify-content:center;overflow:auto;padding:20px 12px}
.share-modal[hidden]{display:none!important}
.sm-box{background:#fff;border-radius:16px;max-width:560px;width:100%;padding:16px;box-shadow:0 20px 60px rgba(0,0,0,.4)}
.sm-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.sm-top h2{margin:0;font-size:1.3rem;color:var(--navy)}
.sm-close{background:#fff;color:var(--navy);border:2px solid var(--navy)}
.sm-img{display:block;width:100%;height:auto;border-radius:10px;border:1px solid var(--line)}
.sm-actions{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.btn{display:inline-flex;align-items:center;justify-content:center;background:var(--navy);color:#fff;text-decoration:none;font-weight:700;border-radius:10px;padding:10px 16px;min-height:48px}
.sm-l{display:block;font-weight:700;margin-top:6px}
.sm-cap{width:100%;font:inherit;font-size:.95rem;border:2px solid #94a3b8;border-radius:10px;padding:10px;margin:6px 0}
.sm-note{font-size:.88rem;color:var(--muted);margin:8px 0 0}
@media (max-width:620px){.in-l{display:none}}

/* ===== v9: one model — maps live inside races ===== */
.band-hq{padding-top:14px}
.strip{margin-bottom:12px}
.strip-in{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 16px;display:grid;grid-template-columns:1fr;gap:6px 24px;align-items:center}
@media (min-width:900px){.strip-in{grid-template-columns:2fr 1fr}}
.strip-main{font-size:1.05rem}
.strip-main span{color:var(--muted)}
.strip-main .prog{margin-top:8px;height:10px}
.strip-home{font-size:1rem}
.tabs{grid-template-columns:repeat(6,1fr);margin:0 0 16px}
@media (max-width:760px){.tabs{grid-template-columns:repeat(3,1fr)}}
.board-head{margin-bottom:12px}
.board-head h2{font-size:1.7rem}
.back-btn{display:inline-flex;width:auto;margin:0 0 10px;padding:10px 18px}
#board-back-bottom{margin-top:18px}
/* open race card spans the full width on desktop: results left, map right */
.rows.grid > article.race[open]{grid-column:1/-1}
.detail.with-map{display:grid;grid-template-columns:1fr;gap:18px}
@media (min-width:1000px){.detail.with-map{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}}
.d-map-h{margin:0 0 8px;font-size:1.05rem;color:var(--navy)}
.m-wrap{position:relative;background:linear-gradient(#f8fafc,#eef2f7);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.ndmap{width:100%;height:auto;display:block;touch-action:manipulation;--z:1}
.ndmap path{vector-effect:non-scaling-stroke}
.ndmap .under path{fill:#fff;stroke:#0f172a;stroke-width:4;stroke-linejoin:round}
.ndmap .fills path{stroke:#5b6676;stroke-width:1;stroke-linejoin:round;cursor:pointer;transition:fill .35s}
.ndmap .fills path:hover{stroke:#0f172a;stroke-width:2.5}
.ndmap .labels text{text-anchor:middle;font-size:calc(12.5px / var(--z));font-weight:600;fill:#1f2937;pointer-events:none;paint-order:stroke;stroke:rgba(255,255,255,.9);stroke-width:3px;stroke-linejoin:round}
.ndmap .city{pointer-events:none}
.ndmap .city circle{fill:#fff;stroke:#0f172a;stroke-width:2.5}
.ndmap .city.home circle{fill:var(--yellow);stroke:#0f172a;stroke-width:3}
.ndmap .city text{font-size:16px;font-weight:800;fill:#0f172a;paint-order:stroke;stroke:#fff;stroke-width:4.5px;stroke-linejoin:round}
.ndmap .city.home text{font-size:21px}
.ndmap.has-sel .fills path:not(.sel){opacity:.3}
.ndmap.has-sel .under path{stroke:transparent}
.ndmap.has-sel .labels text{opacity:.6}
.ndmap .focus path{fill:none;pointer-events:none;stroke-linejoin:round}
.ndmap .focus .glow{stroke:var(--yellow);stroke-width:12;opacity:.55}
.ndmap .focus .pulse{stroke:var(--yellow);stroke-width:6;animation:countyPulse 1.4s ease-in-out 3}
.ndmap .focus .edge{stroke:#0b2545;stroke-width:3.5}
.ndmap .sel-label text{text-anchor:middle;font-size:calc(26px / var(--z));font-weight:900;letter-spacing:.06em;fill:#0b2545;paint-order:stroke;stroke:#fff;stroke-width:calc(7px / var(--z));stroke-linejoin:round;pointer-events:none}
@media (max-width:640px){.ndmap .labels{display:none}.ndmap.has-sel .labels{display:block}.ndmap .labels text{font-size:calc(24px / var(--z))}.ndmap .city text{font-size:26px;stroke-width:6px}.ndmap .city.home text{font-size:32px}.ndmap .sel-label text{font-size:calc(40px / var(--z))}}
@media (prefers-reduced-motion:reduce){.ndmap .focus .pulse{animation:none}}
.m-reset{position:absolute;right:8px;top:8px;min-height:40px;padding:6px 12px;font-size:.9rem;background:#fff;color:var(--navy);border:2px solid var(--navy)}
.m-read{margin-top:10px}
.m-hint{margin:0;font-weight:700;color:var(--navy)}
.m-county{border:2px solid var(--yellow);border-radius:12px;overflow:hidden;background:#fffdf3}
.m-county-h{display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;padding:8px 12px;background:#fff6cc}
.m-county-h b{font-size:1.1rem;color:var(--navy)}
.m-county-h span{font-size:.92rem;font-weight:700;color:var(--ink-2)}
.m-links{margin:0;padding:8px 12px;border-top:1px solid #f3e3a1}
.link-btn{background:none;color:#1d4ed8;padding:0;min-height:44px;font-size:1rem;text-decoration:underline}
.link-btn:hover{background:none;color:#1e40af}
.m-key{margin-top:10px;border:2px solid #0f172a;border-radius:12px;padding:10px 14px;background:#fff}
/* Counties tab */
.counties-layout{display:grid;grid-template-columns:1fr;gap:18px}
@media (min-width:1000px){.counties-layout{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}}
.county-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin-bottom:10px}
.county-grid.small{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.county-btn{display:flex;flex-direction:column;align-items:flex-start;text-align:left;background:#fff;color:var(--navy);border:2px solid #b8c2cf;border-radius:12px;padding:8px 12px;min-height:56px}
.county-btn:hover{border-color:var(--navy);background:#f1f5ff}
.county-btn small{font-weight:600;color:var(--muted);font-size:.82rem}

/* ===== v10: fixed cards + one detail panel ===== */
article.race{display:flex;flex-direction:column;cursor:pointer;background:#fff;border:1px solid #cfd6df;border-radius:12px;overflow:hidden;transition:box-shadow .15s,border-color .15s}
article.race:hover{border-color:#94a3b8;box-shadow:0 4px 14px rgba(15,23,42,.1)}
article.race:focus-visible{outline:3px solid var(--navy);outline-offset:2px}
article.race > .rc-f{margin-top:auto}
/* every title bar the same height: two lines, longer titles end in "…" */
.rc-h{min-height:76px;box-sizing:border-box}
.rc-h .row-t{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.rows.grid > article.race[open]{grid-column:auto}
.seats-line,.home-line{margin:0;padding:6px 14px 0;font-size:.95rem;color:#334155}
.home-line{padding:6px 14px 2px;font-weight:600;border-top:1px dashed #e2e8f0;margin-top:4px}
.headline.fail{color:#9a3412}
.headline.pass{color:#065f46}
.ico{width:1.05em;height:1.05em;vertical-align:-.17em;flex:none}
.open-l .ico{margin-right:2px}
html.sheet-open,html.sheet-open body{overflow:hidden}
.race-sheet{position:fixed;inset:0;z-index:40;background:rgba(15,23,42,.6);display:flex;align-items:flex-start;justify-content:center;padding:24px 16px}
.race-sheet[hidden]{display:none!important}
.rs-box{background:#fff;border-radius:16px;width:100%;max-width:1160px;max-height:calc(100vh - 48px);display:flex;flex-direction:column;box-shadow:0 24px 70px rgba(0,0,0,.4);overflow:hidden}
.rs-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:14px 18px;background:var(--navy);color:#fff;border-bottom:4px solid var(--yellow)}
.rs-top h2{margin:0;font-size:1.45rem;line-height:1.2}
.rs-scope{margin:2px 0 0;color:#cbd5e1;font-weight:600}
.rs-close{flex:none;background:#fff;color:var(--navy);font-size:1rem}
.rs-scroll{overflow:auto;padding:16px 18px 20px}
.rs-grid{display:grid;grid-template-columns:1fr;gap:20px}
@media (min-width:1000px){.rs-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.05fr)}}
.rs-status{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;font-weight:700;color:#334155;margin-bottom:6px}
#rs-results .res{border:1px solid #dfe4ea;border-radius:12px;margin-top:8px}
#rs-results .headline,#rs-results .seats-line,#rs-results .close-call{padding-left:0}
@media (max-width:760px){.race-sheet{padding:0}.rs-box{max-height:100vh;height:100%;border-radius:0}.rs-top h2{font-size:1.2rem}}
.m-pick{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:10px}
.m-pick-l{margin:0 4px 0 0;font-weight:700;font-size:.92rem;color:var(--ink-2)}
.pick-b{background:#fff;color:var(--navy);border:2px solid #b8c2cf;border-radius:999px;min-height:40px;padding:4px 12px;font-size:.92rem}
.pick-b[aria-pressed="true"]{background:var(--navy);color:#fff;border-color:var(--navy)}
.kswatch i.hatch{background:repeating-linear-gradient(45deg,#64748b 0 4px,#fff 4px 8px)}
/* rings, tiles, icons */
.ring{width:56px;height:56px;flex:none}
.ring text{font-size:12.5px;font-weight:800;fill:#0f172a}
.cbox-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin:6px 0 10px}
.tile{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:8px 10px}
.tile-ico{width:56px;height:56px;border-radius:50%;background:#eef2ff;color:#1f5fbf;display:flex;align-items:center;justify-content:center;flex:none}
.tile-ico .ico{width:26px;height:26px}
.tile-l{margin:0;font-size:.85rem;font-weight:700;color:#475569;display:flex;align-items:center;gap:4px}
.tile-v{margin:0;font-size:1.3rem;font-weight:800;line-height:1.2}
.tile-v small{font-size:.8rem;font-weight:600;color:#475569}
.cbox-s .ico{color:#047857;width:1.2em;height:1.2em}
.strip-in{grid-template-columns:1fr}
@media (min-width:900px){.strip-in{grid-template-columns:2fr 1fr}}
.strip-main{display:flex;gap:14px;align-items:center}
.strip-main > div{flex:1;min-width:0}
.strip-main span .ico{color:#475569}
.strip-home{display:flex;align-items:center;gap:6px;flex-wrap:wrap;text-align:left;background:#fff8d6;color:var(--ink);border:2px solid #f3d27a;border-radius:12px;padding:10px 12px;font-weight:500;min-height:52px}
.strip-home:hover{background:#ffef99}
.strip-home .go{margin-left:auto;font-size:1.3rem;font-weight:800;color:var(--navy)}
#board-top{scroll-margin-top:110px}
.filters .ghost{background:#fff;color:var(--navy);border:2px solid #94a3b8}
.rc-f .open-l::after,article.race .open-l::after{content:none!important}
.rc-f .meta{display:inline-flex;align-items:center;gap:4px}
@media (max-width:999px){.rs-left{display:contents}.rs-grid{display:flex;flex-direction:column}#rs-results{order:1}#rs-mapbox{order:2}#rs-facts{order:3}}
/* icons & mini rings */
.in{display:inline-flex;align-items:center;gap:6px;line-height:1.05;text-align:left;font-size:.8rem;background:none!important;padding:0!important}
.in b{font-size:1.02rem}
.mring{width:40px;height:40px;flex:none}
.in.early span,.in.none span{color:#1e3a8a;font-weight:700}
.in.done span{color:#047857;font-weight:800}
.tabs button{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.tabs .ico{width:1.15em;height:1.15em}
.verdict{display:inline-flex;align-items:center;gap:3px;padding:1px 8px;border-radius:6px;color:#fff;font-weight:900;font-size:.9rem;letter-spacing:.02em;margin-right:4px}
.headline.fail .verdict{background:#b45309}
.headline.pass .verdict{background:#047857}
.headline.fail,.headline.pass{color:#1f2937}
.seats-line .ico,.close-call .ico{color:#334155;width:1.15em;height:1.15em}
.close-call .ico{color:#d97706}
.facts dt{display:flex;align-items:center;gap:6px}
.facts dt .ico{color:#475569}
.lp-clock{width:18px;height:18px;flex:none;opacity:.8}
.rs-status .ico{color:#475569}
/* card text layout */
.headline{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:10px 14px 4px;font-size:.95rem;font-weight:700;color:#475569}
.verdict{font-size:.95rem;padding:3px 10px}
.home-line{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:6px 10px 2px;padding:7px 10px;border:0;border-radius:8px;background:#fff8d6;font-size:.92rem}
.hl-l{display:inline-flex;align-items:center;gap:4px;font-weight:800;color:var(--navy);white-space:nowrap}
.hl-v{display:inline-flex;align-items:center;gap:2px;font-weight:600;color:#1f2937;text-align:right}
.hl-v b{font-size:1.02rem;margin-left:4px}
.hl-v small{font-weight:600;color:#64748b;margin-left:4px}
.rc-f{font-size:.85rem;color:#475569;padding:9px 14px}
.rc-f .meta{gap:5px}
.rc-f .meta .ico{color:#64748b}
.rc-h{gap:12px}
.rc-h .row-t{font-size:1.1rem;letter-spacing:-.005em}
.seats-line{display:flex;align-items:center;gap:6px;padding:10px 14px 2px}
.close-call{display:flex;align-items:center;gap:6px;padding:4px 14px 0}
/* top strip: two matching area panels */
.areas{display:grid;grid-template-columns:1fr;gap:10px}
@media (min-width:800px){.areas{grid-template-columns:1fr 1fr}}
.area{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 16px;text-align:left;color:var(--ink);font:inherit;min-height:0;width:100%}
.area .ring{width:64px;height:64px}
.area-body{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.area-t{font-size:.8rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:var(--navy)}
.area-t small{font-size:.8rem;font-weight:700;letter-spacing:0;text-transform:none;color:#64748b;margin-left:4px}
.area-h{font-size:1.2rem;font-weight:800;line-height:1.25;display:flex;align-items:center;gap:6px}
.area.ph-done .area-h{color:#065f46}
.area.ph-done .area-h .ico{color:#047857;width:1.1em;height:1.1em}
.area-n{font-size:.9rem;color:#475569;display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px}
.area-n .ico{color:#64748b}
.area .prog{display:flex;margin-top:6px;height:8px}
.area-link{cursor:pointer;background:#fffbea;border-color:#f3d27a}
.area-link:hover{background:#fff3c4;border-color:#e0b93a}
.area-link.ph-done{background:#f0fdf4;border-color:#86efac}
.area-link.ph-done:hover{background:#dcfce7}
.area-go{font-size:1.8rem;font-weight:800;color:var(--navy);flex:none}
.headline.fail .verdict{background:#374151}
.hl-l small{font-weight:600;color:#64748b}
@media (max-width:760px){.titles .date{display:block;font-size:.85rem}.d-long{display:none}.lp-text small{font-size:.85rem;color:#065f46}}
.margin-line{margin:0;padding:2px 14px 4px;font-size:.92rem;color:#334155}
.margin-line b{font-size:1rem}
.rtag.lead{color:#1f2937!important;border-width:2px}
.rs-box{max-height:calc(100dvh - 48px)}
@media (max-width:760px){.rs-box{max-height:100dvh}.t-long{display:none}.lp-text small{display:none}.live-pill{min-height:46px}}
.rs-status{margin-bottom:2px}
.m-hint .ico{color:var(--navy)}
/* more breathing room inside cards */
.rc-h{padding:12px 18px}
.headline{padding:12px 18px 4px}
.margin-line{padding:2px 18px 6px}
.seats-line{padding:12px 18px 2px}
.close-call{padding:6px 18px 0}
.res{padding:6px 0}
.r{padding:10px 18px 10px 24px}
.r::before{width:6px}
.cut{margin:4px 18px}
.home-line{margin:8px 14px 6px;padding:8px 12px}
.rc-f{padding:11px 18px}
.unopposed{padding:12px 18px}
.home-line{flex-wrap:wrap;row-gap:2px}
.hl-v{white-space:nowrap;margin-left:auto}
.area.ph-done .prog .f{background:#047857}
/* card headers: navy band (same system as the race panel header) */
.rc-h{background:var(--navy);border-bottom:3px solid var(--yellow)}
.rc-h .row-t{color:#fff}
.in,.in b{color:#fff}
.in span{color:#dbe4f0}
.in.early span,.in.none span{color:#dbe4f0}
.in.done span{color:#86efac}
.mring circle:first-child{stroke:rgba(255,255,255,.22)}
/* ===== design audit fixes (surfaces, contrast, sizes, tap targets) ===== */
/* surfaces: every layer is either clearly different or exactly the same as what's behind it */
.tabs{background:#fff;border:1px solid #cfd6df;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.tabs button:hover{background:#eef2f7}
.rc-f{background:#fff;border-top:1px solid #e2e8f0}
.band-all,.band-method,.band-state,.band-region{background:var(--bg)}
.band-method .method{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px 20px}
.home-line{border:1px solid #f0d77a}
.res .r:first-child{border-top:0}
/* contrast: no gray lighter than #475569 for text */
.r-name small,.hl-l small,.area-t small,.tile-v small,.county-btn small,.q-item small,.m-pick-l,.rc-f,.rc-f .meta,.small,.panel-sub,.muted,.key-note{color:#475569}
/* minimum sizes */
.rc-f,.rc-f .meta,.rc-f .open-l{font-size:15px}
.r-name small{font-size:14px}
.rtag,.tag{font-size:12.5px;padding:2px 7px}
.in{font-size:14px}
.in b{font-size:17px}
.area-t,.area-t small{font-size:14px}
.titles .date{font-size:15px}
.lp-text small{font-size:14px}
.hl-l small,.hl-v small{font-size:14px}
.tile-l,.tile-v small,.county-btn small{font-size:14px}
.r-bar .half[data-l]::after{font-size:12px}
.mkey thead th,.key-h,.cbox-h,.ctx-l{font-size:13px}
/* tap targets: text links get a 44px hit area */
.actions a,.help a,.est-n a,.site-foot a,.m-links .link-btn{display:inline-flex;align-items:center;min-height:44px}
/* hover: never swap a button to a color that can hide its own text — just deepen it slightly */
button:hover{background:inherit;filter:brightness(.93)}
button.ok:hover,.mb-step:hover,.mb-title:hover,.tabs button[aria-selected="true"]:hover,.fb-btn:hover,.big-btn:hover,.btn:hover{filter:brightness(1.12)}
.rs-close:hover,.sm-close:hover,.pop-x:hover,.ghost:hover,.share-btn:hover,.m-reset:hover,.ctx-x:hover,.county-btn:hover,.pick-b:hover,.sug-b:hover,.rb:hover,.q-item:hover,.strip-home:hover,.area-link:hover,.crumb-home:hover,.back-btn:hover,.link-btn:hover{filter:none}
.rs-close:hover,.sm-close:hover,.pop-x:hover,.share-btn:hover,.m-reset:hover,button.ghost:hover,.filters .ghost:hover{background:#e8eef8;color:var(--navy)}
.ctx-x:hover{background:#13315c;color:#fff}
.back-btn:hover{background:#ffd84d;color:var(--navy)}
.link-btn:hover{background:none;color:#1e40af;text-decoration:underline}
/* county-only cards on county pages: plain white (a near-white tint read as a mistake) */
.county-only article.race{background:#fff}
.in span,.in-l{font-size:14px}
.ctx-x{min-height:44px}
.cbox-h,.ctx-l{font-size:14px}
/* top bar: the live pill has a FIXED width so changing text never resizes the search box */
.topbar-in{grid-template-columns:380px minmax(0,1fr) auto}
.live-pill{width:100%;min-width:0;overflow:hidden}
.lp-text{min-width:0}
.lp-text b,.lp-text small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
@media (max-width:760px){.topbar-in{grid-template-columns:minmax(0,1fr) auto}}
/* selected tab keeps its colors on hover */
.tabs button[aria-selected="true"]:hover{background:var(--navy);color:#fff;filter:brightness(1.12)}
/* Judicial & local: organized */
.local-org{padding:0 14px 16px}
.lg-h{display:flex;align-items:center;gap:6px;margin:16px 0 8px;font-size:1.15rem;color:var(--navy)}
.lg-h span{font-size:.95rem;font-weight:600;color:#475569}
details.sub{background:#fff;border:1px solid #cfd6df;border-radius:12px;margin:8px 0}
details.sub > summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 16px;min-height:52px;font-weight:800;color:var(--navy);font-size:1.05rem}
details.sub > summary::-webkit-details-marker{display:none}
details.sub > summary small{font-size:14px;font-weight:600;color:#475569;white-space:nowrap}
details.sub > summary small::after{content:"  ▾"}
details.sub[open] > summary small::after{content:"  ▴"}
details.sub[open] > summary{border-bottom:1px solid #e2e8f0}
details.sub > .rows,.sub-body{padding:12px 14px 14px}
.kind-h{margin:12px 0 8px;font-size:.95rem;text-transform:uppercase;letter-spacing:.05em;color:#334155}
.kind-h:first-child{margin-top:0}
.ours{font-style:normal;font-size:.75rem;font-weight:800;background:var(--yellow);color:var(--navy);padding:2px 7px;border-radius:5px;margin-left:6px;vertical-align:2px;text-transform:uppercase}
/* Share menu */
.share-wrap{position:relative}
.share-btn{display:inline-flex;align-items:center;gap:6px}
.share-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:35;width:260px;background:#fff;border:2px solid var(--navy);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.22);padding:6px}
.share-menu[hidden]{display:none!important}
.share-h{margin:6px 10px 6px;font-size:14px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#475569}
.sh-i{display:flex;align-items:center;width:100%;min-height:46px;padding:8px 12px;border-radius:8px;background:#fff;color:var(--navy);text-decoration:none;font-weight:700;font-size:1rem;text-align:left}
.sh-i:hover,.sh-i:focus-visible{background:#e8eef8;filter:none;color:var(--navy)}
.sh-sub{border-top:1px solid #e2e8f0;border-radius:0 0 8px 8px;font-weight:600;color:#334155}
.sm-step{margin:14px 0 6px;font-weight:800;color:var(--navy)}
.sm-copyimg{background:var(--navy);color:#fff}
.btn-out{display:inline-flex;align-items:center;min-height:48px;padding:10px 16px;border:2px solid var(--navy);border-radius:10px;color:var(--navy);text-decoration:none;font-weight:700;background:#fff}
.btn-out:hover{background:#e8eef8}
/* ring label inside the (white) race panel: dark text, visible track */
.rs-status .in,.rs-status .in b{color:var(--navy)}
.rs-status .in span{color:#334155}
.rs-status .in.done span{color:#047857}
.rs-status .mring circle:first-child{stroke:#e2e8f0}
.fb-btn{background:#1463c8}
.fb-btn:hover{background:#1156ad;filter:none}
.ours{font-size:13px}
.key-h,.mkey thead th{font-size:14px}
.pick-b:hover{background:#e8eef8;color:var(--navy)}
.pick-b[aria-pressed="true"]:hover{background:var(--navy);color:#fff}
/* ===== compact live status: icon + word + time + motion ===== */
.topbar-in{grid-template-columns:auto minmax(0,1fr) auto}
.live-pill{display:inline-flex;align-items:center;gap:10px;width:auto;min-width:0;padding:6px 14px;min-height:52px;border-radius:999px;cursor:default;font-variant-numeric:tabular-nums}
.lp-state{font-size:15px;font-weight:900;letter-spacing:.12em}
.lp-time{font-size:17px;font-weight:800;color:#0f172a;min-width:4.6ch}
.lp-sync{position:relative;width:22px;height:22px;flex:none;color:#047857}
.lp-sync svg{position:absolute;inset:0;width:22px;height:22px}
.lp-spin{opacity:0}
.lp-count.run{animation:lpCount 10s linear forwards}
@keyframes lpCount{from{stroke-dashoffset:56.5}to{stroke-dashoffset:0}}
.live-pill.checking .lp-ring{opacity:0}
.live-pill.checking .lp-spin{opacity:1;animation:spin .8s linear infinite}
.live-pill.checking{background:#ecfdf5;border-color:#a7f3d0;color:#064e3b}
.live-pill.checking .lp-icon{background:#10b981;border:0;animation:pulse 2.4s infinite;box-shadow:none}
.live-pill.new{background:#16a34a;border-color:#15803d;color:#fff;animation:pop .6s ease}
.live-pill.new .lp-time,.live-pill.new .lp-sync{color:#fff}
.live-pill.err .lp-time{color:#7a4f00}
.live-pill.err .lp-sync{color:#b45309}
.live-pill.err .lp-ring{opacity:0}
.live-pill.err .lp-spin{opacity:1;animation:spin 1.6s linear infinite}
.lp-clock,.lp-text{display:none}
@media (max-width:760px){.live-pill{min-height:46px;padding:4px 12px;gap:8px}.lp-time{font-size:16px}}
@media (prefers-reduced-motion:reduce){.lp-count.run,.live-pill.checking .lp-spin,.live-pill.err .lp-spin{animation:none}}
.live-pill{width:240px;justify-content:flex-start}.lp-state{min-width:5.6em}@media (max-width:760px){.live-pill{width:auto}}
/* ===== live status card ===== */
.live-pill{display:none}
.live-card{position:relative;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:12px;row-gap:1px;align-items:center;width:300px;min-height:56px;padding:7px 14px 10px;background:#fff;border:1px solid #cfd6df;border-radius:12px;overflow:hidden;font-variant-numeric:tabular-nums;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.lc-chip{grid-row:1/span 2;display:inline-flex;align-items:center;gap:6px;min-width:96px;padding:5px 10px;border-radius:8px;background:#dcfce7;color:#065f46;font-size:13.5px;font-weight:900;letter-spacing:.08em}
.lc-dot{width:9px;height:9px;border-radius:50%;background:#10b981;box-shadow:0 0 0 0 rgba(16,185,129,.6);animation:pulse 2.4s infinite;flex:none}
.lc-main{font-size:14px;color:#475569;white-space:nowrap}
.lc-time{font-size:17px;color:#0f172a;font-weight:800}
.lc-next{font-size:14px;color:#475569;white-space:nowrap}
.lc-bar{position:absolute;left:0;right:0;bottom:0;height:4px;background:#e8edf3}
.lc-bar i{display:block;height:100%;width:0;background:#10b981;transition:width .5s linear}
.live-card.checking .lc-chip{background:#dbeafe;color:#1e3a8a}
.live-card.checking .lc-dot{background:#2563eb;animation:none}
.live-card.checking .lc-bar i{width:35%!important;background:#2563eb;animation:lcScan 1s ease-in-out infinite;transition:none}
@keyframes lcScan{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}
.live-card.new{border-color:#16a34a;box-shadow:0 0 0 3px rgba(22,163,74,.25);animation:pop .6s ease}
.live-card.new .lc-chip{background:#16a34a;color:#fff}
.live-card.new .lc-dot{background:#fff}
.live-card.new .lc-next{color:#15803d;font-weight:700}
.live-card.err{border-color:#f3d27a;background:#fffbeb}
.live-card.err .lc-chip{background:#fde68a;color:#78350f}
.live-card.err .lc-dot{background:#d97706;animation:none}
.live-card.err .lc-bar i{background:#d97706}
@media (max-width:760px){.live-card{width:auto;min-width:0}.lc-chip{min-width:0}}
@media (prefers-reduced-motion:reduce){.lc-dot,.live-card.checking .lc-bar i,.live-card.new{animation:none}}
@media (max-width:760px){
  .topbar-in{grid-template-columns:minmax(0,1fr) auto}
  .live-card{width:100%;min-width:0;column-gap:10px;padding:6px 12px 9px}
  .lc-chip{padding:4px 8px;font-size:12.5px;letter-spacing:.06em}
  .lc-main,.lc-next{overflow:hidden;text-overflow:ellipsis;min-width:0}
  .lc-label{display:none}
  .lc-main::before{content:"As of ";font-size:14px;color:#475569}
}
.lc-chip{width:124px;min-width:0;justify-content:flex-start}
@media (max-width:760px){.lc-chip{width:96px}}
/* status card: content always fits (measured 320–1440px) */
.live-card{width:330px;grid-template-columns:auto minmax(0,1fr)}
.lc-chip{width:112px}
.lc-main,.lc-next{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:760px){.live-card{width:100%}.lc-chip{width:92px;letter-spacing:.03em}}
@media (max-width:480px){
  .lc-chip{width:auto;padding:0;background:none!important;grid-row:1/span 2}
  .lc-chip #lp-main{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .lc-dot{width:14px;height:14px}
  .live-card{column-gap:10px}
}
/* checking phase: bar is full, a bright scan sweeps across it */
.live-card.checking .lc-bar i{width:100%!important;background:#93c5fd;animation:none;transition:none;position:relative}
.live-card.checking .lc-bar::after{content:"";position:absolute;top:0;bottom:0;left:0;width:30%;background:linear-gradient(90deg,transparent,#2563eb,transparent);animation:lcScan .9s ease-in-out infinite}
