/* Dayflow: лендинг и документы. Палитра и шрифты как в Mini App; цвета разделов только для данных. */
:root {
  --bg: #1b1a22;
  --panel: #24232d;
  --panel2: #2e2c38;
  --line: #34323f;
  --text: #f2efe8;
  --muted: #a19fae;
  --money: #e8b04b;
  --food: #8fc79a;
  --act: #7fb2e5;
  --task: #c3a6f0;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f5f8;
    --panel: #ffffff;
    --panel2: #ecebf0;
    --line: #e1dfe7;
    --text: #1b1a22;
    --muted: #5f5c6b;
    --money: #a8740f;
    --food: #2f7a44;
    --act: #2f72b8;
    --task: #7e5bc4;
    color-scheme: light;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--act);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.15;
}

h3 {
  font-size: 17px;
  line-height: 1.3;
}

p {
  margin: 0;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
}

.skip:focus {
  top: 12px;
}

/* ---------- шапка */

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
}

.logo {
  width: 34px;
  height: 34px;
  color: var(--text);
  flex: none;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
}

.lang:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-small {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 15px;
}

/* ---------- первый экран */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(48px, 8vw, 104px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.1;
  max-width: 14em;
  text-wrap: balance;
}

.lede {
  margin-top: 22px;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 19px);
}

.hero-cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.free {
  color: var(--muted);
  font-size: 15px;
}

/* Демо: сообщение пользователя и ответ бота, как в чате Telegram. */
.demo {
  margin: 0;
  position: relative;
}

.chat {
  padding: 22px;
  border-radius: 28px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 420px;
}

.bubble {
  margin: 0;
  max-width: 92%;
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.5;
}

.bubble-me {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--panel2);
  min-height: 48px;
}

.frag {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.35s ease;
}

.frag.on[data-k="money"] { text-decoration-color: var(--money); }
.frag.on[data-k="food"] { text-decoration-color: var(--food); }
.frag.on[data-k="act"] { text-decoration-color: var(--act); }
.frag.on[data-k="task"] { text-decoration-color: var(--task); }

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.18em;
  background: var(--text);
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.bubble-bot {
  align-self: flex-start;
  width: 92%;
  border-bottom-left-radius: 6px;
  border: 1px solid var(--line);
}

.found {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 15px;
}

.row-name {
  flex: 1;
  min-width: 0;
}

