/* SmartestQA Docs — one stylesheet for every page.
   Layout concept: three-column reading desk — product map on the left, one readable column
   (~70ch) in the middle, "on this page" on the right. The brand-blue 4px bar on section
   headings is the app's own sectionHeading signature (smarttest-fe tokens.js), carried over.
   Colors, fonts and radii come from smarttest-fe/src/themes/tokens.js; the app has no dark
   theme, so the dark values below are derived from the same scale. */

:root {
  --bg: #ffffff;
  --bg-subtle: #f5f6f8;
  --bg-sunken: #eef0f3;
  --surface: #ffffff;
  --border: #e3e6eb;
  --border-soft: #eef0f3;
  --border-strong: #cdd2da;
  --fg-strong: #16191f;
  --fg: #252b39;
  --fg-secondary: #4a5160;
  --fg-muted: #626b7d;
  --fg-faint: #9aa4b6;
  --brand: #2457d6;
  --brand-strong: #173e9f;
  --brand-soft: #e8eefc;
  --brand-tint: #f3f6fd;
  --brand-line: #ccd9f7;
  --on-brand: #ffffff;
  --mark: #29b7d3;
  --ok-bg: #e3f3ea; --ok-fg: #12663d; --ok-solid: #167a4a; --ok-line: #b5dec6;
  --nok-bg: #fbe6e7; --nok-fg: #9f1d25; --nok-solid: #b4232c; --nok-line: #f0bfc2;
  --warn-bg: #fcf0dc; --warn-fg: #7a4600; --warn-solid: #a65f00; --warn-line: #efd3a3;
  --neutral-bg: #eceef1; --neutral-fg: #3f4652; --neutral-solid: #7b8494; --neutral-line: #cdd2da;
  --info-bg: #e8eefc; --info-fg: #173e9f; --info-solid: #2457d6; --info-line: #ccd9f7;
  --ai-bg: #f3eefd; --ai-fg: #5b21b6; --ai-solid: #7c3aed; --ai-line: #ddd0fa;
  --code-bg: #161a24; --code-fg: #e6e9ef; --code-key: #6ee7b7; --code-str: #fcd34d; --code-dim: #8a93a6;
  --video-a: #161a24; --video-b: #1d2a52;
  --shadow-pop: 0 16px 40px -16px rgba(16, 24, 40, 0.28), 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px -4px rgba(16, 24, 40, 0.10);
  --focus: 0 0 0 3px rgba(36, 87, 214, 0.32);
  --scrim: rgba(16, 20, 28, 0.48);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: 0.75rem;   /* 12 meta, badges */
  --fs-sm: 0.875rem;  /* 14 secondary, tables, nav */
  --fs-base: 1rem;    /* 16 body */
  --fs-md: 1.125rem;  /* 18 lead */
  --fs-lg: 1.25rem;   /* 20 h3 */
  --fs-xl: 1.5625rem; /* 25 h2 */
  --fs-2xl: 2.125rem; /* 34 h1 */
  --r-sm: 8px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px;
  --header-h: 60px;
  --sidebar-w: 268px;
  --toc-w: 232px;
  --content-w: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116; --bg-subtle: #141820; --bg-sunken: #1b2029; --surface: #151922;
    --border: #272d38; --border-soft: #1f242d; --border-strong: #363d4a;
    --fg-strong: #f3f5f8; --fg: #d9dde4; --fg-secondary: #b6bdc9; --fg-muted: #959dab; --fg-faint: #6a7282;
    --brand: #7fa0ec; --brand-strong: #a9c0f4; --brand-soft: rgba(70, 114, 221, 0.20); --brand-tint: rgba(70, 114, 221, 0.10);
    --brand-line: rgba(127, 160, 236, 0.40); --on-brand: #0b1020;
    --ok-bg: rgba(22, 122, 74, 0.18); --ok-fg: #74d7a6; --ok-solid: #3fb87d; --ok-line: rgba(63, 184, 125, 0.38);
    --nok-bg: rgba(180, 35, 44, 0.20); --nok-fg: #f59ca1; --nok-solid: #e5646b; --nok-line: rgba(229, 100, 107, 0.40);
    --warn-bg: rgba(166, 95, 0, 0.22); --warn-fg: #f3c070; --warn-solid: #e0a040; --warn-line: rgba(224, 160, 64, 0.40);
    --neutral-bg: #1d222b; --neutral-fg: #c4cad4; --neutral-solid: #8a93a3; --neutral-line: #363d4a;
    --info-bg: rgba(36, 87, 214, 0.20); --info-fg: #adc3f5; --info-solid: #7fa0ec; --info-line: rgba(127, 160, 236, 0.40);
    --ai-bg: rgba(124, 58, 237, 0.20); --ai-fg: #cdb6fb; --ai-solid: #a07bf0; --ai-line: rgba(160, 123, 240, 0.40);
    --code-bg: #0a0d12; --video-a: #0a0d12; --video-b: #182448;
    --shadow-pop: 0 16px 40px -12px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
    --focus: 0 0 0 3px rgba(127, 160, 236, 0.45);
    --scrim: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116; --bg-subtle: #141820; --bg-sunken: #1b2029; --surface: #151922;
  --border: #272d38; --border-soft: #1f242d; --border-strong: #363d4a;
  --fg-strong: #f3f5f8; --fg: #d9dde4; --fg-secondary: #b6bdc9; --fg-muted: #959dab; --fg-faint: #6a7282;
  --brand: #7fa0ec; --brand-strong: #a9c0f4; --brand-soft: rgba(70, 114, 221, 0.20); --brand-tint: rgba(70, 114, 221, 0.10);
  --brand-line: rgba(127, 160, 236, 0.40); --on-brand: #0b1020;
  --ok-bg: rgba(22, 122, 74, 0.18); --ok-fg: #74d7a6; --ok-solid: #3fb87d; --ok-line: rgba(63, 184, 125, 0.38);
  --nok-bg: rgba(180, 35, 44, 0.20); --nok-fg: #f59ca1; --nok-solid: #e5646b; --nok-line: rgba(229, 100, 107, 0.40);
  --warn-bg: rgba(166, 95, 0, 0.22); --warn-fg: #f3c070; --warn-solid: #e0a040; --warn-line: rgba(224, 160, 64, 0.40);
  --neutral-bg: #1d222b; --neutral-fg: #c4cad4; --neutral-solid: #8a93a3; --neutral-line: #363d4a;
  --info-bg: rgba(36, 87, 214, 0.20); --info-fg: #adc3f5; --info-solid: #7fa0ec; --info-line: rgba(127, 160, 236, 0.40);
  --ai-bg: rgba(124, 58, 237, 0.20); --ai-fg: #cdb6fb; --ai-solid: #a07bf0; --ai-line: rgba(160, 123, 240, 0.40);
  --code-bg: #0a0d12; --video-a: #0a0d12; --video-b: #182448;
  --shadow-pop: 0 16px 40px -12px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
  --focus: 0 0 0 3px rgba(127, 160, 236, 0.45);
  --scrim: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ───────── base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
img, svg, video { max-width: 100%; }
a { color: var(--brand); text-decoration: underline; text-decoration-color: var(--brand-line); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: var(--brand-soft); }
.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; }
.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; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
button { font: inherit; color: inherit; }

