/* ── Docs layout ── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.docs-sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
}

.docs-sidebar h4 {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  margin: 24px 0 8px;
}

.docs-sidebar h4:first-child { margin-top: 0; }

.docs-sidebar ul { list-style: none; }
.docs-sidebar li { margin-bottom: 2px; }

.docs-sidebar a {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .85rem;
  color: var(--text-secondary);
  transition: all .15s;
}

.docs-sidebar a:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.docs-sidebar a.active { color: var(--accent); background: rgba(0, 229, 255, .08); }

/* Main content */
.docs-content {
  padding: 48px 48px 80px;
  max-width: 900px;
}

.docs-content h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.docs-content > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.docs-section {
  margin-bottom: 64px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.docs-section h2 {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.docs-section h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.docs-section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

/* Endpoint block */
.endpoint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 16px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: .85rem;
}

.method {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .75rem;
}

.method-get { background: rgba(0, 229, 255, .15); color: var(--accent); }
.method-post { background: rgba(0, 200, 83, .15); color: var(--success); }

/* Code examples with tabs */
.code-example {
  margin: 20px 0 32px;
}

.code-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.tab-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: .8rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel pre {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
  border-top: none;
}

/* Params table */
.params-table {
  margin: 16px 0 24px;
}

.params-table td:first-child {
  font-family: var(--font-mono);
  font-size: .85rem;
  white-space: nowrap;
  color: var(--accent);
}

.params-table td:nth-child(2) {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-secondary);
}

/* Response field descriptions */
.field-list {
  list-style: none;
  margin: 12px 0 24px;
}

.field-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}

.field-list code {
  color: var(--accent);
  background: var(--bg-tertiary);
}

/* Mobile */
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
  }

  .docs-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .docs-sidebar h4 { margin: 8px 0 4px; }

  .docs-content {
    padding: 32px 24px 64px;
  }
}
