/* Saint-Ammoniac
   Violet marks the geographic wind sector used in the analysis.
   The four concentration colours are descriptive, not health categories. */

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('./vendor/fonts/schibsted-grotesk-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url('./vendor/fonts/schibsted-grotesk-latin-italic.woff2') format('woff2');
}

:root {
  --bg: #e9eef0;
  --surface: #f8fafb;
  --ink: #14283a;
  --muted: #536578;
  --line: #cbd5dc;
  --line-soft: #dde4e9;
  --tide: #1d6a8a;
  --plume: #6a3fb5;
  --plume-deep: #4b2690;
  --plume-soft: #ebe4f7;
  --l0: #9fc2b4;
  --l1: #e9b949;
  --l2: #dd6b2a;
  --l3: #a61e3c;
  --none: #d4dbe0;
  --radius-l: 20px;
  --radius-m: 12px;
  --radius-s: 8px;
  --shadow: 0 1px 0 rgb(20 40 58 / .06), 0 12px 32px -18px rgb(20 40 58 / .35);
  --font: 'Schibsted Grotesk', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--tide); text-underline-offset: .18em; }
button, input, select { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--tide); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-s); z-index: 2000; }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button.primary { background: var(--ink); color: #fff; }
.button.primary:hover { background: #23405a; }
.button.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.button.ghost:hover { border-color: var(--ink); }
.button.small { min-height: 36px; font-size: 14px; padding: 0 14px; }
.button:disabled { opacity: .5; cursor: progress; }

/* ---------- Header ---------- */

.top {
  max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.wordmark svg { width: 30px; height: 30px; }
.wordmark path { fill: var(--plume); }
.wordmark circle { fill: var(--ink); }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 12px; min-height: 44px; border-radius: 999px; white-space: nowrap; }
.top nav a:hover { background: rgb(20 40 58 / .07); }

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(12px, 3vw, 36px) var(--gutter) clamp(48px, 7vw, 96px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 64px); align-items: center;
}
.hero-place { color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 4.1rem); font-weight: 800; letter-spacing: -.028em; line-height: 1.02; }
.hero-lead { margin-top: 18px; font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 34em; color: #2b4256; }
.hero-caveat { margin-top: 12px; color: var(--muted); font-size: 14px; max-width: 39em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
.hero-method-link { font-weight: 600; font-size: 15px; }
.hero-odds { margin: 28px 0 20px; display: grid; gap: 14px; max-width: 32em; }
.odds p { font-size: 17px; }
.odds-n { font-weight: 800; font-size: 1.35em; color: var(--plume); letter-spacing: -.01em; }
.odds.is-quiet .odds-n { color: var(--ink); }
.dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--plume); }
.odds.is-quiet .dots i.on { background: var(--ink); }

.hero-method { margin: 0; font-size: 13px; color: var(--muted); max-width: 40em; }

