/* cloudflareworld: the landing page.
   Refined Terminal: ink and paper, 1px rules, mono everywhere it labels,
   one teal signal (the platform's theme, /theme.css). Box titles sit in their borders (TUI), labels run
   into dotted leaders, and a status bar runs along the bottom (Mainframe). */

@font-face { font-family: "Display"; src: url("/display.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Mono"; src: url("/mono.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  /* The platform's theme (/theme.css), in this page's names. */
  --bg: var(--paper);
  --bg-2: var(--well);
  --dim: var(--mute);
  --line: var(--rule);
  --line-2: var(--rule-2);
  --signal: var(--sig);
  --signal-ink: var(--on-sig);
  --signal-soft: var(--sig-bg);
  /* The page's own: the grid, the second accent, the globe's land. */
  --grid: rgba(16, 17, 18, 0.045);
  /* The second accent: the palette's own warm one. */
  --accent: var(--warn);
  --land: var(--ink);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --sans: "Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --grid: rgba(233, 232, 228, 0.03); }
}
:root[data-theme="dark"] { --grid: rgba(233, 232, 228, 0.03); }
/* The platform's switch sits in the header (data-theme-switch), never in
   the corner; `t` flips light and dark, `p` the palette. */
body > .theme-switch:not(.inline) { display: none; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
/* Set pieces that slide in from, or sit partly beyond, the side (the globe,
   the story's windows) never widen the page. On <main>, not the root: a
   clipped root stops the story's stage from sticking. */
main { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    /* the blueprint grid behind the page (owner's design). */
    linear-gradient(var(--grid) 1px, transparent 1px), /* nosemgrep: minimal-gradients */
    linear-gradient(90deg, var(--grid) 1px, transparent 1px); /* nosemgrep: minimal-gradients */
  background-size: 48px 48px;
  pointer-events: none;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 1; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.86em; padding: 1px 6px; border: 1px solid var(--line-2); background: var(--panel); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.fig-n { color: var(--signal); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }

/* ---- headings: mono, tight, heavy */
h1, h2, h3 { font-family: var(--mono); font-weight: 700; margin: 0; }
h1 { font-size: clamp(36px, 5.3vw, 78px); line-height: 1.0; letter-spacing: -0.055em; }
h2 { font-size: clamp(34px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -0.05em; }
h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.15; letter-spacing: -0.035em; }
h1 em, h2 em { font-style: normal; color: var(--signal); }

/* ---- scroll progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(0); }

/* ---- top bar */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: 56px;
  display: flex; align-items: center; gap: 24px;
  padding-inline: var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--line-2);
}
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 15px/1 var(--mono); letter-spacing: -0.02em; }
.mark .cw-logo { flex: none; width: 36px; height: 36px; }
.mark b { color: var(--signal); }
.nav { display: flex; gap: 0; margin-left: 12px; border-left: 1px solid var(--line); }
.nav a { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); text-decoration: none; padding: 21px 14px; border-right: 1px solid var(--line); }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.clock { font-size: 12px; color: var(--dim); }
.clock [data-clock] { color: var(--ink); }
.theme { display: grid; place-items: center; width: 34px; height: 34px; background: transparent; color: var(--ink); border: 1px solid var(--line-2); cursor: pointer; font-size: 15px; }
.theme:hover { border-color: var(--ink); }

