/* The DOM is the page: this file sets every line. (THE SLAB, a canvas that redrew these lines so a
   hand could push them, was removed on 2026-10-09; JITTER_WEBSITE_ARCHITECTURE.md section 5.)
   Colour comes from custom properties on each text element:
     --fg     the text colour
     --depth  0 at the top of the page, 1 at the end (js/depth.js); ramps body ink, never below 6.10:1.
   Mobile first. Breakpoints: 760px (desktop type), 1100px (the frame's columns). Spacing comes from
   four tokens in tokens.css (--space-flow, -group, -section, -emphasis), one job each. */

@font-face {
  font-family: "Site Mono";
  src: url("../assets/fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* registered as a <color>, so its computed value is one resolved colour (calc() evaluated) */
@property --fg { syntax: "<color>"; inherits: true; initial-value: transparent; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  position: relative;
  min-height: 100svh;
  background: var(--bg);
  color: rgb(var(--ink) / var(--a-body));
  font-family: "Site Mono", ui-monospace, Menlo, Consolas, monospace;
  font-weight: 400;
  font-synthesis: none;
  font-kerning: none;              /* a monospace advance, everywhere: the measure counts on it */
  font-variant-ligatures: none;
}

/* ---------- the measure, and the display scale ----------
   --measure is the prose column: 66 characters of body at most (Plex advances 0.6em, so 66ch is 39.6 x
   the body size), never wider than the page less its gutters. Prose never runs wider than this.
   --display is what display type is sized against: 78 characters of body, the column this site was
   first set in, so a statement keeps its size and breaks where it always has. A size of
   (display / 0.6N) sets N characters per line of the display width:
     claim h1        29.5 -> 29 per line   the largest type on the page, at every width
     accent h2       33.5 -> 33 per line   the section headings
   Headings may run the display width, past the prose measure; prose may not.
   --depth is not set here: js/depth.js computes it from document position (see there). Without JS it
   is 0, and body text is at --a-body throughout. */
body {
  --pad: clamp(20px, 5vw, 56px);   /* the outer gutter */
  --bs: 11.2px;                    /* body size */
  --lead: 1.76;                    /* body leading */
  --measure: min(var(--bs) * 39.6, 100cqi - 2 * var(--pad));
  --display: min(var(--bs) * 46.8, 100cqi - 2 * var(--pad));
}
main { container-type: inline-size; }
.mv {
  --depth: 0;
  width: var(--measure);
  margin-inline: auto;
  font-size: var(--bs);
  line-height: var(--lead);
}

.mv p {
  --fg: rgb(var(--ink) / calc(var(--a-body) + (var(--a-body-deep) - var(--a-body)) * var(--depth)));
  color: var(--fg);
}
.mv p + p { margin-top: var(--space-flow); }

.mv h1, .mv h2, .mv h3 {
  font-weight: 400;
  color: var(--fg);
}
.mv h1 {
  --fg: rgb(var(--ink) / var(--a-display));
  font-size: calc(var(--display) / 17.7);  /* 29.5 characters of 0.6em */
  line-height: 1.24;
}
.mv h2 {
  --fg: rgb(var(--accent) / var(--a-display));
  font-size: calc(var(--display) / 20.1);  /* 33.5 characters */
  line-height: 1.26;
}
/* a sub-heading inside a block: body size, display ink, a line of space above */
.mv h3 { --fg: rgb(var(--ink) / var(--a-display)); font-size: inherit; line-height: inherit; }
.mv * + h3 { margin-top: var(--space-group); }
.mv h3 + * { margin-top: calc(var(--space-flow) / 2); }
.mv :is(h1, h2) > span { display: block; }
.nw { white-space: nowrap; }
.mv :is(h1, h2) > span + span { margin-top: 0.55em; }
/* space before a display line scales with its own size */
.mv p + :is(h1, h2) { margin-top: var(--space-group); }
.mv :is(h1, h2) + * { margin-top: var(--space-flow); }
/* headings run the display width; outside the frame's columns they stay centred on the prose column */
.mv > :is(h1, h2), .mv-1 .hero-copy > h1 { width: var(--display); max-width: calc(100cqi - 2 * var(--pad)); margin-left: calc((var(--measure) - var(--display)) / 2); }
.mv-1 .hero-copy > h1 { margin-left: 0; }

/* inline voices. each carries its own --fg, its own colour */
.mv :where(strong, .ui, code) {
  --fg: rgb(var(--ink) / var(--a-display));
  font: inherit;
  color: var(--fg);
}
.mv a code { --fg: rgb(var(--accent) / var(--a-link)); }   /* a cited path is a link first */
/* the install detail: the clause that is the thing to do, in phosphor, never underlined (links are).
   Never on a link, a command or a hash, nor on lowering a protection */
.mv .act, .mv .act strong { --fg: rgb(var(--accent) / var(--a-display)); color: var(--fg); }
.mv a, .foot a {
  --fg: rgb(var(--accent) / var(--a-link));
  color: var(--fg);
  text-decoration: underline 1px rgb(var(--accent) / 0.45);
  text-underline-offset: 0.28em;
}
.mv .cite { margin-top: 0.3em; }
/* the file paths are evidence, not headlines: body grey, no accent, underlined only on hover */
.mv .cite a, .mv .cite a code { --fg: rgb(var(--ink) / var(--a-body)); text-decoration: none; }
.mv .cite a:hover { text-decoration: underline 1px rgb(var(--ink) / 0.45); text-underline-offset: 0.28em; }
.mv p + .cite { margin-top: 0.3em; }
.mv .cite + p { margin-top: var(--space-flow); }
.mv pre {
  --fg: rgb(var(--ink) / var(--a-display));
  color: var(--fg);
  font: inherit;
  white-space: pre-wrap;           /* aapt's output, as printed: it wraps at the column, never past it */
  overflow-wrap: anywhere;         /* a permission name is 57-65 characters; the mobile column is 53 */
  margin-block: var(--space-flow);
}

/* ---------- plates: real captures, unretouched, uncropped, inert (no pointer, no long-press, no drag:
   evidence, not a control). no opacity, no filter, no rounding. Every capture sits in a frame, and every frame is the
   same frame: a 1px hairline, a --fm interior margin, the captures' own black inside, the same
   caption under it. A frame takes its capture's own proportion; consistency is in the treatment,
   not the ratio. No two adjacent frames differ in ratio. Mobile: the first gate touches the glass,
   the rest sit in the column. ---------- */
body { --fm: 6px; }
.plate { margin-block: var(--space-group); }
.plate picture, .strip picture {
  display: block;
  padding: var(--fm);
  border: 1px solid rgb(var(--ink) / var(--a-hair));
  background: var(--screen);
}
.plate img, .strip img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
:is(.plate-1, .plate-2) { width: 100vw; margin-left: calc(50% - 50vw); }
:is(.plate-1, .plate-2) figcaption { padding-left: calc((100cqi - var(--measure)) / 2); }   /* back on the column edge */
.plate figcaption, .strip figcaption {
  --fg: rgb(var(--ink) / var(--a-body));
  color: var(--fg);
  margin-top: 0.6em;
}

/* ---------- the movements: no headers, no numbers, no rules. space, and density. ---------- */

/* I  ARRIVAL. the claim, one sentence, the way in, and the panel that shows it (js/hero.js). */
.mv-1 { padding-top: var(--space-group); }
/* the claim's second statement is the mechanism: phosphor, as the panel's closing card marks it */
.mv-1 .hero-copy > h1 > span + span { --fg: rgb(var(--accent) / var(--a-display)); color: var(--fg); }
/* the one identifying fact, as a second tier: display ink, between body and statement */
.mv-1 .lede { --fg: rgb(var(--ink) / var(--a-display)); font-size: calc(var(--display) / 26); line-height: 1.4; }
.mv-1 .hero-copy > p + p { margin-top: var(--space-flow); }
.mv-1 .hero-copy > p { max-width: var(--measure); }
.mv-1 .cta a { --fg: rgb(var(--accent) / var(--a-display)); letter-spacing: 0.06em; text-decoration: none; }
.mv-1 .cta a:hover { text-decoration: underline 1px rgb(var(--accent) / 0.45); text-underline-offset: 0.28em; }
.mv-1 .fp { margin-top: var(--space-group); }

/* HOW IT WORKS: the mechanism in prose, the three costs, the way to the long version. */
.mv-how { --lead: 1.62; margin-top: var(--space-section); }
/* the three costs: three lines, the minute in the accent, the cost in body ink. Not counters. */
.costs { list-style: none; margin-block: var(--space-flow); }
.costs li { display: grid; grid-template-columns: 12ch minmax(0, 1fr); column-gap: 1ch; padding-block: 0.3em; border-top: 1px solid rgb(var(--ink) / var(--a-hair)); --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); }
.costs li:last-child { border-bottom: 1px solid rgb(var(--ink) / var(--a-hair)); }
.costs .at { color: rgb(var(--accent) / var(--a-display)); }
.mv .costs + p { margin-top: var(--space-flow); }
.mv .more { margin-top: var(--space-flow); }


/* INSTALL. densest. the only hard edge on the page. */
.mv-install { --lead: 1.45; margin-top: var(--space-section); }
.mv-install p + p, .mv-install p + ol, .mv-install ol + p, .mv-install ol + details, .mv-install details + p { margin-top: var(--space-flow); }
.mv-install ol { list-style: none; }
.mv-install li + li { margin-top: calc(var(--lead) * 0.75em); }
.mv-install li p + p { margin-top: calc(var(--lead) * 0.45em); }
.mv-install .cmds { white-space: pre-wrap; }
.mv-install .sum code { overflow-wrap: anywhere; }   /* a 64-character hash wraps at the column, never past it */
/* the install flow: four steps on one vertical spine. Numeral in the accent, the step in display
   ink, what to do, then how to tell it worked. The spine is the plates' 1px hairline, from each
   numeral down to the next; no circles, boxes or icons. The eight detailed steps follow below. */
.mv-install .flow li { position: relative; display: grid; grid-template-columns: 3ch minmax(0, 1fr); column-gap: 1ch; padding-bottom: calc(var(--lead) * 1.2em); }
.mv-install .flow li + li { margin-top: 0; }
.mv-install .flow li > * { grid-column: 2; }
.mv-install .flow li p + p { margin-top: 0.3em; }
.mv-install .flow .n { grid-column: 1; grid-row: 1 / span 3; --fg: rgb(var(--accent) / var(--a-display)); color: var(--fg); }
.mv-install .flow .t { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); letter-spacing: 0.06em; }
.mv-install .flow li:not(:last-child)::before {
  content: ""; position: absolute; left: 0.5ch; top: calc(var(--lead) * 1em + 0.35em); bottom: 0.35em;
  width: 1px; background: rgb(var(--ink) / var(--a-hair));
}
/* the disclosures: optional detail only (the Android detail and its screens under the install flow;
   on /how-it-works/ the arithmetic behind the costs, the permission lists, the full trace). Each is a
   real <details>, so it opens from the keyboard (Tab to it, Enter or Space), without JS, and from
   find-in-page; the bracket says which way it goes. Nothing that explains the product is inside one. */
