/* Self-hosted web fonts (SIL Open Font License; see /assets/fonts/OFL.txt). Latin and Latin Extended only. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-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: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-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: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-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: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/public-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/public-sans-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: 'Public Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/public-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/public-sans-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: 'Public Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/public-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/public-sans-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: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/public-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/public-sans-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;
}

/* Arial sized to Public Sans' widths: lines wrap the same before and after the web font loads. */
@font-face { font-family: "Public Sans Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 100 549; size-adjust: 104.3%; }
@font-face { font-family: "Public Sans Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 550 900; size-adjust: 99%; }

/* Layout: a fixed reference sidebar on wide screens, one reading column of prose and code, interactive panels inline where they teach. */
:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --ink: #18211f;
  --muted: #5a6763;
  --line: #d8dedb;
  --accent: #0f6b5c;
  --accent-soft: #e1efeb;
  --good: #1d7a43;
  --good-soft: #e3f3e8;
  --warn: #9a5b00;
  --warn-soft: #fbf0dc;
  --bad: #a6461b;
  --bad-soft: #fbe9df;
  --code-bg: #101816;
  --code-ink: #dbe6e2;
  --code-key: #8fd4c3;
  --code-str: #e8c78a;
  --code-num: #f2a07b;
  --code-dim: #7e8f8a;
  --font-body: "Public Sans", "Public Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1513; --surface: #161e1c; --ink: #e3eae7; --muted: #98a7a2; --line: #2a3431;
    --accent: #4fc0a8; --accent-soft: #163731; --good: #5ccb88; --good-soft: #15301f;
    --warn: #e6b05a; --warn-soft: #33270f; --bad: #f08a5d; --bad-soft: #3a2117;
    --code-bg: #0a0f0e; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1513; --surface: #161e1c; --ink: #e3eae7; --muted: #98a7a2; --line: #2a3431;
  --accent: #4fc0a8; --accent-soft: #163731; --good: #5ccb88; --good-soft: #15301f;
  --warn: #e6b05a; --warn-soft: #33270f; --bad: #f08a5d; --bad-soft: #3a2117;
  --code-bg: #0a0f0e; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15.5px; line-height: 1.6; }
a { color: var(--accent); }
code, pre, .mono { font-family: var(--font-mono); }
:not(pre) > code { font-size: 0.88em; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; word-break: break-word; }

.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding-inline: 20px; padding-block: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: baseline; gap: 10px; font-weight: 700; font-size: 16px; }
.brand { color: var(--ink); text-decoration: none; align-items: center; }
.brand-mark { flex: none; color: var(--ink); display: block; }
.brand:hover .brand-mark circle { animation: mark-pulse .9s ease-out; }
@keyframes mark-pulse { 50% { transform: translate(1.5px, -1.5px); } }
@media (prefers-reduced-motion: reduce) { .brand:hover .brand-mark circle { animation: none; } }
.brand .ver { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.base { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); word-break: break-all; }

.shell { max-width: 1240px; margin: 0 auto; padding-inline: 20px; padding-block: 24px 64px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; }
@media (max-width: 960px) { .shell { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

nav.side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; font-size: 14px; display: grid; gap: 18px; }
nav.side .grp { display: grid; gap: 2px; }
nav.side .grp-title { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
nav.side a { color: var(--ink); text-decoration: none; padding: 3px 10px; border-left: 2px solid transparent; }
nav.side a:hover { color: var(--accent); }
nav.side a.on { border-left-color: var(--accent); color: var(--accent); font-weight: 600; }
nav.side .side-list { display: grid; gap: 18px; }
.side-btn, .menu-btn { display: none; }
/* Collapsing groups (built by site.js): headings only, with the group in view open. */
nav.side .grp-h { display: none; }
@media (min-width: 961px) {
  html.js nav.side .side-list { gap: 2px; }
  html.js nav.side .grp-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; margin: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; background: none; border: 0; border-radius: 6px; cursor: pointer; }
  html.js nav.side .grp-h:hover, html.js nav.side .grp.has-on .grp-h { color: var(--accent); }
  html.js nav.side .grp-h .n { font-size: 12px; font-weight: 500; color: var(--muted); }
  html.js nav.side .grp-h .chev { width: 6px; height: 6px; margin-left: auto; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .2s; }
  html.js nav.side .grp.open .grp-h .chev { transform: rotate(45deg); }
  html.js nav.side .grp-links { display: none; padding: 2px 0 10px 8px; }
  html.js nav.side .grp.open .grp-links { display: grid; gap: 2px; }
  html.js nav.side .grp-solo .grp-title { display: none; }
  html.js nav.side .grp-solo a { font-weight: 600; padding-block: 6px; }
}
@media (prefers-reduced-motion: reduce) { nav.side .grp-h .chev { transition: none; } }
@media (max-width: 960px) {
  nav.side { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 6px; }
  nav.side .side-list { display: contents; }
  nav.side .grp { display: contents; }
  nav.side .grp-title { display: none; }
  nav.side a { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; background: var(--surface); }
  nav.side a.on { border-color: var(--accent); }

  /* With scripts on, the side navigation becomes one "On this page" dropdown that stays in reach. */
  html.js nav.side { position: sticky; top: var(--bar-h, 64px); z-index: 4; display: block; overflow: visible; margin-inline: -20px; padding: 8px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  /* Before the script builds the dropdown, hold its space and hide the raw links so nothing jumps. */
  html.js nav.side { min-height: 63px; }
  html.js nav.side > .grp, html.js nav.side > a, html.js nav.side:not(:has(.side-btn)) .side-list { display: none; }
  html.js nav.side .side-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 8px 14px; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-align: left; }
  html.js nav.side .side-k { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
  html.js nav.side .side-cur { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.js nav.side .side-chev { width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; flex: none; }
  html.js nav.side.open .side-chev { transform: rotate(-135deg) translateY(-2px); }
  html.js nav.side .side-list { display: none; position: absolute; left: 12px; right: 12px; top: calc(100% - 4px); max-height: min(65vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 32px rgba(0, 0, 0, .3); }
  html.js nav.side.open .side-list { display: grid; gap: 10px; }
  html.js nav.side .grp { display: grid; gap: 2px; }
  html.js nav.side .grp-title { display: block; padding: 6px 12px 2px; }
  nav.side .grp-links { display: contents; }
  html.js nav.side .grp-links { display: grid; gap: 2px; }
  html.js nav.side .grp-h { display: block; padding: 6px 12px 2px; font: inherit; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: none; border: 0; text-align: left; pointer-events: none; }
  html.js nav.side .grp-h .n, html.js nav.side .grp-h .chev { display: none; }
  html.js nav.side a { border: 0; border-left: 3px solid transparent; border-radius: 8px; background: none; padding: 11px 12px; font-size: 15.5px; }
  html.js nav.side a.on { border-left-color: var(--accent); background: var(--accent-soft); }
  html.js section { scroll-margin-top: calc(var(--bar-h, 64px) + 80px); }
}

/* Phones: a menu button for the site navigation, and nothing too small to read or tap. */
@media (max-width: 760px) {
  .topbar-in { flex-wrap: nowrap; padding-block: 8px; padding-inline: 16px; }
  .brand { padding-block: 10px; min-width: 0; white-space: nowrap; }
  .brand .ver { display: none; }
  html.js .menu-btn { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 14px; font: 600 15px var(--font-body); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; flex: none; }
  .menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .menu-ic { display: grid; gap: 4px; width: 18px; }
  .menu-ic i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
  .topbar.open .menu-ic i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .topbar.open .menu-ic i:nth-child(2) { opacity: 0; }
  .topbar.open .menu-ic i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  html.js .topnav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 2px; padding: 8px 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgba(0, 0, 0, .3); }
  html.js .topbar.open .topnav { display: flex; }
  html.js .topnav a { font-size: 17px; padding: 13px 14px; border-radius: 10px; }

  body .tier, body .by, body .badge, body .lvl, body .r-ex-l, body .tag, body .chip, body .st[class*="chip-"] { font-size: 12.5px; }
  :not(pre) > code { font-size: .92em; }
  .code-label { min-width: 0; overflow-wrap: anywhere; }
  main td a, main li a, main p a { padding-block: 6px; }
  main button, main .copy { min-height: 38px; }
  .members { gap: 8px; }
  .members a { display: inline-flex; align-items: center; min-height: 36px; }
  body span.lvl { font-size: 12.5px; }
}


main { min-width: 0; display: grid; gap: 56px; }
section { display: grid; gap: 14px; scroll-margin-top: 80px; min-width: 0; }
.prose { max-width: 72ch; display: grid; gap: 12px; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.25; }
h1 { font-size: 32px; letter-spacing: -0.015em; }
h2 { font-size: 23px; letter-spacing: -0.01em; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 16.5px; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.lede { font-size: 17px; color: var(--muted); max-width: 66ch; }
.note { font-size: 13.5px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; max-width: 80ch; }
.callout { background: var(--accent-soft); border-radius: 10px; padding: 12px 16px; max-width: 80ch; font-size: 14.5px; }
.callout strong { color: var(--accent); }

.steps { list-style: none; padding: 0; display: grid; gap: 16px; counter-reset: s; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 12px; }
.steps > li::before { content: counter(s); grid-row: span 3; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--surface); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.steps > li > * { min-width: 0; }

/* code */
.code { background: var(--code-bg); border-radius: 10px; overflow: hidden; min-width: 0; }
.code-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.code-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.code-tabs button, .copy { font: inherit; font-family: var(--font-mono); font-size: 12px; background: transparent; color: var(--code-dim); border: 1px solid transparent; border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.code-tabs button[aria-selected="true"] { color: var(--code-ink); border-color: rgba(255,255,255,0.18); }
.code-tabs button:hover, .copy:hover { color: var(--code-ink); }
.code-label { font-family: var(--font-mono); font-size: 12px; color: var(--code-dim); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 12.8px; line-height: 1.65; color: var(--code-ink); tab-size: 2; }
.tk-k { color: var(--code-key); } .tk-s { color: var(--code-str); } .tk-n { color: var(--code-num); } .tk-d { color: var(--code-dim); }

/* endpoint */
.endpoint { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 10px; min-width: 0; }
.ep-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.method { font-family: var(--font-mono); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 5px; }
.method.get { background: var(--good-soft); color: var(--good); }
.method.post { background: var(--accent-soft); color: var(--accent); }
.method.del { background: var(--bad-soft); color: var(--bad); }
.path { font-family: var(--font-mono); font-size: 14px; font-weight: 500; word-break: break-all; }
.ep-desc { color: var(--muted); font-size: 14.5px; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--bg); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
.tier { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.tier.req { background: var(--bad-soft); color: var(--bad); }
.tier.rec { background: var(--warn-soft); color: var(--warn); }
.tier.opt { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
:is(h2, h3) > .tier { margin-left: 10px; vertical-align: 3px; font-family: var(--font-body); letter-spacing: 0; }

/* interactive panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.panel-title { font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
select, input[type="text"] { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; max-width: 100%; }
select { font-family: var(--font-mono); font-size: 13px; }
.btn { font: inherit; font-size: 14px; font-weight: 600; background: var(--accent); color: var(--surface); border: 0; border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn:focus-visible, select:focus-visible, input:focus-visible, .code-tabs button:focus-visible, .copy:focus-visible, nav.side a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status { font-family: var(--font-mono); font-size: 12.5px; padding: 2px 8px; border-radius: 6px; }
.status.ok { background: var(--good-soft); color: var(--good); }
.status.bad { background: var(--bad-soft); color: var(--bad); }
.verify { display: grid; gap: 6px; font-size: 13.5px; }
.verify .line { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; align-items: start; }
.verify .mark { font-weight: 700; }
.verify .mark.ok { color: var(--good); } .verify .mark.bad { color: var(--bad); }
.verify code { word-break: break-all; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* embed preview */
.embed-demo { border: 1px dashed var(--line); border-radius: 12px; padding: 16px; background: var(--bg); display: grid; gap: 10px; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 8px; max-width: 420px; }
.widget-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.widget-name { font-weight: 600; font-size: 14.5px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--good); background: var(--good-soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.wrows { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.wrows .l { color: var(--muted); } .wrows .v { font-weight: 600; text-align: right; }
.widget-foot { font-size: 12px; color: var(--muted); }

.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tiers.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .tiers, .tiers.two { grid-template-columns: minmax(0, 1fr); } }
.tcard .small { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.tcard h3 { font-size: 15.5px; }
.tcard .who { font-size: 13px; color: var(--muted); }
.tcard ul { font-size: 13.5px; }
.tcard.mid { border-color: var(--accent); }

footer.foot { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 6px; max-width: 90ch; }

/* shared site header */
a.brand { color: var(--ink); text-decoration: none; }
.topnav { display: flex; flex-wrap: wrap; gap: 4px; }
.topnav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; padding: 5px 12px; border-radius: 999px; }
.topnav a:hover { color: var(--accent); }
.topnav a[aria-current="page"] { background: var(--accent); color: var(--surface); font-weight: 600; }
.topnav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* keep wide controls inside panels on narrow screens */
.panel { grid-template-columns: minmax(0, 1fr); }
.row > select, .row > input[type="text"] { flex: 1 1 220px; min-width: 0; width: 100%; }
.panel-head > * { min-width: 0; }

/* Site footer, shared by every page. */
.site-foot { margin-top: 72px; border-top: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.site-foot::before { content: ""; position: absolute; right: -60px; bottom: -90px; width: 360px; height: 360px; opacity: .05; pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M24.01,16.08 A9.5,9.5 0 1 1 15.92,7.99' fill='none' stroke='%2398a7a2' stroke-width='4.2' stroke-linecap='round'/%3E%3Ccircle cx='23.72' cy='8.28' r='1.2' fill='%2398a7a2'/%3E%3Ccircle cx='27.26' cy='4.74' r='2.7' fill='%2398a7a2'/%3E%3C/svg%3E"); }
.foot-in, .foot-base { position: relative; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 40px 20px 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 40px; }
.foot-brand { display: grid; gap: 12px; align-content: start; max-width: 36ch; }
.foot-brand .brand { font-size: 17px; }
.foot-brand p { font-size: 14px; color: var(--muted); margin: 0; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1000px) and (min-width: 761px) { .foot-in { grid-template-columns: minmax(0, 1fr); } }
.foot-cols div { display: grid; gap: 8px; align-content: start; }
.foot-cols h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 0; padding: 0; margin: 0 0 4px; }
.foot-cols a { color: var(--ink); text-decoration: none; font-size: 14.5px; }
.foot-cols a:hover { color: var(--accent); }
.foot-base { max-width: 1240px; margin: 0 auto; padding: 16px 20px 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12.5px; color: var(--muted); }
.foot-base span:last-child { margin-left: auto; }
@media (max-width: 760px) {
  .site-foot { margin-top: 48px; }
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 28px 16px 16px; }
  .foot-brand { gap: 8px; }
  .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .foot-cols div { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .foot-cols h2 { flex-basis: 100%; margin-bottom: 0; }
  .foot-cols a { padding-block: 7px; font-size: 15px; }
  .foot-base { padding: 12px 16px 22px; gap: 4px 14px; }
  .foot-base span:last-child { margin-left: 0; }
}

/* Keyboard focus is always visible. */
:where(a, button, summary, select, input, textarea, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Shareable section links */
.h-anchor { margin-left: 8px; font-weight: 600; color: var(--muted); text-decoration: none; opacity: 0; transition: opacity .15s; }
:is(h2, h3):hover > .h-anchor, .h-anchor:focus-visible { opacity: 1; }
.h-anchor:hover { color: var(--accent); }
@media (hover: none) { .h-anchor { opacity: .45; } }
.copied-tip { position: absolute; z-index: 20; transform: translate(-50%, -100%); padding: 4px 9px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; pointer-events: none; opacity: 0; }
.copied-tip.on { animation: tip 1.4s ease forwards; }
@keyframes tip { 0% { opacity: 0; } 12% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }

/* Copy buttons added to bare code blocks */
.pre-wrap { position: relative; min-width: 0; }
.copy-float { position: absolute; top: 8px; right: 8px; opacity: .85; }
.pre-wrap:hover .copy-float { opacity: 1; }
:where(.copy) { font: 600 12.5px var(--font-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
:where(.copy):hover { border-color: var(--accent); color: var(--accent); }

/* Page not found */
.nf { max-width: 1240px; margin: 0 auto; padding: 72px 20px 24px; display: grid; gap: 18px; justify-items: start; }
.nf-mark { width: 72px; height: 72px; color: var(--ink); }
.nf h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; margin: 0; }
.nf p { color: var(--muted); font-size: 17px; max-width: 56ch; margin: 0; }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.nf-links a { padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.nf-links a:first-child { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.nf-links a:hover { border-color: var(--accent); }
.code-actions { display: inline-flex; gap: 8px; align-items: center; flex: none; }

/* Site-wide notice that this is a prototype */
.proto-banner { display: flex; gap: 10px; justify-content: center; align-items: baseline; flex-wrap: wrap; padding: 8px 16px; background: var(--gold-soft, #fbefd6); color: var(--ink); border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; text-align: center; }
.proto-banner strong { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold, #a86b00); }
@media (max-width: 760px) { .proto-banner { display: block; font-size: 12.5px; padding: 7px 14px; } .proto-banner strong { margin-right: 6px; } .proto-banner .pb-more { display: none; } }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 20px 24px; display: grid; gap: 12px; }
.legal h1 { font-size: clamp(30px, 4.5vw, 40px); line-height: 1.1; margin: 0 0 4px; }
.legal h2 { font-size: 19px; margin: 18px 0 0; border: 0; padding: 0; }
.legal p, .legal li { color: var(--ink); font-size: 16px; line-height: 1.65; margin: 0; }
.legal ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.legal-meta { color: var(--muted) !important; font-size: 13.5px !important; }
.legal-draft { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--gold, #a86b00); border-radius: 10px; background: var(--surface); font-size: 14.5px !important; }

/* Gold accent, shared by every page (the prototype banner and draft notices use it). */
:root { --gold: #a86b00; --gold-soft: #fbefd6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --gold: #f2c14e; --gold-soft: #3a2d12; } }
:root[data-theme="dark"] { --gold: #f2c14e; --gold-soft: #3a2d12; }
