/* Brand from the launch video: flat paper / ink / orange, Geist + Geist Mono. */
:root {
  --paper: #F3F0E8;
  --card: #FBFAF6;
  --ink: #121212;
  --orange: #FF5A1F;
  --muted: #6F6A5F;
  --line: #D9D4C7;
  --t-text: #F3F0E8;
  --t-muted: #8C877B;
  --t-dim: #56524A;
  --t-line: #2A2A28;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  /* surfaces that stay dark in both themes, and fixed brand colors */
  --surface: #121212;
  --device: #121212;
  --screen: #1E1E1C;
  --mark: #121212;
  --on-accent: #121212;
  --cream: #F3F0E8;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0F0F0E;
  --card: #181816;
  --ink: #F3F0E8;
  --muted: #9C968A;
  --line: #2D2C29;
  --surface: #1A1A18;
  --device: #2A2A27;
  --screen: #141413;
  --mark: #1F1F1D;
  color-scheme: dark;
}
/* dark surfaces need an edge on a dark page */
[data-theme="dark"] :is(.term, .dark, .token, .install, .pill:not(.pill-light), .md .code) { outline: 1px solid var(--line); outline-offset: -1px; }
[data-theme="dark"] :is(.brand img, .final-mark) { border-radius: 23%; outline: 1px solid var(--line); }

/* page to page (same origin): crossfade, with the nav held in place */
@view-transition { navigation: auto; }
.nav { view-transition-name: nav; }
/* theme switch: circular reveal from the toggle, see site.js */
.theme-vt::view-transition-old(root), .theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-vt .nav { view-transition-name: none; }

* { box-sizing: border-box; }
/* clip on html, not body: phones scroll the viewport, and body's overflow doesn't stop that */
html { overflow-x: clip; scroll-padding-top: var(--nav-h); -webkit-tap-highlight-color: transparent; } /* no blue flash on tap; keyboard focus rings stay */
/* smooth only after load (site.js): a smooth jump to a #fragment on load ends off target once the web fonts reflow the text */
html.loaded { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-top: var(--nav-h); /* room for the fixed .nav */
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
code { font-family: var(--mono); font-size: .9em; }
p code, .card code { background: color-mix(in srgb, var(--ink) 8%, transparent); padding: .1em .35em; border-radius: 6px; }
em { font-style: normal; color: var(--orange); }
h1, h2, h3 { margin: 0; letter-spacing: -.04em; line-height: 1.02; }
h2 { font-size: clamp(44px, 7vw, 104px); font-weight: 700; }
h3 { font-size: 24px; letter-spacing: -.02em; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .8em; }
.o { color: var(--orange); }
.eyebrow { font: 600 14px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--orange); margin: 0 0 20px; }
.lead { font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); max-width: 34em; }

/* ── nav ───────────────────────────────────────────── */
/* fixed, not sticky: Chrome on Android draws sticky elements shifted up by the URL bar's height in
   view-transition snapshots, so a sticky nav vanished during the theme switch while the URL bar showed */
