/* WAFlow documentation. Same palette and type as the landing page (license/resources/views/landing.blade.php):
   gold accent on warm paper, Bricolage Grotesque for headings, Hanken Grotesk for text, JetBrains Mono for labels.
   Small text and icon strokes use --accent-text (a deeper amber); filled things use the raw gold. */
:root {
  --ink: #faf8f2;
  --ink-2: #ffffff;
  --ink-3: #f3efe2;
  --line: #e6e0cd;
  --text: #221d10;
  --text-dim: #5c5645;
  --text-faint: #918a74;
  --gold: #ffc72c;
  --gold-deep: #b9790a;
  --on-gold: #1a1400;
  --accent-text: #9a6300;
  --green: #1e9c58;
  --red: #c2410c;
  --surface: #ffffff;
  --shadow: 0 24px 50px -24px rgba(40, 28, 0, .18);
  --shadow-sm: 0 8px 22px -14px rgba(40, 28, 0, .22);
  --grid-line: rgba(154, 99, 0, .06);
  --header-h: 64px;
  --side-w: 288px;
  --toc-w: 236px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16.5px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: "Bricolage Grotesque", "Hanken Grotesk", sans-serif; font-weight: 700; letter-spacing: -.01em; margin: 0; color: var(--text); text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-deep); }
img, svg { display: block; }
code, kbd, pre { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }
::selection { background: var(--gold); color: var(--on-gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--gold); color: var(--on-gold); padding: 10px 16px; border-radius: 10px; font-weight: 700; z-index: 100; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ Buttons */
.btn { appearance: none; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font: 600 14px/1 "Hanken Grotesk", sans-serif; padding: 12px 20px; border-radius: 999px; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease, background-color .18s ease; }
.btn-primary { background: linear-gradient(180deg, #ffd257, var(--gold)); color: var(--on-gold); box-shadow: 0 14px 30px -12px rgba(255, 199, 44, .5); }
.btn-primary:hover { transform: translateY(-2px); color: var(--on-gold); box-shadow: 0 18px 36px -12px rgba(255, 199, 44, .65); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--accent-text); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 "JetBrains Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }

/* ------------------------------------------------------------------ Header */
header.site { position: sticky; top: 0; z-index: 40; height: var(--header-h); background: color-mix(in srgb, var(--ink) 84%, transparent); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
header.site.is-scrolled { border-bottom-color: var(--line); }
header.site .bar { height: 100%; display: flex; align-items: center; gap: 18px; max-width: 1560px; margin: 0 auto; padding: 0 32px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); flex: none; }
.brand svg { width: 34px; height: 34px; filter: drop-shadow(0 6px 14px rgba(196, 140, 0, .18)); }
.brand strong { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 18.5px; letter-spacing: -.01em; }
.brand .docs-chip { font: 600 11px/1 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); background: color-mix(in srgb, var(--gold) 22%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); padding: 5px 9px; border-radius: 999px; }
.search-btn { margin-left: 22px; flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text-faint); font: 500 14px "Hanken Grotesk", sans-serif; cursor: pointer; text-align: left; transition: border-color .15s ease, box-shadow .15s ease; }
.search-btn:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.search-btn svg { width: 17px; height: 17px; flex: none; }
.search-btn span { flex: 1; }
.search-btn kbd, .kbd-hint { font: 600 11px/1 "JetBrains Mono", monospace; color: var(--text-faint); background: var(--ink-3); border: 1px solid var(--line); padding: 4px 7px; border-radius: 7px; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); align-items: center; justify-content: center; cursor: pointer; flex: none; color: var(--text); }
.menu-btn svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ Layout */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w); column-gap: 52px; max-width: 1560px; margin: 0 auto; padding: 0 32px; }
.layout.no-toc { grid-template-columns: var(--side-w) minmax(0, 1fr); }
aside.side { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 26px 18px 60px 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
aside.toc { position: sticky; top: calc(var(--header-h) + 30px); align-self: start; max-height: calc(100vh - var(--header-h) - 60px); overflow-y: auto; padding: 4px 0 20px; scrollbar-width: thin; }
main.doc { min-width: 0; padding: 44px 0 40px; }
.side-scrim { display: none; }

/* ------------------------------------------------------------------ Sidebar */
.nav-group { margin-bottom: 8px; }
.nav-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 10px; font: 600 11.5px/1 "JetBrains Mono", monospace; letter-spacing: .11em; text-transform: uppercase; color: var(--text-faint); user-select: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { color: var(--accent-text); background: var(--ink-3); }
.nav-group > summary .chev { margin-left: auto; width: 14px; height: 14px; transition: transform .18s ease; }
.nav-group[open] > summary .chev { transform: rotate(90deg); }
.nav-group > summary .gi { width: 16px; height: 16px; color: var(--accent-text); flex: none; }
.nav-list { list-style: none; margin: 2px 0 12px 17px; padding: 0 0 0 12px; border-left: 1px solid var(--line); display: grid; gap: 1px; }
.nav-list a { position: relative; display: block; padding: 7px 12px; border-radius: 9px; color: var(--text-dim); text-decoration: none; font-size: 14.3px; font-weight: 500; line-height: 1.35; transition: background-color .12s ease, color .12s ease; }
.nav-list a:hover { background: var(--ink-3); color: var(--text); }
.nav-list a[aria-current="page"] { background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--text); font-weight: 700; }
.nav-list a[aria-current="page"]::before { content: ""; position: absolute; left: -13px; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--gold-deep); }

