/*
 * GENERATED by scripts/tokens-subset.mjs from config/app-tokens.css (the web app's
 * tokens.css, copied unchanged). Do not edit: change the web app's tokens,
 * copy them to config/app-tokens.css and run the script again.
 *
 * Token names and values are the web app's. Only the tokens the docs use are
 * kept. Left out for the device floor (Chrome 64, Safari 12), so these draw
 * nothing on the docs: --shadow-glow.
 * The fluid heading sizes use the app's em steps (no min()/max()).
 * Docs roles (--docs-*) live in docs-tokens.css.
 */

:root {
  --vh-full: 100vh;
  --brand-oxblood: #5a3fe0;
  --brand-oxblood-deep: #4429c4;
  --brand-bone: #f5f4fb;
  --brand-carbon: #1d1a3a;
  --brand-sun: #ffd84d;
  --brand-violet-soft: #ebe6ff;
  --cl-violet: #463a8c;
  --cl-green: #3f5a4c;
  --cl-navy: #2f4058;
  --cl-plum: #6b3a5a;
  --cover-foil: #f6efe0;
  --cover-label-ink: #2a2440;
  --bg-page: var(--brand-bone);
  --bg-raised: #ffffff;
  --bg-sunk: #ecebf7;
  --bg-tint: var(--brand-violet-soft);
  --bg-safety: #fdebee;
  --surface-family: #f3edda;
  --ink-strong: var(--brand-carbon);
  --ink-base: #2c2950;
  --ink-muted: #5d5a7c;
  --ink-safety: #8f1526;
  --copper-ink: #4a2fc9;
  --leaf-ink: #0d6e52;
  --line-soft: rgba(29, 26, 58, 0.1);
  --line-control: #7d7a99;
  --accent: var(--brand-oxblood);
  --accent-deep: var(--brand-oxblood-deep);
  --accent-ink: #ffffff;
  --ink-on-tint: var(--accent-deep);
  --status-error: #c42b3c;
  --status-success: #0d6e52;
  --radius-control: 12px;
  --radius-pill: 999px;
  --radius-cover: 3px 8px 8px 3px;
  --shadow-card: 0 10px 30px -24px rgb(var(--shadow-ink) / 0.7);
  --shadow-ink: 29 26 58;
  --shadow-lift: 0 6px 16px -12px rgb(var(--shadow-ink) / 0.35);
  --shadow-ring-soft-inset: 0 0 0 1px var(--line-soft) inset;
  --shadow-ring-accent: 0 0 0 2px var(--accent);
  --shadow-ring-accent-inset: inset 0 0 0 2px var(--accent);
  --shadow-ring-tint: 0 0 0 3px var(--bg-tint);
  --shadow-focus-double: 0 0 0 2px var(--bg-sunk), 0 0 0 4px var(--accent);
  --shadow-edge-accent: inset 3px 0 0 var(--accent);
  --shadow-underline-accent: inset 0 -3px 0 var(--accent);
  --shadow-underline-sun: 0 2px 0 var(--brand-sun);
  --shadow-rule-below: 0 1px 0 var(--line-soft);
  --notice-warn-bg: #fff4d6;
  --notice-warn-ink: #3b2f00;
  --notice-ok-bg: #e6f4ea;
  --notice-ok-ink: #12331c;
  --fixed-white: #ffffff;
  --brand-sun-soft: #ffe58f;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --font-mono: ui-monospace, monospace;
  --gutter: 1rem;
  --public-content-width: 82.5rem;
  --font-display: "Quicksand", "Andika", system-ui, sans-serif;
  --font-body: "Andika", "Noto Sans", system-ui, sans-serif;
  --font-ui: var(--font-display);
  --fs-2: 0.6875rem;
  --fs-3: 0.75rem;
  --fs-4: 0.8125rem;
  --fs-5: 0.875rem;
  --fs-6: 0.9375rem;
  --fs-8: 1.0625rem;
  --fs-9: 1.125rem;
  --fs-10: 1.1875rem;
  --fs-11: 1.25rem;
  --fs-12: 1.375rem;
  --fs-14: 1.625rem;
  --fs-17: 2rem;
  --fs-fluid-9: var(--fs-17);
  --fs-fluid-10: 2.125rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --surface-selected: #ece7ff;
  --line-divider: #e4e0ed;
  --control-h-secondary: 2rem;
  --control-h-touch: 2.75rem;
  --icon-size: 1rem;
  --icon-size-touch: 1.25rem;
  --z-sticky: 20;
  --z-toast: 90;
  --status-warning-bg: #f4dfd2;
  --status-warning-ink: #703617;
  --status-positive-bg: #e2f3ec;
  --ink-meta: #433f66;
}

@supports (height: 100dvh) {
  :root {
    --vh-full: 100dvh;
  }
}

@media (min-width: 48em) {
  :root {
    --fs-fluid-9: 2.64rem;
  }
}

@media (min-width: 75em) {
  :root {
    --fs-fluid-9: 3.3rem;
    --fs-fluid-10: 2.775rem;
  }
}

@media (min-width: 90em) {
  :root {
    --fs-fluid-10: 3.33rem;
  }
}

@media (pointer: coarse) {
  :root {
    --control-h-secondary: 2.75rem;
  }
}

@media (min-width: 721px) {
  :root {
    --gutter: 2rem;
  }
}

:root[data-theme='dark'] {
  --bg-page: #17152b;
  --bg-raised: #1d1a36;
  --bg-sunk: #2a2648;
  --bg-tint: #2f2a5a;
  --bg-safety: #3a1d28;
  --surface-family: #2a2648;
  --ink-strong: #f1effc;
  --ink-base: #e2dff4;
  --ink-muted: #b3afd0;
  --ink-safety: #ffb3bd;
  --copper-ink: #d6ceff;
  --leaf-ink: #6fdcb3;
  --line-soft: rgba(241, 239, 252, 0.12);
  --line-control: #8f8aab;
  --accent: #b7a8ff;
  --accent-deep: #cfc4ff;
  --accent-ink: #17152b;
  --ink-on-tint: #d6ceff;
  --brand-violet-soft: #2f2a5a;
  --status-error: #ff8f9b;
  --status-success: #6fdcb3;
  --surface-selected: #2f2a5a;
  --line-divider: #38345f;
  --status-positive-bg: #173f33;
  --status-warning-bg: #4a2a18;
  --status-warning-ink: #ffcfb0;
  --ink-meta: var(--ink-muted);
  --shadow-ink: 0 0 0;
  --notice-warn-bg: #3d3310;
  --notice-warn-ink: #ffe28a;
  --notice-ok-bg: #16342b;
  --notice-ok-ink: #b8ecd5;
}

/*
 * Docs portal tokens. The brand tokens come unchanged from the web app (tokens.css, copied).
 * This file only names docs roles and points them at brand tokens, so a rebrand or a new theme
 * is an edit to tokens.css (or to the role mapping here) and never to docs.css.
 * docs.css may use var(--…) only: no colour, font, size, spacing or radius literals.
 * The one exception CSS forces on us: media-query breakpoints cannot read custom properties;
 * they are listed here as comments and used as written (30em, 48em, 64em, 80em).
 */
