/* ============ Formulario "Hagamos que pase" ============ */
body.pagina-test { background: var(--blanco); transition: background-color .35s ease; }
body.pagina-test .pie { display: none; }
body.pagina-test.en-resultado .pie { display: block; }
body.pagina-test .cabecera { transition: background-color .35s ease, box-shadow .2s ease; }

.test { width: min(100% - 40px, 600px); margin-inline: auto; min-height: calc(100svh - var(--cabecera)); display: flex; flex-direction: column; }
.test-barra { display: grid; grid-template-columns: 40px 1fr 68px; align-items: center; gap: 10px; padding: 10px 0 6px; }
.test-atras { width: 40px; height: 40px; margin-left: -8px; border: 0; border-radius: 50%; background: none; color: inherit; display: grid; place-items: center; cursor: pointer; }
.test-atras:disabled { visibility: hidden; }
.avance { position: relative; height: 8px; border-radius: 99px; background: var(--rosa-suave); }
.avance-relleno { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: 99px; background: var(--magenta); transition: width .5s cubic-bezier(.3,.7,.2,1); }
.avance-punto { position: absolute; top: 50%; left: var(--p, 0%); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--turquesa); box-shadow: 0 0 0 3px var(--blanco); transition: left .5s cubic-bezier(.3,.7,.2,1); }
.test-cuenta { font-size: 13px; color: var(--gris); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.pantalla { flex: 1; display: flex; flex-direction: column; padding: 18px 0 0; animation: entra .35s ease both; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pregunta { font-size: clamp(26px, 6.6vw, 34px); line-height: 1.12; font-weight: 300; letter-spacing: -0.025em; margin: 6px 0 10px; text-wrap: balance; }
.pregunta b { font-weight: 600; }
.pregunta:focus { outline: none; }
.ayuda { margin: 0 0 22px; color: var(--gris); font-size: 15.5px; }

/* Opciones */
.opciones { display: grid; gap: 10px; }
.opciones.tarjetas { grid-template-columns: 1fr; }
.opcion {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 14px 16px;
  text-align: left; font-size: 16.5px; font-weight: 500; color: var(--tinta);
  background: var(--blanco); border: 1.5px solid var(--linea); border-radius: 20px; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .12s ease;
}
.opcion:active { transform: scale(.985); }
.opcion small { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 400; color: var(--gris); }
.opcion[aria-pressed="true"] { border-color: var(--magenta); background: var(--rosa-suave); }
.opcion:disabled { opacity: .4; cursor: not-allowed; }
.opcion .icono-circulo { width: 52px; height: 52px; }
.opcion .icono-circulo svg { width: 28px; height: 28px; }
.marca-op { flex: none; width: 24px; height: 24px; margin-left: auto; border-radius: 50%; border: 1.5px solid #D9C3CF; display: grid; place-items: center; background: var(--blanco); transition: background-color .15s ease, border-color .15s ease; }
.multiple .marca-op { border-radius: 7px; }
.marca-op svg { width: 14px; height: 14px; opacity: 0; transform: scale(.5); transition: opacity .15s ease, transform .2s cubic-bezier(.3,1.6,.5,1); }
.opcion[aria-pressed="true"] .marca-op { background: var(--magenta); border-color: var(--magenta); }
.opcion[aria-pressed="true"] .marca-op svg { opacity: 1; transform: scale(1); }
@media (hover: hover) { .opcion:not(:disabled):hover { border-color: var(--magenta); } }

/* Campos */
.campo { display: block; margin-bottom: 16px; }
.campo > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.campo em { font-style: normal; font-weight: 400; color: var(--gris); }
.campo input, .campo textarea {
  width: 100%; padding: 15px 16px; font: inherit; font-size: 17px; color: var(--tinta);
  border: 1.5px solid var(--linea); border-radius: 16px; background: var(--blanco);
}
.campo textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 4px var(--rosa-suave); }
.campo [aria-invalid="true"] { border-color: #B3261E; }
.acepto { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 14.5px; color: var(--gris); cursor: pointer; }
.acepto input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--magenta-boton); }
.acepto a { color: var(--magenta-boton); font-weight: 600; }
.error { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: #FCEDEC; color: #8C1D18; font-size: 14.5px; }

/* Dictado */
.dictado { display: flex; align-items: center; gap: 12px; margin: -4px 0 8px; flex-wrap: wrap; }
.mic { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--turquesa); color: var(--tinta); font-weight: 600; font-size: 14.5px; cursor: pointer; }
.mic svg { width: 18px; height: 18px; }
.mic[aria-pressed="true"] { background: var(--magenta-boton); color: var(--blanco); }
.mic[aria-pressed="true"] .onda { animation: late 1s ease-in-out infinite; }
@keyframes late { 50% { opacity: .35; } }
.dictado-nota { font-size: 13.5px; color: var(--gris); }

/* Barra de horas */
.horas-cifra { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 4px; }
.horas-cifra b { font-size: 72px; line-height: 1; font-weight: 300; letter-spacing: -0.04em; color: var(--magenta); font-variant-numeric: tabular-nums; }
.horas-cifra span { font-size: 18px; color: var(--gris); }
.rango { width: 100%; margin: 14px 0 6px; accent-color: var(--magenta-boton); height: 32px; }
.rango-escala { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--gris); }
.horas-mes { margin: 20px 0 10px; font-size: 16px; }
.dias { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; }
.dias span { height: 28px; border-radius: 8px; background: var(--rosa-suave); transition: background-color .25s ease; }
.dias span.perdido { background: var(--magenta); }
.dias-nota { margin: 8px 0 0; font-size: 13px; color: var(--gris); }

