/* ==========================================================================
   Токены
   ========================================================================== */

:root {
  --bg: #EFEFEF;
  --surface: #FFFFFF;
  --muted: #F4F4F4;
  --muted-hover: #EAEAEA;
  --text: #111111;
  --text-2: #555555;
  --text-3: #6B6B6B;
  --text-4: #8C8C8C;
  --line: #EAEAEA;
  --line-strong: #DCDCDC;
  --accent: #2457F5;
  --accent-hover: #1B47D8;
  --accent-soft: #E6ECFE;
  --accent-glow: rgba(36, 87, 245, 0.45);
  --danger: #A32020;
  --danger-bright: #D93636;
  --danger-soft: #FBEAEA;

  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font: 'SF Pro Expanded', 'SF Pro Display Expanded', -apple-system, BlinkMacSystemFont, 'Roboto Flex', system-ui, sans-serif;
}

/* ==========================================================================
   База
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  --header-height: 64px;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-stretch: 125%;
  -webkit-font-smoothing: antialiased;
}

#app {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--text);
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
}

:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--accent) 40%, transparent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: min(960px, 100% - 32px);
  margin-inline: auto;
}

/* ==========================================================================
   Шапка
   ========================================================================== */

/* Липкая шапка. Непрозрачный фон и z-index — чтобы красная вспышка на экране ошибки шла под ней */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: drop-in 0.7s var(--ease-out) backwards;
}

/* Класс ставит js/header.js, когда страница прокручена */
.site-header.is-scrolled {
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom-color: transparent;
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
}

.site-header__inner {
  height: 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
}

.site-header__nav,
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 500;
}

.site-header__actions {
  justify-self: end;
}

.site-header__nav a,
.site-header__actions a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1.5px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.35s var(--ease-out);
}

.site-header__nav a:hover,
.site-header__actions a:hover,
.site-header__actions a.is-underlined {
  background-size: 100% 1.5px;
}

.site-header__logo {
  justify-self: center;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: letter-spacing 0.4s var(--ease-out);
}

.site-header__logo:hover {
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .site-header__inner {
    grid-template-columns: auto 1fr;
  }

  .site-header__nav {
    display: none;
  }

  .site-header__logo {
    justify-self: start;
  }
}

/* ==========================================================================
   Белый лист под шапкой и заголовок страницы
   ========================================================================== */

.sheet {
  position: relative;
  flex-grow: 1;
  padding: 40px 0 64px;
  border-radius: 40px 40px 0 0;
  background: var(--surface);
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-head__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.page-head__text {
  margin: 0;
  font-size: 14px;
  color: var(--text-3);
}

/* ==========================================================================
   Кнопки
   ========================================================================== */

.btn {
  position: relative;
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition:
    transform 0.35s var(--ease-spring),
    box-shadow 0.3s ease,
    background-color 0.2s ease,
    opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.1s;
}

.btn--primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 14px 28px -12px var(--accent-glow);
}

.btn--muted {
  background: var(--muted);
  color: var(--text);
}

.btn--muted:hover {
  background: var(--muted-hover);
}

.btn__arrow {
  transition: transform 0.35s var(--ease-spring);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

.btn__spin {
  transition: transform 0.6s var(--ease-out);
}

.btn:hover .btn__spin {
  transform: rotate(-360deg);
}

/* Главная кнопка оплаты: блик, пульс свечения, рябь, «взлёт» при нажатии */
.btn--pay {
  width: 100%;
  isolation: isolate;
  animation: pay-glow 2.6s ease-in-out 1.2s infinite;
}

.btn--pay::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 3.2s ease-in-out 1.6s infinite;
}

.btn--pay > span:not(.ripple) {
  display: inline-block;
}

.btn--pay.is-dimmed {
  opacity: 0.55;
  animation: none;
}

.btn--pay.is-launching {
  animation: none;
  transform: scale(0.97);
  box-shadow: 0 0 0 8px color-mix(in oklab, var(--accent) 18%, transparent);
}

.btn--pay.is-launching .btn__arrow {
  animation: arrow-launch 0.4s var(--ease-out) forwards;
}

.ripple {
  position: absolute;
  z-index: -1;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  animation: ripple 0.7s var(--ease-out) forwards;
}

/* ==========================================================================
   Оформление заказа
   ========================================================================== */

