/* Sideshore stylesheet (built from the approved design mockup).
   CSP-compatible: this external file is the ONLY source of styling. No <style> blocks, no style="" attributes.
   Tokens follow docs/02-design-spec.md section 10. */

/* ---------- 1. Tokens: light (default) ---------- */
:root {
  color-scheme: light;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --surface-2: #EEECE6;
  --line: #D6D3CA;
  --ink: #0C1A28;
  --ink-2: #3A4858;
  --ink-3: #56636F;
  --accent: #0A5C70;
  --accent-ink: #FFFFFF;
  --obs: #6B3FA0;
  --obs-ink: #FFFFFF;

  /* wind scale (kn bands 0-7, 8-11, 12-15, 16-21, 22-27, 28-33, 34-40, >40) */
  --w0: #E6E4DF; --w0-t: #0C1A28;
  --w1: #B9D6EC; --w1-t: #0C1A28;
  --w2: #80B9DF; --w2-t: #0C1A28;
  --w3: #256FA3; --w3-t: #FFFFFF;
  --w4: #F3C552; --w4-t: #0C1A28;
  --w5: #E9873F; --w5-t: #0C1A28;
  --w6: #C43B2C; --w6-t: #FFFFFF;
  --w7: #5A1942; --w7-t: #FFFFFF; --w7-h: #7E2F63;

  /* rating status */
  --st-good-bg: #0B7A5C; --st-good-t: #FFFFFF;
  --st-kite-bg: #D3EFE4; --st-kite-t: #0B5A44; --st-kite-bd: #0B7A5C;
  --st-marg-bg: #F1EEE4; --st-marg-t: #5F5528; --st-marg-bd: #A69A62;
  --st-poor-bg: #EEF0F2; --st-poor-t: #4B5562; --st-poor-bd: #AAB2BC;
  --st-no-bg: #B3261E; --st-no-t: #FFFFFF;

  /* alerts */
  --al-red-bg: #FCE9E7; --al-red-bd: #B3261E; --al-red-t: #6E140E;
  --al-amb-bg: #FFF4D4; --al-amb-bd: #9A6700; --al-amb-t: #573A00;
  --al-inf-bg: #E7F0F7; --al-inf-bd: #2F6690; --al-inf-t: #163A56;

  /* direction classes */
  --cls-on: #4F6E8C;
  --cls-xon: #0B7A5C;
  --cls-cross: #0B7A5C;
  --cls-xoff: #8A5C00;
  --cls-off: #B3261E;

  /* charts */
  --chart-wind: #0C1A28;
  --chart-gust: rgb(128 185 223 / 45%);
  --chart-night: rgb(12 26 40 / 7%);
  --chart-grid: #E4E1D8;

  --shadow: 0 1px 2px rgb(12 26 40 / 6%), 0 2px 8px rgb(12 26 40 / 4%);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r-s: 6px; --r: 12px;
  --topbar-h: 56px;
}

