:root {
  --bg:      #0d0d0e;
  --surface: #141416;
  --s2:      #1c1c1f;
  --s3:      #222226;
  --border:  #2a2a2f;
  --border2: #3a3a42;
  --text:    #f2f0ec;
  --muted:   #cfcdc7;   /* brightened for readability (older/low-vision) */
  --dim:     #a4a2ac;   /* brightened; still a step below --muted for hierarchy */
  --red:     #c0392b;
  --red2:    #7a2a22;
  --amber:   #d4a843;
  --blue:    #4a7fa5;
  --blue2:   #2a4f6a;
  --green:   #4a8c6a;
  --teal:    #3d8a7a;
  --purple:  #7a5a9a;
  --orange:  #c0622b;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--sans); }

/* ── LAYOUT ── */
#app { display: flex; height: 100vh; }
#sidebar {
  width: 320px; min-width: 320px; height: 100%;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden; z-index: 1000;
}
#map { flex: 1; height: 100%; }

/* ── MOBILE TOGGLE + BACKDROP (hidden on desktop) ── */
#mobile-toggle {
  display: none; position: fixed; top: 14px; right: 14px; z-index: 1200;
  align-items: center; gap: 7px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--border2); border-radius: 22px;
  color: var(--text); font-family: var(--sans); font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 18px rgba(0,0,0,.5); cursor: pointer;
}
#mobile-toggle svg { flex-shrink: 0; }
#sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 999;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
#sheet-backdrop.visible { opacity: 1; pointer-events: auto; }
.sheet-handle { display: none; }

@media (max-width: 780px) {
  #mobile-toggle { display: flex; }
  #app { display: block; }
  #sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; min-width: 0; height: auto; max-height: 82vh;
    border-right: none; border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0; box-shadow: 0 -10px 34px rgba(0,0,0,.55);
    transform: translateY(100%); transition: transform .28s cubic-bezier(.32,.72,0,1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  #sidebar.sheet-open { transform: translateY(0); }
  #map { width: 100%; height: 100vh; }
  .sheet-handle {
    display: block; width: 36px; height: 4px; border-radius: 2px;
    background: var(--border2); margin: 10px auto 0; flex-shrink: 0;
  }
  .layer-toggle, .cancer-opt, .rad-opt { padding: 9px 10px; }
}

/* ── SIDEBAR HEADER ── */
#sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.eyebrow {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--red);
  margin-bottom: 6px;
}
.title-kind {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: .03em; color: #c4bfd0; margin-bottom: 9px;
}
.title-kind .author-name {
  font-weight: 800; font-size: 14.5px; color: #ffc94a; letter-spacing: .01em;
  text-shadow: 0 0 8px rgba(255,201,74,.35);
}
.sidebar-title {
  font-family: var(--serif); font-size: 25px; font-weight: 900;
  line-height: 1.12; color: var(--text); margin-bottom: 4px;
}
.sidebar-title .title-sub {
  display: block; font-size: 15px; font-weight: 700; font-style: italic;
  color: var(--red); margin: 4px 0; letter-spacing: 0;
}
.sidebar-sub {
  font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: .04em;
}

