:root {
  --bg: #f0f1f3; --text: rgba(0,0,0,0.85); --text2: rgba(0,0,0,0.5); --text3: rgba(0,0,0,0.35);
  --glass: rgba(255,255,255,0.55); --glass-strong: rgba(243,244,246,0.85);
  --glass-border: rgba(255,255,255,0.30); --row-hover: rgba(255,255,255,0.5);
  --hairline: rgba(0,0,0,0.08); --chip: rgba(255,255,255,0.6);
  --link: #1e4f8f; --link-h: #163c6e; --map-bg: #dfe3e8; --accent: rgb(0,122,255);
  --card-solid: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191b1f; --text: rgba(255,255,255,0.85); --text2: rgba(255,255,255,0.55); --text3: rgba(255,255,255,0.35);
    --glass: rgba(28,28,30,0.55); --glass-strong: rgba(28,29,33,0.85);
    --glass-border: rgba(255,255,255,0.10); --row-hover: rgba(255,255,255,0.06);
    --hairline: rgba(255,255,255,0.10); --chip: rgba(255,255,255,0.10);
    --link: #7db4f5; --link-h: #a8ccf8; --map-bg: #1a2230; --card-solid: #232529;
  }
  #map .leaflet-tile { filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(88%) saturate(60%); }
  .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: rgb(44,44,46); color: rgba(255,255,255,0.85); }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body { font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
main { max-width: 680px; margin: 0 auto; padding: 24px 14px 40px; display: flex; flex-direction: column; gap: 12px; }
a { color: var(--link); } a:hover { color: var(--link-h); }
select:focus, button:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0,122,255,0.4); }
h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.15; text-wrap: pretty; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; margin: 14px 0 6px; }

.banner-911 { background: #d03b3b; color: #ffffff; text-align: center; padding: 8px 16px;
  font-size: 13px; font-weight: 600; }
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--glass-strong);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 0.5px 0 var(--hairline);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text);
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.site-header nav { display: flex; align-items: center; gap: 16px; }
.site-header nav a { text-decoration: none; color: var(--text2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.site-header nav a:hover, .site-header nav a.active { color: var(--text); }
.site-header nav a.active { font-weight: 600; }
.lang-switch { font-size: 12px !important; font-weight: 600 !important; padding: 3px 9px;
  border-radius: 999px; background: var(--chip); box-shadow: inset 0 0 0 1px var(--glass-border); }

.glass-card { background: var(--glass); backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px); border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--glass-border); }
.summary-card { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.summary-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  color: var(--text2); background: var(--chip); border-radius: 999px; padding: 4px 11px;
  box-shadow: inset 0 0 0 1px var(--glass-border); text-decoration: none; }
a.chip { font-weight: 500; } a.chip:hover { color: var(--text); }
.pulse-wrap { position: relative; width: 8px; height: 8px; display: inline-block; }
.pulse-wrap span { position: absolute; inset: 0; border-radius: 50%; background: #0ca30c; }
.pulse-wrap span:last-child { animation: pulse-ring 2.4s ease-out infinite; }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.6; } 70% { transform: scale(2.4); opacity: 0; } 100% { transform: scale(2.4); opacity: 0; } }
.summary-stats { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.median-num { font-size: 40px; font-weight: 700; letter-spacing: -0.022em; line-height: 1;
  font-variant-numeric: tabular-nums; }
.over-num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--text); }
.over-label { text-align: right; font-size: 13px; color: var(--text2); line-height: 1.5; }
.dist-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.band-chip { display: inline-flex; align-items: center; gap: 6px; border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--text); border-radius: 999px;
  height: 30px; padding: 0 12px; box-shadow: inset 0 0 0 1px var(--glass-border); }
.band-chip.on { box-shadow: inset 0 0 0 1.5px currentColor; }

.band-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--text); }
.band-badge .dot, .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.band-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  color: var(--text); white-space: nowrap; border-radius: 999px; padding: 2px 9px; }
.band-pill .dot { width: 8px; height: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #ffffff; border: none; border-radius: 12px; min-height: 44px;
  padding: 10px 16px; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  text-decoration: none; box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.3); }
.btn:hover { color: #ffffff; } .btn:active { background: rgb(41,98,217); }
.btn-block { display: flex; width: 100%; min-height: 48px; }
.btn-sm { min-height: 34px; padding: 0 16px; font-size: 13px; border-radius: 8px; }

.map-wrap { position: relative; }
#map { height: 340px; border-radius: 16px; overflow: hidden; background: var(--map-bg);
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 0 0 0.5px var(--hairline); }
.map-legend { position: absolute; left: 10px; bottom: 10px; z-index: 800; display: flex;
  flex-wrap: wrap; gap: 9px; align-items: center; background: var(--glass);
  backdrop-filter: saturate(180%) blur(40px); -webkit-backdrop-filter: saturate(180%) blur(40px);
  border-radius: 999px; padding: 6px 12px; font-size: 11px; font-weight: 500; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 4px 12px rgba(0,0,0,0.12); }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.leaflet-container { font-family: inherit; }

