/* Written by generator/site.ts from tokens-a.css, chrome-a.css, docs.css (SHL-438): edit those. */

/* Direction A, "Refined current" (SHL-176): the architect's delta on tokens.css (SHL-176 comment 2101619b), plus
   --mark (front-end lead, aa2021cf), for a page that sets <html data-site="a"> and loads this after base.css. Every
   selector needs data-site="a", so a page without it keeps its values. As in tokens.css, primitives are
   the only hex; o- is amber. The dark blocks repeat every token: the light block comes after tokens.css's dark one in
   the cascade, so a token it sets would otherwise stay light in dark mode. */
:root[data-site="a"] {
  --g-7c7e83: #7c7e83;
  --g-66686d: #66686d;
  --g-8f9196: #8f9196;
  --g-3d3d3d: #3d3d3d;
  --o-8a5300: #8a5300;
  --o-fbecd2: #fbecd2;
  --o-ffc46b: #ffc46b;
  --o-33270f: #33270f;

  --ground: var(--g-f2f2f2);
  --control: var(--g-7c7e83);
  --faint: var(--g-66686d);
  --mint-ink: var(--m-0b6b40);
  --mint-wash: var(--m-d5f5e4);
  --amber-ink: var(--o-8a5300);
  --amber-wash: var(--o-fbecd2);
  --mark: var(--g-3d3d3d);
}

/* a:dark */
:root[data-site="a"][data-theme="dark"] {
  --ground: var(--g-101010);
  --control: var(--g-66686d);
  --faint: var(--g-8f9196);
  --mint-ink: var(--m-a1ffcb);
  --mint-wash: var(--m-18342b);
  --amber-ink: var(--o-ffc46b);
  --amber-wash: var(--o-33270f);
  --mark: var(--g-a6a6a6);
}

@media (prefers-color-scheme: dark) {
  /* a:os-dark */
  :root[data-site="a"]:not([data-theme]) {
    --ground: var(--g-101010);
    --control: var(--g-66686d);
    --faint: var(--g-8f9196);
    --mint-ink: var(--m-a1ffcb);
    --mint-wash: var(--m-18342b);
    --amber-ink: var(--o-ffc46b);
    --amber-wash: var(--o-33270f);
    --mark: var(--g-a6a6a6);
  }
}

/* Direction A's chrome (SHL-438): the column, the skip link, the utility nav and the footer generator/chrome-a.ts
   writes, on the A pages and on every docs page, which load it inside docs-a.css (generator/site.ts). Every selector
   needs data-site="a", and colours are tokens only. The docs load site.css too: the values marked "site.css" below
   cancel its own .skip, .theme-toggle and .credits rules there and change nothing on the A pages, which don't load it.
   No @layer: layered, these rules would lose to site.css's unlayered ones on the docs. */

[data-site="a"] { --column: 1360px; }
[data-site="a"] .wrap { max-width: var(--column); margin: 0 auto; padding: 0 40px; }
/* margin and the body's padding-top: site.css */
[data-site="a"] .skip { position: absolute; left: 12px; top: 12px; z-index: 1; margin: 0; padding: 8px 14px; background: var(--ink); color: var(--on-ink); font-weight: 600; text-decoration: none; }
[data-site="a"] .skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-site="a"] body:has(> .skip:focus) { padding-top: 0; }

[data-site="a"] .btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 1px solid var(--control); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
[data-site="a"] .btn.primary { background: var(--mint-ink); border-color: var(--mint-ink); color: var(--on-mint); }

