/* Nyfall – calm, snowy, system fonts, light and dark. */

:root {
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #e9eff4;
  --ink: #15222e;
  --ink-2: #435567;
  --ink-3: #56677a; /* >= 4.5:1 on --bg, --surface-2 and --accent-soft */
  --line: #d4dde6;
  --accent: #2b6a9b;
  --accent-strong: #1f557f;
  --accent-ink: #ffffff;
  --accent-soft: #dceaf5;
  --focus: #1b74c9;
  --warn-ink: #8a4b00;
  --bar: #a9c7de;
  --bar-current: #2b6a9b;
  --outline-ink: #2f3e4c; /* the forecast-area outline on the map (app.js OUTLINE_PAINT) */
  --ruin-ink: rgba(74, 62, 52, 0.55); /* the ruined-djupsnö hatch at its opacity on the map (app.js RUIN_INK) */
  --ruin-warm: #d9664e; /* djupsnö that rain, thaw or sun ruined: the temperature map's +6 °C, in both themes */
  --overlay-bg: rgba(255, 255, 255, 0.9); /* panels floating on the map */
  --shadow: 0 1px 2px rgba(20, 40, 60, 0.08), 0 4px 16px rgba(20, 40, 60, 0.06);
  /* Destination-page figure, checked with the dataviz validate_palette.js against --surface:
     levels = one blue ramp (sequential steps 250/450/650 light, 200/400/550 dark), top lightest -> base darkest on
     screen in both themes, because the bars are overlaid: the top's wide light bar behind, the base's narrow dark
     bar in front (--ordinal: one hue, monotone L, adjacent dL >= 0.06; pale end 2.11:1 on #fff, dark end 2.46:1
     on #15212c; a one-level area uses the middle step instead, see body.one-level); snow line / 0 °C line =
     orange / violet (CVD dE 25.4 light / 26.2 dark, normal-vision 31.1 / 27.0, both >= 3:1); wind = aqua
     (>= 3:1). Day-total chips: white on --chip-dark. */
  --lvl-top: #86b6ef;
  --lvl-mid: #2a78d6;
  --lvl-base: #104281;
  --chip-dark: #15222e;
  --chip-dark-ink: #ffffff;
  --day-sep: #9fafbe;
  --c-snowline: #c2410c;
  --c-freezing: #4a3aa7;
  --c-wind: #199e70;
  --c-rain: #6f7f8f;
  --c-rain-bg: rgba(111, 127, 143, 0.22);
  --c-nodata: rgba(86, 103, 122, 0.32);
  --grid: #e7ecf1;
  --axis: #b9c5d0;
  --ref: #7a8b9b;
  --col-hl: rgba(43, 106, 155, 0.07);
  --pin-shadow: 5px 0 6px -4px rgba(20, 40, 60, 0.22); /* right edge of the pinned Totalt column */
  --radius: 14px;
  --pad: 10px; /* half the slider thumb: aligns the bars with the thumb positions */
  --map-land: #f2f3f0; /* Positron land under the forecast overlay (light in both themes) */
  /* A basemap-like strip under the legend swatches (the land colour with soft hillshade), so the translucent swatches
     look like the overlay on the map; the dark theme's hillshade only darkens, as on the map (mapkit.js HILLSHADE_PAINT). */
  --map-relief:
    radial-gradient(60% 150% at 12% 120%, rgba(38, 56, 76, 0.2), transparent 70%),
    radial-gradient(55% 140% at 44% -30%, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(50% 160% at 78% 125%, rgba(38, 56, 76, 0.18), transparent 70%),
    #f2f3f0;
  --gutter-l: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1720;
    --surface: #15212c;
    --surface-2: #1c2a37;
    --ink: #e3ebf2;
    --ink-2: #b1c0cd;
    --ink-3: #8597a7;
    --line: #2a3a49;
    --accent: #7db6e2;
    --accent-strong: #a6cdeb;
    --accent-ink: #0c1925;
    --accent-soft: #1d3a51;
    --focus: #8cc4f0;
    --warn-ink: #f0b46a;
    --bar: #3a566d;
    --bar-current: #7db6e2;
    --outline-ink: #0f1820;
    --ruin-ink: rgba(58, 48, 41, 0.55);
    --overlay-bg: rgba(21, 33, 44, 0.9);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --lvl-top: #9ec5f4;
    --lvl-mid: #3987e5;
    --lvl-base: #1c5cab;
    --chip-dark: #34495c;
    --chip-dark-ink: #ffffff;
    --day-sep: #4f6579;
    --c-snowline: #e66a2c;
    --c-freezing: #9085e9;
    --c-wind: #1baf7a;
    --c-rain: #8fa1b2;
    --c-rain-bg: rgba(143, 161, 178, 0.2);
    --c-nodata: rgba(133, 151, 167, 0.36);
    --grid: #213140;
    --axis: #3a4d60;
    --ref: #7d90a2;
    --col-hl: rgba(125, 182, 226, 0.09);
    --pin-shadow: 5px 0 6px -4px rgba(0, 0, 0, 0.55);
    --map-relief:
      radial-gradient(60% 150% at 12% 120%, rgba(14, 22, 32, 0.26), transparent 70%),
      radial-gradient(50% 160% at 78% 125%, rgba(14, 22, 32, 0.22), transparent 70%),
      #f2f3f0;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ruin-ink: rgba(58, 48, 41, 0.55);
  --bg: #0e1720;
  --surface: #15212c;
  --surface-2: #1c2a37;
  --ink: #e3ebf2;
  --ink-2: #b1c0cd;
  --ink-3: #8597a7;
  --line: #2a3a49;
  --accent: #7db6e2;
  --accent-strong: #a6cdeb;
  --accent-ink: #0c1925;
  --accent-soft: #1d3a51;
  --focus: #8cc4f0;
  --warn-ink: #f0b46a;
  --bar: #3a566d;
  --bar-current: #7db6e2;
  --outline-ink: #0f1820;
  --overlay-bg: rgba(21, 33, 44, 0.9);
  --lvl-top: #9ec5f4;
  --lvl-mid: #3987e5;
  --lvl-base: #1c5cab;
  --chip-dark: #34495c;
  --chip-dark-ink: #ffffff;
  --day-sep: #4f6579;
  --c-snowline: #e66a2c;
  --c-freezing: #9085e9;
  --c-wind: #1baf7a;
  --c-rain: #8fa1b2;
  --c-rain-bg: rgba(143, 161, 178, 0.2);
  --c-nodata: rgba(133, 151, 167, 0.36);
  --grid: #213140;
  --axis: #3a4d60;
  --ref: #7d90a2;
  --col-hl: rgba(125, 182, 226, 0.09);
  --pin-shadow: 5px 0 6px -4px rgba(0, 0, 0, 0.55);
  --map-relief:
    radial-gradient(60% 150% at 12% 120%, rgba(14, 22, 32, 0.26), transparent 70%),
    radial-gradient(50% 160% at 78% 125%, rgba(14, 22, 32, 0.22), transparent 70%),
    #f2f3f0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
  padding: 0 var(--gutter-r) 0 var(--gutter-l);
}

a { color: var(--accent-strong); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

main, .site-header, .site-footer { max-width: 1320px; margin-left: auto; margin-right: auto; }

/* ------------------------------------------------------------------ header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px 0 12px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* The logo and name link to the start page on every page. */
.brand-link { color: inherit; text-decoration: none; border-radius: 12px; }
.brand-link:hover { color: inherit; }
.brand-link:hover .brand-name { text-decoration: underline; text-underline-offset: 3px; }
.brand-name { display: block; margin: 0; font-size: 1.35rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
/* A demo site's tag beside the name (nyfall/lang.py site_strings) */
.demo-tag {
  display: inline-block; margin-left: 0.45em; padding: 0.15em 0.45em; vertical-align: 0.25em;
  font-size: 0.5em; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1;
  color: var(--accent-strong); background: var(--accent-soft); border-radius: 6px;
}

.brand-mark {
  width: 40px; height: 40px;
  flex: none;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 11px;
  padding: 5px;
}

h1 { margin: 0; font-size: 1.6rem; line-height: 1.1; letter-spacing: -0.01em; }

.run-info { margin: 0; color: var(--ink-3); font-size: 0.85rem; text-align: right; }
.run-info .run-region { display: block; color: var(--ink-2); font-weight: 600; }
.run-info .stale { display: block; color: var(--warn-ink); font-weight: 600; }

/* ------------------------------------------------------------------ stage */

/* The map page: the map fills the first screen, edge to edge (the body's side gutters are cancelled) and from top to
   bottom. The header lies over the map's top as a frosted band (.map-band), and the time bar over its bottom as
   another (.timebar). The area table keeps the 1320 px column. */
.map-main { max-width: none; }
.map-main > .areas { max-width: 1320px; margin-left: auto; margin-right: auto; }
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin-left: calc(-1 * var(--gutter-l));
  margin-right: calc(-1 * var(--gutter-r));
}

.map-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 320px;
  background: #e8edf1;
}
#map { position: absolute; inset: 0; }

/* The header over the map's top: a frosted band as on the area page's hero (in the light theme's colours in both
   themes, as the map is light in both), with the logo, the period and layer controls and the forecast's run; on a
   narrow screen the controls take their own row. The map pans under the band's empty parts. app.js measures the
   band's height into --band-h on the stage: the map's own buttons and notes start below it, and the map centres
   what shows below it. */
.site-header.map-band {
  --ink: #15222e;
  --ink-2: #435567;
  --ink-3: #56677a;
  --surface: #ffffff;
  --surface-2: #e9eff4;
  --line: #d4dde6;
  --accent: #2b6a9b;
  --accent-strong: #1f557f;
  --accent-ink: #ffffff;
  --accent-soft: #dceaf5;
  --focus: #1b74c9;
  --warn-ink: #8a4b00;
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand info share" "controls controls controls";
  align-items: center;
  gap: 8px 12px;
  max-width: none;
  margin: 0;
  padding: max(8px, env(safe-area-inset-top)) var(--gutter-r) 9px var(--gutter-l);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 20%, transparent);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  color: var(--ink);
  pointer-events: none;
}
.map-band > * { pointer-events: auto; }
.map-band .brand { grid-area: brand; justify-self: start; }
.map-band .map-controls { grid-area: controls; }
.map-band .share-btn { grid-area: share; }
/* the run's text straight on the frost, so in the page's darkest ink */
.map-band .run-info { grid-area: info; justify-self: end; color: var(--ink); font-weight: 500; line-height: 1.3; text-align: right; }
.map-band .run-info .run-region { color: var(--ink); font-weight: 650; }
.run-models, .run-when { white-space: nowrap; }

