/* Reuses tokens from landing.css (loaded alongside this file): --black,
   --surface, --border, --text, --accent, --font-display/body/mono, etc. */

.docs-shell {
  display: flex;
  min-height: 100vh;
}

/* ===== Top bar (slim, separate from the docs two-column layout below) ===== */
.docs-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 60;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.docs-topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.docs-topbar-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.docs-topbar-links a {
  font-size: 13px;
  color: var(--text-dim);
}
.docs-topbar-links a:hover { color: var(--text); }
.docs-topbar-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  background: var(--text);
  padding: 7px 14px;
  border-radius: 6px;
}

/* ===== Sidebar nav ===== */
.docs-sidebar {
  width: 240px;
  flex-shrink: 0;
  padding: 76px 16px 24px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.docs-nav-group { margin-bottom: 22px; }
.docs-nav-group-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 0 10px;
  margin-bottom: 8px;
}
.docs-nav-item {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text-dim);
  border-left: 2px solid transparent;
  transition: all 0.12s ease;
}
.docs-nav-item:hover { color: var(--text); background: var(--surface); }
.docs-nav-item.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-left-color: var(--accent);
  font-weight: 600;
}

.docs-mobile-toggle { display: none; }

/* ===== Main content ===== */
.docs-main {
  flex: 1;
  min-width: 0;
  padding: 96px 48px 80px;
  max-width: 760px;
}

.docs-section { margin-bottom: 64px; scroll-margin-top: 76px; }
.docs-section h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.docs-section > p.docs-lead {
  font-size: 15.5px;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0 0 28px;
}
.docs-section h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 36px 0 12px;
  padding-top: 8px;
}
.docs-section h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 10px;
}
.docs-section p {
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 1.7;
  margin: 0 0 14px;
}
.docs-section code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  color: #c4e8ee;
}
.docs-section a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.docs-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 18px 0;
}
.docs-callout strong { color: var(--text); }

/* ===== Endpoint header (method + path) ===== */
.docs-endpoint-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 16px;
}
.docs-method-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 5px;
  background: var(--accent-dim);
  color: var(--accent);
  flex-shrink: 0;
}
.docs-endpoint-path {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
}

/* ===== Params table ===== */
.docs-params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 14px 0 24px;
}
.docs-params-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-faint);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.docs-params-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: top;
}
.docs-params-table td:first-child { font-family: var(--font-mono); color: var(--text); white-space: nowrap; }
.docs-param-required {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  margin-left: 6px;
}

/* ===== Code panel with language tabs ===== */
.docs-code-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 16px 0 28px;
}
.docs-code-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.docs-code-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 10px 16px;
  color: var(--text-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.12s ease;
}
.docs-code-tab:hover { color: var(--text-dim); }
.docs-code-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.docs-code-body-wrap { position: relative; }
.docs-code-body {
  margin: 0;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-dim);
  display: none;
}
.docs-code-body.active { display: block; }
.docs-code-body .k { color: #c4b5fd; }
.docs-code-body .s { color: #86efac; }
.docs-code-body .n { color: #fca5a5; }
.docs-code-body .c { color: var(--text-faint); }
.docs-copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border-hover);
  color: var(--text-dim);
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.docs-code-body-wrap:hover .docs-copy-btn { opacity: 1; }
.docs-copy-btn:hover { color: var(--text); border-color: var(--accent); }

/* ===== Response example block (not tabbed, just labeled) ===== */
.docs-response-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin: 20px 0 8px;
}

/* ===== Error reference table ===== */
.docs-error-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 14px 0;
}
.docs-error-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-faint);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.docs-error-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.docs-error-code {
  font-family: var(--font-mono);
  font-weight: 700;
}
.docs-error-code.err-4 { color: var(--warning, #fbbf24); }
.docs-error-code.err-5 { color: #f87171; }

@media (max-width: 980px) {
  .docs-sidebar {
    position: fixed;
    left: 0;
    z-index: 55;
    background: var(--black);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .docs-sidebar.open { transform: translateX(0); }
  .docs-main { padding: 88px 20px 60px; max-width: 100%; }
  .docs-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border: 1px solid var(--border-hover);
    border-radius: 6px;
    cursor: pointer;
  }
  .docs-topbar-links { display: none; }
}
