/* Geist (Vercel, SIL Open Font License 1.1, see fonts/Geist-LICENSE.txt), self-hosted as one variable file for every
   weight. Swap keeps text visible while it loads; the page preloads it. */
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Type scale: every font size on the site comes from these steps. --text-caption is the floor (13.6px at the default
   root size); sizes are in rem so they follow the reader's browser font setting. Inline code is relative to its text. */
:root {
  --text-caption: 0.85rem;
  --text-sm: 0.95rem;
  --text-base: 1rem;
  --text-lg: 1.15rem;
  --text-xl: 1.4rem;
  --text-h2: clamp(1.8rem, 3vw, 2.4rem);
  --text-h1: clamp(2.8rem, 6vw, 5rem);
  --text-code-inline: max(var(--text-caption), 0.9em);
  --icon-lg: 1.25rem;
  /* Weights by role: regular prose, medium controls (tabs, chips), semibold labels and buttons, heading for h2/h3 and
     note titles, bold for the display headline and emphasis inside code. */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-heading: 650;
  --weight-bold: 700;
  /* Comfortable reading measure for prose blocks: 60ch of this face is about 70 average characters. */
  --measure: 60ch;
}
/* Radius rule: panels 12px, controls 8px, inline code 5px. One accent: --accent. */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f3f3f5;
  --border: #e3e3e8;
  --text: #17171c;
  --muted: #5b5b66;
  --accent: #5b3cc4;
  --accent-ink: #ffffff;
  --accent-soft: rgb(91 60 196 / 0.09);
  --ok: #1a7f37;
  --danger: #b42318;
  --warn: #9a6700;
  --shade: rgb(30 22 70 / 0.16);
  --wash: #f3f0fd;
  --wash-border: #c9bff0;
  --wash-muted: #544d70;
  --code-bg: #f6f6f8;
  --tok-k: #5b3cc4;
  --tok-m: #0b6e78;
  --tok-t: #8a4a0c;
  --tok-s: #1f6f3a;
  --tok-c: #7a7a86;
  --tok-d: #a01e58;
  --tok-n: #8a4a0c;
  --shadow: 0 1px 0 rgb(23 23 28 / 0.04), 0 12px 32px -12px rgb(40 30 90 / 0.14);
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: "Cascadia Code", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* Dark tokens: follow the system unless the toggle stored an explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c10;
    --surface: #14141a;
    --surface-2: #1a1a21;
    --border: #2a2a33;
    --text: #ececf1;
    --muted: #a0a0ad;
    --accent: #a891ff;
    --accent-ink: #120d24;
    --accent-soft: rgb(168 145 255 / 0.12);
    --ok: #3fb950;
    --danger: #ff8a80;
  --warn: #d29922;
    --shade: rgb(0 0 0 / 0.55);
    --wash: #14111f;
    --wash-border: #3a3256;
    --wash-muted: #aaa3c4;
    --code-bg: #101015;
    --tok-k: #b7a3ff;
    --tok-m: #6cd3dc;
    --tok-t: #f0b878;
    --tok-s: #9fd89a;
    --tok-c: #767684;
    --tok-d: #f28bb8;
    --tok-n: #f0b878;
    --shadow: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 16px 40px -16px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0c0c10;
  --surface: #14141a;
  --surface-2: #1a1a21;
  --border: #2a2a33;
  --text: #ececf1;
  --muted: #a0a0ad;
  --accent: #a891ff;
  --accent-ink: #120d24;
  --accent-soft: rgb(168 145 255 / 0.12);
  --ok: #3fb950;
    --danger: #ff8a80;
  --warn: #d29922;
    --shade: rgb(0 0 0 / 0.55);
    --wash: #14111f;
    --wash-border: #3a3256;
    --wash-muted: #aaa3c4;
  --code-bg: #101015;
  --tok-k: #b7a3ff;
  --tok-m: #6cd3dc;
  --tok-t: #f0b878;
  --tok-s: #9fd89a;
  --tok-c: #767684;
  --tok-d: #f28bb8;
  --tok-n: #f0b878;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 16px 40px -16px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--text-base)/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
code { font-family: var(--font-mono); font-size: var(--text-code-inline); font-variant-ligatures: none; }
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.05em 0.35em;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.icon { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.125em; }
.icon-check { display: none; }
.copied .icon-copy { display: none; }
.copied .icon-check { display: inline-block; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: inline-block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: inline-block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}


.wrap { width: min(1200px, 100% - 3rem); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 30; background: var(--surface); padding: 0.5rem 1rem; }
.muted { color: var(--muted); font-weight: var(--weight-regular); }

