/*
 * PWS Watch
 * Active dashboard presentation and responsive map/Now layout.
 * Author: Carlos Enrique Ortiz (CEO)
 * HyperKode (c) 2026 · www.HyperKode.com
 * License: Project license designation pending confirmation.
 */

/* Review-only refinements; preserve the active Atlas composition. */
body.review-dashboard .wip-settings > summary {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  min-height:44px; padding:12px; list-style:none;
  color:var(--ink); font-weight:650;
  background:color-mix(in srgb,var(--cyan) 6%,var(--atlas-panel));
  border:1px solid var(--line); border-radius:8px;
}
body.review-dashboard .wip-settings > summary::-webkit-details-marker { display:none; }
body.review-dashboard .wip-settings > summary:hover,
body.review-dashboard .wip-settings[open] > summary { border-color:var(--cyan); }
body.review-dashboard .wip-settings > summary:focus-visible {
  outline:2px solid var(--cyan); outline-offset:2px;
}
.review-settings-chevron { flex:none; color:var(--cyan); }
body.review-dashboard .wip-change > .review-pressure-evidence,
body.review-dashboard .wip-change > .review-pressure-outlook {
  margin-top:8px; font-size:12px; line-height:1.5; color:var(--muted);
}
body.review-dashboard .wip-change > .review-pressure-evidence[hidden],
body.review-dashboard .wip-change > .review-pressure-outlook[hidden] { display:none; }
body.review-dashboard .wip-settings[open] > summary .review-settings-chevron {
  transform:rotate(180deg);
}
body.review-dashboard .atlas-conditions {
  left:24px; bottom:24px; transform:none; width:min(360px,38%);
  padding:16px 20px; text-align:left; border-left:3px solid var(--cyan);
  background:rgba(4,23,37,.45); backdrop-filter:blur(8px);
}
body.review-dashboard #currentPanel .atlas-conditions .temp-row { justify-content:flex-start; }
body.review-dashboard #currentPanel .atlas-conditions .temp { font-size:60px; }
body.review-dashboard #currentPanel .atlas-conditions .weather-brief {
  text-align:left; font-size:14px; line-height:1.5; margin-top:8px;
}
[data-theme="light"] body.review-dashboard .atlas-conditions { background:rgba(255,255,255,.58); }
body.review-dashboard .review-observed { margin:10px 0 0; font-size:13px; color:inherit; }
body.review-dashboard .review-map-guide {
  margin:0; padding:10px 20px; color:var(--muted); font-size:13px;
  border-top:1px solid var(--line); background:var(--atlas-panel);
}
body.review-dashboard .review-details { margin:14px 0; padding:12px 16px; }
body.review-dashboard .review-details > summary { cursor:pointer; font-weight:700; min-height:44px; padding:12px 0; }
body.review-dashboard .review-details > summary:focus-visible { outline:2px solid var(--cyan); }
body.review-dashboard .review-source-summary { margin:16px 0; color:var(--muted); font-size:14px; line-height:1.6; }
body.review-dashboard .review-history-axis { display:flex; justify-content:space-between; gap:12px; padding:12px 0; font-size:13px; }
body.review-dashboard .history-strip-range { font-size:13px; }
body.review-dashboard .history-strip-label span, body.review-dashboard .setting-note { font-size:14px; line-height:1.5; }
body.review-dashboard #forecastHours .review-forecast-unavailable { padding:20px; }
@media(max-width:760px) {
 body.review-dashboard .atlas-conditions { left:12px; bottom:64px; width:min(280px,calc(100% - 24px)); padding:10px 14px; }
 body.review-dashboard #currentPanel .atlas-conditions .temp { font-size:44px; }
 body.review-dashboard #currentPanel .atlas-conditions .weather-brief { font-size:13px; }
 body.review-dashboard .review-observed { font-size:12px; margin-top:6px; }
 body.review-dashboard .review-history-axis span { max-width:32%; }
}
/* Instruments use explicit scales; markers clamp visually, readings retain exact values. */
body.review-dashboard .review-instrument-temperature { --review-signal:var(--atlas-accent); }
body.review-dashboard .review-instrument-pressure { --review-signal:#74c8f1; }
body.review-dashboard .review-instrument-wind { --review-signal:#40cfbc; }
body.review-dashboard .review-scale { margin-top:14px; color:var(--muted); }
body.review-dashboard .review-scale small, body.review-dashboard .review-trace small { display:block; font-size:12px; line-height:1.5; margin-top:8px; }
body.review-dashboard .review-scale-track {
 position:relative; height:9px; margin:0 5px;
 background:repeating-linear-gradient(90deg,var(--line) 0 1px,transparent 1px 10%),linear-gradient(90deg,transparent,var(--review-signal));
 border-bottom:1px solid var(--line); border-radius:2px;
}
body.review-dashboard .review-scale-track i { position:absolute; top:-3px; height:15px; width:3px; background:var(--ink); box-shadow:0 0 8px var(--review-signal); transform:translateX(-50%); transition:left .7s ease; }
body.review-dashboard .review-instrument-wind .review-scale { margin-right:0; }
body.review-dashboard .review-trace { grid-column:1 / -1; width:100%; margin-top:12px; color:var(--cyan); }
body.review-dashboard .wip-change:first-of-type .review-trace { color:var(--atlas-accent); }
body.review-dashboard .review-trace svg { display:block; width:100%; height:44px; overflow:visible; }
body.review-dashboard .review-trace polyline { fill:none; stroke:currentColor; stroke-width:2; vector-effect:non-scaling-stroke; }
body.review-dashboard .review-trace small { color:var(--muted); }
body.review-dashboard .history-strips { grid-template-columns:1fr; gap:12px; }
body.review-dashboard .history-strip { display:grid; grid-template-columns:160px minmax(0,1fr) 140px; gap:12px; padding:16px; border-left:3px solid var(--history-color); }
body.review-dashboard .history-strip-chart { width:100%; height:60px; }
body.review-dashboard .review-strip-axis { grid-column:2; padding:0; border-top:1px solid var(--line); }
body.review-dashboard #reviewHistoryAxis { display:none; }
body.review-dashboard #historyMeta { padding:14px 16px; border-left:3px solid var(--cyan); background:var(--atlas-panel); line-height:1.7; }
[data-theme="light"] body.review-dashboard .review-instrument-pressure { --review-signal:#176d99; }
[data-theme="light"] body.review-dashboard .review-instrument-wind { --review-signal:#008879; }
@media(max-width:760px) {
 body.review-dashboard .history-strip { grid-template-columns:1fr; }
 body.review-dashboard .review-strip-axis { grid-column:1; }
 body.review-dashboard .review-scale small { font-size:12px; }
}
@media(prefers-reduced-motion:reduce) { body.review-dashboard .review-scale-track i { transition:none; } }
/* Use the screen for geography and time series; constrain prose inside the readouts. */
body.review-dashboard .shell {
  width:calc(100% - clamp(32px, 4vw, 96px));
  max-width:2200px;
}
body.review-dashboard .review-source-summary,
body.review-dashboard .calibration-summary { max-width:80ch; }
@media(min-width:1600px) {
  body.review-dashboard .wip-weather-header,
  body.review-dashboard .wip-weather-header #stationMap {
    height:clamp(420px, 30vw, 560px);
    min-height:420px;
  }
}
@media(max-width:760px) {
  body.review-dashboard .shell { width:calc(100% - 24px); }
}
/* Notifications occupy their own row instead of covering header links and navigation. */
body.review-dashboard #notice {
  position:static;
  inset:auto;
  max-width:none;
  width:100%;
  margin:12px 0;
  box-shadow:none;
  overflow-wrap:anywhere;
}
/* Mobile leads with the Now readout; geography is available on demand. */
.review-map-disclosure { display:none; }
@media(max-width:760px) {
 body.review-dashboard header { gap:8px; padding:8px 0 12px; }
 body.review-dashboard header h1 { font-size:24px; }
 body.review-dashboard header .brand-mark { width:40px; height:40px; }
 body.review-dashboard header .toolbar { gap:6px; }
 body.review-dashboard .wip-navigation { gap:4px 16px; flex-wrap:wrap; }
 body.review-dashboard .wip-navigation a { padding:6px 0; min-height:44px; display:inline-flex; align-items:center; }
 body.review-dashboard #refreshStatus { display:none; }
 body.review-dashboard .review-map-disclosure {
   display:block; min-height:44px; width:100%; text-align:left;
   margin:0 0 8px; padding:10px 14px; color:var(--cyan);
   background:var(--atlas-panel); border:1px solid var(--line); border-radius:8px;
 }
 body.review-dashboard .review-map-disclosure:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
 body.review-dashboard #currentPanel .wip-weather-header.review-map-collapsed { height:auto; min-height:0; background:none; }
 body.review-dashboard .review-map-collapsed .map-panel { display:none; }
 body.review-dashboard #currentPanel .review-map-collapsed .atlas-conditions {
   position:relative; inset:auto; transform:none; width:100%; max-width:none;
   margin:0; padding:14px 16px; background:var(--atlas-panel);
 }
 body.review-dashboard .review-map-collapsed + .review-map-guide { display:none; }
 body.review-dashboard #currentPanel .review-map-collapsed .atlas-conditions .temp { font-size:52px; }
 body.review-dashboard .review-map-collapsed .review-scale { display:none; }
}

/* Keep station controls above the scrolling weather content, in both themes. */
html:has(body.review-dashboard) { scroll-padding-top:var(--sticky-header-offset, 160px); }
body.review-dashboard .shell > header {
  position:sticky;
  top:0;
  z-index:100;
  background:var(--atlas-panel);
  box-shadow:0 8px 20px rgba(0,0,0,.14);
}

/* Compact calculated astronomy sits beside station identity; details stay out of the layout. */
.header-astronomy { position:relative; max-width:100%; margin-inline:auto; color:var(--ink); font-size:12px; }
body.review-dashboard .wip-navigation { margin-left:0; }
.header-astronomy > summary {
  cursor:pointer; min-height:44px; display:flex; align-items:center; justify-content:center;
  gap:8px; padding:0 14px; border:1px solid var(--line); border-radius:8px;
  background:color-mix(in srgb,var(--cyan) 8%,var(--atlas-panel));
  font-weight:650; list-style:none;
}
.header-astronomy > summary::-webkit-details-marker { display:none; }
.header-astronomy > summary:hover,
.header-astronomy[open] > summary { border-color:var(--cyan); background:color-mix(in srgb,var(--cyan) 14%,var(--atlas-panel)); }
.header-astronomy > summary::after { content:'⌄'; color:var(--cyan); }
.header-astronomy > summary:focus-visible { outline:2px solid var(--cyan); outline-offset:3px; }
.astronomy-popover {
  position:absolute; top:100%; left:50%; transform:translateX(-50%);
  width:min(330px,calc(100vw - 48px));
  padding:16px; border:1px solid var(--line); border-radius:8px;
  background:var(--atlas-panel); box-shadow:0 10px 28px #0004; z-index:110;
  font-size:14px; line-height:1.5;
}
.astronomy-popover p { margin:8px 0; }
.astronomy-popover small { display:block; color:var(--muted); font-size:12px; }
.astronomy-popover svg { width:100%; height:100px; color:var(--atlas-accent); margin-top:12px; }
@media(max-width:760px) {
 .header-astronomy { width:100%; }
 .header-astronomy > summary { min-height:44px; padding:0 10px; }
}

/* Keep weather layers visible as a compact, independent layer toggles. */
body.review-dashboard .map-layer-pills {
 display:flex; flex-wrap:nowrap; gap:4px; margin:0; padding:0; border:0; min-width:0;
}
@media(max-width:760px) {
 body.review-dashboard .wip-weather-header .map-head { display:flex; flex-direction:column; gap:6px; }
 body.review-dashboard .wip-weather-header .map-head > div:first-child {
  position:static; max-width:100%; padding:3px 5px;
 }
 body.review-dashboard .wip-weather-header .map-actions { float:none; margin-left:auto; }
 body.review-dashboard .wip-weather-header .leaflet-control-zoom { margin-top:100px; }
}

/* Parallel summary cards: takeaway, explanation, chart, and explicit time window. */
body.review-dashboard .wip-changes { gap:0; padding:16px 0; }
body.review-dashboard .wip-changes h2 {
 position:static; width:auto; height:auto; overflow:visible; clip-path:none;
 grid-column:1 / -1; margin:0 24px 18px; font-size:18px;
}
body.review-dashboard .wip-change { display:flex; flex-direction:column; }
body.review-dashboard .wip-change > span:not(.atlas-signal-title) { font-size:13px; line-height:1.5; }
body.review-dashboard .wip-change .review-trace { margin-top:auto; padding-top:12px; }
body.review-dashboard .wip-change .atlas-signal-title { font-size:21px; }
@media(max-width:760px) {
 body.review-dashboard .wip-changes h2 { margin:4px 4px 8px; }
 body.review-dashboard .wip-change .review-trace { margin-top:0; }
}

/* Keep mobile takeaways visible; disclose explanations and labeled charts on demand. */
body.review-dashboard .review-trend-summary { list-style:none; }
body.review-dashboard .review-trend-summary::-webkit-details-marker { display:none; }
body.review-dashboard .review-trend-summary .atlas-signal-title {
 display:block; font-size:21px; font-weight:750; line-height:1.25; color:var(--cyan);
 margin-bottom:5px; overflow-wrap:anywhere;
}
body.review-dashboard .wip-change:first-of-type .review-trend-summary .atlas-signal-title {
 color:var(--atlas-accent);
}
body.review-dashboard .review-trend-content > span {
 display:block; color:var(--muted); font-size:13px; line-height:1.5;
}
@media(min-width:761px) {
 body.review-dashboard .review-trend-summary { pointer-events:none; }
 body.review-dashboard .review-trend-summary .atlas-provider-indicator { display:none; }
 body.review-dashboard .review-trend-disclosure,
 body.review-dashboard .review-trend-content { display:flex; flex:1; flex-direction:column; }
}
@media(max-width:760px) {
 body.review-dashboard .wip-change { padding:0; }
 body.review-dashboard .review-trend-summary {
  position:relative; cursor:pointer; min-height:44px; padding:14px 36px 14px 48px;
 }
 body.review-dashboard .review-trend-summary strong { font-size:10px; margin-bottom:4px; }
 body.review-dashboard .review-trend-summary .atlas-signal-title { font-size:18px; margin:0; }
 body.review-dashboard .review-trend-summary .atlas-signal-icon { top:19px; left:8px; width:26px; height:30px; }
 body.review-dashboard .review-trend-summary .atlas-provider-indicator {
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
 }
 body.review-dashboard .review-trend-disclosure[open] > summary .atlas-provider-indicator {
  transform:translateY(-50%) rotate(180deg);
 }
 body.review-dashboard .review-trend-summary:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; }
 body.review-dashboard .review-trend-content { padding:0 12px 14px 48px; }
}

