/* ==========================================================================
   Catch Signal: app stylesheet (public/css/app.css)

   Loaded by index.html after base.css (tokens, type, header/footer, buttons,
   forms, prose). Holds the app shell and the forecast components; other
   screens keep their styles in community.css and now.css.

   Contents
     1. App tokens
     2. Shell: tab bar, account menu, toast, loading and state panels
     3. Shared pieces: cards, chips, go status, mode switch, "Fishing at" spot
        picker and spot verdict chips, badges, attribution
     4. Forecast page: head, hero, go strip, gauge, week rows (with the
        "At <spot>" line), report, explainer
     5. Charts: day chart, strips and sparklines
     6. Day page: nav, head, facts, chart box, inspector, best times, parts,
        species and spot cards, booking, comments, "Your spot"
     7. Wider screens
     8. Forced colours, print
   No inline styles anywhere (CSP): dynamic geometry lives in SVG attributes.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. App tokens
   "Excellent" is a warm sunrise gradient (the port-marker orange family) so it
   reads as rare and special; everything else stays in the sea palette.
   -------------------------------------------------------------------------- */
:root {
  --ex-a: #ffbe6b;
  --ex-b: #ff7a3d;
  --ex-ink: #3a1500;
  --ex-glow: rgb(255 122 61 / .30);
  --ex-tint: rgb(255 138 61 / .09);
  --tab-h: 62px;
  --hpz: #1f4e8c; --hpz-bg: #dfe9f7;
  --cpz: #7a5a00; --cpz-bg: #fbf0c2;
  --mnp: #1d6b3a; --mnp-bg: #d8efdf;
  --chart-night: rgb(15 42 58 / .075);
  --chart-twilight: rgb(15 42 58 / .035);
  --chart-band: rgb(14 114 126 / .20);
  --chart-win: rgb(217 84 26 / .07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ex-glow: rgb(255 138 61 / .38); --ex-tint: rgb(255 138 61 / .10);
    --hpz: #9cc0ff; --hpz-bg: #172b48; --cpz: #f0cf6a; --cpz-bg: #33290c; --mnp: #7fd69b; --mnp-bg: #12301f;
    --chart-night: rgb(0 0 0 / .32); --chart-twilight: rgb(0 0 0 / .16); --chart-band: rgb(72 184 192 / .24); --chart-win: rgb(255 138 61 / .09);
  }
}
:root[data-theme="dark"] {
  --ex-glow: rgb(255 138 61 / .38); --ex-tint: rgb(255 138 61 / .10);
  --hpz: #9cc0ff; --hpz-bg: #172b48; --cpz: #f0cf6a; --cpz-bg: #33290c; --mnp: #7fd69b; --mnp-bg: #12301f;
  --chart-night: rgb(0 0 0 / .32); --chart-twilight: rgb(0 0 0 / .16); --chart-band: rgb(72 184 192 / .24); --chart-win: rgb(255 138 61 / .09);
}


/* --------------------------------------------------------------------------
   2. Shell
   Phones: brand + account in the header, the main nav as a bottom tab bar
   ("Now" first). From 40rem the nav sits in the header and the bar goes away.
   -------------------------------------------------------------------------- */
.app-main { outline: none; }
.app-main:focus { outline: none; }
.view { display: grid; gap: var(--space-5); min-width: 0; }
.view > * { min-width: 0; }

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
  background: var(--bar);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--tab-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px 4px;
  color: var(--muted);
  font: 600 .6875rem/1.1 var(--font-body);
  letter-spacing: .02em;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar a[aria-current="page"] { color: var(--accent); }
.tabbar a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22%;
  right: 22%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
}
.tabbar a[data-nav="now"] svg circle:nth-of-type(2) { fill: currentColor; }

@media (max-width: 39.99rem) {
  .app .site-nav { display: none; }
  .app .site-header-inner { padding-block: var(--space-2); }
  body.app { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
  .app .site-main { padding-top: var(--space-4); }
}
@media (min-width: 40rem) {
  .tabbar { display: none; }
}

/* Account: sign-in button or avatar menu */
.site-actions { min-height: 40px; }
.account-menu { position: relative; }
.account-menu > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 3px 8px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: var(--fs-sm);
}
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:hover { border-color: var(--accent); }
.account-menu[open] > summary { border-color: var(--accent); }
.account-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { color: var(--muted); }
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sunken);
}
.avatar-initials { background: var(--accent); color: var(--accent-ink); font: 700 .875rem/1 var(--font-body); letter-spacing: .02em; }
.account-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 13.5rem;
  display: grid;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.account-who { padding: var(--space-2) var(--space-3) var(--space-3); border-bottom: 1px solid var(--line); margin-bottom: var(--space-1); }
