/* Docs pages: the landing page's design (site.css) with a sidebar, the page, and its contents on the right.
   Hairlines and type do the work: no cards, no tinted boxes; notes are margin-labelled asides, code sits on
   the panel the landing page uses for commands. Hover changes colour only. */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* anything scrolled to, by a link or the keyboard, stops clear of the sticky header */
html:has(body.docs) { scroll-padding-top: 80px; }
/* what needs docs.js is there only once it has run, and what stands in for it only until then */
html:not(.js) .js-only, .js .no-js { display: none !important; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 60; padding: 8px 14px; border-radius: 10px; background: var(--lime); color: var(--tar); font: 600 13px var(--body); }
.skip:focus { top: 12px; }
/* without the script the header's menu button opens nothing: the links are a tap on the logo away */
html:not(.js) .docs .menu-btn { display: none !important; }

/* the landing page's 1240px container: its header and footer, and the docs between them */
.docs-grid { display: grid; grid-template-columns: 216px minmax(0, 1fr) 184px; gap: 0 48px; align-items: start; }

/* ---- the sidebar: the search box stays put, the list of pages scrolls under it ---- */
.docs-side { position: sticky; top: 65px; z-index: 5; display: flex; flex-direction: column; height: calc(100vh - 65px); height: calc(100dvh - 65px); padding-top: 36px; }
.docs-search { position: relative; flex: none; }
html:not(.js) .docs-search { display: none; }
.docs-search input { width: 100%; height: 38px; padding: 0 46px 0 12px; border: 1px solid var(--line2); border-radius: 10px; background: transparent; color: var(--ink); font: 13.5px var(--body); outline: 2px solid transparent; -webkit-appearance: none; appearance: none; transition: border-color .15s ease; }
.docs-search input::placeholder { color: var(--faint); opacity: 1; }
.docs-search input:hover { border-color: var(--faint); }
.docs-search input:focus { border-color: color-mix(in srgb, var(--lime) 65%, transparent); }
/* the keyboard's place in the box is the site's lime ring, as everywhere else */
.docs-search input:focus-visible { outline-color: var(--lime); outline-offset: 2px; }
.docs-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.docs-search kbd { position: absolute; right: 9px; top: 10px; min-width: 18px; height: 18px; padding: 0 5px; border: 1px solid var(--line2); border-radius: 5px; font: 11px/16px var(--mono); color: var(--faint); text-align: center; pointer-events: none; white-space: nowrap; }
.docs-search input:focus + kbd, .docs-search input:not(:placeholder-shown) + kbd { display: none; }
/* a touch screen has no shortcut to show, and a field under 16px makes iOS zoom the page when it is tapped */
@media (hover: none), (max-width: 900px) {
  .docs-search kbd { display: none; }
  .docs-search input { padding-right: 12px; font-size: 16px; }
}
.docs-hits { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: min(440px, calc(100vw - 2 * var(--gut))); max-height: min(460px, 70vh); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg2); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.docs-hits a { display: block; padding: 9px 10px; border-radius: 8px; scroll-margin: 6px; }
.docs-hits a b { display: block; font-weight: 500; font-size: 13.5px; color: var(--ink); transition: color .15s ease; }
.docs-hits a b em { font-style: normal; color: var(--dim); font-weight: 400; }
.docs-hits a span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.5; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-hits a span mark { background: none; color: var(--accent); }
.docs-hits a:hover, .docs-hits a[aria-selected="true"] { background: var(--card); }
.docs-hits a:hover b, .docs-hits a[aria-selected="true"] b { color: var(--accent); }
.docs-hits .none { margin: 0; padding: 10px; font-size: 13px; color: var(--dim); }
.docs-hits .none a { display: inline; padding: 0; color: var(--accent); }
.docs-hits .more { margin: 4px 0 0; padding: 9px 10px 4px; border-top: 1px solid var(--line); font: 11px var(--mono); color: var(--faint); }

/* the docs' pages under their group names: the sidebar, and on a narrow screen the Contents menu */
.docs-m { display: none; }
.docs-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-top: 8px; padding: 0 4px 48px 0; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
/* a list longer than the column fades out at the ends where there is more of it; a link the keyboard
   reaches stops clear of the fades, and while the keyboard is in the list it doesn't fade at all */
