:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #17151f;
  --ink-2: #3d3a47;
  --muted: #6e6a78;
  --line: #e7e3da;
  --brand: #4733d6;
  --brand-ink: #ffffff;
  --brand-soft: #ecebfd;
  --accent: #ef7a1a;
  --accent-soft: #fdf0e4;
  --ok: #1f8a4c;
  --ok-soft: #e5f4eb;
  --warn: #a15c00;
  --warn-soft: #fdf3dc;
  --bad: #c0362c;
  --bad-soft: #fbe9e7;
  --shadow: 0 1px 2px rgba(23, 21, 31, .05), 0 8px 24px -12px rgba(23, 21, 31, .12);
  --radius: 14px;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e14;
    --surface: #17161e;
    --surface-2: #1f1d28;
    --ink: #f2f0f7;
    --ink-2: #cfcbd9;
    --muted: #9a96a6;
    --line: #2b2935;
    --brand: #8b7bff;
    --brand-ink: #0f0e14;
    --brand-soft: #25213f;
    --accent: #ff9a45;
    --accent-soft: #33231a;
    --ok: #4cc27f;
    --ok-soft: #16291f;
    --warn: #f0b04a;
    --warn-soft: #2e2615;
    --bad: #ff7a6e;
    --bad-soft: #321b19;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 14px var(--font); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.input, textarea.input, select.input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 14px var(--font); transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field { margin-bottom: 16px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }

/* ---------- Bits ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; border: 1px solid transparent; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--brand-soft); color: var(--ink); }
.meter { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .4s; }
.meter.warn > span { background: var(--accent); }
.meter.bad > span { background: var(--bad); }
.kbd-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; font-family: var(--mono); font-size: 13px; word-break: break-all; }
pre.code { margin: 0; padding: 16px; background: #15131c; color: #e8e5f0; border-radius: 12px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 18px; letter-spacing: -.02em; color: var(--ink); text-decoration: none !important; }
.logo svg { width: 28px; height: 28px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; transition: all .2s; z-index: 100; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- Marketing ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .container { display: flex; align-items: center; height: 68px; gap: 28px; }
.nav-links { display: flex; gap: 24px; font-size: 14px; }
.nav-links a { color: var(--ink-2); }
.nav-cta { margin-left: auto; display: flex; gap: 8px; }
.hero { padding: 72px 0 56px; }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 5px 12px 5px 6px; border-radius: 99px; }
.eyebrow b { background: var(--accent-soft); color: var(--accent); font-weight: 600; padding: 2px 8px; border-radius: 99px; font-size: 12px; }
.hero h1 { font-size: clamp(40px, 6vw, 66px); margin: 22px 0 18px; letter-spacing: -.035em; line-height: 1.02; }
.hero h1 .serif { color: var(--brand); }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 520px; }
.hero-ctas { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.demo { padding: 20px; position: relative; }
.demo-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; margin-bottom: 10px; opacity: 0; transform: translateY(6px); transition: all .35s; }
.bubble.show { opacity: 1; transform: none; }
.bubble.user { margin-left: auto; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.bubble.bot { background: var(--surface-2); border-bottom-left-radius: 4px; }
.bubble small { display: block; font-size: 11.5px; opacity: .7; margin-bottom: 2px; }
.wave { display: flex; align-items: center; gap: 3px; height: 28px; }
.wave i { width: 3px; border-radius: 3px; background: var(--accent); animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: -.3s; } .wave i:nth-child(3n) { animation-delay: -.6s; } .wave i:nth-child(5n) { animation-delay: -.8s; }
@keyframes wave { 0%, 100% { height: 5px; } 50% { height: 24px; } }
.mic { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; color: var(--muted); }
.mic-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #fff; flex: none; box-shadow: 0 0 0 6px var(--accent-soft); }
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: 14px; }
.strip .container { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.strip span { display: inline-flex; align-items: center; gap: 8px; }
section.block { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head .kicker { color: var(--accent); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); margin-top: 10px; letter-spacing: -.03em; }
.section-head p { margin-top: 14px; color: var(--ink-2); font-size: 17px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-n { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 600; margin-bottom: 16px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--ink-2); font-size: 14.5px; }
.feature .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.feature .ico svg { width: 20px; height: 20px; }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.price-card { padding: 28px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); position: relative; }
.price-card.featured::after { content: 'Most popular'; position: absolute; top: -11px; left: 24px; background: var(--brand); color: var(--brand-ink); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.price-card h3 { font-size: 18px; }
.price { font-size: 40px; font-weight: 650; letter-spacing: -.03em; margin: 14px 0 4px; }
.price small { font-size: 15px; font-weight: 400; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 20px 0 26px; flex: 1; }
.price-card li { padding: 6px 0 6px 26px; position: relative; font-size: 14.5px; color: var(--ink-2); }
.price-card li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 10px; color: var(--ink-2); }
.cta-band { background: var(--ink); color: var(--bg); border-radius: 22px; padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 36px); max-width: 560px; }
.cta-band .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
footer.site { padding: 48px 0; color: var(--muted); font-size: 14px; }
footer.site .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ink); color: var(--bg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .logo { color: var(--bg); }
.auth-side blockquote { margin: 0; font-family: var(--serif); font-size: 34px; line-height: 1.2; font-style: italic; max-width: 460px; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 28px; margin-bottom: 6px; }
.auth-form .sub { color: var(--muted); margin-bottom: 28px; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; background: var(--bg); }
.side .logo { padding: 4px 10px 20px; }
.side a.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.side a.nav-item svg { width: 18px; height: 18px; opacity: .75; }
.side a.nav-item:hover { background: var(--surface-2); }
.side a.nav-item.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); }
.side .side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.side .who { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { padding: 28px 40px 64px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin: 6px 0 10px; }
.two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.card h2 { font-size: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checklist li:last-child { border-bottom: 0; }
.check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; margin-top: 1px; display: grid; place-items: center; }
.check.done { background: var(--ok); border-color: var(--ok); }
.check.done::after { content: ''; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.checklist .done-text { color: var(--muted); text-decoration: line-through; }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--brand); }
.chart .bar-err { fill: var(--bad); }
.chart .axis { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart .grid { stroke: var(--line); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.plan.current { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.plan .price { font-size: 28px; margin: 4px 0; }
.plan .btn { margin-top: 12px; }
.mobile-bar { display: none; }

@media (max-width: 960px) {
  .hero .container, .two { grid-template-columns: 1fr; }
  .grid-3, .pricing, .plans { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 10; }
  .main { padding: 20px 16px 48px; }
  .container { padding: 0 16px; }
  section.block { padding: 64px 0; }
  .cta-band { padding: 32px 24px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .nav-cta .btn-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
