.results-page { --results-paper:var(--bg); --results-line:#d9d8d4; --results-red:#8f242b; }
.results-main button,.results-main select { font:inherit; }
.results-main button { cursor:pointer; color:inherit; }
.results-main button:disabled { cursor:default; opacity:.45; }
.results-page [hidden] { display:none!important; }
.results-main :focus-visible { outline:3px solid #a33a43; outline-offset:4px; }
.results-skip { position:absolute; top:-5rem; left:1rem; z-index:20; padding:1rem; background:#fff; }
.results-skip:focus { top:1rem; }
/* Keep tab-position restoration possible before the asynchronous maps load. */
main.results-main { width:min(1280px,calc(100% - 64px)); margin:0 auto; min-height:calc(100vh - var(--tabs-height,50px)); }
.results-intro { padding:38px 0 8px; }
.results-intro h2,.contest-heading h2 { font:700 1.6rem/1 var(--serif); margin:0; }
.results-live-indicator { display:inline-block; width:.4em; height:.4em; margin-left:.12em; border-radius:50%; background:#b42632; vertical-align:middle; animation:results-pulse 1.8s ease-in-out infinite; }
@keyframes results-pulse { 0%,100% { opacity:1; } 50% { opacity:.3; } }
@media(prefers-reduced-motion:reduce) { .results-live-indicator { animation:none; } }
.results-status { border-bottom:1px solid var(--results-line); padding:0 0 20px; display:flex; gap:20px; align-items:baseline; justify-content:space-between; font-size:.76rem; line-height:1.45; }
.status-message { margin:0; font:400 1rem/1.5 var(--sans); color:var(--ink); }
.status-times { margin:0; max-width:44ch; color:#666; text-align:right; font-variant-numeric:tabular-nums; }
.test-banner { margin:20px 0 0; padding:16px 20px; border:2px solid #9b4d0b; background:#fff3df; color:#743a0c; font-size:.8rem; font-weight:bold; line-height:1.45; letter-spacing:.03em; }
.results-loading,.results-error { padding:32px 0; font:1.1rem/1.5 var(--serif); }
.results-error { color:#8f242b; }
.contest-section { border-bottom:1px solid #111; padding:32px 0 36px; scroll-margin-top:calc(var(--tabs-height,50px) + 20px); }
.contest-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin-bottom:24px; }
.contest-content { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.3fr); gap:42px; }
.contest-summary { min-width:0; }
.candidate-table { border-collapse:collapse; border-top:1px solid #111; width:100%; font-variant-numeric:tabular-nums; font-size:.83rem; }
.candidate-table th { font-size:.66rem; font-weight:400; text-transform:none; letter-spacing:normal; padding:13px 0 11px; color:#666; text-align:right; }
.candidate-table th:first-child { text-align:left; }
.candidate-table td { padding:14px 0; border-top:1px solid #e4e3df; vertical-align:middle; text-align:right; }
.candidate-table td:first-child { text-align:left; padding-right:13px; }
.candidate-name { display:flex; gap:10px; align-items:flex-start; font-family:var(--serif); font-size:1.15rem; font-weight:bold; line-height:1.15; }
.candidate-dot,.legend-dot { width:8px; height:8px; flex:0 0 auto; margin-top:6px; background:var(--choice-color,#777); }
.candidate-party { display:block; font: .8rem/1.3 var(--sans); color:#666; padding-left:18px; margin-top:4px; }
.candidate-share { font-weight:bold; min-width:58px; }
.candidate-count { min-width:62px; }
.candidate-bar span { display:block; height:100%; background:var(--choice-color,#777); transition:width .4s ease; }
.summary-total { display:flex; justify-content:space-between; align-items:baseline; gap:20px; padding:17px 0; border-top:1px solid #111; font-size:.8rem; color:#555; }
.summary-total strong { color:#111; font:700 1.45rem var(--serif); font-variant-numeric:tabular-nums; }
.contest-notice { border-left:3px solid #b59452; background:#faf7ef; padding:12px 16px; color:#51442b; }
.map-column { min-width:0; }
.map-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; min-height:37px; margin-bottom:14px; }
.map-heading h3 { font:700 1.1rem var(--serif); margin:0; }
.map-back { background:none; border:0; font-size:.74rem!important; padding:5px 0; display:block; text-decoration:underline; text-underline-offset:3px; margin-bottom:9px; }
.map-view-buttons { display:flex; background:#fff; border:1px solid #bdbdb9; border-radius:2px; }
.map-view-buttons button { padding:8px 11px; font-size:.65rem; border:0; background:transparent; }
.map-view-buttons button + button { border-left:1px solid #bdbdb9; }
.map-view-buttons button[aria-pressed="true"] { background:#171717; color:#fff; }
.map-canvas { position:relative; background:var(--results-paper); }
.results-map { display:block; width:100%; height:415px; touch-action:none; user-select:none; }
.region-path { stroke:#fff; stroke-width:1; vector-effect:non-scaling-stroke; cursor:pointer; transition:fill .35s ease; }
.region-path.is-unmatched { stroke:#aaa; stroke-dasharray:2 2; }
.region-label { font-family:var(--sans); font-size:11px; fill:#333; text-anchor:middle; paint-order:stroke; stroke:var(--results-paper); stroke-width:2.5px; stroke-linejoin:round; pointer-events:none; }
.map-zoom { position:absolute; bottom:12px; right:12px; display:flex; background:#fff; border:1px solid #c7c6c2; border-radius:2px; box-shadow:0 1px 4px #0001; }
.map-zoom button { min-width:34px; min-height:34px; border:0; background:none; font-size:1rem; }
.map-zoom button+button { border-left:1px solid #ddd; }
.map-zoom button:last-child { font-size:.63rem; padding:0 9px; }
.map-legend { display:flex; gap:8px 15px; flex-wrap:wrap; margin-top:12px; font-size:.64rem; line-height:1.45; }
.legend-item { display:flex; align-items:flex-start; gap:6px; }
.legend-dot { width:7px; height:7px; margin-top:3px; }
.area-select-label { display:flex; align-items:center; gap:12px; margin:17px 0 12px; font-size:.7rem; }
.area-select { min-width:0; width:100%; background:#fff; border:1px solid #bebdb8; padding:10px 30px 10px 11px; border-radius:2px; color:#222; font-size:.74rem!important; }
.map-unavailable { padding:35px 25px; background:var(--results-paper); font:1rem/1.6 var(--serif); }
.test-tools-wrap { padding:18px 0; }
.text-button { background:none; border:0; padding:4px 0; text-decoration:underline; text-underline-offset:3px; font-size:.7rem!important; color:#666!important; }
.preview-tools { margin-top:15px; display:flex; gap:16px; align-items:flex-end; flex-wrap:wrap; padding:20px; border:1px solid #d4c7b5; background:#fcf8ef; font-size:.72rem; }
.preview-tools p { width:100%; margin:0; color:#725329; }
.preview-tools label { display:grid; gap:6px; }
.preview-tools select,.preview-actions button { background:#fff; border:1px solid #b9b3a9; padding:10px; color:#222; border-radius:2px; }
.preview-actions { display:flex; gap:8px; flex-wrap:wrap; }
@media(min-width:1200px) { .results-map { height:475px; } }
@media(max-width:1000px) { .contest-content { gap:26px; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); } .candidate-name { font-size:1.03rem; } .candidate-count { min-width:48px; } }
@media(max-width:780px) {
  main.results-main { width:calc(100% - 36px); }
  .results-intro { padding:30px 0 8px; }
  .results-status { display:block; } .status-times { max-width:none; text-align:left; margin-top:7px; font-size:.67rem; }
  .contest-content { grid-template-columns:1fr; gap:24px; } .contest-section { padding-top:24px; } .contest-heading { margin-bottom:20px; }
  .candidate-name { font-size:1.2rem; } .candidate-table { font-size:.88rem; } .candidate-table td { padding:12px 0; }
  .map-heading { margin-bottom:10px; } .results-map { height:400px; }
}
@media(max-width:440px) {
  .contest-heading { align-items:flex-start; }
  .results-map { height:355px; }
  .preview-tools { padding:15px; } .preview-tools label { width:100%; }
}
@media(prefers-reduced-motion:reduce) { .candidate-bar span,.region-path { transition:none; } }

/* Compact race navigation and tooltip-only geographic results. */
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.race-picker { display:inline-flex; position:relative; align-items:center; gap:6px; max-width:100%; }
.race-picker h2 { min-width:0; }
.race-picker-caret { width:24px; height:44px; flex:0 0 24px; display:grid; place-items:center; }
.race-picker-caret::after { content:""; width:8px; height:8px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:translateY(-2px) rotate(45deg); }
.race-select { position:absolute; inset:0; width:100%; height:100%; padding:0; border:0; background:transparent; cursor:pointer; outline:none!important; }
.race-picker:has(.race-select:focus-visible) h2 { text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:6px; }
.race-menu { position:absolute; z-index:40; top:calc(100% + 16px); left:0; min-width:260px; width:max-content; max-width:calc(100vw - 36px); padding:6px; border:1px solid #b9b8b2; border-radius:3px; background:#fff; box-shadow:0 5px 20px #0002; }
.race-option { display:block; width:100%; border:0; padding:13px 16px; background:transparent; text-align:left; font:.92rem/1.3 var(--sans)!important; white-space:normal; }
.race-option[aria-checked="true"] { background:#f2f2f4; font-weight:700!important; }
.race-option:hover,.race-option:focus-visible { background:var(--placeholder,#d9d9d9); outline:2px solid #777; outline-offset:-2px; }
.area-select-label { display:block; position:relative; }
.area-select-label::after { content:""; position:absolute; width:7px; height:7px; border-right:1.5px solid #333; border-bottom:1.5px solid #333; transform:rotate(45deg); right:18px; top:calc(50% - 6px); pointer-events:none; }
.area-select { appearance:none; -webkit-appearance:none; width:100%; border:1px solid #bdbdb8; border-radius:2px; background:#fff; color:#111; padding:12px 42px 12px 14px; font-size:.88rem!important; cursor:pointer; }
.results-page select:focus,.results-page select:focus-visible { outline:none; border-color:#333; box-shadow:inset 0 0 0 1px #333; }
.area-select-label { margin:16px 0 0; }
.area-select { font-size:.76rem!important; }
.contest-coverage { display:block; width:fit-content; margin-top:12px; font:.8rem/1.5 var(--sans); text-underline-offset:3px; color:#555; }
.share-line { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.share-value { min-width:46px; text-align:right; }
.candidate-bar { width:56px; min-width:56px; height:8px; margin:0; background:#eeece7; }
.candidate-table th:nth-child(2),.candidate-count { padding-right:16px!important; }
.region-path { outline:none!important; }
.map-highlight { pointer-events:none; }
.region-outline { fill:none; stroke:#252525; stroke-width:2.5; stroke-linejoin:round; vector-effect:non-scaling-stroke; pointer-events:none; }
.map-legend { align-items:center; gap:8px 12px; font-size:.65rem; }
.legend-label { font-weight:bold; color:#444; }
.legend-item { align-items:center; }
.legend-swatch { display:inline-block; width:25px; height:9px; }
.legend-empty { background:#deded9; }
.legend-tie { background:repeating-linear-gradient(45deg,#d4c7b5 0 4px,#fcf8ef 4px 8px); border:1px solid #c7bba9; }
.legend-strength,.legend-population { color:#666; }
.map-tooltip { position:fixed; z-index:100; width:min(330px,calc(100vw - 24px)); box-sizing:border-box; background:#fff; color:#171717; padding:17px; border:1px solid #b9b8b2; border-top:3px solid #171717; box-shadow:0 4px 22px #0002; pointer-events:none; max-height:calc(100dvh - 24px); overflow:auto; font: .74rem/1.4 var(--sans); }
.map-tooltip.is-pinned { pointer-events:auto; }
.map-tooltip h4 { margin:0 0 12px; font:700 1.2rem/1.15 var(--serif); }
.tooltip-note { color:#666; margin:8px 0; font-size:.7rem; }
.tooltip-votes { display:grid; gap:9px; font-variant-numeric:tabular-nums; }
.tooltip-vote { display:grid; grid-template-columns:minmax(0,1fr) auto 43px; gap:10px; align-items:baseline; }
.tooltip-vote strong { text-align:right; }
.tooltip-choice { display:flex; align-items:baseline; gap:6px; }
.tooltip-choice .legend-dot { margin:0; }
.tooltip-total { display:flex; justify-content:space-between; gap:12px; border-top:1px solid #ddd; padding-top:10px; margin-top:12px; }
.tooltip-methods { display:flex; justify-content:space-between; gap:14px; font-size:.65rem; color:#666; margin-top:12px; }
.tooltip-methods strong { display:block; color:#333; font-size:.74rem; font-weight:500; }
.tooltip-drill { margin-top:12px; padding:8px 10px; border:1px solid #aaa; background:#fff; font-size:.7rem!important; }
.results-attribution { font:.76rem/1.5 var(--sans); color:#555; margin:24px 0 6px; }
.results-attribution a { text-underline-offset:3px; }
@media(max-width:780px) {
 .results-intro { padding-top:30px; }
 .candidate-bar { width:48px; min-width:48px; }
}
@media(max-width:440px) {
 .candidate-bar { width:36px; min-width:36px; height:7px; }
 .candidate-table th:nth-child(2),.candidate-count { padding-right:10px!important; }
 .share-line { gap:7px; }
 .share-value { min-width:42px; }
 .candidate-name { font-size:1.08rem; }
}

/* Match the other pages: serif headings at their sizes, Roboto body text at
   one size, and all text black. */
.results-intro h2 { font:700 1.6rem/1 var(--serif); letter-spacing:normal; }
.contest-heading h2 { font:700 1.5rem/1.1 var(--serif); letter-spacing:normal; }
.race-picker-caret { width:28px; height:28px; flex-basis:28px; }
.race-picker-caret::after { width:9px; height:9px; }
.results-main :not(h1,h2,h3,h4,h1 *,h2 *,h3 *,h4 *,svg,svg *),
.map-tooltip, .map-tooltip :not(h4,h4 *) {
  font-family:var(--sans)!important;
  font-size:1rem!important;
}
.results-main, .results-main *, .map-tooltip, .map-tooltip * { color:#000!important; }
.results-main .map-view-buttons button[aria-pressed="true"] { color:#fff!important; }
