/* ====== «Налоговый аудит НДС» — лендинг по референсу + чат-квиз ====== */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --blue: #2757F0;
  --blue-deep: #1D46CE;
  --blue-soft: #EAF0FE;
  --blue-line: #C9D7F8;
  --red: #D93A2B;
  --ink: #0F1B33;
  --ink-2: #22304D;
  --muted: #6B7690;
  --bg: #EEF1F6;
  --card: #ffffff;
  --shadow-card: 0 6px 24px rgba(15, 27, 51, 0.07), 0 1px 3px rgba(15, 27, 51, 0.05);
  --shadow-float: 0 16px 44px rgba(15, 27, 51, 0.10), 0 2px 6px rgba(15, 27, 51, 0.05);
  --shadow-btn: 0 12px 26px rgba(39, 87, 240, 0.32);
  --grad-btn: linear-gradient(180deg, #3E6DF8 0%, #2554EC 100%);
  --grad-icon: linear-gradient(135deg, #4E7DFB 0%, #7C5CF6 100%);
  --grad-header: linear-gradient(135deg, #2E66F5 0%, #1D46CE 100%);
}

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

body {
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
}

.blue { color: var(--blue); }

/* ==================================================================
   ЛЕНДИНГ
   ================================================================== */
.landing { min-height: 100dvh; display: flex; flex-direction: column; }

.l-body {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  flex: 1 0 auto;
}

.l-col { position: relative; z-index: 1; padding: 0 20px; }

/* ---- Фото здания ФНС (сбоку справа, как на референсе) ---- */
.hero-photo {
  position: absolute;
  z-index: 0;
  top: 46px;
  right: -6%;
  width: 74%;
  max-width: 430px;
  height: min(600px, 70vh);
  pointer-events: none;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 62%;
  display: block;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--bg) 26%, rgba(238, 241, 246, 0.72) 54%, rgba(238, 241, 246, 0) 80%),
    linear-gradient(to bottom, var(--bg) 4%, rgba(238, 241, 246, 0.35) 22%, rgba(238, 241, 246, 0) 40%, rgba(238, 241, 246, 0) 62%, var(--bg) 97%),
    linear-gradient(to left, var(--bg) 0%, rgba(238, 241, 246, 0) 14%);
}

/* ---- Шапка ---- */
.site-header {
  padding: 30px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.logo-mark { width: 58px; height: 58px; display: block; filter: drop-shadow(0 4px 10px rgba(39, 87, 240, 0.16)); }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.01em;
}

/* ---- 74% ---- */
.hero-stat { padding-top: 26px; }
.stat-number {
  font-size: clamp(88px, 26vw, 118px);
  font-weight: 800;
  line-height: 0.94;
  color: var(--blue);
  letter-spacing: -0.035em;
}
.stat-caption {
  margin: 10px 0 0;
  font-size: 21.5px;
  line-height: 1.28;
  font-weight: 700;
  color: var(--ink);
  max-width: 8.5em;
}

/* ---- Карточка-оффер ---- */
.offer-card {
  margin-top: 24px;
  background: var(--card);
  border-radius: 22px;
  padding: 22px 20px;
  max-width: min(330px, 78%);
  box-shadow: var(--shadow-card);
}
.offer-card p {
  margin: 0;
  font-size: 20px;
  line-height: 1.34;
  font-weight: 700;
  color: var(--ink);
}

/* ---- Чек-лист ---- */
.check-list {
  margin: 28px 0 0;
  padding: 0 2px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 17px;
  max-width: 75%;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.35;
}
.check-ic { width: 27px; height: 27px; flex: 0 0 auto; display: block; }
.check-ic svg { width: 100%; height: 100%; display: block; }

