.map-workspace{margin-bottom:20px}.map-view-tabs{display:flex;gap:5px;background:#e7edf4;padding:4px;border-radius:12px;width:fit-content;margin:0 0 14px}.map-view-tabs button{border:0;background:none;padding:10px 24px;border-radius:9px;min-height:44px;font-size:13px;font-weight:650;color:#536174}.map-view-tabs button.active{background:#fff;color:#162c41;box-shadow:0 2px 5px #1b334011}.map-card{background:white;border:1px solid var(--line);border-radius:17px;padding:23px}.map-card[hidden]{display:none}.map-card-title{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.map-card h2{font-size:25px;margin:0 0 7px;letter-spacing:-.6px}.map-card-title p{font-size:12px;color:var(--muted);margin:0;line-height:1.6}.map-coverage{font-size:20px;font-weight:700;text-align:right;white-space:nowrap}.map-coverage small{display:block;font-size:10px;font-weight:400;margin-top:5px;color:var(--muted)}.map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 5px}.map-offices{display:flex;gap:4px;flex-wrap:wrap}.map-offices button{border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font-size:12px;min-height:42px;padding:8px 12px}.map-offices button.active{border-color:#274c72;color:#203b59;background:#eaf0f7;font-weight:650}.map-toolbar label,.map-district{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted)}.map-toolbar select,.map-district select{min-height:42px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);padding:7px 10px;max-width:210px;font-size:13px}.us-poll-map{display:block;width:100%;max-height:450px;margin:5px auto 0;overflow:visible}.map-state{--map-color:#c6ced8;cursor:pointer;outline:none}.state-shape{fill:var(--map-color);stroke:#fff;stroke-width:1.7;stroke-linejoin:round;transition:fill .35s}.map-state.is-selected .state-shape,.map-state:focus .state-shape{stroke:#1b2c45;stroke-width:3;paint-order:stroke fill}.map-state:hover .state-shape{filter:brightness(.94)}.state-label,.state-code{font-size:12px;font-weight:650;fill:#172c45;paint-order:stroke;stroke:#ffffffc9;stroke-width:2.3;stroke-linejoin:round;pointer-events:none}.state-code{display:none;font-size:17px;stroke-width:3}.map-callout{fill:none;stroke:#7b8798;stroke-width:1;pointer-events:none}.map-no-election{--map-color:#f1f3f6}.map-no-polls .state-shape,.map-pending .state-shape,.map-old .state-shape,.map-unverified .state-shape,.map-invalid .state-shape,.map-source-stale .state-shape,.map-source-error .state-shape{fill:url('#map-hatch')}.map-party-D{--map-base:var(--party-dem);--map-pale:var(--map-dem-light);--map-mid:var(--map-dem-medium)}.map-party-R{--map-base:var(--party-rep);--map-pale:var(--map-rep-light);--map-mid:var(--map-rep-medium)}.map-party-L{--map-base:var(--party-lib);--map-pale:#f3e2aa;--map-mid:#d2b65c}.map-party-G{--map-base:var(--party-green);--map-pale:#bfe4cc;--map-mid:#72b891}.map-party-I{--map-base:var(--party-independent);--map-pale:#ded0f3;--map-mid:#ac89dc}.map-party-C{--map-base:var(--party-constitution);--map-pale:#ecd9ba;--map-mid:#c09a63}.map-party-N{--map-base:var(--party-nonpartisan);--map-pale:#c1e7e9;--map-mid:#76b6bc}.map-light{--map-color:var(--map-pale);background:var(--map-pale)}.map-medium{--map-color:var(--map-mid);background:var(--map-mid)}.map-strong{--map-color:var(--map-base);background:var(--map-base)}.map-legend{display:flex;flex-wrap:wrap;gap:10px 23px;justify-content:center;font-size:10px;margin:6px 0}.map-legend>span{display:flex;align-items:center;gap:4px}.map-legend b{font-weight:550;margin-left:3px}.map-legend i{display:inline-block;width:16px;height:14px;border-radius:3px}.map-gray{background:#c6ced8}.map-scale{font-size:10px;text-align:center;color:var(--muted);margin:9px 0 17px;line-height:1.6}.map-selection{border:1px solid #dce4ec;border-radius:12px;background:#f8fafc;padding:16px 18px}.map-selection-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.map-selection h3{margin:5px 0;font-size:19px}.map-selection .eyebrow{font-size:9px}.map-selection .button{font-size:12px;min-height:42px}.map-reason{font-size:12px;margin:9px 0;color:var(--party-text,#617084);font-weight:600}.map-candidates{display:grid;grid-template-columns:1fr 1fr;gap:12px 30px;margin-top:10px}.map-candidate{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.map-candidate>span{display:flex;gap:8px;align-items:center;min-width:0}.map-candidate img,.map-initials{width:32px;height:32px;border-radius:50%;object-fit:cover;background:#e7edf4;flex:none}.map-initials{display:grid;place-items:center;font-size:10px;color:#536174}.map-candidate b{display:block;font-size:12px;color:var(--party-text,var(--ink));overflow-wrap:anywhere}.map-candidate small{font-size:10px;color:var(--party-text,var(--muted))}.map-candidate strong{font-size:21px;color:var(--candidate-color,var(--ink));white-space:nowrap}.map-dates{font-size:10px;color:var(--muted);line-height:1.65;margin:12px 0 0}.map-explainer{font-size:11px;line-height:1.7;margin-top:12px;color:var(--muted)}.map-explainer summary{cursor:pointer;min-height:34px;padding:6px 0;font-size:12px;font-weight:650}.map-explainer p{margin:8px 0}.map-explainer a{color:var(--green)}.map-party-key{display:flex;flex-wrap:wrap;gap:7px}.map-party-key .candidate-party{font-size:10px}.map-notice,.map-house-note{font-size:11px;line-height:1.6;color:var(--muted);margin:10px 0}.map-notice{background:#fff5e7;padding:8px 12px;border-radius:8px}
@media(max-width:680px){.map-card{padding:16px 12px}.map-card h2{font-size:21px}.map-card-title p{font-size:11px}.map-coverage{font-size:17px}.map-coverage small{font-size:9px;white-space:normal;max-width:90px}.map-toolbar{display:block;margin-top:14px}.map-toolbar>label{margin-top:9px;justify-content:space-between}.map-toolbar select{max-width:none;min-width:160px;font-size:16px}.map-offices{display:grid;grid-template-columns:1fr 1fr 1.5fr}.map-offices button{font-size:11px;padding:7px 5px;min-height:44px}.us-poll-map{margin:12px 0;min-height:180px}.state-label{display:none}.state-code{display:block}.map-legend{gap:9px;font-size:9px}.map-legend i{width:12px;height:12px}.map-scale{font-size:9px}.map-selection{padding:12px}.map-selection-heading{flex-wrap:wrap;gap:8px}.map-selection h3{font-size:18px}.map-selection .button{font-size:11px;padding:8px 10px}.map-candidates{grid-template-columns:1fr;gap:12px}.map-candidate b{font-size:13px}.map-candidate strong{font-size:23px}.map-reason{font-size:11px}.map-district select{font-size:16px}.map-view-tabs{width:100%}.map-view-tabs button{flex:1}.map-explainer summary{min-height:44px}}

/* Keep the existing search beside a compact heading while the map is present. */
#main:has(.map-workspace) .coverage-header{margin-bottom:12px}#main:has(.map-workspace) .coverage-header .eyebrow,#main:has(.map-workspace) .coverage-header p{display:none}#main:has(.map-workspace) .coverage-header h1{font-size:25px;margin:0}.map-card{padding:18px}.map-toolbar{margin-top:12px}.map-card h2{font-size:23px}.us-poll-map{max-height:400px}.map-scale{margin-bottom:12px}
@media(max-width:680px){#main:has(.map-workspace) .coverage-header h1{font-size:24px}.map-card{padding:14px 12px}.map-view-tabs{margin-bottom:10px}}

.map-photo-credits{font-size:10px;color:var(--muted);line-height:1.6;margin-top:7px}.map-photo-credits summary{cursor:pointer;min-height:26px}.map-photo-credits a{color:var(--green)}@media(max-width:680px){.state-code{font-size:30px;stroke-width:3}.map-photo-credits summary{min-height:40px;padding-top:10px}}

.map-photo{position:relative;width:32px;height:32px;flex:none;overflow:hidden;border-radius:50%}.map-photo img{position:absolute;inset:0}

.state-label{font-size:16px}

.map-party-O{--map-base:#625b89;--map-pale:#dedbef;--map-mid:#aaa3cb}
/* One-click state workspace. Neutral navigation is distinct from polling colors. */
.map-state.map-districts{--map-color:#e8edf3}.map-state.map-districts.is-selected{--map-color:#cfdcea}.map-state.map-districts .state-shape{stroke:#fff;stroke-width:2}.map-national-hint{margin:14px 0 22px;text-align:center;font-size:13px;color:#41556f;background:#f2f5f9;padding:12px;border-radius:10px}.district-map-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 4px}.district-map-heading h3{font-size:22px;margin:0}.district-zoom{display:flex;gap:5px}.district-zoom button,.district-chips button{border:1px solid #d5dfea;border-radius:8px;background:#fff;min-height:40px;min-width:40px;color:var(--ink);font:inherit;cursor:pointer}.district-zoom button{padding:5px 10px}.district-poll-map{display:block;width:100%;height:340px;background:linear-gradient(180deg,#f8fafc,#fff);border-radius:12px;overflow:hidden;margin:12px 0}.district-shape{cursor:pointer;outline:none}.district-shape path{fill:var(--map-color,#cbd3df);stroke:#fff;stroke-width:1.2;vector-effect:non-scaling-stroke;stroke-linejoin:round}.district-shape:not(.map-lead):not(.map-close) path{fill:url('#district-hatch')}.district-shape.map-lead path{fill:var(--map-color)}.district-shape text{font:600 14px Arial,sans-serif;text-anchor:middle;dominant-baseline:middle;fill:#162b46;paint-order:stroke;stroke:#fff;stroke-width:3px;pointer-events:none}.district-shape:hover path,.district-shape:focus path,.district-shape.is-selected path{stroke:#173e68;stroke-width:2.5;paint-order:stroke fill}.district-chips{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}.district-chips button{font-size:12px;min-width:34px;min-height:34px}.district-chips button.active{background:#244d79;color:#fff;border-color:#244d79}.district-map-source{font-size:10px;color:var(--muted);line-height:1.6}.district-map-source a{color:#476685}.district-map-placeholder{display:grid;place-items:center;min-height:180px;background:#f4f7fa;border-radius:12px;color:var(--muted);padding:20px;font-size:13px}.district-overview{margin-top:24px;border-top:1px solid var(--line);padding-top:22px}.district-overview-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.district-overview-heading h3{font-size:23px;margin:5px 0 12px}.district-overview-heading h3>span{font-size:13px;border-radius:6px;background:#eaf0f6;padding:4px 8px;color:#536680}.district-overview-heading .eyebrow{font-size:10px}.district-filters{display:flex;gap:12px;justify-content:space-between;margin:12px 0 18px}.district-filters input{min-width:0;max-width:390px;flex:1;border:1px solid var(--line);border-radius:9px;min-height:44px;padding:9px 13px;font:inherit;font-size:13px}.district-filters>div{display:flex;background:#edf2f7;border-radius:9px;padding:3px;gap:3px}.district-filters button{border:0;background:transparent;color:#506178;border-radius:7px;padding:8px 12px;font:inherit;font-size:12px;min-height:38px;cursor:pointer}.district-filters button[aria-pressed=true]{background:white;color:#173c65;box-shadow:0 1px 4px #1232;font-weight:650}.district-race-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}.map-race-card{background:#fff;scroll-margin-top:20px;min-width:0;outline:none}.map-race-card.is-active{border-color:#7796b9;box-shadow:0 0 0 1px #7796b955}.map-selection-actions{display:flex;gap:6px}.map-race-card h3>button{background:none;border:0;padding:6px 0;font:inherit;font-weight:700;color:var(--ink);min-height:44px;cursor:pointer}.map-race-card .map-candidates{display:block;margin-top:16px}.map-race-card .real-candidate{margin-bottom:18px}.map-race-card .real-candidate-main{display:flex;justify-content:space-between;align-items:center;gap:12px}.map-race-card .real-candidate strong{font-size:27px;white-space:nowrap;color:var(--candidate-color,var(--ink))}.map-race-card .real-candidate strong small{font-size:17px}.map-race-card .real-candidate-name{font-size:15px;line-height:1.35}.map-race-card .candidate-party{font-size:10px}.map-race-card .real-bar{height:8px;margin-top:9px}.map-race-card .map-photo-credits{border-top:1px solid var(--line);padding-top:8px}.map-unmeasured{font-size:10px;color:var(--muted);text-align:right;max-width:105px;line-height:1.4;flex-shrink:0}.map-card-footer{border-top:1px solid var(--line);padding-top:12px;display:flex;align-items:center;justify-content:space-between;gap:10px}.map-card-footer b{font-size:11px;font-weight:600}.map-card-footer small{display:block;font-size:10px;line-height:1.6;color:var(--muted);margin-top:5px}.map-card-footer button,.map-race-card .text-button{font-size:11px;min-height:40px}.map-race-card:not(.is-compact){max-width:900px;margin:0 auto}.map-race-card:not(.is-compact) .real-candidate strong{font-size:33px}.map-race-card:not(.is-compact) .real-candidate-name{font-size:18px}
@media(max-width:900px){.district-race-grid{grid-template-columns:1fr}}
@media(max-width:680px){.district-map-heading{flex-wrap:wrap}.district-map-heading h3{font-size:20px}.district-map-heading>.button{font-size:11px;min-height:44px}.district-zoom{width:100%;justify-content:flex-end}.district-zoom button{min-height:44px}.district-poll-map{height:280px}.district-chips button{min-height:44px;min-width:40px}.district-overview-heading{align-items:flex-start}.district-overview-heading h3{font-size:20px}.district-overview-heading>.map-dates{max-width:95px;text-align:right}.district-filters{flex-wrap:wrap}.district-filters input{flex-basis:100%;max-width:none;font-size:16px}.district-filters>div{width:100%}.district-filters button{flex:1;min-height:42px}.map-race-card{padding:12px}.map-race-card .real-candidate-main{gap:8px}.map-race-card .candidate-person{gap:8px}.map-race-card .candidate-portrait{flex-basis:36px;width:36px;height:36px}.map-race-card .real-candidate-name,.map-race-card:not(.is-compact) .real-candidate-name{font-size:14px}.map-race-card .real-candidate strong,.map-race-card:not(.is-compact) .real-candidate strong{font-size:24px}.map-unmeasured{max-width:75px;font-size:9px}.map-card-footer{align-items:flex-start}.map-race-card .map-photo-credits summary{min-height:44px}}
