/* AuthGuard help centre (tools/kb/site). The design language of the landing (authguard.pt): the same
   type stacks, palette, sharp corners, clipped buttons, mono kickers with a signal rule, grid backdrop
   and motion curve. Self-hosted, strict CSP (no inline styles), light and dark, reduced motion. */

:root {
  --display: "Aptos Display", "Segoe UI Variable Display", "SF Pro Display", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --text: "Aptos", "Segoe UI Variable Text", "SF Pro Text", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", "SF Mono", ui-monospace, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 4.5vw, 72px);
  --edge: clamp(16px, 2vw, 28px);
  --max: 1280px;
  --top-h: 64px;
  --side-w: 296px;
  --rail-w: 232px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --cut: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);

  /* AuthGuard, light ("porcelain paper") */
  color-scheme: light;
  --bg: #f4f1ea; --bg-2: #ebe7de; --bg-3: #e1dcd0; --surface: #fbfaf6;
  --fg: #0d0d0b; --fg-2: #2b2925; --dim: #4f4b43; --mute: #686359;
  --line: #dbd5c8; --line-strong: #b3ab9b;
  --accent: #e8291d; --accent-ink: #b8231a; --accent-deep: #efc8c2; --accent-wash: rgba(232, 41, 29, .07);
  --btn-bg: #ff3b30; --btn-fg: #120403; --btn-glow: rgba(255, 59, 48, .45);
  --glow: rgba(255, 59, 48, .13); --hot-grad: linear-gradient(160deg, rgba(255, 59, 48, .12), transparent 70%);
  --chip-bg: rgba(255, 59, 48, .06); --code-bg: #ebe7de; --top-bg: rgba(244, 241, 234, .86);
  --mark-a: #0d0d0b; --mark-b: #e8291d; --shadow: 0 30px 60px -30px rgba(40, 30, 20, .35);
  --scrim: rgba(13, 13, 11, .45);
}
:root[data-brand="neutral"] {
  --bg: #f5f6f8; --bg-2: #eceef2; --bg-3: #e2e5eb; --surface: #ffffff;
  --fg: #0f1115; --fg-2: #2a2e37; --dim: #4a505c; --mute: #616876;
  --line: #d9dde4; --line-strong: #aab1be;
  --accent: #2453d6; --accent-ink: #1f47b8; --accent-deep: #c9d5f5; --accent-wash: rgba(36, 83, 214, .07);
  --btn-bg: #2453d6; --btn-fg: #ffffff; --btn-glow: rgba(36, 83, 214, .4);
  --glow: rgba(36, 83, 214, .12); --hot-grad: linear-gradient(160deg, rgba(36, 83, 214, .1), transparent 70%);
  --chip-bg: rgba(36, 83, 214, .06); --code-bg: #eceef2; --top-bg: rgba(245, 246, 248, .86);
  --mark-a: #0f1115; --mark-b: #2453d6;
}
/* Dark: the landing's own palette. Repeated for the system choice and for the header switch. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #090908; --bg-2: #11110f; --bg-3: #1a1a17; --surface: #0e0e0c;
    --fg: #f2efe7; --fg-2: #d6d2c8; --dim: #bbb7ac; --mute: #8f8b82;
    --line: #2a2926; --line-strong: #55524b;
    --accent: #ff3b30; --accent-ink: #ff6a61; --accent-deep: #451510; --accent-wash: rgba(255, 59, 48, .09);
    --btn-bg: #ff3b30; --btn-fg: #120403; --btn-glow: #ff3b30;
    --glow: rgba(255, 59, 48, .18); --hot-grad: linear-gradient(160deg, rgba(69, 21, 16, .7), transparent 70%);
    --chip-bg: rgba(69, 21, 16, .45); --code-bg: #141412; --top-bg: rgba(9, 9, 8, .82);
    --mark-a: #f2efe7; --mark-b: #ff3b30; --shadow: 0 40px 80px -40px #000;
    --scrim: rgba(0, 0, 0, .6);
  }
  :root[data-brand="neutral"]:not([data-theme="light"]) {
    --bg: #0c0d10; --bg-2: #12141a; --bg-3: #1a1d25; --surface: #0f1115;
    --fg: #eef0f5; --fg-2: #d3d7e0; --dim: #b3b8c4; --mute: #8a909c;
    --line: #252933; --line-strong: #4a5060;
    --accent: #5b8cff; --accent-ink: #8fb0ff; --accent-deep: #1b2850; --accent-wash: rgba(91, 140, 255, .1);
    --btn-bg: #5b8cff; --btn-fg: #050a1a; --btn-glow: #5b8cff;
    --glow: rgba(91, 140, 255, .16); --hot-grad: linear-gradient(160deg, rgba(27, 40, 80, .8), transparent 70%);
    --chip-bg: rgba(27, 40, 80, .45); --code-bg: #14161c; --top-bg: rgba(12, 13, 16, .82);
    --mark-a: #eef0f5; --mark-b: #5b8cff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090908; --bg-2: #11110f; --bg-3: #1a1a17; --surface: #0e0e0c;
  --fg: #f2efe7; --fg-2: #d6d2c8; --dim: #bbb7ac; --mute: #8f8b82;
  --line: #2a2926; --line-strong: #55524b;
  --accent: #ff3b30; --accent-ink: #ff6a61; --accent-deep: #451510; --accent-wash: rgba(255, 59, 48, .09);
  --btn-bg: #ff3b30; --btn-fg: #120403; --btn-glow: #ff3b30;
  --glow: rgba(255, 59, 48, .18); --hot-grad: linear-gradient(160deg, rgba(69, 21, 16, .7), transparent 70%);
  --chip-bg: rgba(69, 21, 16, .45); --code-bg: #141412; --top-bg: rgba(9, 9, 8, .82);
  --mark-a: #f2efe7; --mark-b: #ff3b30; --shadow: 0 40px 80px -40px #000;
  --scrim: rgba(0, 0, 0, .6);
}
:root[data-brand="neutral"][data-theme="dark"] {
  --bg: #0c0d10; --bg-2: #12141a; --bg-3: #1a1d25; --surface: #0f1115;
  --fg: #eef0f5; --fg-2: #d3d7e0; --dim: #b3b8c4; --mute: #8a909c;
  --line: #252933; --line-strong: #4a5060;
  --accent: #5b8cff; --accent-ink: #8fb0ff; --accent-deep: #1b2850; --accent-wash: rgba(91, 140, 255, .1);
  --btn-bg: #5b8cff; --btn-fg: #050a1a; --btn-glow: #5b8cff;
  --glow: rgba(91, 140, 255, .16); --hot-grad: linear-gradient(160deg, rgba(27, 40, 80, .8), transparent 70%);
  --chip-bg: rgba(27, 40, 80, .45); --code-bg: #14161c; --top-bg: rgba(12, 13, 16, .82);
  --mark-a: #eef0f5; --mark-b: #5b8cff;
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 24px); }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--btn-fg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 120; background: var(--btn-bg); color: var(--btn-fg); padding: 8px 14px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }
.mono { font-family: var(--mono); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; font: 500 11px/1 var(--mono);
  color: var(--mute); border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--bg);
}

/* ---- type ---- */
.kicker {
  display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font: 500 12.5px/1.5 var(--mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
}
.rule { width: 46px; height: 2px; background: var(--accent); flex: none; }
.display { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -.045em; line-height: .9; margin: 0; color: var(--fg); }
.display .line { display: block; }
.hot { color: var(--accent); }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--dim); max-width: 62ch; margin: 22px 0 0; }
.h2 { font-size: clamp(36px, 5.2vw, 76px); }
.mini-h {
  display: flex; align-items: center; gap: 14px; margin: 64px 0 20px; font: 500 12.5px/1.4 var(--mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
}
.mini-h::before { content: ""; width: 24px; height: 2px; background: var(--accent); flex: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; font: 700 16px/1 var(--text); cursor: pointer;
  border: 1px solid var(--btn-bg); clip-path: var(--cut); white-space: nowrap;
  transition: transform .25s var(--ease), background .2s, box-shadow .25s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--btn-glow); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--fg); box-shadow: none; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn .btn-icon { width: 16px; height: 16px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--fg); text-decoration: none;
  transition: border-color .2s, background .2s, transform .25s var(--ease);
}
.icon-btn:hover { border-color: var(--fg); }
.icon-btn .icon { width: 18px; height: 18px; }
.mini-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; cursor: pointer;
  font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim);
  border: 1px solid var(--line-strong); background: transparent; transition: color .2s, border-color .2s;
}
.mini-btn:hover { color: var(--fg); border-color: var(--fg); }
.mini-btn .icon { width: 13px; height: 13px; }
.mini-btn.done { color: var(--accent-ink); border-color: var(--accent); }