/* ---------- 2. Tokens: dark (system preference unless forced light, or forced dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0A121C; --surface: #111C28; --surface-2: #172535; --line: #273849;
    --ink: #E7EDF3; --ink-2: #B6C3D0; --ink-3: #8D9CAC;
    --accent: #5FC6D3; --accent-ink: #06121E; --obs: #B79AE6; --obs-ink: #1A0B30;
    --w0: #2B3642; --w0-t: #D5DDE5;
    --w1: #1F4563; --w1-t: #E7EDF3;
    --w2: #2F74A6; --w2-t: #FFFFFF;
    --w3: #4C9FD6; --w3-t: #06121E;
    --w4: #E9BC47; --w4-t: #0C1A28;
    --w5: #E48A45; --w5-t: #0C1A28;
    --w6: #E0604F; --w6-t: #0C1A28;
    --w7: #F1D2E7; --w7-t: #3A0B2A; --w7-h: #D9A9C8;
    --st-good-bg: #3DBE93; --st-good-t: #04150F;
    --st-kite-bg: #123B30; --st-kite-t: #9BE3C8; --st-kite-bd: #3DBE93;
    --st-marg-bg: #2E2A1B; --st-marg-t: #E2D6A4; --st-marg-bd: #8C7F4E;
    --st-poor-bg: #1D2733; --st-poor-t: #A9B4C0; --st-poor-bd: #4A5A6C;
    --st-no-bg: #F08A80; --st-no-t: #2A0705;
    --al-red-bg: #3B1411; --al-red-bd: #F08A80; --al-red-t: #FFDAD6;
    --al-amb-bg: #33270B; --al-amb-bd: #E5B54A; --al-amb-t: #FCE6AE;
    --al-inf-bg: #0F2537; --al-inf-bd: #7EB2D9; --al-inf-t: #D4E7F6;
    --cls-on: #9DB6CF; --cls-xon: #52C9A0; --cls-cross: #52C9A0; --cls-xoff: #E5B54A; --cls-off: #F08A80;
    --chart-wind: #E7EDF3; --chart-gust: rgb(76 159 214 / 35%); --chart-night: rgb(0 0 0 / 35%); --chart-grid: #1F2F40;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A121C; --surface: #111C28; --surface-2: #172535; --line: #273849;
  --ink: #E7EDF3; --ink-2: #B6C3D0; --ink-3: #8D9CAC;
  --accent: #5FC6D3; --accent-ink: #06121E; --obs: #B79AE6; --obs-ink: #1A0B30;
  --w0: #2B3642; --w0-t: #D5DDE5;
  --w1: #1F4563; --w1-t: #E7EDF3;
  --w2: #2F74A6; --w2-t: #FFFFFF;
  --w3: #4C9FD6; --w3-t: #06121E;
  --w4: #E9BC47; --w4-t: #0C1A28;
  --w5: #E48A45; --w5-t: #0C1A28;
  --w6: #E0604F; --w6-t: #0C1A28;
  --w7: #F1D2E7; --w7-t: #3A0B2A; --w7-h: #D9A9C8;
  --st-good-bg: #3DBE93; --st-good-t: #04150F;
  --st-kite-bg: #123B30; --st-kite-t: #9BE3C8; --st-kite-bd: #3DBE93;
  --st-marg-bg: #2E2A1B; --st-marg-t: #E2D6A4; --st-marg-bd: #8C7F4E;
  --st-poor-bg: #1D2733; --st-poor-t: #A9B4C0; --st-poor-bd: #4A5A6C;
  --st-no-bg: #F08A80; --st-no-t: #2A0705;
  --al-red-bg: #3B1411; --al-red-bd: #F08A80; --al-red-t: #FFDAD6;
  --al-amb-bg: #33270B; --al-amb-bd: #E5B54A; --al-amb-t: #FCE6AE;
  --al-inf-bg: #0F2537; --al-inf-bd: #7EB2D9; --al-inf-t: #D4E7F6;
  --cls-on: #9DB6CF; --cls-xon: #52C9A0; --cls-cross: #52C9A0; --cls-xoff: #E5B54A; --cls-off: #F08A80;
  --chart-wind: #E7EDF3; --chart-gust: rgb(76 159 214 / 35%); --chart-night: rgb(0 0 0 / 35%); --chart-grid: #1F2F40;
  --shadow: none;
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 120px; scroll-padding-bottom: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 26px; line-height: 32px; letter-spacing: -0.01em; }
h2 { font-size: 20px; line-height: 26px; }
h3 { font-size: 17px; line-height: 24px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
b, strong { font-weight: 700; }
.num, table, .tab { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico--fill { fill: currentColor; stroke: none; }
.ico--s { width: 16px; height: 16px; }
.ico--l { width: 24px; height: 24px; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 12px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 8px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--s4); }
/* Scroll containers must be the containing block of visually-hidden text, or it escapes and widens the page. */
.hourly-wrap, .tablewrap, .weekstrip, .days .inner, .day, .strip, .wk { position: relative; }
.al { color: var(--cls-xoff); font-weight: 600; }
.al-red { color: var(--cls-off); }
.al .ico { width: 14px; height: 14px; vertical-align: -2px; }
.wk { text-decoration: none; }
.pick .alert-compact { margin-top: var(--s4); }
.compass-holder { width: 100%; display: grid; justify-items: center; gap: var(--s2); }
.sw-ideal { width: 6px !important; height: 14px !important; background: var(--st-good-bg); opacity: 0.6; }

