/* fs-inventory documentation. Adapted from the uv Field Guide's layout: a three-column manual
   with the page's sections on the left, a ~72ch reading column, and the current section's
   subsections on the right. Code blocks stay dark in both themes. One accent: deep teal. */
:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --ink: #12191d;
  --muted: #54646c;
  --line: #dce5e8;
  --accent: #0e6f86;
  --accent-ink: #0b5b6f;
  --accent-soft: #e1f1f5;
  --warn: #9a4a07;
  --warn-soft: #fcf1e0;
  --tip: #17703f;
  --tip-soft: #e3f3e8;
  --code-bg: #10171b;
  --code-line: #243139;
  --code-fg: #e3ecef;
  --code-dim: #8aa0a9;
  --code-k: #7fd4ea;
  --code-s: #a8e3b4;
  --code-n: #ffc98a;
  --code-c: #748891;
  --code-prompt: #8ff0a4;
  --code-attr: #c6e6f0;
  --code-fn: #9fd0ff;
  --inline-code-bg: #e8eff1;
  --shadow: 0 1px 2px rgba(18, 25, 29, 0.06), 0 8px 24px rgba(18, 25, 29, 0.06);

  --f-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --topbar-h: 60px;
  --measure: 72ch;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1215;
    --surface: #12191d;
    --ink: #e6eef1;
    --muted: #98a9b1;
    --line: #22303a;
    --accent: #5bc8e0;
    --accent-ink: #8adcef;
    --accent-soft: #11272e;
    --warn: #f2b765;
    --warn-soft: #2a2013;
    --tip: #6fd49a;
    --tip-soft: #10261a;
    --code-bg: #080d10;
    --code-line: #1d2930;
    --inline-code-bg: #1b262c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1215;
  --surface: #12191d;
  --ink: #e6eef1;
  --muted: #98a9b1;
  --line: #22303a;
  --accent: #5bc8e0;
  --accent-ink: #8adcef;
  --accent-soft: #11272e;
  --warn: #f2b765;
  --warn-soft: #2a2013;
  --tip: #6fd49a;
  --tip-soft: #10261a;
  --code-bg: #080d10;
  --code-line: #1d2930;
  --inline-code-bg: #1b262c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
/* Smooth scrolling for links within a page, enabled once a deep link has landed. */
@media (prefers-reduced-motion: no-preference) { html.smooth { scroll-behavior: smooth; } }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  max-width: 1480px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand-mark {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--surface);
  background: var(--accent);
  border-radius: 7px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}
