/* Fiki front door. Night shell for discovery, paper for reading (after Atlas V2 and Ink & Signal).
   Colour is never the only signal: every status is a word and a shape as well. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-opsz.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-opsz-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #0E1012;
  --night-2: #16191C;
  --night-3: #1F2327;
  --night-line: #2D3338;
  --on-night: #EEF1F3;
  --on-night-2: #A3ABB3;
  --paper: #F4EFE4;
  --paper-2: #EAE3D3;
  --paper-line: #D3C9B4;
  --ink: #15171A;
  --ink-2: #4A4F55;
  --copper: #E3A783;
  --copper-ink: #8C4F2E;
  --sage: #84C6B3;
  --sage-ink: #2F6156;
  --midnight-ink: #243746;
  --amber-ink: #7A5118;
  --error: #FF9A8F;
  --error-ink: #A8231A;
  --serif: "Fraunces", "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--night);
  color: var(--on-night);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 420; line-height: 1.08; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; border-radius: 2px; }
.on-paper :focus-visible, .tick :focus-visible, .doc-body :focus-visible, .fiki :focus-visible, .partners :focus-visible { outline-color: var(--midnight-ink); }

html:not(.js) .js-only { display: none !important; }
html.js .no-js-only { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-doc { max-width: 48rem; }
.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 20; background: var(--paper); color: var(--ink); padding: 0.75rem 1rem; border-radius: 6px; }
.skip:focus { top: 0.75rem; }

.eyebrow { font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper); margin: 0 0 1.1rem; font-weight: 600; }
.eyebrow-ink { color: var(--copper-ink); }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.02em; margin: 0; flex: none; white-space: nowrap; }
.wordmark, .wordmark a { text-decoration: none; }
a.wordmark { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Buttons: one family. They step up on hover and press down on click. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.875rem; padding: 0.7rem 1.25rem;
  border: 1.5px solid transparent; border-radius: 6px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms, border-color 160ms, color 160ms;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 2.75rem; padding: 0.5rem 0.9rem; font-size: 0.9375rem; }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: #fff; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--on-night); border-color: var(--night-line); }
.btn-ghost:hover { border-color: var(--on-night-2); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--paper-line); }
.btn-quiet:hover { border-color: var(--ink-2); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* Shown only in the private design preview */
.preview-flag { margin: 0; padding: 0.5rem var(--gutter); background: var(--copper); color: var(--ink); font-size: 0.875rem; font-weight: 600; text-align: center; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: rgb(14 16 18 / 0.92); border-bottom: 1px solid var(--night-line); }
@supports (backdrop-filter: blur(8px)) { .top { background: rgb(14 16 18 / 0.78); backdrop-filter: blur(10px); } }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 3.75rem; gap: 1rem; }
.top-nav { display: flex; align-items: center; gap: clamp(0.75rem, 3vw, 1.75rem); font-size: 0.9375rem; }
.top-nav a:not(.btn) { color: var(--on-night-2); text-decoration: none; padding: 0.75rem 0; }
.top-nav a:not(.btn):hover { color: var(--on-night); text-decoration: underline; }
/* Coming soon: a small status beside the wordmark, on every page and every width. */
.top-brand { display: flex; align-items: center; gap: 0.6rem; margin: 0; flex: none; }
.soon { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.55rem; border: 1px solid var(--copper); border-radius: 999px; color: var(--copper); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.soon::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: currentColor; }
@media (prefers-reduced-motion: no-preference) { .soon::before { animation: soon 2400ms ease-in-out infinite; } @keyframes soon { 50% { opacity: 0.25; } } }
.top-nav .btn { white-space: nowrap; }
@media (max-width: 34rem) { .top-quiet { display: none; } .top-row { gap: 0.5rem; } }
@media (max-width: 24rem) { .top-brand { gap: 0.4rem; } .soon { font-size: 0.625rem; letter-spacing: 0.05em; padding: 0.15rem 0.45rem; } .soon::before { display: none; } .top-nav .btn { padding-inline: 0.75rem; } }
/* The invitation while the sign-up list is closed: an ordinary email, described as exactly that. */
.invite-closed { max-width: 34rem; margin: 0 0 1.5rem; }
.invite-closed p { margin: 0; }
.invite-small { margin-top: 0.75rem !important; font-size: 0.875rem; line-height: 1.5; opacity: 0.8; }
.invite-lede { max-width: 34rem; margin: 0 0 1.25rem; }
/* On the paper-coloured 1859 page the same invitation is ink on paper. */
.invite .invite-mail { background: var(--ink); color: var(--paper); }
.invite .invite-small, .invite .closed-note { color: var(--ink); }
.signup-promise { font-size: 0.875rem; margin: 0.6rem 0 0.3rem; max-width: 34rem; }

