:root {
  --accent: #f24634;
  --accent-soft: rgba(242, 70, 52, 0.12);
  --accent-mid: rgba(242, 70, 52, 0.2);
  --bg-page: #f0f2f8;
  --bg-page-2: #e8ecf6;
  --bg-card: #ffffff;
  --border: rgba(15, 18, 34, 0.08);
  --border-strong: rgba(15, 18, 34, 0.12);
  --text: #0f1222;
  --muted: #5c6578;
  --radius-lg: 24px;
  --radius-md: 14px;
  --font: "Manrope", system-ui, sans-serif;
  --shadow-card: 0 4px 24px rgba(15, 18, 34, 0.06), 0 24px 64px rgba(15, 18, 34, 0.08);
  --shadow-welcome-stat: 0 20px 60px rgba(242, 70, 52, 0.18), 0 8px 24px rgba(15, 18, 34, 0.06);
  --panel-pad: clamp(24px, 4vw, 40px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-page);
  overflow-x: hidden;
}

/* Фон сторінки + «AI» іконки */
.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.page-bg__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(242, 70, 52, 0.09), transparent 55%),
    radial-gradient(900px 500px at 88% 0%, rgba(99, 102, 241, 0.1), transparent 50%),
    radial-gradient(800px 480px at 50% 100%, rgba(14, 165, 233, 0.08), transparent 45%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg-page) 38%, var(--bg-page-2) 100%);
}

.page-bg__mesh {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(15, 18, 34, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 18, 34, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, black 15%, transparent 75%);
}

.ai-icons-bg {
  position: absolute;
  inset: 0;
}

.ai-float {
  position: absolute;
  color: var(--ai-c, #6366f1);
  opacity: 0.42;
  animation: ai-drift var(--ai-dur, 14s) ease-in-out infinite;
  animation-delay: var(--ai-delay, 0s);
  will-change: transform;
}

.ai-float .ai-ic,
.ai-float svg {
  width: var(--ai-s, 34px);
  height: var(--ai-s, 34px);
  stroke-width: 1.35;
}

.ai-float--1 {
  top: 8%;
  left: 6%;
  --ai-s: 38px;
  --ai-dur: 16s;
  --ai-delay: 0s;
}

.ai-float--2 {
  top: 18%;
  right: 8%;
  --ai-s: 44px;
  --ai-dur: 18s;
  --ai-delay: -2s;
  opacity: 0.38;
}

.ai-float--3 {
  top: 42%;
  left: 3%;
  --ai-s: 30px;
  --ai-dur: 13s;
  --ai-delay: -4s;
}

.ai-float--4 {
  top: 52%;
  right: 4%;
  --ai-s: 36px;
  --ai-dur: 15s;
  --ai-delay: -1s;
}

.ai-float--5 {
  bottom: 28%;
  left: 10%;
  --ai-s: 32px;
  --ai-dur: 17s;
  --ai-delay: -6s;
}

.ai-float--6 {
  top: 62%;
  left: 18%;
  --ai-s: 28px;
  --ai-dur: 12s;
  --ai-delay: -3s;
}

.ai-float--7 {
  top: 12%;
  left: 42%;
  --ai-s: 32px;
  --ai-dur: 19s;
  --ai-delay: -5s;
  opacity: 0.35;
}

.ai-float--8 {
  bottom: 12%;
  right: 12%;
  --ai-s: 40px;
  --ai-dur: 14s;
  --ai-delay: -7s;
}

.ai-float--9 {
  bottom: 38%;
  right: 22%;
  --ai-s: 26px;
  --ai-dur: 11s;
  --ai-delay: -2.5s;
}

.ai-float--10 {
  top: 30%;
  right: 28%;
  --ai-s: 30px;
  --ai-dur: 16s;
  --ai-delay: -8s;
}

.ai-float--11 {
  bottom: 18%;
  left: 32%;
  --ai-s: 34px;
  --ai-dur: 20s;
  --ai-delay: -9s;
  opacity: 0.36;
}

.ai-float--12 {
  top: 72%;
  right: 14%;
  --ai-s: 28px;
  --ai-dur: 13s;
  --ai-delay: -4.5s;
}

@keyframes ai-drift {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(10px, -14px) rotate(4deg);
  }

  50% {
    transform: translate(-6px, 8px) rotate(-3deg);
  }

  75% {
    transform: translate(8px, 12px) rotate(2deg);
  }
}

