/* ========================================
   Badlands Labs - Warm Editorial Documentation Wiki
   ======================================== */

/* ---- CSS Variables ---- */
:root {
  --bg-cream: #F7F4ED;
  --bg-page: #F5F2EB;
  --ink-dark: #1F1D1A;
  --ink-light: #2D2A26;
  --gold-accent: #B8862B;
  --gold-light: #D4A84B;
  --gold-muted: #C9A55C;
  --border-warm: #E5DFD2;
  --border-light: #EDEAE2;
  --text-primary: #2C2825;
  --text-muted: #6B635A;
  --text-light: #8A8379;
  --card-bg: #FFFFFF;
  --hover-bg: #FAF8F3;
  --success: #4A7C59;
  --warning: #C4842D;
  --error: #A63D3D;

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(31, 29, 26, 0.04);
  --shadow-md: 0 4px 12px rgba(31, 29, 26, 0.08);
  --shadow-lg: 0 8px 32px rgba(31, 29, 26, 0.12);

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;

  --sidebar-width: 280px;
  --mobile-header-height: 56px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: var(--ink-dark);
}

h1 { font-size: 3rem; letter-spacing: 0.04em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; font-family: var(--font-body); font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--gold-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--gold-light); }

/* ---- Layout ---- */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--card-bg);
  border-right: 1px solid var(--border-warm);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  -webkit-user-select: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink-dark);
  letter-spacing: 0.05em;
}

.brand-name em {
  font-style: normal;
  color: var(--gold-accent);
}

/* Sidebar Search */
.sidebar-search {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  font-size: 0.875rem;
  font-family: var(--font-body);
  background: var(--bg-cream);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

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

.search-input:focus {
  outline: none;
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 3px rgba(184, 134, 43, 0.1);
}

.search-kbd {
  position: absolute;
  right: 10px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: 4px;
  color: var(--text-light);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-group {
  margin-bottom: 4px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.nav-group-toggle:hover {
  color: var(--ink-dark);
  background: var(--hover-bg);
}

.nav-group-toggle svg {
  color: var(--text-light);
  transition: transform var(--transition-fast);
}

.nav-group.open .nav-group-toggle svg {
  transform: rotate(180deg);
}

.nav-group-content {
  display: none;
  padding: 4px 0 8px;
}

.nav-group.open .nav-group-content {
  display: block;
}

.nav-link {
  display: block;
  padding: 6px 20px 6px 32px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: var(--gold-muted);
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.nav-link:hover {
  color: var(--ink-dark);
  background: var(--hover-bg);
}

.nav-link:hover::before { opacity: 0.5; }

.nav-link.active {
  color: var(--gold-accent);
  font-weight: 500;
}

.nav-link.active::before { opacity: 1; }

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link {
  display: block;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.sidebar-link:not(.primary) {
  color: var(--text-muted);
  background: transparent;
}

.sidebar-link:not(.primary):hover {
  color: var(--ink-dark);
  background: var(--hover-bg);
}

.sidebar-link.primary {
  background: var(--ink-dark);
  color: var(--card-bg);
}

.sidebar-link.primary:hover {
  background: var(--ink-light);
  color: var(--card-bg);
}

/* ---- Main Content ---- */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
}

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mobile-header-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-warm);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.menu-toggle:hover { background: var(--hover-bg); }

.mobile-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  color: var(--ink-dark);
}

.mobile-dashboard {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
}

.mobile-dashboard:hover { color: var(--gold-accent); }

/* ---- Content ---- */
.content {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 48px 96px;
}

/* ---- Documentation Sections ---- */
.doc-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-light);
}

.doc-section:last-child {
  border-bottom: none;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 12px;
}

.section-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.section-heading {
  font-size: 1.625rem;
  margin-bottom: 12px;
}

.section-subheading {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 16px;
}

.section-meta {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

/* ---- Feature Grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition-fast);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-cream);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--gold-accent);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ---- Step List ---- */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--ink-dark);
  color: var(--card-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  flex-shrink: 0;
}

.step-content h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---- Callouts ---- */
.callout {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  margin: 20px 0;
}

.callout-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-content strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.callout-content p {
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.6;
}

.callout-info {
  background: #F0F4F8;
  border-left: 3px solid #4A90A4;
}

.callout-info .callout-icon { color: #4A90A4; }
.callout-info .callout-content strong { color: #2C5282; }
.callout-info .callout-content p { color: #4A5568; }

.callout-warning {
  background: #FFFAF0;
  border-left: 3px solid var(--warning);
}

.callout-warning .callout-icon { color: var(--warning); }
.callout-warning .callout-content strong { color: #744210; }
.callout-warning .callout-content p { color: #744210; }

/* ---- Code Blocks ---- */
.code-block {
  background: #1A1917;
  border-radius: var(--radius-md);
  margin: 16px 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #252420;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--gold-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.copy-btn.copied {
  background: var(--success);
  color: white;
}

.code-content {
  padding: 18px 20px;
  overflow-x: auto;
}

.code-content pre {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: #DDD8CF;
  margin: 0;
  white-space: pre;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-cream);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--gold-accent);
}

/* ---- Endpoint Table ---- */
.endpoint-table {
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 16px 0;
}

.endpoint-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-light);
}

.endpoint-row:last-child { border-bottom: none; }

.endpoint-row:hover { background: var(--hover-bg); }

.endpoint-method {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  width: fit-content;
}

.endpoint-method.get {
  background: #E8F5E9;
  color: #2E7D32;
}

.endpoint-method.post {
  background: #E3F2FD;
  color: #1565C0;
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-dark);
  word-break: break-all;
}

