/* ==========================================================================
   Wave Pool Weather: shared design system ("Mixed" skin)
   Modern data UI with pixel accents. Every page loads this file.

   Theming
   - <html data-theme="dark|light"> is set before first paint by a one-line
     inline script in each page head (localStorage "wpw-theme", else the OS).
   - Colors live only in the token blocks below. To add a new look (8-bit,
     16-bit, ...), add an html[data-skin="name"] block that overrides tokens,
     and set data-skin on <html>. Nothing else needs to change.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0e1318;
  --bg-2: #121a21;
  --panel: #161d24;
  --panel-2: #1e2730;
  --panel-3: #26313c;
  --line: #26303a;
  --line-strong: #364452;

  /* Text */
  --text: #e9eef2;
  --muted: #93a1ad;
  --faint: #66737f;

  /* Brand */
  --accent: #4cc3ff;
  --accent-ink: #04121c;
  --accent-soft: rgba(76, 195, 255, 0.14);
  --sun: #ffc861;
  --water: #4cc3ff;
  --danger: #ff6b6b;
  --warn: #ffb44c;

  /* Ratings */
  --epic: #8b5cf6;
  --good: #22c55e;
  --poor: #4b5563;
  --on-rate: #ffffff;

  /* Type and shape */
  --font-display: "Press Start 2P", ui-monospace, monospace;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
  --map-filter: none;
  /* Pixel scene (home spotlight) */
  --sky-1: #141d36; --sky-2: #27365e; --hill: #1c3a3c; --hill-2: #24504c; --deck: #3d4852; --foam: #dff6ff; --star: #c9d6ff;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4f6f8;
  --bg-2: #eef1f4;
  --panel: #ffffff;
  --panel-2: #f3f5f7;
  --panel-3: #e8ecf0;
  --line: #dde3e8;
  --line-strong: #c6cfd7;
  --text: #14202b;
  --muted: #55636f;
  --faint: #7d8a96;
  --accent: #0b74c4;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 116, 196, 0.1);
  --sun: #b86e00;
  --water: #0b74c4;
  --danger: #d63c3c;
  --warn: #c77700;
  --epic: #7c3aed;
  --good: #16a34a;
  --poor: #8a94a0;
  --shadow: 0 1px 2px rgba(16, 24, 32, 0.06), 0 6px 18px rgba(16, 24, 32, 0.06);
  --sky-1: #5fb8f5; --sky-2: #b9e3ff; --hill: #5f9f6c; --hill-2: #7dbb83; --deck: #c3c9cf; --foam: #ffffff; --star: transparent;
  color-scheme: light;
}

/* -------------------------------------------------------------------------- */
/* Base                                                                        */
/* -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
p { margin: 0 0 0.8em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -40px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; }
.pixel { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------------------- */
/* Site nav                                                                    */
/* -------------------------------------------------------------------------- */
.site-nav {
  position: sticky; top: 0; z-index: 1000;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav .bar {
  max-width: 1240px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand .logo { width: 28px; height: 28px; image-rendering: pixelated; }
.brand .word { font-family: var(--font-display); font-size: 12px; line-height: 1.4; }
.brand .word b { color: var(--accent); font-weight: 400; }
.nav-links { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; white-space: nowrap;
  padding: 7px 10px; border-radius: var(--radius-sm); font-weight: 500; font-size: 14px;
}
.nav-links a:hover { color: var(--text); background: var(--panel-2); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-tools { display: flex; align-items: center; gap: 6px; flex: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel);
  color: var(--text);
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; image-rendering: pixelated; }

/* Units popover */
.units { position: relative; }
.units > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel);
  font-size: 13px; font-weight: 600; cursor: pointer; user-select: none;
}
.units > summary::-webkit-details-marker { display: none; }
.units[open] > summary { border-color: var(--accent); }
.units .pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 230px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px; display: grid; gap: 10px;
}
.units .pop label { font-size: 12px; color: var(--muted); display: grid; gap: 6px; }