.row-val {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.dot-money { background: var(--money); }
.dot-food { background: var(--food); }
.dot-act { background: var(--act); }
.dot-task { background: var(--task); }

.keys {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.key {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--panel2);
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.key-save.pressed {
  transform: scale(0.96);
  background: var(--text);
  color: var(--bg);
}

.replay {
  margin-top: 12px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 15px var(--body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.replay:hover {
  color: var(--text);
}

/* Состояния анимации задаёт site.js; без JS и при reduced motion всё видно сразу. */
.ready .demo .bubble-bot,
.ready .demo .row,
.ready .demo .keys {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.ready .demo .bubble-bot.in,
.ready .demo .row.in,
.ready .demo .keys.in {
  opacity: 1;
  transform: none;
}

/* ---------- секции */

.band {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  /* Разделитель по ширине контента, без полей. */
  position: relative;
}

.band-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 48px;
  align-items: end;
}

.band-head p {
  color: var(--muted);
  max-width: 34em;
}

.band-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px 48px;
}

/* Лента дня: 6:00–24:00 слева направо. */
.ribbon {
  position: relative;
  margin: clamp(40px, 6vw, 64px) 0 clamp(40px, 6vw, 56px);
  height: 150px;
}

.ribbon-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 75px;
  height: 2px;
  border-radius: 1px;
  background: var(--line);
  transform-origin: left center;
}

.ticks {
  position: absolute;
  inset: 0;
}

.tick {
  position: absolute;
  top: 84px;
  left: calc(var(--t) * 100%);
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.tick:first-child {
  transform: none;
}

.tick:last-child {
  transform: translateX(-100%);
}

.events {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ev {
  position: absolute;
  left: calc(var(--t) * 100%);
  top: 0;
  height: 150px;
  width: 0;
}

.ev-dot {
  position: absolute;
  top: 69px;
  left: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg);
}

.ev-text {
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
}

.ev-text time {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ev-up .ev-text {
  bottom: 96px;
}

.ev-down .ev-text {
  top: 108px;
}

.ready .ribbon .ribbon-line {
  transform: scaleX(0);
  transition: transform 1.4s cubic-bezier(0.6, 0, 0.2, 1);
}

.ready .ribbon .ev {
  opacity: 0;
  transition: opacity 0.45s ease calc(0.25s + var(--i) * 0.16s);
}

.ready .ribbon .ev-dot {
  transform: scale(0.3);
  transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) calc(0.25s + var(--i) * 0.16s);
}

.ready .in .ribbon .ribbon-line {
  transform: none;
}

.ready .in .ribbon .ev {
  opacity: 1;
}

.ready .in .ribbon .ev-dot {
  transform: none;
}

.tabs-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.tab-item {
  position: relative;
  padding-top: 19px;
}

.tab-item::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: left center;
}

.tab-item h3,
.tab-item p {
  color: var(--text);
}

.tab-item p {
  margin-top: 8px;
  color: var(--muted) !important;
  font-size: 15px;
}

.tab-money { color: var(--money); }
.tab-food { color: var(--food); }
.tab-act { color: var(--act); }
.tab-task { color: var(--task); }

/* Способы записи */
.ways {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.way-icon {
  display: block;
  margin-bottom: 14px;
}

.way p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  max-width: 30em;
}

/* Тарифы */
.table-wrap {
  margin-top: 36px;
  overflow-x: auto;
  border-radius: 20px;
  background: var(--panel);
}

.plans {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 15px;
}

.plans th,
.plans td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.plans tbody tr:last-child th,
.plans tbody tr:last-child td {
  border-bottom: 0;
}

.plans thead th {
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
}

.plans tbody th {
  font-weight: 400;
  color: var(--muted);
}

.plans td {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.col-max {
  background: var(--panel2);
}

.best {
  display: block;
  margin-top: 4px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  color: var(--money);
}

.note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
}

.plan-cards {
  display: none;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.plan-card {
  padding: 18px 18px 8px;
  border-radius: 18px;
  background: var(--panel);
}

.plan-card + .plan-card {
  margin-top: 10px;
}

.plan-card-max {
  background: var(--panel2);
}

.plan-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.plan-card dl {
  margin: 0;
}

.plan-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.plan-card dt {
  color: var(--muted);
}

.plan-card dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Данные */
.facts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.facts li:first-child {
  padding-top: 4px;
}

.facts strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 2px;
}

.text-link {
  display: inline-block;
  margin-top: 20px;
  font-weight: 500;
  text-underline-offset: 3px;
}

/* Вопросы */
.qa {
  border-bottom: 1px solid var(--line);
}

.qa:first-child summary {
  padding-top: 4px;
}

.qa summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 40px 18px 0;
  position: relative;
  font-weight: 600;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.qa:first-child summary::after {
  margin-top: -9px;
}

.qa[open] summary::after {
  transform: rotate(225deg);
}

.qa p {
  padding: 0 40px 20px 0;
  color: var(--muted);
  max-width: 36em;
}

/* Финал */
.final {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 104px) var(--gutter);
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}

.final-text {
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
  max-width: 20em;
  text-wrap: balance;
}

/* ---------- подвал */

.foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px var(--gutter) 44px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 40px;
  align-items: center;
}

.brand-foot {
  color: var(--text);
  font-size: 16px;
}

.brand-foot .logo {
  width: 28px;
  height: 28px;
}

.foot-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 24px;
}

.foot-links a {
  display: inline-block;
  padding: 8px 0;
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.foot-op,
.foot-copy {
  grid-column: 1 / -1;
}

/* ---------- документы */

.doc {
  max-width: calc(68ch + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) var(--gutter) 80px;
}

.doc h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.doc-date {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.doc h2 {
  margin: 40px 0 12px;
  font-size: 19px;
  line-height: 1.3;
}

.doc p,
.doc li {
  line-height: 1.65;
}

.doc p + p {
  margin-top: 12px;
}

.doc > p:first-of-type {
  margin-top: 28px;
}

.doc ul {
  margin: 12px 0;
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.doc a {
  text-underline-offset: 3px;
}

.doc code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--panel2);
  font-size: 0.92em;
}

/* ---------- новые детали: бегущая строка, шаги, превью трекера */

.band::before,
.final::before {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 0;
  height: 1px;
  background: var(--line);
  transform-origin: left center;
}

.ticker {
  overflow: hidden;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 40px;
  padding-right: 40px;
}

.ticker-track li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 15px;
}

