/* ============================================================
   DataZen official site — design tokens & dual theme
   Dark is the default; `html[data-theme="light"]` switches.
   All legacy class names are preserved so sibling pages keep
   rendering while the redesign rolls out page by page.
   ============================================================ */

:root {
  color-scheme: dark;
  --bg: #0a0e16;
  --bg-soft: #0f1522;
  --surface: #131a29;
  --surface-2: #182136;
  --border: #1f2b42;
  --text: #e6edf7;
  --muted: #93a3bd;
  --accent: #22d3ee;
  --accent-2: #6366f1;
  --gradient: linear-gradient(120deg, #22d3ee 0%, #6366f1 100%);
  --nav-bg: rgba(10, 14, 22, 0.82);
  --hero-glow-1: rgba(34, 211, 238, 0.14);
  --hero-glow-2: rgba(99, 102, 241, 0.16);
  --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shot-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --frame-bg: #0d1320;
  --radius: 14px;
  --shadow: var(--card-shadow);
  --font:
    'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei',
    sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-soft: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f2f5fa;
  --border: #dbe3ef;
  --text: #17233a;
  --muted: #5b6b85;
  --accent: #0891b2;
  --accent-2: #4f46e5;
  --gradient: linear-gradient(120deg, #0891b2 0%, #4f46e5 100%);
  --nav-bg: rgba(245, 247, 251, 0.85);
  --hero-glow-1: rgba(8, 145, 178, 0.1);
  --hero-glow-2: rgba(79, 70, 229, 0.08);
  --card-shadow: 0 10px 30px rgba(23, 35, 58, 0.08);
  --shot-shadow: 0 24px 60px rgba(23, 35, 58, 0.16);
  --frame-bg: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}

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

img {
  max-width: 100%;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 72px 0;
}
.section-tight {
  padding: 48px 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Section headings ---------- */
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}
.section-head {
  max-width: 680px;
  margin-bottom: 40px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head h2 {
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.section-head p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 16px;
}
@media (max-width: 700px) {
  .section-head h2 {
    font-size: 26px;
  }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.nav-logo:hover {
  text-decoration: none;
}
.nav-logo img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 14px;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.nav-links a.active {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 600;
}
.nav-cta {
  margin-left: 6px;
}
.nav-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.nav-lang:hover {
  color: var(--text);
  border-color: var(--accent);
  text-decoration: none;
}
.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 18px;
  cursor: pointer;
}
@media (max-width: 860px) {
  .nav-inner {
    gap: 12px;
  }
  .nav-toggle {
    display: block;
    order: 3;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 16px;
    gap: 2px;
    margin-left: 0;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-tools {
    order: 2;
    margin-left: auto;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease,
    border-color 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 6px 22px rgba(34, 211, 238, 0.22);
}
.btn-primary:hover {
  filter: brightness(1.07);
}
.btn-secondary {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn-secondary:hover {
  border-color: var(--accent);
}
.btn-lg {
  padding: 13px 30px;
  font-size: 16px;
  border-radius: 12px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 64px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -220px -120px auto;
  height: 560px;
  background:
    radial-gradient(560px 320px at 28% 38%, var(--hero-glow-1), transparent 68%),
    radial-gradient(520px 300px at 74% 22%, var(--hero-glow-2), transparent 66%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.hero h1 {
  font-size: 52px;
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 780px;
}
.hero h1 .grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  margin-top: 20px;
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}
.hero-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13.5px;
}
.hero-shot {
  margin-top: 52px;
}
.hero-shot img {
  border-radius: var(--radius);
  box-shadow: var(--shot-shadow);
}
/* macOS-style frame around product shots */
.shot-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--frame-bg);
  box-shadow: var(--shot-shadow);
  overflow: hidden;
}
.shot-frame .bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}
.shot-frame .bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.shot-frame .bar i:nth-child(1) {
  background: #ff5f57;
}
.shot-frame .bar i:nth-child(2) {
  background: #febc2e;
}
.shot-frame .bar i:nth-child(3) {
  background: #28c840;
}
.shot-frame .bar span {
  margin-left: 10px;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
}
.shot-frame img {
  display: block;
  width: 100%;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 700px) {
  .hero {
    padding-top: 56px;
  }
  .hero h1 {
    font-size: 36px;
  }
}

/* ---------- Database strip ---------- */
.db-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 22px 0;
}
.db-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 14px;
}
.db-strip .label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-right: 6px;
}
.db-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 13.5px;
}
.db-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--accent);
}