.hero-figure { margin: 0; }
.hero-map {
  height: clamp(380px, 62vh, 640px); border-radius: var(--radius-l); overflow: hidden;
  background: #dde5e8; box-shadow: var(--shadow);
}
.hero-figure figcaption { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; color: var(--muted); font-size: 15px; max-width: 40em; }
.petal-key { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.petal-key path { fill: var(--plume); }

/* ---------- Leaflet skin ---------- */

.leaflet-container { font-family: var(--font); background: #dde5e8; }
/* Quiet, cool-toned basemap so the data layers carry the colour. */
.leaflet-tile-pane { filter: grayscale(1) sepia(.18) hue-rotate(165deg) saturate(.7) brightness(1.06) contrast(.88); }
.leaflet-control-attribution { font-size: 11px; background: rgb(248 250 251 / .85) !important; }
.leaflet-bar { border: none !important; box-shadow: var(--shadow) !important; }
.leaflet-bar a { color: var(--ink) !important; }
.map-label.leaflet-tooltip {
  background: var(--surface); border: none; border-radius: 999px; box-shadow: 0 2px 10px rgb(20 40 58 / .18);
  color: var(--ink); font: 600 13px/1 var(--font); padding: 7px 11px;
}
.map-label.leaflet-tooltip::before { display: none; }
.map-tip.leaflet-tooltip { background: var(--ink); color: #fff; border: none; border-radius: var(--radius-s); font: 500 13px/1.35 var(--font); padding: 8px 10px; box-shadow: none; }
.map-tip.leaflet-tooltip::before { display: none; }

.pin span { display: block; width: 100%; height: 100%; border-radius: 50%; }
.pin-sensor span { background: var(--ink); border: 4px solid #fff; box-shadow: 0 1px 6px rgb(20 40 58 / .4); }
.pin-site span { background: #fff; border: 5px solid var(--plume); box-shadow: 0 1px 6px rgb(20 40 58 / .3); }
.pin-site:not(.is-main) span { border-color: #9a82c9; }
.pin-site.is-in-sector span { box-shadow: 0 0 0 5px rgb(106 63 181 / .25), 0 1px 6px rgb(20 40 58 / .3); }

.rose-ring { fill: none; stroke: var(--ink); stroke-opacity: .18; stroke-width: 1; stroke-dasharray: 3 4; }
.rose-petal { fill: #3c5a72; stroke: #fff; stroke-width: 1.5; }
.rose-petal.is-hot { fill: var(--plume); }
.rose-petal:hover { fill-opacity: 1; }

.wind-sector { fill: var(--plume); fill-opacity: .16; stroke: var(--plume); stroke-opacity: .62; stroke-width: 1.5; }
.wind-axis { fill: none; stroke: var(--plume-deep); stroke-opacity: .82; stroke-width: 2; stroke-dasharray: 5 6; }

/* ---------- Explorer ---------- */

.explorer, .understand, .expert { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.explorer { padding-bottom: clamp(56px, 8vw, 112px); scroll-margin-top: 16px; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: 28px; }
.section-head h2, .understand h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 800; letter-spacing: -.022em; }
.section-head p { color: #2b4256; max-width: 36em; }

.episodes { margin-bottom: 20px; }
.episodes h3 { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.episode-list { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.episode {
  flex: none; display: grid; gap: 2px; text-align: left; min-width: 132px;
  padding: 10px 14px 11px; border-radius: var(--radius-m); cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line-soft);
  position: relative; overflow: hidden; transition: border-color .15s;
}
.episode:hover { border-color: var(--ink); }
.episode.is-selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.episode::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c, var(--l2)); }
.episode.l1 { --c: var(--l1); } .episode.l2 { --c: var(--l2); } .episode.l3 { --c: var(--l3); }
.ep-date { font-size: 14px; color: var(--muted); font-weight: 500; }
.ep-value { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.ep-value small { font-size: 13px; font-weight: 500; color: var(--muted); }
.ep-wind { font-size: 13px; color: var(--muted); }
.episode.has-site .ep-wind { color: var(--plume-deep); font-weight: 600; }
.episode.is-provisional { border-style: dashed; }

.custom-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 12px 14px 12px 18px;
  background: var(--plume-soft); border: 1.5px solid var(--plume); border-radius: var(--radius-m);
}
.custom-banner[hidden] { display: none; }
.custom-banner > svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--plume-deep); stroke-width: 1.8; stroke-linecap: round; }
.custom-banner p { flex: 1 1 320px; font-size: 15px; }
.custom-banner strong { color: var(--plume-deep); margin-right: 4px; }
.custom-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px;
  grid-template-areas: "map card" "player player";
  scroll-margin-top: 16px;
}
.stage-map { grid-area: map; position: relative; min-width: 0; }
.map { height: clamp(360px, calc(100vh - 360px), 560px); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); }
.wind-chip {
  position: absolute; top: 14px; left: 14px; z-index: 500;
  display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px;
  background: var(--surface); border-radius: 999px; box-shadow: var(--shadow);
  font-weight: 600; font-size: 15px;
}
.wind-chip svg { width: 38px; height: 38px; }
.wind-chip circle { fill: var(--bg); }
.wind-chip path { fill: var(--ink); transition: transform .35s ease; transform-origin: 20px 20px; transform-box: view-box; }
.wind-chip.is-off path { opacity: .2; }
.map-note { margin-top: 8px; font-size: 14px; color: var(--muted); }

.hour-card {
  grid-area: card; align-self: start;
  background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow);
  padding: 22px 24px 20px; border-top: 8px solid var(--lc, var(--none));
  display: flex; flex-direction: column; gap: 14px;
}
.hour-card[data-level="l0"] { --lc: var(--l0); }
.hour-card[data-level="l1"] { --lc: var(--l1); }
.hour-card[data-level="l2"] { --lc: var(--l2); }
.hour-card[data-level="l3"] { --lc: var(--l3); }
.hc-when { font-weight: 600; font-size: 16px; }
.hc-status { align-self: flex-start; width: fit-content; padding: 3px 10px; border-radius: 999px; background: #e2f1e9; color: #245c3c; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.hc-status[hidden] { display: none; }
.hour-card.is-provisional .hc-status { background: #fff1cf; color: #7b4a08; border: 1px dashed #b47a1d; }
.hour-card.is-provisional .hc-number { text-decoration: underline dashed #b47a1d 2px; text-underline-offset: 7px; }
.hc-value { display: flex; align-items: flex-end; gap: 12px; }
.ep-value, .dc-value, .dc-hour, .r-tick {
  font-variant-numeric: tabular-nums;
}
.hc-number { font-size: 68px; font-weight: 800; letter-spacing: -.035em; line-height: .9; }
.hc-unit { font-size: 14px; line-height: 1.3; color: var(--muted); padding-bottom: 4px; }
.hc-level { font-weight: 700; font-size: 17px; margin-top: -4px; }
.gauge { position: relative; padding-top: 4px; }
.gauge-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; height: 8px; }
.gauge-track i { border-radius: 4px; }
.gauge-track .l0 { background: var(--l0); } .gauge-track .l1 { background: var(--l1); }
.gauge-track .l2 { background: var(--l2); } .gauge-track .l3 { background: var(--l3); }
.gauge-mark {
  position: absolute; top: -1px; width: 18px; height: 18px; margin-left: -9px;
  border-radius: 50%; background: var(--surface); border: 4px solid var(--ink);
  transition: left .3s ease;
}
.gauge-labels { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 7px; font-size: 12px; color: var(--muted); }
.gauge-labels span:nth-child(n+2) { text-align: center; }
.gauge-labels span:last-child { text-align: right; }
.verdict { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius-m); background: #eef3f5; border-left: 5px solid var(--line); }
.verdict strong { font-size: 17px; line-height: 1.25; }
.verdict span { font-size: 15px; color: #2b4256; }
.verdict.is-site { background: var(--plume-soft); border-left-color: var(--plume); }
.verdict.is-site strong { color: var(--plume-deep); }
.verdict.is-unknown { background: transparent; border: 1.5px dashed var(--line); border-left-width: 5px; }
.hc-note { font-size: 14px; color: var(--muted); padding-left: 12px; border-left: 3px solid var(--l1); }
.share { align-self: flex-start; min-height: 38px; font-size: 14px; }

/* ---------- Player ---------- */

.player { grid-area: player; background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 14px 22px 12px; min-width: 0; }
.player-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.play { width: 52px; height: 52px; border-radius: 50%; border: none; background: var(--ink); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.play:hover { background: #23405a; }
.play svg { width: 24px; height: 24px; fill: currentColor; }
.play .i-pause, .is-playing .play .i-play { display: none; }
.is-playing .play .i-pause { display: inline; }
.day-nav { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.day-nav h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; letter-spacing: -.01em; min-width: 0; }
.day-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; cursor: pointer; display: grid; place-items: center; flex: none; }
.day-nav button:hover:not(:disabled) { border-color: var(--ink); }
.day-nav button:disabled { opacity: .35; cursor: default; }
.day-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.calendar-panel { margin-top: 18px; padding: 16px 0 4px; border-top: 1px solid var(--line-soft); }
.calendar-help { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.dot-key { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--plume); vertical-align: middle; margin: 0 2px; }
.calendar { display: grid; gap: 3px; max-width: 860px; }
.cal-row { display: grid; grid-template-columns: 64px repeat(31, minmax(0, 1fr)); gap: 3px; align-items: center; }
.cal-month { font-size: 13px; color: var(--muted); font-weight: 500; grid-column: 1; }
.cal-day { aspect-ratio: 1; min-height: 12px; border: none; padding: 0; border-radius: 3px; cursor: pointer; position: relative; background: var(--none); }
.cal-day.l0 { background: var(--l0); } .cal-day.l1 { background: var(--l1); }
.cal-day.l2 { background: var(--l2); } .cal-day.l3 { background: var(--l3); }
.cal-day.none { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.cal-day.has-provisional { background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / .75) 0 2px, transparent 2px 5px); }
.cal-day.has-site::after { content: ''; position: absolute; left: 50%; top: 50%; width: 36%; height: 36%; transform: translate(-50%, -50%); border-radius: 50%; background: var(--plume); box-shadow: 0 0 0 1.5px #fff; }
.cal-day:hover { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 1; }
.cal-day.is-selected { outline: 3px solid var(--ink); outline-offset: 1px; z-index: 2; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0 67px; font-size: 13px; color: var(--muted); }
.cal-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.cal-legend .l0 { background: var(--l0); } .cal-legend .l1 { background: var(--l1); }
.cal-legend .l2 { background: var(--l2); } .cal-legend .l3 { background: var(--l3); }
.cal-legend .provisional { background: repeating-linear-gradient(135deg, #b47a1d 0 3px, #fff1cf 3px 6px); }

.day-chart {
  --plot: 130px; --below: 46px;
  position: relative; margin-top: 10px;
  display: grid; grid-template-columns: repeat(var(--cols, 24), minmax(0, 1fr)); gap: 3px;
  user-select: none; touch-action: pan-y; cursor: pointer; border-radius: var(--radius-s);
}
.dc-peak {
  position: absolute; left: 0; right: 0; height: 0; pointer-events: none; z-index: 1;
  bottom: calc(var(--below) + var(--plot) * var(--peakf, .3));
  border-top: 1.5px dashed var(--l3); opacity: .7;
}
.peak-off .dc-peak { display: none; }
.dc-col { display: grid; grid-template-rows: 18px var(--plot) 8px 22px 16px; border-radius: 6px; position: relative; }
.dc-col:hover { background: rgb(20 40 58 / .04); }
.dc-col.is-selected { background: rgb(20 40 58 / .08); }
.dc-col.is-selected::after { content: ''; position: absolute; inset: 0; border-radius: 6px; box-shadow: inset 0 0 0 2px var(--ink); pointer-events: none; }
.dc-value { font-size: 11px; font-weight: 600; text-align: center; color: var(--muted); align-self: end; white-space: nowrap; overflow: visible; opacity: 0; }
.dc-col.is-selected .dc-value, .dc-col:hover .dc-value { opacity: 1; color: var(--ink); }
.dc-plot { display: flex; align-items: flex-end; justify-content: center; padding: 0 12%; }
.dc-bar { width: 100%; border-radius: 4px 4px 1px 1px; background: var(--l0); transition: height .25s ease; }
.dc-bar.l1 { background: var(--l1); } .dc-bar.l2 { background: var(--l2); } .dc-bar.l3 { background: var(--l3); }
.is-provisional .dc-bar { background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / .55) 0 3px, transparent 3px 7px); }
.dc-missing { width: 100%; height: 3px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 3px, transparent 3px 6px); }
.dc-site { margin: 2px 1px; border-radius: 3px; }
.is-site .dc-site { background: var(--plume); }
.dc-wind { display: grid; place-items: center; }
.dc-wind svg { width: 13px; height: 13px; fill: var(--muted); }
.is-site .dc-wind svg { fill: var(--plume); }
.dc-hour { font-size: 12px; color: var(--muted); text-align: center; }
.day-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.day-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg-bar { width: 10px; height: 14px; border-radius: 2px; background: linear-gradient(var(--l2) 50%, var(--l1) 50%); }
.lg-provisional { width: 10px; height: 14px; border-radius: 2px; background: repeating-linear-gradient(135deg, #b47a1d 0 3px, #fff1cf 3px 6px); }
.lg-peak { width: 18px; border-top: 1.5px dashed var(--l3); }
.lg-site { width: 18px; height: 6px; border-radius: 3px; background: var(--plume); }
.lg-arrow { font-style: normal; font-weight: 700; color: var(--ink); }
.day-legend b { font-weight: 600; }

/* ---------- Understand ---------- */

.understand { padding-bottom: clamp(56px, 8vw, 112px); scroll-margin-top: 16px; }
.understand h2 { max-width: 20em; margin-bottom: 32px; }
.qa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.qa > div { border-top: 3px solid var(--ink); padding-top: 18px; }
.qa h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.qa p { color: #2b4256; }

/* ---------- Expert ---------- */

.expert { padding-bottom: 72px; scroll-margin-top: 16px; }
.expert details { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); }
.expert summary {
  list-style: none; cursor: pointer; padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.expert summary::-webkit-details-marker { display: none; }
.expert summary h2 { font-size: 24px; font-weight: 800; letter-spacing: -.015em; }
.summary-sub { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.expert summary > svg { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.expert details[open] summary > svg { transform: rotate(180deg); }
.expert-body { padding: 4px 28px 28px; border-top: 1px solid var(--line-soft); }

.settings { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 28px; padding-top: 22px; }
.field { display: grid; gap: 8px; }
.field-label { font-size: 14px; font-weight: 600; display: flex; gap: 8px; }
.field-label output { color: var(--plume-deep); }
.field select, .field input[type="date"] { min-height: 40px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff; padding: 0 10px; }
.field input[type="range"] { width: 200px; accent-color: var(--plume); height: 40px; }
.seg { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 3px; }
.seg button { border: none; background: transparent; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgb(20 40 58 / .15); }
.period { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.chips { display: flex; gap: 6px; }
.chips button { border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.chips button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.settings-note { margin-top: 16px; font-size: 14px; color: var(--muted); }

.expert-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; margin-top: 24px; }
.panel { border: 1.5px solid var(--line-soft); border-radius: var(--radius-m); padding: 20px; min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel h3 { font-size: 18px; font-weight: 700; }
.panel h4 { font-size: 15px; font-weight: 700; margin-top: 22px; }
.panel-sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.panel-foot { font-size: 13px; color: var(--muted); margin-top: 14px; }
.table-wrap { overflow-x: auto; margin-top: 14px; }
.stats { width: 100%; border-collapse: collapse; font-size: 15px; transition: opacity .2s; }
.stats.is-busy { opacity: .45; }
.stats th, .stats td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.stats thead th { font-size: 15px; }
.stats small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.stats tbody th { font-weight: 500; width: 36%; }
.stats .is-current { color: var(--plume-deep); }
.stats td.is-current { background: linear-gradient(90deg, var(--plume-soft), transparent); padding-left: 10px; }
.stats thead th.is-current { padding-left: 10px; }
.stats strong { font-size: 18px; }

.rose-controls { margin: 12px 0 4px; }
.rose-controls select { min-height: 36px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff; padding: 0 8px; font-size: 14px; }
.rose { width: 100%; max-width: 380px; margin: 0 auto; overflow: visible; }
.r-ring { fill: none; stroke: var(--line); stroke-dasharray: 2 4; }
.r-tick { font-size: 11px; fill: var(--muted); }
.r-sector { fill: none; stroke: var(--plume); stroke-width: 6; stroke-linecap: round; opacity: .35; }
.r-petal { fill: #3c5a72; fill-opacity: .8; stroke: var(--surface); stroke-width: 1.5; }
.r-petal.is-hot { fill: var(--plume); }
.r-petal:hover { fill-opacity: 1; }
.r-site { stroke: var(--plume); stroke-width: 2; stroke-dasharray: 4 3; }
.r-cardinal { font-size: 13px; font-weight: 700; fill: var(--ink); text-anchor: middle; }

.others { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.spark { margin: 0; display: grid; gap: 6px; }
.spark figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; }
.spark figcaption small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.spark figcaption strong { text-align: right; font-size: 17px; }
.spark svg { width: 100%; height: 64px; overflow: visible; }
.spark path { fill: none; stroke: #3c5a72; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark.is-nh3 path { stroke: var(--l2); }
.spark line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; }
.spark-range { font-size: 12px; color: var(--muted); }

.data-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.data-message { font-size: 14px; margin-top: 10px; min-height: 1em; }
.method { margin: 8px 0 0; padding-left: 20px; font-size: 15px; color: #2b4256; display: grid; gap: 6px; max-width: 70em; }
.sources { margin-top: 16px; font-size: 14px; color: var(--muted); }

.foot { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 40px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--line); }

.legal { max-width: 900px; margin: 0 auto; padding: 48px var(--gutter) 96px; }
.legal h1 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); margin-bottom: 28px; }
.legal h2 { font-size: 1.45rem; margin: 34px 0 12px; }
.legal p, .legal li { color: #2b4256; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 24px; display: grid; gap: 8px; }
.legal ol { padding-left: 24px; display: grid; gap: 10px; }
.legal .back-link { display: inline-block; margin-bottom: 26px; }

.load-error { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 3000; max-width: 560px; margin: 0 auto; background: var(--ink); color: #fff; padding: 16px 20px; border-radius: var(--radius-m); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .stage { grid-template-columns: minmax(0, 1fr) 320px; }
  .others { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .expert-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .top { flex-wrap: wrap; }
  .top nav { width: 100%; overflow-x: auto; scrollbar-width: thin; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-map { height: 400px; }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "map" "player" "card"; }
  .map { height: 420px; }
  .qa { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .top { padding-top: 12px; padding-bottom: 8px; gap: 4px; }
  .top nav a { font-size: 14px; padding: 10px 11px; }
  .hero { padding-top: 8px; }
  .hero h1 { font-size: clamp(2.15rem, 9vw, 3rem); }
  .hero-lead { margin-top: 12px; line-height: 1.43; }
  .hero-actions { margin-top: 14px; }
  .hero-odds { margin-top: 22px; }
  .map-label.leaflet-tooltip { font-size: 11px; padding: 5px 7px; }
  .hero-map { height: 340px; }
  .map { height: 360px; }
  .wind-chip { font-size: 13px; top: 10px; left: 10px; }
  .wind-chip svg { width: 32px; height: 32px; }
  .hour-card { padding: 18px 18px 16px; }
  .hc-number { font-size: 56px; }
  .player { padding: 14px 12px; }
  .player-bar { gap: 10px; }
  .day-nav { order: -1; flex-basis: 100%; }
  .day-nav h3 { flex: 1; text-align: center; font-size: 1.05rem; }
  .day-chart { --plot: 140px; gap: 1px; }
  .dc-plot { padding: 0 6%; }
  .dc-wind svg { width: 10px; height: 10px; }
  .dc-value { font-size: 10px; }
  .cal-row { grid-template-columns: 44px repeat(31, minmax(0, 1fr)); gap: 2px; }
  .cal-legend { margin-left: 0; }
  .cal-day { border-radius: 2px; min-height: 0; }
  .expert summary { padding: 20px; }
  .expert-body { padding: 4px 16px 20px; }
  .others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field input[type="range"] { width: 100%; }
  .field { width: 100%; }
}
