/* DocForge default theme, v2 (2026-09-23).

   Grounded in the ThemeForest corpus (Web Screenshot Clone / _corpus + SYSTEMS.md)
   and a 2026 survey of premium docs (Vercel Geist, Stripe, Linear, Mintlify,
   Starlight): token discipline, semantic roles with the on- pattern, subtle
   elevation, [data-theme] runtime theming. What changed from v1:
   - self-hosted Geist Sans + Geist Mono (SIL OFL, assets/fonts), no CDN
   - quieter neutrals: near-black headings, softer body text, hairline borders
     tuned per theme (dark borders are their own tokens, not an inverted light)
   - one-hue callouts via color-mix(), SVG icons instead of emoji
   - steps drawn with a pseudo-element connector that stops at the last badge
   - negative tracking only at display sizes; tabular numbers where digits align
   The accent stays a single variable (docset `accent:`), teal by default. */

@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2-variations"), url("fonts/geist-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/geist-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* brand ramp: teal/cyan (corpus accent #2, distinctive, not indigo) */
  --brand-50:#f0fdfa; --brand-100:#cdfaf2; --brand-200:#9bf3e6; --brand-300:#5fe6d6;
  --brand-400:#2dd0c0; --brand-500:#13b3a4; --brand-600:#0d9387; --brand-700:#0f766e;
  --brand-800:#115e58; --brand-900:#134e49;

  /* spacing, 5px base (corpus: 224/380) */
  --s-1:5px; --s-2:10px; --s-3:15px; --s-4:20px; --s-5:25px; --s-6:30px;
  --s-8:40px; --s-10:50px; --s-12:60px; --s-16:80px;
  /* radius, one language */
  --r-xs:5px; --r-sm:8px; --r-md:12px; --r-lg:16px; --r-full:999px;
  /* elevation, subtle; never shadow soup */
  --shadow-1:0 1px 2px rgba(16,24,40,.05);
  --shadow-2:0 1px 2px rgba(16,24,40,.04), 0 4px 12px -2px rgba(16,24,40,.08);
  --shadow-3:0 16px 40px -12px rgba(16,24,40,.22), 0 2px 6px rgba(16,24,40,.06);
  /* type */
  --text-xs:.75rem; --text-sm:.875rem; --text-base:1rem; --text-lead:1.125rem;
  --text-h3:1.125rem; --text-h2:1.5rem; --text-h1:2.25rem;
  /* motion */
  --dur-1:140ms; --dur-2:220ms; --ease:cubic-bezier(.2,0,0,1);
  --state-hover:.06; --state-press:.1;

  --sidebar-w:272px; --toc-w:216px; --top-h:60px;
  --measure:36rem;   /* prose rail: about 70 characters of Geist at 16px (measured, ~7.9px/char) */
  --wide:54rem;      /* tables, code, screenshots, video, demos */

  /* semantic roles, light */
  --bg:#ffffff; --bg-soft:#f7f8fa; --surface:#ffffff; --surface-2:#fbfbfc;
  --heading:#0b0f14; --text:#272d35; --muted:#5b6370; --faint:#697180;  /* faint holds 4.5:1 on white */
  --border:#e7e9ee; --border-strong:#d5d9e0;
  --accent:var(--brand-700); --on-accent:#ffffff; --accent-text:var(--brand-700);
  --accent-soft:var(--brand-50);
  --code-bg:#f6f7f9; --kbd-bg:#ffffff;
  --selection:color-mix(in srgb, var(--accent) 22%, transparent);

  /* one hue per callout kind; tint and border are mixed from it */
  --c-warning:#c2410c; --c-note:#2563eb; --c-tip:#0f766e; --c-permission:#7c3aed; --c-ok:#15803d; --c-danger:#b91c1c;
  --pin:#e5484d;
}
:root[data-theme="dark"] {
  --bg:#0a0c10; --bg-soft:#0f1217; --surface:#11151b; --surface-2:#141820;
  --heading:#f3f5f8; --text:#d5dae1; --muted:#9ba4b0; --faint:#838c98;  /* 4.5:1 on #0a0c10 */
  --border:#1f252e; --border-strong:#2b323d;
  --accent:var(--brand-400); --on-accent:#03201c; --accent-text:var(--brand-300);
  --accent-soft:#0b2724;
  --code-bg:#0e1116; --kbd-bg:#171b22;
  --shadow-1:0 1px 2px rgba(0,0,0,.4);
  --shadow-2:0 1px 2px rgba(0,0,0,.35), 0 6px 16px -4px rgba(0,0,0,.45);
  --shadow-3:0 18px 44px -12px rgba(0,0,0,.7);
  --c-warning:#fb923c; --c-note:#7aa7ff; --c-tip:#34d3bf; --c-permission:#b79bff; --c-ok:#4ade80; --c-danger:#f87171;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + var(--s-4)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: var(--text-base); line-height: 1.65; -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 0, "cv11" 1;
}
::selection { background: var(--selection); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.skip-link { position: absolute; left: -999px; top: var(--s-2); background: var(--accent);
  color: var(--on-accent); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); z-index: 200; }
.skip-link:focus { left: var(--s-3); }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 100; height: var(--top-h);
  display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-5);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 640; color: var(--heading);
  font-size: 1rem; letter-spacing: -.01em; white-space: nowrap; }
.brand img { height: 26px; width: auto; }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; flex: 0 0 auto;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #000 12%, transparent); }
.brand:hover { text-decoration: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid transparent; border-radius: var(--r-sm); background: none;
  color: var(--muted); cursor: pointer; transition: background var(--dur-1) var(--ease), color var(--dur-1); }
.icon-btn:hover { background: color-mix(in srgb, var(--heading) var(--state-hover), transparent); color: var(--heading); }
.nav-toggle, .search-trigger, .nav-mobile-head { display: none; }
.theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: inline; }

.searchbox { position: relative; margin-left: auto; width: min(320px, 40vw); }
.searchbox input {
  width: 100%; height: 38px; padding: 0 70px 0 36px; font-size: .9rem; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-sm);
  outline: none; font-family: inherit; transition: border-color var(--dur-1), box-shadow var(--dur-1), background var(--dur-1);
}
.searchbox::before { content: ""; position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%);
  background: var(--faint); pointer-events: none;
  -webkit-mask: var(--ico-search) center/contain no-repeat; mask: var(--ico-search) center/contain no-repeat; }
