/*
 | The site's stylesheet, plain CSS with no build. The colours, radius and
 | fonts are the admin's, restated from mainstay/ui's resources/css/theme.css,
 | which is a Tailwind @theme and cannot be read by a browser as it is. The
 | Poppins files are the ones vendor:publish --tag=mainstay-assets copies out.
 |
 | The admin's Content tab draws a page with this sheet too, the content's
 | element made its editor: so a block's look hangs on its own classes, and
 | text's on being a child of the content's element, `.prose`.
 */

@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(/vendor/mainstay/poppins-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(/vendor/mainstay/poppins-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(/vendor/mainstay/poppins-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(/vendor/mainstay/poppins-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(/vendor/mainstay/poppins-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(/vendor/mainstay/poppins-600-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    --canvas: oklch(0.988 0.002 85);
    --surface: oklch(0.967 0.004 85);
    --border: oklch(0.9 0.005 85);
    --border-strong: oklch(0.82 0.006 85);
    --ink: oklch(0.255 0.009 75);
    --muted: oklch(0.538 0.009 80);
    --accent: oklch(0.53 0.11 250);
    --accent-hover: oklch(0.48 0.11 250);
    --accent-ink: oklch(0.975 0.002 85);
    --accent-soft: oklch(0.53 0.11 250 / 0.08);
    --accent-line: oklch(0.53 0.11 250 / 0.28);

    /* Code, always on a dark box, its colours by token. */
    --code: oklch(0.235 0.008 75);
    --code-line: oklch(0.32 0.008 75);
    --code-ink: oklch(0.93 0.004 85);
    --c-at: oklch(0.74 0.09 245);
    --c-k: oklch(0.74 0.11 25);
    --c-t: oklch(0.78 0.11 150);
    --c-s: oklch(0.82 0.09 75);
    --c-cm: oklch(0.62 0.01 80);

    --r-ctl: 6px;
    --r-tile: 10px;
    --r-panel: 14px;
    --lift: translateY(-2px);
    --sticky: 88px;
    --ease: cubic-bezier(0.16, 0.8, 0.2, 1);
    --wide: 1240px;
    --gutter: 40px;

    --sans: Poppins, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font: 400 1rem/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; overflow-x: clip; }

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

code, pre, .mono { font-family: var(--mono); }

.muted { color: var(--muted); }

.wrap { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999px; top: 0.5rem; }
.skip:focus { left: 0.5rem; z-index: 50; background: var(--ink); color: var(--canvas); padding: 0.5rem 0.75rem; border-radius: var(--r-ctl); }

/* Type */

.eyebrow { margin: 0 0 20px; font-size: 13px; font-weight: 500; color: var(--accent); }
.eyebrow a { color: inherit; text-decoration: none; }
.h1 { font-size: 60px; line-height: 1.06; letter-spacing: -0.04em; font-weight: 600; }
.h2 { font-size: 36px; line-height: 1.12; letter-spacing: -0.03em; font-weight: 600; }
.h3 { font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 600; }
/* No heading or paragraph left with one word on its last line. */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.lede { font-size: 17px; line-height: 1.7; color: var(--muted); }

/* A span of code in a line of copy. */
:is(.lede, .card p, .fhead p, .chapter-text p, .reqrow p, .cmd-text, .fd, .note p, .cta p, .panel-body > p, .item p) code {
    white-space: nowrap;
    font-size: 0.86em;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
}

/* Controls */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--r-ctl);
    font: inherit;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-acc { background: var(--accent); color: var(--accent-ink); }
.btn-acc:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-line { background: var(--canvas); border-color: var(--border); color: var(--ink); }
.btn-line:hover { border-color: var(--border-strong); color: var(--ink); }

.arr { display: inline-block; transition: transform 0.3s var(--ease); }
a:hover .arr, button:hover > .arr { transform: translateX(3px); }

.link { display: inline-flex; gap: 6px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--accent); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions:empty { display: none; }
.actions > .note { flex-basis: 100%; }

.badge {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--canvas);
    border: 1px solid var(--border);
    color: var(--muted);
    white-space: nowrap;
}
.badge.acc { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.badge.dashed { border-style: dashed; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }

.copy {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: var(--r-ctl);
    font: 400 12px var(--sans);
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--canvas);
    color: var(--ink);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.copy:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.copy[hidden] { display: none; }

/* A row of choices, the chosen one raised. */
.seg {
    display: inline-flex;
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--r-tile);
    background: var(--surface);
    flex-wrap: wrap;
    max-width: 100%;
}
.seg[hidden] { display: none; }
.seg > :is(button, a) {
    font: inherit;
    font-size: 13.5px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--r-ctl);
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.seg > :is(button, a):hover { color: var(--ink); }
.seg > :is([aria-selected="true"], [aria-pressed="true"], [aria-current]) {
    background: var(--canvas);
    color: var(--ink);
    box-shadow: 0 1px 2px oklch(0.255 0.009 75 / 0.12), 0 0 0 1px var(--border);
}
.seg small { font-size: 11px; color: var(--muted); }

/* Surfaces */

.card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--r-panel);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    transition: background 0.25s, border-color 0.25s, transform 0.35s var(--ease);
}
a.card:hover { color: var(--ink); background: var(--canvas); border-color: var(--accent-line); transform: var(--lift); }
.card p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--muted); }