.detail > summary, .screens > summary {
  --fg: rgb(var(--accent) / var(--a-link));
  color: var(--fg);
  list-style: none;
  cursor: pointer;
  width: fit-content;
}
:is(.detail, .screens) > summary::-webkit-details-marker { display: none; }
:is(.detail, .screens) > summary::before { content: "[+] "; content: "[+] " / ""; }
:is(.detail, .screens)[open] > summary::before { content: "[\2212] "; content: "[\2212] " / ""; }
:is(.detail, .screens) > summary:hover { text-decoration: underline 1px rgb(var(--accent) / 0.45); text-underline-offset: 0.28em; }
.screens .strip { margin-block: var(--space-flow) 0; }
.detail > summary + * { margin-top: var(--space-flow); }
.mv * + .detail { margin-top: var(--space-group); }
/* the install screens, grouped by ratio: the four phone screens (0.466-0.474) in one row, columns
   in proportion to their ratios so the four frames share one height; Play Protect (0.938) on its
   own row beneath, two frames wide. Source order stays step order (2, 3, 5, 6, 8). */
.strip {
  display: grid;
  grid-template-columns: minmax(0, 0.4715fr) minmax(0, 0.4738fr) minmax(0, 0.4658fr) minmax(0, 0.4712fr);
  gap: 6px;
  align-items: start;
  margin-block: var(--space-flow);
}
.strip .wide { grid-row: 2; grid-column: 1 / span 2; }
.strip-cap { --fg: rgb(var(--ink) / var(--a-body)); color: var(--fg); }
.strip .strip-cap { grid-column: 1 / -1; grid-row: 3; margin-top: calc(var(--lead) * 0.3em); }