/* ───────── header ───────── */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  height: 100%;
  display: flex; align-items: center; gap: 12px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--fg-strong); flex: none; }
.brand-mark { width: 26px; height: 26px; }
.brand-name { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em; }
.brand-name b { color: var(--mark); font-weight: 700; }
.brand-docs { font-size: var(--fs-sm); color: var(--fg-muted); font-weight: 500; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--border); }
.header-spacer { flex: 1; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  width: min(340px, 40vw); height: 38px; padding: 0 10px 0 12px;
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--fg-muted); font-size: var(--fs-sm); cursor: pointer; text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.search-trigger:hover { border-color: var(--border-strong); background: var(--surface); }
.search-trigger span { flex: 1; }
.search-trigger kbd { margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--fg-secondary); cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--fg-strong); }
.icon-btn .icon { width: 19px; height: 19px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 14px; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--brand); color: var(--on-brand); border: 1px solid var(--brand); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-outline { background: var(--surface); color: var(--fg-strong); border: 1px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--fg-muted); }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--fg-secondary); }
.btn-ghost:hover { background: var(--bg-sunken); color: var(--fg-strong); }
.btn .icon { width: 16px; height: 16px; }
.menu-btn { display: none; }
.theme-btn .icon-moon { display: none; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: none; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .icon-moon { display: block; }
}

