/* =========================================================================
   NOVA Developer Docs — stylesheet
   Mirrors the index.html design system (dark editorial):
   #0a0a0b bg · #6366f1 accent · gold editorial accents · mono pills.
   ========================================================================= */

:root {
  /* Dark background palette (index.html parity) */
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #18181b;
  --bg-elevated: #1c1c1f;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  --border-default: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-accent: rgba(99, 102, 241, 0.5);

  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-muted: rgba(99, 102, 241, 0.15);
  --accent-glow: rgba(99, 102, 241, 0.4);
  --accent-text: #a5b4fc;

  --success: #10b981;
  --success-muted: rgba(16, 185, 129, 0.15);

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #8b8b94;

  --error: #ef4444;
  --error-muted: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.12);

  --font-family:
    "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif:
    "Fraunces", "Cormorant Garamond", "Playfair Display", Georgia,
    "Times New Roman", serif;
  --font-mono:
    "JetBrains Mono", "SFMono-Regular", "Menlo", "Consolas", monospace;

  --gold: #e8c987;
  --gold-bright: #f4d99a;
  --gold-glow: rgba(232, 201, 135, 0.35);
  --gold-tint: rgba(232, 201, 135, 0.08);
  --rule: rgba(232, 201, 135, 0.18);

  --code-bg: #0d0d10;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* =========================================================
   NAV — copied from index.html (incl. PR #110 hamburger)
   ========================================================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 var(--space-6);
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav-logo-icon svg {
  width: 32px;
  height: 32px;
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(99, 102, 241, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.6));
  }
}

.nav-logo-text {
  font-family: "Satoshi", "Inter", sans-serif;
  font-size: 19px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: 0.14em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: "Satoshi", "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--text-primary);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.nav-auth-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-login {
  display: inline-block;
  padding: 7px 16px;
  font-family: "Satoshi", "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-login:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.nav-cta {
  display: inline-block;
  padding: 8px 18px;
  font-family: "Satoshi", "Inter", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 0 16px rgba(99, 102, 241, 0.25);
}

.nav-cta:hover {
  background: var(--accent-hover);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 0 24px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
  text-decoration: none;
}

@media (max-width: 768px) {
  .nav-menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-2) var(--space-6) var(--space-5);
    background: #0c0c0e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links .nav-link {
    padding: 14px 0;
    font-size: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-auth-group {
    margin-left: 0;
    padding-left: 0;
    padding-top: var(--space-4);
    border-left: none;
  }

  .nav-auth-group .nav-login,
  .nav-auth-group .nav-cta {
    flex: 1;
    padding: 10px 16px;
    text-align: center;
  }

  .nav-inner {
    height: 56px;
  }
}

/* =========================================================
   PAGE SHELL — sidebar + content
   ========================================================= */

.docs-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 112px var(--space-6) var(--space-16);
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: var(--space-12);
  align-items: start;
}

/* --- Sidebar TOC --- */

.docs-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: var(--space-2);
  scrollbar-width: thin;
}

.docs-sidebar-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  margin-bottom: var(--space-3);
  display: block;
}

.docs-toc {
  list-style: none;
  border-left: 1px solid var(--border-default);
}

.docs-toc li {
  margin: 0;
}

.docs-toc a {
  display: block;
  padding: 5px 0 5px 14px;
  font-size: 13px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition:
    color 0.12s ease,
    border-color 0.12s ease;
  line-height: 1.45;
}

.docs-toc a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.docs-toc a.active {
  color: var(--accent-text);
  border-left-color: var(--accent);
}

.docs-toc a.toc-sub {
  padding-left: 26px;
  font-size: 12.5px;
}

/* Mobile "on this page" */
.docs-toc-mobile {
  display: none;
  margin-bottom: var(--space-8);
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}

.docs-toc-mobile summary {
  cursor: pointer;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  list-style: none;
}

.docs-toc-mobile summary::-webkit-details-marker {
  display: none;
}

.docs-toc-mobile summary::after {
  content: "+";
  float: right;
  color: var(--text-muted);
}

.docs-toc-mobile[open] summary::after {
  content: "–";
}

.docs-toc-mobile .docs-toc {
  border-left: none;
  padding: 0 var(--space-5) var(--space-4);
}

.docs-toc-mobile .docs-toc a {
  border-left: none;
  margin-left: 0;
  padding-left: 0;
  border-bottom: 1px solid var(--border-subtle);
  padding-top: 9px;
  padding-bottom: 9px;
}

.docs-toc-mobile .docs-toc a.toc-sub {
  padding-left: 16px;
}

/* --- Content column --- */

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

/* Page header */
.docs-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-4);
}

.docs-eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

.docs-title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}