.tile { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-tile); background: var(--canvas); }

.panel { padding: 26px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); }

.ic { flex: none; width: 40px; height: 40px; border-radius: var(--r-tile); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }

.frame { position: relative; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--border); padding: 6px; box-shadow: 0 40px 80px -56px oklch(0.255 0.009 75 / 0.45); }
.frame img { width: 100%; border-radius: 8px; border: 1px solid var(--border); background: var(--canvas); }
.crop { overflow: hidden; border-radius: var(--r-panel); border: 1px solid var(--border); background: var(--canvas); }
.crop img { width: 100%; }
figcaption { margin-top: 12px; font-size: 13px; line-height: 1.55; color: var(--muted); }

.note { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-tile); background: var(--accent-soft); border: 1px solid var(--accent-line); max-width: 760px; }
.note svg { flex: none; margin-top: 2px; color: var(--accent); }
.note p { font-size: 14.5px; line-height: 1.65; }

/* Code */

.cb { background: var(--code); color: var(--code-ink); border-radius: var(--r-panel); overflow: hidden; font-family: var(--mono); }
.cbh { display: flex; align-items: center; gap: 6px; min-height: 46px; padding: 5px 6px 5px 18px; border-bottom: 1px solid var(--code-line); font-size: 11.5px; color: var(--c-cm); }
/* A long file name gives way before the Copy button does. */
.cbh > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A faint glow at an edge the code runs on past, so a line cut off there
   reads as one that scrolls; covers that move with the code hide the glow
   once that edge is reached. */
.cb pre {
    margin: 0;
    padding: 18px 22px 20px;
    font-size: 12.5px;
    line-height: 1.85;
    white-space: pre;
    overflow-x: auto;
    background:
        linear-gradient(to right, var(--code) 30%, transparent) left / 32px 100% no-repeat local,
        linear-gradient(to left, var(--code) 30%, transparent) right / 32px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, oklch(0.93 0.004 85 / 0.38), transparent) left / 16px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, oklch(0.93 0.004 85 / 0.38), transparent) right / 16px 100% no-repeat scroll;
}
.cb .copy { border-color: var(--code-line); background: transparent; color: oklch(0.85 0.005 85); }
.cb .copy:hover { border-color: var(--c-cm); background: oklch(1 0 0 / 0.05); color: var(--code-ink); }
.t-attr { color: var(--c-at); }
.t-key, .t-tag { color: var(--c-k); }
.t-type { color: var(--c-t); }
.t-str { color: var(--c-s); }
.t-comment { color: var(--c-cm); }

/* Each line of a terminal's output appears after the one above it. */
.cl { display: block; min-height: 1.85em; }
.term .cl { opacity: 0; animation: fadeup 0.45s var(--ease) both; }
.term .pass { color: var(--c-t); }
.term .fail { color: var(--c-k); }
.blink { animation: blink 1.1s steps(2) infinite; }

/* Code samples together, one shown at a time under a tab each. */
.code-tabs { position: relative; background: var(--code); border-radius: var(--r-panel); overflow: hidden; }
.ctabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; border-bottom: 1px solid var(--code-line); }
.ctabs[hidden] { display: none; }
.ctab { font: 11.5px var(--mono); min-height: 34px; padding: 0 12px; border-radius: var(--r-ctl); border: 0; background: transparent; color: var(--c-cm); cursor: pointer; }
.ctab:hover { color: var(--code-ink); }
.ctab[aria-selected="true"] { background: var(--code-line); color: var(--code-ink); }
.code-tabs .cb { border-radius: 0; }
.code-tabs .cb + .cb { border-top: 1px solid var(--code-line); }
/* Tabbed, each sample's file is its tab, and its Copy button sits at the
   end of the row of tabs. */
.code-tabs[data-tabbed] .cbh { position: absolute; top: 0; right: 0; min-height: 47px; border: 0; }
.code-tabs[data-tabbed] .cbh > span { display: none; }

/* Motion: things lift into view, once. */