/* Below 600px the Menu button discloses the nav; site.js flips its aria-expanded, which the rules below read. */
[data-site="a"] .util { display: flex; align-items: center; gap: 6px; height: 56px; }
[data-site="a"] .util nav { display: flex; gap: 6px; margin-left: 24px; }
[data-site="a"] .util a.nl { padding: 8px 12px; font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; text-decoration: none; }
[data-site="a"] .util a.nl[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
[data-site="a"] .util a.keep { margin-left: auto; }
[data-site="a"] .util .btn.primary { height: 38px; font-size: 15px; }
[data-site="a"] .menu-btn { display: none; }

/* display, gap and the links' underline offset: site.css */
[data-site="a"] .credits { display: block; gap: normal; padding: 56px 0 24px; color: var(--muted); font-size: 14px; }
[data-site="a"] .credits ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 8px 24px; margin-top: 8px; padding: 0; list-style: none; }
[data-site="a"] .credits a { text-underline-offset: auto; }
[data-site="a"] .foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; padding: 24px 0 40px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
[data-site="a"] .foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
/* all but margin-left and text-decoration: site.css */
[data-site="a"] .theme-toggle { align-self: auto; min-height: 0; margin-left: auto; padding: 0; background: none; font-size: inherit; font-weight: inherit; text-decoration: underline; }

/* The scroll cue (front-end lead 8a3e0d35; SHL-549): a shadow at an edge with more content past it, the fixed (scroll)
   shadows hidden at an end the scroller has reached by covers that move with it (local). On the limits and /security's
   fragments, and on a docs code block, whose ground is .docs .tile's --card (docs.css), not .t-night's --night: covers
   in any other colour than the tile's show as a band. */
[data-site="a"] .mk .ref-scroll, [data-site="a"] .mk .frag__scroll, [data-site="a"] .docs-section .code-tile pre { background: linear-gradient(to right, var(--card) 30%, transparent) left / 40px 100% no-repeat local, linear-gradient(to left, var(--card) 30%, transparent) right / 40px 100% no-repeat local, linear-gradient(to right, color-mix(in srgb, var(--ink) 18%, transparent), transparent) left / 12px 100% no-repeat scroll, linear-gradient(to left, color-mix(in srgb, var(--ink) 18%, transparent), transparent) right / 12px 100% no-repeat scroll, var(--card); }

@media (max-width: 1023px) {
  [data-site="a"] .util nav { margin-left: 12px; }
  [data-site="a"] .util a.nl { padding-inline: 8px; }
}
/* The bar's row needs 604px at 8px padding: at 601-603px Sign in wrapped onto two lines (SHL-434). Range syntax so a
   zoomed, fractional width between the phone block's 600px and 601px gets the 6px too. */
@media (600px < width < 640px) {
  [data-site="a"] .util a.nl { padding-inline: 6px; }
}
@media (max-width: 600px) {
  [data-site="a"] .wrap { padding: 0 18px; }
  [data-site="a"] .util { flex-wrap: wrap; height: auto; min-height: 52px; }
  [data-site="a"] .util a.nl { padding-inline: 12px; }
  [data-site="a"] .util nav, [data-site="a"] .util .hide-m { display: none; }
  [data-site="a"] .menu-btn { display: inline-flex; order: 1; }
  [data-site="a"] .util:has(.menu-btn[aria-expanded="true"]) nav { display: flex; flex-direction: column; order: 2; flex-basis: 100%; margin: 0 0 8px; }
  /* Start free, the bar's one .hide-m, is the open Menu's last row (SHL-421): another .hide-m in the bar would show there too. */
  [data-site="a"] .util:has(.menu-btn[aria-expanded="true"]) .hide-m { display: flex; order: 3; flex-basis: 100%; justify-content: center; margin: 0 0 8px; }
  [data-site="a"] .foot { gap: 12px; }
}
/* Without script the Menu button can't open, so the links and Start free show under the bar instead. */
@media (max-width: 600px) and (scripting: none) {
  [data-site="a"] .menu-btn { display: none; }
  [data-site="a"] .util nav { display: flex; flex-wrap: wrap; order: 2; flex-basis: 100%; margin: 0 0 8px; }
  [data-site="a"] .util .hide-m { display: flex; order: 3; flex-basis: 100%; justify-content: center; margin: 0 0 8px; }
}

