:root {
  --bg: #ffffff;
  --surface: #f2f2f2;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --accent: #d92b21;
  --accent-ink: #ffffff;
  --field-1: #000000;
  --field-1-ink: #ffffff;

  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-head: clamp(1.625rem, 1.4rem + 0.6vw, 1.875rem);
  --step-display: clamp(3rem, 1rem + 6.4vw, 6.6rem);

  --display: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; /* taste-skill-ignore: only for <pre>/<code> and data-ui transcript fragments */

  --m: clamp(20px, 2.4vw, 32px);
  --axis: max(var(--m), 27vw);
  --radius: 4px;
  --gap-section: clamp(120px, 14vw, 200px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body) / 1.55 var(--text);
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: var(--step-head); }
p { margin: 0; }
.soft { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
code, pre { font-family: var(--mono); }

/* ---------- hero: one column on the 27% axis ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 56px var(--m) 0 var(--axis);
  display: grid;
  grid-template-rows: auto auto 1fr;
}
.mark { width: 40px; height: 40px; }
.top-link {
  position: absolute; top: 56px; right: var(--m);
  font: 400 var(--step-small) / 1 var(--text);
  text-decoration: none;
}
.top-link:hover { text-decoration: underline; }
.hero-col { max-width: 460px; margin-top: 120px; align-self: start; }
.hero h1 {
  font-size: var(--step-head);
  text-transform: uppercase;
  line-height: 1.08;
}
.hero-col p { margin-top: 20px; max-width: 30em; }
.actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.button {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  font: 700 var(--step-small) / 1 var(--display);
  letter-spacing: 0;
  padding: 15px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease;
}
.button:hover { background: #b8231b; transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.text-link { text-decoration: none; font-weight: 600; }
.text-link span { display: inline-block; transition: transform .18s ease; }
.text-link:hover span { transform: translateX(4px); }

.peek {
  position: relative;
  width: min(720px, 100%);
  background: var(--surface);
  padding: 24px 26px 26px;
  margin-top: 56px;
  align-self: start;
  overflow: hidden;
}
.peek pre, .call pre { margin: 0; font-size: var(--step-small); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.pointer { position: absolute; right: 36px; top: 92px; }
.prompt { color: var(--accent); }
.dot { font-size: 12px; }
.dot.done { color: #1f9d55; }
.dot.wait { color: #a3a3a3; }
.dot.run { color: var(--accent); }

/* ---------- showcase: one row, three states ---------- */
.showcase { padding: 120px var(--m) 0; }
.showcase h2 { margin-left: calc(var(--axis) - var(--m)); margin-bottom: 96px; }
.state {
  display: grid;
  grid-template-columns: calc(var(--axis) - var(--m) - 32px) minmax(0, 640px) 1fr;
  column-gap: 32px;
  align-items: start;
}
.state + .state { margin-top: 56px; }
.state-word { text-align: right; color: var(--muted); font-size: var(--step-body); line-height: 1.2; padding-top: 14px; }
.call {
  grid-column: 2;
  background: var(--surface);
  border: 1px solid #dedede; /* taste-skill-ignore: inside a data-ui fragment, the transcript row's own border */
  border-radius: 6px;
  padding: 14px 18px;
}
.call.live { background: #fff; border-color: #bdbdbd; }
.frames { border: 0; padding: 0; margin: 14px 0 0; }
.frames legend { font: 400 var(--step-small)/1.4 var(--display); color: var(--muted); padding: 0; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 400 var(--step-small)/1 var(--display);
  background: var(--surface);
  border: 1px solid #d0d0d0; /* taste-skill-ignore: a control inside a data-ui fragment */
  border-radius: 4px;
  padding: 7px 9px;
  cursor: pointer;
  color: var(--ink);
  transition: background-color .15s ease, transform .15s ease;
}
.chip:hover { background: #e7e7e7; }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.call-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.run {
  font: 700 var(--step-small)/1 var(--display);
  background: var(--ink); color: #fff;
  border: 0; border-radius: 4px;
  padding: 10px 16px; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.run:hover { background: #2b2b2b; }
.run:active { transform: scale(.96); }
.hint { font: 400 var(--step-small)/1.4 var(--display); color: var(--muted); }
.result { margin: 14px 0 4px; display: flex; align-items: end; gap: 16px; flex-wrap: wrap; }
.result img { width: 280px; height: auto; background: #fff; border: 1px solid #dedede; } /* taste-skill-ignore: the PNG frame inside a data-ui fragment */
.result figcaption { font: 400 var(--step-small)/1.4 var(--display); color: var(--muted); }
.result.flash img { animation: pop .45s ease; }
@keyframes pop { from { opacity: .2; transform: scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- band: the film ---------- */
.band { margin-top: var(--gap-section); background: var(--field-1); color: var(--field-1-ink); padding: 96px var(--m) 104px; }
.band-inner { max-width: 1400px; margin: 0 auto; }
.band h2 { margin-bottom: 40px; }
.film { width: 100%; background: #000; }
.band-note { margin-top: 20px; color: #e0e0e0; font-size: var(--step-body); }

/* ---------- steps: run-in column ---------- */
.steps { padding: var(--gap-section) var(--m) 0 var(--axis); }
.steps h2 { margin-bottom: 48px; }
.step { max-width: 600px; color: var(--muted); }
.step strong { color: var(--ink); font-weight: 600; }
.step + .step { margin-top: 72px; }
.step > :not(p) { margin-top: 20px; }
.menu {
  background: var(--surface);
  border-radius: 6px;
  padding: 16px 18px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font: 400 var(--step-small)/1.5 var(--display);
  color: var(--ink);
}
.menu b { font-weight: 700; }
.menu-file { color: var(--muted); }
.fade { position: relative; aspect-ratio: 1600 / 901; background: var(--surface); }
.fade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.fade img.on { opacity: 1; }
.code {
  margin: 20px 0 0;
  background: var(--surface);
  color: var(--ink);
  padding: 16px 18px;
  font-size: var(--step-small);
  line-height: 1.65;
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.shot { width: 100%; max-width: 560px; }

/* ---------- tools: two-ended rows ---------- */
.tools { margin-top: var(--gap-section); background: var(--surface); padding: 120px var(--m) 0 var(--axis); }
.tools .d.ink { background: var(--ink); }
.tools h2 { margin-bottom: 32px; }
.group { color: var(--muted); font-size: var(--step-small); max-width: 520px; }
.rows + .group { margin-top: 40px; }
.rows { list-style: none; margin: 8px 0 0; padding: 0; max-width: 520px; }
.rows li { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.rows code { font-size: var(--step-small); color: var(--ink); }
.rows .v { margin-left: auto; padding-left: 16px; font-size: var(--step-small); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.d { width: 10px; height: 10px; border-radius: 50%; flex: none; margin: 0 3px; }
.d.ink { background: var(--ink); }
.d.red { background: var(--accent); }

/* ---------- stats: ledger aligned on the decimal ---------- */
.stats {
  background: var(--surface);
  padding: var(--gap-section) var(--m) 140px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: center;
}
.stats h2 { grid-column: 1 / span 5; font-size: var(--step-head); line-height: 1.1; max-width: 9em; }
.ledger { grid-column: 7 / span 6; margin: 0; }
.ledger > div {
  display: grid;
  grid-template-columns: 2.6em .9em minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0;
  font: 700 var(--step-display) / 1 var(--display);
}
.ledger > div + div { margin-top: 20px; }
.ledger .n { display: contents; }
.ledger .w, .ledger .f {
  font: 700 var(--step-display) / 1 var(--display);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums lining-nums;
}
.ledger .w { text-align: right; }
.ledger dd { margin: 0 0 0 24px; font: 400 var(--step-body) / 1.35 var(--text); letter-spacing: 0; color: var(--ink); max-width: 18em; }

/* ---------- cta: a sentence with a blank ---------- */
.cta { padding: 120px var(--m) 140px; background: var(--accent); color: var(--accent-ink); }
.sentence h2 {
  font-size: var(--step-display);
  line-height: 1.05;
  max-width: 11em;
  text-wrap: wrap;
}
.pick, #copy {
  display: inline-flex;
  align-items: center;
  height: 1.02em;
  line-height: 1;
  vertical-align: -0.16em;
  border: 0;
  border-radius: var(--radius);
  margin: 0 .06em;
  font: inherit;
  letter-spacing: inherit;
}
.pick {
  position: relative;
  padding: 0 .78em 0 .22em;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230a0a0a' stroke-width='2'/%3E%3C/svg%3E") no-repeat calc(100% - .2em) 54% / .32em auto;
  color: var(--ink);
}
.pick select {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
  font-size: 16px;
}
.pick:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
.t { text-box: trim-both cap alphabetic; display: block; }
#copy {
  padding: 0 .22em;
  background: var(--ink); color: #fff;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
#copy:hover { background: #2b2b2b; }
#copy:active { transform: scale(.97); }
.cta-note { margin-top: 28px; color: var(--accent-ink); font-size: var(--step-body); }
.cta .code { max-width: 900px; background: var(--bg); color: var(--ink); }
.cta :focus-visible { outline-color: var(--ink); }

/* ---------- footer: one quiet line ---------- */
.foot {
  margin-top: 30svh;
  padding: 0 var(--m) 30px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  font-size: var(--step-small);
}
.foot nav { display: flex; gap: 24px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .right { text-align: right; }

/* ---------- motion: entrances ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
.peek { animation: rise .9s .35s cubic-bezier(.2,.7,.2,1) both; }
.pointer { animation: nudge 2.6s 1.4s ease-in-out infinite; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-6px, 3px); } }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { transition: opacity .3s linear; transform: none; }
  .peek, .pointer, .result.flash img { animation: none; }
  .fade img { transition: none; }
  * { scroll-behavior: auto; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  :root { --axis: var(--m); }
  .hero { padding-top: 32px; }
  .top-link { top: 36px; }
  .hero-col { margin-top: 22svh; }
  .hero h1 { font-size: 24px; }
  .peek { width: 100%; margin-top: 40px; padding: 18px 16px; }
  .pointer { left: auto; right: 22px; }
  .showcase h2 { margin-left: 0; margin-bottom: 48px; font-size: 26px; }
  .state { display: flex; flex-direction: column-reverse; }
  .state + .state { margin-top: 48px; }
  .state-word { text-align: left; font-size: var(--step-body); padding-top: 10px; }
  .call { width: 100%; }
  .band { padding: 72px var(--m); }
  .step + .step { margin-top: 56px; }
  .steps h2 { font-size: 24px; }
  .rows li { min-height: 44px; flex-wrap: wrap; padding: 6px 0; row-gap: 2px; }
  .rows .v { margin-left: 21px; padding-left: 0; width: 100%; text-align: left; }
  .stats { display: block; }
  .stats h2 { margin-bottom: 40px; }
  .ledger > div { grid-template-columns: 2.6em auto; row-gap: 4px; font-size: 15vw; }
  .ledger > div + div { margin-top: 28px; }
  .ledger .w, .ledger .f { font-size: 15vw; }
  .ledger dd { grid-column: 1 / -1; margin: 0; }
  .sentence h2 { font-size: 8.4vw; line-height: 1.3; }
  .pick { margin-left: 0; }
  .foot { grid-template-columns: 1fr; gap: 8px; margin-top: 20svh; padding-bottom: 24px; }
  .foot .right { text-align: left; }
}
