/* Lantern — Earlyman design system tokens + shared primitives (served at /site/lantern.css).
   Dark by default, near-monochrome; light theme via :root[data-theme="light"]. */
/* Instrument Sans + IBM Plex Mono: downloaded once from Google Fonts (SIL OFL 1.1), served by Earlyman from /fonts/ */
@font-face{font-family:"Instrument Sans";src:url(/fonts/InstrumentSans-Variable.woff2) format("woff2");font-weight:400 600;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url(/fonts/IBMPlexMono-400.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url(/fonts/IBMPlexMono-500.woff2) format("woff2");font-weight:500 700;font-display:swap}

:root {
  color-scheme: dark;
  /* Lantern dark (default, near-monochrome). Own neutrals, not a competitor's palette. */
  /* round 5 (review 10-26, adopted exactly): bg #090A0B, surface #141617, border #292D2E, text #F3F4F4, secondary #A8B0B0, teal #79B4A8.
     bg-2/bg-3/line-2/fg-1/fg-3 are steps between those; every text token is AA (4.5:1) on every surface (fg-3 #8E9696: 5.3:1 on bg-3). */
  --bg-0: #090A0B; --bg-1: #141617; --bg-2: #191B1C; --bg-3: #1F2223; --bg-pop: #222526;
  --line-1: #292D2E; --line-2: #343839;
  --fg-0: #F3F4F4; --fg-1: #C9CECE; --fg-2: #A8B0B0; --fg-3: #8E9696;
  /* the one muted accent: live + measured only */
  /* hero-black (founder 10-26): the one accent is a muted teal (headline phrase, chart lines, active nav, focus, small icons) */
  --accent: #79B4A8; --accent-soft: rgba(121,180,168,.10); --accent-line: rgba(121,180,168,.45);
  --lamp: #79B4A8; --lamp-soft: rgba(121,180,168,.08); --lamp-ink: #0B0B0C;
  --ok: #C9C9C5; --warn: #F4F4F1; --bad: #C8736E; --info: #C9C9C5; --est: #6E6E72;
  --s1: #F4F4F1; --s2: #9A9A9C; --s3: #5E5E62; --s4: #3C3C40; --s5: #2C2C30; --s6: #222225;
  --shadow-1: none;
  --shadow-pop: 0 0 0 1px var(--line-2);
  --glow: 0 0 0 1px var(--line-1);
  --sweep: rgba(244,244,241,.05);
  /* mountain theme (2026-10-21): ridge layers sit between --bg-0 and --bg-3 so any text over them keeps AA; the sun is the one warm accent */
  --sun: #79B4A8; --dawn: rgba(121,180,168,.08); --dawn-0: rgba(121,180,168,0);
  --ridge-far: #0D0D0F; --ridge-mid: #111113; --ridge-near: #161618; --ridge-edge: #2C2C30;
  --bd-dawn: rgba(205,187,142,.05); --bd-dawn-0: rgba(205,187,142,0);   /* backdrop.js: the dawn glow over the horizon */
  /* landing hero wave (hero-bg.js, over the backdrop): ink / accent (cursor trail) drawn with alpha; alpha capped at --bits-quiet under text.
     The cap keeps --fg-3 at AA over the brightest backdrop pixel (sun glow / near ridge), so it is lower than the .16 / .07 used over flat --bg-0. */
  --bits-ink: #8F8F92; --bits-accent: #6F9C96; --bits-quiet: .05;

  --font-ui: "Instrument Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --t-xs: 11px; --t-sm: 12px; --t-base: 13.5px; --t-md: 15px; --t-lg: 18px;
  --t-xl: 22px; --t-2xl: 28px; --t-3xl: 36px; --t-hero: 56px;

  /* hero-black (founder 10-26): rounded like the reference images. xs: small marks and kbd; sm: buttons, inputs, chips;
     md: cards, panels, tables, code; lg: product frames. Badges and pills are fully round (--r-pill). */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 16px; --r-pill: 999px;
  --fast: 140ms; --base: 240ms; --slow: 620ms; --ease: cubic-bezier(.16,1,.3,1); --ease-in-out: cubic-bezier(.3,0,.1,1);
  /* overlays + glass (theme-aware; every colour lives in a token) */
  --hl: rgba(244,244,241,.06); --hl-2: rgba(244,244,241,.08); --btn-hi: #FFFFFF; --stripe: #CFCFCB;
  --scrim: rgba(0,0,0,.5); --glass: rgba(9,10,11,.72); --glass-card: rgba(20,22,23,.92); --stage-hi: #101213;
  --sh-card: none; --sh-float: none;
  --gutter: 24px;
}
/* Light theme: the same near-monochrome system inverted (off-white, near-black text, grey lines, one muted brass).
   Every text token meets WCAG AA (4.5:1) on every background token. Toggle: [data-theme-toggle], stored in localStorage em_theme. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg-0: #F4F4F1; --bg-1: #FAFAF8; --bg-2: #FFFFFF; --bg-3: #EBEBE7; --bg-pop: #FFFFFF;
  --line-1: #E2E2DE; --line-2: #D0D0CB;
  --fg-0: #0B0B0C; --fg-1: #2C2C2F; --fg-2: #56565A; --fg-3: #68686C;
  --accent: #2F6F68; --accent-soft: rgba(47,111,104,.08); --accent-line: rgba(47,111,104,.4);
  --lamp: #2F6F68; --lamp-soft: rgba(47,111,104,.08); --lamp-ink: #FFFFFF;
  --ok: #2C2C2F; --warn: #0B0B0C; --bad: #A3403A; --info: #2C2C2F; --est: #6E6E72;
  --s1: #0B0B0C; --s2: #5E5E62; --s3: #9A9A9E; --s4: #BDBDC0; --s5: #D0D0CB; --s6: #E2E2DE;
  --shadow-1: none;
  --shadow-pop: 0 0 0 1px var(--line-2);
  --glow: 0 0 0 1px var(--line-1);
  --sweep: rgba(11,11,12,.04);
  --sun: #2F6F68; --dawn: rgba(47,111,104,.07); --dawn-0: rgba(47,111,104,0);
  --ridge-far: #F1F1EE; --ridge-mid: #EFEFEC; --ridge-near: #EBEBE7; --ridge-edge: #D0D0CB;
  --bd-dawn: rgba(255,253,244,.9); --bd-dawn-0: rgba(255,253,244,0);
  --bits-ink: #6E6E72; --bits-accent: #2F6F68; --bits-quiet: .01;
  --hl: rgba(11,11,12,.05); --hl-2: rgba(11,11,12,.07); --btn-hi: #2A2A2D; --stripe: #3A3A3D;
  --scrim: rgba(20,20,22,.28); --glass: rgba(244,244,241,.8); --glass-card: rgba(255,255,255,.94); --stage-hi: #FFFFFF;
  --sh-card: none; --sh-float: none;
}
@media (max-width: 700px) { :root { --gutter: 16px; --t-hero: 40px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg-0); color: var(--fg-1);
  font: 400 var(--t-base)/20px var(--font-ui);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { color: var(--fg-0); font-weight: 500; letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }
a { color: var(--fg-0); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--fg-2); }
code, kbd, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--fg-0); outline-offset: 2px; border-radius: var(--r-xs); }
img, svg { max-width: 100%; }
.muted { color: var(--fg-2); }
.dim { color: var(--fg-3); }
.lit { color: var(--fg-0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- mock / sample labels ---------- */
.tag-mock, .tag-sample {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: var(--r-xs);
  font: 500 10px/14px var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg-3); border: 0; background: transparent; white-space: nowrap;   /* site 2: a quiet label, not a box */
}

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 30px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid transparent;
  font: 500 var(--t-sm)/1 var(--font-ui); cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--base) var(--ease), transform var(--fast) var(--ease);
}
.btn-lg { height: 44px; padding: 0 18px; font-size: var(--t-md); }
.btn-form { height: 36px; width: 100%; font-size: var(--t-base); }
.btn-primary { background: var(--fg-0); color: var(--lamp-ink); }
.btn-primary:hover { background: var(--btn-hi); box-shadow: 0 0 0 4px var(--hl-2); }
.btn:active { transform: scale(.98); }
.btn .arr { display: inline-block; transition: transform var(--base) var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-secondary { background: var(--bg-3); border-color: var(--line-2); color: var(--fg-0); }
.btn-secondary:hover { border-color: var(--fg-3); }
.btn-ghost { background: transparent; color: var(--fg-1); }
.btn-ghost:hover { background: var(--bg-3); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--bad) 50%, transparent); color: var(--bad); }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; }
kbd {
  display: inline-flex; align-items: center; min-width: 18px; height: 18px; padding: 0 5px; justify-content: center;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: var(--r-xs);
  font-size: 11px; color: var(--fg-2); background: var(--bg-2);
}

