:root {
  --navy: #1E2F4A;
  --navy-2: #16233b;
  --o1: #E96C3A;
  --o2: #EB8400;
  --paper: #f4f6f9;
  --card: #ffffff;
  --line: #e4e9f0;
  --ink: #14223B;
  --muted: #5b6b82;
  --ok: #2ea05a;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Encabezado ── */
.band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 1.6rem 1rem 2.2rem;
  text-align: center;
}
.band img { height: 2.4rem; width: auto; }
.band h1 {
  font-size: clamp(1.35rem, 4vw, 2rem);
  margin: 1rem auto 0.4rem;
  max-width: 22ch;
  line-height: 1.15;
  font-weight: 800;
}
.band p { margin: 0 auto; max-width: 46ch; opacity: 0.85; font-size: 0.98rem; }

/* ── Barra de progreso ── */
.progreso-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 1rem;
}
.progreso-meta {
  display: flex;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.barra {
  max-width: 720px;
  margin: 0 auto;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.barra > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--o1), var(--o2));
  transition: width 0.3s ease;
}

/* ── Contenido ── */
main { max-width: 720px; margin: 0 auto; padding: 1.6rem 1rem 4rem; }

.paso { display: none; }
.paso.activo { display: block; animation: aparecer 0.25s ease; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.paso-titulo { font-size: 1.35rem; font-weight: 800; margin: 0 0 0.3rem; }
.paso-sub { color: var(--muted); margin: 0 0 1.6rem; font-size: 0.95rem; }

/* ── Campos ── */
.campo { margin-bottom: 1.4rem; }
.campo > label.pregunta {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.98rem;
}
.campo .ayuda { color: var(--muted); font-size: 0.85rem; margin: -0.2rem 0 0.6rem; }
.req { color: var(--o1); }

input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], textarea, select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--o1);
}
textarea { min-height: 90px; resize: vertical; }

/* Opciones (radio / checkbox como tarjetas) */
.opciones { display: flex; flex-direction: column; gap: 0.5rem; }
.opciones.grid2 { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .opciones.grid2 { grid-template-columns: 1fr; } }

.opcion {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  font-size: 0.92rem;
  transition: border-color 0.15s, background 0.15s;
}
.opcion:hover { border-color: #c9d3e0; }
.opcion input { margin-top: 0.15rem; accent-color: var(--o1); flex-shrink: 0; }
.opcion.sel { border-color: var(--o1); background: rgba(233, 108, 58, 0.06); }
.opcion.asesorame { border-style: dashed; }
.opcion.asesorame.sel { background: rgba(233, 108, 58, 0.1); }

/* Campo "otro/detalle" que se revela */
.detalle { margin-top: 0.5rem; }
.detalle[hidden] { display: none; }

/* ── Navegación ── */
.nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: linear-gradient(120deg, var(--o1), var(--o2)); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }

.error-msg { color: #c0392b; font-size: 0.85rem; margin-top: 0.4rem; min-height: 1rem; }

/* ── Revisar ── */
.resumen-grupo { margin-bottom: 1.2rem; }
.resumen-grupo h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--o1); margin: 0 0 0.5rem; }
.resumen-item { display: flex; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.resumen-item .k { color: var(--muted); flex: 0 0 45%; }
.resumen-item .v { color: var(--ink); font-weight: 600; }

/* ── Pantalla final ── */
.fin { text-align: center; padding: 3rem 1rem; }
.fin .check {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(46, 160, 90, 0.14); color: var(--ok);
  display: grid; place-items: center; margin: 0 auto 1.2rem;
  font-size: 2rem;
}
.fin h2 { font-size: 1.5rem; margin: 0 0 0.6rem; }
.fin p { color: var(--muted); max-width: 42ch; margin: 0 auto; }

.pie { text-align: center; font-size: 0.78rem; color: var(--muted); padding: 1.5rem 1rem 2.5rem; }
.pie a { color: var(--muted); }