.map-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.map-controls .segmented legend {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.map-controls .segmented-options { padding: 2px; box-shadow: 0 1px 3px rgba(20, 40, 60, 0.12); }
.map-controls .segmented label { min-height: 32px; padding: 4px 11px; font-size: 0.9rem; }
/* "Temp" where the band is narrow, so that the period and the layer share a row; the control's name stays
   "Temperatur" (the long word, visually hidden). */
.label-short { display: none; }
@media (max-width: 599px) {
  .label-short { display: inline; }
  .label-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* The share button (sharelink.js) at the right end of the header, on both pages: a light pill on the frost with its
   label, on a phone the icon alone (the label stays its name). */
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 13px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  box-shadow: 0 1px 3px rgba(20, 40, 60, 0.12);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.share-btn:hover { background: var(--surface); }
.share-btn.is-done { color: var(--accent-strong); }
.share-icon { width: 18px; height: 18px; flex: none; }
.area-header .area-switch { margin-left: auto; }
@media (max-width: 520px) {
  .share-btn { width: 36px; padding: 0; }
  .share-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* the area page's one row: the logo, the area switch and the share button */
  .site-header.area-header { column-gap: 10px; }
  .area-header .area-switch select { max-width: 46vw; }
}
@media (max-width: 380px) {
  /* The smallest phones: the update time alone beside the logo (the model runs are on the wider screens and the
     area pages). */
  .map-band .run-models { display: none; }
}

/* The site's link-preview image (app.js ?og=1, ops/og_images.py at 1200 × 630): the map page's first screen without
   its controls, share button and time bar, and the legend without its notes. Roboto first, as for the area pages'
   images (body.og-render). */
body.og-map { overflow: hidden; font-family: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
body.og-map .map-controls, body.og-map .share-btn, body.og-map .timebar, body.og-map .areas, body.og-map .site-footer,
body.og-map noscript, body.og-map .legend-toggle, body.og-map .legend-note, body.og-map .legend-line { display: none !important; }

/* The headline on the map, under the band at its left: the area with the most new snow over the whole forecast
   (app.js renderHeadline); a tap shows it. In the light theme's colours, as the map is light in both. On a wide
   screen it lies on the land outside the forecast area. */
.map-headline {
  position: absolute;
  z-index: 2;
  top: calc(var(--band-h, 0px) + 10px);
  left: max(10px, env(safe-area-inset-left));
  max-width: calc(100% - 80px); /* clear of the zoom buttons */
  padding: 6px 12px 7px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, #ffffff 82%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 2px rgba(20, 40, 60, 0.08), 0 4px 16px rgba(20, 40, 60, 0.06);
  color: #15222e;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.map-headline[hidden], body.og-map .map-headline { display: none; }
@media (max-width: 599px) {
  .map-headline { display: none; } /* phones: it took too much of the map (the user's choice) */
}
.map-headline:hover { background: #ffffff; }
.map-headline strong { font-weight: 700; }
.map-headline .headline-go { color: #2b6a9b; font-weight: 700; }

/* "Beta" where the forecast is not calibrated (app.js updateBeta): a quiet, see-through chip at the top of the map
   that folds out what is left to do there; it takes no taps but its own. */
.beta-note {
  position: absolute;
  z-index: 2;
  top: calc(var(--band-h, 0px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.beta-note[hidden], body.og-map .beta-note { display: none; }
.beta-toggle {
  pointer-events: auto;
  padding: 2px 10px 3px;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 50%, transparent);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.beta-toggle:hover, .beta-toggle[aria-expanded="true"] {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
}
.beta-text {
  pointer-events: auto;
  margin-top: 6px;
  width: min(320px, calc(100vw - 120px)); /* clear of the zoom buttons */
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 2px rgba(20, 40, 60, 0.08), 0 4px 16px rgba(20, 40, 60, 0.08);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.4;
}
.beta-text[hidden] { display: none; }
.beta-text p { margin: 0 0 6px; }
.beta-text .beta-title { font-weight: 700; }
.beta-text ul { margin: 0; padding-left: 18px; }
.beta-text li { margin: 2px 0; }

/* The map's zoom and position buttons below the band. */
.map-wrap .maplibregl-ctrl-top-right { top: var(--band-h, 0px); }
/* A popup lies over the band (it is the viewer's own, and closes). */
.map-wrap .maplibregl-popup { z-index: 5; }

/* The legend floats on the map, bottom left above the time bar (app.js measures its height into --foot-h); on phones
   it starts as a small button. */
.map-legend {
  position: absolute;
  z-index: 2;
  left: max(10px, env(safe-area-inset-left));
  bottom: calc(var(--foot-h, 0px) + 10px);
  width: 268px;
  max-width: calc(100% - 20px);
  max-height: calc(100% - var(--band-h, 0px) - var(--foot-h, 0px) - 20px);
  overflow: auto;
  padding: 10px 12px 10px;
  border-radius: 12px;
  background: var(--overlay-bg);
  color: var(--ink);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.legend-toggle {
  position: absolute;
  top: 6px; right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 28px; min-height: 28px;
  padding: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  justify-content: center;
}
.legend-toggle:hover { background: var(--surface-2); color: var(--ink); }
.legend-toggle-icon { width: 18px; height: 18px; flex: none; transform: rotate(180deg); }
.legend-toggle-ramp, .legend-toggle-open, .legend-toggle-unit { display: none; }
.map-legend .legend-title { padding-right: 28px; }
.map-legend.is-collapsed { width: auto; padding: 0; overflow: visible; }
.map-legend.is-collapsed .legend-toggle {
  position: static;
  min-height: 36px;
  padding: 4px 10px 4px 8px;
  color: var(--ink);
}
.map-legend.is-collapsed .legend-toggle-icon { transform: none; }
.map-legend.is-collapsed .legend-toggle-open { display: inline; }
.map-legend.is-collapsed .legend-toggle-ramp {
  display: inline-block;
  width: 34px; height: 10px;
  border-radius: 3px;
  background: var(--bar);
}
.legend[hidden] { display: none; }
/* The credits (bottom right, above the time bar) wrap instead of running under the legend. */
.map-wrap .maplibregl-ctrl-bottom-right { bottom: var(--foot-h, 0px); max-width: calc(100% - 300px); }

.map-status {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  text-align: center;
  z-index: 2;
}
.map-status[hidden] { display: none; }
.map-status.is-error { color: var(--warn-ink); }
/* Notes sit at the top, below the band: the bottom belongs to the legend and the credits, which start expanded on
   small maps. */
.map-status.is-note {
  top: calc(var(--band-h, 0px) + 12px); transform: translateX(-50%);
  max-width: calc(100% - 120px); /* clear of the zoom buttons on the right */
  font-size: 0.82rem; padding: 6px 10px;
}
.reload-btn {
  margin-left: 4px;
  padding: 2px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.reload-btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

/* ------------------------------------------------------------------ controls */

.segmented { border: 0; margin: 0; padding: 0; min-width: 0; }
.segmented legend {
  padding: 0;
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.segmented-options {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--surface-2);
}
.segmented input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
  pointer-events: none;
}
.segmented label {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 560;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.segmented label[hidden] { display: none; }
.segmented label:hover { color: var(--ink); }
.segmented input:checked + label {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(10, 30, 50, 0.16), 0 0 0 1px var(--line);
}
.segmented input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 1px; }
.segmented input:disabled + label { opacity: 0.45; cursor: not-allowed; }


/* ------------------------------------------------------------------ legend */

.legend-title { margin: 0 0 8px; font-weight: 650; font-size: 0.9rem; }
.legend-title .unit { color: var(--ink-2); font-weight: 500; }
.legend-sub { margin: -6px 0 8px; font-size: 0.78rem; color: var(--ink-2); }
.legend-scale {
  position: relative;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* the basemap under the swatch row (one strip, so its relief runs across the classes) */
.legend-scale::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 14px;
  border-radius: 4px;
  background: var(--map-relief);
}
.legend-scale li { flex: 1 1 0; min-width: 0; }
.legend-scale .sw {
  position: relative;
  display: block;
  height: 14px;
  background: var(--c);
  /* the colour as the map draws it: the class at the map's opacity (--a: PNG alpha x layer opacity) over the relief */
  background: color-mix(in srgb, var(--c) var(--a, 100%), transparent);
  border-right: 1px solid var(--surface);
}
.legend-scale li:first-child .sw { border-radius: 4px 0 0 4px; }
.legend-scale li:last-child .sw { border-radius: 0 4px 4px 0; border-right: 0; }
.legend-scale .lbl {
  display: block;
  margin-top: 3px;
  font-size: 0.74rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: visible;
}
.legend-scale.dense li:nth-child(even) .lbl { visibility: hidden; }
/* Snow blends from class to class on the map (the snow field layer), so its scale is one gradient (--ramp, the
   colours at the map's opacity) over the relief strip; the labels keep marking each class's minimum. */
.legend-scale.is-continuous::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 14px;
  border-radius: 4px;
  background: var(--ramp);
  pointer-events: none;
}
.legend-scale.is-continuous .sw { background: none; border-right: 0; }
/* Djupsnö's words under its ramp (lite, bra, djupt, bottenlöst) */
.legend-scale .word { display: block; font-size: 0.7rem; color: var(--ink-3); white-space: nowrap; }
.legend-note { margin: 8px 0 0; font-size: 0.78rem; color: var(--ink-2); }
.legend-warn { color: var(--warn-ink); }
.legend-status { margin: 8px 0 0; font-size: 0.82rem; font-weight: 600; color: var(--ink); }
/* the map's ruined-djupsnö hatch in miniature: "\" lines over the basemap; the warmth's in its colour at its
   opacity on the map (fieldmap.js HATCH.warm) */
.ruin-swatch {
  flex: none;
  width: 26px; height: 12px;
  border-radius: 3px;
  background: repeating-linear-gradient(45deg, var(--ruin-ink) 0 1.2px, transparent 1.2px 6px), var(--map-relief);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ruin-ink) 30%, transparent);
}
.ruin-swatch.is-warm {
  --warm-line: color-mix(in srgb, var(--ruin-warm) 80%, transparent);
  background: repeating-linear-gradient(45deg, var(--warm-line) 0 1.2px, transparent 1.2px 6px), var(--map-relief);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ruin-warm) 30%, transparent);
}
.legend-line { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 0.82rem; color: var(--ink-2); }
/* the map's drift trail in miniature, on a patch of snow colour: white fading towards the tail, with its faint shadow */
.drift-swatch {
  flex: none; width: 26px; height: 10px; border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0) 5%, #fff 95%) center / 24px 2px no-repeat,
    linear-gradient(90deg, rgba(31, 43, 61, 0) 5%, rgba(31, 43, 61, 0.2) 95%) center / 24px 5px no-repeat, #8fa9e0;
}
/* The outline as the map draws it: a dashed neutral line on the basemap's land colour. */
.outline-swatch {
  flex: none;
  width: 26px; height: 12px;
  border-radius: 3px;
  background:
    linear-gradient(to right, var(--outline-ink) 0 55%, transparent 55%) left center / 7px 1.5px repeat-x,
    var(--map-land);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--outline-ink) 18%, transparent);
}

/* ------------------------------------------------------------------ help */

/* Words only where a picture or a number cannot say it, and then behind a ? beside what they explain, folded out
   under it on a tap (app.js and omrade.js bindHelp). The button's hit area is larger than the drawn circle. */
.head-row { display: flex; align-items: center; gap: 10px; }
.help-btn {
  position: relative;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}
.help-btn::before { content: ""; position: absolute; inset: -10px; }
.help-btn:hover { background: var(--surface-2); color: var(--ink); }
.help-btn[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.help {
  margin: 8px 0 10px;
  padding: 9px 12px;
  max-width: 62ch;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.45;
}
.help[hidden] { display: none; }
.help p { margin: 0 0 6px; }
.help p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ time bar */

/* The time bar over the map's bottom: a frosted band as the header over its top, in the light theme's colours in both
   themes, as the map is light in both; the bars a step darker than on a page, for the map under the frost (the
   user's choice over a band with the time and buttons alone, the bars below the map). app.js measures how far it
   reaches up into --foot-h: the legend and the credits end above it, and the map centres what shows between the
   band and it. */
.timebar {
  --ink: #15222e;
  --ink-2: #435567;
  --ink-3: #56677a;
  --surface: #ffffff;
  --surface-2: #e9eff4;
  --line: #d4dde6;
  --accent: #2b6a9b;
  --accent-strong: #1f557f;
  --accent-ink: #ffffff;
  --accent-soft: #dceaf5;
  --focus: #1b74c9;
  --bar: #8fb3d1;
  --bar-current: #2b6a9b;
  --axis: #b9c5d0;
  --grid: #e7ecf1;
  position: absolute;
  z-index: 4;
  left: 0; right: 0; bottom: 0;
  padding: 10px var(--gutter-r) 10px var(--gutter-l);
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 20%, transparent);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  color: var(--ink);
}
.time-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.time-label { margin: 0; font-size: 1.12rem; font-weight: 650; font-variant-numeric: tabular-nums; }
/* straight on the frost, so in a darker ink than a page's second line */
.time-sub { margin: 0; font-size: 0.84rem; font-weight: 500; color: var(--ink-2); min-height: 1.2em; }
.time-buttons { display: flex; gap: 6px; flex: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }
.icon-btn svg { width: 20px; height: 20px; }
.play-btn { width: 46px; height: 46px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.play-btn:hover { background: var(--accent-strong); }
.play-btn .icon-pause, .play-btn.is-playing .icon-play { display: none; }
.play-btn.is-playing .icon-pause { display: block; }

.time-track { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.time-lane { flex: 1; min-width: 0; }
.time-track > .help-btn { margin-top: 10px; }

.time-track .bars {
  position: relative;
  height: 44px;
  border-bottom: 1px solid var(--axis); /* the baseline */
}
/* A hairline at the top value (the clean number in .ymax). */
.time-track .bars::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  border-top: 1px solid var(--grid);
}
.time-track .bars .col {
  position: absolute;
  top: 0; bottom: 0;
  left: calc(var(--pad) + (100% - 2 * var(--pad)) * var(--i) / var(--n1));
  width: max(3px, calc((100% - 2 * var(--pad)) / var(--n1)));
  transform: translateX(-50%);
  cursor: pointer;
}
/* Bars at most 24 px thick, a 2 px surface gap between neighbours, rounded at the data end only. */
.time-track .bars .bar {
  position: absolute;
  left: 50%; bottom: 0;
  width: min(24px, max(1px, calc(100% - 2px)));
  height: calc(var(--h) * 100%);
  transform: translateX(-50%);
  border-radius: 4px 4px 0 0;
  background: var(--bar);
}
.time-track .bars .col:hover .bar { background: color-mix(in srgb, var(--bar-current) 60%, var(--bar)); }
.time-track .bars .col.is-current .bar, .time-track .bars .col.is-range .bar { background: var(--bar-current); }
.time-track .bars .col.is-current::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -1px;
  width: 2px; height: 100%;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--bar-current) 35%, transparent);
  z-index: -1;
}
.time-track .bars .sep {
  position: absolute;
  top: 0; bottom: -4px;
  width: 1px;
  left: calc(var(--pad) + (100% - 2 * var(--pad)) * var(--x) / var(--n1));
  background: var(--grid);
}
/* the top value on a light patch of the frost, over the bars it covers */
.time-track .bars .ymax {
  position: absolute;
  right: 0; top: 2px;
  padding: 1px 3px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 1;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 30px;
  margin: 2px 0 0;
  background: transparent;
  cursor: pointer;
}
input[type="range"]:disabled { cursor: default; opacity: 0.5; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 20px; height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 1px 3px rgba(0, 0, 0, 0.3);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); }
input[type="range"]::-moz-range-thumb {
  box-sizing: border-box;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 1px 3px rgba(0, 0, 0, 0.3);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--focus); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--focus); }