/* ---------- provenance badges (fixed vocabulary) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: var(--r-pill);
  font: 500 var(--t-xs)/1 var(--font-mono); letter-spacing: .02em; color: var(--fg-2); border: 1px solid var(--line-1); background: transparent;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; flex: none; }   /* hero-black: a round chip with a round dot */
.badge.measured { color: var(--fg-0); border-color: var(--line-2); }
.badge.measured::before { background: var(--lamp); }
.badge.reported { color: var(--fg-1); }
.badge.reported::before { background: var(--fg-1); border-radius: 1px; }
.badge.estimate { border-style: dashed; border-color: var(--line-2); background: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--est) 14%, transparent) 3px 4px); }
.badge.estimate::before { background: var(--est); }
.badge.guess { background: transparent; border-color: var(--line-2); }
.badge.guess::before { border: 1.5px solid var(--est); width: 4px; height: 4px; background: transparent; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-sm);
  font: 500 var(--t-xs)/1 var(--font-mono); background: var(--bg-3); color: var(--fg-1); white-space: nowrap;
}
.chip.up-good { color: var(--fg-0); }
.chip.up-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.chip.warn { color: var(--fg-0); border: 1px solid var(--line-2); }
.chip.info { color: var(--fg-1); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot.live { background: var(--lamp); animation: pulse 2s var(--ease) infinite; }
.dot.stuck { background: var(--fg-2); }
.dot.bad { background: var(--bad); }
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

/* ---------- card ---------- */
.card {
  position: relative; background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--r-md); padding: 16px;
  transition: border-color var(--base) var(--ease), transform var(--base) var(--ease), box-shadow var(--base) var(--ease);
}
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity var(--base) var(--ease);
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--sweep), transparent 70%); }
.card:hover { border-color: var(--line-2); }
.card:hover::after { opacity: 1; }
.card.lift:hover { transform: translateY(-2px); box-shadow: var(--sh-card); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; min-width: 0; }
.card-h h3 { font-size: var(--t-md); }
.label { font: 500 var(--t-sm)/18px var(--font-ui); color: var(--fg-2); text-transform: uppercase; letter-spacing: .04em; }

