/* Parallax documentation site.
   One calm dark theme: neutral greys and one warm accent taken from the logo's disk. System fonts, no libraries. */
:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-soft: #0e0e10;
  --surface: #121215;
  --surface-2: #18181c;
  --surface-3: #1f1f24;
  --border: #212126;
  --border-strong: #2d2d34;
  --heading: #f4f4f5;
  --text: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #85858e;
  --accent: #d9ab6c;
  --accent-strong: #ecc790;
  --info: #8ea6c6;
  --ok: #86b894;
  --warn: #d6a65a;
  --err: #e08a7c;
  --radius: 12px;
  --radius-sm: 8px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --header-h: 64px;
  --sidebar-w: 240px;
  --toc-w: 208px;
  --content-w: 800px;
}

*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: #2a2a30 transparent; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
::selection { background: rgba(217, 171, 108, .28); color: var(--heading); }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
strong { color: var(--heading); font-weight: 600; }
em { color: var(--heading); }

h1, h2, h3, h4 { color: var(--heading); font-weight: 600; line-height: 1.25; letter-spacing: -.012em; scroll-margin-top: calc(var(--header-h) + 20px); text-wrap: balance; }
h1 { font-size: 2.25rem; font-weight: 700; letter-spacing: -.03em; margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; letter-spacing: -.02em; margin: 3.25rem 0 1rem; }
h3 { font-size: 1.125rem; margin: 2.1rem 0 .6rem; }
h4 { font-size: .8125rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 1.6rem 0 .5rem; }
.anchor { margin-left: .45em; color: var(--faint); font-weight: 400; opacity: 0; transition: opacity .15s; }
.anchor:hover { color: var(--accent); text-decoration: none; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus-visible { opacity: 1; }

p, ul, ol, dl, pre, blockquote, .table-wrap { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin: .3rem 0; }
li::marker { color: var(--faint); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
blockquote { padding: 2px 0 2px 16px; border-left: 2px solid var(--border-strong); color: var(--muted); }

/* code */
code { font-family: var(--mono); font-size: .86em; color: #e7e7ea; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: .1em .36em; overflow-wrap: anywhere; }
pre { position: relative; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; overflow-x: auto; line-height: 1.65; }
pre code { font-size: .84rem; color: #dcdce0; background: none; border: 0; padding: 0; white-space: pre; }
pre .copy {
  position: absolute; top: 9px; right: 9px; font: 500 12px/1 var(--sans); color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 6px; padding: 6px 9px;
  cursor: pointer; opacity: 0; transition: opacity .15s, color .15s;
}
pre:hover .copy, pre .copy:focus-visible, pre .copy.done { opacity: 1; }
pre .copy:hover { color: var(--heading); }
pre .copy.done { color: var(--ok); }
@media (hover: none) { pre .copy { opacity: 1; } }
kbd { font: .82em var(--mono); color: var(--heading); background: var(--surface-2); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: .05em .4em; }

/* tables (app.js wraps each one in .table-wrap so wide tables scroll inside their frame) */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.55; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
thead th { color: var(--heading); font-weight: 600; background: var(--surface); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .018); }
td code { white-space: nowrap; }
.nowrap { white-space: nowrap; }
.empty-row td { color: var(--faint); font-style: italic; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; gap: 24px;
  padding: 0 28px; background: rgba(10, 10, 11, .84); border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.brand:hover { color: var(--heading); text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.top-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.top-links a { color: var(--muted); font-size: .875rem; font-weight: 500; padding: 7px 11px; border-radius: 7px; }
.top-links a:hover { color: var(--heading); background: var(--surface-2); text-decoration: none; }
.top-links a.active { color: var(--heading); }
.top-links .sep { width: 1px; height: 20px; background: var(--border-strong); margin: 0 10px; }
.top-links a.gh { display: inline-flex; align-items: center; gap: 6px; color: var(--heading); border: 1px solid var(--border-strong); }
.top-links a.gh:hover { background: var(--surface-2); }
.nav-toggle { display: none; margin-left: auto; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--heading); background: transparent; border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer; }
.ext { width: 11px; height: 11px; flex: none; opacity: .7; }

/* docs layout: navigation, page, on-this-page */
.layout {
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, var(--content-w)) var(--toc-w);
  justify-content: center; gap: 56px; max-width: 1440px; margin: 0 auto; padding: 0 32px;
}
.layout.no-toc { grid-template-columns: var(--sidebar-w) minmax(0, calc(var(--content-w) + 64px)); }
.sidebar, .toc {
  position: sticky; top: var(--header-h); align-self: start; max-height: calc(100vh - var(--header-h));
  overflow-y: auto; padding: 36px 0 48px;
}
.sidebar { padding-right: 16px; border-right: 1px solid var(--border); }
.navtree .group { margin: 0 0 24px; }
.navtree .group-title { color: var(--heading); font-size: .8125rem; font-weight: 600; margin: 0 0 6px 10px; }
.navtree a { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .875rem; line-height: 1.45; padding: 6px 10px; border-radius: 6px; }
.navtree a:hover { color: var(--heading); background: var(--surface); text-decoration: none; }
.navtree a.active { color: var(--heading); background: var(--surface-2); font-weight: 500; box-shadow: inset 2px 0 0 var(--accent); }
.mobile-nav { display: none; }
.toc { font-size: .8125rem; }
.toc .toc-title { color: var(--heading); font-weight: 600; margin: 0 0 10px; }
.toc a { display: block; color: var(--faint); line-height: 1.45; padding: 5px 0 5px 12px; border-left: 1px solid var(--border); }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.on { color: var(--heading); border-left-color: var(--accent); }
.content { min-width: 0; padding: 44px 0 96px; }
.content > section > h2:first-child { margin-top: 3rem; }

/* page head */
.page-head { margin: 0 0 8px; padding: 0 0 28px; border-bottom: 1px solid var(--border); }
.eyebrow { color: var(--accent); font-size: .8125rem; font-weight: 600; letter-spacing: .01em; margin: 0 0 10px; }
.lead { color: var(--muted); font-size: 1.125rem; line-height: 1.65; margin: 14px 0 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* badges and filter chips */
.badge {
  display: inline-flex; align-items: center; font: 500 .75rem/1.25 var(--sans); color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 8px;
  white-space: nowrap; vertical-align: 1px;
}
.badge.block { color: #f0b3a8; background: rgba(224, 138, 124, .08); border-color: rgba(224, 138, 124, .3); }
.badge.warn { color: #e8c68e; background: rgba(214, 166, 90, .08); border-color: rgba(214, 166, 90, .3); }
.badge.lock { color: var(--accent-strong); background: rgba(217, 171, 108, .08); border-color: rgba(217, 171, 108, .3); }
.badge.ok { color: #acd4b6; background: rgba(134, 184, 148, .08); border-color: rgba(134, 184, 148, .3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chip { font: 500 .8125rem/1 var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--border-strong); border-radius: 7px; padding: 8px 12px; cursor: pointer; }
.chip:hover { color: var(--heading); background: var(--surface); }
.chip.active { color: var(--bg); background: var(--heading); border-color: var(--heading); }
.filter {
  display: block; width: 100%; max-width: 420px; font: inherit; font-size: .9375rem; color: var(--heading);
  background: var(--bg-soft); border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 13px; margin: 0 0 12px;
}
.filter::placeholder { color: var(--faint); }
.filter:focus { border-color: #5a5a63; }
.filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* tabs */
.tabs { margin: 0 0 1.6rem; }
.tab-list { display: flex; flex-wrap: wrap; gap: 0 24px; border-bottom: 1px solid var(--border); margin: 0 0 22px; }
.tab { position: relative; font: 500 .875rem/1 var(--sans); color: var(--muted); background: none; border: 0; padding: 13px 0 12px; cursor: pointer; }
.tab:hover { color: var(--heading); }
.tab[aria-selected="true"] { color: var(--heading); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab-panel[hidden] { display: none; }

/* collapsible blocks: stage lists and "more" panels */
.stages { list-style: none; padding: 0; margin: 0 0 1.6rem; position: relative; }
.stages::before { content: ""; position: absolute; left: 15px; top: 24px; bottom: 24px; width: 1px; background: var(--border-strong); }
.stages > li { position: relative; margin: 0 0 10px; padding-left: 48px; }
.stages .num {
  position: absolute; left: 0; top: 11px; width: 31px; height: 31px; display: grid; place-items: center;
  font: 600 .75rem/1 var(--mono); color: var(--muted); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 50%;
}
.stages details, details.more { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; transition: border-color .15s; }
details.more { margin: 0 0 12px; }
.stages details:hover, details.more:hover, .stages details[open], details.more[open] { border-color: var(--border-strong); }
.stages summary, details.more > summary { position: relative; cursor: pointer; list-style: none; padding: 13px 44px 13px 16px; }
.stages summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.stages summary::-webkit-details-marker, details.more > summary::-webkit-details-marker { display: none; }
.stages summary::after, details.more > summary::after {
  content: ""; position: absolute; right: 18px; top: 19px; width: 7px; height: 7px;
  border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(45deg); transition: transform .15s;
}
.stages details[open] > summary::after, details.more[open] > summary::after { transform: rotate(225deg); top: 22px; }
.stages summary .name { font-weight: 600; color: var(--heading); }
.stages summary .what { flex-basis: 100%; color: var(--muted); font-size: .875rem; line-height: 1.55; }
details.more > summary { font-weight: 600; color: var(--heading); }
.stages .body, details.more > .body { padding: 14px 16px 4px; border-top: 1px solid var(--border); }
.expand-all { font: 500 .8125rem/1 var(--sans); color: var(--muted); background: none; border: 1px solid var(--border-strong); border-radius: 7px; padding: 8px 12px; cursor: pointer; margin: 0 0 14px; }
.expand-all:hover { color: var(--heading); background: var(--surface); }

/* callouts */
.note, .tip, .warn-box, .limit {
  --c: var(--info); border: 1px solid var(--border); border-left: 3px solid var(--c); border-radius: 8px;
  background: rgba(142, 166, 198, .045); padding: 14px 18px; margin: 0 0 1.25rem;
}
.tip { --c: var(--ok); background: rgba(134, 184, 148, .045); }
.warn-box { --c: var(--warn); background: rgba(214, 166, 90, .05); }
.limit { --c: var(--err); background: rgba(224, 138, 124, .05); }
.note > :last-child, .tip > :last-child, .warn-box > :last-child, .limit > :last-child { margin-bottom: 0; }
.callout-title { display: block; color: var(--heading); font-size: .875rem; font-weight: 600; margin-bottom: 4px; }

/* key-value lists */
dl.specs { display: grid; grid-template-columns: minmax(140px, max-content) minmax(0, 1fr); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 0 0 1.6rem; }
dl.specs dt, dl.specs dd { margin: 0; padding: 12px 16px; border-top: 1px solid var(--border); }
dl.specs dt:first-of-type, dl.specs dt:first-of-type + dd { border-top: 0; }
dl.specs dt { color: var(--muted); font-size: .875rem; font-weight: 500; background: var(--surface); }
dl.specs dd { font-size: .9375rem; }
dl.specs dd .badge { margin: 2px 4px 2px 0; }

/* a row of steps with arrows */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; padding: 14px 16px; margin: 0 0 1.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.flow .step { font-size: .8125rem; font-weight: 500; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 6px; padding: 4px 10px; }
.flow .step.lock { color: var(--accent-strong); background: rgba(217, 171, 108, .07); border-color: rgba(217, 171, 108, .32); }
.flow .arrow { color: var(--faint); font-size: .8125rem; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; margin: 0 0 1.6rem; }
.card { display: flex; flex-direction: column; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; transition: border-color .15s, background-color .15s; }
a.card:hover { color: var(--text); text-decoration: none; background: var(--surface-2); border-color: var(--border-strong); }
.card .kicker { color: var(--faint); font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--heading); }
.card p { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.6; }
a.card h3::after { content: "→"; margin-left: 6px; color: var(--faint); font-weight: 400; opacity: 0; transition: opacity .15s; }
a.card:hover h3::after { opacity: 1; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 18px; font-size: .9375rem; font-weight: 500; color: var(--heading); background: transparent; border: 1px solid var(--border-strong); border-radius: 9px; transition: background-color .15s, border-color .15s; }
.btn:hover { color: var(--heading); text-decoration: none; background: var(--surface-2); }
.btn.primary { color: #0a0a0b; background: var(--heading); border-color: var(--heading); }
.btn.primary:hover { color: #0a0a0b; background: #ffffff; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* lane switcher on pipeline pages */
.lane-nav { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%; padding: 4px; margin: 0 0 30px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; }
.lane-nav a { color: var(--muted); font-size: .8125rem; font-weight: 500; padding: 6px 11px; border-radius: 7px; }
.lane-nav a:hover { color: var(--heading); background: var(--surface-2); text-decoration: none; }
.lane-nav a.active { color: var(--heading); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }

/* home page (body.splash): full width, no sidebar */
.splash-main { max-width: 1080px; margin: 0 auto; padding: 0 32px 104px; }
.hero { text-align: center; padding: 40px 0 24px; }
.hero-art { display: block; width: min(600px, 100%); margin: 0 auto; }
.hero h1 { font-size: clamp(2.75rem, 6vw, 4rem); letter-spacing: -.045em; margin: 4px 0 0; }
.tagline { color: var(--heading); font-size: clamp(1.15rem, 2.4vw, 1.375rem); font-weight: 500; letter-spacing: -.012em; line-height: 1.4; max-width: 760px; margin: 12px auto 0; text-wrap: balance; }
.hero .lead { max-width: 660px; margin: 14px auto 0; font-size: 1.0625rem; text-wrap: pretty; }
.hero .cta { justify-content: center; }
.splash-main > section:not(.hero) { padding-top: 72px; }
.splash-main h2 { font-size: 1.75rem; letter-spacing: -.025em; margin: 0 0 10px; }
.section-lead { color: var(--muted); font-size: 1.0625rem; max-width: 680px; margin: 0 0 28px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin: 0 0 1.6rem; }
.feature { background: var(--bg); padding: 24px 24px 26px; }
.feature h3 { font-size: 1rem; margin: 0 0 8px; }
.feature p { color: var(--muted); font-size: .9375rem; line-height: 1.6; margin: 0; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; padding: 0; margin: 0 0 1.6rem; }
.steps li { counter-increment: step; margin: 0; padding: 18px 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; color: var(--accent); font: 600 .8125rem/1 var(--mono); margin: 0 0 12px; }
.steps h3 { font-size: .9375rem; margin: 0 0 6px; }
.steps p { color: var(--muted); font-size: .875rem; line-height: 1.6; margin: 0; }
.more-link { font-weight: 500; }

/* footer */
.site-footer { border-top: 1px solid var(--border); }
.foot-inner { max-width: 1440px; margin: 0 auto; padding: 28px 32px 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; color: var(--faint); font-size: .8125rem; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; }
.foot-brand img { width: 22px; height: 22px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--heading); }

/* responsive */
@media (max-width: 1240px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, var(--content-w)); }
  .toc { display: none; }
}
@media (max-width: 960px) {
  .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 880px) {
  .site-header { padding: 0 16px; }
  .layout, .layout.no-toc { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px; }
  .sidebar { display: none; }
  .top-links { display: none; }
  .nav-toggle { display: inline-flex; }
  body.nav-open { overflow: hidden; }
  body.nav-open .mobile-nav { display: block; position: fixed; z-index: 49; top: var(--header-h); left: 0; right: 0; bottom: 0; overflow-y: auto; padding: 20px 16px 48px; background: var(--bg); }
  .content { padding-top: 28px; }
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.3125rem; margin-top: 2.6rem; }
  .splash-main { padding: 0 16px 80px; }
  .splash-main > section:not(.hero) { padding-top: 56px; }
  .splash-main h2 { font-size: 1.5rem; }
  dl.specs { grid-template-columns: minmax(0, 1fr); }
  dl.specs dt { border-top: 1px solid var(--border); padding-bottom: 2px; }
  dl.specs dd { border-top: 0; padding-top: 2px; }
  dl.specs dt:first-of-type { border-top: 0; }
  .foot-inner { padding: 24px 16px 36px; }
}
@media (max-width: 560px) {
  .cards.four { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 24px; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