/* docs.shiftlabs.org: the docs board under direction A's nav (generator/layout.ts), its tiles drawn as A's cards.
   No page links this file: the build folds it into docs-a.css after tokens-a.css and chrome-a.css (SHL-438).
   Desktop: three rails, the menu (columns 1-3), the page (4-10) and On this page (11-12), the search over the last two.
   Below 1100 px the menu folds into a button and On this page follows the title.
   Every block of a section takes the article's width; text keeps its reading measure from base.css. DESIGN.md "Docs". */

.docs { align-items: start; }

/* A's ground, column and cards (SHL-438): the board is a chrome-a.css .wrap, and each tile a --card with a 1px --border
   edge drawn inset, so no box changes size; a control's edge is --control, 3:1. .wrap's margin is as specific as the
   rule below and comes first in docs-a.css: reorder generator/site.ts's parts and the board loses its top gap. */
body { background: var(--ground); }
.docs.wrap { margin-top: var(--gap); }
.docs .tile, .docs .table-tile, .docs .ref-rows { background: var(--card); box-shadow: inset 0 0 0 1px var(--border); }
.docs :is(.docs-search, .docs-menu-button) { box-shadow: inset 0 0 0 1px var(--control); }
.docs .t-night :focus-visible { outline-color: var(--focus-color); }
.docs :is(.photo, .film) figcaption { background: var(--card); color: var(--muted); }
.docs .film__control { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--control); }
.docs .frag { background: none; }
/* site.css wraps a fragment's cells below 1100 px; in A's column the /connections egress table was clipped 22 px at
   1104-1136 px with them unwrapped. */
.docs .doc__frag [data-ui] td { white-space: normal; }
.docs .doc__frag [data-ui] td.num { white-space: nowrap; }

/* the Contents link (below 1100 px), the search tile (search.js shows it) and its results. The row's height is
   reserved from the first paint, so the field appearing does not move the page. */
.docs-top { grid-column: 4 / -1; grid-row: 1; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: var(--gap); min-height: 56px; }
.docs-menu-button { display: none; }
.docs-search { grid-column: 1 / -1; display: flex; min-height: 56px; padding: 0 var(--pad); cursor: text; transition: background-color var(--t-hover) ease; }
/* Hidden, the field keeps its box, invisible: the row is its own height, so showing it moves nothing at any zoom or
   device scale (SHL-418). It beats site.css:10's [hidden] { display: none !important } because both are !important
   and unlayered and this is more specific; wrap site.css in an @layer and that layered !important wins, silently. */