/* Nav (z-index 20) */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: var(--weight-heading); text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { display: block; width: 32px; height: 32px; flex: none; }
.brand-dim { color: var(--muted); font-weight: var(--weight-medium); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; font-size: var(--text-sm); }
.nav-links a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { margin-left: auto; display: flex; gap: 0.25rem; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px;
  border: 0; background: none; color: var(--muted); font-size: var(--icon-lg); cursor: pointer; text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* Hero: copy row on top, then the canonical workflow beside its example run. */
.hero { padding: 6rem 0 4rem; }
.hero-grid { display: grid; gap: 3rem; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 3rem; align-items: end; }
.hero-copy h1 { grid-column: 1 / -1; }
.hero h1 { text-wrap: balance; }
.hero .lede { margin: 1.25rem 0 0; max-width: 46ch; }
.hero .cta-row { justify-self: end; }
.hero-demo { display: grid; gap: 1rem; min-width: 0; }
.hero-slides { display: grid; }
.hero-slide { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; min-width: 0; }
/* Inactive examples keep their box so the hero never changes height between them. */
.hero-slides > .hero-slide[hidden] { display: grid; visibility: hidden; }
/* A <details> slot does not inherit visibility from the slide in Chrome, so hide its parts explicitly. */
.hero-slides > .hero-slide[hidden] details > * { visibility: hidden; }
.hero-slide > * { min-width: 0; }
.hero-demo .run-result { position: sticky; top: 88px; }
.hero-demo > * { min-width: 0; }
.hero-tabs { border-bottom: 0; }

.tab-outcome { display: inline-flex; }
.tab-warn { color: var(--warn); }
.tab-ok { color: var(--ok); }
.tab-fail { color: var(--danger); }
.tab-progress { position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.is-autoplay .hero-tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--accent-soft); }
.is-autoplay.is-ready .hero-tabs [aria-selected="true"] .tab-progress { animation: slide-progress var(--slide-time, 13.5s) linear forwards; }
.is-autoplay.is-paused .tab-progress { animation-play-state: paused; }
@keyframes slide-progress { to { transform: scaleX(1); } }
.hero-slide:not([hidden]) { animation: panel-in 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.run-result[data-outcome="fail"] .run-status { color: var(--danger); }
.log-line.run-error { display: flex; gap: 0.5rem; align-items: baseline; color: var(--danger); white-space: normal; }
.run-error .icon { flex: none; transform: translateY(0.15em); }
.run-error > span, .run-info > span { color: var(--text); }
.log-line.run-info { white-space: normal; }

.run-result { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.run-result-head { display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.4rem 0.35rem 0.9rem; border-bottom: 1px solid var(--border); font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.run-result-head .run-status { color: var(--ok); font-size: var(--icon-lg); }
.run-note { font-size: var(--text-caption); font-weight: var(--weight-regular); }
.run-replay { margin-left: auto; width: 32px; height: 32px; font-size: var(--text-lg); }
.run-result-body { display: grid; }
.run-result .run-log { margin: 0; padding: 0.9rem 1rem; background: var(--code-bg); border-bottom: 1px solid var(--border); font: var(--text-sm)/1.6 var(--font-mono); font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.run-summary { padding: 0.75rem 1.1rem 0.9rem; }
.run-summary-label { display: flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: var(--text-caption); font-weight: var(--weight-semibold); margin-bottom: 0.35rem; }
.run-summary-label .icon { color: var(--ok); }
.run-summary .summary-title { font-size: var(--text-lg); margin-bottom: 0.35rem; padding-bottom: 0.3rem; }
.run-summary p { margin: 0; }
.run-summary-list { margin: 0.35rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.15rem; font-size: var(--text-sm); }
.run-summary-list code { font-size: var(--text-code-inline); }
.log-line.run-warning { display: flex; gap: 0.5rem; align-items: baseline; color: var(--warn); white-space: normal; }
.run-warning .icon { flex: none; transform: translateY(0.15em); }
.run-warning > span { color: var(--text); }
.log-line { display: inline-block; }
.run-status { transition: color 0.2s; }
.run-status { display: inline-grid; place-items: center; width: 1em; height: 1em; }
.run-status .spinner { display: none; width: 0.9rem; height: 0.9rem; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--muted) 35%, transparent); border-top-color: var(--muted); }
.run-status.is-running .icon { display: none; }
.run-status.is-running .spinner { display: block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
h1, h2 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
h1 { font-size: var(--text-h1); font-weight: var(--weight-bold); letter-spacing: -0.035em; line-height: 1.05; }
h2, h3, .summary-title { text-wrap: balance; }
h3 { line-height: 1.3; }
p, dd, li > span { text-wrap: pretty; }
h2 { font-size: var(--text-h2); font-weight: var(--weight-heading); }
.lede { font-size: var(--text-lg); color: var(--muted); margin: 1.25rem 0 2rem; max-width: 34ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 44px; padding: 0 1.1rem;
  border-radius: 8px; font: var(--weight-semibold) var(--text-base)/1 var(--font-sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--muted); }
.code { box-shadow: var(--shadow); }

/* Code blocks */
.code { margin: 0; background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; min-width: 0; }
.code figcaption {
  position: relative; display: flex; align-items: center; min-height: 2.75rem; padding: 0 0.6rem 0 1.1rem;
  border-bottom: 2px solid var(--accent); background: var(--code-bg); font-size: var(--text-caption); color: var(--muted);
}
.code-title {
  display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; padding-right: 5.5rem;
  color: var(--text); font-family: var(--font-mono);
}
.code-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-title .icon, .code-title img { flex: none; width: 16px; height: 16px; color: var(--muted); }
.code figcaption .copy { position: absolute; right: 0.6rem; top: 50%; translate: 0 -50%; z-index: 1; }
.code-source { margin-left: auto; display: inline-flex; align-items: center; gap: 0.2rem; text-decoration: none; }
.code-source:hover { color: var(--text); }
.copy {
  display: inline-flex; align-items: center; gap: 0.35rem; height: 28px; padding: 0 0.6rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font: var(--weight-medium) var(--text-caption)/1 var(--font-sans); cursor: pointer;
}
.code-title + .copy { margin-left: auto; }
.copy:hover { color: var(--text); }
.copy.copied { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
/* Code never scrolls: long lines wrap; copy still takes the original text. */
.code pre code { display: block; }
/* Wrapped lines hang two characters inside their own indentation instead of snapping back to column 0.
   --pad is the gutter a context adds (marks, collapsed sections); --indent comes from the highlighter per line (leading spaces plus a 2-character hang). */
.ln {
  display: block; min-height: 1.6em; --pad: 0px; --hang: calc(var(--indent, 0) * 1ch);
  padding-left: calc(var(--pad) + var(--hang)); text-indent: calc(-1 * var(--hang));
}
.code.has-marks pre { padding-left: 2.75rem; }
.ln[data-mark] {
  position: relative; margin: 0 -1.1rem 0 -2.75rem; padding-right: 1.1rem; --pad: 2.75rem;
  background: var(--accent-soft); transition: background 0.25s var(--ease);
}
.ln[data-mark]::before {
  content: attr(data-mark); position: absolute; left: 0.85rem; top: 50%; translate: 0 -50%;
  width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font: var(--weight-semibold) var(--text-caption)/1.2rem var(--font-sans); text-align: center; font-variant-numeric: tabular-nums;
}
.ln[data-mark].is-active { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* Step outputs: annotated code with numbered notes beside it. */
.handoff { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem; align-items: center; }
.handoff-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.handoff-notes li {
  position: relative; display: grid; gap: 0.25rem; padding: 0.85rem 1rem 0.85rem 3.25rem; border-radius: 12px;
  cursor: default; transition: background 0.25s var(--ease);
}
.handoff-notes li::before {
  content: attr(data-mark); position: absolute; left: 1rem; top: 0.85rem; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font: var(--weight-semibold) var(--text-caption)/1.5rem var(--font-sans); text-align: center; font-variant-numeric: tabular-nums;
}
.handoff-notes li:hover, .handoff-notes li:focus-visible, .handoff-notes li.is-active { background: var(--accent-soft); }
.handoff-notes strong { font-size: var(--text-lg); font-weight: var(--weight-heading); letter-spacing: -0.01em; line-height: 1.3; }
.handoff-notes span { color: var(--muted); }
.code pre { margin: 0; padding: 1rem 1.1rem 1.15rem; white-space: pre-wrap; overflow-wrap: anywhere; font: var(--text-sm)/1.6 var(--font-mono); tab-size: 4; }
/* Highlighted tokens: --0 is the runner-light theme, --1 runner-dark (site/highlight). */
.code code span[style], .code-bare code span[style] { color: var(--0); font-style: var(--0fs, normal); font-weight: var(--0fw, inherit); }
:root[data-theme="dark"] .code code span[style], :root[data-theme="dark"] .code-bare code span[style] { color: var(--1); font-style: var(--1fs, normal); font-weight: var(--1fw, inherit); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .code code span[style], :root:not([data-theme="light"]) .code-bare code span[style] { color: var(--1); font-style: var(--1fs, normal); font-weight: var(--1fw, inherit); }
}
.tok-k { color: var(--tok-k); }
.tok-m { color: var(--tok-m); font-weight: var(--weight-semibold); }
.tok-t { color: var(--tok-t); }
.tok-s { color: var(--tok-s); }
.tok-c { color: var(--tok-c); font-style: italic; }
.tok-d { color: var(--tok-d); }
.tok-n { color: var(--tok-n); }

/* Sections */
.section { padding: 6rem 0; }
/* Violet owns one region: the run-it-yourself band. Neutral roles remap to the violet hue inside it. */
.section-wash { --border: var(--wash-border); --muted: var(--wash-muted); --surface-2: color-mix(in srgb, var(--wash) 60%, var(--surface)); background: var(--wash); border-block: 1px solid var(--wash-border); }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-lede { color: var(--muted); font-size: var(--text-lg); max-width: 62ch; margin: 1rem 0 2.5rem; }

.run-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; align-items: start; }
.run-grid .section-lede { margin-bottom: 2rem; }


/* Onboarding steps: the number carries real sequence, a check replaces it once done. */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; }
.step { position: relative; padding: 0 0 2rem 3.25rem; counter-increment: step; }
.step::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font: var(--weight-semibold) var(--text-caption)/1 var(--font-sans); font-variant-numeric: tabular-nums; transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.step:not(:last-child)::after {
  content: ""; position: absolute; left: calc(1rem - 0.5px); top: 2.15rem; bottom: 0.25rem; width: 1px; background: var(--border);
}
.step.is-current::before { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.step.is-done::before { content: "\2713"; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step h3 { margin: 0 0 0.4rem; font-size: var(--text-lg); font-weight: var(--weight-heading); letter-spacing: -0.01em; }
.step p { margin: 0 0 0.9rem; color: var(--muted); max-width: 52ch; }
.step:last-child { padding-bottom: 0; }

.repo-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.9rem 0.75rem; align-items: end; margin-top: 0.75rem; }
.field-repo { grid-column: 1 / -1; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: var(--text-caption); font-weight: var(--weight-semibold); }
.field input {
  width: 100%; min-width: 0;
  height: 44px; padding: 0 0.85rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: var(--text-base) var(--font-mono); font-variant-ligatures: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: var(--muted); }
.field input:hover, .select-trigger:not(:disabled):hover { border-color: color-mix(in srgb, var(--muted) 60%, var(--border)); }
.field input:focus, .select-trigger:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-help, .field-error { grid-column: 1 / -1; margin: 0; font-size: var(--text-caption); }
.field-help { color: var(--muted); }
.step > .field-help { margin-top: 0.5rem; }
.field-error { color: var(--danger); }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* Primers: two small info buttons, each opening a popover beside it instead of taking up the column. */
.primers { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: -1rem 0 2.25rem; }
.primer {
  display: inline-flex; align-items: center; gap: 0.45rem; height: 32px; padding: 0 0.8rem 0 0.65rem;
  border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--text);
  font: var(--weight-medium) var(--text-sm)/1 var(--font-sans); cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.primer .icon { color: var(--accent); }
.primer:hover, .primer[aria-expanded="true"], .primer.is-open { border-color: var(--accent); background: var(--accent-soft); }
.primer-pop {
  position: fixed; inset: auto; margin: 0; max-width: min(24rem, calc(100vw - 2rem)); padding: 0.9rem 1rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--muted);
  box-shadow: var(--lift-hi); font-size: var(--text-sm); line-height: 1.55;
}
.primer-pop p { margin: 0; }
.primer-pop:popover-open { animation: panel-in 0.25s var(--ease); }

.summary-preview { margin: 0; display: grid; gap: 0.75rem; }
.summary-preview > figcaption { font-size: var(--text-caption); color: var(--muted); font-weight: var(--weight-semibold); }
.summary-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.summary-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.summary-head .icon { color: var(--ok); font-size: var(--text-lg); }
.summary-body { padding: 1rem 1.25rem 1.25rem; }
.summary-body h3, .summary-title { margin: 0 0 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); font-size: var(--text-xl); font-weight: var(--weight-semibold); line-height: 1.25; }
.summary-body p { margin: 0; }
.log { display: grid; gap: 0.2rem; background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; padding: 0.85rem 1rem; font: var(--text-sm)/1.6 var(--font-mono); }
.log-step { color: var(--muted); }
.log-step::before { content: "\25B8  "; }

/* Explorer */
.explorer { display: grid; gap: 1.5rem; }
/* Tabs are words on a rule: the active one is bright with an accent underline, nothing boxed. */
.tablist { display: flex; flex-wrap: wrap; gap: 0 1.75rem; border-bottom: 1px solid var(--border); }
.tablist [role="tab"] {
  position: relative; display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: -1px; padding: 0.6rem 0.1rem 0.7rem;
  border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted);
  font: var(--weight-medium) var(--text-sm)/1.3 var(--font-sans); cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.tablist [role="tab"]:hover { color: var(--text); border-bottom-color: var(--border); }
.tablist [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.panel > p { margin: 0 0 1rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.chips { display: inline-flex; gap: 0.35rem; }
.chips code { color: var(--tok-m); }
.panel:not([hidden]) { animation: panel-in 0.35s cubic-bezier(0.16, 1, 0.3, 1); }


.compare-table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); margin-bottom: 1.5rem; }
.compare-table th, .compare-table td { text-align: left; padding: 0.6rem 0.75rem 0.6rem 0; }
.compare-table thead th { color: var(--muted); font-weight: var(--weight-semibold); border-bottom: 1px solid var(--border); }
.compare-table tbody th { font-weight: var(--weight-semibold); }
.compare-table td { color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--accent); font-weight: var(--weight-semibold); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Footer */

/* Tactile layer: interactive elements lift on hover and press down on :active (The Press Rule). */
:root { --ease: cubic-bezier(0.16, 1, 0.3, 1); --lift: 0 1px 1px var(--shade), 0 8px 18px -8px var(--shade); --lift-hi: 0 2px 2px var(--shade), 0 14px 28px -10px var(--shade); }
.btn, .copy, .icon-btn, .text-link, .code-source {
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-primary { box-shadow: var(--lift); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--lift-hi); }
.btn-ghost:hover { transform: translateY(-2px); background: var(--surface); box-shadow: var(--lift); }
.btn:active, .btn-primary:active, .btn-ghost:active { transform: translateY(1px) scale(0.98); box-shadow: none; transition-duration: 0.08s; }
.copy:hover { transform: translateY(-1px); background: var(--surface); border-color: color-mix(in srgb, var(--muted) 50%, var(--border)); box-shadow: var(--lift); }
.copy:active { transform: translateY(1px) scale(0.96); box-shadow: none; }
.copy.copied .icon { animation: pop 0.35s var(--ease); }
.icon-btn:active { transform: scale(0.92); }
#theme .icon { transition: transform 0.5s var(--ease); }
#theme:hover .icon { transform: rotate(-20deg); }
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }
.text-link .icon, .code-source .icon { transition: transform 0.25s var(--ease); }
.text-link:hover .icon, .code-source:hover .icon { transform: translate(2px, -2px); }
.step::before { transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.35s var(--ease); }
.step.is-current::before { box-shadow: var(--lift); }
.step.is-done::before { animation: pop 0.4s var(--ease); }
.step.is-done::after { background: var(--accent); }
.summary-card { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.run-grid:has(.step:last-child.is-done) .summary-card { transform: translateY(-3px); box-shadow: var(--lift-hi); }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* Motion: hero entrance; the example run sequence lives in site.js. Gated on reduced motion. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 80ms); }
  .hero-copy > :nth-child(2) { --i: 1; }
  .hero-copy > :nth-child(3) { --i: 2; }
  .hero-demo { animation: rise 0.8s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .panel:not([hidden]), .hero-slide:not([hidden]), .primer-pop:popover-open, .toast { animation: none; }
}

