:root {
  --brand: #7C3AED;
  --brand-deep: #5B21B6;
  --brand-soft: #F5F3FF;
  --brand-line: #DDD6FE;
  --ink: #16121F;
  --ink-2: #4B5563;
  --ink-3: #8B8799;
  --line: #ECEAF2;
  --bg: #FFFFFF;
  --bg-2: #FAF9FD;
  --card: #FFFFFF;
  --code-bg: #14101F;
  --code-ink: #E9E4FF;
  --ok: #059669;
  --warn: #D97706;
  --bad: #DC2626;
  --shadow: 0 1px 2px rgba(22, 18, 31, .04), 0 8px 24px -12px rgba(91, 33, 182, .18);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #A78BFA;
    --brand-deep: #C4B5FD;
    --brand-soft: #1E1631;
    --brand-line: #3B2D63;
    --ink: #F3F0FA;
    --ink-2: #B9B4C7;
    --ink-3: #807A92;
    --line: #2A2438;
    --bg: #0E0B16;
    --bg-2: #130F1E;
    --card: #17121F;
    --code-bg: #0A0811;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.6) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand small { font-weight: 500; color: var(--ink-3); }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nav-links a { color: var(--ink-2); }
@media (max-width: 760px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid transparent; font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: linear-gradient(135deg, #8B5CF6, #6D28D9); color: #fff; box-shadow: 0 6px 18px -6px rgba(124, 58, 237, .6), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-line); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(700px 380px at 78% 18%, rgba(139, 92, 246, .20), transparent 70%),
  radial-gradient(520px 300px at 8% 0%, rgba(109, 40, 217, .10), transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); opacity: .55; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding: 56px 0 48px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--brand-line); font-size: 13px; font-weight: 500; color: var(--ink-2); box-shadow: var(--shadow); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
h1 { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.04; letter-spacing: -.035em; margin: 22px 0 18px; font-weight: 800; }
h1 .grad { background: linear-gradient(120deg, #8B5CF6 10%, #6D28D9 55%, #A855F7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 540px; margin: 0 0 30px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 36px; font-size: 14px; color: var(--ink-2); }
.facts b { display: block; font-size: 22px; color: var(--ink); letter-spacing: -.02em; }

/* demo window */
.window { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px -30px rgba(91, 33, 182, .45), var(--shadow); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); font-size: 12px; color: var(--ink-3); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); display: block; }
.window-bar span { margin-left: 8px; }
.window-body { padding: 20px; display: grid; gap: 14px; font-size: 14px; }
.msg-user { justify-self: end; background: linear-gradient(135deg, #8B5CF6, #6D28D9); color: #fff; padding: 10px 14px; border-radius: 14px 14px 4px 14px; max-width: 86%; }
.toolcall { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); padding: 8px 12px; border: 1px dashed var(--brand-line); border-radius: 10px; background: var(--brand-soft); }
.toolcall code { color: var(--brand-deep); font-weight: 600; }
.toolcall .ok { margin-left: auto; color: var(--ok); font-weight: 600; }
.rows { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; animation: rise .5s both; }
.row:nth-child(2) { animation-delay: .12s; } .row:nth-child(3) { animation-delay: .24s; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--brand-deep); background: var(--brand-soft); }
.row b { display: block; font-size: 14px; } .row small { color: var(--ink-3); font-size: 12.5px; }
.pill { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.credits-line { font-size: 12px; color: var(--ink-3); text-align: right; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* sections */
section { padding: 84px 0; }
section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 14px; }
.sub { color: var(--ink-2); max-width: 620px; margin: 0 0 40px; font-size: 17px; }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 14px 0 6px; font-size: 17px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line); }
.icon svg { width: 20px; height: 20px; }
.toollist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.toollist li { font-size: 13.5px; color: var(--ink-2); display: grid; gap: 1px; }
.toollist code { font-size: 12.5px; color: var(--ink); font-weight: 600; }

/* connect */
.connect { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .connect { grid-template-columns: 1fr; } }
label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--ink-2); }
input[type=text], input[type=password], input[type=number], input[type=search] {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 14px/1 inherit; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input.mono { font-family: "JetBrains Mono", monospace; font-size: 13px; }
.hint { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; }
.meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8B5CF6, #6D28D9); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.meter.warn > i { background: linear-gradient(90deg, #F59E0B, #D97706); }
.meter.bad > i { background: linear-gradient(90deg, #EF4444, #DC2626); }
.balance { margin-top: 18px; display: none; }
.balance.show { display: block; animation: rise .35s both; }
.balance .big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.balance .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.err { color: var(--bad); font-size: 13.5px; margin-top: 10px; min-height: 1em; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { border: 0; background: transparent; color: var(--ink-2); font: 600 13.5px/1 inherit; font-family: inherit; padding: 9px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.tab[aria-selected=true] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.code { position: relative; margin-top: 14px; background: var(--code-bg); color: var(--code-ink); border-radius: 14px; padding: 18px 20px; font-size: 13px; line-height: 1.7; overflow-x: auto; white-space: pre; border: 1px solid #2A2140; }
.code .k { color: #C4B5FD; } .code .s { color: #86EFAC; } .code .c { color: #8B86A3; }
.copy { position: absolute; top: 10px; right: 10px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid #3B2F5C; background: #221A36; color: #E9E4FF; font: 600 12px/1 inherit; font-family: inherit; cursor: pointer; }
.copy:hover { background: #2D2347; }
.steps { margin: 14px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; }
.steps li { margin: 4px 0; }

/* footer */
footer { padding: 40px 0 56px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- admin ---------- */
.shell { min-height: 100vh; background: var(--bg-2); }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; align-items: center; height: 62px; gap: 14px; max-width: 1320px; }
.topbar .spacer { flex: 1; }
.badge { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-deep); border: 1px solid var(--brand-line); }
main.console { max-width: 1320px; margin: 0 auto; padding: 28px 24px 64px; display: grid; gap: 20px; }
@media (max-width: 640px) { main.console { padding: 20px 16px 48px; } }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.kpi span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.kpi b { display: block; font-size: 28px; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--ink-3); font-size: 12px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 20px; }
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
.chart svg { width: 100%; height: 250px; display: block; }
.chart .bar { fill: url(#barGrad); }
.chart .bar:hover { opacity: .8; }
.chart text { fill: var(--ink-3); font-size: 10px; }
.hbar { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; font-size: 13px; margin-bottom: 12px; }
.hbar code { font-size: 12.5px; }
.hbar .meter { grid-column: 1 / -1; height: 7px; }
.hbar span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td, tbody tr.sel td { background: color-mix(in srgb, var(--brand-soft) 70%, transparent); }
.scroll { overflow-x: auto; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.usage { min-width: 180px; }
.usage .meter { height: 7px; margin-top: 6px; }
.usage small { color: var(--ink-3); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.on { color: var(--ok); } .status.off { color: var(--ink-3); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.query { max-width: 520px; font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.query.open { white-space: pre-wrap; overflow: visible; word-break: break-word; }
.tool-tag { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-deep); white-space: nowrap; }
.code-st { font-weight: 700; font-size: 12px; } .code-st.bad { color: var(--bad); } .code-st.ok { color: var(--ok); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }
.form-row { display: grid; grid-template-columns: 1.4fr 1fr .6fr auto; gap: 12px; align-items: start; }
@media (max-width: 800px) { .form-row { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); font: 600 12px/1 inherit; font-family: inherit; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.chip:hover { border-color: var(--brand-line); color: var(--brand-deep); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(600px 360px at 70% 10%, rgba(139, 92, 246, .18), transparent 70%), var(--bg-2); }
.login .card { width: min(400px, 100%); padding: 32px; }
.login img { width: 48px; height: 48px; border-radius: 12px; }
.login h1 { font-size: 24px; margin: 18px 0 6px; letter-spacing: -.02em; }
.login p { color: var(--ink-2); font-size: 14.5px; margin: 0 0 22px; }

dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(560px, calc(100% - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 40px 100px -30px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(14, 11, 22, .55); backdrop-filter: blur(4px); }
dialog .panel-body { display: grid; gap: 14px; }
.keybox { font-family: "JetBrains Mono", monospace; font-size: 13px; padding: 14px; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line); word-break: break-all; color: var(--brand-deep); }
.warnbox { font-size: 13px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); font-weight: 600; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600; opacity: 0; transition: .25s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* pricing */
.pricing { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }
.grid-rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 560px) { .grid-rules { grid-template-columns: 1fr; } }
.plan { padding: 28px; border-color: var(--brand-line); box-shadow: 0 24px 60px -28px rgba(91, 33, 182, .45), var(--shadow); }
.price { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 2px; }
.price b { font-size: 48px; letter-spacing: -.04em; line-height: 1; }
.price span { color: var(--ink-3); font-size: 14px; font-weight: 600; }
.plan-credits { font-weight: 700; color: var(--brand); font-size: 17px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237C3AED' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/11px no-repeat; border: 1px solid var(--brand-line); }

/* get access + welcome */
.page { padding: 56px 0 80px; position: relative; }
.page::before { content: ""; position: absolute; inset: 0 0 auto; height: 420px; background: radial-gradient(640px 320px at 75% 0%, rgba(139, 92, 246, .16), transparent 70%); pointer-events: none; }
.page .wrap { position: relative; }
.page h1 { font-size: clamp(32px, 4.4vw, 46px); margin: 14px 0 12px; }
.checkout { display: grid; grid-template-columns: 1fr 440px; gap: 48px; align-items: start; margin-top: 8px; }
@media (max-width: 900px) { .checkout { grid-template-columns: 1fr; gap: 28px; } }
.form { display: grid; gap: 16px; padding: 28px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form .two { grid-template-columns: 1fr; } }
input[type=email], select { width: 100%; height: 44px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 14px/1 inherit; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); font-weight: 500; margin: 0; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.summary { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.summary b { font-size: 22px; color: var(--ink); letter-spacing: -.02em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { font-size: 13.5px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-deep); border: 1px solid var(--brand-line); }
.stepper { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; counter-reset: s; }
.stepper li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; counter-increment: s; }
.stepper li::before { content: counter(s); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--brand-deep); background: var(--brand-soft); border: 1px solid var(--brand-line); }
.stepper b { display: block; font-size: 15px; } .stepper span { color: var(--ink-2); font-size: 14px; }
.keyrow { display: flex; gap: 10px; align-items: stretch; }
.keyrow .keybox { flex: 1; margin: 0; }
.welcome-grid { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; margin-top: 28px; }
@media (max-width: 900px) { .welcome-grid { grid-template-columns: 1fr; } }

/* ---------- v2: shared footer, reveal, demo, use cases, docs, legal ---------- */
[data-nav] { height: 65px; }
.site-foot { padding: 56px 0 32px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.site-foot .wrap:first-child { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .site-foot .wrap:first-child { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.site-foot h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.site-foot a:not(.brand) { display: block; color: var(--ink-2); margin: 0 0 8px; }
.foot-brand p { margin: 12px 0 0; max-width: 300px; color: var(--ink-3); }
.foot-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.foot-base a { color: var(--ink-3); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.hero-note { font-size: 13.5px; color: var(--ink-3); margin-top: 14px; }

/* animated demo */
.demo .window-body { min-height: 404px; align-content: start; }
.typer { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); background: var(--bg); }
.typer span { flex: 1; min-height: 1.4em; }
.typer i { width: 2px; height: 16px; background: var(--brand); animation: blink 1s steps(1) infinite; }
.typer b { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #8B5CF6, #6D28D9); display: grid; place-items: center; color: #fff; font-size: 14px; }
@keyframes blink { 50% { opacity: 0; } }
.demo .msg-user, .demo .step, .demo .row, .demo .credits-line { display: none; }
.demo .show { display: flex; animation: rise .45s both; }
.demo .row.show { display: grid; }
.demo .credits-line.show { display: block; }
.step { align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); padding: 8px 12px; border: 1px dashed var(--brand-line); border-radius: 10px; background: var(--brand-soft); }
.step code { color: var(--brand-deep); font-weight: 600; }
.step em { font-style: normal; color: var(--ink-3); }
.step .st { margin-left: auto; font-weight: 600; white-space: nowrap; }
.step .spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--brand-line); border-top-color: var(--brand); animation: spin .7s linear infinite; display: inline-block; vertical-align: -2px; }
.step.done .st { color: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }
.chip-roles { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); white-space: nowrap; }
.demo-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.linkbtn { border: 0; background: none; color: var(--brand); font: 600 12.5px/1 inherit; font-family: inherit; cursor: pointer; padding: 4px; }

/* use cases */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 860px) { .cases { grid-template-columns: 1fr; } }
.case { display: grid; gap: 12px; align-content: start; }
.case .num { font: 700 12px/1 "JetBrains Mono", monospace; color: var(--brand); letter-spacing: .06em; }
.case h3 { margin: 0; }
.prompt { position: relative; padding: 14px 16px 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; color: var(--ink); line-height: 1.55; }
.prompt::before { content: "Ask"; display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.prompt button { position: absolute; top: 10px; right: 10px; }
.uses { font-size: 12.5px; color: var(--ink-3); }
.uses code { color: var(--ink-2); font-size: 12px; }

/* how it works */
.how { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; } }
.flow svg { width: 100%; height: auto; display: block; }
.flow .box { fill: var(--card); stroke: var(--line); }
.flow .box.mid { stroke: var(--brand); }
.flow text { fill: var(--ink); font: 600 13px Inter, sans-serif; }
.flow text.sm { fill: var(--ink-3); font-weight: 500; font-size: 11px; }
.flow .wire { fill: none; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 6 6; }
.flow .pulse { fill: var(--brand); }

/* prompt gallery */
.gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery button { border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 500 14px/1.4 inherit; font-family: inherit; padding: 10px 14px; border-radius: 999px; cursor: pointer; text-align: left; transition: border-color .15s, transform .12s; }
.gallery button:hover { border-color: var(--brand); transform: translateY(-1px); }

/* audience strip */
.grid-aud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 760px) { .grid-aud { grid-template-columns: 1fr; } }

/* faq */
.faq { max-width: 780px; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-2); font-size: 15px; }

.band { text-align: center; padding: 72px 0; }
.band h2 { margin-top: 0; }
.band .sub { margin: 0 auto 28px; }

/* docs, tools, legal */
.prose { max-width: 760px; }
.prose h2 { font-size: 26px; margin: 48px 0 12px; scroll-margin-top: 80px; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15.5px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose code { font-size: 13px; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.prose table { margin: 12px 0 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prose td { font-size: 14px; color: var(--ink-2); vertical-align: top; }
.updated { color: var(--ink-3); font-size: 14px; }
.docs-grid { display: grid; grid-template-columns: 200px 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .docs-grid { grid-template-columns: 1fr; } .toc { display: none; } }
.toc { position: sticky; top: 88px; display: grid; gap: 8px; font-size: 14px; }
.toc a { color: var(--ink-2); }
.tool-group { margin-top: 40px; }
.tool-group h2 { font-size: 22px; margin: 0 0 14px; }
.tool { display: grid; grid-template-columns: 240px 1fr; gap: 6px 24px; padding: 18px 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .tool { grid-template-columns: 1fr; } }
.tool code { font-weight: 600; color: var(--brand-deep); font-size: 13px; }
.tool p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.tool .ex { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.tool .cost { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }

/* v3: data catalogue outputs, plain demo steps, logo diagram */
.cases { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1060px) { .cases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .cases { grid-template-columns: 1fr; } }
.case .icon { margin-bottom: 2px; }
.out { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); border-left: 2px solid var(--brand-line); padding-left: 12px; }
.out span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.out b { color: var(--ink); font-weight: 600; }
.step b { font-weight: 600; color: var(--ink); }
.flow .bubble { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 1.5; }
.flow .pill rect { fill: var(--brand-soft); stroke: var(--brand-line); }
.flow .pill text { fill: var(--brand-deep); font-weight: 600; }
.flow .box.mid { stroke-width: 2; filter: drop-shadow(0 12px 24px rgba(124, 58, 237, .25)); }
.flow .wire { animation: dash 1.2s linear infinite; }
.flow .wire.back { stroke: var(--ink-3); animation-direction: reverse; }
@keyframes dash { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .flow .wire { animation: none; } .flow .pulse { display: none; } }
.prompt { padding-right: 78px; }