/* ------------------------------------------------------------------ On this page */
.toc h4 { font: 600 11.5px/1 "JetBrains Mono", monospace; letter-spacing: .11em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 12px 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 12px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13.4px; line-height: 1.4; color: var(--text-dim); text-decoration: none; }
.toc a:hover { color: var(--accent-text); }
.toc a.is-active { color: var(--text); font-weight: 700; border-left-color: var(--gold-deep); }
.toc li.l3 a { padding-left: 26px; font-size: 12.8px; color: var(--text-faint); }
.toc li.l3 a.is-active { color: var(--text); }
.toc .toc-foot { margin: 22px 0 0 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-faint); display: grid; gap: 8px; }
.toc .toc-foot a { display: inline; padding: 0; margin: 0; border: 0; color: var(--accent-text); font-weight: 600; }

/* ------------------------------------------------------------------ Article */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--text-faint); margin-bottom: 18px; }
.crumbs a { color: var(--text-dim); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--accent-text); }
.crumbs svg { width: 12px; height: 12px; }
article h1 { font-size: clamp(2.3rem, 2.4vw + 1.4rem, 3.3rem); line-height: 1.05; }
.lede { margin-top: 18px; font-size: 19px; line-height: 1.55; color: var(--text-dim); max-width: 62ch; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 22px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.8px; font-weight: 600; color: var(--text-dim); text-decoration: none; }
.chip svg { width: 14px; height: 14px; color: var(--accent-text); }
a.chip:hover { border-color: var(--gold); color: var(--accent-text); }
.prose { margin-top: 34px; max-width: 780px; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: clamp(1.55rem, 1vw + 1.25rem, 2rem); margin-top: 58px; padding-top: 4px; position: relative; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.22rem; margin-top: 34px; }
.prose h4 { font-size: 1.02rem; margin-top: 26px; }
.prose h2 .anchor, .prose h3 .anchor { margin-left: 8px; opacity: 0; color: var(--gold-deep); text-decoration: none; font-weight: 500; transition: opacity .15s ease; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.prose p { color: var(--text); }
.prose strong { font-weight: 700; }
.prose ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.prose ul > li { position: relative; padding-left: 24px; }
.prose ul > li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.prose ul ul, .prose ol ul, .prose ul ol { margin-top: 9px; }
.prose ul ul > li::before { background: transparent; border: 1.5px solid var(--gold-deep); box-shadow: none; width: 6px; height: 6px; }
.prose ol { list-style: none; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.prose ol > li { position: relative; padding-left: 46px; counter-increment: step; min-height: 30px; }
.prose ol > li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0 0 4px var(--ink); display: grid; place-items: center; font: 800 13px/1 "Bricolage Grotesque", sans-serif; color: var(--accent-text); }
.prose li > p + p, .prose li > figure { margin-top: 12px; }
.prose li li { font-size: .97em; }
.prose code { font-size: .86em; background: var(--ink-3); border: 1px solid var(--line); padding: 1px 6px; border-radius: 7px; color: #6e4700; word-break: break-word; }
.prose kbd { font-size: .8em; background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px; padding: 2px 7px; border-radius: 7px; color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold); color: var(--text-dim); }
.prose .ext::after { content: "\2197"; font-size: .8em; margin-left: 3px; color: var(--text-faint); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.6px; }
.prose th { text-align: left; background: var(--ink-3); font: 700 12px/1.3 "JetBrains Mono", monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); padding: 12px 16px; white-space: nowrap; }
.prose td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.prose td:first-child { font-weight: 600; }
.prose td code { white-space: nowrap; }