.hl { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hl > span { display: inline-block; animation: lift 1.1s var(--ease) both; }
.fadein { animation: fadeup 1s var(--ease) 0.3s both; }
.swap { animation: swap 0.5s var(--ease) both; }
@supports (animation-timeline: view()) {
    .rv { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
}
@keyframes lift { from { transform: translateY(110%); } to { transform: none; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }

/* Header */

.gn { position: sticky; top: 0; z-index: 40; background: oklch(0.988 0.002 85 / 0.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border); }
.gn-in { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 40px; height: 64px; }
.gn-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); }
.gn-brand:hover { color: var(--ink); }
.gn-mark { color: var(--accent); }
.gn-links { display: flex; gap: 2px; overflow-x: auto; }
.gn-links a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 14px; padding: 8px 12px; color: var(--muted); white-space: nowrap; transition: color 0.2s; }
.gn-links a:hover { color: var(--ink); }
.gn-links a[aria-current] { color: var(--ink); font-weight: 500; }
.gn-links a[aria-current]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.gn-gh { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--canvas); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; transition: border-color 0.2s; }
.gn-gh:hover { color: var(--ink); border-color: var(--border-strong); }

/* How far down the page is read, along the header's foot. */
.gn-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
    .gn-bar { animation: gnbar linear both; animation-timeline: scroll(root); }
}
@keyframes gnbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Footer */

.gf { margin-top: 128px; border-top: 1px solid var(--border); background: var(--surface); padding: 64px 0 36px; }
.gf-in { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.gf-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.gf h2 { margin: 0 0 12px; font-size: 13px; font-weight: 500; }
.gf a.l { text-decoration: none; color: var(--muted); font-size: 14px; display: block; padding: 5px 0; transition: color 0.2s; }
.gf a.l:hover { color: var(--accent); }
.gf-tag { margin-top: 14px; font-size: 14px; color: var(--muted); max-width: 300px; line-height: 1.65; }
.gf-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }

/* A page's head, where its content opens on no hero, and the way back. */

.page-head { padding-top: 100px; padding-bottom: 56px; }
.page-head .lede { margin-top: 22px; max-width: 620px; }
.page-head .actions { margin-top: 28px; }
.crumb { display: flex; gap: 8px; align-items: center; padding-top: 48px; font-size: 13px; color: var(--muted); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover, .crumb [aria-current] { color: var(--ink); }

/* Text written straight on a page, at a reading measure. */
.page-content > :is(p, h2, h3, ul, ol, blockquote, .cb) { max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); }
.page-content > * + :is(p, ul, ol) { margin-top: 16px; }

/* Hero */

.hero { padding-top: 104px; }
.hero:not(.has-code) { padding-bottom: 56px; }
.crumb + .page-content > .hero:first-child { padding-top: 56px; }
.hero .h1 { max-width: 860px; }
.hero-body > * + * { margin-top: 28px; }
.hero-body .lede { margin-top: 22px; max-width: 620px; }
.hero-head + .hero-body > .lede:first-child { margin-top: 22px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.hero.has-code { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; align-items: center; }
.hero.has-code > :not(.hero-code) { grid-column: 1; }
.hero.has-code .hero-code { grid-column: 2; grid-row: 1 / span 2; }
/* Head and body meet in the middle, however tall the code beside them. */
.hero.has-code .hero-head { align-self: end; }
.hero.has-code .hero-body { align-self: start; }
.hero.has-code .lede { font-size: 18px; max-width: 520px; }
.hero.has-code .actions { margin-top: 36px; }
.hero.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: 48px; align-items: end; justify-content: space-between; }
.hero.halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; align-items: end; }
.hero:is(.split, .halves) .hero-body > .lede:first-child { margin-top: 0; }

.install { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 5px 0 14px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface); font-family: var(--mono); font-size: 13px; }
.install .prompt { color: var(--muted); }
.install .copy { margin-left: 6px; }

/* A section */

