/* 1.3 — surface and interaction finish. Grid, control positions and data order stay intact. */
html[data-theme]{--motion:140ms;--ease:cubic-bezier(.2,.65,.3,1);--surface-raised:#142237;--surface-inset:#0c1829;--edge:#ffffff18;--shadow:0 1px 2px #00000016,0 8px 24px #00000010;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
html[data-theme=dark]{--bg:#0a1321;--panel:#101d2e;--text:#e9eff7;--muted:#a0b0c3;--line:#ffffff17}
html[data-theme=light]{--bg:#f1f4f8;--panel:#fff;--surface-raised:#fff;--surface-inset:#f5f7fa;--edge:#1c35541c;--shadow:0 1px 2px #18345108,0 6px 20px #18345105;--text:#1c3049;--muted:#5b6d82;--line:#1c35541c}
html[data-theme] body{background:var(--bg)}
html[data-theme] .header{border-color:var(--line)}
html[data-theme] .header-title h1{letter-spacing:-.035em}
html[data-theme] .header-title h1 span{font-weight:400}
html[data-theme] .header-title p{color:var(--muted)}
html[data-theme] :is(.central-nav,.map-controls,.map-card,.side-panel){background:var(--panel);border-color:var(--edge);box-shadow:var(--shadow);border-radius:10px}
html[data-theme] .central-nav{background:var(--panel)}
html[data-theme] .navigation-top{border-color:var(--line)}
html[data-theme] .turn-switch{background:var(--surface-inset);border-color:var(--edge);border-radius:7px}
html[data-theme] .turn-switch button{border-radius:4px;box-shadow:none}
html[data-theme] .turn-switch button.active{background:#1c4f86;color:#f8fbff;box-shadow:0 1px 2px #0002}
html[data-theme=light] .turn-switch button.active{background:#175eb8}
html[data-theme] .office-tabs button{border-radius:6px}
html[data-theme] .office-tabs button.active{background:#173650;border-color:#74b7ee36;box-shadow:inset 0 -2px #66a9ff;color:#e7f3ff}
html[data-theme=light] .office-tabs button.active{background:#edf4fd;border-color:#175eb827;box-shadow:inset 0 -2px #175eb8;color:#144f96}
html[data-theme] :is(.navigation-top>strong,.private-badge){border-radius:5px;letter-spacing:.06em}
html[data-theme] .private-badge{box-shadow:none}
html[data-theme] :is(.selectors select,.candidate-filters input[type=search],.candidate-filters select){background:var(--surface-inset);border-color:var(--edge);border-radius:6px;color:var(--text);box-shadow:inset 0 1px 2px #00000003}
html[data-theme] :is(.selectors label,.candidate-filters label){color:var(--muted)}
html[data-theme] :is(.theme-toggle,.back-button,.more-candidates,.map-mobile-toolbar button){border-radius:6px;border-color:var(--edge);background:var(--surface-raised);color:var(--text);box-shadow:0 1px 2px #00000008}
html[data-theme] .theme-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex:0 0 20px;font-size:20px}
.theme-icon svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
html[data-theme] :is(button,select,input,a,summary){transition:background-color var(--motion) var(--ease),border-color var(--motion) var(--ease),color var(--motion) var(--ease),box-shadow var(--motion) var(--ease)}
html[data-theme] :is(button,a):active{transform:none}
html[data-theme] :is(button,select,input,a,summary):focus-visible{outline:2px solid var(--blue);outline-offset:3px}
html[data-theme] :is(.theme-toggle,.back-button,.more-candidates,.map-mobile-toolbar button):hover{border-color:#66a9ff80;background:#18334e}
html[data-theme=light] :is(.theme-toggle,.back-button,.more-candidates,.map-mobile-toolbar button):hover{background:#eaf1fb;border-color:#175eb85c}
html[data-theme] .panel-title .eyebrow{letter-spacing:.16em;color:var(--muted)}
html[data-theme] .panel-title h2{letter-spacing:-.035em;font-weight:700}
html[data-theme] .side-context{color:var(--text)}
html[data-theme] :is(.data-badge,.governor-status){border-radius:5px;letter-spacing:.035em}
html[data-theme] .live-sync-status{border-radius:6px;background:#8ce5cf08;border-color:#8ce5cf26;box-shadow:inset 2px 0 #8ce5cf}
html[data-theme=light] .live-sync-status{background:#f0f8f5;border-color:#08765f26;box-shadow:inset 2px 0 #08765f}
html[data-theme] .live-sync-status strong{font-weight:600;letter-spacing:0}
html[data-theme] .live-sync-status span{font-variant-numeric:tabular-nums;color:var(--muted)}
html[data-theme] :is(.runoff-candidate,.candidate,.metrics>div,.result-row,.seat-summary,.highlight-row,.consolidation-state){border-radius:8px;background:var(--surface-raised);border-top-color:var(--edge);border-right-color:var(--edge);border-bottom-color:var(--edge);box-shadow:0 1px 2px #00000004}
html[data-theme] .runoff-candidate{background:var(--surface-raised)}
html[data-theme] .runoff-candidate h4{letter-spacing:-.025em}
html[data-theme] :is(.runoff-candidate-copy>small,.party-label,.runoff-source,.simulation-note,.denominator-note){color:var(--muted)}
html[data-theme] .candidate-avatar{box-shadow:0 0 0 3px var(--panel);border-color:var(--edge)}
html[data-theme] .avatar-image{background:var(--surface-inset)}
html[data-theme] .candidate-details{border-color:var(--line)}
html[data-theme] .candidate-details summary{color:var(--blue);font-weight:500}
html[data-theme] .candidate-details summary:hover{color:var(--text)}
html[data-theme] :is(.live-candidate-numbers>strong,.candidate-heading>strong,.metrics strong,.section-title>strong,.row-numbers){font-variant-numeric:tabular-nums lining-nums;font-feature-settings:"tnum" 1,"lnum" 1;letter-spacing:-.025em}
html[data-theme] :is(.candidate-footer,.highlight-values,.last-updated){font-variant-numeric:tabular-nums}
html[data-theme] :is(.bar,.progress-bar){border-radius:3px;background:#ffffff12;box-shadow:inset 0 1px 2px #00000008}
html[data-theme=light] :is(.bar,.progress-bar){background:#e7edf4}
html[data-theme] :is(.bar>span,.progress-bar>span){border-radius:3px;transition:width 240ms var(--ease)}
html[data-theme] :is(.map-container,#map){background-color:#0b1727;background-image:linear-gradient(#ffffff03 1px,transparent 1px),linear-gradient(90deg,#ffffff03 1px,transparent 1px);background-size:32px 32px}
html[data-theme=light] :is(.map-container,#map){background-color:#edf2f7;background-image:linear-gradient(#23496f06 1px,transparent 1px),linear-gradient(90deg,#23496f06 1px,transparent 1px)}
html[data-theme] .map-hint{border-radius:5px;border:1px solid var(--edge);box-shadow:0 2px 6px #00000006}
html[data-theme] :is(.leaflet-control-zoom,.municipality-tooltip,.selected-name-tooltip){border-radius:6px!important;box-shadow:0 2px 8px #00000012!important}
html[data-theme] .leaflet-control-attribution{border-radius:4px 0 0}
html[data-theme] .uf-label{font-weight:600}
html[data-theme] :is(.highlight-row,.governor-uf){transition:background-color var(--motion) var(--ease),border-color var(--motion) var(--ease)}
html[data-theme] :is(.highlight-row:hover,.governor-uf:hover){border-color:#66a9ff60;background:#1a2c41}
html[data-theme=light] :is(.highlight-row:hover,.governor-uf:hover){border-color:#175eb84d;background:#f0f5fc}
html[data-theme] .governor-uf{border-radius:7px;background:var(--surface-raised)}
html[data-theme] .mobile-dock{box-shadow:0 -1px 0 var(--line),0 -6px 20px #00000008;backdrop-filter:none;background:#101d2efc;border-top-color:var(--edge)}
html[data-theme=light] .mobile-dock{background:#fffffffC}
html[data-theme] .mobile-dock a{border-radius:7px}
html[data-theme] .mobile-dock a[aria-current]{background:#66a9ff13;color:#9dceff}
html[data-theme=light] .mobile-dock a[aria-current]{background:#edf4fd;color:#175eb8}
html[data-theme] .mobile-dock a>span{display:inline-flex;align-items:center;justify-content:center}
.mobile-dock svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
html[data-theme] .map-mobile-toolbar button[aria-pressed=true]{background:#175eb8;border-color:#175eb8;color:#fff}
html[data-theme] :is(.complete-list,#highlights-list){scrollbar-width:thin;scrollbar-color:#4a6481 var(--surface-inset)}
html[data-theme=light] :is(.complete-list,#highlights-list){scrollbar-color:#bccbdb var(--surface-inset)}
@media(prefers-reduced-motion:reduce){html[data-theme] :is(button,select,input,a,summary,.bar>span,.progress-bar>span,.highlight-row,.governor-uf){transition:none}}
html[data-theme] .theme-icon{width:18px;flex-basis:18px}
/* 1.3.1 — location bar: compact context, equal fields and aligned controls. */
@media(min-width:761px){
 html[data-theme] .map-controls{grid-template-columns:150px minmax(0,1fr);align-items:end;gap:16px}
 html[data-theme] .map-controls .map-toolbar{min-height:44px;justify-content:flex-start;gap:10px;align-items:center}
 html[data-theme] .map-controls .breadcrumbs{flex:1;flex-wrap:nowrap;gap:3px;overflow:hidden}
 html[data-theme] .map-controls .breadcrumbs .crumb{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html[data-theme] .map-controls #br-crumb{flex-shrink:0}
 html[data-theme] .map-controls #muni-crumb{min-width:0}
 html[data-theme] .map-controls .back-button{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
 html[data-theme] .map-controls .selectors{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
 html[data-theme] .map-controls .selectors label{font-size:11px;line-height:1.5}
}
