@font-face { font-family: "Inter"; src: url(/fonts/inter.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --mono: "SF Mono", SFMono-Regular, ui-monospace, "JetBrains Mono", Menlo, monospace;
  --header-h: 56px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);

  --bg: #f1efe9;
  --surface: #fbfaf6;
  --sunken: #e8e5dd;
  --ink: #141413;
  --ink-2: #3b3a36;
  --muted: #78746b;
  --line: rgb(20 20 19 / .1);
  --line-strong: rgb(20 20 19 / .18);
  --signal: #d4ff3a;
  --signal-ink: #141413;
  --signal-soft: rgb(196 240 30 / .22);
  /* Lime is unreadable as text on a light background, so links use a deep olive of the same hue. */
  --accent: #4a6b00;
  --cta: #141413;
  --cta-ink: #f6f4ee;
  --cta-hover: #2b2a27;
  --warn: #a35f00;
  --warn-soft: rgb(163 95 0 / .08);
  --shadow: 0 1px 2px rgb(20 20 19 / .05), 0 8px 24px -12px rgb(20 20 19 / .12);

  /* Code panels stay dark in both themes, so one syntax palette serves both. */
  --code-bg: #1a1a18;
  --code-bar: #232320;
  --code-line: rgb(255 255 255 / .07);
  --code-ink: #e8e5dd;
  --code-muted: #8b877d;
  --tok-keyword: #d4ff3a;
  --tok-string: #f2c97d;
  --tok-number: #ff9e7a;
  --tok-fn: #7cc8f0;
  --tok-type: #c3a8fa;
  --tok-prop: #cdc9bf;
  --tok-comment: #8b877d;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --bg: #0d0d0c;
    --surface: #161614;
    --sunken: #1f1f1c;
    --ink: #f2f0ea;
    --ink-2: #cdc9bf;
    --muted: #8b877d;
    --line: rgb(255 255 255 / .08);
    --line-strong: rgb(255 255 255 / .16);
    --signal-soft: rgb(212 255 58 / .1);
    --accent: #d4ff3a;
    --cta: #d4ff3a;
    --cta-ink: #141413;
    --cta-hover: #c3ee2a;
    --warn: #ffb547;
    --warn-soft: rgb(255 181 71 / .08);
    --shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 12px 32px -16px rgb(0 0 0 / .6);
    --code-bg: #121211;
    --code-bar: #1a1a18;
    color-scheme: dark;
  } }