/* ---- CTA-карточка ---- */
.cta-card {
  margin-top: 32px;
  background: var(--card);
  border-radius: 24px;
  padding: 22px 20px 20px;
  box-shadow: var(--shadow-float);
}
.cta-head { display: flex; align-items: flex-start; gap: 14px; }
.cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  background: var(--grad-icon);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(96, 106, 248, 0.35);
}
.cta-icon svg { width: 28px; height: 28px; }
.cta-title {
  margin: 2px 0 0;
  font-size: 18.5px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink);
}
.cta-sub {
  margin: 12px 0 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
}
.cta-btn {
  margin-top: 16px;
  width: 100%;
  border: none;
  border-radius: 15px;
  padding: 17px 20px;
  background: var(--grad-btn);
  color: #fff;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.12s, box-shadow 0.2s, filter 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.cta-btn svg { width: 19px; height: 19px; flex: 0 0 auto; transition: transform 0.2s; }
.cta-btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 16px 32px rgba(39, 87, 240, 0.38); }
.cta-btn:hover svg { transform: translateX(3px); }
.cta-btn:active { transform: scale(0.98); }
.cta-btn:focus-visible { outline: 3px solid rgba(39, 87, 240, 0.4); outline-offset: 2px; }

/* ---- Трастовые пункты ---- */
.trust-list {
  margin: 28px 0 0;
  padding: 0 4px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 19px;
}
.trust-list li {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.4;
}
.trust-ic { width: 42px; height: 42px; flex: 0 0 auto; display: block; }
.trust-ic svg { width: 100%; height: 100%; display: block; }

/* ---- Футер лендинга ---- */
.landing .legal-links {
  flex-shrink: 0;
  text-align: center;
  padding: 34px 20px max(22px, env(safe-area-inset-bottom));
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2px;
  line-height: 1.55;
}
.landing .legal-company { color: #3A4763; font-weight: 600; font-size: 11.5px; }
.landing .legal-docs { margin-top: 4px; }
.landing .legal-links a { color: var(--muted); text-decoration: none; }
.landing .legal-links a:hover { color: var(--blue); text-decoration: underline; }
.landing .legal-links .sep { color: #B9C2D4; margin: 0 4px; }

/* ---- Появление ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: riseIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .reveal:nth-child(2) { animation-delay: 0.06s; }
  .reveal:nth-child(3) { animation-delay: 0.12s; }
  .reveal:nth-child(4) { animation-delay: 0.18s; }
  .reveal:nth-child(5) { animation-delay: 0.24s; }
  .reveal:nth-child(6) { animation-delay: 0.30s; }
  .hero-photo { animation: photoIn 0.8s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes photoIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

/* ==================================================================
   ДЕСКТОП
   ================================================================== */
@media (min-width: 980px) {
  .l-body {
    max-width: 1200px;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: clamp(40px, 5vw, 72px);
    padding: 0 clamp(24px, 4vw, 48px);
    align-items: start;
  }
  .l-col { padding: 0 0 56px; max-width: 520px; }

  .site-header {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 38px 0 10px;
  }
  .logo-mark { width: 52px; height: 52px; }
  .logo-title { font-size: 21px; }

  .hero-stat { padding-top: 26px; }
  .stat-number { font-size: clamp(104px, 9.5vw, 132px); }
  .stat-caption { font-size: 24px; margin-top: 10px; }

  .offer-card { max-width: 420px; padding: 24px 26px; border-radius: 24px; margin-top: 20px; }
  .offer-card p { font-size: 21px; }

  .check-list { max-width: 460px; margin-top: 24px; gap: 14px; }
  .check-list li { font-size: 16px; }
  .check-list li br { display: none; }

  .cta-card { margin-top: 26px; padding: 24px 26px 22px; }
  .cta-title { font-size: 20px; }
  .cta-sub { font-size: 15px; }
  .cta-btn { font-size: 17px; padding: 18px 22px; }

  .trust-list { margin-top: 34px; gap: 20px; }
  .trust-list li { font-size: 15px; }
  .trust-list li br { display: none; }

  /* фото — фиксированная рамка справа */
  .hero-photo {
    position: sticky;
    top: 24px;
    right: auto;
    width: 100%;
    max-width: none;
    height: calc(100vh - 48px);
    min-height: 560px;
    max-height: 860px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-float);
  }
  .hero-photo img { object-position: 58% 46%; }
  .hero-photo::before {
    background:
      linear-gradient(to bottom, rgba(15, 27, 51, 0) 74%, rgba(15, 27, 51, 0.18) 100%),
      linear-gradient(to right, rgba(238, 241, 246, 0.06) 0%, rgba(238, 241, 246, 0) 18%);
  }
  .hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    pointer-events: none;
  }

  .landing .legal-links { font-size: 12px; padding-bottom: 26px; }
}

