@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  /* Figtree: friendly, compact, and a plain zero, which matters in tables of temperatures. */
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --panel: #f4f7fc;
  --panel-edge: rgba(31, 79, 140, 0.12);
  --card: #ffffff;
  --ink: #132238;
  --muted: #5a6b82;
  --line: rgba(31, 79, 140, 0.12);
  --chip: #e8effa;
  --hover: rgba(47, 127, 196, 0.09);
  --focus: #2f7fc4;
  --live: #1fa36b;
  --warn: #c27a12;
  --shadow: 0 1px 2px rgba(19, 34, 56, 0.06), 0 12px 32px rgba(31, 79, 140, 0.16);
  /* Accents, from the logo's sunrise and the weather they stand for. */
  --accent: #2f7fc4;
  --c-sky: #2f8fe0;
  --c-sun: #f59e0b;
  --c-warm: #ff7a4d;
  --c-mint: #10b9a0;
  --c-violet: #7c5cf0;
  --c-cyan: #0ea5c6;
  --c-rose: #e8577a;
  --brand-grad: linear-gradient(135deg, #2f7fc4 0%, #4b8ef0 55%, #7c5cf0 100%);
  --warm-grad: linear-gradient(135deg, #ffb84d 0%, #ff7a4d 100%);
  --ramp: linear-gradient(90deg, #3c4fa3 0%, #3f7cc4 18%, #6aa8dc 31%, #a7cdec 40%, #e3eef4 44%, #f3e7b0 49%, #f4cf78 58%, #efa955 71%, #e47c3e 84%, #cc4a32 100%);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --panel: #0f1a29;
  --panel-edge: rgba(140, 180, 235, 0.12);
  --card: #172538;
  --ink: #e9f1fb;
  --muted: #93a6bf;
  --line: rgba(140, 180, 235, 0.13);
  --chip: #1d2d43;
  --hover: rgba(111, 178, 255, 0.1);
  --focus: #6fb2ff;
  --live: #4fd99a;
  --warn: #f0b04a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 14px 34px rgba(0, 0, 0, 0.45);
  --accent: #6fb2ff;
  --c-sky: #5aaefc;
  --c-sun: #fbbf24;
  --c-warm: #ff9166;
  --c-mint: #34d6bd;
  --c-violet: #a28bff;
  --c-cyan: #38c6e6;
  --c-rose: #ff7a9a;
  --brand-grad: linear-gradient(135deg, #3b82d6 0%, #5b8ef7 55%, #8b6cf6 100%);
  --warm-grad: linear-gradient(135deg, #ffbf5c 0%, #ff8a5c 100%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--panel); -webkit-font-smoothing: antialiased; }
#map { position: fixed; inset: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* Panel: a floating card on wide screens, a bottom sheet on phones. */
.panel {
  position: fixed; top: 14px; left: 14px; width: 430px; max-height: calc(100vh - 28px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--panel)) 0%, var(--panel) 240px); border: 1px solid var(--panel-edge); border-radius: 14px; box-shadow: var(--shadow);
  overflow: hidden; z-index: 2;
}
.sheet-toggle { display: none; }
.bar { display: flex; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; }
.search input {
  width: 100%; height: 42px; padding: 0 44px 0 40px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--card); border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 12px;
  box-shadow: 0 2px 8px rgba(31, 79, 140, 0.1); transition: border-color 0.15s, box-shadow 0.15s;
}
.search input::placeholder { color: var(--muted); }
.search input:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), 0 2px 10px rgba(31, 79, 140, 0.14); }
/* The magnifier marks the box as search, inside its left end. */
.search-icon { position: absolute; left: 12px; top: 11px; width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
/* My location, inside the search box's right end. */
.search .locate-btn { position: absolute; top: 5px; right: 5px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.search .locate-btn:hover { background: var(--line); }
.search .locate-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.results {
  position: absolute; top: 44px; left: 0; right: 0; margin: 0; padding: 4px; list-style: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 3;
}
.results li { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 7px; cursor: pointer; }
.results li[aria-selected="true"], .results li:hover { background: var(--hover); }
.results .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .name small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.results .src { font-size: 12px; color: var(--muted); }
.results .empty { color: var(--muted); cursor: default; }

.icon-btn { width: 40px; height: 40px; flex: none; border: 0; border-radius: 10px; background: var(--chip); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--hover); }
.lang-btn { font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; color: var(--ink); letter-spacing: 0.04em; }
#themeBtn i { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); box-shadow: inset -6px -2px 0 0 var(--chip); display: block; }
:root[data-theme="dark"] #themeBtn i { box-shadow: none; background: radial-gradient(circle, var(--ink) 45%, transparent 47%); }

.body { overflow-y: auto; padding: 16px 16px 8px; overscroll-behavior: contain; }
h1 { font-size: 21px; line-height: 1.2; margin: 0 0 6px; font-weight: 700; letter-spacing: -0.005em; }
h2 { font-size: 22px; line-height: 1.2; margin: 0; font-weight: 700; }
h3 { font-size: 15px; margin: 0 0 6px; font-weight: 700; }
p { margin: 0; }
.lede { color: var(--muted); font-size: 14px; line-height: 1.45; }
.hint { color: var(--muted); font-size: 13.5px; margin-top: 14px; }

/* Hero: the Vindamo card at the top of the overview. A night-to-day sky with a warm sunlit
   corner, wind lines drifting across it, the logo (a sun rising out of blue wind) and name,
   a live badge, and the country's numbers on frosted glass. */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin: -2px -2px 14px; padding: 18px 18px 16px; border-radius: 18px; color: #fff;
  background:
    radial-gradient(110% 85% at 100% 0%, rgba(255, 176, 96, 0.6) 0%, rgba(255, 176, 96, 0) 50%),
    radial-gradient(90% 70% at 0% 100%, rgba(80, 170, 255, 0.35) 0%, rgba(80, 170, 255, 0) 60%),
    linear-gradient(140deg, #0a2440 0%, #164f86 52%, #2f7fc4 100%);
  box-shadow: 0 10px 30px rgba(11, 42, 74, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.hero-wind { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-wind path {
  fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.6; stroke-linecap: round;
  vector-effect: non-scaling-stroke; stroke-dasharray: 70 430; animation: hero-wind 9s linear infinite;
}
.hero-wind path:nth-child(2) { animation-duration: 11s; animation-delay: -4s; stroke: rgba(255, 255, 255, 0.16); }
.hero-wind path:nth-child(3) { animation-duration: 8s; animation-delay: -6s; }
.hero-wind path:nth-child(4) { animation-duration: 12s; animation-delay: -2s; stroke: rgba(255, 255, 255, 0.12); }
@keyframes hero-wind { from { stroke-dashoffset: 500; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-wind path { animation: none; stroke-dasharray: none; stroke: rgba(255, 255, 255, 0.08); } }
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero .mark { width: 54px; height: 54px; margin: -4px 0 -4px -4px; flex: none; color: #fff; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25)); }
.hero-name { flex: 1; min-width: 0; }
#overview .hero h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.hero .tagline { margin-top: 4px; font-size: 13.5px; color: rgba(255, 255, 255, 0.78); }
.live-pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; backdrop-filter: blur(6px);
}
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #c9d3da; }
.panel[data-live="live"] .live-pill i { background: #5fe39a; box-shadow: 0 0 0 0 rgba(95, 227, 154, 0.7); animation: live-pulse 2s ease-out infinite; }
.panel[data-live="reconnecting"] .live-pill i { background: #ffc35c; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(95, 227, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 227, 154, 0); } }
@media (prefers-reduced-motion: reduce) { .panel[data-live="live"] .live-pill i { animation: none; } }
.hero-summary { margin: 14px 0 0; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.82); }
.hero .extremes { margin: 12px 0 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hero .extremes div {
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 0.15s;
}
.hero .extremes div:hover { background: rgba(255, 255, 255, 0.2); }
.hero .extremes dt { color: rgba(255, 255, 255, 0.72); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.hero .extremes dd { color: #fff; font-size: 15.5px; font-weight: 700; }

/* What Vindamo does, as a grid of small icon tiles under the hero. */
.features { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.features li { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 12px; background: var(--chip); font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.features svg { width: 30px; height: 30px; flex: none; padding: 6px; border-radius: 9px; fill: none; stroke: var(--focus); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; background: color-mix(in srgb, var(--focus) 14%, transparent); }

/* The mark and name in the About dialog. */
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 36px; height: 36px; flex: none; }
.more-link { margin-top: 10px; padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--focus); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.about-lead { margin: 12px 0 10px; font-size: 15.5px; font-weight: 600; }

.extremes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 16px; }
.extremes div { padding: 10px 12px; border-radius: 10px; background: var(--chip); cursor: pointer; border: 0; text-align: left; }
.extremes div:hover { background: var(--hover); }
.extremes dt { font-size: 12.5px; color: var(--muted); }
.extremes dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.scale .ramp { height: 10px; border-radius: 5px; background: var(--ramp); }
.scale .ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.legend { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; font-size: 13.5px; }
.legend li { display: flex; align-items: center; gap: 10px; }
.key { width: 26px; height: 16px; border-radius: 8px; background: #f4cf78; flex: none; }
.key.ringed { box-shadow: 0 0 0 2px var(--ink); }
.key.faded { opacity: 0.4; }

/* Station or point detail */
.detail .back {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; margin: -4px 0 8px;
  color: var(--muted); font-size: 13.5px; cursor: pointer;
}
.detail .back:hover { color: var(--ink); }
.detail .back::before { content: ""; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.meta { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.now { display: flex; align-items: center; gap: 14px; margin: 16px 0 14px; }
/* The map badge, enlarged: the one bold element in the panel. */
.tile {
  min-width: 128px; padding: 14px 18px 12px; border-radius: 22px; text-align: center;
  font-size: 48px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.tile.none { background: var(--chip); color: var(--muted); font-size: 22px; padding: 22px 18px; }
.now .when { font-size: 14px; color: var(--muted); line-height: 1.4; }
.now .when b { color: var(--ink); font-weight: 600; }
.now .feels { display: block; margin-top: 2px; }
.tile-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: var(--muted); cursor: pointer; border-radius: 22px; }
.tile-btn .tile { transition: box-shadow 0.12s; }
.tile-btn:hover .tile { box-shadow: 0 0 0 3px rgba(31, 111, 178, 0.35); }
.tile-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.tile-hint { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--accent); }
.tile-hint svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tile-btn[aria-expanded="true"] .tile-hint svg { transform: rotate(180deg); }
.src-box { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-size: 13.5px; }
:root[data-theme="dark"] .src-box { background: var(--card); }
.src-box > p { margin: 0 0 8px; line-height: 1.45; }
.src-box .area { border-top: 0; padding-top: 0; margin: 0; }
.src-box .area h3 { font-size: 13px; margin: 6px 0 4px; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 0 0 16px; font-size: 14.5px; }
.facts dt { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.facts .fi { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--c-sky); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.facts dt[data-f="Gusts"] .fi { stroke: var(--c-violet); }
.facts dt[data-f="Humidity"] .fi { stroke: var(--c-cyan); }
.facts dt[data-f="Pressure"] .fi { stroke: var(--c-rose); }
.facts dt[data-f="Precipitation"] .fi { stroke: var(--c-sky); }
.facts dt[data-f="Snow depth"] .fi { stroke: var(--c-cyan); }
.facts dt[data-f="Road surface"] .fi { stroke: var(--c-sun); }
.facts dt[data-f="Visibility"] .fi { stroke: var(--c-mint); }
.facts dt[data-f="Wave height"] .fi, .facts dt[data-f="Water level"] .fi { stroke: var(--c-sky); }
.facts dd small { margin-left: 6px; font-size: 12.5px; color: var(--muted); }

.spark { margin: 0 0 18px; }
.spark svg { display: block; width: 100%; height: 72px; overflow: visible; }
.spark .line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.spark .area { fill: var(--hover); }
.spark .zero { stroke: var(--line); stroke-dasharray: 3 3; }
.spark text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.spark figcaption { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.area { border-top: 1px solid var(--line); padding-top: 14px; }
.area p { font-size: 14px; line-height: 1.45; margin-bottom: 8px; }
.area .disagree { color: var(--warn); }
.area-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.area-head p { margin: 0; font-size: 13.5px; line-height: 1.4; }
.near { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.near li { display: grid; grid-template-columns: 20px 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.near li:hover { border-color: var(--accent); background: var(--hover); }
.near .si { grid-row: 1 / 3; width: 18px; height: 18px; fill: none; stroke: #2a7bb5; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.near .si.trv { stroke: #c27a12; }
:root[data-theme="dark"] .near .si { stroke: #7fb4ea; }
:root[data-theme="dark"] .near .si.trv { stroke: #f0b44e; }
.near .nm { display: flex; flex-direction: column; min-width: 0; }
.near .nm b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near .nm small { font-size: 11.5px; color: var(--muted); }
.near .wt { grid-column: 2 / 4; display: flex; align-items: center; gap: 8px; }
.near .wt i { display: block; height: 4px; border-radius: 2px; background: #1f6fb2; opacity: 0.7; }
.near .wt em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.tb { flex: none; padding: 3px 8px; border-radius: 8px; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tb.none { background: var(--chip); color: var(--muted); }

.status { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status[data-state="live"] i { background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
.status[data-state="reconnecting"] i { background: var(--warn); }

.maplibregl-ctrl-attrib { font-family: var(--font); }
/* Phones: the bottom corners sit just above the panel sheet (its height comes from app.js). */
@media (max-width: 700px) {
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: var(--sheet-h, 0px); transition: bottom 0.2s ease; }
}
:root[data-theme="dark"] .maplibregl-ctrl-group { background: var(--panel); }
:root[data-theme="dark"] .maplibregl-ctrl-group button + button { border-top-color: var(--line); }
:root[data-theme="dark"] .maplibregl-ctrl-icon { filter: invert(1); }
:root[data-theme="dark"] .maplibregl-ctrl-attrib { background: rgba(31, 42, 51, 0.8); color: var(--muted); }
:root[data-theme="dark"] .maplibregl-ctrl-attrib a { color: var(--ink); }

@media (max-width: 700px) {
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 58vh;
    border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom);
  }
  .panel.collapsed .body, .panel.collapsed .status { display: none; }
  .sheet-toggle { display: block; height: 18px; border: 0; background: none; cursor: pointer; position: relative; }
  .sheet-toggle::after { content: ""; position: absolute; left: 50%; top: 7px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
  .bar { padding-top: 2px; }
  .tile { font-size: 40px; min-width: 108px; }
}
/* Short phones: the sheet leaves more of the map visible (it still scrolls, and can be pulled up). */
@media (max-width: 700px) and (max-height: 720px) { .panel { max-height: 48vh; } }
/* The narrowest phones: the name a size down, so it clears the live badge. */
@media (max-width: 380px) { #overview .hero h1 { font-size: 25px; } .hero .mark { width: 46px; height: 46px; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Forecast comparison */
:root { --c-smhi: #2f6db5; --c-met: #c75a22; --c-openmeteo: #7a5cc4; --c-dmi: #1f9e74; --c-fmi: #c23a7a; --sun: #e5a21a; --moon: #8f9dbb; --cloud: #b9c3ca; --cloud-dim: #d3dade; --drop: #3f7cc4; --flake: #7fa6c9; --bolt: #e5a21a; }
:root[data-theme="dark"] { --c-smhi: #6fa3e2; --c-met: #f08c56; --c-openmeteo: #ab90ea; --c-dmi: #4fcb9d; --c-fmi: #e86fa8; --sun: #f3c04a; --moon: #c3cde0; --cloud: #8d9aa5; --cloud-dim: #5d6a75; --drop: #6fa8e0; --flake: #b9d3ea; --bolt: #f3c04a; }

.fc { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 16px; }
.fc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.fc-head h3 { margin: 0; }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--chip); }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.fc-wait { font-size: 14px; color: var(--muted); }

.fc-chart { display: block; width: 100%; height: auto; margin: 2px 0 6px; overflow: visible; }
.fc-chart text { font-size: 10.5px; fill: var(--muted); font-family: var(--font); }
.fc-grid { stroke: var(--line); }
.fc-zero { stroke: var(--line); stroke-dasharray: 3 3; }
.fc-line { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.fc-line.smhi { stroke: var(--c-smhi); }
.fc-line.met { stroke: var(--c-met); }
.fc-line.openmeteo { stroke: var(--c-openmeteo); }
.fc-line.dmi { stroke: var(--c-dmi); }
.fc-line.fmi { stroke: var(--c-fmi); }

.bf-card { margin-top: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--card)), var(--card) 120px); border: 1px solid var(--line); border-radius: 17px; padding: 16px; box-shadow: 0 6px 18px rgba(31, 79, 140, 0.08); margin-bottom: 14px; }
:root[data-theme="dark"] .bf-card { background: var(--card); }
.bf-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.bf-top .eyebrow { display: block; font-size: 11px; letter-spacing: 0.08em; font-weight: 800; color: var(--accent); text-transform: uppercase; }
.bf-top h3 { font-size: 18px; margin: 0 0 2px; }
.bf-top small { font-size: 13px; color: var(--muted); }
.bf-badge { flex: none; padding: 6px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.bf-badge.h { background: #dcf2e6; color: #1d6b48; }
.bf-badge.m { background: #fff1d4; color: #8b5512; }
.bf-badge.l { background: #fbe1dc; color: #9a3524; }
:root[data-theme="dark"] .bf-badge.h { background: #1d3b2e; color: #8fdcb5; }
:root[data-theme="dark"] .bf-badge.m { background: #3d3119; color: #f3c977; }
:root[data-theme="dark"] .bf-badge.l { background: #432520; color: #f2a294; }
.bf-now { display: flex; align-items: flex-start; gap: 16px; margin: 18px 2px 12px; }
.bf-t { font-size: 46px; font-weight: 760; letter-spacing: -0.06em; line-height: 0.9; white-space: nowrap; }
.bf-now p { margin: 0; font-size: 14px; line-height: 1.38; }
.bf-now p b { font-weight: 600; }
.bf-wind { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 5px 8px; border-radius: 8px; background: var(--chip); color: var(--muted); font-size: 12px; }
.bf-wind b { color: var(--ink); font-weight: 600; }
.bf-wind svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bc-title { display: flex; justify-content: space-between; margin: 9px 1px 4px; font-size: 12px; }
.bc-title span { color: var(--muted); }
.bc-wrap { display: flex; gap: 5px; }
.bc-y, .bc-mm { position: relative; height: 92px; font-size: 10px; color: var(--muted); }
.bc-y { width: 24px; }
.bc-mm { width: 30px; }
.bc-y span, .bc-mm span { position: absolute; transform: translateY(-50%); white-space: nowrap; line-height: 1; }
.bc-y span { right: 0; }
.bc-mm span { left: 0; }
.bc-plot { position: relative; flex: 1; height: 92px; border-bottom: 1px solid var(--line); }
.bc-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bc-plot svg * { vector-effect: non-scaling-stroke; }
.bc-night { fill: var(--ink); opacity: 0.045; }
.bc-grid { stroke: var(--line); stroke-width: 1; }
.bc-mid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.bc-band { fill: #cce5f5; }
:root[data-theme="dark"] .bc-band { fill: #2b4a63; }
.bc-bar { fill: #8bb8dc; }
.bc-line { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.bc-hit { fill: transparent; }
.bc-hit:hover { fill: var(--ink); fill-opacity: 0.06; }
.bc-dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--ink); }
.bc-x { position: relative; height: 14px; margin: 3px 35px 0 29px; font-size: 10px; color: var(--muted); }
.bc-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.bc-x span.first { transform: none; }
.bc-x span.day { color: var(--ink); font-weight: 700; }
.bc-cert { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin: 9px 1px 0; font-size: 10.5px; color: var(--muted); }
.bc-cert .lbl, .bc-cert .st { font-weight: 700; }
.bc-cert .track { align-self: center; height: 6px; border-radius: 8px; overflow: hidden; display: flex; background: var(--chip); }
.bc-cert .track i { display: block; height: 6px; }
.bc-cert .track i.h { background: #2b9e6d; }
.bc-cert .track i.m { background: #e9ac2a; }
.bc-cert .track i.l { background: #d0573f; }
.bc-key { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 10px 1px 2px; font-size: 10.5px; color: var(--muted); }
.bc-key span { display: flex; align-items: center; gap: 4px; }
.bc-key i { display: inline-block; }
.bc-key .k-line { width: 14px; border-top: 3px solid var(--ink); }
.bc-key .k-band { width: 14px; height: 8px; background: #cce5f5; border-radius: 2px; }
.bc-key .k-bar { width: 7px; height: 9px; background: #8bb8dc; border-radius: 2px; }
.bf-days { display: flex; margin-top: 10px; }
.bf-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 3px; text-align: center; }
.bf-day:not(:last-child) { border-right: 1px solid var(--line); }
.bf-day .d { font-size: 12px; color: var(--muted); font-weight: 700; }
.bf-day svg { width: 30px; height: 30px; }
.bf-day .t { font-size: 13px; color: var(--muted); }
.bf-day .t b { font-size: 15px; font-weight: 800; color: var(--ink); }
.bf-day .p { font-size: 12px; color: #1760a8; font-weight: 650; }
:root[data-theme="dark"] .bf-day .p { color: #7fb4ea; }
.eyebrow.gl-h { font-size: 12px; color: var(--accent); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin: 20px 1px 8px; }
.glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.gl { border: 1px solid var(--line); background: var(--card); border-radius: 13px; padding: 10px 8px; min-height: 99px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; box-sizing: border-box; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.gl:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(24, 37, 46, 0.12); }
.gl:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.flash { animation: flash 1.2s ease-out; border-radius: 10px; }
@keyframes flash { 0%, 30% { background-color: rgba(31, 111, 178, 0.16); } 100% { background-color: transparent; } }
#measured, .s-h, .row { scroll-margin-top: 8px; }
.gl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.gl .l, .gl .n { font-size: 10.5px; color: var(--muted); }
.gl b { font-size: 13px; letter-spacing: -0.02em; }
.gl.g-sun { background: linear-gradient(160deg, #fff7dc, #e8f5fb 66%); }
.gl.g-sun svg { color: #e5a21a; }
.gl.g-sun svg circle { fill: #e5a21a; }
.gl.g-moon { background: linear-gradient(160deg, #eef0fb, #c9d3ec); }
.gl.g-moon svg circle { fill: #ffffff; }
.gl.g-moon svg .lit { fill: currentColor; stroke: none; }
.gl.g-aurora { background: linear-gradient(160deg, #163f4e, #0f2a35); border-color: transparent; color: #ffffff; }
.gl.g-aurora .l, .gl.g-aurora .n { color: rgba(255, 255, 255, 0.78); }
.gl.g-aurora svg { color: #7fe0b0; }
.gl.g-wind { background: linear-gradient(160deg, #f1f8fb, #dcecf4); }
.gl.g-wind svg { color: #2a7bb5; }
:root[data-theme="dark"] .gl { background: var(--card); }
:root[data-theme="dark"] .gl.g-sun, :root[data-theme="dark"] .gl.g-moon, :root[data-theme="dark"] .gl.g-wind { background: var(--card); }
/* Each row is a card of its own. */
.rows { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.row { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
:root[data-theme="dark"] .row { background: var(--card); }
.row > summary { display: grid; grid-template-columns: 34px 1fr 14px; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; }
.row > summary::-webkit-details-marker { display: none; }
.row .ri { --rc: var(--accent); width: 34px; height: 34px; padding: 8px; border-radius: 10px; fill: none; stroke: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#row-days .ri { --rc: var(--c-sky); }
#row-snow .ri { --rc: var(--c-cyan); }
#row-air .ri { --rc: var(--c-mint); }
#row-sun .ri { --rc: var(--c-sun); }
#row-moon .ri { --rc: var(--c-violet); }
#row-aurora .ri { --rc: var(--c-mint); }
.row { transition: box-shadow 0.15s, border-color 0.15s; }
.row:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 4px 14px rgba(31, 79, 140, 0.08); }
.row .rt { display: flex; flex-direction: column; gap: 1px; }
.row .rt b { font-size: 15px; }
.row .rt small { font-size: 13px; color: var(--muted); }
.row .chev { width: 12px; height: 12px; fill: none; stroke: var(--muted); stroke-width: 1.6; transform: rotate(-90deg); transition: transform 0.15s; }
.row[open] .chev { transform: none; }
.row-body { padding: 0 16px 14px; }
.row-body > section:first-child, .row-body > .fc-chart:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.fc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; margin-bottom: 8px; }
.fc-legend.below { margin: 10px 0 0; }
/* A row's readings list (snow, air), and the same lists in the wide view. */
.row-facts .facts { margin: 0; }
.row-facts .facts dd small, .w-facts .facts dd small { display: block; margin-left: 0; }
.row-facts .facts dt, .w-facts .facts dt { align-self: start; }
.fc-legend small { color: var(--muted); font-size: 11.5px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0.5px; background: currentColor; }
.smhi .dot { background: var(--c-smhi); }
.met .dot { background: var(--c-met); }
.openmeteo .dot { background: var(--c-openmeteo); }
.dmi .dot { background: var(--c-dmi); }
.fmi .dot { background: var(--c-fmi); }

.fc-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; -webkit-overflow-scrolling: touch; }
.fc-table { width: 100%; min-width: 560px; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.fc-table thead th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 0 0 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-table thead th:first-child { width: 54px; }
.fc-table tbody th { font-size: 12.5px; font-weight: 500; color: var(--muted); text-align: left; padding: 5px 0; white-space: nowrap; vertical-align: middle; }
.fc-table tbody th .d { display: block; color: var(--ink); font-weight: 700; font-size: 12px; }
.fc-table td { padding: 4px 0 4px 4px; vertical-align: middle; white-space: nowrap; }
.fc-table td b { font-size: 14px; font-weight: 600; margin-left: 3px; vertical-align: middle; }
.fc-table td .lo { font-size: 12.5px; color: var(--muted); margin-left: 4px; vertical-align: middle; }
.fc-table td small { display: block; font-size: 11px; color: var(--drop); margin-left: 25px; line-height: 1; min-height: 0; }
.fc-table td.na { color: var(--muted); }
.fc-table .avg { background: rgba(31, 111, 178, 0.08); }
.fc-table td.avg b { font-weight: 700; }
.fc-table tbody tr + tr { border-top: 1px solid var(--line); }
.fc-table tr.newday { border-top: 2px solid var(--line); }
/* Rows where the sources disagree get a quiet mark at the edge, not an alarm. */
.fc-table tr.split th { box-shadow: inset 3px 0 0 var(--warn); padding-left: 7px; }
.fc-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.4; }

.wx { width: 22px; height: 22px; vertical-align: middle; overflow: visible; }
.wx-none { display: inline-block; width: 22px; }
.i-sun circle { fill: var(--sun); }
.i-sun line { stroke: var(--sun); stroke-width: 1.6; stroke-linecap: round; }
.i-moon { fill: var(--moon); }
.i-cloud { fill: var(--cloud); }
.i-cloud.dim { fill: var(--cloud-dim); }
.i-drop { stroke: var(--drop); stroke-width: 1.8; stroke-linecap: round; }
.i-flake { fill: var(--flake); }
.i-bolt { fill: var(--bolt); }
.i-fog line { stroke: var(--cloud); stroke-width: 2; stroke-linecap: round; }

@media (min-width: 701px) {
  /* A little more room for three forecast columns. */
  .panel { width: 396px; }
}

/* Map layer toggles */
.layers { position: fixed; top: 14px; right: 14px; z-index: 2; display: flex; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 10px; box-shadow: var(--shadow); }
.layers button { border: 0; background: none; padding: 7px 12px; border-radius: 7px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.layers button:hover { color: var(--ink); }
.layers button[aria-pressed="true"] { background: var(--brand-grad); color: #ffffff; font-weight: 600; box-shadow: 0 3px 10px rgba(75, 110, 240, 0.3); }
/* Phones: one compact row across the top, scrolling sideways rather than wrapping; the
   update times are left out (the buttons' tooltips still say how fresh each layer is). */
@media (max-width: 700px) {
  .layers { top: 8px; left: 8px; right: 8px; padding: 2px; gap: 2px; overflow-x: auto; scrollbar-width: none; border-radius: 11px; }
  .layers::-webkit-scrollbar { display: none; }
  .layers button { flex: 1 0 auto; padding: 6px 9px; font-size: 12.5px; white-space: nowrap; }
  .layers button span + span { display: none; }
}

/* Radar and cloud playback cards, stacked right under the layer buttons. */
.players { position: fixed; top: 60px; right: 14px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.player { width: 340px; display: grid; gap: 6px; padding: 8px 12px 8px 10px; background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 10px; box-shadow: var(--shadow); }
.player[hidden] { display: none; }
.player-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 13px; line-height: 1.2; }
.player-icon { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.player-title { font-weight: 600; color: var(--ink); white-space: nowrap; }
.player-span { color: var(--muted); white-space: nowrap; }
.player-at { margin-left: auto; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.player-at b { color: var(--ink); font-weight: 600; }
.player-body { display: flex; align-items: flex-start; gap: 10px; }
.player-play { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 9px; background: var(--brand-grad); color: #ffffff; cursor: pointer; box-shadow: 0 3px 10px rgba(75, 110, 240, 0.3); }
.player-play:hover { filter: brightness(1.08); }
.player-play svg { width: 14px; height: 14px; fill: currentColor; }
.player-play .i-load { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 22 13; transform-box: fill-box; transform-origin: center; animation: player-spin 0.9s linear infinite; }
.player-play[data-state="paused"] :is(.i-pause, .i-load),
.player-play[data-state="playing"] :is(.i-play, .i-load),
.player-play[data-state="loading"] :is(.i-play, .i-pause) { display: none; }
@keyframes player-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .player-play .i-load { animation: none; } }
.player-track { flex: 1; min-width: 0; padding-top: 2px; }
.player-track input[type="range"] { display: block; width: 100%; margin: 0; accent-color: #5b7ff0; }
/* One tick per frame, inset by half the slider thumb so they line up with its stops. */
.player-ticks { display: flex; justify-content: space-between; padding: 0 7px; height: 4px; margin-top: 1px; }
.player-ticks span { width: 1px; height: 4px; background: var(--muted); opacity: 0.5; }
.player-ends { display: flex; justify-content: space-between; margin-top: 2px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Phones: the player as a small capsule (play, timeline, time) at the right under the layer
   bar, see-through, so it hides as little of the map as possible. */
@media (max-width: 700px) {
  .players { top: 46px; left: auto; right: 8px; align-items: flex-end; }
  .player { width: min(230px, calc(100vw - 16px)); grid-template-columns: 1fr auto; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .player-head { order: 2; flex-wrap: nowrap; }
  .player-icon, .player-span { display: none; }
  .player-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .player-at { margin: 0; font-size: 11px; }
  .player-at span { display: none; }
  .player-body { align-items: center; gap: 6px; }
  .player-play { width: 24px; height: 24px; border-radius: 50%; }
  .player-play svg { width: 11px; height: 11px; }
  .player-track input[type="range"] { height: 14px; }
  .player-track { padding-top: 0; }
  .player-ticks, .player-ends { display: none; }
}

.sea-badge-icon { font-size: 15px; }

/* Weather symbol line in the station card */
.now-sym { display: flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.now-sym .wx { width: 26px; height: 26px; }

/* Legend swatches drawn like the map badges: neutral icon tile joined to a temperature tab. */
.legend .key { background: linear-gradient(90deg, #ffffff 0 46%, #f4cf78 46%); border: 1px solid var(--line); }
:root[data-theme="dark"] .legend .key { background: linear-gradient(90deg, #2a3741 0 46%, #f4cf78 46%); }
.legend .key.ringed { border-color: transparent; box-shadow: 0 0 0 1.5px var(--ink); }
.legend .legend-note { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }

/* Next two hours (Nowcast) */
.nc { margin-bottom: 14px; padding: 12px 14px; border: 1px solid #cfe2f1; border-radius: 14px; background: linear-gradient(160deg, #eef6fc, #e3eff9); }
:root[data-theme="dark"] .nc { border-color: #2f4a60; background: linear-gradient(160deg, #22394b, #1d3141); }
.nc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.nc-head .wx { width: 40px; height: 40px; flex: none; }
.nc-head h3 { margin: 0; font-size: 18px; }
.nc-sky { font-size: 13px; color: var(--muted); }
.nc-radar { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.nc-radar li { display: flex; align-items: flex-start; gap: 7px; }
.nc-radar li + li { margin-top: 4px; }
.nc-ri { width: 15px; height: 15px; flex: none; margin-top: 1px; fill: none; stroke: #2a7bb5; stroke-width: 1.3; stroke-linecap: round; }
.nc-ri .echo { fill: #2b9e6d; stroke: none; }
:root[data-theme="dark"] .nc-ri { stroke: #7fb4ea; }
.nc-note { margin: 6px 0 0; font-size: 12.5px; color: #8b5512; }
:root[data-theme="dark"] .nc-note { color: #f3c977; }
.nc-radar b { color: var(--ink); font-weight: 600; }
.nc-feels { font-size: 13.5px; color: var(--muted); }
.nc-feels b { color: var(--ink); font-weight: 600; }
.nc-text { font-size: 14.5px; line-height: 1.45; }
.nc-text.muted { color: var(--muted); }
.nc-bars { display: block; width: 100%; height: auto; margin: 8px 0 2px; }
.nc-bars rect { fill: var(--drop); }
.nc-bars line { stroke: var(--line); }
.nc-bars line.g { stroke: rgba(24, 37, 46, 0.12); }
:root[data-theme="dark"] .nc-bars line.g { stroke: rgba(230, 237, 241, 0.14); }
.nc-bars text.t { font-weight: 600; }
.nc-bars text { font-size: 10.5px; fill: var(--muted); font-family: var(--font); }
.nc-src { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* Aurora watch */
.aurora, .lightning, .snow { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 14px; }
.aurora h3, .lightning h3, .snow h3 { margin: 0 0 4px; }
.lightning p, .aurora p, .snow p { font-size: 14px; line-height: 1.45; color: var(--muted); }
.aurora.active p { color: var(--ink); }
.aurora.active h3::before { content: "✦ "; color: var(--c-dmi); }
/* Chance of thunder in a forecast cell (SMHI). */
.fc-table .th { display: inline-flex; align-items: center; gap: 1px; color: var(--warn); white-space: nowrap; }
.fc-table .th svg { width: 10px; height: 10px; fill: currentColor; }

/* "Expand forecast & compare sources" and the wide view it opens beside the panel. */
.expand { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 16px; padding: 14px; border: 0; border-radius: 13px; font: inherit; font-size: 15.5px; font-weight: 700; color: #ffffff; background: var(--brand-grad); box-shadow: 0 8px 20px rgba(75, 110, 240, 0.3); cursor: pointer; transition: filter 0.15s, transform 0.15s; }
.expand:hover { filter: brightness(1.07); transform: translateY(-1px); }
.expand[aria-expanded="true"] { background: var(--chip); color: var(--ink); box-shadow: none; }
.expand-note { margin: 8px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.wide { position: fixed; top: 14px; bottom: 14px; left: 458px; width: min(860px, calc(100vw - 472px)); overflow: auto; z-index: 2; padding: 20px; box-sizing: border-box; background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 14px; box-shadow: var(--shadow); }
.wide[hidden] { display: none; }
.wide .eyebrow { font-size: 11px; letter-spacing: 0.08em; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.w-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.w-head h2 { margin: 4px 0 2px; font-size: 24px; }
.w-head p { margin: 0; font-size: 13px; color: var(--muted); }
.w-close { flex: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
:root[data-theme="dark"] .w-close { background: var(--card); }
.w-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.w-stat { display: flex; flex-direction: column; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
:root[data-theme="dark"] .w-stat { background: var(--card); }
.w-stat span, .w-stat small { font-size: 12px; color: var(--muted); }
.w-stat b { font-size: 19px; letter-spacing: -0.02em; }
.w-card { background: var(--card); border: 1px solid var(--line); border-radius: 17px; padding: 16px; margin-bottom: 14px; }
:root[data-theme="dark"] .w-card { background: var(--card); }
.w-card h3 { margin: 0; font-size: 17px; }
/* The readings in two pairs of columns; the wide view has room. */
.w-facts .facts { grid-template-columns: auto 1fr auto 1fr; margin: 0; }
.w-ct { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
details.w-card > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; }
details.w-card > summary::-webkit-details-marker { display: none; }
details.w-card > summary span { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
details.w-card[open] > summary { margin-bottom: 10px; }
.w-scroll { overflow-x: auto; }
.w-chart { display: block; width: 100%; min-width: 620px; height: auto; font-family: var(--font); }
.w-chart text { font-size: 11px; fill: var(--muted); }
.w-chart .w-day { font-weight: 700; fill: var(--ink); }
.w-chart .wx { overflow: visible; }
.w-night { fill: var(--ink); opacity: 0.04; }
.w-grid { stroke: var(--line); }
.w-mid { stroke: var(--muted); stroke-opacity: 0.45; stroke-dasharray: 2 3; }
.w-h { stroke: var(--line); }
.w-base { stroke: var(--muted); stroke-opacity: 0.4; }
.w-band { fill: #cce5f5; opacity: 0.85; }
:root[data-theme="dark"] .w-band { fill: #2b4a63; }
.w-line { fill: none; stroke: #277bc1; stroke-width: 2.7; stroke-linejoin: round; stroke-linecap: round; }
.w-bar { fill: #5f9fd6; }
.w-bar.snow { fill: #8bb8dc; }
.w-wind { fill: none; stroke: #8153c6; stroke-width: 2.4; stroke-linejoin: round; }
.w-gust { fill: none; stroke: #8153c6; stroke-width: 1.6; stroke-dasharray: 5 4; }
.w-arrow { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.w-c.h, .k-c.h { fill: #2b9e6d; background: #2b9e6d; }
.w-c.m, .k-c.m { fill: #e9ac2a; background: #e9ac2a; }
.w-c.l, .k-c.l { fill: #d0573f; background: #d0573f; }
.w-hit { fill: transparent; }
.w-hit:hover { fill: var(--ink); fill-opacity: 0.05; }
.w-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.w-key b { color: var(--ink); }
.w-key span { display: inline-flex; align-items: center; gap: 5px; }
.w-key i { display: inline-block; }
.w-key .k-line { width: 16px; border-top: 3px solid #277bc1; }
.w-key .k-band { width: 16px; height: 9px; border-radius: 2px; background: #cce5f5; }
.w-key .k-bar { width: 8px; height: 10px; border-radius: 2px; background: #5f9fd6; }
.w-key .k-wind { width: 16px; border-top: 2.4px solid #8153c6; }
.w-key .k-gust { width: 16px; border-top: 1.6px dashed #8153c6; }
.w-key .k-c { width: 12px; height: 8px; border-radius: 2px; }
.w-tscroll { overflow-x: auto; }
.w-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.w-table th, .w-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.w-table thead th { font-size: 12.5px; font-weight: 700; }
.w-table thead th.smhi { color: var(--c-smhi); }
.w-table thead th.met { color: var(--c-met); }
.w-table thead th.openmeteo { color: var(--c-openmeteo); }
.w-table thead th.dmi { color: var(--c-dmi); }
.w-table thead th.fmi { color: var(--c-fmi); }
.w-table tbody th { text-align: left; font-weight: 400; }
.w-table tbody th b { display: block; font-size: 13.5px; }
.w-table small { display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.w-table tbody th small { justify-content: flex-start; }
.w-table small .wx { width: 16px; height: 16px; }
.w-table .avg { background: rgba(31, 111, 178, 0.08); font-weight: 700; }
.w-note { margin: 10px 0 0; font-size: 11.5px; color: var(--muted); }
@media (max-width: 1100px) {
  .wide { left: 14px; right: 14px; width: auto; z-index: 3; }
}
/* Phones: the detailed view covers the screen; the stat tiles in two columns, the readings in
   one, and card headings wrap with their note on a line of its own. The chart and the 10-day
   table keep their width and scroll sideways. */
@media (max-width: 700px) {
  .wide { inset: 0; width: auto; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; overflow-x: hidden; }
  .w-head { margin-bottom: 12px; }
  .w-head h2 { font-size: 21px; }
  .w-stats { grid-template-columns: 1fr 1fr; }
  .w-stat { padding: 10px; }
  .w-stat b { font-size: 17px; }
  .w-card { padding: 14px 12px; border-radius: 14px; }
  .w-ct { flex-wrap: wrap; row-gap: 2px; }
  .w-ct h3 { font-size: 16px; }
  .w-ct > span:not(.bf-badge) { flex-basis: 100%; letter-spacing: 0.04em; }
  .w-facts .facts { grid-template-columns: auto 1fr; }
  .w-scroll, .w-tscroll { margin: 0 -12px; padding: 0 12px; }
}

/* Sun and moon in detail (the panel's row and the wide view). */
.s-h { margin: 14px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.row-body > .s-h:first-child { margin-top: 2px; }
.s-lead { margin: 0 0 10px; font-size: 13.5px; }
.s-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.s-stat { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
:root[data-theme="dark"] .s-stat { background: var(--card); }
.s-stat span, .s-stat small { font-size: 11.5px; color: var(--muted); }
.s-stat b { font-size: 15px; }
.s-curve { position: relative; margin-top: 12px; }
.s-curve svg { display: block; width: 100%; height: 96px; border-radius: 10px; }
.s-night { fill: #1d2a44; }
.s-naut { fill: #3b4f7a; }
.s-civil { fill: #8ea3cf; }
.s-day { fill: #d7ebf8; }
.s-tick { stroke: #ffffff; stroke-opacity: 0.25; vector-effect: non-scaling-stroke; }
.s-horizon { stroke: #ffffff; stroke-opacity: 0.8; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.s-path { fill: none; stroke: #f3b52a; stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.s-now { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #f3b52a; border: 2px solid #ffffff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.s-hours { display: flex; justify-content: space-between; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.m-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.m-head > div { display: flex; flex-direction: column; gap: 2px; }
.m-head b { font-size: 15px; }
.m-head span { font-size: 12.5px; color: var(--muted); }
.m-icon { width: 40px; height: 40px; flex: none; }
.m-day { fill: #d7ebf8; }
.m-civil { fill: #8ea3cf; }
.m-naut { fill: #3b4f7a; }
.m-night { fill: #1d2a44; }
.m-below { fill: #0b1220; opacity: 0.35; }
.m-path { fill: none; stroke: #e9e4cc; stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-now { background: #f4f1e2; }
.m-dark { fill: #3b4f7a; }
.m-lit { fill: #f4f1e2; }
.gl .m-icon { width: 20px; height: 20px; stroke: none; }
.gl .m-icon .m-dark { fill: #5d6f99; }
.gl .m-icon .m-lit { fill: #ffffff; }
.wide .w-sec { margin: 22px 1px 10px; }
.wide .aurora { border-top: 0; padding-top: 0; margin: 0; }
.wide .aurora h3 { display: none; }

/* Aurora in detail. */
.a-call { margin-bottom: 10px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(160deg, #163f4e, #0f2a35); color: #ffffff; }
.a-call b { font-size: 15px; }
.a-call p { margin: 4px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.82); }
.a-call.go { background: linear-gradient(160deg, #13593f, #0f3a33); }
.a-call.maybe { background: linear-gradient(160deg, #1d4a5c, #173a44); }
.a-time { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
:root[data-theme="dark"] .a-time { background: var(--card); }
.al-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.al-head span { font-size: 11.5px; color: var(--muted); }
.al-grid { display: grid; grid-template-columns: 100px 1fr; gap: 7px 8px; align-items: center; }
.al-name { display: flex; flex-direction: column; line-height: 1.2; }
.al-name b { font-size: 12px; }
.al-name small { font-size: 10.5px; color: var(--muted); }
.al-cells { position: relative; display: grid; grid-template-columns: repeat(24, 1fr); gap: 1px; height: 16px; }
.al-cells i { display: block; border-radius: 2px; background: var(--chip); }
.al-cells.dark i.on { background: #1d2a44; }
.al-cells.sky i.on { background: #1f6fb2; }
.al-cells.sky i.off { background: #b9c3ca; }
.al-cells.sky i.na { background: repeating-linear-gradient(45deg, var(--chip) 0 3px, transparent 3px 6px); }
.al-cells.kp { height: 40px; }
.al-cells.kp i { position: relative; background: transparent; }
.al-cells.kp b { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 2px 2px 0 0; background: #9fb3c4; }
.al-cells.kp b.on { background: #2b9e6d; }
.al-cells.kp b.storm { background: #8153c6; }
.al-need { position: absolute; left: 0; right: 0; border-top: 1.5px dashed #d0573f; pointer-events: none; }
.al-cells.win { height: 20px; }
.al-cells.win i.on { background: #2b9e6d; }
.al-axis { position: relative; height: 14px; font-size: 10px; color: var(--muted); }
.al-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.al-axis span.first { transform: none; }
.al-axis span.day { color: var(--ink); font-weight: 700; }
.a-nights { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.a-nights li { display: grid; grid-template-columns: 1fr auto 1.6fr; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13px; }
.a-nights li + li { border-top: 1px solid var(--line); }
.a-nights span:last-child { color: var(--muted); font-size: 12.5px; }
.a-kp { padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--chip); }
.a-kp.on { background: #dcf2e6; color: #1d6b48; }
.a-kp.maybe { background: #fff1d4; color: #8b5512; }
.w-ct > span:not(.bf-badge) { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* The best forecast card: the story, then the chart, then the days; the sources at its foot. */
.bf-story { margin: 12px 0 4px; font-size: 15px; line-height: 1.4; }
.bf-card .bc-key { margin-top: 6px; }
.bf-card .bc-cert { margin-top: 8px; }
.bf-cmp { margin: 12px -16px -16px; border-top: 1px solid var(--line); }
.bf-cmp > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.bf-cmp > summary::-webkit-details-marker { display: none; }
.bf-cmp > summary > span { display: flex; flex-direction: column; gap: 1px; }
.bf-cmp > summary b { font-size: 14px; color: var(--accent); }
:root[data-theme="dark"] .bf-cmp > summary b { color: #7fb4ea; }
.bf-cmp > summary small { font-size: 12px; color: var(--muted); }
.bf-cmp .chev { width: 12px; height: 12px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.6; transition: transform 0.15s; }
.bf-cmp[open] .chev { transform: rotate(180deg); }
.bf-cmp[open] > summary { border-bottom: 1px solid var(--line); }
.bf-cmp-body { padding: 10px 16px 14px; }

/* The best forecast chart: temperature, precipitation and agreement on one time axis. */
.bc-chart { display: block; width: calc(100% + 20px); height: auto; margin: 6px -10px 0; font-family: var(--font); }
.bc-chart text { font-size: 11.5px; fill: var(--muted); }
.bc-chart text.day { fill: var(--ink); font-weight: 700; }
.bc-chart .bc-lab { font-size: 10.5px; }
.bc-chart .bc-base { stroke: var(--muted); stroke-opacity: 0.35; }
.bc-chart .bc-grid { stroke: var(--line); stroke-width: 1; }
.bc-chart .bc-mid { stroke: var(--muted); stroke-opacity: 0.35; stroke-dasharray: 2 3; }
.bc-chart .bc-night { fill: var(--ink); opacity: 0.045; }
.bc-chart .bc-line { stroke-width: 2.6; }
.bc-chart .bc-now { fill: var(--ink); }
.bc-chart .bc-bar.snow { fill: #8bb8dc; }
.bc-chart .bc-bar { fill: #5f9fd6; }
.bc-c.h, .bc-key .k-c.h { fill: #2b9e6d; background: #2b9e6d; }
.bc-c.m, .bc-key .k-c.m { fill: #e9ac2a; background: #e9ac2a; }
.bc-c.l, .bc-key .k-c.l { fill: #d0573f; background: #d0573f; }
.bc-key .k-c { width: 10px; height: 8px; border-radius: 2px; }
.bc-key .k-night { width: 12px; height: 9px; border-radius: 2px; background: var(--ink); opacity: 0.12; }
.bf-card .bc-key + .bc-key { margin-top: 2px; }
/* The sources, compact enough for five columns in the panel. */
.fc-compact .fc-scroll { margin: 0; padding: 0; }
.fc-compact .fc-table { min-width: 0; }
.fc-compact .fc-table thead th { padding: 0 0 6px; font-size: 10.5px; letter-spacing: -0.01em; text-align: center; text-overflow: clip; }
.fc-compact .fc-table thead th:first-child { width: 44px; text-align: left; }
.fc-compact .fc-table thead .dot { display: block; margin: 0 auto 3px; }
.fc-compact .fc-table td { padding: 5px 1px; text-align: center; }
.fc-compact .fc-table td .wx { display: block; width: 20px; height: 20px; margin: 0 auto; }
.fc-compact .fc-table td b { display: block; margin: 1px 0 0; font-size: 13.5px; }
.fc-compact .fc-table td small { margin: 1px 0 0; font-size: 10.5px; }
.fc-compact .fc-table tbody th { font-size: 12px; }
.fc-compact .fc-chart { margin-bottom: 4px; }

/* The weather loader (loader.js): sun, then a cloud covers it and darkens, then rain; and back.
   One story played forwards and backwards (alternate), 5 s each way, eased throughout. */
.ld { display: flex; align-items: center; gap: 12px; padding: 8px 2px; color: var(--muted); font-size: 13.5px; }
.ld-scene { width: 48px; height: 48px; flex: none; overflow: visible; }
.ld-fig { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.ld-cap { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); }
:root[data-theme="dark"] .ld-cap { color: #7fb4ea; }
.ld-cap i { font-style: normal; animation: ld-dot 1.2s ease-in-out infinite; }
.ld-cap i:nth-child(2) { animation-delay: 0.2s; }
.ld-cap i:nth-child(3) { animation-delay: 0.4s; }
@keyframes ld-dot { 0%, 60%, 100% { opacity: 0.2; } 30% { opacity: 1; } }
.ld-sun circle { fill: #f3b52a; }
.ld-rays { stroke: #f3b52a; stroke-width: 2.2; stroke-linecap: round; transform-origin: 20px 19px; animation: ld-spin 8s linear infinite; }
.ld-sun { animation: ld-dim 5s ease-in-out var(--ld-at, 0s) infinite alternate; }
.ld-cover { animation: ld-cover 5s ease-in-out var(--ld-at, 0s) infinite alternate; }
.ld-cloud { stroke: #ffffff; stroke-width: 1.2; animation: ld-darken 5s ease-in-out var(--ld-at, 0s) infinite alternate; }
:root[data-theme="dark"] .ld-cloud { stroke: var(--card); }
.ld-rain { animation: ld-rain 5s ease-in-out var(--ld-at, 0s) infinite alternate; }
.ld-drop { stroke: #3f7cc4; stroke-width: 2; stroke-linecap: round; animation: ld-fall 0.9s linear infinite; }
@keyframes ld-spin { to { transform: rotate(360deg); } }
/* 0-15 %: sun alone. 15-45 %: the cloud glides in over it. 45-65 %: it darkens. 65-85 %: rain sets in. */
@keyframes ld-cover { 0%, 15% { transform: translateX(30px); opacity: 0; } 25% { opacity: 1; } 45%, 100% { transform: translateX(0); opacity: 1; } }
@keyframes ld-dim { 0%, 25% { opacity: 1; } 50%, 100% { opacity: 0.7; } }
@keyframes ld-darken { 0%, 45% { fill: #dfe6eb; } 65%, 100% { fill: #9aa8b4; } }
@keyframes ld-rain { 0%, 65% { opacity: 0; } 85%, 100% { opacity: 1; } }
@keyframes ld-fall { 0% { transform: translateY(-3px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ld-scene *, .ld-cap i { animation: none !important; }
  .ld-cover, .ld-rain { opacity: 0; }
}

/* Smooth opening and closing. The fold-outs animate their height where the browser can
   (Chrome and Edge: interpolate-size and ::details-content); elsewhere they open as before. */
:root { interpolate-size: allow-keywords; }
.row::details-content, .bf-cmp::details-content {
  height: 0; opacity: 0; overflow: clip;
  transition: height 0.28s ease, opacity 0.28s ease, content-visibility 0.28s allow-discrete;
}
.row[open]::details-content, .bf-cmp[open]::details-content { height: auto; opacity: 1; }
/* The stations behind the temperature, and the wide view, ease in as they appear. */
.wide { transition: opacity 0.25s ease, transform 0.25s ease, display 0.25s allow-discrete, overlay 0.25s allow-discrete; }
.wide[hidden] { opacity: 0; transform: translateX(-16px); }
@starting-style { .wide:not([hidden]) { opacity: 0; transform: translateX(-16px); } }
@media (prefers-reduced-motion: reduce) {
  .row::details-content, .bf-cmp::details-content, .wide { transition: none; }
}

/* The ten days, in the panel: compact like the sources, on a card of its own. */
.days-card { padding: 10px 10px 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
:root[data-theme="dark"] .days-card { background: var(--card); }
.fc-compact .fc-table td .lo { display: block; margin: 0; font-size: 11.5px; }
.fc-compact .fc-table tbody th .d, .fc-compact .fc-table tbody th { white-space: normal; }
/* Inside its row the ten days need no card of their own; the row is the card. */
.row .days-card { border: 0; padding: 0; background: none; }

/* Icons in the wide view: stat tiles and card headings. */
.wide .wi { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.w-stat .wl { display: flex; align-items: center; gap: 6px; }
.w-card h3 { display: flex; align-items: center; gap: 8px; }
.w-card h3 .wi { width: 20px; height: 20px; }

/* Weather warnings: banners in the panel, a card in the wide view, a lane in its chart. */
.wn-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; }
.wn { border-radius: 14px; border: 1px solid var(--wn-edge); background: var(--wn-bg); --wn-ink: #18252e; }
.wn > summary { display: grid; grid-template-columns: 34px 1fr 14px; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; list-style: none; }
.wn > summary::-webkit-details-marker { display: none; }
.wn-head { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 12px; padding: 11px 14px 4px; }
.wn-i { width: 34px; height: 34px; padding: 7px; box-sizing: border-box; border-radius: 10px; background: var(--wn-chip); fill: none; stroke: var(--wn-icon); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.wn-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; color: var(--wn-ink); }
.wn-l { font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--wn-label); }
.wn-t b { font-size: 15px; }
.wn-t small { font-size: 12.5px; color: #3f4f5a; }
.wn .chev { width: 12px; height: 12px; fill: none; stroke: #3f4f5a; stroke-width: 1.6; transition: transform 0.15s; }
.wn[open] .chev { transform: rotate(180deg); }
.wn-body { padding: 0 14px 12px 60px; color: var(--wn-ink); font-size: 13.5px; line-height: 1.45; }
.wn-body h5 { margin: 8px 0 2px; font-size: 12.5px; }
.wn-body p { margin: 0 0 4px; }
.wn-body a { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--accent); }
.wn.lv-yellow { --wn-bg: #fff3c4; --wn-edge: #f0cd55; --wn-chip: #ffe27a; --wn-icon: #7a5300; --wn-label: #7a5300; }
.wn.lv-orange { --wn-bg: #ffe2c6; --wn-edge: #f2a35c; --wn-chip: #ffc58f; --wn-icon: #8a3d00; --wn-label: #8a3d00; }
.wn.lv-red { --wn-bg: #ffd6d2; --wn-edge: #e57367; --wn-chip: #ffaaa1; --wn-icon: #8f1d12; --wn-label: #8f1d12; }
.wn.lv-message { --wn-bg: #e8f0f6; --wn-edge: #c3d6e5; --wn-chip: #d1e2ef; --wn-icon: #2f5f86; --wn-label: #2f5f86; }
.w-card .wn + .wn { margin-top: 8px; }
.w-wn.lv-yellow, .k-wn.lv-yellow { fill: #f2c94c; background: #f2c94c; }
.w-wn.lv-orange, .k-wn.lv-orange { fill: #f2994a; background: #f2994a; }
.w-wn.lv-red, .k-wn.lv-red { fill: #e5534b; background: #e5534b; }
.w-wn.lv-message, .k-wn.lv-message { fill: #9fb6c9; background: #9fb6c9; }
.w-key .k-wn { width: 12px; height: 8px; border-radius: 2px; }
.wn::details-content { height: 0; opacity: 0; overflow: clip; transition: height 0.28s ease, opacity 0.28s ease, content-visibility 0.28s allow-discrete; }
.wn[open]::details-content { height: auto; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .wn::details-content { transition: none; } }

/* "Show the weather where you are?" and the locate button. */
.geo-ask { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 4; width: min(440px, calc(100vw - 28px)); box-sizing: border-box; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-edge); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.geo-ask[hidden] { display: none; }
.geo-ask p { margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.geo-ask p span { font-size: 12.5px; color: var(--muted); }
.geo-btns { display: flex; gap: 8px; justify-content: flex-end; }
.geo-btns button { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--chip); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.geo-btns button.primary { background: #1f6fb2; border-color: var(--accent); color: #ffffff; }
.locate-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.9; stroke-linecap: round; }
.locate-btn.busy svg { animation: ld-spin 1.2s linear infinite; }
@media (max-width: 700px) { .geo-ask { bottom: auto; top: 92px; } }

/* About & privacy: a link in the panel's footer, opening a dialog. */
.about-link { margin-left: auto; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.about-link:hover { color: var(--ink); }
.about { width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 48px); box-sizing: border-box; padding: 18px 22px 20px; border: 1px solid var(--panel-edge); border-radius: 16px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); font-size: 14px; line-height: 1.5; }
.about::backdrop { background: rgba(10, 20, 28, 0.35); }
.about-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.about-head h2 { margin: 0; font-size: 19px; }
.about-close { width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--chip); font-size: 20px; line-height: 1; color: var(--ink); cursor: pointer; }
.about h3 { margin: 16px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.about ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.about p { margin: 0 0 8px; }
.about-small { font-size: 12.5px; color: var(--muted); }

/* Slim scrollbars that match the panel. */
.body, .w-scroll, .fc-scroll, .w-tscroll { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 35%, transparent) transparent; }