.searchbox input::placeholder { color: var(--faint); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.searchbox input:hover { border-color: var(--border-strong); }
.searchbox input:focus { border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.search-results {
  position: absolute; top: 46px; right: 0; width: min(480px, 80vw); max-height: 64vh;
  overflow: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-3); padding: 6px;
}
.search-results a, .sm-results a { display: block; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text); }
.search-results a:hover, .search-results a.active, .sm-results a:hover, .sm-results a.active {
  background: color-mix(in srgb, var(--accent) 8%, transparent); text-decoration: none; }
.r-section { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.r-title { font-weight: 600; color: var(--heading); }
.r-sum { color: var(--muted); font-size: .86rem; line-height: 1.45; margin-top: 2px; }
.r-empty { padding: var(--s-3); color: var(--muted); }
.search-results .r-sum, .sm-results .r-sum { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-results mark, .sm-results mark { background: color-mix(in srgb, var(--accent) 26%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---- layout ---- */
.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: var(--top-h); align-self: start; height: calc(100vh - var(--top-h));
  overflow-y: auto; border-right: 1px solid var(--border); padding: var(--s-6) var(--s-4) var(--s-12);
  background: var(--bg); scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.nav-section { margin-bottom: var(--s-5); }
.nav-section-title { font-size: .75rem; font-weight: 640; letter-spacing: .05em;
  text-transform: uppercase; color: var(--faint); padding: 0 10px 6px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { position: relative; display: block; padding: 6px 10px; margin: 1px 0; border-radius: var(--r-sm);
  color: var(--muted); font-size: .9rem; line-height: 1.4; transition: background var(--dur-1) var(--ease), color var(--dur-1); }
.nav a:hover { background: color-mix(in srgb, var(--heading) 5%, transparent); color: var(--heading); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 590; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 2px;
  border-radius: 2px; background: var(--accent); }

.content { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-12);
  max-width: 1180px; margin: 0 auto; padding: var(--s-10) var(--s-10) var(--s-16); width: 100%; }
.content:has(.toc-rail) { grid-template-columns: minmax(0, 1fr) var(--toc-w); }
.doc { min-width: 0; max-width: var(--wide); }
.doc > :is(.page-top, h1, .summary, .page-meta, .prereqs, .toc-inline, .result, .troubleshooting, .related, .feedback, .pager),
.doc > .block:is(.block-prose, .block-heading, .block-steps, .block-list, .block-callout, .block-checklist,
  .block-definitions, .block-menu, .block-dropdown, .block-dialog) { max-width: var(--measure); }
.doc > .page-top { max-width: var(--wide); }

/* ---- headings + prose ---- */
.page-top { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); min-height: 28px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--faint); font-size: .82rem; min-width: 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-text); }
.doc h1 { font-size: var(--text-h1); line-height: 1.15; letter-spacing: -.028em; font-weight: 660;
  color: var(--heading); margin: 0 0 var(--s-3); text-wrap: balance; }
.summary { font-size: var(--text-lead); color: var(--muted); margin: 0 0 var(--s-4); line-height: 1.55; text-wrap: pretty; }
.doc h2 { font-size: var(--text-h2); line-height: 1.25; letter-spacing: -.018em; font-weight: 640; color: var(--heading);
  margin: var(--s-12) 0 var(--s-3); }
.doc h3 { font-size: var(--text-h3); font-weight: 620; color: var(--heading); letter-spacing: -.008em; margin: var(--s-8) 0 var(--s-2); }
.doc h4 { font-size: 1rem; font-weight: 620; color: var(--heading); margin: var(--s-6) 0 var(--s-2); }
.doc p { margin: 0 0 var(--s-4); }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 var(--s-4); }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--faint); }
.doc a { font-weight: 520; }
.doc strong { color: var(--heading); font-weight: 620; }
code { font-family: var(--mono); font-size: .855em; background: var(--code-bg);
  padding: .14em .38em; border-radius: 6px; border: 1px solid var(--border); color: var(--heading); }
.keys { display: inline-flex; gap: 3px; vertical-align: 1px; }
kbd { font-family: var(--mono); font-size: .76em; font-weight: 600; line-height: 1; color: var(--heading);
  background: var(--kbd-bg); border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 6px; padding: 3px 6px; min-width: 1.6em; text-align: center; }
.highlight, pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4); overflow-x: auto; font-family: var(--mono); font-size: .84rem; line-height: 1.7; margin: 0; }
.highlight pre { background: none; border: 0; padding: 0; border-radius: 0; overflow-x: visible; }
.highlight code, pre code { background: none; border: none; padding: 0; font-size: inherit; color: inherit; }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: .84rem; margin-top: var(--s-2); text-align: center; line-height: 1.5; }
.block { margin-bottom: var(--s-5); }
.block:last-child { margin-bottom: 0; }
.tnum, table td, .hp-time, .wt-ch-time, .wt-dur { font-variant-numeric: tabular-nums; }

/* ---- page meta + actions ---- */
.page-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 var(--s-6); }
.meta-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 560; color: var(--muted);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-full); padding: 4px 11px 4px 9px; }
.meta-chip::before { content: ""; width: 13px; height: 13px; background: currentColor; opacity: .8;
  -webkit-mask: var(--ico) center/contain no-repeat; mask: var(--ico) center/contain no-repeat; }
.meta-audience { --ico: var(--ico-user); }
.meta-time { --ico: var(--ico-clock); }
.meta-difficulty { --ico: var(--ico-signal); text-transform: capitalize; }
.page-actions { margin-left: auto; display: inline-flex; gap: 6px; flex: 0 0 auto; }
.page-copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: .78rem; font-weight: 560; cursor: pointer;
  transition: border-color var(--dur-1), color var(--dur-1); }
.page-copy::before { content: ""; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: var(--ico-copy) center/contain no-repeat; mask: var(--ico-copy) center/contain no-repeat; }
.page-copy:hover { border-color: var(--border-strong); color: var(--heading); }

