/* Shared readable text hierarchy on light surfaces. */
:root{--muted:#4b617a;--ink:#18334f;--text-secondary:#435b76;--text-caption:#52677f}
body.observatory-interface,body.community-view{--muted:#4b617a;--ink:#18334f}
:root body :is(.muted,.text-muted,.note,.help-text,.field-help,.form-help,.empty,.loading){color:#4b617a!important;opacity:1}
:root body :is(.page-heading p,.page-header p,.ob-page-heading p,.ob-section-heading p,.card-subtitle,.section-subtitle,.signal-help,.geographic-warning,.map-popup-reason,.gis-detail-time,.gis-detail-reference,.geographic-coordinates,.citizen-measures-note,.citizen-location-note,.citizen-reading-explain,.ob-chart-sample-note){color:#435b76!important}
:root body.observatory-interface :is(.ob-stat-top>span:first-child,.kpi-breakdown dt,.ob-kpi-main>span,.ob-kpi-caption,.ob-chart-stats>div>span){color:#435b76!important}
:root body.observatory-interface :is(.kpi-unit,.kpi-v2-body .ob-kpi-main>small,.sa-identity small,.river-header p,.river-instruction,.gis-coordinate-label,.gis-coordinate-state,.geographic-legend,.map-angle,.gis-map-notes summary){color:#4b617a!important}
:root body :is(.table th,table thead th,table th,.form-grid label,.field label,.form-label){color:#344e6c!important}
:root body :is(table td small,.table td small,.monitor-timestamp,.monitor-point-state>span,.chart-statistics-slot small,.chart-panel-heading p,.chart-source-note,.reference-panel small,.instrument-caption){color:#4b617a!important}
:root body :is(input,textarea)::placeholder{color:#63748a;opacity:1}
:root body :is(.ob-kpi-action,.gis-basemap-switch button,.gis-layer-toolbar button,.map-segment button,.map-floating-tools button,.chart-selector button,.citizen-reading-help small){color:#315e93!important}
:root body :is(.sidebar nav a,.sidebar-bottom,.sidebar .sidebar-note p,#breadcrumb,.workspace>footer){color:#49617c!important}
:root body .sidebar nav a.active{color:#195bc5!important}
:root body :is(.chart,.chart-content,.chart-frame) svg text{fill:#4b617a!important}
:root body :is(.citizen-point-heading p,.citizen-point-tools>span,.citizen-point>span>small,.citizen-guide p,.citizen-search-empty){color:#435b76!important}
/* Preserve alert inks, selected white labels and dark basemap labels. */
:root body .gis-style-night .map-pin-label>strong{color:#e5efff!important}
:root body .gis-style-night .map-pin-label>span{color:#c1d1e5!important}
@media(forced-colors:active){body{--muted:CanvasText}}
:root body.observatory-interface .kpi-breakdown>div{font-size:11px!important;line-height:1.5}
:root body.observatory-interface .ob-compact-summary .ob-kpi-action{font-size:11px!important}
:root body.observatory-interface :is(.gis-detail-time,.gis-map-notes,.geographic-legend,.chart-source-note,.ob-chart-sample-note){font-size:12px!important;line-height:1.6}

/* Descriptive statistic colors are independent of water-quality severity. */
:root body.observatory-interface .ob-chart-stats>div:nth-child(1){background:#edf8f8;border-left:3px solid #16858d;padding:10px 14px;border-radius:7px}
:root body.observatory-interface .ob-chart-stats>div:nth-child(2){background:#edf3ff;border-left:3px solid #3476cf;padding:10px 14px;border-radius:7px}
:root body.observatory-interface .ob-chart-stats>div:nth-child(3){background:#f4effc;border-left:3px solid #8456b6;padding:10px 14px;border-radius:7px}
:root body.observatory-interface .ob-chart-stats>div:nth-child(1) strong{color:#116971!important}
:root body.observatory-interface .ob-chart-stats>div:nth-child(2) strong{color:#245caa!important}
:root body.observatory-interface .ob-chart-stats>div:nth-child(3) strong{color:#6c419b!important}
:root body.observatory-interface .ob-chart-stats{gap:10px}
:root body.observatory-interface .instrument-reading[data-reading-outside="true"] .ir-value{color:#af4619!important}
:root body.observatory-interface .instrument-reading[data-reading-alert="1"] .ir-value{color:#845008!important}
:root body.observatory-interface .instrument-reading[data-reading-alert="2"] .ir-value{color:#a44317!important}
:root body.observatory-interface .instrument-reading[data-reading-alert="3"] .ir-value{color:#a6283c!important}
:root body.observatory-interface .instrument-reading[data-reading-alert="4"] .ir-value{color:#871c51!important}
:root body.observatory-interface .instrument-reading:is([data-reading-outside="true"],[data-reading-alert="1"],[data-reading-alert="2"],[data-reading-alert="3"],[data-reading-alert="4"]) .ir-value>span{color:inherit!important}

#threshold-form .threshold-intro{font-size:13px;line-height:1.6;color:#435b76;margin:0 0 16px}
#threshold-form .threshold-rule-preview{font-size:12px;color:#435b76;margin:7px 0 0;line-height:1.5}
#threshold-form .threshold-unit{font-size:12px;color:#52677f;white-space:nowrap}
#threshold-form .field-values{display:flex;gap:8px;align-items:center}
#threshold-form .field-values select{min-width:150px;flex:1.3}
#threshold-form .field-values input{width:90px;flex:1}
#threshold-form .threshold-current-note{font-size:12px;line-height:1.6;color:#435b76;padding:10px;background:#f3f7fc;border-radius:7px}
#threshold-form .threshold-table th{font-size:12px}
#threshold-form .threshold-table td{padding:13px 10px;vertical-align:top}
@media(max-width:600px){#threshold-form .field-values{flex-wrap:wrap}#threshold-form .field-values select{min-width:120px}#threshold-form .threshold-table{min-width:580px}}
@media(max-width:1300px){#threshold-form>.grid.detail{grid-template-columns:minmax(0,1fr)}#threshold-form>.grid.detail>.stack:last-child{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}
@media(max-width:700px){#threshold-form>.grid.detail>.stack:last-child{grid-template-columns:minmax(0,1fr)}}

/* Approval and version records should size to their content. */
#threshold-form>.grid.detail>.stack:last-child{min-width:0;gap:16px}
#threshold-form>.grid.detail>.stack:last-child>.card{min-width:0;height:auto}
#threshold-form .workflow{display:flex;flex-direction:column;gap:14px;padding:4px 0 14px;min-height:0;height:auto;justify-content:flex-start}
#threshold-form .workflow-step{display:flex;align-items:center;gap:12px;min-height:46px;margin:0;padding:0}
#threshold-form .workflow-step .number{flex:0 0 30px;width:30px;height:30px;font-size:14px}
#threshold-form .workflow-step .number:after{display:none}
#threshold-form .workflow-step>div{min-width:0}
#threshold-form .workflow-step strong{font-size:13px;line-height:1.4}
#threshold-form .workflow-step small{display:block;margin-top:3px;font-size:12px;line-height:1.4}
#threshold-form .version-card{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px;min-width:0}
#threshold-form .version-card>div{flex:1 1 200px;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}
#threshold-form .version-card>div strong{font-size:13px;overflow-wrap:anywhere}
#threshold-form .version-card>div small{font-size:12px;white-space:nowrap}
#threshold-form .version-card .badge{white-space:nowrap;width:auto;word-break:normal}
#threshold-form .version-card>button{flex:0 0 auto;white-space:nowrap;padding:7px 10px;font-size:12px}
@media(max-width:1300px){#threshold-form>.grid.detail>.stack:last-child>.card:last-child{grid-column:1/-1}}
@media(max-width:700px){#threshold-form .version-card>div{flex-basis:100%}#threshold-form .version-card>button{flex:1 1 auto}}

.compact-basis{margin:12px 0;padding:0;border:1px solid #dce6f1;border-radius:8px;background:#f6f9fd}
.compact-basis summary{display:flex;align-items:center;gap:8px;padding:10px 12px;cursor:pointer;font-size:12px;color:#435b76;list-style:none}
.compact-basis summary>svg{width:16px;height:16px;flex-shrink:0}.compact-basis summary>svg:last-child{margin-left:auto}
.compact-basis-body{padding:0 12px 12px;font-size:12px;line-height:1.6;color:#435b76}
.compact-basis-body p{margin:5px 0}.compact-basis-body a{color:#315e93;font-weight:600}

.gate-details{padding-left:18px;margin:10px 0 0;color:#435b76;font-size:12px;line-height:1.65}.gate-details li+li{margin-top:5px}.gate-item{min-width:0;overflow-wrap:anywhere}

.account-scope{border:1px solid #dce5f2;border-radius:8px;padding:12px}.account-scope legend{font-weight:600;color:#1e304d}.scope-stations{display:flex;flex-wrap:wrap;gap:10px 18px}.scope-stations label{display:flex;gap:6px;align-items:center}