.endpoint-desc {
  font-size: 0.8125rem;
  color: var(--text-light);
  text-align: right;
}

/* ---- SDK Tabs ---- */
.sdk-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-cream);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  width: fit-content;
}

.sdk-tab {
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sdk-tab:hover { color: var(--ink-dark); }

.sdk-tab.active {
  background: var(--card-bg);
  color: var(--ink-dark);
  box-shadow: var(--shadow-sm);
}

.sdk-panel { display: none; }
.sdk-panel.active { display: block; }

.sdk-panel h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

.sdk-panel h4:first-child { margin-top: 0; }

/* ---- Status Grid ---- */
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.status-card {
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 16px;
}

.status-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.operational { background: var(--success); }
.status-dot.degraded { background: var(--warning); }
.status-dot.outage { background: var(--error); }

.status-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.status-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink-dark);
  margin-bottom: 4px;
}

.status-meta {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ---- Uptime Chart ---- */
.uptime-chart {
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.chart-legend {
  display: flex;
  gap: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.bars-container {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 64px;
  padding: 4px 0;
}

.bar {
  flex: 1;
  min-width: 4px;
  max-width: 10px;
  background: var(--success);
  border-radius: 2px 2px 0 0;
  opacity: 0.25;
  transition: opacity var(--transition-fast);
}

.bar:hover { opacity: 1; }
.bar.degraded { background: var(--warning); }
.bar.outage { background: var(--error); }

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.6875rem;
  color: var(--text-light);
}

/* ---- Latency Grid ---- */
.latency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.latency-card {
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.latency-value {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  color: var(--ink-dark);
  margin-bottom: 4px;
}

.latency-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.latency-bar {
  height: 4px;
  background: var(--border-warm);
  border-radius: 2px;
  overflow: hidden;
}

.latency-fill {
  height: 100%;
  background: var(--gold-accent);
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* ---- Throughput Stats ---- */
.throughput-stats {
  display: flex;
  gap: 24px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  margin-top: 20px;
}

.stat {
  flex: 1;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink-dark);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* ---- Incident List ---- */
.incident-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.incident {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
}

.incident-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.incident-indicator.resolved { background: var(--success); }
.incident-indicator.degraded { background: var(--warning); }
.incident-indicator.outage { background: var(--error); }

.incident-content { flex: 1; }

.incident-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.incident-header strong {
  font-size: 0.9375rem;
  color: var(--ink-dark);
}

.incident-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  background: #E8F5E9;
  color: var(--success);
  border-radius: 4px;
}

.incident-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---- Contact Cards ---- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--gold-accent);
}

.contact-card h3 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-card p {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.contact-card a {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---- Support Form ---- */
.support-form-wrapper {
  margin-top: 32px;
}

.support-form-wrapper h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.support-form {
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.9375rem;
  font-family: var(--font-body);
  background: var(--bg-cream);
  border: 1.5px solid var(--border-warm);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 3px rgba(184, 134, 43, 0.12);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--ink-dark);
  color: var(--card-bg);
}

.btn-primary:hover {
  background: var(--ink-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ---- Form Success ---- */
.form-success {
  display: none;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #F0F7F1;
  border: 1px solid #C8E6C9;
  border-radius: var(--radius-lg);
  margin-top: 16px;
}

.form-success.visible { display: flex; }

.success-icon {
  width: 44px;
  height: 44px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.success-content strong {
  display: block;
  font-size: 1rem;
  color: var(--ink-dark);
  margin-bottom: 2px;
}

.success-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---- FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--ink-dark);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.faq-question:hover { background: var(--hover-bg); }

.faq-question svg {
  color: var(--text-light);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 16px;
}

.faq-item.open .faq-answer { display: block; }

.faq-answer p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---- Legal Content ---- */
.legal-content {
  margin-top: 24px;
}

.legal-content h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border-warm);
}

.legal-content h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal-content p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.legal-content ul {
  margin: 12px 0;
  padding-left: 24px;
}

.legal-content li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.65;
}

.legal-content li strong {
  color: var(--text-primary);
}

/* ---- Mobile Drawer ---- */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(31, 29, 26, 0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.drawer-overlay.visible {
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: var(--card-bg);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

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

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-warm);
}

.drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.drawer-close:hover {
  background: var(--hover-bg);
  color: var(--ink-dark);
}

.drawer-nav {
  flex: 1;
  padding: 12px 0;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }

  .content {
    padding: 40px 40px 80px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .drawer-overlay {
    display: block;
    pointer-events: none;
  }

  .drawer-overlay.visible {
    pointer-events: auto;
  }

  .main {
    margin-left: 0;
  }

  .mobile-header {
    display: flex;
  }

  .content {
    padding: 72px 20px 60px;
    max-width: 100%;
  }

  .section-title {
    font-size: 1.875rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .contact-cards {
    grid-template-columns: 1fr;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .latency-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .throughput-stats {
    flex-direction: column;
    gap: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .endpoint-table {
    overflow-x: auto;
  }

  .endpoint-row {
    grid-template-columns: 60px 1fr;
  }

  .endpoint-desc {
    display: none;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 68px 16px 48px;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.625rem; }

  .sdk-tabs {
    width: 100%;
  }

  .sdk-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
  }
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.doc-section {
  animation: fadeIn 0.4s ease both;
}

.doc-section:nth-child(2) { animation-delay: 0.05s; }
.doc-section:nth-child(3) { animation-delay: 0.1s; }
.doc-section:nth-child(4) { animation-delay: 0.15s; }
.doc-section:nth-child(5) { animation-delay: 0.2s; }

/* Copy button micro-animation */
@keyframes copyPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.copy-btn.copied {
  animation: copyPulse 0.2s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-warm);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}