/* Postulación: formulario por pasos. Usa los tokens de styles.css (v2: negro, Geist, pill claro, hairlines)
   y la escala de motion de transitions.dev. Números siempre en Chivo Mono (cero liso). */
:root {
  --mono: "Chivo Mono", ui-monospace, monospace;
  --line-2: #2a2e35;
  --field: #0e1014;
  --field-hover: #111318;
  --danger: #f2555a;
  --danger-ink: #ff9a9d;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --duration-medium: 350ms;
  --duration-slow: 400ms;
  --duration-very-slow: 500ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);
  --shake-distance: 6px;
  --shake-overshoot: 4px;
  --shake-dur-a: 80ms;
  --shake-dur-b: 60ms;
  --shake-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --revert-hold: 3000ms;
  --revert-dur: 280ms;
  --check-opacity-dur: 500ms;
  --check-rotate-dur: 500ms;
  --check-rotate-from: 80deg;
  --check-bob-dur: 500ms;
  --check-y-amount: 40px;
  --check-blur-dur: 500ms;
  --check-blur-from: 10px;
  --check-path-dur: 500ms;
  --check-path-delay: 80ms;
  --check-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-opacity: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-rotate: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-bob: cubic-bezier(0.34, 1.35, 0.64, 1);
  --check-ease-path: cubic-bezier(0.22, 1, 0.36, 1);
  --check-box: 150ms;
  --check-draw: 350ms;
  --check-delay: 0ms;
  --check-uncheck: 150ms;
  --check-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --reel-cell: 1.15em;
  --acc-dur: 400ms;
}