/* ---- prerequisites + expected result ---- */
.prereqs, .result { border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4) var(--s-3); margin: 0 0 var(--s-6); background: var(--surface-2); }
.prereqs-title, .result-title { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 640; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.prereqs ul { margin: 0; padding-left: 1.2em; }
.prereqs li { margin: 3px 0; }
.result { background: color-mix(in srgb, var(--c-ok) 6%, var(--bg)); border-color: color-mix(in srgb, var(--c-ok) 24%, var(--bg)); margin-top: var(--s-8); }
.result-title { color: var(--c-ok); }
.result-title::before { content: ""; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: var(--ico-check) center/contain no-repeat; mask: var(--ico-check) center/contain no-repeat; }
.result p { margin: 0; }

/* ---- on this page ---- */
.toc-inline { display: none; margin: 0 0 var(--s-6); border: 1px solid var(--border); border-radius: var(--r-md); padding: 2px var(--s-3); background: var(--surface-2); }
.toc-inline summary { cursor: pointer; font-weight: 600; font-size: .9rem; padding: var(--s-2) 0; color: var(--heading); }
.toc-inline ul, .toc-rail ul { list-style: none; margin: 0; padding: 0; }
.toc-inline li { margin: 2px 0; }
.toc-inline a { color: var(--muted); font-size: .88rem; display: block; padding: 3px 0; }
.toc-rail { position: sticky; top: calc(var(--top-h) + var(--s-10)); align-self: start;
  max-height: calc(100vh - var(--top-h) - var(--s-12)); overflow: auto; font-size: .84rem; }
.toc-rail-title { font-size: .72rem; font-weight: 640; letter-spacing: .07em;
  text-transform: uppercase; color: var(--faint); margin-bottom: var(--s-2); }
.toc-rail ul { border-left: 1px solid var(--border); }
.toc-rail li { margin: 0; }
.toc-rail a { display: block; color: var(--muted); padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; line-height: 1.4;
  transition: color var(--dur-1), border-color var(--dur-1); }
.toc-rail .lvl-3 a, .toc-inline .lvl-3 a { padding-left: 26px; font-size: .8rem; }
.toc-rail a:hover { color: var(--heading); text-decoration: none; }
.toc-rail a.toc-active { color: var(--accent-text); border-left-color: var(--accent); font-weight: 560; }

/* ---- callouts (W-5): one hue per kind, icon + label ---- */
.callout { --c: var(--c-note); display: flex; gap: 12px; border: 1px solid color-mix(in srgb, var(--c) 24%, var(--bg));
  background: color-mix(in srgb, var(--c) 6%, var(--bg)); border-radius: var(--r-md);
  padding: 14px 16px; margin: 0 0 var(--s-5); }
.callout-icon { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; background: var(--c);
  -webkit-mask: var(--ico) center/contain no-repeat; mask: var(--ico) center/contain no-repeat; }
.callout-main { min-width: 0; }
.callout-label { font-weight: 640; font-size: .9rem; color: color-mix(in srgb, var(--c) 82%, var(--heading)); margin-bottom: 2px; }
.callout-body { font-size: .95rem; }
.callout-body :last-child { margin-bottom: 0; }
.callout-warning { --c: var(--c-warning); --ico: var(--ico-warning); }
.callout-note { --c: var(--c-note); --ico: var(--ico-info); }
.callout-tip { --c: var(--c-tip); --ico: var(--ico-bulb); }
.callout-permission { --c: var(--c-permission); --ico: var(--ico-lock); }

/* ---- numbered steps (P-4 / P-5) ---- */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 var(--s-5); }
ol.steps > li.step { counter-increment: step; position: relative; padding: 0 0 var(--s-5) 48px; margin: 0; }
ol.steps > li.step:last-child { padding-bottom: 0; }
ol.steps > li.step::before { content: counter(step); position: absolute; left: 0; top: -1px; z-index: 1;
  width: 28px; height: 28px; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-size: .82rem; font-weight: 680; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 4px var(--bg); transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2); }
ol.steps > li.step:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px;
  width: 2px; border-radius: 2px; background: var(--border); }
.step-do { font-weight: 540; color: var(--heading); line-height: 1.55; padding-top: 1px; }
.step-after { margin-top: 5px; color: var(--muted); font-size: .92rem; line-height: 1.5; position: relative; padding-left: 20px; }
.step-after::before { content: ""; position: absolute; left: 0; top: .3em; width: 13px; height: 13px; background: var(--accent-text); opacity: .75;
  -webkit-mask: var(--ico-arrow-turn) center/contain no-repeat; mask: var(--ico-arrow-turn) center/contain no-repeat; }
.step-advanced .step-do::after { content: "advanced"; font-size: .64rem; font-weight: 680; letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft);
  padding: 1px 7px; border-radius: var(--r-full); margin-left: var(--s-2); vertical-align: 2px; }
/* synced with a walkthrough: each step can play its chapter */
.step-play { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; vertical-align: 1px;
  height: 26px; min-width: 26px; padding: 0 9px 0 6px; border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums;
  transition: color var(--dur-1), border-color var(--dur-1), background var(--dur-1); }
