/*
 * Wonder School · test de nivel (/test-de-nivel)
 *
 * Usa los tokens de web.css (:root). Mismas reglas de la casa:
 *   - Blanco de base, azul Wonder de acento. Rojo/naranja solo para logros
 *     (el nivel alcanzado), verde solo para WhatsApp.
 *   - Pocos contenedores: icono + texto suelto, pastillas y filas tocables.
 *   - Un solo easing (--w-ease). Con movimiento reducido, el reposo es el final.
 *   - Celular primero: iPhone de 375 a 430 px, texto de 16 px o más,
 *     zonas táctiles de 44 px o más.
 */

/* Las fuentes viven en el <style> de index.html, no en web.css */
:root {
  --heading: 'Prompt', sans-serif;
  --body: 'DM Sans', sans-serif;
  --t-wa: #16a34a;
  --t-wa-deep: #15803d;
  --t-top-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.t-body {
  margin: 0; min-height: 100svh; overflow-x: hidden;
  font-family: var(--body); font-size: 1rem; font-weight: 400; line-height: 1.55;
  color: var(--w-ink-2); background: var(--w-paper);
}
:where(.t-body) img { max-width: 100%; display: block; }
:where(.t-body) button { font: inherit; color: inherit; }
/* Reset sin especificidad: las clases de abajo siempre ganan */
:where(.t-body) :where(h1, h2, p, ul, ol, dl, dd, blockquote) { margin: 0; padding: 0; }
.t-body [hidden] { display: none !important; }

.t-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.t-skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 12px 18px; border-radius: var(--w-pill); background: var(--w-ink); color: #fff; font-weight: 600; text-decoration: none; }
.t-skip:focus-visible { top: 12px; }

/* ===== Menú ===== */
.t-top {
  position: sticky; top: 0; z-index: 20; height: var(--t-top-h);
  background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(13, 27, 62, 0.07);
}
.t-top-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.t-logo { display: flex; align-items: center; min-height: 44px; }
.t-logo img { height: 38px; width: auto; }
.t-top-nav { display: flex; align-items: center; gap: 6px; }
.t-home {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border-radius: var(--w-pill); text-decoration: none; color: var(--w-ink-3);
  font-family: var(--heading); font-weight: 400; font-size: 0.95rem;
  transition: color .3s var(--w-ease), background-color .3s var(--w-ease);
}
.t-home svg { width: 18px; height: 18px; flex: none; }
.t-home:hover { color: var(--w-blue); background: var(--w-mist); }

/* Verde = WhatsApp, y nada más */
.t-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--t-wa) 0%, var(--t-wa-deep) 100%);
  box-shadow: 0 6px 18px -6px rgba(21, 128, 61, 0.55); border-radius: var(--w-pill);
  font-family: var(--heading); font-weight: 600; letter-spacing: -0.005em;
  transition: transform .35s var(--w-ease), box-shadow .35s var(--w-ease);
}
.t-wa:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(21, 128, 61, 0.6); }
.t-wa-ico { width: 18px; height: 18px; flex: none; }
.t-wa-sm { min-height: 44px; padding: 0 18px; font-size: 0.95rem; }
.t-wa-lg { min-height: 60px; padding: 0 28px; font-size: 1.08rem; }
.t-wa-lg .t-wa-ico { width: 22px; height: 22px; }

