/* Snula: токены из app/src/theme/tokens.ts. Тёмная тема по умолчанию. */
:root {
  --bg: #0B0D12; --surface: #15171D; --elev: #1B1E25; --muted: #22252D; --control: #353944;
  --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.16);
  --text: #ECEEF3; --text2: #A3AAB8; --text3: #8A92A2;
  --accent: #FB7185; --accent-soft: #361C28; --on-accent: #0B0D12;
  --success: #5FD39B; --success-soft: #15302A; --danger: #FF5449; --danger-soft: #3B1A17; --code: #101217;
  --p1: #6EA8FE; --p2: #5FD39B; --p3: #E8B457; --p4: #C08CF2; --p5: #68CFD8; --p6: #BFDC5C;
  --ps1: #1C2A42; --ps2: #15302A; --ps3: #33291A; --ps4: #2A2138; --ps5: #15292C; --ps6: #262D14;
  --grid: rgba(255,255,255,.035);
  --r-sm: 12px; --r-md: 16px; --r-lg: 24px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  /* Запасные кривые. main.js заменяет их на linear() из пружин motion.spring.press и settle. */
  --ease-press: cubic-bezier(.34, 1.3, .64, 1); --dur-press: .4s;
  --ease-settle: cubic-bezier(.22, 1, .36, 1); --dur-settle: .65s;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --top-h: 72px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F6F7F9; --surface: #FFFFFF; --elev: #FFFFFF; --muted: #ECEFF4; --control: #FFFFFF;
  --border: #D5DBE5; --border-strong: #BFC7D4;
  --text: #0B0E14; --text2: #566074; --text3: #5F6778;
  --accent: #C0294F; --accent-soft: #FCE6EF; --on-accent: #FFFFFF;
  --success: #17744B; --success-soft: #E0F2E8; --danger: #8C1D24; --danger-soft: #F8E7E3; --code: #EEF1F6;
  --p1: #2563D9; --p2: #17744B; --p3: #8A5A00; --p4: #7E44C2; --p5: #16717A; --p6: #5A7304;
  --ps1: #E6EEFD; --ps2: #E0F2E8; --ps3: #F8EDD3; --ps4: #EFE6FA; --ps5: #DFF1F2; --ps6: #EEF3D9;
  --grid: rgba(11,14,20,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F6F7F9; --surface: #FFFFFF; --elev: #FFFFFF; --muted: #ECEFF4; --control: #FFFFFF;
    --border: #D5DBE5; --border-strong: #BFC7D4;
    --text: #0B0E14; --text2: #566074; --text3: #5F6778;
    --accent: #C0294F; --accent-soft: #FCE6EF; --on-accent: #FFFFFF;
    --success: #17744B; --success-soft: #E0F2E8; --danger: #8C1D24; --danger-soft: #F8E7E3; --code: #EEF1F6;
    --p1: #2563D9; --p2: #17744B; --p3: #8A5A00; --p4: #7E44C2; --p5: #16717A; --p6: #5A7304;
    --ps1: #E6EEFD; --ps2: #E0F2E8; --ps3: #F8EDD3; --ps4: #EFE6FA; --ps5: #DFF1F2; --ps6: #EEF3D9;
    --grid: rgba(11,14,20,.05);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); overflow-x: hidden; transition: background-color .3s, color .3s; }
@media (min-width: 960px) { body { font-size: 18px; } }
h1, h2, h3, h4, p, ul, ol, figure, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
code, pre { font-family: var(--mono); font-size: .88em; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Знак: открытое кольцо и точка в разрыве */
.glyph { overflow: visible; }
.glyph path { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; }
.glyph circle { fill: var(--accent); }

/* Шапка: прозрачная сверху, компактная и с фоном после прокрутки */
.top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 24px; pointer-events: none; }
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; border-bottom: 1px solid transparent; transition: background-color .35s, border-color .35s, -webkit-backdrop-filter .35s, backdrop-filter .35s; }
.top.scrolled { background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom-color: var(--border); }
.top-in { display: flex; align-items: center; gap: 16px; height: var(--top-h); transition: height var(--dur-settle) var(--ease-settle); }
.top.scrolled .top-in { height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; transition: font-size var(--dur-settle) var(--ease-settle); }
.brand-mark { width: 28px; height: 28px; flex: none; transition: width var(--dur-settle) var(--ease-settle), height var(--dur-settle) var(--ease-settle); }
.top.scrolled .brand { font-size: 17px; }
.top.scrolled .brand-mark { width: 24px; height: 24px; }
.nav { display: flex; gap: 2px; margin-left: 12px; }
.nav a { padding: 8px 10px; border-radius: 10px; color: var(--text2); text-decoration: none; font-size: 15px; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--text); background: var(--muted); }
.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tool { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--border-strong); background: transparent; font: 600 13px var(--mono); transition: background-color .2s; }
.tool:hover { background: var(--muted); }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .i-sun { display: none; }
  :root:not([data-theme]) .i-moon { display: block; }
}

