/* ── API Docs view ─────────────────────────────────────────────────────────── */

.docs {
  max-width: 1200px;
  margin: 0 auto;
}

.docs h1 {
  margin-bottom: var(--space-4);
}

.docs-intro {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

/* ── Section cards ─────────────────────────────────────────────────────────── */

.docs-section {
  margin-bottom: var(--space-6);
}

.docs-section h2 {
  margin-bottom: var(--space-3);
}

.docs-section h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

.docs-section p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.docs-section code {
  font-size: var(--text-xs);
  background: var(--bg-base);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--primary-light);
}

/* ── Endpoint header ───────────────────────────────────────────────────────── */

.docs-endpoint-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.docs-method {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
  border-radius: var(--radius-sm);
  padding: 0.2em 0.6em;
}

.docs-path {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Two-column body ───────────────────────────────────────────────────────── */

.docs-endpoint-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.docs-desc {
  min-width: 0;
}

/* ── Right column: examples ────────────────────────────────────────────────── */

.docs-examples {
  min-width: 0;
  position: sticky;
  top: var(--space-4);
  align-self: start;
}

.docs-example-block {
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.docs-example-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-base);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
}

.docs-example-block .code-preview {
  margin: 0;
  border-radius: 0;
  border: none;
  max-height: 420px;
  overflow-y: auto;
}

/* ── Full-width sections (auth, openapi download) ─────────────────────────── */

.docs-section--full .docs-endpoint-body {
  grid-template-columns: 1fr;
}

/* ── Lists ─────────────────────────────────────────────────────────────────── */

.docs-list {
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-4);
}

.docs-list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--space-1) 0;
  padding-left: var(--space-4);
  position: relative;
}

.docs-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--border-light);
}

/* ── Tables ────────────────────────────────────────────────────────────────── */

.docs-table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-3);
}

.docs-section pre.code-preview {
  margin-bottom: var(--space-4);
}

/* ── Curl syntax highlighting ──────────────────────────────────────────────── */

.curl-kw     { color: var(--primary-light); }
.curl-flag   { color: var(--text-muted); }
.curl-method { color: var(--success); }
.curl-url    { color: var(--primary-light); }

/* ── Mobile ────────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .docs-endpoint-body {
    grid-template-columns: 1fr;
  }

  .docs-examples {
    position: static;
  }
}