.checkout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkout__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  align-items: start;
}

.checkout__main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  .checkout__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary {
    position: static;
  }
}

.panel {
  padding: 20px 22px 22px;
  border-radius: var(--radius-lg);
  background: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel.is-highlighted {
  animation: panel-highlight 1.8s var(--ease-out) 0.3s both;
}

.panel__title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.choices {
  display: grid;
  gap: 8px;
}

.choices--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choices--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choices--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 600px) {
  .choices--2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .choices--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice {
    padding: 10px 12px;
  }

  .choice__title {
    font-size: 14px;
  }

  .choice__note {
    font-size: 12px;
  }
}

/* Общая механика выбираемых карточек: срок и способ оплаты */
.choice,
.method {
  min-width: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  box-shadow: inset 0 0 0 0 var(--accent);
  transition:
    box-shadow 0.3s var(--ease-out),
    transform 0.35s var(--ease-spring);
}

.choice:hover,
.method:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 0 var(--accent), 0 12px 24px -14px rgba(0, 0, 0, 0.25);
}

.choice:active,
.method:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

.choice[aria-pressed='true'],
.method[aria-pressed='true'] {
  box-shadow: inset 0 0 0 2px var(--accent), 0 14px 28px -16px var(--accent-glow);
  animation: pop 0.45s var(--ease-spring);
}

.choice {
  min-height: 64px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.choice__title,
.method__title {
  font-size: 15px;
  font-weight: 500;
}

.choice__note,
.method__note {
  font-size: 13px;
  color: var(--text-3);
  transition: color 0.3s ease;
}

.choice[aria-pressed='true'] .choice__note {
  color: var(--accent);
}

.method {
  min-height: 64px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.method__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.method__image {
  margin-left: auto;
  flex-shrink: 0;
  height: 40px;
  width: auto;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.18));
  transition: transform 0.5s var(--ease-spring), filter 0.3s ease;
}

.method:hover .method__image {
  transform: translateY(-4px) rotate(-10deg) scale(1.15);
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.22));
}

.method[aria-pressed='true'] .method__image {
  animation: bob 1.8s ease-in-out infinite;
}

.radio {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid #B5B5B5;
  transition: border 0.35s var(--ease-spring), transform 0.35s var(--ease-spring);
}

.method[aria-pressed='true'] .radio {
  border: 5px solid var(--accent);
  transform: scale(1.1);
}

/* Поля */
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 600px) {
  .fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 13px;
  color: var(--text-2);
}

.field__error {
  font-size: 12px;
  color: var(--danger-bright);
}

.field__hint {
  font-size: 12px;
  color: var(--text-3);
}

/* Своя сумма пополнения */
.amount-field__control {
  position: relative;
}

.amount-field__input {
  width: 100%;
  padding-right: 40px;
  font-size: 17px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.amount-field__input::placeholder {
  font-weight: 400;
  color: var(--text-4);
}

.amount-field__currency {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  font-weight: 500;
  color: var(--text-4);
  pointer-events: none;
  transition: color 0.2s ease, transform 0.35s var(--ease-spring);
}

.amount-field.is-filled .amount-field__currency {
  color: var(--text);
  transform: translateY(-50%) scale(1.1);
}

.amount-field.is-filled:not(.is-invalid) .amount-field__input {
  box-shadow: inset 0 0 0 2px var(--accent), 0 14px 28px -16px var(--accent-glow);
}

.input {
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 15px;
  outline: none;
  box-shadow: inset 0 0 0 1.5px transparent, 0 0 0 0 transparent;
  transition: box-shadow 0.25s ease;
}

.input:hover {
  box-shadow: inset 0 0 0 1.5px var(--line-strong), 0 0 0 0 transparent;
}

.input:focus {
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px color-mix(in oklab, var(--accent) 16%, transparent);
}

.field.is-invalid .input {
  box-shadow: inset 0 0 0 1.5px var(--danger-bright), 0 0 0 4px color-mix(in oklab, var(--danger-bright) 14%, transparent);
}

/* Карточка заказа справа — наклоняется за курсором */
.summary {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  padding: 8px;
  border-radius: var(--radius-xl);
  background: var(--muted);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease-out);
  will-change: transform;
}

.summary__card {
  padding: 22px;
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product__logo img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  animation: logo-in 0.6s var(--ease-spring) 0.3s backwards;
}

