/* =========================================================
   Токены
   ========================================================= */
:root {
  --bg: #eef0f3;
  --bg-light: #f8f9fb;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --line: #e1e4ea;
  --line-strong: #c9ced8;

  --ink: #14161b;          /* основной текст и кнопка */
  --ink-2: #3d424e;        /* вторичный текст */
  --muted: #646a78;        /* подписи: 5.2:1 на белом */
  --accent: #2b55e6;       /* фокус, ссылки, выделения */
  --accent-soft: #e8edfd;
  --success: #157f3c;
  --success-soft: #e3f4e9;
  --danger: #c0262d;
  --danger-soft: #fdecec;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgb(20 22 27 / .06);
  --shadow: 0 1px 2px rgb(20 22 27 / .04), 0 8px 24px rgb(20 22 27 / .06);
  --shadow-lg: 0 2px 6px rgb(20 22 27 / .06), 0 24px 60px rgb(20 22 27 / .16);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --icon-size: clamp(64px, 7.5vw, 116px);
  --topbar-h: 64px;
}

/* =========================================================
   База
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, var(--bg-light) 0%, transparent 70%),
    var(--bg);
}

img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

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

.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
}
.skip:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 760px; }

.link { color: var(--accent); text-underline-offset: 2px; }

/* =========================================================
   Кнопки
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 17px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #2a2e37; }

.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }

.btn--link { background: none; color: var(--ink-2); padding: 0 12px; }
.btn--link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   Шапка
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: rgb(238 240 243 / .78);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }

.topbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 17px;
}

.topbar__nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.topbar__nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background-color .2s, color .2s;
}
.topbar__nav a:hover { background: rgb(20 22 27 / .05); color: var(--ink); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: calc(100svh - var(--topbar-h));
  display: grid;
  place-items: center;
  padding: 48px 24px 64px;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  text-align: center;
  pointer-events: none; /* клики проходят к иконкам; кнопки включают обратно */
}
.hero__content a,
.hero__content button { pointer-events: auto; }

.hero__title {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 700;
  line-height: 0.95;
  text-wrap: balance;
}

.hero__lead {
  max-width: 520px;
  margin: 18px auto 0;
  color: var(--ink-2);
  font-size: clamp(16px, 1.4vw, 19px);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
}
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts .ico { width: 18px; height: 18px; }

/* ---------- Парящие иконки ---------- */
.float-scene {
  position: absolute;
  inset: 4vh max(16px, 4vw) 6vh;
}

.float {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--icon-size) * var(--s));
  padding: 0;
  border: 0;
  background: none;
  border-radius: 24%;
  /* центр по точке + параллакс от курсора (--px/--py) и скролла (--sy) — значения ставит js/float.js */
  transform:
    translate(-50%, -50%)
    translate(
      calc(var(--px, 0) * var(--depth) * 1px),
      calc((var(--py, 0) + var(--sy, 0)) * var(--depth) * 1px)
    );
  transition: transform .8s var(--ease);
}
.float img {
  display: block;
  width: 100%;
  height: auto;
  animation: bob 6s ease-in-out infinite;
  animation-delay: var(--d);
  transition: scale .25s var(--ease);
}
.float:hover img,
.float:focus-visible img { scale: 1.08; }
.float.is-selected img { scale: 1.1; }

.float::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: -22%;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(20 24 40 / .22), transparent);
  animation: shadow 6s ease-in-out infinite;
  animation-delay: var(--d);
  pointer-events: none;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-14%) rotate(2deg); }
}
@keyframes bob-sm {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-9%) rotate(1.5deg); }
}
@keyframes shadow {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(.75); opacity: .55; }
}

/* =========================================================
   Секции
   ========================================================= */
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }

