/* Atlas counting: dark editorial dashboard. */
html:has(body[data-tab="counting"]){color-scheme:dark;background:#0b1018}body[data-tab="counting"]{--paper:#0b1018;--white:#151d29;--ink:#edf2f8;--muted:#a5b3c5;--line:#2c384a;background:var(--paper);color:var(--ink)}body[data-tab="counting"] header{background:#0b1018;border-bottom:1px solid #2c384a}#counting{max-width:1440px;padding:28px 32px;font-family:var(--sans);line-height:1.45}#counting h1{font-size:30px;letter-spacing:-.03em;margin:0;font-weight:600}#counting .counting-heading>div>p{margin:5px 0 0;color:var(--muted)}.counting-heading-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}#counting :is(button,select,input,textarea){font-size:14px;color:var(--ink);border:1px solid var(--line);background:#182332;border-radius:9px;min-height:44px}#counting button{padding:10px 16px}#counting button:hover{background:#24344a}#counting button:focus-visible,#counting select:focus-visible,#counting input:focus-visible{outline:3px solid #79afff;outline-offset:3px}#counting button:disabled{opacity:.45}#counting-share-download,#counting-share-save{background:#eef3fa!important;color:#101822!important;border-color:transparent!important;font-weight:600}.refresh-indicator{display:grid;grid-template-columns:10px auto 30px;align-items:center;gap:7px;font-size:12px;position:relative;padding-bottom:6px;font-variant-numeric:tabular-nums}.refresh-indicator progress{grid-column:1/-1;width:100%;height:3px;border:0;appearance:none;background:#263348}.refresh-indicator progress::-webkit-progress-bar{background:#263348;border-radius:4px}.refresh-indicator progress::-webkit-progress-value{background:#8dafff;border-radius:4px}.refresh-indicator progress::-moz-progress-bar{background:#8dafff}.live-beacon{display:inline-block;width:7px;height:7px;border-radius:50%;background:#ff596f;animation:atlas-live-pulse 1.8s ease-in-out infinite;flex:none}body[data-counting-health="stale"] .live-beacon{animation:none;background:#e5ba6d}body[data-counting-refreshing="true"] .refresh-indicator{opacity:.65}#counting-status{border:0;padding:0;margin:14px 0 24px;color:var(--muted);font-size:12px}#counting .counting-projection{margin:0 0 24px;padding:0 0 24px}.projection-summary{margin:0 0 24px;gap:20px}.projection-candidate{padding:22px;border:1px solid var(--line);border-radius:16px;background:#121b28;position:relative}.candidate-identity{display:flex;gap:14px;align-items:center;margin-bottom:22px}.candidate-identity img{width:64px;height:64px;object-fit:cover;object-position:50% 25%;border-radius:50%;background:#263348;flex:none}.projection-candidate h3{font-size:18px;margin:0;font-weight:600}.projection-candidate p{grid-template-columns:1fr auto;gap:8px}.projection-candidate strong{font-size:36px;font-weight:600;letter-spacing:-.03em}.candidate-pl{color:#79afff}.candidate-pt{color:#ff8c9b}.projection-candidate p span{color:var(--muted);font-size:13px}.projection-candidate p strong:last-child{font-size:26px}.projection-heading{align-items:center;gap:12px;margin-bottom:12px}.projection-heading h2{font-size:18px;margin:0}.projection-heading label{font-size:12px;min-width:170px;display:flex;align-items:center;gap:10px}.projection-heading select{min-height:38px;margin:0}.projection-chart{background:#101824;border:1px solid var(--line);border-radius:14px;overflow:hidden}.projection-chart svg{min-width:0;width:100%;height:auto}.projection-chart text{fill:#b8c5d6}.projection-key{justify-content:flex-start;font-size:12px;gap:20px;color:var(--muted);margin:12px 0}.projection-axis-label{margin-left:auto}.projection-inspection{grid-template-columns:120px 1fr;margin:14px 0;font-size:12px}.projection-inspection label{font-size:12px;color:var(--muted)}.projection-inspection input{border:0!important;background:transparent!important;accent-color:#9abfff}.projection-inspection output{font-size:13px;min-height:20px}.projection-caution,#projection-status{color:var(--muted);font-size:12px!important;margin:8px 0}#counting details{border:1px solid var(--line);border-radius:12px;background:#101824;padding:14px 18px;margin-top:16px}#counting-projection details{border:1px solid var(--line);padding:10px 18px}#counting summary{font-size:13px;min-height:32px;line-height:32px;font-weight:500}#counting details p{color:var(--muted);max-width:75ch}#counting td,#counting th{border-color:var(--line);font-size:13px;background:transparent;color:var(--ink)}#counting .counting-controls,#counting .counting-chart-panel,#counting .counting-grid article{background:#141f2d;border-color:var(--line)}#counting .counting-controls button[aria-pressed=true]{background:#2c4669;color:#fff}.counting-map-heading{align-items:center}.counting-map-heading h2{font-size:20px}.counting-map-heading label{font-size:12px;min-width:170px}.counting-map-layout{align-items:start;gap:28px;margin-top:20px}.counting-map-layout>div:last-child{padding:20px;border:1px solid var(--line);border-radius:14px;background:#121b28}#counting-map-detail h3{display:none}#counting-map-detail dl{margin:12px 0}#counting-map-detail p,#counting-map-detail a,#counting-map-status,#counting-map-legend{font-size:12px}#counting-map-canvas path:hover,#counting-map-canvas path:focus-visible{stroke:#f7c96b;stroke-width:2}#counting-share-dialog{width:min(560px,calc(100vw - 24px));max-height:92dvh;border:1px solid #35465e;border-radius:18px;background:#111a27;color:#edf2f8;padding:20px;box-shadow:0 20px 80px #0009}#counting-share-dialog::backdrop{background:#050a12b8;backdrop-filter:blur(5px)}.share-dialog-heading,.share-dialog-actions,.share-format-buttons{display:flex;align-items:center;justify-content:space-between;gap:10px}.share-dialog-heading h2{font-size:20px;margin:0}.share-format-buttons{margin:18px 0;justify-content:start;padding:4px;border:1px solid #2c384a;border-radius:11px}.share-format-buttons button{flex:1;border:0!important;background:transparent!important}.share-format-buttons button[aria-pressed=true]{background:#2a3c54!important}.share-dialog-actions{margin-top:18px}.share-dialog-actions button{flex:1}#counting-share-preview{background:#080e17;border:1px solid #26354a;border-radius:10px;max-height:57dvh;overflow:auto;padding:10px;display:flex;justify-content:center}#counting-share-preview img{display:block;max-width:100%;height:auto;object-fit:contain;align-self:start}#counting-share-status{font-size:12px;min-height:18px;color:#a5b3c5}#counting-share-caption-text{background:#172334;color:#edf2f8}.nav-data-badge,.nav-live-badge{display:flex;align-items:center;justify-content:center;gap:5px;font-size:10px;line-height:1.2;color:#adbdd1;margin-top:4px;letter-spacing:0;font-weight:400}.nav-live-badge{color:#ffb0bb}.lab-nav button{white-space:nowrap}.lab-nav .live-beacon{width:5px;height:5px}.lab-nav{flex-wrap:wrap}body[data-counting-health="stale"] .nav-live-badge{color:#e5ba6d}@keyframes atlas-live-pulse{0%,100%{opacity:1}50%{opacity:.3}}@media(max-width:760px){#counting{padding:20px 14px}.counting-heading{gap:18px}.counting-heading-actions{width:100%;justify-content:space-between;gap:8px}#counting h1{font-size:26px}.projection-summary{gap:10px}.projection-candidate{padding:14px}.candidate-identity{gap:9px;margin-bottom:16px}.candidate-identity img{width:44px;height:44px}.projection-candidate h3{font-size:14px}.projection-candidate p{display:grid;grid-template-columns:1fr}.projection-candidate strong{font-size:32px;margin:0 0 6px}.projection-candidate p strong:last-child{font-size:24px}.projection-heading{display:flex;align-items:center}.projection-heading label{min-width:0;font-size:0}.projection-heading select{font-size:12px;width:150px}.projection-key{gap:12px}.projection-axis-label{margin-left:0}.projection-inspection{grid-template-columns:1fr}.counting-map-heading{display:flex}.counting-map-heading label{font-size:0;min-width:0}.counting-map-heading select{font-size:12px;width:165px}.counting-map-layout{grid-template-columns:1fr}.nav-data-badge,.nav-live-badge{font-size:9px}.nav-live-badge>span:last-child{display:none}header .lab-nav button{padding:8px 9px}}
@media(prefers-reduced-motion:reduce){.live-beacon{animation:none}#counting-share-dialog::backdrop{backdrop-filter:none}}@media(prefers-contrast:more){body[data-tab="counting"]{--line:#6a7c95;--muted:#c4cede}}
.nav-data-badge,.nav-live-badge{font-size:11px}.drill-result{overflow-x:auto;margin-top:20px}#counting .drill-result table{min-width:310px;width:100%;border-collapse:collapse}#counting .drill-result th,#counting .drill-result td{padding:10px 6px;font-size:12px;text-align:right}#counting .drill-result th:first-child{text-align:left;white-space:nowrap}.drill-result caption{text-align:left;font-size:14px;font-weight:600;margin:0 0 8px}.drill-result small{display:block;color:var(--muted);font-size:11px;font-weight:400}#drill-status{font-size:11px!important;color:var(--muted)}#counting-drilldown details{padding:8px 12px}#counting-drilldown label{font-size:12px}#counting-drilldown select{width:100%}#drill-retry{margin-top:16px;width:100%}#counting-share-preview{min-height:100px}body[data-tab="counting"] .language-switch select{background:#172334;color:#edf2f8;border-color:#34445c}

#counting :focus-visible{outline:2px solid #b8d2ff;outline-offset:3px}#counting ::selection{background:#38577e;color:#fff}#counting{font-variant-numeric:tabular-nums;scrollbar-color:#52647e #101824}#counting a{color:#a9caff;text-underline-offset:3px}body[data-counting-health="complete"] .live-beacon{animation:none;background:#9ab4a7}

#counting-share-preview img{max-height:52dvh;width:auto;max-width:100%;height:auto}.nav-live-badge>span:last-child{display:inline}
.chart-view-switch{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0 0 16px}.chart-view-switch button[aria-pressed=true]{background:#edf2f8!important;color:#101824!important}.chart-view-switch label{margin-left:auto;display:flex;align-items:center;gap:8px;font-size:12px}.chart-view-switch select{width:160px}.counting-map-heading{display:flex;gap:14px;flex-wrap:wrap}.counting-map-heading h2{margin-right:auto}#counting-map-detail h3{display:block;font-size:16px}.comparison-compact{width:100%;overflow-x:auto}.comparison-compact h3{font-size:16px;margin:12px 0 4px}.comparison-compact p{font-size:12px;color:var(--muted)}#counting-cards{display:block}.comparison-compact table{width:100%;border-collapse:collapse;min-width:540px}.comparison-compact small{display:block;font-size:11px;color:var(--muted)}#counting-share-dialog{width:min(520px,calc(100vw - 20px));border-radius:26px;padding:16px}#counting-share-preview{padding:0;border:0;background:transparent;overflow:hidden}#counting-share-preview img{border-radius:12px;max-height:56dvh}.share-format-buttons{border:0;background:#1b2635;border-radius:20px;padding:3px;margin:12px 0}.share-format-buttons button{border-radius:18px!important;min-height:36px!important}.share-dialog-actions{flex-wrap:wrap}.share-dialog-actions button{border-radius:20px!important}#counting-share-native{flex-basis:100%;background:#edf2f8!important;color:#101824!important;font-weight:600}.share-map-toggle{font-size:12px;display:flex;align-items:center;justify-content:center;gap:8px;margin:12px 0;color:#a5b3c5}.share-map-toggle input{width:auto!important;min-height:0!important}.projection-key{display:none}#counting-share-status:empty{display:none}@media(max-width:600px){#counting-share-dialog{margin:auto auto 0;width:100%;max-width:none;border-bottom:0;border-radius:24px 24px 0;padding:16px 16px max(16px,env(safe-area-inset-bottom))}.chart-view-switch label{margin-left:0}.counting-map-heading label{font-size:12px}.counting-map-heading select{width:100%}}

#counting [hidden]{display:none!important}.projection-key{display:flex}
/* Live scoreboard: observed result is the first level of information. */
.projection-summary{display:block;margin-bottom:28px}.duel-scoreboard{padding:4px 0 20px;border-bottom:1px solid var(--line)}.scoreboard-candidates{display:grid;grid-template-columns:1fr 1fr;gap:28px}.scoreboard-candidate{display:flex;flex-direction:column;min-width:0}.scoreboard-candidate:last-child{text-align:right;align-items:flex-end}.scoreboard-candidate .candidate-identity{margin-bottom:16px}.scoreboard-candidate:last-child .candidate-identity{flex-direction:row-reverse}.scoreboard-candidate h3{font-size:18px;margin:0;font-weight:600}.scoreboard-now{font-size:12px;color:var(--muted)}.scoreboard-value{font-size:clamp(32px,6vw,68px);line-height:1.15;letter-spacing:-.035em;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}.scoreboard-votes{font-size:12px;color:var(--muted);margin-top:6px}.duel-bar{position:relative;display:flex;height:12px;border-radius:8px;overflow:hidden;background:#2c384a;margin-top:24px}.duel-pl{background:#79afff}.duel-lula{background:#ff8c9b}.duel-bar i{position:absolute;left:50%;top:0;bottom:0;width:2px;background:#0b1018}.duel-caption{display:flex;justify-content:space-between;gap:14px;margin-top:10px;font-size:12px;color:var(--muted)}.duel-caption strong{color:var(--ink);font-weight:500}#projection-scenarios{margin:12px 0 18px}.scenario-row{display:grid;grid-template-columns:minmax(160px,1fr) auto auto;gap:12px 24px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line);font-size:13px}.scenario-name{display:flex;align-items:center;gap:10px;min-width:0}.scenario-stroke{width:34px;height:2px;display:inline-block;flex:none;background:repeating-linear-gradient(to right,#c5cfdd 0 3px,transparent 3px 10px)}.scenario-long{background:repeating-linear-gradient(to right,#c5cfdd 0 12px,transparent 12px 19px)}.scenario-missing{grid-column:span 2;color:var(--muted);font-size:12px}.curve-legend{display:flex;flex-wrap:wrap;gap:12px 22px;font-size:13px}.curve-legend span{display:flex;align-items:center;gap:8px}.curve-legend i{width:18px;height:3px}#projection-scale-note{font-size:12px;color:var(--muted);margin-top:14px}.projection-chart svg{display:block;overflow:visible}.projection-chart{padding:4px}#projection-inspect-value{overflow-wrap:anywhere}.live-beacon{position:relative;color:#ff596f;animation:atlas-live-core 2s ease-in-out infinite}.live-beacon::after{content:"";position:absolute;inset:-4px;border:1px solid currentColor;border-radius:50%;animation:atlas-live-ring 2s ease-out infinite;pointer-events:none}@keyframes atlas-live-core{0%,100%{opacity:1}50%{opacity:.58}}@keyframes atlas-live-ring{0%{transform:scale(.75);opacity:.8}80%,100%{transform:scale(1.65);opacity:0}}body[data-counting-health="stale"] .live-beacon,body[data-counting-health="complete"] .live-beacon{animation:none}body[data-counting-health="stale"] .live-beacon::after,body[data-counting-health="complete"] .live-beacon::after{display:none}@media(max-width:600px){.scoreboard-candidates{gap:16px}.scoreboard-candidate .candidate-identity{gap:8px;align-items:flex-start}.scoreboard-candidate img{width:44px;height:44px}.scoreboard-candidate h3{font-size:14px}.scenario-row{grid-template-columns:1fr 1fr;gap:8px 12px}.scenario-name{grid-column:1/-1}.scenario-missing{grid-column:1/-1}.projection-heading label{font-size:12px}.projection-heading select{width:130px}.duel-caption{font-size:11px}}@media(prefers-reduced-motion:reduce){.live-beacon,.live-beacon::after{animation:none!important}}

.duel-scoreboard .scoreboard-value{font-size:clamp(32px,6vw,68px);line-height:1.15}.duel-caption strong{font-size:13px}.projection-summary .scoreboard-now,.projection-summary .scoreboard-votes{font-size:12px}

.counting-map-layout>div{min-width:0}.drill-result{min-width:0;max-width:100%}.drill-margin{white-space:nowrap;font-variant-numeric:tabular-nums}

.scenario-coverage{grid-column:1/-1;color:var(--muted);font-size:11px;font-weight:400}

.projection-heading{flex-wrap:wrap}.projection-heading h2{flex:1 1 220px}@media(max-width:600px){.projection-heading h2{flex-basis:100%}.projection-heading label{display:grid;flex:1;gap:4px;min-width:0}.projection-heading select{width:100%!important}}

.winner-change{margin:12px 0;font-variant-numeric:tabular-nums}.winner-change strong{font-size:18px}.comparison-basis-note{font-size:12px!important;color:var(--muted)}.region-heading{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:24px 0 12px}.region-heading h3{margin:0 auto 0 0;font-size:18px}.region-heading label{font-size:12px;display:grid;gap:4px}.region-heading select{max-width:220px}#counting-region-summary th small{display:block;font-size:11px;color:var(--muted);font-weight:400}#counting-region-summary td{font-variant-numeric:tabular-nums;white-space:nowrap}.forecast-impact-table{overflow:auto;max-height:360px}.forecast-impact-table table{min-width:760px}.forecast-impact-table th{white-space:nowrap}.forecast-impact-table td{font-variant-numeric:tabular-nums;white-space:nowrap}

/* Keep row tracking legible across every counting table, including inherited light-theme hovers. */
#counting{--table-row-hover:#182332}
#counting table{border-collapse:collapse}
#counting tbody tr:is(:hover,:focus-within){background:var(--table-row-hover)}
