/* =========================================================
   Diagnóstico em etapas (estilo "uma pergunta por vez")
   ========================================================= */

/* Cartão que chama para o diagnóstico (final da página) */
.start-card {
  padding: 32px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(35, 65, 134, .55), rgba(19, 41, 94, .75));
  border: 1px solid rgba(251, 191, 36, .35); box-shadow: var(--shadow);
}
.start-card h3 { font-size: 24px; line-height: 1.2; margin: 16px 0 10px; }
.start-card__list { list-style: none; padding: 0; margin: 4px 0 24px; display: grid; gap: 10px; }
.start-card__list li { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 15px; }
.start-card__list li::before { content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: rgba(251, 191, 36, .16); color: var(--gold); }
.start-card small { display: block; margin-top: 14px; color: var(--muted); font-size: 12px; opacity: .8; }

/* Janela em tela cheia */
html.quiz-open, html.quiz-open body { overflow: hidden; }
.quiz {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0;
  color: #f8fafc; font-family: var(--font);
  background:
    radial-gradient(70% 50% at 85% 0%, rgba(251, 191, 36, .12), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(56, 189, 248, .08), transparent 70%),
    linear-gradient(180deg, #0d2050, #13295e);
}
.quiz[open] { display: flex; flex-direction: column; animation: quiz-in .45s var(--ease); }
.quiz::backdrop { background: #0a1838; }
@keyframes quiz-in { from { opacity: 0; transform: translateY(24px); } }

.quiz__top {
  display: grid; grid-template-columns: 44px 1fr auto 44px; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px; max-width: 860px; width: 100%; margin: 0 auto;
}
.quiz__logo { width: 46px; height: auto; }
.quiz__count { font-size: 13px; font-weight: 700; color: #b6c2dc; letter-spacing: .04em; }
.quiz__icon {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05); color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.quiz__icon:hover { border-color: #fbbf24; background: rgba(251, 191, 36, .1); }
.quiz__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.quiz__progress { height: 4px; background: rgba(255, 255, 255, .08); }
.quiz__progress i {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #f59e0b, #fbbf24); box-shadow: 0 0 12px rgba(251, 191, 36, .6);
  transition: transform .6s var(--ease);
}

.quiz__stage { flex: 1; overflow-y: auto; display: flex; -webkit-overflow-scrolling: touch; }
.quiz__step {
  width: min(720px, 100% - 32px); margin: auto; padding: 32px 0 calc(48px + env(safe-area-inset-bottom));
  animation: step-in .5s var(--ease) both;
}
.quiz__step.is-back { animation-name: step-back; }
.quiz__step.is-shake { animation: shake .4s; }
@keyframes step-in { from { opacity: 0; transform: translateY(36px); } }
@keyframes step-back { from { opacity: 0; transform: translateY(-36px); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.quiz__num { font-size: 14px; font-weight: 700; color: #fbbf24; margin: 0 0 10px; letter-spacing: .04em; }
.quiz__num span { margin-left: 4px; }
.quiz__q { font-family: var(--serif); font-size: clamp(26px, 4.4vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 12px; text-wrap: balance; }
.quiz__hint { color: #b6c2dc; font-size: 17px; margin: 0 0 24px; }

.quiz__input {
  width: 100%; font: 500 clamp(20px, 3vw, 26px) var(--font); color: #fff; padding: 10px 2px; margin-top: 18px;
  background: transparent; border: 0; border-bottom: 2px solid rgba(251, 191, 36, .35); border-radius: 0;
  transition: border-color .2s;
}
.quiz__input::placeholder { color: rgba(182, 194, 220, .45); }
.quiz__input:focus { outline: none; border-color: #fbbf24; }
.quiz__textarea { resize: vertical; min-height: 120px; font-size: 19px; line-height: 1.5; border: 1px solid rgba(251, 191, 36, .35); border-radius: 14px; padding: 14px 16px; background: rgba(10, 24, 56, .4); }
.quiz__other { font-size: 18px; margin-top: 14px; }

.quiz__options { display: grid; gap: 10px; margin-top: 8px; }
.quiz__opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: 14px; font: 600 16px/1.35 var(--font); color: #f8fafc;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14);
  transition: background .2s, border-color .2s, transform .15s;
}
.quiz__opt:hover { border-color: rgba(251, 191, 36, .6); background: rgba(251, 191, 36, .08); }
.quiz__opt:active { transform: scale(.99); }
.quiz__key {
  flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fbbf24; border: 1px solid rgba(251, 191, 36, .5);
  transition: background .2s, color .2s;
}
.quiz__label { flex: 1; }
.quiz__tick { flex: none; width: 22px; height: 22px; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease); }
.quiz__tick svg { width: 100%; height: 100%; fill: none; stroke: #fbbf24; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.quiz__opt.is-on { background: rgba(251, 191, 36, .14); border-color: #fbbf24; }
.quiz__opt.is-on .quiz__key { background: #fbbf24; color: #0b1020; }
.quiz__opt.is-on .quiz__tick { opacity: 1; transform: none; }
.quiz__opt.is-on:not(.is-multi *) { animation: pick .32s; }
@keyframes pick { 50% { transform: scale(1.015); } }

.quiz__err { min-height: 1.4em; margin: 12px 0 0; color: #fca5a5; font-size: 15px; font-weight: 600; }
.quiz__actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.quiz__enter { font-size: 13px; color: #b6c2dc; }
@media (hover: none) { .quiz__enter { display: none; } }

/* Provas sociais no meio do diagnóstico */
.quiz__proof { text-align: center; }
.quiz__proof .chip { display: inline-block; font-size: 13px; }
.quiz__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.quiz__stats div { padding: 16px 12px; border-radius: 16px; background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .35); }
.quiz__stats b { display: block; font-family: var(--serif); font-size: clamp(24px, 5vw, 34px); color: #fbbf24; line-height: 1.1; }
.quiz__stats span { font-size: 14px; color: #dbe3f3; }
.quiz__shot { margin: 0 auto 20px; max-width: 360px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); background: #fff; }
.quiz__shot img { width: 100%; max-height: 38vh; object-fit: contain; }
.quiz__shot--sm img { max-height: 26vh; object-fit: cover; object-position: top; }
.quiz__quote { font-family: var(--serif); font-size: clamp(19px, 3vw, 24px); line-height: 1.45; margin: 22px 0; color: #fff; }
.quiz__quote cite { display: block; margin-top: 12px; font: 600 14px var(--font); color: #fbbf24; font-style: normal; }
.quiz__proof .quiz__actions { justify-content: center; }

/* Tela final */
.quiz__final { text-align: center; }
.quiz__done {
  width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center;
  background: #fbbf24; box-shadow: 0 0 0 10px rgba(251, 191, 36, .15), 0 0 50px rgba(251, 191, 36, .45);
  animation: pop .6s var(--ease) both;
}
.quiz__done svg { width: 44px; height: 44px; fill: none; stroke: #0b1020; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: tick .5s .35s forwards; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes tick { to { stroke-dashoffset: 0; } }
.quiz__restart { display: block; margin: 18px auto 0; background: none; border: 0; color: #b6c2dc; font: 600 14px var(--font); text-decoration: underline; cursor: pointer; }

@media (max-width: 600px) {
  .quiz__step { padding-top: 22px; }
  .quiz__opt { padding: 13px 14px; font-size: 15px; }
  .quiz__hint { font-size: 16px; }
  .quiz .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .quiz[open], .quiz__step, .quiz__done, .quiz__done svg { animation: none !important; }
  .quiz__done svg { stroke-dashoffset: 0; }
}
.quiz__final .quiz__hint b { white-space: nowrap; color: #fff; }

/* Antes e depois, lado a lado */
.quiz__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 auto 8px; max-width: 560px; }
.quiz__zoomable { position: relative; padding: 0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; overflow: hidden; background: #fff; cursor: zoom-in; transition: border-color .2s, transform .2s; }
.quiz__zoomable:hover { border-color: #fbbf24; transform: translateY(-2px); }
.quiz__zoomable img { width: 100%; height: auto; display: block; }
.quiz__zoomable span { position: absolute; left: 8px; top: 8px; padding: 3px 10px; border-radius: 99px; font: 800 11px var(--font); letter-spacing: .06em; text-transform: uppercase; background: #0d2050; color: #fbbf24; }
.quiz__tap { font-size: 13px; color: #b6c2dc; margin: 0 0 14px; }
.quiz__zoom { position: fixed; inset: 0; z-index: 10; background: rgba(5, 12, 30, .94); display: grid; place-items: center; padding: 16px; overflow: auto; cursor: zoom-out; animation: quiz-in .25s var(--ease); }
.quiz__zoom img { max-width: min(100%, 640px); height: auto; border-radius: 12px; }
.quiz__zoom .quiz__icon { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 16px; background: rgba(13, 32, 80, .9); }
