:root {
  --canvas: #ffffff;
  --surface: #f6f7f9;
  --elevated: #eceef2;
  --ink: #12151b;
  --muted: #5b6372;
  --line: #dfe2e8;
  --accent: #2563eb;
  --accent-soft: #e6eeff;
  --code: #f1f3f6;
  --danger: #b42318;
  --radius: 12px;
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000000;
    --surface: #111214;
    --elevated: #1c1d21;
    --ink: #f5f7fb;
    --muted: #9ca3b2;
    --line: #2a2b30;
    --accent: #5b9bff;
    --accent-soft: #15233a;
    --code: #16171a;
    --danger: #ff8580;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.6; font-size: 16px; }
a { color: var(--accent); }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: blur(8px);
}
.topbar .brand { font-weight: 600; color: var(--ink); text-decoration: none; }
.topbar nav { display: flex; gap: 16px; }
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); max-width: 1200px; margin: 0 auto; }
.sidebar { position: sticky; top: 57px; align-self: start; max-height: calc(100vh - 57px); overflow-y: auto; padding: 24px 16px; border-right: 1px solid var(--line); }
.sidebar a { display: block; padding: 4px 8px; color: var(--muted); text-decoration: none; font-size: 14px; border-radius: 6px; }
.sidebar a:hover { background: var(--surface); color: var(--ink); }
.sidebar .group { margin: 16px 8px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.content { padding: 32px 40px 80px; min-width: 0; }
h1 { font-size: 34px; line-height: 1.2; margin: 0 0 12px; font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: 24px; margin: 48px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 18px; margin: 28px 0 8px; }
h4 { font-size: 15px; margin: 16px 0 6px; }
.lead { font-size: 18px; color: var(--muted); max-width: 760px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875em; background: var(--code); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--code); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.5; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; font-size: 14px; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; }
.endpoint { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; }
.endpoint code { font-size: 15px; }
.tabs { margin: 12px 0 20px; }
.tabs details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; background: var(--surface); }
.tabs summary { cursor: pointer; padding: 12px 16px; font-weight: 500; }
.tabs details > div { padding: 0 16px 8px; }
.tool { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 14px 0; background: var(--canvas); }
.tool h4 { margin: 0 0 4px; font-size: 16px; }
.tool .meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 8px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--elevated); color: var(--muted); }
.badge.read { color: #16794c; background: color-mix(in srgb, #16794c 14%, transparent); }
.badge.write { color: var(--accent); background: var(--accent-soft); }
.badge.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.badge.external { color: #a15c07; background: color-mix(in srgb, #a15c07 14%, transparent); }
.tool p { margin: 4px 0; white-space: pre-line; }
.required { color: var(--danger); font-size: 12px; }
footer { color: var(--muted); font-size: 14px; margin-top: 64px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .content { padding: 24px 16px 64px; }
  .topbar { padding: 12px 16px; gap: 16px; }
  h1 { font-size: 28px; }
}