.product__change {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-3);
  transition: color 0.2s ease;
}

.product__change:hover {
  color: var(--accent);
}

.product__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product__name {
  font-size: 16px;
  font-weight: 500;
}

.product__vendor {
  font-size: 13px;
  color: var(--text-3);
}

.rows {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.rows__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.rows dt {
  color: var(--text-3);
}

.rows dd {
  margin: 0;
  text-align: right;
}

.rows dd > span:not(.badge) {
  display: inline-block;
}

.rows--receipt {
  padding-top: 12px;
  border-top: 1px solid #EEEEEE;
  gap: 12px;
}

.promo {
  display: flex;
  gap: 6px;
}

.promo__input {
  flex-grow: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--muted);
  font-size: 14px;
  outline: none;
  transition: box-shadow 0.25s ease;
}

.promo__input:focus {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.promo__button {
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: #F0F0F0;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.3s var(--ease-spring);
}

.promo__button:hover {
  background: var(--muted-hover);
}

.promo__button:active {
  transform: scale(0.95);
}

.promo__note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-3);
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 16px;
  border-top: 1px solid #EEEEEE;
}

.total__label {
  font-size: 15px;
  font-weight: 500;
}

.total__value {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.total__value.is-stale {
  opacity: 0.35;
}

.total__value {
  transition: opacity 0.25s ease;
}

.rows__discount {
  color: #1F6B3A;
}

.agree {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
  cursor: pointer;
}

.agree input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

/* ==========================================================================
   Экран загрузки
   ========================================================================== */

.processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding-top: 16px;
  text-align: center;
}

.processing__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.orb {
  position: relative;
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  animation: orb-in 0.8s var(--ease-spring) both;
}

.orb__glow {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(12px);
  animation: glow-pulse 1.4s ease-in-out infinite;
}

.orb__ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed color-mix(in oklab, var(--accent) 40%, transparent);
}

.orb__ring--outer {
  inset: 0;
  animation: spin 9s linear infinite;
}

.orb__ring--inner {
  inset: 18px;
  border-style: dotted;
  border-width: 2px;
  animation: spin 5s linear infinite reverse;
}

.orb__progress {
  position: absolute;
  inset: 30px;
  width: calc(100% - 60px);
  height: calc(100% - 60px);
  transform: rotate(-90deg);
}

.orb__track,
.orb__bar {
  fill: none;
  stroke-width: 6;
}

.orb__track {
  stroke: var(--accent-soft);
}

.orb__bar {
  stroke: var(--accent);
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.orb__spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: orbit 2.4s linear infinite;
  animation-delay: calc(var(--n) * -0.4s);
}

.orb__image {
  position: relative;
  height: 84px;
  width: auto;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.25));
  animation: bob 1.1s ease-in-out infinite;
}

.dots i {
  font-style: normal;
  animation: blink 1.2s infinite;
}

.dots i:nth-child(2) {
  animation-delay: 0.2s;
}

.dots i:nth-child(3) {
  animation-delay: 0.4s;
}

.steps {
  width: min(360px, 100%);
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--muted);
  font-size: 14px;
  text-align: left;
  color: var(--text-4);
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.4s var(--ease-out),
    transform 0.4s var(--ease-spring);
}

.step.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 12px 26px -14px var(--accent-glow);
  transform: scale(1.03);
}

.step.is-done {
  color: var(--text-2);
}

.step__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid #CFCFCF;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.step.is-active .step__icon {
  border: 2px solid var(--accent);
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}

.step.is-done .step__icon {
  border-color: var(--accent);
  background: var(--accent);
  animation: pop 0.45s var(--ease-spring);
}

.step__check {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: draw 0.4s var(--ease-out) 0.1s forwards;
}

.progress {
  width: min(360px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress__track {
  flex-grow: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress__bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8AA8FF, var(--accent)) 0 0 / 200% 100%;
  transform-origin: left;
  animation: shimmer 1.2s linear infinite;
}

.progress__timer {
  min-width: 28px;
  font-size: 13px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ==========================================================================
   Экран неуспеха
   ========================================================================== */

.flash {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: radial-gradient(circle at 50% 35%, rgba(220, 40, 40, 0.28), transparent 65%);
  animation: flash 1.3s ease-out 0.45s both;
}

.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding-top: 24px;
  text-align: center;
}

.result__hero {
  position: relative;
  width: 200px;
  height: 160px;
  display: grid;
  place-items: center;
}

.result__drop {
  display: block;
  animation: crash-in 0.9s var(--ease-spring) both;
}

.result__image {
  height: 140px;
  width: auto;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.22));
  animation:
    wobble 0.6s ease-in-out 0.9s,
    float 3s ease-in-out 1.5s infinite;
}