:root { --nav-h: 69px; }
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 22px; letter-spacing: -.04em; }
.nav nav { display: flex; align-items: center; gap: 28px; font-size: 15px; margin-left: auto; }
.nav nav { margin-right: 28px; }
.nav nav a { text-decoration: none; }
.nav nav > a:hover { color: var(--orange); }
.btn { display: inline-block; padding: 10px 20px; border-radius: 999px; text-decoration: none; font-weight: 600; transition: transform .2s var(--spring), background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-ghost { border: 2px solid var(--ink); padding: 14px 26px; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
/* phones: the links fold into a dropdown under the bar, opened by the burger (site.js toggles .nav.open) */
.nav .burger, .nav .nav-gh { display: none; }
.burger svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.burger path { transform-origin: 12px 12px; transition: transform .4s var(--spring); }
.nav.open .burger path:first-child { transform: rotate(45deg) translateY(4px) scaleX(1.4); }
.nav.open .burger path:last-child { transform: rotate(-45deg) translateY(-4px) scaleX(1.4); }
@media (max-width: 720px) {
  .nav .burger { display: grid; }
  .nav .nav-gh { display: block; }
  .nav-tools { gap: 6px; }
  .nav-tools .gh { display: none; }
  .nav.open { background: var(--paper); border-color: var(--line); }
  .nav nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0; padding: 8px 16px 16px;
    flex-direction: column; align-items: stretch; gap: 0; font-size: 18px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; translate: 0 -8px;
    transition: opacity .25s, translate .35s var(--out), visibility 0s .35s;
  }
  .nav.open nav { opacity: 1; visibility: visible; translate: 0; transition-delay: 0s; }
  .nav nav > a { display: block; padding: 14px 4px; border-top: 1px solid var(--line); }
  .nav nav > a:first-child { border-top: 0; }
}
@media (max-width: 520px) { .nav .lang a { padding: 0 10px; } }

/* language picker: segmented EN | ES with a sliding thumb */
.lang { position: relative; display: flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); }
.lang::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: var(--orange); transition: translate .45s var(--spring);
}
.lang:has([data-lang="es"][aria-current="true"])::before { translate: 100% 0; }
.nav .lang a {
  position: relative; display: grid; place-items: center; height: 34px; padding: 0 12px; text-decoration: none;
  font: 600 13px var(--mono); color: var(--muted); transition: color .3s;
}
.nav .lang a:hover { color: var(--ink); }
.nav .lang a[aria-current="true"] { color: var(--on-accent); }

/* right side of the nav: one group of 40px controls, split from the text links by a hairline */
.nav-tools { display: flex; align-items: center; gap: 8px; padding-left: 20px; border-left: 1px solid var(--line); }
.icon-btn {
  width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: none; cursor: pointer;
  display: grid; place-items: center; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform .4s var(--spring), box-shadow .25s, color .25s;
}
.icon-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); transform: translateY(-2px); }
.icon-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; overflow: visible; }
/* theme toggle: the sun's core grows, a cut-out slides in to make a moon, the rays spin away */
.theme:hover { transform: rotate(-15deg) scale(1.06); }
.theme-core { fill: currentColor; r: 5px; transition: r .5s var(--spring); }
.theme-cut { cx: 30px; cy: -6px; transition: cx .5s var(--out), cy .5s var(--out); }
.theme-rays { stroke: currentColor; stroke-width: 2; stroke-linecap: round; transform-origin: 12px 12px; transition: transform .6s var(--spring), opacity .3s; }
[data-theme="dark"] .theme-core { r: 9px; }
[data-theme="dark"] .theme-cut { cx: 17px; cy: 7px; }
[data-theme="dark"] .theme-rays { transform: rotate(120deg) scale(0); opacity: 0; }
.nav nav a[aria-current="page"] { color: var(--orange); }
@media (max-width: 720px) { .nav-tools { padding-left: 0; border-left: 0; } }
@media (max-width: 520px) { .nav { padding-inline: 16px; } }
.lang a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 999px; }