/* Hero: one sentence on a ruled night sky. The rules echo the latitude lines in Carrington's drawing. */
.hero { position: relative; min-height: calc(100svh - 3.75rem); display: grid; align-items: center; overflow: hidden; padding-block: clamp(2.5rem, 7vh, 5rem); }
.hero-rules { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--night-line); pointer-events: none; }
.hero-rules text { fill: #5A636C; font-family: var(--serif); }
.hero-inner { position: relative; }
.hero h1 { font-size: clamp(2.75rem, 8.2vw, 6.5rem); font-weight: 380; letter-spacing: -0.03em; line-height: 0.98; max-width: 13ch; }
.hero-lede { max-width: 34rem; margin: 1.5rem 0 0; color: var(--on-night-2); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); }
.specimen { margin-top: clamp(2rem, 5vh, 3.5rem); padding-top: 1.5rem; border-top: 1px solid var(--night-line); max-width: 58rem; }
.specimen-hint { font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper); font-weight: 600; margin: 0 0 0.9rem; }
.sentence { font-family: var(--serif); font-style: italic; font-weight: 340; font-size: clamp(1.5rem, 3.3vw, 2.5rem); line-height: 1.42; letter-spacing: -0.01em; margin: 0; color: var(--on-night); }
.pull {
  color: var(--on-night); text-decoration: none; cursor: pointer;
  background: linear-gradient(var(--copper), var(--copper)) 0 100% / 100% 2px no-repeat;
  padding-bottom: 0.08em;
  transition: background-size 220ms var(--ease), color 160ms;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.pull:hover, .pull:focus-visible { background-size: 100% 0.36em; color: #fff; }
.pull.is-pulled { background-image: linear-gradient(var(--sage), var(--sage)); }
.hero-aside { margin: 1.75rem 0 0; font-size: 0.9375rem; color: var(--on-night-2); }
.hero-aside a { padding-block: 0.75rem; display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1, .js .hero-lede, .js .specimen, .js .hero-aside { animation: rise 700ms var(--ease) both; }
  .js .hero-lede { animation-delay: 90ms; }
  .js .specimen { animation-delay: 220ms; }
  .js .hero-aside { animation-delay: 320ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* Stage: the Tick on paper beside the growing map */
.stage { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--night-line); background: var(--night-2); }
.js .stage:not(.is-open) { display: none; }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-bottom: 1.5rem; }
.stage-title { font-size: 1.375rem; }
.trail { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 0.2rem; margin: 0; padding: 0; flex: 1 1 14rem; font-size: 0.875rem; color: var(--on-night-2); }
.trail li { display: flex; align-items: center; }
.trail li + li::before { content: ""; width: 1.1rem; height: 1.5px; background: var(--copper); margin-inline: 0.2rem; }
.trail a { text-decoration: none; padding: 0.7rem 0.3rem; }
.trail a:hover { color: var(--on-night); text-decoration: underline; }
.trail [aria-current] { color: var(--on-night); font-weight: 600; }
.stage-tools { display: flex; gap: 0.5rem; margin-left: auto; }
.stage-grid { display: grid; gap: 1.25rem; }
@media (min-width: 60rem) {
  .js .stage-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
  .js .stage-map { position: sticky; top: 5rem; }
}
@media (max-width: 59.99rem) {
  /* On a phone the first thing after a pull is the card itself. The map follows it. */
  .stage { padding-top: 1.25rem; }
  .stage-bar { margin-bottom: 0.5rem; gap: 0.25rem 0.75rem; }
  .stage-title { display: none; }
  .js .stage-map { order: 2; margin-top: 0.5rem; }
}
.bridge-panel { margin: 0 0 0.9rem; min-height: 1.5em; }
.bridge-panel:focus { outline: none; }
.pulled { margin: 0; font-size: 0.9375rem; color: var(--on-night-2); }
/* Connection Bridge: the kind of link, why it holds, what not to conclude, the evidence */
.bridge { font-size: 0.9375rem; }
.bridge p { margin: 0 0 0.45rem; }
.bridge-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.9rem; }
.bridge-ends { font-size: 0.8125rem; color: var(--ink-2); }
.bridge-text { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.45; }
.bridge-not { padding-left: 0.75rem; border-left: 2px solid currentColor; }
.bridge .claim-foot { margin: 0; }
.rel { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.02em; white-space: nowrap; }
.rel i { width: 1.6rem; height: 0; border-top: 2.5px solid currentColor; flex: none; }
.rel-phenomenon i { border-top-style: dashed; }
.rel-parallel i { border-top-style: dotted; border-top-width: 3px; }
/* in the stage, on the night ground */
.bridge-panel.has-bridge { border-left: 3px solid var(--copper); padding: 0.1rem 0 0.1rem 0.9rem; max-width: 46rem; }
.bridge-panel .bridge { margin-top: 0.45rem; color: var(--on-night); }
.bridge-panel .bridge-ends, .bridge-panel .cites a, .bridge-panel .cites span, .links .bridge-ends, .links .cites a, .links .cites span { color: var(--on-night-2); }
.bridge-panel .rel, .links .rel { color: var(--copper); }
.bridge-panel .rel-indirect, .links .rel-indirect { color: var(--sage); }
.bridge-panel .bridge-not, .links .bridge-not { color: var(--on-night-2); border-left-color: var(--sage); }
.bridge-panel .bridge-not strong, .links .bridge-not strong { color: var(--on-night); }
/* under each thread when scripting is off; hidden while there is a panel to show it in */
.thread-item .bridge { padding: 0.6rem 0 0.8rem 2.65rem; color: var(--ink-2); }
.thread-item .rel { color: var(--copper-ink); }
.thread-item .rel-indirect { color: var(--sage-ink); }
.js .thread-item .bridge { display: none; }
.pulled q { font-family: var(--serif); font-style: italic; font-size: 1.125rem; color: var(--on-night); quotes: "“" "”"; background: linear-gradient(var(--copper), var(--copper)) 0 100% / 100% 2px no-repeat; padding-bottom: 0.1em; }
.term-note { font-size: 0.9375rem; color: var(--on-night-2); margin: 0 0 0.75rem; }
.term-note strong, .reveal-caption strong, .reveal-atlas strong { color: var(--copper); font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.12em; }
.map-note a { color: var(--on-night-2); display: inline-block; padding-block: 0.6rem; }
.map-note a:hover { color: var(--on-night); }

.tick {
  background: var(--paper); color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  border-radius: 3px; padding: clamp(1.25rem, 3.5vw, 2.25rem);
  box-shadow: 0 1px 0 #fff inset, 0 18px 40px rgb(0 0 0 / 0.35);
}
.tick + .tick { margin-top: 1.25rem; }
.js .tick:not(.is-open) { display: none; }
.tick:focus { outline: none; }
.tick-kicker { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; font-size: 0.8125rem; color: var(--ink-2); margin: 0 0 0.75rem; }
.tick-kind { font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper-ink); }
.tick h3 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 1.25rem; }
@media (prefers-reduced-motion: no-preference) {
  .js .tick.is-open { animation: lay 420ms var(--ease) both; }
  @keyframes lay { from { opacity: 0; transform: translateY(10px) rotate(-0.4deg); } }
}

