:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #181822;
  --fg: #e8e8ed;
  --fg-muted: #8888a0;
  --accent: #4ade80;
  --accent-dim: rgba(74, 222, 128, 0.12);
  --accent-glow: rgba(74, 222, 128, 0.25);
  --danger: #f87171;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 12px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Hero ── */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(74, 222, 128, 0.06) 0%, transparent 70%),
    var(--bg);
}

.hero-grid {
  max-width: 820px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid rgba(74, 222, 128, 0.15);
  margin-bottom: 40px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: #fff;
}

.hero-sub {
  font-size: 19px;
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 auto 56px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat { text-align: center; }

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 4px;
  max-width: 160px;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* ── Section Tags ── */
.section-tag {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 20px;
}

/* ── Problem ── */
.problem {
  padding: 120px 24px;
  background: var(--bg-elevated);
}

.problem-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.problem h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 56px;
  max-width: 700px;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
}

.problem-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
  border-radius: 10px;
  margin-bottom: 20px;
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.problem-card p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ── How It Works ── */
.how {
  padding: 120px 24px;
  background: var(--bg);
}

.how-inner {
  max-width: 720px;
  margin: 0 auto;
}

.how h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 64px;
}

.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

.pipe-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.pipe-content h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.pipe-content p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.65;
}

.pipe-connector {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-glow), transparent);
  margin-left: 23px;
}

/* ── Features ── */
.features {
  padding: 120px 24px;
  background: var(--bg-elevated);
}

.features-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.features h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 56px;
  max-width: 600px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
}

.feature-highlight {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(74, 222, 128, 0.04) 100%);
  border-color: rgba(74, 222, 128, 0.12);
}

.feature-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ── Closing ── */
.closing {
  padding: 140px 24px;
  background: var(--bg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.closing-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.closing-accent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 24px;
}

.closing-text {
  font-size: 19px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Footer ── */
.footer {
  padding: 48px 24px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--fg-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .problem-grid {
    grid-template-columns: 1fr;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .feature-highlight {
    grid-column: auto;
  }
  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }
  .stat-divider {
    width: 48px;
    height: 1px;
  }
  .hero {
    min-height: auto;
    padding: 60px 20px;
  }
  .problem, .how, .features, .closing {
    padding: 80px 20px;
  }
}

@media (max-width: 480px) {
  .pipe-step {
    gap: 20px;
  }
}

/* ── Hero CTA buttons ── */
.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #000;
  background: var(--accent);
  padding: 14px 28px;
  border-radius: 100px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  background: transparent;
  padding: 14px 28px;
  border-radius: 100px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.18); color: #fff; }

/* ═══════════════════════════════════════════════════════
   DEMO PAGE
═══════════════════════════════════════════════════════ */

.demo-body { background: var(--bg); }

/* ── Demo Nav ── */
.demo-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.demo-nav-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.demo-nav-right { display: flex; align-items: center; gap: 16px; }
.lang-btn {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.lang-btn:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }
.demo-cta-nav { padding: 10px 22px; font-size: 13px; }

/* ── Demo Hero ── */
.demo-hero {
  padding: 80px 24px 48px;
  text-align: center;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(74,222,128,0.05) 0%, transparent 70%);
}
.demo-hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid rgba(74,222,128,0.15);
  margin-bottom: 28px;
}
.demo-hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fff;
  max-width: 760px;
  margin: 0 auto 20px;
}
.demo-hero-sub {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Main ── */
.demo-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── Examples ── */
.example-prompts {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-top: 8px;
}
.example-label {
  font-size: 13px;
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-weight: 500;
}
.example-btn {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.example-btn:hover { color: var(--fg); border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); }

/* ── Scanner layout ── */
.scanner-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

/* ── Cards ── */
.scanner-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.card-badge {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 100px;
}
.input-badge { background: rgba(74,222,128,0.1); color: var(--accent); }
.audit-badge { background: rgba(255,255,255,0.06); color: var(--fg-muted); }

/* Legend */
.legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-muted); }
.dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.dot-red    { background: rgba(248,113,113,0.8); }
.dot-orange { background: rgba(251,146,60,0.8); }
.dot-purple { background: rgba(167,139,250,0.8); }