:root[data-theme="dark"] {
    --bg: #0d0d0c;
    --surface: #161614;
    --sunken: #1f1f1c;
    --ink: #f2f0ea;
    --ink-2: #cdc9bf;
    --muted: #8b877d;
    --line: rgb(255 255 255 / .08);
    --line-strong: rgb(255 255 255 / .16);
    --signal-soft: rgb(212 255 58 / .1);
    --accent: #d4ff3a;
    --cta: #d4ff3a;
    --cta-ink: #141413;
    --cta-hover: #c3ee2a;
    --warn: #ffb547;
    --warn-soft: rgb(255 181 71 / .08);
    --shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 12px 32px -16px rgb(0 0 0 / .6);
    --code-bg: #121211;
    --code-bar: #1a1a18;
    color-scheme: dark;
  }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: calc(var(--header-h) + 1.25rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; overflow-x: clip; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url(/grain.svg); opacity: .5; mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; opacity: .2; } }
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .2; }
::selection { background: var(--signal); color: var(--signal-ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 2000; padding: .6rem 1rem; border-radius: 999px; background: var(--cta); color: var(--cta-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: .6rem; }

/* ---------- Header: the same bar as the API reference ---------- */
.vs-header {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--header-h); padding: 0 1.25rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  font-family: var(--sans); color: var(--ink);
}
.vs-brand { display: inline-flex; align-items: center; gap: .55rem; flex-shrink: 0; color: var(--ink); text-decoration: none; font-size: 1.08rem; font-weight: 600; letter-spacing: -.02em; }
.vs-brand img { border-radius: 8px; }
.vs-brand em { font-style: normal; color: var(--muted); margin-left: -.55rem; }
.vs-tag { margin-left: .15rem; padding: .12rem .5rem; border-radius: 999px; background: var(--signal); color: #141413; font-size: .7rem; font-weight: 600; letter-spacing: .04em; }
.vs-header nav { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.vs-header nav a { padding: .45rem .8rem; border-radius: 999px; color: var(--muted); font-size: .88rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
.vs-header nav a:hover { color: var(--ink); background: var(--sunken); }
.vs-header nav a[aria-current="page"] { color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong) inset; }
.vs-header nav a.vs-cta { background: var(--cta); color: var(--cta-ink); }
.vs-header nav a.vs-cta:hover { background: var(--cta-hover); }
.vs-mode { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; transition: color .15s, background .15s; }
.vs-mode:hover { color: var(--ink); background: var(--sunken); }
.vs-mode svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vs-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vs-sun { display: block; } :root:not([data-theme="light"]) .vs-moon { display: none; } }
:root[data-theme="dark"] .vs-sun { display: block; }
:root[data-theme="dark"] .vs-moon { display: none; }

.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: inline; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 3rem; align-items: center;
  max-width: 1180px; margin: 0 auto; padding: 4.5rem 1.5rem 3.5rem;
}
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.4rem; padding: .35rem .8rem .35rem .65rem; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; font: 500 .8rem var(--mono); letter-spacing: .02em; color: var(--ink-2); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgb(212 255 58 / .3); }
.hero h1 { margin: 0; font: 700 clamp(2.4rem, 5.2vw, 4.1rem)/1 var(--display); letter-spacing: -.045em; text-wrap: balance; }
.hero h1 .tape { position: relative; z-index: 0; white-space: nowrap; color: #141413; }
.hero h1 .tape::before {
  content: ""; position: absolute; z-index: -1; inset: .1em -.25em -.02em -.18em;
  background: linear-gradient(rgb(255 255 255 / .32), rgb(255 255 255 / 0) 45%, rgb(0 0 0 / .04)), var(--signal);
  transform: rotate(-1.6deg); transform-origin: 0 50%;
  clip-path: polygon(0% 100%, 1.6% 87.5%, 0% 75%, 1.6% 62.5%, 0% 50%, 1.6% 37.5%, 0% 25%, 1.6% 12.5%, 0% 0%, 100% 0%, 98.4% 12.5%, 100% 25%, 98.4% 37.5%, 100% 50%, 98.4% 62.5%, 100% 75%, 98.4% 87.5%, 100% 100%);
}
.lede { max-width: 34rem; margin: 1.4rem 0 1.8rem; font-size: 1.15rem; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

.install { display: flex; align-items: center; gap: .5rem; max-width: 34rem; padding: .4rem .4rem .4rem 1.1rem; border-radius: 999px; background: var(--code-bg); color: var(--code-ink); box-shadow: var(--shadow); }
.install code { flex: 1; min-width: 0; padding: 0; overflow-x: auto; white-space: nowrap; background: none; color: inherit; font: 500 .9rem/2.4 var(--mono); scrollbar-width: none; }
.install code::-webkit-scrollbar { display: none; }
.install .prompt { color: var(--tok-keyword); user-select: none; margin-right: .6ch; }
.install .copy { border-radius: 999px; }
.install-note { margin: .8rem 0 0 1.1rem; font-size: .85rem; color: var(--muted); }
.install-note a { color: var(--accent); }

.ctas { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 1.2rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong) inset; transition: transform 140ms var(--ease-out), background .2s; }
.btn:hover { background: var(--sunken); }
.btn.primary { background: var(--cta); color: var(--cta-ink); box-shadow: none; }
.btn.primary:hover { background: var(--cta-hover); }
.btn:active { transform: scale(.97); }

.teaser { margin: 0; border-radius: 18px; overflow: hidden; background: var(--code-bg); box-shadow: var(--shadow), 0 0 0 1px var(--code-line) inset; transform: rotate(.6deg); }
.teaser .code { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.teaser-foot { display: flex; align-items: center; gap: .6rem; padding: .8rem 1.1rem; border-top: 1px solid var(--code-line); font: 500 .78rem var(--mono); color: var(--code-muted); }
.teaser-foot .live { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgb(212 255 58 / .25); }
.teaser-foot b { color: var(--code-ink); font-weight: 500; }

/* ---------- Layout: table of contents and article ---------- */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3.5rem; max-width: 1180px; margin: 0 auto; padding: 1rem 1.5rem 4rem; }
.toc { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; max-height: calc(100vh - var(--header-h) - 3rem); overflow-y: auto; font-size: .9rem; scrollbar-width: thin; }
.toc summary { display: none; }
.toc-title { margin: 0 0 .7rem; font: 500 .74rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc a { display: block; margin-left: -1px; padding: .32rem 0 .32rem .95rem; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.toc-extra { margin: 1.4rem 0 0; padding: 0; list-style: none; font-size: .85rem; }
.toc-extra a { padding-left: 0; border: 0; margin: 0; }

article { min-width: 0; max-width: 780px; }
article > section { padding: 2.2rem 0 1.4rem; border-top: 1px solid var(--line); }
article > section:first-child { border-top: 0; padding-top: 1rem; }
.kicker { margin: 0 0 .5rem; font: 500 .76rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
article h2 { margin: 0 0 1rem; font: 700 clamp(1.6rem, 3vw, 2.1rem)/1.12 var(--display); letter-spacing: -.035em; text-wrap: balance; }
article h3 { margin: 2rem 0 .6rem; font: 650 1.15rem/1.3 var(--display); letter-spacing: -.015em; }
article h2 a.anchor, article h3 a.anchor { margin-left: .35em; color: var(--muted); text-decoration: none; opacity: 0; transition: opacity .15s; }
article :is(h2, h3):hover a.anchor, article a.anchor:focus-visible { opacity: 1; }
article p, article li { color: var(--ink-2); }
article p { margin: 0 0 1rem; text-wrap: pretty; }
article ul, article ol { margin: 0 0 1rem; padding-left: 1.2rem; }
article li { margin: .3rem 0; }
article li::marker { color: var(--muted); }
article strong { color: var(--ink); font-weight: 600; }
article a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
article a:hover { text-decoration-thickness: 2px; }
:not(pre) > code { padding: .1em .38em; border-radius: 6px; background: var(--sunken); color: var(--ink); font: 500 .86em var(--mono); overflow-wrap: anywhere; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.6rem; margin: 1rem 0; }
.steps > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: .05rem; font: 600 .85rem var(--mono); color: var(--muted); }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.features li { margin: 0; padding: 1.1rem 1.15rem 1.15rem; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.features b { display: block; margin-bottom: .3rem; color: var(--ink); font: 650 .98rem/1.3 var(--display); letter-spacing: -.01em; }
.features span { display: block; font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.features .n { margin-bottom: .55rem; font: 500 .72rem var(--mono); color: var(--muted); }

/* ---------- Diagram ---------- */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem minmax(0, 1fr) 7.5rem minmax(0, 1fr); align-items: stretch; margin: 1.6rem 0 .6rem; }
.node { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1rem 1.1rem; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.node.comp { background: var(--signal); color: var(--signal-ink); box-shadow: none; }
.node-k { font: 500 .7rem var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.node.comp .node-k { color: rgb(20 20 19 / .6); }
.node b { font: 650 1rem/1.25 var(--display); letter-spacing: -.01em; }
.node ul { margin: .25rem 0 0; padding: 0; list-style: none; font: 500 .76rem/1.5 var(--mono); }
.node li { margin: .15rem 0; color: var(--ink-2); }
.node.comp li { color: rgb(20 20 19 / .78); }
.node li::before { content: "▸ "; color: var(--muted); }
.node.comp li::before { color: rgb(20 20 19 / .45); }
.wire { display: flex; flex-direction: column; justify-content: center; gap: 1.2rem; padding: 0 .55rem; }
.lane { display: flex; flex-direction: column; gap: .3rem; font: 500 .68rem/1.25 var(--mono); color: var(--muted); text-align: center; }
.lane i { position: relative; display: block; height: 2px; color: var(--ink-2); background: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 10px); }
.lane i::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; border: 5px solid transparent; transform: translateY(-50%); }
.lane.out i::after { right: -4px; border-left: 7px solid currentColor; border-right: 0; }
.lane.in i { color: var(--accent); }
.lane.in i::after { left: -4px; border-right: 7px solid currentColor; border-left: 0; }
@media (prefers-reduced-motion: no-preference) {
  .lane.out i { animation: flow-r 1.2s linear infinite; }
  .lane.in i { animation: flow-l 1.2s linear infinite; }
}
@keyframes flow-r { to { background-position: 10px 0; } }
@keyframes flow-l { to { background-position: -10px 0; } }
.flow-cap { margin: .4rem 0 1.4rem; font-size: .88rem; color: var(--muted); }

/* ---------- Code blocks ---------- */
.code { margin: 1.1rem 0 1.4rem; border-radius: 14px; overflow: hidden; background: var(--code-bg); box-shadow: 0 0 0 1px var(--code-line) inset; }
.code figcaption { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 42px; padding: .3rem .4rem .3rem 1rem; background: var(--code-bar); border-bottom: 1px solid var(--code-line); }
.code .file { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 .78rem var(--mono); color: var(--code-ink); }
.code .file::before { content: ""; flex-shrink: 0; width: 7px; height: 7px; border-radius: 2px; background: var(--tok-fn); }
.code[data-lang="sh"] .file::before { background: var(--tok-keyword); }
.code[data-lang="tsx"] .file::before { background: var(--tok-type); }
.code[data-lang="json"] .file::before { background: var(--tok-string); }
.code pre { margin: 0; padding: 1rem 1.1rem 1.1rem; overflow-x: auto; color: var(--code-ink); font: 400 .84rem/1.65 var(--mono); tab-size: 2; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .2) transparent; }
.code pre:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.code code { font: inherit; }
.copy { display: inline-flex; align-items: center; gap: .35rem; flex-shrink: 0; min-height: 32px; padding: 0 .7rem; border: 0; border-radius: 8px; background: rgb(255 255 255 / .06); color: var(--code-ink); font: 500 .76rem var(--sans); cursor: pointer; transition: background .15s, color .15s, transform 140ms var(--ease-out); }
.copy:hover { background: rgb(255 255 255 / .12); }
.copy:active { transform: scale(.95); }
.copy:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.copy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.copy .check { display: none; }
.copy.done { background: var(--signal); color: #141413; }
.copy.done .clip { display: none; }
.copy.done .check { display: block; }
.install .copy { min-height: 38px; padding: 0 1rem; }

.t-c { color: var(--tok-comment); font-style: italic; }
.t-s { color: var(--tok-string); }
.t-k { color: var(--tok-keyword); }
.t-n { color: var(--tok-number); }
.t-f { color: var(--tok-fn); }
.t-t { color: var(--tok-type); }
.t-p { color: var(--tok-prop); }
.t-x { color: var(--tok-type); }

/* ---------- Callouts ---------- */
.callout { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: .75rem; margin: 1.2rem 0; padding: .95rem 1.1rem; border-radius: 14px; background: var(--signal-soft); box-shadow: 0 0 0 1px var(--line) inset; }
.callout svg { width: 20px; height: 20px; margin-top: .15rem; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.callout p { margin: 0; font-size: .94rem; color: var(--ink-2); }
.callout p + p { margin-top: .5rem; }
.callout b { color: var(--ink); }
.callout.warn { background: var(--warn-soft); }
.callout.warn svg { stroke: var(--warn); }

/* ---------- Tables ---------- */
.table { margin: 1rem 0 1.4rem; overflow-x: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--line) inset; background: var(--surface); }
.table table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .65rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table th { font: 500 .72rem var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--sunken); }
.table td { color: var(--ink-2); }
.table td:first-child { white-space: nowrap; }
.table td:first-child code { white-space: nowrap; }
.table .group td { padding-top: 1rem; background: var(--bg); font: 600 .78rem var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.ctx { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font: 500 .72rem var(--mono); white-space: nowrap; box-shadow: 0 0 0 1px var(--line-strong) inset; color: var(--ink-2); }
.ctx.action { background: var(--signal-soft); color: var(--ink); }
.ctx.query { background: var(--sunken); }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 2rem; margin: .7rem 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .2rem; width: 1.15rem; height: 1.15rem; border-radius: 6px; background: var(--signal); }
.checklist li::after { content: ""; position: absolute; left: .4rem; top: .38rem; width: .32rem; height: .6rem; border: solid #141413; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------- Footer ---------- */
.page-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 1.5rem; max-width: 1180px; margin: 0 auto; padding: 2rem 1.5rem 2.6rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.page-foot nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.page-foot a { color: var(--ink-2); text-decoration: none; }
.page-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes tape { from { transform: rotate(-1.6deg) scaleX(0); } to { transform: rotate(-1.6deg) scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  .pitch > * { animation: rise 600ms var(--ease-out) both; }
  .pitch > :nth-child(2) { animation-delay: 80ms; }
  .pitch > :nth-child(3) { animation-delay: 160ms; }
  .pitch > :nth-child(4) { animation-delay: 240ms; }
  .pitch > :nth-child(5) { animation-delay: 300ms; }
  .teaser { animation: rise 700ms var(--ease-out) 260ms both; }
  .hero h1 .tape::before { animation: tape 500ms cubic-bezier(.32, .72, 0, 1) 460ms both; }
}

/* ---------- Narrow screens ---------- */
/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .3rem; max-width: 1180px; margin: 0 auto 1.5rem; padding: 0 1.5rem; border-bottom: 1px solid var(--line); }
.tabs a { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 1rem; color: var(--muted); font-weight: 600; font-size: .98rem; text-decoration: none; transition: color .15s; }
.tabs a:hover { color: var(--ink); }
.tabs a::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2px; border-radius: 2px; background: transparent; transition: background .2s var(--ease-out); }
.tabs a[aria-selected="true"] { color: var(--ink); }
.tabs a[aria-selected="true"]::after { background: var(--accent); }
.tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 10px; }
[role="tabpanel"][hidden] { display: none; }

/* ---------- Method reference ---------- */
.ref-head { padding: 1rem 0 .4rem; }
.ref-head h2 { margin: 0 0 .7rem; font: 700 clamp(1.8rem, 3.4vw, 2.5rem)/1.08 var(--display); letter-spacing: -.04em; }
.ref-head > p { margin: 0 0 1.2rem; color: var(--ink-2); }
.legend { display: grid; gap: .5rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); align-items: baseline; gap: .7rem; margin: 0; font-size: .9rem; color: var(--ink-2); }
.legend .ctx { justify-self: start; }
.ctx.plain { background: transparent; color: var(--muted); }
.filter { display: flex; align-items: center; gap: .6rem; padding: 0 1rem; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong) inset, var(--shadow); }
.filter:focus-within { box-shadow: 0 0 0 2px var(--accent) inset, var(--shadow); }
.filter svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.filter input { flex: 1; min-width: 0; min-height: 48px; border: 0; outline: 0; background: none; color: var(--ink); font: 500 1rem var(--sans); }
.filter input::placeholder { color: var(--muted); }
.filter-empty { margin: 1.2rem 0 0; color: var(--muted); }