body.review-dashboard .review-trend-impact {
 display:block; margin-top:6px; color:var(--muted); font-size:13px;
 font-weight:400; line-height:1.45; overflow-wrap:anywhere;
}

/* Match Analysis and Providers for secondary disclosures as well. */
body.review-dashboard .review-details > summary {
 display:flex; align-items:center; justify-content:space-between; gap:16px; list-style:none;
}
body.review-dashboard .review-details > summary::-webkit-details-marker { display:none; }
body.review-dashboard .review-details[open] > summary .atlas-provider-indicator {
 transform:rotate(180deg);
}
body.review-dashboard .review-notable {
 padding:8px 0 0; margin:0; border:0; border-radius:0; background:none; box-shadow:none;
}
body.review-dashboard .review-notable .history-events { justify-content:flex-start; gap:6px; }
body.review-dashboard .review-notable .history-events > span { font-size:12px; min-height:26px; }
body.review-dashboard .review-notable .review-highlight-period { text-align:left; }

/* Forecast Journey: icons travel with the curve, with exact times/rain aligned below. */
body.review-dashboard .atlas-forecast-scroll { border:0; border-radius:12px; }
body.review-dashboard .atlas-forecast-plot { min-width:calc(var(--atlas-hours,12) * 88px); }
body.review-dashboard :is(#forecastHours,#forecastMoreHours) {
 display:grid; grid-template-columns:repeat(var(--atlas-hours,12),minmax(0,1fr));
 overflow:visible; gap:0; padding:0; margin:0; list-style:none;
}
body.review-dashboard :is(#forecastHours,#forecastMoreHours) li {
 position:relative; display:block; height:270px; padding:0; min-width:0;
 background:transparent; border:0; border-radius:0; text-align:center;
}
body.review-dashboard .atlas-forecast-curve { top:0; height:220px; z-index:0; }
body.review-dashboard .atlas-chart-line { stroke-width:3; stroke-linecap:round; }
body.review-dashboard :is(#forecastHours,#forecastMoreHours) :is(.forecast-icon,.forecast-temperature) {
 position:absolute; left:50%; z-index:1; transform:translate(-50%,-50%); white-space:nowrap;
}
body.review-dashboard :is(#forecastHours,#forecastMoreHours) .forecast-icon {
 top:var(--forecast-point-y,100px); font-size:30px; line-height:1;
}
body.review-dashboard :is(#forecastHours,#forecastMoreHours) .forecast-temperature {
 top:calc(var(--forecast-point-y,100px) - 36px); font-size:17px; font-weight:750; color:var(--ink);
}
body.review-dashboard :is(#forecastHours,#forecastMoreHours) .forecast-label-below .forecast-temperature {
 top:calc(var(--forecast-point-y,100px) + 36px);
}
body.review-dashboard :is(#forecastHours,#forecastMoreHours) :is(.forecast-time,.forecast-rain) {
 position:absolute; left:0; width:100%; font-size:12px;
}
body.review-dashboard :is(#forecastHours,#forecastMoreHours) .forecast-time { bottom:34px; }
body.review-dashboard :is(#forecastHours,#forecastMoreHours) .forecast-rain { bottom:10px; color:var(--cyan); }
body.review-dashboard :is(#forecastHours,#forecastMoreHours) .review-forecast-unavailable {
 height:auto; padding:20px;
}

/* Three purpose-based disclosures; the compact Next hours hero remains unchanged. */
body.review-dashboard [hidden] { display:none !important; }
body.review-dashboard .review-primary-readings {
 display:flex; gap:24px; margin:12px 0; padding:0; color:var(--ink);
}
body.review-dashboard .review-primary-readings div { display:flex; gap:8px; align-items:baseline; }
body.review-dashboard .review-primary-readings dt { color:var(--muted); font-size:12px; }
body.review-dashboard .review-primary-readings dd { margin:0; font-size:15px; font-weight:700; }
body.review-dashboard #weatherDetails .wip-changes {
 display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:16px 0 0; padding:0;
}
body.review-dashboard #weatherDetails .review-trend-content { display:block; padding:8px 12px 16px 48px; }
body.review-dashboard #weatherDetails .review-trend-summary { cursor:default; }
body.review-dashboard .review-about { margin:16px 0; }
body.review-dashboard .review-about > .lower-grid { margin:0; }
body.review-dashboard .review-about-section { padding:16px; min-width:0; }
body.review-dashboard .review-about-section h3 { margin:0 0 12px; font-size:14px; color:var(--muted); }
body.review-dashboard .review-about .atlas-provider-toggle { display:none; }
body.review-dashboard .review-about .provider-popover {
 position:static; width:auto; max-width:none; box-shadow:none; margin:0;
}
body.review-dashboard .review-about .provider-card { margin:0; border:0; }
body.review-dashboard .review-about .review-source-summary { margin:12px 16px; }
body.review-dashboard .review-trend-period { margin:0 0 16px; padding:0; }
@media(max-width:760px) {
 body.review-dashboard #weatherDetails .wip-changes { grid-template-columns:1fr; }
 body.review-dashboard .review-primary-readings { gap:16px; flex-wrap:wrap; }
}

body.review-dashboard .wip-navigation { flex-wrap:wrap; gap:4px 20px; }

/* Station actions live beside station selection; About contains source/technical context. */
body.review-dashboard .review-station-tools { position:relative; font-size:13px; }
body.review-dashboard .review-station-tools > summary {
 display:flex; align-items:center; gap:6px; cursor:pointer; list-style:none; padding:10px 4px;
 color:var(--cyan); min-height:44px; box-sizing:border-box;
}
body.review-dashboard .review-station-tools > summary::-webkit-details-marker { display:none; }
body.review-dashboard .review-station-tools-content {
 position:absolute; z-index:1100; top:100%; right:0; width:min(420px,calc(100vw - 32px));
 padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--atlas-panel,var(--panel));
 box-shadow:0 12px 30px #0004; max-height:65vh; overflow:auto;
}
body.review-dashboard .review-station-tools[open] > summary .atlas-provider-indicator { transform:rotate(180deg); }
body.review-dashboard .review-station-tools > summary:focus-visible { outline:2px solid var(--cyan); }
body.review-dashboard .review-station-extra { padding:12px 16px; border-top:1px solid var(--line); }
body.review-dashboard .review-station-extra a { color:var(--cyan); }
body.review-dashboard .review-highlight-period { display:block; width:100%; color:var(--muted); font-size:11px; }
body.review-dashboard .review-notable:has(#historyEvents:empty) { display:none; }
body.review-dashboard .review-period-highlights h3 { font-size:14px; margin:16px 0 8px; }
body.review-dashboard .review-about > .lower-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:760px) {
 body.review-dashboard .review-about > .lower-grid { grid-template-columns:1fr; }
 body.review-dashboard .atlas-station-header { flex-wrap:wrap; gap:4px 12px; }
 body.review-dashboard .atlas-station-header { position:relative; }
 body.review-dashboard .review-station-tools { position:static; }
 body.review-dashboard .review-station-tools-content { right:0; }
}

