/* whatcom.land showcases: one full-screen story per page, 9:16, made to be recorded for short-video posts.
   Everything is sized in container units of the stage, so the page and the 1080×1920 recording look the same.
   Safe zones for Reels/TikTok: nothing important in the bottom ~22% (caption) or the right ~13% (buttons). */
:root { --bg: #0d0a14; --ink: #f4f1fa; --dim: #b9b2c9; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.stage { position: fixed; inset: 0; margin: auto; width: min(100vw, 56.25vh); height: min(100vh, 177.78vw);
  container-type: size; overflow: hidden; background: var(--bg); }
.map { position: absolute; inset: 0; }
.stage { cursor: default; -webkit-tap-highlight-color: transparent; }
.map .maplibregl-ctrl-attrib, .map .maplibregl-ctrl-logo { display: none; } /* credits are written on the stage */

.head { position: absolute; left: 6cqw; right: 6cqw; top: 6cqh; text-shadow: 0 0.3cqw 1.5cqw #000a; pointer-events: none; }
.eyebrow { margin: 0 0 1cqh; font-size: 3.4cqw; letter-spacing: 0.08em; text-transform: uppercase; color: var(--snow-est); font-weight: 700; }
h1 { margin: 0; font-size: 8.6cqw; line-height: 1.05; font-weight: 800; letter-spacing: -0.01em; }
h1 .span { font-weight: 600; color: var(--dim); font-size: 5.2cqw; }
.sub { margin: 1.2cqh 0 0; font-size: 3.9cqw; color: var(--dim); }

.year { position: absolute; left: 6cqw; top: 25cqh; pointer-events: none; text-shadow: 0 0.3cqw 1.5cqw #000c; }
.year-num { font-size: 15cqw; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.year-meta { font-size: 3.3cqw; color: var(--dim); margin-top: 0.6cqh; }

.panel { position: absolute; left: 6cqw; right: 15cqw; top: 59cqh; pointer-events: none;
  text-shadow: 0 0.3cqw 1.2cqw #000c; }
.count { margin: 0; font-size: 4.2cqw; color: var(--dim); }
.count .big { font-size: 9cqw; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.count-label { display: block; font-size: 3.5cqw; }
.bars { display: block; width: 100%; height: 9cqh; margin-top: 1.2cqh; overflow: visible; }
.bars rect { fill: #ffffff22; }
.bars rect.on { fill: var(--snow-amount-1); }
.bars rect.now { fill: #fff; }
.bars line { stroke: var(--snow-est); stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.bars text { fill: var(--dim); font-size: 11px; }
.avg { margin: 0.8cqh 0 0; font-size: 3.4cqw; min-height: 2.4em; color: var(--ink); }
.avg b { color: var(--snow-est); }
.credit { margin: 0.8cqh 0 0; font-size: 2.2cqw; color: #8d86a0; line-height: 1.35; }

.scrim { position: absolute; inset: 0; background: var(--bg); opacity: 0; pointer-events: none; }
.end { position: absolute; left: 0; right: 0; top: 38cqh; text-align: center; opacity: 0; pointer-events: none;
  text-shadow: 0 0.3cqw 2cqw #000; color: var(--ink); text-decoration: none; display: block; }
.end-big, .end-url { display: block; }
.end-big { margin: 0; font-size: 6cqw; font-weight: 700; }
.end-url { margin: 1cqh 0 0; font-size: 8cqw; font-weight: 800; color: var(--snow-est); }

.ctl { position: absolute; right: 4cqw; top: 4cqh; width: 9cqw; height: 9cqw; border-radius: 50%; border: 0;
  background: #ffffff1f; color: var(--ink); font-size: 3.4cqw; cursor: pointer; }
.loading { position: absolute; inset: 45cqh 0 auto; text-align: center; color: var(--dim); font-size: 4cqw; }
.loading a { color: var(--snow-est); }
.yt { position: absolute; right: 15cqw; top: calc(4cqh + 4.5cqw); transform: translateY(-50%); padding: 1.2cqw 2.6cqw; border-radius: 5cqw;
  background: #ffffff1f; color: var(--ink); font-size: 2.8cqw; text-decoration: none; }
.yt:focus-visible { outline: 2px solid var(--snow-est); outline-offset: 2px; }
.recording .ctl, .recording .loading, .recording .yt { display: none; }

/* ---- rivers (show/rivers.html) ---- */
.rv-date { top: 23cqh; }
.rv-date .year-num { font-size: 10cqw; }
.rv-date .year-meta { font-size: 3.6cqw; color: var(--ink); max-width: 80cqw; min-height: 2.6em; }
.rv-legend { margin: 0 0 1.4cqh; display: grid; grid-template-columns: auto 34cqw auto;
  align-items: center; gap: 0.6cqh 2cqw; font-size: 2.8cqw; color: var(--dim); pointer-events: none; text-shadow: 0 0.3cqw 1cqw #000c; }
.rv-ramp { height: 1.4cqw; border-radius: 1cqw; }
.rv-marks { grid-column: 2; display: flex; justify-content: space-between; font-style: normal; font-size: 2.4cqw; }
.rv-marks i { font-style: normal; }
.rv-panel { top: 55cqh; }
.rv-spark { display: block; width: 100%; height: 4.5cqh; margin-top: 0.8cqh; overflow: visible; }
.rv-spark .area { fill: #ffffff1c; }
.rv-spark .line { fill: none; stroke: #ffffffaa; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rv-spark .tick { stroke: #ffffff55; vector-effect: non-scaling-stroke; }
.rv-spark .cursor { stroke: #fff; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.rv-bars { display: grid; gap: 0.55cqh; margin-top: 1.1cqh; }
.rv-bar { display: grid; grid-template-columns: 20cqw 11cqw 1fr; align-items: center; gap: 2cqw; font-size: 2.6cqw; }
.rv-bar .track { height: 1.3cqh; background: #ffffff14; border-radius: 0.6cqw; overflow: hidden; }
.rv-bar .fill { display: block; height: 100%; }
.rv-bar .lbl { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-bar .val { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }

/* ---- the November 2021 flood (show/flood2021.html) ---- */
.fl-date { top: 27cqh; }
.fl-date .year-num { display: flex; align-items: baseline; gap: 3cqw; }
.fl-time { font-size: 6cqw; font-weight: 700; color: var(--dim); }
.fl-panel { top: 56cqh; }
.fl-cat { display: inline-block; margin-left: 2cqw; padding: 0.3cqh 2cqw; border-radius: 1cqw; font-size: 3.4cqw;
  font-weight: 700; vertical-align: 0.6cqw; text-shadow: none; }
.fl-graph { display: block; width: 100%; height: 12cqh; margin: 1cqh 0 2.4cqh; overflow: visible; }
.fl-graph .area { fill: #6baed633; }
.fl-graph .line { fill: none; stroke: #ffffff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.fl-graph .lvl { stroke-width: 1.2; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; opacity: 0.9; }
.fl-graph text { fill: var(--dim); font-size: 10px; }
.fl-graph text.pk { fill: var(--ink); font-size: 11px; font-weight: 700; }
.fl-graph #peak circle { fill: none; stroke: #fff; stroke-width: 1.5; }
.fl-graph .dot { fill: #fff; stroke: #0d0a14; stroke-width: 1.5; }

/* ---- 700 years of fire (show/fires.html) ---- */
.fi-year { top: 22cqh; }
.fi-year .year-meta { font-size: 3.6cqw; color: var(--ink); max-width: 78cqw; min-height: 2.6em; }
.fi-panel { top: 58cqh; }
.fi-bars { height: 11cqh; }
.fi-bars rect { stroke: #ffffff55; stroke-width: 1; vector-effect: non-scaling-stroke; }
.fi-bars text { fill: var(--dim); font-size: 11px; }
.fi-close .fi-year .year-meta { font-weight: 700; font-size: 4.4cqw; }

/* ---- a year of salmon and eagles (show/wildlife.html) ---- */
.wl-month { top: 23cqh; }
.wl-month .year-num { font-size: 12cqw; }
.wl-month .year-meta { font-size: 3.6cqw; color: var(--ink); max-width: 80cqw; min-height: 2.6em; }
.wl-month .year-meta b { font-weight: 800; }
.wl-panel { top: 56cqh; }
.wl-moment { margin: 0 0 1cqh; font-size: 3.6cqw; min-height: 2.6em; }
.wl-chart { height: 10cqh; }
.wl-chart text { fill: var(--dim); font-size: 11px; }
.wl-chart text.key { font-size: 8px; font-weight: 700; }
.wl-chart .eline { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.wl-chart .edot { fill: var(--snow-est); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wl-close .wl-moment { font-weight: 700; font-size: 4.2cqw; }

/* ---- thirty-one Aprils of mountain snow (show/snow.html) ---- */
.sn-year { top: 22cqh; }
.sn-year .year-meta { font-size: 3.6cqw; color: var(--ink); max-width: 80cqw; min-height: 2.6em; }
.sn-panel { top: 58cqh; }
.sn-bars rect.now { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.sn-bars text { fill: var(--dim); font-size: 10px; }
.sn-close .sn-year .year-meta { font-weight: 700; font-size: 4.2cqw; }