@media (max-width: 640px) {

  .ai-float--7,
  .ai-float--11,
  .ai-float--6 {
    opacity: 0.22;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-float {
    animation: none;
    opacity: 0.2;
  }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 16px;
}

.logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(15, 18, 34, 0.08));
}

.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--panel-pad);
  animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.is-hidden {
  display: none !important;
}

/* Welcome — більш виразний герой */
.panel--welcome {
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, #ffffff 48%, rgba(255, 250, 249, 0.98) 100%);
  box-shadow:
    var(--shadow-card),
    0 0 0 1px rgba(242, 70, 52, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.welcome-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 4vw, 28px);
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.welcome-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(15, 18, 34, 0.05);
  border: 1px solid var(--border);
}

.pill--accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(242, 70, 52, 0.22);
}

.welcome-kicker {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
  line-height: 1.35;
  max-width: 26em;
}

.welcome-stat {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-welcome-stat);
}

.welcome-stat__inner {
  position: relative;
  padding: 20px 22px 22px;
  background: linear-gradient(135deg, #fff 0%, #fff8f7 55%, #fff 100%);
  border: 1px solid rgba(242, 70, 52, 0.15);
  border-radius: 20px;
  text-align: center;
  box-shadow: inset 0 4px 0 var(--accent);
}

.welcome-stat__prefix {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 4px;
}

.welcome-stat__value {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
}

.welcome-stat__cur {
  font-size: 0.55em;
  font-weight: 800;
  color: var(--accent);
  vertical-align: super;
  margin-left: 2px;
}

.welcome-stat__suffix {
  margin: 10px 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.welcome-lead {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 26em;
}

.welcome-trust {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  align-items: center;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}

.trust-ic,
.trust-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
  stroke-width: 2;
}

.welcome-cta-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.welcome-cta-row .btn--xl {
  width: 100%;
  max-width: 360px;
}

.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 28px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn:active {
  transform: scale(0.98);
}

.btn--xl {
  padding: 18px 36px;
  font-size: 1.05rem;
  border-radius: 16px;
}

.btn-ic,
.btn .btn-ic,
.btn svg.btn-ic {
  width: 22px;
  height: 22px;
  stroke-width: 2.25;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, #d63a2a 100%);
  color: #fff;
  box-shadow: 0 14px 36px rgba(242, 70, 52, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.btn--primary:hover {
  box-shadow: 0 18px 44px rgba(242, 70, 52, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.btn--ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: 0 2px 8px rgba(15, 18, 34, 0.04);
}

.btn--ghost:hover {
  background: #f8f9fc;
  border-color: rgba(15, 18, 34, 0.14);
}

.welcome-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  width: 100%;
}

.phone-ring {
  position: absolute;
  width: min(92%, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(242, 70, 52, 0.2);
  animation: ring-spin 28s linear infinite;
}

@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-ring {
    animation: none;
  }
}

.phone-glow {
  position: absolute;
  width: min(95%, 400px);
  height: min(95%, 500px);
  background: radial-gradient(ellipse at center, rgba(242, 70, 52, 0.16) 0%, transparent 68%);
  z-index: 0;
}

.phone-img {
  position: relative;
  z-index: 1;
  max-width: min(100%, 380px);
  height: auto;
  filter: drop-shadow(0 28px 48px rgba(15, 18, 34, 0.15));
}

/* Quiz */
.panel--quiz {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.quiz-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.btn-back {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8f9fc;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-back:hover {
  background: #fff;
  border-color: var(--border-strong);
}

.progress {
  height: 8px;
  border-radius: 99px;
  background: rgba(15, 18, 34, 0.06);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ff7a6b);
  transition: width 0.35s ease;
}

.progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 3ch;
  text-align: right;
}

.quiz-question {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

.quiz-subtitle {
  margin: 0 0 24px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.panel--quiz .quiz-media {
  --media-pad-x: max(14px, var(--panel-pad));
  --media-pad-y: 16px;
  position: relative;
  width: calc(100% + 2 * var(--panel-pad));
  margin-left: calc(-1 * var(--panel-pad));
  margin-right: calc(-1 * var(--panel-pad));
  margin-bottom: 24px;
  padding: calc(var(--media-pad-y) + 6px) var(--media-pad-x) calc(var(--media-pad-y) + 4px);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(242, 70, 52, 0.09), transparent 55%),
    radial-gradient(80% 60% at 100% 50%, rgba(99, 102, 241, 0.06), transparent 45%),
    radial-gradient(70% 50% at 0% 80%, rgba(14, 165, 233, 0.05), transparent 40%),
    linear-gradient(165deg, #fcfdff 0%, #f3f5fb 48%, #eceff7 100%);
  border: solid rgba(15, 18, 34, 0.06);
  border-width: 1px 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.35);
}

.panel--quiz .quiz-media::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100px, 28%);
  height: 4px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(90deg, #ff9a8e 0%, var(--accent) 45%, #c93426 100%);
  box-shadow: 0 2px 12px rgba(242, 70, 52, 0.35);
}

.panel--quiz .quiz-media::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px);
  background-size: 100% 10px;
  opacity: 0.18;
  mask-image: linear-gradient(180deg, black 0%, black 35%, transparent 75%);
}

.quiz-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
  margin-left: auto;
  margin-right: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(15, 18, 34, 0.06),
    0 4px 12px rgba(15, 18, 34, 0.05),
    0 20px 48px rgba(15, 18, 34, 0.1);
}