/* ---- top bar ---- */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--top-h); display: flex; align-items: center; gap: 18px;
  padding: 0 var(--edge); background: var(--top-bg); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; text-decoration: none; color: var(--fg); font: 800 19px/1 var(--display); letter-spacing: -.02em; }
.mark { width: 34px; height: 20px; flex: none; }
.mark-a { fill: var(--mark-a); }
.mark-b { fill: var(--mark-b); transition: transform .5s var(--ease); }
.brand:hover .mark-b { transform: translateX(2px); }
.brand-sub {
  display: inline-flex; align-items: center; height: 22px; margin-left: 4px; padding-left: 13px; border-left: 1px solid var(--line-strong);
  font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
}
.top-search {
  position: relative; display: flex; align-items: center; flex: 0 1 400px; min-width: 200px; height: 40px; margin-left: 22px;
  border: 1px solid var(--line-strong); background: var(--bg-2); transition: border-color .2s, background .2s;
}
.top-search:hover { border-color: var(--dim); }
.top-search:focus-within { border-color: var(--accent); }
.top-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0 8px 0 40px; border: 0; background: transparent; outline: 0;
  font-size: 14.5px; color: var(--fg); -webkit-appearance: none; appearance: none;
}
.top-search input::placeholder { color: var(--mute); }
.top-search input::-webkit-search-cancel-button { display: none; }
.ts-icon { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--mute); pointer-events: none; }
.ts-keys { display: flex; gap: 4px; padding-right: 9px; }
.top-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.top-nav a { position: relative; text-decoration: none; color: var(--dim); font-size: 15px; transition: color .2s; white-space: nowrap; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--fg); }
.top-nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--accent); }
.top-tools { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex; height: 40px; border: 1px solid var(--line-strong); text-decoration: none;
  font: 600 12px/1 var(--mono); letter-spacing: .08em; transition: border-color .2s;
}
.lang-switch:hover { border-color: var(--fg); }
.ls-opt { display: grid; place-items: center; width: 38px; color: var(--mute); transition: color .2s, background .2s; }
.ls-opt.on { color: var(--fg); background: var(--bg-3); box-shadow: inset 0 -2px var(--accent); }
.lang-switch:hover .ls-opt:not(.on) { color: var(--fg); }
.theme-toggle svg { display: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.theme-toggle .i-auto { display: block; }
:root[data-theme="light"] .theme-toggle .i-auto, :root[data-theme="dark"] .theme-toggle .i-auto { display: none; }
:root[data-theme="light"] .theme-toggle .i-light, :root[data-theme="dark"] .theme-toggle .i-dark { display: block; }
.site-link { margin-left: 4px; }
.nav-toggle { display: none; }
.nav-toggle .i-close { display: none; }
.search-icon { display: none; }
.route-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 130; background: var(--accent); pointer-events: none;
  transform: scaleX(0); transform-origin: 0 50%; opacity: 0;
}
.is-loading .route-progress { opacity: 1; animation: progress 2.4s var(--ease) forwards; }
.is-loaded .route-progress { opacity: 0; transform: scaleX(1); transition: opacity .35s .15s, transform .2s; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(.9); } }