.docs-lede {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 64ch;
  margin-bottom: var(--space-6);
}

.docs-header {
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-10);
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.docs-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--gold);
  opacity: 0.85;
}

/* Base-URL strip */
.base-url-strip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--text-secondary);
}

.base-url-strip strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Sections */
.docs-section {
  margin-bottom: var(--space-16);
  scroll-margin-top: 96px;
}

.docs-section h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
  padding-top: var(--space-4);
}

.docs-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: var(--space-8) 0 var(--space-3);
  scroll-margin-top: 96px;
}

.docs-section h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: var(--space-6) 0 var(--space-2);
}

.docs-section p,
.docs-section ul,
.docs-section ol {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  max-width: 72ch;
}

.docs-section ul,
.docs-section ol {
  padding-left: 1.4rem;
}

.docs-section li {
  margin-bottom: 6px;
}

.docs-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Inline code */
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  color: var(--text-primary);
  word-break: break-word;
}

/* Code blocks + copy button */
.code-block {
  position: relative;
  margin: var(--space-3) 0 var(--space-5);
}

.code-block pre {
  background: var(--code-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  overflow-x: auto;
}

.code-block pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #d4d4d8;
  white-space: pre;
  word-break: normal;
}

.code-block .code-lang {
  position: absolute;
  top: 13px;
  right: 70px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  pointer-events: none;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.copy-btn.copied {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.4);
}

/* Endpoint cards */
.endpoint {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-4) 0;
  scroll-margin-top: 96px;
}

.endpoint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-2);
}

.endpoint-head code.path {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.endpoint > p {
  font-size: 14px;
  margin-bottom: var(--space-3);
}

.endpoint > p:last-child,
.endpoint .code-block:last-child,
.endpoint table:last-child {
  margin-bottom: 0;
}

/* Method pills — mono pills, color-coded */
.method {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  border: 1px solid;
}

.method.get {
  color: #34d399;
  background: var(--success-muted);
  border-color: rgba(16, 185, 129, 0.35);
}

.method.post {
  color: var(--accent-text);
  background: var(--accent-muted);
  border-color: rgba(99, 102, 241, 0.4);
}

.method.delete {
  color: #f87171;
  background: var(--error-muted);
  border-color: rgba(239, 68, 68, 0.35);
}

/* Auth / flag badges */
.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--gold-tint);
  border: 1px solid rgba(232, 201, 135, 0.22);
}

.badge.open-badge {
  color: var(--text-muted);
  background: var(--bg-glass);
  border-color: var(--border-default);
}

/* Tables */
.docs-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: var(--space-3) 0 var(--space-5);
}

.docs-section th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--border-default);
}

.docs-section td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}

.docs-section td:first-child {
  white-space: nowrap;
}

/* Callouts */
.callout {
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-4) 0 var(--space-5);
  font-size: 14px;
  color: var(--text-secondary);
  max-width: none;
}

.callout strong {
  color: var(--text-primary);
}

.callout.gold {
  border-left-color: var(--gold);
  background: var(--gold-tint);
}

.callout.warn {
  border-left-color: var(--warning);
  background: var(--warning-muted);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Section divider ornament */
.section-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: var(--space-12) 0;
  position: relative;
}

/* =========================================================
   FOOTER — index.html parity
   ========================================================= */

.footer {
  text-align: center;
  padding: var(--space-12) var(--space-6) var(--space-8);
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--rule);
  position: relative;
  margin-top: var(--space-16);
}

.footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 3px;
  background: var(--gold);
  opacity: 0.85;
}

.footer a {
  color: var(--accent-text);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer p,
.footer-links a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-4);
}

.footer-compliance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  justify-content: center;
  margin: var(--space-4) auto 0;
  max-width: 720px;
}

.hero-compliance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(232, 201, 135, 0.06);
  border: 1px solid rgba(232, 201, 135, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

.hero-compliance-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(232, 201, 135, 0.6);
}

.footer-stamp {
  margin-top: var(--space-5);
}

.edition-stamp {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: 0.72;
}

.edition-stamp .edition-stamp-num {
  color: var(--gold);
  opacity: 0.9;
}

.edition-stamp .edition-stamp-sep {
  color: var(--text-muted);
  opacity: 0.45;
}

.edition-stamp .edition-stamp-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 960px) {
  .docs-shell {
    grid-template-columns: 1fr;
    padding-top: 96px;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-toc-mobile {
    display: block;
  }
}

@media (max-width: 640px) {
  .docs-shell {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .endpoint {
    padding: var(--space-4);
  }

  .code-block pre {
    padding: var(--space-4);
  }

  .code-block pre code {
    font-size: 12px;
  }

  .docs-section td:first-child {
    white-space: normal;
  }
}
