/* Shared design tokens + site header/footer (used by index + legal pages) */

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

:root {
  --primary: #4f6ef5;
  --primary-light: #7b93f8;
  --primary-dark: #3b55d4;
  --primary-glow: rgba(79, 110, 245, 0.15);
  --accent: #38bdf8;
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --bg-card: #ffffff;
  --text: #111827;
  --text-mid: #374151;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f0f1f3;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.07);
  --shadow-glow: 0 0 60px rgba(79, 110, 245, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-height: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #7b93f8;
    --primary-light: #a5b6fa;
    --primary-dark: #5a73e8;
    --primary-glow: rgba(123, 147, 248, 0.1);
    --accent: #38bdf8;
    --bg: #0a0e1a;
    --bg-alt: #0f1424;
    --bg-card: #161d30;
    --text: #f0f2f5;
    --text-mid: #c9cdd4;
    --text-muted: #8790a0;
    --text-faint: #555e70;
    --border: #1f2940;
    --border-light: #1a2235;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 80px rgba(123, 147, 248, 0.06);
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.site-doc-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-doc-main {
  flex: 1;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}

@supports (backdrop-filter: blur(16px)) {
  .nav {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
  }
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-brand span {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--primary);
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
}

/* ── FOOTER ── */
.footer {
  padding: 28px 24px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-left {
  font-size: 13px;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text-muted);
}