/* KPI */
.kpi .kpi-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.kpi .kpi-val { font: 500 var(--t-2xl)/34px var(--font-mono); font-variant-numeric: tabular-nums; color: var(--fg-0); margin: 8px 0 6px; letter-spacing: -0.02em; white-space: nowrap; }
.kpi .kpi-val.lit { color: var(--fg-0); }
.kpi .kpi-val small { font-size: var(--t-md); color: var(--fg-2); font-weight: 400; margin-left: 2px; letter-spacing: 0; }
.kpi .foot { font-size: var(--t-sm); color: var(--fg-2); margin-top: 8px; }
.spark { display: block; width: 100%; height: 28px; }
.spark path.l { fill: none; stroke-width: 1.5; }
.spark path.a { opacity: .14; }

/* gauge */
.gauge-track { position: relative; height: 6px; background: var(--bg-3); border-radius: var(--r-pill); overflow: hidden; margin: 10px 0 8px; }
.gauge-fill { position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); border-radius: inherit; background: var(--fg-2); transition: width 500ms var(--ease); }
.gauge-fill.warn { background: repeating-linear-gradient(135deg, var(--fg-0) 0 4px, var(--stripe) 4px 6px); }
.gauge-fill.bad { background: var(--bad); }
.gauge-tick { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--fg-3); }
.gauge-meta { display: flex; justify-content: space-between; gap: 8px; font-size: var(--t-sm); color: var(--fg-2); flex-wrap: wrap; }