/* THE ENDING: the closing statement is the footer's first tier, after the page's one deliberate
   silence; a hairline, then what it is and where it lives; then the licence and who keeps it. */
.foot .put-down {
  --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg);
  width: var(--display); max-width: calc(100vw - 2 * var(--pad)); margin-left: calc((var(--measure) - var(--display)) / 2);
  font-size: calc(var(--display) / 17.7); line-height: 1.24;
}
.foot .put-down .last { --fg: rgb(var(--accent) / var(--a-display)); color: var(--fg); }   /* what Jitter is for, in phosphor */

.foot {
  width: var(--measure);
  margin: var(--space-section) auto 0;
  padding-bottom: var(--space-group);
  font-size: var(--bs);
  line-height: 1.7;
  --fg: rgb(var(--ink) / var(--a-body));
  color: var(--fg);
}
.foot.end { margin-top: var(--space-emphasis); }
.foot .meta { margin-top: var(--space-group); padding-top: var(--space-flow); border-top: 1px solid rgb(var(--ink) / var(--a-hair)); }
.foot:not(.end) .meta { margin-top: 0; }
.foot .id { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); }
.foot .to { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3em 3ch; margin-top: 0.4em; }
.foot .to a { white-space: nowrap; }
.foot .credit { margin-top: var(--space-flow); }
.foot .credit p + p { margin-top: 0.3em; }
/* the destinations: words, not marks; every link shows the site's focus ring (:focus-visible above) */

@media (min-width: 760px) {
  body { --bs: clamp(11px, 100vw / 112, 13.5px); --lead: 1.62; }
  .mv-how { --lead: 1.5; }
  .mv-install { --lead: 1.36; }
  .strip { gap: 10px; }
  /* frames 14px wider than the captures they hold: the gates at 410 and 328, the console at 410 */
  :is(.plate-1, .plate-2) { width: 424px; margin-left: 0; }   /* the two gates, one width */
  :is(.plate-1, .plate-2) figcaption { padding-left: 0; }
  .plate-3 { width: 424px; }
}

/* ---------- the frame (>= 1100px) ----------
   Every block and the footer sit in one centred frame, 104 body sizes wide at most (about 1144px at
   1100-1250, 1337 at 1440, 1404 from 1512 up) with the outer gutter inside it, on two columns that
   open from ONE content edge, the frame's inner left, shared by the header's wordmark, the hero, every
   heading, paragraph, table and the install steps:
     [text]   the 66-character prose measure
     [aside]  what a block shows beside its prose: the hero's panel, the costs, citations, captures,
              tables, the tell; or, for wide material (the install flow, tables, the trace), text and
              aside together
   Block numbers hang outside the content edge, in the gutter (--hang from the edge), so they never
   push the content in. Below 1100 the aside is too narrow for the captures (424px) and the panel, so
   the page is one centred column and the numbers sit above their headings. Headings run the display
   width, from the text column into the aside. */