/* code */
.codeblock { position: relative; border-radius: 14px; background: #1b1c1e; border: 1px solid #2d2e31; overflow: hidden; box-shadow: var(--shadow-sm); }
.codeblock .cb-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); font: 600 11px/1 "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: rgba(244, 241, 230, .55); }
.codeblock button { appearance: none; border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: rgba(244, 241, 230, .8); font: 600 11.5px "Hanken Grotesk", sans-serif; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.codeblock button:hover { border-color: var(--gold); color: var(--gold); }
.codeblock pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 13.4px; line-height: 1.6; color: #f4f1e6; }
.prose .codeblock code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; word-break: normal; }

/* screenshots */
figure.shot { margin: 26px auto; }
figure.shot .frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #101418; cursor: zoom-in; position: relative; transition: transform .2s ease, box-shadow .2s ease; }
figure.shot .frame:hover { transform: translateY(-2px); box-shadow: 0 30px 60px -26px rgba(40, 28, 0, .3); }
figure.shot img { width: 100%; height: auto; }
figure.shot .zoom { position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; border-radius: 9px; background: rgba(20, 16, 6, .72); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s ease; backdrop-filter: blur(4px); }
figure.shot .zoom svg { width: 15px; height: 15px; }
figure.shot .frame:hover .zoom { opacity: 1; }
figure.shot figcaption { margin-top: 10px; font-size: 13.6px; color: var(--text-faint); text-align: center; line-height: 1.45; }
figure.shot.light .frame { background: #fff; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 26px 0; }
.shots figure.shot { margin: 0; }
.shots.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .shots, .shots.three { grid-template-columns: 1fr; } }