.claims { list-style: none; margin: 0; padding: 0; }
.claim { padding: 1rem 0; border-top: 1px solid var(--paper-line); }
.claim > p:first-child { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.45; margin: 0 0 0.6rem; }
.claim-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.9rem; margin: 0; font-size: 0.8125rem; color: var(--ink-2); }
.cites a { color: var(--ink-2); display: inline-block; padding-block: 0.3rem; }
.cites a:hover { color: var(--ink); }

/* Status: word + shape + colour */
.status { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.02em; white-space: nowrap; }
.status i { width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.status-record { color: var(--sage-ink); }
.status-record i { background: currentColor; }
.status-reported { color: var(--midnight-ink); }
.status-reported i { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.status-interpretation { color: var(--amber-ink); }
.status-interpretation i { border-radius: 0; transform: rotate(45deg) scale(0.86); background: currentColor; }
.status-differ { color: var(--copper-ink); }
.status-differ i { border-radius: 0; background: linear-gradient(135deg, currentColor 44%, transparent 44% 56%, currentColor 56%); border: 0; }
.status-open { color: var(--ink); }
.status-untraced { color: var(--ink-2); }
.status-untraced i { border-style: dashed; }

/* Threads: the way onward */
.threads { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 2px solid var(--ink); display: grid; gap: 0.6rem; }
.threads-label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper-ink); margin: 0 0 0.2rem; }
.thread-item { border-bottom: 1px solid var(--paper-line); }
.thread {
  display: flex; align-items: center; gap: 0.9rem; min-height: 3.25rem; padding: 0.6rem 0.9rem 0.6rem 0;
  font-family: var(--serif); font-style: italic; font-size: 1.25rem; line-height: 1.25; color: var(--ink); text-decoration: none;
}
.thread::before { content: ""; flex: none; width: 1.75rem; height: 2px; background: var(--copper-ink); transition: width 220ms var(--ease); }
.thread::after { content: "→"; margin-left: auto; font-style: normal; color: var(--copper-ink); transition: transform 220ms var(--ease); }
.thread:hover::before, .thread:focus-visible::before { width: 3.25rem; }
.thread:hover::after, .thread:focus-visible::after { transform: translateX(4px); }
.thread.is-visited span::after { content: " (visited)"; font: 400 0.8125rem var(--sans); color: var(--ink-2); }
.threads-final { border-top: 2px solid var(--ink); display: block; }

/* The drawing */
.drawing { margin: 0 0 0.5rem; }
.drawing-plate { position: relative; background: #fbf8f1; border: 1px solid var(--paper-line); padding: 0.5rem; }
.drawing-plate img { width: 100%; height: auto; mix-blend-mode: multiply; }
.flare { position: absolute; width: 5.2%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, #fff 0 22%, #ffd9a8 38%, rgb(227 167 131 / 0.55) 55%, transparent 72%); }
.flare-a { left: 62.6%; top: 64.6%; }
.flare-b { left: 66.9%; top: 59%; }
.is-playing .flare { animation: flare 5s linear both; }
.is-playing .flare-a { --dx: 233%; --dy: 141%; }
.is-playing .flare-b { --dx: 208%; --dy: 151%; }
@keyframes flare {
  0% { opacity: 0; transform: scale(0.3); }
  8% { opacity: 1; transform: scale(1.5); }
  22% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.35); }
}
.drawing-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0.75rem 0 0; }
.drawing-clock { font-family: var(--mono); font-size: 0.9375rem; color: var(--ink-2); }

