/* Estilo A (claro tipo Apple, a juego con club.ale-ferr.com), afinado con la revisión de UI del 02-11.
   Lo usan las dos páginas: index.html (cuestionario) y ruta.html (la hoja de ruta). */
:root {
  --fondo: #f5f5f7; --tarjeta: #fff; --texto: #1d1d1f; --suave: #6e6e73; --tenue: #737378; --marca: #c7c7cc; --linea: rgba(0,0,0,.08);
  --azul: #0071e3; --azul-tinte: #eef5ff; --azul-osc: #0058b0;
  --verde: #1d8f4e; --verde-tinte: #e9f7ef; --naranja: #c25e00; --naranja-tinte: #fff4e5; --rojo: #d70015; --rojo-tinte: #fdecee;
  --sombra: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --degradado-titulo: linear-gradient(95deg, #1d1d1f 0%, #0058b0 100%);
  --r: 22px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #000; --tarjeta: #1c1c1e; --texto: #f5f5f7; --suave: #a1a1a6; --tenue: #8e8e93; --marca: #636366; --linea: rgba(255,255,255,.1);
    --azul: #2997ff; --azul-tinte: rgba(41,151,255,.14); --azul-osc: #6cb6ff;
    --verde: #30d158; --verde-tinte: rgba(48,209,88,.12); --naranja: #ff9f0a; --naranja-tinte: rgba(255,159,10,.12); --rojo: #ff453a; --rojo-tinte: rgba(255,69,58,.12);
    --sombra: none;
    --degradado-titulo: linear-gradient(95deg, #fff 0%, #6db8ff 100%);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); }
body { font-family: -apple-system, "SF Pro Text", BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; font-size: 17px; line-height: 1.47; letter-spacing: -.022em; }
p, li { text-wrap: pretty; }
h1, h2, .preg, .fase h3 { text-wrap: balance; }
button { font: inherit; cursor: pointer; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app { max-width: 600px; margin: 0 auto; padding: 0 16px 64px; min-height: 100vh; }

/* Barra superior con el logo del Club */
.top { display: flex; align-items: center; gap: 10px; padding: 14px 0; font-size: 14px; font-weight: 600; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(145deg, #3b9bff, #0058b0); color: #fff; display: grid; place-items: center; font-size: 9px; font-weight: 800; letter-spacing: .02em; }
.top .der { margin-left: auto; color: var(--tenue); font-weight: 500; }

h1, .h1 { font-size: 40px; line-height: 1.05; letter-spacing: -.035em; font-weight: 700; margin: 0 0 16px;
  background: var(--degradado-titulo); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 28px; line-height: 1.1; letter-spacing: -.03em; font-weight: 700; margin: 0 0 16px; }
.lead { font-size: 19px; line-height: 1.42; color: var(--suave); margin: 0; }
.ceja { font-size: 13px; font-weight: 600; color: var(--azul); margin: 0 0 4px; display: flex; align-items: center; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip { font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--tarjeta); color: var(--suave); box-shadow: var(--sombra); }
.chip.azul { background: var(--azul-tinte); color: var(--azul-osc); box-shadow: none; }
.card { background: var(--tarjeta); border-radius: var(--r); padding: 20px; box-shadow: var(--sombra); }
.card + .card { margin-top: 12px; }
.ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ico.v { background: var(--verde-tinte); color: var(--verde); } .ico.n { background: var(--naranja-tinte); color: var(--naranja); }
.ico.r { background: var(--rojo-tinte); color: var(--rojo); } .ico.a { background: var(--azul-tinte); color: var(--azul); }
.ico.grande { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(145deg, #3b9bff, #0058b0); color: #fff; }
.ico.grande svg { width: 30px; height: 30px; }

.btn { text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 999px; padding: 15px; min-height: 52px; font-size: 17px; font-weight: 600; transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.pri { background: linear-gradient(180deg, #1a84f0, #0071e3 45%, #005fc2); color: #fff; box-shadow: 0 6px 18px rgba(0,113,227,.28); }
.btn.alt { background: var(--tarjeta); color: var(--azul); box-shadow: var(--sombra); }
.btn:disabled { box-shadow: none; }
.btn.pri:disabled { background: #a9cdf5; color: rgba(255,255,255,.92); }
@media (prefers-color-scheme: dark) { .btn.pri:disabled { background: #13365a; color: rgba(255,255,255,.5); } }
.pie { text-align: center; color: var(--tenue); font-size: 13px; margin-top: 22px; }
.error { color: var(--rojo); font-size: 15px; min-height: 1em; margin: 8px 0 0; }

/* ---------- Cuestionario ---------- */
.portada { padding-top: 0; }
.portada .ico.grande { margin-bottom: 22px; }
.filas-icono { margin: 24px 0; display: grid; gap: 14px; }
.filas-icono div { display: flex; gap: 14px; align-items: flex-start; }
.filas-icono b { display: block; font-size: 16px; font-weight: 600; }
.filas-icono span { font-size: 14px; color: var(--suave); }
.campo { display: block; margin-bottom: 12px; }
.campo span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.entrada, .campo input {
  width: 100%; font: inherit; font-size: 17px; padding: 15px 16px; border-radius: 14px;
  border: 1.5px solid var(--linea); background: var(--tarjeta); color: var(--texto); outline: none; box-shadow: var(--sombra);
}
textarea.entrada { min-height: 140px; resize: vertical; line-height: 1.45; }
.entrada:focus, .campo input:focus { border-color: var(--azul); }
.ya-tienes { margin-top: 14px; }

.arriba { display: flex; align-items: center; gap: 12px; padding: 14px 0 22px; }
.atras { border: 0; background: var(--tarjeta); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--azul); flex: none; box-shadow: var(--sombra); }
.barra { flex: 1; height: 4px; border-radius: 4px; background: var(--linea); overflow: hidden; }
.barra i { display: block; height: 100%; background: linear-gradient(90deg, #3b9bff, #0071e3); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.contador { font-size: 13px; color: var(--tenue); font-weight: 600; font-variant-numeric: tabular-nums; }
.preg { font-size: 30px; line-height: 1.12; letter-spacing: -.03em; margin: 12px 0 8px; font-weight: 700; }
.preg.peque { font-size: 22px; margin-top: 28px; }
.preg + .op, .preg + .entrada { margin-top: 14px; }
.ayuda { font-size: 15px; color: var(--suave); margin: 0 0 20px; line-height: 1.45; }
.op {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; border-radius: 16px;
  padding: 16px 18px; font-size: 17px; font-weight: 600; margin-bottom: 10px; background: var(--tarjeta);
  border: 2px solid transparent; box-shadow: var(--sombra); transition: transform .12s, background .15s, border-color .15s;
}
.op:active { transform: scale(.98); }
.op .marca { width: 22px; height: 22px; flex: none; border: 1.5px solid var(--marca); border-radius: 50%; display: grid; place-items: center; }
.op.varias .marca { border-radius: 6px; }
.op .marca svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; opacity: 0; }
.op.on { border-color: var(--azul); background: var(--azul-tinte); color: var(--azul-osc); }
.op.on .marca { background: var(--azul); border-color: var(--azul); }
.op.on .marca svg { opacity: 1; }
.paso-anim { animation: entra .25s ease-out both; }
@keyframes entra { from { opacity: 0; transform: translateX(12px); } }
.siguiente-fijo { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px max(16px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--fondo) 30%); }
.siguiente-fijo .btn { max-width: 568px; margin: 0 auto; }
.pantalla-preg { padding-bottom: 110px; }
.encontrado { display: flex; gap: 12px; align-items: center; background: var(--verde-tinte); color: var(--verde); border-radius: 14px; padding: 12px 14px; font-size: 15px; font-weight: 600; margin-top: 12px; }
.encontrado span { color: var(--texto); font-weight: 500; }
.animo { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); background: var(--texto); color: var(--fondo); padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: toast 2.4s ease both; white-space: nowrap; z-index: 9; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -8px); } 12%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* Espera */
.espera { text-align: center; padding-top: 12vh; }
.espera .barra { max-width: 320px; margin: 26px auto 8px; height: 6px; }
.espera .barra i { transition: width 1s linear; }
.pasos { list-style: none; padding: 0; margin: 26px auto; max-width: 340px; text-align: left; }
.pasos li { display: flex; gap: 12px; align-items: center; padding: 9px 0; color: var(--tenue); font-size: 16px; }
.pasos .punto { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--linea); flex: none; display: grid; place-items: center; }
.pasos .punto svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; opacity: 0; }
.pasos li.ahora { color: var(--texto); font-weight: 600; }
.pasos li.ahora .punto { border-color: var(--azul); animation: late 1.2s ease-in-out infinite; }
.pasos li.hecho { color: var(--texto); }
.pasos li.hecho .punto { background: var(--verde); border-color: var(--verde); }
.pasos li.hecho .punto svg { opacity: 1; }
@keyframes late { 50% { box-shadow: 0 0 0 6px var(--azul-tinte); } }
.consejo { max-width: 340px; margin: 0 auto; font-size: 15px; color: var(--suave); min-height: 3em; }

/* ---------- Hoja de ruta ---------- */
.hero { padding: 20px 0 4px; }
.sec { margin-top: 44px; }
.ficha { display: grid; gap: 10px; margin-top: 24px; }
.cuello { background: var(--azul-tinte); border-radius: var(--r); padding: 20px; }
.cuello .ceja { color: var(--azul-osc); }
.cuello p.frase { margin: 0; font-size: 21px; line-height: 1.32; font-weight: 600; letter-spacing: -.025em; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cifra { background: var(--tarjeta); border-radius: 18px; padding: 16px; box-shadow: var(--sombra); }
.cifra b { display: block; font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.cifra span { display: block; font-size: 13px; color: var(--suave); margin-top: 6px; line-height: 1.3; }
.cifra.meta90 b { color: var(--azul); }
.cifra.ancha { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.cifra.ancha b { color: var(--azul); font-size: 30px; }
.cifra.ancha .t { font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.veredicto { display: flex; align-items: center; gap: 12px; background: var(--tarjeta); border-radius: 18px; padding: 14px 16px; box-shadow: var(--sombra); }
.veredicto .etq { font-size: 13px; color: var(--suave); font-weight: 600; }
.veredicto .grande { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.veredicto p { margin: 2px 0 0; font-size: 14px; color: var(--suave); line-height: 1.35; }
.Seguir .grande { color: var(--verde); } .Ajustar .grande { color: var(--naranja); } .Cambiar .grande { color: var(--rojo); }
.nota { font-size: 12px; color: var(--tenue); margin: 2px 4px 0; }
.ir { margin-top: 18px; }

.progreso { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--suave); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.progreso .barra i { background: var(--verde); }
.tareas { list-style: none; margin: 0; padding: 0; }
.tareas li { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--linea); font-size: 16px; line-height: 1.45; }
.tareas li:first-child { border-top: 0; }
.tareas li { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tareas .caja { position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--marca); background: none; flex: none; display: grid; place-items: center; padding: 0; transition: all .2s; -webkit-tap-highlight-color: transparent; }
.tareas .caja svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; opacity: 0; transform: scale(.5); transition: all .2s; }
.tareas .caja::after { content: ""; position: absolute; inset: -9px; }
.tareas li.ok .caja { background: var(--verde); border-color: var(--verde); }
.tareas li.ok .caja svg { opacity: 1; transform: none; }
.tareas li.ok .txt { color: var(--tenue); text-decoration: line-through; text-decoration-color: var(--linea); }
.tareas .como summary { font-size: 14px; color: var(--azul); font-weight: 600; cursor: pointer; list-style: none; margin-top: 4px; }
.tareas .como summary::-webkit-details-marker { display: none; }
.tareas .como p { margin: 6px 0 0; font-size: 14px; color: var(--suave); line-height: 1.45; }

.fases { position: relative; padding-left: 36px; }
.fases::before { content: ""; position: absolute; left: 13px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(var(--azul), var(--linea)); }
.fase { position: relative; margin-bottom: 12px; }
.fase .nodo { position: absolute; left: -36px; top: 18px; width: 28px; height: 28px; border-radius: 50%; background: var(--tarjeta); border: 2px solid var(--azul); color: var(--azul); display: grid; place-items: center; font-size: 14px; font-weight: 700; box-shadow: 0 0 0 4px var(--fondo); }
.fase.actual .nodo { background: var(--azul); color: #fff; }
.fase > details { background: var(--tarjeta); border-radius: var(--r); box-shadow: var(--sombra); }
.fase > details > summary { list-style: none; padding: 18px 16px; cursor: pointer; display: block; }
.fase > details > summary::-webkit-details-marker { display: none; }
.fase .cuando { font-size: 13px; font-weight: 600; color: var(--azul); }
.fase .ahora { background: var(--azul); color: #fff; border-radius: 999px; padding: 1px 8px; margin-left: 6px; font-size: 12px; }
.fase h3 { margin: 2px 0 6px; font-size: 21px; letter-spacing: -.025em; line-height: 1.2; }
.fase .obj { font-size: 15px; color: var(--suave); margin: 0; }
.fase .flecha { float: right; color: var(--tenue); transition: transform .25s; margin-top: 2px; }
.fase > details[open] .flecha { transform: rotate(180deg); }
.fase .cuerpo { padding: 0 16px 18px; }
.meta { display: flex; gap: 10px; align-items: flex-start; background: var(--fondo); border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.4; margin: 0 0 6px; }
.meta b { display: block; font-size: 12px; color: var(--azul); font-weight: 600; margin-bottom: 1px; }

.metricas { display: grid; gap: 10px; }
.metrica { background: var(--tarjeta); border-radius: 18px; padding: 16px 18px; box-shadow: var(--sombra); }
.metrica .nom { font-size: 13px; font-weight: 600; color: var(--suave); }
.metrica .obj { font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 4px 0 8px; }
.ruta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; color: var(--tenue); }
.ruta span { background: var(--fondo); border-radius: 6px; padding: 2px 7px; color: var(--suave); }

.sesion { position: relative; overflow: hidden; border-radius: 26px; padding: 26px 22px; color: #f5f5f7;
  background: radial-gradient(120% 80% at 100% 0%, rgba(41,151,255,.45), transparent 60%), #0b0b0f; }
@media (prefers-color-scheme: dark) { .sesion { border: 1px solid rgba(255,255,255,.1); } }
.sesion .ceja { color: #6db8ff; }
.sesion h2 { color: #fff; font-size: 26px; margin-bottom: 10px; }
.sesion .cuenta { display: inline-flex; align-items: baseline; gap: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 10px 14px; margin-bottom: 18px; }
.sesion .cuenta b { font-size: 28px; letter-spacing: -.03em; }
.sesion .cuenta span { font-size: 13px; color: #a1a1a6; }
.sesion .llevar { font-size: 13px; font-weight: 600; color: #a1a1a6; margin: 0 0 4px; }
.sesion ul { margin: 0; padding: 0; list-style: none; }
.sesion li { display: flex; gap: 10px; font-size: 15px; padding: 7px 0; color: #e5e5ea; }
.sesion li svg { color: #6db8ff; margin-top: 3px; }

.porque > details { background: var(--tarjeta); border-radius: var(--r); box-shadow: var(--sombra); }
.porque > details > summary { list-style: none; padding: 18px 20px; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.porque > details > summary::-webkit-details-marker { display: none; }
.porque > details > summary .flecha { margin-left: auto; color: var(--tenue); transition: transform .25s; }
.porque > details[open] > summary .flecha { transform: rotate(180deg); }
.porque .dentro { padding: 0 20px 8px; }
.fila { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--linea); }
.fila h4 { margin: 4px 0 3px; font-size: 15px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.fila p { margin: 0; font-size: 14px; color: var(--suave); line-height: 1.45; }
.subtit { font-size: 13px; font-weight: 600; color: var(--tenue); margin: 16px 0 0; }

.guardala { margin: 4px 0 8px; }
.guardala p { margin: 0 0 12px; font-size: 15px; line-height: 1.45; }
.acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.acciones .btn { font-size: 16px; white-space: nowrap; }
.aviso { text-align: center; font-size: 14px; color: var(--verde); font-weight: 600; min-height: 1.2em; margin-top: 10px; }

@media (prefers-reduced-motion: no-preference) {
  .sec, .hero { animation: sube .6s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes sube { from { opacity: 0; transform: translateY(12px); } }
}
@media (prefers-reduced-motion: reduce) { .paso-anim, .animo { animation: none; } }

@media print {
  @page { size: A4; margin: 16mm 14mm; }
  :root { --fondo: #fff; --sombra: none; --tarjeta: #fff; --texto: #1d1d1f; --suave: #555; }
  body { font-size: 11pt; }
  .app { max-width: none; padding: 0; }
  .top .der, .acciones, .ir, .aviso, .progreso, .flecha, .tareas .como summary { display: none !important; }
  h1 { font-size: 28pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card, .cifra, .metrica, .fase > details, .porque > details, .veredicto { border: 1px solid #e3e3e8; }
  .cifra, .metrica, .fila, .fase, .meta, .tareas li { break-inside: avoid; }
  .sec { margin-top: 22pt; }
  h2 { break-after: avoid; }
  .sesion, .cuello { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sec, .hero { animation: none !important; }
  .sesion { break-inside: avoid; background: var(--azul-tinte); color: var(--texto); }
  .sesion h2, .sesion li, .sesion .cuenta span, .sesion .llevar { color: var(--texto); }
  .sesion .cuenta { background: #fff; border-color: #e3e3e8; }
  .ceja { break-after: avoid; }
  .guardala { display: none; }
}