.brand-text { font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.tabs { display: flex; align-items: center; gap: 2px; margin-left: 8px; flex: none; }
.tabs a, .side-tabs a {
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}
.tabs a:hover, .side-tabs a:hover { color: var(--ink); background: var(--accent-soft); }
.tabs a[aria-current="page"], .side-tabs a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
.side-tabs { display: none; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.side-tabs a { display: block; }
.search-trigger {
  flex: 1 1 auto;
  max-width: 340px;
  margin-left: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 38px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
.search-trigger:hover { border-color: var(--accent); color: var(--ink); }
.search-trigger-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbd {
  font-family: var(--f-mono);
  font-size: 11.5px;
  line-height: 1;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--muted);
  background: var(--bg);
}
.kbd-btn { cursor: pointer; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); }
a.icon-btn { text-decoration: none; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
.nav-toggle { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.2;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}
.chip-version { font-family: var(--f-mono); font-size: 12px; color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); text-decoration: none; }
.progress { height: 2px; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- three-column layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 220px;
  gap: 40px;
  max-width: 1480px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.sidebar, .onpage {
  position: sticky;
  top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  align-self: start;
  max-height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.sidebar-inner { padding-block: 24px 48px; display: grid; gap: 22px; }
.nav-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-label {
  margin: 0 0 8px;
  font-family: var(--f-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-sec > a {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.35;
}
.nav-sec > a code { font-size: 0.86em; }
.nav-sec-plain > a { grid-template-columns: minmax(0, 1fr); }
.nav-sec-plain > .nav-sub { margin-left: 12px !important; }
.nav-num { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-sec > a:hover { background: var(--accent-soft); }
.nav-sec > a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav-sec > a.active .nav-num { color: var(--accent-ink); }
.nav-sub { display: none !important; margin: 2px 0 6px 34px !important; border-left: 1px solid var(--line); }
.nav-sec.open > .nav-sub { display: grid !important; }
.nav-sub a {
  display: block;
  padding: 3px 10px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
  margin-left: -1px;
  border-left: 2px solid transparent;
}
.nav-sub a:hover { color: var(--ink); }
.nav-sub a.active { color: var(--accent-ink); border-left-color: var(--accent); }
.nav-extra a { display: block; padding: 4px 8px; font-size: 14px; color: var(--muted); text-decoration: none; border-radius: 6px; }
.nav-extra a:hover { color: var(--ink); background: var(--accent-soft); }

.onpage-inner { padding-block: 28px 40px; }
.onpage ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); display: grid; }
.onpage a {
  display: block;
  padding: 4px 0 4px 12px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
}
.onpage a:hover { color: var(--ink); }
.onpage a.active { color: var(--accent-ink); border-left-color: var(--accent); }

.main { min-width: 0; padding-block: 36px 64px; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--f-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.hero h1 {
  margin: 0 0 14px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lede { margin: 0 0 18px; font-size: 1.08rem; color: var(--muted); max-width: 64ch; }
.lede strong { color: var(--ink); }
.hero-agent { margin: 0 0 16px; font-size: 0.95rem; color: var(--muted); max-width: 56ch; }
.hero-agent code { font-family: var(--f-mono); font-size: 0.86em; padding: 0.1em 0.35em; border-radius: 5px; background: var(--inline-code-bg); color: var(--ink); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-meta .chip { white-space: normal; }

.terminal {
  margin: 0;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--code-line); }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--code-line); }
.terminal-bar em { margin-left: auto; font-style: normal; font-family: var(--f-mono); font-size: 11.5px; color: var(--code-dim); }
.terminal-body {
  margin: 0;
  font-variant-ligatures: none;
  padding: 16px 18px 18px;
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.42;
  color: var(--code-fg);
  overflow-x: auto;
}
.t-p { color: var(--code-prompt); font-weight: 600; }
.t-c { color: var(--code-c); }
.t-o { color: var(--code-dim); }

/* ---------- page header ---------- */
.page-header { padding-bottom: 22px; border-bottom: 1px solid var(--line); max-width: var(--measure); }
.page-header h1 {
  margin: 0 0 10px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.page-header .lede { margin-bottom: 0; }

/* ---------- task paths ---------- */
.paths { padding-block: 28px 8px; }
.paths-title {
  margin: 0 0 14px;
  font-family: var(--f-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.paths-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.path {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 14px 14px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
  transition: border-color 0.15s, transform 0.15s;
}
.path:hover { border-color: var(--accent); transform: translateY(-1px); }
.path-k { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.path code {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--accent-ink);
  background: none;
  padding: 0;
}
@media (prefers-reduced-motion: reduce) { .path { transition: none; } .path:hover { transform: none; } }

/* ---------- document typography ---------- */
.doc { max-width: var(--measure); }
.doc-wide { max-width: none; }
.doc img { max-width: 100%; }
.diagram {
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}
.diagram pre.mermaid { margin: 0; text-align: center; background: none; font-family: var(--f-body); }
.diagram pre.mermaid:not([data-processed]) { color: transparent; min-height: 120px; }
.doc-section { padding-top: 26px; }
.doc h2 {
  position: relative;
  margin: 34px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.8vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.doc-section:first-child h2 { border-top: 0; margin-top: 8px; }
.doc h3 {
  position: relative;
  margin: 34px 0 10px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.doc h2 code, .doc h3 code { font-size: 0.86em; }
.anchor {
  margin-left: 8px;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 0.7em;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.doc h2:hover .anchor, .doc h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
.doc p, .doc li { overflow-wrap: break-word; }
.doc p { margin: 0 0 16px; }
.doc ul, .doc ol { margin: 0 0 18px; padding-left: 1.3em; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--muted); }
.doc strong { font-weight: 700; }
.doc :not(pre) > code {
  font-variant-ligatures: none;
  font-family: var(--f-mono);
  font-size: 0.86em;
  padding: 0.12em 0.36em;
  border-radius: 5px;
  background: var(--inline-code-bg);
  color: var(--ink);
}
/* Pieces of inline code that never wrap inside (see code_html in build.py). */
.nobr { white-space: nowrap; }
.badge {
  display: inline-block;
  vertical-align: 0.12em;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
}
.badge-preview { color: var(--warn); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }

/* code blocks */
.code {
  margin: 0 0 20px;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid var(--code-line);
}
.code-lang { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--code-dim); }
.copy {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--code-fg);
  background: transparent;
  border: 1px solid var(--code-line);
  border-radius: 6px;
  padding: 3px 9px;
  cursor: pointer;
}
.copy:hover { border-color: var(--code-k); }
.copy.done { color: var(--code-prompt); border-color: var(--code-prompt); }
.code pre {
  margin: 0;
  padding: 14px 16px 16px;
  overflow-x: auto;
  font-family: var(--f-mono);
  font-size: 13.4px;
  line-height: 1.6;
  color: var(--code-fg);
  tab-size: 4;
  font-variant-ligatures: none;
}
.code pre code { font: inherit; background: none; padding: 0; color: inherit; }
/* Command output, such as DuckDB's tables: tight lines so box-drawing characters join. */
.code[data-lang="text"] pre { line-height: 1.28; color: var(--code-fg); }
.c-prompt { color: var(--code-prompt); font-weight: 600; user-select: none; }
.c-cmd { color: var(--code-fg); font-weight: 600; }
.c-out { color: var(--code-dim); }
.hljs-keyword, .hljs-built_in, .hljs-section, .hljs-selector-tag { color: var(--code-k); }
.hljs-string, .hljs-attr + .hljs-string, .hljs-regexp { color: var(--code-s); }
.hljs-number, .hljs-literal, .hljs-variable, .hljs-template-variable { color: var(--code-n); }
.hljs-comment, .hljs-meta { color: var(--code-c); font-style: italic; }
.hljs-attr, .hljs-attribute, .hljs-title, .hljs-name, .hljs-params { color: var(--code-attr); }
.hljs-title.function_ { color: var(--code-fn); }

/* tables */
.table-wrap {
  margin: 0 0 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.doc table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.45; }
.doc th, .doc td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc th {
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface));
  white-space: nowrap;
}
.doc tr:last-child td { border-bottom: 0; }
.doc td code { font-size: 0.84em; }
.doc td:first-child { min-width: 9.5em; }

/* callouts */
.callout {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.callout > :last-child, .callout li:last-child { margin-bottom: 0; }
.callout p { margin: 0 0 8px; }
.callout ul { margin: 6px 0 0; }
.callout-tip { background: var(--tip-soft); border-color: color-mix(in srgb, var(--tip) 35%, transparent); }
.callout-tip strong:first-child { color: var(--tip); }
.callout-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.callout-warn strong:first-child { color: var(--warn); }
.callout-note { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

.footer {
  max-width: var(--measure);
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer p { margin: 0; }

/* ---------- search ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--ink) 38%, transparent);
  display: grid;
  justify-items: center;
  align-items: start;
  padding-top: calc(10vh + env(safe-area-inset-top, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.search-dialog {
  width: min(680px, 100%);
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
.search-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.search-results li a {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
}
.search-results li a[aria-selected="true"], .search-results li a:hover { background: var(--accent-soft); }
.sr-title { font-weight: 600; font-size: 15px; }
.sr-title code { font-size: 0.88em; }
.sr-sec { font-size: 12px; color: var(--muted); font-family: var(--f-display); letter-spacing: 0.04em; text-transform: uppercase; }
.sr-snip { font-size: 13.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-snip mark, .sr-title mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty { padding: 18px 14px; color: var(--muted); font-size: 14.5px; }
.search-hint { margin: 0; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

.toast {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 9px;
  box-shadow: var(--shadow);
}

.scrim { position: fixed; inset: 0; z-index: 45; background: color-mix(in srgb, var(--ink) 35%, transparent); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .tabs { display: none; }
  .side-tabs { display: grid; }
  .layout { grid-template-columns: 260px minmax(0, 1fr); gap: 36px; }
  .onpage { display: none; }
  .paths-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .chip-version { display: none; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: grid; }
  .sidebar {
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, 86vw);
    max-height: none;
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: 16px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }
  .sidebar.open { transform: none; }
  .search-trigger { margin-left: 4px; }
  .main { padding-block: 24px 48px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-text { display: none; }
  .search-trigger-text { font-size: 13px; }
  #searchKbd { display: none; }
  .paths-grid { grid-template-columns: minmax(0, 1fr); }
  .code pre { font-size: 12.5px; }
  .terminal-body { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } .anchor { transition: none; } }