/* The telegraph tape */
.tape { background: #fbf8f1; border: 1px solid var(--paper-line); border-left: 4px solid var(--copper-ink); padding: 0.75rem 1rem; margin-bottom: 0.5rem; }
.tape dl { margin: 0; display: grid; gap: 0.55rem; }
.tape-line { display: grid; grid-template-columns: 5.6rem 1fr; gap: 0.75rem; align-items: baseline; }
.tape dt { overflow-wrap: normal; font: 700 0.75rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.tape dd { margin: 0; font-family: var(--mono); font-size: 0.9375rem; line-height: 1.5; }
.tape-portland dd { color: var(--midnight-ink); }
@media (prefers-reduced-motion: no-preference) {
  .js .is-open .tape-line { animation: tap 300ms var(--ease) both; animation-delay: calc(var(--i, 0) * 260ms + 300ms); }
  @keyframes tap { from { opacity: 0; transform: translateX(-6px); } }
}

/* Test three stories: tap one, then all three verdicts open */
.weigh-intro { font-family: var(--serif); font-size: 1.125rem; line-height: 1.45; margin-bottom: 0.6rem; }
.weigh-ask { font-weight: 700; margin-bottom: 0.9rem; }
.weigh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.weigh-story {
  display: flex; width: 100%; text-align: left; align-items: center; gap: 0.75rem; min-height: 3.25rem; padding: 0.75rem 1rem;
  font: 500 1.125rem/1.3 var(--serif); color: var(--ink); background: #fbf8f1; border: 1.5px solid var(--paper-line); border-radius: 6px; cursor: pointer;
  transition: transform 160ms var(--ease), border-color 160ms;
}
.weigh-story::before { content: ""; flex: none; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--ink-2); }
.weigh-story:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--ink); }
.weigh-story:active:not(:disabled) { transform: translateY(1px); }
.weigh-story:disabled { cursor: default; color: var(--ink); border-style: dashed; }
.is-answer .weigh-story { border-style: solid; border-color: var(--ink); }
.is-answer .weigh-story::before { background: var(--ink); border-color: var(--ink); }
.is-chosen:not(.is-answer) .weigh-story::before { background: linear-gradient(45deg, transparent 43%, var(--ink-2) 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, var(--ink-2) 43% 57%, transparent 57%); }
.weigh-verdict { padding: 0.6rem 0 0.2rem 1rem; margin-left: 0.45rem; border-left: 2px solid var(--paper-line); font-size: 0.9375rem; }
.weigh-verdict p { margin: 0 0 0.4rem; }
.weigh-result { font-weight: 700; margin: 1rem 0 0; }
.weigh-result:empty { display: none; }
.weigh-moral { font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.3; margin: 0.5rem 0 0; }
.weigh-actions { margin: 1rem 0 0; }
.weigh.is-done .weigh-actions, .weigh.is-done .weigh-ask { display: none; }