/* Current evidence and alert meaning remain visible above the map/forecast. */
body.review-dashboard .review-observed-context { margin:6px 0; color:var(--muted); font-size:12px; }
body.review-dashboard .review-alerts { margin:0 0 12px; }
body.review-dashboard .review-alert-status { margin:6px 0; font-size:12px; color:var(--muted); }
body.review-dashboard .review-weather-alert {
 border:1px solid var(--amber); border-radius:10px; margin:8px 0; padding:12px 16px;
 background:var(--atlas-panel,var(--panel)); color:var(--ink);
}
body.review-dashboard .review-weather-alert > summary {
 display:grid; grid-template-columns:minmax(0,1fr) 20px; gap:6px 12px;
 list-style:none; cursor:pointer;
}
body.review-dashboard .review-weather-alert > summary::-webkit-details-marker { display:none; }
body.review-dashboard .review-weather-alert > summary strong { font-size:15px; }
body.review-dashboard .review-alert-hint { grid-column:1; color:var(--muted); font-size:12px; }
body.review-dashboard .review-weather-alert > summary > svg { grid-column:2; grid-row:1 / 3; align-self:center; }
body.review-dashboard .review-weather-alert[open] > summary > svg { transform:rotate(180deg); }
body.review-dashboard .review-weather-alert > summary:focus-visible { outline:2px solid var(--cyan); outline-offset:4px; }
body.review-dashboard .review-alert-description { white-space:pre-line; overflow-wrap:anywhere; }
body.review-dashboard .review-weather-alert dl { font-size:13px; }
body.review-dashboard .review-weather-alert dl div { display:flex; flex-wrap:wrap; gap:4px 12px; margin:8px 0; }
body.review-dashboard .review-weather-alert dt { min-width:70px; color:var(--muted); }
body.review-dashboard .review-weather-alert dd { margin:0; overflow-wrap:anywhere; min-width:0; }

