:root {
  --bg: #0a0a0a;
  --fg: #f5f3ee;
  --muted: #8a8378;
  --accent: #b8915a;
  --accent-dim: #8a6c44;
  --hairline: rgba(245,243,238,0.08);
  --hairline-strong: rgba(245,243,238,0.16);
  --code-bg: rgba(245,243,238,0.04);
  --tab-active: rgba(184,145,90,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; }
code { background: var(--code-bg); padding: 2px 5px; border-radius: 3px; color: var(--fg); }
pre {
  background: var(--code-bg);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 14px 18px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.55;
}
pre code { background: transparent; padding: 0; }

/* Sidebar */
aside {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--hairline);
  padding: 32px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
aside .brand-mono {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
aside h3 {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 24px;
  margin-bottom: 8px;
  font-weight: 500;
}
aside ul { list-style: none; }
aside ul li a {
  display: block;
  padding: 5px 8px;
  margin-left: -8px;
  color: var(--muted);
  font-size: 13px;
  border-radius: 4px;
}
aside ul li a:hover { color: var(--fg); background: rgba(245,243,238,0.03); text-decoration: none; }
aside ul li a.active { color: var(--fg); }

/* Main content */
main {
  flex: 1;
  padding: 48px 56px;
  max-width: 880px;
}
h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 8px; }
h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 12px;
  scroll-margin-top: 24px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
  scroll-margin-top: 24px;
}
h4 {
  font-size: 14px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 6px;
}
p { margin-bottom: 12px; }
ul, ol { padding-left: 24px; margin-bottom: 12px; }
ul li, ol li { margin-bottom: 4px; }

.lede { font-size: 16px; color: var(--muted); margin-bottom: 32px; }

/* Hero */
.hero {
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hairline);
}
.hero h1 {
  font-size: 40px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero .lede {
  font-size: 18px;
  margin-bottom: 24px;
  max-width: 640px;
  color: var(--muted);
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.hero-stat {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
}
.hero-stat .num {
  display: block;
  font-size: 22px;
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 2px;
}
.hero-stat .lbl {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Section dividers */
.section {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
.section:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.section-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Endpoint block */
.endpoint {
  margin-top: 40px;
  padding: 24px 0 0;
  border-top: 1px solid var(--hairline);
}
.endpoint:first-of-type { border-top: none; padding-top: 0; }
.endpoint-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.endpoint h2 {
  margin: 0;
  font-size: 22px;
}
.endpoint-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: rgba(245,243,238,0.02);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
}

/* Callout */
.callout {
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 16px 0;
  background: rgba(184,145,90,0.04);
  border-radius: 0 4px 4px 0;
  font-size: 13.5px;
}
.callout .tip-label {
  display: inline-block;
  font-weight: 500;
  color: var(--accent);
  margin-right: 4px;
}

/* Use case grid */
.usecase-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  margin: 16px 0 24px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
}
.usecase {
  padding: 16px 20px;
  border-right: 1px solid var(--hairline);
}
.usecase:last-child { border-right: none; }
.usecase h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}
.usecase p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 13px;
}
table th, table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--hairline);
}
table th {
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--hairline-strong);
}

/* Tabs (language switcher) */
.lang-tabs {
  display: flex;
  gap: 0;
  margin-top: 12px;
  border-bottom: 1px solid var(--hairline);
}
.lang-tabs button {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 16px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.lang-tabs button.active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.lang-tabs button:hover { color: var(--fg); }
.lang-panel { display: none; margin-top: -1px; }
.lang-panel.active { display: block; }
.lang-panel pre { border-top-left-radius: 0; border-top-right-radius: 0; }

.method {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-right: 6px;
}
.method.post { background: rgba(184,145,90,0.15); color: var(--accent); }
.method.get { background: rgba(245,243,238,0.08); color: var(--fg); }
.method.delete { background: rgba(194,115,92,0.15); color: #c2735c; }
.method.patch { background: rgba(184,145,90,0.15); color: var(--accent); }

.endpoint-path {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  color: var(--fg);
}

.banner {
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
  background: rgba(184,145,90,0.04);
}

footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 768px) {
  body { flex-direction: column; }
  aside { position: relative; width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--hairline); }
  main { padding: 24px; max-width: none; }
}