/* table */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line-1); border-radius: var(--r-md); background: var(--bg-2); max-width: 100%; }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.tbl th {
  position: sticky; top: 0; background: var(--bg-2); text-align: left; font-weight: 500; color: var(--fg-2);
  height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line-1); white-space: nowrap; cursor: pointer; user-select: none;
}
.tbl th.r, .tbl td.r { text-align: right; }
.tbl th .arr { color: var(--fg-3); margin-left: 3px; font-size: 11px; }
.tbl th[aria-sort] .arr { color: var(--fg-0); }
.tbl td { height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line-1); white-space: nowrap; color: var(--fg-1); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background-color var(--fast) var(--ease); }
.tbl tbody tr:hover { background: var(--bg-3); }
.tbl td.r { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.bar-cell { position: relative; }
.bar-cell::before { content: ""; position: absolute; right: 12px; top: 8px; bottom: 8px; width: calc(var(--w, 0) * (100% - 24px)); background: var(--hl); border-radius: var(--r-xs); }
.bar-cell span { position: relative; }

/* inbox item */
.inbox-item {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: start;
  padding: 14px 16px 14px 20px; background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--r-md); overflow: hidden;
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease), max-height var(--base) var(--ease) var(--base), padding var(--base) var(--ease) var(--base), margin var(--base) var(--ease) var(--base);
  max-height: 260px;
}
.inbox-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--fg-3); }
.inbox-item.bad::before { background: var(--bad); }
.inbox-item.warn::before { background: var(--fg-0); }
.inbox-item .t { display: flex; align-items: center; gap: 8px; font: 500 var(--t-md)/22px var(--font-ui); color: var(--fg-0); }
.inbox-item .t .unread { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-0); flex: none; }
.inbox-item .meta { font: 400 var(--t-xs)/16px var(--font-mono); color: var(--fg-2); }
.inbox-item .fix { color: var(--fg-1); grid-column: 1 / -1; }
.inbox-item .acts { display: flex; gap: 6px; grid-row: 1 / span 2; grid-column: 2; }
.inbox-item.gone { opacity: 0; transform: translateX(24px); max-height: 0; padding-top: 0; padding-bottom: 0; border-width: 0; margin: 0; }
@media (max-width: 560px) {
  .inbox-item { grid-template-columns: 1fr; }
  .inbox-item .acts { grid-row: auto; grid-column: 1; }
}

/* trace gist */
.gist .head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 9px; border-radius: var(--r-pill); font: 500 var(--t-xs)/1 var(--font-mono); background: transparent; color: var(--fg-0); border: 1px solid var(--line-2); }
.crumbs { font: 400 var(--t-sm)/18px var(--font-mono); color: var(--fg-2); overflow-wrap: anywhere; }
.crumbs b { color: var(--fg-0); font-weight: 500; }
.quote { margin: 10px 0; padding: 10px 12px; border-left: 2px solid var(--line-2); background: var(--bg-1); border-radius: 0 var(--r-sm) var(--r-sm) 0; font: 400 var(--t-sm)/19px var(--font-mono); color: var(--fg-1); overflow-wrap: anywhere; }
.redact { background: var(--bg-3); color: var(--fg-3); border-radius: var(--r-xs); padding: 0 4px; }
.gist .fixline { color: var(--fg-1); }
.gist .fixline b { color: var(--fg-0); font-weight: 600; }
.gist .foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-1); font: 400 var(--t-sm)/18px var(--font-mono); color: var(--fg-2); }