/* Responsive */
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .hero-slide { grid-template-columns: minmax(0, 1fr); }
  .hero-demo .run-result { position: static; }
  .hero-copy { grid-template-columns: minmax(0, 1fr); row-gap: 1.75rem; }
  .hero .cta-row { justify-self: start; }
  .run-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .explorer { grid-template-columns: minmax(0, 1fr); }
  .handoff { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .run-grid .summary-preview { position: static; }
}
@media (max-width: 767px) {


  .wrap { width: calc(100% - 2rem); }
  .hero { padding: 2.5rem 0 3.5rem; }
  .section { padding: 4rem 0; }
  .repo-form { grid-template-columns: minmax(0, 1fr); }
  .repo-form .btn { grid-column: 1 / -1; justify-content: center; }
}
#recipes .text-link { margin-top: 2rem; }



/* Footer: closing call to action, link columns, then legal and build metadata. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.footer { border-top: 1px solid var(--border); padding: 5rem 0 2rem; color: var(--muted); }
.footer-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; padding-bottom: 4rem; border-bottom: 1px solid var(--border); }
.footer-cta h2 { color: var(--text); margin: 0; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 3rem; padding: 3.5rem 0; }
.footer-brand .brand { color: var(--text); }
.footer-brand p { margin: 1rem 0 1.5rem; max-width: 36ch; }
.footer h3 { margin: 0 0 1rem; color: var(--text); font-size: var(--text-caption); font-weight: var(--weight-heading); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.footer a:not(.btn) { color: inherit; text-decoration: none; transition: color 0.2s, background-color 0.2s, border-color 0.2s, transform 0.2s; }
.footer a:not(.btn):hover { color: var(--text); }
.footer nav a, .footer-legal a { display: inline-flex; align-items: center; gap: 0.6rem; }
.footer nav a .icon { color: var(--muted); transition: color 0.2s; }
.footer nav a:hover .icon { color: var(--accent); }
.footer .footer-social { display: flex; gap: 0.5rem; }
.footer-social a { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.footer-social a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.footer-social a:active { transform: translateY(1px) scale(0.96); }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: var(--text-caption); }
.footer-legal p { margin: 0; }
.build-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; font-family: var(--font-mono); font-variant-ligatures: none; }
.build-meta > div { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.6rem; border: 1px solid var(--border); border-radius: 5px; }
.build-meta dt, .build-meta dd { margin: 0; display: inline-flex; align-items: center; }
.build-meta > div:has(.to-top) { padding: 0; border: 0; }
.to-top { padding: 0.25rem 0.6rem; border-radius: 5px; font-family: var(--font-sans); }
.to-top:hover { background: var(--surface); }
@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .footer { padding-top: 3.5rem; }
  .footer-cta { padding-bottom: 3rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; padding: 2.5rem 0; }
}
/* Recipes: the C# file, beside a sticky column with what it does, the workflow that runs it, and what it needs. */
.recipe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 36rem); gap: 1.5rem; align-items: start; }
.recipe-side { position: sticky; top: 5rem; display: grid; gap: 1rem; }
.recipe-side > p { margin: 0; color: var(--muted); }
.recipe-side > .recipe-lede { color: var(--text); font-size: var(--text-base); }
.recipe-needs { display: flex; gap: 0.6rem; align-items: baseline; font-size: var(--text-sm); }
.recipe-needs .icon { flex: none; color: var(--accent); transform: translateY(0.15em); }
@media (max-width: 1023px) {
  .recipe { grid-template-columns: minmax(0, 1fr); }
  .recipe-side { display: contents; }
  .recipe-lede { order: -2; }
  .recipe-side > .chips { order: -1; margin-top: -0.5rem; }
  .recipe-needs { order: 1; }
}
/* Collapsed code: a "N collapsed lines" bar that expands in place (aspire.dev style). */
.code-collapse { margin: 0 -1.1rem; }
.code-collapse > summary {
  display: flex; align-items: center; gap: 0.6rem; margin: 0.25rem 0; padding: 0.45rem 1.1rem; list-style: none; cursor: pointer;
  background: var(--accent-soft); color: var(--text); font: var(--text-sm)/1.6 var(--font-mono); transition: background 0.2s;
}
.code-collapse > summary::-webkit-details-marker { display: none; }
.code-collapse > summary:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.code-collapse > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.code-collapse > summary .icon { color: var(--accent); }
.code-collapse > summary > span { display: inline-flex; align-items: center; gap: 0.6rem; }
.code-collapse .collapse-open, .code-collapse[open] .collapse-closed { display: none; }
.code-collapse[open] .collapse-open { display: inline-flex; }
.code-collapse .ln { padding-right: 1.1rem; --pad: 1.1rem; }
.collapse-body { display: block; overflow: hidden; }
/* While the hero types its workflow, the section stays open with no bar; lines appear as they are typed. */
.is-typing .code-collapse > summary { display: none; }
.is-typing .ln:not(.is-typed) { display: none; }
/* An example run waits, spinning, while its workflow is typed. */
.run-result.is-pending .log-line, .run-result.is-pending .run-summary { opacity: 0; }
.run-result.is-pending .run-status .icon { display: none; }
.run-result.is-pending .run-status .spinner { display: block; animation: spin 0.8s linear infinite; }

