/* Nationwide state/district research and public-domain map. Scoped state-* classes. */
.state-page{display:flex;flex-direction:column;gap:18px;min-width:0}
.state-hero{background:linear-gradient(135deg,#f8fbff 0%,#eef4ff 100%);border:1px solid #d7e3f3}
.state-hero h1{margin-bottom:8px}
.state-hero-note{border:1px solid #cfdeef;background:#fff;border-radius:10px;padding:14px;font-size:13px;color:var(--muted);max-width:360px;min-width:0}
.state-chip-row{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin-top:10px}
.state-controls{display:grid;grid-template-columns:minmax(0,210px) minmax(0,250px) minmax(0,1fr);gap:12px;align-items:end;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff}
.state-controls label{display:flex;flex-direction:column;gap:5px;min-width:0}
.state-controls label span{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);font-weight:750}
.state-controls select{width:100%;min-width:0;max-width:100%}
.state-controls p{margin:0;align-self:center}
.state-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;min-width:0}
.state-section-head>div{min-width:0}
.state-section-head h2,.state-section-head h3{margin-top:2px;overflow-wrap:anywhere}
.state-section-head .badge{max-width:100%;white-space:normal;line-height:1.35}
.state-senate-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.state-senator-card,.state-district-card,.state-member-card{border:1px solid var(--line);border-radius:12px;background:#fff;padding:16px;min-width:0}
.state-senator-card,.state-district-card{display:flex;flex-direction:column;gap:11px}
.state-member-main{display:flex;align-items:flex-start;gap:12px;min-width:0}
.state-member-main>div:last-child{min-width:0}
.state-member-main h2,.state-member-main h3{margin:0;overflow-wrap:anywhere;line-height:1.25}
.state-avatar{width:56px;height:56px;flex:0 0 56px}
.state-district-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
.state-district-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.state-district-number{font-size:18px;font-weight:800;letter-spacing:.2px;color:var(--navy)}
.state-mini-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 10px;margin:0;padding:10px 0 0;border-top:1px solid var(--line)}
.state-mini-list div{min-width:0}
.state-mini-list dt{font-size:10.5px;text-transform:uppercase;letter-spacing:.35px;color:var(--muted);font-weight:750;line-height:1.3}
.state-mini-list dd{margin:2px 0 0;font-size:13px;font-weight:750;overflow-wrap:anywhere;line-height:1.3}
.state-card-link{font-weight:750;color:var(--blue);margin-top:auto}
.state-finance-stack{display:flex;flex-direction:column;gap:16px;min-width:0}
.state-finance-category{margin:0}
.state-category-foot{border-top:1px solid var(--line);margin-top:12px;padding-top:10px;font-size:12px;color:var(--muted)}
.state-table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.state-table{min-width:760px}
.state-vote-table{min-width:880px}
.state-table th,.state-table td{vertical-align:top}
.state-table .num{text-align:right;white-space:nowrap}
.state-table th:first-child{min-width:170px}
.state-nowrap{white-space:nowrap}
.state-stance{display:inline-block;border:1px solid #d9e4ef;border-radius:5px;padding:3px 7px;font-size:11px;font-weight:750;background:#f5f8fc;white-space:nowrap}
.state-status{display:inline-block;border:1px solid #d9e4ef;border-radius:5px;padding:3px 7px;font-size:11px;font-weight:750;background:#f5f8fc;overflow-wrap:anywhere}
.state-empty{padding:22px;text-align:center;background:#fbfcfe;border:1px dashed #b8c8d7;border-radius:10px;margin-top:10px}
.state-empty p{margin:0;color:var(--muted);font-size:13px;overflow-wrap:anywhere}
.state-load-row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:14px;border:1px solid var(--line);border-radius:9px;background:#fbfcfe;margin-top:8px}
.state-load-row p{margin:0;font-size:13px;color:var(--muted)}
.state-loading{padding:16px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--muted);margin-top:12px}
.state-history{margin-top:16px;border-top:1px solid var(--line);padding-top:14px}
.state-history h3{margin-bottom:7px}
.state-history-list{margin:0;padding-left:20px}
.state-history-list li{margin:6px 0}
.state-method-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:10px 0}
.state-method-grid>div{min-width:0;border:1px solid var(--line);border-radius:9px;padding:13px;background:#fbfcfe}
.state-method-grid h3{margin:0 0 6px;font-size:15px}
.state-method-grid p{margin:0;font-size:13px;color:var(--muted)}
.state-list{margin:8px 0 0;padding-left:20px;color:var(--muted);font-size:13px}
.state-list li{margin:7px 0;overflow-wrap:anywhere}
.state-voting h3{margin:16px 0 8px}
.state-candidates .state-section-head{margin-bottom:12px}
.state-territory-note{margin:0}

/* Public-domain map navigation. The SVG is inlined only after its local asset loads. */
.state-map-section{display:flex;flex-direction:column;gap:14px;min-width:0;border:1px solid var(--line);border-radius:16px;background:#fff;padding:clamp(16px,2.5vw,26px);margin:24px 0}
.state-map-home{margin:0 0 26px;background:linear-gradient(135deg,#fff 0%,#f7faff 100%)}
.state-map-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(250px,.55fr);gap:18px;align-items:start;min-width:0}
.state-map-panel,.state-list-panel{min-width:0}
.state-map{border:1px solid #dbe6f2;border-radius:12px;background:#f8fbff;padding:8px;min-height:220px;display:flex;align-items:center;justify-content:center}
.state-map-svg{display:block;width:100%;height:auto;max-height:500px}
.state-map-svg .state-map-state{fill:#dce8f7;stroke:#fff;stroke-width:1.2;cursor:pointer;transition:fill .15s ease,filter .15s ease;outline:none;vector-effect:non-scaling-stroke}
.state-map-svg .state-map-state:hover{fill:#a9c6ea}
.state-map-svg .state-map-state:focus{fill:#a9c6ea;stroke:#9a6408;stroke-width:3;filter:drop-shadow(0 0 2px #fff)}
.state-map-svg .state-map-state[data-state="DC"]{fill:#c7d7ea}
.state-map-svg .borders{fill:none;stroke:#fff;stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:none}
.state-map-help{margin:8px 2px 0}
.state-map-loading,.state-map-error{padding:20px;color:var(--muted);font-size:13px;text-align:center;flex-direction:column;gap:8px}
.state-map-error p{margin:0;max-width:560px}
.state-list-panel label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.45px;color:var(--muted);font-weight:750;margin-bottom:6px}
.state-list-panel input{width:100%;min-width:0;min-height:42px}
.state-list-results{max-height:430px;overflow:auto;padding-right:3px;margin-top:9px}
.state-list-group{margin:0 0 14px}
.state-list-group h3{margin:0 0 4px;font-size:13px}
.state-list-group p{margin:0 0 6px}
.state-list-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(116px,1fr));gap:5px}
.state-list-links a{display:flex;justify-content:space-between;gap:5px;align-items:baseline;min-width:0;padding:7px 8px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--navy);text-decoration:none;font-size:12px}
.state-list-links a:hover,.state-list-links a:focus-visible{border-color:#9eb9e9;background:#f4f8ff;outline:2px solid #dfad39;outline-offset:1px}
.state-list-links a b{overflow-wrap:anywhere}
.state-list-links a span{font-size:10px;color:var(--muted);flex:0 0 auto}

@media(max-width:900px){.state-controls{grid-template-columns:1fr 1fr}.state-controls p{grid-column:1/-1}.state-method-grid{grid-template-columns:1fr}.state-hero-note{max-width:none}.state-map-layout{grid-template-columns:1fr}.state-list-results{max-height:300px}.state-map-svg{max-height:460px}}
@media(max-width:620px){.state-senate-grid{grid-template-columns:1fr}.state-controls{grid-template-columns:1fr}.state-mini-list{grid-template-columns:1fr 1fr}.state-load-row{align-items:flex-start}.state-load-row .primary{width:100%}.state-table-wrap{overflow:visible}.state-table,.state-vote-table{min-width:0;display:block}.state-table thead{display:none}.state-table tbody,.state-table tr,.state-table td{display:block;width:100%}.state-table tr{border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px 12px;margin:10px 0}.state-table td{display:grid;grid-template-columns:minmax(104px,40%) minmax(0,1fr);gap:10px;border:0;padding:4px 0;text-align:left;white-space:normal}.state-table td::before{content:attr(data-label);font-size:10.5px;letter-spacing:.35px;text-transform:uppercase;color:var(--muted);font-weight:750;line-height:1.35}.state-table td.num{text-align:left;white-space:normal}.state-table td:first-child{padding-top:0}.state-table td:last-child{padding-bottom:0}.state-table td .link{overflow-wrap:anywhere}}
@media(max-width:430px){.state-page{gap:14px}.state-senator-card,.state-district-card,.state-member-card{padding:13px}.state-avatar{width:48px;height:48px;flex-basis:48px}.state-mini-list{grid-template-columns:1fr}.state-section-head .badge{white-space:normal}.state-empty{padding:16px}.state-map-section{padding:13px}.state-map{padding:4px}.state-list-links{grid-template-columns:repeat(2,minmax(0,1fr))}.state-list-links a{padding:7px 6px;font-size:11px}.state-list-links a span{display:none}}
