:root {
  --bg: #0E1116;
  --bg-2: #141922;
  --surface: #1A202B;
  --surface-2: #222937;
  --ink: #F1F4F9;
  --subtle: #A7AFBD;
  --faint: #6F7889;
  --line: #2A3242;
  --accent: #6B7BFF;
  --accent-2: #8D7BFF;
  --accent-ink: #FFFFFF;
  --good: #3DD183;
  --warn: #F5B544;
  --danger: #FF6B6B;
  --radius: 18px;
  --max: 520px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(120% 60% at 50% -10%, #1C2340 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

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

/* Шапка */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 19px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #fff; }
.lang { font-size: 13px; font-weight: 600; color: var(--subtle); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }

/* Кнопки */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 22px; border: 0; border-radius: 16px; font-weight: 700; font-size: 17px; cursor: pointer; transition: transform .08s ease, opacity .15s ease; text-align: center; }
.btn:active { transform: scale(0.985); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(107,123,255,.7); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-light { background: #fff; color: #000; }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.note { text-align: center; font-size: 14px; color: var(--faint); margin: 12px 0 0; }

/* Пре-лендинг */
.hero { padding: 24px 0 8px; text-align: center; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: rgba(107,123,255,.12); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(32px, 8.5vw, 44px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 16px; }
.hero p { color: var(--subtle); font-size: 18px; margin: 0 0 26px; }
.visual { margin: 30px auto 6px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; max-width: 360px; }
.visual-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 12px; text-align: center; }
.visual-card svg { width: 64px; height: 120px; display: block; margin: 0 auto 10px; }
.visual-card b { display: block; font-size: 22px; letter-spacing: -0.02em; }
.visual-card span { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.visual-arrow { color: var(--accent); font-size: 22px; }
.section { padding: 34px 0 6px; }
.section h2 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 16px; text-align: center; }
.steps { display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step-n { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: rgba(107,123,255,.14); color: var(--accent); }
.step h3 { margin: 2px 0 4px; font-size: 17px; }
.step p { margin: 0; color: var(--subtle); font-size: 15px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 16px; }
.checks li::before { content: ""; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E1116' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat; }
.final { text-align: center; padding: 40px 0 10px; }
.final h2 { font-size: 26px; margin: 0 0 18px; letter-spacing: -0.02em; }
.cta-stack { display: grid; gap: 10px; }
.foot { padding: 34px 0 40px; display: flex; justify-content: center; gap: 18px; font-size: 14px; }
.foot a { color: var(--faint); }

/* Квиз */
.quiz { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.quiz-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 12px; padding: 14px 0 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; transition: width .3s ease; }
.step-label { text-align: center; font-size: 12px; color: var(--faint); margin-top: 6px; }
.screen { flex: 1; display: flex; flex-direction: column; padding: 16px 0 24px; animation: in .25s ease; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen h1 { font-size: clamp(26px, 7vw, 32px); line-height: 1.15; letter-spacing: -0.02em; margin: 6px 0 6px; }
.screen .sub { color: var(--subtle); margin: 0 0 20px; }
.options { display: grid; gap: 10px; margin-top: 14px; }
.option { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 18px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.option:hover { border-color: #3A4459; }
.option.selected { border-color: var(--accent); background: rgba(107,123,255,.1); }
.option .emoji { font-size: 24px; width: 32px; text-align: center; flex: none; }
.option b { display: block; font-size: 17px; font-weight: 600; }
.option small { display: block; color: var(--faint); font-size: 14px; margin-top: 2px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-2 .option { flex-direction: column; text-align: center; padding: 22px 12px; }
.grid-2 .option .emoji { font-size: 34px; width: auto; }
.spacer { flex: 1; min-height: 20px; }
.field { margin-top: 14px; }
.field label { display: block; font-size: 14px; color: var(--subtle); margin-bottom: 8px; }
.input-wrap { display: flex; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 0 16px; }
.input-wrap:focus-within { border-color: var(--accent); }
.input-wrap input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ink); font: 600 22px/1 inherit; font-family: inherit; padding: 16px 0; }
.input-wrap span { color: var(--faint); font-size: 16px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 4px; }
.seg button { border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--subtle); cursor: pointer; }
.seg button.on { background: var(--surface-2); color: var(--ink); }
.error { color: var(--danger); font-size: 14px; margin: 10px 0 0; min-height: 1em; }
.big-icon { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; font-size: 38px; background: rgba(107,123,255,.14); margin: 18px 0 18px; }

/* Расчёт */
.loader { text-align: center; padding-top: 40px; }
.ring { width: 140px; height: 140px; margin: 10px auto 26px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .track { stroke: var(--surface-2); }
.ring .bar { stroke: url(#rg); stroke-linecap: round; stroke-dasharray: 377; stroke-dashoffset: 377; transition: stroke-dashoffset .2s linear; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 32px; font-weight: 800; }
.loader-list { list-style: none; padding: 0; margin: 0 auto; max-width: 320px; display: grid; gap: 12px; text-align: left; }
.loader-list li { display: flex; gap: 10px; align-items: center; color: var(--faint); transition: color .3s; }
.loader-list li.done { color: var(--ink); }
.loader-list li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.loader-list li.done::before { border-color: var(--good); background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E1116' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Результат и пейволл */
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px; margin-top: 8px; }
.result-head { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 0 0 14px; }
.result-head em { font-style: normal; color: var(--good); }
.chart { width: 100%; height: 130px; display: block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: var(--bg-2); border-radius: 14px; padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 18px; }
.stat span { font-size: 12px; color: var(--faint); }
.features { list-style: none; padding: 0; margin: 22px 0 6px; display: grid; gap: 10px; }
.features li { display: flex; gap: 12px; align-items: center; font-size: 16px; }
.features li::before { content: "✓"; color: var(--good); font-weight: 800; width: 18px; }
.plans { display: grid; gap: 10px; margin: 18px 0 14px; }
.plan { position: relative; display: grid; grid-template-columns: 24px 1fr auto; gap: 14px; align-items: center; padding: 18px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); cursor: pointer; text-align: left; width: 100%; }
.plan.selected { border-color: var(--accent); background: rgba(107,123,255,.08); }
.plan .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); }
.plan.selected .radio { border: 7px solid var(--accent); }
.plan b { display: block; font-size: 17px; }
.plan small { display: block; color: var(--faint); font-size: 14px; margin-top: 2px; }
.plan .per { font-weight: 700; font-size: 16px; text-align: right; }
.plan .badge { position: absolute; top: -10px; right: 14px; background: var(--good); color: #0E1116; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.trial-pill { display: inline-block; font-size: 13px; font-weight: 700; color: var(--good); background: rgba(61,209,131,.12); padding: 5px 11px; border-radius: 999px; }
.pay-note { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 14px; color: var(--subtle); margin: 12px 0 0; }
.pay-note svg { height: 18px; width: auto; fill: currentColor; }
.legal { font-size: 12.5px; color: var(--faint); line-height: 1.5; margin: 16px 0 0; text-align: center; }
.legal a { color: var(--subtle); text-decoration: underline; }
.sticky-cta { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }

/* После оплаты */
.center { text-align: center; }
.ok-badge { width: 72px; height: 72px; border-radius: 50%; margin: 30px auto 18px; display: grid; place-items: center; background: rgba(61,209,131,.14); }
.ok-badge svg { width: 34px; height: 34px; stroke: var(--good); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.todo { display: grid; gap: 12px; margin: 26px 0; text-align: left; }
.todo .step { grid-template-columns: 36px 1fr; padding: 16px; }
.todo .step-n { width: 36px; height: 36px; border-radius: 50%; font-size: 15px; }
.todo .step.done .step-n { background: var(--good); color: #0E1116; }
.msg { border-radius: 14px; padding: 14px 16px; font-size: 15px; margin: 14px 0 0; }
.msg.err { background: rgba(255,107,107,.1); color: #FFB3B3; }
.msg.info { background: var(--surface); color: var(--subtle); }