/* Keep Now readable: timestamps beside temperature, one quiet evidence disclosure. */
body.review-dashboard .now-temperature-reading .review-observed {
 font-size:11px; line-height:1.4; margin:6px 0 0; color:var(--muted);
}
body.review-dashboard .review-notable { pointer-events:auto; padding-top:6px; }
body.review-dashboard .review-notable > summary {
 display:flex; align-items:center; gap:8px; width:fit-content; min-height:36px;
 font-size:12px; color:var(--muted); cursor:pointer; list-style:none;
}
body.review-dashboard .review-notable > summary::-webkit-details-marker { display:none; }
body.review-dashboard .review-notable > summary .icon { width:14px; height:14px; }
body.review-dashboard .review-notable[open] > summary .icon { transform:rotate(180deg); }
body.review-dashboard .review-notable > summary:focus-visible { outline:2px solid var(--cyan); outline-offset:3px; }
body.review-dashboard .review-notable #historyEvents { padding-top:6px; }

/* Desktop overlays Now on the map; mobile keeps both in normal document flow. */
@media(min-width:761px) {
/* Reserve real layout space for map controls and the variable-height Now card. */
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) {
 display:grid; grid-template-columns:minmax(0,1fr); gap:20px;
 height:auto; min-height:clamp(420px,30vw,560px);
 padding:12px 16px 100px; box-sizing:border-box;
}
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .map-panel {
 display:contents;
}
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .map-head {
 position:relative; inset:auto; margin:0; min-width:0;
 display:flex; flex-direction:row; flex-wrap:wrap; align-items:flex-start; gap:8px;
}
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .map-head > div:first-child {
 position:static; max-width:100%;
}
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .atlas-conditions {
 position:relative; inset:auto; transform:none; margin:0; justify-self:start; align-self:end;
 width:min(550px,100%); min-width:0; box-sizing:border-box;
}
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) #stationMap {
 position:absolute; inset:0; width:100%; height:100%; min-height:100%; z-index:0;
}
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .leaflet-top.leaflet-left {
 top:auto; bottom:16px;
}
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .leaflet-control-zoom {
 margin-top:0;
}