/* icon button */
.theme-toggle {
  width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: var(--r-sm);
  border: 1px solid var(--line-1); background: transparent; color: var(--fg-1); cursor: pointer;
}
.theme-toggle:hover { background: var(--bg-3); }
.theme-toggle svg { width: 15px; height: 15px; }

/* brand mark */
.mark { display: inline-flex; align-items: center; gap: 9px; color: var(--fg-0); font: 600 var(--t-md)/1 var(--font-ui); letter-spacing: -0.01em; text-decoration: none !important; }
.mark svg { width: 22px; height: 22px; flex: none; }
.mark .mk-sun { fill: var(--sun); }   /* Runway Ridge: the ridge is a usage curve, the sun sits just over its peak */

/* Runway Ridge backdrop (site/backdrop.js, one include line per page): a fixed layer behind every public page.
   Dawn glow (slow CSS drift, compositor only), far / mid / near ridges, and a sun that rises once from behind the near ridge.
   backdrop.js moves the layers by transform only (scroll sink + pointer sway) and calms the whole layer after one screen.
   Ridge fills sit between --bg-0 and --bg-3, so any text over them keeps AA. Static under reduced motion; paused in hidden tabs. */
.em-bd { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; contain: strict; --bd-h: clamp(150px, 32vh, 340px); }
@media (max-width: 700px) { .em-bd { --bd-h: clamp(120px, 24vh, 220px); } }
.em-bd > div { position: absolute; }
.em-bd-dawn { left: -25%; right: -25%; bottom: calc(var(--bd-h) * .3); height: 78vh; will-change: transform; }
.em-bd-dawn::before { content: ""; position: absolute; inset: 0; background: radial-gradient(42% 58% at 50% 100%, var(--bd-dawn), var(--bd-dawn-0));
  animation: bd-in 2600ms var(--ease) both, bd-drift 64s var(--ease-in-out) 2600ms infinite alternate; }
.em-bd-l { left: -28px; right: -28px; bottom: -8px; height: var(--bd-h); will-change: transform; }
.em-bd-l svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.em-bd-l .e { fill: none; stroke: var(--ridge-edge); stroke-width: 1.25; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.em-bd-far .f { fill: var(--ridge-far); } .em-bd-far .e { opacity: .3; }
.em-bd-mid .f { fill: var(--ridge-mid); } .em-bd-mid .e { opacity: .55; }
.em-bd-near .f { fill: var(--ridge-near); }
.em-bd-far svg { animation: bd-in 1800ms var(--ease) 0ms both; } .em-bd-mid svg { animation: bd-in 1800ms var(--ease) 160ms both; }
.em-bd-sun { position: absolute; width: 0; height: 0; transition: left 1600ms var(--ease-in-out), bottom 1600ms var(--ease-in-out); }
.em-bd-sun::before { content: ""; position: absolute; width: 360px; height: 360px; left: -180px; top: -194px; background: radial-gradient(closest-side, var(--dawn), var(--dawn-0)); opacity: .5; animation: bd-in 2600ms var(--ease) both, bd-breathe 9s var(--ease-in-out) 2600ms infinite alternate; }
.em-bd-sun b { position: absolute; width: 12px; height: 12px; left: -6px; top: -20px; background: var(--sun); border-radius: 50%; animation: bd-rise 2800ms cubic-bezier(.16,1,.3,1) 300ms both; }
@keyframes bd-in { from { opacity: 0; } }
@keyframes bd-rise { from { opacity: 0; transform: translateY(46px); } }
@keyframes bd-drift { from { transform: translateX(-7%); opacity: .72; } to { transform: translateX(7%); opacity: 1; } }
@keyframes bd-breathe { to { opacity: .35; } }
.em-bd.paused *, .em-bd.paused *::before { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .em-bd *, .em-bd *::before { animation: none !important; transition: none !important; } }
html.rm .em-bd *, html.rm .em-bd *::before { animation: none !important; transition: none !important; }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }   /* site 2: transform + opacity only (no blur: it repaints every frame) */
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* toast */
.toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; gap: 12px; align-items: center;
  background: var(--bg-pop); color: var(--fg-0); box-shadow: var(--shadow-pop); padding: 10px 12px 10px 14px; border-radius: var(--r-md);
  font-size: var(--t-sm); transform: translateY(20px); opacity: 0; pointer-events: none; transition: all var(--base) var(--ease);
  max-width: calc(100vw - 32px);
}
.toast.show { transform: none; opacity: 1; pointer-events: auto; }