.step-play svg { width: 12px; height: 12px; }
.step-play:hover { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
ol.steps > li.step.wt-active::before { transform: scale(1.12); box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px color-mix(in srgb, var(--accent) 30%, transparent); }
li.step.wt-active .step-do { color: var(--accent-text); }
li.step.wt-active .step-play { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---- reference cards (menus / dropdowns / dialogs) ---- */
.ref-card { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-3) var(--s-4);
  margin: 0 0 var(--s-5); background: var(--surface); box-shadow: var(--shadow-1); }
.ref-head { font-size: .75rem; font-weight: 640; letter-spacing: .05em; text-transform: uppercase;
  color: var(--faint); margin-bottom: var(--s-2); display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.ref-head strong { text-transform: none; letter-spacing: 0; font-size: .92rem; }
.ref-sub { font-weight: 620; margin: var(--s-2) 0 var(--s-1); color: var(--heading); }
.ref-note { color: var(--muted); font-size: .92rem; margin: var(--s-2) 0 0; }
.badge { font-size: .66rem; font-weight: 680; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-text); background: var(--accent-soft); padding: 2px 8px; border-radius: var(--r-full); }
.menu-path { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .9rem; }
.menu-step { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px 10px; font-weight: 560; color: var(--heading); }
.menu-path .sep { color: var(--faint); }
.ref-default { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
.opt-list { list-style: none; padding: 0; margin: 0; }
.opt-list li { padding: 7px 0; border-bottom: 1px solid var(--border); margin: 0; }
.opt-list li:last-child { border-bottom: none; }
.opt-desc { color: var(--muted); margin-left: 6px; }

/* ---- showcase: live HTML example ---- */
.showcase { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  margin: 0 0 var(--s-5); background: var(--surface); box-shadow: var(--shadow-2); }
.sc-head { display: flex; align-items: center; gap: var(--s-3); padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface-2); }
.sc-title { font-size: .84rem; font-weight: 620; color: var(--muted); }
.sc-tabs { margin-left: auto; display: flex; gap: 2px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 2px; }
.sc-tab { border: 0; background: none; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 560;
  color: var(--muted); padding: 3px 10px; border-radius: 6px; transition: background var(--dur-1) var(--ease), color var(--dur-1); }
.sc-tab:hover { color: var(--heading); }
.sc-tab.active { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-1); }
.sc-preview { background: #fff; }
.sc-frame { width: 100%; border: 0; display: block; background: #fff; }
.sc-code { margin: 0; }
.sc-code .highlight, .sc-code pre { border: 0; border-radius: 0; margin: 0; max-height: 460px; }
.showcase figcaption { padding: var(--s-2) var(--s-3); border-top: 1px solid var(--border); margin: 0; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; margin: 0 0 var(--s-5); border: 1px solid var(--border); border-radius: var(--r-md); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
caption { color: var(--muted); font-size: .84rem; padding: var(--s-2) var(--s-3); text-align: left; caption-side: bottom; border-top: 1px solid var(--border); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
thead th { font-size: .76rem; font-weight: 640; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tbody tr { transition: background var(--dur-1); }
tbody tr:hover { background: color-mix(in srgb, var(--heading) 2.5%, transparent); }
td:first-child { color: var(--heading); font-weight: 520; }
.dialog-fields { margin: var(--s-2) 0; border: 1px solid var(--border); border-radius: var(--r-sm); }

/* ---- images, annotations, screenshot framing ---- */
.doc-image img, .hotspot img { border: 1px solid var(--border); border-radius: var(--r-md);
  margin: 0 auto; box-shadow: var(--shadow-2); height: auto; background: var(--surface); }
.img-zoom { display: block; border: 0; background: none; padding: 0; margin: 0 auto;
  cursor: zoom-in; max-width: 100%; border-radius: var(--r-md); }
.img-zoom img { transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2); }
.img-zoom:hover img { box-shadow: var(--shadow-3); }
.annotations { counter-reset: ann; list-style: none; padding: 0; margin: var(--s-3) 0 0; }
.annotations li { counter-increment: ann; position: relative; padding: 3px 8px 3px 34px; margin: 3px 0; color: var(--text); font-size: .92rem; border-radius: var(--r-sm); }
.annotations li::before { content: counter(ann); position: absolute; left: 6px; top: 4px; width: 20px; height: 20px;
  border-radius: var(--r-full); background: var(--pin); color: #fff; display: grid; place-items: center; font-size: .7rem; font-weight: 700; }
.hs-legend li { cursor: default; transition: background var(--dur-1); }
.hs-legend li:hover, .hs-legend li:focus-visible { background: color-mix(in srgb, var(--pin) 8%, transparent); }
.lightbox { position: fixed; inset: 0; z-index: 160; background: rgba(6,8,12,.86); backdrop-filter: blur(4px);
  display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; width: auto; height: auto;
  border-radius: var(--r-md); box-shadow: var(--shadow-3); }
.lightbox.lb-anim img { animation: lb-in var(--dur-2) var(--ease); }
@keyframes lb-in { from { transform: scale(.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lb-close { position: absolute; top: var(--s-3); right: var(--s-4); width: 40px; height: 40px;
  border: 0; border-radius: var(--r-full); background: rgba(255,255,255,.14); color: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer; }
.lb-close:hover { background: rgba(255,255,255,.26); }

/* hotspot: numbered pins over a screenshot + legend (kickoff V-2) */
.hs-stage { position: relative; display: block; width: fit-content; max-width: 100%; margin: 0 auto; }
.hs-pin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px;
  border-radius: var(--r-full); background: var(--pin); color: #fff; display: grid; place-items: center;
  font-size: .76rem; font-weight: 700; box-shadow: 0 0 0 2.5px #fff, 0 4px 10px rgba(0,0,0,.25);
  transition: transform var(--dur-2) var(--ease); }
.hs-pin.hs-on { transform: translate(-50%, -50%) scale(1.25); }
.hs-legend { margin-top: var(--s-3); }

/* before / after compare */
.cmp-stage { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.cmp-stage img { display: block; width: 100%; height: auto; }
.cmp-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #fff; transform: translateX(-1px);
  box-shadow: 0 0 0 1px rgba(0,0,0,.18); pointer-events: none; }
.cmp-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%);
  border-radius: var(--r-full); background: #fff; box-shadow: var(--shadow-2);
  background-image: var(--ico-drag); background-size: 18px; background-repeat: no-repeat; background-position: center; }
.cmp-label { position: absolute; top: 10px; font-size: .72rem; font-weight: 650; color: #fff; background: rgba(12,15,20,.62);
  padding: 3px 9px; border-radius: var(--r-full); pointer-events: none; backdrop-filter: blur(4px); }
.cmp-l { left: 10px; } .cmp-r { right: 10px; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cmp-range:focus-visible + * , .cmp-stage:focus-within { outline: 2px solid var(--focus-ring, var(--accent)); outline-offset: 2px; }

/* editorial art: approved image, or the palette gradient that holds its place */
.art-slot { display: block; width: 100%; border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 18% 12%, color-mix(in srgb, var(--accent) 30%, var(--bg)) 0%, transparent 58%),
    radial-gradient(90% 80% at 88% 92%, color-mix(in srgb, var(--accent) 16%, var(--bg-soft)) 0%, transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--bg-soft)), color-mix(in srgb, var(--accent) 4%, var(--bg))); }
.doc-illustration img, .doc-illustration .art-slot { border-radius: var(--r-lg); width: 100%; height: auto; border: 1px solid var(--border); }

/* ---- walkthrough player ---- */
.walkthrough { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
  box-shadow: var(--shadow-2); padding: 10px; margin: 0 0 var(--s-6); }
.wt-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; }
.wt-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 680; letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); padding: 3px 9px; border-radius: var(--r-full); }
.wt-kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.wt-title { font-weight: 620; color: var(--heading); font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-dur { color: var(--faint); font-size: .8rem; margin-left: auto; }
.wt-rate, .wt-theater { display: inline-grid; place-items: center; height: 28px; min-width: 34px; padding: 0 8px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: .76rem; font-weight: 640; cursor: pointer;
  font-variant-numeric: tabular-nums; transition: color var(--dur-1), border-color var(--dur-1); }
.wt-rate:hover, .wt-theater:hover { color: var(--heading); border-color: var(--border-strong); }
.wt-stage { position: relative; border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.wt-stage video { width: 100%; height: 100%; display: block; object-fit: cover; background: var(--bg-soft); }
.wt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%;
  border: 0; cursor: pointer; display: grid; place-items: center; color: #fff;
  background: color-mix(in srgb, var(--accent) 88%, #000); box-shadow: 0 10px 30px -6px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 0 0 1px rgba(255,255,255,.2);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2); }
.wt-play svg { width: 30px; height: 30px; margin-left: 4px; }
.wt-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.wt-started .wt-play { display: none; }
.wt-loop .wt-stage video { cursor: default; }
.walkthrough.wt-portrait { max-width: 400px; }
.wt-portrait .doc .wt-chapters, .wt-portrait .wt-chapters { grid-template-columns: 1fr; }
.wt-portrait .wt-head { flex-wrap: wrap; row-gap: 6px; }
.wt-portrait .wt-title { order: 3; flex-basis: 100%; white-space: normal; }
.wt-still .wt-play { display: grid; }
.wt-toggle { display: inline-grid; place-items: center; height: 28px; min-width: 56px; padding: 0 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: .76rem; font-weight: 640; cursor: pointer; }
.wt-toggle:hover { color: var(--heading); border-color: var(--border-strong); }
.wt-toggle[aria-pressed="false"] .wt-toggle-play, .wt-toggle[aria-pressed="true"] .wt-toggle-pause { display: none; }
.doc .wt-chapters, .wt-chapters { list-style: none; margin: 10px 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 6px; }
.doc .wt-chapters li { margin: 0; }
.wt-ch { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%;
  text-align: left; border: 1px solid transparent; border-radius: var(--r-sm); background: var(--bg-soft); color: var(--text);
  font: inherit; font-size: .86rem; padding: 8px 10px 10px; cursor: pointer; overflow: hidden;
  transition: background var(--dur-1), border-color var(--dur-1); }
.wt-ch:hover { border-color: var(--border-strong); }
.wt-num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700;
  background: var(--surface); color: var(--muted); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.wt-ch-title { min-width: 0; line-height: 1.35; font-weight: 540; color: var(--heading); }
.wt-ch-time { color: var(--faint); font-size: .74rem; }
.wt-ch-bar { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--heading) 7%, transparent); }
.wt-ch-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: var(--accent); }
.wt-ch.active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.wt-ch.active .wt-num { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.walkthrough figcaption { margin: 10px 4px 2px; text-align: left; }
.wt-missing { border: 1px dashed var(--border-strong); border-radius: var(--r-md); padding: var(--s-4); color: var(--muted); text-align: center; }
/* theater: the video fills the screen; chapters stay underneath */
.walkthrough.wt-theater-on { position: fixed; inset: 0; z-index: 170; margin: 0; border: 0; border-radius: 0; padding: 3vh 4vw;
  background: rgba(6,8,12,.92); display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: none; }
.wt-theater-on .wt-head, .wt-theater-on .wt-stage, .wt-theater-on .wt-chapters { width: min(92vw, calc(78vh * 16 / 9)); }
.wt-theater-on .wt-head .wt-title, .wt-theater-on .wt-dur { color: #e8ecf1; }
.wt-theater-on .wt-ch { background: rgba(255,255,255,.06); color: #d8dee6; }
.wt-theater-on .wt-ch-title { color: #eef1f5; }
.wt-theater-on figcaption { display: none; }

/* ---- definitions ---- */
.definitions dt { font-weight: 640; color: var(--heading); }
.definitions dd { margin: 3px 0 var(--s-4); color: var(--muted); }

/* ---- troubleshooting + related ---- */
.troubleshooting .trouble { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3); background: var(--surface); }
.trouble-symptom { font-weight: 620; color: var(--heading); margin-bottom: var(--s-2); }
.trouble-error { margin: 0 0 var(--s-2); }
.trouble-error code { display: block; white-space: pre-wrap; word-break: break-word; font-size: .82rem; padding: 6px 10px;
  border-color: color-mix(in srgb, var(--c-warning) 28%, var(--border)); }
.trouble-row { display: grid; grid-template-columns: 76px 1fr; gap: var(--s-2); margin: 4px 0; align-items: baseline; font-size: .94rem; }
.trouble-tag { font-size: .68rem; font-weight: 680; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.related { margin-top: var(--s-10); }
.related-title { font-size: .72rem; font-weight: 640; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin-bottom: var(--s-2); }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.related li { margin: 0; }
.related a { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--heading); font-size: .9rem; font-weight: 540; transition: border-color var(--dur-1), background var(--dur-1); }
.related a::after { content: "\2192"; color: var(--faint); transition: transform var(--dur-1), color var(--dur-1); }
.related a:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); text-decoration: none; }
.related a:hover::after { color: var(--accent-text); transform: translateX(2px); }

.page-footer { margin-top: var(--s-10); padding-top: var(--s-4); border-top: 1px solid var(--border); display: flex; gap: var(--s-4); flex-wrap: wrap; color: var(--faint); font-size: .82rem; }
.page-footer .gen { margin-left: auto; }

.nav-scrim { position: fixed; inset: var(--top-h) 0 0 0; background: rgba(8,12,20,.45); z-index: 90; }

/* ---- header search hint + Ctrl+K modal ---- */
.search-kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: inline-flex; gap: 2px;
  font-family: var(--mono); font-size: .66rem; font-weight: 600; color: var(--faint); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; pointer-events: none; }