/* ───────── shell grid ───────── */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  max-width: 1440px; margin: 0 auto;
}
.sidebar {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px));
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding: 24px 14px 40px max(16px, env(safe-area-inset-left, 0px));
  border-right: 1px solid var(--border-soft);
  scrollbar-width: thin;
}
.nav-group + .nav-group { margin-top: 22px; }
.nav-group-title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); padding: 0 10px 6px; margin: 0; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: var(--fg-secondary); text-decoration: none; line-height: 1.4;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background: var(--bg-sunken); color: var(--fg-strong); }
.nav-link[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
.nav-link.is-planned { color: var(--fg-faint); cursor: default; }
.nav-link.is-planned:hover { background: transparent; color: var(--fg-faint); }
.nav-soon { margin-left: auto; font-size: 0.6875rem; font-weight: 600; color: var(--fg-muted); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 0 7px; line-height: 18px; }
.nav-section > .nav-parent .chev-s { margin-left: auto; width: 14px; height: 14px; color: var(--fg-faint); transition: transform 0.2s ease; }
.nav-section.is-open > .nav-parent { color: var(--fg-strong); font-weight: 600; }
.nav-section.is-open > .nav-parent .chev-s { transform: rotate(90deg); }
.nav-sub { list-style: none; margin: 2px 0 8px 17px; padding: 0 0 0 8px; border-left: 1px solid var(--border); display: grid; gap: 1px; }
.nav-section:not(.is-open) > .nav-sub { display: none; }
.nav-link.nav-child { font-size: 0.8125rem; padding: 5px 10px; }
.nav-step { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--fg-muted); width: 16px; text-align: right; flex: none; }

.main { min-width: 0; padding-block: 40px 96px; padding-left: max(clamp(16px, 4vw, 56px), env(safe-area-inset-left, 0px)); padding-right: max(clamp(16px, 4vw, 56px), env(safe-area-inset-right, 0px)); }
.article { max-width: var(--content-w); margin: 0 auto; }
.toc {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px));
  overflow-y: auto; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 40px 8px;
  font-size: var(--fs-sm); scrollbar-width: thin;
}
.toc-title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--fg-muted); text-decoration: none; line-height: 1.4; }
.toc li.lvl-3 a { padding-left: 26px; font-size: 0.8125rem; }
.toc li a:hover { color: var(--fg-strong); }
.toc li a.is-active { color: var(--brand); border-left-color: var(--brand); font-weight: 500; }
.toc-actions { margin-top: 22px; display: grid; gap: 4px; }
.toc-actions a, .toc-actions button { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-muted); font-size: 0.8125rem; text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: left; }
.toc-actions a:hover, .toc-actions button:hover { color: var(--fg-strong); }