/* ---------- Stats band ---------- */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat {
  text-align: center;
  padding: 22px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.stat b {
  display: block;
  font-size: 30px;
  letter-spacing: -0.02em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat span {
  color: var(--muted);
  font-size: 13.5px;
}
@media (max-width: 700px) {
  .stats-band {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--card-shadow);
}
.card .icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 21px;
  border-radius: 12px;
  background: var(--surface-2);
  margin-bottom: 14px;
}
.card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.card p {
  color: var(--muted);
  font-size: 14px;
}
.card .tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Feature media card: image on top of a card body */
.media-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.media-card img {
  width: 100%;
  aspect-ratio: 16 / 9.4;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--border);
}
.media-card .body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.media-card .tag {
  margin-top: auto;
}

/* ---------- Page header ---------- */
.page-head {
  padding: 64px 0 8px;
}
.page-head h1 {
  font-size: 38px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.page-head p {
  color: var(--muted);
  font-size: 17px;
  max-width: 720px;
}
.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.breadcrumb a {
  color: var(--muted);
}

/* ---------- Feature blocks ---------- */
.feature-block {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 44px;
  align-items: center;
  padding: 40px 0;
}
.feature-block.reverse > *:first-child {
  order: 2;
}
.feature-block.reverse > *:last-child {
  order: 1;
}
.feature-block .kicker {
  color: var(--accent);
  -webkit-text-fill-color: currentColor;
  background: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.feature-block h2 {
  font-size: 28px;
  margin: 8px 0 14px;
  letter-spacing: -0.02em;
}
.feature-block p {
  color: var(--muted);
  margin-bottom: 14px;
}
.feature-block ul {
  list-style: none;
}
.feature-block li {
  padding: 7px 0 7px 26px;
  position: relative;
  color: var(--text);
  font-size: 15px;
}
.feature-block li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.feature-shot {
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  width: 100%;
  display: block;
}
.feature-shot img {
  border-radius: var(--radius);
  box-shadow: var(--shot-shadow);
  width: 100%;
  display: block;
}

@media (max-width: 900px) {
  .feature-block {
    grid-template-columns: 1fr;
  }
  .feature-block.reverse > *:first-child {
    order: 1;
  }
  .feature-block.reverse > *:last-child {
    order: 2;
  }
}

/* ---------- Screenshots gallery ---------- */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.shots img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
@media (max-width: 900px) {
  .shots {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .shots {
    grid-template-columns: 1fr;
  }
}

/* ---------- Code ---------- */
pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}
html[data-theme='light'] pre {
  background: #17233a;
  color: #dce7f7;
}
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--accent);
}
pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ---------- Callout ---------- */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 22px 0;
  font-size: 14px;
  color: var(--muted);
}
.callout strong {
  color: var(--text);
}