:root {
  /* Site search (Pagefind UI, on the A-Z page): its theme, from the docs roles. */
  --pagefind-ui-font: inherit;
  --pagefind-ui-primary: var(--accent);
  --pagefind-ui-text: var(--docs-ink);
  --pagefind-ui-background: var(--docs-bg-card);
  --pagefind-ui-border: var(--docs-line-control);
  --pagefind-ui-tag: var(--docs-bg-sunk);
  --pagefind-ui-border-width: var(--docs-border-w);
  --pagefind-ui-border-radius: var(--docs-radius-control);
  /* Surfaces */
  --docs-bg: var(--bg-page);
  --docs-bg-chrome: var(--bg-page);
  --docs-bg-card: var(--bg-raised);
  --docs-bg-sunk: var(--bg-sunk);
  --docs-bg-selected: var(--surface-selected);
  --docs-bg-warm: var(--surface-family);
  --docs-bg-code: var(--bg-sunk);

  /* Ink */
  --docs-ink-heading: var(--ink-strong);
  --docs-ink: var(--ink-base);
  --docs-ink-muted: var(--ink-meta);
  --docs-ink-link: var(--copper-ink);
  --docs-ink-selected: var(--ink-on-tint);
  --docs-ink-on-accent: var(--accent-ink);

  /* Lines */
  --docs-line: var(--line-divider);
  --docs-line-soft: var(--line-soft);
  --docs-line-control: var(--line-control);
  --docs-border-w: 1px;
  --docs-border-w-thick: 3px;
  --docs-px: 1px;

  /* Callouts: fill and ink pairs that already pass 4.5:1 in every theme */
  --docs-note-bg: var(--bg-tint);
  --docs-note-ink: var(--ink-on-tint);
  --docs-note-edge: var(--accent);
  --docs-tip-bg: var(--notice-ok-bg);
  --docs-tip-ink: var(--notice-ok-ink);
  --docs-tip-edge: var(--status-success);
  --docs-warn-bg: var(--notice-warn-bg);
  --docs-warn-ink: var(--notice-warn-ink);
  --docs-warn-edge: var(--brand-sun);
  --docs-safety-bg: var(--bg-safety);
  --docs-safety-ink: var(--ink-safety);
  --docs-safety-edge: var(--status-error);
  /* The coloured left edge of each callout, and the thin line beside "On this page" */
  --docs-shadow-note-edge: inset var(--docs-border-w-thick) 0 0 var(--docs-note-edge);
  --docs-shadow-tip-edge: inset var(--docs-border-w-thick) 0 0 var(--docs-tip-edge);
  --docs-shadow-warn-edge: inset var(--docs-border-w-thick) 0 0 var(--docs-warn-edge);
  --docs-shadow-safety-edge: inset var(--docs-border-w-thick) 0 0 var(--docs-safety-edge);
  --docs-shadow-rail: inset var(--docs-border-w) 0 0 var(--docs-line);

  /* "Not yet" / "Stronger" example pairs */
  --docs-notyet-bg: var(--status-warning-bg);
  --docs-notyet-ink: var(--status-warning-ink);
  --docs-stronger-bg: var(--status-positive-bg);
  --docs-stronger-ink: var(--leaf-ink);

  /* Rule ids */
  --docs-ruleid-bg: var(--bg-tint);
  --docs-ruleid-ink: var(--ink-on-tint);

  /* Type */
  --docs-font-heading: var(--font-display);
  /* Body text: the owner has not chosen yet. Built today: the phone's own font (the designer's
     recommendation; the mock-ups show Andika). To use the brand's Andika, set this ONE line to
     var(--font-body); the build then adds Andika's font files (readCss in eleventy.config.mjs). */
  --docs-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --docs-font-ui: var(--font-ui);
  /* The app token is ui-monospace, monospace; Chrome on Windows and Android has no ui-monospace and falls to Courier. Docs name the phone and desktop monospace fonts first. */
  --docs-font-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, "Roboto Mono", "Droid Sans Mono", var(--font-mono);
  --docs-fs-eyebrow: var(--fs-3);
  --docs-fs-small: var(--fs-5);
  --docs-fs-nav: var(--fs-6);
  --docs-fs-body: var(--fs-8);
  --docs-fs-lead: var(--fs-11);
  --docs-fs-h4: var(--fs-9);
  --docs-fs-h3: var(--fs-11);
  --docs-fs-h2: var(--fs-14);
  --docs-fs-h1: var(--fs-fluid-9);
  --docs-fs-hero: var(--fs-fluid-10);
  --docs-lh-body: 1.7;
  --docs-lh-heading: 1.2;
  --docs-lh-tight: 1.35;
  --docs-tracking-eyebrow: 0.12em;
  --docs-weight-heading: 700;
  --docs-weight-ui: 600;
  --docs-weight-bold: 700;

  /* Layout */
  --docs-measure: 42rem;
  --docs-page-max: var(--public-content-width);
  --docs-sidebar-w: 16.5rem;
  --docs-toc-w: 13.5rem;
  --docs-header-h: 4rem;
  --docs-tabs-h: 3rem;
  --docs-gap: var(--space-6);
  --docs-pad: var(--gutter);
  --docs-control-h: var(--control-h-touch);
  --docs-icon: var(--icon-size-touch);
  --docs-icon-sm: var(--icon-size);
  --docs-icon-stroke: 2;
  --docs-mark: 1.75rem;
  --docs-spine-w: 1.375rem; /* the same spine on the doors and the path cards (Grok G5) */
  --docs-dot: 1.75rem;
  --docs-dot-sm: 0.625rem;

  /* Shape */
  --docs-radius-card: var(--radius-lg);
  --docs-radius-control: var(--radius-control);
  --docs-radius-pill: var(--radius-pill);
  --docs-radius-chip: var(--radius-sm);
  --docs-radius-cover: var(--radius-cover);
  --docs-shadow-card: var(--shadow-card);
  --docs-shadow-lift: var(--shadow-lift);
  --docs-focus: var(--shadow-focus-double);

  /* The four doors and the learning path borrow the book-cloth colours, one per door */
  --docs-cloth-tell: var(--cl-violet);
  --docs-cloth-read: var(--cl-green);
  --docs-cloth-clinic: var(--cl-plum);
  --docs-cloth-build: var(--cl-navy);

  --docs-z-header: var(--z-sticky);

  /* Small measures that would otherwise be literals in docs.css */
  --docs-tracking-h1: -0.01em;
  --docs-lh-chip: 1.85;
  --docs-fs-code: 0.9em;
  --docs-search-max: 28rem;
  --docs-hero-search-max: 36rem;
  --docs-hero-max: 48rem;
  --docs-footer-col: 10rem;
  --docs-strip-text-min: 18rem;
  --docs-nudge: -0.1em;
  --docs-underline-offset: 0.2em;
  --docs-underline: 0.06em;
  --docs-underline-hover: 0.12em;
}

/* DOCS-DARK — the only docs value that is not a brand token: the warm "how this feels" card in dark (Grok G9).
   A warm brown, not the sunk violet. --ink-strong (#f1effc) on it is 11.7:1, --ink-base 10.2:1, --ink-muted 6.3:1. */
:root[data-theme='dark'] {
  --docs-bg-warm: #3a2d26;
}