/* Acciones al pie de cada pantalla */
.acciones-test { position: sticky; bottom: 0; margin-top: auto; padding: 24px 0 max(18px, env(safe-area-inset-bottom)); background: linear-gradient(rgba(255,255,255,0), var(--fondo-test, #fff) 32%); display: grid; gap: 10px; justify-items: center; }
.acciones-test .btn { width: 100%; }
.saltar { border: 0; background: none; color: var(--gris); text-decoration: underline; cursor: pointer; font-size: 14.5px; padding: 6px; }

/* Pantallas de dato (turquesa) */
body.en-dato { background: var(--turquesa); --fondo-test: var(--turquesa); }
body.en-dato .cabecera, body.en-pasos .cabecera { background: var(--blanco); box-shadow: none; }
body.en-dato .avance { background: rgba(255,255,255,.55); }
body.en-dato .avance-punto { background: var(--blanco); box-shadow: 0 0 0 3px var(--turquesa); }
.dato { position: relative; }
.dato-circulo { position: absolute; z-index: -1; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.32); top: 6px; left: -40px; }
.dato-num { margin: 34px 0 14px; font-size: clamp(56px, 16vw, 92px); line-height: .95; font-weight: 300; letter-spacing: -0.045em; }
.dato-num.frase { font-size: clamp(40px, 11vw, 60px); line-height: 1.05; letter-spacing: -0.03em; }
.dato-num.frase::after { display: none; }
.dato-num::after { content: ""; display: inline-block; width: .15em; height: .15em; margin-left: .06em; border-radius: 50%; background: var(--magenta); }
.dato-texto { margin: 0 0 14px; font-size: 20px; line-height: 1.45; font-weight: 500; max-width: 26em; }
.dato-extra { margin: 0 0 14px; font-size: 17px; }
.dato .fuente { color: #1C4747; }
body.en-dato .btn { background: var(--tinta); }
@media (hover: hover) { body.en-dato .btn:hover { background: #000; } }

/* Pantalla de pasos (magenta) */
body.en-pasos { background: var(--magenta-boton); --fondo-test: var(--magenta-boton); color: var(--blanco); }
body.en-pasos .test-atras, body.en-pasos .test-cuenta { color: var(--blanco); }
body.en-pasos .avance { background: rgba(255,255,255,.3); }
body.en-pasos .avance-relleno { background: var(--blanco); }
body.en-pasos .btn { background: var(--blanco); color: var(--magenta-boton); }
body.en-pasos :focus-visible { outline-color: var(--blanco); }
.pasos-test { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 20px; counter-reset: p; }
.pasos-test li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; counter-increment: p; }
.pasos-test li::before { content: counter(p); width: 44px; height: 44px; border-radius: 50%; background: var(--blanco); color: var(--magenta-boton); display: grid; place-items: center; font-weight: 700; }
.pasos-test strong { display: block; font-size: 19px; font-weight: 600; }
.pasos-test span { opacity: .92; }
.pantalla-pasos .pregunta { font-size: clamp(34px, 9vw, 46px); margin-top: 24px; }

/* Armando */
.armando { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px 0 60px; }
.armando img { width: 76px; margin-bottom: 20px; animation: gira 2.4s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.armando .avance { margin: 22px 0 24px; }
.armando .avance-relleno, .armando .avance-punto { transition-duration: 2.4s; }
.lista-armando { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lista-armando li { display: flex; gap: 12px; align-items: center; color: #9A9A9A; font-size: 16.5px; transition: color .3s ease; }
.lista-armando .marca-op { margin: 0; }
.lista-armando li.listo { color: var(--tinta); }
.lista-armando li.listo .marca-op { background: var(--magenta); border-color: var(--magenta); }
.lista-armando li.listo .marca-op svg { opacity: 1; transform: scale(1); }

/* Resultado */
.resultado { padding-bottom: 40px; }
.resultado .pregunta { position: relative; margin-top: 20px; }
.resultado .destello { position: static; display: inline-block; width: 26px; height: 26px; color: var(--magenta); margin-bottom: 6px; }
.resumen { margin: 22px 0; padding: 18px 20px; border-radius: 20px; background: var(--turquesa-suave); }
.resumen h3 { font-size: 14px; font-weight: 600; color: #1C4747; margin-bottom: 6px; }
.resumen p { margin: 0; }
.ruta { list-style: none; margin: 26px 0; padding: 0; display: grid; gap: 0; }
.ruta li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding-bottom: 20px; }
.ruta li::before { content: ""; width: 20px; height: 20px; margin: 3px 4px 0; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--magenta); background: var(--blanco); }
.ruta li::after { content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--linea); }
.ruta li:last-child::after { display: none; }
.ruta li.hecho::before { background: var(--magenta); box-shadow: none; }
.ruta strong { display: block; font-weight: 600; }
.ruta span { color: var(--gris); font-size: 14.5px; }
.ideas { margin: 18px 0 26px; padding-left: 22px; display: grid; gap: 12px; }
.tarjeta-contacto { padding: 24px 20px; border-radius: 24px; background: var(--rosa-suave); }
.tarjeta-contacto h3 { margin-bottom: 6px; }
.tarjeta-contacto p { margin: 0 0 16px; color: #3B3B3B; }
.tarjeta-contacto .btn + .btn { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .pantalla { animation: none; }
  .armando img { animation: none; }
}
