/* New quiz and its homepage invitation; shared site components stay authoritative. */
.quiz-invite {
  background: var(--fu-bg);
  color: var(--fu-bloom-700);
  padding: 0 var(--pad, 24px);
}
.quiz-invite__inner { max-width: 940px; margin: 0 auto; padding: 28px 32px; border: 1px solid var(--fu-bloom-200); border-radius: 12px; background: var(--fu-bloom-100); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.quiz-invite h2 { font: 400 clamp(26px, 2.4vw, 32px)/1.2 var(--fu-font-display); letter-spacing: -.015em; margin: 0; }
.quiz-invite p { max-width: 62ch; font-size: 15px; line-height: 1.6; margin: 8px 0 0; }
.quiz-invite .fu-btn { flex: 0 0 auto; height: 48px; min-height: 48px; padding-inline: 24px; box-shadow: none; transform: none; }
.quiz-invite .fu-btn:hover, .quiz-invite .fu-btn:focus-visible { background: var(--fu-bloom-600); color: var(--fu-bone-50); box-shadow: none; }
.quiz-page {
  --pad: clamp(24px, 4.2vw, 62px);
  --quiz-ink: color-mix(in srgb, var(--fu-bloom-700) 70%, var(--fu-gold-500));
  --quiz-muted: color-mix(in srgb, var(--fu-bloom-700) 58%, var(--fu-gold-500));
  margin: 0; background: var(--fu-bg); color: var(--quiz-ink);
}
.quiz-page * { box-sizing: border-box; }
.quiz-page a { text-decoration: none; }
.quiz-page .quiz-header { position: relative; height: 96px; padding: 6px var(--pad); border-bottom: 1px solid var(--fu-mist-300); }
.quiz-header::before { display: none; }
.quiz-page .quiz-header a { color: var(--fu-bloom-500); }
.quiz-header__back { display: inline-flex; align-items: center; justify-self: start; gap: 10px; font-size: 14px; font-weight: 500; min-height: 44px; }
.quiz-page .quiz-header .brand img { width: 276px; height: 84px; object-fit: contain; display: block; }
.quiz-page .quiz-header .hdr__r { gap: 30px; }
.quiz-page .quiz-header .accedi { font-size: 14px; letter-spacing: 0; padding: 0; min-height: 44px; display: flex; align-items: center; }
.quiz-page .quiz-header .lang { border: 0; border-radius: 0; border-left: 1px solid var(--fu-bloom-300); padding: 0 0 0 28px; gap: 8px; background: none; backdrop-filter: none; }
.quiz-page .quiz-header .lang button { font-size: 13px; letter-spacing: 0; min-width: 50px; height: 40px; color: var(--fu-bloom-500); }
html[lang="it"] .quiz-page .lang button[data-lang="it"], html[lang="en"] .quiz-page .lang button[data-lang="en"] { color: var(--fu-bone-50); }
.quiz-page :focus-visible, .quiz-invite :focus-visible { outline: 2px solid var(--fu-bloom-500); outline-offset: 5px; }
.quiz__skip { position: absolute; top: 8px; left: 8px; z-index: 40; transform: translateY(-200%); background: var(--fu-bg); padding: 14px; }
.quiz__skip:focus { transform: none; }
.quiz__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.quiz__arrow { display: inline-block; width: 26px; height: 26px; flex: 0 0 26px; background-color: currentColor; mask: url('../media/icons/phosphor/arrow-right.svg') center / contain no-repeat; }
.quiz__arrow--back { width: 22px; height: 22px; flex-basis: 22px; transform: rotate(180deg); }
.quiz { max-width: 1470px; margin: 0 auto; padding: 46px var(--pad) 50px; min-height: 760px; scroll-margin-top: 16px; }
.quiz__layout { display: grid; grid-template-columns: minmax(0, 468fr) minmax(0, 796fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.quiz__guide { padding-top: 20px; }
.quiz__eyebrow { font-size: 11px; font-weight: 500; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; color: var(--quiz-muted); margin: 0 0 14px; }
.quiz__guide-title { font: 300 clamp(34px, 3vw, 44px)/1.1 var(--fu-font-display); letter-spacing: -.025em; margin: 22px 0 26px; }
.quiz__guide-title em { font-weight: inherit; }
.quiz__portrait { margin: 0; }
.quiz__portrait-frame { width: 88%; max-width: 400px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 17px; }
.quiz__portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; transform: scale(var(--quiz-portrait-scale, 1)); transform-origin: 50% 20%; }
.quiz__portrait figcaption { margin-top: 16px; font-size: 14px; line-height: 1.5; color: var(--quiz-muted); }
.quiz__panel { min-width: 0; }
.quiz__panel, .quiz__result-head { scroll-margin-top: 24px; }
.quiz__stages { position: relative; list-style: none; padding: 0 56px 0 0; margin: 0 0 32px; display: flex; justify-content: space-between; font-size: 14px; line-height: 26px; }
.quiz__stages::before { content: ''; position: absolute; left: 56px; right: 112px; bottom: 9px; height: 2px; background: color-mix(in srgb, var(--fu-gold-500) 65%, var(--fu-bg)); }
.quiz__stages li { position: relative; width: 112px; text-align: center; color: var(--quiz-muted); }
.quiz__stage-button { position: relative; display: block; width: 100%; min-height: 54px; padding: 0 4px 28px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; line-height: 26px; cursor: pointer; }
.quiz__stage-button:not(:disabled):hover { color: var(--fu-bloom-500); text-decoration: underline; text-underline-offset: 4px; }
.quiz__stage-button:disabled { cursor: not-allowed; color: color-mix(in srgb, var(--quiz-muted) 65%, var(--fu-bg)); }
.quiz__stage-button::after { content: ''; position: absolute; width: 18px; height: 18px; left: calc(50% - 9px); bottom: 1px; border: 2px solid color-mix(in srgb, var(--fu-gold-500) 80%, var(--fu-bg)); border-radius: 50%; background: var(--fu-bg); }
.quiz__stage-button:disabled::after { border-color: color-mix(in srgb, var(--fu-gold-500) 52%, var(--fu-bg)); }
.quiz__stages .is-reached .quiz__stage-button::after { background: var(--fu-bloom-500); border-color: var(--fu-bloom-500); }
.quiz__stages [aria-current] { font-weight: 600; color: var(--fu-bloom-500); }
.quiz__screen { margin: 0; }
.quiz h1, .quiz h2 { font-family: var(--fu-font-display); font-weight: 300; letter-spacing: -.025em; }
.quiz h1 { max-width: 610px; font-size: clamp(36px, 3.4vw, 48px); line-height: 1.08; margin: 0 0 14px; }
.quiz h1:focus { outline: none; }
.quiz__help { font-size: 17px; line-height: 1.5; margin: 0; color: var(--quiz-muted); }
.quiz__hint { font-size: 14px; line-height: 1.5; margin: 8px 0 0; color: var(--quiz-muted); }
.quiz__form { margin-top: 26px; }
.quiz__options { border: 0; padding: 0; margin: 0; min-width: 0; }
.quiz__option { display: flex; gap: 18px; align-items: center; padding: 16px 18px; min-height: 64px; border: 0; border-bottom: 1px solid var(--fu-mist-300); cursor: pointer; font-size: 18px; line-height: 1.45; color: var(--fu-bloom-900); transition: background 120ms ease; }
.quiz__option:hover { background: var(--fu-bloom-50); }
.quiz__option:has(input:checked) { background: var(--fu-bloom-100); border-bottom-color: transparent; border-radius: 14px; }
.quiz__option:has(input:focus-visible) { outline: 2px solid var(--fu-bloom-500); outline-offset: 3px; border-radius: 8px; }
.quiz__option input { appearance: auto; accent-color: var(--fu-bloom-500); width: 22px; height: 22px; flex: 0 0 22px; margin: 0; }
.quiz__option input[type="radio"] { appearance: none; border: 2px solid var(--quiz-muted); border-radius: 50%; background: var(--fu-bg); }
.quiz__option input[type="radio"]:checked { border-color: var(--fu-bloom-500); background: var(--fu-bloom-500); box-shadow: inset 0 0 0 4px var(--fu-bloom-100); }
@media (forced-colors: active) { .quiz__option input[type="radio"] { appearance: auto; } }
.quiz__option-copy { min-width: 0; }
.quiz__option-price { display: block; font-size: 14px; margin-top: 3px; color: var(--quiz-muted); }
.quiz__search-label { display: block; margin-bottom: 8px; color: var(--quiz-muted); font-size: 14px; font-weight: 500; }
.quiz__search { display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--quiz-muted); border-radius: 10px; color: var(--fu-bloom-900); background: var(--fu-bg); font: 400 16px/1.4 var(--fu-font-sans); }
.quiz__search::placeholder { color: var(--quiz-muted); opacity: 1; }
.quiz__chosen { margin-top: 16px; }
.quiz__chosen-title { margin: 0 0 8px; color: var(--quiz-muted); font-size: 13px; }
.quiz__chosen-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 144px; overflow-y: auto; padding: 3px; }
.quiz__chosen-course { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 0 10px; border-radius: 8px; background: var(--fu-bloom-100); color: var(--fu-bloom-900); font-size: 14px; line-height: 1.4; }
.quiz__chosen-course > span { min-width: 0; overflow-wrap: anywhere; }
.quiz__remove-course { flex-shrink: 0; min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--fu-bloom-600); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quiz__options--searchable { max-height: 208px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; margin-top: 16px; border: 1px solid var(--fu-mist-300); border-radius: 10px; }
.quiz__options--searchable .quiz__option { min-height: 52px; padding: 12px 14px; gap: 12px; font-size: 16px; }
.quiz__options--searchable .quiz__option:last-child { border-bottom: 0; }
.quiz__options--searchable .quiz__option:has(input:checked) { border-radius: 0; }
.quiz__options--searchable .quiz__option:has(input:focus-visible) { outline-offset: -3px; }
.quiz__options--searchable .quiz__option[hidden] { display: none; }
.quiz__search-status { margin: 8px 0 0; font-size: 13px; color: var(--quiz-muted); }
.quiz__search-empty { margin: 16px 0 0; padding: 16px; border: 1px solid var(--fu-mist-300); border-radius: 10px; font-size: 16px; color: var(--quiz-muted); }
.quiz__actions { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 32px; }
.quiz__actions .fu-btn { min-width: 176px; min-height: 52px; height: auto; padding: 12px 24px; font-size: 16px; gap: 8px; }
.quiz__pace { font-size: 14px; line-height: 1.5; color: var(--quiz-muted); margin: 0; }
.quiz__text-button { font: inherit; font-size: 14px; color: var(--quiz-muted); background: transparent; border: 0; padding: 12px 0; text-decoration: underline !important; text-underline-offset: 4px; cursor: pointer; }
.quiz__error { margin: 0; color: var(--fu-bloom-600); font-size: 14px; }
.quiz__error:not(:empty) { padding-top: 16px; }
.quiz__result-head { max-width: 820px; margin-bottom: 34px; }
.quiz__result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 52px; align-items: start; }
.quiz__result-media { position: relative; align-self: stretch; min-width: 0; overflow: hidden; border-radius: 20px; }
.quiz__photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.quiz__recommendation h2 { font-size: clamp(30px, 3vw, 40px); margin: 0 0 20px; line-height: 1.13; }
.quiz__subheading { font: 600 14px/1.5 var(--fu-font-sans); margin: 24px 0 8px; }
.quiz__recommendation p { font-size: 16px; line-height: 1.6; margin: 0 0 12px; }
.quiz__reasons { padding-left: 20px; margin: 8px 0 22px; font-size: 16px; line-height: 1.6; }
.quiz__reasons li + li { margin-top: 8px; }
.quiz__recommendation .quiz__facts { font-size: 14px; color: var(--fu-bloom-600); }
.quiz__recommendation .quiz__notice { padding: 16px; background: var(--fu-bloom-100); border-radius: 10px; font-size: 14px; margin-block: 20px; }
.quiz__recommendation .quiz__price { margin: 24px 0 12px; font-size: 26px; }
.quiz__buy { min-height: 52px; padding-inline: 28px; }
.quiz__details { display: inline-block; margin: 16px 0 0 20px; color: var(--fu-bloom-600); text-decoration: underline !important; text-underline-offset: 4px; }
.quiz__result-actions { display: flex; flex-wrap: wrap; gap: 28px; border-top: 1px solid var(--fu-mist-300); margin-top: 42px; padding-top: 16px; }
.quiz__fallback { max-width: 680px; margin: 50px auto; padding: 24px; }
@media (max-width: 1100px) {
  .quiz-header__back { font-size: 14px; gap: 8px; }
  .quiz-page .quiz-header .brand img { width: 220px; }
  .quiz-page .quiz-header .hdr__r { gap: 18px; }
  .quiz-page .quiz-header .lang { padding-left: 18px; }
  .quiz-page .quiz-header .accedi { font-size: 14px; }
  .quiz__layout { gap: 40px; grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr); }
  .quiz__guide-title { font-size: 38px; }
  .quiz__eyebrow { font-size: 11px; }
  .quiz h1 { font-size: 42px; line-height: 1.08; }
  .quiz__help { font-size: 17px; }
  .quiz__stages { font-size: 14px; padding-right: 0; }
  .quiz__stages::before { left: 46px; right: 46px; }
  .quiz__stages li { width: 92px; }
  .quiz__option { font-size: 18px; gap: 16px; padding: 16px 14px; }
  .quiz__option input { width: 22px; height: 22px; flex-basis: 22px; }
  .quiz__portrait figcaption, .quiz__pace { font-size: 14px; }
  .quiz__actions { gap: 16px; margin-top: 32px; }
  .quiz__actions .fu-btn { min-width: 170px; min-height: 52px; font-size: 16px; padding: 12px 22px; white-space: normal; }
}
@media (max-width: 800px) {
  .quiz-page { --pad: 24px; }
  .quiz__layout { display: block; }
  .quiz__guide { display: grid; grid-template-columns: 1fr 74px; align-items: center; gap: 4px 18px; padding: 0 0 24px; border-bottom: 1px solid var(--fu-mist-300); margin-bottom: 26px; }
  .quiz__guide > .quiz__eyebrow { margin: 0; font-size: 10px; }
  .quiz__guide-title { margin: 0; font-size: 28px; line-height: 1.1; }
  .quiz__portrait { grid-column: 2; grid-row: 1 / 3; }
  .quiz__portrait-frame { width: 74px; height: 88px; border-radius: 10px; }
  .quiz__portrait figcaption { display: none; }
  .quiz__stages { margin-bottom: 28px; }
  .quiz__screen > .quiz__eyebrow { margin-bottom: 16px; }
  .quiz h1 { max-width: 600px; }
  .quiz__result-grid { grid-template-columns: 1fr; gap: 26px; }
  .quiz__result-media { order: 2; aspect-ratio: 1; max-height: 560px; }
  .quiz__result-media--portrait { aspect-ratio: 4 / 5; }
  .quiz__result-media--landscape { aspect-ratio: 4 / 3; }
  .quiz__recommendation { order: 1; }
}
@media (max-width: 650px) {
  .quiz-invite { padding-inline: var(--pad, 22px); }
  .quiz-invite__inner { flex-direction: column; align-items: center; gap: 20px; padding: 24px; text-align: center; }
  .quiz-invite .fu-btn { width: auto; }
  .quiz-page { --pad: 20px; }
  .quiz-page .quiz-header { height: auto; min-height: 112px; grid-template-columns: 1fr auto; gap: 0 12px; padding-block: 8px; }
  .quiz-page .quiz-header .brand { grid-column: 1; grid-row: 1; justify-self: start; }
  .quiz-page .quiz-header .brand img { width: 152px; height: 56px; }
  .quiz-header__back { grid-column: 1; grid-row: 2; font-size: 13px; min-height: 44px; gap: 6px; }
  .quiz__arrow--back { width: 18px; height: 18px; flex-basis: 18px; }
  .quiz-page .quiz-header .hdr__r { grid-column: 2; grid-row: 1 / 3; flex-direction: column; gap: 0; align-items: flex-end; }
  .quiz-page .quiz-header .accedi { font-size: 14px; min-height: 44px; }
  .quiz-page .quiz-header .lang { border: 0; padding: 0; gap: 2px; }
  .quiz-page .quiz-header .lang button { min-width: 44px; height: 44px; font-size: 14px; }
  .quiz { padding: 24px var(--pad) 48px; min-height: 650px; }
  .quiz__stages { font-size: 13px; margin-bottom: 28px; }
  .quiz__stages li { width: 72px; }
  .quiz__stage-button { min-height: 50px; padding-bottom: 24px; }
  .quiz__stages::before { left: 36px; right: 36px; bottom: 8px; }
  .quiz__stage-button::after { width: 16px; height: 16px; left: calc(50% - 8px); }
  .quiz__screen > .quiz__eyebrow { font-size: 11px; }
  .quiz h1 { font-size: 32px; line-height: 1.08; margin-bottom: 16px; }
  .quiz__help { font-size: 16px; }
  .quiz__form { margin-top: 24px; }
  .quiz__option { font-size: 16px; padding: 16px 12px; gap: 14px; min-height: 64px; }
  .quiz__option-price { font-size: 14px; }
  .quiz__actions { flex-wrap: wrap; align-items: stretch; margin-top: 28px; gap: 16px; }
  .quiz__pace { width: 100%; font-size: 14px; }
  .quiz__actions .fu-btn { min-width: 0; flex: 1; font-size: 16px; min-height: 54px; }
  .quiz__text-button { font-size: 14px; }
  .quiz__buy { width: 100%; }
  .quiz__details { margin: 18px 0 0; }
  .quiz__result-actions { justify-content: space-between; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .quiz__option { transition: none; } }
