:root {
  --primary: #0d47a1;
  --primary-dark: #083574;
  --background: #eff6ff;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #637083;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 22px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--background);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 30rem),
    var(--background);
}

button, a { font: inherit; }

.page-shell {
  width: min(100%, 820px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 18px 32px;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.brand {
  max-width: 70%;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
}

.step-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  height: 7px;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--primary) 14%, white);
}

.progress-value {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--progress, var(--primary));
  transition: width .35s ease;
}

.quiz-card {
  min-height: 510px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid color-mix(in srgb, var(--primary) 12%, white);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(22, 34, 60, .12);
  animation: card-in .28s ease-out;
}

.component + .component { margin-top: 22px; }

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text p { margin: 0; }

.rich-text h1 {
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.rich-text h2 {
  font-size: clamp(26px, 5vw, 39px);
  line-height: 1.18;
  letter-spacing: -.025em;
}

.rich-text h3 {
  font-size: clamp(19px, 3vw, 24px);
  line-height: 1.35;
}

.rich-text p {
  color: var(--muted);
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: 1.68;
}

.argument-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.argument-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 13%, white);
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 5%, white);
  line-height: 1.5;
}

.argument-icon {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 900;
}

.argument-item.is-negative .argument-icon { background: var(--danger); }

.primary-button,
.choice-button,
.checkout-button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.primary-button,
.checkout-button {
  display: block;
  padding: 17px 22px;
  background: var(--primary);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 28%, transparent);
  color: white;
  text-align: center;
  text-decoration: none;
}

.primary-button:hover,
.checkout-button:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
}

.choice-list { display: grid; gap: 12px; }

.choice-button {
  padding: 17px 19px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, white);
  background: white;
  color: var(--ink);
  text-align: left;
}

.choice-button:hover,
.choice-button.is-selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, white);
  transform: translateY(-1px);
}

.navigation-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 26px;
}

.back-button {
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.back-button:hover { color: var(--primary); }

.loading-card {
  display: grid;
  min-height: 510px;
  place-content: center;
  text-align: center;
}

.spinner {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border: 6px solid color-mix(in srgb, var(--primary) 14%, white);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.loading-message {
  margin: 0;
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 800;
}

.level-wrap { text-align: center; }

.level-ring {
  display: grid;
  width: 164px;
  height: 164px;
  margin: 0 auto 20px;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--level) * 1%), #e8edf4 0);
  box-shadow: inset 0 0 0 18px white;
}

.level-ring strong {
  color: var(--primary-dark);
  font-size: 35px;
}

.level-wrap h2 { margin: 0; font-size: 26px; }

.alert {
  padding: 18px 20px;
  border-left: 5px solid var(--warning);
  border-radius: 12px;
  background: #fff7ed;
}

.alert.success { border-color: var(--success); background: #f0fdf4; }
.alert.danger { border-color: var(--danger); background: #fef2f2; }
.alert h3 { margin: 0 0 6px; font-size: 18px; }
.alert p { margin: 0; line-height: 1.55; }

.price-card {
  padding: 24px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--primary) 7%, white);
  text-align: center;
}

.price-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 11px;
  border-radius: 99px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.price-original { color: var(--muted); text-decoration: line-through; }
.price-current { margin: 6px 0; color: var(--primary-dark); font-size: 46px; font-weight: 900; }
.price-installments { color: var(--muted); font-size: 14px; }

.testimonial-grid { display: grid; gap: 14px; }

.testimonial-card {
  padding: 18px;
  border: 1px solid #e6eaf0;
  border-radius: 14px;
  background: white;
}

.testimonial-card p { margin: 8px 0; line-height: 1.55; }
.stars { color: #f59e0b; letter-spacing: 2px; }

.faq-list { display: grid; gap: 10px; }

.faq-list details {
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  background: white;
}

.faq-list summary {
  padding: 15px 17px;
  cursor: pointer;
  font-weight: 800;
}

.faq-answer {
  padding: 0 17px 16px;
  color: var(--muted);
  line-height: 1.55;
}

footer {
  padding: 22px 12px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.error-card h1 { margin-top: 0; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .page-shell { padding: 14px 12px 24px; }
  .quiz-card { min-height: calc(100vh - 150px); padding: 26px 20px; border-radius: 18px; }
  .quiz-header { padding: 0 4px; }
  .brand { max-width: 68%; font-size: 12px; }
  .level-ring { width: 142px; height: 142px; }
}

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