@media (min-width: 1100px) {
  body { --gap: calc(var(--bs) * 3.6); --hang: calc(var(--bs) * 2.4); --frame: calc(var(--bs) * 104); }
  .mv, .foot {
    width: auto;
    max-width: var(--frame);
    margin-inline: auto;
    padding-inline: var(--pad);
    display: grid;
    grid-template-columns: [text-start] var(--measure) [text-end] var(--gap) [aside-start] minmax(0, 1fr) [aside-end];
    align-items: start;
  }
  .mv > *, .foot > * { grid-column: text; }
  .mv > :is(h1, h2), .foot .put-down { grid-column: text-start / aside-end; margin-left: 0; max-width: var(--display); }
  .mv > .bn { grid-column: text; grid-row: 1; width: 2ch; margin-left: calc(-2ch - var(--hang)); }   /* hangs in the gutter, beside its heading */
  .mv > .bn + :is(h1, h2) { grid-row: 1; }   /* the heading shares the number's row in every block (auto-placement would push it to row 2) */
  /* the long page: the number reads on its heading's first line. Top-aligned in one row, a body-size
     number sat 14-22px above a heading 2.3x its size; a shared baseline is the relationship meant */
  .deep .mv > .bn, .deep .mv > .bn + :is(h1, h2) { align-self: baseline; }
  /* in the gutter the number is a section marker, not a footnote: 1.4 body sizes (15.4px at 1100, 18 at
     1440, 18.9 from 1512), about 0.6 of its heading at every width. Stacked, below 1100, it keeps the
     body size, where anything larger rivals a heading of 17-26px */
  .deep .mv > .bn { font-size: calc(var(--bs) * 1.4); }
  .mv > :is(p, .costs, .seq, .pair) { max-width: var(--measure); }   /* prose keeps the measure in the aside too */

  /* I: the copy in the column, the panel beside it in the aside, the pair centred in the first
     screen. The claim keeps the column's h1 size, so its lines break where every h1 breaks. */
  .mv-1 { min-height: calc(100svh - 4.5rem); padding-block: var(--space-flow); align-items: center; }
  .mv-1 > .hero-copy { grid-column: text; }   /* the claim keeps its display width (78 characters of body), running into the gap */
  .mv-1 > .fp { grid-column: aside; margin-top: 0; justify-self: end; }

  /* the summary: its three costs in the aside, from the first line of the explanation; the list's first
     line of text, not its rule, on the paragraph's first line (the rule sits 0.3em and 1px above it) */
  .mv-how > .costs { grid-column: aside; grid-row: 2 / span 3; margin-block: calc(var(--space-flow) - 0.3em - 1px) 0; align-self: start; }

  /* the gate (/how-it-works/ block 2): its two paragraphs, then the two gate captures side by side at
     one width, 01 in the column and 02 across the gutter; under 01 the gate coming back, under 02 the
     lock; then the console line, the console beside it */
  .deep .dv-2 > * { margin-block: 0; }
  /* the rhythm of every other block: a paragraph's space between paragraphs, a group's space either
     side of the captures, as in the single column (a row-gap of its own nearly doubled every gap) */
  .deep .dv-2 > :is(p:not(.bn), .plate-3) { margin-top: var(--space-flow); }
  .deep .dv-2 > :is(.plate-1, .plate-2, p:nth-of-type(4), p:nth-of-type(5)) { margin-top: var(--space-group); }
  .deep .dv-2 > h2 { grid-row: 1; }
  .deep .dv-2 > .bn { grid-row: 1; }   /* the paragraphs below count from 2: the number is the first */
  .deep .dv-2 > p:nth-of-type(2) { grid-row: 2; }
  .deep .dv-2 > p:nth-of-type(3) { grid-row: 3; }
  .deep .dv-2 > .plate-1 { grid-row: 4; justify-self: start; }
  .deep .dv-2 > .plate-2 { grid-column: aside; grid-row: 4; justify-self: start; }
  .deep .dv-2 > p:nth-of-type(4) { grid-row: 5; }
  .deep .dv-2 > p:nth-of-type(5) { grid-column: aside; grid-row: 5; max-width: var(--measure); }
  .deep .dv-2 > p:nth-of-type(6) { grid-row: 6; }
  .deep .dv-2 > .plate-3 { grid-column: aside; grid-row: 6; }

  /* block 1: the two systems, contrasted beside the plain layer */
  .deep .dv-1 > .pair { grid-column: aside; grid-row: 2 / span 6; margin-top: calc(var(--space-flow) - 0.8em - 1px); }   /* its first line on the plain layer's */
  /* block 3: the sequence in the column, the tell and its release beside it */
  .deep .dv-3 > h2 { grid-row: 1; }
  /* blocks 3 and 5: an item spanning two rows beside two aside paragraphs (the sequence; the horizon
     table). Its surplus height goes to the second, flexible row, so the two paragraphs stay a
     paragraph's space apart; with two auto rows it was shared out and opened an 88px hole in block 3 */
  .deep :is(.dv-3, .dv-5) { grid-template-rows: auto auto 1fr; }
  .deep .dv-3 > .seq { grid-row: 2 / span 2; }
  .deep .dv-3 > p:nth-of-type(2) { grid-row: 4; }
  .deep .dv-3 > p:nth-of-type(3) { grid-column: aside; grid-row: 2; margin-top: var(--space-flow); }   /* the sequence carries the same margin */
  .deep .dv-3 > p:nth-of-type(4) { grid-column: aside; grid-row: 3; }
  /* block 4: the table across text and aside; the floor and the ceiling beside the qualification */
  .deep .dv-4 > h2 { grid-row: 1; }
  .deep .dv-4 > p:nth-of-type(2) { grid-row: 2; }
  .deep .dv-4 > .cost { grid-column: text-start / aside-end; grid-row: 3; }
  .deep .dv-4 > .qual { grid-row: 4; }
  .deep .dv-4 > .p16 { grid-row: 5; }
  .deep .dv-4 > .floor { grid-column: aside; grid-row: 4; margin-top: var(--space-flow); }   /* beside the qualification */
  .deep .dv-4 > .ceil { grid-column: aside; grid-row: 5; margin-top: var(--space-flow); }    /* beside the sixteen-minute line */
  /* cited facts (blocks 6, 7, 8): the file paths are marginalia, beside the fact they cite */
  .deep :is(.dv-6, .dv-7, .dv-8) > .cite { grid-column: aside; margin-top: var(--space-flow); align-self: start; }

  /* VII: the flow is the section. It runs across the whole grid, four steps side by side on one
     horizontal spine; each step's rows (numeral, step, what to do, the check) line up with the
     others'. The Android detail below it stays in the column. */
  .mv-install > .flow {
    grid-column: text-start / aside-end; display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: calc(var(--bs) * 2.4);   /* 4 characters: each step keeps 36 of description */
    row-gap: 0;                          /* the steps' rows are subgrid rows: a row gap would open inside each step */
    margin-block: var(--space-group);
  }
  .mv-install > .flow li { grid-row: span 4; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
  .mv-install > .flow li > *, .mv-install > .flow .n { grid-column: 1; grid-row: auto; }
  .mv-install > .flow li > p:not(.n) { max-width: var(--measure); }
  .mv-install > .flow .n { padding-bottom: calc(var(--lead) * 0.5em); }
  .mv-install > .flow li:not(:last-child)::before { left: 3ch; right: calc(1ch - var(--bs) * 2.4); top: calc(var(--lead) * 0.5em); bottom: auto; width: auto; height: 1px; }
  .mv-install > .flow li:nth-child(2n)::before { display: none; }   /* two by two: a row ends at its second step */
  .mv-install > .flow li:nth-child(n+3) { margin-top: var(--space-group); }   /* two by two: the second row of steps */
  /* the permission list: identifier and explanation side by side, across text and aside */
  .deep .dv-6 > .perms { grid-column: text-start / aside-end; }
  .deep .dv-6 > .perms > p { max-width: var(--measure); }
  .deep .perm { display: grid; grid-template-columns: minmax(0, 26ch) minmax(0, var(--measure)); column-gap: 3ch; row-gap: 0.6em; align-items: baseline; }
  .deep .perm dt + dd { margin: 0; }
}
@media (min-width: 1150px) {
  .mv-install > .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mv-install > .flow li:nth-child(2n):not(:last-child)::before { display: block; }
  .mv-install > .flow li:nth-child(n+3) { margin-top: 0; }
}
@media (min-width: 1100px) {

  /* the deep page: the horizon table in the aside; the aapt output and the trace across text and aside */
  .deep .dv-5 > table { grid-column: aside; grid-row: 2 / span 2; margin-block: var(--space-flow) 0; }   /* from the explanation's first line, to the aside's end: a table ends where block 4's table and every hairline end (capped at 560px it ended on no edge) */
  .deep .dv-7 .trace-wide, .deep .dv-7 > .trace-wide, .deep .dv-7 > pre { grid-column: text-start / aside-end; width: auto; margin-inline: 0; }
  /* the ending: the statement across the frame; then one hairline across text and aside (one rule,
     one right edge), what it is beneath it in the column, who keeps it in the aside */
  .foot .meta { grid-column: text; border-top: 0; }
  .foot .credit { grid-column: aside; margin-top: var(--space-group); padding-top: var(--space-flow); }
  .foot:not(.end) .credit { margin-top: 0; }
  .foot.end > .meta, .foot.end > .credit, .foot.end::before { grid-row: 2; }
  .foot::before { content: ""; grid-column: text-start / aside-end; grid-row: 1; align-self: start; height: 1px; background: rgb(var(--ink) / var(--a-hair)); }
  .foot.end::before { margin-top: var(--space-group); }
}

/* ---------- the header: the wordmark and two links, on every page. No menu: two destinations. It
   stays at the top (CSS only, no listener), on the page's ground with a hairline under it; its
   contents line up with the column below (and with the frame at 1100 and up). ---------- */
.top {
  position: sticky; top: 0; z-index: 3;
  background: var(--bg);
  border-bottom: 1px solid rgb(var(--ink) / var(--a-hair));
  padding: 0.9rem max(var(--pad), (100vw - var(--measure)) / 2);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4em 2ch;
  font-size: var(--bs); line-height: 1.5;
}
.top .wordmark { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); text-decoration: none; letter-spacing: 0.06em; }
.top nav { display: flex; align-items: baseline; gap: 4ch; }
.top nav a { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); text-decoration: none; }
.top nav .go { --fg: rgb(var(--accent) / var(--a-display)); letter-spacing: 0.06em; }
.top a:focus-visible { outline-offset: 4px; }
.top a:hover, .top a[aria-current] { text-decoration: underline 1px rgb(var(--accent) / 0.45); text-underline-offset: 0.28em; }
@media (min-width: 1100px) { .top { padding-inline: max(var(--pad), (100vw - var(--frame)) / 2 + var(--pad)); } }
/* anchors land below the header, not under it */
[id] { scroll-margin-top: 4rem; }

