/* Gilt: the usesigil.org design (picked 2026-10-23).
   The gold Sigil already owns, with the parenthesis as the frame. Gold
   parentheses go on the wordmark, the current top-nav and sidebar item,
   a release's version and each tag. Nowhere else.

   Colors are tokens on :root. Dark is the default; light follows the
   system unless the reader picks a mode with the toggle (data-mode on
   <html>). Every text pair passes WCAG AA; check-gilt-contrast.mjs in the
   site-refresh working folder checks them. */

/* Fonts (SIL OFL), self-hosted. See assets/fonts/README.md. */
@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage-grotesque-latin-full.woff2) format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/fonts/atkinson-hyperlegible-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/fonts/atkinson-hyperlegible-latin-700-italic.woff2) format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono-latin-wght-italic.woff2) format("woff2"); font-weight: 100 800; font-style: italic; font-display: swap; }

:root {
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --bg: #0F1218; --surface: #151A22; --codeBg: #171C25; --text: #E8E5DC; --muted: #A1A8B4;
  --border: #262D39; --accent: #EDBB45; --accentFill: #EDBB45; --onAccent: #13161C;
  --wp: #EDBB45;
  --tok-plain: #E8E5DC; --tok-special: #EDBB45; --tok-keyword: #8EC3E6; --tok-string: #A9D18E;
  --tok-comment: #8F98A8; --tok-number: #EEA27F; --tok-boolean: #CDA4EC; --tok-paren: #8A93A3; --tok-quote: #EDBB45;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-mode="dark"]) {
    --bg: #F6F7F9; --surface: #ECEEF2; --codeBg: #EEF0F4; --text: #191E27; --muted: #545C6B;
    --border: #D6DAE2; --accent: #865B00; --accentFill: #191E27; --onAccent: #EDBB45;
    --wp: #865B00;
    --tok-plain: #191E27; --tok-special: #835800; --tok-keyword: #1C5A94; --tok-string: #386419;
    --tok-comment: #5E6575; --tok-number: #A3401A; --tok-boolean: #7438AC; --tok-paren: #626979; --tok-quote: #835800;
    color-scheme: light;
  }
}
:root[data-mode="light"] {
  --bg: #F6F7F9; --surface: #ECEEF2; --codeBg: #EEF0F4; --text: #191E27; --muted: #545C6B;
  --border: #D6DAE2; --accent: #865B00; --accentFill: #191E27; --onAccent: #EDBB45;
  --wp: #865B00;
  --tok-plain: #191E27; --tok-special: #835800; --tok-keyword: #1C5A94; --tok-string: #386419;
  --tok-comment: #5E6575; --tok-number: #A3401A; --tok-boolean: #7438AC; --tok-paren: #626979; --tok-quote: #835800;
  color-scheme: light;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 17.5px; line-height: 1.6; overflow-wrap: break-word; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; font-weight: 750; letter-spacing: -0.015em; font-variation-settings: "opsz" 48; }
code, pre, kbd { font-family: var(--font-mono); }
:not(pre) > code { font-size: 0.88em; padding: 0.08em 0.3em; border-radius: 4px; background: var(--surface); color: var(--text); }
pre { background: var(--codeBg); color: var(--tok-plain); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.2rem; overflow-x: auto; font-size: 0.875rem; line-height: 1.6; margin: 1.5rem 0; }
pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.tok-special { color: var(--tok-special); font-weight: 600; }
.tok-keyword { color: var(--tok-keyword); }
.tok-string { color: var(--tok-string); }
.tok-comment { color: var(--tok-comment); font-style: italic; }
.tok-number { color: var(--tok-number); }
.tok-boolean { color: var(--tok-boolean); }
.tok-paren { color: var(--tok-paren); }
.tok-quote { color: var(--tok-quote); }
table { border-collapse: collapse; display: block; overflow-x: auto; margin: 1.5rem 0; }
th, td { border: 1px solid var(--border); padding: 0.4rem 0.7rem; text-align: left; vertical-align: top; }
th { background: var(--surface); }
blockquote { margin: 1.5rem 0; padding: 0.2rem 1rem; border-left: 3px solid var(--border); color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--accentFill); color: var(--onAccent); padding: 0.5rem 0.8rem; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }

/* Header */
.site-header { position: relative; border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .bar { display: flex; align-items: center; gap: 2rem; max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 64px; position: relative; }
.wordmark { text-decoration: none; color: var(--text); display: inline-flex; align-items: center; white-space: nowrap;
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; font-variation-settings: "opsz" 36; }
.wp { color: var(--wp); font-weight: 500; }
/* Parenthesis spacing from glyph ink (gilt-badges-2.html): 0.085em of ink
   after "(" and 0.105em before ")", since the "l" stem reads closer than
   the round "s". Header parens are weight 500 at opsz 36. */
.wordmark .wp:first-child { margin-right: 0.072em; }
.wordmark .wp:last-child { margin-left: 0.071em; }
.top-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.top-nav a { position: relative; color: var(--muted); text-decoration: none; font-weight: 500; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--text); }
.top-nav a[aria-current]::before { content: "("; position: absolute; left: -0.55em; color: var(--accent); }
.top-nav a[aria-current]::after { content: ")"; position: absolute; right: -0.55em; color: var(--accent); }
.mode-toggle, .menu { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; width: 34px; height: 34px; font-size: 15px; cursor: pointer; flex: none; }
.mode-toggle:hover, .menu:hover { color: var(--text); border-color: var(--muted); }
.menu { display: none; position: relative; }
.menu span, .menu span::before, .menu span::after { position: absolute; left: 9px; width: 14px; height: 2px; background: var(--text); content: ""; }
.menu span { top: 15px; } .menu span::before { top: -5px; left: 0; } .menu span::after { top: 5px; left: 0; }

