.quiz-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #fbfcfe 0%, #fff 22%);
  color: #293247;
  overflow-x: hidden;
}

.quiz-header {
  width: min(720px, calc(100% - 48px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px 0 40px;
}

.quiz-header__logo img { width: 158px; height: auto; }
.quiz-header__meta { color: #8b93a3; font-size: .75rem; font-weight: 600; letter-spacing: .035em; }

.quiz-shell {
  width: min(720px, calc(100% - 48px));
  min-height: calc(100svh - 84px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 6px 0 44px;
}

.quiz-card {
  width: 100%;
  min-height: min(510px, calc(100svh - 138px));
  display: flex;
  flex-direction: column;
}

.quiz-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  color: #8b93a3;
  font-size: .7rem;
  font-weight: 600;
}

.quiz-progress__track {
  height: 2px;
  overflow: hidden;
  background: #e9edf3;
  border-radius: 99px;
}

.quiz-progress__track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--color-primary);
  border-radius: inherit;
  transition: width .35s ease;
}

#qualificationForm { flex: 1; display: flex; flex-direction: column; }

.quiz-step {
  display: none;
  flex: 1;
  position: relative;
  border: 0;
  padding: 38px 30px 26px 40px;
  animation: quizIn .3s ease both;
}

.quiz-step__content { position: relative; }

.quiz-step.is-active {
  display: block;
}

/* Fieldset positions its legend outside the normal content box. Keeping the
   generic top padding here would add a second, invisible gap below the title. */
.quiz-step:is(fieldset) {
  margin-top: 30px;
  padding-top: 10px;
}

.quiz-step:not(fieldset).is-active {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@keyframes quizIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-step legend,
.quiz-step h1,
.quiz-step h2 {
  width: 100%;
  font-family: var(--font-hero);
  color: var(--color-primary-dark);
  max-width: 640px;
  font-size: clamp(1.65rem, 2.8vw, 2.05rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.035em;
}

.quiz-step legend > span,
.quiz-step__number {
  position: absolute;
  transform: translateX(-36px);
  margin-top: .72em;
  color: var(--color-accent2);
  font-family: var(--font-main);
  font-size: .85rem;
  vertical-align: baseline;
}

.quiz-step legend > span::after,
.quiz-step__number::after { content: " →"; }

.quiz-step__content--start { max-width: 640px; }

.quiz-step__kicker,
.quiz-result__eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  color: #66738d;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.quiz-step__content--start > p,
.quiz-result > p {
  max-width: 570px;
  margin-top: 20px;
  color: #616d82;
  font-size: .98rem;
  line-height: 1.65;
}

.quiz-step__hint {
  max-width: 600px;
  margin: 10px 0 18px;
  color: #6e798d;
  font-size: .92rem;
  line-height: 1.55;
}

.quiz-options { display: grid; gap: 8px; max-width: 600px; }

.quiz-option {
  min-height: 49px;
  display: grid;
  grid-template-columns: 27px 1fr 16px;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border: 1px solid #ccd3e0;
  border-radius: 8px;
  background: #f9fafc;
  color: #34405a;
  font-size: .93rem;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.quiz-option:hover { border-color: #7382a7; background: #f4f6fa; }
.quiz-page.is-keyboard-user .quiz-option:has(input:focus-visible) { outline: 3px solid rgba(52, 71, 121, .22); outline-offset: 2px; }
.quiz-option:has(input:checked) { border-color: var(--color-primary); background: #f1f3f8; box-shadow: inset 0 0 0 1px var(--color-primary); }
.quiz-option input { position: absolute; opacity: 0; pointer-events: none; }

.quiz-option__key {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(52, 71, 121, .26);
  border-radius: 5px;
  color: var(--color-primary);
  font-size: .72rem;
  font-weight: 700;
}

.quiz-option:has(input:checked) .quiz-option__key { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.quiz-option i { opacity: 0; color: var(--color-primary); font-size: .82rem; font-style: normal; }
.quiz-option:has(input:checked) i { opacity: 1; }

.quiz-button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 0;
  border-radius: 8px;
  padding: 10px 21px;
  font: 700 .9rem var(--font-main);
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.quiz-button:hover { transform: translateY(-1px); }
.quiz-page.is-keyboard-user .quiz-button:focus-visible,
.quiz-page.is-keyboard-user .quiz-back:focus-visible,
.quiz-page.is-keyboard-user .quiz-field input:focus-visible,
.quiz-page.is-keyboard-user .quiz-consent input:focus-visible { outline: 3px solid rgba(52, 71, 121, .22); outline-offset: 3px; }
.quiz-button--primary { margin-top: 30px; background: var(--color-primary); color: #fff; box-shadow: 0 8px 22px rgba(52, 71, 121, .18); }
.quiz-button--primary:hover { background: var(--color-primary-dark); }
.quiz-button--next { margin-top: 18px; }
.quiz-button--whatsapp { width: 100%; max-width: 440px; margin-top: 24px; background: #168c4e; color: #fff; }
.quiz-button--whatsapp:hover { background: #117540; color: #fff; }
.quiz-button--whatsapp svg { width: 23px; height: 23px; }

.quiz-nav {
  min-height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px 0 40px;
  color: #929aa9;
  font-size: .72rem;
}

.quiz-nav[hidden] { display: none; }

.quiz-back { border: 0; background: none; color: #6e778a; padding: 8px 0; font: 600 .85rem var(--font-main); cursor: pointer; }
.quiz-nav strong { color: #737b8d; }

.quiz-contact-fields {
  max-width: 600px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 22px;
}
.quiz-field { display: block; margin-top: 22px; }
.quiz-field > span { display: block; margin-bottom: 6px; color: #667086; font-size: .88rem; font-weight: 600; }
.quiz-field input {
  width: 100%;
  height: 58px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid #aeb7c8;
  border-radius: 0;
  background: transparent;
  color: var(--color-primary-dark);
  font: 500 1.35rem var(--font-main);
}
.quiz-field input:focus { outline: none; border-color: var(--color-primary); }
.quiz-field input::placeholder { color: #a5acb9; }
.quiz-field input[aria-invalid="true"] { border-color: #b13e4b; }
.quiz-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.quiz-consent {
  max-width: 650px;
  margin-top: 24px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: #70798b;
  font-size: .84rem;
  line-height: 1.5;
  cursor: pointer;
}
.quiz-consent input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--color-primary); flex: 0 0 auto; }
.quiz-consent a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.quiz-error { min-height: 20px; margin-top: 8px; color: #b13e4b; font-size: .82rem; font-weight: 600; }
.quiz-email-fallback { display: inline-block; color: var(--color-primary); font-size: .86rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.quiz-email-fallback[hidden] { display: none; }
.quiz-button[disabled] { opacity: .68; cursor: wait; transform: none; }

.quiz-result { max-width: 620px; }
.quiz-result__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 50%;
  background: rgba(46, 188, 195, .12);
  color: #168c91;
  font-weight: 800;
}
.quiz-result h2 { max-width: 580px; }
.quiz-result__note { max-width: 600px; margin-top: 20px; padding: 14px 16px; background: #f4f6f9; border-radius: 6px; color: #626c80; font-size: .88rem; line-height: 1.55; }
.quiz-result__note strong { display: block; color: var(--color-primary-dark); }
.quiz-result > small { display: block; margin-top: 12px; color: #9299a7; }

.quiz-page .cookie-banner {
  bottom: 14px;
  max-width: 700px;
  padding: 15px 18px;
  border: 1px solid #e5e8ef;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(32, 47, 87, .12);
}
.quiz-page .cookie-banner__inner { gap: 14px; }
.quiz-page .cookie-banner__title { display: none; }
.quiz-page .cookie-banner__desc { font-size: .75rem; line-height: 1.45; }
.quiz-page .cookie-banner__btn { padding: 8px 12px; border-radius: 5px; font-size: .75rem; }
.quiz-page .cookie-reopen {
  right: 16px;
  bottom: 16px;
  left: auto;
  width: 36px;
  height: 36px;
  box-shadow: 0 4px 14px rgba(52, 71, 121, .2);
}

@media (max-width: 620px) {
  .quiz-header { width: calc(100% - 36px); height: 74px; }
  .quiz-header { padding: 0 2px 0 24px; }
  .quiz-header__logo img { width: 142px; }
  .quiz-header__meta { font-size: .7rem; }
  .quiz-shell { width: calc(100% - 36px); min-height: calc(100svh - 74px); padding: 4px 0 34px; align-items: flex-start; }
  .quiz-card { min-height: calc(100svh - 112px); }
  .quiz-step { padding: 44px 2px 20px 24px; }
  .quiz-step__content--start { padding-top: 4px; }
  .quiz-step legend > span, .quiz-step__number { transform: translateX(-24px); margin-top: .55em; font-size: .72rem; }
  .quiz-step:is(fieldset) { margin-top: 22px; }
  .quiz-step legend > span::after, .quiz-step__number::after { content: ""; }
  .quiz-step legend, .quiz-step h1, .quiz-step h2 { font-size: 1.7rem; }
  .quiz-step__content--start > p, .quiz-result > p { font-size: 1rem; }
  .quiz-step__hint { margin-bottom: 22px; font-size: .93rem; }
  .quiz-option { min-height: 51px; font-size: .93rem; }
  .quiz-contact-fields { grid-template-columns: 1fr; gap: 0; }
  .quiz-field { margin-top: 18px; }
  .quiz-nav { padding: 0 2px 0 24px; }
  .quiz-nav > span { display: none; }
  .quiz-page .cookie-banner { width: calc(100% - 20px); bottom: 10px; }
  .quiz-page .cookie-banner__actions { width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .quiz-step, .quiz-progress__track span, .quiz-option, .quiz-button { animation: none; transition: none; }
}
