/* The beach pages (src/pages.js): plain pages in the app's look (style.css's colours and font),
   readable without JavaScript. */

:root {
  color-scheme: light dark;
  --violet: #5b3df5;
  --on-violet: #ffffff;
  --bg: #f5f4fa;
  --surface: #ffffff;
  --surface-2: #eeecf6;
  --ink: #16132e;
  --muted: #5e5a78;
  --line: #e8e6f1;
  --good: #1d7a47;
  --radius: 16px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgb(22 19 46 / 0.06), 0 2px 10px rgb(22 19 46 / 0.05);
  --font: Outfit, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --violet: #9c8cff;
    --on-violet: #16132e;
    --bg: #16132e;
    --surface: #1e1a3c;
    --surface-2: #2a2550;
    --ink: #f3f2fa;
    --muted: #ada9cb;
    --line: #2e2950;
    --good: #6fd68a;
    --shadow: none;
  }
}

@font-face { font-family: Outfit; src: url("fonts/Outfit-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Outfit; src: url("fonts/Outfit-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Outfit; src: url("fonts/Outfit-SemiBold.ttf") format("truetype"); font-weight: 600 900; font-display: swap; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--font); }
a { color: var(--violet); }
a:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }

.bar, .page, .foot { max-width: 640px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 6px; }
.bar .title { font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.bar .title .ket { color: var(--violet); font-weight: 500; }
.bar .title .ket + .ket { margin-left: 0.04em; }
.bar .all { font-weight: 500; }

.page { padding-bottom: 8px; }
h1 { font-size: 2rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 8px; }
h2 { font-size: 1.125rem; font-weight: 600; margin: 0 0 8px; }
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 4px; }
.kicker { margin: 12px 0 0; color: var(--muted); }
.kicker a { color: inherit; }
.lede { font-size: 1.0625rem; margin: 0 0 12px; }
.note, .where, .src, .loading { color: var(--muted); }
.note { font-size: 0.9375rem; }
.src { font-size: 0.875rem; margin-bottom: 0; }

.cta-row { margin: 16px 0 4px; }
.cta { display: inline-block; background: var(--violet); color: var(--on-violet); text-decoration: none; font-weight: 600; padding: 12px 18px; border-radius: 999px; }
.cta:hover { filter: brightness(1.08); }

.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 16px 0; }
.panel > :last-child { margin-bottom: 0; }
.panel ul { margin: 0 0 8px; padding-left: 1.2em; }
.panel li + li { margin-top: 4px; }

.scroll { overflow-x: auto; }
table.sides { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.sides th, .sides td { text-align: left; padding: 8px 10px 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
.sides thead th { border-top: 0; color: var(--muted); font-weight: 500; font-size: 0.875rem; }
.sides tbody th { white-space: nowrap; font-weight: 600; }

/* The three days side by side, even on a phone: each window on two lines, its hours then the wind. */
.days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.day { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.day dl { margin: 0; }
.day dt { font-size: 0.8125rem; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.day dd { margin: 0; font-size: 0.875rem; line-height: 1.35; }
.day dd span { display: block; }
.day .when { white-space: nowrap; }
@media (max-width: 400px) { .day { padding: 8px; } .day dd { font-size: 0.8125rem; } }
.day dd.on { color: var(--good); font-weight: 600; }

ul.spots { list-style: none; padding: 0; margin: 0 0 16px; }
ul.spots li { padding: 8px 0; border-top: 1px solid var(--line); }
ul.spots li:first-child { border-top: 0; }
ul.spots a { font-weight: 500; }
.page > ul.spots { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 16px; }
.page > h2 { margin-top: 20px; }
ul.tides { list-style: none; padding: 0; }

.foot { padding-top: 8px; padding-bottom: max(24px, env(safe-area-inset-bottom)); color: var(--muted); font-size: 0.875rem; }
.foot a { color: inherit; }
.langs a { color: var(--violet); }

/* Official warnings, as the app shows them (style.css .warn). */
.warnings h2 { margin-bottom: 4px; }
.warn { --warn: #e0b000; margin: 8px 0 0; padding: 8px 10px; border-left: 4px solid var(--warn); border-radius: 8px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.warn.lvl-3 { --warn: #f07c00; }
.warn.lvl-4 { --warn: #d32f2f; }
.warn summary { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; list-style: none; }
.warn summary::-webkit-details-marker { display: none; }
.warn summary small { color: var(--muted); white-space: nowrap; }
.warn-mark svg { width: 20px; height: 20px; color: var(--warn); flex: none; display: block; }
.warn-body p { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.warn-body .warn-words { font-weight: 500; }