/* ---------- 5. Top bar and navigation ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: var(--s4); height: var(--topbar-h); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.015em; min-height: 44px; }
.brand .ico { width: 26px; height: 26px; color: var(--accent); }
.topnav { display: none; gap: var(--s1); }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.topnav a:hover { background: var(--surface-2); color: var(--ink); }
.topnav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.chips { margin-left: auto; display: flex; gap: var(--s2); }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip-btn .ico { width: 16px; height: 16px; }
.chip-btn--units { display: none; }

.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(2, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; color: var(--ink-2); text-decoration: none; font-size: 12px; font-weight: 600; }
.bottomnav a .ico { width: 22px; height: 22px; }
.bottomnav a[aria-current="page"] { color: var(--accent); }

/* ---------- 6. Page head ---------- */
.page-head { padding: var(--s4) 0 var(--s3); }
.meta-line { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; color: var(--ink-2); font-size: 14px; }
.page-head h1 { margin: var(--s2) 0 0; }
.eyebrow { display: block; font-size: 12px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }
.section { margin-top: var(--s5); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.section-head p { color: var(--ink-3); font-size: 14px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; line-height: 20px; }
.tiny { font-size: 12px; line-height: 16px; }

/* ---------- 7. Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); box-shadow: var(--shadow); }
.card + .card { margin-top: var(--s3); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }

/* ---------- 8. Badges (data type) ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--ink-3); color: var(--ink-2); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }
.badge .ico { width: 14px; height: 14px; }
.badge--obs { background: var(--obs); border-color: var(--obs); color: var(--obs-ink); }
.badge--est { border: 1.5px dashed var(--obs); color: var(--obs); }
.badge--likely { border: 1.5px dashed var(--ink-2); color: var(--ink-2); }
.badge--tide { border-color: var(--accent); color: var(--accent); }
.badge--reported { border-color: var(--ink-2); }
.badge--old { background: var(--al-amb-bg); border-color: var(--al-amb-bd); color: var(--al-amb-t); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 8px; font-size: 13px; line-height: 18px; font-weight: 600; background: var(--al-inf-bg); color: var(--al-inf-t); border: 1px solid var(--al-inf-bd); }
.tag .ico { width: 14px; height: 14px; }
.tag--plain { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }

/* ---------- 9. Rating chips ---------- */
.st { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 2px 10px; border-radius: 999px; border: 1px solid transparent; font-size: 14px; line-height: 20px; font-weight: 700; white-space: nowrap; }
.st .score { font-weight: 600; opacity: 0.9; }
.meter { display: inline-grid; grid-template-columns: repeat(4, 4px); gap: 2px; align-items: end; }
.meter i { display: block; width: 4px; height: 12px; border-radius: 1px; background: currentColor; opacity: 0.25; }
.meter i.on { opacity: 1; }
.st-good { background: var(--st-good-bg); color: var(--st-good-t); }
.st-kite { background: var(--st-kite-bg); color: var(--st-kite-t); border-color: var(--st-kite-bd); }
.st-marg { background: var(--st-marg-bg); color: var(--st-marg-t); border-color: var(--st-marg-bd); }
.st-poor { background: var(--st-poor-bg); color: var(--st-poor-t); border-color: var(--st-poor-bd); }
.st-none { background: transparent; color: var(--ink-2); border-color: var(--st-poor-bd); }
.st-no { background: var(--st-no-bg); color: var(--st-no-t); }
.st .ico { width: 16px; height: 16px; }

/* ---------- 10. Confidence ---------- */
.conf { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.bars { display: inline-grid; grid-template-columns: repeat(3, 5px); gap: 2px; align-items: end; }
.bars i { display: block; width: 5px; border-radius: 1px; background: var(--ink-2); opacity: 0.25; }
.bars i:nth-child(1) { height: 7px; }
.bars i:nth-child(2) { height: 11px; }
.bars i:nth-child(3) { height: 15px; }
.bars i.on { opacity: 1; }

/* ---------- 11. Direction arrows ---------- */
.dir { width: 20px; height: 20px; flex: none; fill: currentColor; }
.dir--m { width: 24px; height: 24px; }
.dir--xl { width: 44px; height: 44px; }
.cls-on { color: var(--cls-on); }
.cls-xon { color: var(--cls-xon); }
.cls-cross { color: var(--cls-cross); }
.cls-xoff { color: var(--cls-xoff); }
.cls-off { color: var(--cls-off); }
.dirline { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 12. Wind-scale cells ---------- */
.w { display: flex; align-items: center; justify-content: center; font-weight: 700; font-variant-numeric: tabular-nums; border-radius: 4px; border: 1px solid rgb(12 26 40 / 10%); }
.w0 { background: var(--w0); color: var(--w0-t); }
.w1 { background: var(--w1); color: var(--w1-t); }
.w2 { background: var(--w2); color: var(--w2-t); }
.w3 { background: var(--w3); color: var(--w3-t); }
.w4 { background: var(--w4); color: var(--w4-t); }
.w5 { background: var(--w5); color: var(--w5-t); }
.w6 { background: var(--w6); color: var(--w6-t); }
.w7 { background: repeating-linear-gradient(135deg, var(--w7) 0 5px, var(--w7-h) 5px 8px); color: var(--w7-t); }

.scale { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; margin-top: var(--s2); }
.scale .w { height: 26px; font-size: 12px; }
.scale-cap { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; font-size: 11px; line-height: 14px; color: var(--ink-3); text-align: center; margin-top: 2px; }

/* ---------- 13. Alerts ---------- */
.alerts { display: grid; gap: var(--s2); }
.alert { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px var(--s3); padding: 12px 14px; border-radius: 10px; border: 1px solid; border-left-width: 5px; }
.alert .ico { width: 24px; height: 24px; grid-row: 1 / span 3; grid-column: 1; }
.alert > :not(svg) { grid-column: 2; }
.alert h3 { font-size: 16px; line-height: 22px; font-weight: 700; }
.alert h3 .when { font-weight: 600; white-space: nowrap; }
.alert p { font-size: 15px; line-height: 22px; }
.alert .trigger { font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; font-weight: 600; margin-top: 2px; }
.alert .suffix { font-size: 14px; margin-top: 4px; }
.alert--red { background: var(--al-red-bg); border-color: var(--al-red-bd); color: var(--al-red-t); }
.alert--amber { background: var(--al-amb-bg); border-color: var(--al-amb-bd); color: var(--al-amb-t); }
.alert--info { background: var(--al-inf-bg); border-color: var(--al-inf-bd); color: var(--al-inf-t); }
.alert a { color: inherit; font-weight: 700; }
.alert-compact { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; padding: 6px 10px; border-radius: 8px; border: 1px solid; border-left-width: 4px; }
.alert-compact .ico { width: 18px; height: 18px; margin-top: 1px; }
.alert-compact.alert--red, .alert-compact.alert--amber, .alert-compact.alert--info { border-left-width: 4px; }
.notes { border: 1px solid var(--al-inf-bd); background: var(--al-inf-bg); color: var(--al-inf-t); border-radius: 10px; }
.notes > summary { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 14px; cursor: pointer; font-weight: 700; list-style: none; }
.notes > summary::-webkit-details-marker { display: none; }
.notes > summary .chev { margin-left: auto; transition: transform 0.15s ease-out; }
.notes[open] > summary .chev { transform: rotate(90deg); }
.notes ul { margin: 0; padding: 0 14px 12px 50px; display: grid; gap: 6px; font-size: 15px; }
.banner { display: flex; gap: var(--s3); align-items: flex-start; padding: 12px var(--s4); background: var(--al-amb-bg); color: var(--al-amb-t); border-bottom: 2px solid var(--al-amb-bd); font-size: 15px; }
.banner .ico { width: 22px; height: 22px; margin-top: 1px; }

/* ---------- 14. Home: hero / pick / ranking ---------- */
.hero { display: grid; gap: var(--s4); }
.pick { padding: var(--s5) var(--s4); border-top: 4px solid var(--st-good-bg); }
.pick-top { display: flex; align-items: flex-start; gap: var(--s3); }
.rank-no { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 17px; }
.pick-name h2 { font-size: 24px; line-height: 30px; }
.pick-name p { color: var(--ink-2); font-size: 14px; }
.pick-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s4); }
.pick-window { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.facts { display: grid; gap: 10px; margin: var(--s4) 0 0; padding: 0; }
.facts > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s3); align-items: baseline; }
.facts dt { font-size: 12px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); padding-top: 3px; }
.facts dd { margin: 0; font-size: 16px; line-height: 22px; }
.facts .big { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 var(--s4); border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; font-size: 15px; border: 0; }
.btn .ico { width: 18px; height: 18px; }
.btn--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.hint { font-size: 14px; line-height: 20px; color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; }
.hint .ico { width: 16px; height: 16px; margin-top: 2px; color: var(--ink-3); }