/* block 1's contrast: two systems, two lines */
.pair { margin-top: var(--space-flow); display: grid; grid-template-columns: 9ch minmax(0, 1fr); column-gap: 1ch; row-gap: 0.6em; border-block: 1px solid rgb(var(--ink) / var(--a-hair)); padding-block: 0.8em; }
.pair dt { --fg: rgb(var(--accent) / var(--a-display)); color: var(--fg); }
.pair dd { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); }
.pair + .pl { margin-top: var(--space-flow); }

/* the cost of staying: four columns on the desktop; on a phone each row a block of its own */
.mv table.cost { margin-block: var(--space-flow); }
.mv table.cost caption { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); }
.mv table.cost th[scope="row"] { --fg: rgb(var(--accent) / var(--a-display)); color: var(--fg); }
.mv table.cost td:not(:last-child) { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); text-align: right; white-space: nowrap; }
.mv table.cost thead th:not(:first-child):not(:last-child) { text-align: right; }
.mv table.cost.num :is(td, th):last-child { text-align: left; padding-left: 3ch; }
.mv .qual { --fg: rgb(var(--ink) / var(--a-display)); }
@media (max-width: 759.98px) {
  .mv table.cost thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mv table.cost tr { display: grid; grid-template-columns: 7ch 1fr 1fr; column-gap: 1ch; padding-block: 0.45em; border-top: 1px solid rgb(var(--ink) / var(--a-hair)); }
  .mv table.cost.num tr > :is(th, td) { border: 0; padding: 0; text-align: left; }   /* tr: out-ranks the number table's right alignment */
  .mv table.cost td:last-child { grid-column: 2 / -1; }
  .mv table.cost td:nth-child(2)::after { content: " stall"; }
  .mv table.cost td:nth-child(3)::after { content: " of scrolls"; }
}