/* Generated by the build from the dark blocks above: the system dark setting, unless the reader chose light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
  --bg-page: #17152b;
  --bg-raised: #1d1a36;
  --bg-sunk: #2a2648;
  --bg-tint: #2f2a5a;
  --bg-safety: #3a1d28;
  --surface-family: #2a2648;
  --ink-strong: #f1effc;
  --ink-base: #e2dff4;
  --ink-muted: #b3afd0;
  --ink-safety: #ffb3bd;
  --copper-ink: #d6ceff;
  --leaf-ink: #6fdcb3;
  --line-soft: rgba(241, 239, 252, 0.12);
  --line-control: #8f8aab;
  --accent: #b7a8ff;
  --accent-deep: #cfc4ff;
  --accent-ink: #17152b;
  --ink-on-tint: #d6ceff;
  --brand-violet-soft: #2f2a5a;
  --status-error: #ff8f9b;
  --status-success: #6fdcb3;
  --surface-selected: #2f2a5a;
  --line-divider: #38345f;
  --status-positive-bg: #173f33;
  --status-warning-bg: #4a2a18;
  --status-warning-ink: #ffcfb0;
  --ink-meta: var(--ink-muted);
  --shadow-ink: 0 0 0;
  --notice-warn-bg: #3d3310;
  --notice-warn-ink: #ffe28a;
  --notice-ok-bg: #16342b;
  --notice-ok-ink: #b8ecd5;
  --docs-bg-warm: #3a2d26;
  }
}

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/quicksand-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/quicksand-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/quicksand-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/quicksand-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Dorokas docs stylesheet: the owner-approved design (docs-design-open, 3 Dec 2026, with Grok's revision 1).
   GENERATED by scripts/port-design-css.py from the mock-up's docs.css: change the mock-up and run it again.
   Uses var(--...) only; the values are in tokens.css (the app's) and docs-tokens.css (docs roles).
   Device floor (Chrome 64, Safari 12): no flex gap (spacing between flex items is margins, in the
   "floor spacing" section at the end; grids use grid-gap), :focus not :focus-visible, and sticky
   carries its -webkit- prefix. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--docs-bg);
  color: var(--docs-ink);
  font-family: var(--docs-font-body);
  font-size: var(--docs-fs-body);
  line-height: var(--docs-lh-body);
}
a { color: var(--docs-ink-link); text-underline-offset: var(--docs-underline-offset); text-decoration-thickness: var(--docs-underline); }
a:hover { text-decoration-thickness: var(--docs-underline-hover); }
:focus { outline: none; box-shadow: var(--docs-focus); border-radius: var(--docs-radius-chip); }
img, svg { max-width: 100%; }
svg[aria-hidden] { stroke-width: var(--docs-icon-stroke); }
[hidden] { display: none !important; }
.vh { position: absolute; width: var(--docs-px); height: var(--docs-px); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--space-3); top: calc(-1 * var(--docs-header-h)); background: var(--accent); color: var(--docs-ink-on-accent); padding: var(--space-2) var(--space-4); border-radius: var(--docs-radius-pill); z-index: var(--z-toast); }
.skip:focus { top: var(--space-3); }

/* ---------- header ---------- */
.site-header {
  position: -webkit-sticky; position: sticky; top: 0; z-index: var(--docs-z-header);
  background: var(--docs-bg-chrome);
  box-shadow: var(--shadow-rule-below);
}
.header-row {
  max-width: var(--docs-page-max); margin: 0 auto;
  display: flex; align-items: center;
  min-height: var(--docs-header-h); padding: 0 var(--docs-pad);
}
.brand { display: flex; align-items: center; text-decoration: none; color: var(--docs-ink-heading); font-family: var(--docs-font-heading); font-weight: var(--docs-weight-heading); font-size: var(--fs-11); flex: none; }
.brand-mark { width: var(--docs-mark); height: var(--docs-mark); color: var(--accent); }
.brand-docs { color: var(--docs-ink-muted); font-weight: var(--docs-weight-ui); }
/* Desktop: the search is the same fixed width on every page (home included, via .search--none),
   so the actions on the right never move when you change tab. */
.search { flex: 0 0 var(--docs-search-max); width: var(--docs-search-max); max-width: 100%; margin-left: auto; position: relative; }
.search input {
  width: 100%; min-height: var(--docs-control-h);
  border: var(--docs-border-w) solid var(--docs-line-control); border-radius: var(--docs-radius-pill);
  background: var(--docs-bg-card); color: var(--docs-ink);
  font: inherit; font-size: var(--docs-fs-small);
  padding: 0 var(--space-7) 0 calc(var(--space-4) + var(--docs-icon) + var(--space-2));
}
.search input::placeholder { color: var(--docs-ink-muted); }
.search svg { position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%); width: var(--docs-icon-sm); height: var(--docs-icon-sm); color: var(--docs-ink-muted); pointer-events: none; }
.search kbd { position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%); }
kbd { font-family: var(--docs-font-mono); font-size: var(--fs-3); border: var(--docs-border-w) solid var(--docs-line); border-radius: var(--docs-radius-chip); padding: 0 var(--space-1); color: var(--docs-ink-muted); background: var(--docs-bg-sunk); }
.header-row > * + * { margin-left: var(--space-4); }
/* The search takes the free space before it, so the actions stay at the right edge on every page. */
.header-row > .search, .header-row > .search--none { margin-left: auto; }
.header-actions { display: flex; align-items: center; flex: none; }
.header-actions > * + * { margin-left: var(--space-2); }
.btn {
  display: inline-flex; align-items: center;
  min-height: var(--docs-control-h); padding: 0 var(--space-4);
  border-radius: var(--docs-radius-pill); border: var(--docs-border-w) solid var(--docs-line-control);
  background: var(--docs-bg-card); color: var(--docs-ink-heading);
  font-family: var(--docs-font-ui); font-weight: var(--docs-weight-ui); font-size: var(--docs-fs-small);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn svg { width: var(--docs-icon-sm); height: var(--docs-icon-sm); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--docs-ink-on-accent); box-shadow: var(--shadow-glow); }
.btn--quiet { border-color: transparent; background: transparent; }
.btn--icon { padding: 0; width: var(--docs-control-h); justify-content: center; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-moon { display: inline; }
:root[data-theme='dark'] .theme-toggle .icon-sun { display: none; }

/* top tabs */
.tabs { max-width: var(--docs-page-max); margin: 0 auto; padding: 0 var(--docs-pad); display: flex; overflow-x: auto; scrollbar-width: thin; }
.tabs a {
  display: inline-flex; align-items: center; min-height: var(--docs-tabs-h); white-space: nowrap;
  color: var(--docs-ink-muted); text-decoration: none;
  font-family: var(--docs-font-ui); font-weight: var(--docs-weight-ui); font-size: var(--docs-fs-nav);
}
.tabs a:hover { color: var(--docs-ink-heading); }
.tabs a[aria-current] { color: var(--docs-ink-heading); box-shadow: var(--shadow-underline-accent); }

/* ---------- three-column layout ---------- */
.layout {
  max-width: var(--docs-page-max); margin: 0 auto; padding: 0 var(--docs-pad);
  display: grid; grid-template-columns: minmax(0, 1fr); grid-gap: var(--docs-gap);
}
.sidebar { display: none; }
.toc-rail { display: none; }
.main { min-width: 0; padding: var(--space-6) 0 var(--space-8); }
.article { max-width: var(--docs-measure); }

@media (min-width: 64em) {
  .layout { grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr); }
  .sidebar { display: block; position: -webkit-sticky; position: sticky; top: calc(var(--docs-header-h) + var(--docs-tabs-h)); align-self: start; max-height: calc(var(--vh-full) - var(--docs-header-h) - var(--docs-tabs-h)); overflow-y: auto; padding: var(--space-6) var(--space-2) var(--space-6) 0; }
  .menu-mobile { display: none; }
}
@media (min-width: 80em) {
  .layout { grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr) var(--docs-toc-w); }
  .toc-rail { display: block; position: -webkit-sticky; position: sticky; top: calc(var(--docs-header-h) + var(--docs-tabs-h)); align-self: start; padding-top: var(--space-6); }
  .toc-inline { display: none; }
}

