:root {
    color-scheme: light;
}
body.hydro-interface {
    background: var(--bg);
    font-family: var(--font-family), "Segoe UI", sans-serif;
    font-size: var(--font-size, 16px);
    color: var(--ink);
}
.hydro-interface * {
    box-sizing: border-box;
}
.hydro-interface .workspace {
    background: var(--bg);
}
.hydro-interface .sidebar {
    background: #fff;
    color: var(--ink);
    border-right: 1px solid #dce6ee;
    box-shadow: none;
}
.hydro-interface .brand {
    color: #0b3c5d;
}
.hydro-interface .brand small,
.hydro-interface .sidebar-bottom {
    color: var(--muted);
}
.hydro-interface .nav-item {
    color: var(--muted);
    min-height: 48px;
    border-radius: 10px;
    margin: 3px 14px;
}
.hydro-interface .nav-item.active {
    background: #e6f3f5;
    color: var(--teal);
    box-shadow: none;
    border: none;
}
.hydro-interface .topbar {
    background: #fff;
    border-bottom: 1px solid #dce6ee;
    box-shadow: none;
    min-height: 76px;
}
.hydro-interface #content {
    padding: 28px 32px;
    max-width: 1900px;
    margin: auto;
}
.hydro-interface .page-head h1 {
    font-size: 28px;
    letter-spacing: -0.8px;
    font-weight: 700;
    color: #0b3c5d;
}
.hydro-interface .page-head p {
    font-size: 14px;
    line-height: 1.7;
}
.hydro-interface .card,
.hydro-interface .analysis-trend,
.hydro-interface .data-context,
.hydro-interface .fleet-comparison {
    background: #fff;
    border: 1px solid #dce6ee;
    border-radius: 16px;
    box-shadow: 0 3px 14px #0f2a3d04;
    backdrop-filter: none;
}
.hydro-interface .card-title h2,
.hydro-interface .analysis-heading h2 {
    font-size: 18px;
    color: #0b3c5d;
}
.hydro-interface .btn,
.hydro-interface .form-control,
.hydro-interface .icon-button,
.hydro-interface .segments button,
.hydro-interface .tab {
    min-height: 44px;
}
.hydro-interface .btn {
    border-radius: 9px;
    font-weight: 600;
    box-shadow: none;
}
.hydro-interface .form-control {
    background: #fff;
    color: var(--ink);
    font-size: 14px;
}
.hydro-interface :focus-visible {
    outline: 3px solid #0e7c8f;
    outline-offset: 3px;
}
.hydro-interface .badge {
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: normal;
    line-height: 1.5;
}
.hydro-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.hydro-interface .badge.level-null {
    background: repeating-linear-gradient(
        135deg,
        #f0f3f5,
        #f0f3f5 5px,
        #e5eaee 5px,
        #e5eaee 7px
    );
    color: #52616e;
}
.hydro-interface .badge.estimated {
    border: 1px dashed #0e7c8f;
    background: #fff;
    color: #0e7c8f;
}
.hydro-interface .badge.measured {
    background: #e6f3f5;
    color: #0b6473;
}
.hydro-interface .ioc-summary,
.hydro-interface .ioc-station-rail {
    display: none;
}
.hydro-interface .river-observatory.ioc-console {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(380px, 2fr);
    gap: 24px;
    align-items: start;
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 24px;
    box-shadow: none;
}
.hydro-interface .river-observatory-map {
    border: 1px solid #dce6ee;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
}
.hydro-interface .station-instrument {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--ink);
    box-shadow: none;
    border-radius: 0;
}
.hydro-interface .station-instrument h2 {
    font-size: 20px;
    color: #0b3c5d;
    margin: 20px 0 12px;
}
.hydro-interface .instrument-top {
    display: none;
}
.hydro-interface .instrument-selector {
    margin: 0 0 12px;
}
.hydro-interface .instrument-source {
    color: var(--muted);
    font-size: 13px;
    margin: 12px 0;
}
.hydro-interface .instrument-readings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.hydro-interface .metric.hydro-metric {
    padding: 14px 12px;
    background: #fff;
    min-height: 157px;
    border: 1px solid #dce6ee;
    border-radius: 12px;
    box-shadow: none;
    color: var(--ink);
}
.hydro-interface .hydro-metric.estimated {
    border-style: dashed;
}
.hydro-interface .metric .metric-label {
    color: var(--muted);
    font-size: 13px;
}
.hydro-interface .metric .metric-value {
    font-size: 28px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.hydro-interface .metric small {
    color: var(--muted);
}
.hydro-interface .metric-source {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #526a7c;
}
.hydro-interface .metric-quality {
    display: block;
    line-height: 1.5;
    font-size: 12px;
}
.metric-spark {
    display: block;
    width: 100%;
    height: 30px;
    margin-top: 6px;
    color: #0e7c8f;
}
.spark-empty {
    display: block;
    font-size: 11px;
    color: #6b7a88;
    margin-top: 8px;
}
.hydro-interface .instrument-provenance {
    border-top: 1px solid #dce6ee;
    color: var(--muted);
    margin-top: 16px;
    font-size: 12px;
}
.hydro-interface .instrument-provenance strong {
    color: var(--ink);
    font-size: 13px;
}
.hydro-interface .instrument-detail {
    width: 100%;
    margin-top: 16px;
    background: #e6f3f5;
    color: #0e7c8f;
}
.hydro-hero {
    padding: 23px 24px;
    background: #fff;
    border: 1px solid #dce6ee;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}
.hydro-hero:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: #0e7c8f;
}
.hydro-hero.level-null:before {
    background: #6b7a88;
}
.hydro-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--muted);
    margin-bottom: 12px;
}
.hydro-hero > .badge {
    font-size: 19px;
    background: transparent !important;
    padding: 0;
}
.hydro-hero > .badge svg {
    width: 28px;
    height: 28px;
}
.hydro-hero p {
    font-size: 14px;
    line-height: 1.7;
    margin: 12px 0;
    color: var(--muted);
}
.hydro-hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.freshness {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
}
.freshness .hydro-icon {
    width: 15px;
    height: 15px;
}
.freshness.fresh {
    color: #146b96;
}
.freshness.aging {
    color: #916306;
}
.freshness.missing {
    color: #6b7a88;
}
.mode-chip {
    background: #edf3f6;
    color: #526a7c;
    font-size: 11px;
    padding: 4px 7px;
    border-radius: 5px;
}
.hydro-hero a {
    font-size: 12px;
    color: #0e7c8f;
    display: inline-block;
    margin-top: 13px;
}
.hydro-hero .trial-note {
    font-size: 12px;
    color: #916306;
}
.hydro-schematic {
    margin-bottom: 24px;
    padding: 24px;
}
.river-line {
    display: flex;
    position: relative;
    gap: 10px;
    margin-top: 24px;
}
.river-line:before {
    content: "";
    height: 8px;
    position: absolute;
    top: 24px;
    left: 8%;
    right: 8%;
    background: #d7edf0;
    border-radius: 99px;
}
.river-node {
    flex: 1;
    position: relative;
    background: transparent;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    color: var(--ink);
    cursor: pointer;
    min-width: 0;
}
.river-node strong {
    font-size: 14px;
}
.river-node small {
    font-size: 11px;
    color: var(--muted);
}
.node-symbol {
    width: 52px;
    height: 52px;
    border: 2px solid #6b7a88;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #6b7a88;
    background: white;
}
.estimated .node-symbol {
    border-style: dashed;
}
.river-node.selected .node-symbol {
    box-shadow: 0 0 0 5px #0e7c8f12;
}
.node-symbol.level-0 {
    border-color: #1e8e5a;
    color: #1e8e5a;
}
.node-symbol.level-1 {
    border-color: #b7840b;
    color: #b7840b;
}
.node-symbol.level-2 {
    border-color: #e8710a;
    color: #e8710a;
}
.node-symbol.level-3 {
    border-color: #d6453d;
    color: #d6453d;
}
.node-symbol.level-4 {
    border-color: #b3121f;
    color: #b3121f;
}
.hydro-interface .river-analysis {
    gap: 24px;
    margin-bottom: 24px;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
}
.hydro-interface .analysis-trend,
.hydro-interface .data-context {
    padding: 24px;
}
.hydro-interface .analysis-heading p {
    font-size: 13px;
}
.hydro-interface .public-guidance {
    display: none;
}
.hydro-interface .geographic-marker .signal-ring,
.hydro-interface .live-dot,
.hydro-interface .dot {
    animation: none !important;
}
.hydro-interface .geographic-marker .signal-ring {
    display: none;
}
.hydro-interface.station-pulse-enabled
    .geographic-marker.emergency
    .signal-ring:first-child {
    display: block;
    animation: hydro-emergency 2s ease-out infinite !important;
}
.hydro-interface .geographic-marker.estimated > span {
    background: white;
    color: var(--point-color);
    border: 2px dashed var(--point-color);
}
.hydro-interface .geographic-marker.measured > span {
    background: var(--point-color);
    color: white;
    border: 2px solid white;
}
.hydro-interface .geographic-marker.signal-offline > span {
    background: repeating-linear-gradient(
        135deg,
        #f0f3f5,
        #f0f3f5 3px,
        #dae1e6 3px,
        #dae1e6 5px
    );
    color: #6b7a88;
    border-color: #6b7a88;
}
.hydro-interface .geographic-marker b {
    background: white;
    color: #0f2a3d;
    box-shadow: 0 2px 7px #0f2a3d16;
    font-size: 12px;
}
.guide-levels {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}
.guide-levels p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
}
.gate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.gate-item {
    border: 1px solid #dce6ee;
    padding: 20px;
    border-radius: 12px;
}
.gate-item h2 {
    font-size: 17px;
    margin: 16px 0 10px;
}
.gate-item p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
}
.coverage-calendar {
    margin-bottom: 24px;
}
.coverage-months {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px 0;
}
.coverage-months strong {
    font-size: 13px;
}
.coverage-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 10px;
}
.coverage-days span {
    font-size: 11px;
    display: grid;
    place-items: center;
    min-height: 24px;
    border-radius: 4px;
}
.covered {
    background: #d9eef0;
    color: #075c6b;
}
.uncovered {
    background: #f2f5f7;
    color: #82919b;
}
.hydro-interface code,
.hydro-interface pre,
.hydro-interface .code-box {
    font-family: "JetBrains Mono", monospace;
}
.hydro-interface table {
    font-size: 14px;
}
.hydro-interface td,
.hydro-interface th {
    padding: 14px 16px;
}
.hydro-public-nav {
    display: none;
}
.hydro-interface.public-view .sidebar {
    display: none;
}
.hydro-interface.public-view .workspace {
    margin-left: 0;
}
.hydro-interface.public-view .hydro-public-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    font-size: 14px;
}
.hydro-public-nav a {
    color: #526a7c;
    font-weight: 500;
    padding: 12px 0;
}
.hydro-public-nav .public-brand {
    font-size: 18px;
    font-weight: 700;
    color: #0b3c5d;
    margin-right: auto;
    max-width: 380px;
    line-height: 1.35;
}
.hydro-interface.public-view #breadcrumb,
.hydro-interface.public-view #menu-button {
    display: none;
}
.hydro-interface.public-view .topbar {
    padding: 14px 32px;
    gap: 24px;
}
.hydro-interface.public-view #content {
    max-width: 1580px;
}
.hydro-interface .notice {
    font-size: 14px;
    line-height: 1.7;
}
.evidence-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 20px 0;
}
.evidence-step {
    border: 1px solid #dce6ee;
    padding: 16px;
    border-radius: 10px;
}
.evidence-step summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
}
.evidence-step pre {
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #f4f8fb;
    padding: 12px;
}
.hydro-interface footer {
    font-size: 12px;
}
.hydro-interface .level-4 .node-symbol {
    animation: hydro-emergency 2s infinite;
}
@keyframes hydro-emergency {
    0% {
        box-shadow: 0 0 0 0 #b3121f30;
    }
    100% {
        box-shadow: 0 0 0 12px #b3121f00;
    }
}
@media (min-width: 1550px) {
    .hydro-interface .river-observatory-map #geographic-map {
        min-height: 640px;
    }
}
@media (max-width: 1200px) {
    .hydro-interface .instrument-readings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hydro-interface .river-observatory.ioc-console {
        grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
        gap: 18px;
    }
    .hydro-interface.public-view .hydro-public-nav {
        gap: 12px;
    }
    .hydro-public-nav .public-brand {
        font-size: 15px;
        max-width: 260px;
    }
    .coverage-months {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .hydro-interface #content {
        padding: 20px 16px;
    }
    .hydro-interface .river-observatory.ioc-console,
    .hydro-interface .river-analysis {
        grid-template-columns: 1fr;
    }
    .hydro-interface .station-instrument {
        grid-row: 1;
    }
    .hydro-interface .instrument-readings {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .hydro-interface.public-view .topbar {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    .hydro-interface.public-view .hydro-public-nav {
        flex-wrap: wrap;
    }
    .hydro-public-nav .public-brand {
        max-width: none;
        flex-basis: 100%;
    }
    .hydro-interface.public-view .topbar-right {
        position: absolute;
        right: 16px;
        top: 14px;
    }
    .hydro-interface .page-head h1 {
        font-size: 24px;
    }
    .river-line {
        overflow-x: auto;
        padding-bottom: 14px;
    }
    .river-node {
        min-width: 130px;
    }
    .coverage-months,
    .gate-grid,
    .evidence-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 520px) {
    .hydro-interface .instrument-readings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hydro-interface .hydro-hero {
        padding: 20px;
    }
    .hydro-interface .page-head {
        align-items: flex-start;
        gap: 14px;
    }
    .hydro-interface .page-head > .btn {
        font-size: 12px;
        padding: 8px;
    }
    .coverage-months,
    .gate-grid,
    .evidence-steps {
        grid-template-columns: 1fr;
    }
    .hydro-interface .card {
        padding: 18px;
    }
    .hydro-interface .analysis-heading {
        flex-wrap: wrap;
        gap: 12px;
    }
    .hydro-interface .account-name {
        display: none;
    }
    .hydro-interface.public-view .hydro-public-nav a:not(.public-brand) {
        font-size: 12px;
    }
    .hydro-public-nav .public-brand {
        padding-right: 90px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .hydro-interface *,
    .hydro-interface *:before,
    .hydro-interface *:after {
        animation: none !important;
        transition: none !important;
    }
}

.hydro-interface .instrument-readings .metric-icon {
    display: grid;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    margin-bottom: 8px;
}
.hydro-interface .instrument-readings .metric-icon svg {
    width: 18px;
    height: 18px;
}
.hydro-interface .metric-unit,
.hydro-interface .metric-note {
    color: var(--muted);
    font-size: 12px;
}
.hydro-interface .instrument-selector .form-control {
    background: white;
    color: var(--ink);
    border-color: #dce6ee;
    font-size: 14px;
}
.hydro-interface .river-header h3 {
    font-size: 20px;
}
.hydro-interface .river-canvas #geographic-map {
    border-radius: 0;
    border: none;
}
.hydro-interface .signal-help {
    font-size: 12px;
}
.hydro-interface .river-workspace {
    padding: 20px;
}
.hydro-interface .river-workspace.expanded {
    padding: 24px;
}
.hydro-interface .river-node .badge {
    font-size: 11px;
}
.hydro-interface .legend .dot {
    display: none;
}
.hydro-interface.station-pulse-enabled .level-4 > .hydro-icon {
    animation: hydro-emergency 2s infinite;
    border-radius: 50%;
}
@media (prefers-reduced-motion: reduce) {
    .hydro-interface.station-pulse-enabled .level-4 > .hydro-icon {
        animation: none !important;
    }
}
.hydro-interface .gate-banner {
    background: #fff8e9;
    border: 1px solid #eee0bc;
    color: #70551d;
    margin-bottom: 20px;
    align-items: flex-start;
    border-radius: 12px;
    padding: 16px 20px;
}
.hydro-interface .gate-banner p {
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.6;
}
.hydro-interface .gate-banner a {
    font-size: 12px;
}
.hydro-interface .stale-reading .metric-value {
    color: #6b7a88;
}
.hydro-interface .hydro-metric:has(.metric-value):has(.metric-quality) {
    background: #fafcfd;
}
.hydro-interface .value-updated {
    animation: hydro-value-change 0.6s ease-out !important;
}
@keyframes hydro-value-change {
    from {
        background: #d9eff1;
    }
    to {
        background: white;
    }
}
@media (prefers-reduced-motion: reduce) {
    .hydro-interface .value-updated {
        animation: none !important;
    }
}
.hydro-interface .missing-reading {
    background: repeating-linear-gradient(
        135deg,
        #fafcfd,
        #fafcfd 8px,
        #f0f3f5 8px,
        #f0f3f5 9px
    ) !important;
    border-color: #dce2e7 !important;
}
.hydro-interface .import-steps {
    display: flex;
    list-style: none;
    gap: 8px;
    padding: 0;
    margin: 20px 0;
    flex-wrap: wrap;
}
.import-steps li {
    flex: 1;
    min-width: 120px;
    font-size: 13px;
    color: #6b7a88;
    border-bottom: 2px solid #dce6ee;
    padding: 12px;
}
.import-steps li[aria-current="step"] {
    color: #0e7c8f;
    border-color: #0e7c8f;
    font-weight: 600;
}
.import-steps li.complete {
    color: #1e8e5a;
}
.hydro-interface .guide-levels > div {
    border-bottom: 1px solid #edf2f5;
    padding-bottom: 12px;
}
.hydro-interface .page-head h1 {
    line-height: 1.25;
}
.hydro-interface .map-actions button,
.hydro-interface .river-station {
    min-height: 44px;
}
.hydro-interface .geographic-legend,
.hydro-interface .map-angle {
    font-size: 12px;
}
.hydro-interface .metric-label {
    font-size: 14px !important;
}
.hydro-interface .metric-note {
    font-size: 12px !important;
}
.hydro-interface .river-node.selected strong {
    color: #0e7c8f;
}