/* ───────── page head ───────── */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--fg-muted); margin: 0 0 14px; padding: 0; list-style: none; }
.crumbs a { color: var(--fg-muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg-strong); }
.crumbs .icon { width: 14px; height: 14px; color: var(--fg-faint); }
.page-title { font-size: var(--fs-2xl); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; color: var(--fg-strong); margin: 0 0 14px; text-wrap: balance; }
.lead { font-size: var(--fs-md); line-height: 1.6; color: var(--fg-secondary); margin: 0 0 20px; max-width: 40rem; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: var(--fs-sm); color: var(--fg-muted); padding-bottom: 24px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.page-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }
/* "In short" box: what you can do on this page + how to use it (build.mjs tldrBox, meta.tldr) */
.tldr { margin: 20px 0 8px; padding: 16px 20px 6px; border: 1px solid var(--brand-line); border-radius: var(--r-md); background: var(--brand-tint); }
.tldr-head { all: unset; display: block; margin-bottom: 12px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-strong); }
.tldr-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }
.tldr-col { min-width: 0; }
.tldr-title { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--fg-strong); }
.tldr-title .icon { width: 15px; height: 15px; color: var(--brand); flex-shrink: 0; }
.tldr ul, .tldr ol { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 5px; font-size: 0.9375rem; line-height: 1.45; color: var(--fg); }
.tldr li::marker { color: var(--fg-muted); }
@media (max-width: 760px) { .tldr-cols { grid-template-columns: minmax(0, 1fr); } .tldr { padding: 14px 16px 4px; } }
.page-meta .icon { width: 15px; height: 15px; }
.aud { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 600; line-height: 22px; padding: 0 9px; border-radius: var(--r-pill); background: var(--neutral-bg); color: var(--neutral-fg); white-space: nowrap; }
.chip.c-customer { background: var(--info-bg); color: var(--info-fg); }
.chip.c-reseller { background: var(--warn-bg); color: var(--warn-fg); }
.chip.c-admin { background: var(--neutral-bg); color: var(--neutral-fg); }
.chip.c-ai { background: var(--ai-bg); color: var(--ai-fg); }
.chip.c-ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip.c-nok { background: var(--nok-bg); color: var(--nok-fg); }
.chip.c-warn { background: var(--warn-bg); color: var(--warn-fg); }

/* ───────── prose ───────── */
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  display: flex; align-items: center; gap: 12px;
  font-size: var(--fs-xl); line-height: 1.25; letter-spacing: -0.02em; font-weight: 700; color: var(--fg-strong);
  margin: 3.2rem 0 0; padding-top: 0.25rem; text-wrap: balance;
}
.prose h2::before { content: ""; width: 4px; height: 22px; border-radius: 2px; background: var(--brand); flex: none; }
.prose h3 { font-size: var(--fs-lg); line-height: 1.35; letter-spacing: -0.012em; font-weight: 600; color: var(--fg-strong); margin: 2.2rem 0 0; text-wrap: balance; }
.prose h4 { font-size: var(--fs-base); line-height: 1.4; font-weight: 600; color: var(--fg-strong); margin: 1.6rem 0 0; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.7em; }
.prose p, .prose li { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--fg-muted); }
.prose strong { color: var(--fg-strong); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.heading-anchor { opacity: 0; margin-left: 4px; color: var(--fg-faint); text-decoration: none; font-weight: 500; transition: opacity 0.15s ease; }
h2:hover .heading-anchor, h3:hover .heading-anchor, .heading-anchor:focus-visible { opacity: 1; }
code { font-family: var(--font-mono); font-size: 0.875em; background: var(--bg-sunken); border: 1px solid var(--border-soft); border-radius: 5px; padding: 0.08em 0.38em; color: var(--fg-strong); overflow-wrap: anywhere; }
kbd { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1; display: inline-block; padding: 3px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--fg-secondary); }
.ui { font-weight: 600; color: var(--fg-strong); background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 6px; padding: 0.05em 0.42em; font-size: 0.94em; white-space: nowrap; }
a.ui { color: var(--brand-strong); background: var(--brand-tint); border-color: var(--brand-line); text-decoration: none; transition: border-color 0.15s ease, background-color 0.15s ease; }
a.ui:hover { border-color: var(--brand); background: var(--brand-soft); }
.uipath { display: inline; }
.uipath .ui + .ui::before { content: "›"; display: inline-block; margin: 0 0.45em 0 0.1em; color: var(--fg-faint); font-weight: 400; }
.uipath .ui { margin-right: 0.15em; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.92em; }

