:root {
  color-scheme: light dark;
  --bg: #f7f4ed;
  --panel: #fffdf7;
  --text: #22211f;
  --muted: #6d685f;
  --line: #d8d1c4;
  --accent: #075e54;
  --code: #eee9df;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171816;
    --panel: #20221f;
    --text: #f1eee6;
    --muted: #b9b3a8;
    --line: #42453e;
    --accent: #7ed6c1;
    --code: #292c27;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, sans-serif;
}
a { color: var(--accent); }
.site-header {
  border-bottom: 1px solid var(--line);
  padding: .9rem max(1.2rem, calc((100vw - 72rem) / 2));
}
main { max-width: 72rem; margin: 0 auto; padding: 3rem 1.2rem 5rem; }
h1 { font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.05; margin: .2rem 0 1.5rem; }
h2 { line-height: 1.2; }
.eyebrow, .kind { color: var(--muted); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; list-style: none; padding: 0; }
.module-card, .symbol { background: var(--panel); border: 1px solid var(--line); border-radius: .55rem; padding: 1.1rem 1.25rem; }
.module-card > a { font-weight: 700; }
.module-card p { color: var(--muted); }
.symbol-count { color: var(--muted); float: right; font-size: .85rem; }
.symbols { display: grid; gap: 1rem; margin-top: 2rem; }
.symbol h2 { margin: .1rem 0 .7rem; }
pre { background: var(--code); border-radius: .35rem; overflow-x: auto; padding: .85rem; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.doc { white-space: normal; }
.empty { color: var(--muted); font-style: italic; }
.search-label { display: block; font-weight: 650; margin-bottom: .35rem; }
#symbol-search { border: 1px solid var(--line); border-radius: .4rem; font: inherit; padding: .7rem .8rem; width: min(100%, 38rem); }
.search-results { background: var(--panel); border: 1px solid var(--line); border-radius: .4rem; list-style: none; margin: .4rem 0 2rem; max-width: 38rem; padding: .4rem; }
.search-results li { border-bottom: 1px solid var(--line); padding: .45rem; }
.search-results li:last-child { border-bottom: 0; }
.search-results small { color: var(--muted); display: block; }
.modules-heading { margin-top: 2.5rem; }
