.overview-layout {display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,2fr);gap:14px;align-items:start}
.overview-search {padding:0 16px 10px}
.overview-search input {width:100%}
#state-list {display:grid;gap:3px;padding:0 8px 8px;max-height:580px;overflow:auto}
#state-list button {display:flex;justify-content:space-between;align-items:center;gap:6px;text-align:left;border:1px solid transparent;border-radius:7px;padding:8px 10px;background:transparent;color:var(--ink)}
#state-list button:hover,#state-list button[aria-pressed=true] {border-color:var(--line);background:var(--surface)}
#state-list button small,.overview-detail p {color:var(--muted)}
.overview-detail {padding:18px 20px}
.overview-detail h2 {margin:3px 0 10px}
.overview-races {display:grid;gap:8px}
.overview-race {display:grid;gap:4px;background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:10px 12px;color:var(--ink);text-decoration:none}
.overview-race:hover {border-color:#7887a8}
.overview-race span {font-size:13px;color:var(--muted)}
.overview-empty {padding:0 10px;color:var(--muted);font-size:13px}
.profile-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:14px;align-items:start;margin-top:14px}
.profile-grid .overview-race + .overview-race {margin-top:8px}
.profile-links,.midterm-filters {display:flex;flex-wrap:wrap;gap:12px 20px}
.profile-links a,.profile-chamber+a,.profile-jump,.midterm-source {color:var(--accent);font-size:13px;font-weight:700}
.profile-jump {display:inline-block;margin-bottom:12px}
.profile-row {display:grid;grid-template-columns:40px minmax(25px,1fr) auto;align-items:center;gap:8px;margin:12px 0;font-size:12px}
.profile-row a {color:var(--ink)}
.profile-row span,.profile-chamber span {color:var(--muted)}
.profile-chamber {display:grid;gap:7px;margin:14px 0;font-size:13px}
.profile-bar {display:flex;gap:1px;height:8px;border-radius:5px;overflow:hidden;background:var(--line)}
.profile-bar span {flex-basis:0}
.profile-bar .dem {background:#719cff}
.profile-bar .rep {background:#ef747b}
.profile-bar .other {background:#a69db9}
.profile-bar .vacant {background:#55627f}
.coverage-note {margin-bottom:16px}
.coverage-note p {margin:5px 0 0}
.midterm-status {display:inline-block;margin:8px 0;padding:4px 8px;border:1px solid currentColor;border-radius:6px;font-size:12px;font-weight:750}
.midterm-status.projected,.midterm-status.certified {color:#9fdfc3}
.midterm-status.close {color:#f4cd87}
.midterm-status.uncalled {color:var(--muted)}
.midterm-source {display:inline-block;margin-top:6px}
#midterm-count {color:var(--muted);font-size:13px}
.overview-selected {display:grid;gap:14px;min-width:0}
.overview-selected .profile-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr))}
.overview-page .explorer-controls .control,
.profiles-page .explorer-header .control,
.midterm-filters .control {min-width:0}
.overview-page .explorer-controls select,
.profiles-page .explorer-header select,
.midterm-filters select {width:100%;max-width:none;min-height:44px;height:auto}
.midterm-filters {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:720px}
#midterm-races {grid-template-columns:repeat(auto-fit,minmax(min(100%,285px),1fr))}
.midterm-source {min-height:44px;display:inline-flex;align-items:center}
@media(max-width:680px) {
  .overview-layout {grid-template-columns:minmax(0,1fr)}
  .overview-selected {grid-row:1}
  .overview-detail {padding:15px 14px}
  .overview-page .explorer-controls {width:100%;display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr)}
  .profiles-page .explorer-header .control {width:100%}
  .overview-page .explorer-title p,.profiles-page .explorer-title p,.midterms-page .explorer-title p {display:block}
  .overview-page .explorer-controls select,.profiles-page .explorer-header select,.midterm-filters select {font-size:16px}
  .midterm-filters {grid-template-columns:repeat(2,minmax(0,1fr))}
  .midterm-filters .control:last-child {grid-column:1/-1}
  #state-list {max-height:260px}
  #state-list button {min-height:44px}
  .profile-links a,.profile-chamber>a,.overview-race {min-height:44px}
  .profile-links {gap:4px 14px}
  .profile-links a {display:inline-flex;align-items:center}
  .profile-row {grid-template-columns:36px minmax(0,1fr);gap:4px 8px}
  .profile-row > span {grid-column:2}
}
.state-explorer-layout {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:14px;align-items:start}
.state-map-card {background:radial-gradient(ellipse at 40% 35%,#25365c,#171f38 75%);overflow:hidden}
.state-map-card .cardhead {padding:14px 16px 4px}
#state-map-title {font-size:1.35rem}
#state-count,.state-explorer-intro p {color:var(--muted);margin:4px 0;font-size:13px}
#state-map {display:block;width:100%;height:auto}
#state-map-shapes path {cursor:pointer;fill-rule:evenodd;stroke:#e4edffad;stroke-width:.85;vector-effect:non-scaling-stroke}
#state-map-shapes path:is(:hover,:focus-visible,[aria-pressed=true]) {stroke:#fff;stroke-width:2;outline:none}
.state-map-key {display:flex;flex-wrap:wrap;gap:6px 14px;color:#d1dcf1;padding:8px 16px 13px;font-size:12px}
.state-map-key span {display:inline-flex;align-items:center;gap:5px}
.state-map-key i {width:12px;height:10px;border:1px solid #a5b6d8;border-radius:2px}
.state-explorer-detail {padding:16px}
.state-explorer-intro h2 {font-size:clamp(1.6rem,3.6vw,2.25rem)}
.state-explorer-intro .profile-links:not(:empty) {margin-top:7px}
.state-section-switcher {margin:13px 0 12px;max-width:none}
.state-section-switcher button {font-size:13px;line-height:1.2}
#state-detail h3,.state-profile-block h2 {font-size:1.15rem;margin:0 0 7px}
.state-profile-block + .state-profile-block {border-top:1px solid var(--line);padding-top:14px;margin-top:14px}
.state-profile-block .overview-race + .overview-race {margin-top:6px}
.state-profile-block p,#state-detail p {color:var(--muted);font-size:13px}
.state-directory {margin-top:14px;padding:0 8px 8px}
.state-directory summary {cursor:pointer;padding:10px;font-weight:750}
.state-directory:not([open]) {padding-bottom:0}
@media(max-width:800px) {
  .state-explorer-layout {grid-template-columns:minmax(0,1fr)}
}
@media(max-width:550px) {
  .state-map-card .cardhead,.state-explorer-detail {padding-inline:12px}
  .state-map-key {padding-inline:12px}
}

.state-government{margin:0 20px 20px;padding:18px;border:1px solid #69789855;border-radius:14px;background:#ffffff03;--control-accent:#b3bdd2}
.state-government.is-dem{--control-accent:#73c4fa;border-color:#369eea66;background:linear-gradient(130deg,#369eea0e,transparent)}
.state-government.is-rep{--control-accent:#ffaaa9;border-color:#ec515566;background:linear-gradient(130deg,#ec51550e,transparent)}
.state-government.is-split{--control-accent:#d4bbff}
.government-date{font-size:.8125rem;color:#aeb8cc;letter-spacing:.06em}
.state-government h3{font-size:1.25rem;line-height:1.25;font-weight:700;color:var(--control-accent);margin:8px 0}
.state-government p{font-size:1rem;line-height:1.55;color:#d5ddec;margin:0 0 16px}
.government-offices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.government-office{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:inherit;padding:12px;border:1px solid #ffffff15;border-radius:10px;background:#0b122233;min-width:0}
.government-office:hover{border-color:var(--control-accent);background:#ffffff06}
.government-office-label{font-size:.875rem;color:#b8c3d8}
.government-office strong{font-size:.9375rem;line-height:1.4}
.government-office small,.government-note{font-size:.8125rem;line-height:1.5;color:#aeb8cc}
.government-note{display:block;margin-top:12px}
@media(max-width:1000px){.government-offices{grid-template-columns:1fr}.government-office{gap:4px}}
@media(max-width:550px){.state-government{margin:0 12px 16px;padding:14px}}

/* A geographic identity for every state, with a restrained American accent. */
.state-identity{position:relative;isolation:isolate;overflow:hidden;min-height:154px;padding:24px 20px 26px;margin:-16px -16px 18px;border-radius:16px 16px 0 0;background:radial-gradient(ellipse at 95% 20%,#6d9fff1b,transparent 68%),linear-gradient(135deg,#111b30,#192238)}
.state-identity::after{content:"";position:absolute;inset:auto 20px 0;height:2px;background:linear-gradient(90deg,#ed747d 0%,#ed747d 20%,#e5ecfa 44%,#e5ecfa 56%,#73b5ff 80%,#73b5ff 100%);opacity:.6}
.state-identity-content{position:relative;z-index:1}
.state-identity-kicker{display:flex;align-items:center;flex-wrap:wrap;gap:9px;color:#c5d3e9;font-size:.875rem;line-height:1.4;letter-spacing:.1em;font-weight:650}
.identity-star{color:#ecf2ff;font-size:1rem}
#state-abbr:empty{display:none}
#state-abbr:not(:empty){padding-right:9px;border-right:1px solid #b5c9ed45}
.state-identity #state-heading{max-width:100%;margin:14px 0 2px;font-family:inherit;font-size:clamp(2.4rem,4vw,3.65rem);font-weight:760;letter-spacing:-.045em;line-height:1.06;color:#f5f7fc;overflow-wrap:anywhere;text-wrap:balance}
.state-identity-shape{position:absolute;right:8px;top:8px;width:56%;height:calc(100% - 16px);pointer-events:none;z-index:0;opacity:.16}
.state-identity-shape path{fill:#8bafe3;stroke:#e1edff;stroke-width:1.2;vector-effect:non-scaling-stroke}
.state-explorer-detail>.state-government{margin:0 0 16px}
.state-profile-context{padding:0 2px 5px}
.state-profile-context p{font-size:.875rem;line-height:1.6;color:#b6c4da;margin:0 0 5px}
.state-profile-context .profile-links a{font-size:.875rem;min-height:36px;display:inline-flex;align-items:center}
@media(min-width:801px) and (max-width:1100px){.state-identity #state-heading{font-size:2.65rem}}
@media(max-width:800px){.state-identity{min-height:170px}.state-identity-shape{width:44%;right:20px}.state-identity #state-heading{font-size:clamp(2.7rem,7vw,4rem)}}
@media(max-width:550px){.state-identity{margin-inline:-12px;padding:22px 16px;min-height:148px}.state-identity-kicker{font-size:.875rem;gap:7px}.state-identity #state-heading{font-size:clamp(2.15rem,9vw,3.1rem)}.state-identity-shape{width:59%;right:0}.state-identity::after{inset-inline:16px}}

.state-map-frame{position:relative;overflow:hidden;isolation:isolate}
#state-map{aspect-ratio:1040/625;overflow:hidden}

/* Visual government summaries: a governor spotlight and two seat balances. */
.government-offices{grid-template-columns:minmax(0,1fr);gap:12px}
.government-office{--office-accent:#b9c6dd;--office-wash:#b9c6dd0a;position:relative;overflow:hidden;padding:16px;gap:12px;border-color:#697b9c38;background:linear-gradient(120deg,var(--office-wash),#0b122233);border-left:3px solid var(--office-accent);transition:border-color 180ms ease,background 180ms ease}
.government-office.tone-dem{--office-accent:#73c4fa;--office-wash:#369eea0e}
.government-office.tone-rep{--office-accent:#ffaaa9;--office-wash:#ec51550e}
.government-office:hover{border-color:var(--office-accent);background:linear-gradient(120deg,var(--office-wash),#ffffff06)}
.government-office:focus-visible{outline:2px solid #a5d8ff;outline-offset:3px}
.government-card-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.government-card-heading .government-office-label{font-size:.875rem;font-weight:700;color:#d4dff0}
.government-party-badge{font-size:.875rem;font-weight:700;color:var(--office-accent);border:1px solid #9baec33d;border-radius:99px;padding:4px 10px;background:#0b102233}
.government-governor-spotlight{display:flex;align-items:center;gap:14px;min-width:0}
.government-monogram{display:grid;place-items:center;flex:0 0 56px;height:56px;border-radius:50%;border:1px solid var(--office-accent);background:radial-gradient(circle at 30% 25%,var(--office-wash),#111b30);box-shadow:inset 0 0 18px #ffffff06;color:var(--office-accent);font-size:1.2rem;font-weight:750;letter-spacing:.03em}
.government-governor-spotlight>div{min-width:0}
.government-office .government-governor-name{display:block;font-size:1.3rem;line-height:1.25;letter-spacing:-.02em;overflow-wrap:anywhere}
.government-office .government-governor-date{display:block;margin-top:5px;font-size:.875rem;color:#b5c3d9}
.government-card-action{font-size:.875rem;font-weight:650;color:#c0d4ed;text-decoration:underline;text-decoration-color:#c0d4ed40;text-underline-offset:3px}
.government-governor>.government-card-action{margin-left:70px}
.government-office .government-seat-total{font-size:.875rem;color:#adbed6;font-variant-numeric:tabular-nums}
.government-office .government-majority-label{font-size:.9375rem;color:var(--office-accent);line-height:1.35}
.government-seat-values{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 22px}
.government-seat-stat{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;min-width:0}
.government-office .government-seat-value{font-size:1.8rem;line-height:1.1;font-weight:750;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.government-office .government-seat-label{font-size:.875rem;line-height:1.4;color:#b9c7dc}
.seat-dem .government-seat-value{color:#82caff}.seat-rep .government-seat-value{color:#ffa0a7}.seat-other .government-seat-value{color:#cbb4f3}.seat-vacant .government-seat-value{color:#aeb8c9}
.government-seat-bar{height:14px;position:relative;background:#333e55;border-radius:4px;margin:2px 0 3px}
.government-seat-fill{display:flex;gap:2px;height:100%;border-radius:4px;overflow:hidden;transform-origin:left;animation:government-seat-fill 650ms cubic-bezier(.2,.7,.3,1) both}
.government-seat-segment{flex-basis:0;min-width:0}
.segment-dem{background:linear-gradient(90deg,#338ed5,#73c4fa)}.segment-rep{background:linear-gradient(90deg,#f17d88,#df475a)}.segment-other{background:#a78bdb}.segment-vacant{background:repeating-linear-gradient(135deg,#6b778b 0 3px,#424e63 3px 6px)}
.government-majority-marker{position:absolute;top:-4px;height:22px;width:2px;background:#f5f7ff;box-shadow:0 0 0 2px #101a2d88;transform:translateX(-50%)}
.government-chamber-footer{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:7px 12px}
.government-office .government-chamber-footer small{font-size:.875rem;line-height:1.4;color:#b5c3d9}
@keyframes government-seat-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media(max-width:550px){.government-office{padding:14px;gap:11px}.government-seat-values{gap:8px 16px}.government-office .government-seat-value{font-size:1.65rem}.government-monogram{flex-basis:50px;height:50px}.government-governor>.government-card-action{margin-left:64px}}
@media(prefers-reduced-motion:reduce){.government-seat-fill{animation:none}.government-office{transition:none}}

.government-portrait{width:64px;height:64px;flex:0 0 64px;object-fit:cover;object-position:50% 25%;border-radius:50%;border:1px solid var(--office-accent);background:#22334d}
.government-note a{color:inherit;text-underline-offset:3px}