/* ── Textarea ── */
.scanner-textarea {
  width: 100%;
  min-height: 320px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}
.scanner-textarea::placeholder { color: rgba(136,136,160,0.5); }

.scanner-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
}
.char-count { font-size: 12px; color: var(--fg-muted); }

.btn-scan {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #000;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-scan:hover { opacity: 0.88; }
.btn-scan:disabled { opacity: 0.5; cursor: default; }
.scan-icon { font-size: 16px; }
.spin { display: inline-block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Annotated output ── */
.annotated-text {
  padding: 20px 24px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 280px;
}

.highlight {
  border-radius: 3px;
  padding: 1px 2px;
  cursor: pointer;
  position: relative;
  transition: opacity 0.1s;
}
.highlight:hover { opacity: 0.85; }
.highlight-red    { background: rgba(248,113,113,0.22); border-bottom: 2px solid rgba(248,113,113,0.8); }
.highlight-orange { background: rgba(251,146,60,0.22);  border-bottom: 2px solid rgba(251,146,60,0.8); }
.highlight-purple { background: rgba(167,139,250,0.22); border-bottom: 2px solid rgba(167,139,250,0.8); }

.btn-reset {
  display: block;
  width: calc(100% - 48px);
  margin: 0 24px 20px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: color 0.15s;
}
.btn-reset:hover { color: var(--fg); }

/* ── Tooltip ── */
.highlight-tooltip {
  position: absolute;
  z-index: 9999;
  max-width: 300px;
  background: #1a1a28;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 14px;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.tt-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 4px;
}
.tt-rule {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.tt-reason {
  display: block;
  font-size: 13px;
  color: var(--fg);
  line-height: 1.5;
}

/* ── Audit card ── */
.audit-card { min-height: 300px; }

.audit-placeholder {
  padding: 48px 24px;
  text-align: center;
  color: var(--fg-muted);
}
.audit-placeholder-icon { font-size: 32px; margin-bottom: 16px; opacity: 0.4; }
.audit-placeholder p { font-size: 14px; line-height: 1.6; }

.audit-field {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.audit-field:last-of-type { border-bottom: none; }
.audit-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--fg-muted);
  min-width: 130px;
  flex-shrink: 0;
  padding-top: 2px;
}
.audit-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--fg);
  word-break: break-all;
}
.mono { font-family: 'JetBrains Mono', monospace; }
.status-flagged { color: #f87171; font-weight: 600; }
.status-clear   { color: var(--accent); font-weight: 600; }

.audit-divider { height: 1px; background: var(--border); margin: 0; }

.audit-violations { padding: 12px 20px; display: flex; flex-direction: column; gap: 10px; }
.audit-violation {
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid;
}
.audit-violation-red    { background: rgba(248,113,113,0.07); border-color: rgba(248,113,113,0.5); }
.audit-violation-orange { background: rgba(251,146,60,0.07);  border-color: rgba(251,146,60,0.5); }
.audit-violation-purple { background: rgba(167,139,250,0.07); border-color: rgba(167,139,250,0.5); }
.avr-id {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 3px;
}
.avr-text {
  display: block;
  font-size: 13px;
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 4px;
}
.avr-reason { display: block; font-size: 12px; color: var(--fg-muted); line-height: 1.4; }

.btn-download {
  display: block;
  width: calc(100% - 40px);
  margin: 16px 20px 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(74,222,128,0.15);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-download:hover { opacity: 0.85; }

.audit-disclaimer {
  font-size: 11px;
  color: rgba(136,136,160,0.6);
  text-align: center;
  padding: 10px 20px 16px;
  line-height: 1.5;
}

/* ── Severity gauge ── */
.severity-card { margin-top: 16px; }
.severity-gauge { padding: 24px 24px 20px; text-align: center; }
.severity-arc-wrap { position: relative; display: inline-block; }
.severity-svg { width: 160px; height: 90px; }
.severity-score-display {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.severity-max { font-size: 16px; color: var(--fg-muted); font-weight: 400; }
.severity-label { font-size: 14px; font-weight: 600; margin-top: 8px; font-family: var(--font-display); }

/* ── Demo CTA section ── */
.demo-cta-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 100px 24px;
  text-align: center;
}
.demo-cta-inner { max-width: 600px; margin: 0 auto; }
.demo-cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.demo-cta-inner p {
  font-size: 17px;
  color: var(--fg-muted);
  margin-bottom: 36px;
  line-height: 1.7;
}
.btn-large { padding: 16px 36px; font-size: 16px; }

/* ── Demo Footer ── */
.demo-footer {
  padding: 32px 24px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-sep { color: var(--border); }
.footer-link { color: var(--fg-muted); font-size: 14px; text-decoration: none; }
.footer-link:hover { color: var(--fg); }

/* ── Responsive demo ── */
@media (max-width: 900px) {
  .scanner-layout { grid-template-columns: 1fr; }
  .scanner-right { order: -1; }
}
@media (max-width: 600px) {
  .demo-nav { padding: 16px 20px; }
  .demo-main { padding: 0 16px 60px; }
  .example-prompts { gap: 8px; }
  .scanner-textarea { min-height: 220px; }
}

/* ── Demo CTA docs link ── */
.demo-docs-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.demo-docs-link:hover { opacity: 1; }

/* ── Footer Nav Links ── */
.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.footer-nav-link {
  color: var(--fg-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-nav-link:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════
   DEVELOPER DOCS
═══════════════════════════════════════════════════ */

/* ── Docs body & layout ── */
.docs-body { background: var(--bg); color: var(--fg); font-family: var(--font-body); }

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  padding-top: 60px; /* topnav height */
}

/* ── Docs Top Nav ── */
.docs-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 100;
}
.docs-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.docs-topnav-center {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}
.docs-topnav-label {
  font-size: 13px;
  color: var(--fg-muted);
}
.docs-topnav-version {
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(74,222,128,0.2);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}
.docs-topnav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.docs-topnav-link {
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.docs-topnav-link:hover { color: var(--fg); }
.docs-cta {
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 8px;
}

/* ── Sidebar ── */
.docs-sidebar {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: 32px 0 48px;
  scrollbar-width: thin;
}
.docs-sidenav { padding: 0 20px; }
.docs-sidenav-section { margin-bottom: 28px; }
.docs-sidenav-heading {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--fg-muted);
  font-family: var(--font-display);
  margin-bottom: 8px;
  padding: 0 4px;
}
.docs-sidenav-link {
  display: block;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
  margin-bottom: 2px;
}
.docs-sidenav-link:hover { color: var(--fg); background: rgba(255,255,255,0.04); }
.docs-sidenav-link.active { color: var(--accent); background: var(--accent-dim); font-weight: 500; }

/* ── Main content ── */
.docs-main {
  padding: 48px 64px 80px;
  max-width: 860px;
}

/* ── Sections ── */
.docs-section {
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}
.docs-section:last-of-type { border-bottom: none; }

.docs-section-header { margin-bottom: 32px; }
.docs-section-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  font-family: var(--font-display);
  margin-bottom: 12px;
}
.docs-h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
}
.docs-h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 12px;
}
.docs-h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
  margin: 32px 0 16px;
}
.docs-lead {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.7;
}
.docs-body-text {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin: 12px 0;
}
.docs-link { color: var(--accent); text-decoration: none; }
.docs-link:hover { text-decoration: underline; }