.ranked { list-style: none; margin: 0; padding: 0; }
.ranked li { border-top: 1px solid var(--line); }
.ranked li:first-child { border-top: 0; }
.ranked a.row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px var(--s3); align-items: center; padding: var(--s3) 0; color: inherit; text-decoration: none; min-height: 56px; }
.ranked .rk { font-weight: 700; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
.ranked .nm { font-weight: 700; }
.ranked .sub { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 4px var(--s3); align-items: center; font-size: 14px; color: var(--ink-2); }
.ranked .why { grid-column: 2 / 4; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.ranked .chev { color: var(--ink-3); }
.rank-note { font-size: 14px; color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; margin-top: var(--s2); }
.rank-note .ico { width: 16px; height: 16px; margin-top: 2px; }

/* ---------- 15. Home: location cards with strips ---------- */
.locs { display: grid; gap: var(--s3); }
.loc h3 { font-size: 18px; }
.loc-head { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; justify-content: space-between; margin-bottom: var(--s2); }
.launch { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.launch:first-of-type { border-top: 0; padding-top: var(--s1); }
.launch-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s2); margin-bottom: var(--s2); }
.launch-head a { font-weight: 700; color: var(--ink); text-decoration: none; }
.launch-head a:hover { text-decoration: underline; }
.launch-head .st { margin-left: auto; }
.launch-meta { font-size: 13px; line-height: 18px; color: var(--ink-2); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; }
.strip .w { height: 28px; font-size: 12px; border-radius: 3px; }
.strip .w.kb { box-shadow: inset 0 -4px 0 var(--st-good-bg); }
.strip .w.nogo { box-shadow: inset 0 -4px 0 var(--st-no-bg); }
.strip .w.dark { opacity: 0.4; }
.strip-h { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; font-size: 11px; line-height: 14px; color: var(--ink-3); text-align: center; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.strip-key { display: flex; flex-wrap: wrap; gap: 4px var(--s3); font-size: 12px; color: var(--ink-3); margin-top: var(--s2); }
.key-kb, .key-no { display: inline-block; width: 14px; height: 4px; vertical-align: middle; margin-right: 4px; border-radius: 1px; background: var(--st-good-bg); }
.key-no { background: var(--st-no-bg); }

/* ---------- 16. Week grid (home) ---------- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); }
.week { width: 100%; border-collapse: separate; border-spacing: 3px; min-width: 330px; }
.week caption { text-align: left; font-size: 14px; color: var(--ink-2); padding: 0 3px var(--s2); }
.week th { font-size: 12px; font-weight: 700; color: var(--ink-3); text-align: center; padding: 2px; }
.week th[scope="row"] { text-align: left; font-size: 13px; color: var(--ink); font-weight: 600; white-space: nowrap; padding-right: 6px; }
.week td { padding: 0; }
.wk { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 44px; min-width: 34px; border-radius: 6px; font-size: 11px; line-height: 13px; font-weight: 700; border: 1px solid transparent; }
.wk .meter { grid-template-columns: repeat(4, 3px); gap: 1px; }
.wk .meter i { width: 3px; height: 10px; }
.wk .ico { width: 14px; height: 14px; }

/* ---------- 17. Spot page layout ---------- */
.spot-head { padding: var(--s3) 0 var(--s3); }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 15px; }
.spot-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s3); }
.spot-title p { color: var(--ink-2); }
.spot-badges { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.switcher { display: inline-flex; margin-top: var(--s3); border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.switcher a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.switcher a[aria-current="page"] { background: var(--ink); color: var(--bg); }

.spot-grid { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s3); }
.col-main, .col-side { display: contents; }
.o-now { order: 1; } .o-weeklist { order: 1; } .o-days { order: 2; } .o-win { order: 3; } .o-chart { order: 4; } .o-table { order: 5; }
.o-models { order: 6; } .o-tide { order: 7; } .o-tide.up { order: 3; } .o-water { order: 8; } .o-week { order: 9; } .o-guide { order: 10; }
.spot-grid > * > .card + .card, .spot-grid .card + .card { margin-top: 0; }

/* Now card */
.now-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.now-main { display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; column-gap: var(--s3); align-items: end; margin-top: var(--s3); }
.now-num { display: flex; align-items: baseline; gap: 4px; }
.now-num .big { font-size: 48px; line-height: 48px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.now-num .unit { font-size: 18px; font-weight: 700; color: var(--ink-2); }
.now-gust { font-size: 17px; color: var(--ink-2); padding-bottom: 4px; }
.now-gust b { color: var(--ink); font-size: 22px; }
.now-dir { grid-column: 1 / 4; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s3); }
.now-dir .dirtext b { display: block; font-size: 17px; }
.now-dir .dirtext span { color: var(--ink-2); font-size: 15px; }
.now-dir .st { margin-left: auto; }
.now-rows { margin-top: var(--s4); display: grid; gap: var(--s3); }
.now-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding-top: var(--s3); border-top: 1px solid var(--line); font-size: 15px; line-height: 22px; }
.now-row .val { font-size: 17px; }
.now-row .val b { font-size: 20px; font-variant-numeric: tabular-nums; }
.now-row--obs .val b { color: var(--obs); }
.now-row details { font-size: 14px; color: var(--ink-2); }
.now-row summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }

