@font-face {
  font-family: "Inter Local";
  src: url("./fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono Local";
  src: url("./fonts/JetBrainsMono.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

/* ---------- tokens ---------- */

/*
 * Tuned for a 1920×1080 projector: greys are lighter and hairlines stronger than a
 * laptop screen needs, because projectors crush dark tones and lift black levels.
 */
:root {
  color-scheme: dark;
  --bg: #0b0d11;
  --panel: #171a21;
  --panel-2: #1d212a;
  --code-bg: #101217;
  --ink: #f5f5f7;
  --muted: #b4b4b9;
  --faint: #8e8e93;
  --line: rgba(255, 255, 255, 0.12);
  --line-2: rgba(255, 255, 255, 0.22);
  --accent: #ff6a3d;
  --accent-soft: rgba(255, 106, 61, 0.14);
  --blue: #64d2ff;
  --green: #30d158;
  --yellow: #ffd60a;
  --track: rgba(255, 255, 255, 0.06);
  --ui-font: "Inter Local", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --mono-font: "JetBrains Mono Local", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

/* light tokens: explicit choice, or "auto" on a Mac set to Light appearance */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #fbfbfd;
  --code-bg: #ffffff;
  --ink: #1d1d1f;
  --muted: #424245;
  --faint: #6e6e73;
  --line: rgba(0, 0, 0, 0.12);
  --line-2: rgba(0, 0, 0, 0.22);
  --accent: #d9431f;
  --accent-soft: rgba(217, 67, 31, 0.1);
  --blue: #0066cc;
  --green: #1f7a35;
  --yellow: #a05a00;
  --track: rgba(0, 0, 0, 0.07);
}

@media (prefers-color-scheme: light) {
  html:not([data-theme]) {
    color-scheme: light;
    --bg: #f5f5f7;
    --panel: #ffffff;
    --panel-2: #fbfbfd;
    --code-bg: #ffffff;
    --ink: #1d1d1f;
    --muted: #424245;
    --faint: #6e6e73;
    --line: rgba(0, 0, 0, 0.12);
    --line-2: rgba(0, 0, 0, 0.22);
    --accent: #d9431f;
    --accent-soft: rgba(217, 67, 31, 0.1);
    --blue: #0066cc;
    --green: #1f7a35;
    --yellow: #a05a00;
    --track: rgba(0, 0, 0, 0.07);
  }
}

@media (prefers-contrast: more) {
  :root { --muted: #d1d1d6; --faint: #aeaeb2; --line: rgba(255, 255, 255, 0.2); --line-2: rgba(255, 255, 255, 0.34); }
  html[data-theme="light"] { --muted: #2c2c2e; --faint: #48484a; --line: rgba(0, 0, 0, 0.2); --line-2: rgba(0, 0, 0, 0.34); }
}

@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  html:not([data-theme]) { --muted: #2c2c2e; --faint: #48484a; --line: rgba(0, 0, 0, 0.2); --line-2: rgba(0, 0, 0, 0.34); }
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  overflow: hidden;
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

body.is-idle { cursor: none; }

a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

button:focus-visible, a:focus-visible, .deck:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.deck:focus-visible { outline: none; }

code, pre, kbd {
  font-family: var(--mono-font);
  font-feature-settings: normal;
  font-variant-ligatures: none;
}

/* body content sits in the optical middle of the space below the heading */
.sizes, .layers, .findings, .questions, .pipeline { margin-top: auto; }
.rule, .layers, .decisions, .questions, .split--ci { margin-bottom: auto; }

.accent { color: var(--accent); }
.muted { color: var(--faint); }

/* ---------- deck & stage ---------- */

.deck {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.deck::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  display: grid;
  height: 100vh;
  height: 100svh;
  place-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* 1u = 1% of the 16:9 stage width; everything inside scales with em of the stage font-size */
.stage {
  --u: calc(min(100vw, 100vh * 16 / 9) / 100);
  position: relative;
  display: flex;
  flex-direction: column;
  width: calc(var(--u) * 100);
  height: calc(var(--u) * 56.25);
  padding: calc(var(--u) * 5.2) calc(var(--u) * 6.4) calc(var(--u) * 6);
  overflow: hidden;
  font-size: calc(var(--u) * 1.6);
  line-height: 1.35;
}

@supports (height: 100svh) {
  .stage { --u: calc(min(100vw, 100svh * 16 / 9) / 100); }
}

.kicker {
  margin-bottom: 0.9em;
  color: var(--accent);
  font-family: var(--mono-font);
  font-size: 0.64em;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

h1 { font-size: 4.6em; line-height: 0.95; letter-spacing: -0.045em; }
h2 { font-size: 2.55em; margin-bottom: 0.7em; }

p { margin: 0; }

.foot {
  position: absolute;
  right: calc(var(--u) * 6.4);
  bottom: calc(var(--u) * 2.4);
  left: calc(var(--u) * 6.4);
  display: flex;
  justify-content: space-between;
  gap: 2em;
  color: var(--muted);
  opacity: 0.85;
  font-family: var(--mono-font);
  font-size: 0.56em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card {
  padding: 1.1em 1.2em;
  border: 1px solid var(--line);
  border-radius: 0.7em;
  background: var(--panel);
}

.card-label {
  margin-bottom: 0.6em;
  color: var(--faint);
  font-family: var(--mono-font);
  font-size: 0.6em;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.grid-3, .grid-4 { display: grid; gap: 0.8em; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split {
  display: grid;
  flex: 1;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.4em;
  min-height: 0;
}

.split--even { grid-template-columns: 1fr 1fr; }
.split--ci { grid-template-columns: 1.35fr 1fr; flex: 0 1 auto; }
.split--android { grid-template-columns: 1.5fr 1fr; }

.split-main {
  display: flex;
  flex-direction: column;
  gap: 0.9em;
  min-width: 0;
}

.code {
  margin: 0;
  padding: 1em 1.2em;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.7em;
  background: var(--code-bg);
  color: var(--ink);
  font-size: 0.75em;
  line-height: 1.55;
  white-space: pre;
}

.c-k { color: var(--accent); }
.c-s { color: var(--green); }
.c-v { color: var(--blue); }
.c-c { color: var(--faint); }

.dot {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-right: 0.45em;
  border-radius: 50%;
  vertical-align: 0.05em;
}

.dot--accent { background: var(--accent); }
.dot--blue { background: var(--blue); }

/* ---------- reveal ---------- */

.js .slide .r {
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 520ms ease, transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.js .slide.is-active .r,
.js .slide.is-seen .r {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .slide .r { transform: none; transition: none; }
  .deck { scroll-behavior: auto; }
}

/* ---------- 1 · title ---------- */

.stage--title {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 3em;
}

.title-copy { max-width: 70%; }
.title-copy .kicker { margin-bottom: 1.6em; }

.lede {
  margin-top: 0.9em;
  color: var(--muted);
  font-size: 1.15em;
  font-weight: 450;
}

.byline {
  display: flex;
  align-items: baseline;
  gap: 1em;
  margin-top: 2.6em;
  font-size: 0.8em;
}

.byline span { color: var(--faint); }

.ipa-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  width: 7.5em;
  height: 70%;
}

.ipa-stack-label {
  margin-bottom: 0.4em;
  color: var(--faint);
  font-family: var(--mono-font);
  font-size: 0.55em;
  letter-spacing: 0.08em;
}

.ipa-seg {
  display: grid;
  flex: var(--h) 1 0;
  place-items: center;
  border-radius: 0.35em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono-font);
  font-weight: 700;
}

.ipa-seg--q { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); font-size: 2em; }
.ipa-seg--q2 { font-size: 1.2em; }
.ipa-seg--q3 { font-size: 0.9em; }

/* ---------- 2 · hero number ---------- */

.stage--center {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-number {
  margin: 0;
  font-size: 11em;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
}

.hero-number span {
  margin-left: 0.08em;
  color: var(--faint);
  font-size: 0.3em;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.hero-question {
  margin-top: 0.7em;
  font-size: 1.9em;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.meta {
  margin-top: 1.1em;
  color: var(--faint);
  font-family: var(--mono-font);
  font-size: 0.7em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- 3 · sizes ---------- */

.size-card { display: flex; flex-direction: column; gap: 0.6em; padding: 1.4em 1.5em; }

.size-value {
  font-size: 3em;
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1;
}

.size-value small { color: var(--faint); font-size: 0.45em; font-weight: 600; letter-spacing: 0; }

.size-value--text { font-size: 1.62em; line-height: 1.08; letter-spacing: -0.02em; }

.size-card p { color: var(--muted); font-size: 0.8em; }
.size-card em { color: var(--ink); font-style: normal; font-weight: 650; }

.card-foot {
  margin-top: auto;
  padding-top: 0.7em;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono-font);
  font-size: 0.6em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.size-card--apple { border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
.size-card--apple .card-label { color: var(--blue); }

.rule {
  margin-top: 1.3em;
  color: var(--muted);
  font-size: 1.1em;
}

.rule strong { color: var(--ink); }

/* ---------- 4 · layers ---------- */

.layers {
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  padding: 0;
  list-style: none;
}

.layer {
  display: grid;
  grid-template-columns: 2em 9.5em 1fr 12em;
  align-items: center;
  gap: 1em;
  padding: 0.95em 1.2em;
  border: 1px solid var(--line);
  border-radius: 0.6em;
  background: var(--panel);
}

.layer-n {
  display: grid;
  width: 1.6em;
  height: 1.6em;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.7em;
  font-weight: 700;
}

.layer-name { font-size: 0.95em; font-weight: 700; line-height: 1.15; }
.layer-name small { display: block; color: var(--faint); font-size: 0.78em; font-weight: 500; }

.layer-cmd {
  padding: 0.45em 0.7em;
  border-radius: 0.4em;
  background: var(--code-bg);
  border: 1px solid var(--line);
  font-size: 0.76em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layer-answer { color: var(--muted); font-size: 0.8em; }

.layer--owner { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.layer--owner .layer-n { background: var(--accent); color: #fff; }
.layer--owner .layer-cmd { color: var(--accent); }

/* ---------- 5 · bars ---------- */

.reveal-grid {
  display: grid;
  flex: 1;
  grid-template-columns: 1.55fr 1fr;
  align-items: center;
  gap: 1.8em;
}

.bars { display: flex; flex-direction: column; gap: 0.55em; }

.bar-row {
  display: grid;
  grid-template-columns: 5.2em 1fr 3.4em;
  align-items: center;
  gap: 0.8em;
  font-size: 0.86em;
}

.bar-name { color: var(--muted); font-weight: 600; }
.bar-val { color: var(--muted); font-family: var(--mono-font); font-size: 0.85em; text-align: right; font-variant-numeric: tabular-nums; }

.bar-track {
  position: relative;
  height: 1.1em;
  border-radius: 0.3em;
  background: var(--track);
  overflow: hidden;
}

.bar-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: max(calc(var(--w) * 1%), 0.35em);
  border-radius: 0.3em;
  background: var(--faint);
  transform-origin: left;
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 250ms;
}

.js .slide .bar-track i { transform: scaleX(0); }
.js .slide.is-active .bar-track i, .js .slide.is-seen .bar-track i { transform: none; }

.bar-row--hot .bar-name { color: var(--ink); font-size: 1.2em; font-weight: 750; }
.bar-row--hot .bar-val { color: var(--ink); font-size: 1.05em; font-weight: 750; }
.bar-row--hot .bar-track { height: 1.5em; }
.bar-row--hot .bar-track i { background: var(--accent); }

.core-card { padding: 1.3em 1.4em; }

.core-total { font-size: 2.6em; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.core-total small { color: var(--faint); font-size: 0.45em; font-weight: 600; letter-spacing: 0; }

.split-bar {
  display: flex;
  gap: 0.15em;
  height: 0.9em;
  margin: 0.8em 0 0.6em;
}

.split-bar i, .split-bar b { flex: var(--w) 1 0; border-radius: 0.25em; }
.split-bar i { background: var(--accent); }
.split-bar b { background: var(--blue); min-width: 0.4em; }

.split-legend {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  color: var(--muted);
  font-size: 0.8em;
}

.split-legend strong { color: var(--ink); }

.core-punch {
  margin-top: 1.1em;
  padding-top: 0.9em;
  border-top: 1px solid var(--line);
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ---------- 6 · findings ---------- */

.finding {
  padding: 1.4em 1.3em 1.5em;
  border: 1px solid var(--line);
  border-radius: 0.7em;
  background: var(--panel);
}

.finding-n {
  margin-bottom: 0.3em;
  color: var(--accent);
  font-size: 3.4em;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.finding-n small { margin-left: 0.08em; color: var(--faint); font-size: 0.34em; font-weight: 650; letter-spacing: 0; }

.finding p { color: var(--muted); font-size: 0.8em; line-height: 1.35; }
.finding em { color: var(--ink); font-style: normal; font-weight: 650; }
.finding code { color: var(--ink); font-size: 0.92em; }

.decisions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6em;
  margin-top: 1.4em;
}

.decisions span {
  padding: 0.35em 0.9em;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono-font);
  font-size: 0.8em;
  font-weight: 600;
}

.decisions strong {
  margin-left: auto;
  font-size: 1.15em;
  font-weight: 750;
  letter-spacing: -0.02em;
}

/* ---------- 7 · chart ---------- */

.chart {
  flex: 1;
  min-height: 0;
  margin: -0.4em 0 0;
}

.chart svg { display: block; width: 100%; height: 100%; overflow: visible; font-family: var(--mono-font); }

.zone { stroke: none; }
.zone--project { fill: var(--track); }
.zone--system { fill: var(--accent-soft); }

.zone-label { fill: var(--faint); font-size: 18px; letter-spacing: 0.12em; text-transform: uppercase; }
.zone-label--system { fill: var(--accent); }

.grid line { stroke: var(--line); stroke-width: 1; }
.axis-y text { fill: var(--faint); font-size: 17px; text-anchor: end; }
.axis-x text { fill: var(--muted); font-size: 18px; }

.line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line--dashed { stroke: var(--accent); stroke-dasharray: 2 12; }

.pt { fill: var(--bg); stroke: var(--ink); stroke-width: 3; }
.pt--hot { stroke: var(--accent); fill: var(--accent); }

.val { fill: var(--ink); font-family: var(--ui-font); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.val--hot { fill: var(--accent); }
.val-note { fill: var(--muted); font-size: 17px; letter-spacing: 0.1em; text-transform: uppercase; }

.js .slide .line { stroke-dasharray: 900; stroke-dashoffset: 900; transition: stroke-dashoffset 1400ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; }
.js .slide .line--dashed { stroke-dasharray: 2 12; stroke-dashoffset: 0; opacity: 0; transition: opacity 600ms ease 1500ms; }
.js .slide.is-active .line, .js .slide.is-seen .line { stroke-dashoffset: 0; }
.js .slide.is-active .line--dashed, .js .slide.is-seen .line--dashed { opacity: 1; }

.thesis {
  margin-top: 0.5em;
  color: var(--muted);
  font-size: 1.3em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.thesis strong { color: var(--ink); font-weight: 780; }

/* ---------- 8 · caliper ---------- */

.outputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6em; }

.output {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  padding: 0.7em 0.9em;
  border: 1px solid var(--line);
  border-radius: 0.6em;
  background: var(--panel);
}

.output code { font-size: 0.85em; font-weight: 700; }
.output span { color: var(--muted); font-size: 0.72em; }

.pair {
  margin-top: auto;
  color: var(--muted);
  font-size: 1.02em;
  line-height: 1.3;
}

.pair strong { color: var(--ink); }
.pair strong.accent { color: var(--accent); }

.shot {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 0.7em;
  background: var(--panel);
  box-shadow: 0 1.5em 3em rgba(0, 0, 0, 0.28);
}

.shot-chrome {
  display: flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.5em 0.8em;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono-font);
  font-size: 0.56em;
}

.shot-chrome span { width: 0.75em; height: 0.75em; border-radius: 50%; background: var(--line-2); }
.shot-chrome b { margin-left: 0.6em; font-weight: 500; }

.shot img {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top;
}

/* ---------- 9 · ownership ---------- */

.code--yaml { font-size: 0.8em; align-self: start; }

.owner-side { display: flex; flex-direction: column; gap: 1.1em; }

.quote {
  margin: 0;
  padding-left: 0.8em;
  border-left: 0.18em solid var(--accent);
  font-size: 1.55em;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.compare { display: flex; flex-direction: column; gap: 0.4em; }

.compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  padding: 0.6em 0.9em;
  border: 1px solid var(--line);
  border-radius: 0.55em;
  background: var(--panel);
  font-size: 0.82em;
}

.compare-row small {
  flex: none;
  color: var(--faint);
  font-family: var(--mono-font);
  font-size: 0.75em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.compare-row--bad span { color: var(--muted); }
.compare-row--good { border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.compare-row--good small { color: var(--green); }

.proof { color: var(--muted); font-size: 0.8em; }
.proof strong { color: var(--ink); }

/* ---------- 10 · ci ---------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5em;
  margin-bottom: 1em;
}

.pipe {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  padding: 0.7em 0.9em;
  border: 1px solid var(--line);
  border-radius: 0.6em;
  background: var(--panel);
}

.pipe + .pipe::before {
  position: absolute;
  top: 50%;
  left: -0.5em;
  width: 0.5em;
  height: 1px;
  background: var(--line-2);
  content: "";
}

.pipe span { color: var(--faint); font-family: var(--mono-font); font-size: 0.6em; }
.pipe strong { font-size: 0.95em; }
.pipe small { color: var(--muted); font-size: 0.68em; }
.pipe--hot { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.pipe--hot span { color: var(--accent); }

.policy { display: flex; flex-direction: column; gap: 0.4em; }
.policy-big { font-size: 1.15em; font-weight: 780; letter-spacing: -0.02em; }
.policy-big i { color: var(--accent); font-style: normal; }
.policy-sub { color: var(--muted); font-size: 0.8em; }

.policy-line {
  margin-top: auto;
  padding-top: 0.7em;
  border-top: 1px solid var(--line);
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- 11 · android ---------- */

.twins {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.7em;
}

.twin {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  padding: 0.8em 1em;
  border: 1px solid var(--line);
  border-radius: 0.6em;
  background: var(--panel);
}

.twin strong { font-size: 1.05em; }
.twin strong em { color: var(--faint); font-style: normal; font-weight: 500; }
.twin small { color: var(--muted); font-size: 0.72em; }

.twin-badge {
  align-self: flex-start;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  background: var(--track);
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.58em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.twin--android .twin-badge { color: var(--green); }
.twin-eq { color: var(--faint); font-size: 1.4em; font-weight: 300; }

.shot--narrow { max-height: 100%; }

/* ---------- 12 · questions ---------- */

.questions {
  display: grid;
  gap: 0.55em;
  padding: 0;
  counter-reset: q;
  list-style: none;
}

.questions li {
  display: grid;
  grid-template-columns: 1.8em 14em 1fr;
  align-items: baseline;
  gap: 0.8em;
  padding: 0.9em 1.2em;
  border: 1px solid var(--line);
  border-radius: 0.6em;
  background: var(--panel);
  counter-increment: q;
}

.questions li::before {
  color: var(--accent);
  font-family: var(--mono-font);
  font-size: 0.7em;
  font-weight: 700;
  content: "0" counter(q);
}

.questions strong { font-size: 0.95em; }
.questions span { color: var(--muted); font-size: 0.8em; }

/* ---------- 13 · close ---------- */

.stage--close { justify-content: center; }

.close-lines {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: 4em;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.close-tag {
  margin-top: 1em;
  color: var(--muted);
  font-size: 1.2em;
  font-weight: 550;
}

.close-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  margin-top: 2em;
}

.close-links a {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  padding: 0.6em 1em;
  border: 1px solid var(--line-2);
  border-radius: 0.6em;
  font-family: var(--mono-font);
  font-size: 0.75em;
  text-decoration: none;
}

.close-links a small { color: var(--faint); font-size: 0.8em; letter-spacing: 0.1em; text-transform: uppercase; }
.close-links a:hover { border-color: var(--accent); }

/* ---------- chrome ---------- */

.topbar, .deck-nav {
  position: fixed;
  z-index: 20;
  transition: opacity 400ms ease;
}

body.is-idle .topbar, body.is-idle .deck-nav { opacity: 0; pointer-events: none; }

.topbar {
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.4rem;
  pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--faint);
  font-family: var(--mono-font);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.wordmark-mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.wordmark-mark i { display: block; width: 3px; border-radius: 2px; background: var(--accent); }
.wordmark-mark i:nth-child(1) { height: 40%; }
.wordmark-mark i:nth-child(2) { height: 70%; }
.wordmark-mark i:nth-child(3) { height: 100%; }

.topbar-actions { display: flex; align-items: center; gap: 0.5rem; }

.slide-counter { margin-right: 0.4rem; color: var(--faint); font-family: var(--mono-font); font-size: 0.7rem; }

.icon-button {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover { border-color: var(--line-2); color: var(--ink); }

.theme-icon { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon--sun { display: none; }
html[data-theme="light"] .theme-icon--moon { display: none; }
html[data-theme="light"] .theme-icon--sun { display: block; }

@media (prefers-color-scheme: light) {
  html:not([data-theme]) .theme-icon--moon { display: none; }
  html:not([data-theme]) .theme-icon--sun { display: block; }
}

#theme-button { position: relative; }

html:not([data-theme]) #theme-button::after {
  position: absolute;
  right: -0.3rem;
  bottom: -0.3rem;
  padding: 0 0.2rem;
  border-radius: 0.25rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono-font);
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 0.8rem;
  content: "A";
}

.deck-nav {
  bottom: 0.9rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.nav-arrow {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.nav-arrow:hover { background: var(--track); color: var(--ink); }

.nav-center { display: flex; flex-direction: column; gap: 0.35rem; }
.nav-progress { width: 12rem; height: 2px; border-radius: 2px; background: var(--track); overflow: hidden; }
.nav-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 300ms ease; }

.slide-dots { display: flex; justify-content: space-between; }

.slide-dot {
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line-2);
  cursor: pointer;
}

.slide-dot.is-active { background: var(--accent); }

/* ---------- drawers ---------- */

.drawer {
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.35);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono-font);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-header button {
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: transparent;
  cursor: pointer;
}

.drawer-content { padding: 1.2rem; overflow-y: auto; }

.notes-drawer {
  right: 1rem;
  bottom: 4.5rem;
  width: min(34rem, calc(100vw - 2rem));
  max-height: 55vh;
  border-radius: 0.9rem;
}

.notes-drawer .drawer-content { font-size: 1.05rem; line-height: 1.55; }

.backup-panel { inset: 1.5rem; border-radius: 1rem; }

.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 0.8rem;
}

.backup-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--panel-2);
}

.backup-card h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.backup-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.backup-evidence {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.backup-evidence figure {
  margin: 0;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--panel-2);
}

.backup-evidence img {
  display: block;
  width: 100%;
  max-height: 16rem;
  object-fit: contain;
  object-position: top;
  border-radius: 0.4rem;
  background: #fff;
}

.backup-evidence figcaption { margin-top: 0.5rem; color: var(--faint); font-size: 0.8rem; }

.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
}

.help-card {
  width: min(30rem, calc(100vw - 2rem));
  border: 1px solid var(--line-2);
  border-radius: 1rem;
  background: var(--panel);
}

.help-grid { display: grid; gap: 0.55rem; padding: 1.2rem; }
.help-grid div { display: flex; align-items: center; gap: 0.35rem; color: var(--muted); }
.help-grid span { margin-left: auto; }

kbd {
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line-2);
  border-radius: 0.3rem;
  color: var(--ink);
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  bottom: 4.5rem;
  left: 50%;
  z-index: 60;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.75rem;
  opacity: 0;
  transform: translate(-50%, 0.5rem);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.speaker-notes { display: none; }
.handout { display: none; }

.noscript-message {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 70;
  padding: 1rem;
  border-radius: 0.6rem;
  background: var(--panel);
}

/* ---------- close: QR ---------- */

.close-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2em;
  margin-top: 2em;
}

.close-row .close-links { flex-direction: column; align-items: flex-start; margin-top: 0; }

.qr-group { display: flex; gap: 0.9em; }

.qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  margin: 0;
}

.qr img {
  display: block;
  width: 6.4em;
  height: 6.4em;
  padding: 0.25em;
  border-radius: 0.5em;
  background: #fff;
}

.qr figcaption {
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.6em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/*
 * ---------- handout: phones & portrait screens ----------
 * The 16:9 stage would shrink to unreadable size, so slides become a readable
 * document: one column, natural height, native scrolling, plus a short summary.
 */
@media screen and (max-width: 760px), screen and (orientation: portrait) and (max-width: 1100px) {
  body { overflow: auto; }

  .deck {
    position: static;
    overflow: visible;
    scroll-snap-type: none;
  }

  .slide {
    display: block;
    height: auto;
    padding: 2.6rem 1.25rem 2.2rem;
    border-bottom: 1px solid var(--line);
    scroll-snap-align: none;
    scroll-margin-top: 2.6rem;
  }

  .slide:first-child { padding-top: 4.2rem; }

  .stage,
  .stage--title,
  .stage--center,
  .stage--close {
    width: 100%;
    max-width: 40rem;
    height: auto;
    margin: 0 auto;
    padding: 0;
    overflow: visible;
    font-size: clamp(15px, 4.2vw, 18px);
    line-height: 1.45;
  }

  .js .slide .r { opacity: 1; transform: none; transition: none; }
  .js .slide .bar-track i { transform: none; }
  .js .slide .line { stroke-dashoffset: 0; }
  .js .slide .line--dashed { opacity: 1; }

  h1 { font-size: 2.9em; }
  h2 { font-size: 1.9em; margin-bottom: 0.8em; }

  .stage--title { display: block; }
  .title-copy { max-width: none; }
  .ipa-stack { display: none; }
  .byline { flex-wrap: wrap; margin-top: 1.6em; }

  .stage--center { display: flex; align-items: flex-start; text-align: left; }
  .hero-number { font-size: 6.5em; }
  .hero-question { font-size: 1.4em; }

  .sizes, .layers, .findings, .questions, .pipeline,
  .rule, .decisions, .split--ci { margin-top: 0; margin-bottom: 0; }

  .grid-3, .split, .split--even, .split--ci, .split--android, .reveal-grid { grid-template-columns: 1fr; }
  .grid-4, .pipeline { grid-template-columns: 1fr 1fr; }
  .split, .reveal-grid { gap: 1em; }

  .rule, .decisions, .thesis { margin-top: 1em; }
  .decisions strong { flex-basis: 100%; margin-left: 0; }

  .layer { grid-template-columns: 2em 1fr; row-gap: 0.4em; }
  .layer-cmd, .layer-answer { grid-column: 2; white-space: normal; }

  .bar-row { grid-template-columns: 6em 1fr 3.4em; }

  .questions li { grid-template-columns: 1.8em 1fr; }
  .questions li span { grid-column: 2; }

  .pipe + .pipe::before { display: none; }

  .code { overflow-x: auto; font-size: 0.72em; }

  .chart { margin: 0; }
  .chart svg { height: auto; }
  .axis-x text { font-size: 30px; }
  .zone-label, .val-note { font-size: 24px; }
  .axis-y text { font-size: 26px; }
  .val { font-size: 44px; }

  .shot { max-height: 26rem; }
  .shot img { aspect-ratio: 4 / 3; flex: none; }

  .twins { grid-template-columns: 1fr; }
  .twin-eq { display: none; }

  .close-lines { font-size: 2.6em; }
  .close-row { flex-direction: column; align-items: flex-start; }
  .close-links { flex-direction: column; width: 100%; }

  .foot {
    position: static;
    flex-wrap: wrap;
    gap: 0.4em 1em;
    margin-top: 1.4em;
  }

  .handout {
    display: block;
    margin-top: 1.2em;
    padding: 1em 1.1em;
    border-left: 3px solid var(--accent);
    border-radius: 0 0.6em 0.6em 0;
    background: var(--panel);
    color: var(--muted);
    font-size: 0.95em;
  }

  .handout strong { color: var(--ink); }

  .deck-nav, #fullscreen-button, #help-button, .slide-counter { display: none; }

  .topbar {
    position: fixed;
    padding: 0.6rem 1rem;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
    pointer-events: auto;
  }

  body.is-idle { cursor: auto; }
  body.is-idle .topbar { opacity: 1; pointer-events: auto; }
}

/* ---------- print / PDF: one 16:9 slide per page ---------- */

@media print {
  @page { size: 338.67mm 190.5mm; margin: 0; }

  html, body { overflow: visible; height: auto; }
  body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

  .deck { position: static; overflow: visible; }

  .slide {
    height: 190.5mm;
    break-after: page;
    page-break-after: always;
  }

  .stage { --u: 3.3867mm; }

  .js .slide .r { opacity: 1; transform: none; transition: none; }
  .js .slide .bar-track i { transform: none; }
  .js .slide .line { stroke-dashoffset: 0; }
  .js .slide .line--dashed { opacity: 1; }

  .topbar, .deck-nav, .drawer, .help-overlay, .toast { display: none !important; }
}

/* =====================================================================
 * v2 additions: Vergleiche story (composition, twist, attic, climax, loop)
 * ===================================================================== */

.sub-hero {
  margin-top: 0.6em;
  color: var(--muted);
  font-size: 1.35em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sub-hero strong { color: var(--ink); }

.strike { position: relative; color: var(--faint); }
.strike::after {
  position: absolute;
  top: 52%;
  left: -0.1em;
  right: -0.1em;
  height: 0.09em;
  background: var(--accent);
  content: "";
  transform-origin: left;
  transition: transform 450ms ease;
}

.title-tag {
  display: inline-block;
  margin-top: 1.4em;
  padding: 0.3em 0.8em;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.62em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* stacked composition bar */
.stack {
  display: flex;
  gap: 0.2em;
  height: 4.4em;
  margin-top: auto;
}

.stack-seg {
  display: flex;
  flex: var(--w) 1 0;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 0.5em 0.6em;
  border-radius: 0.45em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.stack-seg b { font-size: 1.15em; font-weight: 800; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.stack-seg small { color: var(--muted); font-size: 0.62em; white-space: nowrap; }
.stack-seg--code { background: color-mix(in srgb, var(--blue) 22%, var(--panel)); border-color: color-mix(in srgb, var(--blue) 45%, transparent); }
.stack-seg--img { background: color-mix(in srgb, var(--accent) 22%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.stack-seg--fw { background: color-mix(in srgb, var(--blue) 10%, var(--panel)); }
.stack-seg--tiny b { font-size: 0.8em; }
.stack-seg--tiny small { display: none; }

.stack-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5em;
  color: var(--faint);
  font-family: var(--mono-font);
  font-size: 0.56em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5em;
  margin-top: 1.4em;
  margin-bottom: auto;
}

.chip {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  padding: 0.65em 0.8em;
  border: 1px solid var(--line);
  border-radius: 0.55em;
  background: var(--panel);
}

.chip code { font-size: 0.66em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip span { color: var(--muted); font-size: 0.7em; }
.chip--owner { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.chip--owner code { color: var(--accent); }

/* flashback */
.flash-badge {
  align-self: flex-start;
  margin-bottom: 0.9em;
  padding: 0.25em 0.75em;
  border-radius: 999px;
  background: var(--track);
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.6em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.flash-grid {
  display: grid;
  flex: 1;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: stretch;
  gap: 0.8em;
  margin-bottom: auto;
}

.flash-step { display: flex; flex-direction: column; gap: 0.4em; }
.flash-step .size-value { font-size: 2.6em; }
.flash-step p { color: var(--muted); font-size: 0.8em; }
.flash-arrow { color: var(--faint); }

/* twist: code vs images per module */
.versus {
  display: grid;
  flex: 1;
  grid-template-columns: 1.7fr 1fr;
  align-items: center;
  gap: 1.6em;
}

.cv { display: flex; flex-direction: column; gap: 0.42em; }

.cv-row {
  display: grid;
  grid-template-columns: 6.2em 1fr 3.2em;
  align-items: center;
  gap: 0.7em;
  font-size: 0.8em;
}

.cv-name { color: var(--muted); font-weight: 600; white-space: nowrap; }
.cv-val { color: var(--muted); font-family: var(--mono-font); font-size: 0.85em; text-align: right; font-variant-numeric: tabular-nums; }

.cv-track { display: flex; gap: 0.12em; height: 1.05em; }
.cv-track i, .cv-track b {
  display: block;
  height: 100%;
  border-radius: 0.22em;
  transform-origin: left;
  transition: transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1) calc(200ms + var(--d, 0) * 70ms);
}
.cv-track i { width: calc(var(--c) * 1%); background: var(--blue); }
.cv-track b { width: calc(var(--m) * 1%); background: var(--accent); }
.js .slide .cv-track i, .js .slide .cv-track b { transform: scaleX(0); }
.js .slide.is-active .cv-track i, .js .slide.is-seen .cv-track i,
.js .slide.is-active .cv-track b, .js .slide.is-seen .cv-track b { transform: none; }

.cv-legend { display: flex; gap: 1.4em; margin-top: 0.4em; color: var(--muted); font-size: 0.7em; }

.then-now { display: flex; flex-direction: column; gap: 0.7em; }
.then-now .card { padding: 0.9em 1.1em; }
.then-now .split-bar { margin: 0.5em 0 0.35em; }
.then-now .split-bar b { background: var(--blue); }
.then-now .split-bar i { background: var(--accent); }
.tn-title { font-size: 0.95em; font-weight: 750; }
.tn-title small { color: var(--faint); font-weight: 500; }
.tn-note { color: var(--muted); font-size: 0.72em; }
.punch { font-size: 1.15em; font-weight: 780; letter-spacing: -0.02em; line-height: 1.15; }

/* attic */
.attic { grid-template-rows: auto auto; }
.attic .finding { padding: 1.1em 1.2em 1.2em; }
.attic .finding-n { font-size: 2.7em; }
.attic .finding--hot { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }

/* climax */
.stage--climax { justify-content: center; }
.climax-lines {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  margin: 0 0 0.8em;
  font-size: 3.3em;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.climax-lines .muted { color: var(--faint); }
.climax-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  margin-top: 1.4em;
}
.climax-facts span {
  padding: 0.4em 0.9em;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.72em;
}
.climax-facts strong { color: var(--ink); }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6em; }
.stat { padding: 0.8em 1em; border: 1px solid var(--line); border-radius: 0.6em; background: var(--panel); }
.stat b { display: block; font-size: 2em; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.stat span { color: var(--muted); font-size: 0.72em; }
.stat--good b { color: var(--green); }

/* dashboard mock */
.dash {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 0.7em;
  background: var(--panel);
  font-size: 0.78em;
}
.dash-row {
  display: grid;
  grid-template-columns: 2.2em 1fr 6.5em 6.5em;
  align-items: center;
  gap: 0.8em;
  padding: 0.55em 1em;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.dash-row:first-child { border-top: 0; }
.dash-row--head { color: var(--faint); font-family: var(--mono-font); font-size: 0.78em; letter-spacing: 0.08em; text-transform: uppercase; background: var(--panel-2); }
.dash-row span:nth-child(n+3) { text-align: right; font-family: var(--mono-font); }
.dash-row small { display: block; font-size: 0.78em; }
.up { color: var(--accent); }
.down { color: var(--green); }
.dash-row--hot { background: var(--accent-soft); }

.loop-side { display: flex; flex-direction: column; gap: 1em; }
.verdict { display: flex; flex-direction: column; gap: 0.35em; }
.verdict div { display: flex; gap: 0.6em; align-items: baseline; font-size: 0.86em; }
.verdict i { flex: none; width: 1.2em; font-style: normal; font-weight: 800; }
.verdict .ok i { color: var(--green); }
.verdict .no i { color: var(--accent); }
.verdict span { color: var(--muted); }
.verdict strong { color: var(--ink); }

/* pipeline: today vs next */
.pipeline--5 { grid-template-columns: repeat(5, 1fr); }
.pipe--today { border-style: dashed; }

@media screen and (max-width: 760px), screen and (orientation: portrait) and (max-width: 1100px) {
  .stack { height: auto; flex-direction: column; }
  .stack-seg { flex: none; padding: 0.6em 0.8em; }
  .stack-seg--tiny small { display: inline; }
  .stack-seg--tiny b { font-size: 1.15em; }
  .stack-seg small { white-space: normal; }
  .chips, .flash-grid, .versus, .stats { grid-template-columns: 1fr; }
  .chips { margin-top: 1em; }
  .cv-row { grid-template-columns: 5.4em 1fr 3em; }
  .js .slide .cv-track i, .js .slide .cv-track b { transform: none; }
  .js .slide .strike::after { transform: none; }
  .climax-lines { font-size: 2.1em; }
  .dash-row { grid-template-columns: 1.6em 1fr 5em 5em; gap: 0.5em; padding: 0.5em 0.7em; }
  .pipeline--5 { grid-template-columns: 1fr 1fr; }
  .sub-hero { font-size: 1.1em; }
}

@media print {
  .js .slide .cv-track i, .js .slide .cv-track b { transform: none; }
  .js .slide .strike::after { transform: none; }
}

/* v2 layout tuning (from rendered review) */
.stack-wrap { margin-top: auto; }
.stack-wrap .stack { margin-top: 0; height: 6em; }
.flash-grid { flex: none; margin: auto 0; }
.attic { margin-bottom: auto; }
.split--loop { flex: none; align-items: center; margin: auto 0; }
.split--loop .loop-side { gap: 2em; }
.then-now .split-bar .rest { background: var(--faint); }
@media screen and (max-width: 760px), screen and (orientation: portrait) and (max-width: 1100px) {
  .stack-wrap .stack { height: auto; }
  .flash-grid, .split--loop { margin: 0; }
}

.attic + .decisions { margin-top: 1.1em; flex-wrap: nowrap; }
.attic + .decisions span { font-size: 0.72em; white-space: nowrap; }
.attic + .decisions strong { font-size: 1em; white-space: nowrap; }
@media screen and (max-width: 760px), screen and (orientation: portrait) and (max-width: 1100px) {
  .attic + .decisions { flex-wrap: wrap; }
  .attic + .decisions span { white-space: normal; }
}

.byline abbr { text-decoration: none; cursor: help; }

/* ---------- v2 motion ----------
 * Only on the projected deck: never in the phone handout, print, or with reduced motion.
 * Every effect shows something (growth, composition, sequence). Nothing loops.
 * Reveals use clip-path rather than scale so text never distorts mid-animation.
 */
.hero-number .num { font-variant-numeric: tabular-nums; }

@media screen and (prefers-reduced-motion: no-preference) and (min-width: 761px) and (orientation: landscape),
       screen and (prefers-reduced-motion: no-preference) and (min-width: 1101px) {
  /* title: the IPA fills bottom-up */
  .js .slide .ipa-seg { clip-path: inset(100% 0 0 0 round 0.35em); transition: clip-path 700ms cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .slide .ipa-seg--q4 { transition-delay: 350ms; }
  .js .slide .ipa-seg--q3 { transition-delay: 500ms; }
  .js .slide .ipa-seg--q2 { transition-delay: 650ms; }
  .js .slide .ipa-seg--q { transition-delay: 800ms; }
  .js .slide.is-active .ipa-seg, .js .slide.is-seen .ipa-seg { clip-path: inset(0 0 0 0 round 0.35em); }

  /* 4: composition sweeps left to right */
  .js .slide .stack-seg { clip-path: inset(0 100% 0 0); transition: clip-path 650ms cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .slide .stack-seg:nth-child(1) { transition-delay: 300ms; }
  .js .slide .stack-seg:nth-child(2) { transition-delay: 600ms; }
  .js .slide .stack-seg:nth-child(3) { transition-delay: 850ms; }
  .js .slide .stack-seg:nth-child(4) { transition-delay: 1000ms; }
  .js .slide .stack-seg:nth-child(5) { transition-delay: 1100ms; }
  .js .slide.is-active .stack-seg, .js .slide.is-seen .stack-seg { clip-path: inset(0 0 0 0); }

  /* 5 + 6: split bars fill */
  .js .slide .split-bar { clip-path: inset(0 100% 0 0); transition: clip-path 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 700ms; }
  .js .slide.is-active .split-bar, .js .slide.is-seen .split-bar { clip-path: inset(0 0 0 0); }

  /* 7: the Instagram card glows once */
  .js .slide.is-active .finding--hot { animation: glow-once 1600ms ease-out 900ms 1; }

  /* 8: data points pop in after the line has drawn */
  .js .slide .chart .pt { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 400ms cubic-bezier(0.3, 1.6, 0.5, 1); }
  .js .slide .chart .pt:nth-of-type(1) { transition-delay: 400ms; }
  .js .slide .chart .pt:nth-of-type(2) { transition-delay: 700ms; }
  .js .slide .chart .pt:nth-of-type(3) { transition-delay: 1100ms; }
  .js .slide .chart .pt:nth-of-type(4) { transition-delay: 1400ms; }
  .js .slide .chart .pt:nth-of-type(5) { transition-delay: 1900ms; }
  .js .slide.is-active .chart .pt, .js .slide.is-seen .chart .pt { transform: none; }

  /* 10: dashboard rows tick in, then the shared-core row flags itself */
  .js .slide .dash-row { opacity: 0; transform: translateX(-0.6em); transition: opacity 400ms ease, transform 400ms ease; }
  .js .slide .dash-row:nth-child(1) { transition-delay: 250ms; }
  .js .slide .dash-row:nth-child(2) { transition-delay: 400ms; }
  .js .slide .dash-row:nth-child(3) { transition-delay: 520ms; }
  .js .slide .dash-row:nth-child(4) { transition-delay: 640ms; }
  .js .slide .dash-row:nth-child(5) { transition-delay: 900ms; }
  .js .slide .dash-row:nth-child(6) { transition-delay: 1000ms; }
  .js .slide.is-active .dash-row, .js .slide.is-seen .dash-row { opacity: 1; transform: none; }
  .js .slide.is-active .dash-row--hot { animation: flag-once 1400ms ease-out 1200ms 1; }

  /* 11: the pipeline runs once, step by step */
  .js .slide .pipe { opacity: 0.25; transition: opacity 350ms ease, border-color 350ms ease; }
  .js .slide .pipe:nth-child(1) { transition-delay: 350ms; }
  .js .slide .pipe:nth-child(2) { transition-delay: 650ms; }
  .js .slide .pipe:nth-child(3) { transition-delay: 950ms; }
  .js .slide .pipe:nth-child(4) { transition-delay: 1250ms; }
  .js .slide.is-active .pipe, .js .slide.is-seen .pipe { opacity: 1; }
  .js .slide.is-active .pipe--hot { animation: glow-once 1400ms ease-out 1600ms 1; }

  /* 14: one underline under the last line */
  .js .slide .underline {
    background: linear-gradient(currentColor, currentColor) no-repeat 0 92% / 0% 0.06em;
    transition: background-size 900ms cubic-bezier(0.4, 0, 0.2, 1) 900ms;
  }
  .js .slide.is-active .underline, .js .slide.is-seen .underline { background-size: 100% 0.06em; }
}

@keyframes glow-once {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 0.9em transparent; }
}

@keyframes flag-once {
  0% { background-color: color-mix(in srgb, var(--accent) 35%, transparent); }
  100% { background-color: var(--accent-soft); }
}

.hero-number .num { margin: 0; color: inherit; font-size: 1em; font-weight: inherit; letter-spacing: inherit; }

.qr--slides img { outline: 0.18em solid var(--accent); outline-offset: 0.18em; }
.qr--slides figcaption { color: var(--accent); }

.stage--close .close-row { margin-top: 1.4em; }
.stage--close .close-links { gap: 0.4em; }
.stage--close .close-links a { padding: 0.4em 0.9em; }

/* ---------- click steps ----------
 * [data-step] elements wait for a click on the projected deck. Handout and
 * print never match this query, so they always show the final state.
 */
@media screen and (min-width: 761px) and (orientation: landscape), screen and (min-width: 1101px) {
  .js .slide .strike[data-step]:not(.is-shown)::after { transform: scaleX(0); }
  .js .slide .step-fade { transition: opacity 450ms ease 450ms, transform 450ms ease 450ms; }
  .js .slide .step-fade:not(.is-shown) { opacity: 0; transform: translateY(0.4em); transition-delay: 0ms; }
}