/* reduced motion: OS setting or in-app switch (html.rm) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  .dot.live { animation: none; opacity: 1; }
}
html.rm *, html.rm *::before, html.rm *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
html.rm.js .reveal { opacity: 1; transform: none; filter: none; }
html.rm .dot.live { animation: none; opacity: 1; }

/* skeleton shimmer */
.skel { position: relative; overflow: hidden; background: var(--bg-3); border-radius: var(--r-xs); color: transparent !important; }
.skel * { visibility: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--hl), transparent); animation: shimmer 1.1s var(--ease) infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* theme toggle: sun icon in dark (switch to light), moon icon in light; instant switch, no colour animation */
[data-theme-toggle] .i-sun { display: block; } [data-theme-toggle] .i-moon { display: none; }
:root[data-theme="light"] [data-theme-toggle] .i-sun { display: none; } :root[data-theme="light"] [data-theme-toggle] .i-moon { display: block; }

/* E38 motion BEGIN */
/* Word reveal: the heading gets class "wr" and each word is <span class="w" style="--w:N">. Words rise half a line
   while a 6px blur clears, 60 ms apart. With "reveal" as well, the words wait for lantern.js to add .in on scroll. */
.wr .w { display: inline-block; animation: em-word 1s var(--ease) both; animation-delay: calc(var(--w, 0) * 60ms + var(--wr-delay, 80ms)); }
.js .wr.reveal { opacity: 1; transform: none; filter: none; transition: none; }
.js .wr.reveal:not(.in) .w { animation: none; opacity: 0; }
@keyframes em-word { from { opacity: .15; transform: translateY(.45em); } }   /* not 0: the hero line still counts as painted for LCP */
/* Flow: a dashed SVG line or path that marches to show direction ("flow-rev" runs backwards, "flow-slow" half speed) */
.flow { stroke-dasharray: 3 5; animation: em-flow 1.2s linear infinite; }
.flow-rev { animation-direction: reverse; }
.flow-slow { animation-duration: 2.4s; }
@keyframes em-flow { to { stroke-dashoffset: -8; } }
/* Flow between steps of a list ("flow-steps"): a dashed connector in the gap before every step after the first */
.flow-steps > li { position: relative; }
.flow-steps > li + li::before { content: ""; position: absolute; right: calc(100% + 4px); top: 50%; width: 14px; height: 1px; opacity: .55;
  background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 7px); background-size: 7px 1px; animation: em-flow-x 1.2s linear infinite; }
@keyframes em-flow-x { to { background-position: 7px 0; } }
@media (max-width: 560px) { .flow-steps > li + li::before { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .wr .w, .flow, .flow-steps > li + li::before { animation: none; }
  .js .wr.reveal:not(.in) .w { opacity: 1; }
}
html.rm .wr .w, html.rm .flow, html.rm .flow-steps > li + li::before { animation: none; }
html.rm .wr.reveal .w { opacity: 1; }
/* E38 motion END */

/* UI polish 4 (2026-10-24): tap targets of at least 24 px (WCAG 2.2 target size) for footer and inline "how it works" links */
footer.site a, a.more { display: inline-flex; align-items: center; min-height: 24px; }