/* Day pills */
.days { position: sticky; top: var(--topbar-h); z-index: 10; background: var(--bg); padding: var(--s2) 0; margin: 0 calc(-1 * var(--s4)); }
.days .inner { display: flex; gap: 6px; overflow-x: auto; padding: 2px var(--s4); scroll-snap-type: x mandatory; scrollbar-width: none; }
.days .inner::-webkit-scrollbar { display: none; }
.day { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 60px; min-height: 56px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.day .d2 { font-weight: 500; color: var(--ink-3); font-size: 12px; }
.day[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.day[aria-selected="true"] .d2 { color: var(--bg); opacity: 0.8; }
.day .meter i { height: 8px; width: 4px; }

/* Best window */
.win { padding: var(--s4); border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.win--primary { border: 2px solid var(--st-good-bg); }
.win-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.win-time { font-size: 24px; line-height: 30px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.win .facts > div { grid-template-columns: 86px minmax(0, 1fr); }
.win .alert-compact { margin-top: var(--s3); }
.win .hint { margin-top: var(--s3); }

/* Charts */
.chart-box { position: relative; width: 100%; min-height: 240px; }
.chart-box--tide { min-height: 170px; }
.chart-box--models { min-height: 170px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); font-variant-numeric: tabular-nums; }
.c-bg { fill: var(--surface); }
.c-grid { stroke: var(--chart-grid); stroke-width: 1; }
.c-axis { stroke: var(--line); stroke-width: 1; }
.c-t { fill: var(--ink-3); font-size: 11px; }
.c-t--b { fill: var(--ink-2); font-weight: 700; }
.c-night { fill: var(--chart-night); }
.c-thr { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; }
.c-thr-t { fill: var(--ink-2); font-size: 11px; font-weight: 700; }
.c-ideal { fill: var(--st-good-bg); fill-opacity: 0.35; }
.c-gust { fill: var(--chart-gust); }
.c-wind { fill: none; stroke: var(--chart-wind); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.c-u { fill: none; stroke: var(--ink-2); stroke-width: 1.75; stroke-dasharray: 6 4; }
.c-obs { fill: var(--obs); stroke: var(--surface); stroke-width: 1.5; }
.c-obs-t { fill: var(--obs); font-size: 11px; font-weight: 700; }
.c-now { stroke: var(--accent); stroke-width: 1.5; }
.c-now-t { fill: var(--accent); font-size: 11px; font-weight: 700; }
.c-kite-good { fill: var(--st-good-bg); }
.c-kite-kite { fill: var(--st-kite-bd); fill-opacity: 0.55; }
.c-kite-marg { fill: var(--st-marg-bd); fill-opacity: 0.45; }
.c-kite-none { fill: var(--line); }
.c-lab { fill: var(--ink); font-size: 12px; font-weight: 700; }
.c-lab--u { fill: var(--ink-2); font-weight: 600; }
.c-arrow { fill: currentColor; }
.c-hit { fill: transparent; cursor: pointer; }
.c-hit:hover { fill: var(--chart-night); }
.c-sel { fill: var(--accent); fill-opacity: 0.1; }
.c-t, .c-thr-t, .c-obs-t, .c-now-t, .c-lab, .t-ev-t, .m-t { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.legend { display: flex; flex-wrap: wrap; gap: 6px var(--s4); margin-top: var(--s3); font-size: 13px; color: var(--ink-2); align-items: center; }
.legend .sw { display: inline-block; width: 18px; height: 10px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.sw-wind { height: 3px !important; background: var(--chart-wind); }
.sw-gust { background: var(--chart-gust); }
.sw-u { height: 0 !important; border-top: 2px dashed var(--ink-2); }
.sw-obs { width: 10px !important; height: 10px !important; background: var(--obs); transform: rotate(45deg); }
.sw-kite { height: 6px !important; background: var(--st-good-bg); }
.sw-night { background: var(--chart-night); border: 1px solid var(--line); }
.arrow-legend { display: flex; gap: 8px; align-items: center; margin-top: var(--s2); font-size: 14px; color: var(--ink-2); padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.arrow-legend .dir { color: var(--ink-2); }

/* model lines */
.m-line { fill: none; stroke: var(--ink-2); stroke-width: 1.5; }
.m-icon { stroke-dasharray: 9 4; }
.m-gfs { stroke-dasharray: 3 3; }
.m-arpege { stroke-dasharray: 1 4; stroke-linecap: round; stroke-width: 2; }
.m-cons { fill: none; stroke: var(--chart-wind); stroke-width: 3; }
.m-ens { fill: var(--accent); fill-opacity: 0.16; }
.m-t { fill: var(--ink-2); font-size: 11px; font-weight: 600; }

/* tide */
.t-area { fill: var(--accent); fill-opacity: 0.1; }
.t-curve { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.t-ev { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.t-ev-t { fill: var(--ink); font-size: 11px; font-weight: 700; }

/* Hourly table */
.hourly-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.hourly { border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 100%; }
.hourly caption { text-align: left; padding: var(--s3) var(--s3) var(--s2); font-size: 14px; color: var(--ink-2); caption-side: top; }
.hourly th, .hourly td { padding: 5px 3px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hourly tr:last-child th, .hourly tr:last-child td { border-bottom: 0; }
.hourly th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 5px 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); border-right: 1px solid var(--line); }
.hourly thead th { font-size: 13px; color: var(--ink-2); font-weight: 700; background: var(--surface-2); }
.hourly thead th[scope="row"] { background: var(--surface-2); }
.hourly td { min-width: 42px; }
.hourly td.night, .hourly th.night { background: var(--surface-2); color: var(--ink-3); }
.hourly td.sel, .hourly th.sel { box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
.hourly .w { height: 28px; min-width: 36px; font-size: 14px; }
.hourly .cell-st { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; font-size: 12px; font-weight: 700; }
.hourly .cell-st .meter i { height: 9px; }
.hourly .sub { display: block; font-size: 11px; color: var(--ink-3); }
.hourly .al { color: var(--cls-xoff); }
.hourly .al-red { color: var(--cls-off); }
.hourly .dark-lab { font-size: 11px; color: var(--ink-3); }

/* Week strip (spot) */
.weekstrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(92px, 1fr); gap: 6px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.wday { scroll-snap-align: start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; display: grid; gap: 6px; justify-items: center; text-align: center; background: var(--surface); }
.wday .dn { font-weight: 700; font-size: 14px; }
.wday .dd { font-size: 12px; color: var(--ink-3); margin-top: -4px; }
.wday .st { font-size: 12px; padding: 0 8px; min-height: 24px; }
.wday .pk { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; }
.wday .pk b { color: var(--ink); }
.wday .pp { font-size: 16px; font-weight: 700; }
.wday .pp small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.wday.long .pp { font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* Tide and water */
.tide-events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px var(--s3); margin: var(--s3) 0 0; padding: 0; list-style: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.tide-events b { font-size: 15px; }
.kv { display: grid; gap: 10px; margin: 0; }
.kv > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s3); }
.kv dt { color: var(--ink-3); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.kv dd { margin: 0; font-size: 15px; }
.kv dd .sub { display: block; color: var(--ink-3); font-size: 13px; }

/* Guide */
.compass-wrap { display: grid; gap: var(--s3); justify-items: center; }
.compass { width: 100%; max-width: 260px; height: auto; }
.cp-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.cp-sector { stroke: var(--surface); stroke-width: 2; }
.cp-sector.s-on { fill: var(--cls-on); fill-opacity: 0.3; }
.cp-sector.s-xon { fill: var(--cls-xon); fill-opacity: 0.35; }
.cp-sector.s-cross { fill: var(--cls-cross); fill-opacity: 0.18; }
.cp-sector.s-xoff { fill: var(--cls-xoff); fill-opacity: 0.35; }
.cp-sector.s-off { fill: var(--cls-off); fill-opacity: 0.35; }
.cp-shore { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.cp-land { fill: var(--surface-2); }
.cp-t { fill: var(--ink); font-size: 11px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
.cp-t--card { fill: var(--ink-3); font-size: 12px; }
.cp-t--sea { fill: var(--accent); font-size: 12px; }
.cp-wind { fill: var(--ink); }
.cp-wind-line { stroke: var(--ink); stroke-width: 2.5; }
.sector-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; width: 100%; }
.sector-list li { display: flex; gap: 8px; align-items: center; }
.sector-list .sw { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.sw-on { background: var(--cls-on); } .sw-xon { background: var(--cls-xon); } .sw-cross { background: var(--cls-cross); opacity: 0.55; }
.sw-xoff { background: var(--cls-xoff); } .sw-off { background: var(--cls-off); }
.hazards { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.guide-block + .guide-block { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.guide-block h3 { margin-bottom: var(--s2); }
.tel { font-weight: 700; font-variant-numeric: tabular-nums; }

details.more { margin-top: var(--s3); border-top: 1px solid var(--line); }
details.more > summary { min-height: 48px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--accent); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .chev { transition: transform 0.15s ease-out; }
details.more[open] > summary .chev { transform: rotate(90deg); }
.models-table { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 560px; }
.models-table th, .models-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.models-table thead th { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Sources + footer */
.sources { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.sources ul { margin: var(--s2) 0 0; padding-left: 18px; display: grid; gap: 4px; }
.site-foot { margin-top: var(--s6); padding: var(--s5) 0 var(--s6); border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; line-height: 20px; }
.site-foot .emerg { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: var(--s3) 0; }
.site-foot .emerg a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s3); border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0 var(--s4); }
.site-foot nav a { display: inline-flex; align-items: center; min-height: 44px; }


/* ---------- 20. App additions (build stage) ---------- */
[hidden] { display: none !important; }
.st-nodata { background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--surface) 5px 9px); color: var(--ink-2); border-color: var(--line); }
.w.nodata, td.nodata { background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--surface) 5px 9px); color: var(--ink-2); }
.c-nodata { fill: var(--line); fill-opacity: 0.6; }
.c-kite-no { fill: var(--st-no-bg); }
.c-ens { fill: var(--accent); fill-opacity: 0.14; }

/* hour slider under the chart (BC-6: the SVG stays role=img; hour selection lives on this slider) */
.hour-pick { display: grid; gap: 4px; margin-top: var(--s3); }
.hour-pick label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hour-slider { width: 100%; min-height: 44px; accent-color: var(--accent); background: transparent; }
.readout { font-size: 15px; line-height: 22px; font-variant-numeric: tabular-nums; }

/* page-level states */
.state-msg { margin: var(--s5) 0; }
.skel-block { display: block; border-radius: var(--r); background: var(--surface-2); }
.skel-pick { height: 320px; }
.skel-list { height: 280px; }
.skel-now { height: 260px; }
.skel-chart { height: 240px; }
.loading-line { color: var(--ink-3); font-size: 14px; margin-top: var(--s2); }
.err h2 { margin-bottom: var(--s2); }
.err .emerg { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: var(--s3) 0; }
.btn-plain { font: inherit; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--s4); border-radius: 999px; border: 1px solid var(--accent); background: var(--surface); color: var(--accent); font-weight: 700; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; max-width: 92vw; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); }
.noscript { margin: var(--s5) 0; }

/* notice cards (provisional orientation C2, mouth state) */
.notice { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px var(--s3); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--al-inf-bd); background: var(--al-inf-bg); color: var(--al-inf-t); margin-top: var(--s2); }
.notice .ico { width: 22px; height: 22px; }
.notice p { font-size: 15px; line-height: 22px; }
.notice a { color: inherit; font-weight: 700; }
.alert .suffix a { color: inherit; }
.alert .details { font-size: 14px; margin-top: 4px; }
.alert .details summary { cursor: pointer; font-weight: 700; min-height: 32px; display: inline-flex; align-items: center; }
.alert--saws { background: var(--al-amb-bg); border-color: var(--al-amb-bd); color: var(--al-amb-t); }
.alert .verbatim { white-space: pre-line; }
.tag--warn { background: var(--al-amb-bg); color: var(--al-amb-t); border-color: var(--al-amb-bd); }
.amber-text { color: var(--al-amb-t); font-weight: 700; }
.now-row--dim { color: var(--ink-3); }
.now-row--dim .val b { color: var(--ink-3); }

/* dialogs and sheets */
dialog.sheet { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(560px, 94vw); max-height: 88vh; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog.sheet::backdrop { background: rgb(0 0 0 / 45%); }
dialog.sheet[open] { animation: sheet-in 0.18s ease-out; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sheet-body { padding: var(--s4); display: grid; gap: var(--s4); }
.close-btn { font: inherit; min-width: 44px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; }
.sheet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sheet-list a { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 48px; padding: 0 var(--s3); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; background: var(--surface-2); }
.sheet-list .loc-name { font-size: 13px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: var(--s2); }

/* settings form */
.form-group { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.form-group legend { font-weight: 700; margin-bottom: var(--s2); padding: 0; }
.radio-cards { display: grid; gap: var(--s2); }
.radio-card { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px var(--s2); align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; min-height: 44px; }
.radio-card input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--accent); }
.radio-card b { display: block; }
.radio-card span { color: var(--ink-2); font-size: 14px; }
.radio-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); }
.seg label { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { background: var(--ink); color: var(--bg); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; gap: var(--s2); }
.stepper button { font: inherit; min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; font-weight: 700; cursor: pointer; }
.stepper input, .form-select { font: inherit; font-size: 16px; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.stepper input { width: 88px; text-align: center; font-variant-numeric: tabular-nums; }
.form-note { font-size: 14px; color: var(--ink-2); }
.saved { font-size: 14px; color: var(--ink-2); min-height: 20px; }

/* compare */
.cmp-controls { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-bottom: var(--s3); }
.cmp { border-collapse: separate; border-spacing: 2px; font-size: 13px; min-width: 100%; }
.cmp caption { text-align: left; padding: 0 2px var(--s2); color: var(--ink-2); font-size: 14px; }
.cmp th { font-size: 12px; color: var(--ink-3); font-weight: 700; padding: 2px; text-align: center; white-space: nowrap; }
.cmp th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; font-size: 13px; color: var(--ink); padding-right: 8px; }
.cmp th[scope="row"] a { color: inherit; }
.cmp td { padding: 0; }
.cmp .cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 44px; min-height: 48px; border-radius: 6px; font-weight: 700; text-decoration: none; border: 1px solid transparent; font-size: 12px; line-height: 14px; }
.cmp .cell .dir { width: 14px; height: 14px; }
.cmp .cell .meter i { width: 3px; height: 9px; }
.cmp .cell .ico { width: 14px; height: 14px; }

/* about */
.prose { max-width: 760px; }
.prose h2 { margin-top: var(--s6); margin-bottom: var(--s2); }
.prose h3 { margin-top: var(--s4); margin-bottom: var(--s2); }
.prose p, .prose li { font-size: 16px; line-height: 26px; }
.prose p + p { margin-top: var(--s3); }
.prose ul { padding-left: 22px; }
.prose details { margin-top: var(--s3); border: 1px solid var(--line); border-radius: 10px; padding: 0 var(--s3); background: var(--surface); }
.prose details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--accent); }
.prose table, .runs { border-collapse: collapse; width: 100%; font-size: 14px; margin-top: var(--s3); }
.prose th, .prose td, .runs th, .runs td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.draft { display: inline-block; margin-top: var(--s2); }
.credit-list { display: grid; gap: var(--s3); padding-left: 22px; }


/* ---------- 21. Rev 4: Kite Beach home — today/tomorrow answer, 7-day list with hourly drill-down ---------- */
.answer { margin-top: var(--s3); border-top: 4px solid var(--accent); }
.answer-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: var(--s2) 0; }
.answer-line { font-size: 17px; line-height: 24px; font-weight: 600; }
.wkl { display: grid; gap: var(--s2); }
.wk-day { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.wk-day.sel { border-color: var(--accent); }
.wk-h { margin: 0; font-size: inherit; font-weight: inherit; }
.wk-sum { font: inherit; color: inherit; background: transparent; border: 0; width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) 24px; grid-template-areas: "when chev" "verdict chev" "facts chev";
  gap: 6px var(--s2); padding: 10px 12px; min-height: 44px; border-radius: 10px; }
.wk-sum:hover { background: var(--surface-2); }
.wk-sum .chev { grid-area: chev; align-self: center; transition: transform 0.15s ease-out; color: var(--ink-3); }
.wk-sum[aria-expanded="true"] .chev { transform: rotate(90deg); }
.wk-when { grid-area: when; font-size: 15px; }
.wk-when b { font-weight: 700; }
.wk-verdict { grid-area: verdict; display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s3); }
.wk-win { font-weight: 700; font-size: 16px; }
.wk-facts { grid-area: facts; display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s3); font-size: 14px; color: var(--ink-2); }
.wk-facts b { color: var(--ink); }
.wk-hours { padding: 0 12px 12px; border-top: 1px solid var(--line); }
.wk-hours > div > p { margin-top: var(--s2); }
.hr-list { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: 2px; }
.hr-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; grid-template-areas: "t wind st" "t dir dir" "t k c" "t x x";
  gap: 2px var(--s2); align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.hr-row:last-child { border-bottom: 0; }
