/* The Water Path · Apogee Geospatial · build water-path-20260927a (house header pattern shared with the other showcases) */
:root {
  --bg: #0B0F14; --panel: #141A20; --panel2: #10161c; --cream: #F7F4EE; --muted: #9AA3AD;
  --sage: #3D6B5A; --sage2: #8FBFA9; --line: #1e262e; --line2: #2a343e; --radius: 12px;
  --gold: #E6D5A3; --warn: #E9A23B; --header-h: 56px; --panel-w: 380px;
  --tap: #0E8C99; --sewer: #A8612F; --river: #2F7FD0; --tidal: #6B4FC8;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--cream); font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--sage2); text-decoration: none; }
a:hover { color: var(--cream); text-decoration: underline; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 5000; background: var(--sage); color: var(--cream); padding: 6px 10px; border-radius: 6px; }
.skip:focus { left: 8px; }
.linkish { background: none; border: 0; padding: 0; color: var(--sage2); cursor: pointer; font: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.noscript { padding: 16px 18px; background: #2a1f0c; color: var(--cream); }

/* Header (house pattern) */
header.app-bar { position: sticky; top: 0; z-index: 1200; height: var(--header-h); display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: rgba(11,15,20,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.app-bar img.wordmark { height: 30px; width: auto; display: block; }
header.app-bar .sub { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header.app-bar nav { margin-left: auto; display: flex; gap: 12px; align-items: center; }
header.app-bar nav a, header.app-bar nav .linkish { font-size: 12px; color: var(--muted); letter-spacing: .04em; text-decoration: none; }
header.app-bar nav a.cta { color: var(--cream); background: var(--sage); padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(143,191,169,.4); white-space: nowrap; }
header.app-bar nav a.cta:hover { background: #4a7d6a; }
header.app-bar nav .linkish.hdr-ghost { display: inline-flex; align-items: center; color: var(--cream); font-weight: 500; font-size: 12px; letter-spacing: .04em; line-height: normal;
  padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(247,244,238,.55); background: transparent; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease; }
header.app-bar nav .linkish.hdr-ghost:hover { color: var(--cream); background: rgba(247,244,238,.12); border-color: var(--cream); }
header.app-bar nav .linkish.hdr-ghost:focus { outline: none; }
header.app-bar nav .linkish.hdr-ghost:focus-visible { color: var(--cream); background: rgba(247,244,238,.12); border-color: var(--cream); outline: 2px solid var(--sage2); outline-offset: 2px; }
.lbl-short { display: none; }
@media (max-width: 400px) {
  .lbl-long { display: none; } .lbl-short { display: inline; }
  header.app-bar { gap: 10px; padding: 0 12px; }
  header.app-bar nav { gap: 8px; }
  header.app-bar nav .linkish.hdr-ghost { padding: 6px 10px; }
  header.app-bar .sub { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--cream); cursor: pointer; white-space: nowrap; font-size: 14px; }
.btn:hover { border-color: var(--sage2); text-decoration: none; }
.btn:focus-visible, .mini-btn:focus-visible, .step:focus-visible, [role=tab]:focus-visible { outline: 2px solid var(--sage2); outline-offset: 2px; }
.btn.primary { background: var(--sage); border-color: rgba(143,191,169,.5); }
.btn.primary:hover { background: #4a7d6a; }
.btn.ghost { background: transparent; border-color: rgba(247,244,238,.45); }
.icon-btn { width: 44px; min-width: 44px; padding: 0; height: 44px; }
.mini-btn { background: transparent; color: var(--cream); border: 1px solid rgba(247,244,238,.45); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; min-height: 32px; }
.mini-btn:hover { background: rgba(247,244,238,.1); }

/* Stage: full-bleed map + right panel */
.stage { position: relative; display: grid; grid-template-columns: 1fr var(--panel-w); height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 520px; }
.map-wrap { position: relative; min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; background: #dfe3e6; }
#map.bm-dark { background: #1b2026; }
.finder { position: absolute; z-index: 800; left: 12px; top: 12px; width: 360px; max-width: calc(100% - 24px); background: rgba(16,22,28,.95); border: 1px solid var(--line2); border-radius: var(--radius); padding: 12px; box-shadow: 0 8px 26px rgba(0,0,0,.35); }
.finder .title { font-family: Syne, "IBM Plex Sans", sans-serif; font-weight: 700; font-size: 17px; line-height: 1.25; margin: 0 0 10px; }
.search { position: relative; display: flex; gap: 6px; }
.search input { flex: 1; min-width: 0; height: 44px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--cream); padding: 0 12px; font-size: 15px; }
.search input:focus { outline: 2px solid var(--sage2); outline-offset: 1px; }
.suggest { position: absolute; left: 0; right: 0; top: 48px; z-index: 5; list-style: none; margin: 0; padding: 4px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.suggest li { padding: 11px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; min-height: 44px; }
.suggest li:hover, .suggest li.active { background: rgba(143,191,169,.18); }
.search-msg { margin-top: 8px; font-size: 13px; color: var(--gold); }
.search-msg[hidden] { display: none; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; padding: 3px; }
.tabs [role=tab] { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tabs [role=tab][aria-selected="true"] { background: var(--sage); color: var(--cream); }
.tab-ico { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
[role=tab][data-mode=tap] .tab-ico { background: var(--tap); } [role=tab][data-mode=flush] .tab-ico { background: var(--sewer); } [role=tab][data-mode=rain] .tab-ico { background: var(--river); }
.tabs [aria-selected="true"] .tab-ico { box-shadow: 0 0 0 2px var(--cream); }

.panel { background: var(--panel2); border-left: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.sheet-bar { display: none; }
.panel-body { padding: 16px 18px 24px; }
.eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sage2); margin: 14px 0 8px; font-weight: 600; }
.prompt .eyebrow { margin-top: 0; }
.lead { font-size: 15px; line-height: 1.55; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.examples .btn { min-height: 44px; }
.headline { font-family: Syne, "IBM Plex Sans", sans-serif; font-size: 20px; line-height: 1.3; margin: 0 0 10px; }
.headline.busy::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px; border: 2px solid var(--sage2); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.loc-label { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-btns { display: inline-flex; gap: 6px; flex: none; }
.loc-btns [hidden] { display: none; }
.share-wrap { position: relative; }
.share-pop { position: absolute; right: 0; top: 38px; z-index: 20; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 4px; min-width: 200px; box-shadow: 0 10px 24px rgba(0,0,0,.45); }
.share-pop[hidden] { display: none; }
.share-pop button { background: none; border: 0; color: var(--cream); text-align: left; padding: 10px; border-radius: 8px; cursor: pointer; min-height: 44px; }
.share-pop button:hover { background: rgba(143,191,169,.15); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step { display: flex; gap: 10px; align-items: flex-start; padding: 10px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; cursor: pointer; font-size: 14px; line-height: 1.5; }
.step:hover { border-color: rgba(143,191,169,.6); }
.step .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--sage); color: var(--cream); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.approx, .schem-note { display: block; margin-top: 4px; font-size: 12px; color: var(--gold); }
.actions:empty { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.actions .btn { min-height: 44px; }
.extra p { margin: 8px 0; line-height: 1.5; }
.why { margin: 8px 0; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 0 10px; font-size: 13px; }
.why summary { cursor: pointer; min-height: 44px; line-height: 44px; color: var(--sage2); font-weight: 600; }
.why p { margin: 0 0 10px; line-height: 1.5; }
.cso { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; margin: 8px 0; cursor: pointer; min-height: 44px; }
.cso input { width: 20px; height: 20px; margin-top: 0; flex: none; accent-color: var(--sage); }
.legend { list-style: none; margin: 10px 0; padding: 10px; border: 1px dashed var(--line2); border-radius: 10px; font-size: 12px; color: #d6dbe0; display: grid; gap: 6px; }
.legend:empty { display: none; }
.legend li { display: flex; align-items: center; gap: 8px; }
.sw { flex: none; width: 26px; height: 10px; display: inline-block; }
.sw.line { height: 4px; background: var(--c); border-radius: 2px; box-shadow: 0 0 0 1.5px #fff; }
.sw.dash { height: 0; border-top: 3px dashed var(--c); }
.sw.dot { height: 0; border-top: 3px dotted var(--c); }
.sw.area { height: 12px; background: color-mix(in srgb, var(--c) 25%, transparent); border: 1px solid var(--c); border-radius: 2px; }
.sw.pin { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid #fff; margin: 0 7px; }
.cta-line { font-size: 14px; line-height: 1.5; margin: 14px 0 6px; padding: 12px; background: rgba(61,107,90,.18); border: 1px solid rgba(143,191,169,.35); border-radius: 10px; }
.cta-line a { font-weight: 600; color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.cta-line a::before { content: "\2192\00a0"; }
.about { margin-top: 16px; border-top: 1px solid var(--line2); padding-top: 6px; font-size: 13px; line-height: 1.55; color: #dfe3e6; }
.about summary { cursor: pointer; font-weight: 600; color: var(--sage2); min-height: 44px; line-height: 44px; font-size: 14px; }
.about h3 { font-size: 14px; margin: 14px 0 6px; }
.about-list, .caveats { padding-left: 18px; }
.about-list li, .caveats li { margin-bottom: 6px; }
.toast { position: absolute; z-index: 950; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--cream); color: var(--bg); padding: 8px 14px; border-radius: 999px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.toast[hidden] { display: none; }
.site-foot { padding: 18px 20px 28px; max-width: 920px; margin: 0 auto; text-align: center; }
.site-foot .cta-line { display: inline-block; }

/* Leaflet pieces */
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 10.5px; background: rgba(255,255,255,.88) !important; color: #333; max-width: 70vw; }
.bm-dark .leaflet-control-attribution { background: rgba(16,22,28,.88) !important; color: #cfd6dc; }
.bm-dark .leaflet-control-attribution a { color: #9fd3bd; }
.wp-tip { font-family: inherit; font-size: 12px; }
.wp-pin { background: none; border: 0; }
.wp-pin .dot { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: 2px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.45); color: #fff; font-size: 10px; line-height: 1; }
.wp-pin.you .dot { background: #1e88e5; }
.wp-pin.plant .dot { background: var(--tap); }
.wp-pin.wwtp .dot { background: var(--sewer); border-radius: 5px; }
.wp-pin.outfall .dot { background: var(--sewer); width: 16px; height: 16px; margin: 5px; }
.wp-pin.ocean .dot { background: var(--tidal); font-size: 14px; }
.map-label { background: none; border: 0; white-space: nowrap; }
.map-label span { display: inline-block; transform: translate(-50%, -50%); font-size: 12px; font-weight: 600; color: #123; background: rgba(255,255,255,.85); padding: 1px 6px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.map-label.bay span { color: #3a2a7a; font-style: italic; }
.bm-dark .map-label span { color: var(--cream); background: rgba(16,22,28,.85); }
.bm-dark .halo { stroke: #0B0F14; }
.droplet { background: none; border: 0; }
.droplet span { display: block; width: 14px; height: 14px; margin: 2px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #3FA9F5; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.droplet.flush span { background: var(--sewer); }
.droplet.tap span { background: var(--tap); }

/* Mobile (< 900 px): search pinned on top, segmented tabs, bottom sheet */
@media (max-width: 899px) {
  .stage { display: block; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 0; }
  .map-wrap { position: absolute; inset: 0; }
  .finder { left: 8px; right: 8px; top: 8px; width: auto; max-width: none; padding: 8px; }
  .finder .title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .tabs { margin-top: 6px; }
  .search input { font-size: 16px; }
  .leaflet-top { top: 122px; }
  .leaflet-bottom { bottom: 96px; }
  .panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; height: 96px; border-left: 0; border-top: 1px solid var(--line2); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.35); transition: height .22s ease; overflow-y: auto; overscroll-behavior: contain; }
  .panel.dragging { transition: none; }
  .sheet-bar { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 56px; background: var(--panel2); color: var(--cream); border: 0; padding: 8px 14px; cursor: grab; position: sticky; top: 0; z-index: 2; touch-action: none; }
  .grip { width: 44px; height: 5px; border-radius: 3px; background: #58636e; }
  .sheet-line { font-family: Syne, "IBM Plex Sans", sans-serif; font-weight: 700; font-size: 15px; line-height: 1.3; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .panel-body { padding-top: 4px; }
  .headline { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .leaflet-control-attribution { max-width: calc(100vw - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
  .leaflet-control-attribution.open { white-space: normal; }
  .leaflet-control-layers-toggle { width: 44px !important; height: 44px !important; }
  .leaflet-bar a { width: 44px !important; height: 44px !important; line-height: 44px !important; }
  .site-foot { display: none; }
  .step { padding: 12px 10px; }
}
@media (prefers-reduced-motion: reduce) { .panel { transition: none; } .headline.busy::after { animation: none; } }
.detail { display: block; margin-top: 4px; font-size: 12.5px; color: #c9d0d6; }
