:root {
  color-scheme: dark;
  --bg: #0d111d;
  --nav: #0c101b;
  --paper: #171e30;
  --ink: #f0f2fb;
  --muted: #aeb8d1;
  --line: #313d58;
  --orange: #ffbc79;
  --dem: #6396ff;
  --rep: #ee7489;
  --other: #8894b2;
  --surface: #222a3f;
  --accent: #ffbc79;
}
body {background: radial-gradient(ellipse at 82% 6%, #242b48 0, transparent 44rem), var(--bg)}
.top {background: var(--nav); box-shadow: 0 1px 0 #343a54}
.brand {color: var(--ink)}
.mark {background: #2c2637; border-color: #a57b65; color: var(--accent)}
.method {color: var(--muted)}
.view-nav, .toolbar, .leg-location {border-color: var(--line)}
.view-nav a[aria-current=page]::after {background: var(--accent)}
.hero h1 span {color: var(--accent)}
.hero .dot {background: var(--accent); box-shadow: 0 0 14px #ffbc7960}
.hero .eyebrow {letter-spacing: .17em}
.year {min-width: 118px}
.year .eyebrow {display: block; margin-bottom: 6px}
.year select {width: 100%; font-weight: 780; min-height: 42px}
select, input, #back, #reset-map, .chamber-bottom button {
  border-color: #46516e; background: var(--surface); color: var(--ink);
}
input::placeholder {color: #aab5ce}
#back:hover, #reset-map:hover, .chamber-bottom button:hover {background: #303b56; border-color: #7381a8}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {outline-color: var(--accent)}
.crumb-btn, footer a, .race-source {color: #a5beff}
.card, .result, .chamber-card {
  background: linear-gradient(155deg, #1e2437, var(--paper) 64%);
  box-shadow: 0 16px 36px #080b1560, 0 1px 1px #111626;
}
.mapframe {
  background-color: #121929;
  background-image: radial-gradient(#7c8bb83b .75px, transparent .75px);
  border-color: #333e57;
}
.geo {stroke: #171d30}
.geo:hover, .geo:focus-visible, .geo.active {stroke: #ffd0a3}
.statelabel {fill: #fff; stroke: #151d32; stroke-width: 2.5px; dominant-baseline: central}
.state-leader {stroke: #bac5dc; stroke-width: 1; pointer-events: none}
.stack {background: #29324a}
.result-row, th, td {border-color: var(--line)}
.stat, thead th {background: var(--surface); border-color: var(--line); color: var(--ink)}
.winner {background: #313a54}
.winner.dem-text {background: #263a61; color: #b6cfff}
.winner.rep-text {background: #482c41; color: #ffb9c5}
.dem-text {color: #a9c5ff}
.rep-text {color: #ffa8b8}
tr:hover td, tr.selected td, .race summary:hover, .race[open] summary {background: #272f46}
.toggle {background: #1c2337; box-shadow: inset 0 0 0 1px var(--line)}
.toggle button[aria-pressed=true] {background: #38476d; color: #fff}
.election-context {background: #202942; border-color: #3c4866; color: var(--muted)}
.election-context strong {color: var(--ink)}
.race, .candidate-line {border-color: var(--line)}
.race summary:focus-visible {outline-color: var(--accent)}
.chevron {color: #a5beff}
.chamber-seat.other {fill: #a88cdb}
.party-counts .other {background: #a88cdb}
.chamber-seat.vacant {fill: #53607a; stroke: #aeb8d1}
.party-counts .vacant {background: #53607a; border-color: #aeb8d1}
@media(max-width:550px) {
  .year {min-width: 0}
  .year .eyebrow {margin: 0}
  .year select {width: auto; min-height: 34px; padding-block: 4px}
}

/* Shared explorer layout */
:root {
  --bg: #10131c;
  --nav: #121621;
  --paper: #1a2030;
  --muted: #bec7dc;
  --line: #36405a;
  --surface: #252d42;
  --map-surface: #131a2a;
}
body {
  background:
    radial-gradient(ellipse at 84% 0%, #273c664f, transparent 46rem),
    radial-gradient(ellipse at 0% 17%, #5022372c, transparent 32rem),
    var(--bg);
}
.mark {background: #252c3f; border-color: #5b6887; color: var(--ink)}
.method span {color: var(--muted)}
.explorer-header {
  display: flex; justify-content: space-between; align-items: end; gap: 18px;
  padding: 20px 0 14px;
}
.explorer-title h1 {font-size: clamp(1.6rem,4vw,2.55rem); line-height: 1.08; letter-spacing: -.05em; margin: 4px 0}
.explorer-title p {font-size: 13px; color: var(--muted); margin: 0}
.explorer-controls {display: flex; flex: 0 0 auto; align-items: end; gap: 8px}
.control {display: grid; gap: 4px}
.control label {font-size: 10px; letter-spacing: .1em}
.control select {height: 38px; padding: 5px 9px; font-size: 13px; font-weight: 700}
.control:last-child select {width: min(175px,30vw); max-width: none}
.toolbar {padding: 8px 0; min-height: 44px}
.mapframe {background-color: var(--map-surface)}
.result-slot {min-width: 0}
.result-slot .result {height: 100%}
.result-location {letter-spacing: .09em; overflow-wrap: anywhere}
.result-location span {color: #7987a6}
.result .result-headline {font-size: clamp(1.55rem,3vw,2.15rem); margin: 7px 0 12px; line-height: 1.07}
.result-shift {
  display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center;
  gap: 8px; padding: 9px; margin-top: 12px; background: #20283d;
  border: 1px solid var(--line); border-radius: 9px;
}
.shift-icon {display: grid; place-items: center; font-size: 19px; background: #303a55; border-radius: 7px; aspect-ratio: 1}
.result-shift div span, .result-shift small {display: block; font-size: 10px; color: var(--muted)}
.result-shift div b {display: block; font-size: 12px}
.result-shift small {text-align: right; font-variant-numeric: tabular-nums}
.seat-context {text-align: center; color: var(--muted); font-size: 12px; font-weight: 750; margin: 0 0 4px}
@media (max-width: 760px) {
  .explorer-header {flex-wrap: wrap; gap: 9px; padding: 13px 0 10px}
  .explorer-title > .eyebrow, .explorer-title p {display: none}
  .explorer-controls {gap: 7px}
  .control:last-child select {width: min(162px,45vw)}

}
@media (max-width: 430px) {
  .explorer-title {flex: 0 0 100%}
  .grid {gap: 9px}
  .toolbar {min-height: 38px}
  .result-shift {grid-template-columns: 26px minmax(0,1fr) auto; gap: 6px}
}
.toolbar {min-height:54px}
.mapframe #loading {
  position:absolute; z-index:4; right:8px; bottom:8px; max-width:calc(100% - 16px);
  padding:5px 9px; border-radius:6px; background:#1f2942f0; border:1px solid var(--line);
  font-size:12px; color:var(--ink); pointer-events:none;
}
.view-nav {gap:clamp(7px,2vw,22px)}
@media(max-width:550px) {
  .view-nav {justify-content:space-between;gap:4px}
  .view-nav a {font-size:clamp(10px,2.6vw,12px);white-space:nowrap}
}

/* Election categories and their office tabs */
.group-nav {display:flex;flex-wrap:wrap;gap:8px;padding:10px 0 0}
.group-nav a {display:block;padding:6px 12px;border:1px solid transparent;border-radius:7px;color:var(--muted);text-decoration:none;font-size:13px;font-weight:750}
.group-nav a:hover {background:var(--surface);color:var(--ink)}
.group-nav a[aria-current=page] {background:var(--surface);border-color:var(--line);color:var(--ink)}
.view-nav {flex-wrap:wrap;justify-content:flex-start;gap:clamp(14px,3vw,24px)}
.view-nav a {font-size:12px}

@media(max-width:550px) {
  .group-nav {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .group-nav a {display:grid;place-items:center;min-height:44px;padding:4px 3px;font-size:11px;line-height:1.15;text-align:center}
  .view-nav {gap:0 10px}
  .view-nav a {display:flex;align-items:center;min-height:44px;font-size:11px;white-space:normal}
}

/* Map-first election pages */
.map-explorer .grid {grid-template-columns:minmax(0,1fr);gap:12px}
.map-explorer .mapcard {background:#151d32;border-color:#364765}
.map-explorer .mapframe {
  margin:0 8px;
  overflow:hidden;
  background:radial-gradient(ellipse at 44% 34%,#213959,#172642 64%,#121d35);
  border:1px solid #405778;
}
.map-explorer .mapframe svg {max-height:clamp(470px,72vh,820px);aspect-ratio:1040/625}
.map-explorer .geo {stroke:#e7f3ff94;stroke-width:.85}
.map-explorer .geo:hover,.map-explorer .geo:focus-visible,.map-explorer .geo.active {stroke:#fff;stroke-width:2.3}
.map-explorer .statelabel {stroke:#10182e;stroke-width:2.8px}
.map-cities {pointer-events:none}
.map-cities circle {fill:#fff;stroke:#10182b;stroke-width:1.35}
.map-cities text {fill:#fff;stroke:#111a2e;stroke-width:2.8;stroke-linejoin:round;paint-order:stroke;dominant-baseline:central;font-weight:750}
.map-explorer .explorer-header {padding:15px 0 10px}
.map-explorer .cardhead {padding:12px 16px 5px}
.map-explorer .mapcard h2 {font-size:clamp(1.15rem,2.2vw,1.6rem)}
.map-controls {display:flex;align-items:end;justify-content:space-between;gap:8px;margin:4px 8px 8px;padding:5px 8px}
.map-controls .toolbar {min-height:0;border:0;padding:0}
.map-controls .control {min-width:0}
.map-controls .control select {min-height:44px;width:100%;max-width:none;background-color:#1d2a44;border-color:#435779;border-radius:10px;color:#fff}
.map-controls .explorer-controls {display:grid;grid-template-columns:minmax(82px,.64fr) minmax(145px,1fr)}
.map-controls .trail {min-width:0}
.map-legend {display:flex;align-items:center;flex-wrap:wrap;gap:5px 12px}
.map-legend-key {display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.margin-swatches {display:inline-block;width:30px;height:9px;border-radius:2px}
.dem-swatch {background:linear-gradient(to right,#b4e2ff 25%,#73c4fa 25% 50%,#369eea 50% 75%,#1668ba 75%)}
.rep-swatch {background:linear-gradient(to right,#ffc2bd 25%,#f58482 25% 50%,#ec5155 50% 75%,#b92938 75%)}
.map-neutral {background:#354460}
.map-explorer .mapfoot {padding:8px 12px;color:#c2cfe8}

@media(max-width:760px) {
  .map-explorer .mapframe {margin:0 3px;border-radius:8px}
  .map-explorer .mapframe svg {aspect-ratio:548/428}
  .map-explorer .cardhead {padding:9px 9px 3px}
  .map-controls {display:grid;grid-template-columns:minmax(0,1fr);padding:2px;margin:3px 5px 6px}
  .map-controls .explorer-controls {grid-template-columns:minmax(0,1fr) minmax(0,1.55fr)}
  .map-controls .control select {font-size:16px}
  .map-controls .toolbar:has(#back[hidden]) {display:none}
  .map-controls #back {min-height:35px}
  .map-explorer .mapfoot {font-size:10px;padding:6px 8px}
  .map-explorer .mapcard .tag {font-size:8px;white-space:normal;text-align:center}
}

.map-explorer .map-context .geo {stroke:#edf5ffcb;stroke-width:1.05}
.map-has-state .map-context .geo:not(.map-state-selected) {filter:brightness(.65)}
.map-has-state .map-context .geo:not(.map-state-selected):is(:hover,:focus-visible) {filter:brightness(.92);stroke:#fff;stroke-width:2}
/* SVG buttons use the geographic stroke for focus instead of the browser's bounding rectangle. */
:is(.map-context,.map-detail,.map-volume-circles) [role=button]:focus {outline:none}
:is(.map-context,.map-detail) [role=button]:focus-visible {stroke:#fff;stroke-width:2.5}
.map-state-selected,.map-state-outline {pointer-events:none}
.map-state-outline {fill:none;stroke:#f3f7ff;stroke-width:2.5;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.map-context .statelabel {fill:#eef4ff}

.office-switcher {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;width:100%;max-width:390px;background:#10162d;padding:4px;border-radius:99px;border:1px solid #343e61}
.office-switcher :is(a,button) {display:grid;place-items:center;min-height:44px;border:0;border-radius:99px;background:transparent;color:#ccd6f0;font:inherit;font-weight:750;text-align:center;text-decoration:none;padding:5px 2px}
.office-switcher :is(a,button):hover {color:#fff;background:#253454}
.office-switcher :is(a[aria-current=page],button[aria-pressed=true]) {color:#fff;background:#394a76}
.federal-office-switcher {margin:8px 16px 2px;width:calc(100% - 32px)}
@media(max-width:600px) {
  .office-switcher {max-width:none}
  .federal-office-switcher {margin-inline:9px;width:calc(100% - 18px)}
}
.site-search-dialog {width:min(92vw,550px);max-height:82dvh;background:#172039;color:#edf3ff;border:1px solid #4d5d85;border-radius:17px;padding:17px;box-shadow:0 24px 85px #050913;overscroll-behavior:contain}
.site-search-dialog::backdrop {background:#050916bb}
.site-search-head {display:flex;justify-content:space-between;align-items:center;gap:8px}
.site-search-head h2 {font-size:1.35rem;margin:0}
.site-search-head button {min-width:42px;min-height:42px;color:#edf3ff;background:#26334e;border:1px solid #526489;border-radius:99px;font-size:21px;cursor:pointer}
.site-search-dialog label,.site-search-status {display:block;color:#bfcae6;font-size:13px;margin:8px 0}
.site-search-dialog input {box-sizing:border-box;width:100%;min-height:44px;font-size:16px}
.site-search-results {display:grid;gap:5px}
.site-search-results a {display:grid;color:#edf3ff;text-decoration:none;padding:8px 10px;border-radius:8px;border:1px solid #3b496b;background:#222d47}
.site-search-results a:hover,.site-search-results a:focus-visible {background:#344565}
.site-search-results a span {color:#bdc9e4;font-size:12px}
.compare-controls {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 16px}
.compare-controls .control select {width:100%;max-width:none;min-height:44px}
.compare-modes {margin:8px 16px 12px;width:calc(100% - 32px)}
.compare-back {background:#243353;color:#eff4ff;border:1px solid #51648b;border-radius:99px;padding:6px 12px;min-height:40px;white-space:nowrap}
.compare-results {margin-top:12px}
.compare-table-wrap {overflow-x:auto}
.compare-table {width:100%;border-collapse:collapse}
.compare-table :is(th,td) {text-align:right;padding:7px 8px;border-bottom:1px solid #344363;white-space:nowrap}
.compare-table th:first-child {text-align:left}
@media(max-width:550px) {
  .group-nav {grid-template-columns:repeat(4,minmax(0,1fr))}
  .compare-controls {grid-template-columns:repeat(2,minmax(0,1fr));margin-inline:10px}
  .compare-controls .control:last-child {grid-column:1/-1}
  .compare-controls .control select {font-size:16px}
}


/* Civic accents frame the maps without changing their data colors. */
@property --atlas-border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 115deg;
}
:root {
  --atlas-red: #ed6f83;
  --atlas-white: #f5f7ff;
  --atlas-blue: #79aaff;
  --atlas-stripes: linear-gradient(90deg,var(--atlas-red) 0 31%,var(--atlas-white) 31% 65%,var(--atlas-blue) 65% 100%);
}
:is(.map-explorer .mapcard,.midterm-map-card,.state-map-card,.home-map-preview) {position:relative}
:is(.map-explorer .mapcard,.midterm-map-card,.state-map-card,.home-map-preview)::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  border:1px solid transparent;
  border-radius:inherit;
  pointer-events:none;
}
@supports (mask-composite:exclude) {
  :is(.map-explorer .mapcard,.midterm-map-card,.state-map-card,.home-map-preview)::after {
    border:0;
    padding:1px;
    background:conic-gradient(from var(--atlas-border-angle),
      var(--atlas-blue),#3e547f 19%,var(--atlas-white) 37%,#68516d 51%,
      var(--atlas-red) 67%,#405579 84%,var(--atlas-blue));
    mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    mask-composite:exclude;
    opacity:.83;
    animation:atlas-border-orbit 28s linear infinite;
  }
}
@supports not (mask-composite:exclude) {
  :is(.map-explorer .mapcard,.midterm-map-card,.state-map-card,.home-map-preview)::after {
    border-color:#8197c380;
  }
}
:is(.map-explorer .mapcard,.midterm-map-card,.state-map-card,.home-map-preview) {
  box-shadow:0 14px 36px #060a146b,0 0 24px #6d98f220,0 0 42px #dc587412;
}
@keyframes atlas-border-orbit {to {--atlas-border-angle:475deg}}
@media(prefers-reduced-motion:reduce) {
  :is(.map-explorer .mapcard,.midterm-map-card,.state-map-card,.home-map-preview)::after {animation:none}
}
@media(max-width:550px) {
  .group-nav[aria-label="Main navigation"] {grid-template-columns:repeat(4,minmax(0,1fr))}
}
.federal-office-switcher {grid-template-columns:repeat(4,minmax(0,1fr))}
#compare-federal-nav[hidden],#compare-state-nav[hidden] {display:none}

/* Size the incoming office view before swapping it into the explorer. */
.federal-staging {position:absolute;top:0;left:50%;transform:translateX(-50%);visibility:hidden;pointer-events:none}
.map-explorer .mapcard {overflow-anchor:none}
.map-explorer .cardhead h2 {min-height:1.15em}
@media(max-width:760px) {
  .map-controls .toolbar {min-height:35px}
  .map-controls .toolbar:has(#back[hidden]) {display:flex}
  .map-controls .trail {flex-wrap:nowrap}
  .map-controls .trail nav {overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .map-controls #back {flex:0 0 auto}
}

.group-nav .atlas-more{position:relative;margin-left:auto;z-index:5;color:var(--muted);font-size:13px;font-weight:700}
.atlas-more summary{display:grid;grid-auto-flow:column;place-content:center;gap:3px;min-height:36px;padding:6px 10px;list-style:none;cursor:pointer}
.atlas-more summary::-webkit-details-marker{display:none}
.atlas-more[open] summary{color:var(--ink)}
.atlas-more>div{position:absolute;right:0;top:100%;min-width:max-content;padding:4px;background:#151d32;border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 20px #090d1c99}
.federal-filters{display:grid;grid-template-columns:minmax(0,1fr);align-items:center}
.filter-row{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.filter-row .federal-office-switcher{margin:0;width:min(100%,320px);grid-template-columns:repeat(3,minmax(0,1fr))}
.filter-row .explorer-controls{margin:0;max-width:none}
.federal-filters .filter-compare{display:grid;place-items:center;min-height:35px;padding:0 10px;color:var(--muted);font-size:12px;font-weight:750}
.filter-row .mobile-office{display:none}
.map-controls .toolbar{min-height:35px}
.map-controls .trail{flex-wrap:nowrap}
.map-controls #crumb{display:flex;min-width:0;align-items:center;gap:6px;white-space:nowrap;overflow:hidden}
.map-controls #crumb span:last-child{overflow:hidden;text-overflow:ellipsis}
.map-controls #crumb button{flex:none;min-height:35px}
.explorer-list td{cursor:pointer}
@media(max-width:760px){
  .group-nav .atlas-more{margin-left:0}
  .atlas-more summary{min-height:44px;font-size:11px}
  .atlas-more>div a{justify-items:start;padding-inline:10px}
  .explorer-list :is(th,td).table-extra{display:none}
  .explorer-list table:has(.table-extra){min-width:0;width:100%}
  .explorer-list table:has(.table-extra) :is(th,td){padding-inline:7px;white-space:normal}
  .explorer-list table:has(.table-extra) :is(th,td):last-child{text-align:right;white-space:nowrap}
  .explorer-list table:has(.table-extra) .rowbtn{min-height:44px;text-align:left;white-space:normal}
}
@media(max-width:600px){
  .filter-row{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.75fr) minmax(0,1.3fr);gap:4px 7px}
  .filter-row .federal-office-switcher{display:none}
  .filter-row .mobile-office{display:grid}
  .filter-row .explorer-controls{display:contents}
  .federal-filters .filter-compare{min-height:35px;padding-inline:5px}
}

.map-volume-controls{display:flex;align-items:center;flex-wrap:wrap;gap:5px 12px;margin:6px 16px 9px;font-size:12px;color:#c8d5ee}
.map-volume-controls>div{display:inline-flex;gap:3px;padding:3px;border:1px solid #435779;border-radius:12px;background:#10182c}
.map-volume-controls button{min-height:36px;border:0;border-radius:8px;padding:4px 11px;background:transparent;color:#c8d5ee;font:inherit;font-weight:750}
.map-volume-controls button[aria-pressed=true]{background:#384a73;color:#fff}
.map-volume-controls button:hover{color:#fff}
.map-volume-controls button:disabled{opacity:.5;cursor:default}
.map-volume-controls .map-swing-years{align-items:center;gap:7px;padding:0;border:0;background:none}
.map-swing-years label{display:flex;align-items:center;gap:4px;font-weight:750}
.map-swing-legend{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;flex-basis:100%}
.map-swing-legend b:first-child{color:#a5d9ff}
.map-swing-legend b:nth-child(2){color:#ffb8bf}
.mapcard:has(.show-swing-controls) .control:has(#election-year){display:none}
.mapcard:has(.show-swing-controls) .mapfoot>:not(#map-swing-note){display:none}
.map-volume-controls select{min-height:36px;max-width:min(100%,240px);padding:4px 26px 4px 9px;color:#f2f5ff;background-color:#18243b;border:1px solid #435779;border-radius:9px;font-size:13px}
.map-detail{transition:opacity 240ms ease}
.map-show-symbols .map-context [data-level=state]{fill:#222735;transition:none}
.map-show-symbols .map-context .map-state-selected{fill:#303543}
.map-show-symbols .map-detail{opacity:.48}
.map-show-symbols:not(.map-show-towers) .map-detail [data-id]{fill:#303543;stroke:#777d8c;filter:none}
.map-show-symbols .map-detail,.map-show-symbols .map-detail *{pointer-events:none!important}
.map-show-symbols .map-cities{opacity:.55}
.map-show-towers .map-detail{opacity:.55}
.map-tower-key{flex-basis:100%;font-size:11px;color:#d6e0f5}
.map-volume-circles .map-vote-tower{
  cursor:pointer;stroke:none;filter:none;outline:none;
  transform-origin:var(--tower-x) var(--tower-y);
  animation:map-tower-rise 650ms cubic-bezier(.19,1,.32,1) var(--volume-delay) both
}
.map-vote-tower .map-tower-hit{fill:transparent;stroke:none;pointer-events:all}
.map-vote-tower path{pointer-events:none;stroke:#edf6ff60;stroke-width:.4;vector-effect:non-scaling-stroke}
.map-vote-tower .map-tower-front{fill:var(--tower-color)}
.map-vote-tower .map-tower-side{fill:color-mix(in srgb,var(--tower-color),#050b1b 37%)}
.map-vote-tower .map-tower-cap{fill:color-mix(in srgb,var(--tower-color),white 36%)}
.map-volume-circles .map-vote-tower:is(:hover,:focus-visible,.active){filter:drop-shadow(0 0 3px #b9dfff);outline:none}
.map-vote-tower:is(:hover,:focus-visible,.active) path{stroke:#fff;stroke-width:1}
@keyframes map-tower-rise{from{opacity:0;transform:scaleY(.02)}to{opacity:1;transform:scaleY(1)}}
.map-volume-leader{stroke:#fff;stroke-dasharray:2 3;vector-effect:non-scaling-stroke;pointer-events:none}
.map-volume-circles :is(.map-volume-circle,.map-swing-mark){
  cursor:pointer;fill-opacity:.92;stroke:#f3f6ffe0;stroke-width:1;vector-effect:non-scaling-stroke;filter:none;
  transform-box:fill-box;transform-origin:center;
  animation:map-volume-pop 420ms cubic-bezier(.24,.8,.32,1) var(--volume-delay) both
}
.map-volume-circles :is(.map-volume-circle,.map-swing-mark):is(:hover,:focus-visible,.active){stroke:white;stroke-width:1.5;fill-opacity:1;outline:none}
.map-volume-circles path.map-swing-mark{fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;pointer-events:bounding-box;filter:drop-shadow(0 1px 1px #030815)}
.map-volume-circles path.map-swing-mark:is(:hover,:focus-visible,.active){stroke-width:3.2}
@keyframes map-volume-pop{
  0%{opacity:0;transform:scale(.1)}
  100%{opacity:1;transform:scale(1)}
}
@media(max-width:760px){
  .map-volume-controls{display:grid;grid-template-columns:max-content minmax(0,1fr);margin-inline:9px;column-gap:7px}
  .map-volume-controls button{min-height:44px}
  .map-volume-controls select{min-height:44px;min-width:0;width:100%;max-width:none}
  .map-volume-controls.show-swing-controls{grid-template-columns:minmax(0,1fr) auto}
  .map-volume-controls>div[aria-label="Map display"]{grid-column:1/-1;justify-content:space-between}
  .map-volume-controls>[aria-label="Find a county or reporting area"],.map-tower-key{grid-column:1/-1}
  .show-swing-controls .map-swing-years{grid-column:1/-1;grid-row:2}
  .show-swing-controls .map-swing-years select{width:auto;font-size:16px}
  .map-swing-legend{grid-column:1/-1;font-size:11px}
  [data-volume-key]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
@media(prefers-reduced-motion:reduce){
  .map-detail{transition:none}
  .map-volume-circles :is(.map-volume-circle,.map-swing-mark){animation:none}
  .map-volume-circles .map-vote-tower{animation:none}
}

@media(max-width:600px){
  .mapcard:has(.show-swing-controls) .filter-row{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}
  .map-volume-controls button{padding-inline:7px}
  .map-volume-controls.show-swing-controls{grid-template-columns:max-content minmax(0,1fr)}
}

/* The same one-level zoom-out control on every election map. */
#back.map-back-button,#compare-back.map-back-button,#midterm-map-back.map-back-button,#state-map-back.map-back-button {
  position:absolute;top:10px;right:10px;z-index:2;
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:40px;padding:8px 12px;border-radius:8px;
  border:1px solid #516181;background:#202b44;color:#f2f6ff;
  box-shadow:0 3px 12px #070d2440;font-size:12px;font-weight:750;
  line-height:1.2;white-space:nowrap;
}
#back.map-back-button:hover,#compare-back.map-back-button:hover,#midterm-map-back.map-back-button:hover,#state-map-back.map-back-button:hover {background:#303e5e;border-color:#91a7ce}
.map-back-button:focus-visible {outline:2px solid #9ed8ff;outline-offset:3px}
@media(max-width:550px){
  #back.map-back-button,#compare-back.map-back-button,#midterm-map-back.map-back-button,#state-map-back.map-back-button {top:6px;right:6px;min-height:44px;padding:7px 10px;font-size:11px}
}

.midterm-map-frame {position:relative}

/* Quiet state boundaries stay thin at every camera zoom level. */
.map-explorer .map-context .geo {stroke:#e5efff7a;stroke-width:.7;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.map-explorer .map-context .geo:is(:hover,:focus-visible) {stroke:#f2f7ffb0;stroke-width:1.05}
.map-explorer .map-detail .geo {stroke:#e7f3ff75;stroke-width:.65;vector-effect:non-scaling-stroke}
.map-explorer .map-detail .geo:is(:hover,:focus-visible,.active) {stroke:#f3f7ffbf;stroke-width:1.2;filter:none}
.map-state-outline {stroke:#edf4ffb5;stroke-width:1.15;vector-effect:non-scaling-stroke}
.map-explorer .map-context .map-state-selected {stroke:#edf4ff80;stroke-width:.8;filter:none}
.map-explorer.map-has-state .map-context .geo:not(.map-state-selected):is(:hover,:focus-visible) {stroke:#f2f7ffb0;stroke-width:1.05}
/* Keep label halos legible without ballooning when the camera zooms. */
.statelabel {vector-effect:none;stroke-linejoin:round;stroke-width:2px}
.map-explorer .statelabel {stroke-width:2px}
.state-leader {vector-effect:non-scaling-stroke;stroke-width:.75px;stroke:#a6bad17d}

/* Shared masthead and primary navigation */
.top {
  position:relative;
  background:#111625;
  box-shadow:none;
}
.top::before {
  content:"";
  position:absolute;
  inset:0 0 0 auto;
  width:min(50%, 560px);
  background:radial-gradient(circle, #8299d842 1px, transparent 1.2px) 0 0 / 12px 12px;
  mask-image:linear-gradient(90deg, transparent, #000);
  pointer-events:none;
}
.mast {
  position:relative;
  min-height:92px;
  height:auto;
  gap:16px;
  padding-block:14px;
}
.brand {
  gap:7px;
  min-width:0;
  line-height:1;
  letter-spacing:0;
  color:#f2f5ff;
}
.brand-symbol {
  display:block;
  width:58px;
  height:58px;
  flex:none;
}
.brand-wordmark {
  display:grid;
  gap:4px;
}
.brand-kicker {
  color:#bac8e6;
  padding-left:2px;
  font-size:11px;
  font-weight:750;
  letter-spacing:.26em;
}
.brand-name {
  font:700 clamp(1.75rem, 4.4vw, 2.55rem)/.9 Georgia, "Times New Roman", serif;
  letter-spacing:-.045em;
}
.brand:hover .brand-kicker {color:#f2f5ff}
.site-search-open {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:none;
  gap:9px;
  min-height:44px;
  margin-left:auto;
  padding:0 14px;
  border:1px solid #475578;
  border-radius:8px;
  background:#1a243b;
  color:#eef2ff;
  font-size:14px;
  font-weight:700;
}
.site-search-open:hover {
  background:#243352;
  border-color:#809fff;
}
.site-search-icon {
  position:relative;
  width:13px;
  height:13px;
  margin:0 3px 3px 0;
  border:2px solid currentColor;
  border-radius:50%;
}
.site-search-icon::after {
  content:"";
  position:absolute;
  top:8px;
  left:8px;
  width:6px;
  height:2px;
  background:currentColor;
  border-radius:2px;
  transform:rotate(45deg);
  transform-origin:left center;
}
.group-nav[aria-label="Main navigation"] {
  align-items:stretch;
  gap:6px;
  padding:0;
  border-block:1px solid #323b55;
}
.group-nav[aria-label="Main navigation"] > a,
.group-nav[aria-label="Main navigation"] .atlas-more summary {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:4px 16px;
  border:0;
  border-radius:0;
  color:#c6cfe6;
  font-size:14px;
  font-weight:700;
  text-align:center;
}
.group-nav[aria-label="Main navigation"] > a:hover,
.group-nav[aria-label="Main navigation"] .atlas-more summary:hover {
  background:#222e49;
  color:#f2f5ff;
}
.group-nav[aria-label="Main navigation"] > a[aria-current="page"] {
  position:relative;
  background:#212c46;
  color:#f2f5ff;
}
.group-nav[aria-label="Main navigation"] > a[aria-current="page"]::after {
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:2px;
  background:#809fff;
}
.atlas-more summary:focus-visible {
  outline:2px solid #9ed8ff;
  outline-offset:-3px;
}
@media(max-width:760px) {
  .mast {min-height:74px;padding-block:10px}
  .mast .method {display:none}
  .brand-symbol {width:48px;height:48px}
  .group-nav[aria-label="Main navigation"] {
    display:grid;
    grid-template-columns:1.45fr repeat(4,minmax(0,1fr));
    gap:2px;
  }
  .group-nav[aria-label="Main navigation"] > a,
  .group-nav[aria-label="Main navigation"] .atlas-more summary {
    min-height:44px;
    padding-inline:2px;
    font-size:clamp(.75rem, 2.9vw, .875rem);
  }
}
@media(max-width:380px) {
  .mast {gap:8px}
  .brand-symbol {width:43px;height:43px}
  .brand-kicker {font-size:10px}
  .brand-name {font-size:1.6rem}
  .site-search-label {display:none}
  .site-search-open {width:44px;padding:0}
}
