/* EasyTides. Colors come from the logo: deep royal blue, a middle blue, sky blue and white. A white
   header carries the logo, a royal blue band carries the live tide and its chart, and the rest is
   clean white with strong condensed headings, like a marine instrument and a well set newspaper page. */

@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-800.woff2') format('woff2'); }

:root {
  /* The band behind the live tide: the logo's royal blue, a little darker at the top. */
  --navy: #00287a;
  --navy-2: #00308f;
  --navy-3: #0a45a6;
  /* On the royal band: sky blue for rising and highs, white for falling and lows. */
  --aqua: #74b8fa;
  --sand: #ffffff;
  /* Accent bars, focus rings and small marks on white. */
  --coral: #4a9ef2;
  --brand-1: #00308f;
  --brand-2: #2a83e6;
  --ink: #0a1f44;
  --ink-2: #2b4470;
  --muted: #5d7193;
  --line: #e1e9f5;
  --bg: #ffffff;
  --bg-soft: #f0f5fc;
  --tide: #0048a8;
  --rising: #1f78e0;
  --falling: #5b6b8c;
  --good: #0048a8;
  --fair: #4a9ef2;
  --slow: #9fb0c6;
  --alert: #d22f49;
  --alert-bg: #fff1f3;
  --on-dark: #ffffff;
  --on-dark-2: rgba(255, 255, 255, 0.72);
  --on-dark-3: rgba(255, 255, 255, 0.5);
  --wrap: 1180px;
  --gutter: 20px;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --text: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}
/* Dark colors follow the device until the visitor picks light or dark with the header button,
   which sets data-theme on <html>. The two blocks below hold the same values on purpose. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --navy: #001c58;
    --navy-2: #00287a;
    --navy-3: #0a3a8f;
    --brand-1: #ffffff;
    --brand-2: #74b8fa;
    --ink: #e7effb;
    --ink-2: #c0d0ea;
    --muted: #8ea3c4;
    --line: #15306a;
    --bg: #050f2a;
    --bg-soft: #0a1a40;
    --tide: #7dbaf7;
    --rising: #74b8fa;
    --falling: #a9b8d4;
    --good: #4a9ef2;
    --fair: #8ec4f9;
    --slow: #6b7fa3;
    --alert-bg: #3a1620;
    --alert: #ff8a9b;
  }
}
:root[data-theme='dark'] {
  --navy: #001c58;
  --navy-2: #00287a;
  --navy-3: #0a3a8f;
  --brand-1: #ffffff;
  --brand-2: #74b8fa;
  --ink: #e7effb;
  --ink-2: #c0d0ea;
  --muted: #8ea3c4;
  --line: #15306a;
  --bg: #050f2a;
  --bg-soft: #0a1a40;
  --tide: #7dbaf7;
  --rising: #74b8fa;
  --falling: #a9b8d4;
  --good: #4a9ef2;
  --fair: #8ec4f9;
  --slow: #6b7fa3;
  --alert-bg: #3a1620;
  --alert: #ff8a9b;
  color-scheme: dark;
}
:root[data-theme='light'] { color-scheme: light; }
@media (min-width: 760px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
html.big-text { font-size: 20px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--tide); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
h2 { font: 800 1.85rem/1.05 var(--display); letter-spacing: 0.005em; }
h3 { font: 700 1.2rem/1.2 var(--display); letter-spacing: 0.01em; margin: 22px 0 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 20; background: var(--bg); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.fine { color: var(--muted); font-size: 0.88rem; margin: 12px 0 0; }

/* One line headline, sized from the screen width and the title's length. */
.fit { font: 800 min(3.6rem, calc((100vw - 2 * var(--gutter)) / (var(--chars) * 0.5))) / 1 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.005em; }
@media (min-width: 1180px) { .fit { font-size: min(3.6rem, calc(1116px / (var(--chars) * 0.5))); } }
.fit-long { font: 800 clamp(1.75rem, 7.4vw, 3.2rem) / 1.04 var(--display); letter-spacing: 0.005em; text-wrap: balance; }
.home-title { font-size: min(4.6rem, calc((100vw - 2 * var(--gutter)) / (var(--chars) * 0.48))); }
@media (min-width: 1180px) { .home-title { font-size: min(4.6rem, calc(1116px / (var(--chars) * 0.48))); } }