/* ===== Escenario ===== */
.t-main { position: relative; isolation: isolate; overflow: hidden; min-height: calc(100svh - var(--t-top-h)); }
.t-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 50% at 80% 30%, rgba(26, 109, 232, 0.10) 0%, rgba(26, 109, 232, 0) 70%),
    radial-gradient(40% 40% at 4% 0%, rgba(56, 189, 248, 0.10) 0%, rgba(56, 189, 248, 0) 70%),
    linear-gradient(180deg, var(--w-mist) 0%, #fff 55%);
}
.t-glow::after {
  content: ''; position: absolute; inset: 0; opacity: 0.55;
  background-image: radial-gradient(rgba(26, 109, 232, 0.16) 1px, transparent 1.2px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(60% 50% at 70% 30%, #000 0%, transparent 75%);
  mask-image: radial-gradient(60% 50% at 70% 30%, #000 0%, transparent 75%);
}

.t-screen { position: relative; padding-top: 28px; padding-bottom: 56px; }
.t-col { max-width: 640px; margin: 0 auto; }
.t-col-wide { max-width: 760px; }

/* ===== Tipografía ===== */
.t-kicker {
  font-family: var(--heading); font-weight: 600; font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--w-blue); margin-bottom: 12px;
}
.t-h1, .t-h2 { font-family: var(--heading); font-weight: 800; color: var(--w-ink); letter-spacing: -0.03em; outline: none; text-wrap: balance; }
.t-h1 { font-size: clamp(2.5rem, 11vw, 5.4rem); line-height: 0.98; }
.t-h1 em, .t-h2 em { font-style: normal; background: var(--w-grad-blue); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-right: 0.06em; margin-right: -0.06em; }
.t-h2 { font-size: clamp(2.1rem, 8.6vw, 3.6rem); line-height: 1.02; }

/* ===== Botones ===== */
.t-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 0 30px;
  border: 0; border-radius: var(--w-pill); cursor: pointer; text-decoration: none;
  font-family: var(--heading); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.01em;
  transition: transform .35s var(--w-ease), box-shadow .35s var(--w-ease), opacity .3s var(--w-ease);
}
.t-btn svg { width: 20px; height: 20px; flex: none; transition: transform .35s var(--w-ease); }
.t-btn-blue { color: #fff; background: var(--w-grad-blue); box-shadow: 0 12px 26px -10px rgba(26, 109, 232, 0.75); }
.t-btn-blue:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(26, 109, 232, 0.8); }
.t-btn-blue:hover svg { transform: translateX(4px); }
.t-btn:disabled { opacity: .6; cursor: progress; transform: none; }

.t-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px 0 8px; margin-left: -8px;
  border: 0; background: none; border-radius: var(--w-pill); cursor: pointer;
  font-family: var(--heading); font-weight: 400; font-size: 1rem; color: var(--w-ink-3);
  transition: color .3s var(--w-ease), background-color .3s var(--w-ease);
}
.t-back svg { width: 20px; height: 20px; }
.t-back:hover { color: var(--w-blue); background: var(--w-mist); }

/* ===== Portada del test ===== */
.t-intro { display: flex; flex-direction: column; }
.t-intro-copy { position: relative; z-index: 2; order: 2; }
.t-intro .t-scene { order: 1; }
.t-intro .t-h1 { margin-bottom: 26px; }

/* Datos: icono con degradado + texto suelto, sin tarjetas */
.t-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 18px 26px; margin-bottom: 30px; }
.t-fact { display: flex; align-items: center; gap: 12px; }
.t-fact-ico {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: none; color: #fff;
  background: var(--w-grad-tile); box-shadow: 0 8px 18px -8px rgba(26, 109, 232, 0.7);
}
.t-fact-ico svg { width: 22px; height: 22px; }
.t-fact b { display: block; font-family: var(--heading); font-weight: 600; font-size: 1.08rem; line-height: 1.2; letter-spacing: -0.01em; color: var(--w-ink); white-space: nowrap; }
.t-fact small { display: block; font-size: 0.92rem; color: var(--w-ink-3); line-height: 1.3; }
.t-note { margin-top: 18px; font-size: 1rem; }

/* Escena: palabra gigante + órbitas + niveles + personajes */
.t-scene { position: relative; width: 100%; aspect-ratio: 1 / 0.8; container-type: inline-size; margin: 0 auto 8px; pointer-events: none; }
.t-halo { position: absolute; left: 16%; right: 16%; top: 4%; aspect-ratio: 1; border-radius: 50%; filter: blur(12px);
  background: radial-gradient(circle, rgba(26, 109, 232, 0.16) 0%, rgba(26, 109, 232, 0.05) 50%, rgba(26, 109, 232, 0) 70%); }
