@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage.woff2') format('woff2'); font-weight: 500 800; font-display: swap; }
@font-face { font-family: 'Plex Sans'; src: url('/fonts/plex-sans.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --canvas: #EFE9DC; --panel: #FBF8F1; --ink: #1C1A16; --ink-soft: #6E675A; --line: #D8CFBD; --line-soft: #E6DECE;
  --signal: #D8431F; --brass: #A88442; --code-bg: #1F1D19; --code-ink: #EDE6D6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #171512; --panel: #1F1C18; --ink: #EDE6D6; --ink-soft: #A69D8B; --line: #3A352D; --line-soft: #2C2822;
    --signal: #F06A45; --brass: #C9A262; --code-bg: #0F0E0C; --code-ink: #EDE6D6;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.65 'Plex Sans', system-ui, sans-serif; }
a { color: inherit; text-decoration-color: var(--brass); text-underline-offset: 3px; }
code { font: .88em 'Plex Mono', ui-monospace, monospace; background: var(--line-soft); padding: 1px 5px; border-radius: 4px; }
pre { background: var(--code-bg); color: var(--code-ink); padding: 16px 18px; border-radius: 10px; overflow-x: auto; margin: 14px 0; }
pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.6; color: inherit; }
h1, h2, h3 { font-family: 'Bricolage', system-ui, sans-serif; letter-spacing: -.015em; line-height: 1.15; }
h1 { font-size: clamp(32px, 5vw, 46px); margin: 0 0 12px; }
h2 { font-size: 26px; margin: 0 0 12px; padding-top: 12px; }
h3 { font-size: 17px; margin: 22px 0 6px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font: 750 18px 'Bricolage', system-ui; text-decoration: none; }
.brand span { font-weight: 500; color: var(--ink-soft); }
.top nav { display: flex; align-items: center; gap: 18px; font-weight: 600; font-size: 14.5px; }
.top nav a { text-decoration: none; }
.top nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; }
.btn { background: var(--ink); color: var(--canvas); padding: 7px 14px; border-radius: 8px; }

.layout { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 48px; max-width: 1080px; margin: 0 auto; padding: 36px 24px 80px; }
.toc { position: sticky; top: 80px; align-self: start; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.toc a { text-decoration: none; color: var(--ink-soft); padding: 4px 0 4px 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); border-left-color: var(--signal); }
.lead { font-size: 19px; color: var(--ink-soft); margin: 0 0 20px; }
section { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 34px; }
section > p { margin: 10px 0; }
ol, ul { padding-left: 22px; }
li { margin: 6px 0; }
.steps li::marker { font-weight: 700; color: var(--signal); }
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14.5px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
th { width: 34%; font-weight: 600; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding: 24px 16px 60px; }
  .toc { display: none; }
  th { width: auto; }
  table, tbody, tr, th, td { display: block; width: 100%; }
  th { border-bottom: 0; padding-bottom: 0; }
}