.search-modal { position: fixed; inset: 0; z-index: 150; background: rgba(8,12,20,.42); backdrop-filter: blur(3px);
  display: grid; justify-items: center; align-items: start; padding-top: 12vh; }
.search-modal[hidden], .lightbox[hidden] { display: none; }
.sm-panel { width: min(600px, 92vw); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; animation: sm-in var(--dur-2) var(--ease); }
@keyframes sm-in { from { transform: translateY(-6px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.sm-panel input { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: var(--surface);
  color: var(--heading); font: inherit; font-size: 1.05rem; padding: 18px 20px; outline: none; }
.sm-panel input::placeholder { color: var(--faint); }
.sm-results { max-height: 52vh; overflow: auto; padding: 6px; }
.sm-results:empty { display: none; }
.sm-hint { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--border); background: var(--surface-2);
  color: var(--faint); font-size: .76rem; }

/* ---- checklist ---- */
.checklist { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); background: var(--surface-2); }
.ck-title { font-weight: 620; color: var(--heading); margin-bottom: var(--s-2); }
.ck-items { list-style: none; counter-reset: ck; margin: 0; padding: 0; }
.doc .ck-items li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; margin: 0; border-bottom: 1px solid var(--border); }
.doc .ck-items li:last-child { border-bottom: 0; }
.ck-items input[type="checkbox"] { accent-color: var(--accent); width: 17px; height: 17px; flex: 0 0 auto; margin: 3px 0 0; cursor: pointer; }
.ck-items label { cursor: pointer; }
.ck-items input:checked + label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.ck-progress { margin-top: var(--s-2); color: var(--faint); font-size: .8rem; font-variant-numeric: tabular-nums; }