.shockwave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130px;
  height: 130px;
  margin: -65px 0 0 -65px;
  border-radius: 50%;
  border: 2px solid rgba(217, 54, 54, 0.55);
  opacity: 0;
  animation: shockwave 2.4s var(--ease-out) infinite;
  animation-delay: calc(0.55s + var(--n) * 0.3s);
}

.result__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.result__title {
  font-size: 32px;
}

.result__lead {
  max-width: 460px;
  font-size: 15px;
  line-height: 1.5;
}

/* Глитч заголовка: два цветных слоя дёргаются пару раз и исчезают */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--danger-bright);
  animation: glitch-a 0.5s steps(1) 1s 2;
}

.glitch::after {
  color: var(--accent);
  animation: glitch-b 0.5s steps(1) 1s 2;
}

.receipt {
  width: min(480px, 100%);
  padding: 8px;
  border-radius: var(--radius-xl);
  background: var(--muted);
}

.receipt__card {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.badge {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: ping 1.4s ease-out infinite;
}

.result__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.result__help {
  margin: 0;
  font-size: 14px;
  color: var(--text-3);
}

/* ==========================================================================
   Лендинг
   ========================================================================== */

.landing {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.section-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Первый экран */
.hero {
  min-height: 440px;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero__content {
  width: min(600px, 100%);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero__title {
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Каждое слово выезжает снизу из-под маски */
.hero__word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
}

.hero__word > span {
  display: inline-block;
  animation: word-up 0.9s var(--ease-out) backwards;
  animation-delay: calc(var(--i) * 60ms + 150ms);
}

.hero__art {
  position: relative;
  margin-right: 56px;
  transition: transform 0.8s var(--ease-out);
}

.hero__art::before {
  content: '';
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(30px);
  animation: glow-pulse 3.5s ease-in-out infinite;
}

.hero__image {
  position: relative;
  height: 340px;
  width: auto;
  filter: drop-shadow(0 28px 32px rgba(0, 0, 0, 0.22));
  animation:
    hero-in 1.1s var(--ease-spring) 0.3s backwards,
    float-big 5s ease-in-out 1.4s infinite;
}

@media (max-width: 800px) {
  .hero {
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .hero__art {
    order: -1;
    margin: 0 auto;
  }

  .hero__image {
    height: 180px;
  }
}

/* Быстрый заказ */
.quick {
  min-height: 64px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  display: flex;
  gap: 6px;
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.3);
}

.quick__field {
  flex: 1 1 0;
  min-width: 0;
}

.quick__field--wide {
  flex-grow: 1.5;
}

/* ==========================================================================
   Выпадающий список (AppSelect)
   ========================================================================== */

.select {
  position: relative;
  display: flex;
}

.select.is-open {
  z-index: 30;
}

.select__trigger {
  width: 100%;
  min-width: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  text-align: left;
  outline: none;
  transition: box-shadow 0.25s ease, background-color 0.2s ease;
}

.select__trigger:hover {
  background: var(--muted-hover);
}

.select__trigger:focus-visible,
.select.is-open .select__trigger {
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px color-mix(in oklab, var(--accent) 14%, transparent);
}

.select__label {
  font-size: 11px;
  color: var(--text-3);
}

.select__value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.select__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
}

.select__text {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.select__chevron {
  flex-shrink: 0;
  color: var(--text-3);
  transition: transform 0.4s var(--ease-spring), color 0.2s ease;
}

.select.is-open .select__chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.select__menu {
  position: absolute;
  top: calc(100% + 12px);
  left: -6px;
  min-width: max(calc(100% + 12px), 260px);
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 24px 60px -18px rgba(0, 0, 0, 0.35);
  transform-origin: top left;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.select__group + .select__group {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.select__group-title {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-4);
}

.select__option {
  position: relative;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  animation: option-in 0.35s var(--ease-out) backwards;
  animation-delay: calc(var(--i) * 18ms + 40ms);
}

.select__option.is-active {
  background: var(--muted);
}

.select__option-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.35s var(--ease-spring);
}

.select__option-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.select__option.is-active .select__option-icon {
  background: var(--surface);
  transform: scale(1.1) rotate(-6deg);
}

.select__option-text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.select__option-label {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.select__option-hint {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

.select__check {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.35s var(--ease-spring);
}

.select__option.is-selected .select__option-label {
  color: var(--accent);
}

.select__option.is-selected .select__check {
  opacity: 1;
  transform: scale(1);
}

.menu-enter-active {
  transition: opacity 0.2s ease, transform 0.35s var(--ease-spring);
}

.menu-leave-active {
  transition: opacity 0.15s ease, transform 0.15s ease-in;
}

.menu-enter-from,
.menu-leave-to {
  opacity: 0;
  transform: translateY(-8px) scale(0.95);
}

@keyframes option-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
}

@media (max-width: 600px) {
  .select__menu {
    min-width: calc(100% + 12px);
  }
}

.quick__submit {
  height: auto;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .quick {
    flex-wrap: wrap;
  }

  .quick__field--wide,
  .quick__submit {
    flex-basis: 100%;
  }

  .quick__submit {
    height: 48px;
  }
}

/* Белая часть */
.landing__main {
  padding: 48px 0 64px;
  border-radius: 40px;
  background: var(--surface);
}

.landing__inner {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats__item + .stats__item {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.stats__value {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.stats__label {
  font-size: 13px;
  color: var(--text-3);
}

@media (max-width: 700px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .stats__item + .stats__item {
    padding: 16px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* Каталог */
.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 700px) {
  .services {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Нечётное число карточек — последняя растягивается на всю ширину */
.services > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.services > :last-child:nth-child(odd) .service-card__text {
  max-width: 520px;
}

.service-card {
  position: relative;
  overflow: hidden;
  height: 132px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--muted);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.45s var(--ease-spring), box-shadow 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.35);
}

.service-card--featured {
  background: var(--accent);
  color: #FFFFFF;
}

.service-card__image {
  position: absolute;
  right: 22px;
  top: 16px;
  height: 76px;
  width: auto;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.18));
  pointer-events: none;
  transition: transform 0.6s var(--ease-spring);
}

.service-card__image--big {
  right: 28px;
  top: 20px;
  height: 92px;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.28));
}

.service-card:hover .service-card__image {
  transform: translateY(-6px) rotate(-12deg) scale(1.14);
}

.service-card__text {
  position: relative;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.service-card__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-3);
}

.service-card--featured .service-card__desc {
  color: #FFFFFF;
}

.service-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Стрелка растянута на всю карточку: клик мимо логотипов ведёт на первый сервис категории */
.service-card__go {
  width: 40px;
  height: 26px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--accent) 12%, #FFFFFF);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.4s var(--ease-spring), background-color 0.25s ease, color 0.25s ease;
}

.service-card__go::after {
  content: '';
  position: absolute;
  inset: 0;
}

.service-card__go svg {
  transition: transform 0.4s var(--ease-spring);
}

.service-card:hover .service-card__go {
  width: 54px;
  background: var(--accent);
  color: #FFFFFF;
}

.service-card:hover .service-card__go svg {
  transform: translateX(4px);
}

.chips {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
}

.chip {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.3s ease;
}

.chip img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.chip:hover,
.chip:focus-visible {
  transform: translateY(-3px) scale(1.18);
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.4);
}

.chip__tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--text);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px) scale(0.85);
  transition: opacity 0.2s ease, transform 0.3s var(--ease-spring);
}

