/* The site's monochrome shell stays unchanged; blue and red encode data only. */
.maps-page .wrap{max-width:1360px}.maps-page main.wrap{padding-top:28px}.maps-page article{max-width:none}
.maps-hero{padding:32px 0 24px;border-bottom:1px solid var(--line)}
.maps-hero h1{font-size:clamp(36px,4.5vw,62px);margin:8px 0 14px;max-width:none;line-height:1.04}
.maps-hero .intro{max-width:780px;color:#555;font-size:16px;margin-bottom:18px}
.maps-kicker{font:12px var(--mono);color:#626262;letter-spacing:.05em;margin-bottom:10px}
.maps-nav{display:flex;flex-wrap:wrap;gap:8px}.maps-nav a{padding:6px 15px;font-size:13px;background:#f2f2f2;border-radius:99px;text-decoration:none}
.maps-nav a[aria-current=page]{background:#0b0b0b;color:#fff}
.map-workspace{display:grid;grid-template-columns:minmax(0,1fr) 244px;gap:28px;align-items:start}
.map-main{min-width:0}.map-side{padding:18px;background:#f4f4f4}
.map-side h2{font-size:19px;margin:0 0 12px}.map-side p{font-size:12px;line-height:1.6;color:#555}
.map-side .aside-title{font-size:14px;color:#111;font-weight:650;margin-top:22px}
.map-side button{display:block;width:100%;margin-bottom:8px}
button,select,input{font:inherit}button{cursor:pointer}button:focus-visible,select:focus-visible,input:focus-visible,.state-seat:focus-visible{outline:3px solid #101010;outline-offset:3px}
.map-button,.cycle,.paint-color{border:1px solid #d6d6d6;background:#fff;color:#111;padding:9px 12px;font-size:13px;font-weight:550;border-radius:4px}
.map-button.primary{background:#0b0b0b;color:#fff;border-color:#0b0b0b}
.map-totals{margin:0 0 20px}.totals-numbers{display:flex;justify-content:space-between;align-items:flex-end;gap:12px}
.total strong{font:700 46px/1 var(--display);letter-spacing:-.035em}.total small{display:block;font-size:12px;margin-top:6px}
.total.dem strong{color:#174b91}.total.rep strong{color:#a32628}.total.rep{text-align:right}.total.undecided{text-align:center}
.total.undecided strong{font-size:28px;color:#6f4fa3}.majority-line{font:12px var(--mono);text-align:center;color:#555;margin:8px 0}
.totals-track{display:flex;position:relative;height:14px;background:#c9cdd1;overflow:hidden}
.totals-track span{height:100%}.totals-track .dem{background:#174b91}.totals-track .rep{background:#a32628}.totals-track .unknown{background:#a98bd4}
.totals-track::after{content:"";position:absolute;left:var(--majority-position,50%);height:20px;border-left:2px solid #fff;top:-3px}
.totals-meta{display:flex;justify-content:space-between;gap:12px;font-size:12px;margin-top:8px;color:#555}
#palette{display:flex;flex-wrap:wrap;gap:7px;border-top:1px solid #e6e6e6;padding-top:14px}
.paint-color::before{content:"";display:inline-block;background:var(--rating);width:11px;height:11px;margin-right:6px;border-radius:2px;vertical-align:-1px}
#palette button.active{box-shadow:0 0 0 2px #111;border-color:#fff}.cycle.active{background:#111;color:#fff}
#paint-status{font-size:12px;color:#555;margin:12px 0 0}
#map{background:#fafafa;margin-top:16px;padding:12px 10px 6px}
#map svg{display:block;width:100%;height:auto;max-height:550px}
.state-seat{cursor:pointer}.state-fill{fill:var(--rating);stroke:#fff;stroke-width:1.3}.state-seat:hover .state-fill{stroke:#111;stroke-width:2}
.hatch{fill:url(#flip-hatch);pointer-events:none;display:none}.flip .hatch{display:block}
.state-label,.vote-label,.flip-tag{font:650 12px var(--body);fill:#fff;pointer-events:none;paint-order:stroke;stroke:transparent;stroke-width:2}
.vote-label{font-size:10px;font-weight:500}.flip-tag{font-size:7px;font-weight:800}.pale .state-label,.pale .vote-label,.pale .flip-tag{fill:#14233a}
.not-up{fill:#e8ebed;stroke:#fff;stroke-width:1}
.state-seat.uncalled .state-fill{stroke:#555;stroke-dasharray:3 2;stroke-width:2}
.district-seat.uncalled{outline:1px dashed #555;outline-offset:-3px}
.district-seat.uncalled::after{content:"UNCALLED";font-size:6px;font-weight:700;line-height:1.3}
.map-extras{display:flex;gap:7px;flex-wrap:wrap;justify-content:center;padding:8px}
.district-seat{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:42px;padding:5px 8px;border:1px solid #fff;background:var(--rating);color:#fff;font-size:11px;font-weight:650;border-radius:2px}
.district-seat.pale{color:#14233a}.district-seat.flip{background:repeating-linear-gradient(135deg,transparent 0 5px,#ffffff55 5px 7px),var(--rating);outline:2px solid #16283c;outline-offset:-2px}
.district-seat.flip::after{content:"FLIP";font-size:7px;line-height:1.1}.map-extras .district-seat{min-width:58px}
#map-caption{font-size:12px;color:#666;margin:10px 0 0}.map-data-note{background:#f4f4f4;padding:14px 18px;font-size:13px;line-height:1.6;margin-top:22px}
.map-data-note strong{display:block;margin-bottom:3px}.map-data-note a{color:inherit}
.maps-page .race-section h2{margin:36px 0 10px;font-size:28px}
.race-top{display:flex;justify-content:space-between;align-items:end;gap:15px}.race-top label{font-size:12px;display:flex;flex-direction:column;gap:4px}
#race-search{padding:9px;border:1px solid #ccc;border-radius:3px;font-size:14px;width:230px;max-width:100%}
.race-table{max-height:490px;overflow:auto;border:1px solid #e6e6e6;margin:14px 0 0}
.race-table table{font-size:13px}.race-table th,.race-table td{padding:10px 14px}.race-table thead{position:sticky;top:0;z-index:1}
.race-table select{font-size:12px;padding:6px 7px;border:1px solid #ccc;background:#fff;border-radius:3px;max-width:130px}
.table-flip{font:700 9px var(--mono);margin-left:8px;color:#343434}
.house-map{columns:3;column-gap:16px;padding:16px!important}
.state-group{break-inside:avoid;padding:0 0 14px}
.state-group h3{font-size:11px;font-weight:600;line-height:1.3;margin:0 0 5px;color:#555}.district-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
.house-map .district-seat{font-size:8px;min-height:31px;padding:3px 1px;line-height:1.2}
.map-sources{font-size:12px;color:#555;margin:20px 0 32px;line-height:1.7}
.maps-page footer{margin-top:48px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.maps-hub-grid{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:16px 0 40px;border-top:1px solid #ddd}
.maps-hub-grid a{padding:30px 24px 30px 0;border-bottom:1px solid #ddd;text-decoration:none}.maps-hub-grid a:nth-child(even){padding-left:28px;border-left:1px solid #ddd}
.maps-hub-grid h2{margin:0 0 10px;font-size:32px}.maps-hub-grid p{font-size:15px;color:#555;max-width:400px}.maps-hub-grid span{font-size:13px;font-weight:650}
@media(max-width:900px){.map-workspace{grid-template-columns:minmax(0,1fr) 200px;gap:18px}.maps-page .wrap{padding-left:22px;padding-right:22px}.paint-color,.cycle{font-size:11px;padding:8px}.house-map{columns:2}.race-table td,.race-table th{padding:9px}.map-side{padding:14px}}
@media(max-width:650px){.map-workspace{display:flex;flex-direction:column;gap:18px}.map-main,.map-side{width:100%}.map-side{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}.map-side h2,.map-side p{grid-column:1/-1}.map-side button{margin:0}.map-side .aside-title{margin-top:10px}.maps-hero{padding:24px 0 20px}.maps-hero h1{font-size:40px;max-width:12ch}.maps-hero .intro{font-size:14px}.maps-nav{gap:6px}.maps-nav a{padding:5px 11px;font-size:12px}.maps-page main.wrap{padding-top:24px}.total strong{font-size:38px}.totals-meta{font-size:10px}#palette{gap:6px}.paint-color,.cycle{padding:8px 7px;font-size:10px}#map{padding:4px 0}.state-label{font-size:13px}.flip-tag{font-size:8px}.vote-label{font-size:11px}.map-extras{gap:5px;padding:8px}.map-extras .district-seat{min-width:54px;font-size:10px;min-height:44px}.race-top{display:block}.race-top label{margin-top:14px}.race-table{max-height:430px}.race-table table{min-width:580px}.house-map{columns:2;column-gap:10px;padding:10px!important}.house-map .district-seat{min-height:35px;font-size:8px}.district-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.maps-hub-grid{display:block}.maps-hub-grid a{display:block;padding:25px 0!important;border-left:0!important}.map-data-note{font-size:12px}.top nav a:not(:last-child){display:none}}

.district-map .state-fill{stroke:#fff;stroke-width:.6px;vector-effect:non-scaling-stroke}.district-shape:hover .state-fill,.district-shape:focus-visible .state-fill{stroke:#111;stroke-width:2px}
.district-shape.uncalled .state-fill{stroke:#222;stroke-width:1.2px;stroke-dasharray:3 2}
.state-lines,.nation-line{fill:none;stroke:#1b1b1b;stroke-width:1.1px;vector-effect:non-scaling-stroke;pointer-events:none;stroke-linejoin:round}.nation-line{stroke-width:.8px}
.zoom-wrap{position:relative;overflow:hidden;touch-action:none}#map .district-map{max-height:none;cursor:pointer}#map .district-map.zoomed{cursor:grab}
.zoom-controls{display:flex;flex-wrap:wrap;gap:6px;margin:4px 4px 10px}.zoom-btn{border:1px solid #d6d6d6;background:#fff;color:#111;padding:6px 11px;font-size:13px;font-weight:600;border-radius:4px;min-width:36px}
.district-info{font-size:13px;color:#333;margin:8px 4px 4px;min-height:1.6em}
.split-label{font-size:10px}
.state-seat:focus,.state-seat:focus-visible{outline:none}.state-seat:focus-visible .state-fill{stroke:#111;stroke-width:2.5px;vector-effect:non-scaling-stroke}

/* Loading: reserve space, shimmer, then fade content in (no layout jump) */
#election-tool.is-loading .total strong,#election-tool.is-loading .totals-meta,#election-tool.is-loading #palette,#election-tool.is-loading #race-rows{opacity:0}
#election-tool.is-loading .totals-track{background:linear-gradient(90deg,#ececec 25%,#f6f6f6 50%,#ececec 75%);background-size:200% 100%;animation:em-shimmer 1.3s linear infinite}
#election-tool.is-loading .totals-track span{opacity:0}
#election-tool.is-loading #palette{min-height:57px;box-sizing:border-box}
#election-tool.is-loading #map{aspect-ratio:1000/640;max-height:566px;background:linear-gradient(90deg,#f1f1f1 25%,#fafafa 50%,#f1f1f1 75%);background-size:200% 100%;animation:em-shimmer 1.3s linear infinite;border-radius:4px}
#election-tool.is-loading .race-table{min-height:300px}
#loading:not(.sr-only){font-size:14px;color:#a33;margin:16px 0 0}
@keyframes em-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){#election-tool.is-loading #map,#election-tool.is-loading .totals-track{animation:none}}
.year-tag{display:inline-block;font:600 10px/1 ui-monospace,monospace;background:#111;color:#fff;padding:3px 5px;border-radius:3px;margin-left:6px;vertical-align:2px}