/* the friction sequence (/how-it-works/ block 3): six steps, numbered, on the install flow's spine */
.seq { list-style: none; counter-reset: s; margin-block: calc(var(--lead) * 0.85em); }
.seq li { counter-increment: s; display: grid; grid-template-columns: 3ch minmax(0, 1fr); column-gap: 1ch; }
.seq li::before { content: counter(s); --fg: rgb(var(--accent) / var(--a-display)); color: var(--fg); }
.seq li + li { margin-top: calc(var(--lead) * 0.4em); }
.mv .seq li { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); }
.mv .seq + p { margin-top: calc(var(--lead) * 0.85em); }

/* ---------- the hero's feed panel (js/hero.js) ----------
   A phone-shaped panel: a feed of generative posts, the gestures drawn over it, the grey tell along
   the top. The figcaption is the closing message and the panel's resting state: it is what shows
   without JS, with reduced motion, before a run and after it. Everything inside is sized in the
   panel's own width (cqw). Nothing here carries will-change: a run's Web Animations promote what
   they animate while they run, and are cancelled at the end. */
.fp {
  position: relative;
  width: 100%; max-width: 440px; aspect-ratio: 4 / 5;
  overflow: hidden; contain: paint;
  background: var(--screen);
  border: 1px solid rgb(var(--accent) / 0.15);
  container-type: inline-size;
}
@media (min-width: 1100px) { .fp { width: auto; max-width: none; height: min(max(680px, var(--bs) * 57), 82svh); aspect-ratio: 9 / 16; } }
.fp-stage, .fp-stage > *, .fp-feedwrap { position: absolute; inset: 0; }
.fp-stage { overflow: hidden; }
.fp-stage > .fp-tell { inset: 0 0 auto 0; height: 2px; z-index: 50; background: rgb(var(--tell)); opacity: 0; }
.fp-stage > .fp-feedwrap { z-index: 10; overflow: hidden; }
.fp-feed, .fp-post { position: absolute; inset: 0; }
/* every element a run animates rests on a 2D transform of its own starting value: the animation then
   changes a transform rather than adding one (adding one makes the element a containing block, which
   is a layout), and a 2D transform at rest does not promote a layer */
.fp-feed { transform: translate(0, 0); }
.fp-sw .mv { transform: translate(0, 0) rotate(0deg) translate(0, 0); }
.fp-tp { transform: translate(0, 0) scale(0.4); }
.fp-sw .tr { transform: scaleY(1); transform-origin: 50% 0; }
.fp-stats em { transform: scale(1); }
.fp-stage > .fp-hook { transform: translate(0, 15px); }
/* promotion scoped to a run: js/hero.js sets .fp-run while its animations exist and removes it when
   they are cancelled, so these layers live for the run's 11.5 seconds and no longer. Without it each
   gesture is first painted the moment its animation starts, mid-run. */