.ticks { position: relative; height: 18px; font-size: 0.74rem; color: var(--ink-3); }
.ticks .tick {
  position: absolute;
  top: 0;
  left: calc(var(--pad) + (100% - 2 * var(--pad)) * var(--x) / var(--n1));
  transform: translateX(-50%);
  white-space: nowrap;
}
.ticks .tick.is-current { color: var(--ink); font-weight: 650; }

.timebar .help { background: color-mix(in srgb, var(--surface) 80%, transparent); }
.bars-caption { margin: 0; }
.bars-value { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------------ map additions */

.maplibregl-popup-content {
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 28px 10px 12px;
  box-shadow: var(--shadow);
  font: inherit;
  font-size: 0.88rem;
}
.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--surface); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }
.maplibregl-popup-close-button { color: var(--ink-2); font-size: 18px; width: 26px; height: 26px; }
.popup-title { margin: 0; font-weight: 650; font-size: 0.95rem; }
.popup-meta { margin: 0 0 6px; color: var(--ink-3); font-size: 0.8rem; }
.popup-table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.popup-table th, .popup-table td { padding: 1px 0; text-align: left; font-weight: 500; }
.popup-table td { text-align: right; padding-left: 12px; }
.popup-table thead th { color: var(--ink-3); font-size: 0.75rem; font-weight: 600; }
.popup-table thead th + th { text-align: right; padding-left: 12px; }

