:root {
  color-scheme: dark;
  --bg: #09151f;
  --panel: #112331;
  --border: #28404e;
  --text: #eff7fa;
  --muted: #a6bbc7;
  --accent: #70ddeb;
  --low: #55c5a3;
  --moderate: #ebce65;
  --high: #f0a46b;
  --very-high: #ec7886;
}
.warning-banner {
  position: relative;
  width: 100%;
  background: #fff3cd;
  color: #664d03;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  border-bottom: 1px solid #ffe69c;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 90% 0%, #112836 0%, var(--bg) 52%); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; }
.page-shell { width: min(1540px, 100%); margin: auto; padding: 0 32px; }
.page-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 750; letter-spacing: -.7px; text-decoration: none; }
.brand img { border-radius: 12px; object-fit: contain; }
.brand-accent { color: var(--accent); }
.preview-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #34515c; border-radius: 30px; color: #bbdde4; font-size: 12px; white-space: nowrap; }
.preview-badge > span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.intro { padding: 30px 0 24px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 1.6px; text-transform: uppercase; }
.intro .eyebrow { color: var(--accent); }
h1 { margin: 10px 0; font-size: clamp(30px, 3.5vw, 44px); font-weight: 650; letter-spacing: -1.4px; line-height: 1.12; }
.subtitle { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.explore-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; }
.layer-nav { display: flex; gap: 7px; min-width: 0; overflow-x: auto; padding: 4px; margin-left: -4px; scrollbar-width: thin; scrollbar-color: #446675 transparent; }
.layer-button { flex-shrink: 0; min-height: 46px; padding: 0 22px; border: 1px solid var(--border); border-radius: 10px; background: #10202dc2; color: #b6cad5; font-size: 14px; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.layer-button:hover { background: #1c3442; border-color: #5b7a87; }
.layer-button.active { background: var(--accent); border-color: var(--accent); color: #102830; font-weight: 700; box-shadow: 0 2px 14px #70ddeb16; }
.demo-note { display: flex; align-items: baseline; gap: 8px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.demo-note > span { color: var(--accent); }
.explore-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.map-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: #0c1c28; box-shadow: 0 18px 60px #020a1226; }
.map-panel { height: clamp(720px, 80vh, 1000px); position: relative; background: #0b1a25; }
#county-map { width: 100%; height: 100%; }
.map-heading { position: absolute; top: 18px; left: 18px; max-width: calc(100% - 86px); display: flex; flex-direction: column; gap: 7px; pointer-events: none; padding: 10px 12px; border-radius: 10px; background: #0b1a25e8; border: 1px solid #213b48; }
.map-heading .eyebrow { color: #d7eaf0; }
#county-count { font-size: 12px; color: var(--muted); }
.legend-panel { padding: 18px 22px 20px; border-top: 1px solid var(--border); background: #112331; }
.legend-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 14px; font-size: 12px; color: var(--muted); }
.legend-heading p { margin: 0; }
.legend-heading > span { white-space: nowrap; }
.map-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.data-status { max-width: 620px; min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.layer-nav { flex-shrink: 0; }
#refresh-data { background: #142b39; color: var(--text); border: 1px solid var(--border); border-radius: 7px; min-height: 36px; padding: 5px 12px; font-size: 12px; }
[data-level="unavailable"] { --level-color: #a1b0bd; }
.map-legend i[data-level="unavailable"] { background: #536473; }
#signal-reasons { padding-left: 18px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.reasons-title { margin-top: 20px; }
.weather-attribution { color: white; font-size: 12px; font-weight: 400; line-height: 1.6; }
.provider-details { margin-top: 18px; }
.provider-details summary { color: var(--accent); font-size: 12px; cursor: pointer; padding: 8px 0; }
.provider-details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.map-legend { grid-template-columns: repeat(5,minmax(0,1fr)); }
.map-legend > span { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; }
.map-legend i { width: 9px; height: 9px; display: inline-block; flex-shrink: 0; border-radius: 50%; }
.map-legend b { color: var(--muted); font-weight: 500; margin-left: 5px; }
[data-level="low"] { --level-color: var(--low); }
[data-level="moderate"] { --level-color: var(--moderate); }
[data-level="high"] { --level-color: var(--high); }
[data-level="very-high"] { --level-color: var(--very-high); }
.map-legend i { background: var(--level-color); }
.reset-view { position: absolute; right: 16px; bottom: 16px; padding: 0 13px; min-height: 44px; background: #142b39ed; border: 1px solid #426171; border-radius: 9px; color: var(--text); font-size: 12px; }
.reset-view:hover { background: #254353; }
.reset-view span { margin-left: 6px; color: var(--accent); }
.hover-name { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); max-width: 40%; padding: 9px 14px; border: 1px solid #6ba6b1; border-radius: 8px; background: #142b35f5; font-size: 12px; pointer-events: none; text-align: center; }
.map-status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100% - 48px)); padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: #10212ff2; color: #d4e2e8; text-align: center; font-size: 14px; line-height: 1.6; }
[hidden] { display: none !important; }
.selection-panel { min-width: 0; padding: 24px; background: linear-gradient(145deg, #152c3a, #0f202d); border: 1px solid var(--border); border-radius: 18px; }
h2 { margin: 9px 0 9px; font-size: 28px; font-weight: 650; letter-spacing: -.6px; overflow-wrap: anywhere; }
#selection-hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.65; }
.empty-detail { text-align: center; padding: 34px 0 30px; }
.explore-icon { display: grid; place-items: center; margin: auto auto 16px; width: 70px; height: 70px; font-size: 40px; color: var(--accent); border: 1px solid #365967; border-radius: 50%; background: #1b37454d; }
.empty-detail p { font-size: 15px; margin: 0 0 10px; }
.empty-detail > span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.detail-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 0 16px; }
h3 { font-size: 14px; font-weight: 600; line-height: 1.6; margin: 0; }
.signal-badge { border: 1px solid var(--level-color); border-radius: 6px; padding: 6px 9px; color: var(--level-color); font-size: 11px; font-weight: 750; letter-spacing: .6px; }
.signal-badge[data-stale="true"] { border-style: dashed; opacity: .8; }
.evidence-tier { display: inline-block; padding: 5px 9px; margin-bottom: 12px; border: 1px dashed #70a7bc; border-radius: 6px; color: #b9d2df; font-size: 11px; font-weight: 650; letter-spacing: 1px; }
.evidence-tier[data-tier="current"] { border-style: solid; color: #70ddeb; }
.evidence-tier[data-tier="recent"] { border-style: solid; color: #e1d697; }
.evidence-tier[data-tier="stale"] { color: #ecad86; }
.metric-card { padding: 20px; border: 1px solid #314a58; border-radius: 12px; background: #0b1b28; }
.metric-card > p:first-child { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.metric-value { margin: 0; line-height: 1.2; }
.metric-value strong { font-size: 48px; font-weight: 600; letter-spacing: -2px; }
.metric-value span { color: var(--muted); font-size: 15px; margin-left: 4px; }
#metric-caption { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.supporting-indicators { margin: 16px 0 0; }
.supporting-indicators > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--border); padding: 12px 0; font-size: 12px; }
.supporting-indicators dt { color: var(--muted); }
.supporting-indicators dd { margin: 0; text-align: right; font-weight: 650; color: var(--level-color, var(--text)); }
.fixture-note { padding-left: 10px; border-left: 2px solid #426371; color: var(--muted); font-size: 12px; line-height: 1.7; margin: 24px 0; }
.county-picker { border-top: 1px solid var(--border); padding-top: 20px; }
.county-picker label { display: block; margin-bottom: 9px; color: #bbced8; font-size: 12px; }
.county-picker select { width: 100%; min-height: 46px; border: 1px solid #426171; border-radius: 9px; padding: 0 10px; background: #0b1b28; color: var(--text); font-size: 13px; }
.panel-footer { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; padding-top: 20px; }
.panel-footer > span { color: var(--accent); font-size: 18px; }
footer { border-top: 1px solid var(--border); margin-top: 28px; padding: 20px 0 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; line-height: 1.6; }
footer a { text-underline-offset: 3px; }
.maplibregl-ctrl-group { overflow: hidden; background: #142a36; border: 1px solid #426171; border-radius: 9px; }
.maplibregl-ctrl-group button { width: 44px; height: 44px; }
.maplibregl-ctrl-group button + button { border-top-color: #426171; }
.maplibregl-ctrl-group button:hover { background-color: #28434f; }
.maplibregl-ctrl-icon { filter: invert(1); }
.noscript-message { padding: 24px; text-align: center; }
@media (max-width: 1100px) {
  .explore-toolbar { flex-direction: column; align-items: stretch; gap: 9px; }
  .explore-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
  .selection-panel { padding: 20px; }
  .map-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .explore-layout { grid-template-columns: minmax(0, 1fr); }
  .map-panel { height: clamp(520px, 70svh, 800px); }
  .selection-panel { padding: 24px; }
  .empty-detail { padding: 20px 0; }
}
@media (max-width: 600px) {
  .warning-banner { font-size: 0.73rem; padding: 8px 12px; }
  .page-shell { padding: 0 16px; }
  .page-header { min-height: 70px; }
  .brand { font-size: 19px; gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .preview-badge { font-size: 11px; padding: 7px 9px; }
  .intro { padding: 25px 0 20px; }
  h1 { letter-spacing: -.9px; }
  .subtitle { font-size: 14px; max-width: 390px; }
  .explore-toolbar { padding-bottom: 16px; }
  .layer-nav { margin: -4px; padding: 4px; gap: 6px; flex-wrap: wrap; overflow-x: visible; }
  .layer-button { padding: 0 16px; font-size: 13px; }
  .demo-note { font-size: 11px; }
  .map-card, .selection-panel { border-radius: 14px; }
  .map-panel { height: max(430px, 58svh); }
  .map-heading { top: 12px; left: 12px; padding: 8px 10px; }
  .map-heading .eyebrow { font-size: 10px; }
  #county-count { font-size: 11px; }
  .legend-panel { padding: 16px; }
  .legend-heading { font-size: 11px; }
  .map-legend { gap: 8px; }
  .map-legend > span { padding: 10px; font-size: 12px; }
  .reset-view { right: 12px; bottom: 12px; }
  .hover-name { display: none; }
  .selection-panel { padding: 20px; }
  .detail-heading { padding-top: 20px; }
  footer { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
