/* SwissFixa · quiz "Quanto sei Fixa?" — si appoggia a tokens.css + site.css + soon.css */
.qz-body { min-height: 100dvh; display: flex; flex-direction: column; }
.qz { flex: 1; width: min(860px, 100% - 32px); margin-inline: auto; padding: clamp(12px, 3vw, 32px) 0 clamp(40px, 6vw, 72px); }
.qz-noscript { padding: 24px; border-radius: 20px; background: var(--surface-container); }
.qz__stage { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .qz__stage.is-in > * { animation: qz-in 520ms var(--ease-emphasized-decel, cubic-bezier(.05,.7,.1,1)) both; }
}
@keyframes qz-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- introduzione ---------- */
.qz-intro { display: grid; justify-items: center; text-align: center; padding-top: clamp(8px, 2vw, 24px); }
.qz-intro__deck { position: relative; width: 240px; height: 170px; margin-bottom: 8px; }
.qz-deck { position: absolute; left: 50%; bottom: 0; width: 96px; height: 132px; margin-left: -48px; display: grid; align-content: start; padding: 12px 14px; border-radius: 18px; background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; font-size: 30px; font-weight: 800; box-shadow: var(--card-stack), 0 14px 30px -14px rgba(42,15,110,.55); transform-origin: 50% 120%; transform: rotate(calc((var(--k) - 1.5) * 13deg)) translateY(calc(var(--k) * 0px)); }
.qz-deck::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(120deg, rgba(255,255,255,.26), rgba(255,255,255,0) 45%); }
@media (prefers-reduced-motion: no-preference) {
  .qz-deck { animation: qz-fan 900ms var(--ease-emphasized-decel, cubic-bezier(.05,.7,.1,1)) both; animation-delay: calc(var(--k) * 70ms); }
}
@keyframes qz-fan { from { transform: rotate(0) translateY(30px); opacity: 0; } }
.qz-intro__t { margin: 18px 0 0; font-size: clamp(46px, 9vw, 88px); line-height: .98; letter-spacing: -.05em; font-weight: 800; text-wrap: balance; }
.qz-intro__t .ln--accent { background: linear-gradient(100deg, var(--hero-start) 10%, var(--hero-end) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qz-intro__t .ln--accent { background-image: linear-gradient(100deg, #b2a8ff 10%, #ff9cc6 75%); } }
.qz-intro__lead { margin: 18px 0 0; max-width: 40ch; font-size: clamp(17px, 2vw, 20px); color: var(--on-surface-variant); text-wrap: pretty; }
.qz-rules { display: grid; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; text-align: left; max-width: 460px; width: 100%; }
.qz-rules li { position: relative; padding: 12px 16px 12px 48px; border-radius: 16px; background: var(--surface-container-low); box-shadow: inset 0 0 0 1px var(--outline-variant); font-size: 15.5px; line-height: 1.4; }
.qz-rules li::before { content: ""; position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 7px; background: linear-gradient(135deg, var(--hero-start), var(--hero-end)); }
.qz-rules li::after { content: ""; position: absolute; left: 22px; top: 50%; width: 8px; height: 4.5px; margin-top: -4px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.qz-intro__cta { display: grid; justify-items: center; gap: 16px; margin-top: 28px; }
.qz-play { min-height: 60px; padding: 0 40px; font-size: 19px; }
.qz-switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; color: var(--on-surface-variant); cursor: pointer; }
.qz-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qz-switch__ui { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--surface-container-highest); box-shadow: inset 0 0 0 2px var(--outline); transition: background-color 200ms; }
.qz-switch__ui::after { content: ""; position: absolute; left: 7px; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--outline); transition: transform 200ms var(--ease-standard), width 200ms, height 200ms, left 200ms, top 200ms, background-color 200ms; }
.qz-switch input:checked + .qz-switch__ui { background: var(--primary); box-shadow: none; }
.qz-switch input:checked + .qz-switch__ui::after { left: 4px; top: 4px; width: 20px; height: 20px; background: var(--on-primary); transform: translateX(18px); }
.qz-switch input:focus-visible + .qz-switch__ui { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.qz-fine { margin: 18px 0 0; font-size: 14px; color: var(--on-surface-variant); max-width: 46ch; }

/* ---------- domanda ---------- */
.qz-hud { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qz-step { font-weight: 800; font-size: 20px; letter-spacing: -.02em; white-space: nowrap; }
.qz-step small, .qz-score small { font-size: 14px; font-weight: 600; color: var(--on-surface-variant); letter-spacing: 0; }
.qz-score { white-space: nowrap; }
.qz-score b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.qz-dots { display: flex; gap: 5px; flex: 1; justify-content: center; max-width: 320px; }
.qz-dots i { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-container-highest); }
.qz-dots i.is-s { background: color-mix(in srgb, var(--tertiary) 22%, var(--surface-container-highest)); }
.qz-dots i.is-done { background: var(--primary); }
.qz-dots i.is-now { background: linear-gradient(90deg, var(--hero-start), var(--hero-end)); }
.qz-timer { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.qz-timer::before { content: ""; position: absolute; left: 0; right: 52px; height: 10px; border-radius: 10px; background: var(--surface-container-high); }
.qz-timer__bar { position: relative; flex: 1; height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--hero-start), var(--hero-end)); transform-origin: left; will-change: transform; }
.qz-timer__n { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-container-high); font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.qz-timer.is-low .qz-timer__n { background: var(--warning-container); color: var(--on-warning-container); }
@media (prefers-reduced-motion: no-preference) { .qz-timer.is-low:not(.is-stop) .qz-timer__n { animation: qz-pulse 1s ease-in-out infinite; } }
@keyframes qz-pulse { 50% { transform: scale(1.1); } }
.qz-timer.is-stop .qz-timer__bar { opacity: .45; }
.qz-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 0; font-size: 14px; font-weight: 700; color: var(--primary); }
.qz-q--survey .qz-tag { color: var(--tertiary); }
.qz-fire { padding: 2px 10px; border-radius: 999px; background: var(--peach); color: #4a2400; font-size: 13px; }
.qz-d { margin: 8px 0 0; font-size: clamp(24px, 4.2vw, 38px); line-height: 1.14; letter-spacing: -.03em; font-weight: 750; text-wrap: balance; min-height: 2.28em; }
.qz-ans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.qz-a { position: relative; isolation: isolate; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; min-height: 92px; padding: 16px 18px; border: 0; border-radius: 22px; background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; font: inherit; font-size: 17px; font-weight: 650; line-height: 1.3; text-align: left; cursor: pointer; box-shadow: var(--card-stack), 0 12px 26px -16px rgba(42,15,110,.6); transition: transform 200ms var(--ease-standard), opacity 300ms, filter 300ms, box-shadow 200ms; }
.qz-a::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(120deg, rgba(255,255,255,.24), rgba(255,255,255,0) 42%); }
.qz-a:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--card-stack), 0 18px 32px -16px rgba(42,15,110,.7); }
.qz-a:active:not(:disabled) { transform: scale(.98); }
.qz-a:disabled { cursor: default; }
.qz-a__l { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.2); font-weight: 800; font-size: 17px; }
.qz-a__m { width: 30px; height: 30px; border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .qz-a { animation: qz-deal 460ms var(--ease-emphasized-decel, cubic-bezier(.05,.7,.1,1)) both; animation-delay: calc(120ms + var(--k) * 60ms); }
}
@keyframes qz-deal { from { opacity: 0; transform: translateY(22px) scale(.96); } }
.qz-a.is-dim { opacity: .35; filter: saturate(.5); }
.qz-a.is-wrong { opacity: .7; }
.qz-a.is-right, .qz-a.is-pick { box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--primary), 0 18px 32px -16px rgba(42,15,110,.7); }
.qz-a.is-right .qz-a__m, .qz-a.is-pick .qz-a__m { background: #fff no-repeat center / 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%231b7347' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.qz-a.is-pick .qz-a__m { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%234f3fe0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.qz-a.is-wrong .qz-a__m { background: #fff no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' fill='none' stroke='%23b3261e' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: no-preference) { .qz-a.is-right, .qz-a.is-pick { animation: qz-pop 420ms var(--ease-emphasized-decel, cubic-bezier(.05,.7,.1,1)); } .qz-a.is-wrong { animation: qz-shake 380ms ease; } }
@keyframes qz-pop { 40% { transform: scale(1.03); } }
@keyframes qz-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* ---------- riscontro ---------- */
.qz-fb { margin-top: 18px; }
.qz-fb:empty { display: none; }
.qz-fb__card { display: grid; gap: 10px; padding: 20px 22px 22px; border-radius: 24px; background: var(--surface-container-low); box-shadow: inset 0 0 0 1px var(--outline-variant), var(--elevation-2); }
@media (prefers-reduced-motion: no-preference) { .qz-fb.is-on .qz-fb__card { animation: qz-in 420ms var(--ease-emphasized-decel, cubic-bezier(.05,.7,.1,1)) both; } }
.qz-fb__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.qz-fb__head b { font-size: 26px; letter-spacing: -.025em; }
.qz-fb__head.is-ok b { color: var(--success); }
.qz-fb__head.is-ko b { color: var(--on-surface); }
.qz-fb__head.is-s b { color: var(--tertiary); }
.qz-plus { font-weight: 800; font-size: 20px; color: var(--primary); font-variant-numeric: tabular-nums; }
.qz-plus small { font-size: 13px; font-weight: 600; color: var(--on-surface-variant); }
.qz-fb__right { margin: 0; font-size: 16px; }
.qz-fb__why { margin: 0; color: var(--on-surface-variant); font-size: 16px; line-height: 1.5; }
.qz-fb__src { margin: 0; font-size: 13.5px; color: var(--on-surface-variant); }
.qz-fb__sub { margin: 0; font-size: 15.5px; }
.qz-next { justify-self: end; margin-top: 6px; }
.qz-bars { display: grid; gap: 12px; margin: 4px 0 0; padding: 0; list-style: none; }
.qz-bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 15px; }
.qz-bars li.is-me .qz-bars__t { font-weight: 700; }
.qz-bars em { font-style: normal; color: var(--primary); }
.qz-bars__p { font-weight: 800; font-variant-numeric: tabular-nums; }
.qz-bars__b { grid-column: 1 / -1; height: 12px; border-radius: 12px; background: var(--surface-container-high); overflow: hidden; }
.qz-bars__b i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--g1), var(--g2)); transform-origin: left; transform: scaleX(0); transition: transform 900ms var(--ease-emphasized-decel, cubic-bezier(.05,.7,.1,1)); }
@media (prefers-reduced-motion: reduce) { .qz-bars__b i { transition: none; } }