.account-pop a, .account-pop button {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: 500 var(--fs-sm)/1.2 var(--font-body);
  text-align: left;
  text-decoration: none;
}
.account-pop a:hover, .account-pop button:hover { background: var(--sunken); }
.account-pop button { color: var(--warn); }
@media (max-width: 39.99rem) {
  .account-name, .caret { display: none; }
  .account-menu > summary { padding: 3px; }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: min(32rem, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  box-shadow: var(--shadow);
  transform: translate(-50%, 160%);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.err { background: var(--warn); color: #fff; }
@media (max-width: 39.99rem) {
  .toast { bottom: calc(var(--tab-h) + 14px + env(safe-area-inset-bottom)); }
}

/* Loading skeletons and whole-page states */
.boot { display: grid; gap: var(--space-3); }
.boot i, .sk {
  display: block;
  border-radius: var(--radius-lg);
  background: var(--sunken);
  animation: cs-pulse 1.3s ease-in-out infinite alternate;
}
.boot i { height: 88px; }
.boot i:first-child { height: 180px; }
.sk-hero { height: 220px; }
.sk-strip { height: 96px; }
.sk-row { height: 116px; }
.sk-head { height: 120px; }
.sk-chart { height: 280px; }
.fc-loading, .dv-loading { display: grid; gap: var(--space-3); }
@keyframes cs-pulse { from { opacity: .5; } to { opacity: 1; } }

.state-panel {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
  max-width: var(--measure);
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.state-panel h1 { font-size: var(--fs-xl); }
.state-panel p { color: var(--muted); }


/* --------------------------------------------------------------------------
   3. Shared pieces
   -------------------------------------------------------------------------- */
.card {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.card h2 { font-size: var(--fs-lg); letter-spacing: .04em; }
.card > * + * { margin-top: var(--space-3); }
.small { font-size: var(--fs-sm); }
.warn-text { color: var(--warn); }
.ic { flex: none; vertical-align: -.15em; }

.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); }
.sec-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); color: var(--muted); font-size: var(--fs-sm); }

/* Rating chips. Poor is quiet, Fair neutral, Good teal, Excellent glows. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 700 .8125rem/1 var(--font-display);
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip .ic { width: 13px; height: 13px; }
.chip-lg { min-height: 34px; padding: 6px 15px; font-size: 1.0625rem; gap: 7px; }
.chip-lg .ic { width: 16px; height: 16px; }
.chip-poor { color: var(--muted); border-color: var(--line); background: transparent; }
.chip-fair { color: var(--ink); background: var(--sunken); border-color: var(--line); }
.chip-good { color: var(--accent-ink); background: var(--accent); }
.chip-excellent {
  color: var(--ex-ink);
  background: linear-gradient(105deg, var(--ex-a), var(--ex-b));
  box-shadow: 0 0 0 3px var(--ex-glow), 0 6px 18px -6px var(--ex-b);
  text-shadow: 0 1px 0 rgb(255 255 255 / .25);
}
.chip-excellent .ic { color: #fff; filter: drop-shadow(0 0 2px rgb(120 40 0 / .5)); }
.chip-nogo { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-bg); }
@supports (color: color-mix(in srgb, red 50%, red)) { .chip-nogo { border-color: color-mix(in srgb, var(--warn) 35%, transparent); } }
.chip-marginal { color: var(--caution); background: var(--caution-bg); border-color: var(--caution-bg); }
@supports (color: color-mix(in srgb, red 50%, red)) { .chip-marginal { border-color: color-mix(in srgb, var(--caution) 30%, transparent); } }
.chip-none { color: var(--muted); border: 1px dashed var(--field-line); background: transparent; }

/* Go / marginal / no-go status (text + icon, never colour alone) */
.go { display: inline-flex; align-items: center; gap: 4px; font: 600 var(--fs-sm)/1 var(--font-body); white-space: nowrap; }
.go-yes { color: var(--good); }
.go-maybe { color: var(--caution); }
.go-no { color: var(--warn); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--muted);
  font: 600 .6875rem/1.4 var(--font-body);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill-best { background: var(--ex-tint); color: var(--marker-text); }
.pill-boat { background: var(--hpz-bg); color: var(--hpz); }
.badge-best {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--marker-text);
  font: 700 .75rem/1 var(--font-body);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.agree { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }
.agree::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--field-line); }
.agree-yes::before { background: var(--good); }
.agree-mid::before { background: var(--caution); }
.agree-no::before { background: var(--warn); }

.tt { white-space: nowrap; }
.tt + .tt { margin-left: 6px; }
.tt-k {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  font: 600 .625rem/1 var(--font-data);
  text-decoration: none;
  vertical-align: 1px;
}
.tt-high { background: var(--hpz-bg); color: var(--tide); }
@supports (color: color-mix(in srgb, red 50%, red)) { .tt-high { background: color-mix(in srgb, var(--tide) 16%, transparent); } }
.tt-low { border: 1px solid var(--field-line); color: var(--tide); }
@supports (color: color-mix(in srgb, red 50%, red)) { .tt-low { border-color: color-mix(in srgb, var(--tide) 40%, transparent); } }
.tt-h { color: var(--muted); font-size: var(--fs-xs); }

.moon { display: block; flex: none; }
.moon .moon-dark { fill: var(--moon-dark); stroke: var(--muted); stroke-opacity: .45; stroke-width: .8; }
.moon .moon-lit { fill: var(--moon-lit); }

/* Mode switch: a segmented radio group */
.mode-switch { display: grid; gap: 6px; min-width: 0; }
/* A rendered legend sits outside the fieldset's grid (no gap): its margin matches the picker's label-to-field gap */
.mode-legend { padding: 0; margin-bottom: 6px; font: 600 .75rem/1.2 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mode-opts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sunken);
}
.mode-opt { position: relative; display: block; min-width: 0; cursor: pointer; }
.mode-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mode-opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 9px;
  color: var(--muted);
  font: 600 var(--fs-sm)/1.1 var(--font-body);
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.mode-opt:hover span { color: var(--ink); }
.mode-opt input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(15 42 58 / .12), 0 0 0 1px var(--line); }
.mode-opt input:checked + span .ic { color: var(--accent); }
.mode-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* "Fishing at": the spot picker (components/location.js). Same legend style as the mode switch, a styled native
   select (pin on the left, caret on the right) and a save line under it. */
