/* ==========================================================================
   Assessment — flujo del test ASRS
   ========================================================================== */

.assess-body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }

.assess-top {
  position: sticky; top: 0; z-index: 20; background: rgba(251,250,247,.9);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.assess-top__row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.assess-top .brand__name small { color: var(--ink-mute); }
.assess-exit { font-size: .9rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; font-weight: 500; }
.assess-exit:hover { color: var(--primary); }
.assess-exit svg { width: 16px; height: 16px; }

/* Progress */
.progress { height: 5px; background: var(--line); position: relative; }
.progress__bar { height: 100%; background: var(--primary); width: 0; transition: width .35s ease; border-radius: 0 4px 4px 0; }

.assess-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px 80px; }
.assess-card {
  width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 40px;
}

.step-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.step-tag { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--primary); }
.step-count { font-size: .84rem; color: var(--ink-mute); font-weight: 500; }

.q-title { font-size: 1.5rem; line-height: 1.3; margin: 6px 0 6px; }
.q-help { color: var(--ink-soft); font-size: .96rem; margin-bottom: 26px; }

/* Opciones tipo Likert */
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: 16px 18px; font-size: 1rem; color: var(--ink); font-weight: 500;
  transition: all .14s ease;
}
.opt:hover { border-color: var(--primary); background: var(--primary-soft); }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(18,119,107,.12); }
.opt__dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.opt.sel .opt__dot { border-color: var(--primary); background: var(--primary); }
.opt.sel .opt__dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.opt__label { flex: 1; }
.opt__k { font-size: .78rem; color: var(--ink-mute); font-weight: 600; }

/* Navegación */
.assess-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.assess-nav .btn--ghost svg { transform: rotate(180deg); }
.link-back { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-weight: 500; font-size: .95rem; background: none; }
.link-back:hover { color: var(--primary); }
.link-back svg { width: 17px; height: 17px; }

/* Intro / eligibility */
.intro-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; margin-bottom: 22px; }
.intro-icon svg { width: 32px; height: 32px; }
.intro-list { list-style: none; display: grid; gap: 14px; margin: 24px 0 30px; }
.intro-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .97rem; color: var(--ink-soft); }
.intro-list svg { width: 20px; height: 20px; color: var(--primary); flex: none; margin-top: 3px; }
.choice-grid { display: grid; gap: 12px; }

/* Formulario de contacto */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field label .req { color: var(--danger); }
.field input, .field select {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); transition: border .14s ease;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(18,119,107,.12); }
.field .hint { font-size: .82rem; color: var(--ink-mute); margin-top: 6px; }
.field.err input { border-color: var(--danger); }
.field .err-msg { font-size: .82rem; color: var(--danger); margin-top: 6px; display: none; }
.field.err .err-msg { display: block; }
.phone-row { display: grid; grid-template-columns: 108px 1fr; gap: 10px; }
.consent { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 6px 0 8px; }
.consent input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--primary); }
.consent label { font-size: .88rem; color: var(--ink-soft); font-weight: 400; line-height: 1.5; }
.consent a { color: var(--primary); text-decoration: underline; }

/* Loading */
.assess-loading { text-align: center; padding: 30px 0; }
.spinner { width: 46px; height: 46px; border: 4px solid var(--line); border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 22px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Resultado */
.result-hero { text-align: center; padding: 8px 0 6px; }
.result-badge { display: inline-flex; align-items: center; gap: 9px; padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: .92rem; margin-bottom: 18px; }
.result-badge svg { width: 18px; height: 18px; }
.result-badge--high { background: var(--accent-soft); color: #9a5a12; }
.result-badge--mid { background: #FFF4D6; color: #8a6a12; }
.result-badge--low { background: var(--primary-soft); color: var(--primary-dark); }
.result-hero h1 { font-size: 1.9rem; margin-bottom: 10px; }
.result-hero p { max-width: 460px; margin: 0 auto; }

.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0; }
.score-cell { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px; text-align: center; }
.score-cell b { font-family: var(--font-head); font-size: 1.7rem; color: var(--primary-dark); display: block; line-height: 1; }
.score-cell span { font-size: .78rem; color: var(--ink-soft); display: block; margin-top: 6px; }
.score-bar { height: 8px; border-radius: 6px; background: var(--line); margin-top: 10px; overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }

.wa-confirm { display: flex; align-items: center; gap: 12px; background: #E9F9EF; border: 1px solid #B8E8C9; border-radius: var(--radius); padding: 15px 18px; margin: 20px 0; font-size: .92rem; color: #17663a; }
.wa-confirm svg { width: 24px; height: 24px; flex: none; color: #25D366; }

.result-cta { background: var(--ink); border-radius: var(--radius); padding: 26px; text-align: center; color: #fff; margin-top: 8px; }
.result-cta h3 { color: #fff; font-size: 1.25rem; margin-bottom: 8px; }
.result-cta p { color: #C7CFCC; font-size: .93rem; margin-bottom: 18px; }
.result-note { font-size: .82rem; color: var(--ink-mute); text-align: center; margin-top: 22px; line-height: 1.5; }

.autofill-dev { position: fixed; bottom: 14px; right: 14px; z-index: 40; font-size: .74rem; opacity: .5; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink-mute); }
.autofill-dev:hover { opacity: 1; }

@media (max-width: 560px) {
  .assess-card { padding: 26px 20px; }
  .q-title { font-size: 1.28rem; }
  .score-grid { grid-template-columns: 1fr; }
  .phone-row { grid-template-columns: 96px 1fr; }
}
