:root {
  --bg: #14163a;
  --bg2: #1d2054;
  --card: #ffffff;
  --ink: #1c1f4a;
  --text: #eef0ff;
  --muted: #a6abd6;
  --line: rgba(255, 255, 255, .12);
  --acc: #6c5cff;
  --acc2: #19c3d4;
  --grad: linear-gradient(135deg, #6c5cff, #19c3d4);
  --ok: #2fd38a;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 50% -200px, #2a2d78 0%, var(--bg) 60%) fixed, var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acc2); }
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); }

.top {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  max-width: 560px; margin: 0 auto; padding: 14px 18px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .2px; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--grad);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: -0.5px; color: #fff;
}
.lang {
  margin-left: auto; background: transparent; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer;
}
.timer {
  margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600;
  background: var(--bg2); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px;
}
.timer.low { color: #ff7a7a; border-color: #ff7a7a; }

.wrap { max-width: 560px; margin: 0 auto; padding: 8px 18px 48px; }
h1 { font-size: clamp(32px, 8vw, 44px); line-height: 1.1; text-align: center; margin: 14px 0 10px; }
h2 { font-size: 26px; line-height: 1.2; text-align: center; margin: 18px 0 10px; }
h3 { font-size: 18px; margin: 28px 0 12px; }
.lead { text-align: center; color: var(--muted); margin: 0 auto 18px; max-width: 460px; }
.badge {
  display: table; margin: 14px auto 0; font-size: 13px; padding: 5px 12px; border-radius: 999px;
  background: rgba(108, 92, 255, .18); color: #cfc9ff; border: 1px solid rgba(108, 92, 255, .4);
}
.hero-art { max-width: 260px; margin: 8px auto 20px; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }

.btn {
  display: block; width: 100%; border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  border-radius: 14px; padding: 14px 18px; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 30px rgba(108, 92, 255, .35); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { padding: 17px 18px; font-size: 17px; margin-top: 12px; }
.ghost { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px 0; }

.feats { list-style: none; padding: 0; margin: 24px 0 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feats li { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; }
.feats b { display: block; font-size: 15px; }
.feats span { font-size: 12px; color: var(--muted); line-height: 1.3; display: block; margin-top: 2px; }
.legal { font-size: 12px; color: var(--muted); text-align: center; margin-top: 18px; }

.step-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 4px 0 10px; font-size: 14px; }
.step-head > :first-child { justify-self: start; }
.test .step-head { display: block; text-align: center; }
.bar { height: 6px; background: rgba(255, 255, 255, .1); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s ease; }

.choices { display: grid; gap: 10px; margin-top: 22px; }
.choice {
  text-align: left; background: var(--bg2); color: var(--text); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 16px 18px; font-size: 16px; cursor: pointer; transition: border-color .15s, background .15s;
}
.choice:hover { border-color: rgba(108, 92, 255, .7); }
.choice.sel { border-color: var(--acc); background: rgba(108, 92, 255, .25); }

.how { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; }
.how li { display: flex; gap: 14px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.how span { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 700; }

/* test */
.prompt { text-align: center; font-size: 19px; margin: 18px 0 14px; font-weight: 600; }
.stem { background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; }
.matrix { display: block; width: 100%; max-width: 340px; margin: 0 auto; color: var(--ink); }
.cell-bg { fill: #f3f4fb; }
.cell-missing { fill: #fff; stroke: var(--acc); stroke-width: 2.5; stroke-dasharray: 6 5; }
.cell-q { font: 700 40px sans-serif; fill: var(--acc); }
.fig { display: block; width: 100%; color: var(--ink); }
.piece rect { fill: #6c5cff; stroke: #fff; stroke-width: 1.5; }
.ref-fig { max-width: 140px; margin: 0 auto; }
.fig.ref .piece rect { fill: var(--ink); }
html[lang=ru] .ab-en, html:not([lang=ru]) .ab-ru { display: none; }
.series { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-size: 26px; font-weight: 700; padding: 10px 0; }
.series span { min-width: 46px; padding: 6px 10px; border-radius: 10px; background: #f3f4fb; text-align: center; }
.series .q { background: #fff; color: var(--acc); outline: 2px dashed var(--acc); outline-offset: -2px; }

.opts { display: grid; gap: 10px; }
.fig-opts { grid-template-columns: repeat(3, 1fr); }
.fig-opts.n4 { grid-template-columns: repeat(4, 1fr); }
.txt-opts { grid-template-columns: 1fr 1fr; }
.opt {
  position: relative; background: var(--card); color: var(--ink); border: 3px solid transparent; border-radius: 14px;
  padding: 8px; cursor: pointer; font-size: 18px; font-weight: 600; min-height: 56px; transition: border-color .12s, transform .08s;
}
.opt:hover { border-color: rgba(108, 92, 255, .5); }
.opt.sel { border-color: var(--acc); transform: scale(.97); }
.opt-l { position: absolute; top: 4px; left: 8px; font-size: 11px; color: #9aa0c8; }

/* analyzing */
.ring { position: relative; width: 180px; margin: 24px auto; }
.ring svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 9; }
.ring-fg { fill: none; stroke: var(--acc2); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .05s linear; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; }
.checks { list-style: none; padding: 0; text-align: left; display: grid; gap: 10px; max-width: 340px; margin: 0 auto; }
.checks li { color: var(--muted); padding-left: 30px; position: relative; }
.checks li::before { content: ''; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); }
.checks li.ok { color: var(--text); }
.checks li.ok::before { background: var(--ok); border-color: var(--ok); content: '✓'; font-size: 13px; color: #0b2; display: grid; place-items: center; color: #fff; }
.modal { position: fixed; inset: 0; background: rgba(5, 6, 20, .6); display: grid; place-items: end center; padding: 18px; z-index: 10; }
.sheet { width: 100%; max-width: 520px; background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.sheet h3 { text-align: center; margin: 4px 0 16px; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }

/* email */
.done-ico { width: 64px; height: 64px; margin: 18px auto 0; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 30px; }
.email { margin-top: 18px; }
.email input, .name {
  width: 100%; font-size: 17px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--bg2); color: var(--text); outline: none;
}
.email input:focus, .name:focus { border-color: var(--acc); }
.err { color: #ff7a7a; font-size: 14px; margin: 6px 2px 0; }

/* paywall */
.preview { background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 18px; text-align: center; margin-top: 14px; }
.preview span { color: #6b6f93; font-size: 14px; }
.preview b { display: block; font-size: 64px; line-height: 1; margin: 6px 0; }
.blur { filter: blur(10px); user-select: none; }
.preview .bell text { fill: #9aa0c8; }
.reserve { text-align: center; margin: 14px 0; color: var(--muted); font-size: 14px; }
.reserve b { color: #ffcf5c; font-variant-numeric: tabular-nums; }
.plans { display: grid; gap: 10px; }
.plan {
  position: relative; display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: var(--bg2); border: 2px solid var(--line); border-radius: 16px; padding: 16px;
}
.plan.sel { border-color: var(--acc); background: rgba(108, 92, 255, .18); }
.plan input { accent-color: var(--acc); width: 20px; height: 20px; }
.plan div { flex: 1; }
.plan b { display: block; }
.plan small { color: var(--muted); }
.plan em { font-style: normal; font-weight: 800; font-size: 20px; }
.pop { position: absolute; top: -10px; right: 14px; background: var(--grad); font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.demo { font-size: 12px; text-align: center; color: #ffcf5c; margin-top: 10px; }
.inc { list-style: none; padding: 0; display: grid; gap: 10px; }
.inc li { padding-left: 28px; position: relative; }
.inc li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* bell + result */
.bell { display: block; width: 100%; margin: 8px 0; }
.bell text { font-size: 10px; fill: var(--muted); }
.bell-line { fill: none; stroke: #8b92c9; stroke-width: 2; }
.bell-area { fill: rgba(108, 92, 255, .35); }
.bell-mark { stroke: var(--acc2); stroke-width: 2; stroke-dasharray: 3 3; }
.bell-dot { fill: var(--acc2); }
.score {
  text-align: center; font-size: 96px; font-weight: 800; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lvl { display: table; margin: 8px auto; padding: 4px 14px; border-radius: 999px; background: rgba(47, 211, 138, .15); color: var(--ok); font-weight: 600; }
.stats { display: flex; justify-content: center; gap: 18px; color: var(--muted); font-size: 14px; }
.skills { list-style: none; padding: 0; display: grid; gap: 14px; }
.sk-h { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 15px; }
#cert { width: 100%; height: auto; border-radius: 12px; margin-top: 12px; display: block; }

@media (max-width: 340px) {
  .fig-opts.n4 { grid-template-columns: repeat(2, 1fr); }
  .feats { grid-template-columns: 1fr; }
}

/* ---- v2 additions ---- */
a.logo { color: inherit; text-decoration: none; }
.center-head { display: block; text-align: center; }
.link { background: none; border: 0; color: var(--acc2); cursor: pointer; font-size: 14px; padding: 8px; text-decoration: underline; text-underline-offset: 3px; }
.link.muted { color: var(--muted); text-decoration: none; }
.challenge { margin: 10px 0 0; padding: 12px 16px; border-radius: 14px; text-align: center; background: rgba(25, 195, 212, .14); border: 1px solid rgba(25, 195, 212, .45); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 12px 2px 0; cursor: pointer; }
.check input { accent-color: var(--acc); width: 18px; height: 18px; margin-top: 2px; }
.plan { width: 100%; text-align: left; color: var(--text); font: inherit; }
.plan .radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); }
.plan.sel .radio { border: 6px solid var(--acc); background: #fff; }
.inc { margin: 16px 0 4px; }
.terms { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 4px 0; line-height: 1.45; }
.secure { font-size: 12px; color: var(--muted); text-align: center; margin: 6px 0 0; }
.btn:disabled { opacity: .7; cursor: default; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 24px 0; }
.card h3 { margin: 0 0 4px; }
.card .muted { margin: 0 0 12px; font-size: 14px; }
.card .btn + .btn { margin-top: 10px; }
.card .row { margin-top: 12px; }
.card.train { border-color: rgba(47, 211, 138, .4); }
.card.upsell { border-color: rgba(108, 92, 255, .6); background: linear-gradient(180deg, rgba(108,92,255,.18), var(--bg2)); }
.streak { font-weight: 700; color: #ffcf5c; margin: 0 0 12px; }
.sk-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.history { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.history div { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; text-align: center; }
.history b { display: block; font-size: 22px; }
.history span { font-size: 12px; color: var(--muted); }
.history i { color: var(--muted); font-style: normal; }
#card { width: 100%; max-width: 320px; height: auto; display: block; margin: 0 auto; border-radius: 14px; }
.opt.right { border-color: var(--ok); background: #e9fbf2; }
.opt.wrong { border-color: #ff7a7a; background: #fff0f0; }
.feedback { text-align: center; min-height: 24px; font-weight: 600; margin-top: 14px; }
.ok-text { color: var(--ok); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 999px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.35); z-index: 20; }
.legal-page { line-height: 1.6; }
.legal-page h1 { text-align: left; font-size: 30px; }
.legal-page h2 { text-align: left; font-size: 20px; margin-top: 26px; }
.preview { padding: 12px 18px 6px; }
.preview b { font-size: 48px; }
.preview .bell { max-width: 240px; margin: 0 auto; }
.paywall .plans { margin-top: 14px; }
.series { gap: 6px; font-size: 22px; flex-wrap: nowrap; }
.series span { min-width: 0; flex: 1 1 0; max-width: 54px; padding: 6px 2px; }

/* ---------- warm-up, memory, pauses ---------- */
.emoji-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; font-size: 44px; text-align: center; padding: 8px 0; }
.emoji-grid span { background: #f3f4fb; border-radius: 14px; padding: 10px 0; line-height: 1.2; }
.memo h2, .pause h2 { margin-top: 8px; }
.memo-box { background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 28px 16px; margin: 20px 0; }
.memo-box b { font-size: 44px; letter-spacing: .5px; }
.tiles { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; }
.tiles span { width: 42px; height: 58px; display: grid; place-items: center; font-size: 32px; font-weight: 800; border-radius: 12px; background: #f3f4fb; box-shadow: inset 0 -3px 0 rgba(28, 31, 74, .08); }
.small { font-size: 13px; }
.pause-art { font-size: 72px; margin: 18px 0; filter: drop-shadow(0 8px 24px rgba(108, 92, 255, .5)); }
.radar { display: block; width: 220px; margin: 12px auto; }
.radar-grid { fill: none; stroke: var(--line); stroke-width: 1.5; }
.radar-area { fill: rgba(108, 92, 255, .35); stroke: var(--acc); stroke-width: 2.5; stroke-linejoin: round; }
.radar-dot { fill: var(--acc2); }
.gauge { display: block; width: 240px; margin: 16px auto; }
.gauge-bg, .gauge-fg { fill: none; stroke-width: 14; stroke-linecap: round; }
.gauge-bg { stroke: var(--line); }
.gauge-fg { stroke: var(--acc2); transition: stroke-dashoffset .8s ease; }
.gauge-t { font: 800 34px -apple-system, Segoe UI, Arial, sans-serif; fill: var(--text); }

/* ---------- calculating ---------- */
.scales { list-style: none; padding: 0; margin: 18px auto 0; max-width: 420px; text-align: left; }
.scales li { display: flex; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--bg2); }
.scales li b { font-weight: 500; color: var(--muted); font-size: 14px; }
.scales li.prog b { color: var(--acc2); }
.scales li.done b { color: var(--ok); }
.wrap-row { flex-wrap: wrap; }
.wrap-row .btn { flex: 1 1 40%; }

/* ---------- paywall: trial steps, questions ---------- */
.how-trial ol { list-style: none; padding: 0; margin: 0 0 8px; position: relative; }
.how-trial li { display: flex; gap: 14px; padding: 0 0 16px 0; position: relative; }
.how-trial li::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--grad); margin-top: 4px; box-shadow: 0 0 0 4px rgba(108, 92, 255, .2); }
.how-trial li:not(:last-child)::after { content: ''; position: absolute; left: 6px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.how-trial li div b { display: block; }
.how-trial li div span { display: block; color: var(--muted); font-size: 14px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--bg2); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.danger-zone { margin-top: 28px; }
.danger-zone h3 { margin: 0 0 6px; }
.danger-zone .row { display: flex; gap: 10px; margin-top: 10px; }
.danger-zone .row .btn { flex: 1; }
.btn.danger { background: #d9435b; color: #fff; border-color: #d9435b; }
.plan-card { border: 1px solid rgba(108, 92, 255, .45); }
.plan-card h3 { margin: 0 0 6px; }
.plan-steps { margin: 10px 0 0; padding-left: 20px; }
.plan-steps li { margin: 4px 0; }
.tip { margin-top: 8px; font-size: 14px; opacity: .85; text-align: left; }

/* ---------- development program ---------- */
.stem .ngrid { display: grid; grid-template-columns: repeat(3, 64px); gap: 6px; justify-content: center; }
.stem .ngrid span { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 10px; background: #eef0fb; font-size: 22px; font-weight: 700; }
.stem .ngrid span.q { background: #e6e1ff; color: var(--acc); }
.stem .eq { text-align: center; font-size: 26px; font-weight: 700; padding: 10px 0; letter-spacing: .5px; }
.stem .facts p, .stem .code p { margin: 4px 0; font-size: 17px; }
.stem .facts .concl { margin-top: 10px; font-weight: 700; color: var(--acc); }
.stem .code p { font-size: 22px; font-weight: 700; text-align: center; letter-spacing: 1px; }
.stem .pair { display: flex; justify-content: space-around; align-items: center; }
.stem .pair .fig rect, .opt .fig rect { fill: var(--acc); }
.stem .moves { text-align: center; font-size: 26px; letter-spacing: 4px; font-weight: 700; margin-bottom: 8px; }
.stem svg.grid { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.stem .grid .cell { fill: #f4f5fc; stroke: #cfd3ee; }
.stem .grid .dot { fill: var(--acc); }
.stem .grid .lbl { font: 700 18px sans-serif; fill: #e0563b; }
.board .on { fill: var(--acc); } .board .off { fill: #e3e6f6; }
.stem .board { display: block; margin: 0 auto; width: 150px; height: auto; }
.opt .board { width: 100%; max-width: 90px; height: auto; }
.stem .digits { text-align: center; font-size: 38px; font-weight: 800; letter-spacing: 6px; padding: 14px 0; }
/* Memory items: the stem shows for --d seconds, then the answers appear. */
.flash { animation: mm-hide 0s linear var(--d) forwards; position: relative; }
.flash::after { content: ''; position: absolute; left: 0; bottom: -6px; height: 4px; width: 100%; border-radius: 4px; background: var(--grad); transform-origin: left; animation: mm-shrink var(--d) linear forwards; }
.late { animation: mm-show 0s linear var(--d) both; }
@keyframes mm-hide { to { visibility: hidden; opacity: 0; } }
@keyframes mm-shrink { to { transform: scaleX(0); } }
@keyframes mm-show { from { visibility: hidden; } to { visibility: visible; } }
.memo-hint { text-align: center; color: var(--muted); font-size: 14px; margin: -6px 0 10px; }
.block-tag { display: inline-block; font-size: 13px; padding: 3px 10px; border-radius: 99px; background: rgba(108, 92, 255, .22); color: #d9d4ff; margin-bottom: 6px; }
.explain { margin-top: 10px; font-size: 15px; text-align: left; background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 10px 12px; }
.week { display: flex; gap: 6px; margin: 10px 0 4px; }
.week span { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.week span.on { background: var(--grad); }
.today-blocks { list-style: none; padding: 0; margin: 10px 0 14px; }
.today-blocks li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.today-blocks li:last-child { border-bottom: 0; }
.lv-list { list-style: none; padding: 0; margin: 0; }
.lv-list li { margin: 14px 0; }
.lv-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lv-h small { color: var(--muted); }
.spark { display: block; width: 100%; height: 28px; margin-top: 4px; }
.spark polyline { fill: none; stroke: var(--acc2); stroke-width: 2; }
.chg { list-style: none; padding: 0; margin: 12px auto; max-width: 340px; text-align: left; }
.chg li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.chg .up { color: var(--ok); } .chg .down { color: #ff9a7a; }
.dev { margin: 28px 0; }
.dev h2 { font-size: 22px; line-height: 1.25; margin: 0 0 8px; }
.dev ul { padding-left: 0; list-style: none; margin: 12px 0; }
.dev li { padding: 4px 0; }
.dev li::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.fine { font-size: 12px; color: var(--muted); }
.lv-h b { white-space: nowrap; }