/* code block */
.codeblock { position: relative; background: var(--code-bg); border-radius: var(--r-md); border: 1px solid var(--border); }
.codeblock pre { margin: 0; padding: 16px 18px; overflow-x: auto; color: var(--code-fg); font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.7; }
.codeblock pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.codeblock .k { color: var(--code-key); } .codeblock .s { color: var(--code-str); } .codeblock .c { color: var(--code-dim); }
.codeblock-label { display: block; padding: 8px 18px 0; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--code-dim); letter-spacing: 0.04em; text-transform: uppercase; }
.copy-btn { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06); color: #d6dbe4; font-size: 0.75rem; cursor: pointer; }
.copy-btn:hover { background: rgba(255,255,255,0.12); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.55; }
.table-wrap th { text-align: left; font-weight: 600; font-size: 0.8125rem; color: var(--fg-secondary); background: var(--bg-subtle); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table-wrap td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child { color: var(--fg-strong); font-weight: 500; }
.table-wrap td p { margin: 0; }
.table-wrap.compact td, .table-wrap.compact th { padding: 8px 12px; }
.yes { color: var(--ok-fg); font-weight: 600; } .no { color: var(--nok-fg); font-weight: 600; } .part { color: var(--warn-fg); font-weight: 600; }

/* ───────── components ───────── */

/* At a glance — the page's fact sheet (also the machine-readable summary) */
.facts { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.facts-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border-soft); background: var(--bg-subtle); }
.facts-head h2, .facts-head p { all: unset; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts dl > div { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); min-width: 0; }
.facts dl > div:nth-child(odd) { border-right: 1px solid var(--border-soft); }
.facts dl > div.wide { grid-column: 1 / -1; border-right: 0; }
.facts dl > div:nth-last-child(-n+2):not(.wide), .facts dl > div:last-child { border-bottom: 0; }
.facts dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: var(--fs-sm); color: var(--fg-strong); line-height: 1.55; }

/* callouts */
.callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--info-line); background: var(--info-bg); color: var(--fg); font-size: 0.9375rem; }
.callout > .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--info-solid); grid-row: span 2; }
.callout-title { margin: 0; font-weight: 600; color: var(--info-fg); }
.callout-body > * { margin: 0; } .callout-body > * + * { margin-top: 0.5em; }
.callout-body ul, .callout-body ol { padding-left: 1.2em; }
.callout.tip { border-color: var(--ok-line); background: var(--ok-bg); } .callout.tip > .icon { color: var(--ok-solid); } .callout.tip .callout-title { color: var(--ok-fg); }
.callout.warn { border-color: var(--warn-line); background: var(--warn-bg); } .callout.warn > .icon { color: var(--warn-solid); } .callout.warn .callout-title { color: var(--warn-fg); }
.callout.danger { border-color: var(--nok-line); background: var(--nok-bg); } .callout.danger > .icon { color: var(--nok-solid); } .callout.danger .callout-title { color: var(--nok-fg); }
.callout.ai { border-color: var(--ai-line); background: var(--ai-bg); } .callout.ai > .icon { color: var(--ai-solid); } .callout.ai .callout-title { color: var(--ai-fg); }
.callout.reseller { border-color: var(--border); background: var(--bg-subtle); border-left: 3px solid var(--warn-solid); } .callout.reseller > .icon { color: var(--warn-solid); } .callout.reseller .callout-title { color: var(--fg-strong); }

