/* ===========================
   AUREA API DOCS — STYLES
   Aurea brand design system
=========================== */

/* ═══════════════════════════════════════════
   1. DESIGN TOKENS (CSS Variables)
═══════════════════════════════════════════ */

:root {
  /* ── Brand & Accent ── */
  --accent: #6142FF;
  --accent-light: #8B6FFF;
  --accent-bg: rgba(97, 66, 255, 0.08);
  --accent-border: rgba(97, 66, 255, 0.3);

  /* ── Backgrounds ── */
  --bg: #FBFAFF;
  --bg-secondary: #F3F0FF;
  --bg-tertiary: #EAE5FF;

  /* ── Borders ── */
  --border: #D9D3F0;
  --border-light: #EDE9FF;

  /* ── Typography ── */
  --text-primary: #1B1040;
  --text-secondary: #5C5280;
  --text-tertiary: #9B93C4;
  --text-accent: #6142FF;

  /* ── Layout ── */
  --sidebar-bg: #F8F6FF;
  --sidebar-w: 272px;
  --header-h: 58px;
  --toc-w: 224px;

  /* ── Code ── */
  --code-bg: #F0EEFF;
  --code-border: #D4CCFF;
  --code-text: #1B1040;

  /* ── HTTP Method Colors ── */
  --method-get: #059669;
  --method-get-bg: #d1fae5;
  --method-post: #6142FF;
  --method-post-bg: rgba(97, 66, 255, 0.1);
  --method-put: #d97706;
  --method-put-bg: #fef3c7;
  --method-patch: #8B6FFF;
  --method-patch-bg: rgba(139, 111, 255, 0.12);
  --method-delete: #dc2626;
  --method-delete-bg: #fee2e2;

  /* ── Tokens ── */
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 4px rgba(97, 66, 255, 0.08);
  --shadow: 0 8px 24px rgba(97, 66, 255, 0.12);
  --transition: 0.18s ease;
}

[data-theme="dark"] {
  --bg: #0E0E1C;
  --bg-secondary: #13132A;
  --bg-tertiary: #1A1A36;
  --border: #2A2A4A;
  --border-light: #1E1E38;

  --text-primary: #F0EEFF;
  --text-secondary: #9B95C4;
  --text-tertiary: #6B6594;

  --sidebar-bg: #0A0A18;

  --code-bg: #13132A;
  --code-border: #2A2A4A;
  --code-text: #E8E2FF;

  --accent-bg: rgba(97, 66, 255, 0.14);
  --accent-border: rgba(97, 66, 255, 0.35);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}


/* ═══════════════════════════════════════════
   2. RESET & BASE
═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }


/* ═══════════════════════════════════════════
   3. LAYOUT
═══════════════════════════════════════════ */

/* ── 3a. Header ── */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .header {
  background: rgba(14, 14, 28, 0.92);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(var(--sidebar-w) - 20px);
  flex-shrink: 0;
}

.header-center { flex: 1; min-width: 0; }

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── 3b. Sidebar ── */

.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 16px 0 80px;
  z-index: 50;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 3c. Main Content ── */

.main {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  display: flex;
  min-height: calc(100vh - var(--header-h));
}

.content-wrapper {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 80px;
  max-width: 820px;
}

/* ── 3d. TOC (Table of Contents) ── */

.toc {
  width: var(--toc-w);
  flex-shrink: 0;
  padding: 40px 24px 40px 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.toc-list { list-style: none; }

.toc-list li a {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0 4px 12px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  line-height: 1.4;
}

.toc-list li a:hover { color: var(--text-primary); }
.toc-list li a.active { color: var(--accent); border-left-color: var(--accent); }


/* ═══════════════════════════════════════════
   4. COMPONENTS
═══════════════════════════════════════════ */

/* ── 4a. Logo ── */

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-mark {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #1B1040;
  border-radius: var(--radius-sm);
  padding: 4px;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── 4b. Sidebar Toggle (Hamburger) ── */

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  line-height: 0;
  flex-shrink: 0;
}

.sidebar-toggle:hover { background: var(--bg-tertiary); color: var(--text-primary); }

/* ── 4c. Search Bar ── */

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: text;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.search-label { flex: 1; text-align: left; }

.search-bar kbd {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* ── 4d. Header Actions ── */

.header-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all var(--transition);
  white-space: nowrap;
}

.header-link:hover {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent-border);
  text-decoration: none;
}

