/* Página de diagnóstico: formulário em etapas + resultado */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.diag-page { background: var(--cream); }
.diag-back { padding: 10px 18px; font-size: .88rem; }
.diag-main { padding-top: calc(var(--header-h) + 40px); padding-bottom: 80px; position: relative; overflow: hidden; }
.diag-main::before { content: ""; position: absolute; left: -20%; top: -10%; width: 70vw; height: 70vw; border-radius: 50%; background: radial-gradient(circle, rgba(217, 183, 126, .25), transparent 65%); pointer-events: none; }
.diag-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 5vw, 70px); align-items: start; position: relative; }
.diag-intro { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-h) + 30px); min-width: 0; }
.diag-intro h1 { font-size: clamp(2.4rem, 4.6vw, 3.8rem); line-height: 1; }
.diag-intro h1 em { color: var(--gold-deep); }
.diag-intro > p { color: var(--muted); }
.diag-benefits { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-weight: 600; font-size: .95rem; }
.diag-benefits li { display: flex; gap: 10px; align-items: center; }
.diag-benefits li::before { content: "✓"; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-size: .75rem; flex: none; }
.diag-photo { width: 180px; aspect-ratio: 3 / 4; border-radius: 999px 999px 14px 14px; overflow: hidden; box-shadow: var(--shadow); }
.diag-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }

.diag-card { background: var(--paper); border-radius: 24px; padding: clamp(22px, 4vw, 44px); box-shadow: 0 30px 80px -40px rgba(42, 29, 20, .5); border: 1px solid var(--line); min-width: 0; }
.steps-nav { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.steps-nav li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.steps-nav span { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; transition: background-color .4s, color .4s, border-color .4s; }
.steps-nav li.active, .steps-nav li.done { color: var(--ink); }
.steps-nav li.active span { background: var(--gold); border-color: var(--gold); color: #fff; }
.steps-nav li.done span { background: var(--espresso); border-color: var(--espresso); color: var(--cream); }
.step-bar { height: 4px; background: var(--cream-2); border-radius: 4px; overflow: hidden; margin-bottom: 28px; }
.step-bar i { display: block; height: 100%; width: 25%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft)); transition: width .6s var(--ease); }

#diag-form { display: flex; flex-direction: column; gap: 18px; }
.dstep { border: 0; padding: 0; margin: 0; display: none; flex-direction: column; gap: 16px; min-width: 0; }
.dstep.active { display: flex; animation: step-in .55s var(--ease) both; }
.dstep legend { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 600; line-height: 1.1; padding: 0; margin-bottom: 6px; }
.step-hint { color: var(--muted); font-size: .92rem; margin-top: -6px; }
@keyframes step-in { from { opacity: 0; transform: translateX(24px); } }

.q { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: border-color .3s, background-color .3s; }
.q.answered { border-color: var(--gold-soft); background: #fffaf2; }
.q[aria-invalid="true"] { border-color: #B4483A; }
.q p { font-weight: 700; font-size: .96rem; }
.q-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.q-opts label { position: relative; cursor: pointer; }
.q-opts input, .chip input { position: absolute; opacity: 0; pointer-events: none; }
.q-opts span { display: block; text-align: center; padding: 10px 8px; border-radius: 10px; border: 1.5px solid var(--line); font-size: .86rem; font-weight: 600; transition: all .25s var(--ease); }
.q-opts label:hover span { border-color: var(--gold-soft); }
.q-opts input:checked + span { background: var(--espresso); border-color: var(--espresso); color: var(--cream); transform: scale(1.03); }
.q-opts input:focus-visible + span, .chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { cursor: pointer; position: relative; }
.chip span { display: inline-block; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line); font-size: .88rem; font-weight: 600; transition: all .25s var(--ease); }
.chip:hover span { border-color: var(--gold-soft); }
.chip input:checked + span { background: var(--gold); border-color: var(--gold); color: #fff; }

.diag-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.diag-actions .btn-gold { margin-left: auto; }
.diag-actions button[disabled] { opacity: .6; cursor: wait; }

/* Resultado */
.result { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; animation: step-in .6s var(--ease) both; }
.result:focus { outline: none; }
.score-wrap { position: relative; width: 180px; height: 180px; }
.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke: var(--cream-2); stroke-width: 10; }
.score-ring .ring { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.6s var(--ease), stroke .4s; }
.score-num { position: absolute; inset: 0; display: grid; place-content: center; font-family: var(--display); }
.score-num b { font-size: 3.6rem; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-num small { font-size: 1rem; color: var(--muted); }
.result h3 { font-size: 2.2rem; }
.result > p { color: var(--muted); max-width: 52ch; }
.result-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; text-align: left; }
.result-cols > div { background: var(--cream); border-radius: 14px; padding: 18px; }
.result-cols h4 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.result-cols ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.result-note { font-size: .88rem; }
.site-footer-mini { padding-block: 24px; }

/* Página legal */
.legal-body { max-width: 780px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.legal-body h1 { font-size: clamp(2.6rem, 5vw, 3.8rem); }
.legal-body h2 { font-size: 1.7rem; margin-top: 18px; }
.legal-body p, .legal-body li { color: var(--muted); }
.legal-body strong { color: var(--ink); }
.legal-body ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal-body a:not(.btn) { color: var(--gold-deep); font-weight: 600; }
.legal-date { font-size: .88rem; }
.legal-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.site-footer-mini .footer-bottom { padding-top: 0; }

@media (max-width: 900px) {
  .diag-grid { grid-template-columns: 1fr; }
  .diag-intro { position: static; }
  .diag-photo { display: none; }
}
@media (max-width: 600px) {
  .steps-nav { font-size: 0; }
  .steps-nav span { font-size: .78rem; }
  .q-opts { grid-template-columns: 1fr; }
  .result-cols { grid-template-columns: 1fr; }
  .diag-back { display: none; }
}
