/* ─── Docs layout ─────────────────────────────────────────────────────────── */
.docs-body { background: var(--bg); }

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 62px);
  max-width: 1280px;
  margin: 0 auto;
}

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
.docs-sidebar {
  border-right: 1px solid var(--border);
  padding: 2rem 1rem 2rem 1.5rem;
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow-y: auto;
}
.docs-nav-group { margin-bottom: 1.75rem; }
.docs-nav-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 0.5rem;
  padding-left: 0.75rem;
}
.docs-nav-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.35rem 0.75rem; border-radius: 6px;
  font-size: 0.875rem; color: var(--text-muted);
  transition: all 0.12s; margin-bottom: 1px;
}
.docs-nav-link:hover  { background: var(--surface); color: var(--text); }
.docs-nav-link.active { background: rgba(99,102,241,0.1); color: var(--accent); font-weight: 500; }
.nav-badge {
  font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.45rem;
  border-radius: 3px; background: rgba(167,139,250,0.15); color: #c4b5fd;
}

/* ─── Content ─────────────────────────────────────────────────────────────── */
.docs-content {
  padding: 3rem 3.5rem 6rem;
  max-width: 860px;
}

/* ─── Section ─────────────────────────────────────────────────────────────── */
.docs-section { margin-bottom: 4rem; scroll-margin-top: 80px; }
.docs-section h1 { font-size: 2.2rem; margin-bottom: 0.75rem; }
.docs-section h2 { font-size: 1.4rem; margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.docs-section h3 { font-size: 1rem; margin: 1.5rem 0 0.75rem; color: var(--text); }
.docs-section p  { font-size: 0.92rem; margin-bottom: 1rem; }
.docs-lead { font-size: 1.05rem; color: var(--text-muted); max-width: 640px; margin-bottom: 2rem; line-height: 1.7; }

/* ─── Quickstart cards ────────────────────────────────────────────────────── */
.quickstart-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 1.5rem; }
.qs-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.qs-num  { font-size: 1.5rem; font-weight: 800; color: var(--border-2); font-family: var(--mono); margin-bottom: 0.6rem; }
.qs-card h3 { font-size: 0.95rem; margin: 0 0 0.4rem; }
.qs-card p  { font-size: 0.85rem; margin: 0; }

/* ─── Endpoint header ─────────────────────────────────────────────────────── */
.endpoint-header {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.endpoint-header.mt { margin-top: 1.5rem; }
.method {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.6rem; border-radius: 5px;
  font-size: 0.75rem; font-weight: 800; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.method.post   { background: rgba(99,102,241,0.15); color: #818cf8; }
.method.get    { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.method.delete { background: rgba(239,68,68,0.15);  color: #fca5a5; }
.method.patch  { background: rgba(245,158,11,0.15); color: #fcd34d; }
.endpoint-path { font-family: var(--mono); font-size: 0.95rem; color: var(--text); font-weight: 500; }
.endpoint-note { font-size: 0.82rem; color: var(--text-faint); }

/* ─── Code blocks ─────────────────────────────────────────────────────────── */
.code-block-wrap { margin: 1rem 0; }
.code-block-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.4rem; }
.code-label { font-size: 0.75rem; font-weight: 600; color: var(--text-faint); margin-bottom: 0.35rem; }
.docs-content .code-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem 1.4rem;
  font-size: 0.8rem; line-height: 1.75; overflow-x: auto;
  margin: 0.5rem 0 1rem;
}
.c-fn { color: #86efac; }

/* ─── Tabs ────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0.25rem; margin-bottom: 0; flex-wrap: wrap; }
.tab {
  background: none; border: 1px solid var(--border); border-bottom: none;
  border-radius: 6px 6px 0 0; padding: 0.4rem 0.9rem;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  color: var(--text-faint); font-family: var(--mono); transition: all 0.12s;
}
.tab:hover  { color: var(--text); background: var(--surface); }
.tab.active { background: var(--surface); border-color: var(--border); color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-content .code-block { border-radius: 0 var(--radius) var(--radius); margin-top: 0; }

/* ─── Params table ────────────────────────────────────────────────────────── */
.params-table-wrap { overflow-x: auto; margin: 0.75rem 0 1.25rem; }
.params-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.params-table th { text-align: left; padding: 0.6rem 0.9rem; color: var(--text-faint); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.params-table td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; color: var(--text-muted); }
.params-table tr:last-child td { border-bottom: none; }
.params-table td code { background: var(--surface-2); padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.8rem; color: var(--text); white-space: nowrap; }
.req { color: var(--danger); font-size: 0.72rem; font-weight: 700; }

/* ─── Callouts ────────────────────────────────────────────────────────────── */
.callout {
  padding: 0.9rem 1.1rem; border-radius: var(--radius); font-size: 0.875rem;
  margin: 1rem 0; line-height: 1.6; border-left: 3px solid;
}
.callout.warn  { background: rgba(245,158,11,0.08); border-color: var(--warn); color: #fde68a; }
.callout.info  { background: rgba(99,102,241,0.08); border-color: var(--accent); color: var(--text-muted); }
.callout strong { color: var(--text); }

/* ─── Two col ─────────────────────────────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }

/* ─── Pro badge ───────────────────────────────────────────────────────────── */
.pro-badge {
  font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.55rem;
  border-radius: 4px; background: rgba(167,139,250,0.15);
  color: #c4b5fd; vertical-align: middle; margin-left: 0.4rem;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .docs-nav-group { margin: 0; }
  .docs-nav-label { display: none; }
  .docs-nav-link { font-size: 0.78rem; padding: 0.3rem 0.6rem; }
  .docs-content { padding: 1.5rem; }
  .quickstart-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}
