/*
 * Deliberately NOT the storefront's look: dark, glowing, soft and rounded,
 * one electric-lime accent, rounded system type in sentence case. No web
 * font — the system stack keeps the page instant on ad traffic.
 */
:root {
  --bg: #07080d;
  --glow-a: rgba(124, 92, 255, 0.35);
  --glow-b: rgba(198, 255, 61, 0.16);
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --tile: rgba(255, 255, 255, 0.06);
  --tile-hover: rgba(255, 255, 255, 0.1);
  --tile-border: rgba(255, 255, 255, 0.1);
  --text: #f4f5fb;
  --text-muted: #9a9db3;
  --accent: #c6ff3d;
  --accent-ink: #0b0d05;
  --violet: #7c5cff;

  --r-card: 28px;
  --r-tile: 20px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(60rem 40rem at 85% -10%, var(--glow-a), transparent 60%),
    radial-gradient(50rem 36rem at -10% 110%, var(--glow-b), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

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

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 2rem;
}

.card {
  width: 100%;
  max-width: 30rem;
  /* Top-anchored, not vertically centred: steps differ in height, and a
     centred card would jump under the visitor's finger between questions. */
  margin: clamp(0.5rem, 7vh, 4.5rem) auto 0;
  padding: 1.5rem 1.25rem 1.75rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-card);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

@media (min-width: 640px) {
  .card {
    padding: 2rem 2rem 2.25rem;
  }
}

.step {
  animation: step-in 360ms var(--ease);
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.25rem;
}

.step-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.back {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font: inherit;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--text);
  background: var(--tile);
  border: 1px solid var(--tile-border);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 150ms var(--ease);
}

.back:hover {
  background: var(--tile-hover);
}

.progress {
  display: flex;
  gap: 0.375rem;
  margin: 0.875rem 0 1.75rem;
}

.progress-seg {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transition: background-color 300ms var(--ease), box-shadow 300ms var(--ease);
}

.progress-seg.is-current {
  background: linear-gradient(90deg, var(--violet), rgba(124, 92, 255, 0.25));
}

.progress-seg.is-done {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(198, 255, 61, 0.45);
}

.title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 1.35rem + 2vw, 2.25rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.title:focus {
  outline: none;
}

.options {
  display: grid;
  gap: 0.625rem;
  grid-template-columns: 1fr 1fr;
}

/* An odd last option spans the row instead of leaving a hole. */
.options-grid .option:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3.75rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  background: var(--tile);
  border: 1px solid var(--tile-border);
  border-radius: var(--r-tile);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 150ms var(--ease),
    border-color 150ms var(--ease),
    color 150ms var(--ease),
    transform 150ms var(--ease),
    box-shadow 200ms var(--ease);
}

.option.has-icon {
  flex-direction: column;
  min-height: 9rem;
  gap: 0.75rem;
  font-size: 1.125rem;
}

.option-icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.625rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--accent);
  background: rgba(198, 255, 61, 0.1);
  border-radius: 50%;
  box-sizing: content-box;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

@media (hover: hover) {
  .option:hover {
    background: var(--tile-hover);
    border-color: rgba(198, 255, 61, 0.5);
    transform: translateY(-2px);
  }
}

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

.option[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -8px rgba(198, 255, 61, 0.55);
}

.option[aria-pressed="true"] .option-icon {
  color: var(--accent-ink);
  background: rgba(0, 0, 0, 0.1);
}

/* Final "redirecting" screen */
.step-finish {
  text-align: center;
}

.step-finish .top {
  justify-content: center;
}

.pulse {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.75rem 0 1.5rem;
}

.pulse span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(198, 255, 61, 0.6);
  animation: bounce 900ms var(--ease) infinite;
}

.pulse span:nth-child(2) {
  animation-delay: 150ms;
}

.pulse span:nth-child(3) {
  animation-delay: 300ms;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.title-center {
  margin-bottom: 0.5rem;
}

.finish-body {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

.finish-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 10px 30px -8px rgba(198, 255, 61, 0.55);
}

.finish-link:hover {
  filter: brightness(1.05);
}

.error {
  margin: 0;
  color: var(--text-muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