/* Кнопки. Нажатие (масштаб 0.97) ведёт пружина из main.js, без JS работает :active. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 14px; font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none; border: 1px solid transparent; transition: background-color .2s, border-color .2s; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--muted); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
html:not(.js) .btn:active, html:not(.js) .tool:active { scale: .97; }
.link-btn { align-self: flex-start; background: none; border: 0; padding: 6px 0; color: var(--text2); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; margin-top: 8px; }
.link-btn:hover { color: var(--text); }

/* Hero: одна главная анимация (генерация) и знак. Остальное статично. */
.hero { position: relative; padding: calc(var(--top-h) + 64px) 0 clamp(88px, 10vw, 128px); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%); pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.mark { width: 80px; height: 80px; display: block; margin-bottom: 24px; }
.mark .m-ring { stroke-dasharray: 1 2; stroke-dashoffset: 0; }
.mark .m-dot { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .js .mark:not(.done) .m-ring { stroke-dashoffset: 1.1; }
  .js .mark:not(.done) .m-dot { transform: scale(0); }
}
h1 { display: flex; flex-direction: column; }
h1 .name { font-size: clamp(52px, 8vw, 92px); line-height: 1; font-weight: 800; letter-spacing: -.02em; }
h1 .sub { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.3; font-weight: 600; color: var(--text2); margin-top: 12px; letter-spacing: -.01em; }
.slogan { margin-top: 24px; font-size: clamp(19px, 2vw, 22px); font-weight: 600; line-height: 1.4; }
.lead { margin-top: 14px; color: var(--text2); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fine { margin-top: 16px; color: var(--text3); font-size: 15px; line-height: 1.5; }

/* Генерация токенов */
.gen { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px 20px; box-shadow: 0 24px 60px -30px rgba(0,0,0,.5); min-width: 0; }
.gen-head { display: flex; align-items: center; gap: 10px; color: var(--text3); font-size: 14px; }
.dots { display: flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.gen-step { margin-left: auto; color: var(--text2); }
.gen-text { margin: 16px 0 18px; min-height: 3.2em; font-size: clamp(20px, 2.4vw, 25px); line-height: 1.45; font-weight: 600; letter-spacing: -.01em; }
.tk { border-bottom: 2px solid var(--border-strong); border-radius: 2px; transition: background-color .9s, border-color .9s; white-space: pre-wrap; }
.tk + .tk { margin-left: 1px; }
.tk.new { background: var(--accent-soft); border-color: var(--accent); animation: pop .5s var(--ease-press); }
@keyframes pop { from { opacity: 0; } }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.15em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cands { display: grid; gap: 8px; font-size: 16px; }
.cand { display: grid; grid-template-columns: 7.5em 1fr 3em; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px; border: 1px solid transparent; transition: background-color .3s, border-color .3s, opacity .3s; }
.c-tok { color: var(--text2); white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.c-p { text-align: right; color: var(--text3); }
.bar { height: 8px; border-radius: 4px; background: var(--muted); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; border-radius: 4px; background: var(--text3); transform-origin: 0 50%; transform: scaleX(var(--p)); transition: transform var(--dur-settle) var(--ease-settle), background-color .3s; }
.cands.reset .bar i { transform: scaleX(0); transition: none; }
.cand.pick { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.cand.pick .c-tok, .cand.pick .c-p { color: var(--text); }
.cand.pick .bar i { background: var(--accent); }
.cand.off { opacity: 0; }
.gen-foot { margin-top: 14px; color: var(--text3); font-size: 13px; }

/* Секции */
.sec { padding: clamp(88px, 10vw, 136px) 0; }
.sec-app { padding-top: clamp(24px, 4vw, 48px); }
.sec-alt { background: var(--surface); border-block: 1px solid var(--border); }
.kicker { font: 600 13px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; font-weight: 750; letter-spacing: -.02em; max-width: 22em; text-wrap: balance; }
.sec-lead { margin-top: 16px; color: var(--text2); max-width: 66ch; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform var(--dur-settle) var(--ease-settle); }
.js .reveal.in { opacity: 1; transform: none; }
.steps .reveal:nth-child(2), .stats .reveal:nth-child(2n), .plans .reveal:nth-child(2) { transition-delay: .08s; }
.steps .reveal:nth-child(3), .plans .reveal:nth-child(3) { transition-delay: .16s; }

/* Телефон: рамка на CSS, внутри настоящий скриншот */
.phone { position: relative; padding: 8px; border-radius: 46px; background: #050608; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 34px 80px -36px rgba(0,0,0,.75); }
:root[data-theme="light"] .phone { box-shadow: 0 0 0 1px rgba(11,14,20,.25), 0 30px 70px -34px rgba(11,14,20,.45); }
.phone::after { content: ""; position: absolute; right: -3px; top: 22%; width: 3px; height: 12%; border-radius: 0 3px 3px 0; background: #1a1d24; }
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: 38px; background: #0B0D12; }
figure figcaption { margin-top: 18px; color: var(--text2); font-size: 15px; line-height: 1.45; text-align: center; }

/* Экраны приложения */
.shots { display: flex; justify-content: center; align-items: flex-start; gap: clamp(24px, 4vw, 56px); margin-top: 56px; }
.shot { flex: 0 1 280px; min-width: 0; margin-top: 56px; }
.shot-mid { flex-basis: 300px; margin-top: 0; }
.shot figcaption { max-width: 24em; margin-inline: auto; }

/* Промо-ролик над телефонами: не запускается сам, звука нет */

/* Две колонки: текст и телефон сбоку */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 290px); gap: clamp(48px, 7vw, 96px); align-items: center; }
.side-shot { width: 100%; }

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.step { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; }
.sec-alt .step { background: var(--bg); }
.step h3 { font-size: 24px; line-height: 30px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; }
.step > p:not(.step-n) { margin-top: 8px; color: var(--text2); font-size: 16px; line-height: 1.6; }
.step-n { margin-top: 20px; color: var(--text3); font-size: 14px; }
.step-art { height: 184px; border-radius: var(--r-md); background: var(--code); border: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; overflow: hidden; padding: 12px; }

.art-graph svg { width: 100%; max-width: 300px; height: auto; overflow: visible; }
.art-graph .edges path { fill: none; stroke: var(--border-strong); stroke-width: 2; }
.art-graph .grad path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 4 10; opacity: 0; }
.art-graph .nodes > * { fill: var(--surface); stroke: var(--text3); stroke-width: 1.5; }
.art-graph .nodes .loss-node { stroke: var(--accent); }
.art-graph .lbl text { fill: var(--text); font: 600 13px var(--mono); text-anchor: middle; }
.art-graph .formula { fill: var(--accent); font: 600 14px var(--mono); text-anchor: middle; opacity: 0; transition: opacity .6s .9s; }
.step.in .art-graph .grad path { opacity: 1; animation: flow 1.6s linear infinite; transition: opacity .4s; }
.step.in .art-graph .grad path:nth-child(2) { transition-delay: .25s; }
.step.in .art-graph .grad path:nth-child(3) { transition-delay: .5s; }
.step.in .art-graph .formula { opacity: 1; }
@keyframes flow { to { stroke-dashoffset: -28; } }

.art-tests { align-content: center; }
.tests { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; font-size: 12px; line-height: 1.5; }
.tests li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; border-radius: 6px; color: var(--text3); transition: color .3s, background-color .3s; }
.tests code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.tests b { font: 700 11px var(--mono); color: var(--success); transition: opacity .3s, transform var(--dur-press) var(--ease-press); }
.js .tests b { opacity: 0; transform: scale(.6); }
.tests-sum { justify-self: start; width: 100%; margin-top: 4px; padding: 4px 8px; font-size: 12px; color: var(--success); font-weight: 700; }
.js .tests-sum { opacity: 0; transition: opacity .4s 1.9s; }
.js .step.in .tests li { color: var(--text2); background: var(--success-soft); }
.js .step.in .tests b { opacity: 1; transform: none; }
.js .step.in .tests-sum { opacity: 1; }
.tests li:nth-child(1), .tests li:nth-child(1) b { transition-delay: .3s; }
.tests li:nth-child(2), .tests li:nth-child(2) b { transition-delay: .6s; }
.tests li:nth-child(3), .tests li:nth-child(3) b { transition-delay: .9s; }
.tests li:nth-child(4), .tests li:nth-child(4) b { transition-delay: 1.2s; }
.tests li:nth-child(5), .tests li:nth-child(5) b { transition-delay: 1.5s; }

.art-card { perspective: 900px; }
.flip { position: relative; width: 100%; max-width: 280px; height: 132px; transform-style: preserve-3d; transition: transform .9s var(--ease-settle); }
.flip.flipped { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border-strong); display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.face p { font-size: 15px; line-height: 1.4; font-weight: 600; }
.face.back { transform: rotateY(180deg); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.face.back p { font-weight: 400; font-size: 14px; }
.face-tag { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--text3); }
.face.back .face-tag { color: var(--accent); }

/* Попробуй: три вопроса */
.quiz { margin-top: 32px; max-width: 640px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; }
html:not(.js) .quiz { display: none; }
.js .quiz-nojs { display: none; }
.quiz-nojs { margin-top: 24px; color: var(--text2); }
.q-top { display: flex; justify-content: space-between; gap: 12px; font: 600 13px var(--mono); }
.q-block { color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.q-count { color: var(--text3); }
.q-bar { height: 4px; margin: 10px 0 22px; border-radius: 2px; background: var(--muted); overflow: hidden; }
.q-bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--q, .333)); transition: transform var(--dur-settle) var(--ease-settle); }
.q-text { font-size: 19px; line-height: 1.45; font-weight: 600; }
.q-code { margin-top: 14px; padding: 14px 16px; background: var(--code); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; line-height: 1.6; overflow-x: auto; white-space: pre; }
.q-code code { font-size: 1em; }
.q-opts { display: grid; gap: 10px; margin-top: 20px; }
.q-opt { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-align: left; font-size: 16px; line-height: 1.4; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg); transition: border-color .2s, background-color .2s, opacity .2s; }
.q-opt:hover:not([aria-disabled="true"]) { border-color: var(--text3); background: var(--muted); }
.q-opt[aria-disabled="true"] { cursor: default; }
.q-letter { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--muted); color: var(--text2); font: 600 12px var(--mono); }
.q-label { flex: 1; min-width: 0; }
.q-mark { flex: none; font: 600 12px var(--mono); }
.q-opt.ok { border-color: var(--success); background: var(--success-soft); }
.q-opt.ok .q-letter { background: var(--success); color: var(--bg); }
.q-opt.ok .q-mark { color: var(--success); }
.q-opt.bad { border-color: var(--danger); background: var(--danger-soft); }
.q-opt.bad .q-letter { background: var(--danger); color: var(--bg); }
.q-opt.bad .q-mark { color: var(--danger); }
.q-opt.dim { opacity: .55; }
.q-why { margin-top: 18px; color: var(--text2); line-height: 1.6; }
.q-why:empty { display: none; }
.q-why b { color: var(--text); }
.q-next { margin-top: 20px; }
.q-res:focus { outline: none; }
.q-score { font: 600 13px var(--mono); color: var(--text3); }
.q-res-title { margin-top: 8px; font-size: 26px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.q-res-text { margin-top: 10px; color: var(--text2); }

/* Программа */
.hint { margin-top: 10px; color: var(--text3); font-size: 15px; }
.tl-wrap { margin-top: 36px; }
.loss { position: relative; height: 84px; margin-bottom: 18px; }
html:not(.js) .loss { display: none; }
.loss svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.loss-ghost { fill: none; stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 2 5; vector-effect: non-scaling-stroke; }
.loss-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.loss-dot { position: absolute; left: calc(var(--x, 1) * 100%); top: calc(var(--y, .9) * 100%); width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.loss-val { position: absolute; left: calc(var(--x, 1) * 100%); top: calc(var(--y, .9) * 100%); transform: translate(calc(var(--x, 1) * -100%), -170%); font: 600 12px var(--mono); color: var(--text2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl { display: grid; gap: 22px; }
.tl-core { display: flex; gap: 6px; min-width: 0; }
.tl-core .tl-group { flex: var(--n, 1) 1 0; min-width: 0; }
.tl-core .tl-group:nth-child(1), .tl-core .tl-group:nth-child(3), .tl-core .tl-group:nth-child(4), .tl-core .tl-group:nth-child(5) { --n: 4; }
.tl-core .tl-group:nth-child(2) { --n: 6; }
.tl-core .tl-group:nth-child(6) { --n: 2; }
.tl-name { font-size: 13px; line-height: 1.3; color: var(--text2); margin-bottom: 8px; display: flex; align-items: flex-end; gap: 6px; }
.tl-name small { color: var(--text3); font-size: 12px; }
.tl-core .tl-name { border-bottom: 3px solid var(--c); padding-bottom: 6px; min-height: 3.4em; }
.ph-n { font: 700 12px var(--mono); color: var(--c); }
.wks { display: flex; gap: 4px; }
.wks li { flex: 1 1 0; min-width: 0; }
.wk { position: relative; width: 100%; min-width: 30px; height: 48px; border-radius: 10px; border: 1px solid var(--border); background: var(--cs, var(--muted)); color: var(--c, var(--text2)); font: 700 13px var(--mono); display: grid; place-items: center; transition: transform var(--dur-press) var(--ease-press), background-color .2s, border-color .2s, color .2s; }
.wk:hover, .wk[aria-pressed="true"] { transform: translateY(-5px); border-color: var(--c, var(--text2)); }
.wk[aria-pressed="true"] { background: var(--c, var(--text2)); color: var(--bg); }
.wk.cp::after { content: ""; position: absolute; top: -4px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); }
.tl-f .wk { background: transparent; border-style: dashed; border-color: var(--border-strong); }
.tl-f .wk[aria-pressed="true"], .tl-c .wk[aria-pressed="true"] { background: var(--text2); color: var(--bg); }
.tl-c .wk { min-width: 64px; background: transparent; border-color: var(--border-strong); }
.tl-f .wks li { flex: 0 1 56px; }
.tl-c .wks li { flex: 0 1 240px; }
.js .tl .wks li { opacity: 0; transform: translateY(10px); transition: opacity .4s, transform var(--dur-press) var(--ease-press); transition-delay: calc(var(--i, 0) * 22ms); }
.js .tl.in .wks li { opacity: 1; transform: none; }
.wk-detail { margin-top: 24px; padding: 18px 20px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--border); min-height: 108px; }
.wk-meta { font: 600 13px var(--mono); color: var(--text3); }
.wk-title { margin-top: 4px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.wk-title.swap { animation: rise .5s var(--ease-settle); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.wk-cp { margin-top: 6px; color: var(--text2); font-size: 16px; }
.wk-cp:empty { display: none; }
.legend { margin-top: 12px; color: var(--text3); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.cp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text2); }

/* Цифры */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 44px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.split .stats { grid-template-columns: repeat(2, 1fr); }
.stat { background: var(--bg); padding: 24px 22px; display: flex; flex-direction: column; gap: 6px; }
.num { font: 800 clamp(40px, 4.6vw, 54px)/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--text2); font-size: 16px; line-height: 1.45; }

/* Тьютор */
.tutor-in { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.ticks { display: grid; gap: 10px; margin-top: 24px; }
.ticks li { position: relative; padding-left: 26px; color: var(--text2); line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 10px; height: 6px; border-left: 2px solid var(--success); border-bottom: 2px solid var(--success); transform: rotate(-45deg); }
.chat { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; min-height: 480px; }
.chat-head { color: var(--text3); font-size: 13px; padding: 2px 4px 12px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.msgs { display: flex; flex-direction: column; gap: 10px; }
.msg { position: relative; max-width: 86%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; font-size: 15px; }
.msg.me { align-self: flex-end; background: var(--muted); border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border-strong); border-bottom-left-radius: 6px; }
.msg.pending { opacity: 0; }
.msg.show { animation: rise .5s var(--ease-settle); }
.gh { color: transparent; }
.wait { display: none; position: absolute; left: 14px; top: 13px; gap: 4px; }
.msg.waiting .wait { display: inline-flex; }
.wait i { width: 6px; height: 6px; border-radius: 50%; background: var(--text3); animation: bob 1.2s ease-in-out infinite; }
.wait i:nth-child(2) { animation-delay: .15s; }
.wait i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Тарифы */
.billing { position: relative; display: inline-flex; margin-top: 32px; padding: 4px; border-radius: 14px; background: var(--muted); gap: 4px; }
.bill-thumb { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 10px; background: var(--control); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
html:not(.js) .bill-thumb { display: none; }
.bill { position: relative; z-index: 1; border: 0; background: transparent; min-height: 40px; padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--text2); transition: color .25s; }
.bill small { color: var(--success); font-weight: 700; font-size: 13px; }
.bill.on { color: var(--text); }
html:not(.js) .bill.on { background: var(--control); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; }
.plan-main { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.plan h3 { font-size: 20px; font-weight: 700; }
.price { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: var(--text2); font-size: 16px; }
.price b { font-size: 42px; line-height: 1.05; letter-spacing: -.02em; color: var(--text); font-weight: 800; display: inline-block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-for { margin-top: 6px; color: var(--text3); font-size: 15px; min-height: 1.5em; }
.plan .ticks { margin: 20px 0 26px; flex: 1; align-content: start; font-size: 16px; }
.b2b { margin-top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; }
.b2b-head h3 { font-size: 22px; font-weight: 700; }
.b2b-head p { color: var(--text2); margin-top: 6px; max-width: 66ch; }
.b2b-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0; }
.b2b-item { border-top: 1px solid var(--border-strong); padding-top: 14px; }
.b2b-item h4 { font-size: 17px; font-weight: 600; }
.price-sm { margin: 6px 0 8px; color: var(--text2); font-size: 15px; }
.price-sm b { font-size: 24px; color: var(--text); font-weight: 800; letter-spacing: -.02em; }
.b2b-item > p:last-child { color: var(--text2); font-size: 16px; line-height: 1.55; }
.price-note { max-width: 66ch; }

/* FAQ */
.faq { max-width: 820px; margin-top: 32px; border-top: 1px solid var(--border-strong); }
details { border-bottom: 1px solid var(--border-strong); }
summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-size: 19px; font-weight: 600; line-height: 1.4; border-radius: 8px; }
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent); }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
summary::after { content: ""; position: absolute; right: 10px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--text2); border-bottom: 2px solid var(--text2); transform: rotate(45deg); transition: transform var(--dur-press) var(--ease-press); }
details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.a p { padding: 0 0 24px; color: var(--text2); max-width: 66ch; }
details[open] .a { animation: rise .45s var(--ease-settle); }

