/* Principal documentation theme.
 *
 * Look: a documentation site that carries the brand of the landing page iamprincipal.io without dressing up as it.
 * From the landing page: its palette (cream, paper, ink, the blues, orange as an accent), Styrene A Black for titles,
 * Styrene A Bold capitals for the top bar and labels, buttons, header pills, chips and bold underlined links, 1.5px
 * ink lines. For reading: Geist, the text face of the console, for running text, tables and lists. The head of a
 * page is quiet: breadcrumbs, the title in its own case, the lead, on the paper of the page. JetBrains Mono for code.
 * Reading: prose holds a 36rem line, tables, code and callouts may run to 46rem, a screenshot with its legend and
 * pages marked wide take the whole column.
 * Technique: good-css.com entries, named where they are used: the reset, one set of color tokens for light and dark,
 * content grid with breakouts, space between siblings set by the parent, one focus ring, hover only where hover
 * exists, press feedback, hit areas, opt-in motion with motion tokens, animated <details>, dialog enter and exit,
 * scroller edge fades, a sliding indicator, safe areas, container queries. */

/* Styrene A has three files. Regular answers for 400 to 500, Bold for 600 to 800, so a rule that asks for a medium
 * weight gets a real face and never a synthesized one. */
@font-face {
  font-family: "Styrene A";
  src: url("../fonts/styrene-a-regular.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "Styrene A";
  src: url("../fonts/styrene-a-bold.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}
@font-face {
  font-family: "Styrene A";
  src: url("../fonts/styrene-a-black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

/* ---------- Tokens: one set for light and dark (good-css: light-dark()) ----------
 * The page follows the system theme. The theme menu pins it with data-theme on <html>. Each token holds both values,
 * so there is no second block of variables for the dark theme. */
:root {
  color-scheme: light dark;

  /* The brand colors. They are the same in both themes. */
  --b-blue: #00a1fc;
  --b-deep: #0a538e;
  --b-sky: #cfeeff;
  --b-orange: #f29e44;
  --b-ink: #231f20;
  --b-cream: #f6f3ed;

  /* --background is the cream of the top bar and the sidebar, --card is the paper the text lies on. */
  --background: light-dark(#f6f3ed, #171415);
  --foreground: light-dark(#231f20, #f6f3ed);
  --card: light-dark(#fffcf8, #1e1b1c);
  --muted: light-dark(#f6f3ed, #262223);
  --code-bg: light-dark(#f6f3ed, #141213);
  --muted-foreground: light-dark(#5f5a5b, #b7b0aa);
  /* Two lines: --rule splits regions (the top bar, the sidebar, a slab, a table), --border splits rows inside one. */
  --rule: light-dark(#231f20, #8d8681);
  --line: 1.5px;
  --border: light-dark(#231f2026, #f6f3ed26);
  --control: light-dark(#ece8df, #2b2728);
  --control-hover: light-dark(#e1dcd0, #353031);
  --selected: light-dark(#cfeeff, #12456e);
  /* A part raised over a well (the chosen segment). */
  --raised: light-dark(#231f20, #f6f3ed);
  --on-raised: light-dark(#fffcf8, #231f20);
  /* The one hover fill on the paper. */
  --accent: light-dark(#f3efe7, #2b2728);
  --primary: #00a1fc;
  --primary-foreground: #04182a;
  --success: hsl(146 79% 42%);
  --success-foreground: light-dark(hsl(148 96% 22%), hsl(144 69% 50%));
  --warning: #f29e44;
  --warning-foreground: light-dark(hsl(26 99% 30%), hsl(28 92% 68%));
  --destructive: hsl(0 86% 59.8%);
  --destructive-foreground: light-dark(hsl(356 81% 42%), hsl(4 95% 75%));
  --info: #00a1fc;
  --info-foreground: light-dark(#0a538e, #6cc7ff);
  --violet: hsl(262 83% 62%);
  --violet-foreground: light-dark(hsl(262 60% 44%), hsl(262 90% 78%));
  /* A number in a circle: a step, a row of the home table. Ink on paper, paper on ink in the dark theme. */
  --number-bg: light-dark(#231f20, #f6f3ed);
  --number-bg-hover: light-dark(#0a538e, #ffffff);
  --on-number: light-dark(#fffcf8, #231f20);
  /* A number on a screenshot and in its legend: the orange of a marker, in both themes. */
  --pin-bg: #f29e44;
  --on-pin: #231f20;
  --focus: light-dark(#0a538e, #6cc7ff);
  --link-line: color-mix(in srgb, var(--info-foreground) 70%, transparent);
  --scrim: light-dark(#231f2052, #00000099);
  --lightbox-scrim: #231f20d9;
  /* Illustrations are drawn on white paper. They sit on a white tile in both themes. */
  --paper: #fffdfa;
  /* The ring around a pin on a screenshot: white on any screenshot, light or dark. */
  --pin-ring: #ffffff;
  --pin-shadow: #00000066;

  --tone-wash: 14%;
  --tone-tint: 16%;
  --tone-border: 30%;

  /* Flat surfaces: an ink outline instead of a soft shadow. Only what floats over the page (a menu, the search,
   * the drawer) keeps a shadow under the outline. */
  --shadow-control: 0 0 0 var(--line) var(--rule);
  --shadow-pop: 0 0 0 var(--line) var(--rule), 0 24px 48px -20px light-dark(#231f2073, #000000cc);
  --shadow-window: 0 0 0 1px light-dark(#0a1e3c24, #ffffff24), 0 32px 64px -36px light-dark(#061e3c8c, #000000d9);

  --radius: 0.5rem;
  --radius-xl: 0.875rem;
  --radius-2xl: 1.375rem;
  --radius-full: 9999px;

  /* --font-sans is the brand face: titles, the top bar, labels, buttons. --font-text is the reading face. */
  --font-sans: "Styrene A", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-text: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --text-xs: 0.75rem;     /* 12: counts, chips, meta, labels in capitals */
  --text-sm: 0.875rem;    /* 14: navigation, tables, captions, controls */
  --text-base: 1rem;      /* 16: interface text */
  --text-prose: 1rem;     /* 16: running text in Geist */
  --text-lg: 1.125rem;    /* 18: lead, subsection titles */
  --text-xl: 1.375rem;    /* 22: section titles */
  --text-2xl: 1.75rem;    /* 28: the title of a page without a slab on a phone */
  --text-3xl: 2.5rem;     /* 40: the title of a page without a slab */

  /* Reading widths. */
  --measure: 40rem;       /* prose: about 78 characters of 16px Geist */
  --wide: 48rem;          /* tables, code and callouts */
  --sidebar-w: 264px;
  /* On a window wider than the stage the top bar, the sidebar and the text keep together in its middle, as the
   * container of the landing page does. --edge is the free space on each side. */
  --stage: 1560px;
  --edge: max(0px, (100vw - var(--stage)) / 2);
  --rail-w: 240px;
  --legend-w: 17.5rem;
  --pad-content: clamp(1.125rem, 0.4rem + 3vw, 3.5rem);

  /* Motion tokens (good-css: two curves, short durations). */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press: 160ms;
  --dur-fast: 150ms;
  --dur-pop: 200ms;
  --dur-panel: 280ms;

  /* Header height plus the notch (good-css: content clear of the notch). One value for every offset. */
  --topbar-h: 72px;
  --safe-top: env(safe-area-inset-top, 0px);
  --header: calc(var(--topbar-h) + var(--safe-top));
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- Reset (good-css: the reset) ---------- */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
:root {
  interpolate-size: allow-keywords;
  scrollbar-gutter: stable;
  scrollbar-color: color-mix(in srgb, var(--foreground) 22%, transparent) transparent;
  text-wrap: pretty;
  overflow-wrap: break-word;
  font-synthesis: none;
  accent-color: var(--number-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  /* No rubber-band bounce on desktop (good-css). Touch keeps pull to refresh. */
  overscroll-behavior-y: none;
}
@media (any-pointer: coarse) { :root { overscroll-behavior-y: auto; } }
/* Anchor targets and focused controls of the page clear the sticky top bar. The margin stands on them, not as scroll
 * padding on the page: with padding, the controls of the top bar itself lie inside the padded zone, and focusing one
 * of them scrolls the page by half a window. */
.frame :is([id], a, button, summary, input, [tabindex]) { scroll-margin-top: calc(var(--header) + 16px); }
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-text);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--card);
}
h1, h2, h3, h4 { text-wrap: balance; }
img, svg, video { display: block; max-width: 100%; height: auto; }
input, textarea, select { font-size: max(16px, 1rem); }
button, a, [role="button"], summary { touch-action: manipulation; }
button, [role="button"], summary { user-select: none; -webkit-user-select: none; }
::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); }
a { color: var(--info-foreground); text-decoration: none; }
code, kbd, pre, .mono { font-family: var(--font-mono); font-variant-ligatures: none; }
.skip-link {
  position: fixed; z-index: 100; top: calc(8px + var(--safe-top)); left: 8px;
  padding: 10px 14px; border-radius: var(--radius-full); background: var(--card); color: var(--foreground); box-shadow: var(--shadow-pop);
  font-size: var(--text-sm); font-weight: 500; translate: 0 -200%;
}
.skip-link:focus-visible { translate: 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Page state with :has() (good-css): an open modal locks the page behind it. The reserved gutter keeps it still. */
:root:has(dialog[open]) { overflow: hidden; }

/* One focus ring (good-css: one focus ring with :focus-visible). Never outline: none. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a:focus-visible { border-radius: 4px; }

/* Hover only where hover exists (good-css). Touch gets :active feedback instead. */
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* ---------- Top bar: the header of the landing page. The wordmark, the sections in capitals with an orange marker
 * under the current one, then search, the demo and the theme as outlined pills ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  container: topbar / inline-size;
  height: var(--header);
  display: flex; align-items: center; gap: 10px;
  padding: var(--safe-top) max(calc(var(--edge) + 20px), env(safe-area-inset-right, 0px)) 0 max(calc(var(--edge) + 26px), env(safe-area-inset-left, 0px));
  background-color: var(--background);
  border-bottom: var(--line) solid var(--rule);
}
.brand { --logo: 30px; flex: none; display: inline-flex; align-items: center; color: var(--foreground); white-space: nowrap; }
.brand img { width: var(--logo); height: var(--logo); flex: none; }
/* The wordmark picture starts where the mark ends, as in the brand logo file: black letters, light ones in the dark theme. */
.brand .wordmark {
  flex: none; width: calc(var(--logo) * 791 / 208); height: var(--logo); font-size: 0;
  background-color: light-dark(#000, #fffcf8);
  -webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3OTEiIGhlaWdodD0iMjA4IiB2aWV3Qm94PSIyMDggMCA3OTEgMjA4Ij48cGF0aCBkPSJNMjc1IDE1NC4xdi02LjVxNy41LS43IDEwLjgtMS41dDQtMy41cS44LTIuNS44LTguNFY1OC40cTAtNy0uOC0xMC0uNy0zLjEtNC00LTMuMy0xLTEwLjgtMS42LS42LTMuMiAwLTYuNmwxNy44LjNhNjA2IDYwNiAwIDAgMCAzNi43LS41cTEzLjUgMCAyMy4yIDMuNyA5LjggMy42IDE1IDEwLjVhMjggMjggMCAwIDEgNS4yIDE3cTAgMTAuOS01LjMgMTguOGEzNCAzNCAwIDAgMS0xNS4zIDEyLjQgNjAgNjAgMCAwIDEtMjQuMSA0LjNsLTYuOC0uMmE1NiA1NiAwIDAgMS04LjEtMS4zVjkzYTU2IDU2IDAgMCAwIDExLjUgMS41cTkuNiAwIDE1LTYuOGEyOSAyOSAwIDAgMCA1LjUtMTguOXEwLTExLjktNS40LTE4LjRhMTkgMTkgMCAwIDAtMTUtNi41IDYyIDYyIDAgMCAwLTkgLjdWMTMycTAgNSAuMyA3LjkuMyAyLjggMS44IDQuNWE5IDkgMCAwIDAgNSAyLjFxMy40LjcgMTAgMSAuNiAzLjMgMCA2LjZsLTE5LjUtLjJhNjUxIDY1MSAwIDAgMC0zMC4zLjJ6bTEwNC42IDBxLS40LTMgMC02LjMgNS40LS41IDguMi0xLjJhNiA2IDAgMCAwIDMuOC0zLjFxMS4yLTIuMyAxLjEtN1Y5OXEwLTYuNS0uNy05LjdhNiA2IDAgMCAwLTMuNS00LjVxLTIuOS0xLjItOS4yLTItLjYtMyAwLTUuNmEyMjMgMjIzIDAgMCAwIDMzLjQtNy43bDMuNyAxLjN2MTguOGwuNSAxNHYzMnE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TcgNi40IDE0IDE0IDAgMCAwLTUuNSAxMS42cTAgNS4xIDIuOSA3LjcgMi44IDIuNyA2LjUgMi43YTE1IDE1IDAgMCAwIDUuMi0uOWw2LjItMi42LS4xIDQuMmEzNCAzNCAwIDAgMS0xMSA5LjIgMzAgMzAgMCAwIDEtMTMuNiAyLjltNjMtMS45cS0uNC0zLjMgMC02LjMgNS40LS41IDguMi0xLjJhNiA2IDAgMCAwIDMuOC0zLjFxMS4yLTIuMyAxLjEtN1Y1NXEwLTYuMi0uOS05LjEtMS0zLTQtNC4yYTM2IDM2IDAgMCAwLTkuMy0ycS0uNi0yLjYgMC01LjdhMTc5IDE3OSAwIDAgMCAzNS40LTcuN2wzLjUgMS4zYTQwOCA0MDggMCAwIDAtLjMgMTguMlYxMzZxMCA1LjEgMS4zIDcuNWE2IDYgMCAwIDAgNCAzLjJxMyAuNyA3LjYgMSAuNiAzIDAgNi40TDk4OCAxNTRhNTQ2IDU0NiAwIDAgMC0yOC44IDB6Ii8+PC9zdmc+Cg==") center / contain no-repeat;
}
@media (forced-colors: active) {
  .brand .wordmark { forced-color-adjust: none; background-color: LinkText; }
}
@media print {
  .topbar { color-scheme: light; }
  .brand .wordmark { background-color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.brand .brand-docs {
  margin-left: 12px; padding-left: 12px; border-left: var(--line) solid var(--rule);
  font: 700 var(--text-xs)/20px var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--foreground);
}
.tabs { flex: none; display: flex; align-items: center; gap: clamp(14px, 1.9vw, 28px); margin-left: clamp(8px, 2vw, 28px); padding: 4px; }
.tabs a {
  position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 1px;
  color: var(--foreground); font: 700 0.75rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
/* The marker under a section: a line that grows under the pointer, orange and thicker under the current section. */
.tabs a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 2px; background: currentColor;
  scale: 0 1; transform-origin: 0 50%;
}
.tabs a[aria-current]::after { scale: 1 1; height: 3px; bottom: 4px; background: var(--b-orange); }
.tabs a:focus-visible { outline-offset: 3px; border-radius: 6px; }
.topbar-spacer { flex: 1; }
/* A control of the top bar: an outlined pill, as "Live demo" in the header of the landing page. It fills with ink
 * under the pointer. */
.ctl {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px;
  border: var(--line) solid var(--rule); border-radius: var(--radius-full); cursor: pointer;
  background: transparent; color: var(--foreground);
  font: 700 0.75rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.ctl svg { width: 16px; height: 16px; flex: none; }
.ctl.icon { width: 42px; padding: 0; justify-content: center; }
/* Search reads as a field: it is the widest control, on paper, and names its shortcut. */
.search-btn { min-width: 230px; padding: 0 8px 0 14px; background: var(--card); justify-content: flex-start; }
.search-btn .label { font: 400 var(--text-sm)/1 var(--font-text); letter-spacing: 0; text-transform: none; color: var(--muted-foreground); }
.search-btn kbd { margin-left: auto; text-transform: none; box-shadow: none; background: var(--control); color: var(--muted-foreground); border-radius: var(--radius-full); padding: 4px 9px; line-height: 1; letter-spacing: 0; }
.live { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #17b26a; }
.side-version {
  display: inline-flex; align-items: center; min-height: 24px; padding: 4px 10px; border-radius: var(--radius-full);
  background: var(--control); color: var(--muted-foreground); font: 500 0.6875rem/1.35 var(--font-mono);
}
.menu-btn { display: none; }
.menu-btn .icon-close, body.nav-open .menu-btn svg:not(.icon-close) { display: none; }
body.nav-open .menu-btn .icon-close { display: block; }
@media (hover: hover) and (pointer: fine) {
  .brand:hover, .tabs a:hover, .ctl:hover { text-decoration: none; }
  .ctl:hover { background: var(--foreground); color: var(--background); }
  .search-btn:hover .label, .search-btn:hover kbd { color: inherit; }
  .search-btn:hover kbd { background: color-mix(in srgb, currentColor 18%, transparent); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .tabs a::after { transition: scale .3s var(--ease-out); }
  .tabs a:hover::after { scale: 1 1; }
  .live::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; opacity: 0; animation: live 2.2s infinite; }
}
@keyframes live { 0% { opacity: .6; scale: 1; } 70%, 100% { opacity: 0; scale: 2.77; } }

/* Theme menu: a popover anchored to its trigger (good-css). Browsers without anchor positioning center it. */
.theme-btn { anchor-name: --theme-btn; }
.theme-btn .icon-system, .theme-btn .icon-light, .theme-btn .icon-dark { display: none; }
:root:not([data-theme]) .theme-btn .icon-system,
:root[data-theme="light"] .theme-btn .icon-light,
:root[data-theme="dark"] .theme-btn .icon-dark { display: block; }
.menu {
  inset: calc(var(--header) + 4px) max(calc(var(--edge) + 20px), env(safe-area-inset-right, 0px)) auto auto;
  margin: 0;
  min-width: 176px; padding: 6px; border: 0; border-radius: 16px;
  background: var(--card); color: var(--foreground); box-shadow: var(--shadow-pop);
}
.menu button {
  position: relative;
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer;
  font: 500 var(--text-sm)/1 var(--font-text); text-align: left;
}
.menu button svg { width: 16px; height: 16px; flex: none; }
.menu button .check { margin-left: auto; opacity: 0; }
.menu button[aria-checked="true"] .check { opacity: 1; color: var(--foreground); }
@supports (top: anchor(bottom)) {
  .menu { position-anchor: --theme-btn; inset: auto; top: anchor(bottom); right: anchor(right); margin: 8px 0 0; position-try-fallbacks: flip-block; }
}
@media (hover: hover) and (pointer: fine) {
  .menu button:hover { background: var(--accent); }
}

/* ---------- Layout: the sidebar on cream, the page on paper, an ink line between them ---------- */
.shell {
  display: grid; grid-template-columns: calc(var(--sidebar-w) + var(--edge)) minmax(0, 1fr); gap: 0;
  padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
  min-height: calc(100svh - var(--header));
}
/* The page: the slab and the footer across its whole width, between them the text and, where there is room, the
 * rail. The text and the rail make one block of --page-w that stands in the middle between the sidebar and the right
 * edge of the stage, so a wide window leaves the same margin on both sides. The inside of the slab and of the footer
 * keeps to the same block. The middle row takes the spare height, so the footer always ends the window. */
.frame {
  --page-w: 1180px; --rail: 0px;
  background: var(--card);
  display: grid; gap: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, calc(var(--page-w) - var(--rail))) var(--rail) minmax(0, 1fr) var(--edge);
  grid-template-rows: auto 1fr auto;
  min-height: calc(100svh - var(--header));
  overflow-x: clip;
}
.main { display: contents; }
.page-slab, .site-foot { grid-column: 1 / -1; }
.page-slab { grid-row: 1; }
.content { grid-column: 2; grid-row: 2; }
.rail { grid-column: 3; grid-row: 2; }
.site-foot { grid-row: 3; }
.content { padding: 30px var(--pad-content) calc(64px + env(safe-area-inset-bottom, 0px)); width: 100%; }

/* ---------- The head of a page: breadcrumbs, the title, the lead and the topic chips ----------
 * It lies on the paper of the page, the same for every section, and closes on a hairline. No colored band: the
 * section is named by the tab in the top bar and by the breadcrumbs. */
.frame { --slab: var(--card); --on-slab: var(--foreground); }
.page-slab { color: var(--on-slab); }
.slab-in { container: slab / inline-size; max-width: var(--page-w); margin: 0 auto 0 max(0px, (100% - var(--edge) - var(--page-w)) / 2); padding: 28px var(--pad-content) 0; }
.slab-in::after { content: ""; display: block; margin-top: 28px; border-bottom: 1px solid var(--border); }
.page-slab h1 {
  margin: 0; max-width: 44rem;
  font: 900 clamp(1.75rem, 1.4rem + 1.3vw, 2.375rem)/1.1 var(--font-sans); letter-spacing: -.028em;
}
.page-slab .lead {
  margin: 12px 0 0; max-width: 40rem;
  font: 400 1.125rem/1.55 var(--font-text); color: color-mix(in srgb, var(--foreground) 80%, var(--card));
}
.page-slab .lead a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.page-slab .lead code { font-size: .88em; padding: 1px 5px; border-radius: 4px; background: var(--control); }

/* ---------- Sidebar: the pages of the current section ---------- */
/* The list scrolls on its own above the foot, so nothing in it ever goes under the foot. */
.sidebar {
  position: sticky; top: var(--header); align-self: start;
  height: calc(100svh - var(--header));
  display: flex; flex-direction: column;
  background: var(--background);
  border-right: var(--line) solid var(--rule);
  padding-left: var(--edge);
}
.side-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin;
  padding: 16px 12px 16px 16px; scroll-padding-block: 2.5rem;
  animation: scroll-edges linear;
  animation-timeline: scroll(self block);
  mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
}
.side-title {
  display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0 0 8px; padding: 0 10px;
  font: 900 var(--text-sm)/1.2 var(--font-sans); letter-spacing: .04em; text-transform: uppercase;
}
/* The mark of a section or of a card: a line drawing in an outlined square, the shape of the controls of the top bar. */
.mark { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; box-shadow: inset 0 0 0 var(--line) var(--rule); color: var(--foreground); }
.mark svg { width: 17px; height: 17px; }
.side-label { margin: 20px 0 4px; padding: 0 10px; font: 700 0.6875rem/1.4 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.side-list a {
  display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 5px 10px; border-radius: 8px;
  font-size: var(--text-sm); line-height: 1.35; color: var(--foreground);
  transition: background-color var(--dur-fast) var(--ease-out);
}
/* The current page: bold on a filled row. No colored stripe on the side of a row, a card or a list item anywhere in
 * this theme: the owner ruled that device out. A current item is marked by its fill or by its weight. */
.side-list a[aria-current] { background: var(--selected); font-weight: 700; }
.side-list .count { margin-left: auto; font: 500 var(--text-xs)/1 var(--font-mono); color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
/* The sections, where the tabs of the top bar do not fit. */
.side-sections { display: none; }
.side-sections a {
  display: flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 8px;
  font: 700 var(--text-xs)/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--foreground);
}
.side-sections a[aria-current] { background: var(--selected); }
.side-foot { flex: none; padding: 6px 12px 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
/* The ways out (the demo, the site) stand here only when the top bar has no room for the demo. */
.side-out { display: none; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: var(--text-sm); font-weight: 700; color: var(--foreground); }
.side-out svg { width: 14px; height: 14px; }
.side-version { margin: 4px 0 0 10px; }
@media (hover: hover) and (pointer: fine) {
  .side-list a:hover, .side-sections a:hover, .side-out:hover { background: var(--control-hover); text-decoration: none; }
  .side-list a[aria-current]:hover { background: var(--selected); }
}
/* Touch: every row of the navigation is at least 44px tall (good-css: hit area). */
@media (pointer: coarse) {
  .side-list a, .side-sections a, .side-out { min-height: 44px; }
}

/* ---------- The rail beside the text: the same topic elsewhere, and On this page ---------- */
.rail { display: none; align-self: stretch; }
.rail .toc {
  position: sticky; top: calc(var(--header) + 8px);
  max-height: calc(100svh - var(--header) - 24px); overflow-y: auto; scrollbar-width: thin;
  padding: 30px 20px 24px 8px; scroll-padding-block: 2.5rem;
  animation: scroll-edges linear; animation-timeline: scroll(self block);
  mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
}
/* The wheel over the menu or the rail scrolls them to their end and stops there. One that fits its content passes
 * the wheel to the page (docs.js marks the ones that overflow). */
:is(.side-scroll, .rail .toc)[data-overflows] { overscroll-behavior: contain; }
.toc { font-size: var(--text-sm); }
.toc-title { margin: 0 0 8px 12px; font: 700 0.6875rem/1.5 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
.toc ul { list-style: none; margin: 0; padding: 0; position: relative; z-index: 0; }
.toc li a { display: block; padding: 5px 12px; border-radius: 8px; color: var(--muted-foreground); line-height: 1.35; transition: color var(--dur-fast) var(--ease-out); }
/* The current heading: ink and bold among the muted ones. */
.toc li a.active { color: var(--foreground); font-weight: 700; }
.toc li.l3 a { padding-left: 24px; }
.toc .method { margin-right: 6px; }
@media (hover: hover) and (pointer: fine) {
  .toc li a:hover { color: var(--foreground); text-decoration: none; }
  .toc li a:not(.active):hover { background: var(--accent); }
}
.toc-inline { border-radius: var(--radius-xl); background: var(--control); }
.toc-inline > summary {
  list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: inherit;
  cursor: pointer; font: 700 0.6875rem/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase;
}
.toc-inline > summary::-webkit-details-marker { display: none; }
.toc-inline > summary .chev { margin-left: auto; width: 14px; height: 14px; color: var(--muted-foreground); }
.toc-inline[open] > summary .chev { rotate: 90deg; }
.article .toc-inline ul { list-style: none; margin: 0; padding: 0 6px 8px; }
.article .toc-inline li { margin: 0; }
.article .toc-inline li a { text-decoration: none; }
.toc-inline li a { display: block; padding: 7px 8px; border-radius: 8px; color: var(--foreground); font-size: var(--text-sm); line-height: 1.4; }
.toc-inline li.l3 a { padding-left: 22px; color: var(--muted-foreground); }
@media (hover: hover) and (pointer: fine) {
  .toc-inline > summary:hover { background: var(--control-hover); }
  .toc-inline li a:hover { background: var(--card); text-decoration: none; }
}
/* One width of the block for every page that is not a screenshot page, so the text keeps its left edge from page to
 * page. The rail needs the room: from 1240px on text pages. A page with an annotated screenshot gives that room to
 * the legend beside the screenshot, so there the rail comes from 1600px. */
@media (min-width: 1100px) {
  .frame { --page-w: 1120px; }
}
@media (min-width: 1240px) {
  .frame.has-rail:not(.shots) { --rail: var(--rail-w); }
  .frame.has-rail:not(.shots) .rail { display: block; }
  .frame.has-rail:not(.shots) .toc-inline { display: none; }
}
@media (min-width: 1600px) {
  .frame.has-rail.shots { --page-w: 1200px; --rail: 208px; }
  .frame.has-rail.shots .content { padding-right: 24px; }
  .frame.has-rail.shots .rail { display: block; }
  .frame.has-rail.shots .toc-inline { display: none; }
}

/* ---------- <details> that animate their height (good-css: accordion) ---------- */
details::details-content { block-size: 0; overflow: clip; }
details[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: no-preference) {
  details::details-content {
    transition: block-size var(--dur-panel) var(--ease-out), content-visibility var(--dur-panel) allow-discrete;
  }
  details > summary .chev { transition: rotate var(--dur-fast) var(--ease-out); }
}

/* ---------- Article: content grid with breakouts, flow spacing set by the parent (good-css) ----------
 * Three widths: prose (--measure), wide blocks (--wide) and the whole column (breakout). A page marked wide gives
 * every block the whole column (the API reference lays out its own columns there). */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--text-sm); color: var(--muted-foreground); margin-bottom: 14px; }
.crumbs a { color: var(--muted-foreground); }
.crumbs .sep { color: var(--border); }
.article {
  container: article / inline-size;
  display: grid;
  grid-template-columns:
    [breakout-start content-start] min(100%, var(--measure))
    [content-end] minmax(0, calc(var(--wide) - var(--measure)))
    [wide-end] minmax(0, 1fr) [breakout-end];
}
.frame.wide .article { grid-template-columns: [breakout-start content-start] minmax(0, 1fr) [content-end wide-end breakout-end]; }
.article > * { grid-column: content; margin-block: 0; }
.article > :is(.table-wrap, .codeblock, .callout, .steps, .flow, .cards, .shot, .shot-pending, .toc-inline, .op-index) { grid-column: content-start / wide-end; }
.article > :is(.home-head, .steps-map, .home-more, .shot.has-legend, .op, .model, .model-filter, .lost) { grid-column: breakout; }
.article > :is(h2, h3) { grid-column: content-start / wide-end; }
.article > * + * { margin-block-start: var(--flow-space, 1rem); }
.article > h2 { --flow-space: 3.5rem; }
.article > h3 { --flow-space: 2.25rem; }
.article > h4 { --flow-space: 1.5rem; }
.article > :is(h2, h3, h4) + * { --flow-space: 1rem; }
.article > p + :is(ul, ol) { --flow-space: 0.625rem; }
.article > :is(.shot, .cards, .flow, .table-wrap, .codeblock, .callout, .steps, .shot-pending),
.article > :is(.shot, .cards, .flow, .table-wrap, .codeblock, .callout, .steps, .shot-pending) + :not(h2, h3, h4) { --flow-space: 1.5rem; }
.article > .op + .op { --flow-space: 1.75rem; }
.article > .toc-inline + h2 { --flow-space: 2rem; }

/* Titles are Styrene A Black in their own case. A section title inside the text stands under an ink rule, so the
 * sections of a long page can be found by eye. */
.article h1 { font: 900 var(--text-3xl)/1.05 var(--font-sans); letter-spacing: -.028em; margin: 0; }
.article .lead { font: 400 var(--text-lg)/1.5 var(--font-text); letter-spacing: -.005em; color: var(--muted-foreground); margin: 12px 0 0; }
.article h2 { font: 900 var(--text-xl)/1.12 var(--font-sans); letter-spacing: -.022em; }
.article > h2 { padding-top: 1.25rem; border-top: var(--line) solid var(--rule); }
.article > h2:first-child, .article > .toc-inline + h2 { padding-top: 0; border-top: 0; }
.article h3 { font: 700 1.125rem/1.3 var(--font-sans); letter-spacing: -.012em; }
.article h4 { font: 700 var(--text-base)/1.4 var(--font-sans); }
.article :is(h2, h3, h4) code { text-transform: none; }
.article h2 .anchor, .article h3 .anchor, .article h4 .anchor { display: inline; opacity: 0; margin-left: 8px; color: var(--muted-foreground); font-weight: 400; text-decoration: none; transition: opacity var(--dur-fast) var(--ease-out); }
.article :is(h2, h3, h4) .anchor:focus-visible { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .article :is(h2, h3, h4):hover .anchor { opacity: 1; }
}
/* Running text is Geist: paragraphs, lists, steps, callouts and captions. */
.article > :is(p, ul, ol), .article :is(.steps, .callout, .op-desc) {
  font-size: var(--text-prose); line-height: 1.65;
}
.article :is(.legend, figcaption, .card-text) { font-size: var(--text-sm); line-height: 1.5; }
.article ul, .article ol { padding-left: 22px; }
.article :is(p, ul, ol) :is(ul, ol) { margin: 4px 0; }
.article li { margin: 6px 0; }
.article li::marker { color: var(--muted-foreground); }
.article strong, .ui { font-weight: 700; }
/* The reading face has no italic file: emphasis is its slanted cut, drawn by the browser. */
.article em, .page-slab .lead em { font-style: italic; font-synthesis: style; }
.article hr { border: 0; border-top: 1px solid var(--border); }
/* Links inside running text are underlined: color alone does not mark them (WCAG 1.4.1). */
.article :is(p, li, td, figcaption, .callout) a:not(.badge, .ref-link, .card-link, .anchor, .btn, .step-links a, .link-list a, .look a, .toc-inline a, :has(.method)) {
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; text-decoration-color: var(--link-line);
}
@media (hover: hover) and (pointer: fine) {
  .article :is(p, li, td, figcaption, .callout) a:not(.badge, .ref-link, .card-link, .anchor, .btn, .step-links a, .link-list a, .look a, .toc-inline a, :has(.method)):hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
}
.article :not(pre) > code {
  font-size: calc(1em - 2.5px); padding: 1px 5px; border-radius: 5px;
  background: var(--control); color: var(--foreground); white-space: break-spaces;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.article a code { color: var(--info-foreground); }
kbd {
  display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; text-align: center;
  font: 500 var(--text-xs)/18px var(--font-mono); background: var(--card); box-shadow: 0 0 0 1px var(--rule), 0 2px 0 var(--rule); color: var(--foreground);
}
.ui { white-space: nowrap; }

/* ---------- The same topic in the other sections ----------
 * A row of chips in the head of the page, under the lead: how it works, the steps, the screen, the API. The shape is the row of
 * cases of the landing page: an outlined pill, filled for the page that is open. */
.views { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: .6em; min-height: 40px; max-width: 100%; padding: .55em 1.1em;
  border: var(--line) solid var(--on-slab); border-radius: 20px; color: var(--on-slab);
  font: 700 0.8125rem/1.2 var(--font-sans);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.chip b { flex: none; font-weight: 900; font-size: 0.6875rem; letter-spacing: .08em; text-transform: uppercase; opacity: .62; }
.chip-title { display: inline-flex; align-items: center; gap: .6em; min-width: 0; }
.chip small { flex: none; font: 500 0.6875rem/1 var(--font-mono); opacity: .72; white-space: nowrap; }
.chip.here { background: var(--on-slab); color: var(--slab); }
/* The chip of the open page carries only its kind: the title stands right above it. */
.chip.here b { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  a.chip:hover { text-decoration: none; background: color-mix(in srgb, var(--on-slab) 16%, transparent); }
  a.chip.here:hover { background: var(--on-slab); }
}

/* ---------- Scrollers fade the side that still has content (good-css: styles only when a scroller overflows) ---------- */
@property --fade-start { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes scroll-edges {
  from { --fade-start: 0px; --fade-end: 2.5rem; }
  8%, 92% { --fade-start: 2.5rem; --fade-end: 2.5rem; }
  to { --fade-start: 2.5rem; --fade-end: 0px; }
}
.codeblock pre, .tabs {
  animation: scroll-edges linear;
  animation-timeline: scroll(self inline);
  mask-image: linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
}

/* ---------- Tables: an ink rule above and below, hairlines between rows, column names in capitals ---------- */
/* The ink rule opens a table. It closes on a hairline, so a section rule or the pager under it is not a second ink line. */
.table-wrap { overflow-x: auto; border-top: var(--line) solid var(--rule); border-bottom: 1px solid var(--border); }
/* Right under a section title the rule of the section opens the table: no second ink line 70px below it. */
.article > :is(h2, h3) + .table-wrap { border-top: 0; }
.article th em { font: inherit; }
/* A table that is the whole page (the glossary) takes the whole column. */
.article > .table-wrap:only-child { grid-column: breakout; }
.article table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; line-height: 1.5; }
.article th { text-align: left; font: 700 0.75rem/1.5 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--foreground); }
.article th, .article td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.article thead th { border-bottom-color: var(--rule); }
.article :is(th, td):first-child { padding-left: 0; }
.article :is(th, td):last-child { padding-right: 0; }
.article tbody tr:last-child > * { border-bottom: 0; }
.article td code { white-space: nowrap; font-size: 0.78125rem; }
/* The text of a cell keeps the reading line (80 characters of 14px text), however wide the table is. */
.article td > .cell { max-width: 36rem; }
.article thead:not(:has(th:not(:empty))) { display: none; }

/* ---------- Code blocks: an ink slab in both themes. A header row with the language and the copy button, so
 * neither covers the code ---------- */
.codeblock {
  --code-comment: #a39e99; --code-keyword: #5cc2ff; --code-string: #7fdca7; --code-number: #ffb877;
  --code-name: #cdb0ff; --code-punct: #c4beb8; --code-function: #a8dcff;
  border-radius: var(--radius-xl); background: light-dark(#231f20, #121011); color: #f6f3ed; overflow: clip;
  box-shadow: inset 0 0 0 1px light-dark(transparent, #f6f3ed26);
}
.code-head { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 2px 6px 2px 16px; border-bottom: 1px solid #f6f3ed24; }
.code-head .lang { font: 700 0.6875rem/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: #f6f3ed99; }
.codeblock pre { margin: 0; padding: 14px 16px 18px; overflow-x: auto; font-size: var(--text-sm); line-height: 1.65; scrollbar-color: #f6f3ed66 transparent; }
.copy-btn {
  position: relative; margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: var(--radius-full); cursor: pointer; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--muted-foreground);
}
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn.done { color: var(--success-foreground); }
.codeblock .copy-btn { color: #f6f3ed99; }
.codeblock :focus-visible { outline-color: #6cc7ff; }
.codeblock pre:focus-visible { outline-offset: -2px; }
.codeblock .copy-btn.done, .codeblock .copy-btn.done:hover { color: #7fdca7; }
/* Copying says so in words, in the type of the language label. */
.copy-btn.done { width: auto; padding: 0 10px 0 12px; gap: 7px; }
.copy-btn.done::before { content: "Copied"; font: 700 0.6875rem/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; }
@media (hover: hover) and (pointer: fine) {
  .copy-btn:hover { color: var(--foreground); background: var(--control); }
  .codeblock .copy-btn:hover { color: #ffffff; background: #f6f3ed24; }
}
/* Pygments tokens. */
.hl .c, .hl .c1, .hl .cm, .hl .sd { color: var(--code-comment); font-style: italic; }
.hl .k, .hl .kd, .hl .kn, .hl .kc, .hl .nt { color: var(--code-keyword); }
.hl .s, .hl .s1, .hl .s2, .hl .sb, .hl .sh, .hl .dl { color: var(--code-string); }
.hl .m, .hl .mi, .hl .mf, .hl .il { color: var(--code-number); }
.hl .nb, .hl .bp, .hl .nv, .hl .na { color: var(--code-name); }
.hl .o, .hl .p { color: var(--code-punct); }
.hl .nf, .hl .nx { color: var(--code-function); }

/* ---------- Callouts: a slab in the tone of its kind, icon sized by the text beside it (good-css) ---------- */
.callout {
  --tone: var(--info); --tone-fg: var(--info-foreground);
  display: flex; align-items: start; gap: 12px;
  padding: 16px 18px; border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--tone) var(--tone-wash), var(--card));
}
.callout > svg { flex: none; inline-size: 1.25em; block-size: 1lh; color: var(--tone-fg); }
.callout > div { max-width: var(--measure); }
.callout > div > * { margin: 0; }
.callout > div > * + * { margin-top: 0.5rem; }
.callout .callout-title { font: 700 var(--text-base)/1.4 var(--font-sans); }
.callout.tip { --tone: var(--success); --tone-fg: var(--success-foreground); }
.callout.warning { --tone: var(--warning); --tone-fg: var(--warning-foreground); --tone-wash: 22%; }
.callout.danger { --tone: var(--destructive); --tone-fg: var(--destructive-foreground); }
.callout.design { --tone: var(--violet); --tone-fg: var(--violet-foreground); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps > li { position: relative; max-width: calc(var(--measure) + 46px); padding: 0 0 20px 46px; margin: 0; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--number-bg); color: var(--on-number); font: 700 var(--text-sm)/1 var(--font-sans); font-variant-numeric: tabular-nums;
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 14.25px; top: 33px; bottom: 3px; width: 1.5px; background: var(--border); }
.steps > li > :first-child { margin-top: 0; }
.steps > li > :last-child { margin-bottom: 0; }
.steps > li > p { margin: 0; }
.steps > li > p + p { margin-top: 6px; }
.steps > li > :is(.codeblock, .callout, .table-wrap) { margin-block: 12px; }

/* ---------- Cards: choice cards with an ink outline ----------
 * One link makes the whole card clickable, rows line up with subgrid (good-css). */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.card {
  position: relative;
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; align-content: start;
  padding: 16px 16px 16px; border-radius: var(--radius-xl);
  box-shadow: inset 0 0 0 var(--line) var(--rule); color: var(--foreground);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.card .mark { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 6px; }
.card .mark svg { width: 21px; height: 21px; }
.card .card-title { margin: 0; font: 700 var(--text-base)/1.3 var(--font-sans); }
.card .card-link { color: inherit; }
.card .card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card .card-link:focus-visible { outline: 2px solid transparent; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.card .card-text { margin: 0; color: var(--muted-foreground); }
.card .card-arrow { position: absolute; top: 14px; right: 16px; color: var(--foreground); font-family: var(--font-sans); }
@media (hover: hover) and (pointer: fine) {
  .card:hover { background: var(--selected); }
  .card:hover .card-link { text-decoration: none; }
  .card:hover .card-text { color: var(--foreground); }
}

/* ---------- Home: the title, the lead, the search and two buttons on a sky band, the one band of color on the
 * site. The platypus sits on its lower edge where the column has room for it. */
.home-head {
  --slab: light-dark(#cfeeff, #103e63);
  position: relative; isolation: isolate; display: grid; gap: 16px; justify-items: start;
  margin-top: -30px; padding: clamp(28px, 1.25rem + 2.4vw, 56px) 0 clamp(28px, 1.25rem + 2.4vw, 56px);
  color: light-dark(#10324f, #e9f6ff);
}
/* The band runs to both edges of the page: the frame clips what goes past them. */
.home-head::before {
  content: ""; position: absolute; z-index: -3; inset: 0 -100vw; background: var(--slab);
  border-bottom: 1px solid var(--border);
}
.home-head h1 { max-width: 16em; color: light-dark(#0a538e, #ffffff); font-size: clamp(1.9rem, 1.4rem + 2vw, 2.875rem); }
.article .home-head .lead { margin: 0; max-width: 34rem; color: inherit; font-size: 1.125rem; line-height: 1.55; }
/* Search and the two buttons share one width, so they end on one edge. */
.home-actions { display: grid; gap: 12px; width: min(27rem, 100%); margin-top: 6px; }
.home-search {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 52px; padding: 0 12px 0 18px;
  border: var(--line) solid light-dark(#231f20, #f6f3ed); border-radius: var(--radius-xl); cursor: pointer; text-align: left;
  background: var(--card); color: var(--muted-foreground);
  font: 400 var(--text-base)/1 var(--font-text);
}
.home-search svg { width: 18px; height: 18px; flex: none; color: var(--foreground); }
.home-search span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-search kbd { box-shadow: none; background: var(--control); border-radius: var(--radius-full); padding: 5px 10px; line-height: 1; color: var(--muted-foreground); }
.home-row { display: flex; flex-wrap: wrap; gap: 12px; }
.home-row .btn { flex: 1 1 12.5rem; }
.home-head .btn.ghost { color: light-dark(#0a538e, #ffffff); }
.home-mascot { display: none; position: absolute; z-index: -1; right: 4%; bottom: -5px; width: 8.5rem; height: auto; pointer-events: none; }
@container article (min-width: 50rem) { .home-mascot { display: block; } }
.article > .home-head + * { --flow-space: 2.75rem; }
/* On the home page every block runs the whole column, so the page keeps one right edge. */
.is-home .article > .callout { grid-column: breakout; }
.is-home .pager { max-width: none; }
.steps-map { overflow-x: auto; border-top: var(--line) solid var(--rule); border-bottom: 1px solid var(--border); }
.steps-map table { table-layout: fixed; }
.steps-map thead th { padding-block: 10px; }
.steps-map tbody th { color: var(--foreground); font: 400 var(--text-sm)/1.5 var(--font-text); letter-spacing: 0; text-transform: none; }
/* The step column gives room to the columns of the sections: one more section, a narrower step column. */
.steps-map th[scope="col"]:first-child { width: 41%; }
.steps-map[data-sections="4"] th[scope="col"]:first-child { width: 32%; }
.steps-map[data-sections="5"] th[scope="col"]:first-child { width: 27%; }
.steps-map .step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 12px; align-content: start; }
.steps-map .n {
  grid-row: span 2; width: 30px; height: 30px; display: inline-flex; align-items: center;
  color: var(--info-foreground); font: 900 0/1 var(--font-sans); font-variant-numeric: tabular-nums;
}
.steps-map tbody { counter-reset: home-step; }
.steps-map .n::before { counter-increment: home-step; content: counter(home-step, decimal-leading-zero); font-size: 1.0625rem; }
.steps-map .step-name { font: 900 1.0625rem/30px var(--font-sans); letter-spacing: -.012em; }
.steps-map .step-text { color: var(--muted-foreground); font: 400 var(--text-sm)/1.5 var(--font-text); }
.steps-map td, .steps-map tbody th { padding-block: 12px; }
.step-links { list-style: none; margin: 0; padding: 0 !important; display: flex; flex-direction: column; gap: 7px; }
.step-links li { margin: 0; line-height: 1.25; }
.step-links .count { margin-left: 6px; font: 500 var(--text-xs)/1 var(--font-mono); color: var(--muted-foreground); }
.home-more { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px 56px; align-items: start; }
.article > .home-more { --flow-space: 2.75rem; }
.article > .home-more + h2 { padding-top: 1.25rem; }
.home-more h2 { margin: 0 0 12px; }
.home-more h3 { margin: 0 0 6px; font: 700 0.6875rem/1.5 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
.home-more .anchor { display: none !important; }
.link-list { list-style: none; margin: 0; padding: 0 !important; border-top: var(--line) solid var(--rule); }
.link-list li { margin: 0; border-bottom: 1px solid var(--border); }
.link-list li:last-child { border-bottom: var(--line) solid var(--rule); }
.link-list a { display: grid; gap: 3px; padding: 13px 0 14px; color: var(--foreground); text-decoration: none !important; }
.link-list b { font: 700 var(--text-base)/1.3 var(--font-sans); color: var(--foreground); }
.link-list b::after { content: "→"; display: inline-block; margin-left: .4em; font-weight: 400; transition: translate var(--dur-fast) var(--ease-out); }
.link-list span { font: 400 var(--text-sm)/1.5 var(--font-text); color: var(--muted-foreground); }
.look { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; padding-top: 14px; border-top: var(--line) solid var(--rule); }
.look ul { list-style: none; margin: 0; padding: 0 !important; font-size: var(--text-sm); }
.look li { margin: 0; }
.look a { display: inline-flex; align-items: center; min-height: 32px; }
@media (hover: hover) and (pointer: fine) { .link-list a:hover b { color: var(--info-foreground); } .link-list a:hover b::after { translate: 4px 0; } }
/* ---------- Buttons: the buttons of the landing page ----------
 * One shape: Styrene A Bold, a 14px corner, a 1.5px edge. Primary is ink, accent is the brand blue (on ink), ghost is
 * an outline that fills under the pointer. A button lifts 2px under the pointer and comes back when pressed. A link
 * that leads on is .more: bold, underlined, with its arrow. */
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .9em 1.5em;
  border: var(--line) solid transparent; border-radius: var(--radius-xl); cursor: pointer;
  font: 700 var(--text-base)/1 var(--font-sans); white-space: nowrap; text-decoration: none;
}
.btn.primary { background: var(--raised); color: var(--on-raised); }
.btn.accent { background: var(--b-blue); color: #04182a; }
.btn.ghost { color: var(--foreground); background: transparent; border-color: currentColor; }
.btn.lg { min-height: 56px; padding: 1.05em 1.45em; font-size: 1.0625rem; }
.btn.sm { min-height: 40px; padding: .7em 1.15em; font-size: var(--text-sm); }
.btn svg { width: 16px; height: 16px; }
.btn .arr, .more .arr { display: inline-block; font-weight: 400; }
.more { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; color: var(--foreground); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { text-decoration: none; translate: 0 -2px; }
  .btn.primary:hover { background: light-dark(#4d4d4d, #ffffff); }
  .btn.accent:hover { background: light-dark(#0a538e, #ffffff); color: light-dark(#ffffff, #04182a); }
  .btn.ghost:hover { background: var(--foreground); border-color: var(--foreground); color: var(--card); }
  .home-head .btn.ghost:hover { background: light-dark(#0a538e, #ffffff); border-color: light-dark(#0a538e, #ffffff); color: light-dark(#ffffff, #0a538e); }
  .home-search:hover { color: var(--foreground); background: var(--accent); }
  .more:hover { text-decoration-thickness: 2.5px; }
}
.btn:active { translate: 0 0; scale: .97; }
/* A finger has no hover: the pressed state carries the feedback. */
@media (hover: none) {
  .btn.primary:active { background: light-dark(#4d4d4d, #ffffff); }
  .btn.accent:active { background: #ffffff; }
  .btn.ghost:active { background: var(--foreground); border-color: var(--foreground); color: var(--card); }
  .home-head .btn.ghost:active { background: light-dark(#0a538e, #ffffff); border-color: light-dark(#0a538e, #ffffff); color: light-dark(#ffffff, #0a538e); }
  :is(.side-list a, .side-sections a, .side-out, .toc-inline li a, .toc-inline > summary, .search-results li a, .home-search):active { background: var(--control); }
  :is(.pager a, .step-links a, .look a, .foot-links a, .more):active { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
  .link-list a:active b { color: var(--info-foreground); }
  .article :is(h2, h3, h4) .anchor { display: none; }
  .search-foot, .home-search kbd { display: none; }
}

/* ---------- Flow (the control loop): numbered steps under an ink line, as the rows of steps on the landing page ---------- */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(8.25rem, 100%), 1fr)); gap: 20px 16px; counter-reset: flow; }
.flow > div { padding-top: 12px; border-top: var(--line) solid var(--rule); font-size: var(--text-sm); line-height: 1.5; color: var(--muted-foreground); }
.flow > div::before { counter-increment: flow; content: counter(flow, decimal-leading-zero); display: block; margin-bottom: 6px; color: var(--info-foreground); font: 900 var(--text-sm)/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.flow > div b { display: block; margin-bottom: 4px; color: var(--foreground); font: 900 1.0625rem/1.2 var(--font-sans); letter-spacing: -.012em; }
/* A narrow column gives each step its own row, the number beside the text. */
@container article (max-width: 44rem) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .flow > div { display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: 8px; padding: 12px 0 14px; border-top: 1px solid var(--border); }
  .flow > div:first-child { border-top: var(--line) solid var(--rule); }
  .flow > div::before { grid-row: span 2; margin: 3px 0 0; }
  .flow > div b { margin-bottom: 2px; }
}

/* ---------- Screenshot figures: the screenshot in a window frame and the legend of its numbers side by side ---------- */
.shot { margin-inline: 0; }
.shot-frame {
  position: relative; border-radius: var(--radius-xl); overflow: clip; background: var(--muted);
  box-shadow: var(--shadow-window); cursor: zoom-in;
  display: block; width: 100%; padding: 0; border: 0;
}
.shot-frame { container: shot / inline-size; }
/* The bar of the window: three dots, as on the screens of principal.team. */
.shot-frame::before {
  content: ""; display: block; height: 26px; border-bottom: 1px solid light-dark(#00000017, #ffffff1f);
  background:
    radial-gradient(circle at 14px 50%, light-dark(#0000002b, #ffffff38) 4px, transparent 4.5px),
    radial-gradient(circle at 28px 50%, light-dark(#0000002b, #ffffff38) 4px, transparent 4.5px),
    radial-gradient(circle at 42px 50%, light-dark(#0000002b, #ffffff38) 4px, transparent 4.5px),
    light-dark(#efede8, #2b2728);
}
.shot-phone .shot-frame::before { display: none; }
.shot-canvas { position: relative; display: block; }
.shot-frame img { display: block; width: 100%; height: auto; }
/* The way to the full size is a strip under the screenshot: it covers no text and no number. */
.shot-zoom {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 32px; padding: 0 12px;
  border-top: 1px solid var(--border); background: var(--card); color: var(--muted-foreground);
  font: 700 0.6875rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase;
}
.shot-zoom svg { width: 14px; height: 14px; }
.shot-frame:focus-visible .shot-zoom { color: var(--foreground); }
@media (hover: hover) and (pointer: fine) {
  .shot-frame:hover .shot-zoom { color: var(--foreground); }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-frame img { filter: brightness(.9); }
}
:root[data-theme="dark"] .shot-frame img { filter: brightness(.9); }
.shot-frame .marker-layer { position: absolute; inset: 0; pointer-events: none; }
.lightbox-frame .shot-canvas { position: relative; display: block; }
/* Pins grow and shrink with the screenshot, so the space between two pins always holds them. */
.marker-pin {
  position: absolute; z-index: 1; translate: -50% -50%;
  width: clamp(16px, 2.4cqi, 26px); height: clamp(16px, 2.4cqi, 26px); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pin-bg); color: var(--on-pin); font: 700 var(--text-xs)/1 var(--font-sans); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--pin-ring), 0 3px 8px -2px var(--pin-shadow);
}
.marker-box { position: absolute; border-radius: 8px; box-shadow: 0 0 0 2px var(--pin-bg), 0 0 0 6px color-mix(in srgb, var(--pin-bg) 22%, transparent); }
.shot figcaption { margin-top: 12px; color: var(--muted-foreground); max-width: 34rem; }
.legend { list-style: none; padding: 0 !important; margin: 12px 0 0; display: grid; gap: 2px; max-width: 36rem; }
.legend li {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; margin: 0; padding: 7px 10px; border-radius: 8px;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.legend li.on { background: var(--accent); }
.legend .num { width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--pin-bg); color: var(--on-pin); font: 700 var(--text-xs)/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.marker-pin.on { scale: 1.3; z-index: 2; }
@media (prefers-reduced-motion: no-preference) { .marker-pin { transition: scale var(--dur-pop) var(--ease-out); } }
/* Beside the screenshot when the screenshot keeps about 560px next to the legend, under it otherwise. */
@container article (min-width: 54rem) {
  .shot.has-legend { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, var(--legend-w)); gap: 10px 28px; align-items: start; }
  .shot.has-legend > :is(.view-switch, .shot-desktop, .shot-phone, .shot-frame, .shot-hint, figcaption) { grid-column: 1; }
  .shot.has-legend > .view-switch { margin: 0; justify-self: start; }
  .shot.has-legend > figcaption { margin-top: 0; }
  .shot.has-legend > .legend { grid-column: 2; grid-row: 1 / span 3; margin: -6px 0 0; }
  .shot.has-legend:has(> .view-switch) > .legend { grid-row: 2 / span 2; }
}
/* Desktop or phone: two screenshots of one screen, switched by radio buttons and :has() (good-css: page state). */
.view-switch { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 12px; border-radius: var(--radius-full); box-shadow: inset 0 0 0 var(--line) var(--rule); }
.view-switch label {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--radius-full);
  font: 700 0.6875rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--foreground); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.view-switch input { position: absolute; opacity: 0; pointer-events: none; }
.view-switch label:has(input:checked) { background: var(--raised); color: var(--on-raised); }
.view-switch label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.view-switch svg { width: 14px; height: 14px; }
/* A numbered screenshot on a column narrower than 36rem (a phone) stays 640px wide and scrolls sideways, so its pins
 * of 16 px stay apart. The edge that hides the rest fades, and a line under the screenshot says that it scrolls. A
 * wider column, or a screenshot without numbers, shrinks the screenshot to the column. */
.shot-hint { display: none; }
.shot:not(.has-legend) .shot-hint { display: none !important; }
@container article (max-width: 36rem) {
  .shot.has-legend .shot-desktop {
    overflow-x: auto; overscroll-behavior-x: contain; border-radius: var(--radius-xl);
    animation: scroll-edges linear; animation-timeline: scroll(self inline);
    mask-image: linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
  }
  .shot.has-legend .shot-desktop > .shot-frame { min-width: 640px; box-shadow: 0 0 0 1px var(--border); }
  .shot.has-legend .shot-desktop .shot-zoom { justify-content: flex-start; }
  .shot-hint { display: block; margin: 8px 0 0; font-size: var(--text-xs); color: var(--muted-foreground); }
  .shot:has(.view-switch input[value="phone"]:checked) .shot-hint { display: none; }
}
.shot .shot-phone { display: none; }
.shot:has(.view-switch input[value="phone"]:checked) .shot-phone { display: block; }
.shot:has(.view-switch input[value="phone"]:checked) :is(.shot-desktop, .legend) { display: none; }
.shot-phone .shot-frame { width: min(390px, 100%); margin-inline: auto; border-radius: 28px; box-shadow: 0 0 0 8px var(--b-ink), var(--shadow-window); }
.shot-phone figcaption { text-align: center; margin-inline: auto; }
.shot-pending {
  display: flex; gap: 18px; align-items: center;
  padding: 18px; border-radius: var(--radius-xl); background: var(--control);
}
.shot-pending img { width: 96px; flex: none; background: var(--paper); border-radius: 16px; padding: 4px; }
.shot-pending p { margin: 0; color: var(--muted-foreground); font-size: var(--text-sm); }

/* ---------- Dialogs: enter and exit from display: none (good-css) ---------- */
dialog { padding: 0; border: 0; max-width: none; max-height: none; color: inherit; background: transparent; }
dialog, [popover] {
  opacity: 0;
  transition: opacity var(--dur-pop) var(--ease-out), translate var(--dur-pop) var(--ease-out),
    display var(--dur-pop) allow-discrete, overlay var(--dur-pop) allow-discrete;
}
dialog::backdrop {
  background: var(--scrim);
  opacity: 0;
  transition: opacity var(--dur-pop) var(--ease-out), display var(--dur-pop) allow-discrete, overlay var(--dur-pop) allow-discrete;
}
dialog[open], dialog[open]::backdrop { opacity: 1; }
[popover]:popover-open { opacity: 1; }
@starting-style {
  dialog[open], [popover]:popover-open, dialog[open]::backdrop { opacity: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  dialog, [popover] { translate: 0 0.5rem; }
  dialog[open] { translate: 0 0; }
  [popover]:popover-open { translate: 0 0; }
  @starting-style {
    dialog[open], [popover]:popover-open { translate: 0 0.5rem; }
  }
}

/* Lightbox. It only fades: a moved dialog would carry its fixed Close button away when the picture is panned. */
.lightbox, .lightbox[open] { translate: none !important; }
.lightbox { width: 100vw; height: 100svh; margin: 0; cursor: zoom-out; }
.lightbox[open] { display: grid; place-items: safe center; padding: 64px 24px 24px; }
.lightbox::backdrop { background: var(--lightbox-scrim); }
.lightbox-close {
  position: fixed; z-index: 2; top: calc(12px + var(--safe-top)); right: 12px;
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: var(--radius-full);
  background: var(--card); color: var(--foreground); box-shadow: var(--shadow-pop); cursor: pointer;
  font: 500 var(--text-sm)/1 var(--font-text);
}
.lightbox-close svg { width: 16px; height: 16px; }
.lightbox-frame {
  position: relative; width: min(var(--natural, 1600px), 1600px, 100%, calc((100svh - 88px) * var(--ratio, 1.6)));
  border-radius: 14px; overflow: clip; box-shadow: 0 30px 80px -30px #000000cc; background: var(--card);
}
.lightbox-frame img { display: block; width: 100%; height: auto; }

/* Search */
.search-dialog { width: min(680px, 100% - 32px); max-height: 72svh; margin: 10svh auto auto; border-radius: 20px; background: var(--card); box-shadow: var(--shadow-pop); overflow: clip; }
.search-dialog[open] { display: flex; flex-direction: column; }
.search-dialog .field-wrap { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border); flex: none; }
.search-dialog .field-wrap svg { left: 26px; }
.search-dialog .field { height: 44px; }
.search-dialog .field:focus-visible { outline-offset: -1px; }
.field::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-left: 8px; cursor: pointer; background: var(--muted-foreground); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat; }
.search-close { display: none; flex: none; height: 40px; padding: 0 14px; border: 0; border-radius: var(--radius-full); background: var(--control); color: var(--foreground); font: 700 var(--text-sm)/1 var(--font-sans); cursor: pointer; }
/* Scroll area between a fixed header and footer (good-css): the list shrinks, the field and the hints stay. */
.search-results { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; list-style: none; margin: 0; }
.search-results li a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--foreground); }
.search-results li a.sel { background: var(--selected); text-decoration: none; }
.search-results .r-sec { font: 700 var(--text-xs)/1.5 var(--font-sans); color: var(--muted-foreground); margin-bottom: 2px; overflow-wrap: anywhere; }
.search-results .r-title { font-weight: 700; }
.search-results .r-text { font-size: var(--text-sm); line-height: 1.5; color: var(--muted-foreground); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* A match is a soft tint under the letters, not a solid block: a short query matches inside many words. */
.search-results mark { background: light-dark(color-mix(in srgb, var(--b-orange) 38%, transparent), color-mix(in srgb, var(--b-orange) 32%, transparent)); color: inherit; border-radius: 3px; }
.search-empty { padding: 28px 16px; text-align: center; color: var(--muted-foreground); font-size: var(--text-sm); }
.search-foot { display: flex; flex: none; flex-wrap: wrap; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: var(--text-xs); color: var(--muted-foreground); }
@media (hover: hover) and (pointer: fine) {
  .search-results li a:hover { background: var(--accent); text-decoration: none; }
  .search-results li a.sel:hover { background: var(--selected); }
}

/* ---------- Pager: the page before and the page after, as two large links under an ink rule ---------- */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--border); max-width: var(--wide); }
.pager a { display: grid; align-content: start; gap: 8px; padding: 4px 0 6px; color: var(--foreground); }
.pager .dir { font: 700 0.6875rem/1.4 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
.pager .pg-t { font: 700 1.0625rem/1.3 var(--font-sans); letter-spacing: -.01em; }
.pager .prev .pg-t { padding-left: 1.5em; text-indent: -1.5em; }
.pager .arr { display: inline-block; font-weight: 400; }
.pager .prev .arr { width: 1.1em; margin-right: .4em; text-indent: 0; }
.pager .next .arr { margin-left: .4em; }
.pager .next { text-align: right; grid-column: -2 / -1; }
@media (hover: hover) and (pointer: fine) {
  .pager a:hover { text-decoration: none; color: var(--info-foreground); }
  .pager a:hover .pg-t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
  .pager .next:hover .arr { translate: 4px 0; }
  .pager .prev:hover .arr { translate: -4px 0; }
}
@media (prefers-reduced-motion: no-preference) { .pager .arr { transition: translate var(--dur-fast) var(--ease-out); } }
@media (max-width: 560px) { .pager { grid-template-columns: minmax(0, 1fr); } .pager .next { grid-column: 1; text-align: left; } }

/* ---------- Footer: one quiet row. The ways out to the site and the demo, the owner and the version of the text ---------- */
.site-foot { border-top: 1px solid var(--border); background: var(--card); }
.foot-in {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px;
  max-width: var(--page-w); margin: 0 auto 0 max(0px, (100% - var(--edge) - var(--page-w)) / 2);
  padding: 18px var(--pad-content) calc(24px + env(safe-area-inset-bottom, 0px));
  font-size: var(--text-sm);
}
.foot-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 36px; color: var(--foreground); font-weight: 500; }
.foot-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 0 18px; font-size: var(--text-xs); color: var(--muted-foreground); }
.foot-meta a { color: inherit; }
@media (pointer: coarse) { .foot-links a { min-height: 44px; } }

/* ---------- API reference ---------- */
.method {
  display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 22px; padding: 0 7px; border-radius: 6px;
  font: 700 var(--text-xs)/1 var(--font-mono); flex: none;
  --tone: var(--info); --tone-fg: var(--info-foreground);
  color: var(--tone-fg); background: color-mix(in srgb, var(--tone) var(--tone-tint), var(--card));
}
.method.post { --tone: var(--success); --tone-fg: var(--success-foreground); }
.method.put, .method.patch { --tone: var(--warning); --tone-fg: var(--warning-foreground); }
.method.delete { --tone: var(--destructive); --tone-fg: var(--destructive-foreground); }
/* In running text the method is a run of text, so the no-break space after it keeps it on the line of its path. */
.article :is(p, li, div.cell) > a > .method:has(+ code) { display: inline; min-width: 0; height: auto; padding: 2px 6px; line-height: 1; }
.toc .method { min-width: 44px; height: 18px; }
.op-index a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--foreground); }
.op-index .path { font: var(--text-xs)/1.4 var(--font-mono); color: var(--muted-foreground); overflow-wrap: anywhere; }
.op-index .sum { font-size: var(--text-sm); }
@media (hover: hover) and (pointer: fine) {
  .op-index a:hover { background: var(--accent); text-decoration: none; }
}
.op + .op { border-top: 1px solid var(--border); padding-top: 1.75rem; }
.op > * { margin-block: 0; }
.op > * + * { margin-block-start: 0.75rem; }
.op h2 { margin: 0; }
.op-desc { max-width: var(--wide); }
.op-desc p { margin: 0 0 10px; }
.op-desc p:last-child { margin-bottom: 0; }
.op-note { max-width: var(--wide); margin: 0; font-size: var(--text-sm); color: var(--muted-foreground); }
.op-note.warn {
  --tone: var(--warning);
  padding: 10px 14px; border-radius: var(--radius-xl); color: var(--foreground);
  background: color-mix(in srgb, var(--tone) var(--tone-wash), var(--card));
}
/* Concentric nested radius (good-css): outer = inner + padding. */
.op-line {
  --inner: 6px; --pad: 8px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: var(--pad) var(--pad) var(--pad) 10px;
  border-radius: calc(var(--inner) + var(--pad)); background: var(--code-bg); border: 1px solid var(--border);
}
.op-line .method { border-radius: var(--inner); }
.op-line .path { font: var(--text-sm)/1.4 var(--font-mono); overflow-wrap: anywhere; flex: 1; }
.op-line .path .param { color: var(--info-foreground); }
.op-line .copy-btn { margin-left: 0; width: 28px; height: 28px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 700; white-space: nowrap;
  color: var(--muted-foreground); background: var(--control);
}
a.badge:hover { text-decoration: none; filter: brightness(0.97); }
.badge svg { flex: none; inline-size: 1.05em; block-size: 1.05em; }
.badge.role { color: var(--info-foreground); background: color-mix(in srgb, var(--info) var(--tone-tint), var(--card)); }
.badge.role.admin { color: var(--warning-foreground); background: color-mix(in srgb, var(--warning) var(--tone-tint), var(--card)); }
.badge.token { color: var(--success-foreground); background: color-mix(in srgb, var(--success) var(--tone-tint), var(--card)); }
.badge.internal { color: var(--violet-foreground); background: color-mix(in srgb, var(--violet) var(--tone-tint), var(--card)); }
.badge.danger { color: var(--destructive-foreground); background: color-mix(in srgb, var(--destructive) var(--tone-tint), var(--card)); }
.op-sec { font: 700 0.6875rem/1.5 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
/* Collapsed blocks of an operation: a row with a count, open on demand (good-css pattern for Code and Why it works). */
.op-block { border: 1px solid var(--border); border-radius: var(--radius-xl); }
.op-block > summary {
  list-style: none; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px 8px 14px; cursor: pointer;
  font-weight: 700; font-size: var(--text-sm); white-space: nowrap;
}
.op-block > summary::-webkit-details-marker { display: none; }
.op-block > summary .op-count { margin-left: auto; font: 500 var(--text-xs)/1.3 var(--font-mono); color: var(--muted-foreground); text-align: right; white-space: normal; overflow-wrap: anywhere; }
.op-block > summary::after {
  content: "+"; flex: none; display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center;
  border: 1px solid var(--border); font: 500 var(--text-sm)/1 var(--font-mono); color: var(--muted-foreground);
}
.op-block[open] > summary::after { content: "–"; }
.op-block > .op-block-body { padding: 0 12px 12px; }
.op-block > .op-block-body > * { margin-block: 0; }
.op-block > .op-block-body > * + * { margin-block-start: 10px; }
.op-block .codeblock { margin: 0; }
.op-block .code-head .lang { visibility: hidden; } /* the block title already says curl */
@media (hover: hover) and (pointer: fine) {
  .op-block > summary:hover::after { color: var(--foreground); border-color: var(--muted-foreground); }
}
.params { width: 100%; }
.params td:first-child { width: 34%; }
.pname { font: 500 var(--text-sm)/1.4 var(--font-mono); color: var(--foreground); overflow-wrap: anywhere; }
.ptype { font: var(--text-xs)/1.4 var(--font-mono); color: var(--muted-foreground); }
.preq { font: 500 var(--text-xs)/1 var(--font-text); color: var(--destructive-foreground); margin-left: 6px; }
.pin { font: 500 var(--text-xs)/1 var(--font-text); color: var(--muted-foreground); }
.enum { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.enum code { font-size: var(--text-xs) !important; }
.pdesc { font-size: var(--text-sm); color: var(--foreground); }
.pdesc p { margin: 0 0 6px; }
.pdesc p:last-child { margin-bottom: 0; }
.pmeta { font-size: var(--text-xs); color: var(--muted-foreground); margin-top: 4px; }
/* Schema trees */
.schema { border-radius: var(--radius-xl); border: 1px solid var(--border); overflow: clip; }
.schema-head { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: var(--muted); border-bottom: 1px solid var(--border); font-size: var(--text-sm); color: var(--muted-foreground); }
.schema-head:empty { display: none; }
.schema-head a, .schema-head code { font-family: var(--font-mono); font-size: var(--text-xs); }
.prop { padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--border); }
.prop:last-child { border-bottom: 0; }
.prop-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.prop .pdesc { margin-top: 3px; }
.prop details { margin-top: 8px; }
.prop details > summary { position: relative; cursor: pointer; font-size: var(--text-xs); color: var(--info-foreground); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.prop details > summary::-webkit-details-marker { display: none; }
.prop details > summary::before { content: "+"; display: inline-flex; width: 16px; height: 16px; border-radius: 4px; align-items: center; justify-content: center; background: var(--control); font: 500 var(--text-xs)/1 var(--font-mono); }
.prop details[open] > summary::before { content: "–"; }
.prop details .schema { margin: 8px 0 0; }
.responses > * + * { margin-top: 8px; }
.responses details.resp { border-radius: var(--radius-xl); border: 1px solid var(--border); }
.responses details.resp > summary { list-style: none; display: grid; grid-template-columns: 52px minmax(0, 1fr) 16px; gap: 10px; align-items: baseline; padding: 10px 12px; cursor: pointer; }
.responses details.resp > summary::-webkit-details-marker { display: none; }
.responses details.resp > summary::after { content: "+"; color: var(--muted-foreground); font-family: var(--font-mono); }
.responses details.resp[open] > summary::after { content: "–"; }
.responses details.resp > .resp-body { padding: 0 12px 10px; }
.responses details.resp > .resp-body > * + * { margin-top: 8px; }
.responses details.resp.empty > summary { cursor: default; }
.responses details.resp.empty > summary::after { content: ""; }
.resp-common { margin: 4px 2px 0; font-size: var(--text-sm); color: var(--muted-foreground); }
.resp-common .code { margin: 0 2px; }
.code { font: 500 var(--text-sm)/1 var(--font-mono); }
.code.s2 { color: var(--success-foreground); }
.code.s4 { color: var(--warning-foreground); }
.code.s5 { color: var(--destructive-foreground); }
.resp-desc { font-size: var(--text-sm); }
.ref-link { font: var(--text-xs) var(--font-mono); }
/* A model reached by a link lands under the sticky filter, not behind it, and its name is marked. */
.model { padding: 18px 0 0; border-top: 1px solid var(--border); }
.frame .model[id] { scroll-margin-top: calc(var(--header) + 78px); }
.model:target > h3 { background: var(--selected); border-radius: 6px; margin-inline: -8px; padding: 2px 8px; }
.model > * + * { margin-top: 8px; }
.model h3 { margin: 0; font: 700 var(--text-base)/1.4 var(--font-mono); letter-spacing: 0; overflow-wrap: anywhere; }
.model-filter.field-wrap { position: sticky; top: calc(var(--header) + 4px); z-index: 2; padding: 6px 0; background: var(--card); }
.field {
  width: 100%; height: 44px; padding: 0 16px 0 40px; border: 0; border-radius: var(--radius-full);
  background: var(--card); color: var(--foreground); border: var(--line) solid var(--rule);
  font: 400 max(16px, 1rem)/1 var(--font-text);
}
.field::placeholder { color: var(--muted-foreground); }
.field:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.field-wrap { position: relative; }
.field-wrap svg { position: absolute; left: 15px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--foreground); }

/* Role matrix */
.yes { color: var(--success-foreground); font-weight: 600; }
.no { color: var(--muted-foreground); }

/* ---------- 404 ---------- */
.lost { position: relative; min-height: 70svh; display: flex; flex-direction: column; align-items: center; justify-content: safe center; text-align: center; overflow: clip; }
.lost > * + * { margin-top: 12px; }
.lost > .paper-tile + h1 { margin-top: 24px; }
.lost .paper-tile { width: 220px; }
/* An illustration has a white ground: it lies on a white tile, a sticker on the page. */
.paper-tile { border-radius: 22px; isolation: isolate; }
.paper-tile img { display: block; width: 100%; mix-blend-mode: multiply; }
.lost .lead { max-width: var(--measure); }
.lost .btn-row { justify-content: center; }
.lost .paper-tile { background: var(--paper); padding: 6%; rotate: -3deg; box-shadow: 0 0 0 var(--line) var(--b-ink), 0 24px 40px -24px #00000080; }
.lost .paper-tile img { mix-blend-mode: normal; }

/* ---------- Press feedback and hit areas (good-css) ---------- */
:is(.ctl, .copy-btn, .menu button, .chip):active { scale: 0.96; }
.card:active { scale: 0.99; }
.copy-btn::after, .ctl.icon::after {
  content: ""; position: absolute;
  inset: min(0px, (100% - 44px) / 2);
}

/* ---------- Opt-in motion (good-css): movement only for people who did not ask for less ---------- */
@media (prefers-reduced-motion: no-preference) {
  :is(.btn, .ctl, .copy-btn, .menu button, .card, .chip) {
    transition-property: scale, translate, background-color, border-color, color, opacity;
    transition-duration: var(--dur-press);
    transition-timing-function: var(--ease-out);
  }
}

/* ---------- Responsive layout ----------
 * 1400 and wider: everything in the top bar. Below 1400 search loses its shortcut, below 1260 the demo moves to the
 * foot of the sidebar, below 1100 search shrinks to an icon. 900 and below: the sidebar becomes a drawer behind the
 * menu button, with the sections on top. */
@media (max-width: 1399.98px) {
  .search-btn { min-width: 0; padding-right: 16px; }
  .search-btn kbd { display: none; }
}
@media (max-width: 1259.98px) {
  .topbar .demo-link { display: none; }
  .side-out { display: inline-flex; }
}
/* Below 1100 the tabs keep their place and scroll sideways if they must, the edge that hides a tab fades. */
@media (max-width: 1099.98px) {
  .search-btn { width: 42px; padding: 0; justify-content: center; background: transparent; }
  .search-btn .label { display: none; }
  .brand .brand-docs { display: none; }
  .tabs { flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .topbar-spacer { flex: 0 0 2px; }
}
.sidebar.no-section .side-sections { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 16px 16px; }
.sidebar.no-section .side-sections::before { content: "Sections"; display: block; padding: 8px 10px; font: 700 0.6875rem/1.5 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
@media (max-width: 900px) {
  :root { --topbar-h: 60px; }
  .menu-btn { display: inline-flex; }
  .brand .brand-docs { display: inline; }
  .topbar { gap: 8px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .tabs { display: none; }
  .topbar-spacer { flex: 1; }
  /* The drawer keeps the sections on top as a row of pills and scrolls only the pages under them. */
  .side-sections {
    flex: none; display: flex; flex-wrap: wrap; gap: 6px;
    padding: 12px 12px 12px max(14px, env(safe-area-inset-left, 0px)); border-bottom: var(--line) solid var(--rule);
  }
  .side-sections a { padding: 0 14px; border: var(--line) solid var(--rule); border-radius: var(--radius-full); }
  .side-sections a[aria-current] { background: var(--raised); color: var(--on-raised); }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: var(--header); left: 0; bottom: 0; z-index: 50; width: min(300px, 86vw); height: auto;
    align-self: stretch; /* an absolutely positioned grid child with align-self: start shrinks to its content */
    background: var(--background); box-shadow: var(--shadow-pop);
    /* The whole drawer scrolls, so a short window (a phone on its side) still reaches every page. */
    overflow-y: auto; overscroll-behavior: contain; padding-left: 0;
    translate: -105% 0; visibility: hidden;
    transition: visibility 0s linear var(--dur-panel);
  }
  body.nav-open .sidebar { translate: 0 0; visibility: visible; transition: visibility 0s; }
  .side-scroll { flex: none; overflow: visible; animation: none; mask-image: none; padding-left: max(14px, env(safe-area-inset-left, 0px)); }
  .side-foot { padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  /* Touch targets of 40px and more on a phone or a tablet. */
  .side-list a, .side-sections a, .side-out, .toc-inline li a, .look a { min-height: 44px; }
  .look a { min-width: 44px; }
  .toc-inline li a { display: flex; align-items: center; padding-block: 6px; }
  .article :is(ul, ol):not([class]) > li.link-item { margin-block: 0; }
  .article :is(ul, ol):not([class]) > li.link-item > a, .article td.link-cell a { display: inline-flex; align-items: center; min-height: 40px; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 40px; }
  .crumbs { margin-bottom: 6px; margin-top: -4px; }
  .slab-in { padding-top: 18px; }
  /* On a narrow screen a chip names only its section: Concept, How-to, Console, API. Four short chips fit in one
   * row and no title is cut by the edge of the screen. The title stays in the name a screen reader gets. */
  .chip-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .chip { padding-inline: 1em; }
  .chip b { opacity: 1; }
  .slab-in::after { margin-top: 22px; }
  .views { margin-top: 16px; }
  .ctl { height: 42px; }
  .ctl.icon, .search-btn { width: 42px; }
  .view-switch label { height: 40px; }
  .brand { min-height: 40px; }
  .menu button { height: 40px; }
  .copy-btn, .op-line .copy-btn { width: 40px; height: 40px; }
  .scrim { position: fixed; inset: var(--header) 0 0 0; z-index: 45; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity var(--dur-panel) var(--ease-out); }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .content { padding-top: 24px; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  .home-head { margin-top: -24px; }
  .lost h1 { font-size: var(--text-2xl); }
  /* Parameters stack: the name above its description, so names never break inside a word. */
  .params tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .params tr:last-child { border-bottom: 0; }
  .params td { display: block; width: auto !important; border: 0 !important; padding: 2px 0 !important; }
  .preq { white-space: nowrap; }
  .article td code { white-space: normal; overflow-wrap: anywhere; }
  .ptype, .ref-link { overflow-wrap: anywhere; }
  .search-close { display: inline-flex; align-items: center; }
  .search-dialog { margin-top: calc(8px + var(--safe-top)); max-height: calc(100svh - 16px - var(--safe-top)); }
  body.nav-open { overflow: hidden; }
  .lightbox[open] { place-items: safe start; overflow: auto; }
  .lightbox .lightbox-frame { width: min(var(--natural, 1100px), 1100px); max-width: none; }
  .lightbox[open]:has(.lightbox-frame:not(.wide)) { place-items: safe center; }
  .op-index a { grid-template-columns: 56px minmax(0, 1fr); }
  .marker-box { box-shadow: 0 0 0 1.5px var(--pin-bg); }
}
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .sidebar { transition: translate var(--dur-panel) var(--ease-out), visibility 0s linear var(--dur-panel); }
  body.nav-open .sidebar { transition: translate var(--dur-panel) var(--ease-out), visibility 0s; }
}
@media (max-width: 560px) {
  :root { scrollbar-gutter: auto; --pad-content: 16px; }
}
@media (max-width: 359.98px) {
  .brand .brand-docs { display: none; }
}
@media (max-width: 400px) {
  .brand .brand-docs { display: none; }
  .brand { --logo: 26px; }
}
@container topbar (max-width: 300px) {
  .brand { --logo: 21px; }
}
@media (min-width: 901px) {
  .scrim { display: none; }
}

/* ---------- By the width of the text column (container queries), not of the window ----------
 * A table turns into a list of rows when its column is narrow: the first cell is the name of the row, the rest follow
 * under it. A table of two columns needs no labels, the name and its text are enough. */
@container article (max-width: 36rem) {
  .article table.cardify thead { display: none; }
  .article table.cardify, .article table.cardify tbody, .article table.cardify tr, .article table.cardify td { display: block; width: 100%; }
  .article table.cardify tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
  .article table.cardify tbody tr:last-child { border-bottom: 0; }
  .article table.cardify td { border: 0; padding: 3px 0; }
  .article table.cardify td:first-child { font-weight: 700; }
  .article table.cardify td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: var(--text-xs); font-weight: 500; color: var(--muted-foreground); }
  .article table.cardify:not(:has(th:nth-child(3))) td[data-label]:not(:first-child)::before { display: none; }
}
/* The steps of the home page stack: the step, then where to read about it, under the name of the step. */
@container article (max-width: 54rem) {
  .steps-map { overflow: visible; }
  .steps-map table, .steps-map tbody, .steps-map tr, .steps-map tbody th, .steps-map td { display: block; width: 100% !important; }
  .steps-map thead { display: none; }
  .steps-map tr { padding: 14px 0 12px; border-bottom: 1px solid var(--border); }
  .steps-map tbody tr:last-child { border-bottom: 0; }
  .article .steps-map :is(tbody th, td) { padding: 0; border: 0; }
  .article .steps-map td { margin-top: 8px; padding-left: 42px; }
  .steps-map td::before { content: attr(data-label); display: block; font-size: var(--text-xs); font-weight: 500; color: var(--muted-foreground); }
  .step-links { flex-direction: row; flex-wrap: wrap; gap: 0 16px; }
  .step-links a { display: inline-flex; align-items: center; min-height: 36px; }
  .home-more { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Print: the text of the page, without the chrome ---------- */
@media print {
  .topbar, .sidebar, .rail, .site-foot, .pager, .skip-link, .scrim, .toc-inline, .views, .copy-btn, .anchor, .home-actions, .home-stage { display: none !important; }
  .shell, .frame { display: block; min-height: 0; }
  .page-slab, .home-head::before { background: none !important; color: #000; border-bottom: 1px solid #000; }
  .page-slab::before, .home-head::after { display: none; }
  .page-slab h1, .page-slab .lead, .home-head, .home-head h1, .home-head h1 em { color: #000 !important; }
  .slab-in, .content { max-width: none; margin: 0; padding: 0 0 12pt; }
  .codeblock { background: none; color: #000; border: 1px solid #000; }
  .codeblock .hl * { color: #000 !important; }
  .article a { text-decoration: underline; }
  .article :is(h2, h3) { break-after: avoid; }
  .article :is(table, pre, .callout) { break-inside: avoid; }
}

/* A link to an API operation (a method badge and a path) stays on one line on a desktop: half a path on the next
 * line reads as another operation. */
@media (min-width: 901px) {
  .article :is(p, li, .cell) > a:has(> .method), .article :is(p, li, .cell) > a:has(> .method) > code { white-space: nowrap; }
  .article :is(p, li, .cell) > a:has(> .method) wbr { display: none; }
}
