/* oxigenlang.org. One stylesheet, no framework. Graphite and soft white with
   steel blue for links and a muted cyan accent; the header, footer and home
   hero are graphite in both themes. Colours are tokens on :root; the dark set
   is its own choice, not an inversion. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f4f6f8;
  --paper-2: #e8ecf0;
  --paper-3: #dae0e6;
  --raised: #ffffff;
  --ink: #111820;
  --ink-2: #33404c;
  --muted: #5b6672;
  --rule: #d3dae1;
  --signal: #2f5d7e;
  --link: #2f5d7e;
  --on-signal: #ffffff;
  /* The graphite of the header, footer and home hero, in both themes. */
  --band: #111820;
  --band-2: #18222c;
  --band-ink: #f4f6f8;
  --band-muted: #9aa5b0;
  --accent: #4fa3b8;
  --on-accent: #071017;

  /* Code is dark in both themes: one highlight palette, tuned once. */
  --code-bg: #0c1218;
  --code-bar: #121a22;
  --code-rule: #1f2a35;
  --code-ink: #dde5ec;
  --code-muted: #8b949e;
  --code-out: #080d12;
  --tk-kw: #79c0d4;
  --tk-str: #a9cf9c;
  --tk-num: #e2c07e;
  --tk-com: #6f7c89;
  --tk-fn: #eef3f7;
  --tk-type: #9db8e6;
  --tk-const: #d9a6c7;
  --tk-dir: #8b949e;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 6px;
  --header-h: 60px;
  /* Pages widen with the screen up to --page; the gutter grows with them. */
  --page: 2000px;
  --gutter: clamp(16px, 4vw, 80px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e141a;
    --paper-2: #151d25;
    --paper-3: #1e2832;
    --raised: #18212a;
    --ink: #e8edf2;
    --ink-2: #c0c9d2;
    --muted: #8b949e;
    --rule: #25303b;
    --signal: #4fa3b8;
    --link: #7cc0d2;
    --on-signal: #071017;
    --band: #0a0f14;
    --band-2: #121a22;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e141a;
  --paper-2: #151d25;
  --paper-3: #1e2832;
  --raised: #18212a;
  --ink: #e8edf2;
  --ink-2: #c0c9d2;
  --muted: #8b949e;
  --rule: #25303b;
  --signal: #4fa3b8;
  --link: #7cc0d2;
  --on-signal: #071017;
  --band: #0a0f14;
  --band-2: #121a22;
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); }
a:hover { text-decoration-color: currentColor; }
/* No ligatures in code: they hide characters (` :=`), and the playground's
   highlighted copy must line up glyph for glyph with its textarea. */