.chip:hover .chip__tip,
.chip:focus-visible .chip__tip {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.chip-button {
  position: relative;
  width: fit-content;
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.35s var(--ease-spring), background-color 0.2s ease;
}

.chip-button:hover {
  transform: scale(1.06);
}

.chip-button--muted {
  height: 38px;
  margin-top: 4px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--muted);
  font-size: 13px;
}

.chip-button--muted:hover {
  background: var(--muted-hover);
}

/* Почему мы — бенто-сетка */
.why {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, 112px);
  grid-template-areas:
    'card    account account'
    'card    api     api'
    'term    term    ref'
    'receipt receipt ref';
  gap: 10px;
}

@media (max-width: 760px) {
  .why__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: minmax(130px, auto);
    grid-template-areas: 'card' 'account' 'api' 'term' 'ref' 'receipt';
  }
}

.reason {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.45s var(--ease-spring), box-shadow 0.4s ease;
}

.reason:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px -26px rgba(0, 0, 0, 0.4);
}

.reason--soft {
  background: color-mix(in oklab, var(--accent) 8%, #FFFFFF);
}

.reason--accent {
  background: var(--accent);
  color: #FFFFFF;
}

.reason--dark {
  background: #161616;
  color: #FFFFFF;
}

.reason__image {
  position: absolute;
  right: 28px;
  top: 10px;
  height: var(--size);
  width: auto;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.22));
  pointer-events: none;
  transition: transform 0.6s var(--ease-spring);
}

