.home-layout{display:grid;grid-template-columns:235px minmax(0,1fr);min-height:100vh}.home-sidebar{padding:28px 20px;border-right:1px solid var(--line);background:var(--panel)}.home-sidebar nav{display:grid;gap:10px;margin:38px 0}.home-sidebar nav a{padding:14px;text-decoration:none;border-radius:10px}.home-sidebar nav .active{background:var(--surface);border:1px solid var(--accent)}.home-sidebar .panel{padding:16px}.home-main{padding:24px 32px;max-width:1550px;width:100%;margin:auto}.home-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}.home-metrics .metric{margin-top:12px}.home-metrics p{font-size:13px}.home-camera{padding:20px}.home-camera video{display:block;background:#000;width:100%;aspect-ratio:16/9;max-height:72vh;object-fit:contain;border-radius:12px;margin:12px 0 20px}.home-camera h2{margin:0}.home-camera #stats{margin-left:auto}.home-bottom{display:grid;grid-template-columns:1.5fr 1fr;gap:20px;margin-top:20px}.empty-chart{display:grid;place-items:center;text-align:center;min-height:140px;background:var(--bg);border:1px dashed var(--line);border-radius:12px;color:var(--muted);padding:24px}#state{max-width:100%}@media(max-width:1100px){.home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:780px){.home-layout{grid-template-columns:1fr}.home-sidebar{padding:16px;border-right:0;border-bottom:1px solid var(--line)}.home-sidebar nav{display:flex;flex-wrap:wrap;margin:12px 0 0}.home-sidebar>.panel,.home-sidebar>.eyebrow{display:none}.home-main{padding:16px}.home-bottom{grid-template-columns:1fr}.home-camera #stats{margin-left:0}}@media(max-width:440px){.home-metrics{grid-template-columns:1fr}}
.home-layout{grid-template-columns:240px minmax(0,1fr)}.home-sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:24px}.home-sidebar>.panel{margin-top:auto}.home-main{margin:0 auto;padding-top:0;background-image:linear-gradient(var(--home-grid) 1px,transparent 1px),linear-gradient(90deg,var(--home-grid) 1px,transparent 1px);background-size:28px 28px}.home-main>.ops-nav{min-height:64px;padding:12px 0}.home-main .panel{background:linear-gradient(145deg,var(--home-panel),var(--home-panel-end));box-shadow:0 20px 50px var(--home-shadow)}
:root{--home-panel:#10243a;--home-panel-end:#091828;--home-grid:#31d7f508;--home-shadow:#0003}:root[data-theme=light]{--home-panel:#ffffff;--home-panel-end:#f6fafc;--home-grid:#00657508;--home-shadow:#163b5614}
.home-camera{border-radius:28px}.home-camera video{aspect-ratio:16/7;max-height:none;object-fit:contain}.home-camera h2{font-size:16px}.water-layout{display:grid;grid-template-columns:1.35fr .65fr;gap:20px;margin-top:20px}.water-panel{border-radius:28px;padding:24px}.water-title{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}.water-title h2{margin-bottom:4px;font-size:16px}.water-title .tag{font-size:10px;align-self:start}.water-body{display:grid;grid-template-columns:minmax(0,1fr) 208px;align-items:center;gap:20px;margin:28px 0}.water-number{display:flex;gap:14px;align-items:baseline}.water-number #waterLevel{font-size:clamp(48px,5vw,76px);font-weight:800;letter-spacing:-4px;line-height:1.2}.water-number small{font-size:20px;color:var(--muted)}#waterState,#waterTime{font-size:13px;line-height:1.7;overflow-wrap:anywhere}.quality-ring{height:196px;width:196px;border:12px solid var(--line);border-radius:50%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:8px}.quality-ring b{font-size:28px;color:var(--accent)}.quality-ring small{font-size:11px;color:var(--muted)}.water-foot{display:flex;gap:24px;flex-wrap:wrap;padding-top:16px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.sensor-stack{display:grid;gap:20px}.sensor-stack .panel{border-radius:24px;padding:20px}.sensor-stack p{font-size:12px}.sensor-number{font-size:32px}.sensor-number small{font-size:16px;color:var(--muted)}.sensor-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--surface);color:var(--accent);font-size:22px}.device-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:20px}.device-strip .panel{padding:16px;border-radius:16px}.device-strip small{font-size:10px;color:var(--muted)}.device-strip p{font-size:13px;font-weight:700;overflow-wrap:anywhere}.home-bottom p{font-size:13px;line-height:1.7}.ops-footer{line-height:1.8}section[id]{scroll-margin-top:20px}
@media(max-width:1250px){.water-layout{grid-template-columns:1fr}.sensor-stack{grid-template-columns:1fr 1fr}}@media(max-width:1023px){.home-layout{grid-template-columns:1fr}.home-sidebar{position:static;height:auto;padding:16px}.home-sidebar nav{display:flex;flex-wrap:wrap;margin:12px 0 0}.home-sidebar>.panel,.home-sidebar>.eyebrow{display:none}}@media(max-width:639px){.home-main{padding:0 12px 20px}.home-main>.ops-nav{flex-wrap:wrap}.home-main #user{max-width:100%;white-space:normal}.home-main .theme-switch{margin-left:auto}.home-sidebar nav a{padding:10px;font-size:12px}.ops-hero h1{font-size:26px}.home-camera video{aspect-ratio:16/9}.home-camera #stats{width:100%;margin-left:0}.water-body{grid-template-columns:1fr}.quality-ring{width:160px;height:160px;margin:0 auto}.water-number #waterLevel{font-size:64px}.home-bottom,.device-strip{grid-template-columns:1fr}.sensor-stack{grid-template-columns:1fr 1fr}.sensor-stack .panel{padding:14px}.water-panel{padding:20px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.home-brand{display:flex;align-items:center;gap:12px}.home-brand b{font-size:16px}.home-brand .eyebrow{font-size:9px;font-weight:700;letter-spacing:.2em;margin:4px 0}.brand-icon{display:grid;place-items:center;flex:0 0 44px;height:44px;border-radius:16px;background:var(--accent);color:var(--bg);font-size:30px}.home-sidebar nav .active{border:0;background:color-mix(in srgb,var(--accent) 10%,transparent)}.home-sidebar nav{gap:8px}.home-sidebar nav a{padding:12px;font-size:14px}.home-main{max-width:1500px}.home-metrics{gap:12px;margin-bottom:20px}.home-metrics .panel{padding:16px;border-radius:16px}.home-metrics .metric{margin-top:4px}.home-camera{overflow:hidden;padding:0}.home-camera>.actions:first-child{padding:16px 24px;border-bottom:1px solid var(--line)}.home-camera video{margin:0;border-radius:0}.home-camera>.actions:not(:first-child){padding:16px 24px}.home-camera>#state{margin:0 24px 20px}.home-bottom{grid-template-columns:minmax(0,1fr) 350px}.empty-chart{min-height:320px}.home-main .panel{border-color:color-mix(in srgb,var(--line) 45%,transparent)}.home-sidebar{background:var(--bg)}
@media(max-width:1199px){.home-bottom{grid-template-columns:1fr}}@media(max-width:639px){.home-camera>.actions:first-child,.home-camera>.actions:not(:first-child){padding:16px}.home-camera>#state{margin:0 16px 16px}.home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.home-metrics .metric{font-size:19px;overflow-wrap:anywhere}.home-brand{margin-bottom:8px}}

/* Real station overview: a single configured station, no simulated telemetry. */
.station-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),440px));gap:24px;margin:24px 0}
.station-card{display:block;padding:0;overflow:hidden;text-decoration:none;color:var(--text);border-radius:24px;transition:transform .15s,border-color .15s}
.station-card:hover{transform:translateY(-3px);border-color:var(--accent)}
.station-card:focus-visible,.station-back:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.station-art{min-height:210px;display:grid;place-content:center;justify-items:center;background:var(--surface);color:var(--accent);border-bottom:1px solid var(--line)}
.station-art svg{width:160px;height:100px}.station-art span{font-size:14px}
.station-card-body{padding:24px}.station-card-body h2{font-size:22px;margin:18px 0 10px}.station-card-body p{line-height:1.7}
.station-open{margin-top:24px;padding-top:18px;border-top:1px solid var(--line);font-weight:700;color:var(--accent)}
.station-back{display:inline-block;margin:24px 0 0}
@media(prefers-reduced-motion:reduce){.station-card{transition:none}.station-card:hover{transform:none}}

