:root {
  --navy: #182e4a; --blue: #1d8ccc; --blue-strong: #1676ad; --cyan: #3aadca; --green: #31aa4e;
  --text: #182e4a; --muted: #4f6278; --danger: #c0262d;
  --glass: rgba(255, 255, 255, 0.7); --border: rgba(255, 255, 255, 0.8);
  --input: rgba(255, 255, 255, 0.85); --input-border: rgba(24, 46, 74, 0.18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif; color: var(--text); background: #eef4f8;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.mesh { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.mesh span { position: absolute; border-radius: 50%; filter: blur(70px); }
.mesh span:nth-child(1) { width: 70vw; height: 70vw; left: -25vw; top: -25vw; background: rgba(29, 140, 204, 0.32); }
.mesh span:nth-child(2) { width: 60vw; height: 60vw; right: -20vw; bottom: -20vw; background: rgba(49, 170, 78, 0.26); }
.mesh span:nth-child(3) { width: 40vw; height: 40vw; right: 10vw; top: 10vh; background: rgba(58, 173, 202, 0.22); }
.wrap { width: min(720px, 100%); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px 28px; }
.brand { display: flex; justify-content: center; margin: 6px 0 18px; }
.brand img { height: auto; width: min(260px, 70vw); background: #fff; border-radius: 18px; padding: 10px 16px; box-shadow: 0 10px 30px -12px rgba(24, 46, 74, 0.35); }
.glass {
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 16px 44px -18px rgba(24, 46, 74, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.card { padding: clamp(20px, 5vw, 34px); }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.center-text { text-align: center; }
h1 { font-size: clamp(22px, 5vw, 27px); line-height: 1.2; margin: 4px 0 8px; letter-spacing: -0.015em; }
h2 { font-size: 19px; margin: 4px 0 14px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.tiny { font-size: 13px; }
.step { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-strong); background: rgba(29, 140, 204, 0.12); padding: 4px 10px; border-radius: 999px; }
.legal { max-height: 46vh; overflow: auto; white-space: pre-wrap; padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.75); border: 1px solid var(--input-border); font-size: 15px; line-height: 1.65; margin: 12px 0 8px; }
.legal:focus { outline: none; box-shadow: 0 0 0 3px rgba(29, 140, 204, 0.35); }
/* Títulos que reciben el foco por programa al cambiar de paso (lector de pantalla): sin el anillo azul visible */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.full { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 600; font-size: 14.5px; }
input, select {
  font: inherit; color: inherit; width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--input-border);
  background: var(--input); font-size: 16px; /* 16px evita el zoom automático en iOS */
}
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 140, 204, 0.3); }
input[aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-size: 13.5px; font-weight: 500; min-height: 0; }
.error:empty { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 6px; padding: 14px; border-radius: 14px; background: rgba(49, 170, 78, 0.10); cursor: pointer; font-weight: 400; font-size: 15px; }
.check input { width: 24px; height: 24px; min-height: 0; margin: 0; accent-color: var(--green); flex: none; }
.check.locked { opacity: 0.6; background: rgba(24, 46, 74, 0.06); cursor: not-allowed; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; font: inherit; font-weight: 650; cursor: pointer; min-height: 48px; padding: 0 20px; transition: transform 140ms, filter 140ms; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { width: 100%; margin-top: 18px; color: #fff; background: linear-gradient(180deg, var(--blue), var(--blue-strong)); box-shadow: 0 10px 22px -10px rgba(29, 140, 204, 0.8); }
.btn-lg { min-height: 56px; font-size: 17px; }
.btn-ghost { background: rgba(255, 255, 255, 0.7); color: var(--text); border: 1px solid var(--input-border); }
.notice { padding: 12px 14px; border-radius: 12px; margin-top: 14px; font-size: 14.5px; }
.notice.danger { background: rgba(220, 38, 38, 0.12); color: var(--danger); }
.turnstile { margin-top: 14px; display: flex; justify-content: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--blue); border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ok-icon { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--green), #25913f); box-shadow: 0 14px 30px -12px rgba(49, 170, 78, 0.8); }
.foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 22px; padding-bottom: env(safe-area-inset-bottom); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── Flujo por pasos ── */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
@media (max-width: 480px) { .choices { grid-template-columns: 1fr; } }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; border-radius: 18px; border: 2px solid var(--input-border);
  background: rgba(255, 255, 255, 0.8); cursor: pointer; text-align: left; font: inherit; color: var(--text); min-height: 120px; transition: border-color 140ms, transform 140ms; }
.choice:hover, .choice:focus-visible { border-color: var(--blue); outline: none; }
.choice:active { transform: scale(0.98); }
.choice svg { width: 30px; height: 30px; color: var(--blue); }
.choice strong { font-size: 17px; }
.choice span { color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; }
.actions .btn-primary, .actions .btn-danger { flex: 1; margin-top: 0; width: auto; }
.hint { font-size: 13px; color: var(--muted); }
.step.danger { color: var(--danger); background: rgba(220, 38, 38, 0.1); }
.btn-danger { color: #fff; background: linear-gradient(180deg, #d9363e, #b9262d); box-shadow: 0 10px 22px -10px rgba(217, 54, 62, 0.8); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.ok-icon.round { border-radius: 50%; }
.ok-icon.info { background: linear-gradient(135deg, var(--blue), var(--blue-strong)); box-shadow: 0 14px 30px -12px rgba(29, 140, 204, 0.8); }
.sig { position: relative; margin-top: 14px; border-radius: 14px; background: #fff; border: 1.5px dashed var(--input-border); touch-action: none; }
.sig canvas { width: 100%; height: 200px; display: block; border-radius: 14px; }
.sig-line { position: absolute; left: 20px; right: 20px; bottom: 40px; border-bottom: 1px solid #c9d5df; pointer-events: none; }
.sig-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #8597a9; pointer-events: none; }

.mt-20 { margin-top: 20px; }
.mt-8 { margin-top: 8px !important; }