.theme-toggle {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-border); }

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* ── 4e. Navigation ── */

.sidebar-nav {}
.nav-section { margin-bottom: 6px; }

.nav-section-label {
  display: block;
  padding: 8px 20px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 5px 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  text-align: left;
}

.nav-group-toggle:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.nav-group-toggle .chevron {
  transition: transform .2s;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.nav-group-toggle.open .chevron { transform: rotate(90deg); }

.nav-group-items { overflow: hidden; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 20px 5px 32px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  border-left: 2px solid transparent;
  margin-left: 0;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-item.active {
  color: var(--accent);
  background: var(--accent-bg);
  border-left-color: var(--accent);
  font-weight: 600;
}

.nav-item .method-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .03em;
  flex-shrink: 0;
}

/* ── 4f. Content Typography ── */

.content h1 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.03em;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.content h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 44px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 10px;
  scroll-margin-top: 80px;
}

.content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.75;
}

.content ul, .content ol {
  padding-left: 20px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.content li { margin-bottom: 6px; }
.content strong { color: var(--text-primary); font-weight: 700; }

.content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--accent);
}

.page-lead {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

/* ── 4g. Endpoint Cards ── */

.endpoint-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.endpoint-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--accent-border);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.endpoint-method {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.method-GET    { color: var(--method-get);    background: var(--method-get-bg); }
.method-POST   { color: var(--method-post);   background: var(--method-post-bg); }
.method-PUT    { color: var(--method-put);    background: var(--method-put-bg); }
.method-PATCH  { color: var(--method-patch);  background: var(--method-patch-bg); }
.method-DELETE { color: var(--method-delete); background: var(--method-delete-bg); }

.endpoint-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: auto;
  flex-shrink: 0;
  max-width: 260px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform .2s;
}

.endpoint-header.open .endpoint-chevron { transform: rotate(180deg); }

.endpoint-body {
  padding: 20px;
  display: none;
  border-top: 1px solid var(--border-light);
}

.endpoint-body.open { display: block; }

.endpoint-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.65;
}

/* ── 4h. Auth Badge ── */

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 600;
  margin-bottom: 16px;
}

.auth-badge.required {
  background: rgba(97, 66, 255, 0.1);
  color: #6142FF;
  border: 1px solid rgba(97, 66, 255, 0.3);
}