/* Match the Demo station-card hierarchy without its simulated readings. */
#stationOverview .ops-hero h1{font-size:30px;font-weight:800}
#stationOverview .ops-hero p{font-size:14px}
.station-search{font-size:12px;color:var(--muted);display:grid;gap:6px;min-width:240px}
.station-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:24px 0}
.station-card{border-radius:28px;min-width:0}
.station-meta{display:flex;justify-content:space-between;gap:16px;padding:20px;border-bottom:1px solid var(--line)}
.station-meta dl{display:grid;grid-template-columns:60px minmax(0,1fr);gap:10px;margin:0;font-size:12px}
.station-meta dd{text-align:left;font-weight:700;overflow-wrap:anywhere}
.station-number{text-align:right;flex-shrink:0}.station-number>small{font-size:9px;letter-spacing:1px}.station-number>b{display:block;font-size:30px}.station-number .tag{display:inline-block;font-size:10px;padding:5px 8px;margin-top:8px}
.station-reading{display:grid;grid-template-columns:minmax(0,1fr) 130px;gap:16px;padding:20px}
.station-media{display:grid;place-items:center;position:relative;min-height:250px;border-radius:16px;overflow:hidden;background:var(--bg);border:1px solid var(--line);text-decoration:none}
.station-media img{position:absolute;width:100%;height:100%;object-fit:contain;background:var(--bg)}
.station-placeholder{text-align:center;font-size:24px;font-weight:800}.station-placeholder small{font-size:11px}
.station-caption{position:absolute;bottom:12px;left:8px;right:8px;padding:7px;background:var(--panel);color:var(--text);font-size:9px;border-radius:8px}
.station-levels{display:flex;flex-direction:column;justify-content:center;gap:16px;text-align:right}.station-levels small{font-size:10px}.station-levels b{display:block;font-size:24px}.station-current{padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.station-current b{font-size:30px;color:var(--accent)}
.threshold-critical b{color:var(--bad)}.threshold-warning b{color:var(--warn)}
.station-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--line)}
.station-actions>a,.station-control{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;min-height:84px;padding:10px 4px;text-decoration:none;font-size:11px;border-right:1px solid var(--line)}
.station-actions>a:hover{background:var(--surface)}.station-actions>a>span,.station-control>span{font-size:26px}.station-control{color:var(--muted);border-right:0}.station-control small{font-size:9px}
.station-status-line{border-top:1px solid var(--line);padding:12px 20px;font-size:10px;color:var(--muted)}.station-data-note{font-size:11px;line-height:1.8}.station-card>.station-data-note{margin:0;padding:0 20px 16px}
@media(max-width:1599px){.station-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1199px){.station-grid{grid-template-columns:1fr;max-width:600px}}
@media(max-width:639px){#stationOverview .ops-hero h1{font-size:25px}.station-search{width:100%;min-width:0}.station-reading{grid-template-columns:minmax(0,1fr) 112px;padding:16px;gap:12px}.station-meta{padding:16px}.station-current b{font-size:25px}.station-levels b{font-size:22px}}

/* One WebRTC player is moved between card and detail; never duplicate sessions. */
#stationVideoMount{width:100%;min-width:0}
.station-media{display:block}
#stationVideoMount .home-camera{border:0;border-radius:0;box-shadow:none;background:transparent}
#stationVideoMount .home-camera>.actions:first-child{display:none}
#stationVideoMount .home-camera video{aspect-ratio:auto;height:250px;object-fit:contain;background:var(--bg)}
#stationVideoMount .home-camera>.actions:not(:first-child){padding:8px;gap:6px}
#stationVideoMount .home-camera button{padding:5px 7px;font-size:10px;min-height:32px;box-shadow:none}
#stationVideoMount #stats{display:block;width:100%;font-size:9px;margin:0;overflow-wrap:anywhere}
#stationVideoMount #state{font-size:10px;margin:4px 8px 12px;min-height:28px}
.station-media>.station-caption{position:static;display:block;margin:8px;text-align:center;text-decoration:none}

#waterChart{display:block;width:100%;min-height:180px}.history-grid{stroke:var(--line);stroke-width:1}.history-line{fill:none;stroke:var(--accent);stroke-width:2}.history-dot{fill:var(--accent)}.history-label{fill:var(--muted);font-size:11px}#waterSourceStatus,#waterHistoryStatus{font-size:12px;line-height:1.7}

/* Office UI refresh: quieter surfaces, stronger hierarchy, accessible controls. */
.history-chart-scroll{overflow-x:auto;margin-top:16px}.history-chart-scroll #waterChart{min-width:580px;min-height:240px}.history-label{font-size:14px}.history-dot{cursor:pointer;stroke:var(--panel);stroke-width:1}.history-dot:hover,.history-dot:focus{r:9;stroke:var(--text);stroke-width:2;outline:none}.history-detail{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);min-height:56px}#trend p{font-size:14px;line-height:1.8}#historyRange{margin:8px 0;max-width:100%}
.last-water-panel{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;margin-top:20px;border-left:3px solid var(--warn)!important}.last-water-panel p{margin:6px 0}.last-water-panel #lastWaterValue{font-size:24px;font-weight:750;font-variant-numeric:tabular-nums;color:var(--text)!important}.last-water-panel small{display:block;max-width:65ch}
:root{--home-panel:var(--panel);--home-panel-end:var(--panel);--home-shadow:#00000012}
:root[data-theme=light]{--home-panel:var(--panel);--home-panel-end:var(--panel);--home-shadow:#24405b08}
.home-main{background-image:none}
.home-sidebar{border-color:var(--line)}
.home-sidebar nav a{border:1px solid transparent;line-height:1.6;transition:background .15s}
.home-sidebar nav a:hover{background:var(--surface)}
.home-sidebar nav a.active{background:color-mix(in srgb,var(--accent) 10%,var(--panel));box-shadow:inset 3px 0 var(--accent)}
.home-main>.ops-nav{min-height:80px}
.home-main .panel{border-color:var(--line)}
.home-metrics .panel{padding:20px}
.home-metrics .metric{font-size:24px;margin:8px 0}
.home-metrics p{margin:6px 0 0;font-size:12px;line-height:1.7}
.home-camera,.water-panel,.station-card{border-radius:20px}
.station-card:hover{transform:none}
.station-meta{background:color-mix(in srgb,var(--surface) 35%,var(--panel))}
.station-search input{min-height:46px}
.station-back{font-size:13px;font-weight:700;text-underline-offset:5px}
.water-number #waterLevel{letter-spacing:-.04em}
.quality-ring{border-width:8px;background:var(--bg)}
#waterSourceStatus,#waterHistoryStatus{padding:8px 0;color:var(--muted)}
#waterChart{border-radius:12px;background:var(--bg);padding:8px}
#stationVideoMount .home-camera button{min-height:44px;padding:8px 12px;font-size:12px}
#stationVideoMount #stats{font-size:11px;line-height:1.6}
#stationVideoMount #state{font-size:12px;line-height:1.6}
@media(max-width:639px){.home-main>.ops-nav{min-height:72px}.home-metrics .panel{padding:14px}.home-metrics .metric{font-size:20px}.station-search{min-width:0;width:100%}.station-search input{width:100%}}
@media(prefers-reduced-motion:reduce){.home-sidebar nav a{transition:none}}
/* Keep the measurement separate from its status in both inherited themes. */
#stationWater { white-space: nowrap; font-variant-numeric: tabular-nums; }
#stationAlertState,#homeAlertState{padding:12px;border:1px solid var(--line);border-left:4px solid #8296a8;border-radius:8px;line-height:1.7;overflow-wrap:anywhere}
[data-alert-state=SAFE]{border-left-color:#36b887!important}
[data-alert-state=WARNING]{border-left-color:#eab308!important}
[data-alert-state=CRITICAL]{border-left-color:#ef6678!important}
.home-alert-history{margin:12px 0;padding:12px;border-top:1px solid var(--line);font-size:13px;color:var(--text);overflow-wrap:anywhere}
.home-alert-history h3{font-size:14px;margin:0 0 8px}.home-alert-history ol{margin:0;padding-left:20px}.home-alert-history li{line-height:1.7;margin-bottom:8px}
#stationWaterState { display: block; font-size: 0.75rem; line-height: 1.5; margin-top: 0.5rem; overflow-wrap: anywhere; }

.history-threshold{fill:none;stroke-width:1.5;stroke-dasharray:6 4}.history-threshold-label{font-size:12px;font-weight:700;paint-order:stroke;stroke:var(--bg);stroke-width:3px}.history-threshold-safe{stroke:#1685bb;fill:#1685bb}.history-threshold-warning{stroke:#b87900;fill:#b87900}.history-threshold-critical{stroke:#d33950;fill:#d33950}.history-threshold{fill:none}.history-threshold-label{stroke:var(--bg)}
[data-theme="dark"] .history-threshold-label.history-threshold-safe{fill:#72d4ff}[data-theme="dark"] .history-threshold-label.history-threshold-warning{fill:#ffd166}[data-theme="dark"] .history-threshold-label.history-threshold-critical{fill:#ff8c9c}

.demo-station .demo-badge{color:var(--warn);border:1px solid var(--warn);padding:6px 10px;border-radius:10px;display:inline-block}.demo-station .demo-body{padding:20px}.demo-station video{width:100%;aspect-ratio:16/9;background:#000;object-fit:contain;border-radius:12px}.demo-station h2{font-size:18px}.demo-station p{font-size:14px;line-height:1.7}.demo-station[hidden]{display:none}

/* Unified station cards: real stream and presentation clips. */
.station-grid{align-items:start}.demo-station .station-media{height:300px;min-height:300px}.demo-station .station-media video{display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:cover;border-radius:0}.demo-station .station-actions button{border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;color:var(--accent);min-height:84px;font:inherit;font-size:12px;padding:10px 4px}.demo-station .station-actions button:hover{background:var(--surface)}.demo-station .station-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:-4px}.demo-station .station-current b{color:var(--accent)}.demo-station .station-number .tag{color:var(--muted)}

.water-event-image{display:block;margin:8px 0}.water-event-image img{display:block;width:100%;max-width:260px;aspect-ratio:16/9;object-fit:contain;border-radius:8px;background:#07111f}.water-event-image+small{display:block;font-size:11px;color:var(--muted)}

.history-line{stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.history-area{fill:var(--accent);opacity:.12}.history-dot{opacity:0;stroke:none}.history-dot:hover,.history-dot:focus{opacity:1;r:4}.history-single{opacity:.7;r:2}
.station-grid{align-items:stretch}.station-grid>.station-card{display:flex;flex-direction:column}.station-grid>.station-card[hidden]{display:none}.station-grid .station-meta{height:150px;flex-shrink:0;overflow:auto}.station-grid .station-reading{height:420px;flex-shrink:0}.station-grid .station-media,.station-grid .demo-station .station-media{height:100%;min-height:0}.station-grid>.station-card>.station-data-note{min-height:60px}.station-grid #stationAlertState,.sample-alert-summary{margin:0;padding:14px 18px;min-height:90px;border-top:1px solid var(--line);font-size:12px;line-height:1.7}.station-grid .home-alert-history{height:220px;overflow:auto;flex-shrink:0}.station-grid .station-actions{margin-top:auto}.station-grid .station-status-line{min-height:46px}.station-grid #sharedPlayer{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center}.station-grid #sharedPlayer video{max-height:210px}.station-grid .station-number .tag{white-space:nowrap}

.demo-station .station-actions button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.demo-station .station-actions button>span:first-child{font-size:26px}.sample-alert-history:focus{outline:2px solid var(--accent);outline-offset:-3px}

/* A wide line chart keeps time and threshold labels readable in both themes. */
.home-bottom:has(#trend){grid-template-columns:minmax(0,1fr)}
#trend .history-chart-scroll{background:var(--bg);border:1px solid var(--line);border-radius:16px;padding:12px 8px}
#trend #waterChart{min-height:300px;min-width:680px}
.history-grid{stroke:var(--line);opacity:.42}
.history-line{stroke:var(--accent);stroke-width:3;vector-effect:non-scaling-stroke;fill:none;stroke-linejoin:round;stroke-linecap:round}
.history-area{fill:url(#waterHistoryFill);opacity:1;pointer-events:none}
.history-gradient-top{stop-color:var(--accent);stop-opacity:.24}.history-gradient-bottom{stop-color:var(--accent);stop-opacity:.015}
.history-threshold{opacity:.7;stroke-width:1;stroke-dasharray:6 5}
.history-threshold-label{font-size:12px;font-weight:700;paint-order:stroke;stroke:var(--bg);stroke-width:5px;stroke-linejoin:round}
.history-dot{opacity:0;pointer-events:all}.history-dot:hover,.history-dot:focus{opacity:1;r:4;stroke:var(--panel);stroke-width:2}
.history-single{opacity:.6;r:2}
#historyDetail{font-variant-numeric:tabular-nums;border-left:3px solid var(--accent)}

/* Compact overview only; player controls and alert details remain in station detail. */
#stationOverview .station-meta{height:auto;min-height:140px;align-items:flex-start;gap:12px;padding:16px}
#stationOverview .station-meta dl{flex:1;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}
#stationOverview .station-meta-pair{min-width:0}
#stationOverview .station-meta dt{font-size:10px;color:var(--muted);margin-bottom:4px}
#stationOverview .station-meta dd{margin:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#stationOverview .station-number{width:58px}
#stationOverview .station-number>small{font-size:7px;letter-spacing:0}
#stationOverview #sharedPlayer>.actions,#stationOverview #sharedPlayer>#state,
#stationOverview .station-caption,#stationOverview .threshold-warning,
#stationOverview #stationAlertState,#stationOverview #stationAlertStateHistory,
#stationOverview .sample-alert-summary{display:none}
#stationOverview .station-reading{height:300px;padding:16px;gap:12px;grid-template-columns:minmax(0,1fr) 100px}
#stationOverview .station-media{min-height:0}
#stationOverview #sharedPlayer{border:0;border-radius:0}
#stationOverview #sharedPlayer video{max-height:none;height:100%;object-fit:contain}
#stationOverview .station-levels{justify-content:space-between;gap:12px}
#stationOverview .station-levels b{font-size:22px}
#stationOverview .station-current{padding:10px 6px}
#stationOverview .station-current b{font-size:26px}
#stationOverview .sample-alert-history[hidden]{display:none}

/* Keep the overview within the viewport and align both media frames. */
html:has(.home-layout){overflow-x:clip}
.home-layout{width:100%;max-width:100%;min-width:0}
.home-main{min-width:0;max-width:1500px}
.home-sidebar{min-width:0;left:0;overflow-y:auto;z-index:2}
.home-sidebar nav a{overflow-wrap:anywhere}
#stationOverview .station-reading{height:324px;min-height:324px;grid-template-columns:minmax(0,1fr) 116px;grid-template-rows:minmax(0,1fr);align-items:stretch}
#stationOverview .station-media{height:100%;min-height:0;position:relative;border-radius:16px;background:#07111f;overflow:hidden}
#stationOverview #stationVideoMount,#stationOverview #sharedPlayer{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0}
#stationOverview #sharedPlayer video,#stationOverview .demo-station .station-media video{position:absolute;inset:0;display:block;width:100%;height:100%;max-height:none;margin:0;aspect-ratio:auto;object-fit:cover;border-radius:0}
#stationOverview .demo-station>.station-data-note{display:none}
#stationOverview .station-levels{min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:60px 132px 60px;align-content:start;justify-content:stretch;justify-items:stretch;gap:10px;padding-bottom:16px;box-sizing:border-box}
#stationOverview .station-current{height:132px;min-height:0;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:12px 6px;border-radius:14px}
#stationOverview .station-current b{font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0}
#stationOverview #stationWaterState{display:block;width:100%;height:36px;min-height:36px;overflow-y:auto;line-height:18px;margin-top:6px;flex-shrink:0;font-size:10px}

:root[data-theme=light] .home-layout{--text:#111827;--muted:#293443}
:root[data-theme=light] .home-sidebar nav a{color:#111827!important}
:root[data-theme=light] .station-meta dd{color:#111827}
@media(min-width:1024px){.home-layout{grid-template-columns:240px minmax(0,1fr)}}
@media(max-width:1023px){.home-layout{grid-template-columns:minmax(0,1fr)}.home-sidebar{overflow:visible;height:auto}}


/* Equal card rhythm; detailed explanations remain in the station view. */
#stationOverview .station-card:hover{transform:none}
#stationOverview .station-data-note,#stationOverview .station-status-line{display:none}
.home-sidebar>.panel{display:none}
#stationOverview .station-meta{min-height:128px}
#stationOverview .station-levels>div{min-width:0;text-align:center}
#stationOverview .station-levels>div>b{display:block;line-height:1.3;white-space:nowrap;font-variant-numeric:tabular-nums}
#stationOverview .station-levels>div>b small{display:block;font-size:10px;font-weight:400;line-height:1.5}
#stationOverview .station-levels>div>small{font-size:10px;line-height:1.5}
#stationOverview .station-current{gap:3px;background:var(--surface);border:1px solid var(--line)}
#stationOverview .station-current b{font-size:28px;letter-spacing:-.5px}
#stationOverview .station-actions{margin-top:0;min-height:84px}
#stationOverview .station-actions>a,#stationOverview .station-actions>button,#stationOverview .station-actions>.station-control{border-radius:0;background:transparent!important;box-shadow:none;padding:12px 6px;color:var(--text)!important}
#stationOverview .station-actions>button:hover,#stationOverview .station-actions>a:hover{background:var(--surface)!important}
@media(max-width:420px){#stationOverview .station-reading{grid-template-columns:minmax(0,1fr) 100px;padding:12px;gap:10px}}

/* Inline metadata pairs, shared by live and recorded cards in both themes. */
#stationOverview .station-meta-pair{display:flex;align-items:baseline;gap:6px;min-width:0}
#stationOverview .station-meta-pair dt{flex:none;margin:0;white-space:nowrap;font-size:10px}
#stationOverview .station-meta-pair dd{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;line-height:1.6}
#stationOverview .station-meta dl{column-gap:12px;row-gap:16px}

.station-source{margin:0 16px 12px;font-size:11px;color:var(--muted)}
.station-source summary{cursor:pointer;padding:6px 0}
.station-source p{line-height:1.6;margin:4px 0}

/* Status occupies the same space in every camera header. */
#stationOverview .station-meta{height:128px;min-height:128px;box-sizing:border-box}
#stationOverview .station-number{display:flex;flex-direction:column;align-items:center;gap:8px}
.station-signal{display:inline-block;width:12px;height:12px;min-height:12px;border-radius:50%;background:#8192a4;box-shadow:0 0 0 4px #8192a41a;margin:6px 0}
.station-signal[data-state=SAFE],.station-signal[data-state=BETWEEN_THRESHOLDS]{background:#169b62;box-shadow:0 0 0 4px #169b6226}
.station-signal[data-state=WARNING]{background:#bf7900;box-shadow:0 0 0 4px #bf790026}
.station-signal[data-state=CRITICAL]{background:#e13e50;box-shadow:0 0 0 4px #e13e5026}
.station-signal:not([data-state=UNKNOWN]){animation:station-pulse 2.4s ease-in-out infinite}
.station-signal:focus-visible{outline:2px solid var(--text);outline-offset:5px}
@keyframes station-pulse{50%{opacity:.55}}
@media(prefers-reduced-motion:reduce){.station-signal{animation:none!important}}

/* Border colors describe water assessment, not camera connectivity. */
#stationOverview .station-card[data-water-state]{border-color:#8192a4;box-shadow:inset 0 0 0 1px #8192a433}
#stationOverview .station-card[data-water-state=SAFE],#stationOverview .station-card[data-water-state=BETWEEN_THRESHOLDS]{border-color:#169b62;box-shadow:inset 0 0 0 1px #169b6226}
#stationOverview .station-card[data-water-state=WARNING]{border-color:#bf7900;box-shadow:inset 0 0 0 1px #bf79004d}
#stationOverview .station-card[data-water-state=CRITICAL]{border-color:#e13e50;animation:critical-card-glow 2.4s ease-in-out infinite}
#stationOverview .station-number{width:74px;gap:4px;flex-shrink:0}
#stationOverview .station-signal-label{font-size:9px;line-height:1.4;text-align:center;white-space:normal}
.station-signal:not([data-state=UNKNOWN]){animation:none}
@keyframes critical-card-glow{0%,100%{box-shadow:0 0 0 1px #e13e5033}50%{box-shadow:0 0 0 3px #e13e5066,0 0 14px #e13e5033}}
@media(prefers-reduced-motion:reduce){#stationOverview .station-card[data-water-state=CRITICAL]{animation:none;box-shadow:0 0 0 2px #e13e5044}}

/* Compact metadata and status below the camera number. */
.home-main{max-width:1920px;box-sizing:border-box}
#stationOverview .station-meta{display:grid;grid-template-columns:minmax(0,1fr) 52px;grid-template-rows:48px 32px;height:112px;min-height:112px;padding:16px 12px;gap:0 10px;overflow:visible}
#stationOverview .station-meta dl{grid-column:1;grid-row:1/3;align-self:center;row-gap:16px;column-gap:10px}
#stationOverview .station-meta-pair dt{font-size:12px}
#stationOverview .station-meta-pair dd{font-size:13px;line-height:1.6}
#stationOverview .station-meta-pair{gap:5px}
#stationOverview .station-number{grid-column:2;grid-row:1;width:52px;gap:2px}
#stationOverview .station-status-badge{grid-column:2;grid-row:2;display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;height:32px;box-sizing:border-box;border-radius:8px;background:var(--surface);border:1px solid var(--line);color:var(--text)}
#stationOverview .station-status-badge .station-signal-label{font-size:12px;font-weight:600;line-height:1.4}
#stationOverview .station-status-badge .station-signal{width:10px;height:10px;min-height:10px;margin:0;flex-shrink:0}
#stationOverview [data-water-state=SAFE] .station-status-badge,#stationOverview [data-water-state=BETWEEN_THRESHOLDS] .station-status-badge{background:color-mix(in srgb,#169b62 12%,var(--panel));border-color:#169b62}
#stationOverview [data-water-state=WARNING] .station-status-badge{background:color-mix(in srgb,#bf7900 12%,var(--panel));border-color:#bf7900}
#stationOverview [data-water-state=CRITICAL] .station-status-badge{background:color-mix(in srgb,#e13e50 12%,var(--panel));border-color:#e13e50}
@media(min-width:1800px){.station-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.home-main{padding-left:24px;padding-right:24px}#stationOverview .station-reading{grid-template-columns:minmax(0,1fr) 100px;padding:12px;gap:10px}#stationOverview .station-current b{font-size:26px}}
@media(min-width:1400px) and (max-width:1799px){.station-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}}
@media(min-width:1200px) and (max-width:1399px){.station-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Icon-only water status with a broad, slow halo in every state. */
#stationOverview .station-card[data-water-state]{--status-color:#8192a4;animation:station-card-halo 3s ease-in-out infinite}
#stationOverview .station-card[data-water-state=SAFE],#stationOverview .station-card[data-water-state=BETWEEN_THRESHOLDS]{--status-color:#169b62}
#stationOverview .station-card[data-water-state=WARNING]{--status-color:#bf7900}
#stationOverview .station-card[data-water-state=CRITICAL]{--status-color:#e13e50}
#stationOverview .station-status-badge{background:transparent!important;border:0!important}
#stationOverview .station-status-badge .station-signal-label{display:none}
#stationOverview .station-status-badge .station-signal{width:14px;height:14px;min-height:14px;background:var(--status-color);animation:station-icon-halo 3s ease-in-out infinite}
@keyframes station-card-halo{0%,100%{box-shadow:0 0 0 2px color-mix(in srgb,var(--status-color) 22%,transparent),0 0 12px color-mix(in srgb,var(--status-color) 12%,transparent)}50%{box-shadow:0 0 0 4px color-mix(in srgb,var(--status-color) 32%,transparent),0 0 24px 3px color-mix(in srgb,var(--status-color) 24%,transparent)}}
@keyframes station-icon-halo{0%,100%{box-shadow:0 0 0 5px color-mix(in srgb,var(--status-color) 18%,transparent),0 0 12px var(--status-color)}50%{box-shadow:0 0 0 9px color-mix(in srgb,var(--status-color) 12%,transparent),0 0 22px var(--status-color)}}
@media(prefers-reduced-motion:reduce){#stationOverview .station-card[data-water-state],#stationOverview .station-status-badge .station-signal{animation:none!important}#stationOverview .station-card[data-water-state]{box-shadow:0 0 16px color-mix(in srgb,var(--status-color) 24%,transparent)}}

.station-picker{display:flex;align-items:center;gap:12px;margin:16px 0}.station-picker[hidden],.sample-detail[hidden]{display:none}.station-picker select{min-width:220px;max-width:100%}
.sample-detail{padding:24px;margin:20px 0}.sample-detail video{width:100%;max-height:440px;background:#000;border-radius:12px;object-fit:contain}
.station-event-dialog{width:min(640px,calc(100vw - 32px));max-height:85vh;box-sizing:border-box;overflow:auto;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:18px;padding:24px}.station-event-dialog::backdrop{background:#0009}.station-event-dialog>button{float:right}.station-event-dialog article{padding:16px 0;border-bottom:1px solid var(--line)}.station-event-dialog img{display:block;width:100%;max-height:280px;object-fit:contain;border-radius:10px}.station-event-dialog h2{font-size:20px}
#stationOverview .station-actions>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;border:0;border-right:1px solid var(--line);font:inherit;font-size:12px}#stationOverview .station-actions>button>span:first-child{font-size:26px}
#stationOverview .station-actions>button>span:not(:first-child){font-size:12px;line-height:1.5}

/* Compact overview, shared by live and recorded cameras in both themes. */
.home-sidebar .station-picker{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:20px 0 12px}
.home-sidebar .station-picker[hidden]{display:none}
.home-sidebar .station-picker label{font-size:12px;color:var(--muted)}
.home-sidebar .station-picker select{width:100%;min-width:0;font-size:12px;padding:9px 6px;box-sizing:border-box}
#stationOverview .station-meta{height:96px;min-height:96px;grid-template-rows:40px 32px;padding:12px}
#stationOverview .station-meta dl{row-gap:10px}
#stationOverview .station-meta-pair dt{font-size:11px}
#stationOverview .station-meta-pair dd{font-size:12px}
#stationOverview .station-reading{height:288px;min-height:288px;padding:12px;gap:10px;grid-template-columns:minmax(0,1fr) 100px;box-sizing:border-box}
#stationOverview .station-levels{grid-template-rows:50px 132px 50px;gap:8px;padding-bottom:8px}
#stationOverview .station-actions{min-height:72px}
#stationOverview .station-actions>a,#stationOverview .station-actions>button,#stationOverview .station-actions>.station-control{min-height:72px;box-sizing:border-box;padding:8px 4px;font-size:11px}
#stationOverview .station-actions>button>span:not(:first-child){font-size:11px}

/* Detail refinement: preserve full camera frame without letterboxing. */
#stationOverview .station-meta{height:108px;min-height:108px;grid-template-rows:52px 32px}
#stationOverview .station-number b{line-height:1.1}
#stationOverview .station-status-badge{align-self:end}
#detailVideoMount{max-width:1120px;margin-inline:auto}
#detailVideoMount .home-camera video{width:100%;height:auto;aspect-ratio:16/9;max-height:none;object-fit:contain;margin:0}
#sharedPlayer #start,#sharedPlayer #stop{display:none}
#detailVideoMount .home-camera>.actions:not(:first-child){padding:10px 18px}
#detailVideoMount .home-camera>#state{margin:0 18px 12px}
.water-layout{grid-template-columns:minmax(0,1fr)}
.device-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
#trend .history-chart-scroll{background:linear-gradient(145deg,var(--panel),var(--surface));box-shadow:inset 0 1px 0 color-mix(in srgb,var(--accent) 12%,transparent),0 8px 32px color-mix(in srgb,var(--accent) 7%,transparent)}
.history-line{filter:drop-shadow(0 0 3px color-mix(in srgb,var(--accent) 55%,transparent));stroke-width:3}
.history-gradient-top{stop-opacity:.3}
.history-gradient-bottom{stop-opacity:.015}
#trend .history-label{font-size:11px}
#trend .history-threshold-label{font-size:10px}
#trend #waterChart{max-height:420px}
@media(max-width:639px){.device-strip{grid-template-columns:1fr}}

.history-tools{display:flex;gap:20px;align-items:center;flex-wrap:wrap;margin:12px 0}.history-summary{padding:16px;background:var(--surface);border-radius:12px;font-weight:700}.history-average{stroke:#9064d8;stroke-width:1.5;stroke-dasharray:3 4}.print-station{display:none}.water-body{grid-template-columns:minmax(0,1fr) minmax(220px,.7fr);margin:18px 0}.level-context{padding:24px;border-left:1px solid var(--line);line-height:1.8}.water-panel{max-width:1120px;width:100%;box-sizing:border-box;margin:auto}
@media(max-width:639px){.water-body{grid-template-columns:1fr}.level-context{border-left:0;border-top:1px solid var(--line)}}
@media print{
 @page{size:A4 landscape;margin:12mm}
 body *{visibility:hidden}
 #trend,#trend *{visibility:visible}
 #trend{position:absolute;inset:0 auto auto 0;width:100%;box-sizing:border-box;background:white!important;color:#111!important;border:0}
 #trend .history-tools,#trend #historyDetail{display:none}
 #trend .print-station{display:block}
 #trend svg{width:100%;max-height:125mm!important}
 #trend .history-label{fill:#222}#trend .history-chart-scroll{background:white;box-shadow:none;overflow:visible}
}

.history-analysis{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:20px;align-items:stretch}
.history-distribution{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:16px;margin-top:16px}
.history-distribution h3{font-size:15px}.history-distribution progress{width:100%;height:12px;accent-color:var(--accent)}
#trend .history-distribution p{font-size:12px;line-height:1.6}
#trend .history-analysis #waterChart{min-width:580px;max-height:none}
#waterPrintReport{display:none}
@media(max-width:1200px){.history-analysis{grid-template-columns:1fr}.history-distribution{margin-top:0}}
@media print{
 body>.home-layout{display:none!important}
 body>#waterPrintReport{display:block!important;visibility:visible!important;position:static!important;width:100%;color:#111;background:white}
 #waterPrintReport *{visibility:visible!important}
 #waterPrintReport #trend{position:static!important;inset:auto!important;width:100%;padding:0;margin:0;break-inside:avoid}
 #waterPrintReport .history-analysis{grid-template-columns:minmax(0,1fr) 58mm;gap:5mm}
 #waterPrintReport .history-chart-scroll{padding:0;min-width:0;margin-top:3mm}
 #waterPrintReport #waterChart{width:100%;min-width:0!important;height:100mm;max-height:100mm!important}
 #waterPrintReport .history-distribution{margin-top:3mm;padding:3mm;background:white;color:#111}
 #waterPrintReport p{font-size:9pt!important;line-height:1.4!important;margin:2mm 0}
 #waterPrintReport h2{font-size:17pt;margin:0 0 3mm}#waterPrintReport h3{font-size:11pt}
 #waterPrintReport .history-summary{padding:3mm}
 #waterPrintReport .history-line{filter:none}
}

.history-switch{position:relative;display:inline-flex;align-items:center;gap:12px;min-height:44px;padding:8px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer;font-size:13px;box-sizing:border-box}
.history-switch input{position:absolute;opacity:0;width:1px;height:1px}
.switch-track{width:38px;height:22px;border-radius:20px;background:var(--muted);position:relative;transition:background .15s}
.switch-track::after{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;border-radius:50%;background:white;transition:transform .15s}
.history-switch input:checked+.switch-track{background:var(--accent)}
.history-switch input:checked+.switch-track::after{transform:translateX(16px)}
.history-switch:focus-within{outline:2px solid var(--accent);outline-offset:3px}
.history-export-button{min-height:44px;padding:10px 20px;border:1px solid var(--accent);border-radius:12px;background:var(--accent);color:var(--bg);font-weight:700;cursor:pointer}
.history-export-button:disabled{opacity:.45;cursor:not-allowed}
.history-distribution{align-self:start}
.distribution-bin{padding:10px 0;border-bottom:1px solid var(--line);--bin-color:#72869a}
.distribution-bin.bin-0{--bin-color:#13956c}.distribution-bin.bin-1{--bin-color:#288dc0}.distribution-bin.bin-2{--bin-color:#bc8100}.distribution-bin.bin-3{--bin-color:#d74760}
.history-distribution progress{appearance:none;border:none;background:var(--line);border-radius:8px;overflow:hidden;height:9px;display:block}
.history-distribution progress::-webkit-progress-bar{background:var(--line);border-radius:8px}
.history-distribution progress::-webkit-progress-value{background:var(--bin-color);border-radius:8px}
.history-distribution progress::-moz-progress-bar{background:var(--bin-color);border-radius:8px}
#trend .distribution-bin p{margin:0 0 10px;font-weight:600}
@media(prefers-reduced-motion:reduce){.switch-track,.switch-track::after{transition:none}}

@media print{
 #waterPrintReport{--text:#132b3e;--muted:#334b60;--panel:#fff;--bg:#fff}
 #waterPrintReport .print-events{break-before:page}
 #waterPrintReport .print-event{break-inside:avoid;border:1px solid #bacbd7;border-radius:3mm;padding:4mm;margin:4mm 0}
 #waterPrintReport .print-event img{display:block;max-width:160mm;max-height:85mm;object-fit:contain;margin:3mm 0}
}

@media print{
 #waterPrintReport,#waterPrintReport *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
 #waterPrintReport .history-gradient-top{stop-color:#007d88;stop-opacity:.32}
 #waterPrintReport .history-gradient-bottom{stop-color:#007d88;stop-opacity:.06}
 #waterPrintReport .print-distribution-bar{display:block;width:100%!important;height:12px!important;max-height:12px!important;margin:3mm 0}
}

@media print{body{margin:0!important}body> :not(#waterPrintReport){display:none!important}#waterPrintReport #waterChart{height:78mm!important;max-height:78mm!important}#waterPrintReport #trend{break-inside:avoid-page!important}#waterPrintReport .history-summary{padding:2mm}#waterPrintReport .print-events{break-before:page}}
.fleet-card .station-media img{display:block;width:100%;height:100%;object-fit:cover}.fleet-card .station-actions a{display:flex;align-items:center;justify-content:center;min-height:80px;padding:8px;text-align:center;font-size:12px}.fleet-card .station-number .station-signal{display:block;margin:12px auto 0}

@media print{body{background:#fff!important}#waterPrintReport{background:#fff!important}}
/* Reports always use dark ink on white, independently of the screen theme. */
@media print{
 #waterPrintReport{--accent:#006c78;--surface:#e8f0f6;--line:#b4c4d0;--text:#132b3e;--muted:#334b60}
 #waterPrintReport .history-summary{background:#e8f0f6!important;color:#132b3e!important;box-shadow:none!important}
 #waterPrintReport .history-line{stroke:#006c78!important;stroke-width:3!important;filter:none!important}
 #waterPrintReport .history-dot{fill:#006c78!important}
 #waterPrintReport .history-single{opacity:1!important}
 #waterPrintReport .history-threshold{opacity:1!important;stroke-width:1.8!important}
 #waterPrintReport .history-threshold-critical{stroke:#bd2039!important}
 #waterPrintReport .history-threshold-warning{stroke:#996500!important}
 #waterPrintReport .history-threshold-safe{stroke:#006b9b!important}
 #waterPrintReport .history-threshold-label{stroke:#fff!important;stroke-width:3px!important;font-size:11px!important}
 #waterPrintReport .history-threshold-label.history-threshold-critical{fill:#bd2039!important}
 #waterPrintReport .history-threshold-label.history-threshold-warning{fill:#996500!important}
 #waterPrintReport .history-threshold-label.history-threshold-safe{fill:#006b9b!important}
 #waterPrintReport .history-average{stroke:#7040aa!important;stroke-width:1.8!important}
 #waterPrintReport .history-grid{opacity:.7!important;stroke:#bacbd7!important}
 #waterPrintReport .panel,#waterPrintReport .history-chart-scroll{box-shadow:none!important}
}

.overview-tools{display:flex;align-items:flex-end;gap:12px;margin-left:auto;flex-shrink:0}.overview-tools .station-search{margin:0;width:240px}.overview-tools .manage-cameras{min-height:46px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;padding:10px 18px}.overview-tools [hidden],#manageUsersLink[hidden]{display:none!important}@media(max-width:760px){.ops-hero{flex-wrap:wrap}.overview-tools{width:100%;margin-left:0;flex-wrap:wrap}.overview-tools .station-search{flex:1 1 200px;width:auto}}

/* Reserve document padding instead of browser page margins: suppress URL headers/footers. */
@media print{@page{size:A4 landscape;margin:0!important}html,body{margin:0!important;padding:0!important}#waterPrintReport{box-sizing:border-box;width:100%!important;max-width:none!important;padding:12mm!important;box-decoration-break:clone;-webkit-box-decoration-break:clone}}

.fleet-image-message{padding:16px;text-align:center;color:var(--muted);font-size:12px}#stationOverview .fleet-card .station-media img{object-fit:cover}.fleet-events-dialog{width:min(560px,90vw);max-height:80vh;overflow:auto;border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--text);padding:24px}.fleet-events-dialog::backdrop{background:#0008}.fleet-events-dialog>button{float:right}.fleet-ocr-note{font-size:10px!important}

#stationOverview .fleet-card .station-actions>a{min-height:72px;padding:8px 4px;font-size:11px}#stationOverview .fleet-card .station-actions>a>span:not(:first-child){font-size:11px;line-height:inherit}

#stationOverview .station-actions{height:104px;min-height:104px;flex-shrink:0;box-sizing:border-box}#stationOverview .station-actions>a,#stationOverview .station-actions>button,#stationOverview .station-actions>.station-control{height:100%;min-height:0;box-sizing:border-box}

.station-signal[data-state=LOW]{background:#8192a4;box-shadow:0 0 0 4px #8192a426}
#stationOverview .station-card[data-water-state=LOW]{--status-color:#8192a4;border-color:#8192a4;box-shadow:inset 0 0 0 1px #8192a455}
[data-alert-state=LOW]{border-left-color:#8192a4!important}
.station-signal[data-state=UNKNOWN]{background:#2684ff;box-shadow:0 0 0 4px #2684ff26}
#stationOverview .station-card[data-water-state=UNKNOWN]{--status-color:#2684ff;border-color:#2684ff;box-shadow:inset 0 0 0 1px #2684ff55}
[data-alert-state=UNKNOWN]{border-left-color:#2684ff!important}

/* Station report cards */
#stationOverview .station-meta{height:140px;min-height:140px;padding:14px}
#stationOverview .station-meta dl{display:flex;flex-direction:column;gap:3px;padding-right:65px}
#stationOverview .station-meta-pair:first-child{font-size:18px;font-weight:700;text-decoration:underline}
#stationOverview .station-meta-pair dt{display:none}
#stationOverview .station-meta-pair dd{font-size:14px}
#stationOverview .station-meta-pair:last-child{display:none}
#stationOverview .station-number{border:1px solid var(--line);padding:7px}
#stationOverview .station-reading{grid-template-columns:minmax(70px,1fr) minmax(0,1.7fr);gap:10px;height:300px;min-height:300px}
#stationOverview .station-levels{display:flex;flex-direction:column;justify-content:center;gap:2px;padding:0}
#stationOverview .reading-title{font-size:16px;font-weight:600;text-align:center}
#stationOverview .station-levels>div{border:0;background:transparent;box-shadow:none;text-align:center;padding:0;min-height:0}
#stationOverview .station-levels>div>small,#stationOverview .station-levels b small{display:none}
#stationOverview .station-levels .threshold-critical b{color:#e11919;font-size:27px}
#stationOverview .station-levels .threshold-warning{display:block!important}
#stationOverview .station-levels .threshold-warning b{color:#d87317;font-size:27px}
#stationOverview .station-levels .station-current b{font-size:58px;color:#00a853;line-height:1.2}
#stationOverview .station-levels>div:last-child b{color:#858585;font-size:27px}
#stationOverview .station-media img{object-fit:cover}
#stationOverview .station-actions{height:104px}
#stationOverview .station-actions .report-icon{font-size:38px;line-height:1.2}
#stationOverview .station-actions>a,#stationOverview .station-actions>button,#stationOverview .station-actions>.station-control{font-size:14px;gap:5px;display:flex;flex-direction:column;justify-content:center;align-items:center}

#stationOverview .station-actions{height:120px;min-height:120px;overflow:visible}
#stationOverview .station-actions>a,#stationOverview .station-actions>button,#stationOverview .station-actions>.station-control{padding:8px 5px;font-size:15px;line-height:1.3;white-space:normal;overflow-wrap:normal;word-break:normal}
#stationOverview .station-actions .report-icon{font-size:38px;flex:none}
#stationOverview .station-actions>*>span:last-of-type{font-size:15px;line-height:1.3}
#stationOverview .station-actions .station-control small{font-size:10px}
#stationOverview .station-levels .reading-title{font-size:18px;line-height:1.4;margin-bottom:8px}
#stationOverview .station-meta-pair dd{line-height:1.4}

/* Print: an empty or text-only event list stays on the chart page (one A4 sheet). */
@media print{#waterPrintReport .print-events.print-events-flow{break-before:auto!important;margin-top:3mm}#waterPrintReport .print-events-flow h2{font-size:12pt;margin:0 0 1mm}#waterPrintReport .print-events-flow p{margin:1mm 0}#waterPrintReport .print-events-flow .print-event{padding:2mm 3mm;margin:2mm 0}#waterPrintReport .print-events-flow .print-event h3{font-size:9pt;margin:0}#waterPrintReport .print-events.print-events-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:3mm}#waterPrintReport .print-events-flow>h2,#waterPrintReport .print-events-flow>p{grid-column:1/-1}#waterPrintReport .print-events-flow .print-event p{font-size:8.5pt!important;margin:0}}
@media print{#waterPrintReport .history-analysis{align-items:start}#waterPrintReport .history-distribution{padding:2.5mm 3mm}#waterPrintReport .history-distribution h3{margin:0 0 1mm}#waterPrintReport .distribution-bin{padding:1.2mm 0}#waterPrintReport .distribution-bin p{margin:0 0 .8mm!important}#waterPrintReport .print-distribution-bar{margin:1mm 0!important}}
