/* test.css — Estilos propios del test. Extiende brand.css sin tocarlo,
   porque brand.css lo comparte con la landing /consulta. */

body {
  background:
    radial-gradient(1100px 520px at 12% -8%, #fff4e8 0%, transparent 60%),
    radial-gradient(900px 460px at 92% 4%, #f3f6ff 0%, transparent 58%),
    linear-gradient(180deg, var(--cream) 0%, #f4efe6 100%);
  background-attachment: fixed;
}

/* ── Cabecera ─────────────────────────────────────────────────────────────── */
header.bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap; font-size: .95rem;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .18);
  position: sticky; top: 0; z-index: 20;
}
header.bar .marca { letter-spacing: 1.2px; }
header.bar .marca b { color: var(--red); }
header.bar .sep { opacity: .35; }
header.bar .sub { font-weight: 500; opacity: .82; }

/* ── Progreso ─────────────────────────────────────────────────────────────── */
.progreso { margin: 22px 0 18px; }
.progreso .barra {
  height: 6px; background: #e6e0d5; border-radius: 999px; overflow: hidden; margin-bottom: 8px;
}
.progreso .barra i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--red), #ef6b46);
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

/* ── Tarjetas ─────────────────────────────────────────────────────────────── */
.card {
  animation: entra .38s cubic-bezier(.2, .8, .3, 1) both;
  transition: box-shadow .25s ease;
}
.card:hover { box-shadow: 0 10px 34px rgba(0, 0, 0, .10); }
.card.destacada { border-left: 4px solid var(--red); }
.card.cta { background: linear-gradient(160deg, #fff 0%, #fff8f4 100%); }
@keyframes entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── Campos ───────────────────────────────────────────────────────────────── */
.campo { margin: 20px 0; }
.campo:first-child { margin-top: 4px; }
label { display: flex; align-items: center; gap: 8px; }
input.apagado { opacity: .4; background: #f6f4f0; pointer-events: none; }

/* «No lo sé» — presente en cada campo, por regla de Johan. Discreto pero siempre visible. */
label.nose {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 500; font-size: .85rem; color: var(--muted);
  margin: 8px 0 0; cursor: pointer; user-select: none;
}
label.nose input { width: auto; margin: 0; accent-color: var(--red); }
label.nose:hover { color: var(--ink); }
label.consent {
  font-size: .92rem; line-height: 1.5; align-items: flex-start;
  color: var(--ink); font-weight: 500; margin: 18px 0 4px;
}
label.consent input { margin-top: 3px; flex: 0 0 auto; }

.sangria {
  margin-left: 4px; padding: 4px 0 4px 18px;
  border-left: 3px solid var(--line);
  animation: entra .3s ease both;
}

/* ── Ayudas emergentes (texto, nunca audio: el test irá en varios idiomas) ── */
.ayuda { display: inline-flex; position: relative; }
.ayuda-btn {
  width: 19px; height: 19px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800;
  line-height: 19px; padding: 0; opacity: .5; transition: opacity .2s, transform .2s;
}
.ayuda-btn:hover { opacity: 1; transform: scale(1.12); }
.ayuda-cuerpo {
  position: absolute; top: 26px; left: -6px; z-index: 10; width: min(330px, 78vw);
  background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 14px;
  font-size: .85rem; font-weight: 400; line-height: 1.5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28); animation: entra .2s ease both;
}
.ayuda-cuerpo::before {
  content: ""; position: absolute; top: -5px; left: 12px;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-bottom: 6px solid var(--ink);
}

/* ── Opciones ─────────────────────────────────────────────────────────────── */
.choice { transition: border-color .18s, background .18s, transform .12s; }
.choice:active { transform: scale(.985); }
.choice.sel { box-shadow: inset 0 0 0 1px var(--red); }

/* ── Navegación ───────────────────────────────────────────────────────────── */
.row.nav { margin: 26px 0 10px; gap: 12px; }
.row.nav .btn-ghost { flex: 0 0 auto; min-width: 110px; }
.row.nav .btn-primary { flex: 1; }

/* ── Resultado ────────────────────────────────────────────────────────────── */
.veredicto {
  border-radius: var(--radius); padding: 30px 28px; margin: 22px 0 6px; color: #fff;
  box-shadow: var(--shadow); animation: entra .45s cubic-bezier(.2, .8, .3, 1) both;
}
.veredicto h1 { margin: 0 0 .35em; font-size: clamp(1.4rem, 3.6vw, 2rem); }
.veredicto p { margin: 0; opacity: .93; }
.veredicto.ok { background: linear-gradient(140deg, #1f7a4d 0%, #2fa268 100%); }
.veredicto.atencion { background: linear-gradient(140deg, #9a5b12 0%, #c8862c 100%); }
.veredicto.neutro { background: linear-gradient(140deg, #3a3d45 0%, #5c616d 100%); }

ol.crono { margin: 0; padding-left: 20px; }
ol.crono li { margin: 9px 0; line-height: 1.5; }
ol.crono b { font-variant-numeric: tabular-nums; }

.aviso {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font-size: .93rem;
}
.centro { text-align: center; }
.disclaimer { text-align: center; max-width: 58ch; margin: 22px auto 0; }
.spinner.oscuro { border-color: #d8d3c9; border-top-color: var(--red); }

@media (max-width: 560px) {
  /* En dos líneas el "·" queda colgando al final de la primera. */
  header.bar { gap: 2px; line-height: 1.35; }
  header.bar .sep { display: none; }
  header.bar .sub { font-size: .88rem; }
  .row.nav { flex-direction: column-reverse; }
  .row.nav .btn { width: 100%; }
  .ayuda-cuerpo { left: auto; right: -6px; }
  .ayuda-cuerpo::before { left: auto; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, .card, .veredicto { animation: none !important; transition: none !important; }
}