.hr-t { grid-area: t; font-weight: 700; align-self: start; font-size: 15px; }
.hr-wind { grid-area: wind; white-space: nowrap; }
.hr-wind .w { display: inline-flex; min-width: 30px; height: 24px; padding: 0 4px; font-size: 14px; margin-right: 4px; }
.hr-dir { grid-area: dir; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.hr-dir .dir { width: 18px; height: 18px; }
.hr-st { grid-area: st; justify-self: end; }
.hr-st .st { font-size: 13px; min-height: 24px; padding: 0 8px; }
.hr-k { grid-area: k; }
.hr-c { grid-area: c; justify-self: end; display: inline-flex; align-items: center; gap: 4px; }
.hr-x { grid-area: x; font-size: 13px; }
.hr-night { color: var(--ink-3); }
.hr-night .hr-t { color: var(--ink-3); }
.hr-nodata .hr-main { grid-column: 2 / 4; color: var(--ink-2); }
.hr-nodata { background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--surface) 5px 9px); }
.hr-nightbox { margin-top: var(--s2); }
@media (min-width: 600px) {
  .wk-sum { grid-template-columns: 170px minmax(0, 1fr) 24px; grid-template-areas: "when verdict chev" "when facts chev"; }
  .hr-row { grid-template-columns: 56px 150px minmax(0, 1.4fr) minmax(0, 1fr) auto; grid-template-areas: "t wind dir st c" "t k x x x"; }
  .hr-st { justify-self: start; }
}