.docs-search[hidden] { display: flex !important; visibility: hidden; }
.docs-search:focus-within { outline: var(--focus-width) solid var(--focus-color); outline-offset: var(--focus-offset); }
.docs-search input { flex: 1; min-width: 0; margin: 0; padding: 16px 0; border: 0; border-radius: 0; background: none; font-weight: 600; appearance: none; outline: none; }
.docs-search input::placeholder { color: var(--muted); opacity: 1; }
.docs-search input::-webkit-search-decoration, .docs-search input::-webkit-search-cancel-button { appearance: none; }
.docs-search__key { align-self: center; min-width: 28px; padding: 3px 8px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); font-size: var(--step-small); line-height: 1.3; text-align: center; }
.docs-search:focus-within .docs-search__key { visibility: hidden; }
@media (hover: none), (width < 1100px) { .docs-search__key { display: none; } }
.docs-hits { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.docs-hit { display: flex; flex-direction: column; gap: 4px; min-height: 64px; padding: 18px 20px; }
.docs-hit:focus-visible { background: var(--raised); }
.docs-hit:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.docs-hit:last-child:nth-child(3n+2) { grid-column: span 2; }
.docs-hit__title { font-weight: 600; line-height: 1.3; }
.docs-hit__page { color: var(--muted); }
.docs-hit__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.docs-hits__none { grid-column: 1 / -1; overflow-wrap: anywhere; }

/* the menu: a link tile for a one-page section, a tile per section with its pages, the current page raised and marked
   with A's 3px ink rule. The links stand 1px in, so a raised one leaves its tile's edge drawn. */
.docs-menu { grid-column: 1 / 4; grid-row: 1 / span 3; position: sticky; top: var(--gap); display: grid; align-content: start; gap: var(--gap); max-height: calc(100svh - 2 * var(--gap)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.docs-menu ul, .docs-toc ul { padding: 0; list-style: none; }
.docs-menu__page { min-height: 56px; padding: 16px var(--pad); font-size: 15px; font-weight: 600; }
.docs-menu__group { padding: 16px 0 8px; }
.docs-menu__name, .docs-toc__name { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.docs-menu__name { padding: 0 var(--pad) 6px; }
.docs-menu__group a { display: block; margin-inline: 1px; padding: 8px calc(var(--pad) - 1px); font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.docs-menu a[aria-current="page"] { background: var(--raised); box-shadow: inset 3px 0 0 var(--ink); }
.docs-menu .tile[aria-current="page"] { box-shadow: inset 3px 0 0 var(--ink), inset 0 0 0 1px var(--border); }
.docs-menu a:focus-visible { outline-offset: -4px; }

/* the page: title, picture and page tiles, On this page, then the sections */
.docs-main { grid-column: 4 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.docs-intro, .docs-article, .docs-section { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.docs-intro { grid-column: 1 / 8; grid-row: 1; }
.docs-article { grid-column: 1 / 8; grid-row: 2; gap: 56px; }
.docs-article > .doc + .doc { margin-top: 0; }
.docs-title { display: flex; flex-direction: column; gap: 24px; }
/* site.css's 8vw stops where the column does (8vw at 1360 px): past it, one long word, such as a runner report's
   "vulnerabilities", ran 31-64 px out of its tile at 1440-1920. A word still too long breaks rather than overflow. */
.docs .page-title { font-size: clamp(3.5rem, 8vw, 6.8rem); overflow-wrap: break-word; }
.docs-title .lead { max-width: 34ch; font-weight: 600; }
.docs-title .lead code { font-weight: 500; }
.docs-photo { aspect-ratio: 2 / 1; }
.docs-photo img { position: absolute; inset: 0; object-position: 50% 35%; }
.docs-contents { display: flex; flex-wrap: wrap; gap: var(--gap); }
.docs-contents .tile { flex: 1 1 12rem; min-height: 64px; padding: 18px 20px; font-weight: 600; }

.docs-toc { grid-column: 8 / -1; grid-row: 1 / span 2; position: sticky; top: var(--gap); max-height: calc(100svh - 2 * var(--gap)); padding: 18px 0 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.docs-toc__name { padding: 0 20px 8px; }
.docs-toc a { position: relative; display: block; padding: 5px 20px 5px 36px; color: var(--muted); font-size: var(--step-small); line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; transition: color var(--t-hover) ease; }
.docs-toc a[aria-current] { color: var(--ink); font-weight: 600; }
.docs-toc a[aria-current]::before { content: ""; position: absolute; left: 20px; top: 5px; bottom: 5px; width: 3px; background: currentColor; }
.docs-toc a:focus-visible { outline-offset: -4px; }

.docs-section__head h2 + p { margin-top: 16px; }
.docs-section .film { aspect-ratio: 16 / 9; min-height: 0; }
.docs-section .ref-rows > li { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); }
/* reference rows and tables: one card, rows parted by A's rules rather than banded. A table wider than its card scrolls
   sideways inside it, in the named group generator/tiles.ts makes (A's pages use a region; tiles.ts says why not here). */
.docs .table-tile { overflow-x: auto; }
.docs .ref-rows { gap: 0; }
.docs .ref-rows li, .docs .ref-rows li:nth-child(even) { background: none; }
.docs .ref-rows li + li { border-top: 1px solid var(--border); }
.docs .ref__caption { background: none; color: var(--ink); border-bottom: 1px solid var(--border); }
.docs .ref th { background: none; border-bottom: 1px solid var(--border); }
.docs .ref td, .docs .ref tbody tr:nth-child(even) td { background: none; border-bottom: 1px solid var(--rule); }
.docs .ref tbody tr:last-child td { border-bottom: 0; }

/* The docs root only, 600-880 px tall, on touch screens or under 1100 px wide (SHL-370; layout.ts ROOT_BAND, which
   generator.test.ts checks this against): its off-screen tiles skip layout, so their code loads no IBM Plex Mono on
   the first render. base.js measures skipped tiles at the 500 px placeholder: elsewhere that moved reveals and section
   links, and under 600 px base.js's ten-screen pre-reveal. Over 880 px Chrome's render margin reaches the
   Quickstart's code anyway. The hover/width clause is the .docs-search__key query above: where the key shows, it loads
   Plex Mono on the first screen, so the rule saved nothing and its placeholders moved the page after scrollbar drags
   (PR 675 reviews, 2026-11-07). A longer root needs the band re-measured. Not on .docs-section: measuring inside one
   lays it all out. Not tables: they overflow at 768-1440 px; this would clip them. */
@media (600px <= height <= 880px) and ((hover: none) or (width < 1100px)) {
  .docs-main--root .docs-section > :is(.tile, .ref-rows) { content-visibility: auto; contain-intrinsic-block-size: auto 500px; }
  /* docs.js sets is-whole at LCP, and sooner for an in-page jump or a #fragment: see there. */
  .docs-main--root .docs-article.is-whole > .docs-section > :is(.tile, .ref-rows) { content-visibility: visible; }
}

/* Fallback faces laid out like IBM Plex Mono: size-adjust brings a face's advance to Plex Mono's 600/1000 em, and the
   overrides set Plex Mono's ascent, descent and gap (1025, 275, 0 per 1000) divided by size-adjust, which scales them
   too. From each font's own head, hhea and hmtx (2026-11-09):
     Plex Mono Fallback 1   Menlo, DejaVu Sans Mono                         advance 1233/2048
     Plex Mono Fallback 2   Liberation Mono, Courier New, Droid Sans Mono   advance 1229/2048
     Plex Mono Root         IBM Plex Mono's own files, its own numbers as overrides
   local() takes full and PostScript names: Chromium doesn't find local("Menlo"). Consolas isn't here: no copy to read.
   Firefox 157 rounds an overridden face's ascent to the nearest px and a plain face's up (Plex Mono's 17.425 px at
   17 px to 18), so the root's Plex Mono carries overrides too: without, 223 of 801 widths moved at the swap, to 8.5 px. */
@font-face { font-family: "Plex Mono Fallback 1"; src: local("Menlo Regular"), local("Menlo-Regular"), local("DejaVu Sans Mono"), local("DejaVuSansMono"); size-adjust: 99.6594%; ascent-override: 102.8503%; descent-override: 27.594%; line-gap-override: 0%; }
@font-face { font-family: "Plex Mono Fallback 2"; src: local("Liberation Mono"), local("LiberationMono"), local("Courier New"), local("CourierNewPSMT"), local("Droid Sans Mono"), local("DroidSansMono"); size-adjust: 99.9837%; ascent-override: 102.5167%; descent-override: 27.5045%; line-gap-override: 0%; }
@font-face { font-family: "Plex Mono Root"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.08949f72.woff2") format("woff2"); ascent-override: 102.5%; descent-override: 27.5%; line-gap-override: 0%; }
@font-face { font-family: "Plex Mono Root"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-500-normal.01d28544.woff2") format("woff2"); ascent-override: 102.5%; descent-override: 27.5%; line-gap-override: 0%; }

/* The docs root's code draws in the fallback faces until docs.js sets code-font: Plex Mono asked for on the first
   render slowed /docs/ LCP (SHL-438, PR 799). The faces above match its metrics, so the swap moves nothing but, at 1 of
   801 widths in Chromium (0 in WebKit and Firefox), a line break 1/64 px from full (2026-11-09). Without script the
   code is Plex Mono from the start. */
.docs-main--root { --font-code: "Plex Mono Root", "Plex Mono Fallback 1", "Plex Mono Fallback 2", ui-monospace, monospace; }
@media (scripting: enabled) {
  html:not(.code-font) .docs-main--root { --font-code: "Plex Mono Fallback 1", "Plex Mono Fallback 2", ui-monospace, monospace; }
}

/* code tiles: A's code card bar, a rule under the language tabs (the chosen one raised), the right caption, cut short on a
   narrow tile rather than wrapped, and the copy button (docs.js shows it) */
.docs .code-tile__bar { align-items: center; min-height: 44px; padding: 0 var(--pad); border-bottom: 1px solid var(--border); color: var(--muted); }
.docs .lang { margin: 0 0 0 -10px; }
.docs .lang button { color: var(--muted); }
.docs .lang button:hover { color: var(--ink); }
.docs .lang button[aria-pressed="true"] { background: var(--raised); color: var(--ink); font-weight: 600; }
.code-tile__end { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.code-tile__end > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-tile__bar .lang { flex: none; }
.code-copy { flex: none; min-width: 4.75em; margin-right: -10px; padding: 6px 10px; color: var(--ink); box-shadow: inset 0 0 0 1px var(--control); font-weight: 600; text-align: center; transition: background-color 160ms; }
.code-copy:hover, .code-copy.is-done { background: var(--raised); }
.code-copy:active { transform: scale(0.96); }
/* 48em is 80 columns of IBM Plex Mono (0.6em a glyph), the width content/docs examples are written to: a tile shrinks
   its code down to 12 px so 80 columns fit, from 1144 px in A's column. Below that, and for longer lines, the code
   scrolls sideways in its tile: at 1100-1143 px an 80-column block by up to 25 px (front-end lead, SHL-438 919d973e:
   12 px stays the floor). A scrolling pre takes keyboard focus; its ring is drawn inside, as the tile clips outside.
   Its scroll cue (chrome-a.css) is opaque and covers the tile's inset edge, so the pre draws that edge again; the bar's
   border-bottom is its top. */
.docs-section .code-tile { container-type: inline-size; }
.docs-section .code-tile pre { font-size: clamp(12px, (100cqi - 2 * var(--pad)) / 48, 14px); box-shadow: inset 1px 0 0 var(--border), inset -1px 0 0 var(--border), inset 0 -1px 0 var(--border); }
.docs-section .code-tile pre:focus-visible { outline-offset: -2px; }

.docs-pager { grid-column: 4 / 11; grid-row: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 48px; }
.docs-pager .tile { display: flex; flex-direction: column; gap: 4px; min-height: 64px; padding: 18px 20px; font-weight: 600; }
.docs-pager .small { color: var(--muted); font-weight: 400; }
.docs-pager__next { grid-column: 2; align-items: flex-end; text-align: right; }

@media (hover: hover) and (pointer: fine) {
  .docs-search:hover, .docs-hit:hover, .docs-contents a.tile:hover, .docs-pager .tile:hover, .docs-menu a:not([aria-current]):hover, .docs-menu-button:not([aria-expanded="true"]):hover { background: var(--raised); }
  .docs-toc a:hover { color: var(--ink); }
}
@media (prefers-reduced-motion: no-preference) {
  .docs-hits { animation: row-in var(--t-ui) var(--ease-out) both; }
}

/* ---------- tablet: the menu folds under a Contents link by the search; On this page follows the title ---------- */
@media (max-width: 1099px) {
  .docs-top, .docs-menu, .docs-main, .docs-pager { grid-column: 1 / -1; grid-row: auto; }
  .docs-top { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .docs-menu-button { display: flex; grid-column: span 2; align-items: center; gap: 10px; min-height: 56px; padding: 0 var(--pad); font-size: 15px; font-weight: 600; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
  .docs-menu-button__page { min-width: 0; overflow: hidden; color: var(--muted); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
  .docs-menu-button__chevron { flex: none; width: 1.25em; height: 1.25em; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; transition: transform var(--t-ui) var(--ease-out); }
  .docs-menu-button[aria-expanded="true"] { background: var(--raised); }
  .docs-menu-button[aria-expanded="true"] .docs-menu-button__chevron { transform: rotate(180deg); }
  .docs-search { grid-column: span 4; }
  .docs-hits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-hit:last-child:nth-child(n) { grid-column: auto; }
  .docs-hit:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* Folded in the stylesheet, so the article does not jump up when base.js adds html.js. :target opens it with no
     script. After docs.js takes the toggle over, only is-open shows it. docs-open.css undoes the fold when scripts never run. */
  .docs-menu:not(.is-open):not(:target), .js .docs-menu.is-toggle:not(.is-open) { display: none; }
  .docs-menu { position: static; max-height: none; overflow: visible; }
  .docs-menu__group ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
  .docs-main { display: flex; flex-direction: column; align-items: stretch; }
  .docs-toc { position: static; max-height: none; overflow: visible; }
  .docs-toc ul { columns: 2; column-gap: var(--gap); }
  .docs-toc li { break-inside: avoid; }
  .docs-section .ref-rows > li { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }
  .docs-pager { margin-top: 40px; }
}

/* Beside a classic 17px scrollbar, which media queries count as width, the limits page's card is 547px at 600px, 504px at
   601px where the gutter grows from 18 to 40px (chrome-a.css), and 543px at 640px. The plans table, 541px at its narrowest
   with 20px cells (550px in CI's Linux Chromium), ran past it at 600-647px (SHL-685, 2026-11-22). 14px cells take 48px
   off a four-column table. */
@media (599px < width < 660px) {
  .docs .ref th, .docs .ref td { padding-inline: 14px; }
}

/* ---------- phone ---------- */
@media (max-width: 599px) {
  .docs-top { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 52px; }
  .docs-menu-button, .docs-search { grid-column: span 1; }
  .docs-menu-button { min-height: 52px; padding: 0 16px; }
  .docs-menu-button__page { display: none; }
  .docs-search { min-height: 52px; padding: 0 16px; }
  .docs-search input { padding: 14px 0; }
  .docs-hits { grid-template-columns: minmax(0, 1fr); }
  .docs-hit, .docs-hit:last-child:nth-child(n) { grid-column: 1 / -1; gap: 2px; min-height: 52px; padding: 14px 16px; }
  .docs-hit__text { -webkit-line-clamp: 2; }
  .docs-menu__page { min-height: 52px; padding: 14px 16px; }
  .docs-menu__group { padding: 14px 0 6px; }
  .docs-menu__name { padding: 0 16px 6px; }
  .docs-menu__group a { padding: 8px 16px; }
  .docs-menu__group ul { grid-template-columns: minmax(0, 1fr); }
  .docs-photo { aspect-ratio: 4 / 3; }
  .docs-contents .tile { flex-basis: 9rem; min-height: 52px; padding: 14px 16px; }
  .docs-toc ul { columns: 1; }
  .docs-article { gap: 40px; }
  .docs-section .film { aspect-ratio: 4 / 3; }
  .docs-section .ref-rows > li { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .docs .ref tr, .docs .ref tbody tr:nth-child(even) { background: none; }
  .docs .ref tr + tr { border-top: 1px solid var(--rule); }
  .docs .ref td, .docs .ref tbody tr:nth-child(even) td { border-bottom: 0; }
  .docs-pager .tile { min-height: 52px; padding: 14px 16px; }
}