/* Chips (used by the vault and the optional after-signup question) */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; width: 100%; height: 100%; }
.chip span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.4rem 0.9rem; border: 1.5px solid var(--paper-line); border-radius: 999px; font-size: 0.9375rem; font-weight: 600; background: #fbf8f1; color: var(--ink); transition: transform 160ms var(--ease), border-color 160ms, background-color 160ms; }
.chip:hover span { border-color: var(--ink-2); transform: translateY(-1px); }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--midnight-ink); outline-offset: 3px; }
.chip-night span { background: transparent; border-color: var(--night-line); color: var(--on-night); }
.chip-night:hover span { border-color: var(--on-night-2); }
.chip-night input:checked + span { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.chip-night input:focus-visible + span { outline-color: var(--copper); }

/* Map */
.map-frame { border: 1px solid var(--night-line); border-radius: 3px; background: var(--night); }
.map { width: 100%; height: auto; display: block; overflow: visible; }
.map text { font-family: var(--sans); font-size: 17px; fill: var(--on-night-2); text-anchor: middle; transition: opacity 300ms; paint-order: stroke; stroke: var(--night); stroke-width: 6px; stroke-linejoin: round; }
@media (max-width: 40rem) { .map text { font-size: 22px; } }
.map-edge { fill: none; stroke: var(--copper); stroke-width: 1.75; stroke-linecap: round; transition: opacity 400ms; }
.edge-start { opacity: 0.55; stroke-width: 1.25; }
/* Three line types: solid for a direct link, dashed for the same kind of event, dotted for a thematic parallel. */
.kind-phenomenon .map-edge { stroke-dasharray: 9 7; }
.kind-parallel .map-edge { stroke: var(--sage); stroke-width: 2.75; stroke-dasharray: 0.1 8; }
.edge-hit { fill: none; stroke: transparent; stroke-width: 26; pointer-events: stroke; cursor: pointer; outline: none; }
.map-link:hover .map-edge, .edge-hit:focus-visible ~ .map-edge, .map-link:has(.edge-hit:focus-visible) .map-edge { stroke: #fff; stroke-width: 3; }
.map .edge-label { display: none; font-family: var(--serif); font-style: italic; font-size: 13px; fill: var(--copper); pointer-events: none; }
.map .is-indirect .edge-label { fill: var(--sage); }
@media (min-width: 40rem) { .map-frame-large .edge-label { display: block; } }
@media (prefers-reduced-motion: no-preference) { .map-link.is-fresh.is-indirect { animation: rise 600ms var(--ease) both; } }
.map-key { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; margin: 0.6rem 0 0; font-size: 0.8125rem; color: var(--on-night-2); }
.key { display: inline-flex; align-items: center; gap: 0.5rem; }
.key::before { content: ""; width: 1.6rem; border-top: 2px solid var(--copper); }
.key-phenomenon::before { border-top-style: dashed; }
.key-parallel::before { border-top: 3px dotted var(--sage); }
.map-edge.is-new { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 900ms var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.map-node { transition: transform 900ms var(--ease), opacity 400ms; }
.map-node a { cursor: pointer; text-decoration: none; }
.map-node circle.hit { fill: transparent; pointer-events: all; }
.map-node circle.dot { fill: var(--copper); stroke: var(--night); stroke-width: 2; }
.map-node circle.halo { fill: none; stroke: var(--copper); stroke-width: 1; opacity: 0.35; }
.map-node.is-current circle.dot { fill: #fff; }
.map-node.is-current text { fill: var(--on-night); font-weight: 700; }
.map-node.is-final circle.dot { fill: var(--sage); }
.map-node.is-left circle.dot { fill: var(--night); stroke: var(--on-night-2); stroke-dasharray: 3 3; stroke-width: 1.5; }
.map-node.is-left circle.halo { display: none; }
.map-node a:hover text, .map-node a:focus-visible text { fill: #fff; text-decoration: underline; }
.map-origin { fill: var(--paper); }
.map-axis { opacity: 0; transition: opacity 500ms; }
.map-axis line { stroke: var(--night-line); }
.map-axis text { fill: #7A838C; font-family: var(--serif); font-style: italic; }
.map.is-time .map-axis { opacity: 1; }
.map.is-time .map-origin-group { opacity: 0; }
.map.is-time .map-edge { opacity: 0.4; stroke-width: 1.25; }
.map-origin-group { transition: opacity 400ms; }
@media (prefers-reduced-motion: no-preference) {
  .map-node.is-current circle.halo { animation: halo 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes halo { 50% { transform: scale(1.5); opacity: 0.1; } }
}
.map-note { font-size: 0.875rem; color: var(--on-night-2); margin: 0.75rem 0 0; }

/* ---------- The Discovery Theatre ----------
   One fixed stage. The discovery changes inside it; the stage does not grow or move.
   Reading scrolls in its own pane, so the threads onward are never at the bottom of a long card. */
.js .stage { padding: 0; }
.js .theatre {
  display: grid; gap: 0.6rem; padding-block: 0.6rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  height: calc(100svh - var(--top-h, 3.75rem)); min-height: 22rem;
  grid-template: "bar" auto "main" minmax(0, 1fr) "tray" auto / minmax(0, 1fr);
}
.theatre-bar { grid-area: bar; display: flex; align-items: center; gap: 0.5rem 1rem; min-width: 0; }
.js .theatre .trail { flex: 1 1 auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; min-width: 0; }
.js .theatre .trail::-webkit-scrollbar { display: none; }
.view-switch { display: inline-flex; border: 1.5px solid var(--night-line); border-radius: 6px; padding: 2px; }
.view-switch .seg { min-height: 2.75rem; padding: 0.3rem 0.8rem; }
.theatre .btn, .theatre .seg { white-space: nowrap; overflow-wrap: normal; flex: none; }
.theatre .tray-toggle { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block; }
.only-narrow { display: none; }
@media (max-width: 24rem) { .only-wide { display: none; } .only-narrow { display: inline; } }
.js .theatre-read { grid-area: main; overflow-y: auto; min-height: 0; padding-right: 0.25rem; scroll-behavior: auto; }
.theatre-read:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }
.js .theatre-read .tick { box-shadow: 0 1px 0 #fff inset; }
/* With scripting the tray carries the threads; the card's own list is the no-script fallback. */
.js .tick .threads { display: none; }
.theatre-map { grid-area: main; display: none; flex-direction: column; min-height: 0; }
.js .theatre.show-map .theatre-read { display: none; }
.js .theatre.show-map .theatre-map { display: flex; }
.theatre-map .map-frame { flex: 1 1 auto; min-height: 0; display: flex; }
.theatre-map .map { width: 100%; height: 100%; }
.theatre-map .map-key, .theatre-map .map-note { margin: 0.4rem 0 0; flex: none; }
.map-node.is-left a { pointer-events: none; }
.pane-end { margin: 1rem 0 0.25rem; }

.tray { grid-area: tray; display: grid; gap: 0.5rem; border-top: 1px solid var(--night-line); padding-top: 0.6rem; min-width: 0; }
.tray-status { margin: 0; font-size: 0.8125rem; color: var(--on-night-2); font-variant-numeric: tabular-nums; }
.tray-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; border-left: 3px solid var(--sage); padding-left: 0.75rem; }
.tray-notice p { margin: 0; font-size: 0.9375rem; flex: 1 1 16rem; }
.tray.is-complete .tray-notice { border-left-color: var(--copper); }
.tray-threads { display: none; gap: 0.4rem; max-height: 44svh; overflow-y: auto; }
.tray.is-open .tray-threads { display: grid; }
.tray-thread {
  display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--night-line); border-radius: 6px; text-decoration: none; color: var(--on-night);
  transition: transform 160ms var(--ease), border-color 160ms, background-color 160ms;
}
.tray-thread:hover { transform: translateY(-2px); border-color: var(--on-night-2); }
.tray-thread:active { transform: translateY(1px); }
.tt-label { font-family: var(--serif); font-style: italic; font-size: 1.0625rem; line-height: 1.25; flex: 1 1 auto; min-width: 0; }
.tt-state { flex: none; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.4rem; }
.tt-state::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; border: 2px solid currentColor; }
.tray-thread.is-new { border-color: var(--copper); }
.is-new .tt-state { color: var(--copper); }
.is-new .tt-state::before { background: currentColor; }
.is-link .tt-state { color: var(--sage); }
.is-link .tt-state::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.is-done .tt-label, .is-done .tt-state { color: var(--on-night-2); }
.is-done .tt-state::before { border-style: dashed; }
.tray-empty { margin: 0; font-size: 0.9375rem; color: var(--on-night-2); }
.tray-actions { display: flex; gap: 0.5rem; align-items: center; }
.tray-toggle { flex: 1 1 auto; border-color: var(--copper); }
.tray-actions .btn[disabled] { opacity: 0.4; cursor: default; }
@media (max-width: 26rem) { .tray-actions .btn { padding-inline: 0.6rem; font-size: 0.875rem; } }

@media (min-width: 60rem) {
  .js .theatre {
    height: min(calc(100svh - var(--top-h, 3.75rem)), 54rem); gap: 0.75rem 2rem; padding-block: 1rem;
    grid-template: "bar bar" auto "main map" minmax(0, 1fr) "main tray" auto / minmax(0, 1.08fr) minmax(0, 1fr);
  }
  .view-switch, .theatre .tray-toggle, .pane-end { display: none; }
  .theatre-map { grid-area: map; display: flex; }
  .js .theatre.show-map .theatre-read { display: block; }
  .tray-threads { display: grid; max-height: none; overflow: visible; }
  .tray-actions { justify-content: space-between; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .bridge-panel.has-bridge { animation: rise 420ms var(--ease) both; }
  .js .theatre-read .tick.is-open { animation-delay: 140ms; }
}

/* Reveal */
.reveal { padding-block: clamp(4rem, 10vw, 7rem); border-top: 1px solid var(--night-line); }
.reveal:focus { outline: none; }
.reveal h2 { font-size: clamp(2.5rem, 7.5vw, 5.5rem); font-weight: 380; letter-spacing: -0.03em; }
.reveal-span { font-family: var(--serif); font-style: italic; font-weight: 340; font-size: clamp(1.375rem, 2.6vw, 2rem); line-height: 1.2; color: var(--copper); margin: 1rem 0 0; }
.reveal-milestone { color: var(--on-night); margin: 0 0 1rem; max-width: 34rem; }
.reveal-sum { max-width: 40rem; margin: 1.5rem 0 2rem; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--on-night-2); }
.reveal-caption { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--on-night); margin: 0 0 0.9rem; min-height: 3.2em; }
.reveal-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-top: 0.9rem; }
.reveal-controls .map-key { margin: 0; }
.reveal-links { margin-top: 2rem; }
.reveal-links h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.reveal-links-note { font-size: 0.9375rem; color: var(--on-night-2); margin-bottom: 1rem; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: link; }
.links li { padding: 0.9rem 0 0.9rem 0.9rem; border-top: 1px solid var(--night-line); border-left: 3px solid transparent; }
.links li:focus { outline: none; }
.links li.is-selected, .links li:focus-visible { border-left-color: var(--copper); background: var(--night-2); }
.links .bridge-ends { font-size: 0.875rem; color: var(--on-night); font-weight: 600; }
.reveal-atlas { color: var(--on-night-2); margin: clamp(2rem, 5vw, 3rem) 0 0; max-width: 30rem; }
.reveal-invite { margin: 0 0 1.5rem; max-width: 34rem; }
.reveal-invite-h { font-weight: 700; margin: 0 0 0.6rem; }
.map-switch { display: inline-flex; border: 1.5px solid var(--night-line); border-radius: 6px; padding: 3px; }
.seg { min-height: 2.75rem; padding: 0.4rem 1rem; border: 0; border-radius: 4px; background: transparent; color: var(--on-night-2); font: 600 0.9375rem var(--sans); cursor: pointer; transition: background-color 160ms, color 160ms; }
.seg:hover { color: var(--on-night); }
.seg[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.map-frame-large { padding: clamp(0.5rem, 2vw, 1.5rem); }
.reveal-big { font-family: var(--serif); font-style: italic; font-weight: 340; font-size: clamp(2rem, 5.5vw, 4rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0.4rem 0 1.75rem; color: var(--copper); }
.reveal-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

@media (min-width: 68rem) {
  .reveal-grid { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); column-gap: 3.5rem; align-items: start; }
  .reveal-head { grid-column: 1; grid-row: 1; }
  .reveal-foot { grid-column: 1; grid-row: 2; }
  .reveal-map { grid-column: 2; grid-row: 1 / span 2; }
  .reveal-links { grid-column: 1 / -1; grid-row: 3; max-width: 52rem; }
  .reveal h2 { font-size: clamp(2.75rem, 4.7vw, 4.5rem); }
  .reveal-big { font-size: clamp(2rem, 3.2vw, 3rem); }
  .reveal-atlas { margin-top: 0.5rem; }
}

/* What Fiki is: a paper section */
.fiki, .partners, .invite { background: var(--paper); color: var(--ink); }
.invite { padding-block: clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--paper-line); }
.invite-grid { display: grid; gap: 1.5rem; }
@media (min-width: 60rem) { .invite-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4rem; align-items: center; } }
.invite h2 { font-size: clamp(2rem, 5vw, 3.25rem); }
.invite-lede { color: var(--ink-2); font-size: 1.125rem; margin: 1rem 0 0; }
.signup { display: grid; gap: 0.75rem; }
.signup-row { display: grid; gap: 0.5rem; grid-template-columns: 1fr; }
@media (min-width: 30rem) { .signup-row { grid-template-columns: minmax(0, 1fr) auto; } .signup-label { grid-column: 1 / -1; } }
.signup-label { font-weight: 600; font-size: 0.9375rem; }
.signup .check { font-size: 0.875rem; }
.invite .signup input[type="email"] { color: var(--ink); background: #fff; border-color: #9A917D; }
.invite .signup input:focus-visible { outline-color: var(--midnight-ink); }
.invite .signup .check input { accent-color: var(--ink); }
.invite .signup .err { color: var(--error-ink); }
.invite .signup .btn { background: var(--ink); color: var(--paper); }
.invite .form-done p, .invite .after-signup p, .invite .form-status { color: var(--ink-2); }
.invite .after-signup .chip span { background: #fbf8f1; border-color: var(--paper-line); color: var(--ink); }
.invite .after-signup .chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.invite .after-signup .btn { color: var(--ink); border-color: var(--paper-line); }
.after-signup { display: grid; gap: 0.6rem; justify-items: start; margin-top: 0.5rem; padding-top: 0.9rem; border-top: 1px solid var(--night-line); }
.invite .after-signup { border-top-color: var(--paper-line); }
.after-signup p { margin: 0; font-size: 0.9375rem; }
.closed-note { border: 1px solid var(--night-line); border-left: 3px solid var(--copper); border-radius: 3px; padding: 1rem 1.15rem; }
.closed-note p { margin: 0; color: var(--on-night); max-width: 34rem; }
.closed-note-paper { border-color: var(--paper-line); border-left-color: var(--copper-ink); background: #fbf8f1; }
.closed-note-paper, .closed-note-paper p { color: var(--ink); }
.later { margin-top: 2.5rem; }
.later h3 { font-family: var(--sans); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper-ink); margin-bottom: 0.75rem; }
.later-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.5rem 2rem; color: var(--ink-2); }
@media (min-width: 52rem) { .later-list { grid-template-columns: repeat(3, 1fr); } }
.later-list strong { color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 1.2em; font-weight: 500; }
.later-note { color: var(--ink-2); max-width: 44rem; margin: 0; }
.later-note a { color: var(--sage-ink); font-weight: 600; }
.fiki { padding-block: clamp(4rem, 9vw, 7rem); }
.fiki h2, .partners h2, .vault h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
.fiki-lede { max-width: 38rem; margin: 1.25rem 0 2.5rem; color: var(--ink-2); font-size: 1.125rem; }
.lexicon { margin: 0; border-top: 2px solid var(--ink); }
.lexicon > div { display: grid; gap: 0.25rem 2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--paper-line); transition: background-color 200ms; }
.lexicon > div:hover { background: var(--paper-2); }
@media (min-width: 44rem) { .lexicon > div { grid-template-columns: 14rem 1fr; align-items: baseline; padding-inline: 0.75rem; margin-inline: -0.75rem; } }
.lexicon dt { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2rem); font-style: italic; }
.lexicon dd { margin: 0; color: var(--ink-2); max-width: 40rem; }
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem 2rem; }
@media (min-width: 44rem) { .legend-list { grid-template-columns: 1fr 1fr; } }
.legend-list li { display: grid; grid-template-columns: 11.5rem 1fr; gap: 0.75rem; align-items: baseline; font-size: 0.9375rem; color: var(--ink-2); }
@media (max-width: 26rem) { .legend-list li { grid-template-columns: 1fr; gap: 0.1rem; } }

