:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #5c5c5c;
  --line: #e8e8e8;
  --tile: #f5f5f7;
  --acid: #1677ff;
  --pane: #0c0c0e;
  --pane-ink: #eceae4;
  --pane-dim: #8c8980;
  --sans: "Inter", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --wide: min(100% - 2 * var(--gutter), 78rem);
  --text: min(100% - 2 * var(--gutter), 42rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 80;
  background: var(--ink); color: #fff;
  padding: 0.5rem 0.8rem;
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.skip:focus { top: 1rem; }

.kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Buttons: a solid pill and an underlined text link */
.rl-actions { display: flex; align-items: center; justify-content: center; gap: 1.6rem; margin-top: 2.2rem; }
.rl-btn {
  display: inline-block;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease;
}
.rl-btn:hover { background: var(--acid); }
.rl-link {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.1rem;
  transition: color 0.2s ease;
}
.rl-link:hover { color: var(--acid); }

/* Media frames. Without a video source they show their label as a placeholder;
   once a video loads, release.js marks the frame live and the label goes. */
.media {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(120% 90% at 50% 0%, #1d1f26 0%, var(--pane) 70%);
}
.media::after {
  content: attr(data-label) "  ·  placeholder";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 234, 228, 0.45);
  white-space: pre;
  pointer-events: none;
}
.media.is-live::after { content: none; }
.media video, .media iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.media.is-live video, .media.is-live iframe { opacity: 1; }

/* Launch */
.rl-hero {
  padding: 10rem var(--gutter) 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rl-hero .kicker { display: flex; gap: 1.1rem; }
.rl-hero h1 {
  margin-top: 1.2rem;
  max-width: 14em;
  font-weight: 500;
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
}
.rl-sub {
  margin-top: 1.4rem;
  max-width: 30rem;
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  letter-spacing: -0.01em;
  color: var(--muted);
}
.rl-film {
  width: var(--wide);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
}

/* Intro: a narrow reading column */
.rl-prose { width: var(--text); margin: 7rem auto 0; }
.rl-prose p { font-size: clamp(1.1rem, 1.45vw, 1.3rem); line-height: 1.6; letter-spacing: -0.01em; }
.rl-prose p + p { margin-top: 1.4rem; }
.rl-prose p:first-child { color: var(--ink); }
.rl-prose p:not(:first-child) { color: var(--muted); }

/* The isomorphism: three big rows, a line drawn from each idea to its product */
.iso { width: var(--wide); margin: 10rem auto 0; text-align: center; }
.iso h2 {
  margin: 0.9rem auto 0;
  max-width: 16em;
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.3rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.iso-map { list-style: none; margin: 4.5rem auto 0; max-width: 60rem; border-top: 1px solid var(--line); }
.iso-map li {
  display: grid;
  grid-template-columns: 1fr minmax(6rem, 1.2fr) 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}
.iso-map span { text-align: right; color: var(--muted); }
.iso-map b { text-align: left; font-weight: 500; }
.iso-map i { position: relative; height: 1px; background: var(--line); }
.iso-map i::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.1, 1);
}
.iso-map i::after {
  content: "";
  position: absolute; right: -1px; top: -4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--acid);
  opacity: 0;
  transition: opacity 0.3s ease 0.9s;
}
.iso-map li:nth-child(2) i::before { transition-delay: 0.15s; }
.iso-map li:nth-child(3) i::before { transition-delay: 0.3s; }
.iso.is-in .iso-map i::before { transform: scaleX(1); }
.iso.is-in .iso-map i::after { opacity: 1; }
.iso-note { margin: 2.6rem auto 0; max-width: 36rem; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }

/* Section heads */
.rl-head { max-width: 40rem; }
.rl-head h2 {
  margin-top: 0.6rem;
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.rl-head p:not(.kicker) { margin-top: 0.9rem; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }

/* Modes */
.modes { width: var(--wide); margin: 10rem auto 0; }
.modes ol {
  list-style: none;
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.modes li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.6rem 2rem 0 0;
}
.modes li + li { padding-left: 2rem; border-left: 1px solid var(--line); }
.modes i { font-style: normal; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; color: var(--muted); }
.modes b { margin-top: 1.4rem; font-weight: 500; font-size: 1.4rem; letter-spacing: -0.02em; }
.modes span { color: var(--muted); line-height: 1.55; }
.modes li.is-key i { color: var(--acid); }

/* Comparison theatre. Scrolling the tall track steps through the tasks while
   the stage stays put; --sticky tells release.js which behaviour is on. */
.cmp { --sticky: 1; height: calc(100svh + 3 * 85svh); margin-top: 5rem; }
.cmp-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 1.4rem;
  padding: 5.5rem calc((100% - var(--wide)) / 2) 2rem;
}
.cmp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.cmp-head h2 {
  margin-top: 0.6rem;
  font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.cmp-tabs { display: flex; gap: 1.6rem; }
.cmp-tabs button {
  --fill: 0;
  position: relative;
  padding-bottom: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s ease;
}
.cmp-tabs button i { font-style: normal; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; margin-right: 0.5rem; }
.cmp-tabs button::before,
.cmp-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.cmp-tabs button::after { background: var(--acid); transform: scaleX(var(--fill)); transform-origin: left; }
.cmp-tabs button[aria-selected="true"] { color: var(--ink); }
.cmp-bar { display: flex; gap: 0.75rem; }
.cmp-prompt {
  flex: 1;
  position: relative;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--tile);
  font-family: var(--mono);
  font-size: 0.86rem;
}
.cmp-prompt span {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 1.1rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.cmp-prompt span::before { content: "›"; margin-right: 0.7rem; color: var(--acid); }
.cmp-prompt span.is-on { opacity: 1; transform: none; }
.cmp-view {
  display: none;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--tile);
}
.cmp-view.is-on { display: flex; }
.cmp-view button { padding: 0 1rem; border-radius: 10px; font-size: 0.88rem; color: var(--muted); transition: background 0.25s ease, color 0.25s ease; }
.cmp-view button:hover { color: var(--ink); }
.cmp-view button[aria-selected="true"] { background: var(--ink); color: #fff; }
.cmp-view span:not(.is-on) { display: none; }
.cmp-stage { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.pane {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--pane);
  color: var(--pane-ink);
  border-radius: 18px;
  overflow: hidden;
}
.pane header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #1f1f23;
}
.pane header b { font-weight: 500; font-size: 0.98rem; }
.pane header em { font-style: normal; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pane-dim); }
.pane.is-key header em { color: #7aa2ff; }
.pane-media { position: relative; min-height: 0; }
.pane-media .media { position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s ease; }
.pane-media .media.is-on { opacity: 1; }
.pane footer { padding: 0.85rem 1.1rem; border-top: 1px solid #1f1f23; font-size: 0.85rem; color: var(--pane-dim); }

/* Game panes: the gameplay loop, or (Code) the size of each module on one
   shared scale, so the three codebases compare honestly. */
.game-name, .game-play {
  position: absolute; z-index: 1;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.game-name { bottom: 0.8rem; left: 0.8rem; padding: 0.6rem 0.9rem; background: rgba(12, 12, 14, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; }
.game-play { right: 0.8rem; bottom: 0.8rem; padding: 0.6rem 1rem; background: #fff; color: var(--ink); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); transition: background 0.2s ease, color 0.2s ease; }
.game-play::after { content: " ↗"; }
.game-play:hover { background: var(--acid); color: #fff; }
.game-code {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  padding: 1.3rem 1.2rem 1.1rem;
  background: var(--pane);
}
.game-code p { color: var(--pane-dim); font-size: 0.85rem; }
.game-code p b { display: block; margin-bottom: 0.2rem; color: var(--pane-ink); font-weight: 500; font-size: clamp(1.6rem, 2.4vw, 2.1rem); letter-spacing: -0.04em; }
.game-code ol { list-style: none; margin-top: 1.3rem; display: grid; gap: 0.55rem; }
.game-code li { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) 2.8rem; align-items: center; gap: 0.6rem; font-family: var(--mono); font-size: 0.68rem; }
.game-code li span { color: var(--pane-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-code li i { height: 6px; border-radius: 3px; background: #232328; }
.game-code li i::before { content: ""; display: block; width: max(2px, calc(var(--n) / var(--max) * 100%)); height: 100%; border-radius: inherit; background: var(--pane-ink); }
.pane.is-key .game-code li i::before { background: #7aa2ff; }
.game-code li em { font-style: normal; text-align: right; color: var(--pane-dim); }
.game-code dl { margin-top: 1.3rem; display: grid; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid #1f1f23; }
.game-code dl div { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; font-size: 0.8rem; line-height: 1.4; }
.game-code dt { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pane-dim); }
.game-code dd::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 0.5rem; border-radius: 50%; background: var(--pane-ink); vertical-align: 0.1em; }
.pane.is-key .game-code dd { color: #7aa2ff; }
.pane.is-key .game-code dd::before { background: #7aa2ff; }
.game-code .is-no dd { color: var(--pane-dim); }
.game-code .is-no dd::before { background: transparent; box-shadow: inset 0 0 0 1px var(--pane-dim); }
.game-code small { margin-top: auto; padding-top: 1rem; color: var(--pane-dim); font-size: 0.8rem; line-height: 1.45; }
.cmp-stage.is-code .game-code { display: flex; }
.cmp-stage.is-code .game:has(.game-code) :is(.game-play, .game-name) { display: none; }

/* Playable terminal */
.cli { width: var(--wide); margin: 9rem auto 0; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 3.5rem; align-items: center; }
.term { background: var(--pane); color: var(--pane-ink); border-radius: 18px; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid #1f1f23; }
.term-dots { display: flex; gap: 0.35rem; }
.term-dots i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #2a2a2e; }
.term-modes { display: flex; gap: 0.2rem; margin: 0 auto; padding: 0.2rem; border-radius: 999px; background: #17171a; }
.term-modes button,
.term-replay {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pane-dim);
  transition: color 0.2s ease, background 0.2s ease;
}
.term-modes button[aria-selected="true"] { background: #2a2a30; color: var(--pane-ink); }
.term-replay:hover, .term-modes button:hover { color: var(--pane-ink); }
.term-body {
  height: 22rem;
  overflow: hidden;
  padding: 1.2rem 1.3rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.75;
  white-space: pre-wrap;
}
.term-body .p { color: #7aa2ff; }
.term-body .k { color: var(--pane-dim); }
.term-body .ok { color: #7bd88f; }
.term-body .caret { display: inline-block; width: 0.55em; height: 1em; vertical-align: -0.15em; background: var(--pane-ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Showcase. Each featured product gets its own full-bleed band with the live
   app embedded; release.js swaps the poster for the iframe on Enter. */
.show { margin-top: 10rem; }
.feat {
  --feat-bg: #f4f2ec;
  --feat-ink: var(--ink);
  --feat-muted: var(--muted);
  --feat-line: #e2ded3;
  --stage-bg: #fbfaf7;
  --stage-chip: #efece4;
  --stage-dot: #dcd8cc;
  --stage-shadow: 0 0 0 1px rgba(40, 35, 20, 0.07), 0 40px 90px -50px rgba(40, 35, 20, 0.45);
  margin-top: 3.5rem;
  padding: 6.5rem 0 7rem;
  background: var(--feat-bg);
  color: var(--feat-ink);
}
.feat + .feat { margin-top: 0; }
.feat .kicker { color: var(--feat-muted); }
.feat.is-space {
  --feat-bg: #000;
  --feat-ink: #eceae4;
  --feat-muted: #8f8c84;
  --feat-line: #1e2027;
  --stage-bg: #0b0c10;
  --stage-chip: #17181e;
  --stage-dot: #2a2b31;
  --stage-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 120px -40px rgba(70, 110, 255, 0.28);
}
/* Sage band around a dark studio: the stage keeps the app's own chrome. */
.feat.is-forest {
  --feat-bg: #e7ebe5;
  --feat-ink: #15201b;
  --feat-muted: #5b6862;
  --feat-line: #d2d9d1;
  --stage-shadow: 0 0 0 1px rgba(21, 32, 27, 0.1), 0 50px 100px -50px rgba(21, 32, 27, 0.6);
}
.is-forest .stage {
  --feat-ink: #e7ebe5;
  --feat-muted: #8b9892;
  --feat-line: #232c29;
  --stage-bg: #151919;
  --stage-chip: #212927;
  --stage-dot: #323c38;
}

.stage {
  width: var(--wide);
  margin: 3.5rem auto 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--stage-bg);
  box-shadow: var(--stage-shadow);
}
.stage:fullscreen { width: 100%; border-radius: 0; display: grid; grid-template-rows: auto 1fr; }
.stage:fullscreen .stage-view { aspect-ratio: auto; }
.stage:fullscreen .stage-view iframe { width: 100%; height: 100%; transform: none; }
.stage-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--feat-line);
}
.stage-dots { display: flex; gap: 0.35rem; }
.stage-dots i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--stage-dot); }
.stage-url {
  padding: 0.25rem 1.1rem;
  border-radius: 8px;
  background: var(--stage-chip);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--feat-muted);
}
.stage-tools { display: flex; justify-content: flex-end; gap: 1.2rem; white-space: nowrap; }
.stage-tools > * {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--feat-muted);
  transition: color 0.2s ease;
}
.stage-tools > *:hover { color: var(--feat-ink); }
/* --app-w/--app-h is the viewport the posters were captured at; the live app
   renders at that size and release.js sets --fit to scale it to the stage. */
.stage-view { --app-w: 1248; --app-h: 740; position: relative; aspect-ratio: var(--app-w) / var(--app-h); }
.stage-view img, .stage-view iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-view img { object-fit: cover; object-position: top; }
.stage-view iframe {
  width: calc(var(--app-w) * 1px); height: calc(var(--app-h) * 1px);
  transform: scale(var(--fit, 1)); transform-origin: 0 0;
}
.stage-enter {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7rem;
  background: radial-gradient(40% 45% at 50% 50%, rgba(20, 18, 12, 0.16), transparent 75%);
}
.stage-enter b {
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.45);
  transition: background 0.2s ease, transform 0.3s ease;
}
.stage-enter span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}
.stage-enter:hover b { background: var(--acid); color: #fff; transform: scale(1.03); }
.is-space .stage-enter b { background: #fff; color: var(--ink); }

.feat-stats {
  width: var(--wide);
  margin: 4.5rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--feat-line);
}
.feat-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 0.4rem; padding: 1.5rem 1.5rem 0 0; }
.feat-stats div + div { padding-left: 1.5rem; border-left: 1px solid var(--feat-line); }
.feat-stats dd { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.feat-stats dt { color: var(--feat-muted); font-size: 0.95rem; }
.feat-src { width: var(--wide); margin: 1.8rem auto 0; color: var(--feat-muted); font-size: 0.92rem; line-height: 1.55; }

.feat-notes {
  list-style: none;
  width: var(--wide);
  margin: 5rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.feat-notes img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 1px rgba(40, 35, 20, 0.07); }
.feat-notes h4 { margin-top: 1.3rem; font-weight: 500; font-size: 1.2rem; letter-spacing: -0.02em; }
.feat-notes p { margin-top: 0.4rem; color: var(--feat-muted); line-height: 1.55; }

/* Scale ladder: pick a rung, the still for that scale fades in. */
.zoom {
  width: var(--wide);
  margin: 6rem auto 0;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr);
  gap: 3.5rem;
  align-items: center;
}
.zoom-copy h4 { font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.035em; line-height: 1.05; }
.zoom-copy > p { margin-top: 0.8rem; color: var(--feat-muted); line-height: 1.55; }
.zoom-rungs { display: flex; flex-direction: column; margin-top: 2rem; border-left: 1px solid var(--feat-line); }
.zoom-rungs button {
  position: relative;
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.55rem 0 0.55rem 1.3rem;
  text-align: left;
}
.zoom-rungs button::before {
  content: "";
  position: absolute; left: -4px; top: 0.95rem;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--feat-ink);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.zoom-rungs b { font-weight: 500; font-size: 1rem; color: var(--feat-muted); transition: color 0.3s ease; }
.zoom-rungs span { display: none; color: var(--feat-muted); font-size: 0.88rem; line-height: 1.45; }
.zoom-rungs button:hover b, .zoom-rungs [aria-selected="true"] b { color: var(--feat-ink); }
.zoom-rungs [aria-selected="true"]::before { opacity: 1; }
.zoom-rungs [aria-selected="true"] span { display: block; }
.zoom-view { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; box-shadow: var(--stage-shadow); }
.zoom-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.zoom-view img.is-on { opacity: 1; }

/* View-mode wipe: Cinematic is clipped to --at over the chosen study mode. */
.study { width: var(--wide); margin: 6rem auto 0; }
.study-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.study-head h4 { font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.035em; line-height: 1.05; }
.study-head p { margin-top: 0.8rem; color: var(--feat-muted); line-height: 1.55; }
.study-modes { display: flex; flex-shrink: 0; padding: 0.25rem; border-radius: 999px; background: rgba(21, 32, 27, 0.07); }
.study-modes button {
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--feat-muted);
  transition: background 0.25s ease, color 0.25s ease;
}
.study-modes button:hover { color: var(--feat-ink); }
.study-modes button[aria-selected="true"] { background: var(--feat-ink); color: var(--feat-bg); }
.wipe {
  position: relative;
  margin-top: 2rem;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: #1c2624;
  box-shadow: var(--stage-shadow);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
}
.wipe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; transition: opacity 0.45s ease; }
.wipe img.is-on, .wipe .wipe-over { opacity: 1; }
.wipe-over { clip-path: inset(0 calc(100% - var(--at)) 0 0); }
.wipe-tag {
  position: absolute; top: 1rem; left: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(14, 20, 18, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  pointer-events: none;
}
.wipe-tag.is-end { left: auto; right: 1rem; }
.wipe-knob { position: absolute; top: 0; bottom: 0; left: var(--at); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.wipe-knob::after {
  content: "‹ ›";
  position: absolute; top: 50%; left: 50%;
  display: grid; place-items: center;
  width: 2.8rem; height: 2.8rem;
  border-radius: 50%;
  background: #fff;
  color: var(--feat-ink);
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5);
}
.wipe input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wipe:has(input:focus-visible) .wipe-knob::after { outline: 2px solid var(--acid); outline-offset: 3px; }

/* Closer */
.rl-close {
  margin-top: 10rem;
  padding: 9rem var(--gutter) 8rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.rl-close h2 { margin-top: 0.9rem; font-weight: 500; font-size: clamp(2rem, 6.2vw, 5.4rem); letter-spacing: -0.045em; line-height: 1.04; }
.close-line { display: block; }
/* The discipline turns over in place: the slot eases to each word's width while the word rises out of a blur. */
.close-word { position: relative; display: inline-block; vertical-align: top; text-align: left; transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
/* The gap before "Engineering." lives in each word, so the empty last word leaves the line centred. */
.close-word span { white-space: nowrap; color: var(--pane-dim); padding-right: 0.26em; }
.close-word span:empty { padding: 0; }
.close-word span + span { position: absolute; left: 0; top: 0; opacity: 0; }
.close-word.is-live { height: 1.04em; }
.close-word.is-live span {
  position: absolute; left: 0; top: 0;
  opacity: 0; transform: translateY(0.35em); filter: blur(10px);
  transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
}
.close-word.is-live .is-on { opacity: 1; transform: none; filter: none; }
.close-word.is-live .is-out { transform: translateY(-0.35em); }
.rl-close p:not(.kicker) { margin-top: 1.6rem; color: var(--muted); font-size: 1.05rem; }

/* Demo dialog */
.demo {
  margin: auto;
  width: min(92vw, 84rem);
  border: 0;
  border-radius: 18px;
  background: var(--pane);
  color: var(--pane-ink);
  overflow: hidden;
}
.demo::backdrop { background: rgba(10, 10, 12, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.demo-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1.1rem; border-bottom: 1px solid #1f1f23; font-size: 0.92rem; font-weight: 500; }
.demo-bar button { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pane-dim); }
.demo-bar button:hover { color: var(--pane-ink); }
.demo-body { aspect-ratio: 16 / 9; }

@media (max-width: 900px) {
  .rl-hero { padding: 8rem 1.1rem 3rem; }
  .rl-film { border-radius: 14px; }
  .rl-actions { gap: 1.2rem; }
  .rl-prose, .iso, .modes, .cli, .show { margin-top: 5.5rem; }
  .iso-map li { grid-template-columns: 1fr 3rem 1fr; gap: 0.8rem; padding: 1.1rem 0; }
  .modes ol { grid-template-columns: 1fr; }
  .modes li, .modes li + li { padding: 1.4rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .modes b { margin-top: 0.6rem; }

  /* The theatre becomes a normal section: tabs switch tasks, panes swipe. */
  .cmp { --sticky: 0; height: auto; margin-top: 5.5rem; }
  .cmp-sticky { position: static; height: auto; padding: 0 1.1rem; }
  .cmp-head { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .cmp-bar { flex-direction: column; }
  .cmp-prompt { min-height: 4.4rem; font-size: 0.8rem; }
  .cmp-view { align-self: flex-start; }
  .cmp-view button { padding: 0.5rem 1rem; }
  .cmp-stage {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -1.1rem;
    padding: 0 1.1rem;
    scrollbar-width: none;
  }
  .pane { flex: 0 0 86%; height: 28rem; scroll-snap-align: center; }
  .game-code { padding: 1rem 1rem 0.9rem; }
  .game-code ol { margin-top: 0.8rem; gap: 0.35rem; }
  .game-code dl { margin-top: 0.8rem; padding-top: 0.6rem; gap: 0.35rem; }
  .game-code small { padding-top: 0.6rem; }

  .cli { grid-template-columns: 1fr; gap: 1.8rem; }
  .term-dots { display: none; }
  .term-modes { margin: 0; }
  .term-replay { margin-left: auto; padding: 0.3rem 0.4rem; }
  .term-body { height: 20rem; font-size: 0.72rem; }
  .feat { margin-top: 2.5rem; padding: 4rem 0 4.5rem; }
  .stage { margin-top: 2.2rem; border-radius: 16px; }
  .stage-bar { grid-template-columns: 1fr auto; }
  .stage-dots, .stage-full { display: none; }
  .stage-url { justify-self: start; padding: 0.25rem 0.7rem; }
  .stage-view { --app-w: 380; --app-h: 600; }
  .feat-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 3rem; }
  .feat-stats div, .feat-stats div + div { padding: 1.2rem 0 1.2rem; border-left: 0; border-bottom: 1px solid var(--feat-line); }
  .feat-stats div:nth-child(even) { padding-left: 1.2rem; border-left: 1px solid var(--feat-line); }
  .feat-notes { grid-template-columns: 1fr; gap: 2.5rem; margin-top: 3.5rem; }
  .zoom { grid-template-columns: 1fr; gap: 1.6rem; margin-top: 3.5rem; }
  .zoom-view { order: -1; border-radius: 12px; }
  .zoom-rungs { margin-top: 1.4rem; }
  .study { margin-top: 3.5rem; }
  .study-head { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .wipe { margin-top: 1.4rem; aspect-ratio: 4 / 3; border-radius: 12px; }
  .rl-close { margin-top: 6rem; padding: 6rem 1.1rem 5rem; }
}

/* Showcase opening: a scroll-lit statement, a sticky product index,
   and each product as a centred chapter with a wider stage. */

/* Statement: the pinned lines light up one by one as the reader scrolls. */
.sb-say { height: 260vh; }
.sb-say-pin {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 var(--gutter);
  text-align: center;
}
.sb-say .kicker { margin-top: 2.2rem; font-size: clamp(0.85rem, 1.3vw, 1.15rem); letter-spacing: 0.22em; color: var(--acid); }
.sb-say h2 {
  font-weight: 500;
  font-size: clamp(2.6rem, 7.4vw, 6.6rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}
.sb-say h2 span { display: block; color: #d9d6cd; transition: color 0.5s ease; }
.sb-say h2 span.is-on { color: var(--ink); }

/* Product index: stays under the site nav for the length of the chapters. */
.sb-index {
  position: sticky; top: calc(var(--nav-h, 3.4rem) + 0.4rem); z-index: 30;
  width: max-content; max-width: calc(100vw - 2rem);
  margin: 0 auto;
  display: flex; gap: 0.2rem;
  padding: 0.3rem;
  overflow-x: auto; scrollbar-width: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 0 0 1px rgba(40, 35, 20, 0.08), 0 12px 30px -18px rgba(40, 35, 20, 0.35);
}
.sb-index a {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  font-size: 0.86rem; font-weight: 500;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.sb-index a:hover { background: rgba(17, 17, 17, 0.05); }
.sb-index a[aria-current="true"] { background: var(--ink); color: #fff; }

/* Chapters */
.sb .feat { margin-top: 0; padding: 10rem 0 8rem; }
.sb .feat:first-of-type { margin-top: -3.4rem; padding-top: 12rem; }
.sb-head { width: var(--wide); margin: 0 auto; text-align: center; }
.sb-head h3 {
  margin-top: 1rem;
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}
.sb-lede {
  margin: 1.5rem auto 0; max-width: 34rem;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.5; letter-spacing: -0.01em;
  color: var(--feat-muted);
}
/* One prompt → autonomous build → commits, drawn like the isomorphism map. */
.sb-run {
  margin-top: 2.2rem;
  display: inline-flex; align-items: center; gap: 0.9rem;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--feat-muted);
}
.sb-run i { position: relative; width: 2.6rem; height: 1px; background: var(--acid); }
.sb-run i::after {
  content: ""; position: absolute; right: -1px; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid var(--acid); border-right: 1px solid var(--acid);
  transform: rotate(45deg);
}
.sb-run span:nth-child(3) { color: var(--feat-ink); }
/* Never wider than the poster viewport, and short enough to sit whole
   below the nav and index. */
.sb .stage {
  width: min(var(--wide), calc((100svh - var(--nav-h, 3.4rem) - 7.2rem) * 1248 / 740));
  margin-top: 4rem;
}

@media (prefers-reduced-motion: reduce) {
  .sb-say { height: auto; }
  .sb-say-pin { position: static; height: auto; padding: 8rem var(--gutter); }
  .sb-say h2 span { color: var(--ink); }
}
@media (max-width: 900px) {
  .sb-say { height: 200vh; }
  .sb-index a { padding: 0.5rem 0.8rem; font-size: 0.8rem; }
  .sb .feat { padding: 6rem 0 4.5rem; }
  .sb .feat:first-of-type { padding-top: 7rem; }
  .sb-run { gap: 0.55rem; font-size: 0.56rem; }
  .sb-run i { width: 1.2rem; }
  .sb .stage { width: min(var(--wide), calc((100svh - var(--nav-h, 3.4rem) - 6.6rem) * 380 / 600)); margin-top: 2.6rem; }
}
