/* ── Design tokens (from extension dashboard.css) ──────────────────── */
html {
  scroll-behavior: smooth;
}

:root {
  --bg:             #0F1117;
  --surface:        #181C27;
  --text:           #E8EAF0;
  --muted:          #6B7280;
  --border:         rgba(255,255,255,0.08);
  --border-strong:  rgba(255,255,255,0.14);
  --green:          #1DD9A0;   /* accent: revenue, CTAs, active */
  --orange:         #FF7A3D;   /* accent: cost, Pro badge, pricing */
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --max-width:      1100px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

code, pre, .mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9em;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

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

/* ── Layout ─────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ────────────────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span { color: var(--green); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-dropdown {
  position: relative;
  font-size: 0.85rem;
}

.lang-dropdown-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.lang-dropdown-toggle:hover {
  border-color: var(--text);
  color: var(--text);
}

ul.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin: 4px 0 0;
  padding: 4px 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  list-style: none !important;
  min-width: 150px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

ul.lang-dropdown-menu--up {
  top: auto;
  bottom: 100%;
  margin: 0 0 4px;
}

.lang-dropdown.open > ul.lang-dropdown-menu {
  display: block;
}

ul.lang-dropdown-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.lang-dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}

ul.lang-dropdown-menu li a:hover {
  background: var(--surface);
  color: var(--text);
}

ul.lang-dropdown-menu li a[aria-current="true"] {
  color: var(--green);
  font-weight: 600;
}

.lang-dropdown--footer {
  display: inline-flex;
  margin-bottom: 12px;
}

.lang-dropdown--footer ul.lang-dropdown-menu {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: #0a1f14;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); text-decoration: none; }

.btn-secondary {
  display: inline-block;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  text-decoration: none;
  transition: background 0.15s;
}

.btn-secondary:hover { background: var(--border); text-decoration: none; }

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}

/* ── Section spacing ─────────────────────────────────────────────────── */
section { padding: 80px 0; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

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

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 16px;
}

/* ── Prose (docs/policies) ───────────────────────────────────────────── */
.prose {
  max-width: 740px;
  margin: 0 auto;
  padding: 60px 24px;
}

.prose h1 { margin-bottom: 12px; }
.prose h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; font-size: 1.35rem; }
.prose h3 { margin-top: 1.75rem; margin-bottom: 0.5rem; }
.prose p  { margin-bottom: 1rem; color: var(--text); }
.prose ul, .prose ol { margin: 0.75rem 0 1rem 1.5rem; }
.prose li { margin-bottom: 0.35rem; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9em;
}

.prose th {
  text-align: left;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border-strong);
}

.prose td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

/* ── 404 ─────────────────────────────────────────────────────────────── */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 16px;
}

.not-found h1 { font-size: 6rem; color: var(--orange); font-family: 'JetBrains Mono', monospace; }