/* ---------- Steps ---------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: 14px;
  margin: 20px 0;
}
.step {
  counter-increment: step;
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 18px 16px 60px;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.step h4 {
  margin-bottom: 4px;
  font-size: 15px;
}
.step p {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Comparison table ---------- */
.compare {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
  margin: 18px 0;
}
.compare th,
.compare td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.compare thead th {
  background: var(--surface-2);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.compare tbody tr:last-child td {
  border-bottom: none;
}
.compare td.yes {
  color: var(--accent);
  font-weight: 700;
}
.compare td.no {
  color: var(--muted);
}
.compare tr:hover td {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

/* ---------- Table ---------- */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 18px 0;
}
.tbl th,
.tbl td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.tbl th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tbl tr:hover td {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  margin-top: 72px;
  padding: 48px 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.footer h4 {
  color: var(--text);
  margin-bottom: 12px;
  font-size: 14px;
}
.footer a {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}
.footer a:hover {
  color: var(--accent);
  text-decoration: none;
}
.footer p {
  max-width: 340px;
}
.footer .copy {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 13px;
  text-align: center;
}
@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(480px 200px at 18% 0%, var(--hero-glow-1), transparent 70%),
    radial-gradient(480px 220px at 85% 100%, var(--hero-glow-2), transparent 70%), var(--surface);
  padding: 46px 32px;
  text-align: center;
}
.cta-band h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.cta-band p {
  color: var(--muted);
  margin-bottom: 24px;
}

/* ---------- Misc ---------- */
.center {
  text-align: center;
}
.mt-2 {
  margin-top: 20px;
}
.mt-4 {
  margin-top: 40px;
}
.muted {
  color: var(--muted);
}
.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  margin: 0 6px 8px 0;
}
.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Docs (user guide) ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 72px;
}
.docs-toc {
  position: sticky;
  top: 78px;
  padding: 16px 0;
  border-right: 1px solid var(--border);
}
.docs-toc-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 600;
}
.docs-toc-link {
  display: block;
  padding: 6px 12px 6px 0;
  color: var(--muted);
  font-size: 14px;
  border-radius: 8px;
}
.docs-toc-link:hover {
  color: var(--accent);
  text-decoration: none;
}
.docs-toc-sublink {
  padding-left: 14px;
  font-size: 13px;
}
.docs-anchor {
  scroll-margin-top: 88px;
}
.docs-section {
  scroll-margin-top: 88px;
  margin-bottom: 56px;
}
.docs-section-title {
  font-size: 1.5rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.docs-prose {
  color: var(--text);
  font-size: 15px;
}
.docs-prose h3 {
  margin: 24px 0 10px;
  font-size: 1.1rem;
  color: var(--text);
}
.docs-prose h4 {
  margin: 18px 0 8px;
  font-size: 1rem;
}
.docs-prose p {
  margin: 0 0 12px;
  color: var(--muted);
}
.docs-prose ul,
.docs-prose ol {
  margin: 0 0 16px 1.25rem;
  color: var(--muted);
}
.docs-prose li {
  margin-bottom: 6px;
}
.docs-prose pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0 16px;
}
html[data-theme='light'] .docs-prose pre {
  background: #17233a;
  color: #dce7f7;
}
.docs-prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 6px;
}
.docs-prose pre code {
  background: none;
  padding: 0;
}
.docs-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
}
.docs-prose th,
.docs-prose td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.docs-prose th {
  color: var(--accent);
}
.docs-prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin: 12px 0;
  color: var(--muted);
}
@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-toc {
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .docs-toc-heading {
    width: 100%;
  }
  .docs-toc-link {
    padding: 4px 0;
  }
}

/* ============================================================
   V2 additions: nav dropdown, hero demo, flow diagrams,
   use-case cards, privacy diagram, FAQ
   ============================================================ */

:root {
  --danger: #f87171;
}
html[data-theme='light'] {
  --danger: #dc2626;
}

