@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{font-family:'DM Sans',system-ui,sans-serif;color-scheme:dark;--bg:#0a1220;--bg2:#0e192a;--panel:#111e30;--panel2:#17263a;--panel3:#1c2d43;--border:#263950;--text:#eef4fb;--muted:#93a5ba;--muted2:#6f8299;--blue:#438fe8;--blue2:#246cc0;--gold:#e6b94f;--green:#42b69a;--shadow:0 16px 40px rgba(0,0,0,.18)}
*{box-sizing:border-box}html{min-width:320px;background:var(--bg)}body{margin:0;background:radial-gradient(ellipse at 78% 0%,rgba(35,87,143,.16),transparent 35%),var(--bg);color:var(--text);min-height:100vh;transition:background .2s,color .2s}body[data-theme=light]{color-scheme:light;--bg:#f3f6fa;--bg2:#eaf0f6;--panel:#fff;--panel2:#f5f8fc;--panel3:#eaf0f7;--border:#dce5ef;--text:#182a40;--muted:#61758c;--muted2:#7e8fa2;--blue:#2678d1;--blue2:#1b63b0;--gold:#b98920;--green:#258e77;--shadow:0 12px 32px rgba(28,55,86,.08);background:radial-gradient(ellipse at 78% 0%,rgba(47,117,192,.08),transparent 35%),var(--bg)}
button,input{font:inherit}button{cursor:pointer}.app-shell{max-width:1540px;margin:0 auto;padding:0 34px}.topbar{height:86px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border)}.brand-lockup{display:flex;align-items:center;gap:18px}.logo-wrap{display:flex;align-items:center;justify-content:center;width:112px;height:52px;background:#10233b;border-radius:9px;padding:8px 10px}.brand-logo{width:100%;height:100%;object-fit:contain}.brand-divider{width:1px;height:42px;background:var(--border)}.brand-kicker{font-size:9px;font-weight:700;letter-spacing:.13em;color:var(--muted)}.brand-title{font-family:Manrope,sans-serif;font-size:17px;font-weight:800;line-height:1.3}.brand-subtitle{font-size:12px;color:var(--muted);margin-top:1px}.top-actions{display:flex;align-items:center;gap:15px}.internal-pill{display:flex;align-items:center;gap:7px;font-size:10px;letter-spacing:.09em;font-weight:700;color:var(--muted);border:1px solid var(--border);padding:8px 11px;border-radius:30px}.live-dot{display:inline-block;width:7px;height:7px;background:#40c59b;border-radius:50%;box-shadow:0 0 0 3px rgba(64,197,155,.12)}.icon-button{width:39px;height:39px;display:grid;place-items:center;background:var(--panel);color:var(--muted);border:1px solid var(--border);border-radius:10px;transition:.15s}.icon-button:hover{color:var(--text);border-color:var(--blue)}.icon-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.icon-button.small{width:32px;height:32px;border-radius:8px}.icon-button.small svg{width:16px;height:16px}main{padding-top:35px}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.16em;color:var(--blue);margin-bottom:10px}.intro h1{font-family:Manrope,sans-serif;font-size:clamp(26px,3.1vw,37px);letter-spacing:-.045em;line-height:1.14;margin:0;font-weight:800}.intro h1 span{color:var(--blue)}.intro-copy{font-size:14px;color:var(--muted);margin:10px 0 0;max-width:720px;line-height:1.6}.intro-mark{width:78px;height:78px;color:var(--blue);margin-right:4%;flex-shrink:0}.intro-mark svg{width:100%;height:100%}.panel{background:var(--panel);border:1px solid var(--border);border-radius:15px;box-shadow:var(--shadow)}.search-panel{padding:20px 22px 16px;margin-bottom:14px}.section-heading{display:flex;align-items:center;gap:12px;margin-bottom:18px}.section-icon{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:rgba(67,143,232,.13);color:var(--blue)}.section-icon svg,.input-icon{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.section-heading h2,.panel-heading h2{font-family:Manrope,sans-serif;font-size:15px;margin:0;font-weight:800;letter-spacing:-.015em}.section-heading p,.panel-heading p{font-size:11px;color:var(--muted);margin:3px 0 0}.search-row{display:flex;gap:12px;align-items:flex-end}.address-wrap{position:relative;flex:1;min-width:0}.address-wrap label{display:block;font-size:9px;font-weight:700;letter-spacing:.1em;color:var(--muted);margin:0 0 8px 2px}.input-shell{height:48px;border:1px solid var(--border);border-radius:9px;background:var(--bg2);display:flex;align-items:center;padding:0 12px;gap:10px;transition:.15s}.input-shell:focus-within{border-color:var(--blue);box-shadow:0 0 0 3px rgba(67,143,232,.13)}.input-icon{color:var(--muted2);flex-shrink:0}.input-shell input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--text);font-size:13px}.input-shell input::placeholder{color:var(--muted2)}.clear-input{border:0;background:transparent;color:var(--muted);font-size:22px;line-height:1;padding:2px 5px;display:none}.clear-input.visible{display:block}.primary-button{height:48px;min-width:164px;border:0;border-radius:9px;background:linear-gradient(135deg,#3888df,#246cc0);color:white;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:12px;padding:0 18px;box-shadow:0 7px 16px rgba(36,108,192,.22);transition:transform .15s,filter .15s}.primary-button:hover{filter:brightness(1.1);transform:translateY(-1px)}.primary-button:disabled{opacity:.55;cursor:wait;transform:none}.primary-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.suggestions{position:absolute;z-index:1200;left:0;right:0;top:calc(100% + 7px);background:var(--panel);border:1px solid var(--border);border-radius:11px;box-shadow:0 18px 35px rgba(0,0,0,.3);overflow:hidden;max-height:330px;overflow-y:auto}.suggestions[hidden]{display:none}.suggestion-item{width:100%;display:flex;align-items:flex-start;gap:11px;padding:12px 14px;text-align:left;background:transparent;color:var(--text);border:0;border-bottom:1px solid var(--border)}.suggestion-item:last-child{border-bottom:0}.suggestion-item:hover,.suggestion-item[aria-selected=true]{background:var(--panel2)}.suggestion-pin{width:28px;height:28px;display:grid;place-items:center;background:rgba(67,143,232,.12);color:var(--blue);border-radius:8px;flex-shrink:0}.suggestion-pin svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}.suggestion-main{font-size:12px;font-weight:600;line-height:1.4}.suggestion-detail{font-size:10px;color:var(--muted);margin-top:3px}.search-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;flex-wrap:wrap}.grade-filters{display:flex;gap:5px;flex-wrap:wrap}.filter-button{border:1px solid transparent;background:transparent;color:var(--muted);padding:8px 11px;border-radius:8px;font-size:11px;font-weight:600}.filter-button span{color:var(--muted2);font-size:10px;margin-left:3px}.filter-button:hover{background:var(--panel2);color:var(--text)}.filter-button.active{background:rgba(67,143,232,.14);border-color:rgba(67,143,232,.28);color:var(--blue)}.filter-button.active span{color:var(--blue)}.status-line{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:10px}.status-dot{width:6px;height:6px;border-radius:50%;background:var(--green)}.status-line.loading .status-dot{background:var(--gold);animation:pulse 1s infinite}.status-line.error .status-dot{background:#e58c6c}@keyframes pulse{50%{opacity:.3}}.metrics-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:14px}.metric-card{padding:14px 16px;display:flex;align-items:center;gap:12px}.metric-icon{width:37px;height:37px;display:grid;place-items:center;border-radius:10px;flex-shrink:0}.metric-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.metric-icon.blue{background:rgba(67,143,232,.13);color:var(--blue)}.metric-icon.gold{background:rgba(230,185,79,.13);color:var(--gold)}.metric-icon.green{background:rgba(66,182,154,.13);color:var(--green)}.metric-label{font-size:9px;letter-spacing:.1em;color:var(--muted);font-weight:700}.metric-value{font-family:Manrope,sans-serif;font-size:22px;font-weight:800;line-height:1.2;margin-top:3px}.metric-text{font-size:15px}.workspace-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(360px,.85fr);gap:14px;align-items:stretch}.map-panel,.results-panel{min-width:0;padding:17px}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:13px}.map-tools{display:flex;align-items:center;gap:9px}.map-live{display:flex;align-items:center;gap:6px;font-size:9px;letter-spacing:.08em;color:var(--muted);font-weight:700}.map-live .live-dot{width:6px;height:6px}.map-panel #map{width:100%;height:510px;border-radius:10px;background:var(--bg2);overflow:hidden;z-index:1}.leaflet-container{font:inherit;background:#111e30}.leaflet-control-attribution{font-size:9px!important}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:var(--panel);color:var(--text)}.leaflet-popup-content{font-size:12px}.leaflet-bar a{background:var(--panel)!important;color:var(--text)!important;border-color:var(--border)!important}.map-legend{display:flex;gap:17px;flex-wrap:wrap;padding:13px 3px 1px;color:var(--muted);font-size:10px}.legend-swatch{width:9px;height:9px;display:inline-block;border-radius:2px;margin-right:5px}.legend-swatch.elementary{background:#4298ed}.legend-swatch.secondary{background:#a886dc}.legend-swatch.unified{background:#35b899}.legend-pin{width:8px;height:8px;display:inline-block;background:#f1bd4f;border:2px solid #fff;border-radius:50%;margin-right:6px}.results-heading{margin-bottom:14px}.result-count{min-width:27px;height:27px;border-radius:8px;display:grid;place-items:center;background:var(--panel3);font-size:11px;font-weight:700;color:var(--muted)}.results-list{display:flex;flex-direction:column;gap:10px;max-height:610px;overflow:auto;padding-right:2px}.empty-state{min-height:330px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:22px}.empty-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:16px;background:rgba(67,143,232,.12);color:var(--blue);margin-bottom:15px}.empty-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.6}.empty-state h3{font-family:Manrope,sans-serif;font-size:14px;margin:0 0 7px}.empty-state p{max-width:270px;color:var(--muted);font-size:11px;line-height:1.65;margin:0}.district-card{border:1px solid var(--border);border-left:3px solid #4298ed;border-radius:10px;padding:13px;background:var(--panel2);transition:border-color .15s}.district-card.secondary{border-left-color:#a886dc}.district-card.unified{border-left-color:#35b899}.district-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.district-name{font-size:12px;font-weight:700;line-height:1.45}.district-type{font-size:9px;white-space:nowrap;padding:5px 7px;border-radius:5px;background:var(--panel3);color:var(--muted);font-weight:700}.district-grades{font-size:10px;color:var(--muted);margin-top:6px}.liaison-divider{border:0;border-top:1px solid var(--border);margin:11px 0}.liaison-label{font-size:9px;color:var(--muted2);font-weight:700;letter-spacing:.09em}.liaison-name{font-size:12px;font-weight:700;margin-top:5px}.contact-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}.contact-link{font-size:10px;color:var(--blue);text-decoration:none;display:inline-flex;align-items:center;gap:5px}.contact-link:hover{text-decoration:underline}.contact-link svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.office-address{font-size:10px;color:var(--muted);margin-top:8px;line-height:1.5}.no-match{font-size:10px;color:var(--muted);margin-top:7px}.app-footer{display:flex;justify-content:space-between;gap:10px;color:var(--muted2);font-size:9px;letter-spacing:.08em;padding:20px 2px 26px}.app-footer b{color:var(--gold);padding:0 4px}
@media(max-width:1050px){.workspace-grid{grid-template-columns:1fr}.results-list{max-height:none}.map-panel #map{height:440px}.results-panel{min-height:240px}}
@media(max-width:700px){.app-shell{padding:0 15px}.topbar{height:72px}.brand-lockup{gap:10px}.logo-wrap{width:80px;height:43px;padding:7px}.brand-divider{height:34px}.brand-kicker{font-size:8px}.brand-title{font-size:14px}.brand-subtitle{font-size:10px}.internal-pill{display:none}.top-actions{gap:5px}main{padding-top:25px}.intro{margin-bottom:19px}.intro-mark{width:55px;height:55px;margin-right:0}.intro-copy{font-size:12px}.search-panel{padding:16px 14px}.search-row{align-items:stretch;flex-direction:column}.primary-button{width:100%;height:44px}.input-shell{height:46px}.search-footer{align-items:flex-start;flex-direction:column}.grade-filters{width:100%}.filter-button{font-size:10px;padding:7px 8px}.metrics-grid{gap:7px}.metric-card{padding:10px 8px;gap:8px}.metric-icon{width:30px;height:30px}.metric-label{font-size:8px}.metric-value{font-size:18px}.metric-text{font-size:12px}.workspace-grid{gap:10px}.map-panel,.results-panel{padding:13px}.map-panel #map{height:350px}.map-legend{gap:10px;font-size:9px}.app-footer{font-size:8px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Address pin and boundary comparison */
.residence-marker{background:transparent!important;border:0!important}
.residence-marker .marker-pulse{position:absolute;left:5px;top:5px;width:18px;height:18px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:#f0b94a;border:3px solid #fff;box-shadow:0 2px 12px rgba(0,0,0,.5),0 0 0 5px rgba(240,185,74,.2)}
.residence-marker .marker-pulse i{position:absolute;left:4px;top:4px;width:4px;height:4px;border-radius:50%;background:#17263a}
.residence-popup{min-width:190px;line-height:1.5}
.residence-popup strong{display:block;font-size:10px;letter-spacing:.08em;color:#b98920;margin-bottom:4px}
.residence-popup div{font-size:12px;font-weight:700}
.residence-popup small{display:block;margin-top:4px;color:var(--muted);font-size:10px}
.address-pin-summary{padding:11px 12px;border:1px solid rgba(240,185,74,.3);background:rgba(240,185,74,.07);border-radius:9px;margin-bottom:10px}
.pin-summary-label{font-size:9px;letter-spacing:.1em;font-weight:800;color:#c99a35}
.pin-summary-address{font-size:11px;font-weight:700;line-height:1.45;margin-top:4px;color:var(--text)}
.pin-summary-coordinates{font-size:9px;color:var(--muted);margin-top:4px;font-variant-numeric:tabular-nums}
.results-subheading{font-size:9px;letter-spacing:.1em;font-weight:800;color:var(--muted);padding:5px 2px 0}
.nearby-heading{margin-top:7px}
.nearby-note{font-size:10px;line-height:1.5;color:var(--muted);padding:0 2px 2px}
.boundary-distance{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 9px;margin-top:10px;border-radius:7px;background:var(--panel3)}
.boundary-distance span{font-size:8px;font-weight:800;letter-spacing:.07em;color:var(--muted)}
.boundary-distance strong{font-size:10px;color:var(--text);white-space:nowrap}
.inside-distance{background:rgba(66,182,154,.09)}
.inside-distance span{color:var(--green)}
.inside-distance span i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:5px;vertical-align:1px}
.nearby-distance{background:rgba(147,165,186,.08)}
.nearby-card{border-style:dashed;border-left-style:solid;opacity:.94}
.compact-empty{min-height:170px;padding:14px}
.legend-swatch.nearby{background:transparent;border:1.5px dashed var(--muted);width:12px;height:8px}
@media(max-width:700px){.boundary-distance{align-items:flex-start;flex-direction:column;gap:4px}.pin-summary-address{font-size:10px}}

/* v3 address pin and map controls */
.map-view-controls{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.map-view-button{padding:8px 12px;border:1px solid var(--border);border-radius:8px;background:var(--panel2);color:var(--text);font-size:11px;font-weight:700}.map-view-button:hover:not(:disabled){border-color:var(--blue)}.map-view-button:disabled{opacity:.45;cursor:default}.residence-marker-v3{background:transparent!important;border:0!important}.address-tooltip-v3{font-weight:700;max-width:240px;white-space:normal}.legend-swatch.solid{width:14px;height:0;border-top:3px solid #00866d;vertical-align:3px}.legend-swatch.nearby{width:14px;height:0;border:0;border-top:3px dashed #c76609;vertical-align:3px}.legend-pin{background:#f2bd36}.nearby-card{border-left-color:#c76609!important}