.page-form { min-height: 100dvh; }
.num, .t-reel { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* nav */
.nav-back { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 0.9375rem; opacity: 0.8; transition: opacity 200ms var(--ease); }
@media (hover: hover) { .nav-back:hover { opacity: 1; } }

/* encabezado compacto: el formulario arranca en la primera pantalla */
.form-page { padding-top: calc(var(--nav-h) + clamp(16px, 3vw, 40px)); }
.form-hero { max-width: 760px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.form-hero-copy { display: grid; gap: 8px; min-width: 0; }
.eyebrow { font-size: 0.9375rem; color: var(--ink-3); }
.form-title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); font-weight: 500; line-height: 1; letter-spacing: -0.012em; text-transform: uppercase; }
.form-lead { color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.tally { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.tally-num { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem); line-height: 1; color: var(--ink); letter-spacing: -0.02em; min-height: var(--reel-cell); }
.tally-label { color: var(--ink-3); font-size: 0.875rem; line-height: 1.25; max-width: 7.5em; }

/* reel (spinning counter) */
.t-reel { display: inline-flex; align-items: center; height: var(--reel-cell); }
.t-reel-col {
  position: relative; height: var(--reel-cell); overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.t-reel-strip { display: flex; flex-direction: column; will-change: transform, filter; }
.t-reel-digit { height: var(--reel-cell); display: flex; align-items: center; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .t-reel-strip { transition: none !important; filter: none !important; } }

/* shell */
.form-shell { max-width: 760px; margin-top: 4px; padding-bottom: clamp(64px, 8vw, 112px); }

/* progreso: segmentos gruesos */
.progress { position: sticky; top: var(--nav-h); z-index: 5; padding: 14px 0 16px; background: linear-gradient(var(--bg) 78%, rgba(8, 9, 12, 0)); }
.progress-bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.progress-bars button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; gap: 10px; padding: 6px 0; -webkit-tap-highlight-color: transparent; }
.progress-bars button:disabled { cursor: default; }
.progress-bars button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
.seg { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.seg i { position: absolute; inset: 0; border-radius: inherit; background: var(--ink); transform: scaleX(0); transform-origin: left center; transition: transform var(--duration-slow) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out); }
.progress-bars li.is-current .seg i { transform: scaleX(1); background: var(--ink-3); }
.progress-bars li.is-done .seg i { transform: scaleX(1); background: var(--ink); }
.seg-label { font-size: 0.8125rem; color: var(--ink-3); transition: color var(--duration-fast) var(--ease-smooth-out); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-bars li.is-current .seg-label { color: var(--ink); }
.progress-bars li.is-done .seg-label { color: var(--ink-2); }
.progress-meta { display: flex; margin-top: 12px; align-items: baseline; gap: 6px; color: var(--ink-3); font-size: 0.875rem; }
.progress-meta .num { color: var(--ink); }
.progress-name { margin-left: 8px; color: var(--ink-2); }
.saved { margin-left: auto; color: var(--ink-3); font-size: 0.8125rem; opacity: 0; transition: opacity var(--duration-medium) ease-out; }
.saved.is-shown { opacity: 1; }

.restore { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 0.9375rem; }
.restore[hidden] { display: none; }
.link { all: unset; cursor: pointer; color: var(--ink); border-bottom: 1px solid var(--line-2); padding-bottom: 1px; }
.link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* pasos: deslizamiento lateral + alto que se acomoda (page slide + card resize) */
.steps { position: relative; margin-top: 20px; transition: height var(--duration-slow) var(--ease-smooth-out); }
.step { display: grid; gap: 28px; }
.step[hidden] { display: none; }
.step.is-leaving, .step.is-entering { will-change: opacity, transform, filter; }
.step.is-leaving { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; opacity: 0; transform: translateX(var(--x-out, -12px)); filter: blur(3px);
  transition: opacity var(--duration-quick) ease-out, transform var(--duration-fast) var(--ease-smooth-out), filter var(--duration-fast) var(--ease-smooth-out); }
.step.is-entering { opacity: 0; transform: translateX(var(--x-in, 12px)); filter: blur(3px); }
.step.is-active { opacity: 1; transform: none; filter: none;
  transition: opacity var(--duration-fast) var(--ease-smooth-out) 60ms, transform var(--duration-slow) var(--ease-smooth-out) 60ms, filter var(--duration-fast) var(--ease-smooth-out) 60ms; }
.step-head { display: grid; gap: 10px; }
.step-title { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.25rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.012em; text-wrap: balance; }
.step-sub { color: var(--ink-3); font-size: var(--lead); line-height: 1.45; max-width: 56ch; text-wrap: pretty; }
.step.is-fresh .step-head > * { animation: rise var(--duration-very-slow) var(--ease-smooth-out) both; }
.step.is-fresh .step-head > :nth-child(2) { animation-delay: 80ms; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }

/* campos */
.field { display: grid; gap: 10px; min-width: 0; border: 0; margin: 0; padding: 0; }
.field > label, .field > legend { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.35; padding: 0; }
.field > legend { margin-bottom: 10px; }
.opt { color: var(--ink-3); margin-left: 4px; }
.hint { font-size: 0.875rem; color: var(--ink-3); min-height: 1.2em; margin-top: -2px; }
.hint .num { color: var(--ink-2); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
.grid2-wide { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

.control { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--field);
  transition: border-color 150ms ease-out, background-color var(--duration-fast) var(--ease-smooth-out); }
@media (hover: hover) { .control:hover { background: var(--field-hover); } }
.control:focus-within { border-color: #8a9196; background: var(--field-hover); }
.control input, .control textarea { flex: 1; width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 1.0625rem/1.4 var(--sans); letter-spacing: -0.003em; padding: 16px 0; -webkit-appearance: none; appearance: none; border-radius: 0; }
.control input::placeholder, .control textarea::placeholder { color: #5d646a; }
.control.area { align-items: stretch; }
.control textarea { resize: none; min-height: 96px; overflow: hidden; }
.control input[type="number"] { font-family: var(--mono); -moz-appearance: textfield; }
.control input[type="number"]::-webkit-inner-spin-button, .control input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.control.suffix span { color: var(--ink-3); font-size: 0.9375rem; }
.prefix { font-family: var(--mono); color: var(--ink-2); font-size: 1rem; padding-right: 10px; border-right: 1px solid var(--line-2); white-space: nowrap; }

/* tilde de campo completo */
.ok { display: inline-flex; flex: none; color: var(--ink); opacity: 0; transform: scale(0.6) rotate(-30deg); transition: opacity var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out); }
.is-valid .ok { opacity: 1; transform: none; transition: opacity var(--duration-fast) var(--ease-smooth-out), transform var(--duration-very-slow) var(--ease-bounce); }

/* error (error state shake) */
.t-input { transition: border-color 150ms ease-out; will-change: transform; }
.t-input.is-error { transition: border-color var(--revert-dur, 280ms) ease-out; border-color: var(--danger); }
.t-error-msg { font-size: 0.875rem; color: var(--danger-ink); opacity: 0; visibility: hidden; max-height: 0; overflow: hidden; margin-top: -10px;
  transition: opacity var(--revert-dur, 280ms) ease-out, max-height var(--revert-dur, 280ms) ease-out, margin var(--revert-dur, 280ms) ease-out, visibility 0s linear var(--revert-dur, 280ms); }
.t-input-wrap.is-error .t-error-msg { opacity: 1; visibility: visible; max-height: 3em; margin-top: -2px;
  transition: opacity var(--revert-dur, 280ms) ease-out, max-height var(--revert-dur, 280ms) ease-out, margin var(--revert-dur, 280ms) ease-out, visibility 0s linear 0s; }
.t-input.is-shaking { animation: t-input-shake calc(var(--shake-dur-a) * 2 + var(--shake-dur-b) * 2) linear; }
@keyframes t-input-shake {
  0%      { transform: translateX(0);                                 animation-timing-function: var(--shake-ease); }
  28.57%  { transform: translateX(var(--shake-distance));             animation-timing-function: var(--shake-ease); }
  57.14%  { transform: translateX(calc(var(--shake-distance) * -1)); animation-timing-function: var(--shake-ease); }
  78.57%  { transform: translateX(var(--shake-overshoot));            animation-timing-function: var(--shake-ease); }
  100%    { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) { .t-input { animation: none !important; transform: none !important; } }

/* combobox de país y zona horaria (menu dropdown) */
.combo { cursor: text; }
.combo[data-open] { z-index: 40; }
.combo-flag { flex: none; width: 21px; height: 14px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.combo-flag[hidden] { display: none; }
.combo-icon, .combo-caret { display: inline-flex; flex: none; color: var(--ink-3); }
.combo-caret { cursor: pointer; transition: transform var(--duration-fast) var(--ease-smooth-out); }
.combo[data-open] .combo-caret { transform: rotate(180deg); }
.listbox { position: absolute; z-index: 30; top: calc(100% + 6px); left: -1px; right: -1px; margin: 0; padding: 6px; list-style: none; max-height: min(320px, 46dvh); overflow-y: auto; overscroll-behavior: contain;
  background: #121419; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  opacity: 0; transform: scale(0.97) translateY(-4px); transform-origin: top center; pointer-events: none; visibility: hidden;
  transition: opacity var(--duration-quick) var(--ease-smooth-out), transform var(--duration-quick) var(--ease-smooth-out), visibility 0s linear var(--duration-quick); }
.combo[data-open] .listbox { opacity: 1; transform: none; pointer-events: auto; visibility: visible;
  transition: opacity var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out), visibility 0s; }
.listbox li { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--ink-2); cursor: pointer; font-size: 1rem; }
.listbox li img { width: 21px; height: 14px; border-radius: 2px; flex: none; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.listbox li .opt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listbox li .opt-meta { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-3); white-space: nowrap; }
.listbox li[aria-selected="true"] { color: var(--ink); }
.listbox li.is-active { background: #1b1e24; color: var(--ink); }
.listbox .empty, .listbox .group { color: var(--ink-3); cursor: default; }
.listbox .group { font-size: 0.75rem; padding: 10px 12px 4px; }
@media (prefers-reduced-motion: reduce) { .listbox { transition: none !important; } }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out), color var(--duration-fast) var(--ease-smooth-out), transform 140ms var(--ease); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip small { color: var(--ink-3); font-family: var(--mono); font-size: 0.75rem; margin-left: 6px; transition: color var(--duration-fast) var(--ease-smooth-out); }
.chip-ico { display: inline-flex; width: 0; margin-right: 0; overflow: hidden; opacity: 0; transform: scale(0.4) rotate(-40deg); transition: width var(--duration-fast) var(--ease-smooth-out), margin var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-quick) ease-out, transform var(--duration-fast) var(--ease-smooth-out); }
.chip-ico svg { flex: none; }
@media (hover: hover) { .chip:hover { border-color: #3a3f47; color: var(--ink); } }
.chip:active { transform: scale(0.97); }
.chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip:has(input:checked) small { color: #4a5157; }
.chip:has(input:checked) .chip-ico { width: 14px; margin-right: 8px; opacity: 1; transform: none; transition: width var(--duration-fast) var(--ease-smooth-out), margin var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-fast) ease-out 60ms, transform var(--duration-very-slow) var(--ease-bounce) 40ms; }
.chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

/* segmented con píldora deslizante (tabs sliding) */
.seg-ctl { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--field); }
.seg-ctl .pill { position: absolute; top: 4px; left: 0; width: 0; height: 0; border-radius: 999px; background: var(--ink); opacity: 0;
  transition: transform var(--duration-fast) var(--ease-smooth-out), width var(--duration-fast) var(--ease-smooth-out), height var(--duration-fast) var(--ease-smooth-out), top var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-quick) ease-out; }
.seg-ctl.has-value .pill { opacity: 1; }
.seg-ctl label { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 10px; border-radius: 999px; color: var(--ink-2); cursor: pointer; text-align: center; font-size: 0.9375rem; line-height: 1.15; -webkit-tap-highlight-color: transparent; transition: color var(--duration-fast) var(--ease-smooth-out); }
.seg-ctl input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg-ctl label:has(input:checked) { color: var(--bg); }
.seg-ctl label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) { .seg-ctl label:not(:has(input:checked)):hover { color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .seg-ctl .pill { transition: none !important; } }

/* stepper */
.stepper { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: stretch; min-height: 56px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--field); overflow: hidden; }
.stepper button { all: unset; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; transition: background-color var(--duration-quick) ease-out, color var(--duration-quick) ease-out; }
.stepper button:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; border-radius: 12px; }
@media (hover: hover) { .stepper button:hover { background: var(--field-hover); color: var(--ink); } }
.stepper svg { transition: transform 120ms var(--ease); }
.stepper button:active svg { transform: scale(0.85); }
.stepper input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); text-align: center; font-family: var(--mono); font-size: 1.125rem; padding: 14px 0; -moz-appearance: textfield; border-radius: 0; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input.bump { animation: bump var(--duration-fast) var(--ease-smooth-out); }
@keyframes bump { from { transform: translateY(var(--bump, 6px)); opacity: 0.2; filter: blur(2px); } to { transform: none; opacity: 1; filter: none; } }

