/* I Am Idaho · page styles.
   Grammar: Almanac. One night, sundown to first light. Printed paper chapters
   cut hard over a fixed, relit Idaho landscape. Stacking copied from the
   evening-parallax pattern: back canvas (0), the name (1), front canvas (2),
   the page (3), the running head (20). */

html { background: var(--night); color-scheme: dark; scroll-padding-top: calc(var(--head-h) + 12px); }
/* The engine's smooth scrolling would animate the browser's own jump to a #hash
   while the page is still loading, and that animation outlives the page's own
   landing (main.js land()) and carries on to a stale spot. Smooth only once ready. */
html:not(.is-ready) { scroll-behavior: auto; }
body {
  margin: 0; background: var(--night); color: var(--bone);
  font-family: var(--font-text); font-size: 1.0625rem; line-height: 1.6;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

/* ------------------------------------------------------------- world -- */
.world {
  position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh;
  pointer-events: none; display: block;
  opacity: 0; transition: opacity 1.1s var(--ease);
}
.is-ready .world { opacity: 1; }
.world--back { z-index: 0; }
.world--front { z-index: 2; }
.no-gl .world { display: none; }
.no-gl body { background: var(--night) url("../assets/fallback.jpg") center 62% / cover fixed no-repeat; }
.no-gl :is(.lamplight, .free, .showtime, .firstlight, .reply) { background: color-mix(in oklab, var(--night) 84%, transparent); }
/* No ridge to stand on without WebGL: the name sits up on the sky and the peaks, where
   dark ink reads (at the old 60vh its letters stood on dark conifers, about 2:1). */
.no-gl :is(.marquee__title, .marquee__kicker) { top: 30vh; }

/* The name stands on the ridge saddle, between the back and front planes. */
.marquee {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  --name-size: clamp(3rem, 7.6vw, 9rem);
}
.marquee__title, .marquee__kicker {
  position: absolute; margin: 0; left: var(--sky-x, 50%); top: var(--sky-y, 60vh);
  white-space: nowrap; text-align: center; will-change: transform;
}
.marquee__title {
  transform: translate(-50%, -100%) translateY(calc(0.12em + var(--set, 0) * 1.08em));
  font-family: var(--font-display); font-weight: 820; font-size: var(--name-size);
  font-variation-settings: "wdth" var(--wdth, 122);
  line-height: 0.86; letter-spacing: -0.025em;
  color: var(--dusk-ink);
  text-shadow:
    0 0 0.14em oklch(93% 0.06 82 / 0.55),
    -0.015em -0.01em 0.03em oklch(92% 0.06 80 / 0.38);
}
.marquee__kicker {
  transform: translate(-50%, calc(-100% - var(--name-size) * 0.88 - 0.5rem)) translateY(calc(var(--set, 0) * 2.2rem));
  font: 760 clamp(0.82rem, 1.3vw, 1.18rem)/1 var(--font-display);
  font-variation-settings: "wdth" 112;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--dusk-ink);
  opacity: calc(1 - var(--set, 0) * 2.4);
  text-shadow: 0 0 0.6em oklch(94% 0.05 85 / 0.55);
}
.marquee__line { display: block; }
.marquee .ch { display: inline-block; transform: translateY(0.55em); opacity: 0; }
.marquee .ch.sp { width: 0.24em; }
.is-ready .marquee .ch { animation: rise 1.6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 60ms + 140ms); }
.marquee .ch:nth-child(1) { --i: 0; } .marquee .ch:nth-child(3) { --i: 1; } .marquee .ch:nth-child(4) { --i: 2; }
.marquee .ch:nth-child(6) { --i: 3; } .marquee .ch:nth-child(7) { --i: 4; } .marquee .ch:nth-child(8) { --i: 5; }
.marquee .ch:nth-child(9) { --i: 6; } .marquee .ch:nth-child(10) { --i: 7; }
@keyframes rise { to { transform: none; opacity: 1; } }
.is-reduced .marquee .ch { animation: none; transform: none; opacity: 1; }