/* The hero's activity: the workflow is committed, an event triggers it, then its run plays. Bubbles hang off one rail. */
.run-timeline { position: sticky; top: 88px; list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.tl-event { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.75rem; align-items: start; }
.tl-event:not(:last-child)::after {
  content: ""; position: absolute; left: calc(1rem - 1px); top: 2.2rem; bottom: calc(-0.9rem - 0.2rem); width: 2px;
  background: var(--border);
}
.tl-icon {
  position: relative; z-index: 1; display: grid; place-items: center; width: 2rem; height: 2rem; margin-top: 0.2rem;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted);
}
.tl-event[data-event="commit"] .tl-icon { color: var(--accent); }
.tl-event[data-event="trigger"] .tl-icon { color: var(--ok); }
.tl-event[data-event="run"] .tl-icon { color: var(--text); }
.tl-body { min-width: 0; }
.tl-event:not([data-event="run"]) .tl-body { padding: 0.6rem 0.85rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.tl-title { margin: 0; color: var(--text); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.tl-meta { margin: 0.15rem 0 0; color: var(--muted); font-size: var(--text-caption); overflow-wrap: anywhere; }
.tl-meta code, .tl-title code { font-size: var(--text-code-inline); }
.hero-demo .run-timeline .run-result { position: static; }
/* Until the story reaches an event, it waits off the rail. */
.run-timeline .tl-event.is-pending { opacity: 0; }
.code-collapse > summary > .collapse-closed { min-width: 0; }
.collapse-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.collapse-count { color: var(--text); font-weight: var(--weight-semibold); }
/* The hero's tab row carries a pause button at its end. */
.hero-tabs-row { display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid var(--border); }
.hero-tabs-row .hero-tabs { flex: 1; border-bottom: 0; }
.hero-animate {
  flex: none; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.2rem; border: 0; background: none;
  color: var(--muted); font: var(--weight-medium) var(--text-caption)/1 var(--font-sans); cursor: pointer; transition: color 0.2s;
}
.hero-animate:hover, .hero-animate[aria-checked="true"] { color: var(--text); }
.hero-animate:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.switch-track {
  position: relative; width: 30px; height: 18px; border-radius: 9px; background: var(--border);
  transition: background 0.25s var(--ease);
}
.switch-thumb {
  position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface);
  box-shadow: 0 1px 2px var(--shade); transition: transform 0.25s var(--ease);
}
.hero-animate[aria-checked="true"] .switch-track { background: var(--accent); }
.hero-animate[aria-checked="true"] .switch-thumb { transform: translateX(12px); }
.hero-animate:active .switch-thumb { width: 17px; }
.primer-pop .primer-more { margin-top: 0.65rem; padding-top: 0.65rem; border-top: 1px solid var(--border); }
.primer-more a { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--accent); font-weight: var(--weight-semibold); text-decoration: none; }
.primer-more a:hover { text-decoration: underline; }
.primer-more a .icon { width: 0.85em; height: 0.85em; }

