/* Aeriepeek homepage: "The morning dispatch". Plain CSS, tokens on :root. */
:root {
  --canvas: #0C1520; --panel: #132233; --line: #22354C;
  --accent: #FF5B3A; --accent-hover: #FF7657; --accent-muted: rgba(255,91,58,.22);
  --route: #7FD3E6; --text-primary: #E8EEF3; --text-secondary: #94A7BA;
  --good: #5FD69A; --warn: #F2BD63; --bad: #FF8A80;
  --paper: #EDE6D6; --paper-ink: #1B2129; --paper-line: #CFC4AE;
  --ease: cubic-bezier(.22,.61,.36,1);
  --f-display: "Newsreader", Georgia, "Times New Roman", serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  /* names public/site.css (sign-in dialog, chat) reads */
  --bg: var(--canvas); --surface: var(--panel); --surface-2: #192c41; --line-strong: #34506f;
  --ink: var(--text-primary); --muted: var(--text-secondary); --faint: #8597ab;
  --on-flare: #1a0b05; --accent-soft: rgba(127,211,230,.14); --bad-soft: rgba(255,138,128,.13);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--canvas); color: var(--text-primary); font: 400 17px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
/* fixed contour texture behind everything */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520' viewBox='0 0 520 520' fill='none' stroke='%237fd3e6' stroke-opacity='.07'%3E%3Cpath d='M-20 120c80-40 150 30 240 0s160-70 320-10'/%3E%3Cpath d='M-20 170c90-40 160 40 250 5s150-60 310 0'/%3E%3Cpath d='M-20 230c70-30 170 50 260 10s170-50 300 10'/%3E%3Cpath d='M-20 300c100-50 150 30 250 0s160-40 310 20'/%3E%3Cpath d='M-20 370c80-20 170 40 260 0s150-60 300 0'/%3E%3Cpath d='M-20 440c90-40 160 30 250 0s170-40 310 10'/%3E%3C/svg%3E");
  background-size: 520px 520px; }
/* the valley at dusk, fixed behind the whole page (a fixed layer, not background-attachment, so iOS keeps it still).
   The overlay never drops below 76% canvas (80% on phones): muted text stays above 4.5:1 even over the brightest lights. */
body::after { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, rgba(12,21,32,.86) 0%, rgba(12,21,32,.76) 45%, rgba(12,21,32,.9) 100%), url("/media/bg-valley-1080.webp") center / cover no-repeat; }
@media (min-width: 1100px) { body::after { background-image: linear-gradient(180deg, rgba(12,21,32,.86) 0%, rgba(12,21,32,.76) 45%, rgba(12,21,32,.9) 100%), url("/media/bg-valley-1920.webp"); } }
@media (max-width: 760px) { body::after { background-image: linear-gradient(180deg, rgba(12,21,32,.88) 0%, rgba(12,21,32,.8) 50%, rgba(12,21,32,.9) 100%), url("/media/bg-nest-900.webp"); } }
img, video, svg { display: block; max-width: 100%; }
a { color: var(--route); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(127,211,230,.3); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-flare); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* buttons (also used by the sign-in dialog from site.js) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 15px/1.2 var(--f-body); color: var(--text-primary);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 18px; text-decoration: none; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease); }
.btn:hover { border-color: var(--route); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-flare); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 0 0 5px var(--accent-muted); }
.btn.lg { padding: 14px 22px; font-size: 16px; }
.btn.ghost { background: rgba(12,21,32,.55); backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }
.modal h2 { font-weight: 600; letter-spacing: -.01em; }
.modal input { color: var(--text-primary); }
.su-steps { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--muted); counter-reset: su; }
.su-steps li { display: flex; gap: 10px; align-items: baseline; }
.su-steps li::before { counter-increment: su; content: counter(su); flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 11px var(--f-mono); color: var(--route); background: var(--accent-soft); }
.su-steps b { color: var(--ink); font-weight: 600; }
.su-fine { margin: 2px 0 0 !important; font-size: 12.5px !important; color: var(--faint) !important; }