/* ---------- 18. Breakpoints ---------- */
@media (min-width: 600px) {
  .wrap { padding: 0 var(--s5); }
  .days { margin: 0 calc(-1 * var(--s5)); }
  .days .inner { padding: 2px var(--s5); }
  .hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .locs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .locs .loc:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .chip-btn--units { display: inline-flex; }
  .wk { font-size: 12px; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .topnav { display: flex; }
  h1 { font-size: 32px; line-height: 38px; }
  .locs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .locs .loc:last-child:nth-child(odd) { grid-column: auto; }
  .spot-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--s4); align-items: start; }
  .col-main, .col-side { display: flex; flex-direction: column; gap: var(--s4); }
  .days { position: static; margin: 0; padding: 0; background: transparent; }
  .days .inner { padding: 2px 0; }
  .now-num .big { font-size: 64px; line-height: 64px; }
  .dir--xl { width: 52px; height: 52px; }
  .chart-box { min-height: 300px; }
  .chart-box--tide, .chart-box--models { min-height: 170px; }
  .weekstrip { grid-auto-flow: row; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: visible; }
  .notes[open] ul { padding-bottom: 14px; }
}
@media (min-width: 1200px) {
  .hourly td { min-width: 44px; }
}

/* ---------- 19. Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open] { animation: none; }
  .wk-sum .chev { transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .st, .w, .wk, .badge, .tag, .alert, .alert-compact, .day, .win, .card, .cmp .cell, .notice, .wk-day { border: 1px solid CanvasText; }
  .meter i, .bars i { background: CanvasText; forced-color-adjust: none; }
  .dir, .c-arrow { fill: CanvasText; }
  .c-wind, .m-cons, .t-curve { stroke: CanvasText; }
}
@media print {
  .topbar, .bottomnav, .days, .hour-slider { display: none; }
  body { padding: 0; background: #fff; color: #000; }
}