/* ---- content tabs (role / OS variants) ---- */
.tabs { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.tab-list { display: flex; gap: 2px; padding: 6px; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab-btn { border: 0; background: none; cursor: pointer; font: inherit; font-size: .86rem; border-radius: 7px;
  font-weight: 560; color: var(--muted); padding: 6px 12px; transition: color var(--dur-1) var(--ease), background var(--dur-1); }
.tab-btn:hover { color: var(--heading); background: color-mix(in srgb, var(--heading) 4%, transparent); }
.tab-btn.active { color: var(--heading); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--border); }
.tab-pane { padding: var(--s-4); }
.tab-pane[hidden] { padding: 0; }
.tab-pane > .block:last-child { margin-bottom: 0; }

/* ---- code-block chrome ---- */
.doc-code { position: relative; }
.code-chrome { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-2);
  position: absolute; top: 0; left: 0; right: 0; padding: 8px 10px; pointer-events: none; }
.code-filename { margin-right: auto; pointer-events: auto; font-family: var(--mono); font-size: .74rem;
  color: var(--muted); }
.code-copy { pointer-events: auto; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--muted); font: inherit; font-size: .72rem; font-weight: 600;
  min-height: 28px; padding: 4px 10px; cursor: pointer; opacity: 0; transition: opacity var(--dur-1) var(--ease), color var(--dur-1); }
@media (hover: none) { .code-copy { opacity: 1; } }
.doc-code:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
.code-copy:hover { color: var(--heading); border-color: var(--border-strong); }
.doc-code:has(.code-filename) > .highlight, .doc-code:has(.code-filename) > pre { padding-top: 44px; }
.doc-code:has(.code-filename)::before { content: ""; position: absolute; left: 1px; right: 1px; top: 1px; height: 34px;
  border-bottom: 1px solid var(--border); border-radius: var(--r-md) var(--r-md) 0 0; background: color-mix(in srgb, var(--heading) 2.5%, transparent); pointer-events: none; }
.highlight .hll { display: block; margin: 0 calc(-1 * var(--s-4)); padding: 0 var(--s-4); }

/* ---- heading anchor links ---- */
.h-anchor { margin-left: var(--s-2); color: var(--faint); font-weight: 400; text-decoration: none;
  opacity: 0; transition: opacity var(--dur-1) var(--ease); }
h2:hover .h-anchor, h3:hover .h-anchor, h4:hover .h-anchor, .h-anchor:focus-visible { opacity: 1; }
.h-anchor:hover { color: var(--accent-text); text-decoration: none; }

/* ---- hub landing ---- */
.doc.intent-reference { max-width: var(--wide); }
.doc.intent-hub { max-width: 980px; }
.doc.intent-hub > .hub-popular, .doc.intent-hub > .hub-cards, .doc.intent-hub > .hub-hero { max-width: none; }
.hub-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .75fr); gap: var(--s-6); align-items: center;
  padding: var(--s-6) var(--s-8); margin: 0 0 var(--s-8); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 60%),
    radial-gradient(60% 90% at 100% 100%, color-mix(in srgb, var(--accent) 9%, transparent) 0%, transparent 65%),
    var(--surface-2); }
.hub-hero.no-art { grid-template-columns: minmax(0, 1fr); }
.hub-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 680; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: var(--s-2); }
.hub-eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent); }
.hub-hero h1 { font-size: clamp(1.85rem, 2.6vw, 2.3rem); letter-spacing: -.028em; margin-bottom: var(--s-2); }
.hub-hero .summary { font-size: 1.06rem; max-width: 34em; margin-bottom: var(--s-4); }
.hub-art { justify-self: end; width: 100%; max-width: 320px; }
.hub-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px; font: inherit;
  font-size: .92rem; font-weight: 620; cursor: pointer; border: 1px solid transparent; text-decoration: none; transition: transform var(--dur-1), box-shadow var(--dur-1), background var(--dur-1), border-color var(--dur-1); }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary::after { content: "\2192"; }
.btn-ghost { background: var(--surface); color: var(--heading); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-ghost kbd { font-size: .68rem; }
.hub-art img, .hub-art .art-slot { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow-3); border: 1px solid var(--border); }
.hub-title, .hub-card-title { font-size: .74rem; font-weight: 660; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin-bottom: var(--s-3); }
.hub-popular { margin: 0 0 var(--s-8); }
.doc .hub-popular-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.doc .hub-popular-list > li { margin: 0; }
.hub-popular-list a { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px 16px;
  border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); background: var(--surface);
  transition: border-color var(--dur-1), box-shadow var(--dur-2), transform var(--dur-2) var(--ease); }
