/* ReadyGate: palette from the icon. Teal ink, mint signal, warm paper. */
:root {
  --bg: #FBFCFC;
  --bg-sunk: #F2F5F5;
  --surface: #FFFFFF;
  --ink: #0E1F24;
  --ink-2: #3D5157;
  --ink-3: #5F7278;
  --line: #E1E8E9;
  --line-strong: #C9D4D6;
  --brand: #124D5C;
  --brand-hover: #0C3A46;
  --on-brand: #FFFFFF;
  --mint: #5ED6A0;
  --mint-ink: #0E6B47;
  --mint-tint: #E4F7EE;
  --hold: #C2410C;
  --hold-tint: #FFF1E8;
  --paper: #F2EFE8;
  --term: #0B1A1F;
  --term-2: #8FA8AE;
  --term-ink: #D8E4E6;
  --focus: #2E8FA6;
  --shadow-lg: 0 1px 2px rgba(14, 31, 36, .06), 0 12px 32px -8px rgba(14, 31, 36, .18), 0 40px 80px -24px rgba(14, 31, 36, .22);
  --shadow-sm: 0 1px 2px rgba(14, 31, 36, .06), 0 4px 12px -4px rgba(14, 31, 36, .10);
  --radius: 12px;
  --max: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071417;
    --bg-sunk: #0B1D21;
    --surface: #0E2328;
    --ink: #E8F0F1;
    --ink-2: #B3C4C7;
    --ink-3: #8BA0A4;
    --line: #18343A;
    --line-strong: #234850;
    --brand: #5ED6A0;
    --brand-hover: #7FE2B6;
    --on-brand: #06251A;
    --mint: #5ED6A0;
    --mint-ink: #7FE2B6;
    --mint-tint: #0F3328;
    --hold: #FB923C;
    --hold-tint: #2A1A10;
    --paper: #F2EFE8;
    --term: #04100F;
    --focus: #7FE2B6;
    --shadow-lg: 0 1px 2px rgba(0, 0, 0, .4), 0 24px 60px -16px rgba(0, 0, 0, .6);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 16px -6px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--line-strong) transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
  caret-color: var(--brand); accent-color: var(--brand);
}
::selection { background: var(--mint); color: #06251A; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; }
p code, li code, td code { background: var(--bg-sunk); border: 1px solid var(--line); padding: .08em .38em; border-radius: 5px; color: var(--ink); }
h1, h2, h3 { text-wrap: balance; color: var(--ink); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -.015em; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--bg-sunk); }
.nav .btn { margin-left: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; font: 600 15px/1 "Inter", system-ui, sans-serif; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 1px 2px rgba(14, 31, 36, .2), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-3); }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.nav .btn { height: 38px; padding: 0 14px; font-size: 14px; color: var(--on-brand); }
.nav .btn:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn svg { width: 16px; height: 16px; }

