/* Дизайн «Флоу» (по мотивам Wispr Flow) поверх базовой верстки из style.css; логотип «окно» включает темную прямоугольную версию */

h1 em, h2 em { font-style: normal; }

@media (max-width: 900px) { nav.menu { display: none; } header.top .wrap { grid-template-columns: 1fr auto; } }
@media (max-width: 560px) {
  .lg[data-only="a"] > span { display: none; }
  .lg.lg-b span { display: none; }
  .switch button { width: 32px; }

}

/* ============ ФЛОУ ============ */
html[data-design="flow"] {
  --bg: #fffbea;
  --text: #1a1a1a;
  --muted: #5d5a4e;
  --ink: #1a1a1a;
  --line: rgba(26, 26, 26, .1);
  --surface: #fffff5;
  --tint: #f0d7ff;
  --green: #1f3d34;
  --cream: #fffbea;
  --serif: "EB Garamond", Georgia, serif;
  --t1: clamp(44px, 6.4vw, 92px);
  --t2: clamp(34px, 4.4vw, 60px);
}
html[data-design="flow"] h1, html[data-design="flow"] h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.02; }
html[data-design="flow"] h1 em, html[data-design="flow"] h2 em { font-style: italic; }
html[data-design="flow"] h3 { font-weight: 600; }