/* Step outputs: the notes column ends with what step two actually logs. */
.handoff-side { display: grid; gap: 1.25rem; align-content: center; min-width: 0; }
.handoff-result { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.handoff-result figcaption { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--border); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.handoff-result figcaption .icon { color: var(--ok); }
.handoff-result figcaption .muted { font-size: var(--text-caption); font-weight: var(--weight-regular); }
.handoff-result .run-log { margin: 0; padding: 0.8rem 0.9rem; background: var(--code-bg); font: var(--text-sm)/1.6 var(--font-mono); font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: anywhere; }
/* With a mark gutter, a collapsed section still spans the whole panel and its lines keep the gutter. */
.code.has-marks .code-collapse { margin-left: -2.75rem; }
.code.has-marks .code-collapse > summary { padding-left: 2.75rem; }
.code.has-marks .code-collapse .ln { --pad: 2.75rem; }
.ln[data-mark] { cursor: default; }
.ln[data-mark]::before { text-indent: 0; }

/* The job's steps, like GitHub's step list: setup steps, then the C# step and what it does. */
.tl-event[data-event="steps"] .tl-icon { color: var(--text); }
.tl-steps { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.tl-step { display: grid; grid-template-columns: 1rem minmax(0, 1fr); column-gap: 0.55rem; align-items: baseline; font-size: var(--text-sm); color: var(--text); }
.step-status { display: inline-grid; place-items: center; width: 1rem; height: 1rem; align-self: center; color: var(--ok); }
.step-status .spinner { display: none; width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--muted) 35%, transparent); border-top-color: var(--muted); }
.tl-step.is-queued { color: var(--muted); }
.tl-step.is-queued .step-status .icon { display: none; }
.tl-step.is-queued .step-status::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 1.5px solid var(--border); }
.tl-step.is-running .step-status .icon { display: none; }
.tl-step.is-running .step-status .spinner { display: block; animation: spin 0.8s linear infinite; }
.step-lang { margin-left: 0.3rem; padding: 0.05rem 0.35rem; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font: var(--weight-semibold) var(--text-caption)/1.3 var(--font-mono); vertical-align: 0.1em; }
.step-does { grid-column: 2; margin-top: 0.15rem; color: var(--muted); font-size: var(--text-caption); line-height: 1.45; }
.tl-step.is-fail .step-status { color: var(--danger); }

