:root{color-scheme:light}
:root[data-theme="dark"]{
 color-scheme:dark;
 --night-bg:#15191c;
 --night-panel:#20262b;
 --night-inset:#191f23;
 --night-raised:#303a42;
 --night-line:#415058;
 --night-text:#edf2f4;
 --night-muted:#b6c4cc;
 --night-link:#9dddbb;
 color:var(--night-text);
 background:var(--night-bg);
}
.theme-toggle{
 display:grid;
 place-items:center;
 flex:none;
 width:34px;
 min-height:36px;
 padding:0;
 border:1px solid #dce2dd;
 border-radius:9px;
 background:#eef1ee;
 color:#34463b;
 cursor:pointer;
}
.theme-toggle[hidden]{display:none}
.theme-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle [data-theme-icon="sun"],[data-theme="dark"] .theme-toggle [data-theme-icon="moon"]{display:none}
[data-theme="dark"] .theme-toggle [data-theme-icon="sun"]{display:block}
.theme-toggle:hover{background:#e2e8e3}
.theme-toggle:focus-visible{outline:2px solid #4088c4;outline-offset:2px}
.header-right,.legal-controls{display:flex;flex-wrap:wrap;gap:5px;align-items:center;justify-content:flex-end}

[data-theme="dark"] body{background:var(--night-bg);color:var(--night-text)}
[data-theme="dark"] a{color:var(--night-link)}
[data-theme="dark"] :is(.team-settings,details,.section.selection-help,.conditions,.summary-advice,.advice-loading,.metric-card,.site-info,.location-dialog,.legal-page section){
 background:var(--night-panel);
 border-color:var(--night-line);
 color:var(--night-text);
}
[data-theme="dark"] :is(.metric-card,.conditions-tile,.summary-advice li):not([data-zone]){
 --metric-ink:#becbd6;
 --metric-tint:#303a44;
 --metric-edge:#8396a5;
}
[data-theme="dark"] [data-zone="green"]{--metric-ink:#a1e3b8;--metric-tint:#243c31;--metric-edge:#76c997}
[data-theme="dark"] [data-zone="yellow"]{--metric-ink:#f7db89;--metric-tint:#43391f;--metric-edge:#e4ba55}
[data-theme="dark"] [data-zone="orange"]{--metric-ink:#ffc59e;--metric-tint:#492f23;--metric-edge:#f1a06e}
[data-theme="dark"] [data-zone="red"]{--metric-ink:#ffb3b9;--metric-tint:#48272f;--metric-edge:#f08791}
[data-theme="dark"] [data-zone="darkred"]{--metric-ink:#ffbad4;--metric-tint:#452737;--metric-edge:#e58ba9}
[data-theme="dark"] header{--brand-status-color:var(--night-muted)}
[data-theme="dark"] .brand[data-zone] span,[data-theme="dark"] .header-safety[data-zone]>span{color:var(--metric-ink)}
[data-theme="dark"] .header-safety{--safety-color:var(--metric-ink,var(--night-muted));--safety-fill:var(--metric-tint,var(--night-raised))}
[data-theme="dark"] .header-safety:not([data-zone])>span,[data-theme="dark"] .brand:not([data-zone]) span{color:var(--night-muted)}

[data-theme="dark"] :is(.conditions-tile,.conditions-tile:hover){color:var(--metric-ink)}
[data-theme="dark"] :is(.conditions-value,.section.selection-help summary,#summaryLocation){color:var(--night-text)}
[data-theme="dark"] :is(.note,.app-install,.sport-requirement,.wbgt-level-plot,.wbgt-formula,.history-caution,.year-readout,.coverage-state,.sun-protection,.metric-card .hero-secondary,#adviceOverview :is(.overview-zone,.uv-advice-list li)[data-zone]){
 background:var(--night-inset);
 color:var(--night-text);
 border-color:var(--night-line);
}
[data-theme="dark"] #adviceOverview :is(.overview-zone,.uv-advice-list li)[data-zone]{border-inline-start-color:var(--metric-edge)}
[data-theme="dark"] #adviceOverview :is(.overview-label,.uv-advice-list [data-zone] strong){color:var(--night-text)}
[data-theme="dark"] :is(footer,.section .body,.small,.meta,#teamSummary,.team-caption,.team-advice-note,.team-edit,.setting-label,.map-status,.map-sheet-header p,.site-info-facts dt,.site-info-footnote,.advice-loading p,.conditions-header .refresh-control,.metric-card .hero-secondary .meta,.metric-card .air-metrics dt,.metric-card .weather-observations dt,.year-heading,.year-total,.year-legend small,.year-assumption,.history-method,.place-fallback summary){
 color:var(--night-muted);
}
[data-theme="dark"] :is(.metric-card .weather-observations dd,.metric-card .air-metrics dd,.location-setting .location-switch,.map-fallback-button,.history-stats strong){
 color:var(--night-text);
}
[data-theme="dark"] :is(.location-setting,.meta,.site-info-footnote,.settings,.overview-field,.history-stats>div){border-color:var(--night-line)}
[data-theme="dark"] :is(.warning,.field,.protocol){color:#f7db89;background:#40351e;border-color:#8a713f}
[data-theme="dark"] .acute-warning-details{color:#ffbad4;background:#452737}
[data-theme="dark"] :is(.theme-toggle,.language-switch,.team-settings .team-options,.country-control select,.location-setting .location-switch,.button,.map-close,.site-info-trigger,.site-info-heading button,.legal-page button){
 color:var(--night-text);
 background:var(--night-inset);
 border-color:var(--night-line);
 box-shadow:none;
}
[data-theme="dark"] :is(.language-switch button,.team-option span){color:var(--night-muted)}
[data-theme="dark"] :is(.theme-toggle:hover,.conditions-header .refresh-location:hover,.language-switch button[aria-pressed="true"],.team-settings .team-option input:checked+span,.team-settings .team-option:hover input:not(:checked)+span,.site-info-trigger:hover,.site-info-trigger:focus-visible,.legal-page button[aria-pressed="true"]){
 background:var(--night-raised);
 border-color:var(--night-line);
 color:var(--night-text);
}
[data-theme="dark"] .button.primary{background:#a1e3b8;border-color:#a1e3b8;color:#153022}
[data-theme="dark"] :is(.rain-chart,.location-dialog input,.location-dialog select){
 background:var(--night-panel);
 border-color:var(--night-line);
 color:var(--night-text);
}
[data-theme="dark"] .rain-chart figcaption{color:var(--night-muted)}
[data-theme="dark"] .rain-chart-bars{border-color:#919da6;background:linear-gradient(to bottom,transparent 49%,var(--night-line) 50%,transparent 51%)}
[data-theme="dark"] .rain-chart-bars span{background:#60717d}
[data-theme="dark"] .rain-chart-bars span[data-wet]{background:#aebcc8}
[data-theme="dark"] :is(.year-stack,.history-track){background:var(--night-raised)}
[data-theme="dark"] .loading-ring{border-color:var(--night-line);border-top-color:var(--night-link)}
[data-theme="dark"] :is(a,button,summary):focus-visible{outline-color:var(--night-link)}

#importantNote{
 background:#edf4fa;
 border:1px solid #d4e1ec;
 color:#304758;
}
.important-heading{display:flex;align-items:center;gap:8px;color:#285776}
.important-heading svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
[data-theme="dark"] #importantNote{background:#1d2c38;border-color:#3b566a;color:#d7e5ef}
[data-theme="dark"] .important-heading{color:#a9d6f4}

.metric-card .metric-explainer{
 margin:0;
 border:0;
 border-top:1px solid #d6dce1;
 border-radius:0;
 background:transparent;
 color:inherit;
}
.metric-card .metric-explainer summary{padding:11px clamp(14px,3vw,22px);font-size:.85rem}
.metric-card .metric-explainer .body{padding-inline:clamp(14px,3vw,22px)}
[data-theme="dark"] .metric-card .metric-explainer{border-top-color:var(--night-line)}