/* ── Steps ── */
.docs-step {
  display: flex;
  gap: 20px;
  margin: 28px 0;
}
.docs-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(74,222,128,0.3);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.docs-step-body { flex: 1; min-width: 0; }
.docs-step-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 10px;
}
.docs-step-text {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ── Tabs ── */
.docs-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}
.docs-tab {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-display);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  color: var(--fg-muted);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: color 0.12s, background 0.12s;
}
.docs-tab:hover { color: var(--fg); }
.docs-tab.active {
  background: #1e1e2e;
  color: var(--accent);
  border-color: var(--border);
  border-bottom: 1px solid #1e1e2e;
}

/* ── Code blocks ── */
.docs-code-block {
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 12px 0 20px;
  overflow: hidden;
}
.docs-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.docs-code-lang {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.docs-copy-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  padding: 4px 10px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.docs-copy-btn:hover { color: var(--fg); background: rgba(255,255,255,0.06); }
.docs-pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.docs-pre code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #cdd6f4;
  white-space: pre;
}

/* ── Callouts ── */
.docs-callout {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  margin: 16px 0;
  align-items: flex-start;
}
.docs-callout-icon { flex-shrink: 0; font-size: 16px; margin-top: 1px; }
.docs-callout-tip { background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.2); color: var(--fg-muted); }
.docs-callout-info { background: rgba(99,179,237,0.08); border: 1px solid rgba(99,179,237,0.2); color: var(--fg-muted); }
.docs-callout-warning { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); color: var(--fg-muted); }