.reason--tall .reason__image {
  top: auto;
  right: 18px;
  bottom: 16px;
}

.reason:hover .reason__image {
  transform: translateY(-8px) rotate(10deg) scale(1.12);
}

.reason__title {
  position: relative;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.reason__text {
  position: relative;
  max-width: 360px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.reason--soft .reason__text {
  color: var(--text-2);
}

.reason--dark .reason__text {
  color: #C8C8C8;
}

@media (max-width: 760px) {
  .reason__text {
    max-width: calc(100% - 110px);
  }

  .reason--tall .reason__image {
    top: 10px;
    bottom: auto;
    height: min(var(--size), 92px);
  }
}

/* Вопросы */
.faq {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.faq__aside {
  position: relative;
  width: 300px;
  min-height: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-3);
}

.faq__image {
  position: absolute;
  left: 6px;
  bottom: 0;
  height: 110px;
  width: auto;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.2));
  animation: float 4s ease-in-out infinite;
}

.faq__list {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 760px) {
  .faq {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .faq__aside {
    width: auto;
    min-height: 0;
  }

  .faq__image {
    display: none;
  }
}

.faq-item {
  border-radius: 14px;
  background: var(--muted);
  transition: background-color 0.3s ease;
}

.faq-item:hover {
  background: #EFEFEF;
}

.faq-item__question {
  width: 100%;
  min-height: 56px;
  padding: 14px 14px 14px 20px;
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    transform 0.5s var(--ease-spring);
}

.faq-item__question:hover .faq-item__icon {
  transform: scale(1.12);
}

.faq-item.is-open .faq-item__icon {
  background: var(--text);
  color: #FFFFFF;
  transform: rotate(180deg);
}

.faq-item__vertical {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.4s var(--ease-spring);
}

.faq-item.is-open .faq-item__vertical {
  transform: scaleY(0);
}

/* Высота ответа анимируется через grid-template-rows: 0fr → 1fr */
.faq-item__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}

.faq-item__answer > div {
  overflow: hidden;
}

.faq-item__answer p {
  margin: 0;
  padding: 0 64px 18px 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.4s var(--ease-out);
}

.faq-item.is-open .faq-item__answer {
  grid-template-rows: 1fr;
}

.faq-item.is-open .faq-item__answer p {
  opacity: 1;
  transform: none;
  transition-delay: 0.1s;
}

/* Подвал */
.site-footer {
  padding: 40px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.site-footer__columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 0 6px;
  font-size: 13px;
}

.site-footer__column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.site-footer__heading {
  color: var(--text-4);
}

.site-footer__column a {
  color: #333333;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.3s var(--ease-spring);
}

.site-footer__column a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.site-footer__card {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__wordmark {
  position: absolute;
  right: 32px;
  top: calc(50% - 42px);
  height: 84px;
  width: auto;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.18));
  animation: float 4.5s ease-in-out infinite;
}