/* left menu */
.nav-group + .nav-group { margin-top: var(--space-5); }
.nav-title { margin: 0 0 var(--space-2); padding: 0 var(--space-3); font-family: var(--docs-font-ui); font-size: var(--docs-fs-eyebrow); font-weight: var(--docs-weight-bold); letter-spacing: var(--docs-tracking-eyebrow); text-transform: uppercase; color: var(--docs-ink-muted); }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a { display: flex; align-items: baseline; padding: var(--space-1) var(--space-3); border-radius: var(--docs-radius-control); color: var(--docs-ink); text-decoration: none; font-size: var(--docs-fs-nav); line-height: var(--docs-lh-tight); min-height: var(--control-h-secondary); align-items: center; }
.nav-list a:hover { background: var(--docs-bg-sunk); }
.nav-list a[aria-current] { background: var(--docs-bg-selected); color: var(--docs-ink-selected); font-weight: var(--docs-weight-bold); }
.nav-num { flex: none; font-family: var(--docs-font-ui); font-size: var(--fs-3); color: var(--docs-ink-muted); min-width: var(--space-4); }
.nav-list a[aria-current] .nav-num { color: var(--docs-ink-selected); }
.nav-id { font-family: var(--docs-font-mono); font-size: var(--fs-3); color: var(--docs-ink-muted); margin-left: auto; }

/* mobile menu: <details>, works without JavaScript */
.menu-mobile { border-bottom: var(--docs-border-w) solid var(--docs-line); margin: 0 calc(-1 * var(--docs-pad)); }
.menu-mobile > summary, .toc-inline > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  min-height: var(--docs-control-h); padding: 0 var(--docs-pad);
  font-family: var(--docs-font-ui); font-weight: var(--docs-weight-ui); font-size: var(--docs-fs-small); color: var(--docs-ink-heading);
}
.menu-mobile > summary::-webkit-details-marker, .toc-inline > summary::-webkit-details-marker { display: none; }
.menu-mobile > summary svg, .toc-inline > summary svg { width: var(--docs-icon-sm); height: var(--docs-icon-sm); }
.menu-mobile > summary .where { color: var(--docs-ink-muted); font-weight: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-mobile[open] > summary { box-shadow: var(--shadow-rule-below); }
.menu-mobile .menu-body { padding: var(--space-4) var(--docs-pad) var(--space-5); background: var(--docs-bg-card); }

/* right "on this page" */
.toc-title { display: flex; align-items: center; margin: 0 0 var(--space-2); font-family: var(--docs-font-ui); font-weight: var(--docs-weight-ui); font-size: var(--docs-fs-small); color: var(--docs-ink-heading); }
.toc-title svg { width: var(--docs-icon-sm); height: var(--docs-icon-sm); }
.toc-list { list-style: none; margin: 0; padding: 0; box-shadow: var(--docs-shadow-rail); }
.toc-list a { display: block; padding: var(--space-1) var(--space-3); color: var(--docs-ink-muted); text-decoration: none; font-size: var(--docs-fs-small); line-height: var(--docs-lh-tight); }
.toc-list a:hover { color: var(--docs-ink-heading); }
.toc-list a[aria-current] { color: var(--docs-ink-selected); font-weight: var(--docs-weight-bold); box-shadow: var(--shadow-edge-accent); }
.toc-list .sub a { padding-left: var(--space-5); }
.toc-side { margin-top: var(--space-6); padding-top: var(--space-4); border-top: var(--docs-border-w) solid var(--docs-line); display: grid; grid-gap: var(--space-2); font-size: var(--docs-fs-small); }
.toc-side a { color: var(--docs-ink-muted); text-decoration: none; display: flex; align-items: center; }
.toc-side a:hover { color: var(--docs-ink-heading); }
.toc-side svg { width: var(--docs-icon-sm); height: var(--docs-icon-sm); }
.toc-inline { margin: var(--space-5) 0; border: var(--docs-border-w) solid var(--docs-line); border-radius: var(--docs-radius-control); background: var(--docs-bg-card); }
.toc-inline > summary { padding: 0 var(--space-4); }
.toc-inline .toc-list { margin: 0 var(--space-4) var(--space-4); }

/* ---------- page head ---------- */
.crumbs { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 var(--space-3); padding: 0; font-size: var(--docs-fs-small); color: var(--docs-ink-muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--space-1); color: var(--docs-line-control); }
.crumbs a { color: var(--docs-ink-muted); text-decoration: none; }
.crumbs a:hover { color: var(--docs-ink-link); text-decoration: underline; }
.eyebrow { margin: 0 0 var(--space-2); font-family: var(--docs-font-ui); font-size: var(--docs-fs-eyebrow); font-weight: var(--docs-weight-bold); letter-spacing: var(--docs-tracking-eyebrow); text-transform: uppercase; color: var(--docs-ink-muted); }
h1, h2, h3, h4 { font-family: var(--docs-font-heading); font-weight: var(--docs-weight-heading); color: var(--docs-ink-heading); line-height: var(--docs-lh-heading); }
h1 { font-size: var(--docs-fs-h1); margin: 0 0 var(--space-3); letter-spacing: var(--docs-tracking-h1); }
.article h2 { font-size: var(--docs-fs-h2); margin: var(--space-7) 0 var(--space-3); scroll-margin-top: calc(var(--docs-header-h) + var(--docs-tabs-h) + var(--space-4)); }
.article h3 { font-size: var(--docs-fs-h3); margin: var(--space-6) 0 var(--space-2); }
.article h4 { font-size: var(--docs-fs-h4); margin: var(--space-5) 0 var(--space-2); }
.lead { font-size: var(--docs-fs-lead); line-height: var(--docs-lh-tight); color: var(--docs-ink); margin: 0 0 var(--space-4); }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; font-size: var(--docs-fs-small); color: var(--docs-ink-muted); margin: var(--space-4) 0 0; padding-bottom: var(--space-4); border-bottom: var(--docs-border-w) solid var(--docs-line); }
.page-meta > * { margin: var(--space-1) var(--space-4) var(--space-1) 0; }
.page-meta .btn { min-height: var(--control-h-secondary); padding: 0 var(--space-3); font-size: var(--fs-4); }
.page-meta .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; padding: 0 var(--space-3); border-radius: var(--docs-radius-pill); background: var(--docs-bg-sunk); color: var(--docs-ink); font-family: var(--docs-font-ui); font-size: var(--fs-3); font-weight: var(--docs-weight-ui); line-height: var(--docs-lh-chip); }
.pill--type { background: var(--docs-bg-selected); color: var(--docs-ink-selected); }
.pill--sun { background: var(--brand-sun-soft); color: var(--cover-label-ink); }