/* ---- layout ---- */
.layout {
  display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--rail-w); align-items: start;
  max-width: 1600px; margin: 0 auto; min-height: calc(100vh - var(--top-h));
}
.layout[data-layout="wide"] { grid-template-columns: var(--side-w) minmax(0, 1fr); }
.layout[data-layout="wide"] .rail { display: none; }
.layout[data-layout="home"] { display: block; max-width: none; }
.layout[data-layout="home"] .sidebar, .layout[data-layout="home"] .rail { display: none; }
.main { position: relative; min-width: 0; outline: 0; overflow-x: clip; }
.layout:not([data-layout="home"]) .main::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 460px; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 70% 100% at 50% 0, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 0, #000 10%, transparent 75%);
}
.layout:not([data-layout="home"]) .main::after {
  content: ""; position: absolute; right: -8%; top: -160px; width: 620px; height: 620px; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), transparent 70%); opacity: .7;
}
.main > * { position: relative; z-index: 1; }
.main.is-entering > * { animation: enter .34s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

/* ---- sidebar ---- */
.sidebar {
  position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: var(--bg);
}
.side-scroll {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 14px 48px 18px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.side-filter { position: relative; margin: 0 0 18px; }
.side-filter .icon { position: absolute; left: 11px; top: 11px; width: 15px; height: 15px; color: var(--mute); pointer-events: none; }
.side-filter input {
  width: 100%; height: 38px; padding: 0 10px 0 34px; border: 1px solid var(--line-strong); background: var(--bg-2); outline: 0;
  font: 500 13px/1 var(--mono); color: var(--fg); transition: border-color .2s; -webkit-appearance: none; appearance: none;
}
.side-filter input::placeholder { color: var(--mute); }
.side-filter input:focus { border-color: var(--accent); }
.side-quick ul { list-style: none; margin: 0 0 14px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.side-quick a {
  display: flex; align-items: center; gap: 12px; padding: 7px 10px; text-decoration: none; color: var(--dim); font-size: 14.5px;
  border-left: 2px solid transparent; transition: color .2s, background .2s;
}
.side-quick a .icon { width: 16px; height: 16px; color: var(--mute); transition: color .2s; }
.side-quick a:hover { color: var(--fg); }
.side-quick a:hover .icon, .side-quick a[aria-current] .icon { color: var(--accent); }
.side-quick a[aria-current] { color: var(--fg); font-weight: 600; border-left-color: var(--accent); background: var(--accent-wash); }
.sg { border-bottom: 1px solid var(--line); }
.sg > summary, .sa > summary { list-style: none; cursor: pointer; -webkit-user-select: none; user-select: none; }
.sg > summary::-webkit-details-marker, .sa > summary::-webkit-details-marker { display: none; }
.sg > summary {
  display: flex; align-items: center; gap: 11px; padding: 13px 8px 13px 10px;
  font: 600 12px/1.25 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); transition: color .2s;
}
.sg > summary:hover, .sg[open] > summary { color: var(--fg); }
.sg > summary::after {
  content: ""; width: 7px; height: 7px; margin: 0 4px 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform .25s var(--ease); flex: none; opacity: .7;
}
.sg[open] > summary::after { transform: rotate(45deg) translate(-2px, -2px); }
.sg-icon { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line-strong); color: var(--mute); flex: none; transition: color .2s, border-color .2s; }
.sg-icon .icon { width: 14px; height: 14px; }
.sg[open] > summary .sg-icon { color: var(--accent); border-color: var(--accent-deep); }
.sg-name { flex: 1; min-width: 0; }
.sg-count, .sa-count { margin-left: auto; font: 500 11px/1 var(--mono); color: var(--mute); letter-spacing: .04em; }
.sg-body { padding: 0 0 14px; }
.sg-overview {
  display: block; margin: 0 0 4px; padding: 6px 10px 6px 47px; font-size: 14px; text-decoration: none; color: var(--dim);
  border-left: 2px solid transparent; transition: color .2s;
}
.sg-overview:hover { color: var(--fg); }
.sg-overview[aria-current] { color: var(--fg); font-weight: 600; border-left-color: var(--accent); background: var(--accent-wash); }
.sa > summary { display: flex; align-items: center; gap: 9px; padding: 6px 8px 6px 18px; font-size: 14px; line-height: 1.35; color: var(--fg-2); transition: color .2s; }
.sa > summary::before {
  content: ""; width: 5px; height: 5px; border-right: 1.5px solid var(--mute); border-bottom: 1.5px solid var(--mute);
  transform: rotate(-45deg); transition: transform .25s var(--ease); flex: none; margin-right: 5px;
}
.sa[open] > summary::before { transform: rotate(45deg) translate(-1px, -1px); }
.sa > summary:hover { color: var(--fg); }
.sa-name { flex: 1; min-width: 0; }
.sa ul { list-style: none; margin: 2px 0 8px 23px; padding: 0; border-left: 1px solid var(--line); }
.sa li a {
  display: block; margin-left: -1px; padding: 5px 8px 5px 15px; border-left: 1px solid transparent;
  font-size: 13.5px; line-height: 1.42; color: var(--dim); text-decoration: none; transition: color .15s, border-color .15s, background .15s;
}
.sa li a:hover { color: var(--fg); border-left-color: var(--line-strong); }
.sa li a[aria-current] { color: var(--fg); font-weight: 600; border-left: 2px solid var(--accent); padding-left: 14px; background: var(--accent-wash); }
.sa li a.pending::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; vertical-align: .1em; border: 1px solid var(--mute); transform: rotate(45deg); }
.sa li a code { font-size: .92em; }
.sidebar mark { background: transparent; color: var(--accent-ink); font-weight: 700; }
.side-empty { margin: 16px 10px; font-size: 13.5px; color: var(--mute); }
.side-foot { display: none; }