/* The basemap is light in both themes, so the credits keep dark ink (the page ink is light in the dark theme). */
.maplibregl-ctrl-attrib { font-size: 11px; color: #23384b; }
.maplibregl-ctrl-attrib.maplibregl-compact, .maplibregl-ctrl-bottom-right .maplibregl-ctrl-attrib { background-color: rgba(255, 255, 255, 0.78); }
.maplibregl-ctrl-attrib a { color: #23384b; }

/* ------------------------------------------------------------------ areas table */

.areas { margin-top: 24px; }
.areas-head { margin-bottom: 10px; }
h2 { margin: 0; font-size: 1.3rem; }

.table-scroll {
  position: relative; /* contains the absolutely positioned .sr-only texts inside the scrolled table */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.table-status { margin: 0; padding: 16px; color: var(--ink-3); }
.table-status[hidden] { display: none; }

.area-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.area-table th, .area-table td { padding: 5px 10px; text-align: right; white-space: nowrap; }
.area-table thead th {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-weight: 600;
  vertical-align: bottom;
}
.area-table thead tr:first-child th:first-child { text-align: left; }
.area-table thead th.is-current-day { box-shadow: inset 0 -3px 0 var(--accent); }
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sort-btn .arrow { width: 0.9em; color: var(--ink-3); font-size: 0.85em; }
th[aria-sort] .sort-btn .arrow { color: var(--accent-strong); }
/* A day the forecast covers only part of: the hours it covers ("17–08") as a small second line under the date;
   the Totalt header (.total-head) has the end of the forecast there in the same style (.total-end, "t.o.m. ons 28
   okt 17:00"; on phones on two lines, see the media query below). The headers align at the top, so the dates stay
   on one line across the row. */
.day-head { display: inline-flex; flex-direction: column; align-items: flex-end; }
.day-span { font-size: 0.75em; font-weight: 500; line-height: 1.15; color: var(--ink-3); font-variant-numeric: tabular-nums; }
#area-table thead th, .day-table thead th { vertical-align: top; }
.total-head { font-weight: 650; }

/* The map page's area table is interactive (click an area); the destination page's tables are not. */
#area-table tbody { cursor: pointer; }
.area-table tbody th[scope="row"], .area-table thead tr:first-child th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  font-weight: 500;
  color: var(--ink-2);
}
.area-table tbody th[scope="row"] { background: var(--surface); }
.area-table thead tr:first-child th:first-child { background: var(--surface-2); }
/* The total over the whole forecast is the first data column and stays pinned next to the area/level column while
   the day columns scroll sideways (both tables). Its sticky left is the first column's width, which the page
   scripts measure into --sticky-left (pinTotalColumn); the rule on its right marks where the scrolling part starts. */
.area-table .col-total {
  position: sticky;
  left: var(--sticky-left, 0px);
  z-index: 1;
  background: var(--surface);
  border-right: 1px solid var(--axis);
}
.area-table thead th.col-total { background: var(--surface-2); }
/* a soft edge once the day columns have scrolled under it (pinTotalColumn sets .is-scrolled) */
.table-scroll.is-scrolled .area-table .col-total { box-shadow: var(--pin-shadow); }
.table-scroll.is-scrolled .area-table thead th.col-total.is-current-day { box-shadow: inset 0 -3px 0 var(--accent), var(--pin-shadow); }
.area-table .elev { color: var(--ink-3); font-size: 0.8rem; margin-left: 2px; }
/* Where the whole table would scroll sideways (a phone; app.js fitTable): the new snow and the djupsnö alone, the
   levels by their heights, without the days, the snow line and the levels' words. */
.area-table.is-compact [data-day],
.area-table.is-compact tr.snowline-row,
.area-table.is-compact .level-word,
.area-table.is-compact .end-long,
.area-table:not(.is-compact) .end-short { display: none; }
.area-table.is-compact .elev { margin-left: 0; }
.area-table.is-compact th, .area-table.is-compact td { padding-left: 6px; padding-right: 6px; }
@media (max-width: 340px) {
  .area-table.is-compact th, .area-table.is-compact td { padding-left: 5px; padding-right: 5px; }
}
/* "Djupsnö" over its two columns, "nu" and "om 48 h" small under it, as the total's end is under "Nysnö". */
.area-table thead th.col-powder-group { padding-bottom: 0; border-bottom: 0; text-align: center; }
.area-table tr.powder-head th { padding-top: 0; }
.area-table tr.powder-head .sort-btn { padding-top: 1px; }
.powder-when { font-size: 0.75em; font-weight: 500; color: var(--ink-3); }

.area-table tr.area-head th {
  padding-top: 10px;
  text-align: left;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.area-table tbody:first-of-type tr.area-head th { border-top: 0; }
/* The name row stays at the left edge while the day columns scroll and wraps inside the visible width, so the
   name (the area page's link) is never cut off on a phone. */
.area-head-inner {
  position: sticky;
  left: 10px;
  display: inline-flex;
  align-items: baseline;
  gap: 0 8px;
  flex-wrap: wrap;
  max-width: calc(100vw - var(--gutter-l) - var(--gutter-r) - 22px);
  white-space: normal;
}
/* The area's name is its link to the area page: link-coloured, underlined on hover and focus (not always: a column
   of underlined names is heavy). */
.area-name {
  padding: 2px 0;
  color: var(--accent-strong);
  font-weight: 650;
  font-size: 0.98rem;
  text-decoration: none;
}
.area-name:hover, .area-name:focus-visible { color: var(--accent); text-decoration: underline; }
.area-meta { color: var(--ink-3); font-size: 0.8rem; font-weight: 400; }
.popup-link { margin: 6px 0 0; font-weight: 600; }

/* opaque, so the day columns never show through the pinned Totalt column */
.area-table td.is-current-day { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.area-table td.total { font-weight: 650; }
.chip {
  display: inline-block;
  min-width: 3.1em;
  padding: 1px 7px;
  border-radius: 6px;
  text-align: center;
}
.chip.zero { color: var(--ink-3); }

.area-table tr.snowline-row th, .area-table tr.snowline-row td {
  padding-top: 2px;
  padding-bottom: 8px;
  font-size: 0.8rem;
  color: var(--ink-3);
}

#area-table tbody:hover th, #area-table tbody:hover td { background-color: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
#area-table tbody.is-selected th, #area-table tbody.is-selected td { background-color: var(--accent-soft); }
/* --ink-3 is too faint on --accent-soft in the dark theme; secondary text in the selected area uses --ink-2 */
.area-table tbody.is-selected .elev,
.area-table tbody.is-selected .area-meta,
.area-table tbody.is-selected tr.snowline-row th,
.area-table tbody.is-selected tr.snowline-row td,
.area-table tbody.is-selected .chip.zero { color: var(--ink-2); }

.table-notes { margin: 8px 2px 0; font-size: 0.8rem; color: var(--ink-3); }
.table-notes.is-compact .wide-only { display: none; }

/* ------------------------------------------------------------------ footer */

.site-footer {
  margin-top: 36px;
  padding: 18px 0 max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.84rem;
}
.site-footer p { margin: 0 0 8px; max-width: 90ch; }
.sources-link { font-weight: 600; }
.noscript { max-width: 1320px; margin: 16px auto; color: var(--warn-ink); }

/* ------------------------------------------------------------------ destination page (omrade.html) */

/* The area switch, in the header beside the logo (omrade.html). */
.area-header { align-items: center; }
.area-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--ink-2); }
.area-switch select {
  min-height: 36px;
  max-width: 60vw;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

/* The hero (omrade.js renderAreaMap): the area's surroundings on a map, edge to edge (the body's side gutters are
   cancelled) and up under the header, as the map page's map. The header lies over the map's top with the name under
   it on a frosted band, as on the map page (omrade.js measures the header into --header-h), and the totals lie on a
   frosted band across the bottom; the text keeps the gutters. The hero keeps the light theme's colours in both
   themes, as the map is light in both. Without the map (.has-map and body.map-hero removed) the name and the totals
   card stand alone under the header, in the page column. */
body.area-page main { max-width: none; }
body.area-page main > :not(.area-hero.has-map) { max-width: 1320px; margin-left: auto; margin-right: auto; }
body.map-hero .area-header {
  --ink: #15222e;
  --ink-2: #435567;
  --surface: #ffffff;
  --line: #d4dde6;
  --accent: #2b6a9b;
  --accent-strong: #1f557f;
  --accent-soft: #dceaf5;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  max-width: none;
  margin: 0;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  color: var(--ink);
}
.area-hero h1 { font-size: 2rem; margin: 0; }
.area-hero.has-map {
  --ink: #15222e;
  --ink-2: #435567;
  --ink-3: #56677a;
  --surface: #ffffff;
  --line: #d4dde6;
  position: relative;
  height: 470px;
  margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l));
  overflow: hidden;
  background: #f2f3f0; /* the basemap's land, while the tiles load */
  color: var(--ink);
}
.area-map { position: absolute; inset: 0; }
.area-map[hidden] { display: none; }
/* The name and the totals on frosted bands across the top and the bottom edge, as the map page's band. */
.area-hero.has-map h1,
.area-hero.has-map .hero-totals {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--surface) 20%, transparent);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
/* the name's band holds the header too, and leaves the name's row's right end to the credits' (i) */
.area-hero.has-map h1 {
  top: 0;
  padding: calc(var(--header-h, 56px) + 2px) calc(var(--gutter-r) + 34px) 10px var(--gutter-l);
  font-size: 2.4rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  pointer-events: none;
}
.area-hero.has-map .hero-totals {
  bottom: 0;
  width: auto;
  max-width: none;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: none;
}
/* The colour scale under the totals (omrade.js renderHeroLegend): the ramp, and each class's minimum under its left
   end, as in the map page's legend. */