/* ---------- prose ---------- */
.article p, .article ul, .article ol { margin: 0 0 var(--space-4); }
.article ul:not([class]) > li + li, .article ol:not([class]) > li + li, .rights li + li { margin-top: var(--space-2); }
.article strong { color: var(--docs-ink-heading); }
.ui-label { font-family: var(--docs-font-ui); font-weight: var(--docs-weight-bold); color: var(--docs-ink-heading); white-space: nowrap; }
code { font-family: var(--docs-font-mono); font-size: var(--docs-fs-code); background: var(--docs-bg-code); border-radius: var(--docs-radius-chip); padding: 0 var(--space-1); }
hr { border: 0; border-top: var(--docs-border-w) solid var(--docs-line); margin: var(--space-6) 0; }

/* numbered steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: var(--space-4) 0 var(--space-5); }
.steps > li { counter-increment: step; position: relative; padding: 0 0 var(--space-5) calc(var(--docs-dot) + var(--space-4)); margin: 0; }
.steps > li + li { margin-top: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: var(--docs-dot); height: var(--docs-dot); border-radius: var(--docs-radius-pill);
  display: flex; align-items: center; justify-content: center;
  background: var(--docs-bg-selected); color: var(--docs-ink-selected);
  font-family: var(--docs-font-ui); font-weight: var(--docs-weight-bold); font-size: var(--docs-fs-small);
}
.steps > li::after { content: ""; position: absolute; left: calc(var(--docs-dot) / 2); top: calc(var(--docs-dot) + var(--space-1)); bottom: var(--space-1); border-left: var(--docs-border-w) solid var(--docs-line); }
.steps > li:last-child::after { display: none; }
.steps h3 { margin: 0 0 var(--space-1); font-size: var(--docs-fs-h4); line-height: var(--docs-lh-body); }
.steps p { margin: 0 0 var(--space-2); }

/* callouts */
.callout { display: grid; grid-template-columns: var(--docs-icon) minmax(0, 1fr); grid-gap: var(--space-3); margin: var(--space-5) 0; padding: var(--space-4); border-radius: var(--docs-radius-control); background: var(--docs-note-bg); color: var(--docs-note-ink); box-shadow: var(--docs-shadow-note-edge); }
.callout svg { width: var(--docs-icon); height: var(--docs-icon); margin-top: var(--space-1); }
.callout p { margin: 0; }
.callout p + p { margin-top: var(--space-2); }
.callout strong, .callout a { color: inherit; }
.callout-title { font-family: var(--docs-font-ui); font-weight: var(--docs-weight-bold); }
.callout--tip { background: var(--docs-tip-bg); color: var(--docs-tip-ink); box-shadow: var(--docs-shadow-tip-edge); }
.callout--warn { background: var(--docs-warn-bg); color: var(--docs-warn-ink); box-shadow: var(--docs-shadow-warn-edge); }
.callout--safety { background: var(--docs-safety-bg); color: var(--docs-safety-ink); box-shadow: var(--docs-shadow-safety-edge); }

/* rule id chip */
.ruleid { display: inline-flex; align-items: center; font-family: var(--docs-font-mono); font-size: var(--fs-4); font-weight: var(--docs-weight-bold); padding: 0 var(--space-2); border-radius: var(--docs-radius-chip); background: var(--docs-ruleid-bg); color: var(--docs-ruleid-ink); text-decoration: none; white-space: nowrap; line-height: var(--docs-lh-chip); }
a.ruleid:hover { box-shadow: var(--shadow-ring-accent-inset); }
.value { font-family: var(--docs-font-ui); font-weight: var(--docs-weight-bold); color: var(--docs-ink-heading); box-shadow: var(--shadow-underline-sun); }

/* ---------- rule card ---------- */
.rule { margin: var(--space-5) 0; background: var(--docs-bg-card); border: var(--docs-border-w) solid var(--docs-line); border-radius: var(--docs-radius-card); box-shadow: var(--docs-shadow-card); scroll-margin-top: calc(var(--docs-header-h) + var(--docs-tabs-h) + var(--space-4)); overflow: hidden; }
.rule:target { box-shadow: var(--shadow-ring-accent); }
.rule-head { display: flex; flex-wrap: wrap; align-items: center; padding: var(--space-4) var(--space-5) 0; }
.rule-head .status { font-size: var(--fs-3); color: var(--status-success); font-family: var(--docs-font-ui); font-weight: var(--docs-weight-ui); display: inline-flex; align-items: center; }
.rule-head .status::before { content: ""; width: var(--docs-dot-sm); height: var(--docs-dot-sm); border-radius: var(--docs-radius-pill); background: currentColor; }
.rule-head .rule-tools { margin-left: auto; display: flex; }
.rule-head .btn { min-height: var(--control-h-secondary); padding: 0 var(--space-3); font-size: var(--fs-4); }
.rule-statement { margin: var(--space-3) var(--space-5) var(--space-4); font-family: var(--docs-font-heading); font-weight: var(--docs-weight-heading); font-size: var(--fs-12); line-height: var(--docs-lh-tight); color: var(--docs-ink-heading); }
.rule-body { padding: 0 var(--space-5) var(--space-2); }
.rule-body dl { margin: 0; display: grid; grid-gap: var(--space-3); }
.rule-body dt { font-family: var(--docs-font-ui); font-size: var(--docs-fs-eyebrow); font-weight: var(--docs-weight-bold); text-transform: uppercase; letter-spacing: var(--docs-tracking-eyebrow); color: var(--docs-ink-muted); }
.rule-body dd { margin: 0; }
.rule-foot { display: flex; flex-wrap: wrap; margin-top: var(--space-4); padding: var(--space-3) var(--space-5); background: var(--docs-bg-sunk); font-size: var(--fs-4); color: var(--docs-ink-muted); }
.rule-foot b { font-weight: var(--docs-weight-bold); color: var(--docs-ink); }

/* rule index table */
.rule-index { width: 100%; border-collapse: collapse; font-size: var(--docs-fs-small); margin: var(--space-4) 0; }
.rule-index th { text-align: left; font-family: var(--docs-font-ui); font-size: var(--docs-fs-eyebrow); letter-spacing: var(--docs-tracking-eyebrow); text-transform: uppercase; color: var(--docs-ink-muted); padding: var(--space-2) var(--space-3); border-bottom: var(--docs-border-w) solid var(--docs-line); }
.rule-index td { padding: var(--space-2) var(--space-3); border-bottom: var(--docs-border-w) solid var(--docs-line); vertical-align: top; }

/* ---------- example pairs ---------- */
.pair { display: grid; grid-gap: var(--space-3); margin: var(--space-5) 0; }
@media (min-width: 48em) { .pair { grid-template-columns: 1fr 1fr; } }
.pair figure { margin: 0; padding: var(--space-4); border-radius: var(--docs-radius-control); }
.pair figcaption { font-family: var(--docs-font-ui); font-weight: var(--docs-weight-bold); font-size: var(--docs-fs-small); margin-bottom: var(--space-2); display: flex; align-items: center; }
.pair figcaption svg { flex: none; width: var(--docs-icon-sm); height: var(--docs-icon-sm); }
.pair blockquote { margin: 0; font-size: var(--docs-fs-body); color: var(--docs-ink-heading); }
.pair .why { margin: var(--space-3) 0 0; font-size: var(--docs-fs-small); }
.pair .notyet { background: var(--docs-notyet-bg); }
.pair .notyet figcaption, .pair .notyet .why { color: var(--docs-notyet-ink); }
.pair .stronger { background: var(--docs-stronger-bg); }
.pair .stronger figcaption, .pair .stronger .why { color: var(--docs-stronger-ink); }
.sample-note { font-size: var(--fs-3); color: var(--docs-ink-muted); margin-top: calc(-1 * var(--space-3)); }

