/* Storm . formulário de diagnóstico em etapas */
.quiz { position: relative; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 28px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.65); min-height: 520px; display: flex; flex-direction: column; }
@media (min-width: 768px) { .quiz { padding: 40px; } }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.quiz-back { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--ink-2); transition: background-color var(--t-fast), color var(--t-fast); flex: none; }
.quiz-back:hover { background: var(--bg-2); color: var(--ink); }
.quiz-back .icon { width: 20px; height: 20px; }
.quiz-progress { flex: 1; height: 6px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.quiz-progress i { display: block; height: 100%; width: var(--p, 16.6%); background: var(--raio); border-radius: 6px; transition: width var(--t-ui) var(--ease-out); }
.quiz-count { font-family: var(--font-display); font-weight: 600; font-size: .85rem; color: var(--muted); min-width: 48px; text-align: right; }

.q { border: 0; display: none; gap: 12px; }
.q.active { display: grid; animation: qin 320ms var(--ease-out); }
.q.back { animation-name: qback; }
@keyframes qin { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes qback { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.q legend { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 2.4vw, 1.8rem); letter-spacing: -.02em; line-height: 1.2; margin-bottom: 18px; text-wrap: balance; }

.opt { position: relative; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; font-size: 1.04rem; color: var(--ink); transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast); }
.opt:hover { border-color: var(--accent); background: rgba(76,141,255,.06); }
.opt:active { transform: scale(.99); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .key { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: .82rem; color: var(--muted); flex: none; transition: all var(--t-fast); }
.opt:has(input:checked) { border-color: var(--accent); background: rgba(26,99,240,.14); }
.opt:has(input:checked) .key { background: var(--raio); border-color: var(--raio); color: #fff; }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: .95rem; }
.field label span { color: var(--accent); }
.field input { min-height: 54px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--ink); font: inherit; font-size: 1rem; transition: border-color var(--t-fast); }
.field input::placeholder { color: #5C7090; }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.field.invalid input { border-color: var(--danger); }
.err { color: var(--danger); font-size: .88rem; min-height: 0; }
.err:empty { display: none; }
.q-contact { gap: 16px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--raio); flex: none; }

.quiz-actions { display: flex; align-items: center; gap: 18px; margin-top: auto; padding-top: 28px; }
.quiz-next:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.quiz-next.loading { pointer-events: none; }
.quiz-next.loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.quiz-hint { font-size: .85rem; color: var(--muted); }
.quiz-hint kbd { font-family: var(--font-text); font-size: .8rem; border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 7px; }
@media (max-width: 520px) { .quiz-hint { display: none; } .quiz-actions .btn { width: 100%; } }

.quiz-done { display: grid; gap: 16px; justify-items: start; margin: auto 0; animation: qin 400ms var(--ease-out); outline: none; }
.done-ic { width: 64px; height: 64px; border-radius: 50%; background: rgba(76,201,160,.14); color: var(--success); display: grid; place-items: center; }
.done-ic .icon { width: 30px; height: 30px; stroke-width: 2.4; }
.quiz-done h3 { font-size: 1.8rem; }
.quiz-done p { color: var(--ink-2); max-width: 46ch; }
.quiz.finished .quiz-top, .quiz.finished .q, .quiz.finished .quiz-actions { display: none; }