/* Buttons */
.btn { display: inline-block; text-decoration: none; padding: 0.6em 1.1em; border-radius: 8px; border: 1px solid var(--border); color: var(--text); font-weight: 700; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accentFill); border-color: var(--accentFill); color: var(--onAccent); }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* News, posts and releases */
.news, .post { max-width: 760px; margin: 0 auto; padding: 2.5rem 24px 4rem; }
.page-head h1, .post-head h1 { font-size: 2.6rem; margin: 0 0 0.5rem; }
.crumbs { font-size: 0.9rem; display: flex; gap: 0.4rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.filters { display: flex; gap: 1.25rem; margin: 1rem 0 2rem; flex-wrap: wrap; }
.filters a { color: var(--muted); text-decoration: none; }
.filters a:hover { color: var(--text); }
.filters a[aria-current] { color: var(--text); font-weight: 700; }
.entry { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.5rem; padding: 1.25rem 0; border-top: 1px solid var(--border); }
.entry time { color: var(--muted); font-size: 0.92rem; padding-top: 0.3rem; }
.entry h2 { margin: 0 0 0.3rem; font-size: 1.35rem; }
.entry h2 a { color: var(--text); text-decoration: none; }
.entry h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.entry p { margin: 0 0 0.5rem; }
.older, .empty { color: var(--muted); border-top: 1px solid var(--border); padding-top: 1.25rem; }
.tags { display: inline-flex; gap: 0.6rem; flex-wrap: wrap; vertical-align: baseline; }
.tag { font-size: 0.85rem; text-decoration: none; color: var(--muted); }
.tag::before { content: "("; color: var(--accent); }
.tag::after { content: ")"; color: var(--accent); }
.tag:hover { color: var(--text); }
.draft { font-size: 0.75rem; font-family: var(--font-body); font-weight: 700; color: var(--onAccent); background: var(--accentFill); border-radius: 4px; padding: 0.05rem 0.4rem; vertical-align: middle; letter-spacing: 0; }
.draft-banner { margin: 0 0 1.5rem; padding: 0.6rem 1rem; border: 1px dashed var(--accent); border-radius: 6px; font-size: 0.92rem; }
.post-head { margin-bottom: 2rem; }
.post-head .meta { color: var(--muted); display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap; margin: 0.25rem 0 0; }
.post article h2 { font-size: 1.5rem; margin-top: 2.25rem; }
.post article h3 { font-size: 1.2rem; margin-top: 1.75rem; }
.post article li { margin: 0.3rem 0; }
.prevnext { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; border-top: 1px solid var(--border); padding-top: 1.2rem; }
.prevnext a { text-decoration: none; display: flex; flex-direction: column; }
.prevnext .next { text-align: right; margin-left: auto; }
.prevnext small { color: var(--muted); }
.release .version { font-size: 5rem; margin: 0.25rem 0; letter-spacing: -0.04em; font-variation-settings: "opsz" 96; }
.release .version .wp { font-weight: 300; }
.release .summary { font-size: 1.15rem; margin: 1.25rem 0; }
.compat { border-left: 3px solid var(--accent); background: var(--surface); padding: 0.8rem 1rem; border-radius: 0 6px 6px 0; margin: 1.5rem 0; }
.compat p { margin: 0; font-weight: 700; }

/* The releases index */
.series { border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 1.5rem; }
.series h2 { font-size: 1.5rem; margin: 0.75rem 0 0.5rem; }
.release-list { list-style: none; margin: 0; padding: 0; }
.release-list li { display: grid; grid-template-columns: 5.5rem 10.5rem 1fr; gap: 0 1rem; padding: 0.4rem 0; align-items: baseline; scroll-margin-top: 1rem; }
.release-list li:target { background: var(--surface); outline: 1px solid var(--accent); border-radius: 4px; }
.release-list .v { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.release-list time { color: var(--muted); font-size: 0.92rem; }

/* Front page */
.landing { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding: 72px 0 64px; }
.hero-text { min-width: 0; }
.hero-mark { font-family: var(--font-display); font-weight: 800; font-size: 7.5rem; line-height: 0.9; letter-spacing: -0.03em; margin: 0 0 1.5rem; font-variation-settings: "opsz" 96; }
/* Hero parens are weight 300 at opsz 96, so they sit a touch further out. */
.hero-mark .wp { font-weight: 300; }
.hero-mark .wp:first-child { margin-right: 0.080em; }
.hero-mark .wp:last-child { margin-left: 0.081em; }
.hero h1 { font-size: 2.6rem; margin: 0 0 1rem; font-weight: 700; }
.hero .lead { font-size: 1.15rem; max-width: 34em; margin: 0 0 1.75rem; }
.hero .actions { margin: 0; scroll-margin-top: 2rem; }
.release-line { color: var(--muted); font-size: 0.95rem; margin: 1.5rem 0 0; }
.hero-code { margin: 0; min-width: 0; }
.hero-code pre { font-size: 0.95rem; padding: 1.4rem 1.5rem; border-radius: 12px; margin: 0; }
figure.code figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 0.7rem; }
.made, .latest { border-top: 1px solid var(--border); padding: 40px 0; }
.made h2, .latest h2 { font-size: 1.6rem; margin: 0 0 1.5rem; }
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem 2.5rem; }
.projects h3 { margin: 0; font-size: 1.2rem; }
.projects h3 a { color: var(--text); text-decoration: none; }
.projects h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.projects .kind { margin: 0; color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.projects p { margin: 0.2rem 0 0; }
.news-mini { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.news-mini li { display: flex; gap: 0.5rem 1rem; align-items: baseline; padding: 0.5rem 0; flex-wrap: wrap; }
.news-mini time { color: var(--muted); width: 10rem; flex: none; }
.news-mini a:not(.tag) { color: var(--text); font-weight: 700; text-decoration: none; }
.news-mini a:not(.tag):hover { text-decoration: underline; text-decoration-color: var(--accent); }
.news-links { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 0; }

.made .more { margin: 1.75rem 0 0; font-weight: 700; }

/* Built with Sigil: a section per group; the games lead with their
   screenshots, and each project lists the libraries it is built on. */
.built-with { max-width: 1240px; margin: 0 auto; padding: 0 24px 8px; }
.built-with-head { padding: 64px 0 40px; }
.built-with-head h1 { font-size: 3.2rem; margin: 0 0 0.75rem; font-variation-settings: "opsz" 96; letter-spacing: -0.025em; }
.built-with-head .lead { font-size: 1.15rem; max-width: 34em; margin: 0; }
.showcase-group { border-top: 1px solid var(--border); padding: 40px 0 48px; }
.showcase-group h2 { font-size: 1.6rem; margin: 0 0 1.75rem; }
.showcase { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2.75rem; }
.project { scroll-margin-top: 1.5rem; }
.project:target h3 a { text-decoration: underline; text-decoration-color: var(--accent); }
.shot-image { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 1.1rem; }
.project-head { display: flex; gap: 0.8rem; align-items: center; }
.project-head .logo { width: 44px; height: 44px; flex: none; }
.project h3 { margin: 0; font-size: 1.35rem; }
.project h3 a { color: var(--text); text-decoration: none; }
.project h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.project .kind { margin: 0; color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.project .desc { margin: 0.6rem 0 0; }
.uses { margin-top: 1rem; }
.uses > p { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips a { display: inline-block; padding: 0.12rem 0.5rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.5; text-decoration: none; }
.chips a:hover { border-color: var(--accent); }
.chips .ext-mark { margin-left: 0.25em; }
.project-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 1rem 0 0; font-size: 0.95rem; font-weight: 700; }
@media (max-width: 1100px) {
  .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Docs */
.docs-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); max-width: 1240px; margin: 0 auto; }
.side { border-right: 1px solid var(--border); }
.side-toggle { display: none; }
.side-nav { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; padding: 1.5rem 0 2rem; font-size: 0.93rem; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav .sec { margin-bottom: 0.5rem; }
.side-nav summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 0.3rem 20px 0.3rem 24px; font-family: var(--font-display); font-weight: 700; color: var(--text); }
.side-nav summary::-webkit-details-marker { display: none; }
.side-nav summary::after, .side-toggle::after { content: ""; flex: none; width: 0.42em; height: 0.42em; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
.side-nav details[open] > summary::after, .side.open .side-toggle::after { transform: rotate(45deg); }
.side-nav a { --indent: 36px; position: relative; display: block; padding: 0.2rem 20px 0.2rem var(--indent); color: var(--muted); text-decoration: none; }
.side-nav .start a { --indent: 24px; }
.side-nav .start { margin-bottom: 0.75rem; }
.side-nav a:hover, .side-nav a.in { color: var(--text); }
.side-nav a[aria-current] { color: var(--text); font-weight: 700; }
.side-nav a[aria-current]::before { content: "("; position: absolute; left: calc(var(--indent) - 0.5em); color: var(--accent); font-weight: 500; }
.side-nav a[aria-current]::after { content: ")"; margin-left: 0.12em; color: var(--accent); font-weight: 500; }
/* Libraries: a group per kind of library, folded inside the section */
.side-nav .libs li details > summary { padding: 0.25rem 20px 0.25rem 36px; font-family: var(--font-body); font-weight: 700; font-size: 0.88rem; color: var(--muted); }
.side-nav .libs li details[open] > summary, .side-nav .libs li summary:hover { color: var(--text); }
.side-nav .libs li details ul { margin-bottom: 0.35rem; }
.side-nav .libs li details a { --indent: 48px; }
.ext-mark { margin-left: 0.3em; font-size: 0.85em; color: var(--muted); }
.doc { padding: 2rem 48px 4rem; max-width: 820px; }
.doc .crumbs { margin-bottom: 0.25rem; }
.crumbs span { color: var(--muted); }
.doc h1 { font-size: 2.4rem; margin: 0.5rem 0 0.75rem; }
.doc h1 code { font-size: 0.9em; background: none; padding: 0; }
/* A module name with its parentheses in the wordmark's gold; the name keeps the text color */
.doc code.module-name .wp { font-weight: inherit; }
.doc .module-list a code.module-name { color: var(--text); }
.doc h1 + p { font-size: 1.12rem; }
.doc h2 { font-size: 1.55rem; margin: 2.5rem 0 0.75rem; scroll-margin-top: 1rem; }
.doc h3 { font-size: 1.2rem; margin: 2rem 0 0.5rem; scroll-margin-top: 1rem; }
.doc h4 { font-size: 1.05rem; margin: 1.5rem 0 0.4rem; }
.doc li { margin: 0.25rem 0; }
.doc img { margin: 1.5rem 0; border-radius: 6px; }
.toc { border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem 1rem; margin: 1.5rem 0; font-size: 0.92rem; }
.toc-title { margin: 0 0 0.4rem; font-weight: 700; }
.toc ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; }
.toc li { margin: 0; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); }
.doc .prevnext .prev, .doc .prevnext .next { max-width: 48%; }

/* The API reference (markup from Press's docs templates) */
.doc .package-description, .doc .module-description > p:first-child { font-size: 1.12rem; }
.doc .module-list, .doc .quick-reference { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.doc .module-list li { display: grid; grid-template-columns: minmax(13rem, max-content) 1fr; gap: 0.1rem 1.5rem; align-items: baseline; margin: 0; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.doc .module-list a, .doc .quick-reference a { text-decoration: none; }
.doc .module-list a code { background: none; padding: 0; color: var(--accent); font-size: 0.92rem; }
.doc .module-list a:hover code { text-decoration: underline; }
.doc .module-desc { color: var(--muted); }
.doc .quick-reference li { margin: 0.3rem 0; }
.doc .api-package h3 { font-size: 1.15rem; }
.export-card { border-top: 1px solid var(--border); padding: 1.1rem 0 0.4rem; scroll-margin-top: 1rem; }
.export-card:target { border-top-color: var(--accent); box-shadow: inset 0 2px 0 var(--accent); }
.export-header { display: flex; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; flex-wrap: wrap; }
.export-link { text-decoration: none; min-width: 0; }
.export-link:hover .export-name { text-decoration: underline; text-decoration-color: var(--accent); }
.export-name { background: none; padding: 0; font-size: 1.05rem; font-weight: 600; color: var(--accent); overflow-wrap: anywhere; }
/* An export's kind, tinted with the code color it has in a code block.
   These are every kind Press writes: the compiler's procedure, variable
   and syntax, and native from older doc files. Any other kind gets the
   muted fallback. Pairs are in check-gilt-contrast.mjs. */
.kind-badge {
  --kind: var(--muted);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 0.1rem 0.5rem; border-radius: 999px;
  border: 1px solid currentColor; line-height: 1.5; white-space: nowrap;
  color: var(--kind); background: color-mix(in srgb, var(--kind) 12%, transparent);
}
.kind-procedure { --kind: var(--tok-keyword); }
.kind-variable { --kind: var(--tok-boolean); }
.kind-syntax { --kind: var(--tok-number); }
.kind-native { --kind: var(--tok-string); }
.export-description > :first-child { margin-top: 0.5rem; }
.export-description pre { margin: 0.75rem 0; }
.reexport-note { color: var(--muted); font-size: 0.92rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 3rem; }
.foot-inner { max-width: 1240px; margin: 0 auto; padding: 2rem 24px; color: var(--muted); font-size: 0.92rem; }
.foot-cols { display: flex; gap: 4rem; }
.foot-cols div { display: flex; flex-direction: column; gap: 0.25rem; }
.foot-cols h2 { margin: 0 0 0.3rem; color: var(--text); font-size: 0.95rem; letter-spacing: 0; }
.foot-cols a { color: var(--muted); text-decoration: none; }
.foot-cols a:hover { color: var(--text); }
.colophon a { color: var(--muted); }

/* Phone */
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .site-header .bar { height: 56px; gap: 0.75rem; padding: 0 16px; }
  .wordmark { font-size: 1.35rem; }
  /* Without scripts the nav stays visible and wraps under the bar. */
  .site-header .bar { flex-wrap: wrap; height: auto; min-height: 56px; }
  .top-nav { order: 3; width: 100%; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0 0 0.75rem; margin-left: 0; }
  .js .site-header .bar { flex-wrap: nowrap; height: 56px; }
  .js .top-nav { display: none; }
  .js .menu { display: block; margin-left: auto; }
  .js .site-header .bar.open .top-nav { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; z-index: 5; gap: 0; padding: 0.5rem 16px 0.75rem; background: var(--surface); border-bottom: 1px solid var(--border); }
  .js .site-header .bar.open .top-nav a { padding: 0.55rem 0.6rem; }
  .js .site-header .bar.open .top-nav a[aria-current]::before { left: 0; }
  .js .site-header .bar.open .top-nav a[aria-current]::after { right: auto; margin-left: 0.15em; position: static; }
  .news, .post { padding: 1.5rem 16px 3rem; }
  .page-head h1, .post-head h1 { font-size: 2rem; }
  .entry { grid-template-columns: 1fr; gap: 0.2rem; }
  .release .version { font-size: 3.4rem; }
  .release-list li { grid-template-columns: 4.5rem 1fr; }
  .release-list .sum { grid-column: 1 / -1; }
  pre { font-size: 0.8rem; padding: 0.8rem 0.9rem; }
  .landing { padding: 0 16px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 32px; }
  .hero-mark { font-size: 4.5rem; margin-bottom: 1rem; }
  .hero h1 { font-size: 2rem; }
  .hero-code pre { font-size: 0.78rem; padding: 0.9rem; }
  .made, .latest { padding: 32px 0; }
  .projects { grid-template-columns: 1fr; gap: 1.25rem; }
  .built-with { padding: 0 16px; }
  .built-with-head { padding: 36px 0 28px; }
  .built-with-head h1 { font-size: 2.3rem; }
  .showcase-group { padding: 32px 0 36px; }
  .showcase { grid-template-columns: 1fr; gap: 2.25rem; }
  .news-mini time { width: auto; }
  /* The docs sidebar sits above the page. Without scripts it stays open;
     with them it folds behind a button that names the page. */
  .docs-layout { display: block; }
  .side { border-right: 0; border-bottom: 1px solid var(--border); }
  .side-nav { position: static; max-height: none; padding: 0.75rem 0; }
  .side-nav summary { padding-left: 16px; padding-right: 16px; }
  .side-nav a { --indent: 28px; padding-right: 16px; }
  .side-nav .start a { --indent: 16px; }
  .side-nav .libs li details > summary { padding-left: 28px; padding-right: 16px; }
  .side-nav .libs li details a { --indent: 40px; }
  .js .side-nav { display: none; }
  .js .side.open .side-nav { display: block; border-top: 1px solid var(--border); }
  .js .side-toggle { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: calc(100% - 32px); margin: 0.6rem 16px; text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 0.55rem 0.8rem; font: inherit; font-size: 0.95rem; cursor: pointer; }
  .doc { padding: 1.25rem 16px 3rem; }
  .doc h1 { font-size: 2rem; }
  .doc .module-list li { grid-template-columns: 1fr; }
  .foot-cols { gap: 2rem; }
  .foot-inner { padding: 1.5rem 16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