/* exercise / checklist box */
.box { margin: var(--space-5) 0; padding: var(--space-5); border-radius: var(--docs-radius-card); background: var(--docs-bg-card); border: var(--docs-border-w) solid var(--docs-line); }
.box h3 { margin-top: 0; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: calc(var(--docs-icon) + var(--space-3)); }
.checklist li + li { margin-top: var(--space-2); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; width: var(--docs-icon); font-family: var(--docs-font-ui); font-weight: var(--docs-weight-bold); color: var(--docs-stronger-ink); text-align: center; }

/* ---------- learning path (a story in eight parts) ---------- */
.path-progress { display: flex; align-items: center; margin: 0 0 var(--space-4); font-size: var(--docs-fs-small); color: var(--docs-ink-muted); font-family: var(--docs-font-ui); font-weight: var(--docs-weight-ui); }
.path-dots { display: flex; }
.path-dots span { width: var(--space-5); height: var(--space-2); border-radius: var(--docs-radius-pill); background: var(--docs-bg-sunk); box-shadow: var(--shadow-ring-soft-inset); }
.path-dots .done { background: var(--docs-cloth-tell); box-shadow: none; }
.path-dots .here { background: var(--accent); box-shadow: var(--shadow-ring-tint); }

/* ---------- Clinic beats ---------- */
.beats { list-style: none; counter-reset: beat; padding: 0; margin: var(--space-5) 0; display: grid; grid-gap: var(--space-3); }
.beat { counter-increment: beat; border-radius: var(--docs-radius-card); padding: var(--space-5); background: var(--docs-bg-card); border: var(--docs-border-w) solid var(--docs-line); }
.beat > h2 { margin: 0 0 var(--space-2) !important; font-size: var(--docs-fs-h3) !important; display: flex; align-items: baseline; }
.beat > h2::before { content: counter(beat); flex: none; width: var(--docs-dot); height: var(--docs-dot); border-radius: var(--docs-radius-pill); display: inline-flex; align-items: center; justify-content: center; font-size: var(--docs-fs-small); background: var(--docs-bg-selected); color: var(--docs-ink-selected); transform: translateY(var(--docs-nudge)); }
.beat p:last-child, .beat ul:last-child { margin-bottom: 0; }
.beat--feeling { background: var(--docs-bg-warm); border-color: transparent; }
.beat--feeling p { font-size: var(--docs-fs-lead); line-height: var(--docs-lh-tight); color: var(--docs-ink-heading); }
.choices { display: grid; grid-gap: var(--space-3); margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.choices li { margin: 0 !important; padding: var(--space-3) var(--space-4); border-radius: var(--docs-radius-control); background: var(--docs-bg-sunk); }
.choices .when { display: block; font-size: var(--docs-fs-small); color: var(--docs-ink-muted); }
.rights { display: grid; grid-gap: var(--space-3); }
@media (min-width: 48em) { .rights { grid-template-columns: 1fr 1fr; } }
.rights h3 { margin: 0 0 var(--space-2) !important; font-size: var(--docs-fs-h4) !important; }
.rights ul { padding-left: var(--space-5); }

/* ---------- glossary ---------- */
.az { display: flex; flex-wrap: wrap; margin: var(--space-4) 0; padding: 0; list-style: none; }
.az a, .az span { display: inline-flex; align-items: center; justify-content: center; min-width: var(--docs-control-h); min-height: var(--docs-control-h); border-radius: var(--docs-radius-control); font-family: var(--docs-font-ui); font-weight: var(--docs-weight-bold); font-size: var(--docs-fs-small); text-decoration: none; }
.az a { background: var(--docs-bg-card); color: var(--docs-ink-link); border: var(--docs-border-w) solid var(--docs-line); }
.az a:hover { background: var(--docs-bg-selected); }
.az span { color: var(--docs-line-control); }
.filter { display: flex; flex-wrap: wrap; margin: var(--space-4) 0; }
.filter .btn[aria-pressed='true'] { background: var(--docs-bg-selected); color: var(--docs-ink-selected); border-color: transparent; }
.letter { font-size: var(--docs-fs-h2); margin: var(--space-6) 0 var(--space-2) !important; padding-bottom: var(--space-2); border-bottom: var(--docs-border-w) solid var(--docs-line); color: var(--accent) !important; }
.terms { margin: 0; }
.term { padding: var(--space-4) 0; border-bottom: var(--docs-border-w) solid var(--docs-line); scroll-margin-top: calc(var(--docs-header-h) + var(--docs-tabs-h)); }
.term dt { display: flex; flex-wrap: wrap; align-items: baseline; font-family: var(--docs-font-heading); font-weight: var(--docs-weight-heading); font-size: var(--docs-fs-h4); color: var(--docs-ink-heading); }
.term dt .aud { font-family: var(--docs-font-ui); font-size: var(--fs-3); font-weight: var(--docs-weight-ui); color: var(--docs-ink-muted); }
.term dd { margin: var(--space-1) 0 0; }
.term .see { font-size: var(--docs-fs-small); color: var(--docs-ink-muted); margin-top: var(--space-1); }
.term .not { font-size: var(--docs-fs-small); }

/* ---------- page foot ---------- */
.pagefoot { margin-top: var(--space-7); display: grid; grid-gap: var(--space-5); }
.helpful { display: flex; flex-wrap: wrap; align-items: center; padding: var(--space-4) var(--space-5); border-radius: var(--docs-radius-card); background: var(--docs-bg-sunk); font-family: var(--docs-font-ui); font-weight: var(--docs-weight-ui); font-size: var(--docs-fs-small); color: var(--docs-ink-heading); }
.helpful .spacer { flex: 1; }
.helpful .btn { min-height: var(--control-h-secondary); }
.checked { font-size: var(--fs-4); color: var(--docs-ink-muted); display: flex; flex-wrap: wrap; }
.checked a { color: var(--docs-ink-muted); }
.prevnext { display: grid; grid-gap: var(--space-3); }
@media (min-width: 48em) { .prevnext { grid-template-columns: 1fr 1fr; } }
.prevnext a { display: block; padding: var(--space-4) var(--space-5); border-radius: var(--docs-radius-card); border: var(--docs-border-w) solid var(--docs-line); background: var(--docs-bg-card); text-decoration: none; }
.prevnext a:hover { border-color: var(--accent); }
.prevnext .dir { display: block; font-size: var(--fs-3); color: var(--docs-ink-muted); font-family: var(--docs-font-ui); font-weight: var(--docs-weight-ui); }
.prevnext .ttl { font-family: var(--docs-font-heading); font-weight: var(--docs-weight-heading); color: var(--docs-ink-link); font-size: var(--docs-fs-h4); }
.prevnext .next { text-align: right; }
.prevnext .next:only-child { grid-column: 2; }

/* ---------- home ---------- */
.home { max-width: var(--docs-page-max); margin: 0 auto; padding: 0 var(--docs-pad) var(--space-8); }
.hero { padding: var(--space-7) 0 var(--space-6); max-width: var(--docs-hero-max); }
.hero h1 { font-size: var(--docs-fs-hero); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { color: var(--docs-ink); }
.hero-search { position: relative; margin-top: var(--space-5); max-width: var(--docs-hero-search-max); }
.hero-search input { width: 100%; min-height: calc(var(--docs-control-h) + var(--space-2)); border-radius: var(--docs-radius-pill); border: var(--docs-border-w) solid var(--docs-line-control); background: var(--docs-bg-card); color: var(--docs-ink); font: inherit; padding: 0 var(--space-5) 0 calc(var(--space-5) + var(--docs-icon) + var(--space-2)); box-shadow: var(--docs-shadow-card); }
.hero-search svg { position: absolute; left: var(--space-5); top: 50%; transform: translateY(-50%); width: var(--docs-icon); height: var(--docs-icon); color: var(--docs-ink-muted); }
.hero-hint { font-size: var(--docs-fs-small); color: var(--docs-ink-muted); margin-top: var(--space-2); }
.hero-hint a { color: var(--docs-ink-muted); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; margin: var(--space-7) 0 var(--space-4); }
.section-head h2 { margin: 0; font-size: var(--docs-fs-h2); }
.section-head a { font-family: var(--docs-font-ui); font-weight: var(--docs-weight-ui); font-size: var(--docs-fs-small); text-decoration: none; }
.doors { display: grid; grid-gap: var(--space-4); }
@media (min-width: 48em) { .doors { grid-template-columns: 1fr 1fr; } }
@media (min-width: 80em) { .doors { grid-template-columns: repeat(4, 1fr); } }
.door { position: relative; display: flex; flex-direction: column; padding: var(--space-5) var(--space-5) var(--space-5) calc(var(--space-5) + var(--docs-spine-w)); background: var(--docs-bg-card); border: var(--docs-border-w) solid var(--docs-line); border-radius: var(--docs-radius-cover); border-top-right-radius: var(--docs-radius-card); border-bottom-right-radius: var(--docs-radius-card); text-decoration: none; color: var(--docs-ink); box-shadow: var(--docs-shadow-card); overflow: hidden; }
.door::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: var(--docs-spine-w); background: var(--docs-cloth-tell); }
.door:hover { box-shadow: var(--docs-shadow-lift); }
.door h3 a { color: var(--docs-ink-heading); text-decoration: none; }
.door h3 a:hover { color: var(--docs-ink-link); text-decoration: underline; }
.door ul a { display: inline-block; padding: var(--space-1) 0; }
.door .eyebrow { margin: 0; }
.door h3 { margin: 0; font-size: var(--docs-fs-h3); color: var(--docs-ink-heading); }
.door p { margin: 0; font-size: var(--docs-fs-small); line-height: var(--docs-lh-tight); }
.door ul { margin: var(--space-2) 0 0; padding: 0; list-style: none; font-size: var(--docs-fs-small); display: grid; grid-gap: var(--space-1); }
.door .go { text-decoration: none; margin-top: auto; padding-top: var(--space-3); font-family: var(--docs-font-ui); font-weight: var(--docs-weight-bold); font-size: var(--docs-fs-small); color: var(--docs-ink-link); }
.door--tell::before { background: var(--docs-cloth-tell); }
.door--read::before { background: var(--docs-cloth-read); }
.door--clinic::before { background: var(--docs-cloth-clinic); }
.door--build::before { background: var(--docs-cloth-build); }

.path-strip { display: grid; grid-gap: var(--space-3); list-style: none; padding: 0; margin: 0; counter-reset: part; }
@media (min-width: 48em) { .path-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 80em) { .path-strip { grid-template-columns: repeat(4, 1fr); } }
.path-strip a { counter-increment: part; display: grid; grid-template-columns: auto 1fr; grid-gap: var(--space-1) var(--space-3); align-items: start; padding: var(--space-4); border-radius: var(--docs-radius-control); background: var(--docs-bg-card); border: var(--docs-border-w) solid var(--docs-line); text-decoration: none; color: var(--docs-ink); height: 100%; }
.path-strip a:hover { border-color: var(--accent); }
.path-strip a::before { content: "Part " counter(part); grid-row: span 2; writing-mode: vertical-rl; transform: rotate(180deg); width: var(--docs-spine-w); box-sizing: border-box; font-family: var(--docs-font-ui); font-size: var(--fs-2); font-weight: var(--docs-weight-bold); letter-spacing: var(--docs-tracking-eyebrow); text-transform: uppercase; color: var(--cover-foil); background: var(--docs-cloth-tell); border-radius: var(--docs-radius-cover); padding: var(--space-2) var(--space-1); text-align: center; }
.path-strip b { font-family: var(--docs-font-heading); color: var(--docs-ink-heading); font-size: var(--docs-fs-h4); line-height: var(--docs-lh-tight); }
.path-strip span { font-size: var(--docs-fs-small); line-height: var(--docs-lh-tight); color: var(--docs-ink-muted); }

.split { display: grid; grid-gap: var(--space-5); }
@media (min-width: 64em) { .split { grid-template-columns: 3fr 2fr; } }
.panel { background: var(--docs-bg-card); border: var(--docs-border-w) solid var(--docs-line); border-radius: var(--docs-radius-card); padding: var(--space-5); }
.panel h3 { margin: 0 0 var(--space-3); font-size: var(--docs-fs-h3); }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { border-top: var(--docs-border-w) solid var(--docs-line); }
.linklist li:first-child { border-top: 0; }
.linklist a { display: flex; align-items: baseline; padding: var(--space-3) 0; text-decoration: none; color: var(--docs-ink); }
.linklist a:hover .t { color: var(--docs-ink-link); text-decoration: underline; }
.linklist .t { font-weight: var(--docs-weight-bold); color: var(--docs-ink-heading); }
.linklist .d { font-size: var(--docs-fs-small); color: var(--docs-ink-muted); display: block; }
.linklist .ruleid { flex: none; }
.agent-strip { display: flex; flex-wrap: wrap; align-items: center; margin-top: var(--space-7); padding: var(--space-5); border-radius: var(--docs-radius-card); background: var(--docs-bg-sunk); }
.agent-strip h2 { margin: 0; font-size: var(--docs-fs-h3); }
.agent-strip p { margin: 0; font-size: var(--docs-fs-small); flex: 1 1 var(--docs-strip-text-min); }
.agent-strip code { background: var(--docs-bg-card); }

/* ---------- site footer ---------- */
.site-footer { border-top: var(--docs-border-w) solid var(--docs-line); background: var(--docs-bg-sunk); font-size: var(--docs-fs-small); color: var(--docs-ink-muted); }
.footer-row { max-width: var(--docs-page-max); margin: 0 auto; padding: var(--space-6) var(--docs-pad); display: grid; grid-gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(var(--docs-footer-col), 1fr)); }
.footer-row h2 { font-size: var(--fs-3); letter-spacing: var(--docs-tracking-eyebrow); text-transform: uppercase; margin: 0 0 var(--space-2); color: var(--docs-ink-heading); }
.footer-row ul { list-style: none; margin: 0; padding: 0; display: grid; grid-gap: var(--space-1); }
.footer-row a { color: var(--docs-ink-muted); text-decoration: none; }
.footer-row a:hover { color: var(--docs-ink-link); text-decoration: underline; }
.footer-base { max-width: var(--docs-page-max); margin: 0 auto; padding: 0 var(--docs-pad) var(--space-6); }