/* casillas (checkbox check) */
.confirms-list { display: grid; gap: 4px; }
.cbx { position: relative; display: flex; align-items: center; gap: 14px; min-height: 48px; color: var(--ink-2); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cbx input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.t-check { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--line-2); background: transparent;
  transition: background var(--check-box) var(--check-ease), box-shadow var(--check-box) var(--check-ease); }
.t-check svg { width: 12px; height: 12px; overflow: visible; }
.t-check svg path { fill: none; stroke: var(--bg); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--check-len, 15); stroke-dashoffset: var(--check-len, 15); transition: stroke-dashoffset var(--check-uncheck) var(--check-ease); }
.cbx input:checked + .t-check { background: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.cbx input:checked + .t-check svg path { stroke-dashoffset: 0; transition: stroke-dashoffset var(--check-draw) var(--check-ease) var(--check-delay); }
.cbx input:focus-visible + .t-check { outline: 2px solid var(--ink); outline-offset: 3px; }
.confirms-list.is-error .cbx input:not(:checked) + .t-check { box-shadow: inset 0 0 0 1.5px var(--danger); }
@media (hover: hover) { .cbx:hover { color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .t-check, .t-check svg path { transition: none !important; } }

/* notas: filete superior, sin caja */
.note { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 6px; }
.note p { color: var(--ink-3); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.note .note-title { color: var(--ink); font-weight: 500; }
.note-quiet .note-title { color: var(--ink-2); }

/* acordeón para campos condicionales */
.t-acc { display: grid; }
.t-acc-panel { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--acc-dur) var(--ease-smooth-out), opacity var(--duration-fast) ease-out; }
.t-acc-panel-inner { min-height: 0; overflow: hidden; display: grid; gap: 28px; }
.t-acc.is-open .t-acc-panel { grid-template-rows: 1fr; opacity: 1; }
.t-acc:not(.is-open) .t-acc-panel-inner { visibility: hidden; transition: visibility 0s linear var(--acc-dur); }
.step > .t-acc { transition: margin var(--acc-dur) var(--ease-smooth-out); }
.step > .t-acc:not(.is-open) { margin-top: -28px; }
@media (prefers-reduced-motion: reduce) { .t-acc-panel, .step > .t-acc { transition: none !important; } }

/* acciones */
.form-actions { position: sticky; bottom: 0; z-index: 6; display: flex; gap: 12px; justify-content: space-between; margin-top: 36px; padding: 20px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(rgba(8, 9, 12, 0), var(--bg) 30%); }
.btn svg { flex: none; transition: transform var(--duration-fast) var(--ease-smooth-out); }
button.btn { font-family: var(--sans); border: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.btn-next { gap: 10px; margin-left: auto; min-width: 168px; }
.btn-next svg { margin-right: -4px; }
@media (hover: hover) { .btn-next:hover svg { transform: translateX(3px); } .btn-ghost:hover svg { transform: translateX(-3px); } }
.btn-ghost { gap: 8px; background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); padding-left: 22px; }
@media (hover: hover) { .btn-ghost:hover { background: var(--field-hover); color: var(--ink); } }
.btn-ghost[hidden] { display: none; }
.btn-next[data-final] svg { display: none; }
.btn-next:disabled { cursor: progress; }
.btn-label { display: inline-block; }
.btn-label.swap { animation: swap var(--duration-fast) ease-in-out; }
@keyframes swap { from { opacity: 0; transform: translateY(4px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.btn-next.is-sending .btn-label { background: linear-gradient(90deg, #5a6066 0%, #5a6066 35%, #08090c 50%, #5a6066 65%, #5a6066 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.form-error { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--danger-ink); font-size: 0.9375rem; }
.form-error[hidden] { display: none; }
.form-error a { color: var(--ink); border-bottom: 1px solid var(--line-2); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* enviado */
.done { display: grid; justify-items: center; text-align: center; gap: 28px; padding: clamp(8px, 4vw, 40px) 0 0; outline: none; }
.done[hidden] { display: none; }
.done-check { color: var(--ink); }
.t-success-check { display: inline-block; transform-origin: center; opacity: 0; will-change: transform, opacity, filter; }
.t-success-check svg { display: block; overflow: visible; }
.t-success-check svg path { stroke-dasharray: 28; stroke-dashoffset: 28; }
.t-success-check[data-state="in"] {
  animation: t-check-fade var(--check-opacity-dur) var(--check-ease-opacity) forwards, t-check-rotate var(--check-rotate-dur) var(--check-ease-rotate) forwards,
    t-check-blur var(--check-blur-dur) var(--check-ease-out) forwards, t-check-bob var(--check-bob-dur) var(--check-ease-bob) forwards; }
.t-success-check[data-state="in"] svg path { animation: t-check-draw var(--check-path-dur) var(--check-ease-path) var(--check-path-delay, 0ms) forwards; }
@keyframes t-check-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes t-check-rotate { from { transform: rotate(var(--check-rotate-from)); } to { transform: rotate(0deg); } }
@keyframes t-check-blur { from { filter: blur(var(--check-blur-from)); } to { filter: blur(0); } }
@keyframes t-check-bob { from { translate: 0 var(--check-y-amount); } to { translate: 0 0; } }
@keyframes t-check-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .t-success-check { animation: none !important; opacity: 1; }
  .t-success-check svg path { animation: none !important; stroke-dashoffset: 0 !important; }
}
.done .t-stagger { display: grid; justify-items: center; gap: 20px; }
.done .t-stagger > * { opacity: 0; }
.done.is-in .t-stagger > * { animation: rise var(--duration-very-slow) var(--ease-smooth-out) forwards; }
.done.is-in .t-stagger > :nth-child(1) { animation-delay: 260ms; }
.done.is-in .t-stagger > :nth-child(2) { animation-delay: 320ms; }
.done.is-in .t-stagger > :nth-child(3) { animation-delay: 380ms; }
.done.is-in .t-stagger > :nth-child(4) { animation-delay: 440ms; }
.done.is-in .t-stagger > :nth-child(5) { animation-delay: 500ms; }
.done .h2 { text-transform: none; letter-spacing: -0.012em; }
.done .lead { max-width: 46ch; }
.done-num { font-family: var(--mono); color: var(--ink); }
.done-list { display: grid; width: 100%; max-width: 520px; text-align: left; margin: 8px 0 0; padding: 0; list-style: none; }
.done-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.done-list .num { color: var(--ink-3); font-size: 0.875rem; padding-top: 2px; }
@media (prefers-reduced-motion: reduce) { .done .t-stagger > * { opacity: 1; animation: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .steps, .step, .step.is-active, .step.is-leaving { transition: none !important; }
  .step.is-entering, .step.is-leaving { transform: none; filter: none; }
  .step.is-fresh .step-head > * { animation: none !important; }
}

/* mobile */
@media (min-width: 641px) { .progress-meta .num, .progress-meta .sep, .progress-name { display: none; } }
@media (max-width: 640px) {
  .nav-back span { display: none; }
  .nav-back { width: 44px; height: 44px; justify-content: center; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); opacity: 1; }
  .form-hero { align-items: flex-end; gap: 16px; padding-bottom: 14px; }
  .form-title { font-size: 1.75rem; }
  .form-lead { font-size: 0.9375rem; }
  .tally { flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
  .tally-num { font-size: 1.75rem; }
  .tally-label { font-size: 0.75rem; max-width: 6.5em; }
  .steps { margin-top: 12px; }
  .step { gap: 24px; }
  .progress-bars { gap: 4px; }
  .seg-label { display: none; }
  .grid2, .grid2-wide { grid-template-columns: minmax(0, 1fr); }
  .seg-ctl label { font-size: 0.875rem; padding: 0 6px; }
  .form-actions .btn { width: auto; max-width: none; }
  .btn-next { flex: 1; min-width: 0; }
  .btn-ghost { padding: 18px 20px; }
  .btn-ghost span { display: none; }
  .done { justify-items: start; text-align: left; }
  .done .t-stagger { justify-items: start; }
  .done .btn { width: 100%; }
}

/* pie, nota y enlaces del formulario */
.page-form .footer { padding: 32px 0 40px; }
.footer-in { display: grid; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--ink-2); font-size: 0.9375rem; }
.footer-links a { transition: color 200ms var(--ease); }
@media (hover: hover) { .footer-links a:hover { color: var(--gold-hi); } }
.form-fine { font-size: 0.875rem; color: var(--ink-3); padding-left: 14px; border-left: 2px solid var(--gold-line); }
.cbx a { color: var(--gold-hi); border-bottom: 1px solid var(--gold-line); }
.nav-form .nav-end { display: flex; align-items: center; gap: 18px; }
@media (max-width: 640px) { .nav-form .nav-end .lang { display: inline-flex; } }
.page-form .btn-next { background: var(--gold-metal); color: #1a1206; box-shadow: inset 0 1px 0 rgba(255, 244, 214, 0.55), 0 8px 28px rgba(210, 162, 76, 0.18); }

/* autocompletado del navegador: mismo fondo que el campo, sin el bloque azul */
.control input:-webkit-autofill, .control input:-webkit-autofill:hover, .control input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--field) inset; box-shadow: 0 0 0 1000px var(--field) inset;
  transition: background-color 600000s 0s, color 600000s 0s;
}
.control:focus-within input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--field-hover) inset; box-shadow: 0 0 0 1000px var(--field-hover) inset; }
/* la zona horaria avisa cuando se completó sola */
.field.flash .control { animation: zflash 1100ms var(--ease-smooth-out); }
@keyframes zflash { 0% { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(210, 162, 76, 0.22); } 100% { border-color: var(--line-2); box-shadow: 0 0 0 0 rgba(210, 162, 76, 0); } }
@media (prefers-reduced-motion: reduce) { .field.flash .control { animation: none; } }
/* v3: tags de la casa y un tono neutro para la selección */
.cbx a { color: var(--ink); border-bottom-color: var(--line-2); }
.form-fine { border-left-color: var(--line-2); }
.field.flash .control { animation-name: zflash2; }
@keyframes zflash2 { 0% { border-color: var(--ink-2); box-shadow: 0 0 0 4px rgba(225, 229, 229, 0.12); } 100% { border-color: var(--line-2); box-shadow: 0 0 0 0 rgba(225, 229, 229, 0); } }
.note { border-top-color: var(--line); }
@media (hover: hover) { .page-form .footer-links a:hover { color: var(--ink); } }

/* variante verde: solo detalles */
.progress-bars li.is-current .seg i { background: var(--green-mid); }
.cbx input:checked + .t-check { background: var(--green-mid); box-shadow: inset 0 0 0 1.5px var(--green-mid); }
.cbx input:checked + .t-check svg path { stroke: #fff; }
.note .note-title { color: var(--green-hi); }
