/* Shared styles for legal + docs pages */
:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #161616;
  --text: #ededed;
  --text-secondary: #888888;
  --text-tertiary: #555555;
  --accent: #3dff7a;
  --accent-hover: #2bcc66;
  --accent-glow: rgba(61, 255, 122, 0.12);
  --border: #1e1e1e;
  --border-hover: #2a2a2a;
  --max-width: 1120px;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  padding: 0 20px 40px;
}

/* Navigation */
.legal-nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-nav .dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.legal-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.2s;
}

.legal-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.legal-nav .brand {
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-nav .separator {
  color: var(--border);
  margin: 0 4px;
}

.legal-page {
  max-width: 720px;
  margin: 0 auto;
}

h1 {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--accent);
}

.updated {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 40px;
}

section {
  margin-bottom: 32px;
}

h2 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--text);
}

p {
  margin-bottom: 12px;
}

ul, ol {
  margin-left: 24px;
  margin-bottom: 12px;
}

li {
  margin-bottom: 8px;
}

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

a:hover {
  text-decoration: underline;
}

strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Site Nav (shared across docs) ── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 18px; font-weight: 700; letter-spacing: -0.5px;
  display: flex; align-items: center; gap: 8px;
  color: var(--text);
}
.nav-logo .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.nav-logo:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 14px; color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 8px;
  background: var(--accent); color: #000;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent-hover); text-decoration: none; }

/* When site-nav is present, remove body padding (docs pages) */
body:has(.site-nav) {
  padding: 0;
}

/* ── Docs Layout ── */
.docs-layout {
  display: flex;
  max-width: var(--max-width);
  margin: 80px auto 0;
  padding: 24px;
  gap: 32px;
}
.docs-sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  height: fit-content;
}
.docs-sidebar a {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 14px;
}
.docs-sidebar a:hover { color: var(--text); background: var(--bg-elevated); text-decoration: none; }
.docs-sidebar a.active { color: var(--accent); background: var(--accent-glow); }
.docs-content {
  flex: 1;
  min-width: 0;
  max-width: 720px;
}
.docs-content h1 {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--accent);
}
.docs-content .subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 40px;
}

/* Docs shared code/pre styling */
.docs-content code {
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.docs-content pre {
  background: var(--bg);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.docs-content pre code { padding: 0; background: none; }

/* Docs note box */
.docs-content .note {
  background: rgba(61, 255, 122, 0.08);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
}
.docs-content .note strong { color: var(--accent); }

/* Docs tables */
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.docs-content th, .docs-content td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.docs-content th { color: var(--text-secondary); font-weight: 500; }

/* Docs cards */
.doc-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.doc-card:hover { border-color: var(--border-hover); }
.doc-card h3 { margin-bottom: 8px; color: var(--accent); }
.doc-card h3 a:hover { text-decoration: none; }
.doc-card p { color: var(--text-secondary); margin: 0; }

/* Docs quickstart */
.quickstart {
  background: rgba(61, 255, 122, 0.08);
  border: 1px solid rgba(61, 255, 122, 0.2);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}
.quickstart h3 { color: var(--accent); margin-bottom: 16px; }
.quickstart ol { margin: 0; padding-left: 20px; }
.quickstart li { margin-bottom: 12px; }

/* Docs requirement */
.requirement {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: 8px;
  margin-bottom: 8px;
}
.requirement .check { color: var(--accent); font-weight: 700; }

/* Docs feature box */
.feature-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}
.feature-box h3 { color: var(--accent); margin-bottom: 8px; }

/* Docs timeline */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
}

/* Docs upgrade tiers */
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.tier {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.tier h4 { margin: 0 0 8px 0; color: var(--accent); }
.tier .price { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.tier ul { margin: 0; padding-left: 20px; color: var(--text-secondary); }
.tier li { margin-bottom: 4px; }

/* Docs step indicators */
.step {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.step-content h3 { margin: 0 0 8px 0; color: var(--text); }
.step-content p { margin: 0; color: var(--text-secondary); }

/* Tool card for API reference */
.tool-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.tool-card h3 {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 15px;
  margin-bottom: 8px;
}
.tool-card p { color: var(--text-secondary); margin-bottom: 8px; }
.tool-card .params { margin-top: 12px; }
.tool-card .params dt {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  margin-top: 8px;
}
.tool-card .params dd {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 16px;
}

/* ── Mobile responsive for docs ── */
@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .docs-layout {
    flex-direction: column;
    margin-top: 60px;
    padding: 16px;
    gap: 16px;
  }
  .docs-sidebar {
    width: 100%;
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .docs-sidebar a { display: inline-block; }
  .tiers { grid-template-columns: 1fr; }
}