.loc { display: grid; gap: 6px; min-width: 0; }
.loc-label { font: 600 .75rem/1.2 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.loc-field { position: relative; min-width: 0; }
.loc-pin, .loc-caret { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; }
.loc-pin { left: 12px; color: var(--accent); }
.loc-caret { right: 14px; color: var(--muted); }
.loc-select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 10px 36px 10px 38px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: 600 var(--fs-base)/1.2 var(--font-body);
  text-overflow: ellipsis;
  cursor: pointer;
}
.loc-select:hover { border-color: var(--accent); }
.loc-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.loc-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-3); min-height: 32px; color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; }
.loc-note a { font-weight: 600; }
.loc-default { display: inline-flex; align-items: center; gap: 5px; color: var(--good); font-weight: 600; font-size: var(--fs-sm); }
.loc-save { gap: 5px; }
.loc-save .ic { color: var(--accent); }
.loc-compact .loc-select { min-height: 44px; }

/* How the day looks at the user's spot (advice.spotConditions): a small sentence-case status, unlike the
   upper-case day label chips, so it never reads as a second rating of the day */
.spot-v {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 .75rem/1.2 var(--font-body);
  white-space: nowrap;
}
.spot-v .ic { width: 13px; height: 13px; }
.spot-v-lg { min-height: 30px; padding: 4px 12px; font-size: var(--fs-sm); }
.spot-v-lg .ic { width: 15px; height: 15px; }
.spot-v-good { background: var(--good-bg); color: var(--good); }
.spot-v-ok { background: var(--sunken); color: var(--ink); border-color: var(--line); }
.spot-v-ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.spot-v-choppy { background: var(--caution-bg); color: var(--caution); }
.spot-v-too-windy { background: var(--warn-bg); color: var(--warn); }
.spot-v-no-go { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
@supports (color: color-mix(in srgb, red 50%, red)) { .spot-v-no-go { border-color: color-mix(in srgb, var(--warn) 40%, transparent); } }
.spot-v-no-forecast { color: var(--muted); border: 1px dashed var(--field-line); background: transparent; }
.pill-mine { background: var(--accent); color: var(--accent-ink); }

/* Zone and exposure badges */
.zone, .expo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font: 500 .75rem/1.4 var(--font-body);
  white-space: nowrap;
}
.zone b { font-family: var(--font-data); font-weight: 500; font-size: .6875rem; }
.zone-none { background: var(--sunken); color: var(--muted); }
.zone-hpz { background: var(--hpz-bg); color: var(--hpz); }
.zone-cpz { background: var(--cpz-bg); color: var(--cpz); }
.zone-mnp { background: var(--mnp-bg); color: var(--mnp); }
.expo-lee { background: var(--good-bg); color: var(--good); }
.expo-cross { background: var(--sunken); color: var(--muted); }
.expo-onshore { background: var(--caution-bg); color: var(--caution); }

.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm); }
.why-list li { position: relative; padding-left: 16px; }
.why-list li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .7; }

.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.link-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { font-weight: 600; }

.attrs { display: grid; gap: 4px; }
.attr { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.attr a { color: inherit; }

.notice ul { margin: 0; padding-left: 1.2em; font-size: var(--fs-sm); }

.card-grid { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }

details > summary { cursor: pointer; }
.explain, .hour-table, .more-targets, .more-spots, .sp-more { min-width: 0; }
.explain > summary, .hour-table > summary, .more-targets > summary, .more-spots > summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--accent);
  font-weight: 600;
  font-size: var(--fs-sm);
}


/* --------------------------------------------------------------------------
   4. Forecast page
   -------------------------------------------------------------------------- */
.fc { display: grid; gap: var(--space-4); }
.fc-head { display: grid; gap: var(--space-4); align-items: end; }
.fc-controls { display: grid; gap: var(--space-3); min-width: 0; }
.fc-title { display: grid; gap: var(--space-2); }
.fc-title h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 2.75rem); }

/* Hero: the day to go (or the honest alternatives) */
.hero {
  position: relative;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-excellent {
  border-color: var(--marker);
  background:
    radial-gradient(120% 90% at 100% 0%, var(--ex-tint), transparent 60%),
    var(--surface);
}
@supports (color: color-mix(in srgb, red 50%, red)) { .hero-excellent { border-color: color-mix(in srgb, var(--marker) 45%, var(--line)); } }
.hero-excellent::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ex-a), var(--ex-b));
}
.hero-nogo { border-color: var(--warn); }
@supports (color: color-mix(in srgb, red 50%, red)) { .hero-nogo { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); } }
.hero-empty { box-shadow: none; }
.hero-main { display: grid; gap: var(--space-2); justify-items: start; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--marker-text);
  font: 700 .75rem/1.2 var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-nogo .hero-kicker { color: var(--warn); }
.hero-tie .hero-kicker, .hero-empty .hero-kicker { color: var(--muted); }
.hero-day { font-size: clamp(2rem, 1.4rem + 3.2vw, 3.25rem); line-height: 1; }
.hero-rel { display: block; margin-bottom: 4px; color: var(--accent); font-size: .5em; letter-spacing: .08em; }
.hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-1); }
.hero-meaning { max-width: 52ch; color: var(--muted); }
.gate-line { display: flex; gap: 6px; font-size: var(--fs-sm); font-weight: 500; }
.gate-line::before { content: ""; flex: none; width: 4px; border-radius: 2px; }
.gate-marginal { color: var(--caution); }
.gate-marginal::before { background: var(--caution); }
.gate-no-go { color: var(--warn); }
.gate-no-go::before { background: var(--warn); }