.t-word {
  position: absolute; z-index: 0; left: 50%; top: 4%; translate: -50% 0; white-space: nowrap;
  font-family: var(--heading); font-weight: 800; font-size: 28cqi; line-height: 1; letter-spacing: -0.06em;
  padding: 0 0.06em; background: linear-gradient(180deg, rgba(26, 109, 232, 0.9) 0%, rgba(26, 109, 232, 0.1) 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.t-orbits { position: absolute; inset: 0; z-index: 1; }
.t-orbits i { position: absolute; left: 50%; top: 52%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; border: 1.5px solid rgba(26, 109, 232, 0.18); }
.t-orbits .o1 { width: 46%; background: radial-gradient(closest-side, rgba(26, 109, 232, 0.12), rgba(26, 109, 232, 0)); }
.t-orbits .o2 { width: 70%; }
.t-orbits .o3 { width: 94%; border-style: dashed; border-color: rgba(26, 109, 232, 0.16); }
/* Los personajes salen de abajo y se funden con el blanco (sin drop-shadow: con la
   máscara dibuja un rectángulo claro detrás de la imagen) */
.t-char {
  position: absolute; z-index: 2; bottom: 0; height: auto;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}
.t-char-a { left: 33%; width: 34%; }
.t-char-b { right: 19%; width: 33%; }
.t-char-grad { right: 12%; width: 22%; }
.t-lvl {
  position: absolute; z-index: 4; left: var(--x); top: var(--y); translate: -50% -50%;
  padding: 6px 14px; border-radius: var(--w-pill); font-family: var(--heading); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  background: #fff; color: var(--w-blue); border: 1px solid rgba(26, 109, 232, 0.22); box-shadow: 0 8px 20px -10px rgba(26, 109, 232, 0.6);
  transition: background-color .5s var(--w-ease), color .5s var(--w-ease), opacity .5s var(--w-ease), transform .7s var(--w-ease);
}
.t-lvl.is-goal { color: #fff; border-color: transparent; background: var(--w-grad-blue); box-shadow: 0 10px 24px -8px rgba(26, 109, 232, 0.75); }

/* Resultado: niveles superados en azul suave; el alcanzado es un logro (naranja/rojo) */
.t-scene-res .t-lvl.is-past { background: var(--w-mist); }
.t-scene-res .t-lvl.is-ahead:not(.is-goal) { opacity: .55; }
.t-scene-res .t-lvl.is-next { border-color: var(--w-blue); box-shadow: 0 0 0 4px rgba(26, 109, 232, 0.14), 0 8px 20px -10px rgba(26, 109, 232, 0.6); transform: scale(1.12); }
.t-scene-res .t-lvl.is-mine {
  z-index: 5; color: #fff; border-color: transparent; background: var(--w-grad-win);
  box-shadow: 0 12px 26px -8px rgba(239, 68, 68, 0.6); transform: scale(1.18);
}
.t-word-code { font-size: 56cqi; top: 0; left: 40%; letter-spacing: -0.05em; }

/* ===== Elegir (edad y horario) ===== */
.t-ask .t-h2 { margin: 18px 0 28px; }
.t-ask .t-kicker { margin: 18px 0 0; }
.t-ask .t-kicker + .t-h2 { margin-top: 8px; }
.t-choices { display: grid; gap: 12px; }
.t-choices-2 { grid-template-columns: 1fr 1fr; }
.t-choice {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  min-height: 84px; padding: 14px 22px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--w-line); border-radius: var(--w-r-md); box-shadow: 0 4px 14px -10px rgba(14, 50, 120, 0.4);
  transition: transform .35s var(--w-ease), border-color .35s var(--w-ease), box-shadow .35s var(--w-ease), background-color .35s var(--w-ease);
}
.t-choice b { font-family: var(--heading); font-weight: 700; font-size: 1.5rem; line-height: 1.1; letter-spacing: -0.02em; color: var(--w-ink); }
.t-choice small { font-size: 1rem; color: var(--w-ink-3); }
.t-choice-row { flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px; min-height: 76px; padding: 12px 18px; }
.t-choice-row b { font-size: 1.18rem; display: block; }
.t-choice-row small { display: block; }
.t-choice-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; flex: none; color: var(--w-blue); background: var(--w-mist); transition: background .35s var(--w-ease), color .35s var(--w-ease); }
.t-choice-ico svg { width: 22px; height: 22px; }
.t-choice:hover { transform: translateY(-2px); border-color: rgba(26, 109, 232, 0.4); box-shadow: 0 12px 26px -12px rgba(26, 109, 232, 0.5); }
.t-choice.is-picked { border-color: var(--w-blue); background: var(--w-mist); box-shadow: 0 0 0 3px rgba(26, 109, 232, 0.14); }
.t-choice.is-picked .t-choice-ico { color: #fff; background: var(--w-grad-tile); }

.t-kids {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 18px;
  font-size: 1rem; color: var(--w-ink-3); text-decoration: none;
}
.t-kids span { color: var(--w-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.t-kids:hover span { text-decoration-thickness: 2px; }

/* ===== Progreso: A1 a B2 con línea fina ===== */
.t-quiz-top { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.t-track { position: relative; flex: 1; min-width: 0; height: 56px; }
.t-track-line { position: absolute; left: 0; right: 0; top: 18px; height: 3px; border-radius: 3px; background: rgba(26, 109, 232, 0.12); overflow: hidden; }
.t-track-line i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--w-grad-blue); border-radius: 3px; transition: transform .7s var(--w-ease); }
.t-track-steps { position: relative; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); height: 100%; }
.t-step { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.t-step-pill {
  display: grid; place-items: center; min-width: 46px; height: 36px; padding: 0 12px; border-radius: var(--w-pill);
  font-family: var(--heading); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  color: rgba(26, 109, 232, 0.55); background: #fff; border: 1px solid rgba(26, 109, 232, 0.18);
  transition: color .5s var(--w-ease), background-color .5s var(--w-ease), border-color .5s var(--w-ease), box-shadow .5s var(--w-ease), transform .6s var(--w-ease);
}
.t-step-dots { display: flex; gap: 5px; }
.t-step-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(26, 109, 232, 0.16); transition: background-color .4s var(--w-ease), transform .4s var(--w-ease); }
.t-step-dots i.is-on { background: var(--w-blue); }
.t-step.is-now .t-step-pill { color: var(--w-blue); border-color: var(--w-blue); box-shadow: 0 0 0 4px rgba(26, 109, 232, 0.12), 0 8px 18px -10px rgba(26, 109, 232, 0.7); transform: scale(1.08); }
.t-step.is-done .t-step-pill { color: #fff; border-color: transparent; background: var(--w-grad-blue); box-shadow: 0 8px 18px -10px rgba(26, 109, 232, 0.8); }

/* ===== Pregunta ===== */
.t-q { outline: none; }
.t-kind { outline: none; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font-family: var(--heading); font-weight: 600; font-size: 0.98rem; color: var(--w-blue); }
.t-kind-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fff; background: var(--w-grad-tile); box-shadow: 0 6px 14px -6px rgba(26, 109, 232, 0.7); }
.t-kind-ico svg { width: 18px; height: 18px; }
.t-prompt {
  font-family: var(--heading); font-weight: 700; color: var(--w-ink); letter-spacing: -0.02em; outline: none;
  font-size: clamp(1.5rem, 6.4vw, 2.3rem); line-height: 1.2; margin-bottom: 24px; text-wrap: pretty;
}
.t-gap { display: inline-block; min-width: 2.6em; height: 0.9em; vertical-align: -0.08em; border-bottom: 3px solid var(--w-blue); margin: 0 0.08em; }

/* Lectura: texto suelto con una línea azul, sin caja */
.t-read {
  margin: 0 0 22px; padding: 2px 0 2px 18px; border-left: 3px solid; border-image: var(--w-grad-blue) 1;
  font-size: 1.12rem; line-height: 1.6; color: var(--w-ink-2);
}
.t-read p + p { margin-top: 8px; }

/* Escucha: botón grande, repetible */
.t-listen {
  display: inline-flex; align-items: center; gap: 16px; min-height: 76px; padding: 10px 28px 10px 12px; margin-bottom: 22px;
  border: 0; border-radius: var(--w-pill); cursor: pointer; text-align: left; color: #fff;
  background: var(--w-grad-blue); box-shadow: 0 14px 30px -12px rgba(26, 109, 232, 0.8);
  transition: transform .35s var(--w-ease), box-shadow .35s var(--w-ease);
}
.t-listen:hover { transform: translateY(-2px); }
.t-listen-ico { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; flex: none; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.4); }
.t-listen-ico svg { width: 24px; height: 24px; margin-left: 3px; }
.t-listen b { display: block; font-family: var(--heading); font-weight: 700; font-size: 1.3rem; line-height: 1.1; letter-spacing: -0.01em; }
.t-listen small { display: block; font-size: 0.95rem; color: rgba(255, 255, 255, 0.85); }
.t-bars { display: none; align-items: flex-end; gap: 3px; height: 22px; }
.t-bars i { width: 4px; height: 100%; border-radius: 2px; background: #fff; transform-origin: 50% 100%; transform: scaleY(.45); }
.t-listen.is-playing .t-bars { display: flex; }
.t-listen.is-playing .t-listen-ico svg { display: none; }
.t-transcript { margin: -6px 0 22px; }
.t-transcript small { display: block; margin-bottom: 6px; font-size: 0.95rem; color: var(--w-ink-3); }

/* Opciones: filas grandes y tocables */
.t-opts { display: grid; gap: 10px; }
.t-opt {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 10px 18px 10px 12px;
  text-align: left; cursor: pointer; background: #fff; border: 1px solid var(--w-line); border-radius: var(--w-r-md);
  box-shadow: 0 4px 14px -10px rgba(14, 50, 120, 0.4);
  font-size: 1.1rem; line-height: 1.35; color: var(--w-ink);
  transition: transform .35s var(--w-ease), border-color .35s var(--w-ease), box-shadow .35s var(--w-ease), background-color .35s var(--w-ease), opacity .35s var(--w-ease);
}
.t-key {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
  font-family: var(--heading); font-weight: 600; font-size: 0.95rem; color: var(--w-blue); background: var(--w-mist);
  transition: background .35s var(--w-ease), color .35s var(--w-ease), transform .5s var(--w-ease);
}
.t-opt:hover { transform: translateY(-2px); border-color: rgba(26, 109, 232, 0.4); box-shadow: 0 12px 26px -12px rgba(26, 109, 232, 0.5); }
.t-opt.is-picked { border-color: var(--w-blue); background: var(--w-mist); box-shadow: 0 0 0 3px rgba(26, 109, 232, 0.14); }
.t-opt.is-picked .t-key { color: #fff; background: var(--w-grad-tile); }
.t-opts.is-locked .t-opt { cursor: default; }
.t-opts.is-locked .t-opt:not(.is-picked) { opacity: .45; }
.t-hint { margin-top: 18px; font-size: 0.95rem; color: var(--w-ink-3); }
.t-hint kbd { font-family: var(--heading); font-size: 0.85rem; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--w-line); background: #fff; }

/* ===== Resultado ===== */
.t-result { display: flex; flex-direction: column; }
.t-res-copy { position: relative; z-index: 2; }
.t-scene-res { aspect-ratio: 1 / 0.78; margin-bottom: 4px; }
.t-res-title { outline: none; margin-bottom: 10px; }
.t-res-title small { display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 2px 10px; border-radius: var(--w-pill); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--w-blue); background: var(--w-mist); border: 1px solid rgba(26, 109, 232, 0.2); }
.t-res-mean { font-family: var(--heading); font-weight: 600; font-size: 1.3rem; line-height: 1.35; letter-spacing: -0.015em; color: var(--w-ink); max-width: 30ch; margin-bottom: 30px; text-wrap: pretty; }

.t-prog { padding-top: 24px; border-top: 1px solid var(--w-line); margin-bottom: 26px; }
.t-prog-head { font-size: 0.95rem; color: var(--w-ink-3); margin-bottom: 8px; }
.t-prog-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 18px; }
.t-prog-name b { font-family: var(--heading); font-weight: 800; font-size: 2rem; line-height: 1.05; letter-spacing: -0.03em; color: var(--w-ink); }
.t-prog-name small { padding: 5px 13px; border-radius: var(--w-pill); background: #fff; border: 1px solid var(--w-line); font-size: 0.95rem; font-weight: 500; color: var(--w-ink-2); }
.t-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--w-blue); box-shadow: 0 0 0 5px rgba(26, 109, 232, 0.14); }
/* Cifras grandes, no frases */
.t-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.t-stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.t-stat dd { font-family: var(--heading); font-weight: 800; font-size: 1.9rem; line-height: 1; letter-spacing: -0.03em; color: var(--w-ink); }
.t-stat dt { margin-top: 6px; font-size: 1rem; color: var(--w-ink-3); }
.t-stat-main { grid-column: 1 / -1; }
.t-stat-main dd { font-size: clamp(2.8rem, 14vw, 3.8rem); background: var(--w-grad-blue); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-right: 0.06em; margin-right: -0.06em; width: fit-content; }
.t-stat:last-child { padding-left: 20px; border-left: 1px solid var(--w-line); }