/* ── hero ──────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: center;
  min-height: calc(100vh - 70px);
  padding: 40px clamp(20px, 4vw, 56px) 80px;
  max-width: 1440px; margin: 0 auto;
}
@media (max-width: 1000px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { font-size: clamp(38px, 4.4vw, 64px); font-weight: 700; margin: 36px 0 24px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 32px 0 24px; }
@media (max-width: 520px) { .cta .btn { flex: 1 1 100%; text-align: center; } }

/* Install box: one tab per OS / package manager; each panel is one copyable command. */
.install { background: var(--surface); color: var(--t-text); border-radius: 22px; padding: 14px; display: grid; gap: 12px; margin: 32px 0 0; max-width: 640px; }
/* sliding thumb, like the language picker; --x/--w are set from the selected tab in main.js */
.tabs { position: relative; justify-self: start; max-width: 100%; display: flex; align-items: center; gap: 2px; background: var(--screen); border-radius: 999px; padding: 3px; }
.tabs::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--w, 0); translate: var(--x, 0) 0; border-radius: 999px; background: var(--orange); }
.tabs.ready::before { transition: translate .45s var(--spring), width .45s var(--spring); }
html:not(.js) .tabs { display: none; }
.tabs button { font: 600 13px var(--sans); color: var(--t-muted); background: none; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; position: relative; transition: color .3s; }
.tabs .sep { width: 1px; height: 16px; margin: 0 4px; background: var(--t-dim); }
.tabs button:hover { color: var(--t-text); }
.tabs button[aria-selected="true"] { color: var(--on-accent); }
.tabs button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
[role="tabpanel"][hidden] { display: none; }
[role="tabpanel"]:not([hidden]) { animation: cmd-in .4s var(--out); }
@keyframes cmd-in { from { opacity: 0; translate: var(--from, 0px) 0; } }
.cmdline { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left; border: 0; cursor: pointer; background: var(--screen); color: var(--t-text); border-radius: 14px; padding: 10px 10px 10px 18px; transition: transform .25s var(--spring); }
.cmdline:hover { transform: translateY(-1px); }
.cmdline:active { transform: scale(.99); }
.cmdline code { font: 13px/1.5 var(--mono); min-width: 0; overflow-wrap: break-word; }
.cmdline .muted { color: var(--t-muted); user-select: none; }
/* icon button, same as the docs code blocks: copy icon swaps to a check once copied */
.copy-ico { position: relative; display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--t-line); color: var(--t-muted); transition: background .2s, color .2s; }
.copy-ico svg { grid-area: 1 / 1; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s, transform .35s var(--spring); }
.copy-ico .i-done { opacity: 0; transform: scale(.4); stroke-width: 2.6; }
.cmdline:hover .copy-ico { color: var(--cream); }
.cmdline:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.cmdline.copied .copy-ico, .pill.copied .copy-ico { background: var(--orange); color: var(--on-accent); }
.cmdline.copied .i-copy, .pill.copied .i-copy { opacity: 0; transform: scale(.4); }
.cmdline.copied .i-done, .pill.copied .i-done { opacity: 1; transform: none; }
@media (max-width: 520px) { .cmdline code { font-size: 12px; } .tabs button { padding: 6px 9px; font-size: 12px; } .tabs .sep { margin: 0 2px; } }