/* callouts */
.callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.callout::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--gold)); }
.callout .ci { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--gold)) 22%, transparent); color: var(--ct, var(--accent-text)); margin-top: 1px; }
.callout .ci svg { width: 16px; height: 16px; }
.callout .cb { min-width: 0; flex: 1; }
.callout .ct { font: 700 15px/1.3 "Bricolage Grotesque", sans-serif; margin-bottom: 4px; color: var(--text); }
.callout .cb > * + * { margin-top: 10px; }
.callout p, .callout li { font-size: 15px; color: var(--text-dim); }
.callout.note { --c: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--surface)); }
.callout.tip { --c: var(--green); --ct: #16794a; background: color-mix(in srgb, var(--green) 7%, var(--surface)); }
.callout.warn { --c: #e2691f; --ct: #b4470a; background: color-mix(in srgb, #e2691f 8%, var(--surface)); }
.callout.info { --c: #5a6ee0; --ct: #3d50c4; background: color-mix(in srgb, #5a6ee0 6%, var(--surface)); }
.callout.video { --c: #e02f2f; --ct: #c21f1f; background: var(--surface); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; margin: 24px 0; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; position: relative; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); box-shadow: var(--shadow); color: var(--text); }
.card .icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--accent-text); margin-bottom: 6px; }
.card .icon svg { width: 20px; height: 20px; }
.card h3 { font-size: 1.05rem; margin: 0; }
.card p { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.card .go { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 700; color: var(--accent-text); display: inline-flex; align-items: center; gap: 6px; }
.card .go svg { width: 13px; height: 13px; transition: transform .18s ease; }
.card:hover .go svg { transform: translateX(3px); }
.prose .cards { max-width: none; }
.prose .cards + h2, .prose .cards + h3 { margin-top: 40px; }

/* pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; max-width: 780px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.pager a:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pager small { font: 600 11px/1 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.pager strong { font: 700 16px/1.3 "Bricolage Grotesque", sans-serif; }
.pager .next { text-align: right; grid-column: 2; }
.pager .prev { grid-column: 1; }
.helpbar { margin-top: 28px; max-width: 780px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 18px 22px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 24%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); }
.helpbar strong { font: 700 16px "Bricolage Grotesque", sans-serif; display: block; }
.helpbar span { font-size: 14px; color: var(--text-dim); }

/* home */
.hero-doc { padding: 26px 0 10px; }
.hero-doc h1 { font-size: clamp(2.6rem, 3.2vw + 1.4rem, 4.2rem); line-height: 1.02; margin-top: 18px; }
.hero-doc h1 em { font-style: normal; color: var(--gold-deep); }
.hero-doc .lede { font-size: 19.5px; max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-search { margin: 30px 0 0; width: 100%; max-width: 560px; height: 54px; flex: none; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 34px; max-width: 780px; }
.stat { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font: 800 1.9rem/1 "Bricolage Grotesque", sans-serif; color: var(--text); }
.stat span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--text-dim); }
.home-section { margin-top: 56px; }
.home-section > h2 { font-size: clamp(1.5rem, 1vw + 1.2rem, 1.9rem); }
.home-section > p { color: var(--text-dim); margin-top: 8px; max-width: 64ch; }

/* ------------------------------------------------------------------ Footer */
footer.site { border-top: 1px solid var(--line); margin-top: 40px; background: color-mix(in srgb, var(--ink-3) 55%, transparent); }
footer.site .in { max-width: 1560px; margin: 0 auto; padding: 34px 32px 40px; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-start; justify-content: space-between; font-size: 13.5px; color: var(--text-dim); }
footer.site .f-brand { max-width: 42ch; }
footer.site .f-brand strong { display: block; font: 800 16px "Bricolage Grotesque", sans-serif; color: var(--text); margin-bottom: 6px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer.site nav a { color: var(--text-dim); text-decoration: none; font-weight: 600; }
footer.site nav a:hover { color: var(--accent-text); }
footer.site .legal { flex-basis: 100%; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-faint); }

/* ------------------------------------------------------------------ Search dialog + lightbox */
dialog { border: 0; padding: 0; color: var(--text); }
dialog::backdrop { background: rgba(20, 16, 6, .6); backdrop-filter: blur(3px); }
#searchDlg { width: min(680px, 94vw); margin: 11vh auto auto; background: var(--surface); border-radius: 20px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .55); overflow: hidden; max-height: 76vh; }
#searchDlg[open] { display: flex; flex-direction: column; }
.s-top { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); flex: none; }
.s-top svg { width: 19px; height: 19px; color: var(--accent-text); flex: none; }
.s-top input { flex: 1; height: 58px; border: 0; outline: 0; background: transparent; font: 500 17px "Hanken Grotesk", sans-serif; color: var(--text); min-width: 0; }
.s-top input::placeholder { color: var(--text-faint); }
.s-top input::-webkit-search-cancel-button, .s-top input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.s-list { overflow-y: auto; padding: 8px; flex: 1; }
.s-item { display: block; padding: 11px 14px; border-radius: 12px; text-decoration: none; color: var(--text); }
.s-item[aria-selected="true"], .s-item:hover { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--text); }
.s-item .t { font: 700 15px/1.3 "Bricolage Grotesque", sans-serif; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.s-item .g { font: 600 10.5px/1 "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); background: var(--ink-3); border: 1px solid var(--line); padding: 3px 7px; border-radius: 999px; }
.s-item .x { margin-top: 3px; font-size: 13.4px; line-height: 1.45; color: var(--text-dim); }
.s-item mark { background: color-mix(in srgb, var(--gold) 55%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.s-empty { padding: 34px 20px; text-align: center; color: var(--text-faint); font-size: 14.5px; }
.s-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); background: var(--ink-3); font-size: 12.5px; color: var(--text-faint); flex: none; }
.s-foot span { display: inline-flex; align-items: center; gap: 6px; }
#lightbox { background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
#lightbox img { display: block; max-width: 96vw; max-height: 88vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7); cursor: zoom-out; margin: 0 auto; }
#lightbox .lb-cap { text-align: center; color: #f4f1e6; font-size: 14px; margin-top: 12px; }
#lightbox .lb-x { position: absolute; top: -14px; right: -6px; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: var(--gold); color: var(--on-gold); font: 700 22px/1 "Hanken Grotesk", sans-serif; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .5); }
html:has(dialog[open]) { overflow: hidden; }
.to-top { position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); display: grid; place-items: center; cursor: pointer; color: var(--accent-text); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; z-index: 30; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 1240px) {
  .layout { grid-template-columns: var(--side-w) minmax(0, 1fr); column-gap: 40px; }
  aside.toc { display: none; }
}
@media (max-width: 980px) {
  :root { --header-h: 60px; }
  header.site .bar { padding: 0 16px; gap: 10px; }
  .layout, .layout.no-toc { grid-template-columns: minmax(0, 1fr); padding: 0 20px; }
  .menu-btn { display: inline-flex; }
  .search-btn { margin-left: 4px; max-width: none; }
  .search-btn kbd { display: none; }
  .brand .docs-chip { display: none; }
  aside.side { position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; height: auto; width: min(320px, 86vw); background: var(--ink); padding: 20px 14px 40px 18px; border-right: 1px solid var(--line); box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .35); transform: translateX(-102%); transition: transform .22s ease; }
  body.nav-open aside.side { transform: none; }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(20, 16, 6, .5); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.nav-open .side-scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  main.doc { padding-top: 28px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .lede { font-size: 17.5px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next, .pager .prev { grid-column: auto; text-align: left; }
  .prose ol > li { padding-left: 42px; }
  footer.site .in { padding: 28px 20px 34px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print {
  header.site, aside.side, aside.toc, .pager, .helpbar, footer.site, .to-top, .side-scrim { display: none !important; }
  .layout { display: block; padding: 0; }
  body { background: #fff; }
  figure.shot .frame { box-shadow: none; }
}