/* Time passes between committing a workflow and the event that triggers it. The rail between them is dashed the
   whole way, and halfway down it stops at a bar, leaves a clear gap, and resumes from a second bar. From the trigger on, the run is one continuous moment, so its links stay solid. */
.tl-event[data-event="commit"]::after {
  bottom: 0; background: repeating-linear-gradient(to bottom, var(--border) 0 4px, transparent 4px 8px);
}
.tl-gap {
  position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: 0.75rem; align-items: center;
  min-height: 3rem; color: var(--muted); font-size: var(--text-caption); transition: opacity 0.45s var(--ease);
}
.tl-gap::before {
  content: ""; position: absolute; left: calc(1rem - 1px); top: -0.9rem; bottom: -0.9rem; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--border) 0 4px, transparent 4px 8px);
  mask: linear-gradient(to bottom, var(--text) calc(50% - 8px), transparent calc(50% - 8px) calc(50% + 8px), var(--text) calc(50% + 8px));
}
.tl-break {
  --dash: repeating-linear-gradient(to right, var(--border) 0 4px, transparent 4px 7px);
  justify-self: center; width: 18px; height: 8px;
  background: var(--dash) top / 100% 2px no-repeat, var(--dash) bottom / 100% 2px no-repeat;
}
.tl-gap:has(+ .tl-event.is-pending) { opacity: 0; }
/* Repository combobox: suggestions from the owner's public repositories, under the input. */
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: 18rem; overflow-y: auto;
  margin: 0; padding: 0.4rem; list-style: none; display: grid; gap: 0.25rem; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); box-shadow: var(--lift-hi);
}
.combo-list[hidden] { display: none; }
.combo-list [role="option"] { display: grid; gap: 0.2rem; padding: 0.65rem 0.75rem; border-radius: 8px; cursor: pointer; line-height: 1.4; }
.combo-list [role="option"][aria-selected="true"], .combo-list [role="option"]:hover { background: var(--accent-soft); }
.combo-name { font: var(--text-sm) var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
.combo-name mark { background: none; color: var(--accent); font-weight: var(--weight-bold); }
.combo-desc { font-size: var(--text-caption); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-status { margin: 0; font-size: var(--text-caption); color: var(--muted); }
.field-status.is-ok { color: var(--ok); }
.field-status:empty { display: none; }

/* Branch picker: a select-only combobox in the same style as the repository field and its suggestions. */
.select-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; height: 44px; padding: 0 0.85rem;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text);
  font: var(--text-base) var(--font-mono); font-variant-ligatures: none; text-align: left; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.select-trigger:focus-visible { outline: none; }
.select-trigger .select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger .icon { flex: none; color: var(--muted); transition: transform 0.2s var(--ease); }
.select-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.select-trigger:disabled { cursor: not-allowed; color: var(--muted); background: transparent; border-style: dashed; }
.combo-list [role="option"].branch-option { grid-template-columns: 1rem minmax(0, 1fr) auto; align-items: center; column-gap: 0.55rem; }
.branch-option .icon { color: var(--muted); }
.branch-option[aria-checked="true"] .icon { color: var(--accent); }
.branch-default { padding: 0.05rem 0.4rem; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: var(--text-caption); line-height: 1.3; }
/* Scrollbars: thin, no arrow buttons, themed. The track is an accent-tinted rail that fades into the background at
   its ends; --scroll-bg is that background, so popups that scroll set their own. Chromium and Safari style through
   ::-webkit-scrollbar (setting scrollbar-color would switch those off in Chromium), Firefox through the standard
   properties. */
:root { --scroll-bg: var(--bg); --scroll-rail: color-mix(in srgb, var(--accent) 10%, var(--scroll-bg)); }
.combo-list { --scroll-bg: var(--surface); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-track {
  background: linear-gradient(to bottom, var(--scroll-bg), var(--scroll-rail) 15%, var(--scroll-rail) 85%, var(--scroll-bg));
}
::-webkit-scrollbar-track:horizontal {
  background: linear-gradient(to right, var(--scroll-bg), var(--scroll-rail) 15%, var(--scroll-rail) 85%, var(--scroll-bg));
}
::-webkit-scrollbar-thumb {
  border: 2px solid transparent; border-radius: 8px; background-clip: padding-box;
  background-color: color-mix(in srgb, var(--accent) 45%, var(--scroll-bg));
}
::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }
@supports not selector(::-webkit-scrollbar) {
  html, .combo-list { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 45%, var(--scroll-bg)) transparent; }
}
/* Inside the rounded dropdowns the scrollbar is a little wider and its rail stops short of the rounded corners, so it
   sits within the panel instead of running past its radius. */