.t-ctas { display: flex; flex-direction: column; gap: 10px; margin-bottom: 34px; }
.t-ctas .t-wa-lg { width: 100%; }
.t-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 22px;
  border: 1px solid rgba(26, 109, 232, 0.25); border-radius: var(--w-pill); background: #fff; cursor: pointer;
  font-family: var(--heading); font-weight: 600; font-size: 1rem; color: var(--w-blue);
  transition: border-color .35s var(--w-ease), background-color .35s var(--w-ease), transform .35s var(--w-ease);
}
.t-ghost svg { width: 18px; height: 18px; }
.t-ghost:hover { border-color: var(--w-blue); background: var(--w-mist); }

/* Formulario: dos campos, sin caja alrededor */
.t-form { position: relative; padding-top: 24px; border-top: 1px solid var(--w-line); }
.t-form-head { font-family: var(--heading); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--w-ink); margin-bottom: 14px; }
.t-form-head small { display: block; margin-top: 2px; font-family: var(--body); font-weight: 400; font-size: 1rem; letter-spacing: 0; color: var(--w-ink-3); }
.t-fields { display: grid; gap: 12px; margin-bottom: 14px; }
.t-field { display: flex; flex-direction: column; gap: 6px; }
.t-field span { font-size: 0.95rem; font-weight: 500; color: var(--w-ink-2); }
.t-field input {
  width: 100%; min-height: 54px; padding: 0 16px; border-radius: var(--w-r-sm);
  border: 1px solid rgba(13, 27, 62, 0.16); background: #fff; color: var(--w-ink);
  font-family: var(--body); font-size: 1.05rem;
  transition: border-color .3s var(--w-ease), box-shadow .3s var(--w-ease);
}
.t-field input::placeholder { color: #9aa3b2; }
.t-field input:focus { outline: none; border-color: var(--w-blue); box-shadow: 0 0 0 4px rgba(26, 109, 232, 0.14); }
.t-field input[aria-invalid="true"] { border-color: var(--w-ink); box-shadow: 0 0 0 3px rgba(13, 27, 62, 0.12); }
.t-form-err { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; font-size: 1rem; font-weight: 500; color: var(--w-ink); }
.t-form-err::before { content: '!'; display: grid; place-items: center; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--w-ink); color: #fff; font-family: var(--heading); font-weight: 700; font-size: 0.8rem; }
.t-btn-form { width: 100%; min-height: 56px; }
.t-ok { display: flex; align-items: center; gap: 14px; padding-top: 24px; border-top: 1px solid var(--w-line); outline: none; }
.t-ok b { display: block; font-family: var(--heading); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--w-ink); }
.t-ok small { display: block; font-size: 1rem; color: var(--w-ink-3); }

