:root {
    color-scheme: dark;
    --page: #081a25;
    --panel: #0c2230;
    --panel-deep: #07151f;
    --panel-raised: #102b39;
    --line: rgba(163, 202, 212, 0.16);
    --text: #e7f0ee;
    --muted: #8ba4aa;
    --subtle: #526d76;
    --cyan: #69d7d3;
    --cyan-deep: #36aaa9;
    --red: #ff5a63;
    --amber: #edc66e;
    font-family: "Barlow Semi Condensed", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body { min-height: 100vh; color: var(--text); background: var(--page); }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.overview-shell { display: flex; min-height: 100vh; flex-direction: column; background: radial-gradient(ellipse at 52% 48%, #10303c 0, var(--page) 62%); }
.overview-header { z-index: 5; display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 24px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(7, 21, 31, 0.96); }
.overview-mode-switch { position: absolute; left: 50%; display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid rgba(163, 202, 212, 0.2); background: rgba(4, 15, 23, 0.8); transform: translateX(-50%); }
.overview-mode-switch button { min-height: 32px; padding: 6px 14px; border: 1px solid transparent; color: var(--muted); background: transparent; font: 500 11px "IBM Plex Mono", monospace; cursor: pointer; transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease; }
.overview-mode-switch button:hover { color: var(--text); }
.overview-mode-switch button[aria-pressed="true"] { border-color: rgba(105, 215, 211, 0.32); color: var(--cyan); background: rgba(105, 215, 211, 0.12); }
.overview-mode-switch button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.overview-brand { display: flex; min-width: 0; align-items: center; gap: 15px; text-decoration: none; }
.overview-brand img { display: block; width: 116px; height: auto; object-fit: contain; }
.brand-rule { width: 1px; height: 34px; background: var(--line); }
.brand-title { display: grid; gap: 2px; color: var(--cyan); font: 500 10px "IBM Plex Mono", monospace; letter-spacing: 0; }
.brand-title strong { color: var(--text); font: 600 16px "Barlow Semi Condensed", sans-serif; }
.header-right { display: flex; align-items: center; gap: 22px; }
.system-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 500 10px "IBM Plex Mono", monospace; text-transform: uppercase; }
.system-status i, .metrics-signal i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 11px currentColor; }
.system-status.is-live i { color: #69d7a8; background: #69d7a8; }
.system-status.is-unavailable i { color: var(--red); background: var(--red); }
.overview-grid { display: grid; width: 100%; max-width: 1800px; min-height: 0; flex: 1; grid-template-columns: minmax(300px, 1.08fr) minmax(200px, 1fr) minmax(360px, 1.25fr); gap: 12px; margin: 0 auto; padding: 12px; }
.side-panel { display: flex; min-width: 0; flex-direction: column; border: 1px solid var(--line); background: linear-gradient(155deg, rgba(16, 43, 57, 0.95), rgba(8, 26, 37, 0.97)); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 17px 10px; }
.section-index, .map-kicker { color: var(--cyan); font: 500 9px "IBM Plex Mono", monospace; letter-spacing: 0; }
.panel-heading h2 { margin: 5px 0 0; font-size: 23px; font-weight: 600; line-height: 1; }
.panel-count { display: grid; width: 32px; aspect-ratio: 1; place-items: center; border: 1px solid rgba(105, 215, 211, 0.35); color: var(--cyan); font: 500 11px "IBM Plex Mono", monospace; }
.panel-summary { margin: 0; padding: 0 17px 13px; color: var(--muted); font-size: 13px; line-height: 1.25; }
.feed-list { display: grid; min-height: 0; flex: 1 1 auto; align-content: start; gap: 9px; padding: 0 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: rgba(105, 215, 211, 0.35) transparent; scrollbar-width: thin; }
.feed-card { display: block; min-width: 0; overflow: hidden; border: 1px solid var(--line); background: rgba(4, 15, 23, 0.55); color: inherit; text-decoration: none; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.feed-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.feed-card:hover { transform: translateY(-2px); border-color: rgba(255, 90, 99, 0.55); background: rgba(17, 35, 44, 0.82); box-shadow: 0 7px 18px rgba(0, 0, 0, 0.2); }
.feed-screen { position: relative; display: grid; width: 100%; aspect-ratio: 16 / 9; min-height: 0; place-items: center; overflow: hidden; background: #102d38; }
.feed-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.82) brightness(0.82); }
.feed-card:nth-child(1) .feed-image { object-position: center 48%; }
.feed-card:nth-child(2) .feed-image { object-position: center 45%; }
.feed-card:nth-child(3) .feed-image { object-position: 43% center; }
.feed-screen::before, .feed-screen::after { position: absolute; content: ""; pointer-events: none; }
.feed-screen::before { z-index: 1; inset: 13px; border: 1px solid rgba(230, 244, 239, 0.25); }
.feed-screen::after { z-index: 1; width: 130%; height: 1px; background: rgba(230, 244, 239, 0.12); transform: rotate(-18deg); }
.feed-label { position: absolute; z-index: 2; top: 8px; left: 10px; display: flex; width: calc(100% - 20px); justify-content: space-between; color: #f0f4ed; font: 500 8px "IBM Plex Mono", monospace; text-shadow: 0 1px 4px #07151f; }
.feed-label b { color: #69d7a8; font-weight: 500; }
.feed-caption { display: flex; min-height: 52px; align-items: center; justify-content: flex-start; gap: 10px; padding: 7px 10px; }
.feed-caption { display: flex; min-height: 52px; align-items: center; gap: 10px; padding: 7px 10px; }
.spot-card-icon { display: grid; width: 35px; height: 35px; flex: 0 0 35px; place-items: center; border: 1px solid rgba(255, 90, 99, 0.3); border-radius: 4px; background: rgba(255, 90, 99, 0.08); color: #ff7b7f; transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.spot-card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.spot-card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.feed-card:hover .spot-card-icon { border-color: rgba(255, 90, 99, 0.65); background: rgba(255, 90, 99, 0.16); color: #ff9a9e; }
.feed-text { display: grid; min-width: 0; gap: 2px; }
.feed-text strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.feed-text small { color: var(--muted); font: 8px "IBM Plex Mono", monospace; }
.feed-list-status { margin: 8px; color: var(--muted); font: 9px "IBM Plex Mono", monospace; }
.feed-arrow { color: var(--cyan); font-size: 15px; }
.side-panel-foot { display: flex; align-items: center; gap: 8px; margin: auto 12px 0; padding: 14px 5px 13px; border-top: 1px solid var(--line); color: var(--muted); font: 9px "IBM Plex Mono", monospace; }
.legend-dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 auto; border: 2px solid rgba(255, 255, 255, 0.78); border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(255, 90, 99, 0.18); }
.legend-dot.tank { border-radius: 2px; background: var(--amber); box-shadow: 0 0 0 3px rgba(237, 198, 110, 0.16); }

.map-panel { position: relative; min-width: 0; min-height: 610px; overflow: hidden; border: 1px solid var(--line); background: #d8e2dc; }
#overview-map { position: absolute; inset: 0; background: #dce5de; }
#overview-map .leaflet-tile { filter: grayscale(1) brightness(0.9) contrast(0.96); }
.map-heading, .map-legend, .map-status { position: absolute; z-index: 500; }
.map-heading { top: 15px; left: 15px; width: calc(100% - 30px); max-width: none; padding: 10px 13px 11px; border: 1px solid rgba(8, 26, 37, 0.16); background: rgba(8, 26, 37, 0.92); box-shadow: 0 6px 22px rgba(8, 26, 37, 0.12); }
.map-heading h1 { margin: 4px 0 0; color: #edf4ef; font-size: 22px; font-weight: 600; line-height: 1.05; }
.map-legend { bottom: 19px; left: 15px; display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 12px; background: rgba(8, 26, 37, 0.92); color: #e2ece7; font: 9px "IBM Plex Mono", monospace; }
.map-legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend-line { width: 18px; height: 3px; background: var(--cyan); box-shadow: 0 0 8px rgba(54, 170, 169, 0.6); }
.map-status { right: 12px; bottom: 12px; padding: 5px 7px; background: rgba(8, 26, 37, 0.86); color: #bed1cd; font: 8px "IBM Plex Mono", monospace; }
.simulation-controls { position: absolute; z-index: 600; right: 50%; bottom: 15px; display: grid; width: min(680px, calc(100% - 340px)); min-width: 440px; gap: 9px; padding: 12px 14px 10px; border: 1px solid rgba(105, 215, 211, 0.46); background: rgba(7, 21, 31, 0.96); box-shadow: 0 10px 30px rgba(8, 26, 37, 0.3); color: var(--text); transform: translateX(50%); }
.simulation-controls[hidden] { display: none; }
.simulation-controls-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--cyan); font: 500 9px "IBM Plex Mono", monospace; }
.simulation-controls-heading output { color: var(--text); font-size: 13px; }
.simulation-timeline { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto auto; align-items: center; gap: 10px; }
.simulation-timeline button, .simulation-timeline select { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 0; color: var(--text); background: var(--panel-raised); font: 500 10px "IBM Plex Mono", monospace; }
.simulation-timeline button:hover:not(:disabled), .simulation-timeline select:hover { border-color: rgba(105, 215, 211, 0.6); color: var(--cyan); }
.simulation-timeline button:disabled, .simulation-timeline input:disabled { cursor: wait; opacity: 0.52; }
.simulation-timeline button:focus-visible, .simulation-timeline select:focus-visible, .simulation-timeline input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.simulation-timeline button svg { width: 15px; height: 15px; fill: currentColor; stroke: currentColor; stroke-linejoin: round; stroke-width: 1.5; }
.simulation-timeline .pause-icon, .simulation-timeline button.is-playing .play-icon { display: none; }
.simulation-timeline button.is-playing .pause-icon { display: block; }
.simulation-timeline input[type="range"] { width: 100%; accent-color: var(--cyan); }
.simulation-speed-label { color: var(--muted); font: 9px "IBM Plex Mono", monospace; }
.simulation-status { min-height: 1.2em; color: var(--muted); font: 8px "IBM Plex Mono", monospace; }
.leaflet-container { font-family: "IBM Plex Mono", monospace; }
.leaflet-control-attribution { font: 9px "IBM Plex Mono", monospace !important; }
.leaflet-control-zoom a { color: #18323b !important; }
.leaflet-marker-icon.asset-map-marker { display: grid; width: 13px !important; height: 13px !important; place-items: center; border: 1.5px solid #f2f4ed !important; border-radius: 50%; background: var(--red) !important; box-shadow: 0 0 0 2px rgba(255, 90, 99, 0.2); transition: filter 140ms ease, box-shadow 140ms ease, outline-color 140ms ease; }
.legend-dot.flood-point { background: #d32f3f; box-shadow: 0 0 0 2px rgba(211, 47, 63, 0.22); }
.leaflet-marker-icon.asset-map-marker.flood-marker { width: 9px !important; height: 9px !important; border: 1px solid rgba(255, 255, 255, 0.95) !important; background: #d32f3f !important; box-shadow: 0 0 0 1px rgba(211, 47, 63, 0.55); }
.leaflet-marker-icon.asset-map-marker.flood-marker:hover, .leaflet-marker-icon.asset-map-marker.flood-marker:focus-visible { z-index: 1000 !important; filter: brightness(1.14); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3); outline: 1px solid rgba(255, 255, 255, 0.75); outline-offset: 2px; }
.leaflet-marker-icon.asset-map-marker span { display: block; line-height: 1; }
.leaflet-marker-icon.asset-map-marker.tank-marker { width: 32px !important; height: 32px !important; border-radius: 4px; background: var(--amber) !important; box-shadow: 0 0 0 6px rgba(237, 198, 110, 0.2), 0 4px 14px rgba(6, 21, 30, 0.35); color: #1b2830; }
.leaflet-tooltip.asset-tooltip { padding: 5px 8px; border: 0; border-radius: 2px; background: rgba(8, 26, 37, 0.94); box-shadow: none; color: #f2f5ef; font: 10px "IBM Plex Mono", monospace; }
.leaflet-tooltip.asset-tooltip::before { display: none; }

.metrics-panel { display: grid; min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr) minmax(0, 2fr) auto; grid-template-areas: "heading heading" "rainfall rainfall" "river tank" "foot foot"; padding-bottom: 11px; }
.metrics-panel > .panel-heading { grid-area: heading; }
.metrics-panel > .rainfall-metric-section { grid-area: rainfall; }
.metrics-panel > .river-metric-section { grid-area: river; }
.metrics-panel > .tank-metric-section { grid-area: tank; }
.metrics-panel > .metrics-foot { grid-area: foot; }
.metrics-panel > .river-metric-section, .metrics-panel > .tank-metric-section { display: flex; flex-direction: column; }
.metrics-panel .panel-heading { padding-bottom: 15px; }
.metrics-signal { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.metrics-signal i { color: var(--amber); }
.metric-section { min-width: 0; min-height: 0; margin: 0 8px; padding: 10px 8px 9px; overflow: auto; border-top: 1px solid var(--line); transition: background-color 160ms ease, box-shadow 160ms ease; }
.metric-section:hover { background: rgba(105, 215, 211, 0.035); box-shadow: inset 2px 0 rgba(105, 215, 211, 0.52); }
.metric-section-link { display: block; color: inherit; text-decoration: none; }
.metric-section-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.metric-section-heading { display: flex; align-items: center; }
.metric-section-heading h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--cyan); font-size: 16px; font-weight: 600; }
.metric-icon { width: 25px; height: 25px; flex: 0 0 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.rainfall-metric-icon { color: #85d8f2; }
.tank-metric-icon { color: var(--amber); }
.rainfall-reading-layout { display: grid; grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1fr); align-items: center; gap: 8px; margin: 2px 0 3px; }
.rainfall-overview-layout { display: grid; min-width: 0; grid-template-columns: minmax(0, 1.2fr) minmax(130px, 0.8fr); align-items: center; gap: 12px; margin: 4px 0 6px; }
.rainfall-accumulation { display: flex; min-width: 0; min-height: 92px; flex-direction: column; justify-content: center; padding-left: 14px; border-left: 1px solid var(--line); }
.rainfall-accumulation-label { color: var(--muted); font: 500 9px "IBM Plex Mono", monospace; text-transform: uppercase; }
.rainfall-accumulation .primary-reading { gap: 5px; margin-top: 7px; }
.rainfall-accumulation .reading-value { color: #85d8f2; font-size: 30px; }
.rainfall-24h-window { display: block; min-height: 1.3em; margin-top: 6px; color: var(--muted); font: 8px/1.3 "IBM Plex Mono", monospace; }
.rainfall-gauge { display: block; width: min(100%, 132px); overflow: visible; }
.rainfall-gauge-track, .rainfall-gauge-value { fill: none; stroke-linecap: round; stroke-width: 8; }
.rainfall-gauge-track { stroke: rgba(163, 202, 212, 0.16); }
.rainfall-gauge-value { stroke: url(#rainfall-gauge-gradient); filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.72)); transition: stroke-dasharray 420ms ease; }
.rainfall-gauge-needle { fill: #f2f4ed; stroke: #f2f4ed; stroke-linecap: round; stroke-width: 2.5; transition: transform 420ms ease; }
.rainfall-gauge-needle circle { stroke: var(--panel); stroke-width: 2; }
.rainfall-gauge-scale-end { fill: var(--muted); font: 7px "IBM Plex Mono", monospace; }
.rainfall-reading-stack, .tank-reading-stack { min-width: 0; }
.rainfall-reading-stack .primary-reading, .tank-reading-stack .primary-reading { margin-top: 0; }
.rainfall-average-label { display: block; margin-top: 5px; color: var(--muted); font: 8px/1.3 "IBM Plex Mono", monospace; }
.river-profile-summary { display: grid; min-height: 0; flex: 1; grid-template-rows: auto auto minmax(0, 1fr); gap: 7px; margin-top: 9px; }
.river-profile-heading { display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.river-profile-title { color: var(--text); font-size: 13px; font-weight: 600; }
.river-profile-coverage { flex: 0 0 auto; padding-bottom: 2px; color: var(--text); font: 500 10px "IBM Plex Mono", monospace; }
.river-profile-chart-scale { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font: 8px "IBM Plex Mono", monospace; }
.river-profile-chart-layout { display: grid; min-height: 0; grid-template-columns: 27px minmax(0, 1fr); align-items: stretch; gap: 3px; }
.river-profile-y-axis { display: flex; flex-direction: column; justify-content: space-between; padding: 1px 0 15px; color: var(--muted); font: 7px "IBM Plex Mono", monospace; text-align: right; }
.river-profile-chart { display: grid; min-width: 0; min-height: 0; height: 100%; grid-template-rows: minmax(0, 1fr); grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 2px; }
.river-profile-row { display: grid; min-width: 0; height: 100%; grid-template-rows: 11px minmax(70px, 1fr) 13px; justify-items: center; gap: 3px; }
.river-profile-station { width: 100%; overflow: hidden; color: var(--muted); font: 7px "IBM Plex Mono", monospace; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.river-profile-track { position: relative; display: block; align-self: center; width: 12px; height: 70%; min-height: 70px; overflow: hidden; border: 1px solid rgba(105, 215, 211, 0.18); border-radius: 5px; background: rgba(105, 215, 211, 0.07); }
.river-profile-bar { position: absolute; right: 0; bottom: 0; left: 0; display: block; height: 0; border-radius: 3px; background: linear-gradient(0deg, #72d9c0, #e7cf76); transition: height 360ms ease; }
.river-profile-percent { width: 100%; color: var(--text); font: 7px "IBM Plex Mono", monospace; text-align: center; white-space: nowrap; }
.river-profile-caption { margin-bottom: 6px; font-size: 10px; }
.primary-reading { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; }
.reading-value { color: #f0f4ed; font: 500 36px "IBM Plex Mono", monospace; line-height: 1; }
.reading-unit { color: var(--muted); font: 10px "IBM Plex Mono", monospace; }
.reading-caption { margin: 5px 0 10px; color: var(--muted); font-size: 12px; }
.metric-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid rgba(163, 202, 212, 0.09); color: #a9bec0; font-size: 12px; }
.metric-row strong { color: var(--text); font: 500 12px "IBM Plex Mono", monospace; text-align: right; }
.metric-row small { color: var(--muted); font-size: 9px; font-weight: 400; }
.data-status { margin: 7px 0 0; color: var(--subtle); font: 8px "IBM Plex Mono", monospace; text-transform: uppercase; }
.data-status.is-live { color: #72d0a5; }
.data-status.is-unavailable { color: var(--amber); }
.data-status.is-stale { color: var(--amber); }
.data-status.is-partial { color: var(--amber); }
.rainfall-metric-section .metric-row { padding-top: 6px; padding-bottom: 6px; }
.tank-metric-section .reading-value { color: var(--amber); }
.tank-reading-layout { display: grid; min-height: 0; flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 10px; margin: 7px 0 0; }
.tank-gauge-column { display: grid; min-width: 0; grid-template-rows: auto minmax(0, 1fr); gap: 5px; }
.tank-gauge-heading { color: var(--muted); font: 500 9px "IBM Plex Mono", monospace; text-transform: uppercase; }
.tank-gauge-body { display: grid; min-width: 0; height: 100%; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 5px; }
.tank-level-gauge { display: grid; height: 100%; justify-items: center; grid-template-rows: auto minmax(74px, 1fr) auto; gap: 2px; }
.tank-range-label { color: var(--muted); font: 7px "IBM Plex Mono", monospace; line-height: 1; }
.tank-gauge-vessel { position: relative; display: block; align-self: center; width: 26px; height: 70%; min-height: 74px; overflow: hidden; border: 2px solid #95b8c1; border-radius: 10px 10px 5px 5px; background: rgba(105, 215, 211, 0.04); box-shadow: inset 0 0 0 2px rgba(4, 15, 23, 0.28), 0 0 12px rgba(105, 215, 211, 0.08); }
.tank-gauge-fill { position: absolute; right: 2px; bottom: 2px; left: 2px; height: 0; border-radius: 3px 3px 2px 2px; background: linear-gradient(180deg, rgba(91, 204, 232, 0.86), rgba(46, 150, 192, 0.58)); transition: height 420ms ease; }
.tank-gauge-fill::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: #c0f4fa; content: ""; opacity: 0.9; }
.predicted-tank-gauge .tank-gauge-vessel { border-color: rgba(237, 198, 110, 0.8); }
.predicted-tank-gauge .tank-gauge-fill { background: linear-gradient(180deg, rgba(237, 198, 110, 0.9), rgba(214, 133, 64, 0.68)); }
.predicted-tank-gauge .tank-gauge-fill::before { background: #fff0bd; }
.tank-reading-stack .primary-reading { gap: 3px; white-space: nowrap; }
.tank-reading-stack .reading-value { font-size: 20px; }
.tank-reading-stack .reading-unit { font-size: 8px; }
.tank-range-percent { display: block; margin-top: 5px; color: var(--cyan); font: 7px "IBM Plex Mono", monospace; }
.predicted-tank-gauge-column .tank-range-percent { color: var(--amber); }
.pump-status-row { align-items: center; min-height: 43px; }
.pump-status-display { display: flex; align-items: center; gap: 8px; }
.pump-status-display > strong { min-width: 25px; color: var(--text); font: 500 10px "IBM Plex Mono", monospace; text-align: right; }
.pump-icons { display: flex; align-items: center; gap: 3px; }
.pump-icon { width: 21px; height: 24px; overflow: visible; color: #607781; transition: color 180ms ease, filter 180ms ease; }
.pump-icon .pump-body { fill: rgba(96, 119, 129, 0.12); stroke: currentColor; stroke-linejoin: round; stroke-width: 1.7; }
.pump-icon .pump-detail { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.pump-icon.is-operating { color: var(--cyan); filter: drop-shadow(0 0 4px rgba(105, 215, 211, 0.55)); }
.pump-icon.is-operating .pump-body { fill: rgba(105, 215, 211, 0.36); }
.metrics-foot { display: flex; justify-content: space-between; gap: 8px; margin: 11px 14px 0; padding-top: 9px; border-top: 1px solid var(--line); color: var(--subtle); font: 8px "IBM Plex Mono", monospace; }

@media (min-width: 1051px) and (max-height: 1100px) {
    .overview-shell { height: 100vh; min-height: 0; }
    .overview-header { min-height: 58px; flex: 0 0 58px; }
    .overview-grid { height: calc(100vh - 72px); min-height: 0; flex: 1 1 auto; grid-template-columns: clamp(220px, min(calc(59.26vh - 152.7px), calc(35vw - 175px)), 420px) minmax(200px, 1fr) clamp(360px, min(calc(120vh - 200px), calc(70vw - 250px)), 760px); grid-template-rows: minmax(0, 1fr); gap: 8px; padding: 8px; }
    .side-panel, .map-panel { min-height: 0; }
    .surveillance-panel .panel-heading { padding: 10px 12px 6px; }
    .surveillance-panel .panel-heading h2, .metrics-panel .panel-heading h2 { font-size: 20px; }
    .surveillance-panel .feed-list { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 0 8px; }
    .surveillance-panel .feed-caption { min-height: 34px; gap: 6px; padding: 3px 4px; }
    .surveillance-panel .spot-card-icon { width: 25px; height: 25px; flex-basis: 25px; }
    .surveillance-panel .spot-card-icon svg { width: 16px; height: 16px; }
    .surveillance-panel .feed-text strong { font-size: 12px; }
    .surveillance-panel .feed-text small { font-size: 7px; }
    .side-panel-foot { margin-right: 8px; margin-left: 8px; padding: 7px 3px; }
    .map-panel { min-height: 0; }
    .metrics-panel { min-height: 0; padding-bottom: 5px; }
    .metrics-panel { grid-template-rows: auto minmax(0, 1fr) minmax(0, 2fr) auto; }
    .metrics-panel .panel-heading { padding: 11px 13px 5px; }
    .metrics-signal { width: 20px; height: 20px; }
    .metric-section { margin: 0 5px; padding: 6px 5px 4px; }
    .metric-section-heading h3 { gap: 6px; font-size: 14px; }
    .metric-icon { width: 20px; height: 20px; flex-basis: 20px; }
    .rainfall-reading-layout { grid-template-columns: minmax(80px, 0.75fr) minmax(0, 1fr); gap: 5px; margin: 0; }
    .rainfall-overview-layout { grid-template-columns: minmax(0, 1.2fr) minmax(105px, 0.8fr); gap: 6px; }
    .rainfall-accumulation { min-height: 72px; padding-left: 8px; }
    .rainfall-accumulation .reading-value { font-size: 25px; }
    .rainfall-24h-window { font-size: 7px; }
    .rainfall-gauge { width: min(100%, 108px); }
    .rainfall-reading-stack .reading-value { font-size: 27px; }
    .rainfall-average-label { font-size: 7px; }
    .metric-row { padding: 4px 0; font-size: 10px; }
    .metric-row strong { font-size: 10px; }
    .data-status { margin-top: 4px; font-size: 7px; }
    .river-profile-summary { gap: 5px; margin-top: 5px; }
    .river-profile-title { font-size: 11px; }
    .river-profile-coverage, .river-profile-chart-scale { font-size: 7px; }
    .river-profile-row { grid-template-rows: 9px minmax(48px, 1fr) 11px; gap: 2px; }
    .river-profile-track { width: 10px; min-height: 48px; }
    .river-profile-percent, .river-profile-station { font-size: 6px; }
    .river-profile-caption, .reading-caption { margin: 3px 0 5px; font-size: 9px; }
    .tank-reading-layout { gap: 5px; margin-top: 4px; }
    .tank-gauge-column { gap: 3px; }
    .tank-gauge-heading { font-size: 8px; }
    .tank-gauge-body { grid-template-columns: 30px minmax(0, 1fr); gap: 3px; }
    .tank-level-gauge { grid-template-rows: auto minmax(54px, 1fr) auto; gap: 1px; }
    .tank-gauge-vessel { width: 22px; min-height: 54px; }
    .tank-range-label { font-size: 6px; }
    .tank-reading-stack .reading-value { font-size: 17px; }
    .tank-reading-stack .reading-unit { font-size: 7px; }
    .tank-range-percent { margin-top: 3px; font-size: 6px; }
    .pump-status-row { min-height: 34px; }
    .pump-icon { width: 18px; height: 21px; }
    .pump-status-display { gap: 5px; }
    .metrics-foot { margin-top: 5px; padding-top: 5px; }
}

@media (min-width: 1500px) and (min-height: 1101px) {
    .overview-grid { grid-template-columns: minmax(320px, 1.08fr) minmax(200px, 1fr) minmax(380px, 1.25fr); }
}

@media (max-width: 1050px) {
    .overview-grid { grid-template-columns: minmax(260px, 0.95fr) minmax(200px, 1.05fr); }
    .metrics-panel { grid-column: 1 / -1; min-height: 480px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr) minmax(0, 2fr) auto; align-items: stretch; }
    .metrics-panel > .panel-heading { grid-column: 1 / -1; }
    .metrics-panel > .metric-section { margin-top: 0; }
    .metrics-foot { grid-column: 1 / -1; }
    .map-panel { min-height: 600px; }
}

@media (max-width: 700px) {
    .overview-header { min-height: 62px; gap: 10px; padding: 0 12px; }
    .overview-brand { flex: 1 1 auto; gap: 9px; }
    .overview-brand img { width: 74px; }
    .brand-rule { height: 27px; }
    .brand-title { font-size: 8px; }
    .brand-title strong { max-width: 140px; font-size: 13px; line-height: 1.05; }
    .overview-mode-switch { position: static; flex: 0 0 auto; margin-left: auto; transform: none; }
    .overview-mode-switch button { min-height: 30px; padding: 5px 8px; font-size: 9px; }
    .system-status { display: none; }
    .overview-grid { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
    .map-panel { order: 0; min-height: 58vh; min-height: max(440px, 58svh); }
    .metrics-panel { order: 1; display: flex; min-height: 0; }
    .metrics-panel > .metric-section { margin-right: 12px; margin-left: 12px; overflow: visible; }
    .rainfall-overview-layout { grid-template-columns: 1fr; gap: 8px; }
    .rainfall-reading-layout { grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1fr); }
    .rainfall-accumulation { min-height: 0; padding: 8px 0 0; border-top: 1px solid var(--line); border-left: 0; }
    .surveillance-panel { order: 2; }
    .feed-list { max-height: none; grid-template-columns: 1fr; }
    .side-panel-foot { margin-top: 9px; }
    .map-heading { top: 10px; left: 10px; padding: 8px 10px; }
    .map-heading h1 { font-size: 18px; }
    .map-legend { right: 9px; bottom: 28px; left: 9px; gap: 8px 12px; padding: 8px; font-size: 8px; }
    .map-status { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

.overview-shell.is-design-mode { height: 100vh; min-height: 0; }
.overview-grid.is-design-mode { min-height: 0; flex: 1 1 0; grid-template-columns: minmax(0, 1fr) 220px; grid-template-rows: minmax(0, 1fr); padding: 8px; }
.overview-grid.is-design-mode > .side-panel { display: none; }
.overview-grid.is-design-mode > .map-panel { width: 100%; height: 100%; min-height: 0; grid-column: 1; grid-row: 1; }
.overview-grid.is-design-mode .map-legend { gap: 12px; }
.overview-grid.is-design-mode .map-status { display: none; }
.simulation-depth-panel[hidden] { display: none; }
.simulation-depth-panel { display: flex; min-width: 0; min-height: 0; grid-column: 2; grid-row: 1; flex-direction: column; gap: 14px; padding: 16px 14px; border: 1px solid var(--line); background: linear-gradient(155deg, rgba(16, 43, 57, 0.96), rgba(8, 26, 37, 0.98)); }
.depth-panel-heading { padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.depth-panel-heading h2 { margin: 5px 0 0; color: var(--text); font-size: 20px; font-weight: 600; line-height: 1; }
.simulation-case-picker { display: grid; gap: 5px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.simulation-case-picker label { color: var(--muted); font: 8px "IBM Plex Mono", monospace; }
.simulation-case-picker select { width: 100%; min-height: 34px; padding: 5px 7px; border: 1px solid rgba(163, 202, 212, 0.24); border-radius: 0; color: var(--text); background: var(--panel-deep); font: 10px "IBM Plex Mono", monospace; }
.simulation-case-picker select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.simulation-case-picker select:disabled { color: var(--muted); }
.simulation-case-picker option:disabled { color: var(--subtle); }
.simulation-case-picker span { color: var(--muted); font: 7px "IBM Plex Mono", monospace; line-height: 1.35; }
.simulation-mitigation-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.simulation-mitigation-picker > span { grid-column: 1 / -1; color: var(--muted); font: 8px "IBM Plex Mono", monospace; }
.simulation-mitigation-picker button { min-width: 0; min-height: 31px; padding: 4px 5px; border: 1px solid rgba(163, 202, 212, 0.24); border-radius: 0; color: var(--muted); background: var(--panel-deep); font: 500 7px "IBM Plex Mono", monospace; cursor: pointer; }
.simulation-mitigation-picker button[aria-pressed="true"] { border-color: rgba(105, 215, 211, 0.5); color: var(--cyan); background: rgba(105, 215, 211, 0.12); }
.simulation-mitigation-picker button:disabled { color: var(--subtle); cursor: not-allowed; opacity: 0.58; }
.simulation-mitigation-picker button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.simulation-mitigation-picker small { grid-column: 1 / -1; color: var(--subtle); font: 6px "IBM Plex Mono", monospace; }
.simulation-mitigation-picker small[hidden] { display: none; }
.depth-frame-reading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.depth-frame-reading > span { color: var(--muted); font: 500 9px "IBM Plex Mono", monospace; }
.depth-frame-reading strong { display: flex; align-items: baseline; gap: 4px; color: #f0f4ed; font: 500 21px/1 "IBM Plex Mono", monospace; }
.depth-frame-reading strong small { color: var(--muted); font: 9px "IBM Plex Mono", monospace; }
.depth-scale { display: flex; min-height: 0; flex: 1; flex-direction: column; align-items: center; gap: 7px; }
.depth-scale-maximum, .depth-scale-minimum { display: inline-flex; align-items: baseline; gap: 3px; color: var(--text); font: 500 10px "IBM Plex Mono", monospace; }
.depth-scale-maximum small, .depth-scale-minimum small { color: var(--muted); font-size: 8px; }
.depth-scale-track { position: relative; display: block; width: 100%; min-height: 220px; flex: 1; }
.depth-scale-ticks { position: absolute; top: 0; bottom: 0; left: 0; width: calc(50% - 12px); color: var(--muted); font: 7px "IBM Plex Mono", monospace; text-align: right; }
.depth-scale-ticks span { position: absolute; right: 0; white-space: nowrap; }
.depth-scale-bar { position: absolute; top: 0; left: 50%; width: 18px; height: 100%; border: 1px solid rgba(231, 240, 238, 0.24); background: linear-gradient(0deg, rgba(255, 229, 0, 0) 0%, #ffe500 10%, #00c924 15%, #2d6ff5 30%, #c200e8 60%, #ef7579 100%); transform: translateX(-50%); }
.depth-frame-marker { position: absolute; z-index: 1; top: 100%; right: -5px; left: -5px; height: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(8, 26, 37, 0.72), 0 0 9px rgba(255, 255, 255, 0.9); transform: translateY(-50%); transition: top 120ms linear; }
.depth-frame-marker::after { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #102b39; box-shadow: 0 0 8px rgba(8, 26, 37, 0.8); content: ""; transform: translate(-50%, -50%); }
.depth-frame-marker > span { position: absolute; top: 50%; left: calc(100% + 7px); display: inline-flex; min-height: 15px; align-items: center; padding: 2px 4px; border: 1px solid rgba(8, 26, 37, 0.82); color: #081a25; background: #fff; box-shadow: 0 1px 5px rgba(8, 26, 37, 0.45); font: 700 7px/1 "IBM Plex Mono", monospace; transform: translateY(-50%); }

@media (max-width: 1050px) {
    .simulation-controls { right: 50%; width: min(680px, calc(100% - 28px)); min-width: 0; transform: translateX(50%); }
}

@media (max-width: 700px) {
    .overview-shell.is-design-mode { height: 100svh; }
    .overview-grid.is-design-mode { display: grid; height: auto; min-height: 0; flex: 1 1 0; grid-template-columns: minmax(0, 1fr) 116px; grid-template-rows: minmax(0, 1fr); gap: 6px; padding: 6px; }
    .overview-grid.is-design-mode > .map-panel { height: 100%; min-height: 0; flex: initial; }
    .overview-grid.is-design-mode > .simulation-depth-panel { min-height: 0; gap: 9px; padding: 10px 8px; }
    .depth-panel-heading { padding-bottom: 8px; }
    .depth-panel-heading h2 { font-size: 15px; }
    .depth-panel-heading .section-index { font-size: 7px; }
    .simulation-case-picker { gap: 4px; padding-bottom: 7px; }
    .simulation-case-picker label, .simulation-case-picker span { font-size: 6px; }
    .simulation-case-picker select { min-height: 30px; padding: 4px 5px; font-size: 7px; }
    .simulation-mitigation-picker { gap: 3px; padding-bottom: 7px; }
    .simulation-mitigation-picker > span { font-size: 6px; }
    .simulation-mitigation-picker button { min-height: 28px; padding: 3px 2px; font-size: 5px; }
    .simulation-mitigation-picker small { font-size: 5px; }
    .depth-frame-reading { gap: 4px; padding-bottom: 8px; }
    .depth-frame-reading > span { font-size: 5px; }
    .depth-frame-reading strong { gap: 2px; font-size: 11px; }
    .depth-frame-reading strong small { font-size: 6px; }
    .depth-scale { gap: 5px; }
    .depth-scale-track { min-height: 150px; }
    .depth-scale-bar { width: 14px; }
    .depth-frame-marker > span { left: calc(100% + 4px); padding-right: 3px; padding-left: 3px; }
    .depth-scale-ticks { font-size: 6px; }
    .depth-scale-maximum, .depth-scale-minimum { font-size: 8px; }
    .overview-grid.is-design-mode .map-legend { right: 8px; bottom: 112px; left: 8px; gap: 7px 10px; padding: 7px 8px; font-size: 7px; }
    .overview-grid.is-design-mode .map-legend span { gap: 5px; }
    .simulation-controls { right: 50%; bottom: 8px; width: calc(100% - 16px); gap: 7px; padding: 9px 10px 8px; transform: translateX(50%); }
    .simulation-timeline { grid-template-columns: auto minmax(30px, 1fr) auto auto; gap: 6px; }
    .simulation-timeline button, .simulation-timeline select { min-height: 31px; padding: 4px 6px; font-size: 8px; }
    .simulation-speed-label { font-size: 8px; }
    .simulation-controls-heading output { font-size: 11px; }
    .simulation-status { font-size: 7px; }
}

@media (max-width: 400px) {
    .overview-header { padding-right: 8px; padding-left: 8px; }
    .overview-brand { gap: 6px; }
    .overview-brand img { width: 46px; }
    .site-brand-rule { height: 24px; }
    .brand-title { font-size: 7px; }
    .brand-title strong { max-width: 84px; font-size: 11px; }
    .overview-mode-switch { gap: 1px; padding: 2px; }
    .overview-mode-switch button { min-height: 28px; padding: 4px 6px; font-size: 8px; }
    .overview-grid.is-design-mode { grid-template-columns: minmax(0, 1fr) 104px; }
    .overview-grid.is-design-mode > .simulation-depth-panel { padding-right: 6px; padding-left: 6px; }
    .depth-scale-bar { width: 12px; }
    .simulation-timeline { grid-template-columns: auto minmax(20px, 1fr) auto auto; gap: 4px; }
    .simulation-timeline button span { font-size: 8px; }
    .simulation-speed-label { font-size: 7px; }
}