.hero-legend { max-width: 440px; margin: 8px 0 0; }
.hero-legend[hidden] { display: none; }
.hero-legend-ramp { height: 8px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(20, 40, 60, 0.12); }
.hero-legend-labels {
  position: relative;
  height: 14px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  font-size: 10.5px;
  line-height: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.hero-legend-labels li { position: absolute; top: 0; }
/* The map's credits behind their (i), small, at the right end of the name's row (the header lies over the map's
   top-right corner). */
.area-map .maplibregl-ctrl-attrib { font-size: 10px; }
.area-map .maplibregl-ctrl-top-right { top: var(--header-h, 0px); }
@media (min-width: 600px) {
  /* Wider screens: a taller hero. */
  .area-hero.has-map { height: clamp(470px, 62vh, 640px); }
}
@media (max-width: 599px) {
  /* Phones: "Gustavsbergsbacken" stays clear of the (i) on a 360 px phone. */
  .area-hero.has-map h1 { font-size: min(2.1rem, 8.2vw); }
}
@media (max-width: 520px) {
  /* Phones: the select beside the logo says the area; its label is for screen readers (as .sr-only). */
  .area-switch label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}

/* The link-preview image (omrade.js ?og=1, ops/og_images.py at 1200 × 630): the hero alone, filling the viewport,
   with the issue time under the logo and the map's credits open in the bottom-right. */
body.og-render { padding: 0; overflow: hidden; background: #f2f3f0; }
/* Roboto first: on the runner (Linux, where system-ui is DejaVu Sans) the build installs it for the images */
body.og-render { font-family: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
body.og-render main > :not(.area-hero), body.og-render .site-footer, body.og-render .area-switch,
body.og-render .share-btn, body.og-render noscript { display: none !important; }
body.og-render .area-hero.has-map { position: fixed; inset: 0; height: auto; margin: 0; }
body.og-render .og-issued { display: block; margin-top: 2px; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }

/* Under the "Om prognosen" heading at the bottom: the kind and point, the levels, the model runs. */
.area-about { margin-top: 30px; color: var(--ink-3); font-size: 0.9rem; }
.area-about h2 { margin-bottom: 6px; font-size: 1.05rem; color: var(--ink-2); }
.area-about p { margin: 0 0 4px; max-width: 90ch; }
.area-about p:empty { display: none; }
.area-about .run-info { font-size: inherit; text-align: left; }
.page-notice { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); color: var(--warn-ink); font-weight: 600; }
.page-notice[hidden] { display: none; }
/* The new snow over the whole forecast per level: the page's headline numbers (same sans, proportional figures). */
.hero-totals {
  width: fit-content;
  max-width: 100%;
  margin: 14px 0 0;
  padding: 10px 18px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-totals[hidden] { display: none; }
.hero-totals-title { margin: 0 0 4px; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.hero-totals-list { display: flex; flex-wrap: wrap; gap: 4px 32px; margin: 0; padding: 0; list-style: none; }
.hero-total { display: flex; flex-direction: column; min-width: 0; }
.hero-total-level { display: inline-flex; align-items: center; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.hero-total-value {
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
}
.hero-total-unit, .hero-total-approx { font-size: 0.5em; font-weight: 600; letter-spacing: 0; color: var(--ink-2); }
.page-status { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.page-status.is-error { color: var(--warn-ink); }
.page-status[hidden] { display: none; }

.area-picker { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.picker-kind { display: block; font-size: 0.75rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.picker-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.picker-links a { font-weight: 600; }

.lvl-key {
  display: inline-block;
  flex: none;
  width: 10px; height: 10px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: -1px;
  background: var(--lvl-base);
}
.lvl-key.lvl-top { background: var(--lvl-top); }
.lvl-key.lvl-mid { background: var(--lvl-mid); }
/* An area with one level has no ramp to read: its only series (keys, bars) takes the middle step, a series colour
   that clears 3:1 on the surface (#2a78d6 4.42:1 on #fff, #3987e5 4.49:1 on #15212c; the pale ends are 2.11 / 2.46:1). */
body.one-level { --lvl-top: var(--lvl-mid); --lvl-base: var(--lvl-mid); }

.area-days, .area-steps { margin-top: 26px; }
.day-table th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 500; color: var(--ink-2); }
.day-table thead th:first-child { position: sticky; left: 0; z-index: 2; text-align: left; }
.day-table td { vertical-align: top; }
.day-table tr.minor-row th, .day-table tr.minor-row td { font-size: 0.8rem; color: var(--ink-3); }
/* "Nederbörd" with its level under it, so the pinned level column stays narrow */
.day-table .row-note { display: block; margin-left: 0; font-size: 0.72rem; }
/* the day's snow quality ("lätt · drev") under its chip */
.day-table .snow-q { display: block; margin-top: 2px; font-size: 0.72rem; line-height: 1.2; color: var(--ink-3); white-space: nowrap; }

.fig-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 10px; }
.toggle-btn {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.toggle-btn:hover { background: var(--surface-2); }
.toggle-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* The figure: one horizontal scroller; y-axes (gutters), titles and line labels stick to its left edge. */
.fig {
  position: relative;
  --g: 52px;
  --vw: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.fig[hidden] { display: none; }
.fig-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: 6px;
  outline-offset: -3px;
  touch-action: pan-x pan-y;
}
.fig-scroll:focus-visible { outline: 2px solid var(--focus); }
/* The pinned axes paint over the scroller's own ring, so the figure draws it where supported. */
.fig:has(> .fig-scroll:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.fig:has(> .fig-scroll:focus-visible) > .fig-scroll { outline: none; }
.fig-inner { position: relative; padding-top: 8px; }
.fig-row { display: flex; align-items: flex-start; }
.fig-gutter, .fig-gutter-blank {
  position: sticky;
  left: 0;
  z-index: 3;
  flex: none;
  display: block;
  width: var(--g);
  background: var(--surface);
}
.fig-plot-wrap { position: relative; flex: none; }
.fig-plot { display: block; overflow: visible; }
.fig-overlay { position: absolute; left: 0; top: 0; pointer-events: none; }
/* display:flex, so there is no line box of the body's line height around the label: the label's top is the row's
   `top` exactly, which is where the panels place it (above or below a reference line). */
.sticky-row { position: absolute; left: 0; height: 14px; display: flex; }
.sticky-row > span {
  position: sticky;
  left: calc(var(--g) + 4px);
  display: inline-block;
  padding: 0 3px;
  /* a halo in the surface colour instead of a box, so data lines passing the label stay visible around the glyphs */
  text-shadow: 0 0 2px var(--surface), 0 0 2px var(--surface), 0 0 3px var(--surface), 0 0 4px var(--surface);
  font-size: 0.7rem;
  line-height: 14px;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sticky-row > .ref-label { color: var(--ink-2); font-weight: 600; }

.fig-title {
  position: sticky;
  left: 0;
  z-index: 2;
  box-sizing: border-box;
  width: var(--vw);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 16px;
  padding: 14px 12px 6px;
}
.fig-title h3 { margin: 0; font-size: 0.95rem; font-weight: 650; }
.fig-sub { font-size: 0.8rem; color: var(--ink-3); }
.fig-legend { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; padding: 0; list-style: none; font-size: 0.8rem; color: var(--ink-2); }
.fig-legend li { display: inline-flex; align-items: center; gap: 0; font-variant-numeric: tabular-nums; }
.rain-key {
  display: inline-block;
  width: 12px; height: 9px;
  margin-right: 5px;
  border-radius: 1px;
  background: repeating-linear-gradient(-45deg, var(--c-rain) 0 1.2px, var(--c-rain-bg) 1.2px 3.2px);
}
.line-key { display: inline-block; flex: none; width: 16px; height: 0; margin-right: 6px; border-top: 2px solid var(--c-snowline); border-radius: 1px; vertical-align: middle; }
.line-key.key-freezing { border-top-color: var(--c-freezing); }
.line-key.key-lvl-top { border-top-color: var(--lvl-top); }
.line-key.key-lvl-mid { border-top-color: var(--lvl-mid); }
.line-key.key-lvl-base { border-top-color: var(--lvl-base); }
.line-key.key-zero { border-top: 1.5px solid var(--ref); }
.line-key.key-ref { border-top: 1px dashed var(--ref); }
.line-key.key-obs { width: 22px; border-top: 1.5px dashed var(--ink-2); }

/* Day columns: the date header above the snow panel and the day-total chips below it. The label and the chip are
   centred in their column and sticky on both sides, so they stay in view while the column scrolls past. */
.day-band { position: relative; flex: none; }
.day-seg {
  position: absolute;
  top: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: clip;
}
.day-seg.has-sep { border-left: 1px solid var(--day-sep); }
.day-name {
  position: sticky;
  left: calc(var(--g) + 6px);
  right: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 4px;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
}
/* The dates sit at the top of the band, so they line up whether or not a column has the hours line under it. */
.day-dates .day-seg { align-items: flex-start; padding-top: 4px; }
.day-name .day-span { font-size: 0.82em; }
.day-chips .day-seg { align-items: flex-start; padding-top: 5px; }
.day-chip {
  position: sticky;
  left: calc(var(--g) + 6px);
  right: 6px;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--chip-dark);
  color: var(--chip-dark-ink);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* A day the forecast covers only part of keeps the dark pill: the hours under its date say how much it covers. */
.day-chip.is-dry { background: var(--surface-2); color: var(--ink-3); font-weight: 500; }
/* No total for the day: dashed like the figure's no-data columns, so it never reads as "–" (no new snow). */
.day-chip.is-missing { background: transparent; border: 1px dashed var(--ink-3); color: var(--ink-3); font-weight: 500; }
.fig-gutter-note {
  padding: 7px 6px 0 0;
  text-align: right;
  font-size: 9.5px;
  font-style: italic;
  line-height: 14px;
  color: var(--ink-3);
}
.chip-key {
  display: inline-block;
  flex: none;
  width: 20px; height: 11px;
  margin-right: 5px;
  border-radius: 999px;
  background: var(--chip-dark);
}

.fig svg text { font-family: inherit; }
.fig .tick { font-size: 10.5px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.fig .tick-note { font-size: 9.5px; font-style: italic; }
.fig .grid { stroke: var(--grid); stroke-width: 1; }
.fig .baseline { stroke: var(--axis); stroke-width: 1; }
.fig .x-tick { stroke: var(--axis); stroke-width: 1; }
.fig .day-sep { stroke: var(--day-sep); stroke-width: 1; }
.fig .slot-line { stroke: var(--grid); stroke-width: 1; }
.fig .ref-line { stroke: var(--ref); stroke-width: 1; stroke-dasharray: 4 3; }
.fig .guide-line { stroke: var(--ref); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.8; }
.fig .col-hl { fill: var(--col-hl); }
.fig .crosshair { stroke: var(--ink-2); stroke-width: 1; opacity: 0.55; }
.fig .bar { fill: var(--lvl-base); }
.fig .bar.lvl-fill-top { fill: var(--lvl-top); }
.fig .bar.lvl-fill-mid { fill: var(--lvl-mid); }
/* The front bars' 2 px surface ring (a 4 px stroke under the fill), so each overlapping bar keeps its own edge. */
.fig .bar-front { stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; paint-order: stroke; }
.fig .rain-bg { fill: var(--c-rain-bg); }
.fig .rain-line { stroke: var(--c-rain); stroke-width: 1.4; }
.fig .nodata-bg { fill: transparent; }
.fig .nodata-line { stroke: var(--c-nodata); stroke-width: 1.5; }
.fig .nodata-label { font-size: 11px; font-style: italic; fill: var(--ink-3); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.fig .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fig .line-snowline { stroke: var(--c-snowline); }
.fig .line-freezing { stroke: var(--c-freezing); }
.fig .line-wind { stroke: var(--c-wind); }
/* Temperature: one line per level in the bars' shades, a solid neutral 0 °C line, end labels with a surface halo. */
.fig .line-temp { stroke-width: 2.25; }
.fig .lvl-stroke-top { stroke: var(--lvl-top); }
.fig .lvl-stroke-mid { stroke: var(--lvl-mid); }
.fig .lvl-stroke-base { stroke: var(--lvl-base); }
.fig .zero-line { stroke: var(--ref); stroke-width: 1.5; }
.fig .tick-zero { fill: var(--ink-2); font-weight: 650; }
.fig .line-label {
  font-size: 10.5px; font-weight: 600; fill: var(--ink-2);
  paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round;
}
.fig .wind-area { fill: var(--c-wind); opacity: 0.1; }
/* Direction arrows on the wind line, with a surface ring so each stands clear of the line under it. */
.fig .wind-arrow { fill: var(--c-wind); stroke: var(--surface); stroke-width: 1.6px; stroke-linejoin: round; paint-order: stroke; }
.fig .edge-snowline { fill: var(--c-snowline); }
.fig .edge-freezing { fill: var(--c-freezing); }
.fig .dot { stroke: var(--surface); stroke-width: 2; }
.fig .dot-snowline { fill: var(--c-snowline); }
.fig .dot-freezing { fill: var(--c-freezing); }
.fig .dot-wind { fill: var(--c-wind); }
.fig .lvl-dot-top { fill: var(--lvl-top); }
.fig .lvl-dot-mid { fill: var(--lvl-mid); }
.fig .lvl-dot-base { fill: var(--lvl-base); }

.fig-tip {
  position: absolute;
  left: 0; top: 0;
  z-index: 5;
  min-width: 210px;
  max-width: min(300px, calc(100% - 8px));
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  pointer-events: none;
}
.fig-tip[hidden] { display: none; }
.tip-time { margin: 0 0 4px; font-weight: 650; font-size: 0.86rem; }
.tip-table { border-collapse: collapse; font-variant-numeric: tabular-nums; width: 100%; }
.tip-table th, .tip-table td { padding: 1px 0 1px 10px; text-align: right; white-space: nowrap; font-weight: 400; }
.tip-table th:first-child { padding-left: 0; text-align: left; color: var(--ink-2); }
.tip-table thead th { color: var(--ink-3); font-size: 0.72rem; font-weight: 600; }
.tip-table td { color: var(--ink-2); }
.tip-table td strong { color: var(--ink); font-weight: 700; }
.tip-table td.muted { color: var(--ink-3); }
.tip-line { margin: 4px 0 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tip-line strong { color: var(--ink); }
.arrow-key { flex: none; margin-right: 4px; vertical-align: -2px; }
.arrow-key path { fill: var(--c-wind); }
.tip-src { margin: 5px 0 0; color: var(--ink-3); font-size: 0.74rem; }

.step-tables[hidden] { display: none; }
.step-day h3 { margin: 18px 0 6px; font-size: 1rem; }
.step-day:first-child h3 { margin-top: 4px; }
.step-table th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; }
.step-table thead th { font-size: 0.78rem; }
.step-table thead th.lvl-head { text-align: center; border-left: 1px solid var(--line); }
.step-table td.lvl-start { border-left: 1px solid var(--line); }
.step-table tfoot th, .step-table tfoot td { border-top: 1px solid var(--line); background: var(--surface-2); }
.cell-rain { color: var(--ink-3); font-size: 0.78rem; }

/* ------------------------------------------------------------------ narrow screens */

@media (min-width: 900px) {
  /* Wide screens: the band over the map is one row, the logo, the period and the layer on the left and the run on
     the right. */
  .site-header.map-band {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "brand controls info share";
    gap: 8px 28px;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: 10px;
  }
}

@media (max-width: 599px) {
  /* Phones: the collapsed legend is a small chip (colour ramp + unit; its accessible name stays
     "Teckenförklaring"), and the credits keep clear of it in the bottom-left corner. */
  .map-legend.is-collapsed .legend-toggle-open { display: none; }
  .map-legend.is-collapsed .legend-toggle-unit { display: inline; font-variant-numeric: tabular-nums; }
  .map-wrap .maplibregl-ctrl-bottom-right { max-width: calc(100% - 124px); }
  .map-legend { width: min(268px, calc(100% - 20px)); }
}

@media (max-width: 520px) {
  /* Phones: a tight header and time bar, so that the map keeps most of the screen. */
  .site-header { padding: 8px 0 6px; gap: 2px 24px; }
  .run-info .run-region { display: none; } /* the region is evident from the map and the area list */
  .run-info { font-size: 0.78rem; }
  /* the period and the layer side by side, out to the band's edges */
  .map-controls { gap: 6px; justify-content: space-between; }
  .map-controls .segmented label { padding: 4px 9px; font-size: 0.88rem; }
  .timebar { padding-top: 6px; padding-bottom: 8px; }
  .time-track { margin-top: 2px; }
  .brand-name { font-size: 1.25rem; }
  .brand-mark { width: 34px; height: 34px; }
  .segmented label { padding: 6px 10px; font-size: 0.9rem; }
  .legend-scale.dense-sm li:nth-child(even) .lbl { visibility: hidden; }
  .time-label { font-size: 1rem; line-height: 1.3; }
  .time-sub { font-size: 0.8rem; }
  .icon-btn { width: 38px; height: 38px; }
  .play-btn { width: 44px; height: 44px; }
  .area-table { font-size: 0.85rem; }
  .area-table th, .area-table td { padding: 4px 7px; }
  /* "t.o.m." and the end time on a line each, so the pinned Totalt column stays narrow */
  .total-end > span { display: block; }
  .area-hero h1 { font-size: 1.6rem; }
  .hero-totals { padding: 8px 14px 10px; }
  .hero-totals-list { gap: 2px 20px; }
  .hero-total-value { font-size: 1.85rem; }
  .fig-title { padding: 12px 8px 4px; }
  .fig-tip { min-width: 0; font-size: 0.76rem; padding: 7px 9px; }
}

@media (max-width: 400px) {
  /* Small phones: narrower segments, so that the period and the layer share a row down to 360 px. */
  .map-controls .segmented label { padding: 4px 6px; }
}

@media (max-width: 360px) {
  /* Small phones: three level totals still fit on one row. */
  .hero-totals { padding: 8px 12px 10px; }
  .hero-totals-list { gap: 2px 14px; }
  .hero-total-value { font-size: 1.55rem; }
}

@media (forced-colors: active) {
  .segmented input:checked + label { outline: 2px solid CanvasText; }
  .time-track .bars .col.is-current .bar, .time-track .bars .col.is-range .bar { background: Highlight; }
  .map-legend { border: 1px solid CanvasText; }
  .fig .bar, .fig .edge, .fig .dot, .fig .wind-arrow, .arrow-key path { fill: CanvasText; }
  .fig .bar-front { stroke: Canvas; }
  .day-chip, .chip-key { border: 1px solid CanvasText; }
  .fig .line, .fig .crosshair, .fig .zero-line { stroke: CanvasText; }
  .powder-chart circle.pw-dot { fill: CanvasText; } /* over the level fills below */
  .pw-cross { stroke: CanvasText; }
  .lvl-key, .line-key { forced-color-adjust: none; }
}

/* Djupsnö (area table column and area page section). */
.area-table td.powder { white-space: nowrap; }
.sun-note { font-size: 0.78rem; color: var(--ink-2); }
.area-powder { margin-top: 24px; }
.area-powder[hidden] { display: none; }
/* "om 48 h" after the heading's "Djupsnö", on its row: the time the big numbers are for. */
.head-when { font-size: 0.68em; font-weight: 600; color: var(--ink-2); }
.powder-key { margin-top: 6px; }
.powder-key[hidden] { display: none; }
.key-height { white-space: nowrap; }
/* Every level's number on one row, as the hero's totals: a column per level, all as wide, the words wrapping under
   the number on a phone. The numbers follow the point chosen in the chart (omrade.js showPowderNumbers), so the
   columns keep their width and the lines under the numbers room for two: nothing moves but the numbers. */
.powder-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  max-width: 34rem;
  margin-top: 8px;
}
.powder-subs { display: flex; flex-direction: column; min-height: 2.6em; font-size: 0.82rem; line-height: 1.3; color: var(--ink-2); }
.powder-chart { position: relative; margin-top: 8px; } /* the tooltip (.fig-tip) is placed in it */
.powder-svg { display: block; max-width: 100%; height: auto; }
.pw-grid { stroke: var(--line, rgba(0, 0, 0, 0.12)); stroke-width: 1; }
.pw-tick { font-size: 11px; fill: var(--ink-2); }
.pw-now { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.pw-line { fill: none; stroke-width: 2; stroke: var(--lvl-base); }
.pw-line.lvl-top { stroke: var(--lvl-top); }
.pw-line.lvl-mid { stroke: var(--lvl-mid); }
.pw-obs { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
/* the point a tap, the mouse or the arrow keys show: a line through it and a dot on each line (as .fig's) */
.pw-cross { stroke: var(--ink-2); stroke-width: 1; }
.pw-dot { stroke: var(--surface); stroke-width: 2; fill: var(--lvl-base); }
.pw-dot.pw-dot-top { fill: var(--lvl-top); }
.pw-dot.pw-dot-mid { fill: var(--lvl-mid); }
.pw-dot.pw-dot-obs { fill: var(--ink-2); }

/* ------------------------------------------------------------------ the front map (front.html) */

/* Every region zoomed out: the map page's band and legend over the map, without the time bar and the table. The band
   has the logo and the hint on its first row, the layer's name on its second. */
.front-page .map-band { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand info" "controls controls"; }
.front-page .run-info { margin: 0; font-size: 0.85rem; }
.front-layer { margin: 0; font-weight: 650; font-size: 0.95rem; }
/* a region's name beside it on the map: a link to its own map */
.front-region {
  display: block;
  max-width: 132px;
  padding: 2px 4px;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
  color: #15222e;
  text-decoration: none;
  text-shadow: 0 0 2px #fff, 0 0 4px #fff, 0 0 6px #fff;
}
.front-region:hover, .front-region:focus-visible { text-decoration: underline; }