/* ---------- header and footer ---------- */

.top { background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-1); text-decoration: none; }
.logo-mark { display: block; width: 62px; height: auto; }
/* On a dark screen a thin white edge keeps the royal blue map from sinking into the background. */
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .logo-mark { filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.6)); } }
:root[data-theme='dark'] .logo-mark { filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.6)); }
.brand-name { font: 800 1.65rem/1 var(--display); letter-spacing: 0.01em; color: var(--brand-1); }
.brand-name span { color: var(--brand-2); }
.top-nav { display: flex; align-items: center; gap: 6px; }
.top-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.top-nav a:hover { color: var(--tide); background: var(--bg-soft); }
@media (max-width: 520px) { .top-nav a { display: none; } }
.text-size { margin-left: 4px; min-width: 44px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 700 0.82rem var(--text); cursor: pointer; }
.text-size span { font-size: 1.15rem; margin-left: 1px; }
.text-size[aria-pressed='true'] { background: var(--tide); border-color: var(--tide); color: #fff; }
/* Light and dark: a moon to switch to dark, a sun to switch back. */
.theme-toggle { margin-left: 4px; width: 44px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .theme-toggle .i-sun { display: block; } :root:not([data-theme='light']) .theme-toggle .i-moon { display: none; } }
:root[data-theme='dark'] .theme-toggle .i-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: none; }

.foot { background: var(--bg-soft); color: var(--muted); border-top: 1px solid var(--line); padding: 36px 0 44px; margin-top: 56px; font-size: 0.9rem; }
.foot-inner { display: grid; gap: 14px; }
.brand-foot .logo-mark { width: 52px; }
.brand-foot .brand-name { font-size: 1.4rem; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; margin: 0; }
.foot-links a { color: var(--ink); font-weight: 600; text-decoration: none; }
.foot-links a:hover { color: var(--tide); }
.foot p { margin: 0; max-width: 62em; }

/* ---------- heroes ---------- */

.hero { background: radial-gradient(1200px 420px at 85% -10%, rgba(116, 184, 250, 0.22), transparent 60%), linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: var(--on-dark); padding: 18px 0 30px; }
.hero-lede { color: var(--on-dark-2); font-size: 1.12rem; max-width: 40em; margin: 12px 0 0; }
.hero-lede a { color: var(--aqua); }
.hero-plain { padding: 18px 0 34px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; font-size: 0.86rem; color: var(--on-dark-3); }
.crumbs li + li::before { content: '/'; margin-right: 6px; opacity: 0.6; }
.crumbs a { color: var(--on-dark-2); text-decoration: none; }
.crumbs a:hover { color: var(--on-dark); }
/* On a phone the headline already names the page, so the trail stops one step short. */
@media (max-width: 640px) { .crumbs li[aria-current]:not(:nth-child(2)) { display: none; } }

/* station hero */
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; }
.st-sub { margin: 0; color: var(--on-dark-2); font-size: 0.95rem; }
.save { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255, 255, 255, 0.25); background: transparent; color: var(--on-dark); border-radius: 999px; padding: 8px 15px; font: 600 0.92rem var(--text); cursor: pointer; }
.save:hover { border-color: var(--aqua); }
.save svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.save[aria-pressed='true'] { border-color: var(--sand); color: var(--sand); }
.save[aria-pressed='true'] svg { fill: var(--sand); }