/* ---------- risultato ---------- */
.qz-res__hero { position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: center; text-align: center; padding: clamp(28px, 5vw, 48px) 20px clamp(26px, 4vw, 40px); border-radius: 32px; background: linear-gradient(135deg, var(--hero-start), var(--hero-end)); color: #fff; box-shadow: var(--hero-glow); }
.qz-res__hero::before { content: ""; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; right: -20%; top: -50%; border-radius: 50%; background: radial-gradient(circle, rgba(255,211,168,.5), rgba(255,211,168,0) 65%); }
.qz-res__kick { margin: 0; font-weight: 700; font-size: 15px; opacity: .92; }
.qz-res__pts { margin: 4px 0 0; line-height: 1; }
.qz-res__pts b { font-size: clamp(64px, 13vw, 116px); font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.qz-res__pts small { font-size: 20px; font-weight: 600; }
.qz-res__lv { margin: 14px 0 0; padding: 8px 22px; border-radius: 999px; background: var(--peach); color: #2a0718; font-size: clamp(20px, 3vw, 26px); letter-spacing: -.02em; }
.qz-res__ok { margin: 14px 0 0; font-weight: 600; font-size: 17px; }
.qz-res__cmp { margin: 4px 0 0; font-size: 15.5px; opacity: .95; min-height: 1.5em; }
.qz-res__p { margin: 22px auto 0; max-width: 52ch; text-align: center; font-size: 17.5px; color: var(--on-surface-variant); text-wrap: pretty; }
.qz-res__grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: start; margin-top: 30px; }
.qz-card { margin: 0; }
.qz-card canvas { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 26px; box-shadow: var(--elevation-3); }
.qz-res__act { display: grid; gap: 12px; align-content: start; }
.qz-res__act .btn { width: 100%; }
.qz-res__msg { margin: 0; min-height: 1.4em; font-size: 14.5px; font-weight: 600; color: var(--primary); word-break: break-word; }
.qz-join { display: grid; gap: 12px; margin-top: 6px; padding: 20px; border-radius: 24px; background: linear-gradient(135deg, #20168a, #6d1a48); color: #fff; }
.qz-join p { margin: 0; }

@media (max-width: 640px) {
  .qz-ans { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .qz-a { min-height: 66px; padding: 12px 14px; font-size: 16.5px; border-radius: 18px; }
  .qz-d { min-height: 0; }
  .qz-dots { display: none; }
  .qz-res__grid { grid-template-columns: minmax(0, 1fr); }
  .qz-card { max-width: 240px; margin-inline: auto; order: 2; }
  .qz-next { justify-self: stretch; }
}

/* barra in alto sempre leggibile (la pagina quiz non carica soon.js) */
.qz-body .nav { background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--outline-variant); }
.qz-intro .hero__kicker { position: relative; z-index: 1; margin-top: 14px; }