/* numbered procedure — the numbers are the order you do things in */
.steps { list-style: none; padding: 0 !important; margin-left: 0; counter-reset: step; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.steps > li { position: relative; counter-increment: step; padding: 0 0 26px 50px; max-width: none; min-width: 0; }
.steps > li + li { margin-top: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600;
  background: var(--surface); color: var(--brand); border: 1.5px solid var(--brand-line);
}
.steps > li::after { content: ""; position: absolute; left: 15.5px; top: 36px; bottom: 6px; width: 1px; background: var(--border); }
.steps > li:last-child { padding-bottom: 4px; } .steps > li:last-child::after { display: none; }
.steps > li > h4 { margin: 3px 0 4px; font-size: var(--fs-base); }
.steps > li > p, .steps > li > ul { margin: 6px 0 0; }
.steps > li > .callout, .steps > li > .table-wrap, .steps > li > .codeblock, .steps > li > figure { margin-top: 12px; }
.result { position: relative; padding-left: 24px; margin-top: 8px; font-size: var(--fs-sm); color: var(--ok-fg); }
.result .icon { position: absolute; left: 0; top: 0.28em; color: var(--ok-solid); }

/* journey map (Discover → … → Maintain); arrows mean "feeds into" */
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; padding: 0; margin-left: 0; list-style: none; }
.flow li { flex: 1 1 100px; min-width: 0; max-width: none; margin: 0 !important; position: relative; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.flow li b { display: block; color: var(--fg-strong); font-size: var(--fs-sm); }
.flow li span { display: block; color: var(--fg-muted); font-size: 0.8125rem; line-height: 1.45; margin-top: 2px; }
.flow li.is-here { border-color: var(--brand); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand); }
.flow li.is-here b { color: var(--brand-strong); }
.flow li .flow-no { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--fg-muted); display: block; margin-bottom: 2px; }

/* "start from your question": three entry columns on a section overview */
.ask { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ask > div { min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.ask-title { margin: 0 0 8px !important; display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs) !important; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-muted); }
.ask-title .icon { width: 15px; height: 15px; }
.ask ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 0.9375rem; line-height: 1.4; }
.ask li { margin: 0 !important; }
.ask .do .ask-title { color: var(--info-fg); } .ask .fix .ask-title { color: var(--nok-fg); } .ask .why .ask-title { color: var(--ai-fg); }

/* card grids */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: inherit; text-decoration: none; min-width: 0; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
a.card:hover { border-color: var(--brand-line); box-shadow: var(--shadow-card); }
.card-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); }
.card-title { font-weight: 600; color: var(--fg-strong); font-size: var(--fs-base); line-height: 1.35; }
.card p { margin: 0; font-size: var(--fs-sm); color: var(--fg-secondary); }
.card .icon { width: 16px; height: 16px; }
.card.choose-a { border-top: 3px solid var(--brand); }
.card-meta { margin-top: auto; padding-top: 6px; font-size: var(--fs-xs); color: var(--fg-muted); display: flex; gap: 10px; flex-wrap: wrap; }

/* do / don't */
.dodont { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dodont > div { border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface); min-width: 0; }
.dodont h4 { margin: 0 0 8px !important; display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm) !important; letter-spacing: 0.04em; text-transform: uppercase; }
.dodont .do h4 { color: var(--ok-fg); } .dodont .dont h4 { color: var(--nok-fg); }
.dodont ul { margin: 0; padding-left: 1.1em; font-size: 0.9375rem; }
.dodont li + li { margin-top: 0.45em; }