.docs-nav, .doc-toc { scroll-padding: 32px 0 72px; }
.docs-nav.ovf:not(.end), .doc-toc.ovf:not(.end) { -webkit-mask-image: linear-gradient(#000 calc(100% - 56px), transparent); mask-image: linear-gradient(#000 calc(100% - 56px), transparent); }
.docs-nav.ovf:not(.start):not(.end), .doc-toc.ovf:not(.start):not(.end) { -webkit-mask-image: linear-gradient(transparent, #000 28px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(transparent, #000 28px, #000 calc(100% - 56px), transparent); }
.docs-nav.ovf.end:not(.start), .doc-toc.ovf.end:not(.start) { -webkit-mask-image: linear-gradient(transparent, #000 28px); mask-image: linear-gradient(transparent, #000 28px); }
.docs-nav:has(:focus-visible), .doc-toc:has(:focus-visible) { -webkit-mask-image: none !important; mask-image: none !important; }
:is(.docs-nav, .docs-nav-m) .grp { margin-top: 18px; }
:is(.docs-nav, .docs-nav-m) .grp-t { margin: 0 0 8px; font: 500 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
:is(.docs-nav, .docs-nav-m) ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
:is(.docs-nav, .docs-nav-m) a { display: block; position: relative; padding: 4px 0 4px 14px; color: var(--dim); font-size: 14px; line-height: 1.45; text-wrap: balance; transition: color .15s ease; }
:is(.docs-nav, .docs-nav-m) a:hover { color: var(--ink); }
:is(.docs-nav, .docs-nav-m) a[aria-current] { color: var(--ink); font-weight: 500; }
/* the page you're on: the 2px lime bar the landing page puts under the header's current link */
:is(.docs-nav, .docs-nav-m) a[aria-current]::before { content: ""; position: absolute; left: -1px; top: 5px; bottom: 5px; width: 2px; border-radius: 2px; background: var(--lime); }
:is(.docs-nav, .docs-nav-m, .doc-toc, .toc-m) a:focus-visible { outline-offset: -2px; border-radius: 4px; }

/* ---- the page ---- */
.doc { min-width: 0; padding: 40px 0 96px; outline: none; }
.doc > .eyebrow { margin-bottom: 18px; }
.doc article { max-width: 760px; color: var(--dim); font-size: 15.5px; line-height: 1.7; }
/* prose keeps the landing page's measure (62 of Inter's figures; ch itself would change as fonts load, and
   move the text when they land); tables and code use the whole column */
.doc article > :is(p, ul, ol, dl, .aside, .pq-doc, .hd3, .hd4, .fig) { max-width: 39.1em; }
/* no word left alone on a paragraph's last line (the build joins the last two words too) */
.doc article p, .doc article li, .doc td { text-wrap: pretty; }
.doc h1 { margin: 0; font: 700 clamp(30px, 3.6vw, 44px)/1.08 var(--disp); letter-spacing: -.04em; color: var(--ink); text-wrap: balance; }
.doc h1 + p { margin-top: 20px; font-size: 17px; line-height: 1.65; }
.doc h1 + p strong { font-weight: 500; }
/* a heading and the link beside it that copies its address */
.doc .hd { display: flex; align-items: baseline; gap: 12px; }
.doc .hd > :is(h2, h3, h4) { margin: 0; min-width: 0; }
.doc .hd2 { margin: 56px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.doc .hd3 { margin: 40px 0 0; }
.doc .hd4 { margin: 28px 0 0; }
.doc h2 { font: 600 clamp(21px, 2.1vw, 25px)/1.22 var(--disp); letter-spacing: -.03em; color: var(--ink); }
.doc h3 { font: 600 17.5px/1.35 var(--disp); letter-spacing: -.02em; color: var(--ink); }
.doc h4 { font: 600 15.5px/1.4 var(--body); color: var(--ink); }
.doc :is(h2, h3, h4)[id] { scroll-margin-top: 24px; }
/* code in a heading is the heading, set in mono: no chip */
.doc :is(h2, h3, h4) code { padding: 0; background: none; font-family: var(--mono); font-size: .9em; font-weight: 500; letter-spacing: -.01em; color: inherit; }
/* a command's heading is the command as it is typed, as the landing page and the docs home set commands */
.doc h2.command { font-size: 23.5px; line-height: 1.3; }
.doc h2.command .t-p { color: var(--faint); font-weight: 400; }
.doc .hl { flex: none; position: relative; top: -.1em; color: var(--faint); font: 500 13px var(--mono); text-decoration: none; opacity: 0; transition: opacity .15s ease, color .15s ease; }
.doc .hd:hover .hl, .doc .hl:focus-visible, .doc .hl.done { opacity: 1; }
.doc .hl:hover, .doc .hl.done { color: var(--accent); }
.doc .hl.done { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
/* a touch screen has no hover: the # shows only beside the heading a link led to, large enough to tap */
@media (hover: none) {
  .doc .hl { pointer-events: none; }
  .doc :target + .hl, .doc .hl.done, .doc .hl:focus-visible { opacity: 1; pointer-events: auto; padding: 8px; margin: -8px; }
}
.doc p, .doc ul, .doc ol, .doc .tbl, .doc .codeblock, .doc hr, .doc dl, .doc .fig { margin: 18px 0 0; }
.doc .hd + p, .doc .hd + ul, .doc .hd + ol { margin-top: 14px; }
/* a sentence that leads into code sits with it, and the next paragraph stands clear of the panel */
.doc p + .codeblock { margin-top: 12px; }
.doc .codeblock + p, .doc .codeblock + ul, .doc .tbl + p { margin-top: 26px; }
.doc strong { color: var(--ink); font-weight: 500; }
.doc em { color: var(--ink); }
.doc hr { border: 0; border-top: 1px solid var(--line); }
.doc article a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--lime) 35%, transparent); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; transition: text-decoration-color .15s ease; }
.doc article a:hover { text-decoration-color: var(--lime); }
.doc article a code { color: var(--accent); }
/* inline code: mono in ink, as the landing page sets it; a chip only where code names a table's row */
.doc :not(pre) > code { font-size: .86em; color: var(--ink); overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.doc td.key code { display: inline-block; padding: .08em .45em; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); line-height: 1.6; }
.doc img { max-width: 100%; height: auto; }
.doc .fig { margin: 28px 0 0; }
.doc .fig figcaption { margin-top: 10px; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

/* lists: a small square for each item, as the page marks things elsewhere, and steps numbered in mono */
.doc ul, .doc ol { padding-left: 22px; list-style: none; }
.doc ol { padding-left: 32px; counter-reset: step; }
.doc li { position: relative; margin-top: 7px; }
.doc ul > li::before { content: ""; position: absolute; left: -17px; top: .76em; width: 5px; height: 5px; border-radius: 1.5px; background: var(--faint); }
.doc ol > li { counter-increment: step; }
.doc ol > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: -32px; top: 0; font: 500 .71em/2.4 var(--mono); letter-spacing: .02em; color: var(--faint); }
.doc li > ul, .doc li > ol { margin-top: 6px; }
.doc li > p { margin-top: 8px; }
/* a block between two parts of one numbered list sits in the list's column, not under its numbers */
.doc .codeblock.in-list { margin-left: 32px; }

/* a note: its label in the margin, a hairline above, as the landing page sets its asides */
.doc .aside { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 6px 24px; margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.doc .aside > .k { padding-top: 6px; font: 500 10.5px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.doc .aside p:first-child { margin-top: 0; }
/* a pull quote: a hairline above, display type */
.doc .pq-doc { margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.doc .pq-doc p { margin: 0; font: 600 clamp(22px, 2.4vw, 30px)/1.15 var(--disp); letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }

/* ---- code: the panel the landing page uses for commands, its label and copy on a strip above ---- */
.codeblock { --pad-x: 18px; --fs: 12.75px; position: relative; container-type: inline-size; border: 1px solid var(--scr-line); border-radius: 12px; background: var(--scr-bg); }
.code-h { display: flex; align-items: stretch; min-height: 34px; border-bottom: 1px solid var(--scr-line); }
.code-l { display: flex; align-items: center; min-width: 0; padding: 0 16px; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codeblock .copy { flex: none; padding: 0 14px; border: 0; border-left: 1px solid var(--scr-line); background: none; color: var(--faint); font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: color .15s ease; }
.code-h .copy { margin-left: auto; border-radius: 0 11px 0 0; }
.codeblock .copy:hover { color: var(--ink); }
.codeblock .copy.done { color: var(--accent); }
.codeblock .copy:focus-visible { outline-offset: -2px; }
.codeblock pre.code { margin: 0; padding: 14px var(--pad-x); overflow-x: auto; background: none; color: var(--scr-text); font: var(--fs)/1.7 var(--mono); font-variant-ligatures: none; tab-size: 2; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.codeblock pre.code code { display: block; width: max-content; min-width: 100%; font: inherit; color: inherit; }
.codeblock .line { white-space: pre; }
/* one command and nothing it printed: one row, the landing page's command, with Copy beside it */
.codeblock.one { display: flex; align-items: stretch; }
.codeblock.one pre.code { flex: 1 1 auto; min-width: 0; padding-top: 12px; padding-bottom: 12px; }
.codeblock.one .copy { border-radius: 0 11px 11px 0; }
/* JetBrains Mono draws >= as ≥ and -> as an arrow; a reference shows every character as it is typed. A rule
   that sets code's font with the shorthand resets this too, so each says it again. */
.docs pre, .docs code, .docs kbd { font-variant-ligatures: none; }
/* a command starts at a lime $, which is never selected or copied; its comments and continuations line up */
.codeblock[data-kind="sh"] pre:not(.out) .line::before { content: ""; display: inline-block; width: 1.2em; }
.codeblock[data-kind="sh"] pre:not(.out) .line.sh-cmd::before { content: "$"; color: var(--accent); }
/* what the command printed: under a hairline, set back a step, with the marks the landing page colours */
.codeblock pre.joined { border-top: 1px solid var(--scr-line); }
.codeblock pre.out { color: var(--dim); }
.codeblock .t-c, .codeblock .t-p, .codeblock .t-d { color: var(--scr-dim); }
.codeblock .t-s { color: var(--accent); }
.codeblock .t-ph { color: var(--dim); }
.codeblock .t-ok, .codeblock .t-add { color: var(--scr-ok); }
.codeblock .t-err { color: var(--scr-err); }
.codeblock .t-del { color: var(--scr-del); }
.codeblock .t-fk { color: var(--scr-warn); }
.codeblock .t-live { color: var(--scr-text); }
.codeblock .t-f { color: var(--faint); }
/* output and usage lines wrap rather than hide what they say, each under a hanging indent: a usage line's
   bracketed parts kept whole, an output line's continuation two characters (of .6em) in from where its text
   starts */
.codeblock pre:is(.usage, .out) code { width: auto; white-space: normal; }
.codeblock pre:is(.usage, .out) .line { display: block; min-height: 1.7em; white-space: pre-wrap; }
.codeblock pre.usage .line { padding-left: 2.4em; text-indent: -2.4em; }
.codeblock pre.out .line { padding-left: calc((var(--in, 0) + 2) * .6em); text-indent: calc((var(--in, 0) + 2) * -.6em); overflow-wrap: anywhere; }
.codeblock .ug { white-space: nowrap; }
/* a picture in box characters: lines close enough that its frame joins up, drawn as small as it must be to
   fit the panel (its widest line, --cols characters of 0.6em), down to 10px, below which it scrolls */
.codeblock pre.diagram { line-height: 1.32; font-size: clamp(10px, calc((100cqw - 2 * var(--pad-x) - 1px) / (var(--cols, 80) * .6)), var(--fs)); }
/* characters none of the site's fonts has (⑂, ⚙): drawn in the cell the character takes, in its colour */
.codeblock .g { display: inline-block; width: .6em; height: 1em; overflow: hidden; vertical-align: -.12em; -webkit-text-fill-color: transparent; background: currentColor; -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
.codeblock .g-fork { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'%3E%3Cpath d='M4.5 17.5v-15M4.5 13c0-4.5 4.5-4 4.5-8.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.codeblock .g-gear { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'%3E%3Ccircle cx='6' cy='10' r='4.3' fill='none' stroke='black' stroke-width='2.1' stroke-dasharray='1.7 1.68'/%3E%3Ccircle cx='6' cy='10' r='2.5' fill='none' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E"); }
/* code wider than the panel fades at the right edge until it is scrolled to its end, or has the keyboard */
/* a panel the width of its content, to a fraction of a pixel, doesn't scroll */
.codeblock pre.code.fits, .tbl.fits { overflow-x: hidden; }
.codeblock pre.ovf:not(.end), .tbl.ovf:not(.end) { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.codeblock pre.ovf:focus-visible, .tbl.ovf:focus-visible { -webkit-mask-image: none; mask-image: none; }
.codeblock pre[tabindex]:focus-visible, .tbl[tabindex]:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; border-radius: 10px; }

/* ---- tables: hairlines only, like the comparison on the landing page ---- */
.tbl { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.doc th { padding: 0 18px 10px 0; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: bottom; font: 500 10.5px/1.45 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); text-wrap: balance; }
/* code in a column's name is set as the name is */
.doc th code { color: inherit; font: inherit; letter-spacing: inherit; font-variant-ligatures: none; }
.doc thead td { border-bottom: 1px solid var(--line2); }
.doc td { padding: 11px 18px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--dim); }
.doc th:last-child, .doc td:last-child { padding-right: 6px; }
.doc td:first-child { color: var(--ink); }
.doc tbody tr:last-child td { border-bottom: 0; }
.doc td code { font-size: 12.5px; }
.tbl.nohead tbody tr:first-child td { border-top: 1px solid var(--line2); }
/* rows named in words keep a column wide enough to read them */
.tbl.labelled td:first-child { min-width: 10em; }
/* verdicts with the landing page's marks */
.tbl.verdicts td { color: var(--dim); }
.tbl.verdicts td:first-child { color: var(--ink); }
.tbl .v { font-size: 13.5px; }
.tbl .vn { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--dim); }

/* A table too wide for the column at any width (the comparison of six tools): each row a block, its name
   above a grid of labelled cells, one per column, shadowlap's tinted as its column is on the landing page.
   The column names and their examples are a key above the blocks. Nothing scrolls sideways. */
.tbl.wide { container-type: inline-size; overflow: visible; }
.tbl.wide :is(table, tbody, tr) { display: block; width: auto; }
.tbl.wide thead { display: none; }
.tbl.wide.keyed thead { display: block; }
.tbl.wide.keyed thead tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line2); }
.tbl.wide.keyed thead td { display: none; }
/* each tool named as the landing page's comparison names it, its examples on a small mono line under it */
.tbl.wide.keyed thead th { display: block; padding: 0; border: 0; font: 600 14px/1.45 var(--body); letter-spacing: normal; text-transform: none; color: var(--ink); text-wrap: balance; }
.tbl.wide.keyed thead th.us { color: var(--accent); box-shadow: none; }
.tbl.wide.keyed thead small { display: block; margin-top: 3px; font: 400 11.5px/1.5 var(--mono); letter-spacing: 0; text-transform: none; color: var(--faint); text-wrap: pretty; }
.tbl.wide tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; padding: 20px 0 18px; border-bottom: 1px solid var(--line); }
.tbl.wide tbody tr:last-child { border-bottom: 0; }
.tbl.wide tbody td { display: block; min-width: 0; padding: 12px 0 0; border: 0; }
.tbl.wide tbody td:first-child { grid-column: 1 / -1; padding: 0 0 2px; color: var(--ink); font-weight: 500; font-size: 15px; line-height: 1.45; text-wrap: balance; }
.tbl.wide tbody td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 6px; font: 11px/1.4 var(--mono); color: var(--faint); }
.tbl.wide tbody td.us { align-self: start; margin: 0 -10px; padding: 12px 10px 10px; border-radius: 8px; background: color-mix(in srgb, var(--lime) 7%, transparent); }
.tbl.wide tbody td.us::before { color: var(--accent); }
/* "No" on the tinted cell still reads at AA */
.tbl .us .v.no { color: var(--scr-dim); }
.tbl.wide .vn { margin-top: 4px; }
/* on a phone's width the key is two columns, and each tool a line: its name, then the verdict */
@container (max-width: 520px) {
  .tbl.wide.keyed thead tr { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
  .tbl.wide tbody tr { grid-template-columns: minmax(0, 1fr); padding: 16px 0 6px; }
  .tbl.wide tbody td:first-child { padding-bottom: 10px; }
  .tbl.wide tbody td:not(:first-child) { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 0 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); }
  .tbl.wide tbody td[data-label]:not(:first-child)::before { grid-row: span 2; margin: 0; }
  .tbl.wide tbody td > * { grid-column: 2; }
  .tbl.wide tbody td.us { margin: 0 -10px; padding: 9px 10px; border-top: 0; }
  .tbl.wide tbody td.us + td { border-top: 0; }
}

/* ---- previous and next, and the source link ---- */
.doc-pn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; max-width: 760px; margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc-pn a { display: block; min-width: 0; font: 600 16px/1.35 var(--disp); letter-spacing: -.02em; color: var(--ink); text-wrap: balance; transition: color .15s ease; }
.doc-pn a small { display: block; margin-bottom: 6px; font: 500 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.doc-pn a:hover { color: var(--accent); }
.doc-pn .next { text-align: right; }
.doc-src { max-width: 760px; margin: 28px 0 0; font-size: 13px; }
/* a target a thumb can find, without moving the line */
.doc-src a { display: inline-block; padding: 6px 0; margin: -6px 0; color: var(--dim); transition: color .15s ease; }
.doc-src a:hover { color: var(--ink); }

/* ---- on this page ---- */
/* its label shares a centre line with the page's eyebrow across the top of the page */
.doc-toc { position: sticky; top: 65px; max-height: calc(100vh - 65px); max-height: calc(100dvh - 65px); overflow-y: auto; overscroll-behavior: contain; padding: 45.5px 4px 48px 0; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
:is(.doc-toc, .toc-m) .toc-t { margin: 0 0 10px; font: 500 10.5px/15px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
:is(.doc-toc, .toc-in, .toc-m) ul { list-style: none; margin: 0; padding: 0; }
:is(.doc-toc, .toc-m) a { display: block; position: relative; padding: 4px 0 4px 12px; color: var(--dim); font-size: 13px; line-height: 1.45; text-wrap: balance; overflow-wrap: anywhere; transition: color .15s ease; }
:is(.doc-toc, .toc-m) a.d3 { padding-left: 24px; font-size: 12.5px; }
:is(.doc-toc, .toc-m) a:hover { color: var(--ink); }
.doc-toc a[aria-current] { color: var(--ink); }
.doc-toc a[aria-current]::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--lime); }
:is(.doc-toc, .toc-in, .toc-m) code { font: 11.5px/1.5 var(--mono); font-variant-ligatures: none; color: inherit; }
/* a command is listed by its name, in mono; an endpoint's path goes to the next line whole when it can */
:is(.doc-toc, .toc-m) a.command, .doc article .toc-in a.command { font: 12px/1.5 var(--mono); font-variant-ligatures: none; }
:is(.doc-toc, .toc-in, .toc-m) code .path { display: inline-block; }
/* the same list at the top of the page, for screens without the column on the right */
/* its hairline above; the next section's hairline closes it, straight under the row */
.toc-in { display: none; margin: 32px 0 0; border-top: 1px solid var(--line); }
.toc-in summary { position: relative; margin-left: -8px; padding: 14px 40px 14px 8px; list-style: none; cursor: pointer; font: 500 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); transition: color .15s ease; }
.toc-in summary::-webkit-details-marker { display: none; }
/* the + is drawn, not read out: a screen reader hears "On this page" and that it is collapsed or expanded */
.toc-in summary::after { content: "+"; content: "+" / ""; position: absolute; right: 4px; top: 7px; font: 300 24px/1 var(--body); letter-spacing: 0; color: var(--faint); transition: transform .2s ease, color .2s ease; }
.toc-in[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.toc-in summary:hover { color: var(--ink); }
.toc-in summary:focus-visible { outline-offset: -2px; border-radius: 4px; }
.toc-in ul { padding: 2px 0 16px; columns: 2; column-gap: 32px; }
.doc .toc-in li { break-inside: avoid; margin: 0; }
.doc .toc-in li::before { content: none; }
.doc article .toc-in a { display: block; padding: 4px 0; color: var(--dim); font-size: 14px; line-height: 1.45; text-decoration: none; transition: color .15s ease; }
.doc article .toc-in a.d3 { padding-left: 14px; font-size: 13.5px; }
.doc article .toc-in a:hover { color: var(--ink); }

/* ---- the docs home: the introduction set like the landing page's hero, then where to go ---- */
.docs-home .doc { grid-column: 2 / -1; }
/* the article, its hairlines and its tables reach as far as the grids above them; prose keeps its measure */
.docs-home .doc article, .docs-home .doc-pn, .docs-home .doc-src { max-width: none; }
/* two set lines, sized from the column so the longer always fits on one */
.dh { container-type: inline-size; }
.doc .dh h1 { margin: 22px 0 0; font: 700 56px/1.04 var(--disp); font-size: min(56px, 100cqw / 11.6); letter-spacing: -.045em; }
.dh h1 .l { display: block; }
/* one sentence, as the landing page's lede is */
.dh .dh-lede { margin: 24px 0 0; max-width: 27.75em; color: var(--dim); font-size: 17px; line-height: 1.65; text-wrap: pretty; }
.dh-lede strong { color: var(--ink); font-weight: 500; }
.dh-lede em { color: var(--ink); }
.dh .cta-row { margin-top: 32px; }
.dh-sec { container-type: inline-size; margin-top: 72px; }
.dh-sec + .dh-sec { margin-top: 48px; }
.doc .dh-k { margin: 0 0 18px; padding: 0; border: 0; font: 500 11px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
/* the landing page's hairline grid: a label, a heading, one sentence; the whole item is the link */
.doc .dh-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.doc .dh-grid > li { position: relative; margin: 0; padding: 18px 0 34px; border-top: 1px solid var(--line); }
.doc .dh-grid > li::before { content: none; }
.doc .dh-grid code { font: 11.5px var(--mono); font-variant-ligatures: none; color: var(--accent); overflow-wrap: normal; }
.doc .dh-grid h3 { margin: 10px 0 0; font: 600 17px/1.3 var(--disp); letter-spacing: -.025em; color: var(--ink); text-wrap: balance; transition: color .15s ease; }
.dh-grid h3 a { color: inherit; }
.dh-grid h3 a::after { content: ""; position: absolute; inset: 0; }
.dh-grid h3 a:focus-visible { outline: none; }
.doc .dh-grid > li:has(a:focus-visible) { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 4px; }
/* Unbounded has no arrow: the arrow is Inter's, as on the landing page's buttons */
.dh-grid .arw { font-family: var(--body); font-weight: 400; color: var(--faint); transition: color .15s ease; }
.doc .dh-grid > li:hover h3, .dh-grid li:hover .arw { color: var(--accent); }
.doc .dh-grid p { margin: 6px 0 0; color: var(--dim); font-size: 14px; line-height: 1.6; text-wrap: pretty; }
.docs-home .doc article { margin-top: 24px; }
/* three columns while each has room; then six items go to two columns and three straight to one, so no row
   is left with a single item beside an empty place; on a phone, one */
@container (max-width: 600px) { .doc .dh-grid:not(.n3) { grid-template-columns: repeat(2, minmax(0, 1fr)); } .doc .dh-grid.n3 { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 480px) { .doc .dh-grid, .doc .dh-grid:not(.n3) { grid-template-columns: minmax(0, 1fr); } .doc .dh-grid > li { padding-bottom: 26px; } }

/* ---- the page for an address that isn't there ---- */
.nf { padding-top: clamp(72px, 10vw, 140px); padding-bottom: clamp(96px, 12vw, 160px); }
.nf h1 { margin: 22px 0 0; font: 700 clamp(34px, 4.6vw, 56px)/1.04 var(--disp); letter-spacing: -.045em; text-wrap: balance; }
.nf p { margin: 18px 0 0; max-width: 29em; color: var(--dim); font-size: 17px; line-height: 1.6; text-wrap: balance; }
.nf p .l { display: block; }
.nf-search { max-width: 440px; margin-top: 32px; }
.nf .cta-row { margin-top: 24px; }

/* ---- narrower screens ---- */
@media (max-width: 1240px) {
  .docs-grid { grid-template-columns: 216px minmax(0, 1fr) 164px; gap: 0 40px; }
}
@media (max-width: 1140px) {
  .docs-grid { grid-template-columns: 216px minmax(0, 1fr); gap: 0 48px; }
  .doc-toc { display: none; }
}
/* between a tablet's width and the column on the right, "On this page" folds open from the top of the
   page; on paper it isn't there, so the next section keeps its space */
@media screen and (min-width: 901px) and (max-width: 1140px) {
  .toc-in { display: block; }
  .doc .toc-in + .hd2 { margin-top: 0; }
}

/* On a tablet or a phone the sidebar is a bar under the header that stays as the page scrolls: the search
   box, and Contents, which opens this page's sections and the docs' pages in a panel under the bar. Contents
   is a <details>, so it opens with or without the script. */
@media (max-width: 900px) {
  html:has(body.docs) { scroll-padding-top: 136px; }
  .docs-grid { grid-template-columns: minmax(0, 1fr); }
  .docs-side { position: sticky; top: 65px; z-index: 40; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; height: auto; padding: 10px 0; }
  html:not(.js) .docs-side { grid-template-columns: minmax(0, 1fr); }
  /* the bar's ground reaches the screen's edges, as the header's does */
  .docs-side::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--gut)); z-index: -1; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
  .docs-nav { display: none; }
  .docs-m { display: block; }
  .docs-menu { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg); color: var(--ink); font: 500 13.5px var(--body); list-style: none; cursor: pointer; user-select: none; -webkit-user-select: none; transition: border-color .15s ease; }
  /* the field and the button are solid, so what scrolls under the bar never shows through their words */
  .docs-search input { background: var(--bg); }
  .docs-menu::-webkit-details-marker { display: none; }
  .docs-menu span { display: inline-block; font: 300 18px/1 var(--body); color: var(--faint); transition: transform .2s ease; }
  .docs-m[open] .docs-menu span { transform: rotate(45deg); color: var(--accent); }
  .docs-menu:hover { border-color: var(--dim); }
  .docs-panel { position: absolute; top: 100%; left: calc(-1 * var(--gut)); right: calc(-1 * var(--gut)); max-height: calc(100vh - 124px); max-height: calc(100dvh - 124px); overflow-y: auto; overscroll-behavior: contain; padding: 4px var(--gut) 24px; border-bottom: 1px solid var(--line); background: var(--bg); box-shadow: 0 30px 40px -30px rgba(0, 0, 0, .9); scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
  .toc-m { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
  .toc-m ul { columns: 2; column-gap: 32px; }
  .toc-m li { break-inside: avoid; }
  .toc-m a { padding-left: 0; }
  .toc-m a.d3 { padding-left: 12px; }
  .docs-nav-m { columns: 2; column-gap: 32px; }
  .docs-nav-m .grp { break-inside: avoid; margin: 14px 0 0; }
  .doc { padding-top: 28px; }
  .doc .hd2 { margin-top: 48px; }
  .docs-home .doc { grid-column: auto; }
  .dh-sec { margin-top: 56px; }
}
@media (max-width: 560px) {
  .docs-nav-m { columns: 1; }
  .doc article { font-size: 15px; }
  .codeblock { --pad-x: 14px; --fs: 12px; }
  .code-l { padding: 0 14px; }
  .doc-pn { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .doc-pn .next { text-align: left; }
  .doc .aside { grid-template-columns: minmax(0, 1fr); }
  .doc .aside > .k { padding-top: 0; }
  .doc .codeblock.in-list { margin-left: 0; }
}

/* On a phone a table reads as a list, one row at a time, each value under its column's name. A table of
   two columns needs no names: the first cell is what the row is, the second what it does. */
@media (max-width: 560px) {
  .tbl.stack { overflow: visible; -webkit-mask-image: none !important; mask-image: none !important; }
  .tbl.stack :is(table, tbody, tr, td) { display: block; width: auto; min-width: 0; max-width: none; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tbl.stack tbody tr:last-child { border-bottom: 0; }
  .tbl.stack.nohead tbody tr:first-child { border-top: 1px solid var(--line2); }
  .tbl.stack td, .tbl.stack.nohead tbody tr:first-child td { padding: 2px 0; border: 0; position: static; box-shadow: none; background: none; }
  .tbl.stack td:empty { display: none; }
  .tbl.stack td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-top: 8px; font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
  .tbl.stack.pairs td::before { display: none !important; }
  .tbl.stack.pairs td + td { margin-top: 4px; }
}

@media (max-width: 359px) { .toc-m ul { columns: 1; } }

@media (prefers-reduced-motion: reduce) {
  .docs-menu span, .codeblock .copy, .doc .hl, .toc-in summary::after, .docs-nav a, .docs-nav-m a, .doc-toc a, .toc-m a, .dh-grid h3 a, .dh-grid .arw { transition: none; }
}

/* ---- print: the page itself, black on white, every line of code whole ---- */
@media print {
  @page { margin: 16mm 14mm; }
  [data-theme="dark"] { --bg: #fff; --bg2: #fff; --card: #fff; --panel: #fff; --ink: #111; --dim: #2b2b2b; --faint: #666; --line: #ddd; --line2: #bbb; --accent: #111; --lime: #111; --scr-bg: #f6f6f2; --scr-line: #ddd; --scr-text: #111; --scr-dim: #555; --scr-ok: #2f6b00; --scr-err: #b3261e; --scr-del: #b3261e; --scr-warn: #7a5a00; color-scheme: light; }
  .docs, .docs :is(.docs-grid, .nf) { --faint: #666; }
  body { background: #fff; color: #111; }
  .nav, .skip, .docs-side, .doc-toc, .toc-in, .doc-pn, .doc-src, .foot, .codeblock .copy, .doc .hl, .dh .cta-row { display: none !important; }
  .docs-grid { display: block; max-width: none; padding: 0; }
  .doc { padding: 0; }
  .doc article { max-width: none; font-size: 10.5pt; line-height: 1.55; }
  .doc article > :is(p, ul, ol) { max-width: none; }
  .codeblock, .doc tr, .doc .aside, .doc .pq-doc, .dh-grid li { break-inside: avoid; }
  .doc :is(h2, h3), .doc .hd { break-after: avoid; }
  .codeblock pre.code { overflow: visible; -webkit-mask-image: none !important; mask-image: none !important; }
  .codeblock pre.code code { width: auto; }
  .codeblock .line { white-space: pre-wrap; overflow-wrap: anywhere; }
  .codeblock pre.code span[style] { color: inherit !important; }
  .tbl { overflow: visible; -webkit-mask-image: none !important; mask-image: none !important; }
  .doc article a { color: #111; text-decoration-color: #999; }
  .doc article a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; overflow-wrap: anywhere; }
  /* a sentence that leads into code stays on its page */
  .doc p:has(+ .codeblock) { break-after: avoid; }
  /* the comparison's marks in ink (a ticked box, a half-filled one, a dash), and shadowlap's line untinted */
  .tbl .v.yes::before { background-color: #fff; border: 1.5px solid #111; }
  .tbl .v.part::before { border-color: #111; background: linear-gradient(90deg, #111 50%, transparent 50%); }
  .tbl.wide tbody td.us { background: none; }
}