.hub-popular-list a:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); text-decoration: none; box-shadow: var(--shadow-2); transform: translateY(-1px); }
.hub-popular-list .hp-title { font-weight: 620; color: var(--heading); line-height: 1.35; padding-right: 22px; }
.hub-popular-list .hp-sum { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.hub-popular-list .hp-time { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: .76rem; font-weight: 560; margin-top: auto; }
.hub-popular-list .hp-time::before { content: ""; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: var(--ico-clock) center/contain no-repeat; mask: var(--ico-clock) center/contain no-repeat; }
.hub-popular-list a::after { content: "\2192"; position: absolute; right: 16px; top: 15px; color: var(--faint); transition: transform var(--dur-1), color var(--dur-1); }
.hub-popular-list a:hover::after { color: var(--accent-text); transform: translateX(2px); }
.hub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: var(--s-10) 0 0; }
.hub-card { border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; background: var(--surface); }
.hub-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hub-card-icon { width: 44px; height: 44px; flex: 0 0 44px; object-fit: contain; }
.hub-card-name { font-weight: 640; color: var(--heading); }
.hub-card-count { color: var(--faint); font-size: .78rem; }
.hub-card ul { list-style: none; margin: 0; padding: 0; }
.doc .hub-card li { margin: 0; border-top: 1px solid var(--border); }
.hub-card li a { display: block; padding: 8px 0; color: var(--text); font-size: .9rem; font-weight: 500; }
.hub-card li a:hover { color: var(--accent-text); text-decoration: none; }

/* ---- prev / next pager ---- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: var(--s-10); }
.pager a { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text);
  transition: border-color var(--dur-1), box-shadow var(--dur-2); }
.pager a:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); text-decoration: none; box-shadow: var(--shadow-1); }
.pager-next { text-align: right; grid-column: 2; }
.pager-label { font-size: .74rem; font-weight: 560; color: var(--faint); }
.pager-prev .pager-label::before { content: "\2190  "; }
.pager-next .pager-label::after { content: "  \2192"; }
.pager-title { font-weight: 620; font-size: .95rem; color: var(--heading); }

/* ---- was this helpful ---- */
.feedback { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  margin-top: var(--s-8); padding: 12px 16px; border: 1px solid var(--border);
  border-radius: var(--r-md); background: var(--surface-2); font-size: .9rem; }
.fb-q { font-weight: 600; color: var(--heading); margin-right: 4px; }
.fb-btn { border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface);
  color: var(--text); font: inherit; font-size: .84rem; font-weight: 600; padding: 4px 14px; cursor: pointer; text-decoration: none; }
.fb-btn:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; }
.fb-thanks { color: var(--muted); }

/* ---- glossary term tooltips ---- */
a.gloss { position: relative; color: inherit; font-weight: inherit;
  text-decoration: underline dotted var(--faint); text-underline-offset: 3px; }
a.gloss:hover, a.gloss:focus-visible { text-decoration-color: var(--accent); }
a.gloss::after { content: attr(data-def); position: absolute; left: 0; bottom: calc(100% + 8px);
  width: max-content; max-width: min(300px, calc(100vw - 40px)); display: none; background: var(--heading); color: var(--bg);
  font-size: .8rem; font-weight: 450; line-height: 1.45; padding: 8px 11px;
  border-radius: var(--r-sm); box-shadow: var(--shadow-3); opacity: 0; visibility: hidden; transform: translateY(2px);
  transition: opacity var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); z-index: 50; pointer-events: none; }
a.gloss:hover::after, a.gloss:focus-visible::after { display: block; opacity: 1; visibility: visible; transform: none; }