.hero-when {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--sunken);
}
.hero-when-k { color: var(--muted); font: 600 .75rem/1.2 var(--font-body); letter-spacing: .1em; text-transform: uppercase; }
.hero-when-v { font: 700 clamp(2rem, 1.6rem + 1.8vw, 2.75rem)/1 var(--font-display); letter-spacing: .01em; }
.hero-excellent .hero-when-v { color: var(--marker-text); }
.hero-why { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; color: var(--muted); font-size: var(--fs-sm); }

.hero-facts { display: grid; gap: var(--space-2); margin: 0; font-size: var(--fs-sm); }
.hero-facts > div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--space-3); align-items: baseline; }
.hero-facts dt { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.hero-facts dd { margin: 0; }
.hf-spot dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.hf-spot-name { font-weight: 600; }
.hf-spot-t { flex-basis: 100%; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.mini-days { display: grid; gap: var(--space-2); }
.mini-day {
  display: grid;
  gap: 6px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
}
.mini-day:hover { border-color: var(--accent); }
.mini-name { font: 700 1.25rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.mini-name b { color: var(--accent); }
.mini-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.mini-line { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }

/* Go / marginal / no-go strip for the week */
.go-strip { display: grid; gap: var(--space-3); }
.go-strip > * + * { margin-top: 0; }
.go-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-3); }
.go-counts { display: flex; flex-wrap: wrap; gap: 4px var(--space-3); font-size: var(--fs-sm); font-weight: 600; }
.gcnt-yes { color: var(--good); }
.gcnt-maybe { color: var(--caution); }
.gcnt-no { color: var(--warn); }
.go-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.go-cell {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 0 7px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: .75rem;
}
.go-cell:hover { border-color: var(--accent); }
.gc-dow { font-weight: 600; color: var(--muted); font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; }
.gc-d { font: 700 1.125rem/1 var(--font-display); }
.gc-ic { display: grid; place-items: center; height: 18px; }
/* Under 375 px (360 px Androids, the 320 px iPhone SE) "TODAY" is wider than its eighth of the strip: tighten it */
@media (max-width: 23.4rem) {
  .go-days { gap: 2px; }
  .gc-dow { font-size: .625rem; letter-spacing: 0; }
}
.go-cell-yes { background: var(--good-bg); }
.go-cell-yes .gc-ic { color: var(--good); }
.go-cell-maybe { background: var(--caution-bg); }
.go-cell-maybe .gc-ic { color: var(--caution); }
.go-cell-no { background: var(--warn-bg); }
.go-cell-no .gc-ic { color: var(--warn); }
.go-cell-none { border: 1px dashed var(--line); }
.go-note { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }

/* Live tide gauge */
.gauge { display: grid; gap: var(--space-3); }
.gauge > * + * { margin-top: 0; }
.gauge-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-5); }
.gauge-title { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-lg); }
.live-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--good); }
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--good);
  opacity: .5;
  animation: cs-ping 2s ease-out infinite;
}
.live-dot.is-old { background: var(--caution); }
.live-dot.is-old::after { display: none; }
@keyframes cs-ping { from { transform: scale(.6); opacity: .6; } to { transform: scale(1.4); opacity: 0; } }
.gauge-val b { font: 700 1.75rem/1 var(--font-display); letter-spacing: .01em; }
.gauge-val .muted { font-size: var(--fs-sm); }
.gauge-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: var(--fs-sm); }
.gauge-spark { display: grid; gap: 4px; }
.gauge-svg { display: block; width: 100%; height: 46px; }
.gauge-svg .g-obs { fill: none; stroke: var(--tide); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.gauge-svg .g-pred { fill: none; stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 4 3; }
.gauge-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: var(--fs-xs); }
.gauge-key span { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--tide); }
.gauge-key .k-pred { border-top: 1.5px dashed var(--muted); margin-left: 6px; }

/* The week */
.week { display: grid; gap: var(--space-3); }
.week h2 { font-size: var(--fs-xl); }
.strip-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-4); color: var(--muted); font-size: var(--fs-xs); }
.strip-key > span { display: inline-flex; align-items: center; gap: 6px; }
.sk-ramp { display: inline-flex; gap: 1px; }
.sk-ramp i { width: 10px; height: 10px; border-radius: 2px; background: var(--heat-0); }
.sk-ramp i:nth-child(2) { background: var(--heat-1); }
.sk-ramp i:nth-child(3) { background: var(--heat-2); }
.sk-ramp i:nth-child(4) { background: var(--heat-3); }
.sk-ramp i:nth-child(5) { background: var(--heat-4); }
.sk-win { display: inline-block; width: 18px; height: 11px; border: 2px solid var(--marker); border-radius: 3px; }