.site-footer__logo {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-footer__legal {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: #333333;
}

.site-footer__bottom {
  padding: 0 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.site-footer__contacts {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__contacts:hover {
  color: var(--accent);
}

@media (max-width: 600px) {
  .site-footer__columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer__wordmark {
    height: 52px;
    top: 16px;
    right: 16px;
    opacity: 0.5;
  }
}

/* ==========================================================================
   Юридические документы
   ========================================================================== */

.legal-page {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.legal-page .sheet {
  border-radius: 40px;
}

.reading-progress {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 19;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #8AA8FF);
  transform-origin: left;
  transition: transform 0.1s linear;
}

.legal {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.legal-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: var(--muted);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.legal-tabs__tab {
  flex-shrink: 0;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.3s var(--ease-spring);
}

.legal-tabs__tab:hover {
  color: var(--text);
}

.legal-tabs__tab:active {
  transform: scale(0.96);
}

.legal-tabs__tab[aria-current='page'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.legal__layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* Оглавление */
.legal-toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
}

.legal-toc__title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-4);
}

.legal-toc__toggle {
  display: none;
}

.legal-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legal-toc__link {
  position: relative;
  padding: 7px 10px 7px 14px;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.legal-toc__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.35s var(--ease-spring);
}

.legal-toc__link:hover {
  color: var(--text);
  background: var(--muted);
}

.legal-toc__link.is-active {
  color: var(--text);
  font-weight: 500;
}

.legal-toc__link.is-active::before {
  transform: scaleY(1);
}

.legal-toc__num {
  min-width: 16px;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}

.legal-toc__link.is-active .legal-toc__num {
  color: var(--accent);
}

.legal-toc__print {
  margin-top: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  transition: background-color 0.2s ease, transform 0.3s var(--ease-spring);
}

.legal-toc__print:hover {
  background: var(--muted-hover);
}

.legal-toc__print:active {
  transform: scale(0.97);
}

/* Текст документа */
.legal-doc {
  min-width: 0;
  max-width: 680px;
}

.legal-doc__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.legal-doc__kicker {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.legal-doc__title {
  margin: 0;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.legal-doc__meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}

.legal-doc__intro {
  padding: 24px 0 8px;
}

.legal-doc__intro p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
}

.legal-doc a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.legal-section {
  padding-top: 32px;
}

.legal-section__title {
  margin: 0 0 16px;
  display: flex;
  gap: 10px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 500;
}

.legal-section__num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.legal-clause {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.65;
  color: #2A2A2A;
}

.legal-clause__num {
  font-size: 13px;
  line-height: 1.9; /* совпадает с первой строкой текста пункта */
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}

.legal-clause__body p {
  margin: 0;
}

.legal-clause__list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-clause__list li {
  position: relative;
  padding-left: 20px;
}

.legal-clause__list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--accent) 45%, #FFFFFF);
}

.legal-clause strong {
  font-weight: 600;
  color: var(--text);
}

.legal-doc__company {
  margin-top: 48px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-2);
}

.legal-doc__company-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

@media (max-width: 900px) {
  .legal__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .legal-toc {
    position: static;
    max-height: none;
    padding: 4px;
    border-radius: 14px;
    background: var(--muted);
    gap: 0;
  }

  .legal-toc__title {
    display: none;
  }

  .legal-toc__toggle {
    height: 44px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
  }

  .legal-toc__toggle svg {
    transition: transform 0.4s var(--ease-spring);
  }

  .legal-toc.is-open .legal-toc__toggle svg {
    transform: rotate(180deg);
  }

  .legal-toc__list,
  .legal-toc__print {
    display: none;
  }

  .legal-toc.is-open .legal-toc__list {
    display: flex;
    padding: 0 4px 8px;
    animation: rise 0.35s var(--ease-out);
  }

  .legal-toc__link:hover {
    background: var(--surface);
  }

  .legal-clause {
    grid-template-columns: 36px minmax(0, 1fr);
    font-size: 14px;
  }
}

/* Печать: только текст документа */
@media print {
  .site-header,
  .reading-progress,
  .legal-tabs,
  .legal-toc,
  .site-footer {
    display: none !important;
  }

  body,
  .sheet {
    background: #FFFFFF;
  }

  .sheet {
    padding: 0;
  }

  .legal__layout {
    display: block;
  }

  .legal-doc {
    max-width: none;
  }

  .reveal,
  .rise {
    opacity: 1 !important;
    animation: none !important;
  }
}

/* Появление при прокрутке (v-reveal). Анимация, а не transition — чтобы не мешать hover-эффектам */
.reveal {
  opacity: 0;
}

.reveal.is-revealed {
  opacity: 1;
  animation: reveal-in 0.9s var(--ease-out) var(--reveal-delay, 0ms) backwards;
}

/* ==========================================================================
   Переходы Vue
   ========================================================================== */

.logo-swap-enter-active,
.logo-swap-leave-active {
  transition: opacity 0.2s ease, transform 0.35s var(--ease-spring);
}