/* Планшет: раскладка как на мобильной/референсе, только крупнее */
@media (min-width: 561px) and (max-width: 979px) {
  .l-body { max-width: 640px; }
  .hero-photo {
    top: 128px;
    right: 0;
    width: 60%;
    max-width: 420px;
    height: min(528px, 58vh);
    border-radius: 20px 0 0 20px;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(15, 27, 51, 0.16);
  }
  .hero-photo img { object-position: 50% 26%; }
  .hero-photo::before {
    background:
      linear-gradient(to right, var(--bg) 4%, rgba(238, 241, 246, 0.5) 26%, rgba(238, 241, 246, 0) 56%),
      linear-gradient(to bottom, rgba(238, 241, 246, 0) 82%, rgba(238, 241, 246, 0.4) 100%);
  }
  .offer-card { max-width: min(320px, 54%); }
  .check-list { max-width: 320px; }
}

/* Мобильный: фото — крупная карточка во всю правую часть (как на референсе);
   вывеска «Федеральная налоговая служба» вверху над оффером, оффер и чек-лист сужены слева */
@media (max-width: 560px) {
  /* Мобайл (как на референсе): фото сбоку справа, вход виден; ЛЕВЫЙ край фото
     осветлён до фона — «74%», подпись и чек-лист читаются на чистом фоне;
     белая оффер-карточка (непрозрачная) налегает на фото слева */
  .hero-photo {
    top: 148px;
    right: 0;
    width: 52%;
    max-width: 300px;
    height: min(452px, 55vh);
    overflow: hidden;
    border-radius: 18px 0 0 18px;
  }
  .hero-photo img { object-position: 50% 27%; }
  .hero-photo::before {
    background:
      linear-gradient(to right, var(--bg) 0%, var(--bg) 25%, rgba(238, 241, 246, 0) 50%),
      linear-gradient(to bottom, rgba(238, 241, 246, 0) 88%, var(--bg) 100%);
  }
  .stat-caption { max-width: 8em; font-size: 19.5px; }
  .offer-card { max-width: min(262px, 72%); padding: 20px 22px; }
  .offer-card p { font-size: 19px; line-height: 1.34; }
  .check-list { max-width: 205px; }
}

/* ==================================================================
   КВИЗ-ОВЕРЛЕЙ
   ================================================================== */
.quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 23, 48, 0.52);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.quiz-overlay.open { opacity: 1; }
.quiz-overlay[hidden] { display: none; }

body.quiz-open { overflow: hidden; }

/* ---- Карточка квиза ---- */
.quiz-wrapper {
  width: 480px;
  max-width: 100%;
  height: 640px;
  max-height: calc(100dvh - 40px);
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(10, 18, 40, 0.35);
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.quiz-overlay.open .quiz-wrapper { transform: none; }

/* ---- Шапка квиза ---- */
.quiz-header {
  background: var(--grad-header);
  padding: 16px 18px 14px;
  color: #fff;
  flex-shrink: 0;
}
.header-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  position: relative;
}
.avatar-icon { display: flex; line-height: 1; }
.online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background: #4ade80;
  border-radius: 50%;
  border: 2px solid #2E63F3;
  animation: pulse-dot 2s ease infinite;
}
.avatar.lottie-online .online-dot { display: none; }
.lottie-online-holder {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0); }
}
.header-info { min-width: 0; }
.header-name { font-size: 16px; font-weight: 700; }
.header-status { font-size: 13px; opacity: 0.9; }