.sec { padding-top: 128px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; flex-wrap: wrap; margin-bottom: 40px; }
.sec-head .h2 { max-width: 560px; }
.sec-aside { max-width: 440px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.sec-head.bare .sec-aside { max-width: none; }
.sec.sec-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.sec.sec-side .sec-head { margin: 0; flex-direction: column; align-items: flex-start; gap: 16px; }
.sec-body > * + * { margin-top: 24px; }

/* Images */

.tilt { transform-origin: 50% 0; transform: perspective(2000px) rotateX(12deg) scale(0.95); }
@supports (animation-timeline: view()) {
    .tilt { animation: untilt linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
}
@keyframes untilt { from { transform: perspective(2000px) rotateX(12deg) scale(0.95); } to { transform: none; } }
.page-content > .image { max-width: var(--wide); margin: 0 auto; padding-inline: var(--gutter); }
.hero.has-code + .image { margin-top: 88px; }
.pins { position: absolute; inset: 0; pointer-events: none; counter-reset: pin; }
.pin { position: absolute; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px; background: var(--ink); color: var(--canvas); font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: auto; }
.pin b { counter-increment: pin; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.pin b::before { content: counter(pin); }

/* Images in a row past the page's edge, moving along as it scrolls. */
.gallery { margin-inline: calc(50% - 50vw); overflow: hidden; }
.strip { display: flex; gap: 24px; width: max-content; padding-left: max(var(--gutter), calc((100vw - var(--wide)) / 2 + var(--gutter))); }
.strip > .image { width: 540px; flex: none; }
@supports (animation-timeline: view()) {
    .strip { animation: pan linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
}
@keyframes pan { from { transform: translateX(4%); } to { transform: translateX(-28%); } }

/* Code beside the tabs of what it makes */

.tabs .seg { margin-bottom: 20px; }
.out { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; }
.tab-panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.tab-panels > .panel { min-height: 520px; }
.tabs[data-tabbed] .tab-panels > [hidden] { display: none; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-body > * + * { margin-top: 12px; }
.panel-body > p { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.panel-body > .cb, .panel-body > .image { margin-top: 16px; }
.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.tbl th { font: 500 12px var(--sans); color: var(--muted); }

/* Numbered rows leading on */

.highlights { border-bottom: 1px solid var(--border); counter-reset: highlight; }
.feat { counter-increment: highlight; display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.3fr) 24px; gap: 24px; align-items: center; padding: 22px 18px; border-top: 1px solid var(--border); text-decoration: none; color: var(--ink); background: linear-gradient(var(--accent-soft), var(--accent-soft)) no-repeat 0 0 / 0% 100%; transition: background-size 0.6s var(--ease); }
a.feat:hover { background-size: 100% 100%; color: var(--ink); }
.feat .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.feat .n::before { content: counter(highlight, decimal-leading-zero); }
.feat .ft { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; }
.feat .fd { font-size: 15px; line-height: 1.6; color: var(--muted); }
.feat .go { color: var(--accent); opacity: 0; transition: opacity 0.3s; }
a.feat:hover .go { opacity: 1; }

/* The plan, counted */

.bar16 { display: grid; grid-template-columns: repeat(var(--phases), minmax(0, 1fr)); gap: 4px; }
.bar16 i { height: 10px; border-radius: 3px; background: var(--accent); transform-origin: left; animation: seg 0.6s var(--ease) both; }
.bar16 i.todo { background: transparent; border: 1.5px dashed var(--accent-line); }
@keyframes seg { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
.roadmap-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; align-items: center; padding: 36px 40px; }
.roadmap-card .h3 { font-size: 22px; }
.roadmap-card p { font-size: 15px; }
.roadmap-next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.roadmap-next strong { color: var(--ink); font-weight: 500; }

.progress .bar16 i { height: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); overflow: hidden; }
.stats > div { padding: 22px 24px; border-right: 1px solid var(--border); }
.stats > div:last-child { border-right: 0; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat { margin-top: 6px; font-size: 18px; font-weight: 500; }

.group { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.ghead { position: sticky; top: var(--sticky); }
.ghead .h2 { font-size: 30px; }
.ghead .lede { margin-top: 10px; font-size: 14.5px; }
.tl { position: relative; list-style: none; margin: 0; padding: 0 0 0 44px; }
.tl::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl.done::after { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: var(--accent); transform-origin: top; }
@supports (animation-timeline: view()) {
    .tl.done::after { animation: railgrow linear both; animation-timeline: view(); animation-range: entry 10% exit 60%; }
}
@keyframes railgrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.item { position: relative; margin-bottom: 10px; }
.item .node { position: absolute; left: -40px; top: 20px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--canvas); }
.item.todo { border-style: dashed; border-color: var(--accent-line); }
.item.todo .node { background: var(--canvas); border: 2px dashed var(--accent); }
.item .top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.item .n { font-family: var(--mono); font-size: 11.5px; color: var(--muted); min-width: 64px; }
.item p { margin: 6px 0 0 76px; font-size: 14.5px; line-height: 1.65; color: var(--muted); }

/* Closing panel */

.cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; padding: 56px; border-radius: var(--r-panel); background: var(--accent); color: var(--accent-ink); }
.cta p { margin-top: 16px; font-size: 16px; line-height: 1.7; opacity: 0.88; max-width: 420px; }
.cta p code { background: oklch(1 0 0 / 0.12); border-color: oklch(1 0 0 / 0.2); color: inherit; }
.cta .actions { margin-top: 26px; }
.cta .btn { background: var(--canvas); color: var(--accent); border-color: var(--canvas); }
.cta .btn:hover { background: var(--accent-ink); color: var(--accent-hover); }
.cta .cb { box-shadow: 0 30px 60px -30px oklch(0.2 0.05 250 / 0.6); }

/* Features, told in full, with a list of them at the side */

.layout { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; }
.layout > .toc { flex: 0 1 210px; position: sticky; top: var(--sticky); display: flex; flex-direction: column; }
.layout > .toc a { display: flex; gap: 12px; align-items: baseline; text-decoration: none; font-size: 13.5px; color: var(--muted); padding: 8px 12px; border-radius: var(--r-ctl); transition: background 0.2s, color 0.2s; }
.layout > .toc a:hover, .layout > .toc a[aria-current] { background: var(--surface); color: var(--ink); }
.layout > .toc a span:first-child { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.layout > .main { flex: 999 1 640px; min-width: 0; counter-reset: feature; }
.fsec { counter-increment: feature; padding: 72px 0; border-top: 1px solid var(--border); scroll-margin-top: var(--sticky); }
.fsec:first-child { border-top: 0; padding-top: 0; }
.fhead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 28px; }
.fhead h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; }
.fhead p { font-size: 16px; line-height: 1.7; color: var(--muted); }
.fhead .link { margin-top: 14px; }
.num { display: block; margin-bottom: 12px; font-family: var(--mono); font-size: 12px; color: var(--accent); }
.num::before { content: counter(feature, decimal-leading-zero); }
.fbody > * + * { margin-top: 18px; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.column { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.column > :is(h2, h3) { font-size: 17px; font-weight: 600; }
.column > p { font-size: 15px; line-height: 1.7; color: var(--muted); }

/* Name and value pairs: as tiles, as rows in a panel, or as routes. */
.tiles--grid .tiles-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.tiles--grid .tile { display: flex; flex-direction: column; gap: 6px; }
.tiles--grid .tile-label { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.tiles--grid .tile-value { font-size: 14px; line-height: 1.45; }
.tiles--rows { padding: 24px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); }
.tiles-heading { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.tiles--rows .tile { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; font-size: 14px; }
.tiles--rows .tile:last-child { border-bottom: 0; padding-bottom: 0; }
.tiles--rows .tile-value { font-family: var(--mono); color: var(--accent); }
.tiles--routes .tiles-list { display: flex; flex-direction: column; gap: 8px; }
.tiles--routes .tile { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12.5px; }
.tiles--routes .tile-label::before { content: "GET"; margin-right: 12px; font: 500 11.5px var(--sans); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.tiles--routes .tile-value { margin-left: auto; color: var(--muted); }

/* Numbered steps */

.steps { counter-reset: step; }
.steps.panel { padding: 8px 28px; }
.reqrow { counter-increment: step; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.reqrow:last-child { border-bottom: 0; }
.steps:not(.panel) .reqrow { border-bottom: 0; border-top: 1px solid var(--border); }
.step { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.step::before { content: counter(step); }
.reqrow-text { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: baseline; }
.reqrow-title { font-weight: 500; font-size: 16px; }
.reqrow-text p + p { margin-top: 3px; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* Drawn pictures */

.diagram { padding: 32px; }
.flow { stroke-dasharray: 3 6; animation: dash 1s linear infinite; }
.dot { animation: travel 3.4s cubic-bezier(0.5, 0, 0.5, 1) infinite; }
@keyframes dash { to { stroke-dashoffset: -18; } }
@keyframes travel { from { offset-distance: 0%; } to { offset-distance: 100%; } }

.locales { padding: 8px 24px; }
.locales dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); font-size: 14px; }
.locales dt { padding: 15px 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.locales dd { height: 52px; display: flex; align-items: center; gap: 10px; }
.locales :is(dt, dd):nth-of-type(n + 2) { border-top: 1px solid var(--border); }
.locales .swapper { overflow: hidden; align-items: flex-start; }
.swapper.mono { font-size: 12.5px; }
.lang { display: block; animation: langswap 7s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.lang > span { height: 52px; display: flex; align-items: center; gap: 10px; }
@keyframes langswap { 0%, 40% { transform: none; } 50%, 90% { transform: translateY(-50%); } 100% { transform: none; } }

.depth-tree { display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.depth { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-left: calc(var(--level, 0) * 40px); }
.depth > .mono { font-size: 11px; width: 70px; color: var(--muted); }
.node2 { padding: 9px 14px; border-radius: var(--r-tile); border: 1px solid var(--border); background: var(--canvas); font-size: 14px; }
.node2.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.node2.dashed { border-style: dashed; color: var(--muted); }
.depth-global { margin-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.depth-tree > p { font-size: 13.5px; }

.lifecycle { display: flex; align-items: center; min-height: 100%; }
.tl-line { position: relative; width: 100%; height: 150px; list-style: none; margin: 0; padding: 0; }
.tl-line::before, .tl-line::after { content: ""; position: absolute; left: 8%; top: 58px; height: 2px; }
.tl-line::before { right: 8%; background: var(--border); }
.tl-line::after { background: var(--accent); animation: tlfill 7s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.tl-line li { position: absolute; left: var(--at); top: 0; bottom: 0; }
.tl-line .badge { position: absolute; top: 0; transform: translateX(-50%); }
.tl-line i { position: absolute; top: 47px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: var(--canvas); border: 2px solid var(--accent); z-index: 1; }
.tl-line small { position: absolute; top: 88px; transform: translateX(-50%); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
@keyframes tlfill { 0%, 6% { width: 0; } 30%, 42% { width: 42%; } 64%, 92% { width: 84%; } 100% { width: 84%; opacity: 0; } }

/* Cards */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.cards .card .ic { width: 38px; height: 38px; margin-bottom: 16px; }
.cards--tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.cards--tiles .card { padding: 16px 18px; border-radius: var(--r-tile); background: var(--canvas); }
.cards--tiles .card .ic { border: 1px solid var(--border); background: var(--surface); color: var(--ink); margin-bottom: 12px; }
.cards--tiles .h3 { font-size: 14px; font-weight: 500; }
.cards--tiles .card p { font-size: 12.5px; line-height: 1.5; }

/* A story in steps, sides changing */

.chapters { counter-reset: chapter; }
.chapter { counter-increment: chapter; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 64px; align-items: center; padding: 72px 0; border-top: 1px solid var(--border); }
.chapter:first-child { border-top: 0; }
.chapter:nth-child(even) > .chapter-text { order: 2; }
.chapter h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; }
.chapter-text p { margin-top: 16px; font-size: 16px; line-height: 1.75; color: var(--muted); }
.chapter-media { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.sn::before { content: counter(chapter); }
.page-content > .chapters { max-width: var(--wide); margin: 0 auto; padding: 56px var(--gutter) 0; }

/* Plugins */

.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.toolbar[hidden], .empty[hidden] { display: none; }
.search { display: flex; align-items: center; gap: 10px; min-height: 48px; width: 340px; max-width: 100%; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--canvas); color: var(--muted); transition: border-color 0.2s, box-shadow 0.2s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { font: inherit; font-size: 14px; border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--ink); }
.plugin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plugin-grid > [hidden] { display: none; }
.plugin-head { display: flex; gap: 14px; align-items: flex-start; }
.plugin .ic { width: 44px; height: 44px; }
.pkg { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.plugin > p { margin-top: 16px; }
.plugin .badges { gap: 6px; margin-top: 16px; }
.pfoot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.plugin .pfoot { margin-top: 20px; }
.empty { padding: 56px 24px; text-align: center; border: 1px dashed var(--border); border-radius: var(--r-panel); color: var(--muted); font-size: 15px; }

/* Commands */

.cmds { border: 1px solid var(--border); border-radius: var(--r-panel); overflow: hidden; }
.cmd { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr) auto auto; gap: 24px; align-items: center; padding: 16px 20px 16px 24px; border-top: 1px solid var(--border); background: var(--canvas); }
.cmd:first-child { border-top: 0; }
.cmd .copy { margin-left: 0; }
.cmd-name { font-size: 13px; color: var(--accent); }
.cmd-text { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* The documentation by section */

.guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guide .ic { margin-bottom: 18px; }
.guide > p { margin-bottom: 18px; }
.items { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.items a { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; padding: 6px 0; text-decoration: none; color: var(--ink); }
.items a:hover { color: var(--accent); }

/* Articles where they are listed */

.cover { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--r-panel); border: 1px solid var(--border); background: var(--surface); }
.cover .glyph { position: absolute; left: 8%; bottom: 12%; right: 8%; font-family: var(--mono); font-size: 22px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform 0.8s var(--ease); }
.cover .mark { position: absolute; right: -6%; top: -12%; width: 52%; height: auto; color: var(--accent); opacity: 0.12; stroke-width: 0.8; transition: transform 1.2s var(--ease); }
a:hover .cover .glyph { transform: translateY(-4px); }
a:hover .cover .mark { transform: rotate(-4deg); }
.cover.acc { background: var(--accent); border-color: var(--accent); }
.cover.acc .glyph { color: var(--accent-ink); font-size: 30px; }
.cover.acc .mark { color: var(--accent-ink); opacity: 0.16; }

.posts .filters { margin-bottom: 44px; }
.post { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: var(--ink); }
.post:hover { color: var(--ink); }
.post-text { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.post .title { font-size: 19px; line-height: 1.35; letter-spacing: -0.015em; font-weight: 600; background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 1.5px; transition: background-size 0.5s var(--ease); }
.post:hover .title { background-size: 100% 1.5px; }
.post .summary { font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.post .link { font-size: 13px; }
.post.feat { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; margin-bottom: 72px; padding: 0; border: 0; background: none; }
.post.feat .title { display: inline; font-size: 34px; line-height: 1.2; letter-spacing: -0.03em; }
.post.feat .summary { font-size: 16px; line-height: 1.7; }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 28px; }
.more .h2 { font-size: 28px; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; }
.pager span { color: var(--muted); }
.pager a { font-weight: 500; text-decoration: none; }
.pager a[rel="next"] { margin-left: auto; }

/* An article */

.post-head .post-title { max-width: 860px; margin: 56px auto 0; text-align: center; }
.post-head .meta { justify-content: center; }
.post-head .h1 { margin-top: 22px; font-size: 52px; line-height: 1.1; }
.post-cover { margin-top: 56px; aspect-ratio: 21 / 8; }
.post-cover .mark { width: 36%; }
.post-cover.acc .glyph { left: 6%; font-size: 40px; }
.post-body { display: grid; grid-template-columns: 200px minmax(0, 680px); gap: 72px; justify-content: center; align-items: start; padding-top: 72px; }
.post-body > .post-main { grid-column: 2; }
.toc p { margin: 0 0 10px; font-size: 12.5px; font-weight: 500; }
.post-body > .toc, .otp { position: sticky; top: var(--sticky); display: flex; flex-direction: column; font-size: 13px; }
.post-body > .toc a, .otp a { text-decoration: none; color: var(--muted); padding: 6px 0 6px 14px; border-left: 1.5px solid var(--border); transition: border-color 0.2s, color 0.2s; }
.post-body > .toc a:hover, .otp a:hover, .post-body > .toc a[aria-current], .otp a[aria-current] { color: var(--ink); border-left-color: var(--accent); }

/*
 | The text of an article or a doc: the paragraphs, headings, lists, quotes,
 | code and blocks Mainstay writes, as children of the content's element.
 */
.art > h2 { margin: 56px 0 14px; font-size: 26px; line-height: 1.25; letter-spacing: -0.025em; font-weight: 600; scroll-margin-top: var(--sticky); }
.art > h3 { margin: 36px 0 10px; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.art > p { margin: 0 0 20px; font-size: 17px; line-height: 1.8; }
.post-main .art > p:first-child { font-size: 20px; line-height: 1.75; }
.art :not(pre) > code { font-size: 0.82em; padding: 2px 6px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); }
.post-main .art > p:first-child code { font-size: 0.7em; }
.art > :is(.cb, .code-tabs, .tiles, .note, .image) { margin: 24px 0 28px; }
.art > :is(ul, ol) { margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.art > ul { list-style: none; }
.art > ol { padding-left: 22px; }
.art li { position: relative; font-size: 16.5px; line-height: 1.7; }
.art > ul > li { padding-left: 22px; }
.art > ul > li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.art li > p { margin: 0; }
.art > blockquote { margin: 0 0 20px; padding-left: 18px; border-left: 2px solid var(--accent-line); color: var(--muted); font-size: 17px; line-height: 1.8; }
.art > hr { border: 0; border-top: 1px solid var(--border); margin: 48px 0; }
.endnote { margin-top: 56px; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); }
.endnote p { margin: 0 0 12px; font-size: 15px; line-height: 1.7; color: var(--muted); }

/* A doc */

.shell { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 48px; }
.side-menu { flex: 0 1 220px; position: sticky; top: var(--sticky); }
.side-menu > summary { display: none; }
.side { display: flex; flex-direction: column; gap: 20px; padding-right: 20px; border-right: 1px solid var(--border); }
.side h2 { margin: 0 0 6px; padding: 0 10px; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.side a { display: block; font-size: 14px; padding: 7px 10px; border-radius: var(--r-ctl); text-decoration: none; color: var(--ink); transition: background 0.2s; }
.side a:hover { background: var(--surface); color: var(--ink); }
.side a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.doc { flex: 999 1 520px; min-width: 0; max-width: 720px; }
.doc .crumb { padding-top: 0; margin-bottom: 16px; }
.doc > .h1 { font-size: 46px; }
.doc > .lede { margin-top: 16px; font-size: 18px; }
.doc .art { margin-top: 36px; }
.doc .art > p { font-size: 16px; line-height: 1.75; margin-bottom: 16px; }
.doc .art > h2 { margin-top: 64px; }
.doc .pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border-top: 0; padding-top: 0; }
.doc .pager .card { padding: 18px 20px; }
.doc .pager .card span { font-size: 12.5px; color: var(--muted); }
.doc .pager .card strong { margin-top: 4px; font-size: 16px; font-weight: 500; }
.doc .pager [rel="next"] { grid-column: 2; text-align: right; }
.otp { flex: 0 1 180px; }

@media (max-width: 1160px) {
    .otp { display: none; }
}

@media (max-width: 1100px) {
    .grid, .plugin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-body { grid-template-columns: minmax(0, 680px); }
    .post-body > .toc { display: none; }
    .post-body > .post-main { grid-column: 1; }
    .cards--tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    :root { --gutter: 16px; }
    .gn-in { gap: 12px; }
    .gn-gh span { display: none; }
    .h1, .post-head .h1, .doc > .h1 { font-size: 42px; }
    .h2 { font-size: 28px; }
    .sec { padding-top: 88px; }
    .gf { margin-top: 88px; }
    .gf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { padding-top: 72px; }
    .hero.has-code, .hero.split, .hero.halves, .out, .cta, .two, .fhead, .chapter, .sec.sec-side, .post.feat, .group, .stats { grid-template-columns: minmax(0, 1fr); }
    .hero.has-code .hero-code { grid-column: 1; grid-row: auto; margin-top: 40px; }
    .hero:is(.split, .halves) .hero-body { margin-top: 22px; }
    .sec-head, .fhead { row-gap: 16px; }
    .cta { padding: 28px; }
    .feat { grid-template-columns: 40px minmax(0, 1fr); gap: 6px 14px; }
    .feat .fd { grid-column: 2; }
    .feat .go { display: none; }
    .strip > .image { width: 300px; }
    .tab-panels > .panel { min-height: 0; }
    .layout > .toc { position: static; flex-direction: row; flex-wrap: wrap; }
    .chapter { gap: 28px; }
    .chapter:nth-child(even) > .chapter-text { order: 0; }
    .pin { display: none; }
    .ghead { position: static; }
    .group { gap: 24px; }
    .stats > div { border-right: 0; border-bottom: 1px solid var(--border); }
    .stats > div:last-child { border-bottom: 0; }
    .item p { margin-left: 0; }
    .grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .post.feat { gap: 28px; }
    .post.feat .title { font-size: 28px; }
    .cmd { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
    .cmd-text { grid-column: 1 / -1; grid-row: 2; }
    .cmd .badge { grid-row: 1; grid-column: 2; }
    .cmd .copy { grid-column: 2; grid-row: 3; justify-self: end; }
    .post-cover { aspect-ratio: 16 / 9; }
    .post-cover.acc .glyph { font-size: 26px; }
    .side-menu { position: static; flex-basis: 100%; border: 1px solid var(--border); border-radius: var(--r-tile); }
    .side-menu > summary { display: flex; justify-content: space-between; align-items: center; min-height: 46px; padding: 0 16px; font-size: 14px; font-weight: 500; cursor: pointer; list-style: none; }
    .side-menu > summary::-webkit-details-marker { display: none; }
    .side-menu > summary::after { content: ""; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
    .side-menu[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
    .side { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 16px 12px; padding: 4px 6px 14px; border-right: 0; }
    .doc .pager { grid-template-columns: minmax(0, 1fr); }
    .doc .pager [rel="next"] { grid-column: 1; }
    .lifecycle .tl-line small { font-size: 11px; white-space: normal; width: 90px; text-align: center; }
}

@media (max-width: 640px) {
    .plugin-grid, .guides, .cards--tiles { grid-template-columns: minmax(0, 1fr); }
    .search { width: 100%; }
    .h1, .post-head .h1, .doc > .h1 { font-size: 36px; }
    .gf-grid { grid-template-columns: minmax(0, 1fr); }
    .install { max-width: 100%; overflow-x: auto; }
    /* The menu on a row of its own under the name, so every link shows. */
    :root { --sticky: 112px; }
    .gn-in { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 2px; }
    .gn-links { order: 1; flex-basis: 100%; flex-wrap: wrap; justify-content: space-between; margin: 0 -6px; }
    .gn-links a { padding: 8px 6px; }
    .item .top { flex-direction: column; align-items: flex-start; gap: 4px; }
    .diagram { padding: 16px; overflow-x: auto; }
    .diagram svg { min-width: 640px; }
    .tiles--routes .tile { flex-wrap: wrap; row-gap: 4px; }
    .tiles--routes .tile-value { margin-left: 0; flex-basis: 100%; }
}

/* Narrower still, the menu's links take two rows. */
@media (max-width: 359px) {
    :root { --sticky: 152px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .term .cl { opacity: 1; }
    .tilt { transform: none; }
}
