:root {
  --ink: #08090c;
  --ink-2: #0e1015;
  --panel: #12151c;
  --paper: #f7f7f4;
  --muted: #9298a6;
  --line: #262a34;
  --blue: #4d73ff;
  --blue-soft: #98adff;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 16px/1.7 var(--sans);
}
a { color: inherit; text-decoration: none; }
code, pre, .eyebrow, .method, .nav-label { font-family: var(--mono); }
code { color: var(--blue-soft); font-size: .9em; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 20; background: white; color: black; padding: 10px 14px; }
.skip-link:focus { top: 12px; }

.topbar {
  height: 68px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 12, .92);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: 260px 1fr auto;
  align-items: center;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { display: block; width: 94px; height: auto; }
.brand span { color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; font: 12px var(--mono); }
.page-title { justify-self: center; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 22px; font-size: 13px; color: var(--muted); }
.top-actions a:hover, .side-nav a:hover, .text-link:hover { color: white; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--blue);
  border: 1px solid var(--blue);
  color: white;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 600;
  transition: transform .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); background: #6485ff; }
.button--quiet { background: transparent; border-color: var(--line); }
.button--quiet:hover { background: var(--panel); }

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 830px) minmax(0, 340px);
  max-width: 1500px;
  margin: 0 auto;
  min-height: calc(100vh - 68px);
}
.sidebar {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 34px 24px 44px 32px;
}
.nav-group { margin-bottom: 27px; }
.nav-label { margin: 0 0 8px 10px; color: #656b78; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  color: var(--muted);
  padding: 7px 10px;
  border-left: 2px solid transparent;
  font-size: 13px;
}
.side-nav a[aria-current="page"] { color: white; background: var(--ink-2); border-left-color: var(--blue); }
.side-nav .method-mini { display: inline-block; min-width: 34px; color: #697183; font: 9px var(--mono); }
.side-nav a.nested { padding-left: 44px; color: #7d8492; font-size: 12px; }
.side-nav a.nested::before { content: "↳"; margin-left: -17px; margin-right: 7px; color: #4f5664; }
.side-nav a.nested[aria-current="page"] { color: white; }
.sidebar-foot { margin: 30px 10px 0; color: #656b78; font: 11px/1.6 var(--mono); }
.sidebar-foot a { color: var(--blue-soft); }

.doc { min-width: 0; padding: 64px 58px 100px; }
.article { max-width: 760px; }
.eyebrow { margin: 0 0 18px; color: var(--blue-soft); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(48px, 5vw, 72px); line-height: 1; }
h2 { margin: 54px 0 16px; font-size: 38px; line-height: 1.05; }
h3 { margin: 28px 0 10px; font-size: 17px; line-height: 1.35; }
p { margin: 0 0 18px; color: #b6bac3; }
.lede { margin: 22px 0 30px; color: #d9dbe0; font-size: 19px; line-height: 1.65; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 28px 0; }
.text-link { color: var(--blue-soft); font-size: 14px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 52px 0; }

.stat-grid, .card-grid, .principle-grid, .dataset-grid { display: grid; gap: 12px; }
.stat-grid { grid-template-columns: repeat(3, 1fr); margin: 34px 0 48px; }
.stat, .card, .principle, .dataset-card { border: 1px solid var(--line); background: var(--ink-2); padding: 20px; }
.stat strong { display: block; font: 25px var(--serif); color: white; }
.stat span { color: var(--muted); font: 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.card-grid { grid-template-columns: repeat(2, 1fr); }
.card h3, .principle h3, .dataset-card h3 { margin-top: 0; }
.card p, .principle p, .dataset-card p { margin-bottom: 0; font-size: 14px; }
.card .path, .dataset-card .path { display: block; margin-top: 20px; color: var(--blue-soft); font: 12px var(--mono); }
.principle-grid { grid-template-columns: repeat(3, 1fr); }
.principle .number { display: block; color: var(--blue); font: 11px var(--mono); margin-bottom: 30px; }
.dataset-grid { grid-template-columns: repeat(2, 1fr); }
.dataset-card { min-height: 190px; transition: border-color .18s, transform .18s; }
.dataset-card:hover { border-color: var(--blue); transform: translateY(-2px); }

.list { padding: 0; margin: 20px 0; list-style: none; border-top: 1px solid var(--line); }
.list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); color: #b6bac3; }
.list .tick { color: var(--blue-soft); font-family: var(--mono); }
.steps { counter-reset: step; border-top: 1px solid var(--line); }
.step { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.step::before { content: "0" counter(step); color: var(--blue-soft); font: 11px var(--mono); padding-top: 4px; }
.step h3 { margin-top: 0; }
.step p:last-child { margin-bottom: 0; }

.endpoint-bar { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--ink-2); padding: 12px 14px; margin: 30px 0 42px; }
.method { flex: none; color: white; border-radius: 3px; padding: 3px 7px; font-size: 10px; font-weight: 600; }
.method.get { background: #214cbc; }
.method.post { background: #6c43c0; }
.endpoint-bar code { color: white; font-size: 13px; }
.endpoint-bar .spec-link { margin-left: auto; color: var(--muted); font-size: 12px; }
.coverage { width: 100%; border-collapse: collapse; margin: 18px 0 36px; font-size: 14px; }
.coverage th, .coverage td { text-align: left; border-bottom: 1px solid var(--line); padding: 11px 8px 11px 0; vertical-align: top; }
.coverage th { color: var(--muted); font-size: 12px; font-weight: 500; }
.coverage td { color: #c6c9d0; }
.params { width: 100%; border-collapse: collapse; margin: 18px 0 36px; }
.params th, .params td { text-align: left; border-bottom: 1px solid var(--line); padding: 13px 12px 13px 0; vertical-align: top; }
.params th { color: var(--muted); font-size: 12px; font-weight: 500; }
.params td { font-size: 13px; color: #b6bac3; }
.params code { white-space: nowrap; }
.required { display: inline-block; color: #aebeff; font: 9px var(--mono); margin-left: 6px; text-transform: uppercase; }
.callout { border-left: 2px solid var(--blue); background: #0e1428; padding: 15px 18px; margin: 28px 0; color: #c8cee0; font-size: 14px; }
.callout p:last-child { margin-bottom: 0; }

.code-rail { padding: 64px 28px 80px 0; }
.code-rail-inner { position: sticky; top: 100px; display: grid; gap: 14px; }
.code-card { border: 1px solid var(--line); background: var(--ink-2); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; border-bottom: 1px solid var(--line); color: var(--muted); font: 11px var(--mono); }
.copy { border: 0; background: transparent; color: var(--muted); font: 11px var(--mono); cursor: pointer; }
.copy:hover { color: white; }
pre { margin: 0; padding: 16px; overflow: auto; color: #d8dbe4; font: 12px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.token-key { color: #b8a7ff; }
.token-string { color: #e0b28d; }
.token-number { color: #70b9d4; }

.route-list { border-top: 1px solid var(--line); }
.route-row { display: grid; grid-template-columns: 52px 190px 1fr 18px; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.route-row:hover { background: var(--ink-2); padding-left: 9px; padding-right: 9px; }
.route-row code { color: white; font-size: 12px; }
.route-row span:nth-child(3) { color: var(--muted); font-size: 13px; }
.route-row .arrow { color: var(--muted); }
.next-page { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid var(--line); margin-top: 68px; padding-top: 24px; color: var(--muted); font-size: 13px; }
.next-page a { color: white; }

footer { border-top: 1px solid var(--line); padding: 24px 32px; color: #656b78; font: 11px var(--mono); display: flex; justify-content: space-between; }
footer a:hover { color: white; }

@media (max-width: 1180px) {
  .shell { grid-template-columns: 240px minmax(0, 1fr); }
  .code-rail { grid-column: 2; padding: 0 42px 80px; }
  .code-rail-inner { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .topbar { grid-template-columns: 1fr auto; padding: 0 20px; }
  .page-title, .top-actions > a:not(.button) { display: none; }
  .shell { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; overflow-x: auto; }
  .nav-group { margin: 0; }
  .nav-group:not(:first-child), .nav-label, .sidebar-foot { display: none; }
  .side-nav { display: flex; width: max-content; }
  .side-nav a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .side-nav a[aria-current="page"] { border-left: 0; border-bottom-color: var(--blue); }
  .doc { padding: 48px 24px 76px; }
  .code-rail { padding: 0 24px 70px; }
  .code-rail-inner { grid-template-columns: 1fr; }
  .stat-grid, .principle-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  h1 { font-size: 47px; }
  h2 { font-size: 34px; }
  .lede { font-size: 17px; }
  .stat-grid, .card-grid, .principle-grid, .dataset-grid { grid-template-columns: 1fr; }
  .route-row { grid-template-columns: 48px 1fr 16px; }
  .route-row span:nth-child(3) { grid-column: 2 / 4; }
  .params { display: block; overflow-x: auto; }
  footer { display: block; padding: 22px 20px; }
  footer span { display: block; margin: 4px 0; }
}