.fp-run :is(.fp-feed, .fp-sw .mv, .fp-sw .tr.vary, .fp-tp, .fp-hook, .fp-tell, .fp-jump, .fp-grid, .fp-bar i, .fp-stats em.hit) { will-change: transform, opacity; }
.fp-run .fp-close { will-change: opacity; }
/* each post is the panel's size and offset by whole panels, so the feed's percentages are panels */
.fp-post { overflow: hidden; background: var(--screen); transform: translate(0, calc(var(--n) * 100%)); }   /* 2D: a 3D transform would promote each post for good */
.fp-art { position: absolute; inset: 0; overflow: hidden; color: rgb(var(--accent)); }
.fp-art svg { display: block; width: 100%; height: 100%; }
.fp-art i { position: absolute; display: block; }
.fp-art.diag {
  background:
    repeating-linear-gradient(116deg, rgb(var(--accent) / 0.95) 0 12px, rgb(var(--accent) / 0.30) 12px 23px, transparent 23px 96px),
    linear-gradient(168deg, rgb(var(--art-moss)) 0%, rgb(var(--art-pit)) 100%);
}
.fp-art.bars { background: repeating-linear-gradient(90deg, rgb(var(--accent) / 0.88) 0 2px, transparent 2px 9px), var(--screen); }
.fp-art.bars::after, .fp-art.moire::after, .fp-art.bands::after { content: ""; position: absolute; inset: 0; }
.fp-art.bars::after {
  background:
    linear-gradient(90deg, var(--screen) 0%, transparent 13%, transparent 87%, var(--screen) 100%),
    linear-gradient(0deg, var(--screen) 1%, transparent 20%, transparent 74%, var(--screen) 97%);
}
.fp-art.solid .blob { left: -24%; top: 14%; width: 108%; aspect-ratio: 1; background: rgb(var(--accent)); border-radius: 50%; }
.fp-art.solid .slit { left: -10%; width: 124%; height: 1.9%; background: var(--screen); }
.fp-art.solid .s1 { top: 30%; }
.fp-art.solid .s2 { top: 44%; }
.fp-art.solid .s3 { top: 61%; }
.fp-art.solid .rule { left: 0; right: 0; top: 77%; height: 1px; background: rgb(var(--accent) / 0.5); }
.fp-art.moire {
  background:
    radial-gradient(circle at center, rgb(var(--accent) / 0.95) 1.2px, transparent 1.5px) 0 0 / 19px 19px,
    radial-gradient(circle at center, rgb(var(--accent) / 0.55) 1.1px, transparent 1.4px) 4px 3px / 21px 21px,
    var(--screen);
}
.fp-art.moire::after {
  background:
    radial-gradient(ellipse 52% 30% at 36% 32%, rgb(0 0 0 / 0.96) 0%, rgb(0 0 0 / 0.5) 44%, transparent 78%),
    linear-gradient(200deg, rgb(0 0 0 / 0.6) 0%, transparent 40%);
}
.fp-art.bands { background: repeating-linear-gradient(0deg, rgb(var(--accent) / 0.82) 0 2px, transparent 2px 14px), linear-gradient(185deg, rgb(var(--art-bands)), var(--screen) 68%); }
.fp-art.bands::after { background: linear-gradient(0deg, var(--screen) 1%, transparent 32%, transparent 60%, var(--screen) 99%); }
/* the social furniture: a handle, a caption, three counters, a progress rule. Generic, unnamed. */
.fp-scrim { position: absolute; inset: auto 0 0 0; height: 34%; z-index: 4; background: linear-gradient(0deg, rgb(0 0 0 / 0.9) 0%, rgb(0 0 0 / 0.55) 38%, transparent 100%); }
.fp-meta { position: absolute; inset: auto 0 0 0; z-index: 5; padding: 0 5cqw 5.4cqw; line-height: 1.3; }
.fp-handle { font-size: 2.6cqw; color: rgb(var(--ink) / 0.22); }
.fp-cap { margin-top: 1.3cqw; font-size: 3.2cqw; color: rgb(var(--accent)); }
.fp-stats { position: absolute; right: 4.4cqw; top: 47%; z-index: 5; display: flex; flex-direction: column; gap: 3.8cqw; align-items: center; }
.fp-stats i { position: relative; display: block; width: 3.5cqw; height: 3.5cqw; background: rgb(var(--accent) / 0.58); border-radius: 1px; }
/* the counter answering: drawn lit on its own element, shown by opacity and scale */
.fp-stats em { position: absolute; inset: 0; border-radius: 1px; background: rgb(var(--accent)); box-shadow: 0 0 0 3px rgb(var(--accent) / 0.3); opacity: 0; }
.fp-stats b { display: block; margin-top: 1cqw; font-size: 2.2cqw; font-weight: 400; line-height: 1.2; color: rgb(var(--ink) / 0.48); }
.fp-bar { position: absolute; inset: auto 0 0 0; height: 1px; z-index: 6; background: rgb(var(--ink) / 0.12); }
.fp-bar i { display: block; height: 100%; background: rgb(var(--accent)); transform-origin: 0 50%; transform: scaleX(0); }
/* gestures: a swipe is a travelling point with a short trail; a tap a small ring and a centre dot */
.fp-stage > .fp-ges { z-index: 26; pointer-events: none; }
.fp-sw { position: absolute; left: 0; top: 0; width: 0; height: 0; }   /* a pool slot: where it draws is in its keyframes */
.fp-sw .mv, .fp-tp { opacity: 0; }
.fp-sw .mv { position: absolute; left: 0; top: 0; }
.fp-sw .tr { position: absolute; left: -2.5px; top: 0; width: 5px; height: calc(var(--d) * 0.66cqw); border-radius: 3px; background: linear-gradient(180deg, rgb(var(--ink) / 0.92) 0%, rgb(var(--ink) / 0.34) 42%, transparent 100%); }
.fp-sw .hd { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: rgb(var(--ink)); box-shadow: 0 0 0 3px rgb(var(--ink) / 0.2); }
/* the deliberate swipes that land are drawn heavier than the ones that are swallowed */
.fp-sw.strong .tr { left: -3.5px; width: 7px; background: linear-gradient(180deg, rgb(var(--ink)) 0%, rgb(var(--ink) / 0.48) 40%, transparent 100%); }
.fp-sw.strong .hd { left: -6.5px; top: -6.5px; width: 13px; height: 13px; box-shadow: 0 0 0 4px rgb(var(--ink) / 0.26); }
.fp-tp { position: absolute; left: 0; top: 0; width: 3.6cqw; height: 3.6cqw; margin: -1.8cqw 0 0 -1.8cqw; border: 1.5px solid rgb(var(--ink) / 0.78); border-radius: 50%; }
.fp-tp::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgb(var(--ink)); }
.fp-stage > .fp-hook { inset: 16% 0 auto 0; z-index: 30; text-align: center; font-size: 15cqw; letter-spacing: -0.065em; line-height: 1; color: rgb(var(--accent)); opacity: 0; }
.fp-stage > .fp-grain { z-index: 34; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(0 0 0 / 0.32) 0 1px, transparent 1px 3px); }
.fp-stage > .fp-grid { z-index: 36; background: var(--screen); display: grid; grid-template-columns: repeat(4, 1fr); align-content: center; gap: 7%; padding: 14% 12%; }
.fp-grid i { position: relative; display: block; aspect-ratio: 1; border: 1px solid rgb(var(--accent) / 0.24); border-radius: 25%; }
.fp-grid i::after { content: ""; position: absolute; inset: 32%; border: 1px solid rgb(var(--accent) / 0.32); border-radius: 2px; }
.fp-grid i.live { border-color: rgb(var(--accent)); background: rgb(var(--accent) / 0.1); }
.fp-grid i.live::after { background: rgb(var(--accent)); border-color: rgb(var(--accent)); }
.fp-stage > .fp-jump { z-index: 38; background: var(--screen); display: flex; align-items: center; justify-content: center; font-size: 2.8cqw; letter-spacing: 0.34em; color: rgb(var(--ink) / 0.48); opacity: 0; }
/* the closing message: the panel's resting state */
.fp-close {
  position: absolute; inset: 0; z-index: 39; background: var(--screen);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 7cqw; text-align: center;
}
.mv .fp-close p { --fg: rgb(var(--ink) / 0.6); color: var(--fg); font-size: max(12px, 3.6cqw); line-height: 1.65; margin: 0; }
.mv .fp-close p.hi { --fg: rgb(var(--accent)); }
.mv .fp-close p.fine { --fg: rgb(var(--ink) / 0.55); margin-top: max(14px, 4.2cqw); font-size: max(10px, 2.4cqw); letter-spacing: 0.04em; line-height: 1.9; }
.fp-replay { margin-top: 0.6em; font: inherit; color: rgb(var(--accent) / var(--a-link)); background: none; border: 0; cursor: pointer; }