.logo-swap-enter-from,
.logo-swap-leave-to {
  opacity: 0;
  transform: scale(0.3) rotate(-90deg);
}

.screen-enter-active {
  transition: opacity 0.45s ease, transform 0.6s var(--ease-out), filter 0.45s ease;
}

.screen-leave-active {
  transition: opacity 0.3s ease, transform 0.35s ease-in, filter 0.3s ease;
}

.screen-enter-from {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  filter: blur(12px);
}

.screen-leave-to {
  opacity: 0;
  transform: translateY(-16px) scale(0.97);
  filter: blur(10px);
}

.swap-enter-active,
.swap-leave-active {
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}

.swap-enter-from {
  opacity: 0;
  transform: translateY(8px);
}

.swap-leave-to {
  opacity: 0;
  transform: translateY(-8px);
}

/* Появление «лесенкой»: style="--i: N" задаёт порядок */
.rise {
  animation: rise 0.7s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 70ms + 80ms);
}

.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ==========================================================================
   Ключевые кадры
   ========================================================================== */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(6px);
  }
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(0.94); }
  70% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-6px) rotate(-4deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes logo-in {
  from {
    opacity: 0;
    transform: scale(0.3) rotate(-120deg);
  }
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(36px) scale(0.97);
    filter: blur(8px);
  }
  to {
    opacity: 1;
  }
}

@keyframes word-up {
  from {
    opacity: 0;
    transform: translateY(110%) rotate(8deg);
  }
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(80px) rotate(-30deg) scale(0.5);
  }
}

@keyframes float-big {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-20px) rotate(4deg); }
}

@keyframes shine {
  0% { transform: translateX(-120%); }
  40%, 100% { transform: translateX(120%); }
}

@keyframes pay-glow {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 10px 30px -8px var(--accent-glow); }
}

@keyframes ripple {
  to {
    transform: scale(18);
    opacity: 0;
  }
}

@keyframes arrow-launch {
  to {
    transform: translateX(40px);
    opacity: 0;
  }
}

@keyframes panel-highlight {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); }
  30% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 30%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}

@keyframes orb-in {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-90deg);
  }
}

@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(104px) scale(1); opacity: 1; }
  50% { transform: rotate(180deg) translateX(104px) scale(0.4); opacity: 0.4; }
  to { transform: rotate(360deg) translateX(104px) scale(1); opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 0.15; }
  40% { opacity: 1; }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

@keyframes flash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes crash-in {
  0% {
    opacity: 0;
    transform: translateY(-180px) rotate(-45deg) scale(0.4);
  }
  60% {
    opacity: 1;
    transform: translateY(12px) rotate(8deg) scale(1.1);
  }
  100% {
    transform: none;
  }
}

@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-14deg); }
  40% { transform: rotate(11deg); }
  60% { transform: rotate(-7deg); }
  80% { transform: rotate(4deg); }
}

@keyframes shockwave {
  0% {
    opacity: 0.9;
    transform: scale(0.4);
  }
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, currentColor 50%, transparent); }
  100% { box-shadow: 0 0 0 6px transparent; }
}

@keyframes glitch-a {
  0% { opacity: 1; transform: translate(-4px, 1px); clip-path: inset(8% 0 62% 0); }
  20% { transform: translate(4px, -1px); clip-path: inset(55% 0 12% 0); }
  40% { transform: translate(-3px, 2px); clip-path: inset(30% 0 40% 0); }
  60% { transform: translate(5px, 0); clip-path: inset(70% 0 5% 0); }
  80% { transform: translate(-2px, -2px); clip-path: inset(15% 0 55% 0); }
  100% { opacity: 0; }
}

@keyframes glitch-b {
  0% { opacity: 1; transform: translate(4px, -1px); clip-path: inset(60% 0 10% 0); }
  20% { transform: translate(-4px, 1px); clip-path: inset(10% 0 65% 0); }
  40% { transform: translate(3px, -2px); clip-path: inset(45% 0 25% 0); }
  60% { transform: translate(-5px, 0); clip-path: inset(5% 0 75% 0); }
  80% { transform: translate(2px, 2px); clip-path: inset(50% 0 20% 0); }
  100% { opacity: 0; }
}

/* ==========================================================================
   Кто отключил анимации в системе — тому без них
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  .summary {
    transform: none;
  }
}