/* Hero */
.hero { padding: 64px 0 0; text-align: center; }
.hero h1 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; margin: 0 auto 18px; max-width: 14.5em; }
.hero .lede { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 36em; margin: 0 auto 28px; line-height: 1.55; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero .fine { margin: 18px 0 0; font-size: 14px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }
.hero .fine span { display: inline-flex; align-items: center; gap: 6px; }
.hero .fine svg { width: 15px; height: 15px; color: var(--mint-ink); }

/* Product window */
.stage { position: relative; margin: 44px auto 0; max-width: 1120px; padding: 0 24px; isolation: isolate; }
.window { margin: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; text-align: left; }
.window-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-sunk); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.window-bar .title { margin: 0 auto; font-size: 12.5px; color: var(--ink-3); font-weight: 500; transform: translateX(-24px); }
.panes { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.term { background: var(--term); color: var(--term-ink); padding: 22px 24px 26px; font: 400 13.5px/1.65 "JetBrains Mono", ui-monospace, monospace; min-height: 460px; }
.term .who { color: var(--term-2); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 4px; }
.term .cmd { color: #FFFFFF; }
.term .cmd b { color: #5ED6A0; font-weight: 500; }
.term p { margin: 0 0 14px; }
.term .ref { color: #8FD3E8; }
.term .hold { border: 1px solid rgba(251, 146, 60, .45); background: rgba(194, 65, 12, .14); border-radius: 8px; padding: 10px 12px; margin: 2px 0 14px; }
.term .hold b { color: #FDBA74; font-weight: 600; letter-spacing: .06em; font-size: 11.5px; display: block; margin-bottom: 2px; }
.term .ok { color: #5ED6A0; }
.term .gap { color: var(--term-2); font-style: italic; }
.ticket { background: var(--paper); color: #172A2F; padding: 26px 28px 28px; font-size: 14px; line-height: 1.55; border-left: 1px solid var(--line); }
.ticket .path { font: 500 11.5px/1 "JetBrains Mono", monospace; color: #4E6268; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ticket .path .tag { font-family: "Inter", sans-serif; font-weight: 600; font-size: 11px; color: #0E6B47; background: #D6F3E5; border-radius: 999px; padding: 3px 8px; letter-spacing: .01em; }
.ticket .t-title { font-weight: 700; margin: 0 0 14px; font-size: 19px; letter-spacing: -.02em; line-height: 1.3; color: #0E1F24; }
.ticket .t-label { margin: 16px 0 6px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: #4E6268; font-weight: 600; }
.ticket ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ticket li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.ticket .id { font: 600 11.5px/1.9 "JetBrains Mono", monospace; color: #124D5C; white-space: nowrap; }

/* Sections */
section.block { padding: 120px 0 0; }
.block-head { max-width: 40em; margin: 0 0 48px; }
.block-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.block-head h2 { font-size: clamp(30px, 3.8vw, 44px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 14px; font-weight: 700; }
.block-head p { margin: 0; color: var(--ink-2); font-size: 18px; }

/* Steps: a real sequence */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.step { padding: 28px 28px 8px 0; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mint-tint); color: var(--mint-ink); font: 600 13px/1 "Inter", sans-serif; margin-bottom: 16px; }
.step h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.02em; }
.step p { margin: 0 0 14px; color: var(--ink-2); font-size: 16px; }
.step .cmdline { font: 500 13px/1.4 "JetBrains Mono", monospace; color: var(--ink); background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; display: inline-block; }

/* Glimpses: real output inside the steps */
.glimpse { margin: 16px 0 0; background: var(--term); color: var(--term-ink); border-radius: 10px; padding: 14px 16px; font: 400 12.5px/1.6 "JetBrains Mono", ui-monospace, monospace; }
.glimpse .g-verdict { color: #5ED6A0; font-weight: 600; }
.glimpse .g-dim { color: var(--term-2); }
.glimpse .g-ref { color: #8FD3E8; }
.glimpse.g-files { white-space: pre-line; }
.glimpse.g-files span:not(.g-dim) { color: #FFFFFF; }

/* Pro: real output minis */
.pro-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mini { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.mini figcaption { padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg-sunk); font-size: 13px; color: var(--ink-3); font-weight: 500; }
.mini figcaption code { font-size: 13px; color: var(--brand); font-weight: 600; background: none; border: 0; padding: 0; }
.mini-body { padding: 16px; font-size: 14px; line-height: 1.5; color: var(--ink-2); display: grid; gap: 10px; align-content: start; flex: 1; }
.mini-body p { margin: 0; }
.mini-body b { color: var(--ink); font-weight: 600; }
.mini .m-lead { color: var(--ink); }
.mini table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini th, .mini td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.mini th { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.mini td:first-child { font-family: "JetBrains Mono", monospace; font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.m-tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--mint-ink); background: var(--mint-tint); border-radius: 999px; padding: 1px 8px; margin-right: 4px; }
.m-grade { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--ink); background: var(--bg-sunk); border: 1px solid var(--line-strong); margin-right: 6px; }
.m-grade.m-warn { color: var(--hold); background: var(--hold-tint); border-color: transparent; }
.m-note { font-size: 13px; color: var(--ink-3); margin-top: auto !important; }
.pro-src { margin: -24px 0 0; font-size: 13.5px; color: var(--ink-3); }

/* Gates: proof fragments */
.gates { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }

/* Paths: code vs idea */
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.path-col { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.path-col header { padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.path-col header h3 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.02em; }
.path-col header p { margin: 0; color: var(--ink-2); font-size: 15px; }
.cmds { list-style: none; margin: 0; padding: 6px 0; }
.cmds li { display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 16px; padding: 14px 26px; align-items: baseline; }
.cmds li + li { border-top: 1px solid var(--line); }
.cmds code { font-size: 13.5px; font-weight: 600; color: var(--brand); background: none; border: 0; padding: 0; }
.cmds span { color: var(--ink-2); font-size: 15px; }

/* Pro */
.pro { display: grid; gap: 40px; }
.feat { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.feat { list-style: none; margin: 0; padding: 0; display: grid; row-gap: 26px; }
.feat li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; }
.feat .ico { width: 36px; height: 36px; border-radius: 9px; background: var(--mint-tint); color: var(--mint-ink); display: grid; place-items: center; }
.feat .ico svg { width: 18px; height: 18px; }
.feat li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.feat h3 { margin: 4px 0 4px; font-size: 17px; letter-spacing: -.01em; }
.feat p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.trackers { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.trackers table { width: 100%; border-collapse: collapse; font-size: 15px; }
.trackers th, .trackers td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.trackers th { font-size: 12.5px; color: var(--ink-3); font-weight: 600; background: var(--bg-sunk); }
.trackers td { color: var(--ink-2); }
.trackers td:first-child { font-weight: 600; white-space: nowrap; color: var(--ink); }
.trackers .note { padding: 14px 18px; font-size: 14px; color: var(--ink-3); margin: 0; }

/* Proof fragments (gates section) */
.frag { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.frag header { padding: 20px 24px 16px; }
.frag header h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.01em; }
.frag header p { margin: 0; color: var(--ink-2); font-size: 15px; }
.frag .out { margin-top: auto; background: var(--term); color: var(--term-ink); font: 400 13.5px/1.65 "JetBrains Mono", ui-monospace, monospace; padding: 18px 22px; }
.frag .out b { color: #FDBA74; font-weight: 600; }
.frag .out .ref { color: #8FD3E8; }
.frag .paper { margin-top: auto; background: var(--paper); color: #172A2F; font-size: 14.5px; line-height: 1.55; padding: 18px 22px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.frag .paper .id { font: 600 11.5px/1.9 "JetBrains Mono", monospace; color: #124D5C; white-space: nowrap; }
.gates .frag.lead { grid-row: span 2; }
.gates .frag.lead .out { flex: 1; display: grid; align-content: center; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; padding: 28px 30px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 920px; margin: 0 auto; align-items: stretch; }
.plan { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 32px; display: flex; flex-direction: column; }
.plan.pro-plan { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-lg); }
.plan h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.plan h3 .pill { font-size: 12px; font-weight: 600; color: var(--mint-ink); background: var(--mint-tint); padding: 3px 9px; border-radius: 999px; letter-spacing: 0; }
.price { font-size: 46px; font-weight: 700; letter-spacing: -.035em; margin: 14px 0 2px; line-height: 1; font-variant-numeric: tabular-nums; }
.price small { font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.plan .sub { margin: 8px 0 22px; color: var(--ink-2); font-size: 15px; }
.checks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; }
.checks svg { width: 18px; height: 18px; color: var(--mint-ink); margin-top: 3px; }
.plan .push { margin-top: auto; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.input-gh { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); height: 46px; padding: 0 12px; gap: 4px; transition: border-color .15s, box-shadow .15s; }
.input-gh:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.input-gh span { color: var(--ink-3); font-size: 15px; }
.input-gh input { border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 15px "Inter", sans-serif; width: 100%; height: 100%; }
.input-gh input::placeholder { color: var(--ink-3); }
.input-gh.invalid { border-color: var(--hold); }
.plan .btn { width: 100%; }
.buy-note { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-3); }
.buy-note.err { color: var(--hold); }
.buy-note.done { color: var(--ink); background: var(--mint-tint); border-radius: 10px; padding: 12px 14px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; transition: transform .2s; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { margin: -4px 0 20px; color: var(--ink-2); max-width: 62ch; }

/* Closing CTA */
.closer { margin: 120px 0 0; padding: 72px 24px; text-align: center; border-radius: 20px; background: #124D5C; color: #FFFFFF; --on-brand: #FFFFFF; --brand: #124D5C; }
.closer h2 { color: var(--on-brand); font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; margin: 0 0 12px; line-height: 1.1; }
.closer p { margin: 0 auto 28px; max-width: 34em; color: color-mix(in srgb, var(--on-brand) 84%, transparent); font-size: 18px; }
.closer .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.closer .btn-on { background: var(--on-brand); color: var(--brand); }
.closer .btn-on:hover { background: color-mix(in srgb, var(--on-brand) 88%, var(--brand)); color: var(--brand); }
.closer .btn-line { border-color: color-mix(in srgb, var(--on-brand) 45%, transparent); color: var(--on-brand); background: transparent; }
.closer .btn-line:hover { border-color: var(--on-brand); color: var(--on-brand); }

/* Footer */
.site-foot { margin-top: 96px; border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 14px; color: var(--ink-3); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.site-foot p { margin: 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .brand { font-size: 15px; margin-bottom: 8px; }

/* Legal pages */
.legal { max-width: 720px; margin: 0 auto; padding: 64px 24px 0; }
.legal h1 { font-size: clamp(32px, 4.5vw, 44px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 8px; }
.legal .updated { color: var(--ink-3); margin: 0 0 40px; font-size: 15px; }
.legal h2 { font-size: 20px; letter-spacing: -.015em; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 20px; }

/* Replay control in the window bar (shown only when the demo can play) */
.window-bar .replay { position: absolute; right: 10px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 500 12px/1 "Inter", system-ui, sans-serif; cursor: pointer; transition: color .15s, border-color .15s; }
.window-bar .replay:hover { color: var(--ink); border-color: var(--line-strong); }
.window-bar .replay:hover svg { transform: rotate(-60deg); }
.window-bar .replay svg { transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.window-bar .replay[hidden] { display: none; }
.window-bar { position: relative; }
.btn:active { transform: translateY(1px); box-shadow: none; }

/* Citations in the gates section carry a highlight (finished state, also without motion) */
.gates .ref { background: linear-gradient(rgba(143, 211, 232, .2), rgba(143, 211, 232, .2)) no-repeat 0 0 / 100% 100%; border-radius: 5px; }

/* Motion. Authored moment: the hero window plays the real session. The window settles,
   commands type out, replies land, the decision gate closes and holds, then the ticket writes itself. */
@media (prefers-reduced-motion: no-preference) {
  .window { animation: settle 1.1s cubic-bezier(.16, 1, .3, 1) both .15s; }
  @keyframes settle { from { transform: translateY(18px) scale(.985); } to { transform: none; } }

  .window.armed .term > *, .window.armed .ticket :is(.path, .t-title, .t-label, li) { opacity: 0; }
  /* On Replay the old lines fade out (.12s) before each new one lands; on first play they start hidden. */
  .window.again { --pre: fadeold .12s ease-out forwards; --fill: forwards; }

  .window.play .term > * { animation: var(--pre, none), land var(--dur, .34s) cubic-bezier(.16, 1, .3, 1) calc(var(--lead, 0s) + var(--d, 0s)) var(--fill, both); }
  .window.play .term > .cmd:not(.wraps) { width: max-content; max-width: 100%; animation: var(--pre, none), type var(--dur) steps(var(--n, 24), end) calc(var(--lead, 0s) + var(--d)) var(--fill, both); }
  .window.again.play .term > .cmd:not(.wraps) { animation: var(--pre), typein var(--dur) steps(var(--n, 24), end) calc(var(--lead, 0s) + var(--d)) forwards; }
  .window.play .term > .hold { animation: var(--pre, none), gate var(--dur) cubic-bezier(.16, 1, .3, 1) calc(var(--lead, 0s) + var(--d)) var(--fill, both); }
  .window.play .ticket :is(.path, .t-title, .t-label, li) { animation: var(--pre, none), write .5s cubic-bezier(.16, 1, .3, 1) calc(var(--lead, 0s) + var(--d)) var(--fill, both); }
  .window.play .ticket .tag { animation: var(--pre, none), stamp .45s cubic-bezier(.16, 1, .3, 1) calc(var(--lead, 0s) + var(--d)) var(--fill, both); }
  @keyframes fadeold { from { opacity: var(--o0, 1); } to { opacity: 0; } }
  @keyframes typein { from { opacity: 1; clip-path: inset(0 100% 0 0); } 99%, to { opacity: 1; clip-path: inset(0 0 0 0); } }
  @keyframes land { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes type { from { clip-path: inset(0 100% 0 0); } 99%, to { clip-path: inset(0 0 0 0); } }
  @keyframes gate {
    0% { opacity: 0; transform: scale(.97); box-shadow: 0 0 0 0 rgba(251, 146, 60, 0); }
    55% { opacity: 1; transform: none; box-shadow: 0 0 0 4px rgba(251, 146, 60, .22); }
    100% { opacity: 1; transform: none; box-shadow: 0 0 0 0 rgba(251, 146, 60, 0); }
  }
  @keyframes write { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 -2% 0 0); } }
  @keyframes stamp { from { opacity: 0; transform: scale(1.35); } to { opacity: 1; transform: none; } }

  /* Supporting: each citation's highlight sweeps in once when the gates section comes into view */
  .motion .gates .ref { background-size: 0 100%; transition: background-size .7s cubic-bezier(.16, 1, .3, 1) .35s; }
  .motion .gates.seen .ref { background-size: 100% 100%; }
  .motion .gates.seen .frag:nth-child(2) .ref { transition-delay: .7s; }
}

/* Responsive */
@media (max-width: 900px) {
  .panes, .gates, .paths, .plans, .pro-out { grid-template-columns: minmax(0, 1fr); }
  .gates .frag.lead { grid-row: auto; }
  .ticket { border-left: 0; border-top: 1px solid var(--line); }
  .term { min-height: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .step, .step + .step { padding: 22px 0; border-left: 0; border-top: 1px solid var(--line); }
  section.block { padding-top: 88px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .stage { padding: 0 16px; }
  .nav .hide-sm { display: none; }
  .hero { padding-top: 36px; }
  .hero .fine { display: none; }
  .hero h1 { font-size: 34px; }
  .hero .lede { font-size: 16px; margin-bottom: 22px; }
  .hero .actions { gap: 10px; }

  .stage { margin-top: 32px; }
  .hero .actions .btn { flex: 1 1 0; padding: 0 12px; }
  .cmds li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 20px; }
  .plan { padding: 24px; }
  .closer { border-radius: 0; margin-left: -16px; margin-right: -16px; padding: 56px 20px; }
  .window-bar .title { transform: none; margin: 0 40px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .window-bar .replay { width: 28px; padding: 0; justify-content: center; }
  .window-bar .replay .replay-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .trackers thead { display: none; }
  .trackers tr { display: block; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .trackers td { display: block; border: 0; padding: 2px 0; }
  .trackers td[data-k]::before { content: attr(data-k) ": "; color: var(--ink-3); font-weight: 600; }
  .feat { grid-template-columns: minmax(0, 1fr); }
  .term { padding: 18px 16px; font-size: 12.5px; }
  .ticket { padding: 20px 18px; }
}