.quiz-close {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.quiz-close:hover { background: rgba(255, 255, 255, 0.28); }
.quiz-close:active { transform: scale(0.92); }

.progress-bar {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
}
.progress-fill {
  background: #fff;
  height: 100%;
  border-radius: 99px;
  width: 20%;
  transition: width 0.4s;
}
.progress-label { font-size: 11px; opacity: 0.65; margin-top: 6px; }

/* ---- Чат ---- */
.chat-area {
  flex: 1 1 0%;
  min-height: 56px;
  overflow-y: auto;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  background-color: #F5F8FE;
}

.bot-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  align-self: flex-start;
  max-width: 88%;
  animation: fadeUp 0.3s ease both;
}
.mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.mini-avatar svg { width: 15px; height: 15px; }

.bubble {
  max-width: 82%;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  animation: fadeUp 0.3s ease both;
  word-break: break-word;
}
.bubble.bot {
  background: #fff;
  color: var(--ink);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(15, 27, 51, 0.05);
}
.bot-row .bubble.bot { align-self: unset; max-width: 100%; animation: none; }
.bubble.user {
  background: var(--grad-btn);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  font-weight: 500;
}

/* индикатор «печатает» */
.bubble.typing { background: #fff; align-self: flex-start; padding: 10px 14px; }
.bot-row.typing-row .bubble.typing { align-self: unset; animation: none; }
.lottie-typing { width: 46px; height: 20px; }
.dots { display: flex; gap: 5px; align-items: center; }
.dots span {
  width: 7px; height: 7px;
  background: #96AEF0;
  border-radius: 50%;
  animation: blink 1.2s ease infinite;
}
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---- Зона вариантов ---- */
.input-zone { flex-shrink: 0; background: #fff; }
/* экран благодарности/тупика занимает всё место, футер прижат к низу */
.input-zone.grow { flex: 1 1 0%; min-height: 0; display: flex; flex-direction: column; }
.input-zone.panel {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.input-zone.panel .choices-area {
  flex: 1 1 auto;
  min-height: 0;
}
.choices-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}
.choices-area {
  padding: 10px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.choice-btn {
  background: #fff;
  border: 1.5px solid var(--blue-line);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.choice-btn:hover { background: var(--blue-soft); border-color: var(--blue); }
@media (hover: hover) { .choice-btn:hover { transform: translateX(2px); } }
.choice-btn:active { transform: scale(0.97); background: var(--blue-soft); border-color: var(--blue); }
.choice-badge {
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.choices-hint {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  padding: 0 2px 2px;
}

/* множественный выбор */
.choice-btn.multi { padding-right: 12px; }
.choice-btn .check-box {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 1.5px solid var(--blue-line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.choice-btn .check-box svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.choice-btn.multi.selected {
  background: var(--blue-soft);
  border-color: var(--blue);
}
.choice-btn.multi.selected .check-box {
  background: var(--blue);
  border-color: var(--blue);
}
.choice-btn.multi.selected .check-box svg { opacity: 1; transform: scale(1); }
.choice-btn.multi:active { transform: scale(0.985); }
.submit-btn.multi-cta { margin-top: 4px; }

/* текстовое поле */
.text-row {
  display: flex;
  border: 1.5px solid var(--blue-line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
  width: 100%;
}
.text-row:focus-within { border-color: var(--blue); }
.text-input {
  flex: 1 1 0%;
  border: none;
  outline: none;
  padding: 13px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}
.text-input::placeholder { color: #94a3b8; font-weight: 400; }
@media (max-width: 520px) { .text-input { font-size: 16px; } }

/* ---- Телефон ---- */
.phone-area {
  padding: 10px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
}
.phone-row {
  display: flex;
  border: 1.5px solid var(--blue-line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
  width: 100%;
}
.phone-row:focus-within { border-color: var(--blue); }
.phone-prefix {
  background: #F3F6FE;
  border-right: 1.5px solid var(--blue-line);
  padding: 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.phone-input {
  flex: 1 1 0%;
  border: none;
  outline: none;
  padding: 13px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}
.phone-input::placeholder { color: #94a3b8; font-weight: 400; }

.consent-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.consent-check { width: 19px; height: 19px; flex-shrink: 0; margin-top: 1px; cursor: pointer; accent-color: var(--blue); }
.consent-label { font-size: 12.5px; color: #64748b; line-height: 1.5; }
.consent-label a { color: var(--blue); text-decoration: none; font-weight: 500; }
.consent-label a:hover { text-decoration: underline; }

.submit-btn {
  background: var(--grad-btn);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px 20px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: filter 0.15s, transform 0.1s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.submit-btn:hover { filter: brightness(1.06); }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }

/* ---- Экран благодарности / тупик ---- */
.thank-you {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 24px;
  text-align: center;
  animation: fadeUp 0.4s ease both;
}
.ty-icon { width: 96px; height: 96px; }
.ty-title { font-size: 20px; font-weight: 700; color: var(--ink); }
.ty-text { font-size: 14px; color: #64748b; line-height: 1.55; max-width: 320px; }
.ty-restart {
  margin-top: 6px;
  background: transparent;
  border: 1.5px solid var(--blue-line);
  color: var(--blue);
  border-radius: 12px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ty-restart:hover { background: var(--blue-soft); border-color: var(--blue); }
.thank-you.dead-end .ty-icon { color: #ef4444; }

/* ---- Футер квиза ---- */
.quiz-legal {
  flex-shrink: 0;
  text-align: center;
  padding: 9px 14px 12px;
  background: #fff;
  font-size: 10px;
  color: #64748b;
  border-top: 1px solid #EDF1F8;
  letter-spacing: 0.2px;
  line-height: 1.5;
}
.quiz-legal a { text-decoration: none; color: #94a3b8; white-space: nowrap; }
.quiz-legal a:hover { color: var(--blue); text-decoration: underline; }
.quiz-legal .sep { color: #cbd5e0; margin: 0 3px; }
.quiz-legal .legal-company { color: #334155; font-weight: 500; }
.quiz-legal .legal-docs { margin-top: 4px; }

/* ---- Мобильный квиз: во весь экран ---- */
@media (max-width: 640px) {
  .quiz-overlay { padding: 0; align-items: flex-start; }
  .quiz-wrapper {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
  .quiz-header { padding: max(14px, env(safe-area-inset-top)) 12px 12px; }
  .chat-area { padding: 14px 12px 8px; gap: 9px; }
  .bubble { font-size: 13.5px; padding: 10px 13px; max-width: 88%; }
  .choices-area { padding: 8px 12px max(16px, env(safe-area-inset-bottom)); gap: 7px; }
  .choice-btn { padding: 14px 16px; }
  .phone-area { padding: 8px 12px max(16px, env(safe-area-inset-bottom)); }
  .phone-input { font-size: 16px; }
  .consent-check { width: 20px; height: 20px; }
  .submit-btn { padding: 16px 20px; }
  .quiz-legal { padding: 8px 12px 10px; font-size: 9.5px; }

  body.cookie-open.quiz-open .quiz-wrapper { height: calc(100dvh - var(--cookie-h, 0px)); }
}

/* ==================================================================
   COOKIE
   ================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  right: 16px;
  max-width: 340px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  z-index: 80;
}
.cookie-banner.hidden { display: none; }
.cookie-text { font-size: 13px; color: #334155; line-height: 1.5; }
.cookie-text a { color: #94a3b8; text-decoration: none; }
.cookie-accept {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.cookie-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}
@media (max-width: 520px) {
  .cookie-banner {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    border-radius: 16px 16px 0 0;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.1);
  }
  .cookie-text { flex: 1 1 180px; font-size: 12.5px; }
  .cookie-accept { flex: 0 0 auto; padding: 11px 22px; }
  .cookie-close { top: 8px; right: 10px; }
}