.combo-list::-webkit-scrollbar { width: 12px; }
.combo-list::-webkit-scrollbar-track { margin-block: 12px; border-radius: 8px; }
.combo-list::-webkit-scrollbar-thumb { border-width: 3px; border-radius: 8px; }
/* The branch popup sizes to its longest branch name rather than the trigger, never narrower than the trigger and never
   wider than the page's content column (site.js sets --list-max on open), so it stays inside the page on tablet and mobile too.
   A filter field sits above the list; only the list scrolls, and the width is locked on open so filtering doesn't jitter. */
.branch-pop {
  right: auto; width: max-content; min-width: 100%; max-width: var(--list-max, 100%);
  display: flex; flex-direction: column; gap: 0.4rem; max-height: 22rem; overflow: hidden;
}
.branch-pop[hidden] { display: none; }
.combo-filter { position: relative; flex: none; }
.combo-filter .icon { position: absolute; left: 0.7rem; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.combo-filter input {
  width: 100%; height: 38px; padding: 0 2.3rem 0 2.1rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font: var(--text-sm) var(--font-mono); font-variant-ligatures: none;
}
.combo-filter input::placeholder { color: var(--muted); }
.combo-filter input:focus { outline: none; border-color: var(--accent); }
.combo-filter[hidden] { display: none; }
#branch-options { --scroll-bg: var(--surface); min-height: 0; overflow-y: auto; margin: 0; padding: 0; list-style: none; display: grid; align-content: start; gap: 0.25rem; }
#branch-options::-webkit-scrollbar { width: 12px; }
#branch-options::-webkit-scrollbar-track { margin-block: 4px; border-radius: 8px; }
#branch-options::-webkit-scrollbar-thumb { border-width: 3px; border-radius: 8px; }
.combo-empty { padding: 0.65rem 0.75rem; color: var(--muted); font-size: var(--text-caption); }
@media (max-width: 767px) { #branch-options .combo-name { font-size: var(--text-caption); } }
/* While an owner's repositories load, a small spinner sits at the input's right edge. It fades in after a beat, so a
   cached lookup that answers at once never flashes it. */
#repo { padding-right: 2.5rem; }
.combo-spinner {
  position: absolute; right: 0.9rem; top: 22px; width: 1rem; height: 1rem; margin-top: -0.5rem; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent);
  opacity: 0; pointer-events: none; transition: opacity 0.15s var(--ease); animation: spin 0.8s linear infinite paused;
}
.combo.is-busy .combo-spinner { opacity: 1; transition-delay: 0.15s; animation-play-state: running; }
@media (prefers-reduced-motion: reduce) { .combo.is-busy .combo-spinner { animation-duration: 2.4s; } }
/* The filter's clear button: a right-aligned X that appears once there's text to clear. */
.combo-clear {
  position: absolute; right: 0.35rem; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 28px; height: 28px;
  padding: 0; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; transition: color 0.15s, background-color 0.15s;
}
.combo-clear:hover { color: var(--text); background: var(--accent-soft); }
.combo-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.combo-clear[hidden] { display: none; }
.combo-clear .icon { position: static; translate: none; color: inherit; }
/* The hero is the statement: headline, lede and CTAs beside a complete hello-world workflow small enough to copy and
   commit as is, then a footer row with the modules the SDK brings in. The examples follow as their own section. */
.hero h1 { max-width: 16ch; }
.hero-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2.5rem;
  margin-top: 0; padding-top: 1.75rem; border-top: 1px solid var(--border);
}
.module-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; min-width: 0; }
.module-strip-label { color: var(--muted); font-size: var(--text-caption); }
.module-strip ul { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.section-examples .hero-demo { margin-top: 0.5rem; }
@media (max-width: 767px) {
  .hero { padding: 4rem 0 3rem; }
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 4rem; align-items: center; }
  .hero-copy { display: block; }
  .hero .cta-row { margin-top: 2rem; justify-self: start; }
  .hero-foot { grid-column: 1 / -1; margin-top: 1rem; }
}
.hero-hello { min-width: 0; }
.hero-hello .code { box-shadow: var(--lift-hi); }/* Module chips: each opens a popover (hover with a mouse, tap or click to pin) with what the module does, a real
   one-line call, and its package. */
.module-chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 0.6rem; border: 1px solid var(--border); border-radius: 5px;
  background: none; color: var(--tok-m); font: var(--text-caption) var(--font-mono); font-variant-ligatures: none; cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.module-chip:hover, .module-chip.is-open { border-color: var(--accent); background: var(--accent-soft); color: var(--text); transform: translateY(-1px); }
.module-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.module-pop { width: min(29rem, calc(100vw - 2rem)); max-width: min(29rem, calc(100vw - 2rem)); }
.module-pop > p + p, .module-pop > p + pre { margin-top: 0.5rem; }
.module-pop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.module-pop-head code { padding: 0; border: 0; background: none; color: var(--tok-m); font-size: var(--text-sm); font-weight: var(--weight-bold); }
.module-pop-head span { color: var(--muted); font: var(--text-caption) var(--font-mono); }
.module-pop .code-bare {
  margin: 0.65rem 0 0; padding: 0.65rem 0.8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  white-space: pre-wrap; overflow-wrap: anywhere; font: var(--text-caption)/1.6 var(--font-mono); font-variant-ligatures: none; tab-size: 4;
}
.module-pop .code-bare code { display: block; padding: 0; border: 0; background: none; color: var(--text); font: inherit; }
@media (prefers-reduced-motion: reduce) { .module-chip:hover, .module-chip.is-open { transform: none; } }
.module-strip-label { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.module-strip-sdk { padding: 0.2rem 0.5rem; border-radius: 5px; color: var(--text); font-size: var(--text-caption); font-variant-ligatures: none; }
.sdk-directive { color: var(--tok-d); }
.footer .footer-legal p a:not(.btn) { color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); text-underline-offset: 3px; }
.footer .footer-legal p a:not(.btn):hover { text-decoration-color: var(--accent); }