/* Футер */
.foot { padding: 56px 0 64px; border-top: 1px solid var(--border); }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; color: var(--text2); font-size: 15px; }
.foot-brand { display: flex; gap: 12px; align-items: center; }
.foot-mark { width: 32px; height: 32px; flex: none; }
.foot-brand b { color: var(--text); font-size: 17px; }
.foot-links { display: flex; gap: 20px; align-items: center; }
.foot a { text-underline-offset: 3px; }
.foot a:hover { color: var(--text); }
.foot-copy { color: var(--text3); text-align: right; }

/* Адаптивность */
@media (max-width: 1080px) {
  .nav a { padding: 8px 7px; font-size: 14px; }
}
@media (max-width: 960px) {
  .hero-in, .tutor-in, .split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .side-shot { display: none; }
  .steps, .plans { grid-template-columns: minmax(0, 1fr); }
  .split .stats { grid-template-columns: repeat(4, 1fr); }
  .nav { display: none; }
}
@media (max-width: 760px) {
  .shots { justify-content: flex-start; gap: 16px; margin: 40px -20px 0; padding: 4px 20px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; }
  .shots::-webkit-scrollbar { display: none; }
  .shot, .shot-mid { flex: 0 0 min(72vw, 290px); margin-top: 0; scroll-snap-align: center; }
  .tl-core { flex-direction: column; gap: 14px; }
  .tl-core .tl-name { min-height: 0; }
  .tl-core .wks li { flex: 0 1 56px; }
  .b2b-grid { grid-template-columns: minmax(0, 1fr); }
  .stats, .split .stats { grid-template-columns: repeat(2, 1fr); }
  .foot-in { grid-template-columns: 1fr; }
  .foot-copy { text-align: left; }
}
@media (max-width: 480px) {
  :root { --top-h: 60px; }
  .wrap { padding: 0 16px; }
  .shots { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .hero { padding-top: calc(var(--top-h) + 36px); }
  .top-cta { display: none; }
  .cta-row .btn { flex: 1 1 100%; }
  .gen { padding: 14px; }
  .cand { grid-template-columns: 6em 1fr 2.6em; gap: 8px; padding: 6px 8px; }
  .stat { padding: 18px 14px; }
  .quiz { padding: 18px 16px; margin-inline: -4px; }
  .q-text { font-size: 18px; }
  .msg { max-width: 92%; }
  .chat { min-height: 540px; }
  .plan, .b2b { padding: 22px 18px; }
  .price b { font-size: 38px; }
}

/* Без движения: конечное состояние сразу */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .tl .wks li { opacity: 1 !important; transform: none !important; }
  .js .tests b, .js .tests-sum { opacity: 1; transform: none; }
  .js .tests li { color: var(--text2); background: var(--success-soft); }
  .art-graph .grad path, .art-graph .formula { opacity: 1; }
  .caret { opacity: 1; }
}

