:root {
  --bg: #ffffff;
  --ink: #1a1f2b;
  --muted: #5b6472;
  --line: #e6e8ee;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --hero-1: #0b1020;
  --hero-2: #1b2350;
  --code-bg: #0f1424;
  --code-ink: #e7ecff;
  --chip: #eef0fb;
  --max: 1080px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,0.9); backdrop-filter: blur(8px); z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; font-size: 18px; color: var(--ink); letter-spacing: .2px; }
.brand-mark { color: var(--accent); }
.top-nav a { color: var(--ink); margin-left: 22px; font-size: 15px; font-weight: 500; }
.top-nav a.ext::after { content: " ↗"; color: var(--muted); font-size: 12px; }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 70% -10%, var(--hero-2), var(--hero-1)); color: #eaf0ff; padding: 84px 0 72px; }
.hero .badge { display: inline-block; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; color: #b9c4ff; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 5px 12px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); margin: 0 0 16px; color: #fff; letter-spacing: -.5px; }
.hero .lede { font-size: 19px; color: #c6cfeb; max-width: 720px; margin: 0 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid transparent; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #4338ca; text-decoration: none; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.btn.ghost:hover { border-color: #fff; text-decoration: none; }
.install { margin-top: 28px; font-family: var(--mono); background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); color: var(--code-ink); padding: 12px 16px; border-radius: 10px; display: inline-block; font-size: 14px; }
.install .prompt { color: #8ea2ff; user-select: none; margin-right: 8px; }

/* Sections */
.section { padding: 64px 0; }
.section h2, .cta-band h2 { font-size: 26px; margin: 0 0 26px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: #fff; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 8px 30px rgba(20,25,50,.08); transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.engine-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.engine-table th, .engine-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.engine-table thead th { background: #f7f8fc; font-size: 13px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
.engine-table tr:last-child td { border-bottom: 0; }
.engine-table td.eng { font-weight: 600; white-space: nowrap; }

.cta-band { background: #f6f7fb; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 0; text-align: center; }
.cta-band p { color: var(--muted); margin: 0 0 22px; }
.cta-band .cta { justify-content: center; }
.cta-band .btn.ghost { color: var(--ink); border-color: var(--line); }

.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Footer */
.site-footer { background: var(--hero-1); color: #c6cfeb; padding: 48px 0 36px; margin-top: 0; }
.site-footer .brand { color: #fff; }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.foot-cols h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; margin: 0 0 12px; }
.foot-cols a { display: block; color: #c6cfeb; font-size: 14px; margin-bottom: 8px; }
.foot-cols a:hover { color: #fff; }
.foot-cols .muted { color: #8a95b8; }
.foot-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px; color: #8a95b8; }

/* Docs layout */
.doc-shell { display: grid; grid-template-columns: 250px 1fr; gap: 40px; padding: 36px 20px 72px; align-items: start; }
.sidebar { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; }
.nav-group { margin-bottom: 22px; }
.nav-group-title { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 8px; }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group li a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--ink); font-size: 14.5px; }
.nav-group li a:hover { background: var(--chip); text-decoration: none; }
.nav-group li a.active { background: var(--accent); color: #fff; }
.doc-content { min-width: 0; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.breadcrumb span { margin: 0 6px; }
.doc-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }

/* Markdown content */
.markdown { max-width: 760px; }
.markdown h1 { font-size: 32px; margin: 0 0 18px; letter-spacing: -.3px; }
.markdown h2 { font-size: 23px; margin: 40px 0 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.markdown h3 { font-size: 18px; margin: 28px 0 10px; }
.markdown p, .markdown li { font-size: 16px; }
.markdown ul, .markdown ol { padding-left: 22px; }
.markdown li { margin: 4px 0; }
.markdown a { text-decoration: underline; text-underline-offset: 2px; }
.markdown code { font-family: var(--mono); font-size: .88em; background: var(--chip); padding: 2px 6px; border-radius: 5px; }
.markdown pre { background: var(--code-bg); color: var(--code-ink); padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.markdown pre code { background: none; padding: 0; color: inherit; font-size: 13.5px; }
.markdown blockquote { margin: 18px 0; padding: 12px 18px; border-left: 3px solid var(--accent); background: #f6f7fb; border-radius: 0 8px 8px 0; color: #33405e; }
.markdown blockquote p { margin: 6px 0; }
.markdown table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 14.5px; display: block; overflow-x: auto; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.markdown thead th { background: #f7f8fc; }
.markdown hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* Docs index cards */
.index-group { margin: 28px 0; }
.index-group h2 { border: 0; padding: 0; }
.card-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card-list li a { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--ink); }
.card-list li a:hover { border-color: var(--accent); text-decoration: none; box-shadow: 0 6px 20px rgba(20,25,50,.06); }
.card-title { display: block; font-weight: 650; margin-bottom: 4px; }
.card-desc { display: block; color: var(--muted); font-size: 14px; }

/* Services page */
.trust-line { color: var(--muted); font-size: 14px; margin-top: 18px; }
.hero .trust-line { color: #b9c4ff; }
.prose { max-width: 760px; font-size: 16px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; max-width: 760px; }
.steps li { position: relative; padding: 3px 0 16px 46px; font-size: 16px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 14px; }
.checklist { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.checklist li { position: relative; padding: 5px 0 5px 28px; font-size: 16px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 5px; color: var(--accent); }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .doc-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 8px; }
  .card-list { grid-template-columns: 1fr; }
}
