/* Porthole docs: the homepage's tokens, type, cards, pill, header and footer
   (the site stylesheet, loaded first) around a reading layout. Every rule is
   scoped to body.docs or a docs- class; the homepage never loads this file.
   Overflow stays visible, so a layout defect shows instead of being clipped. */
body.docs { margin: 0; background: #fff; color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
.docs :where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, pre, dl, dd) { margin: 0; padding: 0; }
.docs :where(a) { color: inherit; }
/* Code shows the characters it copies: no ligature turns => into one glyph
   (repeated after each code font shorthand, which resets it). */
.docs :where(code, pre, kbd, samp) { font-family: var(--mono); font-feature-settings: normal; font-variant-ligatures: none; }
.docs :where(b, strong) { font-weight: 650; }
.docs :where(a, button, summary):focus-visible { outline: 3px solid var(--helio); outline-offset: 3px; border-radius: 6px; }
.docs-skip { position: absolute; left: 16px; top: 12px; z-index: 10; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.docs-skip:focus { width: auto; height: auto; overflow: visible; clip-path: none; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 15px/1 var(--sans); text-decoration: none; }

/* The homepage's header, at the hero's scale from 1180 px (up to 1920 px,
   centred beyond), over one quiet rule. */
.docs-top { border-bottom: 1px solid var(--line); padding-bottom: max(12px, calc(14 * var(--u))); }
@media (min-width: 1180px) {
  .docs-top { --u: calc(min(100vw, 1920px) / 1536); }
  .docs-top .site-header { max-width: calc(1536 * var(--u)); margin-inline: auto; }
}
.docs .site-header nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--helio); text-underline-offset: 7px; }