.foot-made { color: var(--text2); font-size: 15px; margin: 0 0 6px; }

/* ---------- Лента недель, редизайн 28.09: одна высота, ровные подписи, без выпирания ---------- */
.tl-name { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-items: center; }
.tl-core .tl-name { min-height: 0; }
.tl-f .tl-name, .tl-c .tl-name { border-bottom: 3px solid var(--border-strong); padding-bottom: 6px; }
.wk:hover { transform: translateY(-2px); }
.wk[aria-pressed="true"] { transform: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c, var(--text2)); }
.tl-f .wk, .tl-c .wk { background: var(--muted); border-style: solid; border-color: var(--border); color: var(--text2); }
.tl-f .wks li, .tl-c .wks li { flex: 0 1 56px; }
.tl-c .wk { min-width: 30px; }
.wk.cp::after { top: 5px; right: 5px; width: 6px; height: 6px; border: 0; }
.wk-detail { display: flex; align-items: center; gap: 16px; min-height: 0; padding: 16px 18px; }
.wk-num { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  font: 700 18px var(--mono); color: var(--bg); background: var(--text2); }
.wk-body { flex: 1 1 auto; min-width: 0; }
.wk-meta { font: 600 12px var(--sans, inherit); letter-spacing: .06em; text-transform: uppercase; color: var(--text3); }
.wk-title { margin-top: 2px; font-size: 21px; }
.wk-cp { margin-top: 4px; font-size: 15px; }
.wk-open { flex: 0 0 auto; color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; padding: 8px 4px; }
.wk-open:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .wk-detail { flex-wrap: wrap; }
  .wk-open { width: 100%; padding: 4px 0 0 68px; }
}

/* ---------- FAQ, 28.09: вопросы и ответы открыты сразу, без аккордеона ---------- */
.faq { max-width: none; border-top: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qa { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 22px 24px; }
.qa h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.qa .a, .qa .a p { margin: 0; color: var(--text2); font-size: 16px; line-height: 1.6; }
@media (max-width: 760px) { .faq { grid-template-columns: 1fr; } }