.rec-card { box-shadow: inset 0 0 0 1.5px var(--accent); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px; }
.rec-eyebrow { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.02em; }
.rec-main { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.rec-name { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.rec-meta { font-size: 13px; color: var(--text2); margin-top: 2px; }
.rec-occ { font-size: 30px; font-weight: 700; letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums; line-height: 1.1; }
.rec-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rec-basis { font-size: 12px; color: var(--text3); }

.teaser { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; border-radius: 12px; }
a .teaser:hover { background: var(--row-hover); }
.teaser-title { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.teaser-sub { font-size: 12px; color: var(--text2); line-height: 1.45; }

.controls { display: flex; gap: 8px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-top: 4px; }
select { appearance: none; -webkit-appearance: none; font-family: inherit; font-size: 13px;
  font-weight: 500; color: var(--text); height: 34px; padding: 0 30px 0 13px; border: none;
  border-radius: 999px; background-color: var(--chip); cursor: pointer;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><path d="M2 3.5 L5 6.5 L8 3.5" stroke="%23888" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat; background-position: right 11px center;
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 0.5px 1px rgba(0,0,0,0.06); }
.sort-note { font-size: 12px; color: var(--text3); font-weight: 500; }

#list { overflow: hidden; }
#list > a, #list > div.facility-card-wrap { text-decoration: none; color: inherit; display: block; }
.facility-card { padding: 13px 16px 12px; display: flex; flex-direction: column; gap: 9px;
  box-shadow: inset 0 -0.5px 0 var(--hairline); transition: background 120ms; }
a:hover .facility-card { background: var(--row-hover); }
.facility-card .fc-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.facility-card h3 { margin: 0 0 2px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.3; color: var(--text); }
.facility-card .meta { font-size: 13px; color: var(--text2); }
.fc-occ { font-size: 24px; font-weight: 700; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; line-height: 1.1; text-align: right; }
.fc-right { flex-shrink: 0; text-align: right; }
.occ-bar { position: relative; height: 6px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.occ-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; display: block; }

.stale-banner { background: #fab219; color: #1a1a18; padding: 8px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 500; }

.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px;
  font-weight: 500; text-decoration: none; }
.fac-hero { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; }
.fac-h1 { margin: 0 0 3px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.25; text-wrap: pretty; }
.gauge { position: relative; height: 8px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.gauge i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; display: block; }
.gauge b { position: absolute; top: 0; bottom: 0; left: 50%; width: 1.5px; background: var(--text3); }
.gauge-axis { display: flex; justify-content: space-between; font-size: 11px;
  color: var(--text3); font-variant-numeric: tabular-nums; margin-top: 4px; }
#minimap { height: 220px; background: var(--map-bg); }
@media (prefers-color-scheme: dark) {
  #minimap .leaflet-tile { filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(88%) saturate(60%); }
}
.addr-row { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 13px 16px; }
.addr { display: flex; align-items: flex-start; gap: 9px; min-width: 0;
  font-size: 13px; color: var(--text); line-height: 1.45; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat-grid .stat { border-radius: 14px; padding: 13px 15px; display: flex;
  flex-direction: column; gap: 8px; min-width: 0; }
.stat-bar { height: 4px; }

.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.stat { background: var(--glass); backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px); border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--glass-border); padding: 12px 16px; min-width: 128px; }
.stat .n { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--text2); font-size: 12px; margin-top: 2px; }
.chart-wrap { overflow-x: auto; background: var(--glass); backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px); border: none; border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--glass-border); padding: 14px; margin: 10px 0; }

.wizard-card { background: var(--glass); backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px); border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--glass-border); padding: 14px 18px; margin: 10px 0; }
.wizard-card h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -0.01em; }
.wizard-card.urgent { box-shadow: inset 0 0 0 2px #d03b3b; }

footer { max-width: 680px; margin: 0 auto; padding: 18px 14px 36px; color: var(--text2);
  font-size: 12px; line-height: 1.6; box-shadow: inset 0 0.5px 0 var(--hairline); }
footer p { margin: 0 0 4px; }

@media (max-width: 420px) {
  .median-num { font-size: 32px; }
  .fc-occ { font-size: 20px; }
  #map { height: 300px; }
}