body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .radar-legend {
 left:60px; right:12px; bottom:16px; max-width:calc(100% - 72px);
}
}

/* Keep brief readings and measured changes visible together at the foot of Now. */
body.review-dashboard .review-now-pills {
 display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; text-align:left;
}
body.review-dashboard .review-now-pills .review-primary-readings,
body.review-dashboard .review-now-pills .review-notable,
body.review-dashboard .review-now-pills .history-events { display:contents; }
body.review-dashboard .review-now-pills .review-primary-readings > div,
body.review-dashboard .review-now-pills .history-events > span {
 display:flex; align-items:baseline; gap:6px; padding:4px 10px;
 border:1px solid var(--line); border-radius:999px; background:var(--panel);
 font-size:12px; font-weight:700; min-height:26px; box-sizing:border-box;
}
body.review-dashboard .review-now-pills .review-primary-readings :is(dt,dd) {
 color:var(--ink); font-size:12px; font-weight:700; line-height:inherit;
}
body.review-dashboard .review-now-pills .review-highlight-period {
 flex-basis:100%; margin:0; color:var(--muted);
}

/* Supporting comparison stays with its source note, without a nested decorative card. */
body.review-dashboard .review-baseline {
 display:grid; align-content:start; gap:var(--pws-space-1);
 margin:var(--pws-space-4) var(--dashboard-space-inset) 0;
 padding:var(--pws-space-3) 0; min-height:0;
}
body.review-dashboard .review-baseline::before {
 content:""; width:calc(2 * var(--pws-space-6)); max-width:100%;
 height:var(--pws-border-width); background:var(--pws-color-divider);
 margin-bottom:var(--pws-space-2);
}
body.review-dashboard .review-baseline h3 {
 margin:0; color:var(--pws-color-muted);
 font:var(--pws-weight-control) var(--pws-text-control)/1.5 var(--pws-font-ui);
}
body.review-dashboard .review-baseline .calibration-copy {
 margin:0; min-height:0; color:var(--pws-color-text);
 font:var(--pws-weight-normal) var(--pws-text-body)/1.5 var(--pws-font-ui);
}
body.review-dashboard .review-baseline .map-meta {
 margin:0; color:var(--pws-color-muted);
 font:var(--pws-weight-normal) var(--pws-text-meta)/1.5 var(--pws-font-ui);
}
body.review-dashboard .review-baseline .calibration-deltas[hidden] { display:none; }
body.review-dashboard #weatherDetails > .calibration-facts {
 margin:0; padding:16px var(--dashboard-space-inset);
}