.section__head {
  max-width: 620px;
  margin: 0 auto 36px;
  text-align: center;
}
.section__title {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
}
.section__lead {
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ---------- Выбор банка ---------- */
.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.bank {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 14px 18px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.bank:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.bank[aria-checked="true"] {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgb(20 22 27 / .08), var(--shadow);
}
.bank__logo { width: 72px; height: 72px; object-fit: contain; }
.bank__other-ico {
  display: grid; place-items: center;
  width: 72px; height: 72px; border-radius: 18px;
  background: var(--bg); color: var(--ink-2);
  font-size: 36px; font-weight: 300; line-height: 1;
}
.bank[aria-checked="true"] .bank__other-ico { background: var(--accent); color: #fff; }
.bank-custom-input { margin-top: 8px; }
.bank__name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.bank__tick {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.bank__tick .ico { width: 14px; height: 14px; stroke-width: 3; }
.bank[aria-checked="true"] .bank__tick { opacity: 1; transform: none; }

/* ---------- Шаги ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  top: 22px;
  right: 24px;
  color: var(--line-strong);
  font-size: 28px;
  font-weight: 700;
}
.step__ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.step__title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.step__text { color: var(--muted); font-size: 15px; }

/* =========================================================
   Форма
   ========================================================= */
.form-card { padding: 40px; }
.form-card__head { margin-bottom: 28px; }
.req { color: var(--danger); }

.field {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field__label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.field__hint { margin-top: 6px; color: var(--muted); font-size: 14px; }
.field__error {
  margin-top: 6px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
}
.field__error:empty { display: none; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

input[type="text"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 16px; /* 16px — iOS не зумит при фокусе */
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
input::placeholder, textarea::placeholder { color: #8b909c; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgb(43 85 230 / .14);
}
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.is-invalid input,
.is-invalid select,
input.is-invalid { border-color: var(--danger); background: var(--danger-soft); }
.is-invalid .segmented { box-shadow: 0 0 0 1.5px var(--danger); }

/* select с превью логотипа */
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}
.select-wrap.has-logo select { padding-left: 56px; }
.select-wrap__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 32px;
  height: 32px;
  translate: 0 -50%;
  background: center / contain no-repeat;
  pointer-events: none;
}
.select-wrap__chev {
  position: absolute;
  right: 14px;
  top: 50%;
  translate: 0 -50%;
  color: var(--muted);
  pointer-events: none;
}

/* поле с суффиксом */
.input-suffix-wrap { position: relative; }
.input-suffix-wrap input { padding-right: 40px; }
.input-suffix {
  position: absolute; right: 14px; top: 50%; translate: 0 -50%;
  color: var(--muted); font-size: 16px; font-weight: 500; pointer-events: none;
}

/* сегменты-радио */
.segmented {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
}
.segmented label { position: relative; display: flex; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  line-height: 1.25;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.segmented label:hover span { color: var(--ink); }
.segmented input:checked + span {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
}
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -1px; }

/* отправка */
#submit-btn { position: relative; margin-top: 8px; }
.spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 2.5px solid rgb(255 255 255 / .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.is-loading .btn__label { opacity: .7; }
.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-note {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.form-note .ico { width: 16px; height: 16px; margin-top: 2px; }

/* успех */
.form-card.is-done .form-card__head .section__lead { display: none; }
.success { padding: 24px 0 8px; text-align: center; outline: none; }
.success__ico {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  animation: pop .4s var(--ease);
}
.success__ico .ico { width: 30px; height: 30px; stroke-width: 2.5; }
.success__title { font-size: 26px; font-weight: 700; }
.success__text { max-width: 420px; margin: 10px auto 0; color: var(--ink-2); }
.success__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* =========================================================
   FAQ
   ========================================================= */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { color: var(--muted); transition: transform .25s var(--ease); }
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq details p { padding: 0 20px 18px; color: var(--ink-2); }

.faq__more {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 28px;
  color: var(--muted);
}

/* =========================================================
   Подвал
   ========================================================= */
.footer {
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.footer__inner { display: grid; gap: 14px; }
.footer__copy { color: var(--muted); font-size: 13px; }

/* =========================================================
   Чат
   ========================================================= */
.chat-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 50;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #1a3abf 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(43, 85, 230, .35), 0 2px 6px rgba(0,0,0,.12);
  transition: transform .25s var(--ease), opacity .2s var(--ease), box-shadow .25s var(--ease);
  cursor: pointer;
}
.chat-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 6px 28px rgba(43, 85, 230, .45), 0 3px 8px rgba(0,0,0,.15); }
.chat-fab .ico { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.chat-fab__dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 2.5px solid #2b55e6;
  opacity: 0;
  transform: scale(0);
  transition: opacity .2s, transform .2s;
}
.chat-fab.has-unread .chat-fab__dot {
  opacity: 1;
  transform: scale(1);
  animation: dot-pulse 2s infinite;
}
@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: .7; }
}
.chat-fab[aria-expanded="true"] { opacity: 0; pointer-events: none; transform: scale(.8); }

.chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 380px;
  height: min(600px, calc(100svh - 40px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform-origin: bottom right;
  animation: chat-in .25s var(--ease);
}
.chat[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }

.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 18px;
  border-bottom: 1px solid var(--line);
}
.chat__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.chat__who { flex: 1; min-width: 0; }
.chat__title { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.chat__status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.chat__online { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.chat__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink-2);
}
.chat__close:hover { background: var(--surface-2); }

.chat__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface-2);
}

.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: msg-in .2s var(--ease);
}
.msg--bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg--user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg__time { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; opacity: .6; }
.msg__status { font-size: 12px; letter-spacing: -2px; }
.msg__status--sent { color: inherit; }
.msg__status--read { color: var(--accent); }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }

.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.chat__quick {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface);
}
.chat__quick::-webkit-scrollbar { display: none; }
.chat__quick:empty { display: none; }
.chip {
  flex: none;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  transition: border-color .2s, background-color .2s;
}
.chip:hover { border-color: var(--line-strong); background: var(--surface-2); }

.chat__form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--surface);
}
.chat__form textarea {
  min-height: 46px;
  max-height: 140px;
  padding: 11px 14px;
  resize: none;
  line-height: 1.4;
}
.chat__send {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  transition: opacity .2s;
}
.chat__send:disabled { opacity: .35; cursor: default; }

/* =========================================================
   Тост
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  z-index: 70;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  box-shadow: var(--shadow-lg);
  translate: -50% 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), translate .2s var(--ease);
}
.toast.is-shown { opacity: 1; translate: -50% 0; }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 900px) {
  .topbar__nav { display: none; }
  .topbar__inner { justify-content: space-between; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root {
    --icon-size: clamp(56px, 17vw, 78px);
    --topbar-h: 56px;
  }

  .container { padding: 0 16px; }
  .logo { font-size: 17px; }

  /* hero: облако иконок сверху, текст и кнопки снизу */
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: 0 16px 28px;
  }
  .float-scene {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    min-height: 260px;
    max-height: 440px;
    margin: 8px 0;
  }
  .float {
    left: var(--mx);
    top: var(--my);
    width: calc(var(--icon-size) * var(--ms));
    transition-duration: .3s;
  }
  .float img { animation-name: bob-sm; animation-duration: 5s; }
  .float::after { animation-duration: 5s; }

  .hero__content { max-width: none; }
  .hero__title { font-size: clamp(28px, 8.4vw, 36px); line-height: 0.95; }
  .hero__lead { margin-top: 12px; font-size: 16px; }
  .hero__actions { flex-direction: column; margin-top: 22px; gap: 10px; }
  .hero__actions .btn { width: 100%; }
  .hero__facts { margin-top: 18px; font-size: 14px; }

  .section { padding: 56px 0; }
  .section--tight { padding: 40px 0; }
  .section__head { margin-bottom: 24px; }
  .section__lead { font-size: 16px; }

  .bank-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .bank { padding: 18px 10px 14px; gap: 10px; }
  .bank__logo { width: 60px; height: 60px; }

  .form-card { padding: 24px 18px; border-radius: 20px; }
  .grid-2 { grid-template-columns: 1fr; }

  /* 4 способа связи — сеткой 2×2, долги — столбиком */
  .segmented { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .segmented--wrap { grid-template-columns: 1fr; }

  /* чат — на весь экран */
  .chat {
    inset: 0;
    width: auto;
    height: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
  }
  .chat-fab { width: 58px; height: 58px; right: 16px; }
  .chat-fab.is-tucked { opacity: 0; transform: translateY(16px) scale(.8); }
}

/* очень низкие экраны (iPhone SE в браузере) */
@media (max-width: 640px) and (max-height: 700px) {
  :root { --icon-size: clamp(48px, 14vw, 60px); }
  .float-scene { min-height: 190px; }
  .hero__facts { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Ловушка для ботов: людям не видна */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
