/* Shared alert palette across station cards, map symbols and legend chips. */
:is([data-alert-level="0"],[data-station-alert="0"],.badge.level-0){--status:#078575;--status-ink:#05665c;--status-soft:#e0f4ee;--status-line:#a6dace}
:is([data-alert-level="1"],[data-station-alert="1"],.badge.level-1){--status:#d18a15;--status-ink:#845008;--status-soft:#fff2d5;--status-line:#edce90}
:is([data-alert-level="2"],[data-station-alert="2"],.badge.level-2){--status:#e86b2a;--status-ink:#a44317;--status-soft:#ffeadf;--status-line:#f3bc9c}
:is([data-alert-level="3"],[data-station-alert="3"],.badge.level-3){--status:#dc4056;--status-ink:#a6283c;--status-soft:#fde8ed;--status-line:#efa9b7}
:is([data-alert-level="4"],[data-station-alert="4"],.badge.level-4){--status:#a92868;--status-ink:#871c51;--status-soft:#f8e6ef;--status-line:#dfabc5}
:is([data-alert-level="unknown"],[data-station-alert="unknown"],.badge.level-null){--status:#7b8da2;--status-ink:#52677e;--status-soft:#edf1f6;--status-line:#cbd5e2}
:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon:is(.measured,.estimated)>.beacon-core{width:32px;height:32px;inset:5px;border-radius:50%;background:var(--status)!important;border:2px solid white!important;color:white!important;box-shadow:0 2px 6px #17375130}
:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon.selected>.beacon-core{box-shadow:0 0 0 2px #fff,0 0 0 4px #327bea,0 3px 10px #225ca440!important}
:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon .map-pin-label>strong em{background:var(--status-soft);color:var(--status-ink)}
:root body.observatory-interface .gis-map.water-alert-map .map-level-legend{gap:6px;padding:12px 0}
:root body.observatory-interface .gis-map.water-alert-map .map-level-legend>span{display:inline-flex;align-items:center;gap:5px;min-height:29px;padding:4px 8px;border:1px solid var(--status-line)!important;border-radius:7px;background:var(--status-soft)!important;color:var(--status-ink)!important;font-size:10px;font-weight:600}
:root body.observatory-interface .gis-map.water-alert-map .map-level-legend>span>svg{display:none}
:root body.observatory-interface .gis-map.water-alert-map .map-level-legend>span>b{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:var(--status);color:#fff;font-size:9px}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade #ob-network{padding:16px;background:#f5f8fd;border:1px solid #d3e1f2;border-radius:14px;box-shadow:none}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .ob-station-tabs{gap:12px;padding:4px 2px}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .river-node.ob-station-tab.sa-station{background:#fff;border:1px solid #c9d9ee;border-left:1px solid #c9d9ee;border-radius:10px;min-height:120px;padding:14px 12px;gap:14px;box-shadow:0 2px 5px #244e8510;transition:border-color .18s,background .18s,box-shadow .18s}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .river-node.ob-station-tab.sa-station.selected{background:#e5efff;border:1px solid #3579dc;border-left:1px solid #3579dc;outline:2px solid #3579dc;outline-offset:1px;box-shadow:0 3px 10px #235ba220}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .river-node.ob-station-tab.sa-station:hover{background:#f0f6ff;border-color:#6b9bde;box-shadow:0 4px 10px #244e8518}
:root body.observatory-interface .ob-flow-upgrade .sa-station .sa-identity strong{color:#183f70;font-size:16px;font-weight:750}
:root body.observatory-interface .ob-flow-upgrade .sa-station .sa-identity small{color:#58708f;font-size:11px}
:root body.observatory-interface .sa-station .sa-source-icon{background:var(--status);color:#fff;border:2px solid white;border-radius:50%;width:34px;height:34px;box-shadow:0 1px 4px #17375120}
:root body.observatory-interface .sa-station .sa-lamp{display:none}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .sa-station .sa-state .badge{background:var(--status-soft)!important;color:var(--status-ink)!important;border:1px solid var(--status-line)!important;padding:4px 7px;border-radius:6px;font-size:11px;font-weight:650}
:root body.observatory-interface .sa-station .sa-viewing{background:#2569ca;border-color:#2569ca;color:#fff;font-weight:650}

/* Alert halos animate independently of the geographic anchor and source glyph. */
:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon{--alert-period:3.6s}
:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon[data-alert-level="2"]{--alert-period:2.9s}
:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon[data-alert-level="3"]{--alert-period:2.3s}
:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon[data-alert-level="4"]{--alert-period:1.8s}
:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon:is([data-alert-level="1"],[data-alert-level="2"],[data-alert-level="3"],[data-alert-level="4"])>.beacon-wave{display:block!important;position:absolute;inset:5px;width:32px;height:32px;box-sizing:border-box;border:1.5px solid var(--status);border-radius:50%;background:transparent;box-shadow:none;pointer-events:none;transform-origin:center;animation:gis-alert-halo var(--alert-period) ease-out infinite;z-index:0}
:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon:is([data-alert-level="1"],[data-alert-level="2"],[data-alert-level="3"],[data-alert-level="4"])>.wave-second{animation-delay:calc(var(--alert-period) / -2)}
:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon>.beacon-core{z-index:1}
@keyframes gis-alert-halo{0%{transform:scale(1);opacity:.55}75%,100%{transform:scale(1.75);opacity:0}}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .river-node.ob-station-tab.sa-station{min-height:98px;height:auto;padding:13px 12px;gap:12px;justify-content:center}
:root body.observatory-interface .sa-station .sa-top{gap:9px}
:root body.observatory-interface .sa-station .sa-bottom{min-height:0;display:block}
:root body.observatory-interface .sa-station .sa-source-icon{flex-basis:32px;width:32px;height:32px}
:root body.observatory-interface .sa-station .sa-status-chip{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:4px 8px;border:1px solid var(--status-line);border-radius:7px;background:var(--status-soft);color:var(--status-ink);font-size:11px;font-weight:650;line-height:1.3}
:root body.observatory-interface .sa-station .sa-status-chip>b{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:var(--status);color:#fff;font-size:9px;flex-shrink:0}
:root body.observatory-interface .sa-station .sa-selected-check{position:absolute;top:5px;right:6px;display:grid;place-items:center;width:15px;height:15px;border-radius:50%;background:#2569ca;color:#fff;font-size:10px;font-weight:700}
:root body.observatory-interface .ob-flow-upgrade .sa-station .sa-identity strong{font-size:15px;line-height:1.3}
:root body.observatory-interface .ob-flow-upgrade .sa-station .sa-identity small{line-height:1.4;white-space:nowrap}
@media(prefers-reduced-motion:reduce){:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon>.beacon-wave{animation:none!important;transform:scale(1.2);opacity:.25}:root body:is(.observatory-interface,.community-view) .gis-beacon-map .gis-beacon>.wave-second{display:none!important}}

/* Compact station navigation with an active underline instead of a card grid. */
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade #ob-network{background:#fff;padding:14px 16px;border-color:#dce6f1}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .ob-station-tabs{gap:0;padding:0;background:#f4f7fc;border:1px solid #e0e8f2;border-radius:10px;overflow-x:auto}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .river-node.ob-station-tab.sa-station{border:0;border-right:1px solid #e0e8f2;border-radius:0;background:transparent;min-height:90px;padding:12px 14px;gap:8px;box-shadow:none;outline:0;justify-content:center}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .river-node.ob-station-tab.sa-station.selected{background:#e8f1ff;outline:0;border:0;border-right:1px solid #e0e8f2;box-shadow:inset 0 -3px #327bea;border-radius:0}
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .river-node.ob-station-tab.sa-station:hover{background:#eaf2fd;box-shadow:inset 0 -3px #9cbee9;border:0;border-right:1px solid #e0e8f2}
:root body.observatory-interface .sa-station .sa-source-icon{flex-basis:28px;width:28px;height:28px;box-shadow:none}
:root body.observatory-interface .sa-station .sa-source-icon svg{width:17px;height:17px}
:root body.observatory-interface .sa-station .sa-status-chip{padding:2px 6px;min-height:24px;font-size:10px;border-color:transparent}
:root body.observatory-interface .sa-station .sa-selected-check{display:none}
:root body.observatory-interface .ob-compact-summary .ob-kpi-main{display:flex!important;flex-direction:column;align-items:flex-start;gap:6px}
:root body.observatory-interface .ob-compact-summary .ob-kpi-main>span{display:block!important;font-size:11px;line-height:1.5;min-height:34px;max-width:none;color:#60758f}
:root body.observatory-interface .ob-compact-summary .ob-stat{background:#fff!important;border:1px solid #dce6f1;border-top:3px solid #7c9dc7!important;border-radius:10px;padding:14px;box-shadow:none}
:root body.observatory-interface .ob-compact-summary .ob-kpi-attention[data-has-attention="true"]{border-top-color:#e86b2a!important;background:#fffaf6!important}
:root body.observatory-interface .ob-compact-summary .ob-stat-top>span:first-child{font-size:12px;font-weight:650;color:#2b4669}
:root body.observatory-interface .ob-compact-summary .ob-kpi-main strong{font-size:30px;color:#214e87;line-height:1.2}
:root body.observatory-interface .ob-compact-summary .ob-kpi-action{font-size:10px;line-height:1.5;padding-top:9px;margin-top:9px;color:#3269a9}
:root body.observatory-interface .ob-compact-summary .ob-stat-top{min-height:34px;align-items:flex-start}
:root body.observatory-interface .ob-compact-summary .ob-kpi-main strong{width:auto!important;text-align:left!important;color:#214e87!important}
:root body.observatory-interface .ob-compact-summary .ob-kpi-main{justify-content:flex-start!important;text-align:left!important}

/* One-line station selector and readable numeric breakdowns. */
:root body.observatory-interface .ob-flow-upgrade.ob-reading-upgrade.ob-design-system.ob-gis-upgrade .river-node.ob-station-tab.sa-station{flex-direction:row;align-items:center;justify-content:center;min-height:48px;padding:10px 12px;gap:8px;flex:1 0 auto}
:root body.observatory-interface .sa-station .sa-source-icon,
:root body.observatory-interface .sa-station .sa-identity small{display:none}
:root body.observatory-interface .sa-station .sa-top{display:block}
:root body.observatory-interface .sa-station .sa-status-chip{background:transparent;border:0;padding:0;min-height:0;font-size:0;gap:0}
:root body.observatory-interface .sa-station .sa-status-chip>b{width:21px;height:21px;font-size:10px}
:root body.observatory-interface .ob-flow-upgrade .sa-station .sa-identity strong{font-size:13px;white-space:nowrap}
:root body.observatory-interface .ob-compact-summary .ob-kpi-main .kpi-unit{font-size:11px;font-weight:500;margin-left:6px;color:#71859e;display:inline}
.kpi-breakdown{margin:10px 0 0;padding:9px 0 0;border-top:1px solid #e5ecf4;display:grid;gap:7px}
.kpi-breakdown>div{display:flex;justify-content:space-between;align-items:center;gap:6px;font-size:11px;line-height:1.4}
.kpi-breakdown dt{color:#60758f}.kpi-breakdown dd{margin:0;color:#244c7b;font-size:13px;font-weight:750}

/* Reversible KPI variant: number and breakdown side by side. */
:root body.observatory-interface .ob-compact-summary.kpi-dashboard-v2 .ob-stat{padding:12px;min-height:0}
:root body.observatory-interface .ob-compact-summary.kpi-dashboard-v2 .ob-stat-top{min-height:32px;gap:5px}
.kpi-v2-body{display:grid;grid-template-columns:45px minmax(0,1fr);align-items:center;gap:9px;margin:5px 0 12px}
:root body.observatory-interface .ob-compact-summary.kpi-dashboard-v2 .ob-kpi-main{gap:0;align-items:flex-start}
:root body.observatory-interface .ob-compact-summary.kpi-dashboard-v2 .ob-kpi-main strong{font-size:32px;line-height:1.1}
.kpi-v2-body .ob-kpi-main>small{font-size:10px;color:#74869c;margin-top:3px}
.kpi-v2-body .kpi-breakdown{border-top:0;border-left:1px solid #e1e8f2;padding:0 0 0 9px;margin:0;gap:7px}
.kpi-v2-body .kpi-breakdown>div{font-size:10px;align-items:flex-start;gap:4px}
.kpi-v2-body .kpi-breakdown dd{font-size:12px;white-space:nowrap}
.kpi-ratio-track{height:5px;background:#e9eef5;border-radius:4px;overflow:hidden;display:flex}
.kpi-ratio-track>i{height:100%;display:block}
:root body.observatory-interface .ob-compact-summary.kpi-dashboard-v2 .ob-kpi-action{margin-top:8px;padding-top:8px;min-height:32px;font-size:10px}
@media(max-width:600px){.kpi-v2-body{grid-template-columns:40px minmax(0,1fr);gap:6px}}