/* Controls own their row; legacy floating/positioned children must not escape it. */
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .map-head > div {
 position:static; float:none; min-width:0; max-width:100%; box-sizing:border-box;
}
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .map-actions {
 display:flex; flex-wrap:wrap; margin-left:auto;
}
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .radar-legend {
 width:max-content; right:auto; display:flex; flex-wrap:wrap; gap:6px 10px;
}
body.review-dashboard #currentPanel .wip-weather-header:not(.review-map-collapsed) .radar-legend[hidden] {
 display:none;
}

/* Separate current telemetry from changes measured across a history interval. */
body.review-dashboard .review-now-pills { gap:8px; margin-top:10px; }
body.review-dashboard .review-now-pills .review-primary-readings {
 display:flex; flex-wrap:wrap; flex-basis:100%; gap:8px; margin:0; padding:0;
}
body.review-dashboard .review-now-pills .review-primary-readings::before {
 content:'Current'; flex-basis:100%; font-size:11px; color:var(--muted);
}
body.review-dashboard .review-now-pills .review-notable {
 display:block; flex-basis:100%; padding-top:0;
}
body.review-dashboard .review-now-pills .history-events {
 display:flex; flex-wrap:wrap; justify-content:flex-start; gap:8px; margin:0;
}
body.review-dashboard .review-now-pills .history-events:not(:empty)::before {
 content:'Observed changes'; flex-basis:100%; font-size:11px; color:var(--muted);
}
body.review-dashboard .review-now-pills .review-highlight-period { font-size:11px; }
body.review-dashboard .radar-legend {
 background:var(--panel); border-color:var(--line); box-shadow:none; color:var(--muted);
}
body.review-dashboard .radar-legend .legend-item { color:var(--muted); }
body.review-dashboard #currentPanel .review-observed-context { margin:4px 0; }