/* 1. masthead */
.mast { position: sticky; top: 0; z-index: 20; background: rgba(12,21,32,.82); backdrop-filter: blur(10px) saturate(1.2); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.mast.stuck { border-bottom-color: var(--line); }
.mast-in { max-width: 1240px; margin: 0 auto; padding: 10px var(--gutter); display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "word nav act" "line nav act"; column-gap: 28px; align-items: center; }
.wordmark { grid-area: word; font: 600 24px/1 var(--f-display); font-variant-caps: all-small-caps; letter-spacing: .06em; color: var(--text-primary); text-decoration: none; font-optical-sizing: auto; }
.mast-line { grid-area: line; margin: 3px 0 0; font: 400 11.5px/1.3 var(--f-mono); color: var(--text-secondary); letter-spacing: .02em; white-space: nowrap; }
.mast-nav { grid-area: nav; display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.mast-nav a { color: var(--text-secondary); text-decoration: none; font-size: 14.5px; padding: 6px 10px; border-radius: 6px; transition: color .2s var(--ease); }
.mast-nav a:hover { color: var(--text-primary); }
.mast-act { grid-area: act; display: flex; gap: 14px; align-items: center; }
.m-signin { color: var(--text-primary); text-decoration: none; font-size: 14.5px; }
.m-signin:hover { color: var(--route); }
.mast-act .btn { padding: 9px 16px; font-size: 14.5px; }
body.signed-in .m-signin { display: none; }
@media (max-width: 980px) { .mast-nav { display: none; } .mast-in { grid-template-columns: 1fr auto; grid-template-areas: "word act" "line act"; } }
.m-signin, .mast-act .btn { white-space: nowrap; }
@media (max-width: 640px) { .mast-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "word act" "line line"; row-gap: 4px; } .mast-line { overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 480px) { .mast-line { font-size: 10.5px; } .wordmark { font-size: 21px; } .mast-act { gap: 10px; } .mast-act .btn { padding: 8px 12px; font-size: 13.5px; } .m-signin { font-size: 13.5px; } }
@media (max-width: 370px) { .m-signin { display: none; } }

/* 2. the descent */
.descent { position: relative; }
.d-stage { position: relative; height: min(92vh, 860px); min-height: 520px; overflow: hidden; background: #0a121b; }
.d-still, .d-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.d-still { z-index: 0; } .d-video { z-index: 1; opacity: 0; transition: opacity .6s var(--ease); }
.d-shade { z-index: 2; } .d-lines { z-index: 3; } .d-ring { z-index: 3; }
.d-video.ready { opacity: 1; }
.d-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,21,32,.82) 0%, rgba(12,21,32,.45) 38%, rgba(12,21,32,0) 62%), linear-gradient(0deg, var(--canvas) 0%, rgba(12,21,32,0) 22%); }
.d-lines { position: absolute; left: var(--gutter); right: var(--gutter); top: 50%; transform: translateY(-50%); max-width: min(34vw, 460px); display: grid; gap: 22px; margin-left: max(0px, calc((100vw - 1240px) / 2)); }
.d-line { margin: 0; font: 500 clamp(26px, 3.2vw, 42px)/1.1 var(--f-display); letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.d-wren { font-style: italic; }
.sig { display: block; margin-top: 10px; font: 400 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--route); font-style: normal; }
.sig::before { content: "/ "; }
@media (max-width: 760px) {
  .d-stage { height: auto; min-height: 0; aspect-ratio: auto; display: grid; }
  .d-still { position: relative; height: 46vh; min-height: 260px; }
  .d-shade { background: linear-gradient(0deg, var(--canvas) 0%, rgba(12,21,32,.2) 40%, rgba(12,21,32,0) 100%); height: 46vh; min-height: 260px; }
  .d-lines { position: relative; transform: none; top: auto; left: auto; right: auto; max-width: none; padding: 8px var(--gutter) 28px; margin: -60px 0 0; }
  .d-line { font-size: 27px; }
}
/* the cinematic version (home.js adds .cine on wide screens with motion allowed) */
html.cine .descent { height: 300vh; }
html.cine .d-stage { position: sticky; top: 0; height: 100vh; min-height: 0; }
html.cine .d-line { opacity: 0; }
.d-ring { position: absolute; right: calc(var(--gutter) + 8px); bottom: 28px; width: 40px; height: 40px; }
.d-ring circle { fill: none; stroke-width: 3; }
.d-ring .rb { stroke: rgba(232,238,243,.18); }
.d-ring .rf { stroke: var(--route); stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .2s linear; }