.day-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.day-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "date verdict"
    "facts facts"
    "spot spot"
    "gate gate"
    "alert alert"
    "strip strip";
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) var(--space-4) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.day-row:hover { border-color: var(--accent); box-shadow: var(--shadow); }
@supports (color: color-mix(in srgb, red 50%, red)) { .day-row:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); } }
.day-row:focus-within { border-color: var(--accent); }
.dr-date { grid-area: date; display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.dr-title { font-size: 1.375rem; letter-spacing: .03em; line-height: 1; }
.dr-link { color: var(--ink); text-decoration: none; }
.dr-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* the whole row opens the day */
.dr-link:focus-visible { outline: none; }
.dr-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.dr-dm { color: var(--muted); font-size: .72em; letter-spacing: .05em; }
.dr-moon { display: inline-flex; }
.dr-verdict { grid-area: verdict; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px var(--space-2); }
.dr-verdict .badge-best { flex-basis: 100%; justify-content: flex-end; order: -1; }
.dr-facts { grid-area: facts; display: grid; gap: 5px; margin: 0; font-size: var(--fs-sm); }
.dr-facts > div { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.dr-facts dt { color: var(--muted); }
.dr-facts dt .ic { vertical-align: -3px; }
.dr-facts dd { margin: 0; min-width: 0; }
.f-best b { font-size: var(--fs-base); }
.dr-note { color: var(--muted); }
.day-row > .gate-line { grid-area: gate; }
/* "At <spot>": how the day looks at the user's spot (a quiet well, so it reads as about your spot, not the day) */
.dr-spot {
  grid-area: spot;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--sunken);
  font-size: var(--fs-sm);
}
.dr-spot > .ic { color: var(--accent); }
.dr-spot-at { font-weight: 600; min-width: 0; }
.dr-spot-t { min-width: 0; color: var(--muted); }
.dr-spot-better { flex-basis: 100%; color: var(--accent); font-size: var(--fs-xs); font-weight: 600; }
.dr-spot.is-none { background: transparent; border: 1px dashed var(--line); }
.dr-spot.is-none > .ic { color: var(--muted); }
.alert-line { grid-area: alert; display: flex; align-items: center; gap: 6px; color: var(--caution); font-size: var(--fs-xs); }
.dr-strip { grid-area: strip; padding-top: 2px; }
.dr-go { display: none; }

/* Excellent rows are rare, so they get the warm treatment */
.day-row.is-excellent {
  border-color: var(--marker);
  background: linear-gradient(100deg, var(--ex-tint), transparent 55%), var(--surface);
}
@supports (color: color-mix(in srgb, red 50%, red)) { .day-row.is-excellent { border-color: color-mix(in srgb, var(--marker) 50%, var(--line)); } }
.day-row.is-excellent::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--ex-a), var(--ex-b));
}
.day-row.is-poor .dr-title, .day-row.is-nogo .dr-title { color: var(--muted); }
.day-row.is-nogo { background: var(--surface); }
@supports (color: color-mix(in srgb, red 50%, red)) { .day-row.is-nogo { background: color-mix(in srgb, var(--warn-bg) 35%, var(--surface)); } }
.day-row.is-none { border-style: dashed; background: transparent; }

.week .attrs { margin-top: var(--space-1); }
.explain { border-top: 1px solid var(--line); padding-top: var(--space-1); }
.explain-body { display: grid; gap: var(--space-3); max-width: var(--measure); padding-bottom: var(--space-2); font-size: var(--fs-sm); }

.fc-more { display: grid; gap: var(--space-4); align-items: start; }