/* Pillar words, standing over each stone letter. */
.tags { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.tag {
  position: absolute; left: var(--x, 50%); top: var(--y, 40%);
  transform: translate(-50%, -100%) translateY(calc((1 - var(--o, 0)) * 0.6rem));
  opacity: var(--o, 0);
  font: 700 0.75rem/1 var(--font-display); font-variation-settings: "wdth" 118;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--bone);
  /* a small cast plaque, the kind bolted to a monument */
  padding: 6px 7px 6px 10px; border-radius: 1px;
  background: oklch(24% 0.045 160 / 0.9); box-shadow: inset 0 0 0 1px oklch(76% 0.05 148 / 0.45), 0 4px 12px -4px oklch(12% 0.04 250 / 0.6);
}

/* ------------------------------------------------------ running head -- */
.head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--head-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 var(--gutter);
  background: var(--news); color: var(--ink);
  border-bottom: 1px solid var(--news-rule);
  box-shadow: 0 3px 0 -2px var(--news), 0 4px 0 -2px var(--news-rule), 0 10px 24px -14px oklch(14% 0.04 250 / 0.6);
  font-family: var(--font-display); font-variation-settings: "wdth" 96;
}
.head__mark { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; justify-self: start; color: var(--forest); }
.iai { width: 38px; height: 19px; fill: currentColor; flex: none; }
.head__name { font-weight: 760; font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.head__now {
  margin: 0; font-size: 0.75rem; font-weight: 560; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-soft); display: flex; gap: 0.7em; align-items: baseline; font-variant-numeric: tabular-nums;
}
.head__hour { color: var(--accent-deep); font-weight: 700; }
.head__right { justify-self: end; display: flex; align-items: center; gap: 14px; }
.head__contents {
  appearance: none; background: none; border: 0; padding: 0 2px; min-height: 44px; cursor: pointer; color: var(--ink);
  font: 650 0.76rem/1 var(--font-display); font-variation-settings: "wdth" 96; letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--news-rule);
  transition: color 140ms var(--ease);
}
.head__contents:hover { color: var(--accent-deep); }
.head__contents[aria-expanded="true"] { color: var(--accent-deep); text-decoration-color: currentColor; }
.contents {
  position: absolute; top: calc(var(--head-h) + 8px); right: var(--gutter);
  width: min(360px, calc(100vw - 2 * var(--gutter)));
  background: var(--news); color: var(--ink); padding: 18px 22px 14px; border-radius: 3px;
  box-shadow: var(--shadow-paper); border: 1px solid var(--news-rule);
}
.contents__title { margin: 0 0 8px; font: 800 0.75rem/1 var(--font-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft); }
.contents__list { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.contents__list a {
  display: grid; grid-template-columns: 7.8em 1fr; gap: 12px; align-items: baseline; padding: 12px 0;
  text-decoration: none; border-top: 1px solid oklch(30% 0.02 95 / 0.18);
  font: 400 1rem/1.2 var(--font-text); transition: color 140ms var(--ease);
}
.contents__list a:hover { color: var(--accent-deep); }
.contents__hour { font: 650 0.75rem/1 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------------------------------------------------------- controls -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  font: 720 0.92rem/1 var(--font-display); font-variation-settings: "wdth" 104; letter-spacing: 0.04em;
  padding: 0.95em 1.35em; border-radius: 3px;
  box-shadow: inset 0 1px 0 oklch(90% 0.08 60 / 0.6), 0 6px 16px -8px oklch(30% 0.12 35 / 0.75);
  transition: background-color 140ms var(--ease), transform 120ms var(--ease);
}
.btn:hover { background: var(--accent-hi); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn { min-height: 44px; }
.btn--small { font-size: 0.76rem; padding: 0.72em 1em; letter-spacing: 0.05em; min-height: 0; }
/* The header button and the text links keep their drawn size; an invisible margin
   around each takes the tap, so a thumb has at least 44px to land on. */
.btn--small, .textlink { position: relative; }
.btn--small::after, .textlink::after { content: ""; position: absolute; inset: -8px -4px; }
.textlink::after { inset: -14px -6px; }
.btn--big { font-size: 1.06rem; padding: 1.05em 1.7em; }
.textlink {
  font: 680 0.92rem/1.2 var(--font-display); font-variation-settings: "wdth" 100; letter-spacing: 0.03em;
  color: var(--accent-deep); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px;
  transition: color 140ms var(--ease), text-underline-offset 140ms var(--ease);
}
.textlink:hover { text-underline-offset: 7px; }
.textlink--bone { color: var(--bone); text-decoration-color: oklch(96% 0.013 95 / 0.55); }
.textlink--bone:hover { color: var(--accent-hi); }
/* coral text is about 3:1 on kraft; there the link is ink and the coral moves to the underline */
.paper--kraft .textlink { color: var(--ink); text-decoration-color: var(--accent-deep); }
.skip {
  position: fixed; left: 12px; top: 8px; z-index: 40; transform: translateY(-160%);
  background: var(--accent); color: var(--accent-ink); padding: 15px 18px; border-radius: 3px;
  font: 700 0.9rem/1 var(--font-display); text-decoration: none; transition: transform 160ms var(--ease);
}
.skip:focus { transform: none; }

/* ------------------------------------------------------------- page -- */
main { position: relative; z-index: 3; }
main > section { position: relative; }

/* paper: three stocks, hard edges, no fades */
.paper { color: var(--ink); isolation: isolate; border-top: 5px double oklch(28% 0.035 160 / 0.55); }
.paper + .paper { border-top: 0; }
.paper::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .22 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.paper--ledger {
  background:
    linear-gradient(90deg, transparent calc(var(--gutter) - 14px), var(--ledger-margin) calc(var(--gutter) - 14px), var(--ledger-margin) calc(var(--gutter) - 13px), transparent calc(var(--gutter) - 13px)),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--ledger-rule) 31px 32px),
    var(--ledger);
}
.paper--kraft {
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 60%, oklch(60% 0.06 60 / 0.22)),
    var(--kraft);
}
.paper--kraft::before {
  opacity: 0.42;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .7' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)'/%3E%3C/svg%3E");
}
.paper--news {
  background:
    radial-gradient(circle at 1px 1px, oklch(30% 0.02 95 / 0.07) 0.8px, transparent 1.2px) 0 0 / 5px 5px,
    var(--news);
}