.ready .ticker-track {
  animation: ticker 48s linear infinite;
  animation-play-state: paused;
}

.ready .ticker.in .ticker-track {
  animation-play-state: running;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker {
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.steps {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  position: relative;
}

/* Линия между номерами шагов. */
.steps::before {
  content: "";
  position: absolute;
  left: 22px;
  right: calc(33.333% - 22px);
  top: 22px;
  height: 2px;
  background: var(--line);
  transform-origin: left center;
}

.step {
  position: relative;
}

.step-n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--panel2);
  box-shadow: 0 0 0 6px var(--bg);
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
}

.step p,
.pv p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  max-width: 30em;
}

.preview {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 16px;
}

.pv {
  padding: 22px;
  border-radius: 24px;
  background: var(--panel);
}

.pv h3 {
  font-size: 15px;
  color: var(--muted);
  font-family: var(--body);
  font-weight: 500;
  margin-bottom: 16px;
}

.pv-fin-body {
  display: flex;
  align-items: center;
  gap: 18px;
}

.donut {
  width: 128px;
  height: 128px;
  flex: none;
}

.donut circle {
  fill: none;
  stroke-width: 15;
}

.donut-bg {
  stroke: var(--panel2);
}

.donut-spin {
  transform-origin: 60px 60px;
  transform: rotate(-90deg);
}

.seg {
  stroke-dasharray: var(--len) 100;
  transform-origin: 60px 60px;
  transform: rotate(var(--rot));
}

.donut-total b {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
}

.donut-total span {
  color: var(--muted);
  font-size: 13px;
}

.legend {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  font-size: 14px;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend li span:nth-child(2) {
  flex: 1;
}

.legend b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.kcal b {
  font-family: var(--display);
  font-weight: 500;
  font-size: 30px;
}

.kcal span {
  color: var(--muted);
  font-size: 14px;
}

.track {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--panel2);
  overflow: hidden;
}

.track-lg {
  height: 10px;
  border-radius: 5px;
  margin: 12px 0 20px;
}

.fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--text);
  transform-origin: left center;
  transform: scaleX(var(--v));
}

.fill-food {
  background: var(--food);
}

.macros {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  font-size: 14px;
}

.macros li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.macros .track {
  grid-column: 1 / -1;
}

.mac-val {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tasks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tasks li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.tasks li:last-child {
  border-bottom: 0;
}

.box {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
}

.done .box rect {
  fill: var(--task);
  stroke: var(--task);
}

.tick-path {
  stroke: var(--bg);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
}

.t-name {
  flex: 1;
  position: relative;
}

.done .t-name {
  color: var(--muted);
}

/* Зачёркивание выполненных задач. */
.t-name > span {
  position: relative;
}

.done .t-name > span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 55%;
  height: 1.5px;
  background: var(--muted);
  transform-origin: left center;
}

.t-when {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---------- анимации появления. Класс .ready ставит site.js (только без «уменьшить движение»),
   .in появляется, когда секция в зоне видимости, и снимается, когда она уходит: при возврате всё повторяется.
   Анимируются только transform, opacity и stroke: это не вызывает перерасчёт раскладки. */

.ready .letters {
  perspective: 700px;
}

.wd {
  display: inline-block;
  white-space: nowrap;
}

.ready .ch {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 0.5em, 0) rotateX(-85deg);
  transform-origin: 50% 100%;
  transition: transform 0.75s cubic-bezier(0.2, 0.9, 0.25, 1) calc(var(--i) * 18ms),
    opacity 0.45s ease calc(var(--i) * 18ms);
}

.ready .in .ch {
  opacity: 1;
  transform: none;
}

.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.split .w > span {
  display: inline-block;
}

.ready .split .w > span {
  transform: translate3d(0, 110%, 0) rotate(6deg);
  transform-origin: left bottom;
  transition: transform 0.85s cubic-bezier(0.2, 0.85, 0.2, 1) calc(var(--i) * 60ms);
}

.ready .in .split .w > span {
  transform: none;
}

.ready .rv {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 0.6s ease calc(0.15s + var(--d, 0) * 90ms),
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) calc(0.15s + var(--d, 0) * 90ms);
}