/* Report card */
.report-card .eyebrow { margin: 0; }
.report-title { font-size: var(--fs-lg); line-height: 1.15; }
.report-title a { color: var(--ink); text-decoration: none; }
.report-title a:hover { color: var(--accent); text-decoration: underline; }
.report-meta { color: var(--muted); font-size: var(--fs-sm); }
.report-meta b { color: var(--ink); font-weight: 600; }
.report-note { color: var(--caution); font-size: var(--fs-sm); }
.report-row { display: grid; gap: 6px; }
.report-k { color: var(--muted); font: 600 .75rem/1.6 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.report-places { font-size: var(--fs-sm); }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

.before-go { border-left: 4px solid var(--accent); }
.before-go p { font-size: var(--fs-sm); }


/* --------------------------------------------------------------------------
   5. Charts
   -------------------------------------------------------------------------- */
.day-strip { display: block; width: 100%; height: 18px; }
.day-strip .s-c { fill: var(--heat-0); }
.day-strip .s-1 { fill: var(--heat-1); }
.day-strip .s-2 { fill: var(--heat-2); }
.day-strip .s-3 { fill: var(--heat-3); }
.day-strip .s-4 { fill: var(--heat-4); }
.day-strip .s-g { fill: var(--warn-bg); }
.day-strip .s-night { opacity: .55; }
.day-strip .s-past { opacity: .25; }
.day-strip .s-win { fill: none; stroke: var(--marker); stroke-width: 2; }
.day-strip .s-win-2 { stroke-dasharray: 3 2; }
.day-strip .s-now { stroke: var(--ink); stroke-width: 2; }

.chart-box { min-height: 200px; margin-inline: -10px; }
.day-chart { display: block; max-width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.day-chart text { font-family: var(--font-data); font-size: 11px; fill: var(--muted); }
.day-chart .c-night { fill: var(--chart-night); }
.day-chart .c-twilight { fill: var(--chart-twilight); }
.day-chart .c-win { fill: var(--chart-win); stroke: var(--marker); stroke-width: 2; }
.day-chart .c-win-2 { stroke-dasharray: 5 3; stroke-width: 1.5; }
.day-chart .c-win-lbl { fill: var(--marker-text); font-family: var(--font-body); font-size: 12px; font-weight: 600; }
.day-chart .c-win-lbl-2 { font-weight: 500; }
.day-chart .c-grid { stroke: var(--line); stroke-width: 1; }
.day-chart .c-base { stroke: var(--field-line); }
.day-chart .c-axis-tide { fill: var(--tide); }
.day-chart .c-unit { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.day-chart .c-tide { fill: none; stroke: var(--tide); stroke-width: 2.25; stroke-linejoin: round; }
.day-chart .c-tide-area { fill: var(--tide); fill-opacity: .09; }
.day-chart .c-tide-dot { fill: var(--surface); stroke: var(--tide); stroke-width: 2; }
.day-chart .c-tide-lbl { fill: var(--tide); font-size: 10.5px; }
.day-chart .c-tide-t { font-weight: 500; }
.day-chart .c-band { fill: var(--chart-band); }
.day-chart .c-med { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.day-chart .c-gust { stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; opacity: .55; }
.day-chart .c-arrow path { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.day-chart .c-limit { stroke: var(--warn); stroke-width: 1.25; stroke-dasharray: 6 4; }
.day-chart .c-limit-lbl { fill: var(--warn); font-size: 10px; }
.day-chart .c-hatch-bg { fill: var(--warn-bg); }
.day-chart .c-hatch { stroke: var(--warn); stroke-width: 1.5; opacity: .6; }
.day-chart .c-sun { fill: var(--marker); }
.day-chart .c-now { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 2 2; }
.day-chart .c-now-lbl { fill: var(--ink); font-size: 10px; }
.day-chart .c-empty { fill: var(--muted); font-family: var(--font-body); font-size: 13px; }
.day-chart .c-tick { stroke: var(--field-line); stroke-width: 1; }
.day-chart :is(.c-tide-lbl, .c-limit-lbl, .c-win-lbl, .c-now-lbl) {
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.day-chart .c-hit { fill: transparent; cursor: pointer; }
.day-chart .c-hit:hover { fill: var(--ink); fill-opacity: .05; }
.day-chart .c-hit.sel { fill: var(--accent); fill-opacity: .09; stroke: var(--accent); stroke-width: 1.25; }
.day-chart .c-lbl-bg { fill: var(--surface); opacity: .92; }

.wind-spark { display: block; width: 100%; height: 40px; }
.wind-spark .ws-band { fill: var(--chart-band); }
.wind-spark .ws-med { fill: none; stroke: var(--accent); stroke-width: 2; }
.wind-spark .ws-gust { fill: var(--ink); opacity: .45; }


/* --------------------------------------------------------------------------
   6. Day page
   -------------------------------------------------------------------------- */
.dv, .dv-main { display: grid; gap: var(--space-4); min-width: 0; }
.dv-main > * { min-width: 0; }
.dv-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.dv-nav a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 0 var(--space-2);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.dv-nav a:hover { background: var(--sunken); }
.dv-nav .back { margin-left: calc(var(--space-2) * -1); }
.pager { display: inline-flex; gap: var(--space-1); }

.dv-head { display: grid; gap: var(--space-4); align-items: end; }
.dv-title { display: grid; gap: var(--space-2); justify-items: start; }
.dv-title h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); line-height: 1; }
.dv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-1); }
.dv-meaning { color: var(--muted); max-width: 56ch; }
.gate-title { display: flex; align-items: flex-start; gap: 8px; }
.gate-title .ic { margin-top: 2px; }
.gate-callout .small { color: var(--muted); }
.refresh-note p { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }

.facts { display: grid; gap: var(--space-3) var(--space-4); margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts > .wide { grid-column: 1 / -1; }
.facts > div { display: grid; gap: 4px; min-width: 0; align-content: start; }
.facts dt { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 600 .75rem/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.facts dd { margin: 0; }
.fact-sub { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-sm); }
.moon-line { display: inline-flex; align-items: center; gap: 8px; }
.facts .tt { display: inline-block; margin: 0 8px 2px 0; }
.facts .tt + .tt { margin-left: 0; }
.fact-big { font: 700 1.625rem/1 var(--font-display); letter-spacing: .01em; }

.dv-chart > * + * { margin-top: var(--space-3); }
.chart-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px var(--space-4); color: var(--muted); font-size: var(--fs-xs); }
.chart-key li { display: inline-flex; align-items: center; gap: 6px; }
.k { display: inline-block; width: 18px; height: 10px; border-radius: 2px; }
.k-tide { height: 0; border-top: 2.5px solid var(--tide); border-radius: 0; }
.k-med { height: 0; border-top: 2.5px solid var(--accent); border-radius: 0; }
.k-band { background: var(--chart-band); }
.k-gust { width: 8px; height: 0; border-top: 2px solid var(--ink); opacity: .55; border-radius: 0; }
.k-win { border: 2px solid var(--marker); background: var(--chart-win); }
.k-night { background: var(--chart-night); border: 1px solid var(--line); }
.k-gated { background: repeating-linear-gradient(45deg, var(--warn) 0 1.5px, var(--warn-bg) 1.5px 4px); }

.hour-insp {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius);
  background: var(--sunken);
}
.hour-insp:empty { display: none; }
.insp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.insp-head b { font: 700 1.25rem/1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; }
.insp-rel { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-xs); }
.insp-rel .meter { width: 72px; }
.insp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 4px var(--space-4); margin: 0; font-size: var(--fs-sm); }
.insp-facts > div { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: var(--space-2); }
.insp-facts dt { color: var(--muted); }
.insp-facts dd { margin: 0; }

.meter { display: block; width: 100%; height: 6px; border-radius: 3px; overflow: hidden; }
.meter .m-track { fill: var(--sunken); }
.hour-insp .meter .m-track { fill: var(--surface); }
.meter .m-fill { fill: var(--accent); }
.meter .m-hi { fill: var(--good); }
.meter .m-mid { fill: var(--accent); }
.meter .m-lo { fill: var(--caution); }