/* ---------- selection, focus ---------- */
::selection { background: rgb(var(--accent) / 0.20); color: rgb(var(--ink)); }   /* ink on the highlight: 10.9:1 */
:focus-visible { outline: 1px solid rgb(var(--accent)); outline-offset: 3px; }

/* ---------- the rail: scroll position, driven by the scroll itself (no JS) ---------- */
.rail { display: none; }
@supports (animation-timeline: scroll()) {
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; }
  .rail {
    display: block;
    position: fixed; right: 9px; top: 22svh; bottom: 22svh; width: 1px; z-index: 2;
    background: rgb(var(--ink) / var(--a-rail));
    pointer-events: none;
  }
  /* the i is the rail's full height and moves by transform, a percentage of its own height, so the
     dot at its top travels the rail without a layout shift (animating top was one per frame) */
  .rail i {
    position: absolute; inset: 0;
    animation: rail linear both;
    animation-timeline: scroll(root block);
  }
  .rail i::before {
    content: ""; position: absolute; right: -1.5px; top: -2px; width: 4px; height: 4px;
    border-radius: 50%;
    background: rgb(var(--accent));
    box-shadow: 0 0 9px rgb(var(--accent) / 0.45);
  }
  @keyframes rail { from { transform: translateY(0); } to { transform: translateY(100%); } }
  @media (min-width: 760px) { .rail { right: 26px; } }
}

/* ---------- 404 ---------- */
.mv-404 { padding-top: 36svh; }
.mv-404 a { color: rgb(var(--accent) / var(--a-display)); text-underline-offset: 0.25em; }

/* ---------- the deep page (/how-it-works/). denser than VI: argument, then reference (tables,
   figures, permissions, the trace). ---------- */
.deep .dv-1 { padding-top: var(--space-group); }
.deep .dv-1 h2 { margin-top: var(--space-section); }
/* the plain layer: six sentences, no numbers, before the two systems */
.deep .dv-1 .pl + .pl { margin-top: calc(var(--lead) * 0.3em); }
/* each block of the long page opens on a hairline, its number on it */
.deep .mv + .mv { margin-top: var(--space-section); padding-top: var(--space-flow); border-top: 1px solid rgb(var(--ink) / var(--a-hair)); }
.mv .bn { --fg: rgb(var(--accent) / var(--a-display)); color: var(--fg); letter-spacing: 0.06em; }
.mv .bn + :is(h1, h2) { margin-top: calc(var(--space-flow) / 2); }
@media (min-width: 1100px) {
  .mv .bn + :is(h1, h2) { margin-top: 0; }
  /* on the frame the hairline spans the content columns, not the gutters */
  .deep .mv + .mv { border-top: 0; }
  .deep .mv + .mv::before { content: ""; grid-column: text-start / aside-end; grid-row: 1; height: 1px; margin-top: calc(-1 * var(--space-flow)); background: rgb(var(--ink) / var(--a-hair)); }
}
.deep .mv { --lead: 1.38; }
.deep .mv p + p, .deep .mv :is(table, dl, figure) + p, .deep .mv p + :is(table, dl, figure) { margin-top: var(--space-flow); }
.deep .mv :is(h1, h2) + :is(p, table, dl, figure, ol) { margin-top: var(--space-flow); }
.deep .mv h2 > :only-child { display: inline; }

.mv .alert { --fg: rgb(var(--alert)); color: var(--fg); }   /* the one red: the terminal tell, named */

.mv table {
  --fg: rgb(var(--ink) / var(--a-body));
  color: var(--fg);
  width: 100%;
  border-collapse: collapse;
  font: inherit;
  margin-block: calc(var(--lead) * 0.8em);
}
.mv caption { caption-side: top; text-align: left; padding-bottom: 0.5em; }
.mv th { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); font-weight: 400; text-align: left; }
.mv :is(th, td) { padding: 0.25em 1.2ch 0.25em 0; vertical-align: top; border-top: 1px solid rgb(var(--ink) / var(--a-hair)); }
.mv :is(th, td):last-child { padding-right: 0; }   /* a right-aligned last column ends on the table's edge, with its rules */
.mv table.num td:not(:first-child), .mv table.num th:not(:first-child) { text-align: right; }


.perm { margin-block: calc(var(--lead) * 0.8em); }
.perm dt { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); }
.perm dt + dd { --fg: rgb(var(--ink) / var(--a-body)); color: var(--fg); margin: 0 0 0.6em 2ch; }
.perm dt code { overflow-wrap: anywhere; }

.trace { overflow-wrap: anywhere; }
.trace :is(td, th):first-child { white-space: nowrap; }   /* the section number: "14", never "1" over "4" */
/* the trace tables, and only they, take more width than the 78-character column on a wide screen;
   the heading and prose above them keep the column, so nothing on the page outgrows h1 */
.trace-wide { --w: min(132ch, 100vw - 2 * var(--pad)); width: var(--w); margin-inline: calc((100% - var(--w)) / 2); }
.trace caption { --fg: rgb(var(--ink) / var(--a-display)); color: var(--fg); padding-top: 1.2em; }
.dv-7 > p { --fg: rgb(var(--ink) / var(--a-body)); color: var(--fg); }

@media (max-width: 759.98px) {
  /* each row a stacked block: section number in the margin, claim, source, symbol, value */
  .trace thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .trace tr { display: grid; grid-template-columns: 3ch 1fr; padding: 0.45em 0; border-top: 1px solid rgb(var(--ink) / var(--a-hair)); }
  .trace td { display: block; border: 0; padding: 0; grid-column: 2; }
  .trace td:first-child { grid-column: 1; grid-row: 1 / span 4; }
}
@media (min-width: 760px) {
  .deep .mv { --lead: 1.32; }
}
