:root {
  --bg: #0b1020;
  --bg-alt: #111831;
  --card: #151d3a;
  --border: #243058;
  --text: #e6e9f2;
  --muted: #9aa3bd;
  --accent: #4f8cff;
  --accent-2: #2ec4a6;
  --radius: 12px;
  --max: 1100px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fc;
    --bg-alt: #eef1f8;
    --card: #ffffff;
    --border: #dde2ee;
    --text: #141a2e;
    --muted: #5b647d;
    --accent: #2563eb;
    --accent-2: #0f9f84;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo img { width: 28px; height: 28px; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav a {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 15px;
}
.nav a:hover { color: var(--text); background: var(--bg-alt); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }
.nav a.nav-docs { color: var(--accent); border: 1px solid var(--accent); }
.nav a.nav-docs:hover { background: var(--accent); color: #fff; }

/* Hero */
.hero {
  padding: 80px 0 64px;
  background:
    radial-gradient(800px 300px at 80% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent),
    radial-gradient(600px 260px at 0% 100%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent);
}

.hero h1 {
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.15;
  margin: 0 0 20px;
  max-width: 820px;
}

.hero p.lead {
  font-size: 20px;
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 32px;
}

.page-hero { padding: 56px 0 24px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; }
.page-hero p { color: var(--muted); font-size: 19px; max-width: 760px; margin: 0; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--bg-alt); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section { padding: 48px 0; }
section.alt { background: var(--bg-alt); }

h2 { font-size: 28px; margin: 0 0 12px; line-height: 1.25; }
h3 { font-size: 20px; margin: 0 0 8px; }
.section-intro { color: var(--muted); max-width: 760px; margin: 0 0 32px; }

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { color: var(--muted); margin: 0; }
.card ul { color: var(--muted); margin: 8px 0 0; padding-left: 20px; }
.card .tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 8px;
}

/* Steps */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.step { position: relative; padding-top: 56px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 20px;
  left: 24px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
}

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg-alt); }
tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 600; white-space: nowrap; }
td { color: var(--muted); }
td:first-child { color: var(--text); }

/* Callout */
.callout {
  border-left: 4px solid var(--accent);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 24px 0;
}
.callout p { margin: 0; }

/* FAQ */
details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 24px;
  margin-bottom: 12px;
}
details[open] { padding-bottom: 16px; }
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 18px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 22px;
  color: var(--muted);
}
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 0 0 8px; }

/* CTA */
.cta {
  text-align: center;
  padding: 56px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(500px 200px at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent),
    var(--card);
}
.cta h2 { margin-bottom: 8px; }
.cta p { color: var(--muted); margin: 0 auto 24px; max-width: 600px; }
.cta .btn-row { justify-content: center; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

.disclaimer { font-size: 13px; color: var(--muted); max-width: 820px; }

/* 404 */
.notfound { text-align: center; padding: 120px 0; }
.notfound .code { font-size: 96px; font-weight: 800; color: var(--accent); line-height: 1; margin: 0; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 56px 0 44px; }
  .hero p.lead { font-size: 18px; }
  .site-header { position: static; }
  .site-header .container { padding-top: 10px; padding-bottom: 10px; }
}