/* ---- the globe, the opening scene's backdrop */
.globe { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.globe:active { cursor: grabbing; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 24px; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 10px; border: 1px solid var(--line-2); background: var(--panel); }
.dot { width: 7px; height: 7px; background: var(--signal); animation: blink 2.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.lead { margin: 22px 0 0; font-size: clamp(14px, min(1.25vw, 2.2vh), 18px); line-height: 1.55; color: var(--ink-2); max-width: 600px; text-wrap: pretty; }
.readout { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin: 28px 0 0; border-top: 1px solid var(--line-2); }
.readout > div { padding: 14px 12px 4px; border-right: 1px solid var(--line); }
.readout > div:first-child { padding-left: 0; }
.readout > div:last-child { border-right: 0; }
.readout dt { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.readout dd { margin: 6px 0 0; font-size: clamp(20px, 2vw, 30px); font-weight: 700; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.readout > div:last-child dd { color: var(--signal); }

/* ---- the story: one stage pinned while the scroll plays five scenes.
   The Wasm sets --in, --out and --t on each scene (and --k on its parts);
   everything here moves by transform and opacity only. Without it, or
   with reduced motion, the scenes stand in a plain column. */
/* The hero: a pre-rendered ASCII clip (hero.rs, media/) below the fixed
   bar, always 16:9, on the clips' own dark ground whatever the theme; the
   headline boxed over its corner, the lede under it. Without the Wasm, a
   still of it. */
.hero { padding-top: 56px; border-bottom: 1px solid var(--line-2); }
.hero-clip { position: relative; background: #0f1f19 url(/hero.jpg) center / cover no-repeat; }
.js .hero-clip { background: #0f1f19; }
.hero-stage { position: relative; width: min(100%, calc((100svh - 56px) * 16 / 9)); aspect-ratio: 16 / 9; margin-inline: auto; }
.hero-v { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.25s ease; }
.hero-v.on { opacity: 1; }
/* The hero's clip leaves room for the lede's first lines on the first screen. */
.hero .hero-stage { width: min(100%, calc((100svh - 236px) * 16 / 9)); }
:root:not(.js) .hero-stage { visibility: hidden; }
/* The clip and its colours: a key strip in the clip's top corner. */
.hero-ctl { position: absolute; top: var(--gutter); right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); z-index: 1; display: flex; align-items: stretch; border: 1px solid var(--line-2); background: var(--bg); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.hero-ctl button { appearance: none; border: 0; background: none; color: var(--dim); font: inherit; letter-spacing: inherit; text-transform: inherit; padding: 8px 12px; cursor: pointer; }
.hero-ctl button:hover { color: var(--ink); }
.hero-ctl button[aria-pressed="true"] { color: var(--signal-ink); background: var(--signal); }
.hero-ctl button:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
:root:not(.js) .hero-ctl { display: none; }
/* The interludes: a full-bleed ASCII clip between sections (hero.rs), a
   line set over its corner like the hero's headline. */
.interlude { position: relative; margin: 0; border-bottom: 1px solid var(--line-2); background: #0f1f19; }
.interlude .hero-stage { width: min(100%, calc(100svh * 16 / 9)); }
.interlude-say { position: absolute; left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); bottom: var(--gutter); max-width: min(760px, calc(100% - 2 * var(--gutter))); margin: 0; padding: 18px 26px 22px; background: var(--bg); border: 1px solid var(--line-2); font: 600 clamp(26px, 3.4vw, 54px) / 1.08 var(--mono); letter-spacing: -0.02em; text-wrap: balance; }
.interlude-say em { font-style: normal; color: var(--signal); }
.interlude-say .fig-n { display: block; margin-bottom: 12px; font-weight: 400; letter-spacing: 0.08em; }
:root:not(.js) .interlude { display: none; }
.hero-box { position: absolute; left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); bottom: var(--gutter); max-width: min(720px, calc(100% - 2 * var(--gutter))); padding: 24px 32px 30px; background: var(--bg); border: 1px solid var(--line-2); }
.hero-box .kicker { margin-bottom: 20px; }
.hero h1 { margin: 0; font-size: clamp(32px, min(4.6vw, 8vh), 72px); overflow-wrap: break-word; }
.hero-under { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: end; padding-block: 40px 56px; }
.hero-under .lead { margin: 0; max-width: 720px; }
.hero-under .sublead { margin: 0; justify-self: end; text-align: right; }
.story { border-bottom: 1px solid var(--line-2); }
.js .story:not(.still) { height: calc(7 * 130svh + 100svh); }
.js .story:not(.still) .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.js .story:not(.still) .scene {
  position: absolute; left: 0; right: 0; top: 56px; bottom: 76px; margin-inline: auto; max-width: var(--max);
  opacity: calc(var(--in, 0) * (1 - var(--out, 0)));
  transform: translateY(calc((1 - var(--in, 0)) * 56px - var(--out, 0) * 56px));
  pointer-events: none; will-change: opacity, transform;
}
.js .story:not(.still) .scene.now { pointer-events: auto; }
.scene { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(28px, 4vw, 64px); align-items: center; padding: 24px var(--gutter); }
.story.still .scene, :root:not(.js) .story .scene { padding-block: 96px; border-top: 1px solid var(--line); }
.scene > * { min-width: 0; }
.scene h2 { font-size: clamp(26px, min(3.6vw, 6.4vh), 56px); }
.scene-text > p:not(.num):not(.kicker):not(.lead):not(.measure):not(.sublead) { margin: 22px 0 0; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; color: var(--ink-2); max-width: 560px; text-wrap: pretty; }
/* A part shows once its scene's progress passes its threshold. */
.scene [data-k] { --on: clamp(0, (var(--t, 1) - var(--k, 0)) * 7, 1); }

/* the beats: where in the story you are */
.beats { position: absolute; left: 0; right: 0; bottom: 44px; z-index: 2; display: flex; justify-content: center; gap: 6px; margin: 0; padding: 0 var(--gutter); list-style: none; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.beats li { display: flex; flex-direction: column; gap: 5px; min-width: 0; width: 112px; color: var(--dim); cursor: pointer; }
.beats li::before { content: ""; height: 2px; background: var(--line-2); }
.beats li.on { color: var(--ink); }
.beats li.on::before { background: var(--signal); }
.story.still .beats, :root:not(.js) .story .beats { display: none; }

/* scene 1: the edge */
.s-edge .globe-fig { position: absolute; margin: 0; right: max(-8vw, -140px); top: 50%; width: min(84vh, 58vw); aspect-ratio: 1; transform: translateY(-50%) translateX(calc(var(--t, 0) * 18%)) scale(calc(1 + var(--t, 0) * 1.4)); opacity: calc(1 - var(--t, 0) * 0.82); z-index: 0; }
.s-edge .scene-text { position: relative; z-index: 1; }
/* Nothing over the globe takes the pointer: it measures anywhere on it. */
.s-edge .scene-text, .s-edge .route { pointer-events: none; }
.s-edge .lead, .s-edge .sublead { opacity: calc(1 - var(--t, 0) * 1.6); }
.route { position: relative; z-index: 1; margin: 0; grid-column: 2; width: 100%; opacity: clamp(0, (var(--t, 0) - 0.03) * 8, 1); transform: translateY(calc((1 - clamp(0, (var(--t, 0) - 0.03) * 8, 1)) * 24px)); }
.route-svg { display: block; width: 100%; height: auto; overflow: visible; }
.route-line { fill: none; stroke: var(--signal); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--on)); }
.hop { opacity: var(--on); }
.hop rect { fill: var(--panel); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hop text { fill: var(--ink); font: 600 15px var(--mono); }
.hop .kind { fill: var(--signal); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.route-dot { fill: var(--signal); }
.route-say { position: relative; list-style: none; margin: 18px 0 0; padding: 0; min-height: 3.4em; font-size: 13px; line-height: 1.6; color: var(--ink); }
.route-say li { display: none; }
.route-say li::before { content: "> "; color: var(--signal); }
.route-say li.now { display: block; animation: say 0.3s ease both; }
@keyframes say { from { opacity: 0; transform: translateY(6px); } }
.story.still .route-say li, :root:not(.js) .route-say li { display: block; animation: none; }

/* scene 2: everything its own */
.whys { margin: 26px 0 0; display: grid; gap: 0; font-size: 12px; }
.whys div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 8px 0; border-top: 1px dotted var(--line-2); opacity: var(--on); transform: translateX(calc((1 - var(--on)) * -16px)); }
.whys dt { color: var(--signal); text-transform: uppercase; letter-spacing: 0.06em; }
.whys dd { margin: 0; color: var(--ink-2); }
/* ---- scene 01's bill of materials (domains helper): tractor-feed paper
   comes out of the printer a line at a time with the scene's --t (each
   line's height is its --on), then each rented line is struck for what's
   built here and the total drops. Done, the paper is cut. */
/* Its full height is kept from the start, so the printer stays put while
   the paper grows: the slot, and 14 lines. */
.receipt { --lh: 2.05em; --slot: 36px; position: relative; margin: 0; width: min(100%, 520px); min-height: calc(var(--slot) + 14 * var(--lh) + 4px); justify-self: center; font-size: 12px; }
.rc-slot { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: var(--slot); padding: 0 14px 2px; background: var(--ink); color: var(--bg); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; }
.rc-slot i { flex: 1; height: 1px; background: var(--bg); opacity: 0.4; }
.rc-slot::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; background: var(--bg-2); }
.rc-paper { list-style: none; position: relative; margin: 0 12px; padding: 4px 0 0; background: var(--panel); border-inline: 1px solid var(--line-2); color: var(--ink); }
/* The tractor feed: a hole each side of every line, inside a perforation. */
.rc-paper::before, .rc-paper::after { content: ""; position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--line-2); }
.rc-paper::before { left: 26px; }
.rc-paper::after { right: 26px; }
.rc-l { position: relative; display: flex; align-items: baseline; gap: 8px; height: calc(var(--on) * var(--lh)); line-height: var(--lh); padding-inline: 38px; overflow: hidden; white-space: nowrap; }
.rc-l::before, .rc-l::after { content: ""; position: absolute; top: calc(var(--lh) / 2 - 4px); width: 8px; height: 8px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--bg); }
.rc-l::before { left: 9px; }
.rc-l::after { right: 9px; }
.rc-c { justify-content: center; }
.rc-h { font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.rc-d { color: var(--dim); font-size: 10px; letter-spacing: 0.04em; }
.rc-dots { flex: 1; min-width: 10px; border-bottom: 1px dotted var(--line-2); }
.rc-rule .rc-dots, .rc-cut .rc-dots { align-self: center; border-bottom: 1px dashed var(--dim); }
.rc-x { display: flex; flex: 1; align-items: baseline; gap: 8px; min-width: 0; }
.rc-item { position: relative; overflow: hidden; text-overflow: ellipsis; opacity: calc(1 - var(--on) * 0.5); }
.rc-item::after { content: ""; position: absolute; left: 0; right: 0; top: 52%; height: 1px; background: var(--ink); transform: scaleX(var(--on)); transform-origin: left; }
.rc-v { display: grid; justify-items: end; }
.rc-v > * { grid-area: 1 / 1; }
/* The price leaves before the label lands, so the two never overlap. */
.rc-v s { text-decoration: none; opacity: clamp(0, 1 - var(--on) * 2, 1); transform: translateY(calc(var(--on) * -1em)); }
.rc-v b { display: inline-flex; align-items: center; gap: 6px; color: var(--signal); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; opacity: clamp(0, var(--on) * 2 - 1, 1); transform: translateY(calc((1 - var(--on)) * 1em)); }
.rc-sum { font-weight: 700; }
.rc-sum .rc-v s { position: relative; opacity: calc(1 - var(--on) * 0.5); transform: none; }
.rc-sum .rc-v s::after { content: ""; position: absolute; left: -2px; right: -2px; top: 52%; height: 1px; background: var(--ink); transform: scaleX(var(--on)); transform-origin: left; }
.rc-total { font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.rc-total .rc-item { opacity: 1; }
.rc-total .rc-item::after { content: none; }
.rc-total b { padding: 0 6px; background: var(--signal); color: var(--signal-ink); line-height: 1.6; }
.rc-cut { align-items: center; color: var(--dim); }
.rc-cut .i { font-size: 14px; }
/* The stamp, once every line is struck: on the torn edge, over nothing but the cut line. */
.rc-stamp { position: absolute; left: auto; right: 8%; top: calc(100% - 16px); margin: 0; padding: 6px 12px; border: 2px solid var(--signal); color: var(--signal); font-size: 13px; font-weight: 700; line-height: 1.35; text-align: center; text-transform: uppercase; letter-spacing: 0.14em; opacity: var(--on); transform: rotate(-7deg) scale(calc(1.5 - var(--on) * 0.5)); pointer-events: none; }
@media (max-width: 900px) {
  .receipt { --lh: 1.85em; --slot: 30px; font-size: 11px; }
  .rc-paper { margin: 0 6px; }
  .rc-paper::before { left: 20px; }
  .rc-paper::after { right: 20px; }
  .rc-l { padding-inline: 28px; gap: 6px; }
  .rc-l::before { left: 6px; }
  .rc-l::after { right: 6px; }
  .rc-v b { font-size: 10px; letter-spacing: 0.02em; }
  .rc-v b .i { display: none; }
  .rc-slot { padding-inline: 12px; }
  .rc-stamp { font-size: 11px; right: 6%; }
}
/* ---- end of scene 01's bill of materials */

/* scene 3: rust, top to bottom */
.tally { margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-2); }
.tally div { padding: 14px 0 0; }
.tally div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.tally dt { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.tally dd { margin: 6px 0 0; font-size: clamp(30px, 3.4vw, 54px); font-weight: 700; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.tally .zero { color: var(--signal); }
/* ---- scene 03, the repo map (repo.rs, /repo.txt from tools/repo_map.py):
   each domain a block, each file a run of glyph cells (Rust █▓, styles and
   markup ░, Terraform ▒, config :, JavaScript ▚), sized in the map's own
   font (--fs, --cw: set to fit). The blocks sweep in with the scene; a
   pointer lights a file, the filter its matches. Beside it, the semgrep
   rules typed in as their self-test runs. */
.sg { margin: 22px 0 0; padding: 10px 14px 12px; border: 1px solid var(--line-2); background: var(--well); font-size: 11px; line-height: 1.6; }
.sg-cmd { margin: 0 0 6px; color: var(--ink); }
.sg-cmd b, .repo-js b { color: var(--signal); font-weight: 600; }
.sg ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
.sg li { display: grid; grid-template-columns: minmax(0, 1fr) 5ch; gap: 10px; color: var(--ink-2); clip-path: inset(0 calc((1 - var(--on)) * 100%) 0 0); }
.sg li b { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg li span { color: var(--signal); text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; text-align: right; }
.sg li span.info { color: var(--dim); }
.sg-end { margin: 6px 0 0; color: var(--ink-2); opacity: var(--on); overflow-wrap: anywhere; }
.sg-end b { color: var(--signal); }
.repo .term-top { align-items: center; gap: 14px; }
.repo-q { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.repo-q b { color: var(--signal); font-weight: 600; flex: none; }
.repo-q input { flex: 1; min-width: 0; appearance: none; border: 0; border-bottom: 1px dotted var(--line-2); border-radius: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; padding: 2px 0; outline: none; }
.repo-q input:focus { border-bottom: 1px solid var(--signal); }
.repo-q input::placeholder { color: var(--dim); }
.repo-n { color: var(--dim); white-space: nowrap; }
.repo-map { position: relative; margin: 14px 14px 10px; height: calc(var(--rows, 26) * var(--fs, 10px)); font: 400 var(--fs, 10px) / 1 Menlo, Consolas, "DejaVu Sans Mono", "Noto Sans Mono", monospace; }
.rb { position: absolute; left: calc(var(--x) * var(--cw, 6px)); top: calc(var(--y) * var(--fs, 10px)); width: calc(var(--w) * var(--cw, 6px)); height: calc(var(--h) * var(--fs, 10px)); overflow: hidden; clip-path: inset(0 0 calc((1 - var(--on, 1)) * 100%) 0); }
/* The blocks' edges: a hairline of the ground over their glyphs. */
.rb::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--well); pointer-events: none; }
.rb p { margin: 0; height: var(--fs, 10px); line-height: var(--fs, 10px); white-space: pre; overflow: hidden; }
.rb-name { position: absolute; left: 1px; top: 1px; padding: 0 5px; background: var(--well); color: var(--ink); font: 600 10px / 15px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; pointer-events: none; }
.repo-map span { cursor: crosshair; }
.g-rs { color: var(--signal); }
.g-web { color: var(--ink-2); }
.g-tf { color: var(--accent); }
.g-cfg { color: var(--dim); }
.g-js { color: var(--accent); }
.repo-map .g-js { color: var(--well); background: var(--accent); }
.repo-map.filtering span { opacity: 0.16; }
.repo-map.filtering span.lit { opacity: 1; }
.repo-map span.on, .repo-map.filtering span.on { opacity: 1; color: var(--ink); background: var(--signal-soft); }
.repo-read { margin: 0 14px; min-height: 18px; font: 500 11px / 18px var(--mono); color: var(--ink); white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.repo-read::before { content: "> "; color: var(--signal); }
.repo-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 14px 12px; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.repo-key b { margin-right: 6px; font-weight: 400; letter-spacing: 0; }
.repo-js { margin: 0; padding: 10px 14px 12px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.repo-js i { font-style: normal; color: var(--accent); }
:root:not(.js) .repo-map, :root:not(.js) .repo-q, :root:not(.js) .repo-read { display: none; }
@media (max-height: 880px) {
  .js .story:not(.still) .s-rust .scene-text > p:not(.num) { display: none; }
}
/* Phones: the rule being typed, the map and its line; the key, the .js
   listing and the window's dots stay for the wider screens. */
@media (max-width: 520px) {
  .s-rust .tally { margin-top: 12px; }
  .s-rust .tally div { padding-top: 8px; }
  .s-rust .tally dd { font-size: 30px; margin-top: 2px; }
  .s-rust .sg { margin-top: 12px; padding: 8px 10px; font-size: 10.5px; }
  .sg-cmd { margin-bottom: 2px; }
  .sg ol { display: block; }
  .js .story:not(.still) .sg li:not(.now) { display: none; }
  .sg li { clip-path: none; }
  .js .story:not(.still) .sg-end { display: none; }
  .repo .term-top > span:first-child, .repo-n, .repo-js { display: none; }
  .repo-key { gap: 2px 10px; margin: 0 10px 10px; font-size: 9px; }
  .rb-name { padding: 0 3px; font-size: 9px; letter-spacing: 0.02em; }
  .repo .term-top { padding: 8px 10px; }
  .repo-map { margin: 10px 10px 6px; }
  .repo-read { margin: 0 10px 10px; font-size: 10px; }
}

/* scene 4: windows that slide in, older ones stepping back */
.ship-say { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: s; }
.ship-say li { counter-increment: s; position: relative; padding: 10px 0 10px 40px; border-top: 1px dotted var(--line-2); font-size: clamp(14px, 1.05vw, 16px); line-height: 1.55; color: var(--ink-2); opacity: calc(0.35 + var(--on) * 0.65); }
.ship-say li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 11px; font: 500 12px var(--mono); color: var(--signal); }
.ship-say b { color: var(--ink); font-weight: 600; }
.windows { position: relative; margin: 0; aspect-ratio: 16 / 11; }
.win { position: absolute; left: 0; right: 0; top: 6%; margin: 0; border: 1px solid var(--line-2); background: var(--panel); box-shadow: 10px 10px 0 var(--line); overflow: hidden;
  opacity: clamp(0, var(--on, 0) * 5, 1);
  transform: translateX(calc((1 - var(--on, 0)) * 42%)) translateY(calc(var(--behind, 0) * -4%)) scale(calc(1 - var(--behind, 0) * 0.05));
  transform-origin: 50% 0; will-change: transform, opacity; }
.win-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; background: var(--panel); }
.win-bar i { display: inline-block; width: 9px; height: 9px; border: 1px solid var(--line-2); margin-right: 5px; }
/* ---- the app windows: mock-ups drawn after the apps, in HTML, so they wear
   the active palette in light and dark. Sized by the window (container
   units), so they stay sharp at any zoom. Made-up data. */
.win { container-type: inline-size; }
.app { --u: 1.72cqw; aspect-ratio: 16 / 10; overflow: hidden; font-size: var(--u); line-height: 1.5; color: var(--ink); background: var(--paper); text-transform: none; letter-spacing: 0; }
.app p { margin: 0; }
.app .i { width: 1.2em; height: 1.2em; vertical-align: -0.25em; }
.app .sig { color: var(--sig); }
.app em { font-style: normal; }
.a-top { display: flex; justify-content: space-between; align-items: center; padding: 0.9em 1.6em; border-bottom: 1px solid var(--rule); font-size: 1.05em; }
.a-top b { font-weight: 700; letter-spacing: 0.08em; }
.a-top span { display: inline-flex; gap: 0.5em; align-items: center; color: var(--mute); }
.a-top em { color: var(--ink); }
.a-top .crumb { margin-right: auto; margin-left: 0.6em; color: var(--ink); font-weight: 600; }
.a-body { padding: 1.1em 8% 0; }
.a-h { margin-top: 1.3em !important; font-size: 0.85em; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.a-h span { margin-left: 0.6em; color: var(--faint); }
.a-list { list-style: none; margin: 0.5em 0 0; padding: 0; border: 1px solid var(--rule); }
.a-list li { display: flex; align-items: center; gap: 0.8em; padding: 0.45em 0.8em; border-top: 1px solid var(--rule); }
.a-list li:first-child { border-top: 0; }
.a-list b { font-weight: 500; }
.a-list span { margin-left: auto; color: var(--mute); }
.a-list em { color: var(--sig); }
.app .add { color: var(--add); font-style: normal; }
/* chat */
.a-chat { display: grid; grid-template-columns: 4.4em 13em 1fr 11em; }
.c-rail { display: flex; flex-direction: column; align-items: center; gap: 0.7em; padding-top: 0.9em; border-right: 1px solid var(--rule); background: var(--well); }
.pic { display: inline-block; width: 1.8em; height: 1.8em; flex: none; background: var(--rule-2); }
.c-rail .pic { width: 2.7em; height: 2.7em; }
.c-rail .on { outline: 2px solid var(--sig); outline-offset: 2px; }
.c-rail .add { background: transparent; border: 1px dashed var(--rule-2); }
.p1 { background: var(--hf); } .p2 { background: var(--sig); } .p3 { background: var(--hn); } .p4 { background: var(--ha); } .p5 { background: var(--hm); } .p6 { background: var(--hf); } .p7 { background: var(--hn); } .p8 { background: var(--sig); } .p9 { background: var(--ht); }
.c-side { padding: 0.9em 0.9em 0; border-right: 1px solid var(--rule); background: var(--well); }
.c-server { font-weight: 700; padding-bottom: 0.7em; border-bottom: 1px solid var(--rule); }
.c-side .a-h { margin-top: 1em !important; }
.c-ch { display: flex; gap: 0.5em; align-items: center; padding: 0.25em 0.5em; color: var(--mute); }
.c-ch.on { color: var(--ink); background: var(--paper); border: 1px solid var(--rule-2); }
.c-ch em { margin-left: auto; padding: 0 0.4em; background: var(--sig); color: var(--on-sig); }
.c-in { display: flex; gap: 0.5em; align-items: center; padding: 0.15em 0 0.15em 1.6em; }
.c-in .pic { width: 1.4em; height: 1.4em; }
.c-in .live { margin-left: auto; padding: 0 0.3em; border: 1px solid var(--err); color: var(--err); font-size: 0.8em; text-transform: uppercase; }
.c-main { display: flex; flex-direction: column; gap: 0.75em; padding: 0 1.2em; min-width: 0; }
.c-head { display: flex; gap: 0.4em; align-items: center; margin: 0 -1.2em !important; padding: 0.9em 1.2em 0.7em; border-bottom: 1px solid var(--rule); font-weight: 700; }
.c-msg { display: flex; gap: 0.8em; }
.c-msg .pic { width: 2.4em; height: 2.4em; }
.c-msg span { margin-left: 0.6em; color: var(--faint); }
.c-msg.hl { margin: 0 -1.2em; padding: 0.4em 1.2em; background: var(--warn-bg); box-shadow: inset 2px 0 0 var(--warn); }
.c-msg em { padding: 0 0.2em; background: var(--sig-bg); color: var(--sig); }
.c-file { display: flex; gap: 0.7em; align-items: center; margin-left: 3.2em; padding: 0.6em 0.8em; border: 1px solid var(--rule-2); width: max-content; }
.c-file .i { width: 2em; height: 2em; color: var(--warn); }
.c-file span { color: var(--mute); }
.c-file b { color: var(--ink); }
.c-box { margin-top: auto !important; margin-bottom: 1em !important; padding: 0.6em 0.9em; border: 1px solid var(--rule-2); color: var(--faint); }
.c-members { padding: 0 0.9em; border-left: 1px solid var(--rule); }
.c-members p { display: flex; gap: 0.6em; align-items: center; padding: 0.2em 0; }
.c-members .off { color: var(--faint); }
.c-members .off .pic { opacity: 0.5; }
/* the launcher */
.a-apps .a-top .pic { width: 1.6em; height: 1.6em; }
.a-apps .l-btn { padding: 0.2em 0.7em; border: 1px solid var(--rule-2); color: var(--ink); }
.l-grid { list-style: none; margin: 0.4em 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em; }
.l-grid li { display: flex; flex-direction: column; gap: 0.3em; padding: 0.9em 1em; border: 1px solid var(--rule-2); background: var(--well); }
.l-row { display: flex; justify-content: space-between; align-items: center; }
.l-row .i { width: 1.8em; height: 1.8em; color: var(--sig); }
.l-row em { color: var(--faint); }
.l-grid b { font-size: 1.25em; font-weight: 700; }
.l-grid span { color: var(--mute); }
.l-go { display: flex; justify-content: space-between; margin-top: 0.4em !important; padding-top: 0.5em; border-top: 1px solid var(--rule); color: var(--sig); }
.l-go i { font-style: normal; color: var(--faint); }
/* ---- scene 05 (play): ytdl's clip maker, working (clipper.rs), in front;
   the launcher and chat smaller behind it, peeking out and alive. The
   dance and its filmstrip keep their own dark ground in any theme. */
.js .story:not(.still) .s-ship .windows { aspect-ratio: 16 / 11.5; }
.js .story:not(.still) .s-ship .w-clip { top: 10%; left: -8%; right: 7%; z-index: 3; transform: translateX(calc((1 - var(--on, 0)) * 42%)); }
.js .story:not(.still) .s-ship .w-apps { left: auto; right: -5%; width: 50%; top: -6%; z-index: 1; }
.js .story:not(.still) .s-ship .w-chat { left: auto; right: -5%; width: 52%; top: auto; bottom: -8%; z-index: 2; transform: translateX(calc((1 - var(--on, 0)) * 42%)); }
.k-live { margin-left: auto; padding: 1px 7px; border: 1px solid var(--signal); color: var(--signal); }
.app.a-clip { --u: 1.66cqw; aspect-ratio: auto; }
.a-clip:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.a-clip .a-body { padding: 1em 1.4em 1.2em; }
.a-clip button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-2); padding: 0.25em 0.7em; cursor: pointer; }
.a-clip button:hover { border-color: var(--ink); }
.a-clip button:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.k-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.2em; align-items: center; }
.k-player { position: relative; aspect-ratio: 16 / 9; background: var(--well) url(/dance-strip.jpg) 20.8% 0 / 2400% 100%; border: 1px solid var(--rule-2); overflow: hidden; cursor: pointer; }
.k-v { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.k-tc { position: absolute; left: 0.5em; bottom: 0.5em; display: flex; gap: 0.9em; padding: 0.15em 0.6em; background: var(--paper); border: 1px solid var(--rule-2); font-variant-numeric: tabular-nums; }
.k-tc b { font-weight: 600; }
.k-tc i { font-style: normal; color: var(--mute); }
.k-side { display: flex; flex-direction: column; gap: 0.55em; }
.k-pt { display: flex; align-items: center; gap: 0.5em; }
.k-pt button { min-width: 3.6em; }
.k-pt b { flex: 1; padding: 0.25em 0.6em; border: 1px solid var(--rule-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.k-pt.on b { border-color: var(--sig); color: var(--sig); }
.k-len em { color: var(--mute); font-variant-numeric: tabular-nums; }
.k-btns { display: flex; gap: 0.4em; }
.k-btns button { padding: 0.35em 0.6em; }
.k-pause, .a-clip.playing .k-play { display: none; }
.a-clip.playing .k-pause { display: inline; }
.k-strip { position: relative; height: 3.6em; margin-top: 1em; background: var(--well) url(/dance-strip.jpg) 0 0 / 100% 100%; border: 1px solid var(--rule-2); cursor: ew-resize; touch-action: none; }
.k-sel { position: absolute; top: -2px; bottom: -2px; left: 16.7%; width: 31.2%; border: 2px solid var(--sig); border-width: 2px 3px; pointer-events: none; }
.k-head { position: absolute; top: -0.5em; bottom: -0.5em; left: 16.9%; width: 2px; margin-left: -1px; background: var(--ink); pointer-events: none; }
.k-head::before { content: ""; position: absolute; top: 0; left: -0.35em; width: calc(0.7em + 2px); height: 0.5em; background: var(--ink); }
.k-ruler { display: flex; margin-top: 0.2em !important; font-size: 0.8em; color: var(--faint); }
.k-ruler span { flex: 0 0 13.44%; padding-left: 0.3em; border-left: 1px solid var(--rule-2); }
.k-ruler span:last-child { flex: 1; }
.k-row { display: flex; flex-wrap: wrap; gap: 0.6em; align-items: center; margin-top: 0.9em !important; color: var(--mute); }
.k-fmt.on { border-color: var(--sig); color: var(--sig); }
.k-gif.off { display: none; }
.k-msg { flex: 1; text-align: right; color: var(--err); }
.a-clip .k-go { background: var(--sig); border-color: var(--sig); color: var(--on-sig); font-weight: 600; padding-inline: 1.1em; }
.a-clip .k-go:disabled { opacity: 0.4; cursor: not-allowed; }
.a-clip .a-h { display: flex; }
.a-clip .a-h i { margin-left: auto; font-style: normal; font-weight: 400; letter-spacing: 0.02em; text-transform: none; color: var(--faint); }
.a-clip .a-list li { font-variant-numeric: tabular-nums; }
.k-thumb { flex: none; width: 3.4em; aspect-ratio: 16 / 9; background: var(--well) url(/dance-strip.jpg) 21.7% 0 / 2400% 100%; border: 1px solid var(--rule); }
.a-clip .a-list li.run em { color: var(--warn); }
.a-clip .a-list li.new { animation: k-new 1.2s ease-out; }
@keyframes k-new { from { background: var(--sig-bg); } }
/* The mocks behind: the launcher's tiles light in turn, chat's messages
   arrive one by one (only while the scene is on). */
.s-ship.now .w-apps .l-grid li { animation: l-lit 4.8s steps(1) infinite; }
.s-ship.now .w-apps .l-grid li:nth-child(2) { animation-delay: 1.2s; }
.s-ship.now .w-apps .l-grid li:nth-child(3) { animation-delay: 2.4s; }
.s-ship.now .w-apps .l-grid li:nth-child(4) { animation-delay: 3.6s; }
@keyframes l-lit { 0% { border-color: var(--sig); background: var(--sig-bg); } 25% { border-color: var(--rule-2); background: var(--well); } }
.s-ship.now .w-chat .c-msg, .s-ship.now .w-chat .c-file { animation: c-in 9s ease-out infinite both; }
.s-ship.now .w-chat .c-msg:nth-of-type(2) { animation-delay: 0.9s; }
.s-ship.now .w-chat .c-msg:nth-of-type(3) { animation-delay: 1.8s; }
.s-ship.now .w-chat .c-file { animation-delay: 2.5s; }
.s-ship.now .w-chat .c-msg:nth-of-type(5) { animation-delay: 3.4s; }
@keyframes c-in { 0% { opacity: 0; transform: translateY(0.8em); } 5%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.s-ship.now .w-chat .c-box::after { content: ""; display: inline-block; width: 0.5em; height: 1.1em; margin-left: 0.3em; vertical-align: -0.2em; background: var(--ink); animation: blink 1s steps(1) infinite; }
@media (max-width: 900px) {
  .js .story:not(.still) .s-ship .windows { aspect-ratio: auto; }
  .js .story:not(.still) .s-ship .w-clip { position: relative; top: 0; left: 0; right: 0; }
  .a-clip .k-thumb { display: none; }
  .a-clip .a-list li { gap: 0.6em; font-size: 0.92em; }
  .js .story:not(.still) .s-ship .w-apps, .js .story:not(.still) .s-ship .w-chat { display: none; }
  .app.a-clip { --u: 2.75cqw; }
  .a-clip .a-top { padding: 0.5em 1em; }
  .a-clip .a-body { padding: 0.7em 1em 0.8em; }
  .k-top { grid-template-columns: 1fr; gap: 0.6em; }
  .k-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5em; }
  .k-len { align-self: center; }
  .k-btns { justify-content: flex-end; }
  .k-strip { height: 3em; margin-top: 0.8em; }
  .k-ruler { display: none; }
  .a-clip .a-h i { display: none; }
  .a-clip .a-list li:nth-child(n + 2) { display: none; }
}
.story.still .windows, :root:not(.js) .story .windows { aspect-ratio: auto; display: grid; gap: 24px; }
.story.still .win, :root:not(.js) .story .win { position: relative; top: 0; opacity: 1; transform: none; }


/* ---- readouts: what a pointer (or a tap) measures, one style everywhere.
   Fixed-width text in a fixed-height line, so nothing beside it moves. */
.measure { margin: 0; min-height: 18px; font: 500 11px/18px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.measure::before { content: "> "; color: var(--signal); }
.measure { margin-top: 22px; position: relative; z-index: 1; }
.sublead { margin: 18px 0 0; font-size: 11px; color: var(--signal); text-transform: uppercase; letter-spacing: 0.08em; }

/* scene 3: domains */
/* ---- scene 02's domain map (domains helper): each domain's data, titled
   in its border. As the scene plays, chat's Worker binds identity's
   database (--b1), the guard fails it (--b2), and the contract passes
   (--b3). The game to play is #guard, after the story. */
.s-domains { --b1: clamp(0, (var(--t, 1) - 0.4) * 7, 1); --b2: clamp(0, (var(--t, 1) - 0.58) * 7, 1); --b3: clamp(0, (var(--t, 1) - 0.76) * 7, 1); }
.dmap { margin: 0; }
.dm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 8px; }
.dm-box { position: relative; min-width: 0; padding: 14px 10px 9px; border: 1px solid var(--line-2); background: var(--panel); font-size: 11px; line-height: 1.55; opacity: var(--on); transform: translateY(calc((1 - var(--on)) * 14px)); }
.dm-box > b { position: absolute; top: -0.8em; left: 7px; padding: 0 5px; background: var(--bg); color: var(--signal); font-size: 11px; line-height: 1.5; text-transform: uppercase; letter-spacing: 0.06em; }
.dm-box ul { list-style: none; margin: 0; padding: 0; }
.dm-box li { position: relative; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-2); }
.dm-box em { display: inline-block; width: 3ch; font-style: normal; color: var(--dim); }
.dm-c { position: relative; margin: 7px 0 0; padding-top: 5px; border-top: 1px dotted var(--line-2); color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
/* What the binding hits, then what it asks instead. */
.dm-hit::after, .dm-con::after { content: ""; position: absolute; inset: 0 -4px; border: 1px solid var(--err); background: var(--err-bg); opacity: calc(var(--b1) * (1 - var(--b3))); z-index: -1; }
.dm-box li.dm-hit { overflow: visible; }
.dm-con::after { border-color: var(--signal); background: var(--signal-soft); opacity: var(--b3); }
.dm-wire { display: grid; margin: 6px 0 0; font-size: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.dm-wire > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.dm-bad { color: var(--err); opacity: calc(var(--b1) * (1 - var(--b3))); }
.dm-good { color: var(--signal); opacity: var(--b3); }
.dm-verdict { display: grid; align-content: center; gap: 6px; }
.dm-verdict .dv { grid-area: 1 / 1; display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.dv-0 { color: var(--dim); opacity: calc(1 - var(--b2)); }
.dv-1 { color: var(--err); opacity: calc(var(--b2) * (1 - var(--b3))); }
.dv-2 { color: var(--signal); opacity: var(--b3); }
.dm-pend { margin: 0; color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.dm-pend b { color: var(--accent); }
.dm-run { display: grid; margin: 12px 0 0; min-height: 1.6em; font-size: 11px; }
.dm-run > span { grid-area: 1 / 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dm-run > span::before { content: "> "; color: var(--dim); }
.dm-go { margin-top: 20px; text-decoration: none; }
@media (max-width: 900px) {
  .dm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 6px; }
  .dm-box { padding: 11px 8px 6px; font-size: 10px; line-height: 1.45; }
  .dm-box > b { font-size: 10px; }
  .dm-c { margin-top: 4px; padding-top: 3px; font-size: 9px; }
  .dm-verdict .dv { font-size: 11px; }
  .dm-go { margin-top: 12px; }
}
.guard-say { list-style: none; margin: 20px 0 0; padding: 0; font-size: 12px; }
.guard-say li { padding: 7px 0 7px 22px; position: relative; border-top: 1px dotted var(--line-2); color: var(--ink-2); opacity: calc(0.3 + var(--on) * 0.7); }
.guard-say li::before { content: "›"; position: absolute; left: 4px; color: var(--signal); }
/* The guard, to play (guard.rs): a Worker chip dragged (or tapped, then
   its target tapped) onto any domain's data or contract; the wire stays,
   red where the guard failed it, and the terminal runs the test. */
.gg { border-bottom: 1px solid var(--line-2); padding-bottom: 88px; }
.gg-head { padding-block: 96px 44px; }
.gg-play { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.gg-board { position: relative; padding-top: 18px; }
.gg-map { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 12px; }
.gg-dom { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px 9px 9px; border: 1px solid var(--line-2); background: var(--panel); font-size: 11px; }
.gg-t { position: absolute; top: -0.8em; left: 7px; margin: 0; padding: 0 5px; background: var(--bg); color: var(--signal); font-size: 11px; line-height: 1.5; text-transform: uppercase; letter-spacing: 0.06em; }
.gg-ws { display: flex; flex-wrap: wrap; gap: 4px; }
.gg-w { appearance: none; padding: 6px 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font: 600 11px/1 var(--mono); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.gg-w::before { content: "› "; opacity: 0.6; }
.gg-w[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.gg-w:hover { border-color: var(--signal); }
.gg-data { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gg-x { appearance: none; display: block; width: 100%; padding: 3px 8px; border: 1px dashed transparent; background: none; color: var(--ink-2); font: 400 11px/1.4 var(--mono); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.gg-x em { display: inline-block; width: 3.4ch; font-style: normal; color: var(--dim); }
.gg-c { margin-top: auto; border: 1px solid var(--line-2); color: var(--signal); }
.gg.armed .gg-x { border-color: var(--line-2); }
.gg.armed .gg-c { border-style: solid; }
.gg-x:hover, .gg-x.over { border-style: solid; border-color: var(--ink); color: var(--ink); }
.gg-x.bad { border: 1px solid var(--err); background: var(--err-bg); color: var(--err); }
.gg-x.ok { border: 1px solid var(--signal); background: var(--signal-soft); color: var(--signal); }
.gg-x.hint { border: 1px solid var(--signal); animation: gg-hint 0.5s steps(1) 6; }
@keyframes gg-hint { 50% { border-color: transparent; } }
.gg-w:focus-visible, .gg-x:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.gg-stat { justify-content: flex-start; }
.gg-score { display: flex; gap: 18px; margin: 0; }
.gg-score span { display: flex; flex-direction: column; gap: 4px; color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.gg-score b { font: 700 28px/1 var(--mono); color: var(--ink); }
.gg-score span:first-child b { color: var(--err); }
.gg-score span:last-child b { color: var(--signal); }
.gg-read { margin: 0; min-height: 3em; color: var(--ink-2); font-size: 11px; line-height: 1.5; }
.gg-read::before { content: "> "; color: var(--signal); }
.gg-reset { align-self: flex-start; margin-top: auto; }
.gg-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gg-wires path { fill: none; stroke: var(--signal); stroke-width: 1.5; }
.gg-wires .w-bad { stroke: var(--err); stroke-dasharray: 5 3; }
.gg-wires .w-live { stroke: var(--ink); stroke-dasharray: 2 3; }
.gg-wires rect { fill: var(--signal); }
.gg-wires .w-bad + rect, .gg-wires rect.w-bad { fill: var(--err); }
.gg-wires rect.w-live { fill: var(--ink); }
.gg-term { display: flex; flex-direction: column; min-width: 0; margin: 0; border: 1px solid var(--line-2); background: var(--well); }
.gg-out { flex: 1; min-height: 380px; contain: size; margin: 0; padding: 14px 16px 18px; overflow: auto; font-size: 11.5px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.gg-out .p { color: var(--signal); }
.gg-out .d { color: var(--dim); }
.gg-out .bad { color: var(--err); }
.gg-out .good { color: var(--signal); }
.gg-out .add { color: var(--add); }
.gg-out .cur { display: inline-block; width: 7px; height: 1.1em; vertical-align: -0.2em; background: var(--ink); animation: blink 1s steps(1) infinite; }
.gg-pending { margin-top: 28px; border: 1px solid var(--line-2); background: var(--panel); }
.gg-ph { display: flex; align-items: baseline; gap: 12px; margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line-2); color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.gg-ph b { font-size: 22px; line-height: 1; color: var(--accent); }
.gg-src { margin-left: auto; text-transform: none; letter-spacing: 0; }
.gg-pending ol { list-style: none; margin: 0; padding: 0; }
.gg-pending li { display: grid; grid-template-columns: 220px 100px minmax(0, 1fr); gap: 12px; padding: 7px 14px; border-top: 1px dotted var(--line-2); font-size: 11px; }
.gg-pending li:first-child { border-top: 0; }
.gg-pending li.hit { background: var(--signal-soft); }
.gp-w { color: var(--dim); }
.gg-pending code { color: var(--accent); }
.gp-why { color: var(--ink-2); }
:root:not(.js) .gg-read, :root:not(.js) .gg-reset { display: none; }
@media (max-width: 1100px) {
  .gg-play { grid-template-columns: 1fr; }
  /* Below the board, the terminal rides the screen's bottom edge. */
  .gg-term { position: sticky; bottom: 0; z-index: 2; margin-top: 4px; }
  .gg-out { flex: none; height: 260px; min-height: 0; }
}
@media (max-width: 640px) {
  .gg-head { padding-block: 64px 28px; }
  .gg-map { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 6px; }
  .gg-dom { padding: 16px 6px 7px; gap: 6px; }
  .gg-x { font-size: 10.5px; padding: 3px 6px; }
  .gg-w { padding: 7px 7px; }
  .gg-out { font-size: 10.5px; padding: 10px 12px; height: 210px; }
  .gg-ph { flex-wrap: wrap; }
  .gg-src { margin-left: 0; flex-basis: 100%; }
  .gg-pending li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .gp-why { grid-column: 1 / -1; }
}
/* ---- end of scene 02's domain map and the guard game */

/* scene 5: sealed */
.sec-list { list-style: none; margin: 22px 0 0; padding: 0; }
.sec-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 9px 0; border-top: 1px dotted var(--line-2); font-size: clamp(13px, 1vw, 15px); line-height: 1.5; color: var(--ink-2); opacity: calc(0.3 + var(--on) * 0.7); }
.sec-list .i { color: var(--signal); font-size: 17px; margin-top: 2px; }
.sec-list b { color: var(--ink); font-weight: 600; }
.seal { margin: 0; padding: 22px; border: 1px solid var(--line-2); background: var(--panel); }
.seal-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.seal-row i { position: relative; aspect-ratio: 3 / 4; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--bg); font: 600 11px var(--mono); font-style: normal; color: var(--dim); }
/* Sealed: filled in the signal as its turn comes. */
.seal-row i::before { content: ""; position: absolute; inset: -1px; background: var(--signal); opacity: var(--on); }
.seal-row i b { position: relative; color: var(--ink-2); }
.s-sec .seal-row i b { color: color-mix(in srgb, var(--signal-ink) calc(var(--on) * 100%), var(--ink-2)); }
/* The swap: chunks #2 and #5 trade places, then refuse to open. */
.s-sec { --swap: clamp(0, (var(--t, 0) - 0.5) * 6, 1); --refuse: clamp(0, (var(--t, 0) - 0.72) * 6, 1); }
.seal-row .swap-a { transform: translateX(calc(var(--swap) * 300% + var(--swap) * 18px)); z-index: 1; }
.seal-row .swap-b { transform: translateX(calc(var(--swap) * -300% - var(--swap) * 18px)); z-index: 1; }
.seal-row .swap-a::after, .seal-row .swap-b::after { content: "×"; position: absolute; inset: -1px; display: grid; place-items: center; background: var(--err); color: var(--bg); font: 700 18px var(--mono); opacity: var(--refuse); }
.seal-say { list-style: none; margin: 16px 0 0; padding: 0; min-height: 18px; font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; }
.seal-say li { display: none; }
.seal-say li.now { display: block; animation: say 0.3s ease both; }
.seal-say li::before { content: "> "; color: var(--signal); }
.story.still .seal-say li:last-child, :root:not(.js) .seal-say li:last-child { display: block; }

/* ---- scene 06, one apply (apply.rs): a terraform apply as this repo's
   runs print it, played by the scene's progress or by "run apply". A bar
   per Worker's build and per container image, then the log, newest line
   at the bottom. Without the Wasm, every line shows: the finished run. */
.tf .term-top { align-items: center; gap: 12px; }
.tf-where { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-run { appearance: none; display: inline-flex; align-items: center; gap: 7px; flex: none; border: 1px solid var(--signal); border-radius: 0; background: none; color: var(--signal); font: 600 11px / 1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 7px 10px; cursor: pointer; }
.tf-run .i { width: 10px; height: 10px; fill: currentColor; }
.tf-run:hover, .tf.replaying .tf-run { background: var(--signal); color: var(--signal-ink); }
.tf-run:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
:root:not(.js) .tf-run { display: none; }
.tf-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; padding: 10px 16px 10px; border-bottom: 1px solid var(--line); font-size: 11.5px; line-height: 1.65; }
.tf-h { grid-column: 1 / -1; margin: 2px 0; color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.tf-h + p, .tf-h + p + p { margin-top: 0; }
.tf-bars p[data-a] { margin: 0; display: grid; grid-template-columns: 13ch auto minmax(0, 1fr); gap: 10px; white-space: nowrap; }
.tf-bars b { font-weight: 500; color: var(--ink-2); }
.tf-bars span { color: var(--line-2); font-family: Menlo, Consolas, "DejaVu Sans Mono", "Noto Sans Mono", monospace; letter-spacing: -0.04em; }
.tf-bars em { font-style: normal; color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.tf-bars .busy span, .tf-bars .busy em { color: var(--accent); }
.tf-bars .built span { color: var(--dim); }
.tf-bars .live b { color: var(--ink); }
.tf-bars .live span, .tf-bars .live em { color: var(--signal); }
.tf-log { list-style: none; margin: 0; padding: 10px 16px 14px; height: clamp(200px, 36vh, 330px); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: 11px; line-height: 1.5; color: var(--ink-2); }
.tf-log li { flex: none; min-height: 1.5em; padding-left: 2ch; text-indent: -2ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.js .tf.playing .tf-log { justify-content: flex-start; }
.js .tf.playing .tf-log li:not(.on) { display: none; }
/* li.x, so the terminal's own .p, .d and .ok (the hero's) don't apply. */
.tf-log b { color: var(--signal); }
.tf-log li.c { color: var(--ink); }
.tf-log li.d { color: var(--dim); }
.tf-log li.p { color: var(--ink-2); }
.tf-log li.p em { font-style: normal; color: var(--accent); }
.tf-log li.ok, .tf-log li.b { color: var(--ink); }
.tf-log li.b { font-weight: 600; }
.tf-log li.done { color: var(--signal); font-weight: 700; }
.tf-log li.at::after { content: ""; display: inline-block; width: 0.6em; height: 1.1em; margin-left: 4px; vertical-align: -0.2em; background: var(--ink); animation: blink 1s steps(1) infinite; }
.s-apply .readout dd { color: var(--ink); }
/* Phones: the bars without their words, in two narrow columns. */
@media (max-width: 520px) {
  .tf .term-top { padding: 8px 10px; }
  .tf .term-top > span:first-child { display: none; }
  .tf-bars { column-gap: 12px; padding: 8px 10px; font-size: 10px; line-height: 1.55; }
  .tf-bars p[data-a] { grid-template-columns: 13ch auto; gap: 6px; }
  .tf-bars span { font-size: 8.5px; }
  .tf-bars em { display: none; }
  .tf-log { padding: 8px 10px 10px; font-size: 10px; height: clamp(160px, 30vh, 260px); }
}

/* ---- §12 (play): the finale. Six terminal panes that type in, a whoami
   that sums it up, and the mark in glyphs (pre-rendered) printing row by
   row (finale.rs). Without the Wasm, or with reduced motion, all of it is
   simply there. */
.pillars { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pane { display: flex; flex-direction: column; border: 1px solid var(--line-2); background: var(--panel); box-shadow: 6px 6px 0 var(--line); transition: opacity 0.4s ease; }
.typing-on .pane:not(.on) { opacity: 0.45; }
.pane-top { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--line-2); background: var(--well); font-size: 11px; color: var(--dim); letter-spacing: 0.06em; }
.pane-top span { margin-left: auto; }
.pillars .i { font-size: 16px; color: var(--signal); }
.pillars h3 { margin: 0; padding: 18px 20px 0; font-size: 17px; letter-spacing: -0.02em; }
.pillars h3::before { content: "> "; color: var(--signal); }
.pillars p:not(.pane-top) { margin: 0; padding: 10px 20px 22px; font: 400 13px/1.65 var(--mono); color: var(--ink-2); }
.gh { color: transparent; }
.ty.at::after, .pane.typed:last-child p:not(.pane-top)::after { content: ""; display: inline-block; width: 0.55em; height: 1.05em; margin-left: 2px; vertical-align: -0.18em; background: var(--signal); }
.pane.typed:last-child p:not(.pane-top)::after { animation: blink 1s steps(1) infinite; }
.term.whoami { margin: 56px 0 0; max-width: 860px; }
.whoami pre { font-size: 14px; }
.whoami b { font-weight: 700; color: var(--ink); }
.whoami b.ok { color: var(--signal); }
.typing-on .whoami .w-l:not(.on) { visibility: hidden; }
.sign { margin: 88px 0 -40px; container-type: inline-size; }
.sign-art { margin: 0; font-size: calc(100cqw / 89.6); font-weight: 700; line-height: 1; white-space: pre; overflow: hidden; color: var(--ink); }
.sign-art .r { display: block; font-style: normal; }
.sign-art b { font-weight: inherit; color: var(--signal); }
.typing-on .sign:not(.on) .sign-art { visibility: hidden; }
.typing-on .sign.on .sign-art { animation: sign-print 1.4s steps(13, end) both; }
@keyframes sign-print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }

/* the footer's notice: visible, quiet */
.legal { flex-basis: 100%; margin: 4px 0 0 !important; max-width: 820px; font: 400 12px/1.6 var(--sans) !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--dim); }

/* ---- section heads: § number running into a dotted leader */
section { position: relative; }
.head { padding-block: 128px 56px; }
.num { margin: 0 0 22px; display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--signal); letter-spacing: 0.08em; }
.num::before { content: "§"; color: var(--dim); }
.num::after { content: ""; flex: 1; border-top: 1px dotted var(--line-2); }
.head .sub, .chapter-break .sub { margin: 22px 0 0; max-width: 680px; font-size: 19px; color: var(--ink-2); text-wrap: pretty; }
.scope-box, .term { position: relative; border: 1px solid var(--line-2); background: var(--panel); margin: 0; }
/* A key's swatch (the pool's trace key). */
.k { width: 12px; height: 12px; border: 1px solid var(--ink); display: inline-block; }

.node rect { fill: var(--panel); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill 0.2s, stroke 0.2s; }
.node.int rect { stroke-dasharray: 4 3; }
.node.you rect { fill: var(--ink); }
.node.you text { fill: var(--bg); }
.node.prim rect { fill: var(--bg-2); stroke: var(--line-2); }
.node.prim .kind { fill: var(--signal); }
.node text { fill: var(--ink); font: 600 13px var(--mono); }
.node .kind { fill: var(--dim); font-size: 9.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.node.on rect { stroke: var(--signal); stroke-width: 2; }
.node.prim.on rect, .node.hot rect { fill: var(--signal-soft); stroke: var(--signal); }
.node.dim { opacity: 0.28; }
.node { transition: opacity 0.25s; }
.edge { fill: none; stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; transition: stroke 0.25s, opacity 0.25s; }
.edge.on { stroke: var(--signal); stroke-width: 1.6; }
.edge.dim { opacity: 0.15; }
.packet { fill: var(--signal); }
.col-label { fill: var(--dim); font: 500 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.col-line { stroke: var(--line); stroke-dasharray: 2 4; }

/* ---- services: the sticky scope + chapters */
.services { border-top: 1px solid var(--line-2); padding-bottom: 40px; }
.chapters { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.scope { position: sticky; top: 88px; height: calc(100vh - 150px); min-height: 420px; display: flex; align-items: center; }
.scope-box { width: 100%; border-color: var(--ink); box-shadow: 6px 6px 0 var(--line-2); }
.scope-top, .scope-bottom { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.scope-top { border-bottom: 1px solid var(--line); }
.scope-top [data-scope-name] { color: var(--ink); font-weight: 700; }
.scope-top [data-scope-name]::before { content: "■ "; color: var(--signal); }
.scope-bottom { border-top: 1px solid var(--line); }
.live { display: inline-flex; align-items: center; gap: 8px; }
.live i { width: 7px; height: 7px; background: var(--signal); animation: blink 1.2s steps(1) infinite; }
.flow { display: block; width: 100%; height: auto; }
.flow.swap { animation: swap 0.35s ease; }
@keyframes swap { from { opacity: 0; } to { opacity: 1; } }

.chapter { min-height: 88vh; padding-block: 12vh; display: flex; flex-direction: column; justify-content: center; border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; padding-top: 0; }
.tag { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin: 0 0 20px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 10px; border: 1px solid var(--line-2); color: var(--ink-2); }
.tag .i { color: var(--signal); }
.chapter h3 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.02; letter-spacing: -0.05em; text-wrap: balance; }
.why { margin: 20px 0 32px; font-size: 18px; color: var(--ink-2); text-wrap: pretty; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; position: relative; padding: 14px 0 14px 52px; border-bottom: 1px solid var(--line); color: var(--dim); transition: color 0.3s; cursor: pointer; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 14px; width: 34px; text-align: center; font: 500 12px/24px var(--mono); border: 1px solid var(--line-2); color: var(--dim); transition: background 0.3s, color 0.3s, border-color 0.3s; }
.steps li.on { color: var(--ink); }
.steps li.on::before { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.parts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; padding: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.parts li { padding: 5px 9px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); }
.chapter-break { padding-block: 18vh 6vh; border-top: 1px solid var(--line); }

/* ---- pitch */
.pitch { border-top: 1px solid var(--line-2); padding: 128px 0 120px; }
.pitch h2 { font-size: clamp(34px, 5vw, 76px); max-width: 1100px; }
.pitch-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin: 40px 0 0; max-width: 1100px; }
.pitch-cols p { margin: 0; font-size: 19px; color: var(--ink-2); text-wrap: pretty; }
.term { margin: 0; border-color: var(--line-2); background: var(--well); color: var(--ink); box-shadow: 8px 8px 0 var(--signal-soft); }
.term-top { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-size: 12px; color: var(--dim); }
.term-top i { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--line-2); margin-right: 6px; }
.term pre { margin: 0; padding: 22px 22px 26px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.term .p { color: var(--signal); }
.term .ok { color: var(--accent); }
.term .d { color: var(--dim); }
.term .cur { display: inline-block; width: 8px; height: 1.1em; vertical-align: -0.2em; background: var(--ink); animation: blink 1s steps(1) infinite; }

/* ---- footer + the status bar (Mainframe) */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-block: 40px 120px; border-top: 1px solid var(--line-2); }
.foot p { margin: 0; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.foot > a { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none; color: var(--dim); }
.foot > a:hover { color: var(--ink); }
.keys {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: stretch;
  border-top: 1px solid var(--line-2);
  background: var(--bg);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
}
.keys .stat { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--signal); border-right: 1px solid var(--line); white-space: nowrap; }
.keys .stat::before { content: ""; width: 3px; height: 12px; background: var(--signal); }
.keys a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px 8px; text-decoration: none; color: var(--dim); border-right: 1px solid var(--line); white-space: nowrap; }
.keys a:hover { color: var(--ink); }
.keys kbd { font: 700 11px/1 var(--mono); padding: 3px 5px; background: var(--ink); color: var(--bg); }
.keys a.on { color: var(--ink); background: var(--panel); }
.keys a.on kbd { background: var(--signal); color: var(--signal-ink); }
.keys .hint { margin-left: auto; display: inline-flex; align-items: center; padding: 0 14px; color: var(--dim); border-left: 1px solid var(--line); white-space: nowrap; }

/* ---- reveal on scroll: a short fade */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---- the numbers: a sticky particle field */
.morph { position: relative; height: 620vh; border-top: 1px solid var(--line-2); }
.morph-stick { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.morph canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.morph-cap { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 52px; display: flex; gap: 16px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.morph-cap span:last-child { margin-left: auto; }
.morph-cap [data-morph-n] { color: var(--ink); }

/* ---- the header's quiet way in, for members */
.signin { margin-left: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); text-decoration: none; padding: 9px 2px; border-bottom: 1px solid transparent; }
.signin:hover { color: var(--ink); border-bottom-color: var(--signal); }

/* ---- shared: a small mono button, fact lists with icons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer; }
.btn:hover { border-color: var(--ink); }
.btn .i { color: var(--signal); }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.facts li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px dotted var(--line-2); font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.facts .i { color: var(--signal); font-size: 17px; margin-top: 3px; }
.facts b { color: var(--ink); font-weight: 600; }

/* ---- §07 privacy: the redactor */
.privacy { border-top: 1px solid var(--line-2); padding-bottom: 112px; }
.priv { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.redact { margin: 0; border: 1px solid var(--ink); background: var(--well); box-shadow: 8px 8px 0 var(--signal-soft); }
.redact .term-top { gap: 12px; }
.redact .term-top span:nth-child(2) { margin-right: auto; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.r-key { font-size: 11px; color: var(--dim); }
.r-key b { color: var(--signal); font-weight: 500; }
.redact-lines { position: relative; list-style: none; margin: 0; padding: 14px 0; font-size: 12.5px; line-height: 1.5; counter-reset: l; }
.redact-lines li { counter-increment: l; position: relative; padding: 4px 18px 4px 52px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); transition: background 0.2s; }
.redact-lines li::before { content: counter(l, decimal-leading-zero); position: absolute; left: 18px; color: var(--faint, var(--dim)); }
.redact-lines li.now { background: var(--signal-soft); box-shadow: inset 2px 0 0 var(--signal); }
.redact-lines s { text-decoration: none; }
.redact-lines .pii { color: var(--warn); box-shadow: inset 0 -1px 0 var(--warn); }
.redact-lines .pii.ph, .redact-out .ph { color: var(--signal); box-shadow: none; background: var(--signal-soft); padding: 0 2px; }
.redact-out s { text-decoration: none; }
.redact-try { display: grid; gap: 8px; padding: 14px 18px 16px; border-top: 1px solid var(--line-2); background: var(--panel); }
.redact-try label { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.redact-try input { width: 100%; min-width: 0; padding: 9px 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); border-radius: 0; font: 400 13px/1.4 var(--mono); }
.redact-try input:focus { outline: 2px solid var(--signal); outline-offset: 0; border-color: var(--signal); }
.redact-out { margin: 0; min-height: 1.5em; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; color: var(--ink); }
.redact-out::before { content: "> "; color: var(--signal); }
.redact-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line-2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.priv-side { display: grid; gap: 28px; }
.rulebook { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); background: var(--panel); font-size: 12px; }
.rulebook li { display: grid; gap: 3px; padding: 10px 14px; border-top: 1px dotted var(--line-2); }
.rulebook li:first-child { border-top: 0; }
.rulebook b { color: var(--signal); font-weight: 600; }
.rulebook b::before { content: "ERROR "; color: var(--err); font-weight: 500; }
.rulebook span { color: var(--ink-2); }

/* ---- §07.2 the vault: platform-storage's sealing, attacked (vault.rs).
   Each plaintext chunk beside the object it was sealed into; the attacks
   and the read-back log beside them, typed out by the Wasm. */
.seal-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 11px; color: var(--signal); text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; opacity: var(--on, 1); }
.seal-go:hover { color: var(--ink); }
.vault-s { border-top: 1px solid var(--line-2); padding-bottom: 112px; }
.vault { margin: 0; border: 1px solid var(--ink); background: var(--well); box-shadow: 8px 8px 0 var(--signal-soft); }
.vault .term-top { gap: 12px; }
.vault .term-top span:nth-child(2) { margin-right: auto; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.vault .term-top b { color: var(--ink); font-weight: 500; }
.v-keys { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 9px 14px; border-bottom: 1px solid var(--line-2); font-size: 11px; color: var(--dim); }
.v-keys b { color: var(--signal); font-weight: 500; }
.v-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 14px; align-items: end; padding: 14px; border-bottom: 1px solid var(--line-2); background: var(--panel); }
.v-picks { grid-row: span 2; align-self: stretch; display: flex; flex-direction: column; border: 1px solid var(--line-2); }
.v-picks button { flex: 1; appearance: none; border: 0; border-top: 1px solid var(--line); background: var(--bg); color: var(--dim); font: 500 11px/1 var(--mono); letter-spacing: 0.04em; padding: 8px 14px; cursor: pointer; text-align: left; }
.v-picks button:first-child { border-top: 0; }
.v-picks button:hover { color: var(--ink); }
.v-picks button[aria-pressed="true"] { color: var(--signal-ink); background: var(--signal); }
.v-lab { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.v-lab span { margin-left: 10px; color: var(--signal); }
.v-in textarea { grid-column: 2; width: 100%; min-width: 0; resize: vertical; min-height: 66px; padding: 9px 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); border-radius: 0; font: 400 13px/1.45 var(--mono); }
.v-in textarea:focus { outline: 2px solid var(--signal); outline-offset: 0; border-color: var(--signal); }
.v-in .btn { grid-column: 3; grid-row: 2; }
.v-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
.v-table { min-width: 0; padding: 14px 0 0; }
.v-heads { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0 70px; margin: 0 0 8px; padding: 0 14px; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.v-heads b { color: var(--signal); font-weight: 500; margin-right: 6px; }
.v-rows { min-height: 120px; }
.v-row { display: grid; grid-template-columns: 280px 70px minmax(0, 1fr); align-items: start; padding: 10px 14px; border-top: 1px dotted var(--line-2); }
.v-row.v-man { background: var(--panel); }
.v-pl { min-width: 0; }
.v-cap { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 5px; font-size: 10px; color: var(--dim); letter-spacing: 0.04em; }
.v-cap b { color: var(--ink); font-weight: 500; }
.v-cap em { font-style: normal; }
.v-xxd, .v-json { margin: 0; font: 400 11.5px/1.45 var(--mono); color: var(--ink-2); }
.v-xxd .o { color: var(--dim); }
.v-xxd .a { color: var(--ink); }
.v-json { white-space: pre-wrap; overflow-wrap: anywhere; }
.v-to { align-self: center; display: grid; justify-items: center; font-size: 9px; color: var(--dim); letter-spacing: 0.04em; }
.v-to::after { content: "──▶"; color: var(--signal); font-size: 13px; }
.v-obj { position: relative; min-width: 0; padding: 6px 8px 7px; border: 1px solid var(--line-2); background: var(--bg); transition: border-color 0.2s; }
.v-bytes { display: flex; flex-wrap: wrap; gap: 0 0.55ch; margin: 0; font-size: 11.5px; line-height: 1.5; }
.v-bytes s, .v-legend s { text-decoration: none; }
.v-bytes s { cursor: pointer; }
.v-bytes s:hover { outline: 1px solid var(--accent); }
.v-bytes .n, .v-legend .n { color: var(--dim); }
.v-bytes .c, .v-legend .c { color: var(--ink-2); }
.v-bytes .t, .v-legend .t { color: var(--signal); }
.v-bytes .w { color: var(--line-2); }
.v-bytes .x { background: var(--err); color: var(--bg); }
.v-obj.hit { border-color: var(--warn); animation: v-hit 0.5s steps(2) 2; }
.v-obj.moved .v-cap b { color: var(--warn); }
.v-obj.gone { border-style: dashed; }
.v-obj.gone .v-bytes { opacity: 0.35; text-decoration: line-through; }
.v-obj.ok { border-color: var(--signal); }
.v-obj.no { border-color: var(--err); background: var(--err-bg, var(--bg)); }
.v-obj.miss { border-color: var(--warn); }
.v-obj.ok .v-cap b::after, .v-obj.no .v-cap b::after, .v-obj.miss .v-cap b::after { margin-left: 8px; font-weight: 700; }
.v-obj.ok .v-cap b::after { content: "OPEN"; color: var(--signal); }
.v-obj.no .v-cap b::after { content: "REFUSED"; color: var(--err); }
.v-obj.miss .v-cap b::after { content: "MISSING"; color: var(--warn); }
.v-obj.scan { border-color: var(--signal); }
.v-obj.scan::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--signal); animation: v-scan 0.45s linear infinite; }
@keyframes v-scan { to { left: calc(100% - 2px); } }
@keyframes v-hit { 50% { background: var(--warn-bg, var(--bg)); } }
.v-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 10px 14px; border-top: 1px dotted var(--line-2); font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.v-legend s { margin-right: 6px; text-transform: none; }
.v-click { margin-left: auto; color: var(--accent); }
.v-side { min-width: 0; padding: 14px; border-left: 1px solid var(--line-2); align-self: start; position: sticky; top: 64px; }
.v-side .v-heads { display: block; padding: 0; }
.v-atk { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.v-atk button { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); border-radius: 0; font: 500 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; text-align: left; cursor: pointer; }
.v-atk button:hover { border-color: var(--ink); }
.v-atk button:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.v-atk .i { flex: none; color: var(--accent); font-size: 14px; }
.v-atk .v-open { grid-column: span 2; justify-content: center; background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.v-atk .v-open .i { color: var(--signal-ink); }
.v-atk .v-open:hover { border-color: var(--ink); }
.v-log { list-style: none; margin: 12px 0 0; padding: 10px 12px; min-height: 320px; max-height: min(520px, calc(100vh - 320px)); overflow: auto; border: 1px solid var(--line-2); background: var(--bg); font-size: 11.5px; line-height: 1.55; }
.v-log li { padding-left: 4ch; text-indent: -4ch; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.v-log .p, .v-log .cur { color: var(--signal); }
.v-log .c { color: var(--ink); }
.v-log .lb { color: var(--ink-2); }
.v-log .d { color: var(--dim); }
.v-log .ok { color: var(--signal); font-weight: 700; }
.v-log .no { color: var(--err); font-weight: 700; }
.v-log .miss { color: var(--warn); font-weight: 700; }
.v-log .out { display: block; margin: 4px 0 4px -4ch; text-indent: 0; padding: 6px 8px; color: var(--ink); background: var(--signal-soft); box-shadow: inset 2px 0 0 var(--signal); }
.v-real { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line-2); font-size: 11.5px; line-height: 1.55; }
.v-real div { padding: 10px 14px; }
.v-real div + div { border-left: 1px solid var(--line-2); }
.v-real dt { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--signal); }
.v-real div + div dt { color: var(--accent); }
.v-real dd { margin: 2px 0 0; color: var(--ink-2); }
.v-real code { font-size: 1em; padding: 0 3px; }
:root:not(.js) .v-keys, :root:not(.js) .v-in, :root:not(.js) .v-table, :root:not(.js) .v-atk { display: none; }
:root:not(.js) .v-body { grid-template-columns: 1fr; }
:root:not(.js) .v-side { border-left: 0; position: static; }
@media (max-width: 1100px) {
  .v-body { grid-template-columns: 1fr; }
  .v-side { position: static; border-left: 0; border-top: 1px solid var(--line-2); }
  .v-log { max-height: none; min-height: 0; }
}
@media (max-width: 760px) {
  .v-heads { grid-template-columns: 1fr; gap: 2px; }
  .v-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .v-to { display: flex; align-items: center; gap: 8px; }
  .v-to::after { content: "──▼"; }
  .v-in { grid-template-columns: minmax(0, 1fr); }
  .v-picks { grid-row: auto; flex-direction: row; }
  .v-picks button { border-top: 0; border-left: 1px solid var(--line); text-align: center; padding-inline: 8px; }
  .v-picks button:first-child { border-left: 0; }
  .v-in textarea, .v-in .btn { grid-column: 1; grid-row: auto; }
  .v-in .btn { justify-self: start; }
  .v-real { grid-template-columns: 1fr; }
  .v-real div + div { border-left: 0; border-top: 1px dotted var(--line-2); }
  .vault .term-top span:first-child { display: none; }
  /* Two tidy lines: what it is, then whose. */
  .vault .term-top { flex-wrap: wrap; row-gap: 4px; }
  .vault .term-top span:nth-child(2) { flex-basis: 100%; font-size: 10px; }
  .v-click { margin-left: 0; }
}
@media (max-width: 420px) {
  .v-atk button { padding: 8px; font-size: 10px; gap: 6px; }
  .v-log { font-size: 10.5px; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .v-obj.hit { animation: none; }
  .v-obj.scan::after { display: none; }
}

/* ---- §08 the pool table */
.pool { border-top: 1px solid var(--line-2); padding-bottom: 112px; }
.pool-fig { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 22px; border: 1px solid var(--ink); background: var(--panel); padding: 18px; box-shadow: 8px 8px 0 var(--line); }
.pool-main, .pool-side { min-width: 0; }
.pool-side { display: flex; flex-direction: column; }
.pool-table { display: block; width: 100%; height: auto; touch-action: manipulation; cursor: crosshair; }
.pool-trace { display: block; width: 100%; height: 56px; margin-top: 14px; border-bottom: 0; }
.trace-key { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0 0; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.trace-key span { display: inline-flex; align-items: center; gap: 6px; }
.trace-key .fig-n { margin-left: auto; }
.k.cue { background: var(--ink); } .k.clack { background: var(--signal); border-color: var(--signal); } .k.rail { background: var(--dim); border-color: var(--dim); } .k.drop { background: var(--warn); border-color: var(--warn); }
.pool-read { display: grid; grid-template-columns: 1fr; margin: 0; border-top: 1px solid var(--line-2); }
.pool-read > div { padding: 10px 0 9px; border-bottom: 1px dotted var(--line-2); min-width: 0; }
.pool-read dt { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.pool-read dd { margin: 5px 0 0; font-size: 17px; letter-spacing: -0.02em; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pool-read > div:last-child dd { color: var(--signal); }
.pool-bar { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: auto 0 0; padding-top: 16px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
/* ---- §08 (play): the table is played: press, pull back, let go (pool.rs).
   Under the fingerprint, once the table is at rest, where else it lands. */
.js .pool-table { touch-action: none; }
.pool-table:active { cursor: grabbing; }
.pool-land { margin: 6px 0 0; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; opacity: 0; transform: translateY(-4px); transition: opacity 0.4s ease, transform 0.4s ease; }
.pool-land::before { content: "↳ "; color: var(--signal); }
.pool-land.on, :root:not(.js) .pool-land { opacity: 1; transform: none; }
.pool-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.spec { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); border-left: 1px solid var(--line); font-size: 12px; }
.spec li { display: grid; gap: 6px; align-content: start; padding: 14px 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec b { color: var(--signal); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.spec span { color: var(--ink-2); line-height: 1.55; }


/* ---- §09 one theme: a switchboard and every app following it */
.themes { border-top: 1px solid var(--line-2); padding-bottom: 112px; }
.theme-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.switchboard { display: grid; gap: 6px; }
.switchboard .a-h { margin: 14px 0 2px; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.switchboard .a-h:first-child { margin-top: 0; }
.switchboard button { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); font: 500 12px/1 var(--mono); text-align: left; cursor: pointer; }
.switchboard button:hover { border-color: var(--ink); }
.switchboard button span { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.switchboard button.on { border-color: var(--signal); box-shadow: inset 3px 0 0 var(--signal); }
.switchboard button.off { opacity: 0.45; cursor: not-allowed; }
.switchboard button.off:hover { border-color: var(--line-2); }
/* Each palette's own night paper and signal, from theme.css: a swatch
   has to show a palette other than the one on. */
.sw { width: 18px; height: 18px; border: 1px solid var(--line-2); background: var(--paper); box-shadow: inset -9px 0 0 var(--sig); }
[data-set-palette="monokai"] .sw { background: #272822; box-shadow: inset -9px 0 0 #66d9ef; }
[data-set-palette="nano"] .sw { background: #161616; box-shadow: inset -9px 0 0 #a56eff; }
[data-set-palette="solarized"] .sw { background: #002b36; box-shadow: inset -9px 0 0 #2aa198; }
[data-set-palette="halloween"] .sw { background: #17121b; box-shadow: inset -9px 0 0 #f08a3c; }
[data-set-palette="christmas"] .sw { background: #0f1f19; box-shadow: inset -6px 0 0 #f06b7c, inset -12px 0 0 #56b98c; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.modes button { grid-template-columns: auto 1fr; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.modes .i { color: var(--signal); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tiles li { --d: 0ms; }
.tiles li:nth-child(2) { --d: 70ms; } .tiles li:nth-child(3) { --d: 140ms; } .tiles li:nth-child(4) { --d: 210ms; } .tiles li:nth-child(5) { --d: 280ms; } .tiles li:nth-child(6) { --d: 350ms; }
.t-name { margin: 0 0 6px; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.t-app, .t-app * { transition: background-color 0.45s ease var(--d), border-color 0.45s ease var(--d), color 0.45s ease var(--d), box-shadow 0.45s ease var(--d); }
.t-app { position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--line-2); background: var(--paper); overflow: hidden; display: flex; flex-direction: column; gap: 7px; padding: 12px; }
.t-app .ln { display: block; height: 6px; background: var(--rule-2); width: 88%; }
.t-app .ln.short { width: 52%; }
.t-app .ln.sig { background: var(--sig); width: 64%; }
.t-signin { align-items: center; justify-content: center; background: var(--well); }
.t-signin .bar-acc { position: absolute; top: 18%; left: 22%; right: 22%; height: 3px; background: var(--sig); }
.t-signin b { font-size: 15px; color: var(--ink); }
.t-signin .ln { width: 56%; }
.t-signin .btn-fill { width: 56%; padding: 4px 0; text-align: center; font-style: normal; font-size: 9px; text-transform: uppercase; background: var(--sig); color: var(--on-sig); }
.t-chat { padding-left: 34px; }
.t-chat .rail { position: absolute; left: 0; top: 0; bottom: 0; width: 22px; background: var(--well); border-right: 1px solid var(--rule); }
.t-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.t-grid i { border: 1px solid var(--rule-2); background: var(--well); }
.t-grid i.sig { background: var(--sig); border-color: var(--sig); }
.t-felt { background: var(--well); border-color: var(--ink); }
.t-felt .ball { position: absolute; width: 12px; height: 12px; border-radius: 50%; }
.t-felt .b1 { left: 58%; top: 40%; background: var(--sig); } .t-felt .b2 { left: 66%; top: 30%; background: var(--ink); } .t-felt .b3 { left: 66%; top: 52%; background: var(--paper); box-shadow: inset 0 0 0 3px var(--sig); }
.t-felt .cue { position: absolute; left: 18%; top: 44%; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 1px solid var(--ink); }
.t-launch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.t-launch i { border: 1px solid var(--rule-2); background: var(--well); }
.t-launch i.sig { border-color: var(--sig); box-shadow: inset 0 3px 0 var(--sig); }
.t-rings { flex-direction: row; align-items: center; justify-content: center; gap: 12px; }
.t-rings .ring { width: 30%; aspect-ratio: 1; border-radius: 50%; border: 5px solid var(--rule-2); }
.t-rings .r1 { border-top-color: var(--sig); border-right-color: var(--sig); }
.t-rings .r2 { border-top-color: var(--ok); }
.t-rings .r3 { border-top-color: var(--warn); border-right-color: var(--warn); border-bottom-color: var(--warn); }

/* ---- small labels: the 10–12px uppercase mono ones, at WCAG AA (4.5:1) on
   paper and well in every palette, light and dark. Each token leans the
   theme's colour toward the ink, so it gets stronger whichever way the
   mode runs. */
:root {
  --label: color-mix(in srgb, var(--dim) 70%, var(--ink));
  --label-sig: color-mix(in srgb, var(--signal) 55%, var(--ink));
}
.num, .fig-n, .whys dt, .v-real dt, .keys .stat, .scope-bottom .live { color: var(--label-sig); }
.num::before, .keys a, .keys .hint, .readout dt, .tally dt, .pool-read dt, .scope-top, .scope-bottom, .beats li, .measure, .term-top { color: var(--label); }

/* ---- smaller screens */
@media (max-width: 1240px) {
  .keys .hint { display: none; }
}
@media (max-width: 1100px) {
  .priv, .theme-grid { grid-template-columns: 1fr; }
  .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pool-fig { grid-template-columns: 1fr; }
  .pool-read { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .beats { bottom: 12px; }
  .js .story:not(.still) .scene { bottom: 40px; }
  .keys { display: none; }
  .foot { padding-bottom: 48px; }
  .readout { grid-template-columns: repeat(3, 1fr); }
  .readout > div:nth-child(3) { border-right: 0; }
  .readout > div:nth-child(4) { padding-left: 0; }
  .readout > div:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .scene { grid-template-columns: 1fr; align-content: center; gap: 18px; padding-block: 12px; }
  .scene h2 { font-size: clamp(24px, min(7.4vw, 5.2vh), 40px); }
  .hero h1 { font-size: clamp(30px, 8.6vw, 48px); }
  /* Phones: the globe sits under the words, never behind them. */
  .s-edge { align-content: start; }
  .s-edge .globe-fig { left: -50vw; right: -50vw; margin-inline: auto; top: auto; bottom: 0; width: min(124vw, calc(100svh - 300px)); transform: translateY(calc(var(--t, 0) * 30%)); opacity: calc(0.85 - var(--t, 0) * 9); }
  .s-edge .scene-text { align-self: start; padding-top: 8px; }
  .route { grid-column: 1; }
  .scene-text > p:not(.num):not(.kicker):not(.lead):not(.measure):not(.sublead) { font-size: 14px; margin-top: 12px; }
  .lead { font-size: clamp(13px, 1.9vh, 15px); margin-top: 12px; }
  .sublead, .measure { margin-top: 10px; }
  .guard-say { margin-top: 12px; font-size: 11px; }
  .guard-say li { padding: 4px 0 4px 18px; }
  .sec-list { margin-top: 12px; }
  .sec-list li { padding: 5px 0; font-size: 12px; }
  .seal { padding: 12px; }
  .seal-row { gap: 4px; }
  .pillars { grid-template-columns: 1fr; }
  .apply { padding: 10px 14px 12px; font-size: 12px; }
  .apply li { grid-template-columns: 70px 1fr; padding: 4px 0; }
  .kicker { margin-bottom: 14px; }
  .whys { margin-top: 14px; font-size: 11px; }
  .whys div { grid-template-columns: 96px 1fr; padding: 5px 0; }
  .tally { margin-top: 14px; }
  .rules { display: none; }
  .scan-grid { gap: 2px; padding: 8px; }
  .ship-say { margin-top: 12px; }
  .ship-say li { padding: 6px 0 6px 32px; font-size: 13px; }
  .ship-say li::before { top: 7px; }
  .windows { aspect-ratio: 16 / 12; }
  .s-apply .readout { display: none; }
  .beats li { width: auto; flex: 1; font-size: 0; }
  .nav { display: none; }
  .head { padding-block: 88px 40px; }
  .chapters { display: block; }
  .scope { position: sticky; top: 56px; height: auto; min-height: 0; z-index: 5; padding: 18px 0 10px; background: var(--bg); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); border-bottom: 1px solid var(--line); }
  .scope-box { box-shadow: none; }
  .scope-top, .scope-bottom { padding: 6px 10px; }
  .flow { max-height: 30vh; }
  .chapter { min-height: 0; padding-block: 56px; }
  .pitch-cols { grid-template-columns: 1fr; gap: 20px; }
  .readout { grid-template-columns: repeat(2, 1fr); }
  .readout > div { padding-left: 16px !important; border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .readout > div:nth-child(2n) { border-right: 0 !important; }
  .readout > div:nth-child(2n + 1) { padding-left: 0 !important; }
  .readout > div:last-child { grid-column: 1 / -1; border-bottom: 0; }
}
@media (max-width: 700px) {
  .interlude-say { position: static; max-width: none; border-width: 1px 0 0; padding: 20px var(--gutter) 24px; }
  .hero-ctl { top: 10px; right: 10px; font-size: 10px; }
  .hero-ctl button { padding: 6px 8px; }
  .hero-box { position: static; max-width: none; border-width: 0 0 1px; padding: 24px var(--gutter) 28px; }
  .hero-under { grid-template-columns: 1fr; gap: 0; padding-block: 24px 40px; }
  .hero-under .sublead { justify-self: start; text-align: left; margin-top: 18px; }
  .morph { height: 520vh; }
  .morph-cap span:last-child { display: none; }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { grid-template-columns: 1fr; }
  .pool-fig { padding: 10px; }
  .pool-read { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pool-read > div:last-child { grid-column: 1 / -1; }
  .pool-read dd { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
  .pool-bar span { font-size: 10px; }
  .redact-lines { font-size: 11px; }
  .redact-lines li { padding-left: 38px; padding-right: 10px; }
  .redact-lines li::before { left: 10px; }
  .redact .term-top span:first-child { display: none; }
}
@media (max-width: 520px) {
  .s-sec .sec-list li:nth-child(n + 4) { display: none; }
  .s-domains .scene-text > p:not(.num) { display: none; }
  .js .story:not(.still) .s-rust .scan-key { display: none; }
  .js .story:not(.still) .ship-say li:not(.now) { display: none; }
  .s-own .scene-text > p:not(.num) { display: none; }
  .s-rust .scene-text > p:not(.num) { font-size: 13px; }
  .bar { gap: 12px; }
  .clock { display: none; }
  .term pre { font-size: 11.5px; padding: 12px 14px; line-height: 1.55; }
}

@media (max-height: 640px) {
  .js .story:not(.still) .scene-text > p:not(.num):not(.kicker):not(.lead):not(.measure):not(.sublead) { display: none; }
  .js .story:not(.still) .sublead, .js .story:not(.still) .guard-say, .js .story:not(.still) .rules { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
/* The contact: the address in the whoami and the footer, in the signal. */
.whoami a, .foot p a { color: var(--signal); text-decoration: none; border-bottom: 1px dotted currentColor; }
.whoami a:hover, .foot p a:hover { border-bottom-style: solid; }

/* The plain-English strip under the hero: three lines for anyone. */
.plain { list-style: none; margin: 28px 0 0; padding: 0; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-2); }
.plain li { padding: 18px 22px 18px 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.plain li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.plain b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.plain a, .plain-cta a { color: var(--signal); text-decoration: none; border-bottom: 1px dotted currentColor; }
.plain-cta { grid-column: 1 / -1; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }

/* How I work, and the limits: first-person cards and two honest terminals. */
.how, .limits { border-bottom: 1px solid var(--line-2); padding: 112px 0 104px; }
.how-head { max-width: 860px; }
.how-head h2 { font-size: clamp(32px, 4.4vw, 64px); margin: 0; }
.how-head .sub { margin: 22px 0 0; max-width: 680px; font-size: 19px; color: var(--ink-2); text-wrap: pretty; }
.how-list { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.how-list > li { grid-column: span 3; border: 1px solid var(--line-2); background: var(--panel); padding: 22px 24px 24px; }
.how-list > li:first-child { grid-column: 1 / -1; border-color: var(--signal); }
.how-k { margin: 0 0 14px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--signal); }
.how-list h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.how-list > li:first-child h3 { font-size: 26px; }
.how-list p:not(.how-k) { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.how-list code { font-family: var(--mono); font-size: 0.9em; color: var(--ink); }
.how-ai { list-style: none; margin: 16px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.how-ai li { padding: 0 0 0 18px; position: relative; }
.how-ai li::before { content: "+"; position: absolute; left: 0; color: var(--signal); }
.lim-grid { margin: 48px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.lim ul { list-style: none; margin: 0; padding: 14px 20px 18px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.lim li { padding: 9px 0; border-bottom: 1px dotted var(--line-2); }
.lim li:last-child { border-bottom: 0; }
.lim li::before { content: "> "; color: var(--signal); }
.lim b { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .plain { grid-template-columns: 1fr; }
  .plain li, .plain li + li { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .how-list { grid-template-columns: 1fr; }
  .how-list > li, .how-list > li:first-child { grid-column: auto; }
  .how-ai { grid-template-columns: 1fr; }
  .lim-grid { grid-template-columns: 1fr; }
  .how, .limits { padding: 72px 0 64px; }
}
.how-fix { list-style: none; margin: 14px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.how-fix li { border-left: 2px solid var(--signal); padding: 2px 0 2px 14px; }
.how-fix b { display: block; color: var(--ink); }
.how-fix code, .lim code { font-family: var(--mono); color: var(--ink); }
.lim-wide { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .how-fix { grid-template-columns: 1fr; }
}
.who { margin: 48px 0 0; }
.who-scroll { overflow-x: auto; }
.who-t { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.who-t th, .who-t td { padding: 11px 14px; text-align: left; border-bottom: 1px dotted var(--line-2); vertical-align: top; }
.who-t thead th { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); white-space: nowrap; }
.who-t tbody th { color: var(--ink); font-weight: 600; white-space: nowrap; }
.who-t tbody tr:last-child > * { border-bottom: 0; }
.who-t td { color: var(--ink-2); }
.who-t td::before, .who-key i { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; vertical-align: 1px; border: 1px solid currentColor; }
.who-t .rw-no::before, .who-key .rw-no { color: var(--signal); background: transparent; }
.who-t .rw-some::before, .who-key .rw-some { color: var(--warn); background: transparent; }
.who-t .rw-key::before, .who-key .rw-key { color: var(--warn); background: var(--warn); }
.who-key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 12px 18px 16px; font-size: 11px; color: var(--dim); border-top: 1px solid var(--line-2); }
.who-key i { border: 1px solid currentColor; }
.how-list > li.how-wide { grid-column: 1 / -1; }
.rev { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; font-size: 13px; line-height: 1.55; }
.rev li { display: flex; flex-direction: column; gap: 6px; padding: 4px 18px 4px 0; }
.rev li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.rev-d { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--signal); }
.rev s { color: var(--dim); text-decoration-color: var(--warn); }
.rev b { color: var(--ink); font-weight: 600; }
.rev-y { color: var(--ink-2); }
@media (max-width: 900px) {
  .rev { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .rev li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .rev { grid-template-columns: 1fr; }
  .rev li + li { padding-left: 0; border-left: 0; padding-top: 14px; border-top: 1px solid var(--line); }
}
.hub-s { padding: 96px 0 88px; border-top: 1px solid var(--line); }
.hub { margin: 40px 0 0; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 0.8fr); gap: 18px; align-items: stretch; }
.hub-p { display: flex; flex-direction: column; }
.hub-ada { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.hub-ada label { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.hub-ada input { font: inherit; color: var(--ink); background: var(--well); border: 1px solid var(--line-2); padding: 9px 10px; }
.hub-ada .btn { align-self: flex-start; }
.hub-note { margin: 0; font-size: 11px; line-height: 1.5; color: var(--dim); }
.hub-note code { color: var(--ink-2); }
.hub-log { list-style: none; margin: 0; padding: 14px 18px; min-height: 13em; flex: 1; font-size: 12px; line-height: 1.6; color: var(--ink-2); overflow: hidden; }
.hub-log li { padding: 2px 0; overflow-wrap: anywhere; }
.hub-log .p { color: var(--signal); }
.hub-log .d { color: var(--dim); }
.hub-log .c { color: var(--ink); }
.hub-log .h-k { color: var(--dim); }
.hub-log .h-v { color: var(--ink-2); }
.hub-log .ok { color: var(--ok); font-weight: 600; }
.hub-log .no { color: var(--punch); font-weight: 600; }
.hub-log .warn { color: var(--warn); font-weight: 600; }
.hub-log .k-ch { color: var(--signal); margin-right: 8px; }
.hub-log .k-t { color: var(--ink); }
.hub-atk { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line-2); }
.hub-atk button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; color: var(--ink); background: transparent; border: 1px solid var(--line-2); padding: 7px 10px; cursor: pointer; }
.hub-atk button:hover { border-color: var(--signal); color: var(--signal); }
.hub-atk .hub-esc { border-color: var(--warn); color: var(--warn); }
.hub-s .v-real { margin-top: 18px; }
@media (max-width: 900px) {
  .hub { grid-template-columns: 1fr; }
  .hub-log { min-height: 8em; }
}
.rules { margin: 16px 0 4px; }
.rules-in { display: flex; align-items: center; gap: 10px; padding: 12px 18px 0; font-size: 13px; }
.rules-in b { color: var(--signal); }
.rules-in input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: var(--well); border: 1px solid var(--line-2); padding: 8px 10px; }
.rules-out { list-style: none; margin: 0; padding: 10px 18px; min-height: 3.6em; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.rules-out li { overflow-wrap: anywhere; }
.rules-out .p { color: var(--signal); }
.rules-out .d { color: var(--dim); }
.rules-out .ok { color: var(--ok); font-weight: 600; }
.rules-out .no { color: var(--punch); font-weight: 600; }
.rules-out b { color: var(--ink); }
.rules-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 !important; padding: 10px 18px 14px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--dim); }
.rules-try button { font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--line-2); padding: 5px 9px; cursor: pointer; }
.rules-try button:hover { border-color: var(--signal); color: var(--signal); }
.redact-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 11px; color: var(--dim); }
.redact-samples button { font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--line-2); padding: 4px 9px; cursor: pointer; }
.redact-samples button:hover { border-color: var(--signal); color: var(--signal); }
/* /src/: the demos' source files */
.src-page { background: var(--paper); color: var(--ink); margin: 0; }
.src-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 12px 24px; font-size: 12px; background: var(--paper); border-bottom: 1px solid var(--line-2); }
.src-bar a { color: var(--ink-2); text-decoration: none; }
.src-bar a:hover, .src-bar a[aria-current] { color: var(--signal); }
.src-bar nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.src-main { padding: 28px 24px 64px; max-width: 1200px; margin: 0 auto; }
.src-h { margin: 0; font-size: 22px; }
.src-what { margin: 8px 0 22px; font-size: 12px; color: var(--dim); }
.src-code { overflow-x: auto; border: 1px solid var(--line-2); background: var(--panel); font-size: 12.5px; line-height: 1.6; }
.src-code table { border-collapse: collapse; width: 100%; }
.src-code tr:target { background: var(--sig-bg); }
.src-n { width: 1%; padding: 0 12px; text-align: right; user-select: none; border-right: 1px solid var(--line); }
.src-n a { color: var(--dim); text-decoration: none; }
.src-l { padding: 0 16px; white-space: pre; color: var(--ink); }
.src-l .hk { color: var(--hk); } .src-l .ht { color: var(--ht); } .src-l .hs { color: var(--hs); } .src-l .hc { color: var(--mute); font-style: italic; }
.src-l .hn { color: var(--hn); } .src-l .hf { color: var(--hf); } .src-l .hm { color: var(--hm); } .src-l .ha { color: var(--ha); } .src-l .hv { color: var(--hv); } .src-l .hl { color: var(--hl); }
.src-go { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 12px; color: var(--signal); text-decoration: none; border-bottom: 1px dotted currentColor; }
.src-go .i { width: 14px; height: 14px; }
.rules-src { margin: 0 !important; padding: 0 18px 14px; }
.rules-src .src-go { margin: 0; }
.pulse { grid-column: 1 / -1; display: none; flex-wrap: wrap; align-items: baseline; gap: 6px 26px; margin: 14px 0 0; padding: 12px 0; font-size: 12px; color: var(--dim); border-top: 1px dotted var(--line-2); border-bottom: 1px dotted var(--line-2); }
.pulse.on { display: flex; }
.pulse b { color: var(--ink); font-weight: 600; margin-left: 4px; }
.pulse em { font-style: normal; color: var(--dim); margin-left: 6px; }
.pulse-k { display: inline-flex; align-items: center; gap: 8px; color: var(--signal); text-transform: uppercase; letter-spacing: 0.06em; }
.pulse-k i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .pulse-k i { animation: none; } }
.night { margin: 28px 0 0; }
.night-in { display: flex; gap: 28px; align-items: center; padding: 20px 22px 22px; }
.night-qr { flex: none; width: 164px; height: 164px; image-rendering: pixelated; border: 1px solid var(--line-2); }
.night-say h3 { margin: 0; font-size: 20px; }
.night-say p { margin: 10px 0 14px; max-width: 560px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
@media (max-width: 560px) {
  .night-in { flex-direction: column; align-items: flex-start; }
}
.how-list p.rules-try, .how-list p.rules-src { font-size: 11px; line-height: 1.4; }
/* Phones: each row of "who can read what" becomes a card, every cell labelled. */
@media (max-width: 700px) {
  .who-t thead { display: none; }
  .who-t, .who-t tbody, .who-t tr, .who-t th, .who-t td { display: block; width: auto; }
  .who-t tr { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
  .who-t tbody tr:last-child { border-bottom: 0; }
  .who-t tbody th { padding: 4px 14px 6px; border: 0; }
  .who-t td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 14px; border: 0; }
  .who-t td::after { content: attr(data-label); order: -1; color: var(--dim); font-size: 11px; }
  .who-t td::before { order: 0; margin-left: auto; }
}

/* ---- §12 the architecture (index.html #map; arch.rs adds the lenses).
   One figure: who comes in, the edge, each app by who can reach it with
   what it keeps, then the logs, the encryption and the apply underneath.
   How a thing is kept is a border pattern as well as a colour: double for
   end to end, a bar for sealed at rest, plain for as written, dashed for
   memory only. Nothing moves until the reader points or picks. */
.map { border-top: 1px solid var(--line-2); padding-bottom: 112px; }
.arch { margin: 0; }
.arch button { font: inherit; color: inherit; background: none; margin: 0; cursor: pointer; }

/* The key: the four ways a thing is kept (buttons: a lens), the two lines. */
.arch-key { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 0 0 18px; font-size: 12px; color: var(--dim); }
.ak-k { margin: 0; color: var(--ink-2); }
.ak-forms { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ak { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12px; transition: background 0.15s, color 0.15s; }
.ak .i { font-size: 13px; }
.arch .ak[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.arch .ak[aria-pressed="true"] .i { color: inherit; }
.ak-lines { margin: 0 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.ak-lines span { display: inline-flex; align-items: center; gap: 8px; }
.ak-ln { width: 22px; border-top: 1.5px solid var(--ink-2); }
.ak-ln.later { border-top-style: dashed; }

/* How a thing is kept, on the key's buttons and on every chip. */
.arch .f-e2e { border: 3px double var(--signal); background: var(--signal-soft); }
.arch .f-sealed { border: 1px solid var(--gold); border-left-width: 4px; background: color-mix(in srgb, var(--gold) 12%, var(--panel)); }
.arch .f-plain { border: 1px solid var(--line-2); background: var(--panel); }
.arch .f-mem { border: 1px dashed var(--line-2); background: transparent; }
.ak.f-e2e .i { color: var(--signal); }
.ak.f-sealed .i { color: var(--gold); }

/* The drawing: who, a wire, the edge, a wire, the apps. Wide screens get
   one grid; each band is a row of it (subgrid), the edge spans the three
   that have a way in. */
.arch-map { display: grid; grid-template-columns: 170px 84px 150px 30px minmax(0, 1fr); border: 1px solid var(--line-2); background: var(--bg); padding: 4px 18px 18px; }
.ah { margin: 0; padding: 14px 0 12px; font-size: 12px; color: var(--dim); }
.ah-who { grid-column: 1; }
.ah-edge { grid-column: 3; }
.ah-apps { grid-column: 5; }
.band { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); transition: opacity 0.15s; }
.band:last-child { padding-bottom: 0; }
/* Placed, not flowed: a flowed band would step round the edge's cells. */
.b-public { grid-row: 2; }
.b-members { grid-row: 3; }
.b-admin { grid-row: 4; }
.b-inside { grid-row: 5; }
.band > .wh { grid-column: 1; }
.band > .wire { grid-column: 2; }
.band > .wire.short, .band > .edge-none + .wire { grid-column: 4; }
.band > .edge-none { grid-column: 3; }
.band > .b-apps { grid-column: 5; }

.wh { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; min-height: 78px; padding: 10px 12px; text-align: left; border: 1px solid var(--ink-2); background: var(--panel); transition: background 0.15s, border-color 0.15s; }
.arch .wh { background: var(--panel); }
.arch .b-inside .wh { border-style: dashed; border-color: var(--line-2); background: transparent; }
.wh-t { display: inline-flex; align-items: center; gap: 8px; font: 700 15px/1.2 var(--mono); letter-spacing: -0.02em; color: var(--ink); }
.wh-t .i { color: var(--signal); }
.wh-s { font: 400 12px/1.4 var(--mono); color: var(--dim); }
.arch .wh[aria-pressed="true"] { border-color: var(--signal); background: var(--signal-soft); }

/* A wire: a line at the who box's middle, an open chevron at its end. */
.wire { position: relative; margin: 0; height: 78px; }
.wire::before { content: ""; position: absolute; left: 6px; right: 2px; top: 50%; border-top: 1.5px solid var(--ink-2); }
.wire::after { content: ""; position: absolute; right: 2px; top: 50%; width: 7px; height: 7px; border: solid var(--ink-2); border-width: 1.5px 1.5px 0 0; transform: translate(0, -50%) rotate(45deg); }
.wire span { position: absolute; left: 8px; right: 0; bottom: calc(50% + 6px); font-size: 11px; line-height: 1.3; color: var(--dim); }
.wire.short::before { left: 0; }
.wire.none::before, .wire.none::after { display: none; }

.edge-box { grid-column: 3; grid-row: 2 / 5; position: relative; z-index: 1; margin: 16px 0; padding: 12px; border: 1px solid var(--ink-2); background: var(--panel); }
.edge-box p { margin: 0; }
.eb-t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.eb-t .i { color: var(--signal); }
.edge-box .eb-s { margin-top: 2px; font-size: 12px; color: var(--dim); }
.edge-box ul { list-style: none; margin: 12px 0 0; padding: 0; font-size: 12px; color: var(--ink-2); }
.edge-box li { padding: 6px 0; border-top: 1px dotted var(--line-2); }
.edge-none { margin: 0; height: 78px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--dim); border: 1px dashed var(--line-2); }

/* The apps: four to a row, so every band's cards line up. */
.b-apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wk { display: flex; flex-direction: column; min-width: 0; padding: 10px 12px 12px; border: 1px solid var(--line-2); background: var(--panel); transition: border-color 0.15s; }
.wk:hover { border-color: var(--ink-2); }
.w-n { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: var(--mono); }
.w-n a, .w-nl { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.w-n a:hover { color: var(--signal); }
.w-n span:last-child { font-size: 12px; color: var(--dim); }
.w-j { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.kp-l { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.kp { display: flex; align-items: center; gap: 6px; padding: 3px 7px; font-size: 12px; line-height: 1.35; color: var(--ink); transition: opacity 0.15s; }
.kp i { font-style: normal; font-size: 11px; font-weight: 700; padding: 0 4px; border: 1px solid var(--ink-2); color: var(--ink-2); }
.kp .i { color: var(--dim); }

/* The lenses: a kind of keeping, or one band, picked (arch.rs) or
   pointed at; the rest steps back. */
.arch[data-lens="e2e"] .kp:not(.f-e2e), .arch[data-lens="sealed"] .kp:not(.f-sealed),
.arch[data-lens="plain"] .kp:not(.f-plain), .arch[data-lens="mem"] .kp:not(.f-mem),
.arch[data-lens="public"] .band:not(.b-public), .arch[data-lens="members"] .band:not(.b-members),
.arch[data-lens="admin"] .band:not(.b-admin), .arch[data-lens="inside"] .band:not(.b-inside) { opacity: 0.22; }
@media (hover: hover) {
  .arch:not([data-lens]):has(.ak.f-e2e:hover) .kp:not(.f-e2e), .arch:not([data-lens]):has(.ak.f-sealed:hover) .kp:not(.f-sealed),
  .arch:not([data-lens]):has(.ak.f-plain:hover) .kp:not(.f-plain), .arch:not([data-lens]):has(.ak.f-mem:hover) .kp:not(.f-mem),
  .arch:not([data-lens]):has(.b-public .wh:hover) .band:not(.b-public), .arch:not([data-lens]):has(.b-members .wh:hover) .band:not(.b-members),
  .arch:not([data-lens]):has(.b-admin .wh:hover) .band:not(.b-admin), .arch:not([data-lens]):has(.b-inside .wh:hover) .band:not(.b-inside) { opacity: 0.22; }
  .arch .wh:hover { border-color: var(--signal); }
}

/* Underneath: three panels, side by side when there's room. */
.arch-under { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 12px; }
.au { padding: 16px 18px 18px; border: 1px solid var(--line-2); background: var(--panel); }
.au-t { margin: 0 0 16px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.au-t .i { color: var(--signal); }
.chain { list-style: none; margin: 0; padding: 0; }
.chain li { position: relative; padding: 0 0 14px 24px; font-size: 12px; line-height: 1.4; color: var(--dim); }
.chain li:last-child { padding-bottom: 0; }
.chain b, .cz b { display: block; font-size: 13px; color: var(--ink); }
.chain li::after { content: ""; position: absolute; left: 0; top: 4px; width: 7px; height: 7px; border: 1.5px solid var(--ink-2); background: var(--panel); }
.chain li:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 2px; border-left: 1.5px solid var(--line-2); }
.chain li:has(+ .later)::before { border-left-style: dashed; }
.cz { margin: 14px 0 0; position: relative; }
.cz::before { content: ""; position: absolute; left: 4px; top: -12px; height: 12px; border-left: 1.5px solid var(--line-2); }
.cz-t { margin: 0 0 10px; padding: 8px 0 0; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--signal); border-top: 1.5px dashed var(--signal); }
.cz ul { list-style: none; margin: 0 0 0 3px; padding: 0 0 0 18px; border-left: 3px double var(--signal); }
.cz li { padding: 0 0 10px; font-size: 12px; line-height: 1.4; color: var(--dim); }
.cz li:last-child { padding-bottom: 2px; }
.tf-cmd { margin: 0 0 14px; font-size: 13px; color: var(--ink); }
.tf-cmd b { color: var(--signal); }
.tf-cmd span { margin-left: 8px; font-size: 12px; color: var(--dim); }
.tf-made { margin: 0; display: grid; border-top: 1px solid var(--line); }
.tf-made div { display: grid; grid-template-columns: 4ch minmax(0, 1fr); gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.tf-made dt { text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tf-made dd { margin: 0; color: var(--ink-2); }

@media (max-width: 1360px) {
  .arch-map { grid-template-columns: 150px 74px 136px 26px minmax(0, 1fr); }
}
/* Narrower: the edge across the top, each band a header with its apps
   under it, the wire running down between them. */
@media (max-width: 1100px) {
  .arch-map { display: block; padding: 14px 14px 16px; }
  .ah { display: none; }
  .edge-box { margin: 0 0 4px; }
  .edge-box ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
  .edge-box li { padding: 0; border: 0; }
  .band { display: block; padding: 18px 0 0; border-top: 0; }
  .wh { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 14px; }
  .wire { height: 34px; margin-left: 18px; }
  .wire::before { left: 0; right: auto; top: 2px; bottom: 4px; border-top: 0; border-left: 1.5px solid var(--ink-2); }
  .wire::after { left: -3px; right: auto; top: auto; bottom: 4px; transform: rotate(135deg); }
  .wire span { left: 14px; bottom: auto; top: 50%; transform: translateY(-50%); }
  .wire.short, .wire.none, .edge-none { display: none; }
  .b-inside .b-apps { margin-top: 10px; }
  .b-apps { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
@media (max-width: 520px) {
  .arch-map { padding: 12px 10px 14px; }
  .ak-lines { margin-left: 0; }
  .au { padding: 14px 14px 16px; }
}