/* Texture, kept quiet and tied to the product: graph-paper dots behind the hero's workflow (repeated under the
   footer's call to action, so the page opens and closes the same way) and a fine film grain on the alternate bands.
   All sit behind content, fade at their edges, and never take pointer events. */
.hero, .section-alt, .footer { position: relative; isolation: isolate; }
.hero::before, .section-alt::before, .footer::before { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.hero::before, .footer::before {
  background: radial-gradient(circle, color-mix(in srgb, var(--muted) 38%, transparent) 1px, transparent 1.5px) 0 0 / 22px 22px;
}
.hero::before { inset: 0; mask: radial-gradient(ellipse 55% 70% at 78% 42%, var(--text) 0%, transparent 72%); }
.footer::before { inset: 0 0 auto; height: 26rem; mask: radial-gradient(ellipse 60% 85% at 50% 0%, var(--text) 10%, transparent 75%); }
.section-alt::before {
  inset: 0; opacity: 0.045;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] .section-alt::before { mix-blend-mode: multiply; opacity: 0.06; filter: invert(1); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .section-alt::before { mix-blend-mode: multiply; opacity: 0.06; filter: invert(1); } }

/* Section headings link to themselves; a link icon appears beside the text on hover or focus. */
.anchored .anchor { color: inherit; text-decoration: none; }
.anchor-icon {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-left: 0.5rem; vertical-align: 0.15em;
  border-radius: 5px; color: var(--muted); opacity: 0; transition: opacity 0.2s, color 0.2s, background-color 0.2s;
}
.anchor-icon .icon { width: 16px; height: 16px; }
.anchored .anchor:hover .anchor-icon, .anchored .anchor:focus-visible .anchor-icon { opacity: 1; }
.anchored .anchor:hover .anchor-icon { color: var(--accent); background: var(--accent-soft); }
.anchored .anchor:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 5px; }
@media (hover: none) { .anchor-icon { opacity: 0.6; } }
section[id] { scroll-margin-top: 72px; }
/* A small status pill for copy confirmations. */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 60; translate: -50% 0; margin: 0; padding: 0.55rem 1rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
  box-shadow: var(--lift-hi); font-size: var(--text-sm); animation: panel-in 0.25s var(--ease);
  transition: opacity 0.25s, translate 0.25s var(--ease);
}
.toast[hidden] { display: none; }
.toast.is-out { opacity: 0; translate: -50% 6px; }
/* The run section's workflow carries its own requirements: three numbered lines in the file, and a compact legend
   under it that lights up with them (the step outputs pattern, smaller). */
.file-notes { gap: 0.25rem; }
.file-notes li { padding: 0.6rem 0.85rem 0.6rem 2.75rem; gap: 0.1rem; }
.file-notes li::before { left: 0.85rem; top: 0.65rem; width: 1.25rem; height: 1.25rem; font-size: var(--text-caption); line-height: 1.25rem; }
.file-notes strong { font-size: var(--text-sm); }
.file-notes span { font-size: var(--text-sm); }
/* Primer popovers share the module popovers' shape: a title, three short points, and one link out. */
.primer-pop .pop-head { margin: 0 0 0.5rem; color: var(--text); font-weight: var(--weight-heading); font-size: var(--text-base); line-height: 1.35; }
.pop-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.4rem; }
.pop-points li { position: relative; padding-left: 1rem; }
.pop-points li::before { content: ""; position: absolute; left: 0.1rem; top: 0.65em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.primer-pop .primer-more a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 5px; }
.primer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }/* Primers size to their longest point so short lists stay one line per point, capped by the viewport on tablet and mobile. */
.primer-pop:not(.module-pop) { width: max-content; max-width: min(46rem, calc(100vw - 2rem)); }
/* On phones, code blocks run edge to edge: no side borders or rounded corners, so lines get every pixel. */
@media (max-width: 767px) {
  .code { width: auto; margin-inline: -1rem; border-radius: 0; border-inline: 0; }
}
@media (max-width: 767px) { .nav-inner { gap: 1rem; } }
/* Stacked (tablet and phone), each example takes its own height: the slides stop sharing one cell sized to the tallest,
   which left a gap between a shorter example's code and its output. Rows always pack to the top. */
.hero-slide { align-content: start; }
@media (max-width: 1023px) {
  .hero-slides > .hero-slide[hidden] { display: none; }
}
/* Step 3's button matches step 1's on phones: full width, centered. */
@media (max-width: 767px) { #actions-link { display: flex; width: 100%; justify-content: center; } }
/* Outline buttons over texture (hero dots, footer dots) get a solid page-color fill so the pattern doesn't show through. */
.hero .btn-ghost, .footer .btn-ghost { background: var(--bg); }

/* Tooltips: a compact card above the element (below when the header is in the way), title over an optional mono meta line. */
.tip {
  position: fixed; z-index: 70; display: grid; gap: 0.1rem; max-width: min(22rem, calc(100vw - 1rem)); padding: 0.45rem 0.7rem;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: var(--lift-hi);
  font: var(--weight-medium) var(--text-caption)/1.35 var(--font-sans); pointer-events: none; animation: tip-in 0.15s var(--ease);
}
.tip[hidden] { display: none; }
.tip-meta { color: var(--muted); font: var(--text-caption)/1.35 var(--font-mono); font-variant-ligatures: none; overflow-wrap: anywhere; }
.tip-meta[hidden] { display: none; }
@keyframes tip-in { from { opacity: 0; translate: 0 3px; } }
.tip.is-below { animation-name: tip-in-below; }
@keyframes tip-in-below { from { opacity: 0; translate: 0 -3px; } }
@media (prefers-reduced-motion: reduce) { .tip { animation: none; } }
/* Typesetting details: prose never runs past the reading measure, list items avoid one-word last lines like paragraphs
   do, small light-on-dark notes get a touch more leading, and counts that update or align use tabular figures. */
.file-notes li span, .recipe-lede, .handoff-notes li span { max-width: var(--measure); }
li, dd, figcaption { text-wrap: pretty; }
.step-does { line-height: 1.5; }
.collapse-count, .build-meta, .tl-meta, .tab-progress { font-variant-numeric: tabular-nums; }