.t-again {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 24px; padding: 0 14px 0 8px; margin-left: -8px;
  border: 0; background: none; border-radius: var(--w-pill); cursor: pointer; font-family: var(--heading); font-size: 1rem; color: var(--w-ink-3);
  transition: color .3s var(--w-ease), background-color .3s var(--w-ease);
}
.t-again svg { width: 18px; height: 18px; }
.t-again:hover { color: var(--w-blue); background: var(--w-mist); }

/* ===== Foco visible en todo lo interactivo ===== */
.t-body a:focus-visible, .t-body button:focus-visible { outline: 3px solid var(--w-blue); outline-offset: 3px; border-radius: var(--w-pill); }
.t-body .t-opt:focus-visible, .t-body .t-choice:focus-visible { border-radius: var(--w-r-md); }
.t-body .t-logo:focus-visible { border-radius: 8px; }
.t-h1:focus-visible, .t-h2:focus-visible, .t-prompt:focus-visible, .t-kind:focus-visible, .t-res-title:focus-visible { outline: none; }

/* ===== Movimiento: solo si la persona no pidió reducirlo ===== */
@media (prefers-reduced-motion: no-preference) {
  .js .t-screen:not(.is-in) .t-a { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  .js .t-a { transition: opacity .7s var(--w-ease), transform .9s var(--w-ease), filter .9s var(--w-ease); transition-delay: calc(var(--d, 0) * 1ms); }

  .js .t-intro:not(.is-in) .t-word, .js .t-result:not(.is-in) .t-word { opacity: 0; transform: translateY(24px); }
  .js .t-word { transition: opacity 1s var(--w-ease) .1s, transform 1.2s var(--w-ease) .1s; }
  .js .t-screen:not(.is-in) .t-orbits { opacity: 0; transform: scale(.86); }
  .js .t-orbits { transition: opacity 1.1s var(--w-ease), transform 1.4s var(--w-ease); }
  .js .t-screen:not(.is-in) .t-char { opacity: 0; transform: translateY(40px); }
  .js .t-char { transition: opacity .9s var(--w-ease) .3s, transform 1.2s var(--w-ease) .3s; }
  .js .t-screen:not(.is-in) .t-lvl { opacity: 0; transform: scale(.6); }
  .js .t-lvl { transition-delay: calc(var(--d, 0) * 1ms); }

  /* Cambio de pregunta: entra desde abajo, rápido */
  .t-q.is-enter > * { animation: tRise .6s var(--w-ease) both; }
  .t-q.is-enter > :nth-child(2) { animation-delay: 50ms; }
  .t-q.is-enter > :nth-child(3) { animation-delay: 100ms; }
  .t-q.is-enter > :nth-child(4) { animation-delay: 150ms; }
  .t-q.is-enter > :nth-child(5) { animation-delay: 200ms; }

  /* Confirmación al elegir: la letra hace un pulso */
  .t-opt.is-picked .t-key, .t-choice.is-picked .t-choice-ico { animation: tPop .5s var(--w-ease); }

  .t-listen.is-playing .t-bars i { animation: tBar .9s var(--w-ease) infinite alternate; }
  .t-listen.is-playing .t-bars i:nth-child(2) { animation-delay: .15s; }
  .t-listen.is-playing .t-bars i:nth-child(3) { animation-delay: .3s; }
  .t-listen.is-playing .t-bars i:nth-child(4) { animation-delay: .45s; }
}
@keyframes tRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes tPop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes tBar { from { transform: scaleY(.3); } to { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  .t-body *, .t-body *::before, .t-body *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .t-listen.is-playing .t-bars i { transform: scaleY(1); }
  .t-listen.is-playing .t-bars i:nth-child(odd) { transform: scaleY(.6); }
}

/* ===== Celular pequeño ===== */
@media (max-width: 420px) {
  :root { --t-top-h: 62px; }
  .t-logo img { height: 32px; }
  .t-home { padding: 0 10px; font-size: 0.95rem; }
  .t-home span { display: none; }
  .t-home::after { content: 'Inicio'; }
  .t-wa-sm { padding: 0 14px; }
  .t-facts { gap: 14px 18px; }
  .t-fact { gap: 10px; }
  .t-fact-ico { width: 44px; height: 44px; border-radius: 13px; }
  .t-fact b { font-size: 1.02rem; }
  .t-fact small { font-size: 0.9rem; }
  .t-step-pill { min-width: 44px; padding: 0 10px; }
  .t-choice b { font-size: 1.35rem; }
}
@media (max-width: 599px) {
  .t-intro .t-btn { width: 100%; }
  /* Los tres datos en una sola fila, apilados icono sobre texto */
  .t-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .t-fact { flex-direction: column; align-items: flex-start; gap: 10px; }
  .t-fact b { white-space: normal; }
}

/* ===== Tableta y escritorio ===== */
@media (min-width: 600px) {
  .t-screen { padding-top: 40px; }
  .t-stats { grid-template-columns: auto auto auto; justify-content: start; align-items: end; gap: 0; }
  .t-stat-main { grid-column: auto; }
  .t-stat { padding: 0 28px; border-left: 1px solid var(--w-line); }
  .t-stat:first-child { padding-left: 0; border-left: 0; }
  .t-stat dd { font-size: 2.2rem; }
  .t-stat-main dd { font-size: 3.2rem; }
  .t-ctas { flex-direction: row; align-items: center; }
  .t-ctas .t-wa-lg { width: auto; }
  .t-ghost { min-height: 60px; }
  .t-fields { grid-template-columns: 1fr 1fr; }
  .t-opts.is-short { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1000px) {
  .t-screen { min-height: calc(100svh - var(--t-top-h)); padding-top: 56px; padding-bottom: 72px; }
  .t-intro, .t-result { flex-direction: row; align-items: center; gap: 48px; }
  .t-intro-copy { order: 1; flex: 0 0 46%; }
  .t-intro .t-scene { order: 2; flex: 1; margin: 0; max-width: 720px; }
  .t-intro .t-h1 { margin-bottom: 36px; }
  .t-facts { gap: 18px 36px; margin-bottom: 40px; }
  .t-result { align-items: flex-start; }
  .t-res-copy { order: 1; flex: 0 0 50%; padding-top: 12px; }
  .t-scene-res { order: 2; flex: 1; position: sticky; top: calc(var(--t-top-h) + 40px); margin: 0; max-width: 640px; }
  .t-ask .t-col { padding-top: 4vh; }
  .t-ask .t-h2 { font-size: 4.2rem; }
  .t-quiz .t-col { padding-top: 2vh; }
  .t-res-mean { font-size: 1.6rem; }
  .t-read { font-size: 1.25rem; }
  .t-opt { min-height: 68px; font-size: 1.15rem; }
  .t-choice:not(.t-choice-row) { min-height: 110px; padding: 18px 26px; }
  .t-choice:not(.t-choice-row) b { font-size: 2rem; }
}
