/* Лендинг, вход/регистрация и юридические страницы AI-ZAN */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff4ff;
  --navy: #0b1b3a;
  --navy-2: #13254a;
  --navy-line: #22365f;
  --ink: #0f1a33;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 12px 22px; font-weight: 600; cursor: pointer; font-size: 15px; transition: background .15s, transform .15s; }
.btn svg { width: 16px; height: 16px; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: #1c2b4d; }
.btn.light { background: #fff; color: var(--ink); }
.btn.light:hover { background: #eef2f8; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.primary:disabled { background: #93c5fd; cursor: default; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover { background: #f8fafc; }
.btn.sm { padding: 9px 16px; font-size: 14px; }
.btn.block { width: 100%; }

/* шапка */
.header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand svg { width: 32px; height: 32px; }
.brand .wordmark { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 14px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }
.header-actions { display: flex; gap: 10px; align-items: center; margin-left: 24px; }
.header-actions .login-link { font-size: 14px; font-weight: 500; color: var(--text-2); padding: 8px 10px; }

/* hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(100deg, #f4f5f7 0%, #eceef1 55%, #e2e4e8 100%); }
.hero-img { position: absolute; inset: 0 0 0 auto; width: 62%; background-size: cover; background-position: center right; }
.hero-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #eceef1 0%, rgba(236,238,241,.85) 18%, rgba(236,238,241,0) 55%); }
.hero-img.fallback { display: flex; align-items: center; justify-content: center; color: #8a6a44; }
.hero-img.fallback svg { width: 70%; height: 80%; opacity: .9; }
.hero .wrap { position: relative; padding-top: 72px; padding-bottom: 88px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: var(--text-2); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.hero h1 { font-size: 52px; line-height: 1.08; letter-spacing: -.025em; margin: 18px 0 18px; max-width: 580px; font-weight: 700; }
.hero p { max-width: 520px; color: var(--text-2); font-size: 16.5px; margin: 0 0 30px; }

.features-row { position: relative; margin-top: -40px; z-index: 2; }
.features-row .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fcard { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: 0 10px 30px rgba(15,23,42,.05); }
.fcard .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.fcard .ic svg { width: 18px; height: 18px; }
.fcard b { display: block; font-size: 15px; margin-bottom: 4px; }
.fcard span { color: var(--muted); font-size: 13.5px; }

/* секции */
.section { padding: 96px 0; }
.section.gray { background: var(--bg); }
.section.navy { background: var(--navy); color: #fff; }
.section h2 { font-size: 36px; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 12px; text-align: center; }
.section .sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 48px; }
.section.navy .sub { color: #a9b6d3; }

.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tool { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.tool.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; background: var(--bg); }
.tool .tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; background: #fff; }
.tool h3 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.tool p { margin: 0; color: var(--muted); }
.checks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: center; font-size: 14.5px; }
.checks li::before { content: ""; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/11px no-repeat; }

.mock { background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 40px rgba(15,23,42,.08); overflow: hidden; font-size: 12.5px; }
.mock-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); font-weight: 500; }
.mock-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 85%; padding: 8px 11px; border-radius: 10px; line-height: 1.45; }
.bubble.u { align-self: flex-end; background: var(--primary); color: #fff; }
.bubble.b { align-self: flex-start; background: #f1f4f8; }
.bubble small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.risk-list { display: grid; gap: 6px; }
.risk-row { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 12.5px; border: 1px solid; }
.risk-row span:last-child { color: var(--muted); font-weight: 400; }
.r-crit { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.r-high { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.r-mid { background: #fefce8; border-color: #fde68a; color: #a16207; }
.r-low { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.file-chip { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; margin-bottom: 4px; }
.mini-list { display: grid; gap: 6px; }
.mini-list div { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.steps::before { content: ""; position: absolute; top: 28px; left: 12%; right: 12%; border-top: 1.5px dashed #cbd5e1; }
.step { text-align: center; position: relative; }
.step .n { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 14px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; position: relative; }
.step .n svg { width: 22px; height: 22px; }
.step .n em { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 11px; font-style: normal; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.step b { display: block; margin-bottom: 6px; }
.step span { color: var(--muted); font-size: 13.5px; display: block; max-width: 230px; margin: 0 auto; }

/* аудитория */
.aud { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.acard { background: var(--navy-2); border: 1px solid var(--navy-line); border-radius: 16px; padding: 22px; }
.acard .ic { width: 34px; height: 34px; border-radius: 9px; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.acard .ic svg { width: 17px; height: 17px; }
.acard b { display: block; margin-bottom: 4px; }
.acard span { color: #a9b6d3; font-size: 14px; }

/* безопасность */
.sec-head { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 32px; }
.sec-head h2 { text-align: left; }
.sec-head p { color: var(--muted); margin: 0; max-width: 560px; }
.sec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.scard { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.scard .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.scard .ic svg { width: 16px; height: 16px; }
.scard b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.scard span { color: var(--muted); font-size: 13px; }
.disclaimer { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 16px 0; color: var(--muted); font-size: 13px; }
.disclaimer .wrap { display: flex; gap: 10px; align-items: flex-start; }
.disclaimer svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }

/* тарифы */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; }
.plan.hl { border-color: var(--primary); box-shadow: 0 16px 40px rgba(37,99,235,.12); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-name { color: var(--primary); font-weight: 600; font-size: 18px; }
.plan-badge { font-size: 11.5px; border: 1px solid #14b8a6; color: #0f766e; background: #f0fdfa; border-radius: 999px; padding: 2px 10px; }
.plan-price { font-size: 30px; font-weight: 700; margin: 10px 0 16px; letter-spacing: -.02em; }
.plan-price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; padding: 16px 0 0; margin: 0 0 22px; border-top: 1px solid var(--border); display: grid; gap: 10px; flex: 1; font-size: 14px; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ""; width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; border-radius: 50%; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/10px no-repeat; }
.plans-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 500; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(45deg); margin-top: 4px; transition: transform .15s; flex: 0 0 auto; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 8px; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--text-2); font-size: 14.5px; }

/* CTA */
.cta { position: relative; overflow: hidden; text-align: center; }
.cta .pill { background: rgba(255,255,255,.08); border-color: var(--navy-line); color: #c7d2ea; }
.cta h2 { margin-top: 18px; font-size: 40px; }
.cta p { color: #a9b6d3; max-width: 560px; margin: 0 auto 28px; }
.cta-deco { position: absolute; width: 200px; height: 250px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }

/* подвал */
.footer { background: var(--navy); color: #a9b6d3; border-top: 1px solid var(--navy-line); padding: 40px 0; font-size: 13.5px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer .brand { color: #fff; }
.footer nav { display: grid; gap: 8px; }
.footer a:hover { color: #fff; }

/* вход / регистрация */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side .brand { color: #fff; }
.auth-side h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 14px; max-width: 420px; }
.auth-side p { color: #a9b6d3; max-width: 420px; }
.auth-side ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.auth-side li { display: flex; gap: 10px; color: #dbe3f3; }
.auth-side li::before { content: "✓"; color: #60a5fa; font-weight: 700; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 32px; box-shadow: 0 20px 50px rgba(15,23,42,.06); }
.auth-card h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.01em; }
.auth-card .lead { color: var(--muted); margin: 0 0 24px; font-size: 14.5px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f1f4f8; border-radius: 10px; padding: 4px; margin-bottom: 22px; }
.auth-tabs a { text-align: center; padding: 8px; border-radius: 8px; font-weight: 500; font-size: 14px; color: var(--text-2); }
.auth-tabs a.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field input { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; outline: none; background: #fff; }
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 16px; }
.auth-foot a { color: var(--primary); font-weight: 500; }

/* юридическая страница */
.legal { max-width: 780px; margin: 0 auto; padding: 48px 24px 80px; }
.legal h1 { font-size: 32px; margin: 0 0 8px; }
.legal h2 { font-size: 22px; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--text-2); }

/* адаптив */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 38px; }
  .hero-img { width: 100%; opacity: .35; }
  .features-row .grid4, .sec-grid { grid-template-columns: 1fr 1fr; }
  .tools, .tool.wide, .aud, .plans { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .steps::before { display: none; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .header .wrap { gap: 12px; }
  .header-actions { margin-left: auto; }
  .header-actions .login-link { display: none; }
  .hero .wrap { padding-top: 48px; padding-bottom: 72px; }
  .hero h1 { font-size: 32px; }
  .features-row .grid4, .sec-grid, .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section h2, .cta h2 { font-size: 28px; }
  .tool { padding: 20px; }
  .auth-card { padding: 24px 20px; }
}

/* ---------- Тёмная тема ---------- */
.theme-toggle { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.theme-toggle:hover { background: var(--primary-soft); color: var(--primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.auth-theme { position: absolute; top: 16px; right: 16px; }
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #111827; --border: #243047; --text: #e6eaf1; --text-2: #b7c1d0; --muted: #8793a6;
  --primary: #3b82f6; --primary-hover: #2f6fe0; --primary-soft: #15223b; color-scheme: dark;
}
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .header { background: rgba(11,17,32,.88); }
:root[data-theme="dark"] .hero { background: linear-gradient(100deg, #0f172a 0%, #111a2e 55%, #16213a 100%); }
:root[data-theme="dark"] .hero-img::before { background: linear-gradient(90deg, #111a2e 0%, rgba(17,26,46,.85) 18%, rgba(17,26,46,0) 55%); }
:root[data-theme="dark"] .hero-img { opacity: .75; }
:root[data-theme="dark"] .pill, :root[data-theme="dark"] .fcard, :root[data-theme="dark"] .tool, :root[data-theme="dark"] .tool .tag,
:root[data-theme="dark"] .mock, :root[data-theme="dark"] .plan, :root[data-theme="dark"] .faq details,
:root[data-theme="dark"] .auth-card, :root[data-theme="dark"] .field input { background: var(--surface); }
:root[data-theme="dark"] .tool.wide, :root[data-theme="dark"] .scard { background: #0f1729; }
:root[data-theme="dark"] .bubble.b, :root[data-theme="dark"] .auth-tabs { background: #1a2334; }
:root[data-theme="dark"] .auth-tabs a.on { background: var(--surface); }
:root[data-theme="dark"] .btn.light { background: #e6eaf1; }
:root[data-theme="dark"] .btn.ghost:hover { background: #1a2334; }
:root[data-theme="dark"] .fcard, :root[data-theme="dark"] .mock, :root[data-theme="dark"] .auth-card { box-shadow: 0 10px 30px rgba(0,0,0,.35); }
:root[data-theme="dark"] .r-crit { background: #2a1517; border-color: #5a2428; color: #fca5a5; }
:root[data-theme="dark"] .r-high { background: #2a1a10; border-color: #5c3514; color: #fdba74; }
:root[data-theme="dark"] .r-mid { background: #2a2111; border-color: #5b4514; color: #fcd34d; }
:root[data-theme="dark"] .r-low { background: #0f2a1b; border-color: #1f5133; color: #86efac; }
:root[data-theme="dark"] .plan-badge { background: #0f2a28; color: #5eead4; }
:root[data-theme="dark"] .form-error { background: #2a1517; color: #fca5a5; border-color: #5a2428; }
:root[data-theme="dark"] .step .n em { background: #e6eaf1; }
:root[data-theme="dark"] .steps::before { border-top-color: #334155; }
body, .header, .fcard, .tool, .plan, .auth-card, .faq details { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
:root[data-theme="dark"] .btn.dark { background: var(--primary); color: #fff; }
:root[data-theme="dark"] .btn.dark:hover { background: var(--primary-hover); }
:root[data-theme="dark"] .step .n, :root[data-theme="dark"] .scard .ic { background: #1d2a44; }

.brand, .brand .wordmark { white-space: nowrap; }
@media (max-width: 420px) {
  .header-actions .btn { display: none; }
  .hero .btn { white-space: nowrap; }
}

/* Дизайн 2.0: как в приложении — «чернильные» кнопки-пилюли, мягкие тени, плавность */
:root { --ink: #111111; --primary: #2f62f0; --primary-hover: #244fd0; }
.btn { border-radius: 999px; font-weight: 500; transition: background .18s, opacity .18s, transform .12s, box-shadow .18s; }
.btn:active { transform: scale(.98); }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: var(--ink); opacity: .86; }
.btn.primary { background: var(--ink); }
.btn.primary:hover { background: var(--ink); opacity: .86; }
.hero h1 { letter-spacing: -.03em; }

/* ---------- Появление при прокрутке ---------- */
.anim .rv { opacity: 0; transform: translateY(28px) scale(.985); filter: blur(8px);
  transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1), filter .8s cubic-bezier(.2,.8,.2,1);
  transition-delay: var(--d, 0ms); will-change: opacity, transform, filter; }
.anim .rv.in { opacity: 1; transform: none; filter: none; }

/* ---------- «Живое демо» при прокрутке ---------- */
.story { position: relative; height: 420vh; background: #fff; }
.story::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(40% 30% at 85% 20%, rgba(59,108,246,.10), transparent 70%),
  radial-gradient(35% 30% at 10% 70%, rgba(212,90,154,.08), transparent 70%); pointer-events: none; }
.story-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.story-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; width: 100%; }
.story-kicker { display: inline-block; font-size: 13px; font-weight: 600; color: #2f62f0; background: #eef2fe; border-radius: 999px; padding: 5px 12px; margin-bottom: 18px; }
.story-caps { position: relative; min-height: 330px; }
.story-cap { position: absolute; left: 0; right: 0; top: 52px; opacity: 0; transform: translateY(18px); filter: blur(6px); transition: all .6s cubic-bezier(.2,.8,.2,1); }
.story-cap.on { opacity: 1; transform: none; filter: none; }
.story-cap h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 14px; color: #111; }
.story-cap p { font-size: 17px; color: var(--text-2); max-width: 440px; margin: 0; }
.story-dots { position: absolute; left: 0; bottom: 0; display: flex; gap: 8px; }
.story-dots i { width: 26px; height: 4px; border-radius: 4px; background: #e5e7eb; transition: background .4s; }
.story-dots i.on { background: #111; }

.demo-win { background: #fff; border-radius: 26px; border: 1px solid #ececea; box-shadow: 0 2px 4px rgba(17,17,17,.04), 0 30px 80px rgba(17,17,17,.12);
  overflow: hidden; transform: perspective(1400px) rotateX(calc((1 - var(--p, 0) * 4) * 6deg)) scale(calc(.96 + min(var(--p, 0) * 4, 1) * .04)); transition: transform .2s linear; }
.demo-top { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid #f0f0ee; }
.demo-top span { width: 11px; height: 11px; border-radius: 50%; background: #e7e7e5; }
.demo-top b { margin-left: 8px; font-size: 13px; color: #7b7b78; font-weight: 600; }
.demo-body { position: relative; height: 470px; padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.demo-user { align-self: flex-end; max-width: 80%; background: #f3f3f2; border-radius: 20px; padding: 11px 16px; font-size: 15px; line-height: 1.5; opacity: 0; transform: translateY(10px); transition: all .4s; min-height: 44px; }
.demo-user.show { opacity: 1; transform: none; }
.demo-user .caret { display: inline-block; width: 2px; height: 1.05em; background: #2f62f0; vertical-align: -2px; margin-left: 2px; animation: caret 1s steps(1) infinite; }
.demo-user.done .caret { display: none; }
@keyframes caret { 50% { opacity: 0; } }
.demo-think { display: grid; gap: 8px; opacity: 0; transition: opacity .3s; }
.demo-think.show { opacity: 1; }
.dt-row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: #3f3f3d; opacity: 0; transform: translateX(-10px); filter: blur(4px); transition: all .45s cubic-bezier(.2,.8,.2,1); }
.dt-row.show { opacity: 1; transform: none; filter: none; }
.dt-row em { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #2f62f0; border-top-color: transparent; animation: spin .8s linear infinite; flex: 0 0 16px; }
.dt-row.ok em { animation: none; border: 0; background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/11px no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dc { border: 1px solid #ececea; border-radius: 16px; padding: 12px; background: #fff; opacity: 0; transform: translateY(24px) scale(.94); filter: blur(6px); transition: all .55s cubic-bezier(.2,.8,.2,1); }
.dc.show { opacity: 1; transform: none; filter: none; }
.dc span { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 2px 7px; margin-bottom: 8px; }
.dc span.ok { color: #15803d; background: #f0fdf4; } .dc span.no { color: #b91c1c; background: #fef2f2; }
.dc b { display: block; font-size: 13.5px; line-height: 1.3; } .dc small { display: block; font-size: 12px; color: #7b7b78; margin-top: 4px; }
.demo-fc { border: 1px solid #ececea; border-radius: 16px; padding: 12px 14px; opacity: 0; transform: translateY(14px); transition: all .5s; }
.demo-fc.show { opacity: 1; transform: none; }
.demo-fc > div:first-child { display: flex; justify-content: space-between; font-size: 14px; }
.demo-fc span { font-weight: 700; font-variant-numeric: tabular-nums; }
.demo-fc .bar { height: 8px; border-radius: 8px; background: #f0f0ee; margin: 8px 0 6px; overflow: hidden; }
.demo-fc .bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(92deg, #3b6cf6, #7b5cf0 50%, #d45a9a); }
.demo-fc small { color: #7b7b78; font-size: 12px; }
.demo-doc { position: absolute; left: 22px; right: 22px; bottom: 16px; top: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(8px); border-radius: 18px; opacity: 0; transform: translateY(40px); transition: all .6s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.demo-doc.show { opacity: 1; transform: none; }
.dd-sheet { width: 64%; background: #fff; border-radius: 6px; box-shadow: 0 10px 40px rgba(17,17,17,.16); padding: 22px 24px; text-align: center; font-family: "Times New Roman", serif; }
.dd-sheet b { display: block; font-size: 15px; letter-spacing: .04em; margin-top: 10px; } .dd-sheet small { display: block; font-size: 11px; color: #555; margin: 3px 0 10px; }
.dd-r { display: grid; gap: 4px; justify-items: end; } .dd-r i { height: 5px; width: 45%; border-radius: 3px; background: #e7e7e5; }
.dd-l { display: grid; gap: 5px; } .dd-l i { height: 5px; border-radius: 3px; background: #ececea; } .dd-l i:nth-child(3n) { width: 70%; }
.dd-btn { background: #111; color: #fff; border-radius: 999px; padding: 10px 20px; font: 600 14px Inter, sans-serif; }
@media (max-width: 900px) {
  .story { height: 380vh; }
  .story-grid { grid-template-columns: 1fr; gap: 18px; }
  .story-caps { min-height: 170px; }
  .story-cap { top: 40px; }
  .story-cap h2 { font-size: 26px; } .story-cap p { font-size: 14.5px; }
  .story-dots { bottom: auto; top: 6px; right: 0; left: auto; }
  .demo-body { height: 400px; padding: 16px; }
  .demo-cases { grid-template-columns: 1fr 1fr; } .dc:nth-child(3) { display: none; }
}
:root[data-theme="dark"] .story { background: #1f1f1f; }
:root[data-theme="dark"] .story-cap h2 { color: #fff; }
:root[data-theme="dark"] .demo-win, :root[data-theme="dark"] .dc, :root[data-theme="dark"] .demo-fc { background: #262626; border-color: #333; }
:root[data-theme="dark"] .demo-user { background: #2f2f2f; color: #ececec; }
:root[data-theme="dark"] .dt-row { color: #c9c9c9; }
:root[data-theme="dark"] .demo-doc { background: rgba(31,31,31,.72); }
:root[data-theme="dark"] .story-dots i { background: #333; } :root[data-theme="dark"] .story-dots i.on { background: #fff; }
:root[data-theme="dark"] .demo-top { border-color: #333; }
@media (prefers-reduced-motion: reduce) { .story { height: auto; } .story-sticky { position: static; height: auto; padding: 60px 0; } .anim .rv { opacity: 1; transform: none; filter: none; } }
.demo-body > * { flex-shrink: 0; }
@media (max-width: 900px) {
  .demo-body { height: 480px; gap: 10px; }
  .demo-user { font-size: 13.5px; padding: 9px 13px; }
  .dt-row { font-size: 13px; }
  .demo-think { gap: 5px; }
}
.story-sticky { padding-top: 68px; box-sizing: border-box; }

/* что внутри */
.inside-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.inside { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; }
.inside b { display: block; font-size: 16px; margin-bottom: 6px; }
.inside p { margin: 0; color: var(--muted, #556); font-size: 14px; line-height: 1.5; }
@media (max-width: 900px) { .inside-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .inside-grid { grid-template-columns: 1fr; } }
