/* Colorblind-safe orange and blue for the two sides. */
:root {
  --paper: #eef3f2;
  --card: #f8fbfa;
  --ink: #1c2b33;
  --muted: #5b6d75;
  --rule: #cfdcdc;
  --harbor: #b35900;
  --sound: #1f5fa8;
  --flow: #1c2b33;
  --slack: #d4a800;
  --land: #cfd3c6;
  --water: #c4d9e0;
  --crest: #ffffff;
  --display: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1619; --card: #141f23; --ink: #dfe9ea; --muted: #8fa3a8; --rule: #26363b;
    --harbor: #f0a050; --sound: #7fb2f0; --flow: #e8f1f2; --slack: #f2c94c;
    --land: #0b1213; --water: #0f2830; --crest: #dfe9ea;
    color-scheme: dark;
  }
}

[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55; }
.wrap {
  max-width: 920px; margin: 0 auto;
  padding: 32px 16px 48px;
  display: grid; gap: 22px;
}
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 4px 0 0; font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(40px, 7vw, 64px); line-height: 1.1; }
h1 a { color: inherit; text-decoration: none; }
.tagline { margin: 4px 0 0; font-family: var(--display); font-size: 16px; color: var(--muted); }
.banner { display: block; width: 100%; height: auto; border-radius: 2px; }

.intro { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 14px 16px; color: var(--muted); font-size: 14px; }
.intro p { margin: 0; }
.intro p + p { margin-top: 8px; }
.slack { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.countdown, .today { background: var(--card); padding: 14px 16px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.count { font-family: var(--mono); font-size: clamp(32px, 6vw, 42px); line-height: 1.15; font-variant-numeric: tabular-nums; }
.today ol { margin: 2px 0 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.today li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.today li.past { color: var(--muted); }
.today li.next, .today li.now { font-weight: 500; }

/* While the image is up it covers the whole page, so fading in is a fade from the river, and it needs no scrolling. */
.reveal {
  position: fixed; inset: 0; z-index: 10; overflow: auto;
  display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px;
  padding: 16px; text-align: center;
  background: var(--paper); animation: surface 2.5s ease-out;
}
.reveal p { margin: 4px 0 0; }
.reveal-time { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; color: var(--muted); }
.reveal-found { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 0; }
.reveal img { flex: 0 1 auto; min-height: 0; max-width: 100%; object-fit: contain; }
.reveal-caption { flex: none; max-width: 640px; }
.reveal-title { font-family: var(--display); font-size: 18px; line-height: 1.3; }
.reveal.sinking { animation: sink 4s ease-in forwards; }
@keyframes surface { from { opacity: 0; } to { opacity: 1; } }
@keyframes sink { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal.sinking { animation: none; } }

.readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.cell { background: var(--card); padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.k { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
#slack-label { font-size: 13px; letter-spacing: 0; text-transform: none; }
.v { font-family: var(--mono); font-size: 20px; font-variant-numeric: tabular-nums; }
.s { font-size: 13px; color: var(--muted); }

.sw { display: inline-block; width: 16px; height: 0; border-top: 3px solid; }
.sw.bat { border-color: var(--harbor); }
.sw.kp { border-color: var(--sound); border-top-style: dashed; }
.sw.faded { opacity: .3; } /* same as FUTURE_FADE in app.js */
.sw.band { border: 0; height: 12px; width: 12px; background: var(--slack); opacity: .3; }

.map-fig { margin-top: 18px; }
.map-fig[hidden] { display: none; }
.map-fig canvas { display: block; width: 100%; border-radius: 2px; }
.map-fig .legend { align-items: center; }
#tide-pause { font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 3px; padding: 2px 10px; cursor: pointer; }
.chart-fig { min-width: 0; margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 12px; }
canvas { display: block; width: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.sources { font-size: 11px; line-height: 1.45; }

@media (max-width: 640px) {
  .slack, .readout { grid-template-columns: minmax(0, 1fr); }
}

.site-foot { font-size: 13px; color: var(--muted); }
.site-foot a, .about section a, .intro a { color: inherit; text-underline-offset: 2px; }

/* The About page: a narrower column, for reading */
.about { max-width: 640px; font-size: 16px; line-height: 1.65; }
.about h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.about section p { margin: 0 0 14px; }
.cam { margin: 0; }
.cam iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.cam figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.about .credits { padding-top: 18px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; line-height: 1.5; }
.about .credits h2 { font-size: 16px; color: var(--ink); }
.about .credits ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