.answer-title {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.answers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-btn {
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fafbfe;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.answer-btn:hover {
  border-color: rgba(242, 70, 52, 0.45);
  background: #fff5f4;
  box-shadow: 0 0 0 1px rgba(242, 70, 52, 0.12);
}

.answer-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Фінальний екран — реєстрація */
.panel--done {
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  align-items: stretch;
  justify-content: flex-start;
  text-align: center;
  min-height: 0;
}

.done-inner {
  padding: 8px 4px 4px;
}

.done-inner--register {
  max-width: 400px;
  margin: 0 auto;
}

.done-title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  color: var(--text);
}

.done-lead {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.done-lead strong {
  color: var(--accent);
  font-weight: 800;
}

.done-text {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.done-text--narrow {
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
}

.done-text strong {
  color: var(--accent);
  font-weight: 700;
}

.c-form.register-form {
  padding-bottom: 0;
  text-align: left;
}

.block-center__wrapper {
  width: 100%;
}

.register-form .form-group {
  margin-bottom: 12px;
}

.register-form .btn-holder {
  display: flex;
  justify-content: center;
  margin-top: 4px;
  margin-bottom: 0;
}

.register-form .form-control.w-input {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.register-form .form-control.w-input::placeholder {
  color: #9aa3b2;
}

.register-form .form-control.w-input:hover {
  border-color: rgba(15, 18, 34, 0.18);
}

.register-form .form-control.w-input:focus {
  outline: none;
  border-color: rgba(242, 70, 52, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.register-form .form-control--phone {
  padding-left: 1rem;
}

.done-safe {
  margin: 16px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}

.btn_send {
  width: 100%;
  max-width: 320px;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 16px 28px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent) 0%, #d63a2a 100%);
  box-shadow: 0 12px 32px rgba(242, 70, 52, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn_send:hover {
  box-shadow: 0 16px 40px rgba(242, 70, 52, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.btn_send:active {
  transform: scale(0.98);
}

.btn--restart {
  margin-top: 16px;
  width: 100%;
  max-width: 280px;
}

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 16px 28px;
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
  line-height: 1.5;
}


.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  vertical-align: middle;
  margin-right: 5px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn_send:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}