.ref-group { padding: 2.4rem 0 .6rem; }
.ref-group[hidden] { display: none; }
.ref-group h2 { margin: 0 0 .4rem; font: 700 1.45rem/1.2 var(--display); letter-spacing: -.03em; }
.ref-group h2 a.anchor { margin-left: .35em; color: var(--muted); text-decoration: none; opacity: 0; transition: opacity .15s; }
.ref-group h2:hover a.anchor, .ref-group a.anchor:focus-visible { opacity: 1; }
.ref-desc { margin: 0 0 1.1rem; color: var(--ink-2); max-width: 62ch; }
.methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.method { display: flex; flex-direction: column; gap: .55rem; padding: 1.05rem 1.15rem 1rem; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow .2s var(--ease-out), transform .2s var(--ease-out); }
.method[hidden] { display: none; }
.method:hover { box-shadow: 0 0 0 1px var(--line-strong) inset, var(--shadow); }
.method:target { box-shadow: 0 0 0 2px var(--accent) inset, var(--shadow); }
.method header { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.method header .ctx { flex: none; margin-top: .1rem; }
.m-sig { padding: 0; background: none; font: 500 .9rem/1.45 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.m-name { color: var(--ink); font-weight: 650; }
.m-sep { margin: 0 .45ch; color: var(--line-strong); }
.method p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--ink-2); }
.m-ret { margin-top: auto !important; padding-top: .6rem; border-top: 1px dashed var(--line); font-size: .86rem !important; }
.m-label { margin-right: .6rem; font: 500 .68rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.chips li { margin: 0; }
.chips code { display: inline-block; padding: .3rem .6rem; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; font-size: .84rem; }
.tables { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 0 0 1.1rem; }
.tables div { padding: .85rem 1rem; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.tables dt { margin: 0 0 .25rem; font: 600 .9rem var(--mono); color: var(--ink); }
.tables dd { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--ink-2); }

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; padding-top: 3rem; }
  .teaser { transform: none; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  article { max-width: none; }

  /* The contents collapse into a bar that stays under the header and names the current section. */
  .toc { position: sticky; top: var(--header-h); z-index: 900; max-height: none; overflow: visible; margin: 0 -1.5rem; padding: 0 1.5rem; background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .toc summary { display: flex; align-items: center; gap: .6rem; min-height: 48px; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); }
  .toc summary::-webkit-details-marker { display: none; }
  .toc summary .toc-label { font: 500 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .toc summary .toc-current { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .toc summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s var(--ease-out); }
  .toc[open] summary svg { transform: rotate(180deg); }
  .toc-title { display: none; }
  .toc-body { max-height: min(60vh, 26rem); overflow-y: auto; padding: 0 0 1rem; }
  .tabs { margin-bottom: 0; }
}
@media (min-width: 1001px) {
  .toc summary { display: none; }
}
@media (max-width: 760px) {
  .features { grid-template-columns: minmax(0, 1fr); }
  .methods, .tables { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .wire { flex-direction: row; justify-content: center; gap: 2.2rem; padding: .7rem 0; }
  .lane { flex-direction: row; align-items: center; gap: .55rem; text-align: left; }
  .lane i { width: 2px; height: 38px; background: repeating-linear-gradient(180deg, currentColor 0 6px, transparent 6px 10px); }
  .lane.out i::after { top: auto; bottom: -4px; right: auto; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top: 7px solid currentColor; border-bottom: 0; }
  .lane.in { flex-direction: row-reverse; }
  .lane.in i::after { top: -4px; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-bottom: 7px solid currentColor; border-top: 0; }
  @media (prefers-reduced-motion: no-preference) {
    .lane.out i { animation-name: flow-d; }
    .lane.in i { animation-name: flow-u; }
  }
}
@keyframes flow-d { to { background-position: 0 10px; } }
@keyframes flow-u { to { background-position: 0 -10px; } }
@media (max-width: 560px) {
  .vs-header { padding: 0 1rem; gap: .5rem; }
  .vs-header nav { gap: .1rem; }
  .vs-header nav a { padding: .45rem .6rem; }
  .vs-header nav .vs-wide { display: none; }
  .vs-brand .vs-tag { display: none; }
}
@media (max-width: 420px) {
  .vs-header nav a.vs-cta { display: none; }
  .hero { padding: 2.2rem 1.1rem 2.4rem; }
  .layout { padding: 0 1.1rem 3rem; }
  .tabs { padding: 0 .6rem; }
  .toc { margin: 0 -1.1rem; padding: 0 1.1rem; }
  .install { padding-left: .9rem; }
  .code pre { font-size: .8rem; padding: .9rem .95rem 1rem; }
  .code { margin-left: -.35rem; margin-right: -.35rem; }
  /* Rows stack on phones: method signatures are too long to share a line with a description. */
  .table thead { display: none; }
  .table tr, .table td { display: block; }
  .table tr { padding: .6rem .85rem; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { padding: .1rem 0; border: 0; }
  .table td:first-child, .table td:first-child code { white-space: normal; }
  .table td:first-child { margin-bottom: .2rem; color: var(--ink); }
  .table .group { padding: .8rem .85rem .4rem; background: var(--bg); }
  .table .group td { padding: 0; }
  .table td[data-label]:not(:first-child)::before { content: attr(data-label) " · "; font: 500 .7rem var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .page-foot { padding: 1.8rem 1.1rem 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* The `font` shorthands above reset this, so it has to come last. */
:is(.code pre, .code code, .install code, :not(pre) > code, .teaser-foot) { font-variant-ligatures: none; }