/* Lockup: the drop falls into the square, squashes, the chevron draws, letters rise. */
.lockup { display: flex; align-items: center; gap: min(22px, 4vw); }
.mark { width: min(88px, 20vw); height: auto; flex: none; }
.mark { overflow: visible; }
.mark-sq { fill: var(--mark); }
.mark-chev { stroke: var(--mark); }
.device svg path + path { stroke: var(--screen); }
.mark-sq { transform-origin: 120px 120px; animation: pop .7s var(--spring) .1s both; }
.mark-drop { transform-origin: 120px 206px; animation: fall 1s .35s both; }
.mark-chev { stroke-dasharray: 74; animation: draw .5s var(--out) 1s both; }
.word { font-weight: 700; font-size: min(72px, 16vw); letter-spacing: -.06em; line-height: 1; display: flex; }
.word i { font-style: normal; display: inline-block; animation: rise .7s var(--spring) both; }
.word i:nth-child(1) { animation-delay: .82s; } .word i:nth-child(2) { animation-delay: .87s; }
.word i:nth-child(3) { animation-delay: .92s; } .word i:nth-child(4) { animation-delay: .97s; }
.word i:nth-child(5) { animation-delay: 1.02s; } .word i:nth-child(6) { animation-delay: 1.07s; }
@keyframes pop { from { opacity: 0; transform: scale(.8); } }
@keyframes fall {
  0%   { transform: translateY(-560px) scale(.88, 1.18); opacity: 1; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  35%  { transform: translateY(0) scale(1.18, .78); animation-timing-function: var(--out); }
  55%  { transform: scale(.94, 1.08); }
  75%  { transform: scale(1.03, .97); }
  100% { transform: none; }
}
@keyframes draw { from { stroke-dashoffset: 74; } to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }
.rise { animation: rise .8s var(--out) var(--d, 0s) both; }

/* ── terminal ──────────────────────────────────────── */
.term {
  background: var(--surface); color: var(--t-text);
  border-radius: 24px; font: 15px/1.6 var(--mono);
  box-shadow: 0 40px 80px -30px rgba(18, 18, 18, .45);
  overflow: hidden; min-width: 0;
}
@media (max-width: 520px) { .term { font-size: 12.5px; } .term-body { padding: 18px; min-height: 0; } }
.term-bar { position: relative; display: flex; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--t-line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--t-dim); }
.term-bar span { position: absolute; inset: 0; text-align: center; line-height: 40px; color: var(--t-dim); font-size: 13px; }
.term-body { padding: 22px 26px 26px; min-height: 420px; }
.term-body p { margin: 0 0 14px; }
.term .muted { color: var(--t-muted); }
#cmd .flag { color: var(--t-muted); }
#cmd .pkg { color: var(--orange); }
#cmd b { font-weight: 700; }
.caret { display: inline-block; width: .6em; height: 1.15em; vertical-align: -.2em; background: var(--orange); animation: blink 1s steps(1) infinite; }
.term.ran .caret { visibility: hidden; }
@keyframes blink { 50% { opacity: 0; } }
.step { opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .6s var(--spring); }
.step.on { opacity: 1; transform: none; }
.box { position: relative; display: flex; flex-direction: column; border: 1.5px solid var(--t-dim); border-radius: 8px; padding: 18px 20px 12px; margin: 22px 0 18px; max-width: 340px; }
.box-title { position: absolute; top: -.8em; left: 50%; transform: translateX(-50%); background: var(--surface); padding: 0 10px; color: var(--t-muted); font-size: 13px; }
.rows { display: grid; gap: 10px; margin-bottom: 18px; }
.row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 30% 44px; gap: 12px; align-items: center; font-size: 13px; }
.fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bar { height: 8px; border-radius: 4px; background: var(--t-line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--orange); border-radius: 4px; transform-origin: left; transform: scaleX(0); }
.pc { text-align: right; color: var(--t-muted); }
.ic { width: 14px; height: 14px; border: 2.5px solid var(--orange); border-right-color: transparent; border-bottom-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; }
.row.done .ic { animation: none; border: 0; border-radius: 0; width: 12px; height: 7px; border-left: 3px solid var(--orange); border-bottom: 3px solid var(--orange); transform: rotate(-45deg) translate(1px, -2px); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── marquee ───────────────────────────────────────── */
/* the band is rotated and scaled past the edges; this parent clips it so the page never gets wider */
.marquee-clip { overflow-x: clip; }
.marquee { background: var(--surface); color: var(--cream); overflow: hidden; padding: 22px 0; transform: rotate(-1.5deg) scale(1.02); }
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee span { font: 700 clamp(28px, 4vw, 48px) var(--sans); letter-spacing: -.03em; padding: 0 28px; white-space: nowrap; }
.marquee span::after { content: "●"; color: var(--orange); font-size: .4em; vertical-align: middle; margin-left: 56px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── split sections ────────────────────────────────── */
.split, .section, .final { max-width: 1440px; margin: 0 auto; padding: clamp(80px, 12vw, 160px) clamp(20px, 4vw, 56px); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split h2 { margin-bottom: 28px; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.stage { position: relative; height: 580px; display: grid; place-items: center; }

/* account: the sign-in card gets struck out and drops, a token pops in */
.signin, .token { grid-area: 1 / 1; }
.signin {
  position: relative; width: min(420px, 100%); padding: 36px; display: grid; gap: 16px;
  background: var(--card); border: 2px solid var(--line); border-radius: 28px;
}
.signin b { font-size: 32px; letter-spacing: -.03em; }
.field { border: 2px solid var(--line); border-radius: 12px; padding: 14px 18px; color: var(--muted); }
.signin-next { justify-self: end; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 12px 36px; font-weight: 600; }
.strike { position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); overflow: visible; }
.strike path { fill: none; stroke: var(--orange); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 130; stroke-dashoffset: 130; }
.token { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 18px; background: var(--surface); color: var(--t-text); border-radius: 999px; padding: 18px 40px 18px 18px; opacity: 0; transform: scale(.85); }
.token code { font-size: clamp(18px, 2vw, 26px); }
.token code span { color: var(--t-dim); }
.token small { grid-column: 1 / -1; position: absolute; top: calc(100% + 18px); left: 0; right: 0; text-align: center; font: 15px var(--mono); color: var(--muted); }
.tick { width: 52px; height: 52px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; }
.tick svg { width: 30px; fill: none; stroke: var(--on-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.account-stage.in .strike path { animation: strike .4s ease-in-out .7s forwards; }
.account-stage.in .signin { animation: dropout .45s ease-in 1.3s forwards; }
.account-stage.in .token { animation: tokenin .9s var(--spring) 1.6s forwards, float 3s ease-in-out 2.5s infinite; }
@keyframes strike { to { stroke-dashoffset: 0; } }
@keyframes dropout { to { opacity: 0; transform: translateY(140px) rotate(7deg); } }
@keyframes tokenin { to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* devices: slot roll + phone that morphs into a TV */
.slot-line { font: 700 clamp(40px, 5vw, 72px) var(--mono); margin: 0 0 24px; display: flex; gap: .4em; align-items: center; }
.slot-line .muted { font-weight: 400; }
.slot { height: 1.2em; overflow: hidden; display: inline-block; color: var(--orange); }
.slot-track { display: flex; flex-direction: column; transition: transform .6s var(--spring); }
.slot-track b { height: 1.2em; line-height: 1.2em; }
.device {
  width: 260px; height: 500px; border-radius: 44px; background: var(--device);
  border: 14px solid var(--device); box-shadow: inset 0 0 0 999px var(--screen);
  display: grid; place-items: center; position: relative;
  transition: width .8s var(--spring), height .8s var(--spring), border-radius .8s var(--spring);
}
.device svg { width: 130px; }
.device::after {
  content: ""; position: absolute; top: calc(100% + 14px); left: 50%; width: 200px; height: 44px; translate: -50% 0;
  border-top: 0; background: linear-gradient(var(--device), var(--device)) center top / 8px 36px no-repeat, linear-gradient(var(--device), var(--device)) center bottom / 100% 8px no-repeat;
  opacity: 0; transition: opacity .4s;
}
.device.tv { width: min(600px, 90%); height: 340px; border-radius: 18px; }
.device.tv::after { opacity: 1; }
.device.bump { animation: bump .45s var(--spring); }
@keyframes bump { 30% { scale: .95; } }
.device { margin-bottom: 40px; }
.device-label { position: absolute; bottom: 0; font: 20px var(--mono); color: var(--muted); }

/* ── features ──────────────────────────────────────── */
.section h2 { margin-bottom: 64px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 2px solid var(--line); border-radius: 24px; padding: 32px;
  transition: transform .4s var(--spring), border-color .3s, box-shadow .4s;
}
.card:hover { transform: translateY(-6px); border-color: var(--ink); box-shadow: 0 24px 48px -24px rgba(18, 18, 18, .3); }
.card p { color: var(--muted); margin: 12px 0 0; }
.num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); color: var(--orange); font: 700 15px var(--mono); margin-bottom: 28px; transition: transform .4s var(--spring); }
.card:hover .num { transform: rotate(-8deg) scale(1.1); }

/* ── pipeline (dark) ───────────────────────────────── */
.dark { background: var(--surface); color: var(--t-text); max-width: none; border-radius: 40px; margin: 0 clamp(8px, 1.5vw, 20px); }
.dark > * { max-width: 1328px; margin-left: auto; margin-right: auto; }
/* phones: the dark panel lines up with the cards above (same page gutter) instead of bleeding past it */
@media (max-width: 720px) { .dark { margin-inline: clamp(20px, 4vw, 56px); padding-inline: 24px; } }
.pipeline { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; }
.pipeline::before { content: ""; position: absolute; top: 26px; left: 26px; right: 26px; height: 2px; background: var(--t-line); }
.pipeline::after { content: ""; position: absolute; top: 26px; left: 26px; right: 26px; height: 2px; background: var(--orange); transform-origin: left; transform: scaleX(0); transition: transform 1.8s var(--out) .2s; }
.pipeline.in::after { transform: scaleX(1); }
.pipeline li span { position: relative; z-index: 1; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--surface); border: 2px solid var(--t-dim); font: 700 18px var(--mono); margin-bottom: 24px; transition: background .3s, border-color .3s, color .3s; }
.pipeline.in li span { background: var(--orange); border-color: var(--orange); color: var(--on-accent); }
.pipeline li p { color: var(--t-muted); font-size: 16px; margin: 10px 0 0; }
.pipeline li { opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .7s var(--spring); }
.pipeline.in li { opacity: 1; transform: none; }
.pipeline li:nth-child(2), .pipeline li:nth-child(2) span { transition-delay: .3s; }
.pipeline li:nth-child(3), .pipeline li:nth-child(3) span { transition-delay: .6s; }
.pipeline li:nth-child(4), .pipeline li:nth-child(4) span { transition-delay: .9s; }
.pipeline li:nth-child(5), .pipeline li:nth-child(5) span { transition-delay: 1.2s; }
@media (max-width: 900px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipeline::before, .pipeline::after { top: 26px; bottom: 26px; left: 26px; right: auto; width: 2px; height: auto; }
  .pipeline::after { transform: scaleY(0); transform-origin: top; }
  .pipeline.in::after { transform: scaleY(1); }
  .pipeline li { display: grid; grid-template-columns: 54px 1fr; column-gap: 20px; }
  .pipeline li span { grid-row: span 2; margin: 0; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 96px; }
.stat { border-top: 2px solid var(--t-line); padding-top: 24px; }
.stat b { display: block; font-size: clamp(48px, 6vw, 80px); letter-spacing: -.05em; line-height: 1; color: var(--orange); }
.stat span { color: var(--t-muted); font-size: 16px; }

/* ── commands ──────────────────────────────────────── */
.cmds { display: grid; gap: 10px; }
.cmd {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 20px 26px; border-radius: 16px; background: var(--card); border: 2px solid var(--line);
  transition: border-color .3s, transform .4s var(--spring);
}
.cmd:hover { border-color: var(--orange); transform: translateX(8px); }
.cmd code { font-size: 16px; overflow-wrap: anywhere; }
.cmd code::before { content: "$ "; color: var(--orange); }
.cmd span { color: var(--muted); font-size: 15px; }
.more { margin-top: 32px; font-weight: 600; }

/* ── final ─────────────────────────────────────────── */
.final { text-align: center; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 28px; }
.final-mark { transition: transform .6s var(--spring); }
.final.in .final-mark { animation: wobble 1.4s var(--spring) .2s; }
@keyframes wobble { 0% { transform: translateY(-80px) scale(.8, 1.2); opacity: 0; } 40% { transform: scale(1.15, .85); opacity: 1; } 70% { transform: scale(.96, 1.04); } }
.installs { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.pill {
  display: inline-flex; align-items: center; gap: 14px;
  font: 17px var(--mono); padding: 16px 16px 16px 28px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--surface); color: var(--t-text); transition: transform .25s var(--spring);
}
.pill { white-space: nowrap; max-width: 100%; }
@media (max-width: 520px) { .pill { font-size: 13px; gap: 8px; padding: 12px 12px 12px 18px; white-space: normal; overflow-wrap: anywhere; text-align: left; border-radius: 22px; } }
.pill .muted { color: var(--t-muted); }
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: scale(.97); }
.pill-light { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.pill-light .muted { color: var(--muted); }
.pill .copy-ico { background: var(--orange); color: var(--on-accent); border-radius: 999px; }
.pill.copied .copy-ico { background: var(--cream); }

.footer { border-top: 1px solid var(--line); padding: 40px clamp(20px, 4vw, 56px); font-size: 14px; color: var(--muted); text-align: center; }
.footer p { max-width: 760px; margin: 6px auto; }

/* ── faq: native <details>; the height animates where ::details-content is supported ── */
:root { interpolate-size: allow-keywords; }
.faq-list { display: grid; gap: 12px; max-width: 1000px; }
.faq-item { background: var(--card); border: 2px solid var(--line); border-radius: 20px; transition: border-color .3s; }
.faq-item:hover { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.faq-item[open] { border-color: var(--orange); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 26px 22px 28px; font-size: clamp(18px, 1.6vw, 21px); font-weight: 600; letter-spacing: -.015em; line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(var(--orange), var(--orange)) center / 14px 2px no-repeat,
              linear-gradient(var(--orange), var(--orange)) center / 2px 14px no-repeat, var(--surface);
  transition: transform .5s var(--spring);
}
.faq-item[open] summary::after { transform: rotate(135deg); }
.faq-item summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 18px; }
.faq-a { padding: 0 28px 26px; color: var(--muted); max-width: 54em; }
.faq-a code { background: color-mix(in srgb, var(--ink) 8%, transparent); padding: .1em .35em; border-radius: 6px; color: var(--ink); }
.faq-item[open] .faq-a { animation: fadeup .5s var(--out) both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(-6px); } }
.faq-item::details-content { block-size: 0; overflow: clip; transition: block-size .45s var(--out), content-visibility .45s allow-discrete; }
.faq-item[open]::details-content { block-size: auto; }

/* ── scroll reveal ─────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--out), transform 1s var(--out); }
.js .reveal.in { opacity: 1; transform: none; }
.grid .reveal:nth-child(3n+2), .cmds .reveal:nth-child(even) { transition-delay: .1s; }
.grid .reveal:nth-child(3n) { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; }
}

/* ── docs page: sidebar | rendered markdown | table of contents ── */
.docs {
  display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px; gap: clamp(24px, 4vw, 64px);
  max-width: 1440px; margin: 0 auto; padding: 48px clamp(20px, 4vw, 56px) 120px;
}
.docs-side, .docs-toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.docs-side nav { display: grid; gap: 4px; }
.docs-side a, .toc a {
  position: relative; display: block; text-decoration: none; color: var(--muted);
  padding: 8px 14px; border-radius: 10px; transition: color .25s, background .25s;
}
.docs-side a:hover, .toc a:hover { color: var(--ink); }
.docs-side a[aria-current="page"] { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; }
.docs-side a::before, .toc a::before {
  content: ""; position: absolute; left: 0; top: 25%; bottom: 25%; width: 3px; border-radius: 3px;
  background: var(--orange); transform: scaleY(0); transition: transform .4s var(--spring);
}
.docs-side a[aria-current="page"]::before, .toc a.on::before { transform: scaleY(1); }
.docs-toc p { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--orange); margin: 8px 14px 12px; }
.toc a { font-size: 14px; padding: 5px 14px; border-radius: 0; }
.toc a.h3 { padding-left: 28px; font-size: 13px; }
.toc a.on { color: var(--ink); }
@media (max-width: 1180px) { .docs { grid-template-columns: 200px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 800px) {
  .docs { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .docs-side { position: static; max-height: none; margin: 0 -20px; padding: 0 20px; }
  .docs-side nav { display: flex; overflow-x: auto; scrollbar-width: none; }
  .docs-side a { white-space: nowrap; }
}

.md { max-width: 780px; font-size: 17px; line-height: 1.7; }
.md { animation: fadein .5s var(--out) both; } /* no movement: it would shift #anchors after the jump */
@keyframes fadein { from { opacity: 0; } }
.md > :first-child { margin-top: 0; }
.md h1 { font-size: clamp(40px, 5vw, 64px); margin: 0 0 24px; }
.md h2 { font-size: clamp(28px, 3vw, 38px); margin: 72px 0 16px; padding-top: 32px; border-top: 1px solid var(--line); }
.md hr + h2 { border-top: 0; padding-top: 0; }
.md h3 { margin: 40px 0 12px; }
.md h4 { font-size: 18px; margin: 28px 0 8px; }
.md :is(h1, h2, h3, h4) { position: relative; scroll-margin-top: 24px; } /* + html scroll-padding (nav) */
.md :is(h1, h2, h3, h4) code { color: var(--orange); font-size: .92em; }
.md .anchor { position: absolute; right: 100%; padding-right: 10px; color: var(--orange); text-decoration: none; opacity: 0; transition: opacity .2s; }
.md :is(h2, h3, h4):hover .anchor { opacity: 1; }
.md :is(h2, h3, h4):target { animation: flash 1.2s var(--out); }
@keyframes flash { 0% { color: var(--orange); } }
.md a { color: var(--orange); text-underline-offset: 3px; }
.md hr { border: 0; height: 1px; background: var(--line); margin: 64px 0 0; }
.md :not(pre) > code { background: color-mix(in srgb, var(--ink) 8%, transparent); padding: .12em .4em; border-radius: 6px; font-size: .86em; overflow-wrap: anywhere; }
.md :is(h1, h2, h3, h4) code { background: none; padding: 0; }
.md ul, .md ol { padding-left: 1.4em; }
.md li { margin: 6px 0; }
.md li::marker { color: var(--orange); }
/* code block: a header bar (language + copy, always visible) over a horizontally scrolling <pre> */
.md .code { background: var(--surface); color: var(--cream); border-radius: 16px; margin: 20px 0; overflow: hidden; }
.code-bar {
  display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 24px;
  border-bottom: 1px solid var(--t-line); font: 12px var(--mono); color: var(--t-muted);
}
.md pre { margin: 0; padding: 18px 24px 20px; overflow-x: auto; font: 14px/1.7 var(--mono); }
.md pre code { font-size: inherit; }
.md pre .c { color: var(--t-muted); }
.md pre .p { color: var(--orange); }
/* Pygments (`tk-` prefix): keywords, strings, numbers, comments, def/class names. The block surface stays dark in both themes. */
.md pre [class^="tk-k"], .md pre .tk-ow { color: var(--orange); }
.md pre [class^="tk-s"] { color: #A9C98E; }
.md pre [class^="tk-m"], .md pre .tk-il { color: #E2B866; }
.md pre [class^="tk-c"] { color: var(--t-muted); }
.md pre .tk-nf, .md pre .tk-nc, .md pre .tk-nd, .md pre .tk-fm, .md pre .tk-nn, .md pre .tk-ne { color: #8DB7E0; }
.md pre .tk-nb { color: #D9A5E6; }
/* icon button: copy → check; the two icons cross-fade and pop */
.copy-code {
  position: relative; display: grid; place-items: center; width: 32px; height: 32px; flex: none;
  border: 0; border-radius: 9px; cursor: pointer; background: var(--t-line); color: var(--t-muted);
  transition: background .2s, color .2s, transform .3s var(--spring);
}
.copy-code svg {
  grid-area: 1 / 1; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s, transform .35s var(--spring);
}
.copy-code .i-done { opacity: 0; transform: scale(.4); stroke-width: 2.6; }
.copy-code:hover { color: var(--cream); }
.copy-code:active { transform: scale(.9); }
.copy-code:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.copy-code.copied { background: var(--orange); color: var(--on-accent); }
.copy-code.copied .i-copy { opacity: 0; transform: scale(.4); }
.copy-code.copied .i-done { opacity: 1; transform: none; }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1.5px solid var(--line); border-radius: 14px; }
.md table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
.md th { text-align: left; font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--card); }
.md th, .md td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.md tr:last-child td { border-bottom: 0; }
.md td code { white-space: nowrap; }
.md blockquote { margin: 20px 0; padding: 14px 20px; border-left: 3px solid var(--line); color: var(--muted); }
.md .alert { border-left-color: var(--orange); background: color-mix(in srgb, var(--orange) 8%, transparent); border-radius: 0 12px 12px 0; color: var(--ink); }
.md .alert-title { display: block; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--orange); margin-bottom: 4px; }
.md blockquote p { margin: 0; }
.doc-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--line); }
.doc-foot a { text-decoration: none; }
.doc-foot .pager { display: grid; padding: 16px 22px; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .3s, transform .4s var(--spring); }
.doc-foot .pager:hover { box-shadow: inset 0 0 0 1.5px var(--orange); transform: translateY(-3px); }
.doc-foot .pager small { color: var(--muted); font: 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.doc-foot .pager { color: var(--ink); }
.doc-foot .pager b { font-size: 20px; letter-spacing: -.02em; transition: color .25s; }
.doc-foot .pager:hover b { color: var(--orange); }
.doc-foot .pager-next { grid-column: 2; text-align: right; }
@media (max-width: 520px) { .doc-foot { grid-template-columns: 1fr; } .doc-foot .pager-next { grid-column: 1; } }
.md .doc-edit { display: inline-block; margin-top: 32px; color: var(--muted); font-size: 14px; }