/* chapters */
.chapter { min-height: 100vh; min-height: 100svh; padding: clamp(112px, 17vh, 190px) 0 clamp(80px, 12vh, 140px); }
.chapter__inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.chapter__title {
  margin: 0 0 clamp(32px, 5vh, 56px); max-width: 15ch; text-wrap: balance;
  font-family: var(--font-display); font-weight: 820; font-variation-settings: "wdth" 78;
  font-size: clamp(2.5rem, 6vw, 5.6rem); line-height: 0.95; letter-spacing: -0.012em; color: var(--ink);
}
.chapter__title--wide { max-width: 18ch; }
.prose { max-width: 34ch; }
.prose p, .what__col p { margin: 0 0 1.1em; text-wrap: pretty; }
.paper--ledger .prose p { font-size: 1.2rem; line-height: 2rem; }
.chapter__close {
  margin: clamp(56px, 9vh, 96px) 0 0; max-width: 26ch; text-wrap: balance;
  font: italic 400 clamp(1.5rem, 2.8vw, 2.3rem)/1.25 var(--font-text); color: var(--forest);
}

/* the problem: words left, the graph right */
.problem__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.graph { margin: 0; }
.graph__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.graph__num {
  font: 880 clamp(4.4rem, 9vw, 7.6rem)/0.85 var(--font-display); font-variation-settings: "wdth" 72;
  color: var(--accent-deep); font-variant-numeric: tabular-nums; min-width: 1.15em;
}
.graph__of { font: 650 0.86rem/1.2 var(--font-display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.graph__grid { display: block; width: 100%; max-width: 440px; height: auto; color: var(--forest); }
.graph__house { fill: transparent; stroke: oklch(36% 0.034 160 / 0.5); stroke-width: 1.1; transition: fill 260ms var(--ease), stroke 260ms var(--ease), transform 260ms var(--ease); transform-box: fill-box; transform-origin: 50% 100%; }
.graph__house.is-on { fill: var(--forest); stroke: var(--forest); }
.graph.is-live .graph__house.is-on { animation: stamp 420ms var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes stamp { from { transform: scale(0.9); opacity: 0.2; } to { transform: none; opacity: 1; } }
.graph__cap { margin-top: 18px; max-width: 46ch; }
.graph__cap strong { display: block; font: 600 1.25rem/1.35 var(--font-text); color: var(--ink); }
.graph__src { display: block; margin-top: 8px; font-size: 0.82rem; line-height: 1.5; color: var(--ink-soft); }
.graph__src a { color: var(--ink); text-underline-offset: 3px; }

/* lamplight: the hour word, then nothing but the town lighting up */
.lamplight { height: 80vh; display: grid; align-items: end; justify-items: center; padding-bottom: 32vh; }
.lamplight__word {
  margin: 0; font: italic 300 clamp(2.8rem, 8.5vw, 7.8rem)/1 var(--font-text); letter-spacing: -0.01em;
  color: oklch(96% 0.03 85 / 0.82); text-shadow: 0 2px 30px oklch(15% 0.04 255 / 0.6);
}

/* the peak */
.free__stage { height: 100vh; height: 100lvh; }
.free__copy {
  position: absolute; left: 0; right: 0; top: calc(var(--head-h) + 7vh); bottom: 6vh; padding: 0 var(--gutter);
  display: flex; flex-direction: column; text-align: center; pointer-events: none;
}
/* the engine turns the cue's pointer-events back on (inline) only while it shows */
.free__line {
  margin: 0; font: 400 clamp(2.4rem, 6vw, 5.8rem)/1.04 var(--font-text); letter-spacing: -0.015em;
  color: var(--bone); text-shadow: 0 2px 28px oklch(14% 0.05 255 / 0.65);
}
/* the quiet way in at the peak: a text link, not a button, so the line keeps the stage */
.free__go { margin: clamp(26px, 4.5vh, 44px) 0 0; }
.free__go .textlink--bone { display: inline-block; padding: 12px 4px; font-size: 1.14rem; font-weight: 700; text-shadow: 0 1px 12px oklch(14% 0.05 255 / 0.85); }
/* wide screens: the Family letter rises into the space under the line, so the link waits at the foot of the scene */
@media (min-aspect-ratio: 1/1) { .free__go { margin-top: auto; } }
.free__a, .free__b { display: block; }
.free__b { position: relative; width: max-content; margin: 0.06em auto 0; }
.free__b em { font-style: italic; font-weight: 500; }
.free__stroke { position: absolute; left: 49%; bottom: -0.14em; width: 48%; height: 0.24em; overflow: visible; }
.free__stroke path {
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 300; stroke-dashoffset: calc(300px * (1 - min(1, max(0, (var(--sc-p, 0) - 0.60) / 0.12))));
}

/* what we do */
.what__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); max-width: 980px; }
.what__col--2 { margin-top: clamp(0px, 6vh, 64px); }
.what__h { margin: 0 0 12px; font: 820 1.5rem/1 var(--font-display); font-variation-settings: "wdth" 84; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink); }
.what__col p { font-size: 1.15rem; line-height: 1.65; max-width: 38ch; }
.flow { margin: clamp(64px, 10vh, 120px) 0 0; position: relative; }
.flow__cap { font: 700 0.78rem/1 var(--font-display); letter-spacing: 0.24em; text-transform: uppercase; color: oklch(30% 0.04 60); margin-bottom: 24px; }
.flow__line { position: absolute; left: 0; right: 0; top: 30px; width: 100%; height: 120px; pointer-events: none; }
.flow__line path { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 6 7; vector-effect: non-scaling-stroke; opacity: 0.55; clip-path: inset(0 100% 0 0); transition: clip-path 1.6s var(--ease) 200ms; }
.flow.is-drawn .flow__line path { clip-path: inset(0 0 0 0); }
.flow__steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.flow__steps li { display: grid; justify-items: center; text-align: center; gap: 14px; padding-top: 18px; opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.flow.is-drawn .flow__steps li { opacity: 1; transform: none; }
.flow.is-drawn .flow__steps li:nth-child(2) { transition-delay: 300ms; }
.flow.is-drawn .flow__steps li:nth-child(3) { transition-delay: 600ms; }
.flow.is-drawn .flow__steps li:nth-child(4) { transition-delay: 900ms; }
.flow__steps svg { width: 64px; height: 64px; padding: 12px; border-radius: 50%; background: var(--kraft); box-shadow: 0 0 0 1px oklch(30% 0.04 60 / 0.6); fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; box-sizing: border-box; }
.flow__steps span { font: 600 1.05rem/1.3 var(--font-text); max-width: 14ch; }
.pillars { margin-top: clamp(72px, 11vh, 128px); padding-top: 28px; border-top: 1px solid oklch(30% 0.04 60 / 0.45); }
.pillars__h { margin: 0 0 28px; font: italic 400 clamp(1.4rem, 2.4vw, 2rem)/1.2 var(--font-text); }
.pillars__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pillars__list li { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: baseline; padding: 4px clamp(14px, 2.4vw, 32px); border-left: 1px solid oklch(30% 0.04 60 / 0.4); }
.pillars__list li:first-child { border-left: 0; padding-left: 0; }
.pillars__glyph { grid-row: span 2; font: 600 clamp(3.4rem, 5vw, 4.6rem)/0.9 var(--font-text); font-variation-settings: "opsz" 72; color: var(--forest); }
.pillars__word { font: 820 1.1rem/1 var(--font-display); font-variation-settings: "wdth" 100; letter-spacing: 0.16em; text-transform: uppercase; }
.pillars__line { font-size: 0.98rem; line-height: 1.45; color: oklch(28% 0.035 60); margin-top: 6px; }

/* showtime: a wood-type poster over the night */
.showtime__stage { height: 100vh; height: 100lvh; }
.poster {
  position: absolute; inset: calc(var(--head-h) + 14px) 14px 14px; padding: clamp(18px, 4vh, 44px) var(--gutter) 0;
  border: 1px solid oklch(96% 0.013 95 / 0.45); outline: 1px solid oklch(96% 0.013 95 / 0.22); outline-offset: 5px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.poster__pre { margin: 0; font: 650 clamp(0.8rem, 1.2vw, 1rem)/1 var(--font-display); font-variation-settings: "wdth" 120; letter-spacing: 0.34em; text-transform: uppercase; color: var(--bone-soft); }
.poster__title {
  margin: 0.12em 0 0; font-family: var(--font-display); font-weight: 900; font-variation-settings: "wdth" 128;
  font-size: clamp(3.4rem, 10.5vw, 11.5rem); line-height: 0.84; letter-spacing: -0.01em; text-transform: uppercase;
  color: var(--bone); text-shadow: 0 4px 30px oklch(12% 0.05 255 / 0.6);
}
.poster__w { display: inline-block; }
.poster__w--2 { color: var(--accent); }
.poster__bill { margin: 0.9em 0 0; font: 700 clamp(0.9rem, 1.5vw, 1.25rem)/1.2 var(--font-display); font-variation-settings: "wdth" 112; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone); }
.poster__bill span { color: var(--accent); margin: 0 0.6em; font-size: 0.8em; }
.poster__foot { margin: 0.9em 0 0; font: italic 500 clamp(1.05rem, 1.5vw, 1.3rem)/1.4 var(--font-text); color: var(--bone); text-shadow: 0 1px 12px oklch(12% 0.05 255 / 0.9); }
.placeholder-note {
  position: absolute; right: 28px; bottom: 24px; margin: 0; max-width: 34ch; text-align: right;
  font: 500 0.78rem/1.4 var(--font-display); letter-spacing: 0.04em; color: var(--bone);
  background: oklch(14% 0.03 255 / 0.86); padding: 6px 10px; border-radius: 2px;
}

/* get involved: classifieds travel sideways */
.involved__stage { height: 100vh; height: 100lvh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding-top: var(--head-h); box-sizing: border-box; }
.involved__title {
  margin: 0 0 clamp(28px, 5vh, 52px); padding: 0 var(--gutter); max-width: 20ch;
  font-family: var(--font-display); font-weight: 820; font-variation-settings: "wdth" 78;
  font-size: clamp(2.4rem, 5.4vw, 5rem); line-height: 0.95; color: var(--ink); text-wrap: balance;
}
.ads { display: flex; width: max-content; padding: 0 var(--gutter); border-top: 3px double var(--news-rule); border-bottom: 1px solid var(--news-rule); }
.ad { width: clamp(250px, 26vw, 360px); padding: 22px 28px 26px; border-left: 1px solid var(--news-rule); display: flex; flex-direction: column; gap: 12px; }
.ad:first-child { border-left: 0; padding-left: 0; }
.ad--wide { width: clamp(290px, 32vw, 440px); }
.ad__h { margin: 0; font: 860 clamp(1.7rem, 2.5vw, 2.3rem)/0.95 var(--font-display); font-variation-settings: "wdth" 68; text-transform: uppercase; letter-spacing: 0.005em; }
.ad p { margin: 0; font-size: 1.08rem; line-height: 1.55; flex: 1; text-wrap: pretty; }
.ad--note .ad__h { color: var(--accent-deep); }

/* forms */
.helpform { padding: clamp(40px, 8vh, 96px) var(--gutter) clamp(96px, 14vh, 160px); }
.form { max-width: 720px; margin: 0 auto; }
.form__title { margin: 0 0 10px; font: 820 clamp(2rem, 4vw, 3.2rem)/0.98 var(--font-display); font-variation-settings: "wdth" 80; color: var(--ink); }
.form__lede { margin: 0 0 26px; font-size: 1.12rem; color: var(--ink-soft); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field__label { font: 700 0.75rem/1 var(--font-display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.field input {
  font: 400 1.06rem/1.3 var(--font-text); color: var(--ink); background: oklch(98.5% 0.006 95);
  border: 1px solid oklch(36% 0.034 160 / 0.55); border-radius: 3px; padding: 0.78em 0.9em; min-height: 48px; box-sizing: border-box; width: 100%;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.field input::placeholder { color: oklch(50% 0.02 160); }
.field input:hover { border-color: var(--ink-soft); }
.field input:focus-visible { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px oklch(71% 0.155 40 / 0.55); }
/* invalid: the border doubles in weight as well as changing colour, and the message says what to fix */
.field input[aria-invalid="true"] { border-color: var(--accent-deep); box-shadow: inset 0 0 0 1px var(--accent-deep); }
.field input[aria-invalid="true"]:focus-visible { box-shadow: inset 0 0 0 1px var(--accent-deep), 0 0 0 3px oklch(71% 0.155 40 / 0.55); }
.field__msg { margin: 0; font: 500 0.95rem/1.4 var(--font-text); color: var(--accent-deep); text-wrap: pretty; }
.field__msg:empty { display: none; }
.reach { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.reach__legend { padding: 0; margin: 0 0 12px; font: 600 1.04rem/1.35 var(--font-text); color: var(--ink); }
.reach__legend span { font-weight: 400; color: var(--ink-soft); }
.reach .field { margin-bottom: 0; }
.reach .form__row { gap: 16px; } /* stays when the row stacks on a phone */
.reach > .field__msg { margin-top: 8px; }
.checks { border: 0; margin: 4px 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.checks legend { margin-bottom: 12px; float: left; width: 100%; }
.checks label { display: inline-flex; align-items: center; gap: 9px; font-size: 1.04rem; cursor: pointer; min-height: 32px; }
/* the page is dark-scheme for its night; these boxes sit on paper, so they draw light */
.checks input { width: 20px; height: 20px; accent-color: var(--forest); color-scheme: light; margin: 0; }
@media (pointer: coarse) { .checks label { min-height: 44px; } }
.form__status { min-height: 0; margin: 12px 0 0; font: italic 500 1rem/1.45 var(--font-text); color: var(--accent-deep); }
/* "not connected" is information, not an error: upright ink under a typed rule */
.form__status[data-tone="note"] { margin-top: 18px; padding-top: 12px; border-top: 1px dashed oklch(36% 0.034 160 / 0.45); font-style: normal; color: var(--ink); }

/* first light */
.firstlight__stage { height: 100vh; height: 100lvh; }
.close { position: absolute; left: 0; right: 0; top: calc(var(--head-h) + 6vh); padding: 0 var(--gutter); text-align: center; }
.close__title { margin: 0; font: 500 clamp(2.3rem, 5.4vw, 5rem)/1.04 var(--font-text); letter-spacing: -0.015em; color: var(--bone); text-shadow: 0 2px 26px oklch(22% 0.06 260 / 0.55); text-wrap: balance; }
.close__sub { margin: 0.5em 0 0; font: italic 400 clamp(1.1rem, 1.8vw, 1.5rem)/1.4 var(--font-text); color: var(--bone); text-shadow: 0 1px 14px oklch(22% 0.06 260 / 0.7); }
.close__actions { margin-top: 26px; display: flex; gap: 26px; justify-content: center; align-items: center; flex-wrap: wrap; }
.close .textlink--bone { font-size: 1.18rem; font-weight: 720; text-shadow: 0 1px 12px oklch(22% 0.06 260 / 0.8); }

/* the reply card, on the dawn land */
.reply { min-height: 100vh; display: grid; align-items: center; padding: calc(var(--head-h) + 6vh) 0 12vh; box-sizing: border-box; }
.card {
  width: min(560px, calc(100% - 2 * var(--gutter))); margin: 0 auto; box-sizing: border-box;
  padding: clamp(28px, 4vw, 44px); border-radius: 3px; color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, oklch(30% 0.02 95 / 0.06) 0.8px, transparent 1.2px) 0 0 / 5px 5px,
    var(--news);
  box-shadow: var(--shadow-paper);
}
.foot {
  position: relative; z-index: 3; padding: 22px var(--gutter) 26px; /* outside <main> now, so it stacks above the canvases itself */ display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; align-items: center;
  background: oklch(20% 0.04 160 / 0.94); color: var(--bone-soft); border-top: 1px solid oklch(96% 0.013 95 / 0.18);
}
.foot p { margin: 0; }
.foot__name { display: inline-flex; align-items: center; gap: 10px; font: 700 0.82rem/1 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone); }
.foot__name .iai { color: var(--sage); }
.foot__small { font-size: 0.82rem; max-width: 60ch; }

/* ----------------------------------------------------------- phones -- */
@media (max-width: 860px) {
  .head { grid-template-columns: auto 1fr auto; }
  .head__now { justify-self: center; font-size: 0.75rem; letter-spacing: 0.14em; }
  .head__now .head__sep, .head__now .head__chapter { display: none; }
  .problem__body, .what__cols { grid-template-columns: 1fr; }
  .what__col--2 { margin-top: 0; }
  .flow__line { display: none; }
  .flow__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .pillars__list { grid-template-columns: 1fr; gap: 22px; }
  .pillars__list li { border-left: 0; padding-left: 0; }
}
@media (max-width: 560px) {
  .head { gap: 10px; }
  .head__name { display: none; }
  .head__now { display: none; }
  .head__right { gap: 12px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .marquee { --name-size: clamp(2.4rem, 12.2vw, 4.4rem); }
  /* on a phone the tagline crosses busy rock: print it on a pasted label */
  .marquee__kicker { letter-spacing: 0.18em; font-size: 0.8rem; color: var(--ink); background: var(--news); padding: 7px 10px 6px; border-radius: 1px; text-shadow: none; box-shadow: 0 6px 14px -8px oklch(14% 0.04 250 / 0.6); }
  .close__sub { font-size: 1.5rem; line-height: 1.3; }
  .poster { inset: calc(var(--head-h) + 10px) 10px 10px; }
  .poster__title { font-variation-settings: "wdth" 110; }
  .poster__w { display: block; }
  .placeholder-note { left: 20px; right: 20px; text-align: left; bottom: 18px; }
  .ad { width: 78vw; padding: 18px 20px 22px; }
  .lamplight { padding-bottom: 38vh; }
}
@media (max-width: 380px) {
  .btn--small { font-size: 0.75rem; padding: 0.7em 0.8em; }
}

/* reduced motion: fewer and gentler, not zero */
@media (prefers-reduced-motion: reduce) {
  .graph.is-live .graph__house.is-on { animation: none; }
  .flow__line path { transition: none; clip-path: none; }
  .flow__steps li { transition: opacity 200ms linear; transform: none; }
}