p code, li code, dd code, td code { font-size: .88em; }
code, kbd, pre, textarea { font-family: var(--mono); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--signal) 28%, transparent); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { left: 16px; }
.wrap { max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Header ───────────────────────────────────────────────────────── */

.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--band); color: var(--band-ink); }
.header-inner { max-width: calc(var(--page) + 2 * var(--gutter)); height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand .logo { width: 26px; height: 26px; color: currentColor; }
.brand-name { font-weight: 650; font-size: 18px; letter-spacing: -0.02em; }
.brand-name span { font-weight: 400; color: var(--muted); }
.site-header .brand, .site-footer .brand { color: var(--band-ink); }
.site-header .brand-name span, .site-footer .brand-name span { color: var(--band-muted); }
.site-nav { display: flex; gap: 26px; height: 100%; }
.site-nav a { display: flex; align-items: center; color: var(--band-muted); font-size: 15px; text-decoration: none; border-bottom: 2px solid transparent; border-top: 2px solid transparent; }
.site-nav a:hover { color: var(--band-ink); }
.site-nav a[aria-current="page"] { color: var(--band-ink); border-bottom-color: var(--accent); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn, .search-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 36px; min-width: 36px; padding: 0 8px; border: 0; border-radius: var(--radius); background: none; color: var(--band-muted); cursor: pointer; font: inherit; text-decoration: none; }
.icon-btn:hover, .search-trigger:hover { background: var(--band-2); color: var(--band-ink); }
.icon-btn svg, .search-trigger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg.fill { fill: currentColor; stroke: none; }
.search-trigger { padding: 0 10px; min-width: 220px; justify-content: flex-start; background: var(--band-2); color: var(--band-muted); font-size: 14px; }
.search-trigger kbd { margin-left: auto; font-size: 12px; color: var(--band-muted); }
.search-field kbd { margin-left: auto; font-size: 12px; color: var(--muted); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
.menu-toggle { display: none; }
@media (max-width: 1180px) { .header-inner { gap: 24px; } .site-nav { gap: 18px; } }
@media (max-width: 1000px) { .search-trigger { min-width: 0; } .search-trigger span, .search-trigger kbd { display: none; } }
@media (max-width: 820px) {
  .header-inner { gap: 12px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: var(--header-h) 0 auto 0; height: auto; flex-direction: column; gap: 0; padding: 8px 16px 20px; background: var(--band); visibility: hidden; opacity: 0; transition: opacity .15s; }
  .site-nav a { font-size: 20px; padding: 12px 0; border: 0; }
  .site-nav a[aria-current="page"] { color: var(--accent); }
  body.menu-open .site-nav { visibility: visible; opacity: 1; }
}

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: var(--radius); font: 550 16px/1 var(--sans); text-decoration: none; cursor: pointer; border: 1.5px solid var(--ink); background: none; color: var(--ink); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn svg { width: 14px; height: 14px; fill: currentColor; }
.btn-solid { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-link { border: 0; padding: 0 4px; height: auto; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.btn-link:hover { background: none; color: var(--signal); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }

/* ── Home ─────────────────────────────────────────────────────────── */

.hero { padding: 56px 0 64px; background: var(--band); color: var(--band-ink); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.hero h1 { margin: 0; font-size: 36px; line-height: 1.15; letter-spacing: -0.025em; font-weight: 650; }
.hero-copy p { max-width: 760px; margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: #c9d2db; }
.hero-copy .byline { font-size: 15px; color: var(--band-muted); }
.hero a:not(.btn) { color: #8fd0e0; text-decoration-color: rgba(143, 208, 224, .45); }
.hero .btn { border-color: var(--band-ink); color: var(--band-ink); }
.hero .btn:hover { background: var(--band-ink); color: var(--band); }
.hero .btn-solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hero .btn-solid:hover { background: #7cc0d2; border-color: #7cc0d2; color: var(--on-accent); }
.hero-code .code { margin: 0; box-shadow: 0 0 0 1px var(--code-rule); }
.hero-note { margin: 12px 0 0; font-size: 14px; color: var(--band-muted); }
@media (max-width: 960px) { .hero { padding: 40px 0 48px; } .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

/* Where to go next: four groups of links, Python.org-style */
.resources { padding: 48px 0; background: var(--raised); border-bottom: 1px solid var(--rule); }
.resource-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.resource h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; letter-spacing: -0.015em; font-weight: 620; }
.resource h2 svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--signal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.resource p { margin: 10px 0 0; font-size: 16px; color: var(--ink-2); }
.resource ul { list-style: none; margin: 14px 0 0; padding: 0; }
.resource li { padding: 3px 0; font-size: 16px; }
@media (max-width: 1060px) { .resource-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; } }
@media (max-width: 600px) { .resource-grid { grid-template-columns: minmax(0, 1fr); } }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); column-gap: 56px; row-gap: 36px; margin-top: 40px; }
.features h3 { margin: 0; font-size: 18px; letter-spacing: -0.01em; font-weight: 620; }
.features p { margin: 6px 0 0; color: var(--ink-2); }
.features a { display: inline-block; margin-top: 6px; font-size: 15px; }
@media (max-width: 860px) { .features { grid-template-columns: minmax(0, 1fr); row-gap: 28px; } }

.creator p { max-width: 760px; margin: 16px 0 0; font-size: 17px; color: var(--ink-2); }

/* ── Sections ─────────────────────────────────────────────────────── */

.section { padding: 72px 0; }
.section.tint { background: var(--paper-2); }
.section h2 { margin: 0; font-size: 24px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 640; }
.section .intro { max-width: 680px; margin: 12px 0 0; font-size: 17px; color: var(--ink-2); }
@media (max-width: 640px) { .section { padding: 56px 0; } }

/* Examples: a list of titles on the left, the code on the right */
.examples { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; margin-top: 36px; align-items: start; }
.example-index { display: flex; flex-direction: column; position: sticky; top: calc(var(--header-h) + 24px); }
.example-index button { display: block; width: 100%; padding: 8px 12px; margin-left: -12px; border: 0; border-left: 2px solid transparent; background: none; text-align: left; cursor: pointer; font: 16px/1.4 var(--sans); color: var(--ink-2); }
.example-index button:hover { color: var(--ink); }
.example-index button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-left-color: var(--signal); }
.example-summary { margin: 0 0 14px; color: var(--ink-2); }
@media (max-width: 860px) {
  .examples { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .example-index { position: static; flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .example-index button { white-space: nowrap; width: auto; margin: 0; border-left: 0; border-bottom: 2px solid transparent; }
  .example-index button[aria-selected="true"] { border-bottom-color: var(--signal); }
}

/* Text beside code */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.split .text p { margin: 14px 0 0; font-size: 17px; color: var(--ink-2); }
.split .media .code { margin: 0; }
.plain-list { list-style: none; margin: 20px 0 0; padding: 0; }
.plain-list li { padding: 10px 0; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 16px; }
.plain-list li:last-child { border-bottom: 1px solid var(--rule); }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

.monogram { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); background: var(--band); color: var(--band-ink); display: flex; align-items: flex-end; padding: 28px; overflow: hidden; }
.monogram span { font-size: clamp(90px, 11vw, 168px); line-height: .8; letter-spacing: -0.06em; font-weight: 600; }
.monogram::after { content: ""; position: absolute; top: 28px; right: 28px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); }

/* ── Code cards ───────────────────────────────────────────────────── */

.code { margin: 24px 0; border-radius: var(--radius); background: var(--code-bg); color: var(--code-ink); overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 38px; padding: 0 6px 0 16px; background: var(--code-bar); }
.code-lang { font: 12px/1 var(--mono); color: var(--code-muted); }
.code-actions { display: inline-flex; gap: 2px; }
.code-bar button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 3px; background: none; color: var(--code-muted); cursor: pointer; font: 12.5px var(--mono); }
.code-bar button:hover { color: var(--code-ink); background: rgba(255, 255, 255, 0.06); }
.code-bar .btn-run { color: var(--on-accent); background: var(--accent); }
.code-bar .btn-run:hover { background: #7cc0d2; color: var(--on-accent); }
.code-bar .btn-run svg { width: 9px; height: 9px; fill: currentColor; }
.code pre { margin: 0; padding: 18px 20px 20px; overflow-x: auto; font-size: 14px; line-height: 1.7; tab-size: 4; }
.code pre code { font-size: inherit; color: inherit; background: none; padding: 0; white-space: pre; }
.code-plain { background: var(--paper-2); color: var(--ink-2); }
.code-plain pre { font-size: 13.5px; }
.code-output { background: var(--code-out); border-top: 1px solid var(--code-rule); }
.code-output-bar { display: flex; justify-content: space-between; padding: 10px 20px 0; font: 12px var(--mono); color: var(--code-muted); }
.code-output pre { padding: 8px 20px 18px; color: var(--code-ink); white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow-y: auto; }
.code-output .err, .pg-output .err { color: #f19a8e; }
.code-output .note, .pg-output .note { color: var(--code-muted); }

.tk-kw { color: var(--tk-kw); }
.tk-str { color: var(--tk-str); }
.tk-num { color: var(--tk-num); }
.tk-com { color: var(--tk-com); font-style: italic; }
.tk-fn { color: var(--tk-fn); font-weight: 500; }
.tk-type { color: var(--tk-type); }
.tk-const { color: var(--tk-const); }
.tk-dir { color: var(--tk-dir); }

/* ── Page heads ───────────────────────────────────────────────────── */

.page-head { padding: 56px 0 40px; }
.page-head h1 { max-width: 980px; margin: 0; font-size: 36px; line-height: 1.15; letter-spacing: -0.025em; font-weight: 650; }
.page-head .intro { max-width: 680px; margin: 14px 0 0; font-size: 18px; color: var(--ink-2); }

/* ── Prose (docs, about) ──────────────────────────────────────────── */

.prose { font-size: 17px; line-height: 1.72; color: var(--ink-2); min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h1 { margin: 0 0 18px; font-size: 34px; line-height: 1.15; letter-spacing: -0.025em; color: var(--ink); font-weight: 650; }
.prose h1 + p { font-size: 18px; line-height: 1.65; }
.prose h2 { position: relative; margin: 52px 0 14px; font-size: 24px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); font-weight: 640; }
.prose h3 { position: relative; margin: 36px 0 10px; font-size: 19px; letter-spacing: -0.015em; color: var(--ink); font-weight: 600; }
.prose h4 { margin: 28px 0 8px; font-size: 17px; color: var(--ink); font-weight: 600; }
.prose .anchor { position: absolute; left: -24px; opacity: 0; color: var(--muted); font-weight: 400; text-decoration: none; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose :not(pre) > code { font-size: .86em; padding: .12em .38em; border-radius: 3px; background: var(--paper-2); color: var(--ink); white-space: break-spaces; }
.prose a code { color: inherit; }
.prose blockquote { margin: 26px 0; padding: 16px 22px; border-left: 3px solid var(--signal); background: var(--paper-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 44px 0; }
.table-wrap { margin: 24px 0; overflow-x: auto; }
.prose table, .bench-table, .downloads { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td, .bench-table th, .bench-table td, .downloads th, .downloads td { padding: 11px 16px 11px 0; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose thead th, .bench-table thead th, .downloads thead th { color: var(--ink); font-weight: 600; font-size: 14px; border-bottom: 1.5px solid var(--ink); }
.prose td code { white-space: nowrap; }

/* ── Docs layout ──────────────────────────────────────────────────── */

.docs-layout { max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 260px minmax(0, 1fr) 240px; gap: 64px; }
.docs-sidebar { position: sticky; top: var(--header-h); align-self: start; max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 32px 4px 48px 0; scrollbar-width: thin; }
.nav-group { margin-bottom: 22px; }
.nav-group summary { list-style: none; cursor: pointer; padding: 4px 0; font: 600 14px var(--sans); color: var(--ink); display: flex; justify-content: space-between; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "+"; }
.nav-group[open] summary::after { content: "–"; }
.nav-group ul { list-style: none; margin: 6px 0 0; padding: 0; }
.nav-group a { display: block; padding: 4px 0 4px 12px; margin-left: -12px; border-left: 2px solid transparent; color: var(--ink-2); font-size: 15px; text-decoration: none; }
.nav-group a:hover { color: var(--ink); }
.nav-group a[aria-current="page"] { color: var(--ink); font-weight: 600; border-left-color: var(--signal); }
/* The article keeps a readable measure and sits centred between the sidebars. */
.docs-content { padding: 40px 0 96px; min-width: 0; width: 100%; max-width: 920px; justify-self: center; }
.breadcrumbs { display: flex; gap: 8px; margin-bottom: 22px; font: 13px var(--mono); color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 64px; font-size: 15px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule); }
.pager a { display: block; color: var(--ink); font-size: 19px; font-weight: 600; letter-spacing: -0.015em; text-decoration: none; }
.pager a:hover { color: var(--signal); }
.pager a span { display: block; margin-bottom: 4px; font: 13px var(--mono); color: var(--muted); font-weight: 400; letter-spacing: 0; }
.pager .pager-next { text-align: right; grid-column: 2; }
.docs-toc { position: sticky; top: var(--header-h); align-self: start; max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 44px 0 48px; font-size: 14px; scrollbar-width: thin; }
.toc-title { margin: 0 0 12px; font: 500 12.5px var(--mono); color: var(--muted); }
.docs-toc ol { list-style: none; margin: 0; padding: 0; }
.docs-toc a { display: block; padding: 4px 0; color: var(--muted); line-height: 1.4; text-decoration: none; }
.docs-toc a:hover, .docs-toc a.active { color: var(--ink); }
.docs-toc a.active { font-weight: 550; }
.docs-toc .toc-h3 a { padding-left: 14px; font-size: 13.5px; }
.docs-nav-toggle { display: none; }
@media (max-width: 1220px) { .docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; } .docs-toc { display: none; } }
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-nav-toggle { display: flex; justify-content: space-between; align-items: center; position: sticky; top: var(--header-h); z-index: 20; height: 46px; margin: 0 -16px; padding: 0 16px; border: 0; background: var(--paper-2); color: var(--ink); font: 14px var(--mono); cursor: pointer; }
  .docs-sidebar { display: none; position: fixed; inset: calc(var(--header-h) + 46px) 0 0 0; z-index: 19; max-height: none; padding: 20px 16px; background: var(--paper); }
  body.docs-nav-open .docs-sidebar { display: block; }
  .prose .anchor { display: none; }
  .docs-content { padding-top: 28px; }
  .pager { grid-template-columns: 1fr; }
  .pager .pager-next { grid-column: 1; text-align: left; }
}

/* ── Docs index ───────────────────────────────────────────────────── */

.index-section { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; padding: 48px 0; border-top: 1px solid var(--rule); }
.index-section h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; font-weight: 600; }
.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); column-gap: 40px; row-gap: 26px; }
.doc-list a { display: block; color: var(--ink); text-decoration: none; }
.doc-list a strong { font-weight: 600; font-size: 17px; }
.doc-list a code { font-size: 16px; font-weight: 500; }
.doc-list a:hover strong, .doc-list a:hover code { color: var(--signal); }
.doc-list a span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.5; }
@media (max-width: 860px) { .index-section { grid-template-columns: 1fr; gap: 20px; } }

/* ── Benchmarks ───────────────────────────────────────────────────── */

.bench-chart { position: relative; margin: 0; }
.bench-chart figcaption { margin-bottom: 18px; }
.chart-title { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.chart-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.segmented { display: inline-flex; gap: 20px; margin-bottom: 20px; }
.segmented button { padding: 4px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 15px var(--sans); cursor: pointer; }
.segmented button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--signal); }
.segmented code { font-size: 13px; margin-left: 4px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 16px; min-height: 30px; outline-offset: 2px; }
.bar-label { font-size: 14.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; text-decoration: none; }
.bar-label:hover { color: var(--ink); text-decoration: underline; }
.bar-track { position: relative; height: 30px; display: flex; align-items: center; background-image: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px calc(100% / var(--ticks, 4))); background-size: calc(100% - 1px) 100%; }
.bar { display: block; height: 20px; width: var(--w); border-radius: 0 3px 3px 0; background: var(--signal); transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.bench-chart[data-mode="jit"] .bar { width: var(--wj); }
.bar-value { margin-left: 8px; font: 500 13px var(--mono); color: var(--ink); white-space: nowrap; }
.bar-row:hover .bar, .bar-row:focus .bar { background: var(--ink); }
.bar-axis { position: relative; height: 22px; margin: 8px 0 0 176px; font: 12px var(--mono); color: var(--muted); }
.bar-axis span { position: absolute; transform: translateX(-50%); }
.bar-axis span:first-child { transform: none; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 230px; padding: 12px 14px; border-radius: var(--radius); background: var(--ink); color: var(--paper); font-size: 13.5px; line-height: 1.65; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); }
.chart-tip strong { display: block; margin-bottom: 4px; }
.chart-tip div { display: flex; justify-content: space-between; gap: 18px; }
.chart-tip div span { opacity: .7; }
.chart-tip div b { font: 500 13px var(--mono); }
@media (max-width: 640px) { .bar-row { grid-template-columns: 1fr; gap: 0; } .bar-label { text-align: left; } .bar-axis { margin-left: 0; } }
.bench-table caption { caption-side: bottom; padding: 14px 0; text-align: left; color: var(--muted); font-size: 14px; }
.bench-table td { font: 14px var(--mono); text-align: right; white-space: nowrap; }
.bench-table thead th:not(:first-child) { text-align: right; }
.bench-table th code { white-space: nowrap; }
.bench-table th small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; }
.bench-table tbody th { font-weight: 600; color: var(--ink); min-width: 220px; }
.bench-table td.hi { color: var(--ink); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 48px 0 0; }
.facts dt { font: 12.5px var(--mono); color: var(--muted); }
.facts dd { margin: 6px 0 0; font-weight: 550; color: var(--ink); }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }

/* ── About ────────────────────────────────────────────────────────── */

.about-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-bottom: 96px; }
.about-grid .prose { grid-column: 1 / span 7; max-width: 860px; }
.about-aside { grid-column: 9 / span 4; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.about-aside .monogram { margin-bottom: 0; }
.about-aside img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--paper-3); }
.about-aside h2 { margin: 16px 0 2px; font-size: 22px; letter-spacing: -0.02em; font-weight: 600; }
.about-aside p { margin: 0 0 14px; color: var(--muted); font: 13.5px var(--mono); }
.pipeline { display: flex; flex-wrap: wrap; margin: 28px 0; font: 14px var(--mono); }
.pipeline span { padding: 10px 14px; background: var(--paper-2); color: var(--ink); margin: 0 2px 2px 0; }
.pipeline span:last-child { background: var(--band); color: var(--band-ink); }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 0 20px; }
@media (max-width: 960px) { .about-grid .prose, .about-aside { grid-column: 1 / -1; } .about-aside { position: static; order: -1; max-width: 320px; margin-bottom: 40px; } }

/* ── Playground ───────────────────────────────────────────────────── */

.page-playground { height: 100dvh; display: flex; flex-direction: column; }
.page-playground main { flex: 1; min-height: 0; }
.page-playground .site-footer { display: none; }
.pg { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.pg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px var(--gutter); background: var(--paper-2); }
.pg-toolbar h1 { margin: 0 16px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.pg-toolbar select, .pg-toolbar .tbtn { height: 36px; padding: 0 12px; border-radius: var(--radius); border: 0; background: var(--raised); color: var(--ink); font: 14px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.pg-toolbar .tbtn:hover, .pg-toolbar select:hover { background: var(--paper-3); }
.pg-toolbar .tbtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pg-toolbar .run { background: var(--signal); color: var(--on-signal); font-weight: 600; padding: 0 18px; }
.pg-toolbar .run:hover { background: var(--ink); color: var(--paper); }
.pg-toolbar .run svg { fill: currentColor; stroke: none; width: 11px; height: 11px; }
.pg-toolbar .run.stop { background: #b5473a; color: #fff; }
.pg-toolbar .spacer { flex: 1; }
.pg-status { font: 13px var(--mono); color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.pg-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pg-status[data-state="ready"]::before { background: #4f9a5a; }
.pg-status[data-state="running"]::before { background: var(--signal); animation: pulse 1s infinite; }
.pg-status[data-state="error"]::before { background: #d64545; }
@keyframes pulse { 50% { opacity: .3; } }
.pg-panes { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 0; background: var(--code-bg); }
.pg-editor { --editor-size: 15px; --editor-line: 24px; position: relative; min-height: 0; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--code-rule); }
.pg-editor-surface { display: flex; flex: 1; min-height: 0; position: relative; }
.pg-editor-surface:focus-within { box-shadow: inset 0 2px var(--accent); }
.pg-editor-status { display: flex; flex-shrink: 0; gap: 20px; padding: 6px 16px; border-top: 1px solid var(--code-rule); background: var(--code-bar); color: var(--code-muted); font: 12px/1.5 var(--mono); }
.pg-editor-status span:first-child { margin-right: auto; color: var(--code-ink); }
.pg-gutter { flex-shrink: 0; padding: 20px 10px 20px 20px; text-align: right; overflow: hidden; user-select: none; font: var(--editor-size)/var(--editor-line) var(--mono); color: var(--code-muted); min-width: 56px; white-space: pre; }
.pg-gutter span { display: block; }
.pg-gutter .cur { color: var(--code-ink); }
.pg-gutter .err-line { color: #f19a8e; }
.pg-active { position: absolute; left: 0; min-width: 100%; background: rgba(255, 255, 255, 0.045); pointer-events: none; }
.pg-code { position: relative; flex: 1; min-width: 0; overflow: hidden; color-scheme: dark; }
/* The textarea owns scrolling and caret placement. Both layers must have
   identical text metrics, including highlighted tokens and browser defaults. */
.pg-code pre, .pg-code textarea { margin: 0; padding: 20px 20px 20px 8px; border: 0; font: 400 var(--editor-size)/var(--editor-line) var(--mono); tab-size: 4; white-space: pre; letter-spacing: 0; word-spacing: 0; text-align: left; text-indent: 0; text-transform: none; font-kerning: none; overflow-wrap: normal; word-break: normal; }
.pg-highlight { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pg-code pre { width: max-content; min-width: 100%; color: var(--code-ink); }
.pg-code pre code { display: block; font: inherit; }
.pg-code pre span { font: inherit; }
.pg-code textarea { position: absolute; inset: 0; display: block; width: 100%; height: 100%; resize: none; outline: none; border-radius: 0; background: transparent; color: transparent; caret-color: var(--code-ink); overflow: auto; }
.pg-code textarea::selection { background: rgba(79, 163, 184, 0.32); color: transparent; }
@media (forced-colors: active) {
  .pg-highlight, .pg-active { display: none; }
  .pg-code textarea { color: CanvasText; caret-color: CanvasText; }
  .pg-code textarea::selection { color: HighlightText; background: Highlight; }
}
.pg-output { display: flex; flex-direction: column; min-height: 0; background: var(--code-out); }
.pg-output-bar { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 20px; font: 12.5px var(--mono); color: var(--code-muted); }
.pg-output-bar button { border: 0; background: none; color: var(--code-muted); font: 12.5px var(--mono); cursor: pointer; }
.pg-output-bar button:hover { color: var(--code-ink); }
.pg-output pre { flex: 1; margin: 0; padding: 4px 20px 20px; overflow: auto; font: 14px/1.65 var(--mono); color: var(--code-ink); white-space: pre-wrap; word-break: break-word; }
.pg-output .placeholder { color: #56636f; }
.pg-help { margin: 0; padding: 14px 20px; font-size: 13px; line-height: 1.55; color: var(--code-muted); }
.pg-help a { color: #8fd0e0; }
.pg-help kbd { font-size: 12px; color: var(--code-ink); }
@media (max-width: 860px) {
  .page-playground { height: auto; min-height: 100dvh; }
  .pg-panes { grid-template-columns: minmax(0, 1fr); }
  .pg-editor { --editor-size: 16px; height: 56vh; }
  .pg-output { min-height: 34vh; }
  .pg-toolbar { padding: 10px 16px; }
  .pg-toolbar h1 { width: 100%; }
}

/* ── Search ───────────────────────────────────────────────────────── */

.search-dialog { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(10, 15, 20, 0.5); }
.search-panel { width: 100%; max-width: 640px; border-radius: var(--radius); background: var(--raised); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); overflow: hidden; }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 18px; background: var(--paper-2); }
.search-field svg { width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex-shrink: 0; }
.search-field input { flex: 1; height: 58px; border: 0; outline: 0; background: none; color: var(--ink); font: 18px var(--sans); min-width: 0; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: 60vh; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results a { display: block; padding: 10px 12px; border-radius: 3px; color: var(--ink); text-decoration: none; }
.search-results a small { display: block; font: 12px var(--mono); color: var(--muted); }
.search-results a span { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results li[aria-selected="true"] a, .search-results a:hover { background: var(--paper-2); }
.search-results mark { background: none; color: var(--signal); font-weight: 650; }
.search-empty { padding: 18px 12px; color: var(--muted); }

/* ── Footer ───────────────────────────────────────────────────────── */

.site-footer { background: var(--band); color: var(--band-ink); }
.footer-inner { max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 56px var(--gutter) 28px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.footer-brand { grid-column: 1 / span 4; }
.footer-brand p { margin: 16px 0 0; color: var(--band-muted); font-size: 15px; }
.footer-brand p a { color: var(--band-ink); }
.footer-cols { grid-column: 6 / span 7; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer-cols h2 { margin: 0 0 10px; font: 600 15px var(--sans); color: var(--band-ink); }
.footer-cols a { display: block; padding: 3px 0; color: var(--band-muted); font-size: 15px; text-decoration: none; }
.footer-cols a:hover { color: var(--band-ink); text-decoration: underline; }
.footer-legal { max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 18px var(--gutter) 36px; color: var(--band-muted); font-size: 14px; }
@media (max-width: 820px) { .footer-inner { padding-top: 48px; padding-bottom: 24px; } .footer-brand, .footer-cols { grid-column: 1 / -1; } .footer-cols { margin-top: 36px; grid-template-columns: 1fr 1fr; } }

/* ── 404 ──────────────────────────────────────────────────────────── */

.notfound { padding: 80px 0 120px; }
.notfound .code404 { font: 500 15px var(--mono); color: var(--muted); }
.notfound h1 { margin: 8px 0 0; font-size: 36px; letter-spacing: -0.025em; font-weight: 650; }
.notfound p { max-width: 560px; color: var(--ink-2); font-size: 18px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .docs-sidebar, .docs-toc, .pager, .code-actions, .docs-nav-toggle { display: none !important; } .docs-layout { display: block; } }

/* ── Download ─────────────────────────────────────────────────────── */

.install-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-bottom: 48px; }
.install-main { grid-column: 1 / span 7; }
.install-main h2, .ways h3 { margin: 0; font-size: 22px; letter-spacing: -0.02em; font-weight: 600; }
.install-main > p { max-width: 760px; margin: 14px 0 0; font-size: 18px; color: var(--ink-2); }
.install-main .code pre { font-size: 15px; }
.fine { color: var(--muted); font-size: 15px; }
.muted { color: var(--muted); }
.options { margin-top: 18px; }
.options summary { cursor: pointer; color: var(--ink-2); font-size: 15.5px; }
.options summary:hover { color: var(--ink); }
.detected { grid-column: 9 / span 4; align-self: start; margin-top: 52px; padding: 28px; border-radius: var(--radius); background: var(--band); color: var(--band-ink); }
.detected-label { margin: 0; font: 12.5px var(--mono); color: var(--band-muted); }
.detected-name { margin: 8px 0 22px; font-size: 26px; line-height: 1.15; letter-spacing: -0.025em; font-weight: 600; }
.detected .btn { width: 100%; justify-content: center; height: auto; min-height: 48px; padding: 12px 16px; line-height: 1.3; text-align: center; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.detected .btn:hover { background: var(--band-ink); border-color: var(--band-ink); color: var(--band); }
.detected .btn svg { flex-shrink: 0; }
.detected-note { margin: 16px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--band-muted); }
.downloads td, .downloads th { vertical-align: middle; }
.downloads tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.downloads td.num, .downloads th.num { text-align: right; font-family: var(--mono); font-size: 14px; }
.downloads td a { font-family: var(--mono); font-size: 14px; }
.downloads .sha { font-size: 13px; color: var(--ink-2); }
.downloads tr.is-yours th::after { content: "your system"; margin-left: 10px; padding: 2px 7px; border-radius: 3px; background: var(--signal); color: var(--on-signal); font: 11.5px var(--sans); vertical-align: 2px; }
.btn-copy.mini { margin-left: 8px; padding: 2px 8px; border: 0; border-radius: 3px; background: var(--paper-2); color: var(--ink-2); font: 12px var(--mono); cursor: pointer; }
.btn-copy.mini:hover { background: var(--paper-3); color: var(--ink); }
.ways { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 48px; align-items: start; }
.ways p { color: var(--ink-2); margin: 12px 0 0; }
.ways .code { margin-top: 18px; }
.ways .code pre { white-space: pre-wrap; word-break: break-all; }
.ways .code pre code { white-space: inherit; }
@media (max-width: 960px) {
  .install-main, .detected { grid-column: 1 / -1; }
  .detected { margin-top: 36px; }
  .ways { grid-template-columns: 1fr; gap: 40px; }
}