/* шапка: плавающая кремовая плашка */
html[data-design="flow"] header.top { background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding-top: 12px; }
html[data-design="flow"] header.top .wrap {
  height: 60px; max-width: 1100px; padding: 0 12px 0 18px; border-radius: 14px;
  background: rgba(255, 251, 234, .9); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
html[data-design="flow"] nav.menu { background: transparent; border: 0; }
html[data-design="flow"] nav.menu a { transition: background-color .2s ease, color .2s ease, transform .15s ease; }
html[data-design="flow"] nav.menu a:hover { background: #f4efd5; }
html[data-design="flow"] .top-cta { background: var(--tint); color: var(--ink); border: 1px solid var(--ink); border-radius: 10px; }
html[data-design="flow"] .switch { background: #f4efd5; border-color: transparent; }

/* первый экран: заголовок по центру, вид из окна в скругленной рамке ниже */
html[data-design="flow"] .hero { min-height: 0; flex-direction: column; align-items: stretch; padding: 150px 0 40px; background: var(--bg); overflow: visible; }
html[data-design="flow"] .hero::after { display: none; }
html[data-design="flow"] .hero-inner { max-width: 940px; }
html[data-design="flow"] .hero h1 { color: var(--ink); margin-bottom: 24px; }
html[data-design="flow"] .hero .lead { color: var(--ink); text-shadow: none; max-width: 560px; }
html[data-design="flow"] .hero .actions { background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; gap: 12px; }
html[data-design="flow"] .hero .actions .btn.light { background: var(--tint); color: var(--ink); border: 1px solid var(--ink); border-radius: 12px; }
html[data-design="flow"] .hero .actions .btn.ghost { color: var(--ink); text-shadow: none; border-radius: 12px; }
html[data-design="flow"] .hero .actions .btn.ghost { transition: background-color .2s ease, color .2s ease, transform .15s ease; }
html[data-design="flow"] .hero .actions .btn.ghost:hover { background: #f4efd5; }
html[data-design="flow"] .hero-media { position: relative; inset: auto; order: 2; width: min(1100px, calc(100% - 32px)); margin: 56px auto 0; aspect-ratio: 16 / 8; border-radius: 40px; overflow: hidden; }

/* поверхности */
html[data-design="flow"] .glass { background: var(--surface); border: 1px solid var(--line); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 20px; }
html[data-design="flow"] .fit .glass.fit-yes { background: #f2f7e6; }
html[data-design="flow"] .tile.accent, html[data-design="flow"] .plan.main, html[data-design="flow"] .formula .result { background: var(--green); border-color: var(--green); color: var(--cream); }
html[data-design="flow"] table.compare .us { background: var(--green); }
html[data-design="flow"] .btn { border-radius: 12px; }
html[data-design="flow"] .btn.light.shine { background: var(--tint); border: 1px solid var(--cream); }
html[data-design="flow"] .btn.ghost { border-color: rgba(26, 26, 26, .25); }
html[data-design="flow"] .cover.c1 { background: var(--tint); }
html[data-design="flow"] .cover.c2 { background: var(--green); }
html[data-design="flow"] .cover.c3 { background: #f4efd5; }
html[data-design="flow"] .faq-list details[open] summary::after { background-color: var(--tint); }

/* «Как это работает»: большая зеленая панель, как у Wispr */
html[data-design="flow"] #how { background: var(--green); color: var(--cream); border-radius: 48px; margin: 0 16px; }
html[data-design="flow"] #how .route p { color: rgba(255, 251, 234, .7); }
html[data-design="flow"] #how .route::before, html[data-design="flow"] #how .route li::after { background-image: repeating-linear-gradient(90deg, var(--cream) 0 18px, transparent 18px 26px); }
html[data-design="flow"] #how .route li::before { background: var(--cream); color: var(--green); }
html[data-design="flow"] #how .route li:last-child::before { background: var(--green); color: var(--cream); box-shadow: inset 0 0 0 3px var(--cream); }
html[data-design="flow"] #how .video { background: rgba(255, 251, 234, .08); border-color: rgba(255, 251, 234, .18); color: rgba(255, 251, 234, .7); }
@media (max-width: 760px) {
  html[data-design="flow"] #how .route li::after { background-image: repeating-linear-gradient(180deg, var(--cream) 0 18px, transparent 18px 26px); }
  html[data-design="flow"] .hero { padding-top: 120px; align-items: stretch; }
  html[data-design="flow"] .hero h1 { font-size: 44px; }
  html[data-design="flow"] .hero .lead { font-size: var(--t4); }
  html[data-design="flow"] .hero-media { aspect-ratio: 4 / 5; border-radius: 28px; margin-top: 40px; }
  html[data-design="flow"] #how { border-radius: 32px; margin: 0 8px; }
  html[data-design="flow"] header.top { padding: 8px 8px 0; }
}

/* ============ ЛОГОТИП «ОКНО»: темный, черно-белый, прямоугольный ============
   Монограмма «оа» держит круглые формы, окно задает прямоугольники и темную подложку. */
html[data-logo="b"] {
  --bg: #0d0e10;
  --text: #ededea;
  --muted: #8f9299;
  --ink: #ededea;
  --line: rgba(255, 255, 255, .1);
  --surface: rgba(255, 255, 255, .04);
  --tint: rgba(255, 255, 255, .12);
  --green: #ededea;
  --olive: #ededea;
  --lime: #ededea;
  --cream: #0d0e10;
  --radius: 10px;
  --link: #ededea;
  color-scheme: dark;
}
html[data-logo="b"] body { background: var(--bg); }

/* шапка */
html[data-logo="b"] header.top { background: rgba(13, 14, 16, .82); border-bottom: 1px solid var(--line); }
html[data-logo="b"][data-design="flow"] header.top { background: transparent; border: 0; }
html[data-logo="b"][data-design="flow"] header.top .wrap { background: rgba(13, 14, 16, .85); }
html[data-logo="b"] nav.menu { border-radius: 10px; background: rgba(255, 255, 255, .04); border-color: var(--line); }
html[data-logo="b"] nav.menu a { border-radius: 7px; color: var(--muted); }
html[data-logo="b"] nav.menu a { transition: background-color .2s ease, color .2s ease, transform .15s ease; }
html[data-logo="b"] nav.menu a:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
html[data-logo="b"] .switch { border-radius: 10px; background: rgba(255, 255, 255, .06); border-color: var(--line); }
html[data-logo="b"] .switch button { border-radius: 7px; color: var(--muted); }
html[data-logo="b"] .switch button[aria-pressed="true"] { background: #ededea; color: #0d0e10; }
html[data-logo="b"] .top-cta { border-radius: 8px; background: #ededea; color: #0d0e10; border: 0; }

/* кнопки */
html[data-logo="b"] .btn { border-radius: 8px; background: #ededea; color: #0d0e10; }
html[data-logo="b"] .btn { transition: background-color .2s ease, color .2s ease, transform .15s ease; }
html[data-logo="b"] .btn:hover { background: #d2d2ce; }
html[data-logo="b"] .btn.light { background: #ededea; color: #0d0e10; }
html[data-logo="b"] .btn.ghost { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, .25); }
html[data-logo="b"] .btn.ghost { transition: background-color .2s ease, color .2s ease, transform .15s ease; }
html[data-logo="b"] .btn.ghost:hover { background: rgba(255, 255, 255, .08); }
html[data-logo="b"] .btn.light.shine { background: #ededea; color: #0d0e10; border: 0; }
html[data-logo="b"] .hero .actions { border-radius: 12px; }
html[data-logo="b"] .hero .actions .btn.ghost { border: 0; }

/* поверхности */
html[data-logo="b"] .glass { border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-logo="b"] .glass::after { background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .07), transparent 60%); }
html[data-logo="b"] .fit .glass.fit-yes { background: rgba(255, 255, 255, .08); }
html[data-logo="b"] .roles, html[data-logo="b"] .author p, html[data-logo="b"] table.compare td:first-child { color: var(--text); }

/* светлые акценты на темном фоне вместо темных */
html[data-logo="b"] .tile.accent, html[data-logo="b"] .plan.main, html[data-logo="b"] .formula .result { background: #ededea; border-color: #ededea; color: #0d0e10; }
html[data-logo="b"] .tile.accent p, html[data-logo="b"] .tile.accent .num, html[data-logo="b"] .formula .result p { color: rgba(13, 14, 16, .62); }
html[data-logo="b"] .plan.main ul { color: rgba(13, 14, 16, .7); }
html[data-logo="b"] .plan.main .btn.light.shine { background: #0d0e10; color: #ededea; }
html[data-logo="b"] .plan { border-radius: 12px; }
html[data-logo="b"] .tile.accent::after { background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgba(13, 14, 16, .06), transparent 60%); }

/* сравнение */
html[data-logo="b"] table.compare .us { background: #ededea; color: #0d0e10; }
html[data-logo="b"] table.compare th.us { color: #0d0e10; border-radius: 10px 10px 0 0; }
html[data-logo="b"] table.compare tr:last-child .us { border-radius: 0 0 10px 10px; }
html[data-logo="b"] table.compare tr:not(:last-child) td.us { border-bottom-color: rgba(13, 14, 16, .1); }

/* значки: квадраты со скруглением вместо кругов */
html[data-logo="b"] .marks li::before, html[data-logo="b"] .t-yes::before, html[data-logo="b"] .t-no::before { border-radius: 5px; }
html[data-logo="b"] .marks:not(.marks-no) li::before, html[data-logo="b"] .t-yes::before { background: #ededea url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%230d0e10' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
html[data-logo="b"] .marks.marks-no li::before, html[data-logo="b"] .t-no::before { filter: invert(1); }
html[data-logo="b"] .us .t-yes::before { background: #0d0e10 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23ededea' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
html[data-logo="b"] .faq-list summary::after { border-radius: 8px; filter: invert(1); }
html[data-logo="b"] .route li::before { border-radius: 8px; color: #0d0e10; }
html[data-logo="b"] .route li:last-child::before { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 3px var(--ink); }
html[data-logo="b"][data-design="flow"] #how .route li:last-child::before { background: var(--green); color: var(--cream); box-shadow: inset 0 0 0 3px var(--cream); }

/* картинки и обложки */
html[data-logo="b"] .short .screen, html[data-logo="b"] .short-frame, html[data-logo="b"] .avatar, html[data-logo="b"] .video { border-radius: 10px; }
html[data-logo="b"] .short .play { border-radius: 8px; }
html[data-logo="b"] .short .play::before { border-left-color: #0d0e10; }
html[data-logo="b"] .post-card .cover { border-radius: 6px; }
html[data-logo="b"] .cover.c1 { background: rgba(255, 255, 255, .08); }
html[data-logo="b"] .cover.c2 { background: #ededea; color: #0d0e10; }
html[data-logo="b"] .cover.c3 { background: rgba(255, 255, 255, .16); }
html[data-logo="b"] .video { color: var(--muted); }
html[data-logo="b"][data-design="flow"] .hero-media { border-radius: 14px; }
html[data-logo="b"] article.post pre { background: rgba(255, 255, 255, .05); }
html[data-logo="b"][data-design="flow"] #how .route p { color: rgba(13, 14, 16, .65); }
html[data-logo="b"][data-design="flow"] #how .video { background: rgba(13, 14, 16, .06); border-color: rgba(13, 14, 16, .14); color: rgba(13, 14, 16, .6); }

/* темная версия: карточка «Сборка» белая, по рамке бежит темный луч; блика на кнопке нет */
@property --beam { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
html[data-logo="b"] .plan.main { position: relative; isolation: isolate; overflow: hidden; background: #ededea; border: 0; color: #0d0e10; animation: none; }
html[data-logo="b"] .plan.main::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; z-index: -1;
  background: conic-gradient(from var(--beam), transparent 0 70%, #0d0e10 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: beam 4s linear infinite;
}
html[data-logo="b"] .plan.main::after { content: ""; position: absolute; inset: 2px; border-radius: 10px; background: #ededea; z-index: -2; }
@keyframes beam { to { --beam: 360deg; } }
html[data-logo="b"] .plan.main ul { color: rgba(13, 14, 16, .7); }
html[data-logo="b"] .plan.main .btn.light.shine { background: #0d0e10; color: #ededea; }
html[data-logo="b"] .plan.main .btn.light.shine:hover { background: #2a2b2e; }
html[data-logo="b"] .btn.shine::after { display: none; }
@media (prefers-reduced-motion: reduce) { html[data-logo="b"] .plan.main::before { animation: none; } }

/* вопросы без рамки и подложки: только линии между вопросами */
.faq-list.glass, html[data-design="flow"] .faq-list.glass, html[data-logo="b"] .faq-list.glass { background: transparent; border: 0; box-shadow: none; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.faq-list.glass::after { display: none; }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
html[data-logo="b"] .post-cover { border-radius: 10px; }

/* одна линия по ширине: шапка и первый экран начинаются и заканчиваются там же, где контент; зеленая панель и «Об авторе» намеренно шире и уже */
html[data-design="flow"] header.top { padding: 12px 16px 0; }
html[data-design="flow"] header.top .wrap { max-width: calc(var(--max) - 32px); }
html[data-design="flow"] .hero-media { width: min(calc(var(--max) - 32px), calc(100% - 32px)); }
@media (max-width: 760px) {
  html[data-design="flow"] header.top { padding: 8px 16px 0; }
}
.cover { align-items: center; justify-content: center; }

/* монограмма «оа»: круглые формы, шапка-капсула и кнопки-капсулы */
html[data-logo="a"][data-design="flow"] header.top .wrap { border-radius: 999px; padding: 0 10px 0 22px; }
html[data-logo="a"][data-design="flow"] nav.menu a { border-radius: 999px; }
html[data-logo="a"][data-design="flow"] .btn,
html[data-logo="a"][data-design="flow"] .top-cta,
html[data-logo="a"][data-design="flow"] .hero .actions .btn.light,
html[data-logo="a"][data-design="flow"] .hero .actions .btn.ghost { border-radius: 999px; }

/* первый экран: картинка растет при прокрутке (значения задает design.js) */
html[data-design="flow"] .hero { overflow-x: clip; }
html[data-design="flow"] .hero-media {
  transform: translateY(var(--hy, 0)) scale(var(--hs, 1)); transform-origin: 50% 0;
  border-radius: calc(40px * (1 - var(--hp, 0))); will-change: transform;
}
html[data-logo="b"][data-design="flow"] .hero-media { border-radius: calc(14px * (1 - var(--hp, 0))); }
@media (max-width: 760px) { html[data-design="flow"] .hero-media { border-radius: calc(28px * (1 - var(--hp, 0))); } }

/* ===== поезд ===== */
:root { --gold: #e8c46a; --scene: #efe3ff; --sun: #ffcf73; --skin: #f3d3bd; --hair: #6b3524; }
html[data-logo="b"] { --gold: #ededea; --scene: #16171a; --sun: #ededea; --skin: #ededea; --hair: #8f9299; }
.t-body { fill: var(--green, #1f3d34); }
.t-body2 { fill: var(--surface); }
.t-win { fill: var(--tint); }
.t-stripe { stroke: var(--green, #1f3d34); fill: none; }
.t-light { fill: var(--sun); }
html[data-logo="b"] .t-win { fill: #0d0e10; }
html[data-logo="b"] .t-body2 .t-win, html[data-logo="b"] .s-train .t-win { fill: #0d0e10; }
html[data-logo="b"] .t-stripe { stroke: #ededea; }

/* бегущий поезд под первым экраном */
.rail-strip { position: relative; overflow: hidden; padding: 28px 0 10px; color: var(--ink); }
.rail-strip::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 7px;
  border-top: 2px solid currentColor;
  background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 26px) 0 3px / 100% 4px no-repeat;
  opacity: .55;
}
.train-run { position: relative; display: flex; align-items: flex-end; gap: 14px; width: max-content; animation: run 15s linear infinite; }
.train-run::before { content: ""; position: absolute; left: 0; right: 40px; bottom: 34px; height: 3px; background: currentColor; z-index: -1; }
@keyframes run { from { transform: translateX(-100%); } to { transform: translateX(100vw); } }
.rail-strip:hover .train-run { animation-play-state: paused; }
.wagon {
  position: relative; display: inline-flex; flex-direction: column; justify-content: center; gap: 9px;
  height: 78px; padding: 10px 22px 16px; margin-bottom: 18px;
  border: 2px solid currentColor; border-radius: 18px 18px 10px 10px; background: var(--surface);
  box-shadow: inset 0 -7px 0 var(--green, #1f3d34); white-space: nowrap; font-size: var(--t5);
}
.wagon b { font-weight: 600; }
.wagon::before { content: ""; height: 16px; background: repeating-linear-gradient(90deg, var(--tint) 0 24px, transparent 24px 32px); border-radius: 4px; }
.wagon::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -18px; height: 18px;
  background:
    radial-gradient(circle, currentColor 8px, transparent 8.5px) 0 0 / 18px 18px no-repeat,
    radial-gradient(circle, currentColor 8px, transparent 8.5px) 22px 0 / 18px 18px no-repeat,
    radial-gradient(circle, currentColor 8px, transparent 8.5px) calc(100% - 22px) 0 / 18px 18px no-repeat,
    radial-gradient(circle, currentColor 8px, transparent 8.5px) 100% 0 / 18px 18px no-repeat;
}
.loco { width: 176px; height: auto; margin-bottom: 4px; flex: none; overflow: visible; }
html[data-logo="b"] .wagon { border-radius: 6px; box-shadow: inset 0 -7px 0 #ededea; }
html[data-logo="b"] .wagon::before { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 24px, transparent 24px 32px); border-radius: 2px; }
@media (max-width: 760px) { .wagon { height: 66px; padding: 8px 16px 14px; } .loco { width: 140px; } .train-run { animation-duration: 11s; } }

/* сцена в конце: отдельная панель, поезд приезжает на станцию «Оффер» */
#arrival { text-align: center; margin: 0 16px; border-radius: 48px; background: var(--scene); overflow: hidden; padding: 88px 0 72px; }
html[data-logo="b"] #arrival { border: 1px solid var(--line); border-radius: 16px; }
.arrival-head { margin: 0 auto 12px; }
.station { color: var(--ink); max-width: 1000px; margin: 0 auto; }
.station svg { width: 100%; height: auto; overflow: visible; }
.sun { fill: var(--sun); }
html[data-logo="b"] .sun { opacity: .9; }
.cloud path { fill: #fff; opacity: .75; }
html[data-logo="b"] .cloud path { opacity: .08; }
.hills { fill: var(--green, #1f3d34); opacity: .14; }
html[data-logo="b"] .hills { opacity: .06; }
.s-plat, .s-house, .s-sign, .doc { fill: var(--surface); }
html[data-design="flow"] .s-plat, html[data-design="flow"] .s-house, html[data-design="flow"] .s-sign, html[data-design="flow"] .doc { fill: #fffff5; }
html[data-logo="b"] .s-plat, html[data-logo="b"] .s-house, html[data-logo="b"] .s-sign, html[data-logo="b"] .doc { fill: #1f2024; }
.s-clock { fill: var(--surface); }
.s-name { font: 400 20px/1 var(--serif, Georgia), serif; fill: currentColor; }
.doc-text { font: 600 12px/1 var(--font); fill: currentColor; }
.bag { fill: var(--gold); }
.bag-sign { font: 600 26px/1 var(--font); fill: #1a1a1a; }
.p-skin { fill: var(--skin); }
.p-hair { fill: var(--hair); }
.wheel circle { fill: currentColor; }
.wheel path { stroke: var(--scene); stroke-width: 3; }
.wheel { transform-box: fill-box; transform-origin: center; }
.arrival-cta { margin-top: 28px; }
html[data-design="flow"] .arrival-cta .btn.light { background: var(--ink); color: var(--bg); border: 0; }
html[data-logo="b"] .arrival-cta .btn.light { background: #ededea; color: #0d0e10; border: 0; }

/* до появления на экране: поезд за левым краем, оффер и мешок скрыты */
.js .station .s-train { transform: translateX(-780px); }
.js .station .s-bag, .js .station .s-offer, .js .station .s-spark { opacity: 0; }
.js .station .s-bag, .js .station .s-offer { transform: translateY(14px) scale(.85); transform-box: fill-box; transform-origin: 50% 100%; }
.station.go .s-train { animation: arrive 3s cubic-bezier(.15, .6, .25, 1) forwards; }
.station.go .wheel { animation: roll 3s cubic-bezier(.15, .6, .25, 1) forwards; }
.station.go .s-bag { animation: pop .6s cubic-bezier(.3, 1.4, .5, 1) 2.9s forwards; }
.station.go .s-offer { animation: pop .6s cubic-bezier(.3, 1.4, .5, 1) 3.2s forwards; }
.station.go .s-spark { animation: twinkle 1.6s ease-in-out 3.6s infinite; }
@keyframes arrive { from { transform: translateX(-780px); } to { transform: none; } }
@keyframes roll { from { transform: rotate(0); } to { transform: rotate(1440deg); } }
@keyframes pop { to { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

@media (max-width: 760px) {
  #arrival { margin: 0 8px; border-radius: 32px; padding: 64px 0 48px; }
  .station { overflow: hidden; }
  .station svg { width: 150%; max-width: none; margin-left: -50%; }
}
@media (prefers-reduced-motion: reduce) {
  .train-run { animation: none; transform: none; }
  .js .station .s-train, .js .station .s-bag, .js .station .s-offer { transform: none; animation: none; }
  .js .station .s-bag, .js .station .s-offer, .js .station .s-spark { opacity: 1; animation: none; }
}

/* поезд без надписей и крупнее, впереди паровоз с дымом */
.train-run { gap: 16px; animation-duration: 16s; will-change: transform; }
.train-run::before { bottom: 40px; right: 60px; }
.wagon { width: 190px; height: 104px; padding: 16px 18px 22px; justify-content: flex-start; margin-bottom: 22px; }
.wagon::before { height: 30px; background: repeating-linear-gradient(90deg, var(--tint) 0 30px, transparent 30px 38px); border-radius: 6px; }
.wagon::after {
  bottom: -22px; height: 22px;
  background:
    radial-gradient(circle, currentColor 10px, transparent 10.5px) 0 0 / 22px 22px no-repeat,
    radial-gradient(circle, currentColor 10px, transparent 10.5px) 26px 0 / 22px 22px no-repeat,
    radial-gradient(circle, currentColor 10px, transparent 10.5px) calc(100% - 26px) 0 / 22px 22px no-repeat,
    radial-gradient(circle, currentColor 10px, transparent 10.5px) 100% 0 / 22px 22px no-repeat;
}
html[data-logo="b"] .wagon::before { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 30px, transparent 30px 38px); border-radius: 2px; }
.loco { width: 230px; margin-bottom: 2px; }
.smoke circle { fill: var(--smoke, #d9d4c4); opacity: 0; transform-box: fill-box; transform-origin: center; animation: puff 1.8s ease-out infinite; }
.smoke circle:nth-child(2) { animation-delay: .6s; }
.smoke circle:nth-child(3) { animation-delay: 1.2s; }
@keyframes puff { 0% { opacity: .9; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(-46px, -34px) scale(2.2); } }
html[data-logo="b"] { --smoke: #8f9299; }
@media (max-width: 760px) {
  .wagon { width: 130px; height: 76px; padding: 12px 12px 16px; margin-bottom: 18px; }
  .wagon::before { height: 22px; background-size: auto; }
  .loco { width: 160px; }
  .train-run { animation-duration: 12s; }
}

/* сцена: звезды и свечение только ночью, в темной версии */
.stars, .sun-glow { display: none; }
html[data-logo="b"] .stars { display: block; color: #ededea; }
html[data-logo="b"] .stars circle { animation: twinkle 3s ease-in-out infinite; }
html[data-logo="b"] .stars circle:nth-child(3n) { animation-delay: 1s; }
html[data-logo="b"] .stars circle:nth-child(3n+1) { animation-delay: 2s; }
html[data-logo="b"] .sun-glow { display: block; fill: #ededea; opacity: .07; }
html[data-logo="b"] .cloud { display: none; }
html[data-logo="b"] #arrival { background: radial-gradient(60% 70% at 86% 10%, #23252a, #111214 70%); }
html[data-logo="b"] .hills { fill: #1d1f23; opacity: 1; }
html[data-logo="b"] .s-train .t-win, html[data-logo="b"] .station .t-win { fill: #ededea; filter: drop-shadow(0 0 6px rgba(237, 237, 234, .55)); }
html[data-logo="b"] .s-train .t-body2, html[data-logo="b"] .station .t-body { fill: #1f2024; }
html[data-logo="b"] .station .t-stripe { stroke: #ededea; }
html[data-logo="b"] .station .t-light { fill: #fff; filter: drop-shadow(0 0 8px #fff); }
html[data-logo="b"] .wheel path { stroke: #111214; }
@media (prefers-reduced-motion: reduce) { .smoke circle, html[data-logo="b"] .stars circle { animation: none; } .smoke circle:first-child { opacity: .7; } }

/* верхний поезд: тот же рисунок, что на станции */
.rail-strip { padding: 28px 0 13px; }
.train-run::before { display: none; }
.strip-train { display: block; height: 190px; width: auto; max-width: none; overflow: visible; }
.rail-strip .wheel { transform-box: fill-box; transform-origin: center; animation: roll-on .7s linear infinite; }
@keyframes roll-on { to { transform: rotate(360deg); } }
.rail-strip .wheel path { stroke: var(--bg); }
@media (max-width: 760px) { .strip-train { height: 118px; } }
@media (prefers-reduced-motion: reduce) { .rail-strip .wheel { animation: none; } }
html[data-logo="b"] .rail-strip .t-win { fill: #ededea; filter: drop-shadow(0 0 6px rgba(237, 237, 234, .55)); }
html[data-logo="b"] .rail-strip .t-body2, html[data-logo="b"] .rail-strip .t-body { fill: #1f2024; }
html[data-logo="b"] .rail-strip .t-light { fill: #fff; filter: drop-shadow(0 0 8px #fff); }

/* карточки как у Wispr Flow: бежевая заливка без обводки, при наведении проявляется темная рамка */
html[data-design="flow"]:not([data-logo="b"]) { --bg: #ffffeb; --surface: #e4e4d0; }
html[data-design="flow"] .glass { background: var(--surface); border: 2px solid transparent; border-radius: 16px; transition: border-color .25s ease; }
html[data-design="flow"] .glass:hover { border-color: #1a1a1a; }
html[data-design="flow"] .glass::after { display: none; }
html[data-design="flow"] .fit .glass.fit-yes { background: #dfe7c9; }
html[data-design="flow"] .table-scroll.glass:hover, html[data-design="flow"] .faq-list.glass:hover { border-color: transparent; }
html[data-design="flow"] .tile.accent { border-color: var(--green); }
html[data-design="flow"] .tile.accent:hover { border-color: #1a1a1a; }
html[data-design="flow"] .wagon, html[data-design="flow"] .s-plat { fill: var(--surface); }
html[data-design="flow"] #how { border-radius: 64px; }
html[data-design="flow"] #arrival { border-radius: 64px; }
@media (max-width: 760px) { html[data-design="flow"] #how, html[data-design="flow"] #arrival { border-radius: 36px; } }

/* темная версия: то же поведение, рамка светлая */
html[data-logo="b"] .glass { background: #1a1b1e; border: 2px solid transparent; box-shadow: none; transition: border-color .25s ease; }
html[data-logo="b"] .glass:hover { border-color: #ededea; }
html[data-logo="b"] .fit .glass.fit-yes { background: #222327; }
html[data-logo="b"] .tile.accent { border-color: #ededea; }
html[data-logo="b"] .tile.accent:hover { border-color: #8f9299; }
html[data-logo="b"] #how, html[data-logo="b"] #arrival { border-radius: 16px; }
html[data-logo="b"] #arrival { border: 0; }


/* статьи: в светлой версии вертикальные карточки с широкой обложкой, в темной горизонтальные, как Products у Wispr Flow */
.cover .sq, .badge { display: none; }
html[data-logo="b"] .post-card .cover .wide { display: none; }
html[data-logo="b"] .post-card .cover .sq { display: block; }
html[data-logo="b"] .posts { grid-template-columns: repeat(3, 1fr); }
html[data-logo="b"] .post-card { flex-direction: row; align-items: stretch; gap: 18px; padding: 8px; }
html[data-logo="b"] .post-card .cover { width: 116px; height: auto; min-height: 116px; aspect-ratio: 1; margin: 0; flex: none; border-radius: 6px; }
html[data-logo="b"] .post-card .body { padding: 10px 10px 8px 0; gap: 8px; }
html[data-logo="b"] .post-card h3 { font-size: var(--t4); line-height: 1.35; }
html[data-logo="b"] .post-card .more::after { content: " ›"; }
html[data-logo="b"] .badge { display: inline-block; align-self: flex-start; padding: 3px 10px; border-radius: 4px; background: #ededea; color: #0d0e10; font-size: var(--t5); font-weight: 600; line-height: 1.2; }
@media (max-width: 1100px) { html[data-logo="b"] .posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { html[data-logo="b"] .posts { grid-template-columns: 1fr; } html[data-logo="b"] .post-card .cover { width: 104px; min-height: 104px; } }

/* шапка как у Wispr Flow: плашка цвета фона, бежевая рамка 2px, без размытия */
html[data-design="flow"] header.top .wrap { background: var(--bg); border: 2px solid var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-design="flow"] nav.menu a { color: rgba(26, 26, 26, .7); font-weight: 600; }
html[data-design="flow"] nav.menu a:hover { background: transparent; color: #1a1a1a; }
html[data-design="flow"] .switch { background: var(--surface); border: 0; }
html[data-design="flow"] .switch button[aria-pressed="true"] { background: #fffdf9; color: #1a1a1a; }
html[data-design="flow"] .top-cta { border: 2px solid #1a1a1a; font-weight: 600; }
html[data-logo="b"][data-design="flow"] header.top .wrap { background: #0d0e10; border: 2px solid #1a1b1e; }
html[data-logo="b"] nav.menu a { color: rgba(237, 237, 234, .7); }
html[data-logo="b"] nav.menu a:hover { background: transparent; color: #ededea; }
html[data-logo="b"] .switch { background: #1a1b1e; }
html[data-logo="b"] .switch button[aria-pressed="true"] { background: #ededea; color: #0d0e10; }
html[data-logo="b"] .top-cta { border: 0; }
html[data-logo="b"] nav.menu { background: transparent; border: 0; }
.cover .sq g { stroke-width: 5; }

/* страница заявки «Под ключ» */
.lead-page { padding: 140px 0 96px; }
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.lead-side h1 { font-size: var(--t2); margin-bottom: 18px; }
.lead-side .lead { margin-bottom: 28px; }
.lead-steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 14px; counter-reset: ls; }
.lead-steps li { position: relative; padding-left: 46px; color: var(--muted); }
.lead-steps li b { color: var(--text); font-weight: 600; }
.lead-steps li::before {
  counter-increment: ls; content: counter(ls); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--green, #1f3d34); color: var(--cream, #fff); font-size: var(--t5); font-weight: 600;
}
.lead-form { padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.lead-form:hover { border-color: transparent !important; }
.lead-form label { font-weight: 600; margin-top: 8px; }
.lead-form input, .lead-form textarea {
  width: 100%; font: 400 var(--t4)/1.5 var(--font); color: var(--text); background: var(--bg);
  border: 2px solid transparent; border-radius: 12px; padding: 12px 14px; transition: border-color .2s ease;
}
.lead-form textarea { resize: vertical; min-height: 120px; }
.lead-form input:focus, .lead-form textarea:focus { outline: none; border-color: var(--text); }
.lead-form .hint { font-size: var(--t5); color: var(--muted); }
.lead-form .btn { margin-top: 16px; align-self: flex-start; }
.lead-form .note { margin: 4px 0 0; }
.lead-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { margin: 4px 0 0; font-size: var(--t5); min-height: 1.4em; }
.form-msg.err { color: #b3261e; }
.form-msg.ok { color: var(--text); font-weight: 600; }
.lead-form.sent input, .lead-form.sent textarea, .lead-form.sent label, .lead-form.sent .hint, .lead-form.sent .btn { display: none; }
html[data-design="flow"] .lead-form .btn.light { background: var(--tint); color: var(--ink); border: 2px solid #1a1a1a; }
html[data-logo="b"] .lead-form .btn.light { background: #ededea; color: #0d0e10; border: 0; }
html[data-logo="b"] .lead-form input, html[data-logo="b"] .lead-form textarea { background: #0d0e10; border-radius: 6px; }
html[data-logo="b"] .lead-steps li::before { border-radius: 6px; background: #ededea; color: #0d0e10; }
html[data-logo="b"] .form-msg.err { color: #ff8a80; }
@media (max-width: 860px) { .lead-grid { grid-template-columns: 1fr; gap: 32px; } .lead-page { padding-top: 112px; } }

/* заявка «Под ключ», компактная версия по центру */
.lead-page { padding: 120px 0 96px; }
.lead-wrap { max-width: 640px; text-align: center; }
.lead-wrap h1 { font-size: var(--t2); margin-bottom: 12px; }
.lead-wrap .lead { margin: 0 auto 36px; }
.route-mini { margin: 0 auto 36px; max-width: 520px; gap: 24px; }
.route-mini::before { left: calc((100% - 48px) / 6); right: calc((100% - 48px) / 6); }
.route-mini li { display: flex; flex-direction: column; align-items: center; }
.route-mini li::before { margin-bottom: 12px; }
.route-mini h3 { font-size: var(--t4); margin: 0; }
.lead-form { text-align: left; padding: 32px; gap: 8px; }
.lead-price { display: flex; flex-direction: column; gap: 2px; padding-bottom: 20px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.lead-price .sum { font: 400 var(--t2)/1 var(--serif, Georgia), serif; letter-spacing: -0.02em; }
.lead-price span:last-child { font-size: var(--t5); color: var(--muted); }
.lead-form .opt { font-weight: 400; color: var(--muted); font-size: var(--t5); }
.lead-form textarea { min-height: 96px; }
.lead-form .btn { align-self: stretch; }
html[data-design="flow"] .route-mini li::before { background: var(--green); color: var(--cream); }
html[data-logo="b"] .route-mini li::before { background: #ededea; color: #0d0e10; }
html[data-logo="b"] .route-mini li:last-child::before { background: var(--bg); color: #ededea; box-shadow: inset 0 0 0 3px #ededea; }
html[data-design="flow"]:not([data-logo="b"]) .route-mini li:last-child::before { background: var(--bg); color: var(--green); box-shadow: inset 0 0 0 3px var(--green); }
@media (max-width: 760px) {
  .lead-page { padding-top: 104px; }
  .route-mini { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .route-mini::before { display: block; left: 16%; right: 16%; top: 21px; bottom: auto; width: auto; height: 3px; background: repeating-linear-gradient(90deg, var(--ink) 0 18px, transparent 18px 26px); animation: rails 1.4s linear infinite; }
  .route-mini li { padding-left: 0; }
  .route-mini li::before { position: relative; left: auto; top: auto; margin: 0 0 10px; }
  .route-mini li::after { display: none; }
  .lead-form { padding: 24px; }
}
.lead-form .counter { align-self: flex-end; margin-top: -2px; font-size: var(--t5); color: var(--muted); font-variant-numeric: tabular-nums; transition: color .2s ease; }
.lead-form .counter.near { color: #b3261e; }
html[data-logo="b"] .lead-form .counter.near { color: #ff8a80; }
.lead-form.sent .counter { display: none; }

/* человечек на станции */
.p-sleeve { stroke: var(--green, #1f3d34); }
.p-top { fill: #fffdf6; }
.p-lips { stroke: #c2302f; }
.p-blush circle { fill: #f2a7a0; opacity: .7; }
html[data-logo="b"] .p-sleeve { stroke: #3a3b40; }
html[data-logo="b"] .p-top { fill: #ededea; }
html[data-logo="b"] .p-lips { stroke: #0d0e10; }
html[data-logo="b"] .p-blush { display: none; }
.s-person { transform-box: fill-box; transform-origin: 50% 100%; }
.station.go .s-person { animation: hop .45s ease-out 3s 3; }
@keyframes hop { 0%, 100% { transform: none; } 45% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .station.go .s-person { animation: none; } }

/* человечек в стиле линейной иллюстрации: черный контур, плоская заливка */
.p-ink { fill: currentColor; }
.p-paper { fill: #fffef8; }
.p-dot { fill: currentColor; stroke: none; }
html[data-logo="b"] .p-paper { fill: #0d0e10; }

/* гироскоп: сцена поворачивается в 3D, небо и холмы сдвигаются медленнее (значения задает design.js) */
.station svg { transform: perspective(1100px) rotateX(calc(var(--gy, 0) * -5deg)) rotateY(calc(var(--gx, 0) * 7deg)); transition: transform .25s ease-out; transform-style: preserve-3d; }
.station .sun, .station .sun-glow, .station .stars, .station .cloud { transform: translate(calc(var(--gx, 0) * -18px), calc(var(--gy, 0) * -10px)); transition: transform .25s ease-out; }
.station .hills { transform: translate(calc(var(--gx, 0) * -8px), calc(var(--gy, 0) * -4px)); transition: transform .25s ease-out; }
@media (prefers-reduced-motion: reduce) { .station svg, .station .sun, .station .sun-glow, .station .stars, .station .cloud, .station .hills { transform: none; } }

/* ===== телефон: доводка ===== */
@media (max-width: 640px) {
  section { padding: 64px 0; }
  /* сравнение: карточка на каждую строку, наша колонка и сервисы рядом */
  .table-scroll.glass { padding: 4px 16px !important; }
  table.compare, table.compare tbody, table.compare tr, table.compare td, table.compare th { display: block; }
  table.compare tr:first-child { display: none; }
  table.compare tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  table.compare tr:last-child { border-bottom: 0; }
  table.compare td { padding: 0; border: 0 !important; font-size: var(--t5); }
  table.compare td:first-child { grid-column: 1 / -1; font-size: var(--t4); font-weight: 600; color: var(--text); padding-left: 0 !important; }
  table.compare td.us, table.compare td[data-l] { padding: 10px 12px !important; border-radius: 10px !important; width: auto; }
  table.compare td[data-l]:not(.us) { background: var(--bg); }
  table.compare td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; font-weight: 400; opacity: .7; margin-bottom: 4px; }
  /* что внутри: меньше пустоты под номером */
  .num { margin-bottom: 14px; }
  .tile { padding: 22px; }
  /* что понадобится: компактнее */
  .formula .glass, .formula .result { padding: 18px 20px; }
  .formula .who { margin-bottom: 4px; }
  .formula .op { font-size: var(--t3); }
  /* об авторе: фото рядом с заголовком, меньше */
  .author { grid-template-columns: 96px 1fr; gap: 16px 18px; align-items: start; padding: 20px; }
  .avatar { width: 96px; height: 120px; }
  .author > div:last-child { display: contents; }
  .author h2 { grid-column: 2; align-self: center; margin: 0; font-size: var(--t2); }
  footer .wrap { align-items: center; }
  .author p { grid-column: 1 / -1; margin: 0; }
  /* станция: крупнее правая часть с паровозом, человечком и вокзалом */
  .station svg { width: 230%; margin-left: -128%; }
  /* удобные для пальца элементы */
  .switch button { height: 36px; width: 38px; }
  footer .wrap > span:last-child a { display: inline-block; padding: 10px 2px; }
  .faq-list summary { padding: 18px 0; }
}
html[data-logo="b"] table.compare td[data-l]:not(.us) { background: #0d0e10; }

/* герой на станции: медитирующая девушка из Open Doodles (CC0), перекрашена под сайт */
.doodle .pk { fill: var(--ink); }
.doodle .acc { fill: #ffa946; }
html[data-logo="b"] .doodle .acc { fill: #5a5c62; }
.station.go .s-person { animation: levitate 3.2s ease-in-out 3s infinite; }
@keyframes levitate { 0%, 100% { transform: none; } 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { .station.go .s-person { animation: none; } }

/* переключатель языка RU / EN на месте бывшего переключателя логотипа */
.switch a { width: 40px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font: 600 12px/1 Onest, system-ui, sans-serif; letter-spacing: .02em; color: #3b4150; text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.switch a:hover { color: #1a1a1a; }
html[data-design="flow"] .switch a[aria-current="true"] { background: #fffdf9; color: #1a1a1a; }
html[data-logo="b"] .switch a { border-radius: 7px; color: var(--muted); }
html[data-logo="b"] .switch a:hover { color: #ededea; }
html[data-logo="b"] .switch a[aria-current="true"] { background: #ededea; color: #0d0e10; }
@media (max-width: 640px) { .switch a { height: 36px; width: 38px; } }

/* английская версия, логотип-окно: знак-окно и надпись Offer Agent */
.lg.lg-b.lg-b-en { gap: 10px; }
.lg.lg-b.lg-b-en svg { height: 24px; }
.lg.lg-b.lg-b-en span { font-size: inherit; opacity: 1; }
@media (max-width: 560px) { .lg.lg-b.lg-b-en span { display: none; } .switch a { width: 32px; } }