.hour-table .table-wrap { margin-top: var(--space-2); }
table.hours { width: 100%; font-size: var(--fs-sm); font-family: var(--font-data); }
table.hours th, table.hours td { padding: 5px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.hours th[scope="row"], table.hours thead th:first-child { text-align: left; }
table.hours thead th { background: var(--sunken); font-family: var(--font-body); font-weight: 600; font-size: var(--fs-xs); }
table.hours td:last-child { text-align: left; color: var(--warn); font-family: var(--font-body); font-size: var(--fs-xs); }
table.hours tr.is-gated th, table.hours tr.is-gated td { background: var(--warn-bg); }
@supports (color: color-mix(in srgb, red 50%, red)) { table.hours tr.is-gated th, table.hours tr.is-gated td { background: color-mix(in srgb, var(--warn-bg) 50%, transparent); } }

.dv-grid { display: grid; gap: var(--space-4); align-items: start; }

.win-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.win { display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); }
.win-top { border-color: var(--marker); background: var(--ex-tint); }
@supports (color: color-mix(in srgb, red 50%, red)) { .win-top { border-color: color-mix(in srgb, var(--marker) 50%, var(--line)); } }
.win.is-past { opacity: .6; }
.win-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
.win-rank { display: inline-flex; align-items: center; gap: 4px; color: var(--marker-text); font: 700 .75rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.win:not(.win-top) .win-rank { color: var(--muted); }
.win-time { font: 700 1.625rem/1 var(--font-display); letter-spacing: .01em; }

.parts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.part { display: grid; gap: 5px; }
.part-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.part-name { font-weight: 600; }
.part-pts { font-family: var(--font-data); font-size: var(--fs-sm); white-space: nowrap; }
.part-pts b { font-weight: 500; color: var(--ink); }
.part-text { color: var(--muted); font-size: var(--fs-sm); }
.parts-total { padding-top: var(--space-3); border-top: 1px solid var(--line); font-size: var(--fs-sm); }

/* Species and spot cards */
.sp-card, .spot-card { display: grid; gap: var(--space-3); align-content: start; }
.sp-card > * + *, .spot-card > * + * { margin-top: 0; }
.sp-head { display: grid; gap: 2px; justify-items: start; }
.sp-head h3, .spot-head h3 { font-size: 1.375rem; letter-spacing: .03em; }
.sp-head h3 a, .spot-head h3 a { color: var(--ink); text-decoration: none; }
.sp-head h3 a:hover, .spot-head h3 a:hover { color: var(--accent); text-decoration: underline; }
.sp-aka { color: var(--muted); font-size: var(--fs-sm); }
.sp-head .pill { margin-top: 4px; }
.sp-facts { display: grid; gap: var(--space-2); margin: 0; font-size: var(--fs-sm); }
.sp-facts > div { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: var(--space-2); }
.sp-facts dt { display: inline-flex; align-items: flex-start; gap: 5px; color: var(--muted); font-weight: 600; }
.sp-facts dt .ic { margin-top: 2px; }
.sp-facts dd { margin: 0; min-width: 0; }
.sp-where { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.sp-where li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.checked { display: block; color: var(--muted); font-size: var(--fs-xs); }
.sp-more > summary { display: inline-flex; align-items: center; min-height: 36px; color: var(--accent); font-weight: 600; font-size: var(--fs-sm); }
.sp-more[open] > summary { margin-bottom: var(--space-2); }

.spot-card.is-best { border-color: var(--marker); }
@supports (color: color-mix(in srgb, red 50%, red)) { .spot-card.is-best { border-color: color-mix(in srgb, var(--marker) 45%, var(--line)); } }
.spot-card.is-mine { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sp-where .is-mine > a { font-weight: 600; }
.spot-head { display: grid; gap: 6px; }
.spot-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.spot-warn {
  display: flex;
  gap: 8px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: var(--fs-sm);
}
.spot-warn .ic { margin-top: 2px; }
.zone-more > summary { display: inline-flex; align-items: center; min-height: 32px; color: var(--accent); font-weight: 600; font-size: var(--fs-sm); }
.zone-note { margin-top: var(--space-1); color: var(--ink); font-size: var(--fs-xs); line-height: 1.5; }
.spot-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.spot-foot .zone-more[open] { flex-basis: 100%; order: 2; }

/* Booking */
.book-form { display: grid; gap: var(--space-4); }
.book-wins legend { margin-bottom: var(--space-2); }
.radio-cards { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.radio-card { position: relative; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-card span {
  display: grid;
  gap: 2px;
  min-width: 8.5rem;
  padding: 10px 14px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--field);
  font-weight: 400;
}
.radio-card b { font: 700 1.25rem/1 var(--font-display); letter-spacing: .02em; }
.radio-card small { color: var(--muted); font-size: var(--fs-xs); }
.radio-card input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--field); }
@supports (color: color-mix(in srgb, red 50%, red)) { .radio-card input:checked + span { background: color-mix(in srgb, var(--accent) 8%, var(--field)); } }
.radio-card input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.book-row { display: grid; gap: var(--space-3); }
.booked { display: flex; align-items: flex-start; gap: 8px; color: var(--good); }
.booked span { color: var(--ink); }

.dv-targets, .dv-spots { display: grid; gap: var(--space-3); }

/* "Your spot" (§6.0b): the user's spot that day, with the picker. The left edge carries the spot's verdict colour. */
.ys { display: grid; gap: var(--space-4); align-content: start; border-left: 4px solid var(--accent); }
.ys > * + * { margin-top: 0; }
.ys-v-good { border-left-color: var(--good); }
.ys-v-choppy { border-left-color: var(--caution); }
.ys-v-too-windy, .ys-v-no-go { border-left-color: var(--warn); }
.ys-v-no-forecast { border-left-color: var(--line); }
.ys-main { display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.ys-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.ys-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.ys-text { flex-basis: 100%; font-size: var(--fs-md); font-weight: 500; line-height: 1.35; }
.ys-text.muted { font-size: var(--fs-base); font-weight: 400; }
.ys-better {
  display: grid;
  gap: 4px;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.ys-better-k { display: inline-flex; align-items: center; gap: 5px; color: var(--good); font: 700 .75rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.ys-better-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font: 700 1.25rem/1.1 var(--font-display); letter-spacing: .02em; }
.ys-better-name a { color: var(--ink); text-decoration: none; }
.ys-better-name a:hover { color: var(--accent); text-decoration: underline; }
.ys-better-why { color: var(--muted); font-size: var(--fs-sm); }
.ys-better .btn { margin-top: var(--space-1); }
.ys-facts { display: grid; gap: var(--space-3); margin: 0; align-content: start; }
.ys-facts > div { display: grid; gap: 4px; min-width: 0; }
.ys-facts dt { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 600 .75rem/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.ys-facts dd { margin: 0; min-width: 0; }
.ys-here { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ys-here li { min-width: 0; }
.ys-here a { font-weight: 600; }
.ys-when { display: block; color: var(--muted); font-size: var(--fs-xs); }
.ys-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.ys-zone-note { flex-basis: 100%; color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.ys-zone-note a { color: inherit; }
.dv-comments { display: grid; gap: var(--space-3); }
.dv-comments > * + * { margin-top: 0; }


/* --------------------------------------------------------------------------
   7. Wider screens
   -------------------------------------------------------------------------- */
@media (min-width: 30rem) {
  .mini-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: var(--space-5); }
}

@media (min-width: 40rem) {
  .dv-head { grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem); }
  /* The forecast's two controls (mode, "Fishing at") sit side by side under the title: stacked in a column beside it
     they were much taller than the title and left an empty block above it */
  .fc-head { align-items: start; }
  /* 18rem is the narrowest the mode switch's labels fit in (as at 320 px); the picker gets the rest, so the longest
     spot name fits from about 41rem */
  .fc-controls { grid-template-columns: 18rem minmax(0, 24rem); column-gap: var(--space-5); align-items: start; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gauge { grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem); align-items: center; }
  .gauge-now { grid-column: 1; }
  .gauge-facts { grid-column: 1; }
  .gauge-spark { grid-column: 2; grid-row: 1 / span 2; }
  .gauge .attr { grid-column: 1 / -1; }
  .chart-box { margin-inline: 0; }
  .report-row { grid-template-columns: 5rem minmax(0, 1fr); align-items: baseline; gap: var(--space-2); }
  .card { padding: var(--space-5); }
}

@media (min-width: 48rem) {
  .fc-controls { grid-template-columns: 22rem minmax(0, 24rem); }
  .hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: var(--space-4) var(--space-6); }
  .hero-main { grid-column: 1; }
  .hero-when { grid-column: 2; grid-row: 1 / span 2; }
  .hero-facts { grid-column: 1; }
  .hero-actions { grid-column: 1 / -1; }
  .hero-tie .mini-days, .hero-nogo .hero-actions, .hero-empty .hero-actions { grid-column: 2; grid-row: 1; align-self: center; }
  .hero-nogo, .hero-empty { align-items: center; }

  .day-row {
    grid-template-columns: 8.5rem 9.5rem minmax(0, 1fr) 20px;
    grid-template-areas:
      "date verdict facts go"
      "date verdict spot go"
      "date verdict gate go"
      "date verdict alert go"
      "strip strip strip strip";
    padding: var(--space-4) var(--space-4) var(--space-3) var(--space-5);
    gap: var(--space-1) var(--space-4);
    align-items: start;
  }
  .dr-date { flex-direction: column; align-items: flex-start; gap: 6px; }
  .dr-title { display: grid; gap: 4px; }
  .dr-dm { font-size: .8em; }
  .dr-verdict { flex-direction: column; align-items: flex-start; justify-content: flex-start; }
  .dr-verdict .badge-best { order: 3; flex-basis: auto; justify-content: flex-start; }
  .dr-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px var(--space-4); }
  .dr-go { grid-area: go; display: grid; place-items: center; align-self: center; color: var(--muted); }
  .day-row:hover .dr-go { color: var(--accent); }
  .dr-strip { padding-top: var(--space-2); }

  .fc-more { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .dv-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ys { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: var(--space-6); }
  .ys > :not(.ys-main):not(.ys-facts) { grid-column: 1 / -1; }
  .ys-facts { padding-top: var(--space-1); }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts > .wide { grid-column: auto; }
}

@media (min-width: 60rem) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dr-facts { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}


/* --------------------------------------------------------------------------
   8. Forced colours and print
   -------------------------------------------------------------------------- */
@media (forced-colors: active) {
  .chip, .go-cell, .card, .day-row, .mode-opts, .hero, .zone, .expo, .pill, .spot-v, .dr-spot { border: 1px solid CanvasText; }
  .mode-opt input:checked + span { outline: 2px solid Highlight; }
  .day-chart .c-med, .day-chart .c-tide { stroke: CanvasText; }
}

@media print {
  .tabbar, .toast, .mode-switch, .account-menu, .hero-actions, .dv-book, .dv-comments, .sec-meta button, .dr-go, .loc-status, .ys-better .btn, .ys-foot { display: none !important; }
  body.app { padding-bottom: 0; }
  .card, .day-row, .hero { break-inside: avoid; box-shadow: none; }
}