/* ── Endpoint meta ── */
.docs-endpoint-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 28px;
  flex-wrap: wrap;
}
.docs-method {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 6px;
}
.docs-method-post { background: rgba(74,222,128,0.15); color: var(--accent); border: 1px solid rgba(74,222,128,0.3); }
.docs-method-get  { background: rgba(99,179,237,0.15); color: #63b3ed; border: 1px solid rgba(99,179,237,0.3); }
.docs-endpoint-url { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--fg); }

/* ── Tables ── */
.docs-table-wrap { overflow-x: auto; margin: 16px 0; }
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.docs-table th {
  text-align: left;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.docs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--fg-muted);
  vertical-align: top;
  line-height: 1.5;
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-type { color: #63b3ed; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.docs-required { color: var(--accent); font-size: 12px; font-weight: 600; }
.docs-optional { color: var(--fg-muted); font-size: 12px; }

/* ── Policy packs ── */
.docs-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.docs-policy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.docs-policy-id code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
}
.docs-policy-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--fg);
  margin: 8px 0 6px;
}
.docs-policy-desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}
.docs-policy-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.docs-tag {
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-display);
  padding: 3px 9px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--fg-muted);
}
.docs-tag-soon { background: rgba(251,191,36,0.1); color: #fbbf24; border-color: rgba(251,191,36,0.2); }
.docs-tag-enterprise { background: rgba(99,179,237,0.1); color: #63b3ed; border-color: rgba(99,179,237,0.2); }

/* ── Tamper evidence grid ── */
.docs-tamper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.docs-tamper-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.docs-tamper-icon { font-size: 24px; margin-bottom: 10px; }
.docs-tamper-card h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}
.docs-tamper-card p {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.55;
}

/* ── SLA grid ── */
.docs-sla-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.docs-sla-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 20px;
  text-align: center;
}
.docs-sla-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.docs-sla-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-top: 8px;
}
.docs-sla-sub {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* ── SDK grid ── */
.docs-sdk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.docs-sdk-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 20px;
  text-align: center;
}
.docs-sdk-soon { opacity: 0.65; }
.docs-sdk-icon { font-size: 32px; margin-bottom: 10px; }
.docs-sdk-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}
.docs-sdk-pkg { font-size: 12px; color: var(--fg-muted); margin-bottom: 10px; }
.docs-sdk-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-display);
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(251,191,36,0.1);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.2);
}

/* ── CTA Section ── */
.docs-cta-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 52px 40px;
  text-align: center;
  margin-top: 16px;
}
.docs-cta-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.docs-cta-sub {
  font-size: 16px;
  color: var(--fg-muted);
  margin-bottom: 28px;
}
.docs-cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.docs-cta-btn {
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 8px;
}
.docs-cta-btn-ghost {
  display: inline-block;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color 0.15s, border-color 0.15s;
}
.docs-cta-btn-ghost:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }

/* ── Lang btn (shared) ── */
.lang-btn {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.lang-btn:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }

/* ── Responsive docs ── */
@media (max-width: 1024px) {
  .docs-main { padding: 40px 40px 80px; }
}
@media (max-width: 768px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px;
  }
  .docs-sidenav { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; }
  .docs-sidenav-section { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 0; }
  .docs-sidenav-heading { display: none; }
  .docs-main { padding: 32px 20px 60px; }
  .docs-sla-grid, .docs-sdk-grid { grid-template-columns: 1fr 1fr; }
  .docs-topnav-center { display: none; }
}