/* The index: the homepage's section head, then each group of documents. */
.docs-index { padding-block: max(44px, calc(76 * var(--u))) max(64px, calc(104 * var(--u))); }
.docs-intro { display: grid; justify-items: center; gap: calc(14 * var(--u)); text-align: center; }
.docs-intro h1 { font: 860 var(--h2)/.98 var(--sans); font-variation-settings: 'opsz' 32; letter-spacing: -.045em; color: var(--ink); }
.docs-intro h1 .l1, .docs-intro h1 .l2 { display: block; width: fit-content; max-width: 100%; margin-inline: auto; text-wrap: balance; }
.docs-intro .lead { max-width: calc(820 * var(--u)); margin: calc(6 * var(--u)) auto 0; }
.docs-intro .hero-actions { margin-top: max(18px, calc(26 * var(--u))); }
.docs-status { margin-top: max(10px, calc(14 * var(--u))); font-size: var(--t14); color: var(--muted); text-wrap: balance; }
.docs-status a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.docs-groups { display: grid; gap: max(36px, calc(56 * var(--u))); margin-top: max(48px, calc(84 * var(--u))); }
.docs-group { display: grid; grid-template-columns: calc(300 * var(--u)) minmax(0, 1fr); gap: 20px calc(40 * var(--u)); padding-top: max(24px, calc(32 * var(--u))); border-top: 1px solid var(--line); }
.docs-group-head > span { display: block; font: 600 var(--t13)/1.4 var(--sans); letter-spacing: .2em; color: var(--helio-ink); font-variant-numeric: tabular-nums; }
.docs-group-head h2 { margin-top: 6px; font: 860 max(24px, calc(32 * var(--u)))/1.05 var(--sans); font-variation-settings: 'opsz' 32; letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.docs-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: max(12px, calc(16 * var(--u))); list-style: none; }
.docs-card { display: flex; flex-direction: column; height: 100%; padding: max(18px, calc(22 * var(--u))) max(18px, calc(22 * var(--u))) max(16px, calc(20 * var(--u))); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.docs-card:hover { border-color: var(--line-2); box-shadow: 0 1px 2px rgba(22, 21, 27, .06), 0 14px 30px -16px rgba(22, 21, 27, .28); }
.docs-card h3 { font: 700 max(18px, calc(21 * var(--u)))/1.25 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
.docs-card p { margin-top: 10px; font-size: var(--t15); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.docs-go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 18px; font: 650 var(--t14)/1.2 var(--sans); }
.docs-go svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.docs-card:hover .docs-go { text-decoration: underline; text-underline-offset: 4px; }
/* Technical reference: each path directly under its title, breaking only
   after a slash (frame.ts keeps every name whole). */
.docs-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0 calc(32 * var(--u)); list-style: none; }
.docs-files a { display: grid; align-content: start; gap: 3px; height: 100%; padding-block: 12px; border-bottom: 1px solid var(--line); text-decoration: none; }
.docs-files strong { font: 600 var(--t15)/1.35 var(--sans); color: var(--ink); }
.docs-files code { font: 500 max(13px, calc(13 * var(--u)))/1.45 var(--mono); font-variant-ligatures: none; color: var(--muted); }
.docs-files a:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* An article: the documentation menu, the reading column and its contents. */
.docs-layout { display: grid; grid-template-columns: max(200px, calc(248 * var(--u))) minmax(0, calc(800 * var(--u))) max(180px, calc(224 * var(--u))); justify-content: space-between; gap: max(28px, calc(48 * var(--u))); align-items: start; padding-block: max(28px, calc(44 * var(--u))) max(56px, calc(96 * var(--u))); }
.docs-main { min-width: 0; }
/* The two panels scroll, which clips: 8 px each side, given back by the
   margin, keeps their links' focus rings whole. Every control is at least
   24 px tall. */
.docs-side, .docs-contents { position: sticky; top: 0; max-height: 100vh; max-height: 100dvh; overflow-y: auto; margin-inline: -8px; padding: 8px 8px 24px; }
/* With Technical reference open the menu is taller than the screen and, on
   load, starts below the header: a third of a screen of room at its end lets
   the reader's place scroll well into view (script.ts) on its last items too. */
.docs-side:has(details[open]) { padding-bottom: calc(24px + 33vh); }
.docs-nav { display: grid; gap: 22px; }
.docs-nav-home { justify-self: start; padding-block: 4px; font: 700 var(--t16)/1.3 var(--sans); color: var(--ink); text-decoration: none; }
.docs-nav-home:hover { text-decoration: underline; text-underline-offset: 4px; }
.docs-nav-group { display: grid; gap: 2px; }
.docs-nav-group > p, .docs-nav-group > summary { padding: 3px 10px 6px; font: 600 13px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--helio-ink); }
.docs-nav-group > summary { cursor: pointer; }
.docs-nav-group > a { display: block; padding: 6px 10px; border-radius: 8px; font-size: max(14px, calc(15 * var(--u))); line-height: 1.35; color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.docs-nav-group > a:hover { background: #f6f5f8; color: var(--ink); }
.docs-nav-group > a[aria-current] { background: var(--helio-pale); color: var(--ink); font-weight: 650; }
.docs-menu, .docs-contents-menu { display: none; }
.docs-contents nav { display: grid; gap: 4px; }
.docs-contents nav > p { margin-bottom: 5px; font: 600 13px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--helio-ink); }
.docs-contents nav > a { padding-block: 3px; font-size: 14px; line-height: 1.4; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.docs-contents nav > a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.docs-title { padding-bottom: max(22px, calc(28 * var(--u))); border-bottom: 1px solid var(--line); }
.docs-title .eyebrow a { text-decoration: none; }
.docs-title .eyebrow a:hover { text-decoration: underline; text-underline-offset: 3px; }
.docs-title h1 { margin-top: 12px; font: 860 max(40px, calc(58 * var(--u)))/1.02 var(--sans); font-variation-settings: 'opsz' 32; letter-spacing: -.042em; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; }
.docs-title .lead { margin-top: max(14px, calc(18 * var(--u))); }
.docs-source { margin-top: max(12px, calc(16 * var(--u))); font-size: var(--t14); color: var(--muted); }
.docs-source a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.docs-source code { font-size: .94em; }

/* The rendered Markdown. */
.docs-prose { padding-top: max(20px, calc(28 * var(--u))); font-size: 17px; line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.docs-prose :where(p, ul, ol, blockquote, .docs-code, .docs-table) { margin-bottom: 18px; }
.docs-prose p, .docs-prose li { text-wrap: pretty; }
/* Reading lines of about 70 characters (Inter's figures, which set the ch,
   are wider than its average letter); tables and code blocks keep the
   column, in a list item too. */
.docs-prose :where(p, li, blockquote) { max-width: 58ch; }
.docs-prose li:has(> :is(.docs-code, .docs-table)) { max-width: none; }
.docs-prose h2 { margin: 44px 0 14px; font: 820 max(25px, calc(30 * var(--u)))/1.15 var(--sans); font-variation-settings: 'opsz' 32; letter-spacing: -.032em; color: var(--ink); text-wrap: balance; scroll-margin-top: 16px; }
.docs-prose h3 { margin: 32px 0 10px; font: 700 max(19px, calc(21 * var(--u)))/1.3 var(--sans); letter-spacing: -.015em; color: var(--ink); text-wrap: balance; scroll-margin-top: 16px; }
.docs-prose :where(h4, h5, h6) { margin: 26px 0 8px; font: 650 17px/1.4 var(--sans); color: var(--ink); scroll-margin-top: 16px; }
.docs-prose > :first-child, .docs-prose > div[id]:first-child + * { margin-top: 0; }
.docs-prose a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--helio-ink) 55%, transparent); text-underline-offset: 3px; }
.docs-prose a:hover { text-decoration-color: var(--helio-ink); }
.docs-prose strong { color: var(--ink); }
.docs-prose ul { list-style: disc; padding-left: 1.3em; }
.docs-prose ol { list-style: decimal; padding-left: 1.5em; }
.docs-prose li { margin-block: 6px; padding-left: 2px; }
.docs-prose li::marker { color: var(--slate-3); }
.docs-prose li > :where(p, ul, ol) { margin-block: 6px; }
.docs-prose blockquote { padding: 14px 18px; border: 1px solid var(--helio); border-radius: 10px; background: var(--helio-pale); }
.docs-prose blockquote > :last-child { margin-bottom: 0; }
.docs-prose hr { margin-block: 32px; border: 0; border-top: 1px solid var(--line); }
.docs-prose :not(pre) > code { padding: .06em .32em; border: 1px solid var(--line); border-radius: 5px; background: #f6f5f8; color: var(--ink); font-size: max(13px, .86em); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.docs-word { white-space: nowrap; }

/* Code: the homepage's terminal ink with the Run page's Copy button. */
.docs-code { min-width: 0; border-radius: max(10px, calc(12 * var(--u))); background: #16151b; color: #f1f0f4; box-shadow: 0 12px 28px -20px rgba(22, 21, 27, .7); }
.docs-code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 18px; border-bottom: 1px solid rgba(241, 240, 244, .12); }
.docs-code-head > span { font: 500 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #a6a5ae; }
.docs-copy { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border: 1px solid rgba(241, 240, 244, .32); border-radius: 999px; background: transparent; color: inherit; font: 500 13px/1 var(--sans); cursor: pointer; }
.docs-copy:hover { background: rgba(241, 240, 244, .1); }
.docs-copy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.docs-code pre { padding: 16px 20px 18px; font: 500 14px/1.7 var(--mono); font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
.docs-code pre code { font: inherit; color: inherit; }
.docs-line { display: block; padding-left: calc((var(--indent, 0) + 2) * 1ch); text-indent: calc((var(--indent, 0) + 2) * -1ch); }
/* A code word moves to the next line whole, and breaks only when it is
   longer than a whole line, so nothing is hidden. */
.docs-code .docs-word { display: inline-block; max-width: 100%; white-space: inherit; text-indent: 0; }

/* Tables: quiet rules. Prose in a cell breaks between words and code keeps
   its words whole, as in prose (a longer token breaks only after a slash or
   punctuation), so no column is narrower than its longest word. A table
   whose words cannot fit the column stacks into cards (below); without the
   articles' script it scrolls in its own box instead. */
.docs-table { overflow-x: auto; container-type: inline-size; }
.docs-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.docs-cols-4 table { font-size: 14px; }
.docs-table th { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: bottom; font-weight: 650; color: var(--ink); overflow-wrap: break-word; }
.docs-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
.docs-cols-4 :is(th, td) { padding-inline: 8px; }
@container (max-width: 720px) { .docs-cols-4 :is(th, td) { padding-inline: 6px; } }
.docs-table .docs-right { text-align: right; }
.docs-table .docs-center { text-align: center; }
.docs-cell-label { display: none; }
/* Stacked, each row is a small card that reads down, every filled cell under
   its column's name and aligned left: on a column of 640 px or less, and
   while a table is wider than its column (script.ts marks it .docs-stack). */
@container (max-width: 640px) {
  .docs-table :is(table, tbody, tr, td) { display: block; }
  .docs-table thead, .docs-table td.docs-empty { display: none; }
  .docs-table tr { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
  .docs-table tr + tr { margin-top: 10px; }
  .docs-table td { padding: 0; border: 0; text-align: left; }
  .docs-table :is(.docs-right, .docs-center) { text-align: left; }
  .docs-table td + td { margin-top: 8px; }
  .docs-table .docs-cell-label { display: block; margin-bottom: 2px; font: 600 13px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
}
.docs-stack :is(table, tbody, tr, td) { display: block; }
.docs-stack thead, .docs-stack td.docs-empty { display: none; }
.docs-stack tr { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.docs-stack tr + tr { margin-top: 10px; }
.docs-stack td { padding: 0; border: 0; text-align: left; }
.docs-stack :is(.docs-right, .docs-center) { text-align: left; }
.docs-stack td + td { margin-top: 8px; }
.docs-stack .docs-cell-label { display: block; margin-bottom: 2px; font: 600 13px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Previous and next. */
.docs-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.docs-pager a { display: grid; align-content: start; gap: 4px; padding: 16px 18px; text-decoration: none; }
.docs-pager a[rel="next"] { grid-column: 2; text-align: right; }
.docs-pager span { font: 600 13px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--helio-ink); }
.docs-pager strong { font: 700 max(16px, calc(18 * var(--u)))/1.3 var(--sans); color: var(--ink); text-wrap: balance; }
.docs-pager a:hover { border-color: var(--line-2); }

/* The narrow menus: "All docs" and "On this page". */
.docs-menu > summary, .docs-contents-menu > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; font: 600 15px/1.3 var(--sans); color: var(--ink); cursor: pointer; list-style: none; -webkit-tap-highlight-color: rgba(200, 107, 230, .14); }
.docs-menu > summary::-webkit-details-marker, .docs-contents-menu > summary::-webkit-details-marker { display: none; }
.docs-menu > summary::after, .docs-contents-menu > summary::after { content: '+'; display: inline-block; font: 500 20px/1 var(--sans); color: var(--muted); transition: transform .15s; }
.docs-menu[open] > summary::after, .docs-contents-menu[open] > summary::after { transform: rotate(45deg); }
.docs-menu > nav { padding: 4px 8px 18px; }
.docs-contents-menu > nav { display: grid; gap: 6px; padding: 0 16px 14px; }
.docs-contents-menu > nav > a { padding-block: 2px; font-size: 15px; line-height: 1.4; color: var(--ink-2); text-decoration: none; }
.docs-contents-menu > nav > a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1179px) {
  .docs-group { grid-template-columns: minmax(0, 1fr); }
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .docs-contents { display: none; }
  .docs-contents-menu { display: block; margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; }
  .docs-title h1 { font-size: 44px; }
}
@media (max-width: 899px) {
  .docs-cards { grid-template-columns: minmax(0, 1fr); }
  .docs-layout { display: block; }
  .docs-side { display: none; }
  .docs-menu { display: block; margin-bottom: 26px; border: 1px solid var(--line); border-radius: 12px; }
}
@media (max-width: 760px) {
  body.docs { font-size: 16px; }
  .docs-index { padding-block: 36px 56px; }
  .docs-groups { margin-top: 44px; gap: 32px; }
  .docs-group { gap: 14px; padding-top: 22px; }
  .docs-layout { padding-block: 20px 48px; }
  .docs-title h1 { font-size: clamp(32px, 9.4vw, 40px); line-height: 1.04; }
  .docs-prose { font-size: 16px; line-height: 1.65; }
  .docs-prose h2 { margin-top: 36px; font-size: 24px; }
  .docs-prose h3 { font-size: 19px; }
  .docs-code-head { padding-left: 16px; }
  .docs-code pre { padding: 14px 16px 16px; font-size: 13px; line-height: 1.65; }
  .docs-table table { font-size: 14px; }
  .docs-pager { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 36px; padding-top: 22px; }
  .docs-pager a[rel="next"] { grid-column: auto; text-align: left; }
}

.docs-version { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-block: 12px; font-size: 14px; }
.docs-version a { text-underline-offset: 3px; }
