:root {
  --theme: #a21caf;
  --theme-dark: #86198f;
  --theme-soft: #f5e8f7;
  --theme-track: #f3e8f5;
  --title: #030712;
  --text: #020617;
  --muted: #4b5563;
  --radius: 16px;
  --container: 28rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.back {
  color: var(--muted);
  display: grid;
  place-items: center;
  margin-left: -6px;
}
.back[hidden] {
  display: none;
}
.progress {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--theme-track);
  overflow: hidden;
}
#progress-bar {
  height: 100%;
  width: 0;
  background: var(--theme);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.container.enter {
  animation: enter 0.35s ease;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

h1,
h2 {
  color: var(--title);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}
h1 {
  font-size: 1.75rem;
  font-weight: 800;
  text-transform: uppercase;
}
h2 {
  font-size: 1.6rem;
}
h2.left {
  text-align: left;
}
h3 {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
}
mark {
  background: var(--theme);
  color: #fff;
  padding: 0 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.center {
  text-align: center;
}

/* Question */
.hero {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 40px auto 8px;
}
.kicker {
  text-align: center;
  margin-bottom: -10px;
}
.kicker span {
  background: #000;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 1px 4px;
}

.options {
  display: grid;
  gap: 8px;
}
.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.radio {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.6;
  position: relative;
}
.selected .radio {
  opacity: 1;
}
.selected .radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: currentColor;
}

.opt {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border-radius: var(--radius);
  transition: transform 0.1s, background 0.2s, border-color 0.2s;
}
.opt:active {
  transform: scale(0.98);
}

.opt-solid {
  min-height: 62px;
  padding: 12px;
  background: var(--theme);
  border: 2px solid var(--theme);
  color: #fff;
}
.opt-solid .radio {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}
.opt-solid.selected {
  background: var(--theme-dark);
}

.opt-image {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--theme);
  background: var(--theme-soft);
}
.opt-image img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
}
.opt-image-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  min-height: 52px;
  font-size: 14px;
}
.opt-image .radio {
  color: var(--theme);
}
.opt-image.selected {
  border-width: 2px;
}

.opt-letter,
.opt-list {
  min-height: 56px;
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
}
.opt-letter.selected,
.opt-list.selected {
  border-color: var(--theme);
  background: var(--theme-soft);
}
.letter {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--theme-soft);
  color: var(--theme);
  font-weight: 700;
  font-size: 14px;
}
.selected .letter {
  background: var(--theme);
  color: #fff;
}
.opt-list {
  justify-content: center;
  font-weight: 500;
}

.note {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.footer-note {
  text-align: center;
  font-size: 12px;
}
.footer-note.small {
  font-size: 13px;
  color: var(--muted);
}

/* CTA */
.cta {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--theme);
  color: #fff;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.1s;
}
.cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cta:active:not(:disabled) {
  transform: scale(0.98);
}
.pulse {
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  50% {
    transform: scale(1.03);
  }
}

/* Loading */
.loading {
  align-items: center;
  text-align: center;
  padding-top: 80px;
}
.ring {
  position: relative;
  width: 140px;
  height: 140px;
}
.ring svg {
  transform: rotate(-90deg);
}
.ring circle {
  fill: none;
  stroke-width: 8;
}
.ring .track {
  stroke: var(--theme-track);
}
.ring .fill {
  stroke: var(--theme);
  stroke-linecap: round;
}
.pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  font-weight: 700;
}
.loading-title {
  font-weight: 700;
  font-size: 1.25rem;
}

/* Results carousel */
.sub {
  text-align: center;
  font-size: 14px;
  margin-top: -6px;
}
.carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 16px;
  margin: 0 -16px;
}
.carousel::-webkit-scrollbar {
  display: none;
}
.slide {
  flex: 0 0 92%;
  scroll-snap-align: center;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.slide img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
}
.slide figcaption {
  padding: 12px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
}
.dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: -6px;
}
.dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e9d5ec;
}
.dots span.on {
  background: var(--theme);
}

/* Diagnosis */
.alert {
  background: #fde8e8;
  border: 1px solid #fca5a5;
  color: #dc2626;
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}
.rounded {
  border-radius: var(--radius);
  width: 100%;
}
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checklist.box {
  background: #fff8e6;
  border: 1px solid #fde7b0;
  border-radius: var(--radius);
  padding: 16px;
}
.highlight {
  text-align: center;
  font-weight: 800;
}

/* Offer */
.proofs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.proofs img {
  border-radius: 12px;
}
.price-box {
  border: 2px dashed var(--theme);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}
.next-class {
  font-weight: 800;
}
.badge {
  align-self: center;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
}
.from {
  color: var(--muted);
}
.to {
  font-size: 2.6rem;
  font-weight: 800;
  color: #16a34a;
  line-height: 1;
}
.suffix {
  color: var(--muted);
  margin-bottom: 8px;
}