/* formula — how a number is calculated */
.formula { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.formula-head { padding: 12px 18px; border-bottom: 1px solid var(--border-soft); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.formula-head b { color: var(--fg-strong); }
.formula-head span { color: var(--fg-muted); font-size: var(--fs-sm); }
.formula-expr { margin: 0; padding: 14px 18px; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--fg-strong); background: var(--bg-subtle); border-bottom: 1px solid var(--border-soft); overflow-x: auto; white-space: pre; line-height: 1.7; }
.formula-body { padding: 14px 18px; font-size: 0.9375rem; }
.formula-body > * { margin: 0; } .formula-body > * + * { margin-top: 0.6em; }
.formula-body .table-wrap { margin-top: 10px; }

/* troubleshooting + FAQ disclosures */
.issues, .faqs { display: grid; gap: 8px; }
details.issue, details.faq { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
details.issue > summary, details.faq > summary {
  list-style: none; cursor: pointer; display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; font-weight: 600; color: var(--fg-strong); line-height: 1.45; border-radius: var(--r-md);
}
details > summary::-webkit-details-marker { display: none; }
details.issue > summary .chev, details.faq > summary .chev { margin-left: auto; margin-top: 3px; color: var(--fg-muted); transition: transform 0.2s ease; flex: none; }
details[open] > summary .chev { transform: rotate(90deg); }
details.issue > summary:hover, details.faq > summary:hover { background: var(--bg-subtle); }
details[open].issue > summary, details[open].faq > summary { border-bottom: 1px solid var(--border-soft); border-radius: var(--r-md) var(--r-md) 0 0; }
.issue-body, .faq-body { padding: 12px 16px 16px; font-size: 0.9375rem; }
.issue-body > * , .faq-body > * { margin: 0; } .issue-body > * + *, .faq-body > * + * { margin-top: 0.6em; }
.issue-body dl { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.issue-body dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); padding-top: 3px; }
.issue-body dd { margin: 0; }
.issue-body dd ol, .issue-body dd ul { margin: 0; padding-left: 1.2em; }
.sev { flex: none; margin-top: 1px; }
.faq-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filter-chip { height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg-secondary); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; }
.filter-chip:hover { border-color: var(--fg-muted); color: var(--fg-strong); }
.filter-chip[aria-pressed="true"] { background: var(--fg-strong); border-color: var(--fg-strong); color: var(--bg); }
.faq .aud { margin-left: 8px; }

/* media placeholders — screenshots and videos are added later; the slot keeps their place */
figure.shot, figure.video { margin-left: 0; margin-right: 0; }
.shot-frame, .video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 220px; overflow: hidden;
  display: grid; place-items: center; text-align: center;
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); background: var(--bg-subtle); color: var(--fg-muted);
}
.ph-inner { display: grid; justify-items: center; gap: 6px; padding: 16px; max-width: 32rem; }
.ph-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--fg-secondary); }
.ph-icon .icon { width: 19px; height: 19px; }
.ph-tag { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-muted); }
.ph-title { font-size: var(--fs-sm); font-weight: 600; color: var(--fg-strong); line-height: 1.4; }
.ph-id, .ph-dur { position: absolute; top: 10px; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--fg-muted); }
.ph-id { left: 12px; } .ph-dur { right: 12px; }
.shot-frame.has-media, .video-frame.has-media { aspect-ratio: auto; max-height: none; border: 1px solid var(--border); background: none; display: block; }
.shot-frame img { display: block; width: 100%; height: auto; }
.video-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
figure.shot figcaption, figure.video figcaption { margin-top: 8px; font-size: var(--fs-sm); color: var(--fg-muted); }
ul.onscreen { font-size: 0.9375rem; }

/* glossary */
dl.glossary { margin: 0; display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
dl.glossary dt, dl.glossary dd { margin: 0; padding: 11px 16px; border-bottom: 1px solid var(--border-soft); font-size: 0.9375rem; }
dl.glossary dt { font-weight: 600; color: var(--fg-strong); background: var(--bg-subtle); }
dl.glossary dt:last-of-type, dl.glossary dd:last-of-type { border-bottom: 0; }

/* page footer */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 56px; }
.pager a { display: grid; gap: 2px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--r-md); text-decoration: none; color: inherit; min-width: 0; transition: border-color 0.15s ease; }
.pager a:hover { border-color: var(--brand-line); }
.pager .dir { font-size: var(--fs-xs); color: var(--fg-muted); }
.pager .ttl { font-weight: 600; color: var(--brand); }
.pager .next { text-align: right; grid-column: 2; }
.helpbox { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 18px 20px; border-radius: var(--r-md); background: var(--bg-subtle); border: 1px solid var(--border); }
.helpbox p { margin: 0; flex: 1 1 260px; font-size: 0.9375rem; color: var(--fg-secondary); }
.helpbox p b { color: var(--fg-strong); display: block; }
.helpbox .addr { font-family: var(--font-mono); font-size: var(--fs-sm); user-select: all; color: var(--fg-strong); }
.site-foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--fg-muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--fg-muted); }