.auth-badge.public {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

[data-theme="dark"] .auth-badge.required { background: rgba(97, 66, 255, 0.15); color: #a48aff; border-color: rgba(97, 66, 255, 0.35); }
[data-theme="dark"] .auth-badge.public { background: rgba(16,185,129,.1); color: #34d399; border-color: rgba(52,211,153,.25); }

/* ── 4i. Params Table ── */

.params-section { margin-bottom: 20px; }

.params-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.param-row {
  display: grid;
  grid-template-columns: 180px 90px 1fr;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-bottom: none;
  font-size: 13px;
  align-items: start;
}

.param-row:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.param-row:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.param-row:only-child { border-radius: var(--radius-sm); border-bottom: 1px solid var(--border); }
.param-row:nth-child(even) { background: var(--bg-secondary); }

.param-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-all;
}

.param-name .req { color: #ef4444; font-size: 11px; margin-left: 2px; }

.param-type {
  font-size: 12px;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

.param-desc {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* ── 4j. Code Blocks ── */

.code-block {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  margin: 14px 0;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--code-border);
  background: var(--bg-tertiary);
}

.code-block-lang {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-family: inherit;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 4px;
}

.copy-btn:hover { background: var(--accent-bg); color: var(--accent); }
.copy-btn.copied { color: #059669; }

.code-block pre { padding: 16px; overflow-x: auto; margin: 0; }

.code-block code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--code-text);
  background: none;
  border: none;
  padding: 0;
}

/* ── 4k. Callouts ── */

.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border-left: 3px solid;
  margin: 16px 0;
  font-size: 14px;
}

.callout-note { background: rgba(97, 66, 255, 0.08); border-color: var(--accent); color: var(--text-secondary); }
.callout-warn { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.callout-tip  { background: #f0fdf4; border-color: #22c55e; color: #166534; }
.callout-info { background: var(--accent-bg); border-color: var(--accent); color: var(--text-secondary); }

[data-theme="dark"] .callout-note { background: rgba(97, 66, 255, 0.12); color: #c4b5fd; border-color: var(--accent); }
[data-theme="dark"] .callout-warn { background: rgba(245,158,11,.1); color: #fcd34d; }
[data-theme="dark"] .callout-tip  { background: rgba(34,197,94,.1); color: #86efac; }
[data-theme="dark"] .callout-info { background: var(--accent-bg); color: var(--accent-light); }

.callout-icon { flex-shrink: 0; font-size: 16px; }

/* ── 4l. Response Tabs ── */

.response-tabs { margin: 20px 0; }

.tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.tab-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  transition: all var(--transition);
  margin-bottom: -1px;
}

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

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── 4m. Status Badges ── */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.status-2xx { background: #d1fae5; color: #065f46; }
.status-4xx { background: #fee2e2; color: #991b1b; }
.status-5xx { background: #fce7f3; color: #9d174d; }

[data-theme="dark"] .status-2xx { background: rgba(16,185,129,.15); color: #34d399; }
[data-theme="dark"] .status-4xx { background: rgba(239,68,68,.15); color: #f87171; }

/* ── 4n. Intro Cards ── */

.intro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 28px 0;
}

.intro-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
  background: var(--bg);
}

.intro-card:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  box-shadow: 0 0 0 3px var(--accent-bg);
  text-decoration: none;
  transform: translateY(-1px);
}

.intro-card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
}

.intro-card h3 { font-size: 14.5px; font-weight: 700; color: var(--text-primary); margin: 0 0 5px; }
.intro-card p  { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.55; }

/* ── 4o. Blockchain Chips ── */

.chain-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

.chain-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

/* ── 4p. Base URL Bar ── */

.base-url-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 28px;
  font-size: 13px;
  flex-wrap: wrap;
}

.base-url-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.base-url-value {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  font-size: 13px;
  word-break: break-all;
}

/* ── 4q. Search Modal ── */

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 28, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.search-overlay.open { display: flex; }

.search-modal {
  width: 100%;
  max-width: 560px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 0 16px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.search-input-wrap input {
  flex: 1;
  border: none;
  background: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}

.search-input-wrap input::placeholder { color: var(--text-tertiary); }

#searchClose {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
}

.search-results { max-height: 400px; overflow-y: auto; padding: 8px; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.search-result-item:hover { background: var(--accent-bg); }

.search-result-icon { font-size: 14px; flex-shrink: 0; }
.search-result-title { font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.search-result-section { font-size: 12px; color: var(--text-tertiary); margin-left: auto; }

.search-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* ── 4r. Mobile Sidebar Overlay ── */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 28, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 40;
  cursor: pointer;
}

.sidebar-overlay.open { display: block; }


/* ═══════════════════════════════════════════
   5. RESPONSIVE
═══════════════════════════════════════════ */

/* ── 5a. Medium screens (hide TOC) ── */
@media (max-width: 1100px) {
  .toc { display: none; }
  .content-wrapper { max-width: 100%; padding: 32px 36px 60px; }
}

/* ── 5b. Mobile (sidebar drawer + stacked layout) ── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-272px);
    width: 272px;
    z-index: 50;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-toggle { display: flex; }

  .main { margin-left: 0; }

  .header-left { width: auto; }

  .content-wrapper { padding: 24px 20px 60px; }

  /* Compress search bar on mobile */
  .search-label { display: none; }
  .search-bar kbd { display: none; }

  /* Hide header link text on mobile, keep icon */
  .header-link span { display: none; }
  .header-link { padding: 6px 8px; }

  /* Single column cards */
  .intro-grid { grid-template-columns: 1fr; }

  /* Hide endpoint description column */
  .endpoint-desc { display: none; }

  /* Tighter param table */
  .param-row { grid-template-columns: 130px 70px 1fr; gap: 8px; padding: 8px 10px; }
}

/* ── 5c. Extra-small screens ── */
@media (max-width: 480px) {
  .content h1 { font-size: 24px; }
  .content h2 { font-size: 18px; }
  .content h3 { font-size: 15px; }
  .content-wrapper { padding: 20px 16px 60px; }

  /* Stack param table vertically */
  .param-row { grid-template-columns: 1fr; gap: 4px; }

  /* Full-width base URL */
  .base-url-bar { flex-direction: column; align-items: flex-start; }
}