/* ---- rail ---- */
.rail { position: sticky; top: var(--top-h); max-height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 44px 22px 40px 8px; scrollbar-width: none; }
.toc-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 500 11.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.toc-kicker .rule { width: 22px; }
.toc { position: relative; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; font-size: 13.5px; line-height: 1.38; color: var(--mute); text-decoration: none; transition: color .2s; }
.toc a:hover { color: var(--fg); }
.toc a.active { color: var(--fg); }
.toc-marker {
  position: absolute; left: 0; top: 0; width: 2px; height: var(--h, 0); background: var(--accent); opacity: 0;
  transform: translateY(var(--y, 0)); transition: transform .35s var(--ease), height .35s var(--ease), opacity .2s;
}
.toc.has-active .toc-marker { opacity: 1; }
.toc code { font-size: .9em; }
.rail-actions { display: grid; gap: 2px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.rail-btn {
  display: flex; align-items: center; gap: 10px; padding: 6px 0; border: 0; background: none; cursor: pointer; text-align: left;
  font: 500 12px/1.3 var(--mono); letter-spacing: .04em; color: var(--mute); text-decoration: none; transition: color .2s;
}
.rail-btn:hover { color: var(--fg); }
.rail-btn .icon { width: 14px; height: 14px; }
.rail-btn.done { color: var(--accent-ink); }

/* ---- documents ---- */
.doc { max-width: 780px; margin: 0 auto; padding: 34px clamp(20px, 3.4vw, 56px) 104px; }
.doc-wide { max-width: 1140px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0 0 30px; padding: 0; font: 500 11.5px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.crumbs li { display: flex; align-items: center; color: var(--mute); }
.crumbs li + li::before { content: "/"; margin: 0 11px; color: var(--line-strong); }
.crumbs a { color: var(--mute); text-decoration: none; transition: color .2s; }
.crumbs a:hover { color: var(--fg); }
.crumbs [aria-current] { color: var(--dim); }
.doc-head > * { animation: rise .7s var(--ease) both; }
.doc-head > :nth-child(2) { animation-delay: .05s; }
.doc-head > :nth-child(3) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.doc-head h1 {
  margin: 0; font: 800 clamp(32px, 3.3vw, 48px)/1.04 var(--display); letter-spacing: -.035em; color: var(--fg);
  text-wrap: balance; outline: 0;
}
.doc-head h1 code { font-size: .8em; }
.doc-head .lead { margin-top: 18px; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; list-style: none; margin: 20px 0 0; padding: 0; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.doc-meta li { display: inline-flex; align-items: center; gap: 7px; }
.doc-meta li + li::before { content: ""; width: 4px; height: 4px; margin: 0 14px; background: var(--line-strong); transform: rotate(45deg); }
.doc-meta .icon { width: 14px; height: 14px; color: var(--accent); }
.page-head { margin-bottom: 8px; }
.page-title { font-size: clamp(40px, 5vw, 76px); outline: 0; }
.page-head .lead { max-width: 64ch; }

/* ---- prose ---- */
.prose { margin-top: 36px; font-size: 17px; line-height: 1.75; color: var(--fg-2); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2 {
  position: relative; margin: 2.6em 0 .8em; padding-top: 24px; border-top: 1px solid var(--line);
  font: 800 clamp(23px, 2.2vw, 29px)/1.18 var(--display); letter-spacing: -.025em; color: var(--fg); text-wrap: balance;
}
.prose h2::before { content: ""; position: absolute; left: 0; top: -1px; width: 46px; height: 2px; background: var(--accent); }
.prose h3 { margin: 2em 0 .55em; font: 700 20px/1.28 var(--display); letter-spacing: -.015em; color: var(--fg); }
.prose h4 { margin: 1.8em 0 .5em; font: 600 12.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { color: var(--fg); font-weight: 650; }
.prose ul { list-style: none; margin: 0 0 1.2em; padding: 0; }
.prose ul > li { position: relative; padding-left: 24px; margin: 0 0 .45em; }
.prose ul > li::before { content: ""; position: absolute; left: 3px; top: .68em; width: 7px; height: 7px; background: var(--line-strong); transform: rotate(45deg); }
.prose ol { list-style: none; counter-reset: step; margin: 1.5em 0 1.6em; padding: 0; }
.prose ol > li { counter-increment: step; position: relative; min-height: 34px; padding: 3px 0 20px 54px; }
.prose ol > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; z-index: 1; display: grid; place-items: center;
  width: 34px; height: 34px; font: 600 12px/1 var(--mono); color: var(--accent-ink); border: 1px solid var(--line-strong); background: var(--bg);
}
.prose ol > li::after { content: ""; position: absolute; left: 17px; top: 35px; bottom: 0; width: 1px; background: var(--line); }
.prose ol > li:last-child { padding-bottom: 2px; }
.prose ol > li:last-child::after { display: none; }
.prose ol > li > ul { margin: .6em 0 0; }
.prose ol[start] { list-style: decimal; padding-left: 1.4em; }
.prose ol[start] > li { padding-left: 6px; min-height: 0; padding-bottom: .5em; }
.prose ol[start] > li::before, .prose ol[start] > li::after { display: none; }
.prose code, .doc code, .acard code, .sidebar code, .toc code, .results code, .pal-item code {
  font-family: var(--mono); font-size: .86em; padding: .1em .38em; color: var(--accent-ink); background: var(--accent-wash);
  border: 1px solid var(--line); overflow-wrap: anywhere;
}
/* «Labels» copied from the product: the guillemets are the convention; in the text they are only
   set in a heavier weight on a barely visible tint (no box), and plain words in titles and lists. */
.prose .label, .callout .label {
  font-weight: 600; color: var(--fg); background: color-mix(in srgb, var(--fg) 3.5%, transparent); padding: 0 .08em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.code { position: relative; margin: 1.5em 0 1.7em; border: 1px solid var(--line-strong); background: var(--code-bg); }
.code::before { content: ""; position: absolute; left: -1px; top: -1px; width: 46px; height: 2px; background: var(--accent); z-index: 1; }
.code pre { margin: 0; padding: 20px 22px; overflow: auto; font: 13.5px/1.65 var(--mono); color: var(--fg); tab-size: 2; }
.code pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; overflow-wrap: normal; }
.code[data-lang]::after { content: attr(data-lang); position: absolute; right: 12px; bottom: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.code .copy { position: absolute; top: 8px; right: 8px; }
.table { margin: 1.6em 0 1.8em; overflow-x: auto; border: 1px solid var(--line-strong); background: var(--surface); }
.table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.table th, .table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { font: 600 11.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); background: var(--bg-2); white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover > * { background: var(--accent-wash); }
.prose blockquote { margin: 1.6em 0; padding: 16px 20px; border-left: 2px solid var(--accent); background: var(--accent-wash); color: var(--fg-2); }
.prose blockquote p { margin: 0; }
.callout { position: relative; margin: 30px 0 0; padding: 18px 20px; border: 1px solid var(--accent-deep); background: var(--chip-bg); }
.callout::before { content: ""; position: absolute; left: -1px; top: -1px; width: 46px; height: 2px; background: var(--accent); }
.callout p { margin: 6px 0 0; color: var(--fg-2); font-size: 15.5px; }
.callout .callout-kicker { margin: 0; font: 600 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }

/* chips (the landing's) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips a, .chip {
  display: inline-flex; align-items: center; font: 500 13px/1 var(--mono); padding: 9px 12px; text-decoration: none;
  border: 1px solid var(--accent-deep); background: var(--chip-bg); color: var(--fg); transition: border-color .2s, transform .25s var(--ease);
}
.chips a:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }

/* article cards (a grid with hairlines, like the landing's capability grid) */
.acards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.acard { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.acards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acard a {
  position: relative; display: flex; flex-direction: column; gap: 7px; height: 100%; padding: 18px 46px 20px 20px;
  background: var(--bg); text-decoration: none; color: inherit; transition: background .25s;
}
.acard a:hover { background: var(--bg-2); }
.acard-kicker { font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.acard-title { font-weight: 650; font-size: 16px; line-height: 1.35; color: var(--fg); transition: color .2s; }
.acard a:hover .acard-title { color: var(--accent-ink); }
.acard-text { font-size: 14px; line-height: 1.5; color: var(--dim); }
.acard-arrow { position: absolute; right: 16px; top: 20px; width: 16px; height: 16px; color: var(--mute); transition: transform .3s var(--ease), color .2s; }
.acard a:hover .acard-arrow { transform: translateX(4px); color: var(--accent); }
.tag { align-self: flex-start; font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 5px 7px; border: 1px solid var(--accent-deep); color: var(--accent-ink); }
.start { margin-top: 44px; }
.start .mini-h { margin-top: 0; }
.area h2 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 64px 0 18px;
  font: 800 clamp(22px, 2vw, 27px)/1.15 var(--display); letter-spacing: -.025em; color: var(--fg);
}
.count { font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }

/* bottom of an article */
.doc-codes .chips { gap: 8px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; }
.pager-link {
  display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; text-decoration: none; color: inherit;
  border: 1px solid var(--line-strong); background: var(--bg); transition: border-color .2s, transform .3s var(--ease), background .2s;
}
.pager-link:hover { border-color: var(--fg); transform: translateY(-2px); }
.pager-next { align-items: flex-end; text-align: right; }
.pager-dir { display: inline-flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.pager-dir .icon { width: 14px; height: 14px; color: var(--accent); transition: transform .3s var(--ease); }
.pager-prev:hover .pager-dir .icon { transform: translateX(-3px); }
.pager-next:hover .pager-dir .icon { transform: translateX(3px); }
.pager-title { font-weight: 650; font-size: 16px; line-height: 1.35; color: var(--fg); }
.feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 48px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fb-q { margin: 0; font: 700 19px/1.2 var(--display); letter-spacing: -.015em; }
.fb-actions { display: flex; gap: 10px; }
.fb-actions .btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-ink); }
.fb-thanks, .fb-sorry { flex-basis: 100%; margin: 0; font-size: 15px; color: var(--dim); }
.fb-sorry p { margin: 0 0 6px; }
.fb-sorry ul { margin: 0; padding-left: 20px; }
.fb-sorry a { color: var(--accent-ink); }
.doc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 26px; font: 500 12px/1.5 var(--mono); color: var(--mute); }
.df-label { letter-spacing: .12em; text-transform: uppercase; }
.doc-foot .df-ref { font-size: 12.5px; }
.df-note { flex-basis: 100%; letter-spacing: .02em; }
.doc-actions { margin: 18px 0 0; }

/* ---- video player ---- */
.player { margin: 34px 0 6px; }
.player-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.player-frame::before { content: ""; position: absolute; left: -1px; top: -1px; width: 64px; height: 3px; background: var(--accent); z-index: 3; }
.player-frame::after {
  content: ""; position: absolute; inset: -8px; pointer-events: none; z-index: 0;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) right top / 14px 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) right top / 1px 14px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) left bottom / 14px 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) right bottom / 1px 14px no-repeat;
}
.player-frame video, .player-frame iframe { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; border: 0; display: block; background: #000; }
.player-cover {
  display: none; position: absolute; inset: 0; z-index: 2; padding: 0; border: 0; cursor: pointer; overflow: hidden;
  background: #000; color: #f2efe7; text-align: left;
}
.js .player-cover, .player-cover.is-yt { display: block; }
.player.is-playing .player-cover { display: none; }
.player-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), filter .5s; }
.player-cover:hover .player-poster { transform: scale(1.035); filter: brightness(.9); }
.player-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 9, 8, 0) 38%, rgba(9, 9, 8, .88)); }
.player-cover { --pp: clamp(54px, 6vw, 76px); --pe: clamp(14px, 2.6vw, 28px); }
.player-play {
  position: absolute; left: var(--pe); bottom: var(--pe); display: grid; place-items: center; width: var(--pp); height: var(--pp);
  background: #ff3b30; color: #120403; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  transition: transform .4s var(--ease), background .2s;
}
:root[data-brand="neutral"] .player-play { background: var(--btn-bg); color: var(--btn-fg); }
.player-play svg { width: 40%; height: 40%; fill: currentColor; margin-left: 4%; }
.player-cover:hover .player-play, .player-cover:focus-visible .player-play { transform: scale(1.07); }
.player-cover::after {
  content: ""; position: absolute; left: var(--pe); bottom: var(--pe); width: var(--pp); height: var(--pp); border: 1px solid rgba(255, 59, 48, .7);
  animation: ring 2.4s var(--ease) infinite; pointer-events: none;
}
:root[data-brand="neutral"] .player-cover::after { border-color: var(--btn-bg); }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
.player-info { position: absolute; left: calc(var(--pe) + var(--pp) + 20px); right: 110px; bottom: var(--pe); min-height: var(--pp); display: grid; align-content: center; gap: 7px; }
.player-kind { font: 500 11.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #ff6a61; }
:root[data-brand="neutral"] .player-kind { color: #a8c0ff; }
.player-title { font: 800 clamp(19px, 2.3vw, 30px)/1.08 var(--display); letter-spacing: -.025em; color: #f2efe7; text-wrap: balance; }
.player-time { position: absolute; right: var(--pe); bottom: var(--pe); padding: 6px 9px; font: 500 12.5px/1 var(--mono); color: #f2efe7; background: rgba(9, 9, 8, .72); border: 1px solid rgba(242, 239, 231, .22); }
.player-cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 16px; font-size: 14px; color: var(--dim); }
.js .player:not(.is-playing) .pc-kind, .js .player:not(.is-playing) .pc-title { display: none; }
.pc-kind { font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.pc-title { font-weight: 650; color: var(--fg); }
.pc-meta { font: 500 12px/1.4 var(--mono); color: var(--mute); }
.pc-more { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font: 500 12.5px/1 var(--mono); color: var(--accent-ink); text-decoration: none; }
.pc-more .icon { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.pc-more:hover .icon { transform: translateX(3px); }
.player-note { font-size: 13px; color: var(--mute); }
.mini {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: min(380px, calc(100vw - 32px));
  background: var(--bg-2); border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .65);
  animation: mini-in .45s var(--ease) both;
}
@keyframes mini-in { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.mini::before { content: ""; position: absolute; left: -1px; top: -1px; width: 48px; height: 3px; background: var(--accent); z-index: 2; }
.mini-video { aspect-ratio: 16 / 9; background: #000; }
.mini-video video { width: 100%; height: 100%; object-fit: contain; }
.mini-bar { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 14px; }
.mini-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.mini-bar a, .mini-bar button { flex: none; }
.mini-bar .icon-btn { width: 32px; height: 32px; }
.mini-bar .icon-btn .icon { width: 15px; height: 15px; }

/* ---- home ---- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .85fr); gap: clamp(32px, 4vw, 64px); align-items: center;
  min-height: min(800px, calc(100vh - var(--top-h))); padding: clamp(56px, 7vw, 108px) var(--gutter) clamp(56px, 6vw, 96px); overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -10%; top: 6%; width: 62vw; height: 62vw; pointer-events: none; background: radial-gradient(closest-side, var(--glow), transparent 70%); }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero-title { font-size: clamp(46px, 5.9vw, 98px); outline: 0; }
.hero-title .line { opacity: 0; transform: translateY(26px); animation: rise .9s var(--ease) forwards; }
.hero-title .line:nth-child(2) { animation-delay: .1s; }
.hero .lead, .hero .big-search, .hero .chips { opacity: 0; animation: rise .9s var(--ease) .4s forwards; }
.hero .big-search { margin-top: 34px; animation-delay: .5s; }
.hero .chips { margin-top: 22px; animation-delay: .62s; }
.big-search {
  position: relative; display: flex; align-items: stretch; max-width: 680px; height: 60px;
  border: 1px solid var(--line-strong); background: var(--bg-2); transition: border-color .2s, box-shadow .3s;
}
.big-search:hover { border-color: var(--dim); }
.big-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.big-search input {
  flex: 1; min-width: 0; padding: 0 12px 0 52px; border: 0; background: transparent; outline: 0; font-size: 17px; color: var(--fg);
  -webkit-appearance: none; appearance: none;
}
.big-search input::placeholder { color: var(--mute); }
.big-search input::-webkit-search-cancel-button { display: none; }
.bs-icon { position: absolute; left: 19px; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; color: var(--mute); pointer-events: none; }
.bs-keys { display: flex; align-items: center; padding: 0 12px; }
.big-search .btn { min-height: 0; height: auto; margin: 6px; padding: 0 22px; }
.big-search.is-large { height: 64px; }
.lookup {
  position: relative; z-index: 1; margin: 0; padding: 22px; background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--line-strong); box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  --tilt: 1.2deg; opacity: 0; transform: translateY(30px) rotate(var(--tilt)); animation: card 1.1s var(--ease) .35s forwards;
}
@keyframes card { to { opacity: 1; transform: rotate(var(--tilt)); } }
.lk-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.lk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px transparent; } }
.lk-tag { margin-left: auto; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.lk-query { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 16px 16px; border: 1px solid var(--accent-deep); background: var(--bg); }
.lk-prompt { font: 700 24px/1 var(--mono); color: var(--accent); }
.lk-code { font-size: clamp(19px, 1.9vw, 25px); font-weight: 700; letter-spacing: .01em; overflow-wrap: anywhere; transition: opacity .25s; }
.lk-caret { width: 10px; height: 24px; background: var(--accent); animation: blink 1s steps(2) infinite; flex: none; }
@keyframes blink { 50% { opacity: 0; } }
.lk-fields { margin: 12px 0 0; display: grid; }
.lk-fields > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.lk-fields dt { color: var(--mute); font-size: 13px; padding-top: 2px; }
.lk-fields dd { margin: 0; color: var(--fg); transition: opacity .25s; }
.lk-fields a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .22em; }
.lk-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lk-steps li { font: 500 11.5px/1.3 var(--mono); color: var(--mute); padding: 9px 4px 8px 0; border-top: 2px solid var(--line-strong); transition: color .3s, border-color .3s; }
.lk-steps li.on { color: var(--fg); border-color: var(--accent); }
.lk-hint { margin: 14px 0 0; font-size: 12px; color: var(--mute); }
.lk-stamp {
  position: absolute; right: 30px; top: 92px; padding: 8px 14px; border: 2px solid var(--accent); color: var(--accent);
  font-size: 19px; font-weight: 800; letter-spacing: .18em; transform: rotate(-8deg) scale(1.5); opacity: 0;
  transition: opacity .25s, transform .35s var(--ease); background: var(--top-bg); pointer-events: none;
}
.lookup.done .lk-stamp { opacity: 1; transform: rotate(-8deg) scale(1); }
.lookup.swap .lk-code, .lookup.swap .lk-fields dd { opacity: 0; }
.stats { padding: 0 var(--gutter); }
.stats ul { display: grid; grid-template-columns: repeat(4, 1fr); max-width: var(--max); margin: 0 auto; padding: 0; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats li { display: grid; gap: 10px; padding: 30px 24px 28px 0; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-n { font: 800 clamp(30px, 3.2vw, 46px)/1 var(--display); letter-spacing: -.035em; color: var(--fg); }
.stat-l { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.band { position: relative; padding: clamp(72px, 9vw, 132px) var(--gutter); }
.band > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.band-alt { background: linear-gradient(180deg, var(--bg), var(--bg-2) 40%, var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; }
.cap-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cap { position: relative; display: flex; flex-direction: column; padding: 30px 28px 28px; background: var(--bg); transition: background .3s; }
.cap:hover { background: var(--bg-2); }
.cap-hot { background-image: var(--hot-grad); }
.cap-n { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.cap-icon { position: absolute; right: 26px; top: 26px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-strong); color: var(--dim); transition: color .3s, border-color .3s, transform .4s var(--ease); }
.cap:hover .cap-icon { color: var(--accent); border-color: var(--accent); transform: rotate(-6deg); }
.cap h3 { margin: 16px 0 10px; padding-right: 50px; font: 700 clamp(21px, 1.9vw, 26px)/1.12 var(--display); letter-spacing: -.02em; }
.cap h3 a { text-decoration: none; }
.cap h3 a:hover { color: var(--accent-ink); }
.cap-text { margin: 0 0 18px; color: var(--dim); font-size: 15px; line-height: 1.55; }
.cap ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; }
.cap li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.45; }
.cap li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; background: var(--line-strong); transform: rotate(45deg); transition: background .2s; }
.cap li:hover::before { background: var(--accent); }
.cap li a { color: var(--fg-2); text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease), color .2s; }
.cap li a:hover { color: var(--fg); background-size: 100% 1px; }
.cap-more { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; font: 500 13px/1 var(--mono); color: var(--accent-ink); text-decoration: none; }
.cap-more .icon { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.cap-more:hover .icon { transform: translateX(4px); }
.vgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 26px; }
.vcard-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.vcard-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border: 1px solid var(--line-strong); transition: border-color .3s; }
.vcard-thumb::before { content: ""; position: absolute; left: -1px; top: -1px; width: 48px; height: 3px; background: var(--accent); z-index: 2; transition: width .5s var(--ease); }
.vcard-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .4s; }
.vcard-play {
  position: absolute; left: 10px; bottom: 10px; display: grid; place-items: center; width: 42px; height: 42px;
  background: rgba(9, 9, 8, .62); color: #f2efe7; border: 1px solid rgba(242, 239, 231, .3);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); transition: background .3s, color .3s, transform .4s var(--ease), border-color .3s;
}
.vcard-play svg { width: 16px; height: 16px; fill: currentColor; margin-left: 2px; }
.vcard-time { position: absolute; right: 10px; bottom: 10px; padding: 6px 8px; font: 500 12px/1 var(--mono); color: #f2efe7; background: rgba(9, 9, 8, .75); }
.vcard-link:hover .vcard-thumb { border-color: var(--fg); }
.vcard-link:hover .vcard-thumb::before { width: 100%; }
.vcard-link:hover .vcard-thumb img { transform: scale(1.05); filter: brightness(.85); }
.vcard-link:hover .vcard-play { background: #ff3b30; color: #120403; border-color: #ff3b30; transform: scale(1.08); }
:root[data-brand="neutral"] .vcard-link:hover .vcard-play { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.vcard-body { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; }
.vcard-kind { font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.vcard-title { margin: 2px 0 0; font: 700 19px/1.22 var(--display); letter-spacing: -.015em; color: var(--fg); }
.vcard-sum { font-size: 14.5px; line-height: 1.5; color: var(--dim); }
.band-alt .btn-ghost { background: var(--bg); }
.err-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.err-grid .sec-head { margin-bottom: 0; }
.err-box { padding: 26px; border: 1px solid var(--line-strong); background: radial-gradient(circle at 100% 0, var(--glow), transparent 50%), var(--bg-2); position: relative; }
.err-box::before { content: ""; position: absolute; left: -1px; top: -1px; width: 64px; height: 3px; background: var(--accent); }
.code-lookup { display: flex; align-items: stretch; height: 58px; border: 1px solid var(--line-strong); background: var(--bg); transition: border-color .2s; }
.code-lookup:focus-within { border-color: var(--accent); }
.cf-prompt { display: grid; place-items: center; padding: 0 4px 0 16px; font: 700 22px/1 var(--mono); color: var(--accent); }
.code-lookup input { flex: 1; min-width: 0; padding: 0 10px; border: 0; background: transparent; outline: 0; font: 500 16px/1 var(--mono); color: var(--fg); -webkit-appearance: none; appearance: none; }
.code-lookup input::placeholder { color: var(--mute); }
.code-lookup .btn { min-height: 0; margin: 6px; padding: 0 18px; }
.ns-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.ns-list a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); text-decoration: none; font-size: 14.5px; color: var(--fg-2); transition: color .2s; }
.ns-list a:hover { color: var(--accent-ink); }
.ns-list .mono { font-size: 12px; color: var(--mute); }
.band-film { border-top: 1px solid var(--line); }
.film-frame .player { margin: 0; }

/* ---- error codes page ---- */
.code-filter {
  position: sticky; top: calc(var(--top-h) + 14px); z-index: 6; display: flex; align-items: center; gap: 10px; height: 62px; margin: 38px 0 16px;
  padding-right: 18px; border: 1px solid var(--line-strong); background: var(--bg-2); box-shadow: 0 18px 30px -24px rgba(0, 0, 0, .6); transition: border-color .2s;
}
.code-filter:focus-within { border-color: var(--accent); }
.code-filter input { flex: 1; min-width: 0; height: 100%; padding: 0 8px; border: 0; background: transparent; outline: 0; font: 500 18px/1 var(--mono); color: var(--fg); -webkit-appearance: none; appearance: none; }
.code-filter input::placeholder { color: var(--mute); }
.code-filter .status { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.ns-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; }
.ns-chips a { display: inline-flex; align-items: center; gap: 9px; padding: 8px 11px; font: 500 12.5px/1 var(--mono); color: var(--dim); text-decoration: none; border: 1px solid var(--line-strong); transition: color .2s, border-color .2s; }
.ns-chips a:hover { color: var(--fg); border-color: var(--fg); }
.ns-chips span { color: var(--mute); }
.code-group h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 56px 0 16px; font: 800 clamp(21px, 2vw, 26px)/1.15 var(--display); letter-spacing: -.025em; }
.codes-table th[scope="row"] { width: 38%; }
.codes-table th[scope="row"] code { color: var(--accent-ink); }
.codes-table td ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.codes-table td a { color: var(--fg); text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.codes-table td a:hover { background-size: 100% 1px; }
.codes-table tr:target > * { background: var(--accent-wash); }
.codes-table tr:target th { box-shadow: inset 2px 0 var(--accent); }

/* ---- video library ---- */
.vfilters {
  position: sticky; top: var(--top-h); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px;
  margin: 36px 0 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--top-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.vf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-chip {
  display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 12px; cursor: pointer; background: transparent;
  font: 500 12.5px/1 var(--mono); color: var(--dim); border: 1px solid var(--line-strong); transition: color .2s, border-color .2s, background .2s;
}
.vf-chip span { color: var(--mute); }
.vf-chip:hover { color: var(--fg); border-color: var(--fg); }
.vf-chip[aria-pressed="true"] { color: var(--fg); border-color: var(--accent); background: var(--accent-wash); box-shadow: inset 0 -2px var(--accent); }
.vf-search { position: relative; flex: 0 1 280px; }
.vf-search .icon { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--mute); pointer-events: none; }
.vf-search input { width: 100%; height: 36px; padding: 0 10px 0 36px; border: 1px solid var(--line-strong); background: var(--bg-2); outline: 0; font: 500 13px/1 var(--mono); color: var(--fg); -webkit-appearance: none; appearance: none; }
.vf-search input:focus { border-color: var(--accent); }
.vgroup { margin-top: 48px; }
.vgroup-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-bottom: 22px; }
.vgroup-head h2 { margin: 0; font: 800 clamp(22px, 2vw, 27px)/1.15 var(--display); letter-spacing: -.025em; }
.vgroup-head p { margin: 0; color: var(--dim); font-size: 15px; }
.vempty { margin: 40px 0; color: var(--mute); }
.transcript-body { padding: 24px 26px; border: 1px solid var(--line); background: var(--surface); columns: 2 320px; column-gap: 40px; }
.transcript-body p { margin: 0 0 1em; font-size: 15px; line-height: 1.7; color: var(--fg-2); break-inside: avoid; }

/* ---- search: page and palette ---- */
.search-status { margin: 22px 0 8px; font: 500 12.5px/1.5 var(--mono); letter-spacing: .04em; color: var(--mute); }
.results { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.results li { border-bottom: 1px solid var(--line); }
.results a { display: grid; gap: 6px; padding: 20px 4px; text-decoration: none; color: inherit; transition: background .2s; }
.results a:hover { background: var(--bg-2); }
.r-kicker { font: 500 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.r-title { font: 700 19px/1.3 var(--display); letter-spacing: -.01em; color: var(--fg); }
.r-snippet { font-size: 14.5px; line-height: 1.55; color: var(--dim); }
mark { background: var(--accent-wash); color: inherit; box-shadow: inset 0 -2px var(--accent); padding: 0 1px; }
.palette {
  width: min(720px, calc(100vw - 24px)); max-width: none; max-height: min(680px, calc(100vh - 80px)); margin: 9vh auto auto; padding: 0;
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--fg); box-shadow: 0 60px 120px -30px rgba(0, 0, 0, .75);
  overflow: hidden; flex-direction: column;
}
.palette[open] { display: flex; animation: pal-in .28s var(--ease) both; }
@keyframes pal-in { from { opacity: 0; transform: translateY(-10px) scale(.985); } }
.palette::backdrop { background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.palette::before { content: ""; position: absolute; left: 0; top: 0; width: 64px; height: 3px; background: var(--accent); z-index: 2; }
.pal-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 20px; height: 64px; border-bottom: 1px solid var(--line); flex: none; }
.pal-head .icon { width: 20px; height: 20px; color: var(--accent); }
.pal-head input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: 0; font-size: 18px; color: var(--fg); -webkit-appearance: none; appearance: none; }
.pal-head input::placeholder { color: var(--mute); }
.pal-head input::-webkit-search-cancel-button { display: none; }
.pal-close { cursor: pointer; border: 0; background: none; padding: 0; }
.pal-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 0 12px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.pal-group { margin: 10px 20px 6px; font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.pal-list { list-style: none; margin: 0; padding: 0 8px; }
.pal-item { display: grid; gap: 4px; padding: 11px 14px 12px; text-decoration: none; color: inherit; border-left: 2px solid transparent; cursor: pointer; }
.pal-item[aria-selected="true"] { background: var(--accent-wash); border-left-color: var(--accent); }
.pal-kicker { font: 500 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.pal-title { font-weight: 650; font-size: 15.5px; line-height: 1.35; color: var(--fg); }
.pal-snippet { font-size: 13.5px; line-height: 1.5; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pal-item .tag { margin-top: 2px; }
.pal-empty { margin: 18px 20px; color: var(--dim); font-size: 15px; }
.pal-chips { margin: 6px 20px 14px; }
.pal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 11px 18px; border-top: 1px solid var(--line); font: 500 11.5px/1 var(--mono); color: var(--mute); flex: none; }
.pal-foot span { display: inline-flex; align-items: center; gap: 6px; }
.pal-foot kbd { height: 20px; min-width: 20px; }
.pal-all { margin-left: auto; color: var(--accent-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pal-all .icon { width: 13px; height: 13px; }
.has-palette { overflow: hidden; }

/* ---- not found and the language gateway ---- */
.nf-title { font-size: clamp(56px, 8vw, 120px); outline: 0; }
.not-found .big-search { margin-top: 36px; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.gateway-body { min-height: 100vh; }
.gateway { position: relative; display: grid; place-items: center; min-height: 100vh; padding: 48px var(--gutter); overflow: hidden; }
.gateway::after { content: ""; position: absolute; right: -15%; top: 0; width: 70vw; height: 70vw; pointer-events: none; background: radial-gradient(closest-side, var(--glow), transparent 70%); }
.gateway-in { position: relative; z-index: 1; width: min(760px, 100%); }
.gateway .brand { margin: 0 0 56px; }
.gateway h1 { font-size: clamp(44px, 7vw, 96px); }
.gateway-choices { display: flex; flex-wrap: wrap; gap: 12px; margin: 36px 0 0; }

/* ---- footer ---- */
.foot-site { padding: 40px var(--gutter) 48px; border-top: 1px solid var(--line); color: var(--mute); position: relative; z-index: 1; background: var(--bg); }
.foot-row { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 30px; }
.foot-row.small { margin-top: 22px; font-size: 13.5px; align-items: flex-start; }
.foot-row.small p { margin: 0; max-width: 54ch; }
.foot-row strong { color: var(--dim); font-weight: 600; }
.foot-site .brand { color: var(--fg); }
.foot-tag { margin: 0; font-size: 13.5px; }
.foot-legal a { color: var(--fg); }

/* ---- responsive ---- */
@media (max-width: 1279px) {
  .layout, .layout[data-layout="docs"] { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .rail { display: none; }
  .site-link { display: none; }
  .acards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .lookup { max-width: 560px; }
  .cap-grid, .vgrid { grid-template-columns: 1fr 1fr; }
  .top-nav { display: none; }
  .top-search { margin-left: auto; }
}
@media (max-width: 1023px) {
  :root { --top-h: 58px; }
  .top { gap: 8px; }
  .nav-toggle { display: inline-grid; }
  .brand-sub { display: none; }
  .js .top-search { display: none; }
  .js .search-icon { display: inline-grid; margin-left: auto; }
  .layout, .layout[data-layout="docs"], .layout[data-layout="wide"] { display: block; }
  .js .sidebar, .js .layout[data-layout="home"] .sidebar {
    display: flex; position: fixed; z-index: 45; top: var(--top-h); left: 0; bottom: 0; height: auto; width: min(380px, 88vw);
    border-right: 1px solid var(--line-strong); box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .55);
    transform: translateX(-102%); visibility: hidden; transition: transform .38s var(--ease), visibility 0s .38s;
  }
  .js .nav-open .sidebar { transform: none; visibility: visible; transition: transform .38s var(--ease), visibility 0s; }
  .side-scroll { padding-top: 18px; }
  .side-foot { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
  .side-foot:empty { display: none; }
  .scrim { position: fixed; inset: var(--top-h) 0 0 0; z-index: 44; background: var(--scrim); animation: fade .3s ease both; }
  .sidebar:focus { outline: 0; }
  @keyframes fade { from { opacity: 0; } }
  .nav-open .nav-toggle .icon:not(.i-close) { display: none; }
  .nav-open .nav-toggle .i-close { display: block; }
  /* Without JavaScript the sidebar follows the page. */
  .no-js .layout { display: flex; flex-direction: column; }
  .no-js .sidebar { order: 2; position: static; height: auto; border-right: 0; border-top: 1px solid var(--line); }
  .no-js .layout[data-layout="home"] .sidebar { display: flex; }
  .doc { padding-top: 24px; }
  .err-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top { padding: 0 12px; }
  .top-tools { gap: 8px; }
  .theme-toggle { width: 38px; }
  .hero { padding-top: 44px; }
  .lookup { --tilt: 0deg; }
  .lk-steps { grid-template-columns: 1fr 1fr; }
  .lk-stamp { top: auto; bottom: 96px; right: 18px; font-size: 16px; }
  .stats ul { grid-template-columns: 1fr 1fr; }
  .stats li:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .cap-grid, .vgrid, .acards, .acards-3, .pager, .ns-list { grid-template-columns: 1fr; }
  .big-search .btn { display: none; }
  .big-search input { font-size: 16px; padding-left: 46px; }
  .bs-icon { left: 16px; }
  .bs-keys { display: none; }
  .prose { font-size: 16.5px; }
  .prose ol > li { padding-left: 46px; }
  .player-info { right: 70px; }
  .player-kind { display: none; }
  .player-title { font-size: 16px; }
  .player-frame::after { display: none; }
  .code-filter { top: calc(var(--top-h) + 8px); }
  .palette { margin-top: 12px; max-height: calc(100vh - 24px); }
  .pal-foot span:not(.pal-all) { display: none; }
  .transcript-body { columns: 1; padding: 18px; }
  .vfilters { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-title .line, .hero .lead, .hero .big-search, .hero .chips, .lookup, .doc-head > * { opacity: 1; transform: none; }
  .lookup { transform: rotate(var(--tilt)); }
  .player-cover::after, .lk-caret { display: none; }
}

@media print {
  .top, .sidebar, .rail, .foot-site, .player-cover, .feedback, .pager, .skip, .route-progress, .mini { display: none !important; }
  .layout { display: block; }
  body { background: #fff; color: #000; }
  .doc { max-width: none; padding: 0; }
}
