:root {
  color-scheme: light dark;
  --bg: #fbf8f4;
  --surface: #fff;
  --soft: #f3eee7;
  --text: #1d1a17;
  --muted: #6b625a;
  --border: #e4dcd2;
  --accent: #9a3412;
  --highlight: #fde7d9;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110f;
    --surface: #1c1916;
    --soft: #24201c;
    --text: #f1ebe4;
    --muted: #a79d93;
    --border: #4a4037;
    --accent: #fdba74;
    --highlight: #3a2116;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; top: -100px; left: 16px; padding: 10px 16px; background: var(--surface); z-index: 20; }
.skip:focus { top: 8px; }
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { max-width: 1200px; margin: auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 19px; font-weight: 750; text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.header-links { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.header-links a { padding: 8px 0; }
.layout { max-width: 1200px; margin: auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding: 32px 24px 64px; }
.sidebar { align-self: start; position: sticky; top: 24px; font-size: 14px; }
.nav-label, .eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.sidebar .nav-label { margin: 20px 10px 6px; }
.sidebar .nav-label:first-child { margin-top: 0; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.sidebar a:hover { background: var(--soft); }
.sidebar a[aria-current="page"] { color: var(--accent); background: var(--highlight); font-weight: 650; }
main { min-width: 0; max-width: 800px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(32px, 5vw, 46px); margin: 12px 0 20px; }
h2 { font-size: 26px; margin-top: 44px; }
h3 { font-size: 19px; margin-top: 28px; }
[id] { scroll-margin-top: 24px; }
.lede { font-size: 19px; color: var(--muted); margin-bottom: 28px; }
code, kbd { font-family: var(--mono); font-size: .88em; background: var(--soft); border-radius: 4px; padding: 2px 5px; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--border); white-space: nowrap; }
pre { padding: 18px 20px; background: #1b1815; color: #f3ece4; border-radius: 8px; overflow-x: auto; font-size: 15px; }
pre code { background: none; color: inherit; padding: 0; overflow-wrap: normal; }
.callout { padding: 16px 20px; margin: 24px 0; background: var(--highlight); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; }
.callout p { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.card { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.card h2, .card h3 { font-size: 20px; margin: 0 0 10px; }
.card p { margin: 0 0 16px; color: var(--muted); }
.card a { font-weight: 650; }
.shot { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; }
figure { margin: 28px 0; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.table-wrap { overflow-x: auto; margin: 24px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { background: var(--soft); }
li { margin: 6px 0; }
.on-page { border-block: 1px solid var(--border); padding: 12px 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.page-nav { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--border); margin-top: 48px; padding-top: 24px; }
.page-nav a { max-width: 50%; }
.page-nav a:last-child { margin-left: auto; text-align: right; }
.page-nav small { display: block; color: var(--muted); }
.page-footer { margin-top: 36px; font-size: 13px; color: var(--muted); }
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; gap: 28px; padding: 24px 20px 48px; }
  .sidebar { position: static; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
  .sidebar ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar li { margin: 0; }
  .header-inner { padding-inline: 20px; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .header-links { gap: 16px; }
  th, td { padding: 10px 6px; }
}
@media print {
  .site-header, .sidebar, .skip, .page-nav { display: none; }
  .layout { display: block; padding: 0; }
  :root { --bg: #fff; --text: #000; --muted: #333; --accent: #000; }
}