body.review-dashboard .review-rain-planning .atlas-forecast-curve { display:none; }
body.review-dashboard .review-rain-planning :is(#forecastHours,#forecastMoreHours) li {
 height:160px; border-right:1px solid var(--line);
}
body.review-dashboard .review-rain-planning :is(#forecastHours,#forecastMoreHours) .forecast-time { top:8px; bottom:auto; }
body.review-dashboard .review-rain-planning :is(#forecastHours,#forecastMoreHours) .forecast-icon { top:50px; font-size:24px; }
body.review-dashboard .review-rain-planning :is(#forecastHours,#forecastMoreHours) .forecast-temperature { top:82px; font-size:14px; }
body.review-dashboard .review-rain-planning :is(#forecastHours,#forecastMoreHours) .forecast-rain { bottom:35px; font-weight:700; }
body.review-dashboard .review-rain-amount {
 position:absolute; bottom:12px; left:0; width:100%; font-size:11px; color:var(--muted);
}

body.review-dashboard .review-forecast-divider {
 margin:16px var(--dashboard-space-inset) 12px; padding-top:12px;
 border-top:1px solid var(--line); color:var(--muted);
 font-size:12px; font-weight:600;
}

body.review-dashboard .review-rain-planning :is(#forecastHours,#forecastMoreHours) li:last-child {
 border-right:0;
}