/* ───────── search dialog ───────── */
.search-dialog { position: fixed; inset: 0; z-index: 80; display: none; }
.search-dialog.is-open { display: block; }
.search-scrim { position: absolute; inset: 0; background: var(--scrim); }
.search-panel {
  position: relative; margin: max(10vh, 24px) auto 0; width: min(640px, calc(100% - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  overflow: hidden; display: flex; flex-direction: column; max-height: min(640px, 80vh);
}
.search-field { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.search-field .icon { width: 18px; height: 18px; color: var(--fg-muted); }
.search-field input:focus-visible { box-shadow: none; }
.search-field input { flex: 1; height: 56px; border: 0; outline: none; background: transparent; color: var(--fg-strong); font: inherit; font-size: 1.0625rem; min-width: 0; }
.search-results { overflow-y: auto; padding: 8px; list-style: none; margin: 0; }
.search-results li a { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); text-decoration: none; color: inherit; }
.search-results li a .r-path { font-size: var(--fs-xs); color: var(--fg-muted); }
.search-results li a .r-title { font-weight: 600; color: var(--fg-strong); }
.search-results li a .r-snip { font-size: 0.8125rem; color: var(--fg-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-results li a mark { background: var(--warn-bg); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-results li a.is-active, .search-results li a:hover { background: var(--brand-soft); }
.search-empty { padding: 22px 18px; color: var(--fg-secondary); font-size: var(--fs-sm); }
.search-empty p { margin: 0 0 10px; }
.search-empty button { margin: 0 6px 6px 0; }
.search-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--fg-muted); }

/* ───────── responsive ───────── */
@media (max-width: 1240px) {
  .ask { grid-template-columns: minmax(0, 1fr); }
  .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 920px) {
  .shell { display: block; }
  .menu-btn { display: inline-grid; }
  .sidebar {
    position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; height: auto; width: min(320px, 86vw);
    background: var(--bg); border-right: 1px solid var(--border); box-shadow: var(--shadow-pop);
    transform: translateX(-102%); transition: transform 0.22s ease; padding-top: calc(20px + env(safe-area-inset-top, 0px));
  }
  .sidebar.is-open { transform: none; }
  .nav-scrim { position: fixed; inset: 0; z-index: 65; background: var(--scrim); }
  .main { padding-block-start: 28px; }
  .brand-docs { display: none; }
  .search-trigger { width: auto; flex: 1; max-width: 360px; }
}
@media (max-width: 640px) {
  :root { --fs-2xl: 1.75rem; --fs-xl: 1.3125rem; --fs-md: 1.0625rem; }
  .facts dl, .dodont, .pager, .ask { grid-template-columns: minmax(0, 1fr); }
  .facts dl > div { border-right: 0 !important; }
  .facts dl > div:nth-last-child(-n+2):not(.wide) { border-bottom: 1px solid var(--border-soft); }
  .facts dl > div:last-child { border-bottom: 0; }
  .pager .next { grid-column: 1; }
  .ui { white-space: normal; }
  .header-app span { display: none; }
  .search-trigger kbd, .search-trigger span { display: none; }
  .search-trigger { flex: none; width: 40px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .issue-body dl { grid-template-columns: 1fr; gap: 2px; }
  .issue-body dd { margin-bottom: 8px; }
  dl.glossary { grid-template-columns: 1fr; }
  dl.glossary dt { border-bottom: 0; padding-bottom: 2px; }
  dl.glossary dd { padding-top: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* spoken text of a video, under the player */
details.transcript { margin-top: 8px; font-size: 0.92em; color: var(--fg-muted); }
details.transcript > summary { cursor: pointer; font-weight: 600; color: var(--fg); list-style: none; }
details.transcript > summary::before { content: '▸ '; }
details.transcript[open] > summary::before { content: '▾ '; }
details.transcript > p { margin: 6px 0 0; line-height: 1.55; }