/* 3. today's dispatch: the paper sheet over the valley at dusk */
.today { position: relative; padding: 72px var(--gutter) 88px; isolation: isolate; }
.today-bg { display: none; }
.sheet { position: relative; max-width: 780px; margin: 0 auto; background: var(--paper); color: var(--paper-ink); border-radius: 3px; padding: clamp(24px, 5vw, 56px);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 30px 80px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.3);
  background-image: radial-gradient(120% 80% at 10% 0%, rgba(255,255,255,.35), transparent 60%), repeating-linear-gradient(0deg, transparent 0 31px, rgba(207,196,174,.35) 31px 32px); transform-origin: 50% 100%; }
.sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 3px; box-shadow: inset 0 0 60px rgba(120,100,60,.12); }
.sheet a { color: inherit; text-decoration-color: var(--paper-line); }
.sheet a:hover { text-decoration-color: var(--accent); }
.sheet-h { margin: 0 0 18px; font: 500 12px/1.4 var(--f-mono); letter-spacing: .08em; color: #5a5446; border-bottom: 1px solid var(--paper-line); padding-bottom: 12px; min-height: 1.4em; }
.sheet-t { margin: 0 0 18px; font: 600 clamp(34px, 5.4vw, 58px)/1.1 var(--f-display); letter-spacing: -.01em; text-wrap: balance; }
.sheet-body p { margin: 0 0 14px; font-size: 17px; line-height: 1.65; max-width: 62ch; }
.sheet-sub { margin: 30px 0 6px; font: 500 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: #5a5446; }
.sightings { list-style: none; margin: 0; padding: 0; }
.sighting { position: relative; padding: 18px 0 18px; border-top: 1px dashed var(--paper-line); }
.sighting:last-child { border-bottom: 1px dashed var(--paper-line); }
.sighting p { margin: 0; }
.s-k { font: 500 12px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #5a5446; padding-right: 64px; }
.s-name { color: var(--paper-ink); }
.s-counts { margin-top: 6px !important; font: 500 21px/1.3 var(--f-display); }
.s-row { margin-top: 8px !important; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 15px; }
.chip { display: inline-block; font: 500 11.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 3px; border: 1px solid #b6ab93; color: #3b3a33; background: rgba(255,255,255,.4); }
.chip.good { background: rgba(95,214,154,.32); border-color: #3e9a6c; color: #14543a; }
.chip.warn { background: rgba(242,189,99,.38); border-color: #b9842c; color: #5e3f07; }
.chip.bad { background: rgba(255,138,128,.34); border-color: #c0564c; color: #6e1f18; }
.s-money { font-family: var(--f-mono); font-size: 13.5px; color: #3a3d40; }
.us-mark { font: 500 11.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #1f5f73; border-bottom: 1.5px solid #1f5f73; padding-bottom: 2px; }
.s-note { margin-top: 8px !important; font: italic 500 18px/1.45 var(--f-display); color: #2b3038; }
.s-note::before { content: "Wren: "; font: normal 500 11.5px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #6b6352; }
.demo-stamp { position: absolute; right: 0; top: 16px; font: 600 12px/1 var(--f-mono); letter-spacing: .14em; color: #b3402b; border: 2px solid #b3402b; padding: 5px 8px 4px; border-radius: 3px; transform: rotate(-6deg); opacity: .85; }
.pen { position: absolute; left: -14px; top: 2px; width: calc(100% + 18px); height: calc(100% + 4px); pointer-events: none; overflow: visible; }
.pen path { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; opacity: .9; }
.signoff { margin: 26px 0 6px; font: italic 500 22px/1.35 var(--f-display); }
.byline { margin: 0; font: 400 12.5px/1.5 var(--f-mono); color: #5a5446; }
/* the homepage tab that leads to /dispatch: a small paper card, pinned at a slight tilt */
.today-tab { padding: 64px var(--gutter) 72px; }
.dtab { display: block; position: relative; max-width: 520px; margin: 0 auto; padding: 22px 26px 20px; background: var(--paper); color: var(--paper-ink); border-radius: 3px; text-decoration: none; transform: rotate(-.6deg);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 22px 50px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3); background-image: radial-gradient(120% 80% at 10% 0%, rgba(255,255,255,.35), transparent 60%); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.dtab::before { content: ""; position: absolute; top: -9px; left: 50%; width: 74px; height: 18px; margin-left: -37px; background: rgba(207,196,174,.75); transform: rotate(2deg); border-radius: 2px; }
.dtab:hover, .dtab:focus-visible { transform: rotate(0) translateY(-3px); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 28px 60px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.3); }
.dt-k { margin: 0 0 10px; font: 500 12px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: #5a5446; border-bottom: 1px solid var(--paper-line); padding-bottom: 10px; }
.dt-t { margin: 0 0 8px; font: 600 clamp(24px, 3.4vw, 32px)/1.15 var(--f-display); text-wrap: balance; }
.dt-n { margin: 0 0 14px; font-size: 15px; color: #4a4538; }
.dt-go { display: inline-block; font: 500 14px/1 var(--f-mono); color: #b8381f; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
@media (prefers-reduced-motion: reduce) { .dtab, .dtab:hover, .dtab:focus-visible { transition: none; transform: none; } }
/* /dispatch: the sheet, then every back issue */
.dispatch-page .archive-page { padding-top: 8px; }
.dispatch-page .archive-page h2 { font: 600 28px/1.2 var(--f-display); margin: 0 0 4px; }
.dispatch-page .archive-note { margin-bottom: 14px; }
.after-sheet { max-width: 780px; margin: 28px auto 0; text-align: center; }
.mono-note { margin: 0 0 16px; font: 400 13px/1.4 var(--f-mono); letter-spacing: .04em; color: var(--text-primary); }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 480px) { .cta-row .btn { width: 100%; } .s-counts { font-size: 19px; } .sheet-body p { font-size: 16.5px; } }

/* route lines between sections */
.route-line { width: 100%; height: 90px; margin: -10px 0; overflow: visible; }
.route-line path { fill: none; stroke: var(--route); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; opacity: .7; }
.route-line circle { fill: var(--route); opacity: .8; }
.js-motion .route-line path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.js-motion .route-line.drawn path { stroke-dashoffset: 0; }

/* shared section layout */
.sect, .today, #today { scroll-margin-top: 64px; }
.sect { position: relative; max-width: 1240px; margin: 0 auto; padding: 96px var(--gutter); }
.dark { isolation: isolate; }
.dark::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; pointer-events: none; opacity: .9;
  background: radial-gradient(40% 50% at 20% 30%, rgba(127,211,230,.06), transparent 70%), radial-gradient(35% 45% at 80% 70%, rgba(232,238,243,.05), transparent 70%); background-size: 200% 100%; animation: mist 140s linear infinite alternate; }
@keyframes mist { to { background-position: 100% 0, -100% 0; } }
@media (prefers-reduced-motion: reduce), (max-width: 760px) { .dark::before { animation: none; } }
.h2 { margin: 0 0 36px; font: 600 clamp(30px, 4vw, 46px)/1.1 var(--f-display); letter-spacing: -.01em; }
.h2.big { font-size: clamp(36px, 5.4vw, 64px); }
.kicker { margin: 0 0 22px; font: 500 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--route); }
.wren-line { margin: 36px 0 0; max-width: 30ch; font: italic 500 clamp(26px, 3.2vw, 38px)/1.2 var(--f-display); letter-spacing: -.01em; }

/* 4. why */
.voices { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.voices li { font: 500 clamp(22px, 2.6vw, 30px)/1.25 var(--f-display); color: var(--text-secondary); border-left: 2px solid var(--line); padding-left: 18px; max-width: 34ch; }

/* 5. watches: log lines, not cards */
.log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.log li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px 40px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.log p { margin: 0; color: var(--text-secondary); }
.log .log-t { font: 500 14px/1.5 var(--f-mono); letter-spacing: .02em; color: var(--text-primary); }
@media (max-width: 760px) { .log li { grid-template-columns: 1fr; } }

/* 6. readers */
.reader-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.reader-list li { padding: 24px 22px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.reader-list h3 { margin: 0; font: 600 22px/1.2 var(--f-display); }
.reader-list p { margin: 0 0 10px; color: var(--text-secondary); }
.preset { margin-top: auto; align-self: flex-start; font: 500 12.5px/1.3 var(--f-mono); color: var(--route); text-decoration: none; border: 1px solid rgba(127,211,230,.35); border-radius: 999px; padding: 7px 12px; transition: border-color .2s var(--ease), transform .3s var(--ease); }
.preset::after { content: " \2192"; }
.preset:hover { border-color: var(--route); transform: translateY(-1px); }
@media (max-width: 980px) { .reader-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .reader-list { grid-template-columns: 1fr; } }

/* 7. spot the early one */
.spot-how { margin: -20px 0 18px; color: var(--text-secondary); }
.demo-tag { margin-left: 8px; font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); border: 1px solid var(--line); padding: 4px 6px; border-radius: 3px; }
.valley { position: relative; height: clamp(300px, 42vw, 440px); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 110%, rgba(40,78,120,.55), transparent 70%), linear-gradient(180deg, #0f1c2b, #0a131d); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.valley-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ridge { fill: #0a121b; opacity: .9; }
.trend path { fill: none; stroke: var(--route); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(127,211,230,.6)); }
.light { position: absolute; left: var(--x); top: var(--y); width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 50%; animation: driftlight 18s ease-in-out infinite alternate; animation-delay: var(--d); -webkit-tap-highlight-color: transparent; }
.light::before { content: ""; position: absolute; inset: 15px; border-radius: 50%; background: #ffd08a; box-shadow: 0 0 10px 3px rgba(255,190,110,.75), 0 0 32px 8px rgba(255,170,90,.25); transition: transform .3s var(--ease); }
.light::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--route); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .3s var(--ease); }
.light:hover::before, .light:focus-visible::before { transform: scale(1.25); }
.light.holding::after { opacity: 1; transform: scale(1); transition: transform 1.2s linear, opacity .2s; }
.light.done::before { background: #9fb3c7; box-shadow: 0 0 8px 2px rgba(159,179,199,.4); }
.light.done.early::before { background: var(--accent); box-shadow: 0 0 12px 4px rgba(255,91,58,.7), 0 0 34px 10px rgba(255,91,58,.25); }
@keyframes driftlight { 0% { transform: translate(0, 0); } 50% { transform: translate(10px, -6px); } 100% { transform: translate(-8px, 5px); } }
@media (prefers-reduced-motion: reduce), (max-width: 760px) { .light { animation: none; } }
.readout { position: absolute; left: 16px; bottom: 14px; right: 16px; margin: 0; font: 500 13px/1.4 var(--f-mono); color: var(--text-primary); min-height: 1.4em; }
.readout .chip { margin-left: 8px; background: rgba(232,238,243,.08); border-color: var(--line-strong); color: var(--text-primary); }
.readout .chip.good { background: rgba(95,214,154,.18); border-color: var(--good); color: var(--good); }
.readout .chip.warn { background: rgba(242,189,99,.16); border-color: var(--warn); color: var(--warn); }
.readout .chip.bad { background: rgba(255,138,128,.16); border-color: var(--bad); color: var(--bad); }
.js-spot .spot-after { opacity: 0; transform: translateY(10px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js-spot .spot-after.shown { opacity: 1; transform: none; }

/* 8. back issues ledger */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: none; }
.ledger li { border-bottom: 1px solid var(--line); }
.ledger a { display: grid; grid-template-columns: 90px 130px minmax(0, 1fr) auto; gap: 6px 20px; align-items: baseline; padding: 16px 4px; color: var(--text-primary); text-decoration: none; transition: transform .3s var(--ease); }
.ledger a:hover { transform: translateY(-2px); }
.l-no, .l-date, .l-count { font: 400 13px/1.4 var(--f-mono); color: var(--text-secondary); }
.l-title { font: 500 21px/1.3 var(--f-display); background: linear-gradient(var(--route), var(--route)) 0 100% / 0 1.5px no-repeat; transition: background-size .5s var(--ease); justify-self: start; }
.ledger a:hover .l-title { background-size: 100% 1.5px; }
.ledger-empty { padding: 18px 4px; font: italic 500 22px/1.3 var(--f-display); color: var(--text-secondary); }
@media (max-width: 640px) { .ledger a { grid-template-columns: auto 1fr; } .l-title { grid-column: 1 / -1; } .l-count { grid-column: 1 / -1; } }
.archive-more { margin: 22px 0 4px; }
.archive-more a { font-weight: 500; }
.archive-note { margin: 0; color: var(--text-secondary); font-size: 15px; }

/* 9. pricing */
.anchor { position: absolute; top: 0; }
.price-sub { margin: -18px 0 28px; color: var(--text-secondary); max-width: 60ch; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan h3, .compare thead h3 { margin: 0; font: 600 26px/1.1 var(--f-display); }
.tag { font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--on-flare); background: var(--accent); padding: 6px 8px; border-radius: 3px; }
.tag.soft { background: transparent; color: var(--route); border: 1px solid rgba(127,211,230,.4); }
.price { margin: 8px 0 0; }
.price b { font: 600 34px/1.1 var(--f-display); }
.then { margin: 0; color: var(--text-secondary); }
.fine { margin: 6px 0 0; font-size: 13px; color: var(--text-secondary); }
.trust { margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 6px 0; font: 400 13px/1.5 var(--f-mono); color: var(--text-secondary); }
.trust span + span::before { content: "·"; margin: 0 10px; }

/* Side-by-side plan comparison. On small screens it scrolls sideways; the feature column stays put. */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.compare-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.compare { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.compare th, .compare td { vertical-align: top; text-align: left; padding: 14px 16px; }
.compare thead th { padding: 22px 18px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.compare thead th:first-child, .compare tbody th { position: sticky; left: 0; z-index: 2; background: var(--panel); box-shadow: 8px 0 12px -8px rgba(0,0,0,.55); width: 22%; }
.compare thead th:first-child { z-index: 3; width: 22%; }
.compare thead th:not(:first-child) { width: 26%; }
.compare thead .price { margin: 10px 0 0; }
.compare thead .then { margin: 4px 0 14px; font-size: 14.5px; }
.compare thead .btn { width: 100%; }
.compare thead .fine { max-width: none; }
.compare thead th.main { background: #1a2634; box-shadow: inset 0 0 0 1px rgba(255,91,58,.45); }
.compare tbody th { font: 500 14.5px/1.35 var(--f-body); color: var(--text-primary); }
.compare tbody td { font-size: 14.5px; line-height: 1.45; color: var(--text-primary); border-bottom: 1px solid var(--line); }
.compare tbody th { border-bottom: 1px solid var(--line); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody td.main, .compare tbody tr td:nth-child(3) { background: rgba(255,91,58,.06); }
.compare .cmp-no { color: var(--faint); }
.compare .cmp-note { display: block; margin-top: 3px; font: 400 12px/1.35 var(--f-body); color: var(--text-secondary); font-weight: 400; }

.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 26px 24px; display: flex; flex-direction: column; gap: 8px; }
.plan.founding { margin-top: 16px; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "top price btn" "then then btn" "fine fine btn"; column-gap: 28px; row-gap: 4px; align-items: center; }
.plan.founding .plan-top { grid-area: top; }
.plan.founding .price { grid-area: price; margin: 0; }
.plan.founding .price b { font-size: 28px; }
.plan.founding .then { grid-area: then; }
.plan.founding .btn { grid-area: btn; justify-self: end; margin: 0; }
.plan.founding .fine { grid-area: fine; }
@media (max-width: 760px) {
  .plan.founding { display: flex; }
  .plan.founding .btn { justify-self: stretch; width: 100%; }
  .compare { min-width: 640px; }
  .compare th, .compare td { padding: 12px 12px; }
  .compare thead th { padding: 16px 12px 16px; }
  .compare thead h3 { font-size: 22px; }
  .price b { font-size: 28px; }
  .compare thead .btn { font-size: 14px; padding: 10px 12px; }
}

/* 10. field rules: typewriter */
.typewriter { margin: 0; padding: 0; list-style: none; counter-reset: rule; display: grid; gap: 14px; }
.typewriter li { counter-increment: rule; font: 400 clamp(17px, 2vw, 21px)/1.5 var(--f-mono); }
.typewriter li::before { content: counter(rule) ". "; color: var(--route); }

/* 11. faq */
.faq-list { border-top: 1px solid var(--line); max-width: 860px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font: 500 21px/1.35 var(--f-display); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 6px; top: 18px; font: 400 22px var(--f-mono); color: var(--route); transition: transform .3s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: 0 0 20px; color: var(--text-secondary); max-width: 64ch; }

/* 12. colophon */
.colophon { border-top: 1px solid var(--line); max-width: 1240px; margin: 40px auto 0; padding: 40px var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px)); }
.colo-line { margin: 0 0 18px; font: italic 500 22px/1.35 var(--f-display); }
.colo-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.colo-links a { color: var(--text-secondary); text-decoration: none; font-size: 15px; }
.colo-links a:hover { color: var(--text-primary); }
.colo-fine { margin: 22px 0 0; font: 400 12px/1.4 var(--f-mono); color: var(--faint); }

/* /dispatch pages */
.page-head { max-width: 780px; margin: 0 auto; padding: 56px var(--gutter) 8px; }
.page-head h1 { margin: 0 0 10px; font: 600 clamp(36px, 5vw, 56px)/1.1 var(--f-display); letter-spacing: -.01em; }
.page-head p { margin: 0; color: var(--text-secondary); }
.archive-page { max-width: 900px; margin: 0 auto; padding: 32px var(--gutter) 64px; }
.back-link { display: inline-block; margin-bottom: 18px; font: 500 13px/1 var(--f-mono); }

/* Dashboard links, side rail and "The full view" */
.m-dash { font: 500 13px/1 var(--f-mono); letter-spacing: .04em; color: var(--route); text-decoration: none; white-space: nowrap; padding: 8px 10px; border: 1px solid rgba(127,211,230,.45); border-radius: 6px; }
.m-dash:hover { border-color: var(--route); background: rgba(127,211,230,.08); }
.mast-nav .nav-dash { color: var(--route); font-family: var(--f-mono); font-size: 13.5px; }
@media (min-width: 981px) { .m-dash { display: none; } }
@media (max-width: 480px) { .m-signin { display: none; } .m-dash { padding: 8px 8px; font-size: 12.5px; } }
.btn.secondary { background: transparent; border: 1px solid var(--route); color: var(--route); }
.btn.secondary:hover { background: rgba(127,211,230,.1); }

.rail { display: flex; gap: 2px; font: 500 12px/1 var(--f-mono); letter-spacing: .04em; z-index: 19; }
.rail a { color: var(--text-secondary); text-decoration: none; padding: 9px 10px; border-radius: 6px; white-space: nowrap; border-left: 2px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease); }
.rail a:hover { color: var(--text-primary); }
.rail a.on { color: var(--route); border-left-color: var(--route); }
.rail .r-dash { color: var(--canvas); background: var(--route); font-weight: 600; }
.rail .r-dash:hover { color: var(--canvas); background: #a4e2ef; }
@media (min-width: 1024px) {
  .rail { position: fixed; left: 14px; top: 50%; transform: translateY(-50%); flex-direction: column; width: 150px; }
  .rail .r-dash { margin-bottom: 10px; border-left: 0; }
  main, body > footer { margin-left: 164px; }
}
@media (max-width: 1023px) {
  .rail { position: sticky; top: var(--mast-h, 60px); overflow-x: auto; scrollbar-width: none; padding: 6px var(--gutter); background: rgba(12,21,32,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .rail::-webkit-scrollbar { display: none; }
  .rail a { border-left: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 10px; }
  .rail a.on { border-bottom-color: var(--route); }
  .rail .r-dash { border-radius: 5px; border-bottom: 0; position: sticky; left: 0; z-index: 1; box-shadow: 8px 0 10px rgba(12,21,32,.9); }
}

.fullview { scroll-margin-top: 110px; }
.fv-head { max-width: 640px; }
.fv-head .h2 { margin-bottom: 12px; }
.fv-lede { margin: 0 0 32px; color: var(--text-secondary); font-size: 17px; }
.fv-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.fv-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text-primary); text-decoration: none; transition: border-color .2s var(--ease); min-width: 0; }
.fv-card:hover { border-color: var(--route); }
.fv-k { margin: 0; font: 500 12px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-primary); }
.fv-meta { margin: auto 0 0; font: 400 11.5px/1.3 var(--f-mono); color: var(--text-secondary); }
.fv-sum { margin: 0; font-size: 14px; color: var(--text-secondary); overflow-wrap: anywhere; }
.fv-svg { width: 100%; height: 120px; display: block; }
.fv-svg polyline { fill: none; stroke: var(--route); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fv-svg circle { fill: var(--route); }
.fv-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.fv-bars li { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.fv-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.fv-bt { height: 8px; background: rgba(127,211,230,.12); border-radius: 4px; overflow: hidden; }
.fv-bt span { display: block; height: 100%; background: var(--route); border-radius: 4px; }
.fv-bn { font: 500 12px/1 var(--f-mono); color: var(--route); }
.fv-empty { color: var(--text-secondary); font: 400 13px/1.4 var(--f-mono); }
.fv-cta { margin: 28px 0 0; }

/* phones: a full-height opening on the cliff (first frame of the descent), lines over it */
@media (max-width: 760px) {
  .d-stage { display: block; position: relative; height: calc(100svh - var(--mast-h, 60px) - 44px); min-height: 520px; }
  .d-still { position: absolute; inset: 0; height: 100%; min-height: 0; object-position: left bottom; }
  .d-shade { height: auto; min-height: 0; inset: 0; background: linear-gradient(0deg, rgba(12,21,32,.92) 0%, rgba(12,21,32,.55) 45%, rgba(12,21,32,.1) 75%), linear-gradient(180deg, rgba(12,21,32,.5) 0%, rgba(12,21,32,0) 25%); }
  .d-lines { position: absolute; left: 0; right: 0; bottom: 0; top: auto; margin: 0; padding: 0 var(--gutter) 36px; gap: 16px; }
}

/* phones: the full opening frame, taller: dawn sky on top (the opening lines sit there), cloud sea, then the cliff and nest */
@media (max-width: 760px) {
  .d-stage { height: calc(100svh - var(--mast-h, 60px)); min-height: 560px; }
  .d-still { object-position: 0% 100%; }
  .d-shade { background: linear-gradient(180deg, rgba(12,21,32,.55) 0%, rgba(12,21,32,.15) 38%, rgba(12,21,32,0) 55%), linear-gradient(0deg, var(--canvas) 0%, rgba(12,21,32,0) 14%); }
  .d-lines { top: 0; bottom: auto; padding: 22px var(--gutter) 0; gap: 12px; }
  .d-line { font-size: 23px; }
}

/* 1b. plain intro above the descent */
.intro { max-width: 860px; margin: 0 auto; padding: clamp(40px, 7vw, 84px) var(--gutter) clamp(32px, 5vw, 56px); text-align: center; }
.intro .kicker { margin-bottom: 14px; }
.intro-h { margin: 0 0 18px; font: 600 clamp(34px, 5.6vw, 64px)/1.05 var(--f-display); letter-spacing: -.015em; text-wrap: balance; }
.intro-lede { margin: 0 auto 26px; max-width: 640px; font-size: clamp(17px, 1.6vw, 19px); color: var(--text-secondary); text-wrap: pretty; }
.intro-fine { margin: 16px 0 0; font-size: 14px; color: var(--text-secondary); }
/* 4a. trust */
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.trust-list li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px 20px; }
.trust-list h3 { margin: 0 0 8px; font: 600 19px/1.25 var(--f-display); }
.trust-list p { margin: 0 0 12px; font-size: 15.5px; color: var(--text-secondary); }
.trust-list a { font-size: 15px; font-weight: 500; }