/* ---- icons (SVG masks; one source, colored by currentColor/--c) ---- */
:root {
  --ico-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --ico-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
  --ico-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 16v-4.5M12 8h.01'/%3E%3C/svg%3E");
  --ico-bulb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4'/%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.2 1 2V17h6v-.3c0-.8.4-1.5 1-2A7 7 0 0 0 12 2z'/%3E%3C/svg%3E");
  --ico-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10.5' rx='2.5'/%3E%3Cpath d='M8 10.5V7a4 4 0 0 1 8 0v3.5'/%3E%3C/svg%3E");
  --ico-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m8 12.5 2.7 2.7L16.2 9.5'/%3E%3C/svg%3E");
  --ico-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  --ico-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
  --ico-signal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M5 20v-4M12 20v-9M19 20V5'/%3E%3C/svg%3E");
  --ico-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='13' height='13' rx='2.5'/%3E%3Cpath d='M16 8V5.5A2.5 2.5 0 0 0 13.5 3h-8A2.5 2.5 0 0 0 3 5.5v8A2.5 2.5 0 0 0 5.5 16H8'/%3E%3C/svg%3E");
  --ico-arrow-turn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4v7a4 4 0 0 0 4 4h10'/%3E%3Cpath d='m15 11 4 4-4 4'/%3E%3C/svg%3E");
  --ico-drag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E");
}

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .content { grid-template-columns: minmax(0, 1fr) !important; padding: var(--s-8) var(--s-8) var(--s-12); }
  .toc-rail { display: none; }
  .toc-inline { display: block; }
}
@media (max-width: 996px) {
  .nav-toggle { display: inline-grid; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; top: var(--top-h); left: 0; bottom: 0; width: 290px; z-index: 95;
    transform: translateX(-100%); transition: transform var(--dur-2) var(--ease); box-shadow: var(--shadow-3); }
  .sidebar.open { transform: translateX(0); }
  .nav-mobile-head { display: flex; min-height: 56px; align-items: center; justify-content: space-between;
    gap: var(--s-3); padding: 6px var(--s-3); margin: calc(-1 * var(--s-6)) calc(-1 * var(--s-4)) var(--s-4); border-bottom: 1px solid var(--border); }
  .nav-close { min-width: 64px; min-height: 44px; border: 1px solid var(--border); border-radius: var(--r-sm);
    background: var(--surface); color: var(--text); font: inherit; font-weight: 620; cursor: pointer; }
  .search-kbd { display: none; }
  .hub-hero { grid-template-columns: minmax(0, 1fr); padding: var(--s-6); }
}
@media (max-width: 860px) {
  .content { padding: var(--s-6) var(--s-4) var(--s-12); }
  .doc h1 { font-size: 1.85rem; }
  .doc h2 { font-size: 1.32rem; margin-top: var(--s-10); }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
}
@media (max-width: 560px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar .icon-btn { flex: 0 0 44px; width: 44px; height: 44px; }
  .brand { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
  /* a long doc name wraps to two lines instead of losing its last word */
  .brand > span:last-child { white-space: normal; line-height: 1.15; overflow: hidden;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .searchbox { display: none; }
  .search-trigger { display: inline-grid; margin-left: auto; }
  .hub-hero { padding: var(--s-5) var(--s-4); border-radius: var(--r-lg); }
  .walkthrough { padding: 6px; border-radius: var(--r-md); }
  .wt-head { flex-wrap: wrap; row-gap: 6px; }
  .wt-title { order: 3; flex-basis: 100%; white-space: normal; }
  .wt-play { width: 60px; height: 60px; }
  .doc .wt-chapters, .wt-chapters { grid-template-columns: 1fr; }
  ol.steps > li.step { padding-left: 42px; }
  .trouble-row { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ---- accessibility: visible focus (WCAG 2.2, >=2px, >=3:1) ---- */
:focus-visible { outline: 2px solid var(--focus-ring, var(--accent)); outline-offset: 2px; border-radius: var(--r-xs); }
.searchbox input:focus-visible, .sm-panel input:focus-visible { outline: none; }
@media print {
  .topbar, .sidebar, .toc-rail, .toc-inline, .nav-scrim, .related, .pager, .feedback, .page-actions,
  .wt-play, .wt-rate, .wt-theater, .step-play, .code-copy { display: none !important; }
  .layout, .content { display: block; padding: 0; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .doc, .doc > * { max-width: none !important; }
  a { color: #000; text-decoration: underline; }
  .walkthrough, .showcase, .tabs, .callout, .ref-card, img { break-inside: avoid; box-shadow: none; }
  .tab-pane[hidden] { display: block !important; content-visibility: visible !important; padding: var(--s-4) !important; }
  .tab-pane::before { content: attr(data-label); display: block; font-weight: 700; margin-bottom: 6px; }
  .tab-list { display: none; }
  details { display: block; }
}

/* keyboard hints mean nothing without a keyboard */
@media (max-width: 560px), (hover: none) and (pointer: coarse) {
  .search-open .keys, .sm-hint { display: none; }
}

/* ---- findings: review problems / strengths as scannable cards ---- */
.findings { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); margin: 0 0 var(--s-6); max-width: var(--wide); }
.fd-why { margin: 0 0 var(--s-3); font-size: 1.02rem; font-weight: 600; line-height: 1.5; color: var(--heading); }
.doc .fd-summary { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 var(--s-1); }
.doc .fd-summary > li { margin: 0; }
.fd-sum { --c: var(--muted); display: inline-flex; align-items: baseline; gap: 6px; font-size: .88rem; font-weight: 560;
  color: color-mix(in srgb, var(--c) 80%, var(--heading)); border: 1px solid color-mix(in srgb, var(--c) 28%, var(--bg));
  background: color-mix(in srgb, var(--c) 7%, var(--bg)); border-radius: var(--r-full); padding: 4px 12px; }
.fd-n { font-weight: 720; font-variant-numeric: tabular-nums; min-width: 1.5em; text-align: center; border-radius: var(--r-full);
  background: color-mix(in srgb, var(--c) 16%, var(--bg)); padding: 0 6px; }
.finding { --c: var(--muted); border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: var(--r-md);
  background: var(--surface); padding: var(--s-4) var(--s-5); scroll-margin-top: 80px; }
.fd-purchase { --c: var(--c-danger); } .fd-time { --c: var(--c-warning); } .fd-trust { --c: var(--c-permission); }
.fd-hidden { --c: var(--c-note); } .fd-good { --c: var(--c-ok); }
.fd-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: var(--s-3); }
.fd-chip { font-size: .74rem; font-weight: 680; letter-spacing: .04em; text-transform: uppercase;
  color: color-mix(in srgb, var(--c) 85%, var(--heading)); background: color-mix(in srgb, var(--c) 10%, var(--bg));
  border-radius: var(--r-full); padding: 2px 10px; }
.doc .fd-title { font-size: 1.08rem; line-height: 1.35; margin: 0; }
.fd-fields { display: grid; gap: 10px; margin: 0; }
.fd-row { display: grid; grid-template-columns: 11rem 1fr; gap: 12px; }
.fd-row dt { font-size: .86rem; font-weight: 640; color: var(--muted); }
.fd-row dd { margin: 0; }
.fd-row dd :last-child { margin-bottom: 0; }
@media (max-width: 560px) {
  .finding { padding: var(--s-4); }
  .fd-row { grid-template-columns: 1fr; gap: 2px; }
}
.fd-dev { margin-top: var(--s-3); border-top: 1px solid var(--border); padding-top: var(--s-2); }
.fd-dev > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 32px;
  font-size: .86rem; font-weight: 640; color: var(--muted); border-radius: var(--r-sm); }
.fd-dev > summary::-webkit-details-marker { display: none; }
.fd-dev > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform var(--dur-1) var(--ease); margin: 0 2px; }
.fd-dev[open] > summary::before { transform: rotate(45deg); }
.fd-dev > summary:hover { color: var(--heading); }
.fd-dev > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fd-dev-body { margin-top: var(--s-2); font-size: .93rem; }
.fd-dev-body > :last-child { margin-bottom: 0; }
.fd-dev-body pre, .fd-dev-body .highlight { font-size: .82rem; }
.fd-dev-body :not(pre) > code { overflow-wrap: anywhere; }
.fd-dev-body table { display: block; overflow-x: auto; max-width: 100%; }
@media print { .finding { break-inside: avoid; } }

/* ---- link back to a parent site (doc sets inside a bundle) ---- */
.nav-home { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 var(--s-4) 10px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.nav-home:hover { color: var(--accent-text); text-decoration: none; }