.ready .in .rv {
  opacity: 1;
  transform: none;
}

/* Линии прорисовываются слева направо. */
.ready .band::before,
.ready .final::before,
.ready .steps::before,
.ready .tab-item::before,
.ready .done .t-name > span::after {
  transform: scaleX(0);
  transition: transform 1.1s cubic-bezier(0.6, 0, 0.2, 1) 0.1s;
}

.ready .tab-item::before {
  transition-delay: calc(0.3s + var(--d) * 120ms);
}

.ready .steps::before {
  transition-duration: 1.4s;
  transition-delay: 0.4s;
}

.ready .done .t-name > span::after {
  transition-duration: 0.5s;
  transition-delay: calc(1.1s + var(--i) * 250ms);
}

.ready .in.band::before,
.ready .in.final::before,
.ready .in .steps::before,
.ready .in .tab-item::before,
.ready .in .done .t-name > span::after {
  transform: none;
}

.ready .step-n {
  transform: scale(0.4) rotate(-90deg);
  transition: transform 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) calc(0.35s + var(--d) * 220ms);
}

.ready .in .step-n {
  transform: none;
}

/* Иконки и галочки рисуются штрихом. */
.ready .draw * {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.6, 0, 0.3, 1) 0.35s;
}

.ready .in .draw * {
  stroke-dashoffset: 0;
}

.ready .tick-path {
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.4s ease calc(0.8s + var(--i) * 250ms);
}

.ready .tasks li {
  --i: 0;
}

.ready .in .tick-path {
  stroke-dashoffset: 0;
}

/* Диаграмма прокручивается и раскрывает доли. */
.ready .donut-spin {
  transform: rotate(-270deg) scale(0.85);
  transition: transform 1.4s cubic-bezier(0.25, 0.8, 0.25, 1) 0.3s;
}

.ready .in .donut-spin {
  transform: rotate(-90deg);
}

.ready .seg {
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 0.9s cubic-bezier(0.3, 0.7, 0.3, 1) calc(0.45s + var(--i) * 140ms);
}

.ready .in .seg {
  stroke-dasharray: var(--len) 100;
}

.ready .fill {
  transform: scaleX(0);
  transition: transform 1.1s cubic-bezier(0.25, 0.8, 0.25, 1) calc(0.55s + var(--i) * 130ms);
}

.ready .in .fill {
  transform: scaleX(var(--v));
}

/* ---------- адаптив */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat {
    min-height: 0;
  }

  .band-head,
  .band-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .tabs-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ways,
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .steps::before {
    left: 21px;
    right: auto;
    top: 22px;
    bottom: 40px;
    width: 2px;
    height: auto;
    transform-origin: center top;
  }

  .ready .steps::before {
    transform: scaleY(0);
  }

  .ready .in .steps::before {
    transform: none;
  }

  .step {
    padding-left: 64px;
  }

  .step-n {
    position: absolute;
    left: 0;
    top: -4px;
  }

  .preview {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* На узком экране лента становится вертикальным списком. */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .btn-small {
    padding: 0 12px;
  }

  .chat {
    padding: 14px;
    border-radius: 22px;
  }

  .bubble {
    max-width: 100%;
    font-size: 15px;
  }

  .bubble-bot {
    width: 100%;
  }

  .ribbon {
    height: auto;
    padding-left: 22px;
  }

  .ribbon-line {
    top: 6px;
    bottom: 6px;
    left: 6px;
    right: auto;
    width: 2px;
    height: auto;
    transform-origin: center top;
  }

  .ready .ribbon .ribbon-line {
    transform: scaleY(0);
  }

  .ticks {
    display: none;
  }

  .ev {
    position: relative;
    left: auto;
    height: auto;
    width: auto;
    padding: 8px 0 8px 14px;
  }

  .ev-dot {
    top: 50%;
    left: -22px;
    margin-top: -7px;
  }

  .ev-text,
  .ev-up .ev-text,
  .ev-down .ev-text {
    position: static;
    transform: none;
    display: flex;
    gap: 12px;
    align-items: baseline;
  }

  .ev-text time {
    display: inline;
    min-width: 3.2em;
  }

  .tabs-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .foot-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-wrap {
    display: none;
  }

  .plan-cards {
    display: block;
  }

  .foot-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