/* -------------------------------------------------------------------------- */
/* Controls                                                                    */
/* -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.btn:hover { border-color: var(--line-strong); background: var(--panel-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.seg button {
  border: 0; background: transparent; color: var(--muted); padding: 5px 10px; border-radius: 7px;
  font-size: 13px; font-weight: 600;
}
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }

/* -------------------------------------------------------------------------- */
/* Layout                                                                      */
/* -------------------------------------------------------------------------- */
.page {
  width: 100%; max-width: 1240px; margin: 0 auto; padding: 20px 16px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; flex: 1;
}
.page > * { min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; padding: 4px 2px; }
.page-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.eyebrow { font-family: var(--font-display); font-size: 10px; color: var(--sun); letter-spacing: 0.04em; text-transform: uppercase; display: block; margin-bottom: 8px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel.flush .panel-head { padding: 14px 16px 0; }
.panel-head h2 { font-size: 16px; font-weight: 700; }
.panel-head .sub { color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600;
}
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; }

/* -------------------------------------------------------------------------- */
/* Ratings                                                                     */
/* -------------------------------------------------------------------------- */
.rt { color: var(--on-rate); }
.rt-epic { background: var(--epic); }
.rt-good { background: var(--good); }
.rt-poor { background: var(--poor); }
.rt-none { background: var(--panel-3); color: var(--muted); }
.rating-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
}
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* -------------------------------------------------------------------------- */
/* Pool picker                                                                 */
/* -------------------------------------------------------------------------- */
.pool-picker { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pool-picker::-webkit-scrollbar { display: none; }
.pool-picker button {
  flex: none; display: grid; gap: 2px; text-align: left; padding: 8px 14px; min-width: 132px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.pool-picker button b { font-weight: 700; font-size: 14px; }
.pool-picker button span { font-size: 12px; color: var(--muted); }
.pool-picker button[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 -3px 0 var(--accent); }

/* -------------------------------------------------------------------------- */
/* Now card (headline)                                                         */
/* -------------------------------------------------------------------------- */
.now { display: grid; grid-template-columns: minmax(230px, 1.1fr) 2fr; gap: 16px; }
.now-main { display: grid; align-content: start; gap: 6px; padding-right: 16px; border-right: 1px solid var(--line); }
.now-main .when { font-weight: 600; color: var(--muted); font-size: 13px; }
.now-main .big { font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; display: flex; align-items: flex-start; gap: 4px; }
.now-main .big small { font-size: 20px; font-weight: 600; margin-top: 6px; color: var(--muted); }
.now-main .suit { font-weight: 600; }
.now-main .call { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.now-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; align-content: start; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; display: grid; gap: 2px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.stat .s { font-size: 12px; color: var(--muted); }
.breaks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; grid-column: 1 / -1; }
.break { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.break b { font-weight: 600; }

.arrow { display: inline-block; width: 1em; height: 1em; color: var(--accent); transition: transform 0.3s ease; }

/* -------------------------------------------------------------------------- */
/* Day strip (7-day overview)                                                  */
/* -------------------------------------------------------------------------- */
.daystrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.daytile {
  position: relative; display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 0 6px 10px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.daytile:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.daytile[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.daytile .bar { width: calc(100% + 12px); height: 6px; margin-bottom: 6px; }
.daytile .dow { font-family: var(--font-display); font-size: 10px; color: var(--sun); }
.daytile .date { font-size: 11px; color: var(--muted); }
.daytile .t { font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.daytile .w { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.daytile .rate { font-size: 11px; font-weight: 700; }
.daytile .storm { position: absolute; top: 12px; right: 6px; width: 16px; height: 16px; }

/* -------------------------------------------------------------------------- */
/* Forecast table (condition grid)                                             */
/* -------------------------------------------------------------------------- */
.ftable-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.ftable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 760px; }
.ftable th, .ftable td { padding: 0; text-align: center; border-bottom: 1px solid var(--line); }
.ftable thead th { position: sticky; top: 0; background: var(--panel); z-index: 2; padding: 10px 4px; font-weight: 600; }
.ftable thead th .d1 { font-family: var(--font-display); font-size: 10px; color: var(--sun); display: block; margin-bottom: 4px; }
.ftable thead th .d2 { color: var(--muted); font-size: 12px; font-weight: 500; }
.ftable th[scope="row"] {
  position: sticky; left: 0; z-index: 1; background: var(--panel); text-align: left;
  padding: 0 12px; white-space: nowrap; font-weight: 600; min-width: 150px; border-right: 1px solid var(--line);
}
.ftable th[scope="row"] small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.ftable tr.group th { background: var(--panel-2); text-align: left; padding: 6px 12px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.ftable td .cell { height: 40px; display: flex; align-items: center; justify-content: center; gap: 4px; font-variant-numeric: tabular-nums; font-weight: 600; }
.ftable td.sel .cell { box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
.ftable thead th.sel { box-shadow: inset 0 3px 0 var(--accent); }
.ftable td .cell.rate { margin: 4px; height: 32px; border-radius: 6px; font-size: 12px; }
.ftable td button.cell { width: 100%; border: 0; background: transparent; }
.ftable .condbar { height: 10px; margin: 6px 4px; border-radius: 3px; }
.ftable td .sub { font-size: 11px; color: var(--muted); font-weight: 500; }
.ftable tbody tr:hover th[scope="row"], .ftable tbody tr:hover td { background-color: color-mix(in srgb, var(--panel-2) 60%, transparent); }

/* -------------------------------------------------------------------------- */
/* Charts (dependency-free SVG)                                                */
/* -------------------------------------------------------------------------- */
.chart { width: 100%; height: 240px; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text, .chart text.axis { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart .lbl { fill: var(--text); font-size: 11px; font-weight: 600; font-family: var(--font-body); }
.chart .water { stroke: var(--water); stroke-width: 2.5; fill: none; }
.chart .water-area { fill: var(--water); opacity: 0.12; }
.chart .am { stroke: var(--accent); stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; opacity: 0.7; }
.chart .pm { stroke: var(--sun); stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
.chart .air { stroke: var(--sun); stroke-width: 2; fill: none; }
.chart .now-line { stroke: var(--danger); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart .cursor { stroke: var(--text); stroke-width: 1; opacity: 0.6; }
.chart .day-sep { stroke: var(--line-strong); stroke-width: 1; }
.chart .gust { stroke: var(--text); stroke-width: 2; opacity: 0.5; }
.chart .bar-hit { fill: transparent; cursor: pointer; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.chart-legend i.dash { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 8px); height: 2px; }
.tip {
  position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, calc(-100% - 10px));
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 6px 9px; font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity 0.1s ease;
}
.tip.on { opacity: 1; }
.chart-box { position: relative; }

/* -------------------------------------------------------------------------- */
/* Map (Windy-style overlays)                                                  */
/* -------------------------------------------------------------------------- */
.mapbox { position: relative; height: 520px; background: var(--panel-2); isolation: isolate; }
.mapbox .leaflet-container { position: absolute; inset: 0; background: var(--panel-2); font-family: var(--font-body); }
.mapbox canvas.particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 450; }
.map-overlay { position: absolute; z-index: 500; }
.map-card {
  background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.map-info { top: 12px; left: 12px; padding: 10px 12px; min-width: 170px; display: grid; gap: 2px; }
.map-info .v { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.map-info .s { font-size: 12px; color: var(--muted); }
.map-layers { top: 12px; right: 12px; display: grid; gap: 4px; padding: 6px; }
.map-layers button {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; border: 0;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; text-align: left;
}
.map-layers button svg { width: 16px; height: 16px; }
.map-layers button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.map-scale { right: 12px; bottom: 92px; padding: 6px 8px; font-size: 11px; color: var(--muted); display: grid; gap: 4px; }
.map-scale .ramp { display: flex; height: 8px; width: 160px; border-radius: 4px; overflow: hidden; }
.map-scale .ramp i { flex: 1; }
.map-scale .ticks { display: flex; justify-content: space-between; }
.timeline {
  left: 12px; right: 12px; bottom: 22px; padding: 8px 12px; display: grid;
  grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
}
.timeline .play { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.timeline .play svg { width: 14px; height: 14px; }
.timeline .track { display: grid; gap: 4px; }
.timeline .days { display: grid; font-size: 11px; color: var(--muted); }
.timeline .days span { border-left: 1px solid var(--line-strong); padding-left: 4px; white-space: nowrap; overflow: hidden; }
.timeline .label { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 120px; text-align: right; }
input[type="range"].scrub { width: 100%; accent-color: var(--accent); margin: 0; }
.radar-note { left: 12px; bottom: 92px; padding: 5px 9px; font-size: 11px; color: var(--muted); display: none; }
.radar-note.on { display: block; }
.pool-marker {
  display: grid; place-items: center; min-width: 44px; height: 26px; padding: 0 8px; border-radius: 13px;
  font: 700 12px/1 var(--font-body); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  white-space: nowrap; transform: translate(-50%, -50%);
}
.pool-marker.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-tooltip { font-family: var(--font-body); }

/* -------------------------------------------------------------------------- */
/* Home                                                                        */
/* -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line);
  background:
    radial-gradient(1200px 300px at 10% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    linear-gradient(180deg, var(--panel), var(--bg-2));
  padding: 28px 24px 64px;
}
.hero h1 { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.5; margin-bottom: 10px; }
.hero h1 b { color: var(--accent); font-weight: 400; }
.hero p { color: var(--muted); max-width: 62ch; margin: 0 0 16px; font-size: 16px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero .wave { position: absolute; left: 0; bottom: 0; width: 200%; height: 46px; animation: drift 16s linear infinite; image-rendering: pixelated; }
.hero .wave.back { animation-duration: 26s; opacity: 0.5; bottom: 6px; }
.hero.paused .wave, .hero.paused .scene .swell, .hero.paused .scene .flag { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-50%); } }

.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 28px; align-items: center; }
.hero-copy p { font-size: 15px; }
.jump { display: grid; gap: 8px; margin: 4px 0 18px; }
.jump-label { font-family: var(--font-display); font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pool-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pool-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px 7px 9px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font: 600 13px var(--font-body); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pool-chip:hover { border-color: var(--line-strong); }
.pool-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pool-chip i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.pool-chip small { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.chip-skel { width: 96px; height: 32px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }

/* Spotlight card with a pixel-art scene */
.spot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.scene { aspect-ratio: 96 / 40; background: var(--sky-2); border-bottom: 1px solid var(--line); }
.scene svg { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.scene .swell { animation: swell 5s ease-in-out infinite alternate; }
.scene .flag { animation: flap 0.9s steps(2) infinite; transform-box: fill-box; transform-origin: left center; }
@keyframes swell { from { transform: translateX(-4px); } to { transform: translateX(6px); } }
@keyframes flap { 50% { transform: scaleY(0.75); } }
.spot-body { padding: 14px 16px 16px; display: grid; gap: 12px; }
.spot-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.spot-top .eyebrow { margin-bottom: 4px; }
.spot-top h2 { font-size: 18px; font-weight: 700; }
.spot-top .loc { font-size: 12px; color: var(--muted); }
.spot-temp { display: flex; align-items: baseline; gap: 6px; }
.spot-temp .big { font-size: 46px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.spot-temp .u { color: var(--muted); font-weight: 600; }
.spot-temp .swatch { width: 12px; height: 34px; align-self: center; margin-right: 4px; }
.spot-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.spot-stats .stat { padding: 8px 10px; }
.spot-stats .stat .v { font-size: 15px; }
.spot-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.spot-foot .note { margin: 0; }

/* Week at a glance */
.glance-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.glance-wrap { overflow-x: auto; margin-top: 12px; border-top: 1px solid var(--line); }
.glance { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 680px; font-size: 13px; }
.glance th, .glance td { border-bottom: 1px solid var(--line); padding: 0; }
.glance thead th { padding: 10px 4px 8px; text-align: center; font-weight: 600; background: var(--panel); }
.glance thead th .d1 { display: block; font-family: var(--font-display); font-size: 9px; color: var(--sun); margin-bottom: 4px; }
.glance thead th .d2 { color: var(--muted); font-size: 12px; font-weight: 500; }
.glance thead th.corner, .glance th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--panel); border-right: 1px solid var(--line); text-align: left; }
.glance th[scope="row"] { padding: 0; width: 190px; }
.glance th[scope="row"] a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: inherit; text-decoration: none; }
.glance th[scope="row"] a:hover b { color: var(--accent); }
.glance th[scope="row"] b { display: block; font-size: 14px; }
.glance th[scope="row"] small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.glance th[scope="row"] .swatch { width: 8px; height: 30px; }
.glance tbody tr:last-child > * { border-bottom: 0; }
.glance td { min-width: 70px; }
.gcell {
  position: relative; display: grid; place-items: center; gap: 1px; margin: 5px 3px; padding: 8px 2px 6px; border-radius: 8px;
  color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; background: var(--tint, transparent);
  border: 1px solid transparent; transition: border-color 0.12s ease, transform 0.12s ease;
}
.gcell::before { content: ""; position: absolute; left: 6px; right: 6px; top: 3px; height: 3px; border-radius: 2px; background: var(--bar, var(--panel-3)); }
.gcell:hover, .gcell:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.gcell b { font-size: 15px; font-weight: 700; }
.gcell .w { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 600; }
.gcell .w .arrow { width: 11px; height: 11px; }
.gcell .star { position: absolute; top: 5px; right: 6px; font-size: 10px; color: var(--sun); line-height: 1; }
.gcell.none { color: var(--faint); }
.glance-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 16px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.glance-legend span { display: inline-flex; align-items: center; gap: 6px; }
.glance-legend .ramp { width: 160px; height: 8px; border-radius: 4px; }

/* Map, best calls */
.mapbox.home-map { height: 100%; min-height: 360px; }
.grid-2 > .panel.flush { display: flex; flex-direction: column; }
.grid-2 > .panel.flush > .mapbox { flex: 1; }
.bets { display: grid; gap: 8px; }
.bet { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.bet:hover { border-color: var(--accent); }
.bet .when { font-family: var(--font-display); font-size: 10px; color: var(--sun); min-width: 54px; }
.bet .what { font-size: 13px; }
.bet .what b { display: block; font-size: 14px; }

/* Wetsuit guide */
.suit-guide { display: grid; gap: 6px; padding-top: 4px; }
.suit-marks { position: relative; }
.suit-mark { position: absolute; bottom: 0; width: 0; font-size: 12px; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; }
.suit-mark span { position: absolute; z-index: 1; top: 0; left: 0; padding: 2px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); }
.suit-mark:hover span, .suit-mark:focus-visible span { border-color: var(--accent); }
.suit-mark i { position: absolute; left: -1px; top: 20px; bottom: 0; width: 2px; background: var(--line-strong); }
.suit-bar { height: 14px; border-radius: 4px; image-rendering: pixelated; }
.suit-bands { position: relative; height: 34px; font-size: 11px; color: var(--muted); }
.suit-bands div { position: absolute; top: 0; height: 100%; border-left: 1px dashed var(--line-strong); padding: 3px 0 0 5px; line-height: 1.25; }
.suit-bands div:first-child { border-left: 0; padding-left: 0; }
.suit-bands b { display: block; color: var(--text); font-weight: 600; font-size: 12px; }

/* Jump tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile {
  display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); color: inherit; text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.tile .ico { grid-row: 1 / 3; width: 32px; height: 32px; padding: 6px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.tile .ico svg { width: 100%; height: 100%; display: block; }
.tile b { font-size: 14px; }
.tile span { font-size: 12px; color: var(--muted); line-height: 1.3; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .spot-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glance { min-width: 600px; }
  .glance th[scope="row"] { width: 120px; }
  .glance th[scope="row"] a { padding: 8px 10px; gap: 8px; }
  .glance th[scope="row"] b { font-size: 12px; }
  .glance td { min-width: 62px; }
  .tiles { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------- */
/* Prose (content pages)                                                       */
/* -------------------------------------------------------------------------- */
.prose { max-width: 820px; width: 100%; margin: 0 auto; display: grid; gap: 16px; }
.prose .panel h2 { font-size: 18px; margin-bottom: 10px; }
.prose .panel h3 { font-size: 15px; margin: 4px 0 6px; }
.prose .panel p, .prose .panel li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.prose ul { padding-left: 1.2em; margin: 0 0 0.8em; }
.prose li { margin: 0.3em 0; }
.prose li strong, .prose p strong { color: var(--text); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.table-wrap { overflow-x: auto; }
.equation { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; text-align: center; font-size: 17px; overflow-x: auto; }
.equation .frac { display: inline-block; vertical-align: middle; text-align: center; line-height: 1.7; }
.equation .frac > span { display: block; padding: 0 4px; }
.equation .frac > span:first-child { border-bottom: 1px solid var(--text); }
.caption { font-size: 12px; color: var(--muted); }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.pillar { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.pillar .ico { font-size: 22px; }
.pillar p { font-size: 13px; margin: 0; color: var(--muted); }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.photos img { width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }

.prose .panel p { margin: 0 0 0.8em; line-height: 1.65; }
.prose .panel p:last-child { margin-bottom: 0; }
.prose .panel h3 { margin-top: 0; }
.prose .lead { font-size: 16px; }
.news-list { display: grid; gap: 10px; margin-top: 4px; }
.news-item { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 14px; }
.news-item p { font-size: 14px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.table .swatch { vertical-align: -1px; margin-right: 4px; }

/* Forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint { color: var(--muted); font-weight: 400; font-size: 13px; }
.field input, .field textarea, select.input {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--panel-2); color: var(--text);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* -------------------------------------------------------------------------- */
/* Forecast page details                                                       */
/* -------------------------------------------------------------------------- */
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.break .s { font-size: 12px; color: var(--muted); }
.break .rating-pill { flex: none; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.storm { color: var(--warn); }
.storm.high { color: var(--danger); }
.ftable thead th.corner { left: 0; z-index: 3; border-right: 1px solid var(--line); }
.ftable tr.group th span { position: sticky; left: 12px; }
.ftable td .cell.stack { flex-direction: column; gap: 0; line-height: 1.15; }
.ftable td { cursor: pointer; }
.dayhead { border: 0; background: transparent; padding: 0; width: 100%; display: block; }
.chart .selband { fill: var(--accent-soft); }
.chart .pt { stroke: var(--panel); stroke-width: 2; }
.chart .bar-sel { fill: none; stroke: var(--text); stroke-width: 1.5; }
.chart .warr { color: var(--muted); }
.mapbox canvas.heat { z-index: 440; opacity: 0.42; }
html[data-theme="light"] .mapbox canvas.heat { opacity: 0.32; }
.mapbox .leaflet-pane.leaflet-radar-pane { z-index: 445; }
.map-layers hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.stamps { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--muted); }
.stamps b { color: var(--text); font-weight: 600; }
.note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 760px) {
  .map-layers hr { display: none; }
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                      */
/* -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.site-footer .bar {
  max-width: 1240px; margin: 0 auto; padding: 18px 16px 28px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 10px 20px; font-size: 13px; color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .now { grid-template-columns: 1fr; }
  .now-main { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-nav .bar { flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; }
  .nav-links { order: 3; flex-basis: 100%; margin: 0 -4px; }
  .nav-tools { margin-left: auto; }
  .page { padding: 14px 12px 32px; gap: 12px; }
  .page-head h1 { font-size: 21px; }
  .daystrip { grid-template-columns: repeat(7, 84px); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .daytile { scroll-snap-align: start; }
  .now-main .big { font-size: 46px; }
  .breaks { grid-template-columns: 1fr; }
  .mapbox { height: 440px; }
  .map-layers { top: auto; bottom: 96px; right: 8px; grid-auto-flow: column; }
  .map-layers button span { display: none; }
  .map-scale { display: none; }
  .map-info { top: 8px; left: 8px; min-width: 0; }
  .timeline { left: 8px; right: 8px; bottom: 20px; gap: 8px; padding: 8px; }
  .timeline .label { min-width: 0; font-size: 12px; }
  .radar-note { bottom: 150px; }
  .hero { padding: 22px 16px 60px; }
  .hero h1 { font-size: 16px; }
  .ftable { min-width: 600px; font-size: 12px; }
  .ftable th[scope="row"] { min-width: 0; width: 104px; max-width: 104px; white-space: normal; padding: 4px 8px; line-height: 1.2; font-size: 12px; }
  .ftable th[scope="row"] small { font-size: 10px; }
  .timeline .days span { font-size: 9px; }
}
html { scroll-padding-top: 76px; }
@media (max-width: 760px) { html { scroll-padding-top: 112px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .hero .wave { animation: none; }
}