.live { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.live-cell { display: flex; flex-direction: column; padding: 2px 0 0 14px; border-left: 3px solid var(--aqua); }
.live-cell + .live-cell { border-left-color: rgba(255, 255, 255, 0.22); }
.live-k { font-size: 0.85rem; font-weight: 600; color: var(--on-dark-3); }
.live-v { font: 800 clamp(1.6rem, 7.4vw, 3rem) / 1.02 var(--display); color: var(--aqua); white-space: nowrap; }
.live-v small { font-size: 0.5em; margin-left: 3px; letter-spacing: 0.04em; color: var(--on-dark-2); }
.live-cell + .live-cell .live-v { color: var(--on-dark); }
.is-falling .live-cell:first-child { border-left-color: var(--sand); }
.is-falling .live-cell:first-child .live-v { color: var(--sand); }
.live-s { color: var(--on-dark-2); font-size: 1rem; }
/* Weather sits under the two tide cells on a phone, as one line across, and beside them on a wide screen. */
.live-wx { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'v k' 'v s'; align-items: center; column-gap: 14px; margin-top: 6px; }
.live-wx .live-k { grid-area: k; }
.live-wx .live-v { grid-area: v; color: var(--on-dark); }
.live-wx .live-s { grid-area: s; }
.live-wx .wind-arrow { color: var(--aqua); }
@media (min-width: 760px) {
  .live { display: flex; gap: 12px 28px; }
  .live-cell { flex: 1 1 0; min-width: 0; }
  .live-wx { display: flex; align-items: flex-start; margin-top: 0; }
}
.wind-arrow { display: inline-block; vertical-align: -3px; margin-right: 5px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Live weather service alerts: a slim line each, tap for the full notice. */
.nws-alerts { display: grid; gap: 8px; margin: 16px 0 0; }
.nws-alert { border-radius: 12px; background: rgba(255, 86, 86, 0.16); border: 1px solid rgba(255, 128, 128, 0.6); }
.nws-alert.sev-minor, .nws-alert.sev-unknown { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.35); }
.nws-alert summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 11px 14px; }
.nws-alert summary::-webkit-details-marker { display: none; }
.nws-alert summary svg { flex: none; fill: none; stroke: #ff9a9a; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.nws-alert.sev-minor summary svg, .nws-alert.sev-unknown summary svg { stroke: #ffffff; }
.nws-alert summary b { font: 700 1.2rem/1.15 var(--display); color: var(--on-dark); }
.nws-alert summary span { color: var(--on-dark-2); font-size: 0.92rem; }
.nws-alert summary::after { content: 'Details'; margin-left: auto; color: var(--aqua); font-size: 0.88rem; font-weight: 600; }
.nws-alert[open] summary::after { content: 'Hide'; }
.na-body { padding: 0 14px 6px; color: var(--on-dark-2); font-size: 0.92rem; max-width: 60em; }
.na-body p { margin: 0 0 10px; }

/* chart: the SVG stretches to the box; dots and labels sit on top as HTML at the same percentages */
.chart-wrap { margin: 18px 0 0; }
.chart { position: relative; height: 250px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07); overflow: hidden; }
@media (min-width: 760px) { .chart { height: 320px; } }
.chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart .night { fill: rgba(0, 0, 0, 0.22); }
.chart .window { fill: rgba(116, 184, 250, 0.16); }
.chart .tick-line { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .fill-a { stop-color: var(--aqua); stop-opacity: 0.42; }
.chart .fill-b { stop-color: var(--aqua); stop-opacity: 0.02; }
.chart .area { fill: url(#tide-fill); }
.chart .line { fill: none; stroke: var(--aqua); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pt { position: absolute; width: 0; height: 0; }
.pt i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 3px var(--navy-2); }
.pt-low i { background: var(--sand); }
.pt { z-index: 3; }
.pt b { position: absolute; left: 0; transform: translateX(-50%); white-space: nowrap; text-align: center; font: 700 1.05rem/1.05 var(--display); color: var(--on-dark); text-shadow: 0 1px 3px rgba(4, 16, 28, 0.9); }
.pt b em { display: block; font: 400 0.78rem/1.2 var(--text); color: var(--on-dark-2); }
.pt-high b { bottom: 13px; }
.pt-low b { top: 13px; }
.pt.at-left b { transform: none; left: -6px; text-align: left; }
.pt.at-right b { transform: none; left: auto; right: -6px; text-align: right; }
.axis { position: relative; height: 22px; }
.tick { position: absolute; top: 5px; transform: translateX(-50%); font-size: 0.74rem; font-weight: 600; color: var(--on-dark-3); white-space: nowrap; }
.now-line { position: absolute; z-index: 1; top: 0; bottom: 0; width: 0; border-left: 2px dashed #ffffff; opacity: 0.75; }
.now-dot { position: absolute; z-index: 2; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #ffffff; border: 4px solid var(--brand-2); box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.28); }

/* Today's tides: one strip split by hairline rules, no boxes. */
.tide-strip { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid rgba(255, 255, 255, 0.14); border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
@media (min-width: 640px) { .tide-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ts { display: flex; flex-direction: column; padding: 14px 16px 14px 0; }
.ts + .ts { padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
@media (max-width: 639px) {
  .ts:nth-child(odd) { padding-left: 0; border-left: 0; }
  .ts:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.14); }
}
.ts-kind { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; font-weight: 600; color: var(--on-dark-3); }
.ts-kind::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--aqua); }
.ts-low .ts-kind::before { background: var(--sand); }
.ts-time { font: 800 2.15rem/1.05 var(--display); color: var(--on-dark); margin-top: 3px; }
.ts-time small { font-size: 0.5em; margin-left: 3px; letter-spacing: 0.04em; color: var(--on-dark-2); }
.ts-ht { color: var(--on-dark-2); font-size: 0.92rem; }
.hero-fine { margin: 14px 0 0; font-size: 0.84rem; color: var(--on-dark-3); }
.legend-window { color: var(--on-dark-2); border-bottom: 3px solid rgba(116, 184, 250, 0.55); }

/* ---------- station body ---------- */

.st-body { display: grid; gap: 8px; padding-top: 34px; }
@media (min-width: 960px) { .st-body { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 56px; padding-top: 44px; } }
.block { margin: 0 0 40px; }
.block > h2::before, .block-head h2::before { content: ''; display: block; width: 34px; height: 4px; border-radius: 2px; background: var(--coral); margin-bottom: 12px; }
.block > h2 { margin-bottom: 14px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: var(--ink-2); margin: 0; }
.about-p { margin: 0 0 12px; color: var(--ink-2); font-size: 1.05rem; max-width: 46em; }
/* Share: a row of plain buttons, wrapping on a phone. Text messages only show where a phone can send them. */
.share { margin: 0 0 40px; }
.share-h { font-size: 1.4rem; margin-bottom: 12px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 600 0.95rem var(--text); text-decoration: none; cursor: pointer; }
.share-btn:hover { border-color: var(--tide); color: var(--tide); }
.share-btn svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.share-native { background: var(--tide); border-color: var(--tide); color: #fff; }
.share-native:hover { color: #fff; }
@media (min-width: 900px) { .share-sms { display: none; } }

/* Back to top: a round button low on the right once the page has scrolled a way. */
.to-top { position: fixed; right: 16px; bottom: 18px; z-index: 30; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--brand-1); color: var(--bg); box-shadow: 0 6px 18px rgba(0, 20, 60, 0.3); cursor: pointer; }
.to-top[hidden] { display: none; }
.to-top svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.browse-links { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; font-weight: 600; }
.browse-links a { text-decoration: none; }
.browse-links a::after { content: ' \203A'; }

.more-link { font-weight: 700; text-decoration: none; white-space: nowrap; }
.more-link::after { content: ' \203A'; }

/* ---------- 30 day tide table ---------- */

.tt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tt-btn { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: var(--on-dark); font: 600 0.95rem var(--text); text-decoration: none; cursor: pointer; }
.tt-btn:hover { border-color: var(--aqua); }
.tt-body { padding-top: 22px; }
.tt-month { margin: 30px 0 10px; }
.tt-month::before { content: ''; display: block; width: 34px; height: 4px; border-radius: 2px; background: var(--coral); margin-bottom: 12px; }
.tt .tt-sun { color: var(--ink-2); font-size: 0.9rem; white-space: nowrap; }
.tt-minus { font-weight: 800; color: var(--tide); }
.tt tr.is-today th, .tt tr.is-today td { background: var(--bg-soft); }
/* On a phone the table keeps day, highs, lows and sun; the moon column shows on wider screens and in print. */
@media (max-width: 520px) {
  .tt thead th:nth-child(2) { font-size: 0.8rem; }
  .tt .tt-sun { font-size: 0.8rem; }
  .tt thead th:nth-child(4) { font-size: 0; }
  .tt thead th:nth-child(4)::after { content: 'Sun'; font-size: 0.8rem; }
  .tt th:nth-child(5), .tt td:nth-child(5) { display: none; }
  .tt .wk-t { font-size: 1rem; }
}

/* Printing: just the page's content in black on white, no header, footer or buttons. */
@media print {
  .top, .foot, .skip, .crumbs, .tt-actions, .nws-alerts, .save, .search, .quiz, .rules, .share, .tt-near, .to-top { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .hero { background: none !important; color: #000 !important; padding: 0 0 8px; }
  .hero-lede, .fine { color: #000 !important; }
  .tt-month { margin: 14px 0 6px; break-after: avoid; }
  .tt-month::before { display: none; }
  .table-scroll { overflow: visible; }
  .week thead th { border-bottom: 1.5pt solid #000; color: #000; }
  .week tbody th, .week td { padding: 4px 8px 4px 0; border-bottom: 0.5pt solid #999; }
  .week tr { break-inside: avoid; }
  .wk-t small, .wk-date, .tt .tt-sun { color: #333 !important; }
  .tt tr.is-today th, .tt tr.is-today td { background: none; }
  .tt-minus { color: #000 !important; }
  a { color: #000; text-decoration: none; }
}

.meter { display: inline-flex; border-radius: 999px; background: var(--bg-soft); padding: 4px; gap: 2px; }
.meter span { padding: 5px 13px; border-radius: 999px; font: 700 0.95rem/1 var(--display); letter-spacing: 0.03em; color: var(--muted); }
.meter-slow span:nth-child(1) { background: var(--slow); color: #fff; }
.meter-fair span:nth-child(2) { background: var(--fair); color: #fff; }
.meter-good span:nth-child(3) { background: var(--good); color: #fff; }

.windows { list-style: none; margin: 0; padding: 0; }
.windows li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.windows li:last-child { border-bottom: 1px solid var(--line); }
.w-time { font: 700 1.4rem/1.1 var(--display); color: var(--ink); }
.w-why { color: var(--muted); }
.w-tag { align-self: center; min-width: 3.6em; text-align: center; padding: 4px 8px; border-radius: 6px; font: 700 0.9rem/1 var(--display); letter-spacing: 0.03em; background: var(--bg-soft); color: var(--ink-2); }
.w-major { background: var(--tide); color: #fff; }

.rules { display: flex; align-items: flex-start; gap: 12px; margin: 26px 0 0; padding-top: 16px; border-top: 2px solid var(--ink); color: var(--ink-2); }
.rules svg { flex: none; margin-top: 1px; fill: none; stroke: var(--tide); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }

.wx-list { list-style: none; margin: 0; padding: 0; }
.wx-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name temp' 'sky wind'; gap: 3px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.wx-list li:last-child { border-bottom: 1px solid var(--line); }
.wx-name { grid-area: name; font: 700 1.25rem/1.15 var(--display); }
.wx-temp { grid-area: temp; font: 700 1.25rem/1.15 var(--display); text-align: right; white-space: nowrap; }
.wx-sky { grid-area: sky; color: var(--ink-2); }
.wx-sky small { color: var(--muted); font-size: 0.86rem; white-space: nowrap; }
.wx-wind { grid-area: wind; text-align: right; white-space: nowrap; font-weight: 600; color: var(--ink-2); }
.wx-wind .wind-arrow { color: var(--tide); }
.mf-zone { margin: 0 0 8px; color: var(--muted); font-size: 0.92rem; }
.marine { margin: 0; }
.mf-row { padding: 11px 0; border-top: 1px solid var(--line); }
.mf-row:last-child { border-bottom: 1px solid var(--line); }
.marine dt { font: 700 1.15rem/1.2 var(--display); }
.marine dd { margin: 3px 0 0; color: var(--ink-2); }
@media (min-width: 640px) {
  .mf-row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 16px; align-items: baseline; }
  .marine dd { margin: 0; }
}

.alert { background: var(--alert-bg); border-left: 5px solid var(--alert); border-radius: 12px; padding: 18px 20px; margin: 0 0 36px; }
.alert h2 { color: var(--alert); font-size: 1.5rem; }
.alert ul { margin: 10px 0 0; padding-left: 18px; }

.table-scroll { overflow-x: auto; }
.week { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.week thead th { text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 0 10px 8px 0; border-bottom: 2px solid var(--ink); }
.week tbody th, .week td { text-align: left; vertical-align: top; padding: 13px 10px 13px 0; border-bottom: 1px solid var(--line); }
.week tbody th { font-weight: 600; white-space: nowrap; }
.wk-dow { display: block; font: 700 1.15rem/1.1 var(--display); }
.wk-date { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.wk-t { display: block; font: 700 1.1rem/1.35 var(--display); white-space: nowrap; }
.wk-t small { font: 400 0.8rem var(--text); color: var(--muted); margin-left: 2px; }
.wk-none { color: var(--muted); }
.wk-fish { white-space: nowrap; }
.wk-rating { font-weight: 600; margin-left: 7px; }
.wk-moon { width: 30px; padding-right: 0; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: 1px; }
.dot-good { background: var(--good); }
.dot-fair { background: var(--fair); }
.dot-slow { background: var(--slow); }
@media (max-width: 520px) { .wk-rating { display: none; } .week:not(.tt) thead th:nth-child(2) { font-size: 0; } }

.sky-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.sky > .sky-row:last-child { border-bottom: 1px solid var(--line); }
.sky-note b { font-weight: 600; color: var(--ink-2); }
.sky-k { font-weight: 600; }
.sky-v { font: 700 1.35rem/1 var(--display); }
.sky-big { font-size: 1.9rem; }
.sky-note { grid-column: 2 / -1; color: var(--muted); font-size: 0.85rem; }
.sky-row > .sky-k:first-child { grid-column: 1 / 3; }
.sun-icon .sun-disc { fill: #8ec4f9; }
.sun-icon .sun-rays, .sun-icon .sun-horizon { stroke: #4a9ef2; stroke-width: 2; stroke-linecap: round; fill: none; }
.sun-icon .sun-arrow { stroke: var(--tide); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sun-icon .sun-horizon { stroke: var(--muted); }
/* The unlit side is a pale blue and the lit side the logo's middle blue, so a near new moon still reads as a moon. */
.moon .moon-dark { fill: #d4e2f5; }
.moon .moon-lit { fill: #1f6fd0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .moon .moon-dark { fill: #1b3366; } :root:not([data-theme='light']) .moon .moon-lit { fill: #8ec4f9; } }
:root[data-theme='dark'] .moon .moon-dark { fill: #1b3366; }
:root[data-theme='dark'] .moon .moon-lit { fill: #8ec4f9; }

.spot-list { list-style: none; margin: 0; padding: 0; }
.spot-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.spot-list li:last-child a { border-bottom: 1px solid var(--line); }
.sl-name { font: 700 1.2rem/1.1 var(--display); color: var(--tide); }
.sl-meta { color: var(--muted); font-size: 0.86rem; }
.source { color: var(--muted); font-size: 0.82rem; margin: 6px 0 0; }

/* ---------- question of the day ---------- */

.quiz { background: linear-gradient(160deg, var(--navy-3), var(--navy)); color: var(--on-dark); border-radius: 18px; padding: 22px; margin: 0 0 40px; }
.quiz-kicker { margin: 0 0 8px; font: 700 0.95rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--aqua); }
.quiz-q { font: 700 1.55rem/1.15 var(--display); margin: 0 0 16px; }
.quiz-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.quiz-choice { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; min-height: 50px; padding: 10px 14px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, 0.07); color: var(--on-dark); font: 600 1rem var(--text); cursor: pointer; }
.quiz-choice:hover:not(:disabled) { background: rgba(116, 184, 250, 0.2); }
.quiz-choice:disabled { cursor: default; }
.qc-letter { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); font: 700 0.95rem var(--display); }
.quiz-choice.is-right { background: var(--good); border-color: var(--good); }
.quiz-choice.is-right .qc-letter { background: rgba(255, 255, 255, 0.25); }
.quiz-choice.is-wrong { background: var(--alert); border-color: var(--alert); }
.quiz-choice.is-dim { opacity: 0.45; }
.quiz-result { margin: 16px 0 0; color: var(--on-dark-2); }
.quiz-result strong { color: var(--on-dark); }
.quiz-streak { margin: 12px 0 0; color: var(--on-dark-2); font-weight: 600; }
.qs-n { font: 800 1.6rem/1 var(--display); color: var(--sand); margin-right: 4px; }
.quiz-feature { padding: 28px; }
@media (min-width: 860px) {
  .quiz-feature { display: grid; grid-template-columns: minmax(0, 1fr); padding: 40px; }
  .quiz-feature .quiz-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 40px; align-items: start; }
  .quiz-feature .quiz-q { font-size: 2.3rem; grid-row: 1 / span 3; }
  .quiz-feature .quiz-result, .quiz-feature .quiz-streak { grid-column: 2; }
}

/* ---------- home ---------- */

.hero-home { position: relative; overflow: hidden; padding: 34px 0 48px; }
@media (min-width: 760px) { .hero-home { padding: 56px 0 72px; } }
.hero-home .wrap > *:not(.hero-waves) { position: relative; z-index: 1; }
.hero-waves { position: absolute; left: 0; right: 0; bottom: -6px; width: 100%; height: 150px; pointer-events: none; }
.hero-waves path { fill: none; stroke: var(--aqua); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0.28; }
.hero-waves path + path { opacity: 0.14; }
.search { position: relative; z-index: 2; margin-top: 26px; max-width: 640px; }
.search-icon { position: absolute; left: 16px; top: 17px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; }
.search input { width: 100%; height: 56px; padding: 0 128px 0 50px; border-radius: 14px; border: 0; background: #fff; color: #0a1f44; font: 500 1.05rem var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.search input::placeholder { color: #7486a6; }
.search-results { position: absolute; left: 0; right: 0; top: 64px; z-index: 10; list-style: none; margin: 0; padding: 6px; background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); }
.search-results a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: #0a1f44; }
.search-results a:hover { background: #eef4fd; }
.search-results strong { font: 700 1.15rem/1.15 var(--display); }
.search-results span { color: #5d7193; font-size: 0.86rem; }
.search-results .none { padding: 10px 12px; color: #5d7193; }
.search-results em { font-style: normal; color: #0048a8; font-weight: 600; }
.search input::-webkit-search-cancel-button { display: none; }
.near { position: absolute; right: 7px; top: 7px; height: 42px; display: inline-flex; align-items: center; gap: 6px; padding: 0 13px; border: 0; border-radius: 10px; background: #e6f0fd; color: #0048a8; font: 700 0.95rem var(--text); cursor: pointer; }
.near:hover { background: #d4e5fb; }
.near svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.near[aria-busy='true'] { opacity: 0.6; }

/* ---------- state directory ---------- */

.state-body { padding-top: 28px; }
.region-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0 0 18px; margin-bottom: 8px; border-bottom: 2px solid var(--ink); }
.region-nav a { font: 700 1.1rem/1.2 var(--display); text-decoration: none; white-space: nowrap; }
.region { padding-top: 26px; scroll-margin-top: 12px; }
.region-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 6px; }
.region-head h2::before { content: ''; display: block; width: 34px; height: 4px; border-radius: 2px; background: var(--coral); margin-bottom: 12px; }
.region-head span { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.region h3 { margin: 18px 0 2px; font-size: 1.15rem; color: var(--ink-2); }
.dir { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 32px; }
@media (min-width: 640px) { .dir { columns: 2; } }
@media (min-width: 1000px) { .dir { columns: 3; } }
.dir li { break-inside: avoid; }
.dir a { display: flex; flex-direction: column; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.dl-name { font: 700 1.15rem/1.15 var(--display); color: var(--tide); }
.dir a:hover .dl-name { text-decoration: underline; }
.dl-meta { color: var(--muted); font-size: 0.85rem; line-height: 1.3; }

.state-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 32px; }
@media (min-width: 640px) { .state-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .state-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.state-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.stl-name { font: 800 1.4rem/1.1 var(--display); color: var(--ink); }
.state-list a:hover .stl-name { color: var(--tide); }
.stl-n { color: var(--muted); font-size: 0.9rem; }

.band { padding: 44px 0; }
.band-live { background: var(--bg); padding-top: 40px; }
.band-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin-bottom: 20px; }
.band-head h2 { font-size: 2.1rem; }
.band-head p { margin: 0; color: var(--muted); }

/* The tide board: one row per spot, like a departures board. Columns on desktop; on a phone the
   name and the rising or falling arrow sit left and the next tide sits right. */
.board-head { display: none; }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-mine:not([hidden]) { border-bottom: 2px solid var(--brand-2); }
.br a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'spot next' 'now next'; align-items: center; gap: 3px 16px; padding: 15px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.br-spot { grid-area: spot; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 9px; min-width: 0; }
.br-name { font: 800 1.45rem/1.1 var(--display); }
.br a:hover .br-name { color: var(--tide); }
.br-where { color: var(--muted); font-size: 0.86rem; }
.is-saved .br-where { color: var(--falling); font-weight: 600; }
.br-spark { display: none; }
.br-now { grid-area: now; display: inline-flex; align-items: center; gap: 7px; font: 700 1.1rem/1.1 var(--display); color: var(--rising); }
.br-now::before { content: ''; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid currentColor; }
.br.is-falling .br-now { color: var(--falling); }
.br.is-falling .br-now::before { border-bottom: 0; border-top: 8px solid currentColor; }
.br-now:empty { display: none; }
.br-next { grid-area: next; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.br-next b { font: 800 1.6rem/1.05 var(--display); white-space: nowrap; }
.br-next b small { font-size: 0.5em; margin-left: 3px; letter-spacing: 0.04em; color: var(--muted); }
.br-in { color: var(--muted); font-size: 0.86rem; }
.spark-area { fill: var(--tide); opacity: 0.1; }
.spark-line { fill: none; stroke: var(--tide); stroke-width: 2; vector-effect: non-scaling-stroke; }
@media (min-width: 760px) {
  .board-head, .br a { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.6fr) minmax(0, 0.75fr) minmax(0, 0.9fr); grid-template-areas: 'spot spark now next'; gap: 28px; }
  .board-head { font-size: 0.8rem; font-weight: 600; color: var(--muted); padding-bottom: 9px; border-bottom: 2px solid var(--ink); }
  .board-head span:last-child { text-align: right; }
  .br a { padding: 12px 0; }
  .br-spark { grid-area: spark; display: block; width: 100%; height: 46px; }
}


.band-why h2 { font-size: 2.1rem; margin-bottom: 22px; }
.why-grid { display: grid; gap: 26px; }
@media (min-width: 760px) { .why-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; } }
.why-n { display: block; font: 800 2.6rem/1 var(--display); color: transparent; -webkit-text-stroke: 1.5px var(--tide); margin-bottom: 8px; }
.why-grid h3 { margin: 0 0 6px; font-size: 1.45rem; }
.why-grid p { margin: 0; color: var(--ink-2); }

/* ---------- prose ---------- */

.prose { max-width: 760px; }
.prose h2 { font-size: 1.7rem; margin: 28px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 12px; color: var(--ink-2); font-size: 1.05rem; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin: 0 0 10px; color: var(--ink-2); font-size: 1.05rem; }
.prose li strong { color: var(--ink); }

.fit[data-len="10"]{--chars:10}.fit[data-len="11"]{--chars:11}.fit[data-len="12"]{--chars:12}.fit[data-len="13"]{--chars:13}.fit[data-len="14"]{--chars:14}.fit[data-len="15"]{--chars:15}.fit[data-len="16"]{--chars:16}.fit[data-len="17"]{--chars:17}.fit[data-len="18"]{--chars:18}.fit[data-len="19"]{--chars:19}.fit[data-len="20"]{--chars:20}.fit[data-len="21"]{--chars:21}.fit[data-len="22"]{--chars:22}.fit[data-len="23"]{--chars:23}.fit[data-len="24"]{--chars:24}.fit[data-len="25"]{--chars:25}.fit[data-len="26"]{--chars:26}.fit[data-len="27"]{--chars:27}.fit[data-len="28"]{--chars:28}.fit[data-len="29"]{--chars:29}.fit[data-len="30"]{--chars:30}