/* zippel.io — one name, four technologies, two readers.
   Paper and ink for people, mono for agents, Zippel blue for what is alive. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}
/* While Archivo loads, Arial stands in at Archivo's size and line metrics, so nothing jumps when it arrives */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 98.2%;
  ascent-override: 89.4%;
  descent-override: 21.4%;
  line-gap-override: 0%;
}

:root {
  --paper: #F6F6F3;
  --ink: #121212;
  /* Every grey is black ink printed on this paper, as a one-colour press would print it (Murray-Davies, in linear
     light): panel 12 %, line 27 %, muted text 89 %. Their warmth comes from the paper alone. tools/check.py checks it. */
  --panel: #E8E8E6;
  --line: #D7D7D4;
  --muted: #5E5E5C;
  --accent: #00A0E3;      /* Zippel blue: the one colour that moves */
  --accent-ink: #00699C;  /* the same blue, dark enough for text */
  --on-accent: #121212;   /* text set on the accent */
  --wm-1: #00A0E3;        /* wordmark colour plates (header, footer, big name) */
  --wm-2: #D4007A;
  --wm-3: #FFEC00;
  --pad: clamp(20px, 4vw, 56px);
  /* One hundredth of the height really shown: the smaller of 100svh and --view (measured by boot.js/app.js).
     Everything sized by the screen's height uses it, so the stage fits where 100svh is taller than the screen. */
  --vh: 1vh;
  --vh: calc(min(100svh, var(--view, 100svh)) / 100);
  /* One type scale for the whole site. Every text has one of these roles, on every page and in every view.
     Titles 820 at width 125; subheads and statements 700 at width 112; leads 450 and reading text 400,
     labels 650, all at width 100; the quoted description 480 at width 106.
     Above 1600 px the whole scale keeps growing with the screen (see the media query below). */
  --t-title: clamp(38px, min(4.4vw, calc(var(--vh) * 8.2)), 72px); /* hero claim, section and wave names, page titles; 4.4vw keeps "Someone builds it." on one line in the half column */
  --t-statement: clamp(24px, 2.6vw, 38px);         /* values, client names, the contact address */
  --t-sub: clamp(20px, 1.5vw, 22px);               /* subheads, years, the quoted description */
  --t-lead: var(--t-sub);                          /* the first sentence of a section: sub size, lighter weight */
  --t-body: 18px;                                  /* all running text */
  --t-label: 15px;                                 /* labels and short notes */
  --t-small: 13px;                                 /* legal links, footer, fine print */
  --t-code: 13px;                                  /* the agents' column */
  --t-code-large: 15px;                            /* agent view and file names */
  /* One measure for running text and every list, so all rules in all sections share one length */
  --measure: calc(var(--t-body) * 35.5);
  /* Space between list entries, and the extra space between a lead and its list */
  --row: 32px;
  --row-lead: 16px;
  --sans: "Archivo", "Archivo Fallback", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
/* Phones: titles a step smaller, so the claim keeps its lines and the name keeps its room */
@media (max-width: 640px) {
  :root { --t-title: clamp(28px, 8.6vw, 38px); }
}
/* Tablets and other one-column screens: titles grow with the width, so the name does not tower over them */
@media (min-width: 641px) and (max-width: 1099px) {
  :root { --t-title: clamp(38px, min(6.5vw, calc(var(--vh) * 8.2)), 72px); }
}
/* Large screens: the scale keeps growing with the screen, in proportion */
@media (min-width: 1600px) {
  :root {
    --t-title: clamp(38px, min(5vw, calc(var(--vh) * 8.2)), max(72px, 3.9vw));
    --t-statement: clamp(24px, 2.6vw, max(38px, 1.95vw));
    --t-sub: max(22px, 1.05vw);
    --t-body: max(18px, 0.85vw);
    --t-label: max(15px, 0.68vw);
    --t-small: max(13px, 0.58vw);
    --t-code: max(13px, 0.58vw);
    --t-code-large: max(15px, 0.66vw);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;   /* short pages: the footer sits at the bottom, not in the middle */
}
main { flex: 1 0 auto; }
/* No lone word on the last line of a paragraph */
p, li, figcaption, blockquote p { text-wrap: pretty; }
/* Capitals in running text get a little air (the font has no small capitals) */
.caps { letter-spacing: 0.035em; }
.nw { white-space: nowrap; }
.em { white-space: nowrap; }
.em .at::before { content: "@"; }   /* hyphenated domain names stay on one line */
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
p, h1, h2, h3, ul, ol, figure, blockquote { margin: 0; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 30; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dim { color: var(--muted); }

/* ---------- Wordmark: three colour plates underneath, the ink always on top (as in the canvas, og.png and the icons) ---------- */
.wm { position: relative; display: inline-block; isolation: isolate; font-stretch: 125%; font-weight: 820; letter-spacing: -0.045em; line-height: 0.78; }
.wm::before, .wm::after, .wm .k::before { content: attr(data-text); position: absolute; left: 0; top: 0; z-index: -1; mix-blend-mode: multiply; pointer-events: none; }
.wm::before { color: var(--wm-1); transform: translate(-0.035em, 0.015em); }
.wm::after { color: var(--wm-2); transform: translate(0.03em, -0.02em); }
.wm .k { position: relative; display: inline-block; }
.wm .k::before { color: var(--wm-3); transform: translate(0.012em, 0.035em); }
/* the small name in header and footer: whole-pixel offsets, so it stays sharp on every screen */
.wm.small::before { transform: translate(-1px, 0); }
.wm.small::after { transform: translate(1px, -1px); }
.wm.small .k::before { transform: translate(0, 1px); }

.glyph { width: 40px; height: 40px; flex: none; color: var(--accent); }

/* ---------- Header and footer: quiet frame, same words everywhere ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 56px; padding: 0 var(--pad);
  background: rgba(246, 246, 243, 0.92);
  -webkit-backdrop-filter: saturate(1.3) blur(14px); backdrop-filter: saturate(1.3) blur(14px);
  box-shadow: inset 0 -1px 0 var(--line);
}
.bar { transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.3s, box-shadow 0.3s; }
.bar.away { transform: translateY(-100%); box-shadow: none; }
.bar.brand-off { box-shadow: none; }   /* stays opaque: nothing runs underneath while the stage scrolls away */
.brand { display: inline-flex; font-size: 20px; line-height: 1; text-decoration: none; padding: 10px 0 8px; transition: opacity 0.35s ease; }
.bar.brand-off .brand { opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s 0.2s; }
.bar.instant, .bar.instant .brand { transition: none; }   /* on load the header takes its state at once: no name, no line fading out */
.bar-tools { display: flex; align-items: center; gap: 24px; margin-left: auto; }

/* The one switch: written in the agents' own language */
.agent-switch {
  display: none; align-items: center; gap: 8px;
  font: 500 var(--t-small)/1 var(--mono); letter-spacing: 0;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.js .agent-switch { display: inline-flex; }
.agent-switch .tag { color: var(--accent-ink); font-weight: 700; }
.agent-switch:hover { border-color: var(--ink); }
.agent-switch[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.agent-switch[aria-pressed="true"] .tag { color: var(--accent); }
html[data-reader="both"] #agents .endpoints { display: none; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font: 450 var(--t-small)/1 var(--sans); }
.legal-nav a { color: var(--muted); text-decoration: none; padding: 10px 0; }
.legal-nav a[aria-current="page"] { color: var(--ink); }
.legal-nav a:hover, .legal-nav a:focus-visible { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px;
  padding: 40px var(--pad) 48px;
  border-top: 1px solid var(--line);
  font: 450 var(--t-small)/1.4 var(--sans); color: var(--muted);
}
.foot .brand { margin-right: auto; }
.foot .bar-tools { margin-left: 0; }   /* the same tools as the header: the switch, then the legal links */
.foot .copy { margin: 0; }
.foot.compact { justify-content: flex-end; padding-top: 24px; padding-bottom: 32px; }   /* copyright stays where it always is */
.foot.compact .brand, .foot.compact .bar-tools { display: none; }

/* ---------- Two readers ---------- */
.row {
  position: relative;
  display: grid;
  /* the agents' column starts on the same line as in the stage above (half the page plus half a gap),
     so its grey panel, its code and the column line of the stage sit on one vertical */
  grid-template-columns: calc(50% + var(--pad) / 2) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}
.human {
  display: flex; flex-direction: column; gap: 28px; min-width: 0;
  padding: clamp(56px, 7vw, 104px) var(--pad);
}
.machine {
  min-width: 0;
  padding: clamp(56px, 7vw, 104px) var(--pad);
  background: var(--panel);
  font-family: var(--mono);
  font-size: var(--t-code);
  line-height: 1.7;
  font-variant-numeric: normal;
}
.code { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 88ch; }   /* a readable measure for code, too */
.code a { color: inherit; text-underline-offset: 3px; }
.ln { display: block; padding-left: 2ch; text-indent: -2ch; }
.ln.i2 { padding-left: 4ch; } .ln.i4 { padding-left: 6ch; } .ln.i6 { padding-left: 8ch; }
.ln.i8 { padding-left: 10ch; } .ln.i10 { padding-left: 12ch; }
.mk { color: var(--accent-ink); font-weight: 600; }
.hl { background: #BFE3F5; color: var(--on-accent); padding: 0 0.25ch; margin: 0 -0.25ch; white-space: nowrap; }   /* a quiet marker that keeps the mono grid */
.cursor { display: inline-block; width: 10px; height: 18px; background: var(--accent); vertical-align: -3px; }
/* The press run (boot.js, app.js): on the first view of a visit the agent's request is typed and its answer
   arrives; lines wait invisible, so nothing moves. If app.js never comes, everything shows after 2.5 s. */
@keyframes press-safe { to { visibility: visible; } }
.pressing #top .machine .ln { visibility: hidden; animation: press-safe 0s 2.5s forwards; }
.pressing #top .machine .ln.on { visibility: visible; animation: none; }
.ghost { visibility: hidden; }
/* With JavaScript the stage shows once it is laid out (boot.js sets .js before the first paint), so the plain-text
   opening never jumps into the drawn one; without JavaScript it shows at once, and after 2.5 s in any case */
.js:not(.stage-ready) .stage { visibility: hidden; animation: press-safe 0s 2.5s forwards; }

/* Agent view, on click only (app.js): each column on screen glides to its new place; the old reading leaves before
   the new one arrives, so the two never sit on top of each other; the header stays put */
@keyframes reader-out { to { opacity: 0; } }
@keyframes reader-in { from { opacity: 0; } }
.bar { view-transition-name: bar; }
.foot { view-transition-name: foot; }   /* pressed at the end of the page, the switch stays under the finger */
::view-transition-group(*) { animation-duration: 0.45s; animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1); }
::view-transition-old(*), ::view-transition-new(*) { height: 100%; object-fit: none; object-position: left top; }
::view-transition-old(*) { animation: reader-out 0.16s ease-out both; }
::view-transition-new(*) { animation: reader-in 0.28s 0.14s ease-in both; }
::view-transition-group(bar), ::view-transition-group(foot) { animation: none; }
::view-transition-old(bar), ::view-transition-old(foot) { animation: none; opacity: 0; }
::view-transition-new(bar), ::view-transition-new(foot) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

html[data-reader="people"] .row,
html[data-reader="agents"] .row { grid-template-columns: minmax(0, 1fr); }
html[data-reader="people"] .machine { display: none; }
html[data-reader="agents"] .human { display: none; }
html[data-reader="agents"] .machine { font-size: var(--t-code-large); }
@media (max-width: 1099px) {
  .row { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  .stage.pinned .panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }   /* inside the padded stage: two halves and a gap, the line the sections below follow */
  .row:not(.panel) .machine { padding-left: calc(var(--pad) + 1px); }   /* code starts where it starts in the stage (behind its 1 px line) */
}

/* ---------- A sentence, as a language model reads it ----------
   The one band across the full width, between Verify and For agents: one sentence about the family's name, cut
   into its tokens, each token's number below it. For this band the agents' grey takes the whole width. Roles only (the
   statement role, code for the numbers, a note), no colour, no motion. Shorter than a screen, so the
   page never seems to end here. */
.reading { display: grid; grid-template-columns: calc(50% + var(--pad) / 2) minmax(0, 1fr); margin: 0; background: var(--panel); border-bottom: 1px solid var(--line); }
.reading .tokens { grid-column: 1 / -1; padding: clamp(56px, 7vw, 104px) var(--pad) clamp(20px, 2.2vw, 30px); }
.tk-line { margin: 0; font-size: var(--t-statement); line-height: 1; text-wrap: balance; }   /* the statement role, below the titles; words break balanced */
.stream + .tk-line { margin-top: clamp(10px, 1.2vw, 20px); }
.wd { display: inline-block; white-space: nowrap; margin-bottom: 14px; }   /* a word stays whole on its line */
.tk { position: relative; display: inline-block; padding-bottom: calc(var(--t-code) + 10px); }   /* room for its number */
.tk .w { font-weight: 700; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }   /* set as one word: the numbers below show where the model cuts */
.tk .id { position: absolute; left: 0; bottom: 0; font: 400 var(--t-code)/1 var(--mono); color: var(--muted); white-space: nowrap; }   /* under its token, never widening a word */
.tk.p .id { left: auto; right: 0; }   /* punctuation: its number hangs right under it, clear of the next word's */
.stream { display: none; margin: 4px 0 0; max-width: var(--measure); font: 400 var(--t-code)/1.6 var(--mono); color: var(--muted); }
/* Below 1385 px the statement size leaves short words ("a", "it") narrower than their numbers: there the sentence's
   numbers follow it as one line, in order, instead of standing under each token */
@media (max-width: 1384px) {
  .tk { padding-bottom: 0; }
  .tk .id { display: none; }
  .stream { display: block; }
  .wd { margin-bottom: 4px; }
}
@media (max-width: 640px) { .reading .tokens { padding-top: 40px; } }
.reading figcaption { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
.reading .note { margin: 0; padding: 0 var(--pad) clamp(40px, 4.5vw, 64px); max-width: calc(var(--measure) + 2 * var(--pad)); }
.reading .slug { margin: 0; padding: 0 var(--pad) clamp(40px, 4.5vw, 64px) calc(var(--pad) + 1px); display: flex; flex-wrap: wrap; gap: 4px 18px; font: 400 var(--t-code)/1.7 var(--mono); color: var(--muted); }
@media (max-width: 1099px) {
  .reading { grid-template-columns: minmax(0, 1fr); }
  .reading .note { padding-bottom: 6px; }
  .reading .slug { padding-left: var(--pad); }
}

/* ---------- The stage ---------- */
.stage { border-bottom: 1px solid var(--line); }
.pin { position: relative; }
#mark, .mark-space, .steps { display: none; }
.title { padding: clamp(40px, 6vw, 88px) var(--pad) 0; font-size: clamp(40px, min(15.5vw, calc(var(--vh) * 23)), 290px); font-weight: 820; }
@media (min-width: 1100px) { .title { font-size: clamp(40px, min(7.3vw, calc(var(--vh) * 23)), 290px); } }  /* over the reading column, as the canvas name */
.panels { --_: 0; }
.stage .human { gap: clamp(14px, calc(var(--vh) * 2.4), 26px); padding: clamp(28px, 4vw, 56px) var(--pad); }
.stage .machine { background: transparent; border-left: 1px solid var(--line); padding: clamp(28px, 4vw, 56px) var(--pad); font-size: var(--t-code); }
.ph, .pb { display: flex; flex-direction: column; gap: clamp(12px, calc(var(--vh) * 2), 22px); min-width: 0; }

.tagline, .wave-name, .sec { font-size: var(--t-title); font-stretch: 125%; font-weight: 820; letter-spacing: -0.045em; line-height: 0.92; text-wrap: balance; }
.tagline { font-stretch: 112%; letter-spacing: -0.035em; line-height: 0.96; }
.tagline .s { display: block; }   /* one sentence per block: the claim breaks only between sentences (or inside the first, if it must) */   /* the one title that is a sentence: a little narrower, so it reads as one */
.intro, .story { font-size: clamp(15.5px, calc(var(--vh) * 2.05), var(--t-body)); line-height: 1.55; max-width: 58ch; }   /* body size; short screens shrink it a little so the stage fits */
@media (min-width: 1100px) { .intro, .story { font-size: clamp(16.5px, calc(var(--vh) * 2.05), var(--t-body)); } }   /* laptops: never below 16.5 px */
.cue { display: none; align-items: center; gap: 12px; font-size: var(--t-label); font-weight: 650; color: var(--accent-ink); text-wrap: balance; }
.js .cue { display: flex; }   /* "Scroll …" only where scrolling changes the name */
.cue::before { content: ""; width: 32px; height: 3px; background: var(--accent); }
.era { font-size: var(--t-label); font-weight: 650; color: var(--muted); }
.marker { display: flex; align-items: baseline; gap: 14px; padding-top: 12px; border-top: 3px solid var(--accent); max-width: var(--measure); }
.marker b { font-size: var(--t-sub); font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.marker span { font-size: var(--t-label); font-weight: 650; line-height: 1.35; }

/* pinned: the name stays, the technology changes */
/* The stage is as high as the screen really shows right now (--view-live, measured by boot.js/app.js), so the wave
   index sits at the bottom edge, also once the browser's toolbar has folded away. Chrome on the iPhone reports 100svh
   taller than its visible area, which put the wave index under its toolbar (Daniel's screenshots, 24.11.2026). */
.stage.pinned { height: calc(100vh + 400vh); height: calc(100svh + 400vh); height: calc(var(--view-live, min(100svh, var(--view, 100svh))) + 400vh); }
.stage.pinned .pin {
  position: sticky; top: var(--bar, 0px);
  height: calc(100vh - var(--bar, 0px)); height: calc(100svh - var(--bar, 0px)); height: calc(var(--view-live, min(100svh, var(--view, 100svh))) - var(--bar, 0px));
  overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
}
.stage.pinned #mark { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stage.pinned .mark-space { display: block; height: var(--mark-h, calc(var(--vh) * 30)); }
.stage.pinned .title { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); }
.stage.pinned .panels { display: grid; min-height: 0; padding: 0 var(--pad); }
.stage.pinned .panel {
  grid-area: 1 / 1; min-height: 0; border-bottom: 0; align-items: start; column-gap: var(--pad);
  opacity: 0; pointer-events: none; transition: opacity 320ms ease;
}
.stage.pinned .panel.is-on { opacity: 1; pointer-events: auto; transition: opacity 320ms ease; }
.stage.settling .panel { transition: none !important; }   /* pinning: the other waves vanish at once, no fade over the opening view */
.stage.pinned .human { padding: clamp(24px, calc(var(--vh) * 4.6), 60px) 0 0; }
.stage.pinned .machine { margin-top: clamp(24px, calc(var(--vh) * 4.6), 60px); padding: 2px 0 0 var(--pad); max-height: 100%; overflow: hidden; }
/* every panel fills the stage, so the column line runs the same full height in each wave, as the agents' column
   does in the sections below (seit 24.11.2026; before, it was only as long as each wave's code) */
.stage.pinned:not(.measuring) .panel { align-items: stretch; }
/* the opening panel: the "Scroll" line sits right above the wave index it points to */
.stage.pinned:not(.measuring) .panel[data-step="0"] .human { padding-bottom: clamp(16px, calc(var(--vh) * 3.2), 36px); }
.stage.pinned:not(.measuring) .panel[data-step="0"] .pb { flex: 1; }
.stage.pinned:not(.measuring) .panel[data-step="0"] .cue { margin-top: auto; }
/* the wave index on the page grid: its dividers continue the column lines, its words start where the text starts */
.stage.pinned .steps {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--pad);
  list-style: none; margin: 0; padding: 0 var(--pad); border-top: 1px solid var(--line); background: var(--paper);
}
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 3px; background: var(--accent); transform-origin: left center; transform: scaleX(var(--p, 0)); }
.stage.pinned .steps { transition: opacity 0.24s ease, visibility 0s; }
.stage.pinned.is-past .steps { opacity: 0; visibility: hidden; transition: opacity 0.24s ease, visibility 0s 0.24s; }   /* scrolled through: the index steps aside */
.steps a { display: flex; flex-direction: column; gap: 1px; padding: 12px 0 14px; text-decoration: none; color: var(--muted); }
.steps li + li a { padding-left: calc(var(--pad) + 1px); }   /* no dividers: the words start where the text of each column starts (as the code behind its 1 px line) */
.steps a:focus-visible { outline-offset: -3px; }   /* inside the link: the stage clips anything outside */
.steps .t { font-weight: 650; font-size: var(--t-label); line-height: 1.2; }
.steps .y { font-size: var(--t-small); font-weight: 450; line-height: 1.3; }
.steps a[aria-current="step"], .steps a:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .bar { transition: none; } .stage.pinned .panel, .stage.pinned .panel.is-on { transition: none; } }
/* Touch screens: the wave index is a floor, not a line. Chrome on the iPhone folds its toolbar away without telling
   the page (no resize, 24.11.2026), so the page cannot move the index down; the index sits on the agents' grey and
   the grey continues below it to the screen's edge (the stage behind the pinned frame), so nothing hangs in the air */
@media (hover: none) and (pointer: coarse) {
  .stage.pinned:not(.is-past) { background: var(--panel); }
  .stage.pinned .pin { background: var(--paper); }
  .stage.pinned .steps { background: var(--panel); }
}

html[data-reader="agents"] .stage.pinned .machine { border-left: 0; padding-left: 0; }   /* one column: code starts at the text edge */
@media (max-width: 1099px) {
  html[data-reader="both"] .stage.pinned .machine { display: none; }
  .stage.pinned .machine { border-left: 0; padding-left: 0; }
  .stage .machine { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .stage.pinned .steps { column-gap: 0; padding: 0; }
  .steps .y { display: none; }
  .steps .t { font-size: var(--t-small); font-weight: 450; }   /* four tabs in one row: the small role */
  .steps a, .steps li + li a { padding: 12px 8px 14px; align-items: center; }
  /* the start page on phones: the header floats over the stage, so the whole stage fits the first screen */
  html.stage-on .bar { position: fixed; left: 0; right: 0; top: 0; }
}

/* ---------- Sections ---------- */
/* Titles print themselves (app.js): while it runs a canvas covers the title's ink; the text stays text, in ink */
.js .sec { position: relative; }
.sec .press { position: absolute; pointer-events: none; }
.sec.printing { -webkit-text-fill-color: transparent; }
.lead { font-size: var(--t-lead); font-weight: 450; line-height: 1.4; max-width: 42ch; text-wrap: balance; }

/* Lines draw only the grid of the page: a hairline between sections and the edge of the agents' column.
   Inside a section, space and type do the work: no rules, no dividers between entries.
   Every list is one column on the text measure. Every entry has the same two parts, as in Today:
   a title on its own line (.et) and its text below (.ex, black). Entries sit --row apart; a list
   starts a little further from its lead than entries sit from each other. */
.cards, .rulebook, .wall, .rules, .notus, .endpoints, .describe { list-style: none; margin: 0; padding: var(--row-lead) 0 0; max-width: var(--measure); }
.cards, .rulebook, .rules, .notus, .endpoints { display: flex; flex-direction: column; gap: var(--row); }
.cards > li, .rulebook > li, .rules > li, .notus > li, .endpoints a, .describe { display: flex; flex-direction: column; gap: 8px; }
.et { margin: 0; font-size: var(--t-sub); font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink); text-wrap: balance; }
.ex { margin: 0; font-size: var(--t-body); font-weight: 400; line-height: 1.55; color: var(--ink); }
.describe blockquote { margin: 0; }
.endpoints a { text-decoration: none; }
.endpoints code.et { font-family: var(--mono); font-stretch: 100%; font-weight: 600; letter-spacing: 0; }   /* a file name stays code */
.endpoints a:hover .et { color: var(--accent-ink); }

.wall { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.wall li { font-size: var(--t-statement); font-stretch: 112%; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
/* Notes: one role for every short remark under a section (label size, regular, grey) */
.note { font-size: var(--t-label); font-weight: 400; line-height: 1.5; color: var(--muted); }
.note { max-width: 60ch; }

.status { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--ink); background: #fff; align-self: flex-start; }
.status .state { font-weight: 650; }
.status .dim { font-size: var(--t-small); }
.status.is-expired { border-width: 2px; }
.mail a { font-size: var(--t-statement); font-stretch: 112%; font-weight: 700; letter-spacing: -0.02em; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 8px; }

.notfound { padding: clamp(56px, 8vw, 120px) var(--pad); display: flex; flex-direction: column; gap: 24px; }

/* ---------- People only, wide screens ---------- */
@media (min-width: 1100px) {
  html[data-reader="people"] .stage .human { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--pad); align-items: start; }
  html[data-reader="people"] .stage .ph { grid-column: 1; grid-row: 1; }
  html[data-reader="people"] .stage .pb { grid-column: 2; grid-row: 1 / span 2; padding-top: 6px; }
  html[data-reader="people"] .stage .marker { grid-column: 1; grid-row: 2; align-self: start; margin-top: clamp(14px, calc(var(--vh) * 2.4), 26px); max-width: 30ch; flex-direction: column; gap: 6px; }
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .bar { min-height: 52px; gap: 12px; }
  .brand { font-size: 17px; }
  .bar-tools { gap: 14px; }
  .legal-nav { gap: 4px 14px; }
  .bar .agent-switch { padding: 7px 8px; }
  .bar .agent-switch .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bar.brand-off .agent-switch .label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .bar.brand-off .brand { position: absolute; }   /* while hidden it takes no room: the switch can show its name */
  .foot { flex-direction: column; align-items: flex-start; gap: 4px; padding: 32px var(--pad) 40px; }
  .foot .brand { margin: 0 0 8px; }
  .foot .bar-tools { flex-direction: column; align-items: flex-start; gap: 4px; }   /* here the switch keeps its name */
  .foot .agent-switch { margin: 2px 0 6px; }
  html { scroll-padding-top: 64px; }
}
@media (max-width: 359px) {
  .bar { gap: 6px; }
  .brand { font-size: 15px; }
  .bar-tools { gap: 8px; }
  .bar .agent-switch { padding: 7px 6px; }
  .bar.brand-off .agent-switch .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal-nav { gap: 4px 8px; }
}

/* ---------- Short viewports: keep the stage on one screen ---------- */
@media (max-height: 780px) {
  .stage.pinned .steps .y { display: none; }
  .stage.pinned .steps a { padding-top: 10px; padding-bottom: 11px; }
  .stage.pinned .human { gap: clamp(10px, calc(var(--vh) * 1.9), 16px); padding-top: clamp(24px, calc(var(--vh) * 4.2), 32px); }
  .stage.pinned .machine { margin-top: clamp(24px, calc(var(--vh) * 4.2), 32px); }
  .stage.pinned .ph, .stage.pinned .pb { gap: clamp(8px, calc(var(--vh) * 1.4), 12px); }
}

/* Small phones: the agents' view in the regular code size, and a tighter top on very short screens */
@media (max-width: 640px) {
  html[data-reader="agents"] .machine { font-size: var(--t-code); }
}
@media (max-width: 640px) and (max-height: 700px) {
  .stage.pinned .human { padding-top: 16px; }
  .stage.pinned .machine { margin-top: 16px; }
}
@media (max-width: 640px) and (max-height: 600px) {   /* the smallest phones with browser bars: everything a notch tighter */
  .intro, .story { font-size: 15px; line-height: 1.48; }
  .stage.pinned .steps a, .stage.pinned .steps li + li a { padding-top: 7px; padding-bottom: 8px; }
}

/* ---------- Today: the company's last chapter ---------- */
.prose { font-size: var(--t-body); line-height: 1.55; max-width: var(--measure); color: var(--ink); }

/* ---------- Legal notice and privacy policy ---------- */
.legal h1 .de { display: block; margin-top: 12px; font-size: var(--t-label); font-weight: 400; font-stretch: 100%; letter-spacing: 0; line-height: 1.3; color: var(--muted); }
.legal { padding: clamp(32px, 6vw, 72px) var(--pad) 96px; }
.legal p, .legal h2 { max-width: var(--measure); }   /* the title runs free, the text keeps the site's one measure */
.legal .back { display: inline-block; text-decoration: none; margin-bottom: 28px; }
.legal h1 { margin: 0 0 32px; }
.legal h2 { font-size: var(--t-sub); font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 36px 0 10px; }
.legal .provider { font-size: var(--t-body); line-height: 1.55; margin: 20px 0 8px; }
.legal .updated { margin-top: 40px; }
.legal p { line-height: 1.55; margin: 0 0 12px; }
.todo { background: var(--accent); color: var(--on-accent); padding: 0 6px; }

/* ---------- Print and PDF: the whole story on paper, without screen furniture ---------- */
@media print {
  @page { margin: 16mm 16mm 18mm; }
  :root {
    --t-title: 26pt; --t-statement: 15pt; --t-sub: 12.5pt; --t-body: 10.5pt;
    --t-label: 9.5pt; --t-small: 8.5pt; --pad: 0;
  }
  body { display: block; min-height: 0; background: #fff; }
  .bar, .skip, .steps, #mark, .mark-space, .agent-switch, .machine, .reading, .cue, .foot .legal-nav { display: none !important; }
  .stage.pinned { height: auto !important; }
  .stage.pinned .pin { position: static !important; height: auto !important; overflow: visible !important; display: block !important; }
  .stage.pinned .title, .title {
    position: static !important; width: auto !important; height: auto !important; clip: auto !important; overflow: visible !important;
    padding: 0 0 14pt !important; font-size: 54pt !important;
  }
  .stage.pinned .panels { display: block !important; padding: 0 !important; }
  .panel, .stage.pinned .panel { opacity: 1 !important; break-inside: avoid; }
  .row, html[data-reader] .row { display: block !important; border: 0; }
  .human, .stage .human, .stage.pinned .human { padding: 10pt 0 !important; gap: 8pt; }
  .intro, .story, .prose { font-size: var(--t-body) !important; max-width: none; }
  .sec, .wave-name, .tagline { break-after: avoid; }
  .sec .press { display: none !important; }
  .sec.printing { -webkit-text-fill-color: currentColor; }
  section { break-inside: auto; }
  .cards, .rulebook, .wall, .rules, .notus { break-inside: avoid; }
  .wm, .wm * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .hl { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
  .foot { border: 0; padding: 12pt 0 0; }
  .legal, .notfound { padding: 0; max-width: none; }
}