/* ---------- small screens ---------- */
@media (max-width: 47.99em) {
  .header-row { }
  .search { flex: 1 1 auto; width: auto; max-width: none; }
  .search kbd, .hide-sm { display: none; }
  .tabs { }
  .tabs a { font-size: var(--docs-fs-small); }
  .search input { padding-right: var(--space-4); }
  .main { padding-top: var(--space-4); }
  .rule-statement { font-size: var(--fs-10); margin-left: var(--space-4); margin-right: var(--space-4); }
  .rule-head, .rule-body { padding-left: var(--space-4); padding-right: var(--space-4); }
  .rule-foot { padding-left: var(--space-4); padding-right: var(--space-4); }
  .beat { padding: var(--space-4); }
  .hero { padding-top: var(--space-6); }
  .rule-index .hide-sm { display: none; }
}

/* ---------- floor spacing: margins where the mock-up uses flex gap (same distances) ---------- */
.brand > * + * { margin-left: var(--space-2); }
.btn > svg:first-child { margin-right: var(--space-2); }
.btn > svg:last-child { margin-left: var(--space-2); }
.btn--icon > svg:first-child, .btn--icon > svg:last-child, .btn--icon > span > svg { margin: 0; }
.tabs > * + * { margin-left: var(--space-5); }
.nav-list a > * + * { margin-left: var(--space-2); }
.menu-mobile > summary > * + *, .toc-inline > summary > * + * { margin-left: var(--space-2); }
.toc-title > * + *, .toc-side a > * + * { margin-left: var(--space-2); }
.toc-side > * + * { margin-top: var(--space-2); }
.crumbs { margin-top: calc(-1 * var(--space-1)); }
.crumbs > li { margin: var(--space-1) var(--space-1) 0 0; }
.pill > * + * { margin-left: var(--space-1); }
.rule-head > * { margin: var(--space-2) var(--space-3) 0 0; }
.rule-head { padding-top: var(--space-2); }
.rule-head > .rule-tools { margin-right: 0; }
.rule-head .status::before { margin-right: var(--space-1); }
.rule-tools > * + * { margin-left: var(--space-1); }
.rule-foot > * { margin-right: var(--space-5); }
.pair figcaption > * + * { margin-left: var(--space-2); }
.path-progress > * + * { margin-left: var(--space-3); }
.path-dots > * + * { margin-left: var(--space-1); }
.beat > h2::before { margin-right: var(--space-3); }
.az > li { margin: 0 var(--space-1) var(--space-1) 0; }
.filter > * { margin: 0 var(--space-2) var(--space-2) 0; }
.term dt > * + * { margin-left: var(--space-3); }
.checked > * { margin-right: var(--space-4); }
.section-head.section-head > * + * { margin-left: var(--space-2); }
/* Doubled classes: these must beat ".door h3 { margin: 0 }" and the like, as gap would. */
.door.door > * + * { margin-top: var(--space-2); }
.door.door > ul { margin-top: calc(var(--space-2) + var(--space-2)); }
.door.door > .go { margin-top: auto; }
.linklist a > * + * { margin-left: var(--space-3); }
.agent-strip.agent-strip > * { margin: var(--space-2) var(--space-5) var(--space-2) 0; }
.agent-strip { padding-top: var(--space-4); padding-bottom: var(--space-4); }
@media (max-width: 47.99em) {
  /* The mock-up adds a small-screen gap on top of these margins. */
  .header-row > * + * { margin-left: calc(var(--space-4) + var(--space-2)); }
  .tabs > * + * { margin-left: var(--space-4); }
}
@media (max-width: 29.99em) {
  .linklist a > * + * { margin-left: 0; margin-top: var(--space-3); }
}