/* ---------- Nav dropdown ---------- */
.nav-drop {
  position: relative;
}
.nav-drop-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 14px;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}
.nav-drop-label:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.nav-drop.active > .nav-drop-label {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 600;
}
.nav-drop-caret {
  display: none;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  padding: 6px 4px;
}
.nav-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 6px;
  z-index: 60;
}
.nav-drop-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}
.nav-drop-menu a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.nav-drop-menu a.active {
  color: var(--accent);
  font-weight: 600;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu {
  display: block;
}
.nav-drop.open .nav-drop-menu {
  display: block;
}
.nav-gh {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
}
@media (max-width: 860px) {
  .nav-drop-caret {
    display: inline-flex;
    margin-left: -6px;
  }
  .nav-drop-menu {
    position: static;
    min-width: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 4px 14px;
  }
}

/* ---------- Hero demo ---------- */
.demo-frame {
  padding: 16px 18px 20px;
}
.demo-stage {
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 12px;
  background: var(--surface);
  padding: 13px 16px;
  margin-top: 12px;
  opacity: 0.45;
  transition:
    opacity 0.4s ease,
    border-color 0.4s ease;
}
.demo-stage:first-child {
  margin-top: 0;
}
.demo-stage.active {
  opacity: 1;
  border-left-color: var(--accent);
}
.demo-tag {
  display: block;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 7px;
}
.demo-bubble {
  display: inline-block;
  background: var(--surface-2);
  border-radius: 10px 10px 10px 3px;
  padding: 8px 13px;
  font-size: 13.5px;
}
.demo-code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  color: var(--text);
}
html[data-theme='light'] .demo-code {
  background: #17233a;
  color: #dce7f7;
}
.demo-tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12px;
}
.demo-tbl th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 12px 5px 0;
  border-bottom: 1px solid var(--border);
}
.demo-tbl td {
  padding: 4px 12px 4px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.demo-tbl tr:last-child td {
  border-bottom: none;
}
.demo-tbl td:last-child,
.demo-tbl th:last-child {
  text-align: right;
}
.demo-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 108px;
  padding: 4px 6px 0;
}
.demo-bar {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: var(--gradient);
  opacity: 0.85;
  height: 10%;
  transition: height 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.demo-stage.active .demo-bar {
  height: var(--h, 40%);
}
.demo-cap {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  .demo-stage,
  .demo-bar {
    transition: none;
  }
}

/* ---------- Flow diagrams (horizontal / vertical) ---------- */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
.flow-v {
  flex-direction: column;
  align-items: stretch;
  max-width: 420px;
}
.flow-node {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 11px;
  padding: 9px 15px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}
.flow-node small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 11.5px;
}
.flow-node.hl {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
.flow-arrow {
  align-self: center;
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  padding: 0 2px;
}
.flow-v .flow-arrow {
  transform: rotate(90deg);
  align-self: center;
  padding: 0;
}
.flow-note {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Use-case cards ---------- */
.uc-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}
.uc-row .uc-ico {
  flex: none;
  width: 20px;
  text-align: center;
  font-size: 13px;
}
.uc-row b {
  color: var(--text);
  font-weight: 600;
}
.uc-row.ok .uc-ico {
  color: var(--accent);
}
.uc-row.err .uc-ico {
  color: var(--danger);
}

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}
.faq details p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Audience cards ---------- */
.audience .card h3 {
  font-size: 16px;
}
.audience .card .who {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}

/* ---------- Hero video ---------- */
.hero-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

/* ---------- Star badge ---------- */
.star-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ---------- Gallery lightbox ---------- */
.gallery-img {
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.gallery-img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* ---------- Table overflow (mobile) ---------- */
.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- Download page callout ---------- */
.download-callout {
  border: 1px solid #f59e0b33;
  border-left: 3px solid #f59e0b;
  background: #f59e0b0a;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 22px 0;
  font-size: 14px;
  color: var(--muted);
}
html[data-theme='light'] .download-callout {
  background: #f59e0b12;
}
.download-callout strong {
  color: var(--text);
}
.install-cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  margin: 8px 0;
  overflow-x: auto;
}
.install-cmd code {
  flex: 1;
  white-space: nowrap;
  background: none;
  padding: 0;
  color: var(--text);
}
.install-cmd .copy-btn {
  flex: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 10px;
  font-size: 12px;
}
.install-cmd .copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
