/* ── Docs layout ── */
.docs-layout {
  display: flex;
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem;
  gap: 2rem;
  align-items: flex-start;
}

/* ── Docs sidebar ── */
.docs-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 72px;
}

.docs-toc {
  display: flex;
  flex-direction: column;
}

.docs-toc a {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 16px;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.docs-toc a:hover {
  color: var(--text);
  background: var(--bg);
  border-left-color: var(--border);
}

/* ── Docs main ── */
.docs-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Hero ── */
.docs-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
}

.docs-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.docs-subtitle {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 600px;
  margin-bottom: 1rem;
}

.docs-base-url {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 13px;
}

.base-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ── Section ── */
.docs-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Method badge ── */
.method-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.method-get {
  background: #d1fae5;
  color: #065f46;
}

/* ── Endpoint path ── */
.endpoint-path {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: 'SFMono-Regular', Consolas, monospace;
  color: var(--text);
}

.endpoint-path em {
  color: var(--muted);
  font-style: normal;
}

/* ── Param heading ── */
.param-heading {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Param table ── */
.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.param-table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
}

.param-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.param-table tr:last-child td {
  border-bottom: none;
}

.param-table code {
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

/* ── Required / optional badges ── */
.badge-required {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
  background: #fce7f3;
  color: #9d174d;
  letter-spacing: 0.04em;
}

.badge-optional {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--low-bg);
  color: var(--low-text);
  letter-spacing: 0.04em;
}

/* ── Code block ── */
.code-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.try-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}
.try-link:hover { color: var(--text); }

.code-block pre {
  margin: 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  background: var(--surface);
}

.code-block code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text);
}

/* ── HTTP status codes ── */
.http-code {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  font-family: 'SFMono-Regular', Consolas, monospace;
  padding: 2px 8px;
  border-radius: 4px;
}

.http-400 { background: #fef3cd; color: #7a5200; }
.http-404 { background: #ffedd5; color: #9a3412; }
.http-500 { background: #fff5f5; color: #991b1b; }

/* ── Responsive ── */
@media (max-width: 680px) {
  .docs-layout { flex-direction: column; padding: 1rem; }
  .docs-sidebar { width: 100%; position: static; }
}