/* ---------- tab hub pages (not in the mock-up): the home container and its card rows, one row per menu group ---------- */
.hub .hero h1 { font-size: var(--docs-fs-h1); }
.hub-intro { margin-top: var(--space-3); }
.hub-intro > :last-child { margin-bottom: 0; }
.section-head > span { font-family: var(--docs-font-ui); font-size: var(--docs-fs-small); color: var(--docs-ink-muted); }
.hub-cards a { grid-template-columns: minmax(0, 1fr); }
.hub-cards a::before { content: none; }
/* A card, row or footer line whose page is not published yet: a link placeholder (<a> without href). */
.path-strip a:not([href]):hover, .linklist a:not([href]):hover { border-color: var(--docs-line); }
.footer-row a:not([href]):hover { color: var(--docs-ink-muted); text-decoration: none; }
/* Site search (Pagefind UI on the A-Z page); its --pagefind-ui-* theme is in docs-tokens.css. */
.docs-search { margin: var(--space-5) 0; }
.docs-search .pagefind-ui__search-input { font: inherit; color: var(--docs-ink); }
.docs-search .pagefind-ui__search-clear { font: inherit; color: var(--docs-ink-muted); background: transparent; }
.docs-search mark { background: var(--docs-bg-selected); color: inherit; padding: 0 var(--space-1); border-radius: var(--docs-radius-chip); }
.docs-search .pagefind-ui__result-link { color: var(--docs-ink-heading); text-decoration: none; }
.docs-search .pagefind-ui__result-link:hover { text-decoration: underline; }
/* Markdown table alignment (a class, not an inline style). */
.align-left { text-align: left; }
.align-right { text-align: right; }
.align-center { text-align: center; }
/* The menu's top link: a tab's index above its groups (the Clinic). */
.nav-top { margin: 0 0 var(--space-4); font-family: var(--docs-font-ui); font-weight: var(--docs-weight-bold); }
.nav-top a { color: var(--docs-ink-heading); text-decoration: none; }
.nav-top a[aria-current] { color: var(--accent); }
.hub-checked { margin-top: var(--space-7); font-size: var(--docs-fs-small); color: var(--docs-ink-muted); }

/* ---------- print ---------- */
@media print {
  .site-header, .sidebar, .toc-rail, .toc-inline, .menu-mobile, .helpful, .prevnext, .site-footer, .page-meta .btn { display: none !important; }
  .layout { display: block; }
  body { background: var(--fixed-white); }
  .article a[href^='/']::after { content: " (docs.dorokas.africa" attr(href) ")"; font-size: var(--fs-3); }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- review round 1 (Grok) additions ---------- */
.js-only { display: none !important; }
.js .rule-tools.js-only, .js .filter.js-only { display: flex !important; }
.js .btn.js-only { display: inline-flex !important; }
.js .linkbtn.js-only { display: inline-flex !important; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--docs-ink-muted); text-decoration: underline; text-underline-offset: var(--docs-underline-offset); cursor: pointer; align-items: center; }
.toc-side .linkbtn { text-decoration: none; }
.toc-side .linkbtn svg { width: var(--docs-icon-sm); height: var(--docs-icon-sm); margin-right: var(--space-2); }
.sample-inner { margin: 0 0 var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--docs-radius-control); border: var(--docs-border-w) dashed var(--docs-warn-edge); background: var(--docs-warn-bg); color: var(--docs-warn-ink); font-size: var(--docs-fs-small); }
.choices-after { margin: var(--space-3) 0 0 !important; font-size: var(--docs-fs-small); color: var(--docs-ink-muted); }
.search--none { flex: 0 0 var(--docs-search-max); width: var(--docs-search-max); max-width: 100%; margin-left: auto; }
@media (max-width: 47.99em) {
  .search--none { flex: 1 1 auto; width: auto; }
  .meta-detail, .js .page-meta .meta-detail { display: none !important; }
  .toc-list a, .footer-row a { display: flex; align-items: center; min-height: var(--control-h-touch); }
  .brand { font-size: var(--fs-9); }
  .brand-docs { display: inline; }
}
@media (max-width: 29.99em) {
  .linklist a { flex-direction: column; }
}