/* Vault */
.vault { padding-block: clamp(4rem, 9vw, 7rem); }
.vault-grid { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) { .vault-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 4rem; align-items: start; } .vault-pitch { position: sticky; top: 6rem; } }
.vault-pitch p:not(.eyebrow) { color: var(--on-night-2); max-width: 30rem; }
.vault-pitch h2 { margin-bottom: 1.5rem; }
.vault-fine { font-size: 0.9375rem; border-left: 2px solid var(--copper); padding-left: 0.9rem; }

.card-form { border: 1px solid var(--night-line); border-radius: 3px; background: var(--night-2); padding: clamp(1.25rem, 3.5vw, 2rem); display: grid; gap: 1.25rem; }
.card-form-paper { background: #fbf8f1; border-color: var(--paper-line); margin-block: 1.5rem; }
.field { display: grid; gap: 0.45rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-row { display: grid; gap: 1.25rem; }
@media (min-width: 36rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field > label, .field > legend { font-weight: 600; font-size: 0.9375rem; padding: 0; }
.field > legend { margin-bottom: 0.45rem; }
.optional { font-weight: 400; color: var(--on-night-2); font-size: 0.8125rem; margin-left: 0.35rem; }
.card-form-paper .optional { color: var(--ink-2); }
input[type="text"], input[type="email"], textarea {
  width: 100%; font: inherit; color: var(--on-night); background: var(--night); border: 1.5px solid #4A525A; border-radius: 6px; padding: 0.75rem 0.9rem; min-height: 2.875rem;
}
textarea { resize: vertical; min-height: 7rem; font-family: var(--serif); font-size: 1.1875rem; line-height: 1.4; }
::placeholder { color: #7A838C; opacity: 1; }
.card-form-paper input, .card-form-paper textarea { color: var(--ink); background: #fff; border-color: #9A917D; }
.card-form-paper textarea { font-family: var(--sans); font-size: 1rem; }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--copper); outline-offset: 1px; border-color: transparent; }
.card-form-paper input:focus-visible, .card-form-paper textarea:focus-visible { outline-color: var(--midnight-ink); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.help { font-size: 0.875rem; color: var(--on-night-2); margin: 0; }
.card-form-paper .help { color: var(--ink-2); }
.err { font-size: 0.9375rem; font-weight: 600; color: var(--error); margin: 0; }
.card-form-paper .err { color: var(--error-ink); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; font-size: 0.9375rem; cursor: pointer; padding-block: 0.3rem; }
.check input { width: 1.375rem; height: 1.375rem; margin: 0.1rem 0 0; accent-color: var(--copper); }
.card-form-paper .check input { accent-color: var(--ink); }
.form-rule { border: 0; border-top: 1px solid var(--night-line); margin: 0.25rem 0; width: 100%; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin: 0; }
.form-status { font-size: 0.9375rem; color: var(--on-night-2); }
.card-form-paper .form-status { color: var(--ink-2); }
.trap { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.form-done { display: grid; gap: 0.75rem; }
.form-done h3 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.form-done p { margin: 0; color: var(--on-night-2); }
.card-form-paper .form-done p { color: var(--ink-2); }
.form-done:focus { outline: none; }

/* Partners band */
.partners { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 2px solid var(--ink); }
.partners-grid { display: grid; gap: 1.5rem; }
@media (min-width: 60rem) { .partners-grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: end; } }
.partners p { color: var(--ink-2); max-width: 34rem; }

/* Footer */
.foot { border-top: 1px solid var(--night-line); padding-block: 3rem 2rem; font-size: 0.9375rem; color: var(--on-night-2); }
.foot .wordmark { color: var(--on-night); }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 44rem) { .foot-grid { grid-template-columns: 1fr auto; } }
.foot-line { margin: 0.4rem 0 0; }
.foot-nav { display: grid; gap: 0.1rem; }
@media (min-width: 44rem) { .foot-nav { grid-template-columns: auto auto; column-gap: 2.5rem; } }
.foot-nav a { padding-block: 0.65rem; text-decoration: none; }
.foot-nav a:hover { color: var(--on-night); text-decoration: underline; }
.foot-small { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--night-line); font-size: 0.8125rem; display: flex; flex-wrap: wrap; gap: 0.25rem 2rem; justify-content: space-between; }
.foot-small p { margin: 0; }
.foot-small a { display: inline-block; padding-block: 0.6rem; }

/* Document pages */
.doc-head { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); }
.doc-head h1 { font-size: clamp(2.25rem, 6vw, 4rem); font-weight: 400; letter-spacing: -0.025em; }
.doc-lede { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--on-night-2); margin: 1.5rem 0 0; }
.doc-date { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--on-night-2); }
.doc-status { margin: 1.75rem 0 0; padding: 1rem 1.15rem; border: 1px solid var(--night-line); border-left: 3px solid var(--copper); border-radius: 3px; color: var(--on-night); font-size: 1rem; }
.doc-main { background: linear-gradient(var(--night), var(--night)) top / 100% 100% no-repeat; }
.doc-body { background: var(--paper); color: var(--ink); max-width: none; padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.doc-body > * { max-width: calc(48rem - 2 * var(--gutter)); margin-inline: auto; padding-inline: 0; }
.doc-body section + section { margin-top: 2.75rem; }
.doc-body h2 { font-size: clamp(1.5rem, 3.4vw, 2.125rem); margin-bottom: 0.9rem; scroll-margin-top: 5rem; }
.doc-body h3 { font-family: var(--sans); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper-ink); margin: 1.6rem 0 0.6rem; }
.doc-body ul, .doc-body ol { padding-left: 1.2rem; margin: 0 0 1em; }
.doc-body li { margin-bottom: 0.55rem; }
.doc-body a { color: var(--sage-ink); font-weight: 600; }
.doc-toc { display: flex; flex-wrap: wrap; gap: 0.1rem 1.25rem; padding-bottom: 1.5rem; margin-bottom: 2.5rem; border-bottom: 2px solid var(--ink); font-size: 0.9375rem; }
.doc-toc a { padding-block: 0.6rem; color: var(--ink) !important; font-weight: 500 !important; }
.legend-doc { padding: 0 !important; margin-bottom: 1.25em !important; }
.src-list { padding-left: 1.4rem !important; }
.src-list li { margin-bottom: 1.4rem; padding-left: 0.3rem; }
.src-list p { margin: 0 0 0.25rem; }
.src-cite { font-family: var(--serif); font-size: 1.125rem; line-height: 1.4; }
.src-meta { display: flex; flex-wrap: wrap; gap: 0.1rem 1rem; font-size: 0.875rem; color: var(--ink-2); align-items: baseline; }
.src-meta span { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; }
.src-meta a { padding-block: 0.45rem; display: inline-block; }
.src-access { font-size: 0.9375rem; color: var(--ink-2); }
mark.review { background: #FFE08A; color: #3A2A00; padding: 0.1em 0.4em; border-radius: 3px; font-weight: 700; font-size: 0.9em; }
mark.review::before { content: "Founder review: "; }

/* Plain server pages (confirm, unsubscribe) */
.plain { display: grid; place-items: center; min-height: 100svh; }
.plain-main { max-width: 32rem; padding: 2rem var(--gutter); }
.plain-main h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 1.5rem 0 1rem; }
.plain-main .btn { background: var(--paper); color: var(--ink); margin-bottom: 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .btn:hover, .btn:active, .chip:hover span { transform: none; }
  .is-playing .flare { animation: none; opacity: 1; }
}