/* ── SEARCH ── */
#search-wrap {
  padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; position: relative; z-index: 1500;
}
#search {
  width: 100%; background: var(--bg); border: 1px solid var(--border2);
  border-radius: 3px; padding: 8px 12px;
  font-family: var(--mono); font-size: 11px; color: var(--text); outline: none;
}
#search::placeholder { color: var(--dim); }
#search:focus { border-color: var(--blue2); }
#search-results {
  position: absolute; left: 16px; right: 16px; top: 100%; z-index: 3000;
  max-height: 300px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border2);
  border-top: none; border-radius: 0 0 4px 4px;
  box-shadow: 0 12px 30px rgba(0,0,0,.6);
  display: none;
}
.sr-item {
  padding: 7px 12px; font-size: 11px; cursor: pointer; border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.sr-item:hover { background: var(--s2); color: var(--text); }
.sr-name { font-weight: 500; }
.sr-sub  { font-family: var(--mono); font-size: 9px; color: var(--dim); margin-top: 1px; }
.sr-badge { font-family: var(--mono); font-size: 8px; letter-spacing: .05em; padding: 1px 4px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }
.sr-well { background: rgba(214,122,30,.18); color: #e8a35a; border: 1px solid rgba(214,122,30,.4); }
.sr-site { background: rgba(192,57,43,.18); color: #e07a6e; border: 1px solid rgba(192,57,43,.4); }
.sr-soil { background: rgba(245,208,0,.15); color: #e0c000; border: 1px solid rgba(245,208,0,.4); }
.sr-lc   { background: rgba(47,111,208,.18); color: #7fb2ff; border: 1px solid rgba(47,111,208,.4); }

/* ── SCROLL BODY ── */
#sidebar-body { flex: 1; overflow-y: auto; padding: 16px; }
#sidebar-body::-webkit-scrollbar { width: 4px; }
#sidebar-body::-webkit-scrollbar-track { background: var(--bg); }
#sidebar-body::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ── SECTION BLOCKS ── */
.section-label {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--dim);
  margin: 16px 0 8px;
}
.section-label:first-child { margin-top: 0; }

/* ── LAYER TOGGLES ── */
.layer-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 3px; cursor: pointer;
  border: 1px solid transparent; margin-bottom: 4px;
  transition: background .15s, border-color .15s;
}
.layer-toggle:hover { background: var(--s2); }
.layer-toggle.active { background: var(--s3); border-color: var(--border2); }
.toggle-swatch { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.toggle-swatch.square { border-radius: 2px; }
.toggle-label { font-size: 12px; color: var(--text); flex: 1; }
.toggle-count { font-family: var(--mono); font-size: 9px; color: var(--dim); }
.toggle-check { width: 14px; height: 14px; accent-color: var(--red); cursor: pointer; }

/* ── LEGEND ── */
.legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

/* ── TABS ── */
.tab-heading {
  display: flex; align-items: center; gap: 7px; margin-bottom: 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--amber);
}
.tab-heading svg { flex-shrink: 0; }
.tab-heading-sub { margin-top: 6px; margin-bottom: 20px; }
.tab-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; padding: 5px;
  background: var(--bg); border: 1px solid var(--border2); border-radius: 8px;
}
.tab-row { display: flex; gap: 4px; }
.tab-btn {
  flex: 1; background: var(--s2); border: 1px solid var(--border2); border-radius: 5px;
  padding: 11px 4px; font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  color: var(--text); cursor: pointer; text-align: center; line-height: 1.25;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.tab-btn:hover { background: var(--s3); border-color: var(--dim); }
.tab-btn.active {
  background: var(--red); border-color: var(--red);
  color: #fff; box-shadow: 0 2px 10px rgba(192,57,43,.45);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── COLLAPSIBLE LEGENDS (progressive disclosure for less-technical users) ── */
.legend-details { margin-top: 14px; border: 1px solid var(--border); border-radius: 4px; padding: 0 10px; background: var(--s2); }
.legend-details summary {
  cursor: pointer; padding: 9px 0; font-size: 11px; color: var(--muted); list-style: none;
}
.legend-details summary::-webkit-details-marker { display: none; }
.legend-details summary::before { content: '▸'; display: inline-block; margin-right: 7px; color: var(--dim); transition: transform .15s; }
.legend-details[open] summary::before { transform: rotate(90deg); }
.legend-details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.legend-details .legend-grid, .legend-details .choro-bar, .legend-details .choro-labels { margin-bottom: 8px; }
.legend-item { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-txt { font-size: 10px; color: var(--muted); line-height: 1.2; }

.choro-bar {
  height: 12px; border-radius: 2px;
  background: linear-gradient(to right, #f5f0e0, #f4c070, #e07030, #b02010, #600010);
  margin: 6px 0 4px;
}
.choro-labels { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; color: var(--dim); }

/* ── STATS ── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-box {
  background: var(--s2); border: 1px solid var(--border);
  border-radius: 3px; padding: 10px 12px;
}
.stat-val { font-family: var(--serif); font-size: 20px; font-weight: 900; color: var(--red); }
.stat-lbl { font-family: var(--mono); font-size: 9px; color: var(--dim); letter-spacing: .08em; margin-top: 2px; }

/* ── LINKS ── */
#sidebar-footer {
  padding: 12px 16px; border-top: 1px solid var(--border); flex-shrink: 0;
  display: flex; gap: 12px;
}
.footer-link {
  font-family: var(--mono); font-size: 10px; color: var(--dim);
  text-decoration: none; letter-spacing: .06em;
}
.footer-link:hover { color: var(--text); }

/* ── SHARE ── */
#sidebar-footer { flex-wrap: wrap; }
.share-row { display: flex; gap: 6px; align-items: center; width: 100%; margin-top: 4px; }
.share-lbl { font-family: var(--mono); font-size: 9px; color: var(--dim); letter-spacing: .12em; text-transform: uppercase; margin-right: 2px; }
.share-btn {
  background: var(--s2); border: 1px solid var(--border2); color: var(--muted);
  border-radius: 3px; min-width: 26px; height: 22px; padding: 0 6px;
  font-family: var(--mono); font-size: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}
.share-btn:hover { background: var(--s3); color: var(--text); border-color: var(--blue2); }
.share-btn.share-copied { color: var(--green); border-color: var(--green); }

/* ── POPUP ── */
.leaflet-popup-content-wrapper {
  background: var(--surface) !important; border: 1px solid var(--border2) !important;
  border-radius: 4px !important; box-shadow: 0 4px 24px rgba(0,0,0,.6) !important;
  color: var(--text) !important; font-family: var(--sans) !important;
  max-width: 320px !important; padding: 0 !important;
}
.leaflet-popup-tip { background: var(--surface) !important; }
.leaflet-popup-content { margin: 0 !important; width: auto !important; }

.popup-inner { padding: 16px 18px; }
.popup-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.popup-tag {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px;
  border-radius: 2px;
}
.popup-name { font-family: var(--serif); font-size: 16px; font-weight: 700; line-height: 1.2; color: #ffffff; margin-bottom: 4px; }
.popup-addr { font-family: var(--mono); font-size: 11px; color: #b8b6c0; margin-bottom: 10px; }
.popup-row { display: flex; gap: 16px; margin-bottom: 10px; }
.popup-field { }
.popup-field-lbl { font-family: var(--mono); font-size: 9.5px; color: #a8a6b0; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.popup-field-val { font-size: 13px; color: #ececec; }
/* Verified contaminant list. Sites carry up to ~100, so the list scrolls rather than
   truncating — the chemicals are the finding, not a preview of it. */
.popup-chem-list { display: flex; flex-wrap: wrap; gap: 3px; max-height: 132px; overflow-y: auto; padding-right: 2px; margin-top: 3px; }
.popup-chem { font-size: 11.5px; color: #ececec; background: rgba(184,132,232,.14); border: 1px solid rgba(184,132,232,.3); border-radius: 3px; padding: 1px 5px; white-space: nowrap; }
.popup-field-pending { font-size: 12px; color: #b9b6c2; font-style: italic; line-height: 1.5; }
.popup-chem-note { font-size: 10.5px; color: #a8a6b0; margin-top: 4px; line-height: 1.45; }
.popup-narrative { font-size: 13px; color: #e2e0da; line-height: 1.65; border-top: 1px solid var(--border2); padding-top: 10px; margin-top: 4px; }
.popup-link { display: block; margin-top: 10px; font-family: var(--mono); font-size: 10px; color: var(--blue); text-decoration: none; }
.popup-link:hover { color: var(--text); }
.popup-reports { margin-top: 11px; border-top: 1px solid var(--border2); padding-top: 9px; }
.popup-report { display: block; font-size: 11.5px; line-height: 1.4; color: var(--blue); text-decoration: none; margin-top: 6px; }
.popup-report:hover { color: var(--text); text-decoration: underline; }
.popup-report-all { font-family: var(--mono); font-size: 10px; color: #a8a6b0; margin-top: 8px; }

.popup-tract { padding: 14px 16px; }
.popup-tract-name { font-family: var(--serif); font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.popup-tract-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.popup-tract-stat-val { font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--amber); }
.popup-tract-stat-lbl { font-family: var(--mono); font-size: 9px; color: var(--dim); letter-spacing: .08em; margin-top: 2px; }

/* ── LEAFLET OVERRIDES ── */
.leaflet-control-zoom { border: 1px solid var(--border2) !important; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--muted) !important; border-bottom: 1px solid var(--border) !important; }
.leaflet-control-zoom a:hover { background: var(--s2) !important; color: var(--text) !important; }
.leaflet-control-attribution { background: rgba(13,13,14,.85) !important; color: var(--dim) !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: var(--dim) !important; }

/* ── ROAD TOOLTIP ── */
.road-tip {
  background: var(--s2) !important; border: 1px solid var(--border2) !important;
  color: var(--text) !important; font-family: var(--mono) !important;
  font-size: 10px !important; padding: 2px 7px !important; box-shadow: none !important;
}
.road-tip::before { display: none !important; }
.road-label {
  background: transparent !important; border: none !important; box-shadow: none !important;
  color: #cdc4e6 !important; font-family: var(--mono) !important; font-size: 9px !important;
  font-weight: 500 !important; letter-spacing: .02em;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 4px #000 !important; padding: 0 !important;
}
.road-label::before { display: none !important; }
.site-road-label {
  background: transparent !important; border: none !important; box-shadow: none !important;
  color: #b9abdd !important; font-family: var(--mono) !important; font-size: 8.5px !important;
  font-weight: 500 !important; letter-spacing: .02em;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 4px #000 !important; padding: 0 !important;
}
.site-road-label::before { display: none !important; }

/* ── CANCER SIR CONTROL ── */
.cancer-note { font-size: 10px; color: var(--dim); line-height: 1.5; margin-bottom: 8px; }
#cancer-select { display: flex; flex-direction: column; gap: 3px; }
.cancer-opt { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 3px; cursor: pointer; border: 1px solid transparent; }
.cancer-opt:hover { background: var(--s2); }
.cancer-opt.active { background: var(--s3); border-color: var(--border2); }
.cancer-opt input { accent-color: var(--amber); cursor: pointer; }
.cancer-name { flex: 1; font-size: 12px; color: var(--text); }
.cancer-sir { font-family: var(--mono); font-size: 10px; color: var(--amber); }
.cancer-legend { margin-top: 10px; padding: 10px; background: var(--s2); border: 1px solid var(--border); border-radius: 3px; }
.cancer-legend-title { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* ── CHEMICAL DROPDOWN + RADIOACTIVE ── */
#chem-select { width: 100%; background: var(--bg); border: 1px solid var(--border2); border-radius: 3px; padding: 8px 10px; font-family: var(--mono); font-size: 11px; color: var(--text); outline: none; cursor: pointer; }
#chem-select:focus { border-color: var(--blue2); }
.chem-note { font-size: 10px; color: var(--muted); line-height: 1.5; margin-top: 7px; }
.chem-note b { color: var(--text); }
.chem-note .elev { color: var(--amber); font-weight: 600; }
/* ── MONITORING WELLS ── */
#well-select, #well-year-select, #sarea-toc-year-select { width: 100%; background: var(--bg); border: 1px solid var(--border2); border-radius: 3px; padding: 8px 10px; font-family: var(--mono); font-size: 11px; color: var(--text); outline: none; cursor: pointer; }
#well-select:focus, #well-year-select:focus, #sarea-toc-year-select:focus { border-color: var(--blue2); }
.well-droplet { background: none; border: none; }
.conc-plot { margin-top: 9px; border-top: 1px solid var(--border2); padding-top: 7px; }
.conc-plot-title { font-size: 10px; color: var(--text); font-family: var(--mono); margin-bottom: 3px; }
.conc-plot svg { display: block; }
.conc-plot-legend { font-size: 9px; color: var(--muted); margin-top: 3px; font-family: var(--mono); }
.conc-plot-legend .cd { color: #e0554e; } .conc-plot-legend .cn { color: #9aa4b2; }
.conc-plot-note { font-size: 10px; color: var(--muted); margin-top: 7px; font-family: var(--mono); }
.popup-loc { font-size: 10px; line-height: 1.4; color: #d69a5a; margin-top: 9px; padding-top: 7px; border-top: 1px solid #ffffff14; }
.conc-plot-hint { font-size: 9.5px; line-height: 1.35; color: var(--muted); margin-top: 3px; font-style: italic; }
.chem-trend-panel { background: var(--surface); border: 1px solid var(--border2); border-radius: 6px; padding: 8px 10px 7px; box-shadow: 0 2px 14px rgba(0,0,0,.55); width: 232px; }
.ctp-title { font-family: var(--mono); font-size: 11px; color: var(--text); margin-bottom: 4px; }
.ctp-title b { color: #e0554e; }
.ctp-sub { font-family: var(--mono); font-size: 9px; color: var(--muted); margin-top: 3px; }
@media (max-width: 640px) { .chem-trend-panel { width: 190px; } }
.well-size-legend { display: flex; align-items: flex-end; gap: 14px; margin: 10px 2px 4px; }
.well-size-legend .wsl { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--dim); font-size: 9px; font-family: var(--mono); }
.rad-note { font-size: 10px; color: var(--dim); line-height: 1.5; margin-bottom: 8px; }
.rad-opts { display: flex; flex-direction: column; gap: 3px; }
.rad-opt { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 3px; cursor: pointer; border: 1px solid transparent; }
.rad-opt:hover { background: var(--s2); }
.rad-opt.active { background: var(--s3); border-color: var(--border2); }
.rad-opt input { accent-color: #f5e050; cursor: pointer; }
.rad-swatch { width: 12px; height: 12px; border-radius: 50%; background: #f5e050; border: 2px solid #7a1212; flex-shrink: 0; }
.rad-name { flex: 1; font-size: 12px; color: var(--text); }
.rad-count { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.rad-group-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #e0c000; margin: 8px 0 3px 2px; }
/* per-site "Strongest findings" nested dropdown (Radiation tab) */
.site-findings { margin: 2px 0 8px 22px; border-left: 3px solid; border-image: repeating-linear-gradient(45deg,#f5d000 0 5px,#111 5px 10px) 1; padding-left: 8px; }
.findings-title { font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: #f5d000; cursor: pointer; padding: 3px 0; user-select: none; display:flex; align-items:center; gap:5px; }
.findings-caret { transition: transform .15s; font-size: 9px; }
.site-findings.collapsed .findings-caret { transform: rotate(-90deg); }
.site-findings.collapsed .findings-body { display: none; }
.finding { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; background: rgba(245,208,0,.06); border: 1px solid rgba(245,208,0,.22); border-radius: 5px; padding: 5px 7px; margin: 3px 0; cursor: pointer; transition: background .12s, border-color .12s; }
.finding:hover { background: rgba(245,208,0,.14); border-color: rgba(245,208,0,.5); }
.finding-t { font-size: 11.5px; font-weight: 600; color: #f3ecd0; }
.finding-s { font-size: 10px; color: var(--dim); }
/* Chemicals-tab strongest findings (blood-red theme, grouped by site) */
.chem-find-site { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: #e88; margin: 9px 2px 3px; }
.chem-find-site:first-child { margin-top: 2px; }
.finding.chem { background: rgba(184,29,36,.08); border-color: rgba(184,29,36,.28); }
.finding.chem:hover { background: rgba(184,29,36,.18); border-color: rgba(184,29,36,.6); }
.finding.chem .finding-t { display:flex; justify-content:space-between; gap:8px; }
.finding.chem .finding-v { color:#ff6b66; font-family: var(--mono); font-weight:700; white-space:nowrap; }
.rad-group-label:first-child { margin-top: 2px; }
.rad-yr { font-family: var(--mono); font-size: 8.5px; color: var(--dim); margin-left: 6px; }
.sample-type-filter { display: flex; flex-direction: column; gap: 1px; }
.stf-opt { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 3px; cursor: pointer; border: 1px solid transparent; }
.stf-opt:hover { background: var(--s2); }
.stf-swatch { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #8b1a2b; flex-shrink: 0; }
.stf-name { flex: 1; font-size: 12px; color: var(--text); }
.stf-count { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.stf-opt input { cursor: pointer; }
/* ── accordion sections (Monitoring Wells tab) ── */
.acc { border-top: 1px solid var(--border2); }
.acc-head { display: flex; align-items: center; gap: 8px; padding: 11px 2px; cursor: pointer; user-select: none; }
.acc-head:hover .acc-title { color: #fff; }
.acc-head:hover .acc-arrow { color: #cbb8ff; }
.acc-title { flex: 1; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #efe9ff; }
.acc-info { background: none; border: 1px solid var(--border2); color: #9aa4b2; border-radius: 50%; width: 16px; height: 16px; font-size: 9px; line-height: 13px; text-align: center; cursor: pointer; flex-shrink: 0; padding: 0; }
.acc-info:hover { color: #fff; border-color: var(--blue); }
.acc-arrow { font-size: 11px; color: #b0a4d0; transition: transform .15s ease, color .15s ease; }
.acc:not([data-open]) .acc-arrow { transform: rotate(-90deg); }
.acc:not([data-open]) .acc-body { display: none; }
.acc-body { padding: 0 0 12px; }
.acc-help { display: none; font-size: 11px; color: #a8a6b0; line-height: 1.55; padding: 2px 2px 10px; }
.acc-help.show { display: block; }
.subsection-label { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: #8fa0b5; margin: 6px 0 5px; text-transform: uppercase; }
/* nested collapsible (a filter inside an accordion) */
.sub-acc { border-top: none; margin: 6px 0 2px; padding-left: 10px; border-left: 2px solid var(--border2); }
.sub-acc > .acc-head { padding: 7px 2px; }
.sub-acc > .acc-head .acc-title { font-size: 10px; font-weight: 600; color: #cfc7e4; text-transform: none; letter-spacing: .04em; }
.sub-acc > .acc-body { padding-bottom: 6px; }
.auto-legend { padding: 6px 4px 10px 8px; margin: 2px 0 4px; border-left: 2px solid var(--border2); }
.auto-legend-title { font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em; color: #9aa4b2; text-transform: uppercase; margin-bottom: 4px; }

/* ── CANCER INCIDENCE TAB ─────────────────────────────────────────────────── */
/* Permanent, always-visible limitations statement — never collapsed into an accordion. */
.cancer-caution {
  background: rgba(212,168,67,.10); border: 1px solid rgba(212,168,67,.38);
  border-left: 3px solid #d4a843; border-radius: 4px;
  padding: 9px 11px; margin: 2px 0 9px; font-size: 11px; line-height: 1.5; color: #e8dfc6;
}
.cancer-source { font-size: 10px; line-height: 1.5; color: var(--dim); margin: 0 2px 12px; }
.cancer-source a { color: #9db4e0; }
.cancer-pop-hl {
  margin-top: 8px; padding: 6px 8px; font-size: 10.5px; line-height: 1.45;
  background: rgba(209,51,46,.14); border: 1px solid rgba(209,51,46,.42);
  border-radius: 3px; color: #f0c8c5;
}
.cancer-pop-nohl { margin-top: 8px; font-size: 10.5px; color: var(--dim); }
.cancer-pop-merged {
  margin-top: 6px; padding: 6px 8px; font-size: 10px; line-height: 1.45;
  background: rgba(255,255,255,.04); border: 1px solid var(--border2);
  border-radius: 3px; color: var(--muted);
}
/* Cumulative-count plots: permanent interpretation caveat (URGENT_TODO item 4). */
.ctp-caveat { font-size: 9px; line-height: 1.45; color: var(--dim); margin-top: 5px; max-width: 250px; }

/* Selected high detections — source citation line (URGENT_TODO item 5). */
.finding-wrap { margin-bottom: 6px; }
.finding-cite { font-size: 9px; line-height: 1.45; color: var(--dim); padding: 2px 4px 0 7px; }
.finding-cite a { color: #9db4e0; }
.finding-cite.pending, .finding-cite .pending { color: #c9a227; font-style: italic; }

/* ── START HERE panel (URGENT_TODO item 8) ────────────────────────────────── */
.tab-btn.tab-start { background: rgba(212,168,67,.14); border-color: rgba(212,168,67,.45); color: #e8dfc6; }
.tab-btn.tab-start.active { background: #d4a843; border-color: #d4a843; color: #1a1408; }
.sh-intro { font-size: 12px; line-height: 1.6; color: var(--text); margin: 2px 2px 12px; }
.sh-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.sh-btn {
  flex: 1 1 auto; background: var(--s2); border: 1px solid var(--border2); border-radius: 4px;
  color: var(--text); font-family: var(--mono); font-size: 10px; letter-spacing: .04em;
  padding: 8px 9px; cursor: pointer; transition: background .12s, border-color .12s;
}
.sh-btn:hover { background: var(--s3); border-color: #d4a843; color: #fff; }
.sh-h {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: #d4a843; margin: 16px 2px 7px; padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
.sh-find { background: var(--s2); border: 1px solid var(--border2); border-radius: 5px; padding: 9px 11px; margin-bottom: 8px; }
.sh-find-t { font-size: 12px; font-weight: 700; color: #f3ecd0; line-height: 1.4; margin-bottom: 5px; }
.sh-find-b { font-size: 11px; line-height: 1.55; color: var(--muted); }
.sh-find-s { font-size: 9.5px; line-height: 1.5; color: var(--dim); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.sh-two { display: flex; gap: 7px; }
.sh-can, .sh-cant { flex: 1; border-radius: 5px; padding: 8px 10px; border: 1px solid; }
.sh-can { background: rgba(80,160,120,.08); border-color: rgba(80,160,120,.32); }
.sh-cant { background: rgba(184,29,36,.08); border-color: rgba(184,29,36,.32); }
.sh-can-h, .sh-cant-h { font-family: var(--mono); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 5px; }
.sh-can-h { color: #6fce9f; }
.sh-cant-h { color: #ff8b85; }
.sh-can ul, .sh-cant ul { margin: 0; padding-left: 14px; }
.sh-can li, .sh-cant li { font-size: 10px; line-height: 1.5; color: var(--muted); margin-bottom: 4px; }
.sh-note { font-size: 10px; line-height: 1.55; color: var(--dim); margin: 14px 2px 4px; padding-top: 9px; border-top: 1px solid var(--border); }

/* ── ADDRESS LOCATOR (deliberately neutral — a result must never read as a verdict) ── */
.ad-frame { background: var(--s2); border: 1px solid var(--border2); border-left: 3px solid #7fb2ff;
  border-radius: 4px; padding: 9px 11px; margin: 2px 0 13px; font-size: 11px; line-height: 1.55; color: var(--muted); }
.ad-frame-h { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: #7fb2ff; margin-bottom: 3px; }
.ad-label { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--dim); margin: 0 2px 5px; }
.ad-input { width: 100%; background: var(--bg); border: 1px solid var(--border2); border-radius: 3px;
  padding: 9px 10px; font-family: var(--mono); font-size: 11px; color: var(--text); outline: none; }
.ad-input:focus { border-color: #7fb2ff; }
.ad-go { width: 100%; margin-top: 7px; background: var(--s3); border: 1px solid var(--border2);
  border-radius: 4px; color: var(--text); font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  padding: 9px; cursor: pointer; transition: background .12s, border-color .12s; }
.ad-go:hover { background: #2a3550; border-color: #7fb2ff; color: #fff; }
.ad-privacy { font-size: 9.5px; line-height: 1.5; color: var(--dim); margin: 7px 2px 0; }
.ad-status { font-size: 10.5px; line-height: 1.55; color: var(--muted); margin: 11px 0 0;
  padding: 8px 10px; background: var(--s2); border: 1px solid var(--border2); border-radius: 4px; }
.ad-status.warn { border-color: rgba(212,168,67,.45); background: rgba(212,168,67,.08); color: #e8dfc6; }
.ad-quality { display: block; margin-top: 5px; font-size: 9.5px; color: var(--dim); }
.ad-card { background: var(--s2); border: 1px solid var(--border2); border-radius: 5px; padding: 10px 11px; margin-top: 9px; }
.ad-card-h { font-family: var(--mono); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); margin-bottom: 5px; }
.ad-val { font-size: 15px; font-weight: 600; color: #f3ecd0; line-height: 1.3; }
.ad-name { font-size: 11.5px; color: var(--text); margin-top: 3px; line-height: 1.4; }
.ad-meta { font-family: var(--mono); font-size: 9.5px; color: var(--dim); margin-top: 3px; line-height: 1.45; }
.ad-note { font-size: 10px; line-height: 1.5; color: var(--muted); margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--border); }
.ad-limits { margin-top: 11px; padding: 9px 11px; background: rgba(212,168,67,.08);
  border: 1px solid rgba(212,168,67,.38); border-left: 3px solid #d4a843; border-radius: 4px; }
.ad-limits-h { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: #d4a843; margin-bottom: 5px; }
.ad-limits ul { margin: 0; padding-left: 15px; }
.ad-limits li { font-size: 10px; line-height: 1.55; color: #e8dfc6; margin-bottom: 5px; }
.ad-limits a { color: #9db4e0; }
.ad-show { width: 100%; margin-top: 9px; background: var(--s2); border: 1px solid var(--border2);
  border-radius: 4px; color: var(--muted); font-family: var(--mono); font-size: 10px; padding: 8px; cursor: pointer; }
.ad-show:hover { background: var(--s3); color: #fff; border-color: #7fb2ff; }
/* Footprint-containment card — informational, deliberately not alarm-coloured. */
.ad-card.ad-inside { border-color: rgba(127,178,255,.42); background: rgba(47,111,208,.08); }
.ad-inside-row { font-size: 10.5px; line-height: 1.5; color: var(--muted); padding: 4px 0; border-top: 1px solid var(--border); }

/* ── "LAST SAMPLED" recency filter (temporal transparency) ─────────────────── */
.rc-opt { display: flex; align-items: center; gap: 7px; padding: 4px 5px; border-radius: 3px; cursor: pointer; border: 1px solid transparent; }
.rc-opt:hover { background: var(--s2); }
.rc-opt.active { background: var(--s3); border-color: var(--border2); }
.rc-check { width: 13px; height: 13px; accent-color: var(--red); cursor: pointer; flex-shrink: 0; }
.rc-swatch { width: 11px; height: 14px; border-radius: 0 0 50% 50% / 0 0 35% 35%; flex-shrink: 0; border: 1px solid #cfcfcf; }
.rc-name { flex: 1; font-size: 11px; color: var(--text); }
.rc-count { font-family: var(--mono); font-size: 9.5px; color: var(--dim); }
.popup-lastsampled { font-family: var(--mono); font-size: 9.5px; color: var(--dim); margin: 3px 0 5px; }

/* ═══════════════════════════════════════════════════════════════════════════
   POP-OUT PANEL LAYOUT (v6) — folder-tab rail + sliding panel over a full map.
   Overrides the old fixed-sidebar flex layout; panel-content classes are reused.
   ═══════════════════════════════════════════════════════════════════════════ */
#app { display:block; position:relative; height:100vh; width:100vw; overflow:hidden; }
#map { position:absolute; inset:0; width:100%; height:100%; flex:none; }

/* permanent title + search, floating top-left */
#titlecard { position:absolute; top:16px; left:16px; z-index:1200; width:328px;
  background:linear-gradient(180deg,var(--surface),#111113);
  border:1px solid var(--border2); border-radius:10px; padding:13px 15px 14px;
  box-shadow:0 12px 34px rgba(0,0,0,.5); }
#titlecard #sidebar-header { padding:0; margin:0; border:0; background:none; }
#titlecard #search-wrap { margin:11px 0 0; padding:0; border:0; background:none; }
.author-name { color:#f0c14b !important; font-weight:700; letter-spacing:.06em;
  text-shadow:0 0 14px rgba(240,193,75,.4); }

/* dock = rail + panel */
#dock { position:absolute; left:16px; bottom:16px; z-index:1150;
  display:flex; align-items:stretch; pointer-events:none; }
#rail { width:60px; display:flex; flex-direction:column; gap:7px; pointer-events:auto; z-index:2; }
.rail-tab { position:relative; width:60px; min-height:68px; flex:0 0 auto;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  background:linear-gradient(180deg,var(--s2),var(--surface)); color:var(--muted);
  border:1px solid var(--border2); border-left:3px solid var(--border2);
  border-radius:9px 4px 4px 9px; cursor:pointer; padding:8px 3px;
  transition:transform .16s ease,color .16s ease,box-shadow .16s ease;
  box-shadow:0 4px 14px rgba(0,0,0,.35); }
.rail-tab:hover { transform:translateX(3px); color:var(--text); }
.rail-tab:focus-visible { outline:2px solid var(--tab-c); outline-offset:2px; }
.rail-tab .rt-ic { width:22px; height:22px; color:var(--tab-c); flex:0 0 auto; }
.rail-tab .rt-lb { font-family:var(--mono); font-size:8.5px; line-height:1.12; letter-spacing:.04em;
  text-transform:uppercase; text-align:center; font-weight:500; }
.rail-tab .rt-lb small { display:block; font-size:8px; }
.rail-tab.active { background:linear-gradient(180deg,var(--surface),#111113); color:var(--text);
  border-left-color:var(--tab-c); transform:translateX(4px);
  box-shadow:-2px 6px 20px rgba(0,0,0,.5); z-index:3; }
.rail-tab.active .rt-lb { color:var(--tab-c); }

/* sliding panel */
#panel { width:0; overflow:hidden; pointer-events:auto; position:relative; margin-left:-2px;
  transition:width .26s cubic-bezier(.4,0,.15,1);
  background:linear-gradient(180deg,var(--surface),#111113);
  border:1px solid var(--border2); border-radius:0 12px 12px 12px;
  box-shadow:14px 18px 46px rgba(0,0,0,.55); }
#panel.open { width:342px; }
#panel #sidebar-body { width:342px; height:100%; box-sizing:border-box; flex:none; padding:32px 16px 16px; }
#panel-close { position:absolute; top:10px; right:12px; z-index:6; background:transparent; border:0;
  color:var(--dim); cursor:pointer; font-size:16px; line-height:1; padding:5px; border-radius:5px; opacity:0; }
#panel.open #panel-close { opacity:1; }
#panel-close:hover { color:var(--text); background:var(--s3); }

/* the rich-gold prompt above each panel's drop-downs */
.panel-prompt { display:flex; align-items:flex-start; gap:8px; margin:2px 0 13px;
  font-family:var(--sans); font-size:12.5px; font-weight:600; color:var(--amber); line-height:1.35; }
.panel-prompt svg { flex:0 0 auto; margin-top:1px; }

/* bold, bright, clearly-clickable drop-down titles */
/* main drop-down titles: rich teal so they clearly read as clickable (not the gold accent) */
.acc:not(.sub-acc) > .acc-head .acc-title { font-weight:700; color:#3dd1c4; font-size:13px; }
.acc:not(.sub-acc) > .acc-head:hover .acc-title { color:#6ff0e2; }
/* bigger, obvious expand arrows */
.acc:not(.sub-acc) > .acc-head .acc-arrow { color:#3dd1c4; font-size:19px; line-height:1; }

/* Start Here: emphasised words in light green so they pop */
.sh-p b { color:#8fe0a0; }

/* search placeholder in a light blue so the hint stands out (not gold/red/white) */
#search::placeholder { color:#7fbce8; opacity:1; }

/* Address Lookup: gold call-to-action above the input */
.ad-label { color:#f0c14b !important; font-weight:700; font-size:12.5px; letter-spacing:.01em;
  text-transform:none; }

/* Start Here explanatory copy */
.sh-p { font-size:13px; line-height:1.55; color:var(--muted); margin:0 0 13px; }
.sh-p b { color:#8fe0a0; }

/* footer sits at the bottom of the open panel */
#panel #sidebar-footer { margin-top:16px; border-top:1px solid var(--border); padding-top:12px; }

/* ── mobile: compact title at top; the rail is an always-visible bottom nav;
      tapping a tab raises its panel as a bottom sheet above the rail ── */
/* Phone layout: narrow (portrait) OR short (landscape). A short-and-wide landscape screen
   can't fit the tall vertical desktop rail, so it uses the horizontal top rail too. */
@media (max-width:780px), (max-height:500px) {
  #mobile-toggle { display:none !important; }
  #titlecard { left:8px; right:8px; top:8px; width:auto; padding:11px 13px; z-index:1100; }
  /* Dock sits UNDER the title at the TOP of the screen — the keyboard and the browser
     toolbar are both at the BOTTOM, so a top-anchored rail can never be covered or pushed
     by them. JS positions its `top` just below the title. */
  #dock { left:8px; right:8px; bottom:auto; z-index:1300;
    flex-direction:column; align-items:stretch; pointer-events:none; }
  #rail { order:0; flex-direction:row; width:auto; gap:6px; overflow-x:auto; padding:7px 8px;
    border-radius:12px; background:linear-gradient(180deg,var(--surface),#111113);
    border:1px solid var(--border2); box-shadow:0 8px 22px rgba(0,0,0,.45); pointer-events:auto; }
  #panel { order:1; margin:6px 0 0; display:none; }        /* closed sheet takes no space */
  #panel.open { display:block; width:auto; max-height:62vh; border-radius:12px;
    pointer-events:auto; box-shadow:0 14px 40px rgba(0,0,0,.6); }
  #panel #sidebar-body { width:100%; height:auto; max-height:62vh; overflow-y:auto;
    -webkit-overflow-scrolling:touch; }
  .rail-tab { border-radius:8px; border-left-width:1px; border-bottom:3px solid var(--border2); }
  .rail-tab.active { transform:none; border-bottom-color:var(--tab-c); }
}

/* ── follow-up tweaks ── */
/* Cancer caution: use the cancer-tab orange, softened so it doesn't grab attention,
   and pushed down so it stops crowding the drop-downs above it. */
.cancer-caution { margin-top:32px; background:rgba(240,136,63,.10);
  border:1px solid rgba(240,136,63,.38); color:var(--dim); }
/* Address input hint in the same light blue as the title search box */
.ad-input::placeholder { color:#7fbce8; opacity:1; }

/* ── follow-up batch 2 ── */
/* "Filter by site type" is now a clear static sub-heading (no longer a drop-down),
   spaced off the "Show hazard sites" toggle above it */
.stf-subhead { margin:16px 0 9px; font-family:var(--sans); font-size:12.5px; font-weight:700;
  letter-spacing:.03em; color:#c4a5ee; }
/* contaminant badge in search results */
.sr-badge.sr-chem { background:rgba(184,132,232,.18); color:#c9a5f0; border:1px solid rgba(184,132,232,.42); }
/* more breathing room between the gold prompt and the first drop-down */
.panel-prompt { margin-bottom:20px; }


/* ── Active layers: compact removable summary of what's on the map (desktop only) ── */
#active-layers { position:absolute; top:82px; right:14px; z-index:1100; max-width:236px;
  display:none; background:linear-gradient(180deg,var(--surface),#111113);
  border:1px solid var(--border2); border-radius:9px; padding:9px 10px 5px;
  box-shadow:0 8px 26px rgba(0,0,0,.5); }
.al-head { display:flex; align-items:center; gap:6px; font-family:var(--mono); font-size:9px;
  letter-spacing:.14em; text-transform:uppercase; color:var(--dim); margin-bottom:8px; }
.al-head svg { color:#3dd1c4; }
.al-chip { display:inline-flex; align-items:center; gap:6px; margin:0 5px 5px 0;
  background:var(--s2); border:1px solid var(--border2); border-radius:14px;
  padding:4px 8px; font-size:11px; color:var(--text); cursor:pointer; font-family:var(--sans);
  transition:border-color .14s, background .14s; }
.al-chip:hover { border-color:var(--red); background:var(--s3); }
.al-dot { width:8px; height:8px; border-radius:50%; flex:0 0 auto; box-shadow:0 0 5px 0 currentColor; }
.al-x { color:var(--dim); font-size:11px; line-height:1; margin-left:1px; }
.al-chip:hover .al-x { color:var(--red); }
@media (max-width:780px), (max-height:500px) { #active-layers { display:none !important; } }

/* Landscape / short viewports: compact the title so it doesn't eat the screen, and keep the
   panel bounded and scrollable in the reduced height. */
@media (max-height:500px) {
  #titlecard #sidebar-header { display:none; }        /* drop the title — keep just the search + tabs */
  #titlecard { padding:7px 10px; }
  #search-wrap { margin-top:0 !important; }
  #search { padding:6px 10px; }
  /* landscape tabs: wide + thin — icon beside label, tabs share the full width evenly */
  #rail { gap:5px; }
  .rail-tab { flex:1 1 0; min-height:0; flex-direction:row; gap:6px; padding:7px 5px; }
  .rail-tab .rt-ic { width:16px; height:16px; }
  .rail-tab .rt-lb { font-size:8px; text-align:left; line-height:1.15; white-space:nowrap; }
  .rail-tab .rt-lb small { display:inline; margin-left:3px; }
  /* an open panel becomes a narrow side panel so the map stays visible alongside it */
  #panel { align-self:flex-start; }
  #panel.open { width:min(64vw, 400px); }
  #sheet-backdrop { display:none !important; }   /* keep the visible map bright + interactive */
}

/* filter chips in the Active Layers widget (a mode on a layer, not a layer) */
.al-chip.al-filter:hover { border-color:var(--amber); }
.al-fdot { background:var(--amber) !important; color:var(--amber) !important; }

/* zoom control, moved to the top-right by the Active Layers card — dark-themed to match */
.leaflet-top.leaflet-right .leaflet-control-zoom { margin-top:12px; margin-right:14px; border:1px solid var(--border2); }
.leaflet-control-zoom a { background:var(--surface); color:var(--text); border-bottom-color:var(--border2); }
.leaflet-control-zoom a:hover { background:var(--s3); color:#fff; }
/* ══ WASTE IN MOTION — the embedded graphic, and the one-time announcement ══════════════════
   Added 2026-08-18. The graphic is a separate application in an iframe; nothing here styles its
   insides, only the frame around it. See the markup notes in map.html for why it is not merged. */

/* ⛔ ABOVE EVERYTHING THE DASH STACKS. Measured, not guessed: #dock is 1300 and the search
   wrapper is 1500, so the overlay's first value of 1200 put the tab rail and the search box
   THROUGH the graphic. A full-screen overlay has to beat the highest thing on the page, and
   on this page that is 1500. */
#graphic-overlay { position:fixed; inset:0; z-index:4000; background:var(--bg);
  display:flex; flex-direction:column; }
#graphic-overlay[hidden] { display:none; }

#graphic-bar { flex:0 0 auto; display:flex; align-items:center; gap:14px;
  padding:9px 14px; background:var(--surface); border-bottom:1px solid var(--border);
  font-family:'IBM Plex Sans',system-ui,sans-serif; }
#graphic-title { font-weight:600; color:var(--text); letter-spacing:.02em; }
#graphic-title::before { content:''; display:inline-block; width:9px; height:9px; margin-right:9px;
  border-radius:2px; background:#C9A227; vertical-align:middle; }
#graphic-pop { margin-left:auto; font-size:12px; color:var(--dim); text-decoration:none;
  border-bottom:1px solid transparent; }
#graphic-pop:hover { color:var(--text); border-bottom-color:var(--border2); }
/* ⛔ 44px minimum. This is the only way out of a full-screen overlay on a phone. */
#graphic-close { min-width:44px; min-height:44px; font-size:17px; line-height:1;
  background:transparent; border:1px solid var(--border2); border-radius:6px;
  color:var(--muted); cursor:pointer; }
#graphic-close:hover { color:#fff; background:var(--s3); }

#graphic-frame { flex:1 1 auto; width:100%; border:0; display:block; background:var(--bg); }
/* ⚠ 1.9 MB over a phone connection is several seconds of nothing. Say so, rather than showing a
   black rectangle that reads as a broken embed. Hidden by the frame's load event. */
#graphic-load { position:absolute; inset:44px 0 0 0; display:flex; align-items:center;
  justify-content:center; color:var(--dim); font-family:'IBM Plex Mono',monospace; font-size:13px;
  pointer-events:none; }

#whatsnew[hidden] { display:none; }
#wn-dim { position:fixed; inset:0; z-index:1100; background:rgba(8,8,10,.62);
  animation:wn-fade .45s ease both; }
/* the box clears the search wrapper (1500); the dim deliberately stays BELOW the dock at 1100
   so the rail keeps its colour and the gold ring on the tab is what draws the eye */
#wn-box { position:fixed; z-index:1600; max-width:310px; padding:14px 16px;
  background:var(--surface); border:1px solid var(--border2); border-left:3px solid #C9A227;
  border-radius:8px; box-shadow:0 10px 34px rgba(0,0,0,.55);
  font-family:'IBM Plex Sans',system-ui,sans-serif; animation:wn-fade .45s .1s ease both; }
#wn-text { margin:0 0 11px; font-size:13.5px; line-height:1.45; color:var(--text); }
#wn-text b { color:#C9A227; }
#wn-box button { min-height:34px; padding:0 13px; margin-right:7px; border-radius:6px;
  font-size:12.5px; cursor:pointer; font-family:inherit; }
#wn-go { background:#C9A227; border:1px solid #C9A227; color:#17150c; font-weight:600; }
#wn-dismiss { background:transparent; border:1px solid var(--border2); color:var(--dim); }
#wn-dismiss:hover { color:var(--text); }
/* the ring around the tab being pointed at — a thin outline, not a pulse */
.rail-tab.wn-spot { position:relative; z-index:1102; outline:2px solid #C9A227;
  outline-offset:2px; border-radius:8px; }
@keyframes wn-fade { from { opacity:0 } to { opacity:1 } }
@media (prefers-reduced-motion:reduce) { #wn-dim, #wn-box { animation:none } }
