/* wizard.css — Estilos del wizard TurboTax-style.
   Reutiliza la paleta y tipografías declaradas en styles.css. */

@font-face {
  font-family: 'Roboto Condensed';
  src: url('./fonts/RobotoCondensed-Regular.ttf') format('truetype');
  font-display: swap;
  font-style: normal;
  font-weight: 300 400;
}

/* ---------------- Contenedor principal ---------------- */
.wizard {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1rem 7rem;
  min-height: calc(100vh - 64px);
}

/* ---------------- Barra de progreso ---------------- */
.wiz-progress {
  position: sticky;
  top: 64px;
  z-index: 30;
  background: var(--color-bg);
  padding: .85rem 0 .65rem;
  margin-bottom: 1rem;
}
.wiz-progress-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem;
  position: relative;
}
.wiz-progress-track::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}
.wiz-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
  cursor: default;
}
.wiz-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--font-display);
  transition: all var(--transition);
}
.wiz-step-label {
  font-size: .7rem;
  color: var(--color-muted);
  margin-top: .35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
  font-weight: 500;
  letter-spacing: -.01em;
}
.wiz-step[data-state="done"] .wiz-step-dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
.wiz-step[data-state="active"] .wiz-step-dot {
  background: var(--color-cta);
  border-color: var(--color-cta);
  color: white;
  box-shadow: 0 0 0 4px rgba(239, 115, 6, .14);
}
.wiz-step[data-state="active"] .wiz-step-label {
  color: var(--color-primary);
  font-weight: 700;
}
.wiz-step[data-state="done"] .wiz-step-label {
  color: var(--color-primary);
}

/* En pantallas pequeñas, mostramos solo dots + label de la actual */
@media (max-width: 640px) {
  .wiz-step-label { display: none; }
  .wiz-step[data-state="active"] .wiz-step-label {
    display: block;
    position: absolute;
    top: 34px;
    background: var(--color-primary);
    color: white;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 600;
  }
  .wiz-progress { padding-bottom: 1.6rem; }
}

/* ---------------- Pantallas ---------------- */
.wiz-screen {
  display: none;
  flex-direction: column;
  gap: 1rem;
  animation: wizFadeIn 380ms ease-out;
}
.wiz-screen.is-active {
  display: flex;
}
@keyframes wizFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wiz-screen.is-leaving {
  animation: wizFadeOut 220ms ease-in forwards;
}
@keyframes wizFadeOut {
  to { opacity: 0; transform: translateY(-8px); }
}

.wiz-screen-header { margin-bottom: .25rem; }
.wiz-screen-eyebrow {
  font-size: .78rem;
  color: var(--color-cta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 .35rem;
}
.wiz-screen h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 700;
  margin: 0 0 .35rem;
  color: var(--color-primary);
  letter-spacing: -.02em;
  line-height: 1.2;
}
.wiz-screen-lead {
  margin: 0;
  color: var(--color-muted);
  font-size: .95rem;
}

.wiz-screen-body {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Placeholder genérico para bloques aún no implementados */
.wiz-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--color-muted);
  background: var(--color-surface-low);
  border: 1px dashed var(--color-outline);
  border-radius: var(--radius-md);
}
.wiz-placeholder strong {
  color: var(--color-primary);
  font-family: var(--font-display);
}

/* ---------------- Footer de navegación ---------------- */
.wiz-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--color-border);
  padding: .75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}
.wiz-nav-inner {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}
.wiz-nav .btn {
  margin: 0;
  min-height: 3rem;
  padding: 0 1.5rem;
  max-width: none;
  width: auto;
}
/* En laptop/tablet: tamaños balanceados, Continuar levemente más ancho como acción primaria. */
.wiz-nav .btn--ghost {
  flex: 0 0 auto;
  min-width: 10rem;
  max-width: 14rem;
}
.wiz-nav .btn--primary {
  flex: 0 0 auto;
  min-width: 12rem;
  max-width: 16rem;
}

/* En móvil: ambas acciones comparten la fila con dimensiones equivalentes. */
@media (max-width: 480px) {
  .wiz-nav .btn--ghost,
  .wiz-nav .btn--primary {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }
}

/* ---------------- Overlay de carga (lightbulb) ---------------- */
.wiz-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(249, 249, 249, 0.96);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  animation: wizFadeIn 200ms ease-out;
}
.wiz-loading.is-active { display: flex; }
.wiz-loading-logo {
  width: 64px;
  height: 64px;
  /* Colores neutros base, sin filtros: solo opacidad que se aviva y se opaca. */
  animation: wizFade 2.4s ease-in-out infinite;
  will-change: opacity;
}
/* En laptop la pantalla responde mucho más rápido que móvil/tablet,
   así que el ciclo se siente acelerado. Lo extendemos para que se aprecie pausado. */
body.is-pc .wiz-loading-logo,
body.is-pc .wiz-loading-text {
  animation-duration: 3.8s;
}
@keyframes wizFade {
  0%, 100% { opacity: .38; }
  50%      { opacity: 1; }
}
.wiz-loading-text {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: -.01em;
  /* Misma animación y duración que el logo → pulsan sincronizados. */
  animation: wizFade 2.4s ease-in-out infinite;
}

/* Cuando el usuario tiene activado "Reducir animaciones" en su SO (Windows /
   macOS), los navegadores suelen colapsar la duración a casi-cero, lo que
   produce parpadeo desagradable en lugar del fade pausado. Respetamos la
   preferencia mostrando un estado estático (sin animación, sin transición).
   La rotación del bombillo + el texto siguen comunicando "cargando…" sin
   movimiento que pueda molestar. */
body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) .wiz-progress,
body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) .wiz-nav,
body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) .wiz-copyright { display: none; }
body.wiz-mode:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) { background: #fafbfc; padding-bottom: 0; }
body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) #hero,
body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) .site-header nav { display: none; }
body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) .site-header { position: static; width: min(1040px, calc(100% - 3rem)); margin: 0 auto; padding: 1.5rem 0; background: transparent; border: 0; box-shadow: none; box-sizing: border-box; }
body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) .brand-mark { height: 36px; }
body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) #wizard-root { width: 100%; max-width: none; padding: 0; margin: 0; }
body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) .wizard { width: min(600px, calc(100% - 2.5rem)); min-height: 0; margin: 0 auto; padding: 0; }
#cliente-heading:focus { outline: none; }
#cliente-screen,
#issuer-authorization-screen { min-height: calc(100dvh - 150px); display: flex; align-items: center; padding: 2rem 0 4rem; box-sizing: border-box; animation: datos-reveal 200ms ease; }
.cliente-content { width: 100%; }
.cliente-icon { color: var(--brand-primary); margin-bottom: 1.25rem; }
.cliente-content h2 { margin: 0 0 1.25rem; font-family: 'DM Sans', sans-serif; font-size: clamp(1.8rem, 2.4vw, 2.25rem); font-weight: 650; line-height: 1.15; letter-spacing: -.035em; color: var(--text-primary); }
.cliente-content p { color: var(--text-secondary); font-size: .95rem; line-height: 1.6; margin: .5rem 0; }
.cliente-actions { display: grid; justify-items: start; gap: .75rem; margin-top: 2rem; }
.cliente-actions .btn--primary { min-height: 50px; min-width: 240px; border-radius: 12px; box-shadow: none; }
.cliente-actions .btn--primary:disabled { background: #dfe4eb; color: #667085; cursor: not-allowed; }
.cliente-content .cliente-config { font-size: .8rem; }
.cliente-existing .cliente-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 380px; gap: 1rem; margin-top: 1.5rem; }
.cliente-existing .cliente-actions .btn { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-width: 0; height: 48px; min-height: 48px; margin: 0; padding: .75rem .5rem; border-radius: 12px; text-align: center; }
.cliente-existing .cliente-actions .btn--ghost { border: 1px solid var(--border); }
.issuer-result > p { max-width: 560px; }
.issuer-next-steps { display: grid; gap: .75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; max-width: 560px; }
.issuer-next-steps li { display: grid; grid-template-columns: 28px 1fr; gap: .75rem; align-items: start; padding-top: .75rem; border-top: 1px solid var(--border); }
.issuer-next-steps li > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #b8c7df; border-radius: 50%; color: var(--brand-primary); font-size: .78rem; font-weight: 700; }
.issuer-next-steps p { margin: 0; color: var(--text-primary); line-height: 1.35; }
.issuer-next-steps strong { display: block; font-size: .9rem; }
.issuer-next-steps small { display: block; margin-top: .2rem; color: var(--text-secondary); font-size: .8rem; line-height: 1.45; }
.issuer-tutorial { margin-top: .8rem; }
.issuer-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; margin-top: 1.25rem; }
.issuer-actions .btn { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-width: 0; max-width: none; height: 52px; min-height: 52px; margin: 0; padding: .65rem .75rem; border-radius: 12px; line-height: 1.2; text-align: center; text-decoration: none; }
.issuer-actions .btn--ghost { border: 1px solid var(--border); }
.issuer-actions .btn--primary { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; box-shadow: none; }
.issuer-actions .btn--primary:hover:not(:disabled) { background: #082457; border-color: #082457; }
@media (max-width: 820px) {
  body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) .site-header { width: calc(100% - 2.5rem); padding: 1rem 0; }
  body:is([data-wizard-step="cliente"], [data-wizard-step="issuer-authorization"]) .brand-mark { height: 30px; }
  .cliente-content h2 { font-size: 1.9rem; }
  .cliente-actions { justify-items: stretch; }
  .cliente-actions .btn--primary { width: 100%; min-height: 54px; }
  #cliente-screen:has(.cliente-existing) { min-height: calc(100dvh - 220px); padding: 1.5rem 0 2rem; }
  .cliente-existing .cliente-icon { margin-bottom: .9rem; }
  .cliente-existing h2 { margin-bottom: .9rem; }
  .issuer-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .issuer-actions .btn { height: 54px; min-height: 54px; padding-inline: .45rem; font-size: .8rem; }
  .issuer-next-steps { margin-top: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wiz-loading-logo,
  .wiz-loading-text {
    animation: none !important;
    opacity: 1;
  }
}

.cookie-consent { position: fixed; z-index: 120; left: 1rem; right: 1rem; bottom: 1rem; max-width: 920px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: 0 12px 38px rgba(18,32,51,.16); }
.cookie-consent strong { color: var(--text-primary); }
.cookie-consent p { margin: .25rem 0; color: var(--text-secondary); font-size: .82rem; }
.cookie-consent a { color: var(--brand-primary); font-size: .78rem; }
.cookie-consent__actions { display: flex; gap: .55rem; flex: 0 0 auto; }
@media (max-width: 700px) { .cookie-consent { flex-direction: column; align-items: stretch; bottom: max(.5rem, env(safe-area-inset-bottom)); } .cookie-consent__actions .btn { flex: 1; } }

/* Y para el overlay completo, también suavizamos su entrada en reduce-motion */
@media (prefers-reduced-motion: reduce) {
  .wiz-loading {
    animation: none !important;
  }
  .wiz-screen {
    animation: none !important;
  }
  .wiz-screen.is-leaving {
    animation: none !important;
  }
}

/* ---------------- Pantalla de resumen (Confirmación) ---------------- */
.wiz-summary {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.wiz-summary-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.wiz-summary-card:hover {
  border-color: var(--color-teal-dark);
  box-shadow: var(--shadow-sm);
}
.wiz-summary-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.wiz-summary-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary);
  margin: 0;
  letter-spacing: -.01em;
}
.wiz-summary-edit {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: .25rem .7rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-family: var(--font-body);
}
.wiz-summary-edit:hover {
  background: var(--color-teal-light);
  border-color: var(--color-teal-dark);
}
.wiz-summary-rows {
  display: grid;
  grid-template-columns: minmax(120px, 35%) 1fr;
  gap: .35rem .85rem;
  font-size: .9rem;
}
.wiz-summary-rows dt {
  color: var(--color-muted);
  font-weight: 500;
}
.wiz-summary-rows dd {
  margin: 0;
  color: var(--color-text);
  font-weight: 600;
  word-break: break-word;
}
.wiz-summary-empty {
  font-style: italic;
  color: var(--color-muted);
  font-weight: 400;
}

@media (max-width: 480px) {
  .wiz-summary-rows {
    grid-template-columns: 1fr;
    gap: 0 .85rem;
  }
  .wiz-summary-rows dt { margin-top: .35rem; font-size: .78rem; }
}

/* ---------------- Aviso de dispositivo (móvil/tablet) ---------------- */
.wiz-device-warning {
  background: var(--color-warn-container);
  border: 1px solid var(--color-warn);
  color: var(--color-warn);
  border-radius: var(--radius-md);
  padding: .85rem 1rem;
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.wiz-device-warning svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: .1rem;
}
.wiz-device-warning strong { display: block; margin-bottom: .15rem; }

/* ---------------- Bloques de la Pantalla 1 (Firma) ---------------- */
.firma-block {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  transition: opacity var(--transition);
}
.firma-block[data-locked="true"] {
  opacity: .45;
  pointer-events: none;
  filter: grayscale(.25);
}
.firma-block--terms {
  background: var(--color-teal-light);
  border-color: var(--color-teal-dark);
}
.firma-terms {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  font-size: .95rem;
  color: var(--color-text);
  cursor: pointer;
}
.firma-terms input[type="checkbox"] {
  margin-top: .2rem;
  flex-shrink: 0;
}
.firma-terms input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.firma-terms input[type="checkbox"]:disabled + span {
  color: var(--color-muted);
}
.terms-hint-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: .6rem 0 0;
  padding: .45rem .65rem;
  font-size: .82rem;
  color: var(--color-teal-dark);
  background: rgba(135, 199, 220, .14);
  border-radius: var(--radius-sm);
}
.terms-hint-row svg {
  flex-shrink: 0;
  opacity: .75;
}
.firma-block-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .35rem;
}
.firma-block-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-weight: 700;
  font-size: .82rem;
  font-family: var(--font-display);
  flex-shrink: 0;
}
.firma-block h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-primary);
}
.firma-block-help {
  margin: 0 0 .85rem;
  font-size: .88rem;
  color: var(--color-muted);
}
.firma-uploader-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.firma-uploader-row .btn {
  margin: 0;
  width: auto;
  max-width: none;
  min-height: 2.5rem;
  padding: 0 1rem;
  flex-shrink: 0;
}
.firma-block .firma-nombre {
  font-size: .88rem;
  color: var(--color-muted);
  font-weight: 500;
  word-break: break-all;
}
.firma-block .field { margin-bottom: .75rem; }
.firma-block .modal-actions { margin: 0 0 .75rem; }
.firma-block .modal-actions .btn { margin: 0; }
.firma-block .firma-resumen {
  background: var(--color-teal-light);
  border-color: var(--color-teal-dark);
  margin-top: .25rem;
}
.firma-block .firma-error:not(:empty) {
  background: var(--color-error-container);
  color: var(--color-error);
  border-radius: var(--radius-sm);
  padding: .55rem .75rem;
  margin: .5rem 0;
  font-size: .88rem;
  font-weight: 500;
}
.firma-block #f-ruc-ok {
  background: var(--color-teal-light);
  color: var(--color-teal-dark);
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
  margin: .5rem 0 0;
  font-size: .9rem;
  font-weight: 600;
}
.btn--soporte-firma {
  margin-top: .65rem;
  width: 100%;
  background: transparent;
  border: 1px dashed var(--color-outline);
  color: var(--color-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
}
.btn--soporte-firma:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ---------------- Pantalla 2 (Datos) — badge auto-llenado ---------------- */
.datos-intro {
  margin: 0 0 1rem;
  font-size: .9rem;
  color: var(--color-muted);
  background: var(--color-surface-low);
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-teal-dark);
}
.auto-badge {
  display: inline-block;
  background: var(--color-teal-light);
  color: var(--color-teal-dark);
  font-size: .68rem;
  font-weight: 600;
  padding: .12rem .5rem;
  border-radius: 999px;
  margin-left: .45rem;
  letter-spacing: .02em;
  vertical-align: middle;
}

/* Campos bloqueados (pre-llenados desde firma/cert, no editables) */
.field-locked input,
.field-locked select {
  background: var(--color-surface-low);
  color: var(--color-text);
  cursor: not-allowed;
  border-color: var(--color-border);
  font-weight: 600;
}
.field-locked input:focus,
.field-locked select:focus {
  outline: none;
  border-color: var(--color-border);
  box-shadow: none;
}
.lock-ico {
  font-size: .82rem;
  margin-right: .25rem;
  opacity: .6;
  vertical-align: middle;
}

/* ---------------- Pantalla 3 (Token) ---------------- */
.token-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 640px) {
  .token-grid { grid-template-columns: 1fr; }
}
.token-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  transition: opacity var(--transition), filter var(--transition);
}
.token-card[data-locked="true"] {
  opacity: .45;
  pointer-events: none;
  filter: grayscale(.25);
}
.token-card-header {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  margin-bottom: .85rem;
  color: var(--color-primary);
}
.token-card-header svg { flex-shrink: 0; margin-top: .15rem; }
.token-card-header h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-primary);
}
.token-destino {
  margin: .1rem 0 0;
  font-size: .82rem;
  color: var(--color-muted);
  word-break: break-all;
}
.token-inputs {
  border: 0;
  padding: 0;
  margin: 0 0 .65rem;
  display: flex;
  gap: .4rem;
  justify-content: flex-start;
}
.token-inputs input {
  width: 2.6rem;
  height: 3rem;
  border: 1.5px solid var(--color-outline);
  border-radius: var(--radius-sm);
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-card);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.token-inputs input:focus {
  outline: none;
  border-color: var(--color-cta);
  box-shadow: 0 0 0 4px rgba(239, 115, 6, .14);
}
/* Dígito ya ingresado y bloqueado (readonly mientras no se corrija con Backspace). */
.token-inputs input.is-filled {
  background: #f3f6fa;
  border-color: #c9dee9;
  color: #00236f;
  font-weight: 700;
  cursor: not-allowed;
}
.token-inputs input.is-ok {
  border-color: var(--color-teal-dark);
  background: var(--color-teal-light);
}
.token-inputs input.is-error {
  border-color: var(--color-error);
  background: var(--color-error-container);
  animation: tokenShake 0.4s ease-in-out;
}
@keyframes tokenShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.token-status {
  margin: .35rem 0 .5rem;
  font-size: .82rem;
  color: var(--color-muted);
}
.token-status.is-error { color: var(--color-error); }
.token-status.is-ok { color: var(--color-teal-dark); font-weight: 600; }
.token-reenviar {
  background: transparent;
  border: 0;
  color: var(--color-primary);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
}
.token-reenviar:hover:not(:disabled) { text-decoration: underline; }
.token-reenviar:disabled {
  color: var(--color-muted);
  cursor: not-allowed;
}

/* Bloque DEMO con los códigos visibles (quitar cuando se integre backend) */
.token-debug {
  background: rgba(135, 199, 220, .14);
  border: 1px dashed var(--color-teal-dark);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .85rem;
  color: var(--color-teal-dark);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
}
.token-debug-code {
  background: var(--color-card);
  border: 1px solid var(--color-teal-dark);
  border-radius: 999px;
  padding: .2rem .65rem;
  font-family: 'Roboto Condensed', monospace;
  font-weight: 700;
  letter-spacing: .08em;
}
.token-debug small { display: block; width: 100%; opacity: .85; font-style: italic; }

/* ---------------- Pantalla 6 (Clave) — input con toggle ojo ---------------- */
.field-password {
  position: relative;
  display: flex;
}
.field-password input {
  flex: 1;
  padding-right: 2.5rem;
}
.pwd-toggle {
  position: absolute;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  padding: .35rem .5rem;
  cursor: pointer;
  color: var(--color-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color var(--transition), background var(--transition);
}
.pwd-toggle:hover { color: var(--color-primary); background: var(--color-teal-light); }
.pwd-toggle:focus-visible { outline: 2px solid var(--color-cta); outline-offset: 2px; }

/* ---------------- Pantalla 7 (Logo) — hint final ---------------- */
.logo-skip-hint {
  margin: 1.25rem 0 0;
  padding: .65rem .85rem;
  font-size: .85rem;
  color: var(--color-muted);
  background: var(--color-surface-low);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-outline);
}

/* ---------------- Pantalla de éxito final ---------------- */
.wiz-success {
  text-align: center;
  padding: 3rem 1rem;
  max-width: 540px;
  margin: 0 auto;
}
.wiz-success-check {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--color-teal-dark);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: wizPop 480ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wizPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.wiz-success h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--color-primary);
  margin: 0 0 .65rem;
}
.wiz-success p {
  color: var(--color-muted);
  font-size: 1rem;
  margin: 0 0 1.5rem;
}
.wiz-success-creds {
  background: var(--color-teal-light);
  border: 1px solid var(--color-teal-dark);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: left;
  display: inline-block;
  max-width: 100%;
}
.wiz-success-creds p {
  margin: .25rem 0;
  font-size: .95rem;
  color: var(--color-primary);
}
.wiz-success-creds p span {
  color: var(--color-muted);
  display: inline-block;
  width: 70px;
}
.wiz-success-creds a { color: var(--color-cta); text-decoration: none; font-weight: 600; }
.wiz-success-creds a:hover { text-decoration: underline; }

/* ---------------- Auto-advance (pantalla tributaria sin acción) ---------------- */
.wiz-auto-advance {
  text-align: center;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
}
.wiz-auto-advance-spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-teal-light);
  color: var(--color-teal-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: wizPop 480ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wiz-auto-advance h4 {
  margin: .35rem 0 0;
  font-family: var(--font-display);
  color: var(--color-primary);
  font-size: 1.1rem;
}
.wiz-auto-advance p {
  margin: 0;
  color: var(--color-muted);
  font-size: .92rem;
  max-width: 480px;
}
.wiz-auto-advance-hint {
  font-size: .82rem !important;
  font-style: italic;
  opacity: .8;
  animation: wizFade 1.4s ease-in-out infinite;
}

/* ---------------- Copyright al pie del wizard ---------------- */
.wiz-copyright {
  margin-top: 1.5rem;
  padding: 1rem 1rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
}
.wiz-copyright p {
  margin: 0;
  font-size: .78rem;
  color: var(--color-muted);
  letter-spacing: .01em;
}

/* Hero compactado cuando vive arriba del wizard:
   menos padding vertical para no empujar al wizard tan abajo. */
body.wiz-mode #hero {
  padding-top: 1rem;
  padding-bottom: .5rem;
  margin-bottom: 0;
}

/* ========================================================================
   REDISEÑO 2026-09 — registro 300 documentos gratis
   ======================================================================== */
:root {
  --brand-primary: #0b2d6b;
  --brand-secondary: #e66f12;
  --text-primary: #152033;
  --text-secondary: #5c6678;
  --surface: #ffffff;
  --surface-muted: #f5f7fa;
  --border: #dce2ea;
  --success: #18794e;
  --warning: #9a6700;
  --danger: #b42318;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
}

body.wiz-mode { background: #f7f8fa; color: var(--text-primary); padding-bottom: 5.5rem; }
.wiz-mode .site-header { background: rgba(255,255,255,.96); border-bottom-color: var(--border); }
.wiz-mode .hero { padding: 1.35rem 1rem .5rem; }
.wiz-mode .hero h1 { max-width: 760px; margin-inline: auto; font-size: clamp(1.45rem, 3vw, 2.35rem); }
.wiz-mode .hero h1 .h-tiempo { color: var(--text-secondary); font-size: .55em; letter-spacing: .05em; text-transform: uppercase; }
.wiz-mode .hero h1 .h-docs { color: var(--brand-primary); margin-top: .2rem; }
.wiz-mode .hero h1 .h-gratis { color: var(--brand-secondary); font-size: .82em; letter-spacing: .02em; }
.wiz-mode .site-footer { display: none; }

#wizard-root { width: min(100% - 2rem, 940px); margin: 1rem auto 0; }
.wizard { width: 100%; max-width: none; box-sizing: border-box; padding: 0 0 7rem; }
.wiz-progress { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .9rem 1.15rem; margin-bottom: var(--space-4); }
.wiz-progress-copy { display: none; align-items: baseline; justify-content: space-between; gap: 1rem; color: var(--text-secondary); font-size: .78rem; }
.wiz-progress-copy strong { color: var(--text-primary); font-size: .92rem; }
.wiz-progress-bar { display: none; height: 4px; background: #e8ebf0; border-radius: 999px; overflow: hidden; margin-top: .65rem; }
.wiz-progress-bar span { display: block; height: 100%; background: var(--brand-secondary); border-radius: inherit; transition: width 220ms ease; }
.wiz-progress-track { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.wiz-progress-track::before { content: ''; position: absolute; top: 15px; left: 10%; right: 10%; height: 1px; background: var(--border); }
.wiz-step { position: relative; display: grid; justify-items: center; gap: .4rem; color: #8992a1; font-size: .75rem; font-weight: 600; }
.wiz-step-dot { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 50%; z-index: 1; }
.wiz-step[data-state="active"] { color: var(--brand-primary); }
.wiz-step[data-state="active"] .wiz-step-dot { color: #fff; background: var(--brand-primary); border-color: var(--brand-primary); }
.wiz-step[data-state="done"] { color: var(--success); }
.wiz-step[data-state="done"] .wiz-step-dot { font-size: 0; border-color: var(--success); color: var(--success); }
.wiz-step[data-state="done"] .wiz-step-dot::after { content: '✓'; font-size: .8rem; }

.wiz-screen { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.25rem, 4vw, 3rem); opacity: 0; transform: translateY(8px); }
.wiz-screen.is-active { display: block; animation: wiz-enter 240ms ease forwards; }
.wiz-screen.is-leaving { animation: wiz-leave 190ms ease forwards; }
@keyframes wiz-enter { to { opacity: 1; transform: translateY(0); } }
@keyframes wiz-leave { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-6px); } }
.wiz-screen-header { max-width: 660px; margin: 0 auto 2rem; text-align: center; }
.wiz-screen-eyebrow, .section-kicker { margin: 0 0 .55rem; color: var(--brand-secondary); font-size: .74rem; line-height: 1.2; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.wiz-screen-header h2, .wiz-success h2 { margin: 0; color: var(--text-primary); font-family: 'DM Sans', sans-serif; font-size: clamp(1.65rem, 4vw, 2.45rem); line-height: 1.12; letter-spacing: -.035em; }
.wiz-screen-lead { margin: .85rem auto 0; color: var(--text-secondary); max-width: 600px; }
.wiz-screen-body { max-width: 760px; margin: 0 auto; }
.wiz-copyright { padding: 1.2rem 0; color: #8a93a2; text-align: center; font-size: .75rem; }
.wiz-copyright p { margin: 0; }

.signature-main { width: 100%; max-width: 600px; margin: 0 auto; }
.upload-zone { min-height: 108px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: .24rem; padding: 1.15rem 1.25rem; border: 1px dashed #aeb8c7; border-radius: 10px; background: rgba(255,255,255,.68); cursor: pointer; transition: border-color 200ms ease, background-color 200ms ease; }
.upload-zone:hover, .upload-zone.is-dragging { border-color: var(--brand-primary); background: #fff; }
.upload-zone.has-file { border-style: solid; }
.upload-zone.is-validated { border-color: #84ae99; }
.upload-zone strong, .upload-zone span { display: block; }
.upload-zone strong { color: var(--text-primary); font-size: .96rem; overflow-wrap: anywhere; }
.upload-zone #firma-file-meta { color: var(--text-secondary); font-size: .8rem; }
.firma-password { margin-top: 1.35rem; }
.consent-row { display: flex; align-items: flex-start; gap: .6rem; margin-top: 1.35rem; color: var(--text-secondary); font-size: .82rem; line-height: 1.45; }
.consent-row input { margin-top: .2rem; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--brand-primary); }
.consent-row a, .link-button { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 2px; }
.link-button { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.legal-inline-link { border: 0; padding: 0; background: transparent; color: var(--brand-primary); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.consent-error { display: block; margin-left: 1.6rem; }
.signature-result { margin-top: 1.4rem; padding-top: 1.15rem; border-top: 1px solid var(--border); opacity: 0; transform: translateY(8px); transition: opacity 220ms ease, transform 220ms ease; }
.signature-result.is-visible { opacity: 1; transform: translateY(0); }
.signature-result-title { margin: 0; color: var(--success); font-size: .82rem; font-weight: 700; }
.signature-data { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem 1rem; margin: 1rem 0 0; }
.signature-data div { min-width: 0; }
.signature-data dt { color: var(--text-secondary); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.signature-data dd { margin: .22rem 0 0; overflow-wrap: anywhere; font-weight: 600; }

.field-group, .field { display: grid; gap: .4rem; }
.field-group label, .field > label, .field-label { color: var(--text-primary); font-size: .86rem; font-weight: 650; }
.field-group input, .field input, .field select { width: 100%; box-sizing: border-box; min-height: 46px; border: 1px solid #cbd3df; border-radius: var(--radius-sm); padding: .68rem .78rem; background: #fff; color: var(--text-primary); font: inherit; transition: border-color 160ms ease, box-shadow 160ms ease; }
.field-group input:focus, .field input:focus, .field select:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(11,45,107,.12); }
.field-group input[readonly] { background: var(--surface-muted); color: #657083; }
.field-group input[aria-invalid="true"], .field input[aria-invalid="true"] { border-color: var(--danger); }
.field-help, .hint { margin: 0; color: var(--text-secondary); font-size: .78rem; }
.field-error, .error { min-height: 1.15rem; color: var(--danger); font-size: .78rem; }
.form-section { border-top: 1px solid var(--border); padding-top: 1.4rem; margin-top: 1.4rem; }
.form-section:first-of-type { margin-top: 1rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h3 { margin: 0; font-size: 1.15rem; }
.source-badge { color: var(--success); background: #edf8f2; border-radius: 999px; padding: .28rem .6rem; font-size: .7rem; font-weight: 700; }
.form-grid { display: grid; gap: 1rem; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field-group--span { grid-column: 1 / -1; }
.representative-block { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: .85rem 1rem; background: var(--surface-muted); border-radius: var(--radius-sm); }
.representative-block span { color: var(--text-secondary); }

.status-callout { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); background: #fafbfc; margin-bottom: 1rem; }
.status-callout > div { display: grid; gap: .15rem; flex: 1; }
.status-callout strong { color: var(--text-primary); }
.status-callout span { font-size: .82rem; }
.status-callout--success { border-color: #b7dfcb; background: #f5fbf8; }
.status-callout--warning { border-color: #ead7a3; background: #fffbeb; }
.status-callout--error { border-color: #efc0bb; background: #fff7f6; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.status-spinner { width: 18px; height: 18px; border: 2px solid #d2d8e2; border-top-color: var(--brand-primary); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn--text { min-height: auto; color: var(--brand-primary); background: none; padding: .35rem; }

.email-target { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .45rem .75rem; color: var(--text-secondary); margin-bottom: 1rem; }
.email-target strong { color: var(--text-primary); }
.otp-panel { max-width: 480px; margin: 0 auto; text-align: center; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-md); }
.otp-panel h3 { margin: .75rem 0 .3rem; }
.otp-panel > p { margin: 0; color: var(--text-secondary); }
.otp-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; background: var(--surface-muted); color: var(--brand-primary); font-size: 1.25rem; }
.otp-inputs { display: flex; justify-content: center; gap: .65rem; margin: 1.4rem 0 1rem; }
.otp-inputs input { width: 50px; height: 58px; border: 1px solid #cbd3df; border-radius: var(--radius-sm); text-align: center; font-size: 1.35rem; font-weight: 700; }
.otp-inputs input:focus { outline: 3px solid rgba(11,45,107,.14); border-color: var(--brand-primary); }
.resend-row { display: flex; justify-content: center; gap: .4rem; margin-top: 1rem; color: var(--text-secondary); font-size: .83rem; }
.demo-code { display: inline-block; margin-top: 1rem !important; padding: .35rem .6rem; background: #fff8df; border-radius: 6px; color: #795b00 !important; font-size: .78rem; }

.tooltip-i { width: 20px; height: 20px; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--brand-primary); }

.wiz-summary { display: grid; gap: .8rem; }
.wiz-summary-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem 1.1rem; }
.wiz-summary-card-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: .7rem; margin-bottom: .7rem; }
.wiz-summary-card-header h3 { margin: 0; font-size: 1rem; }
.wiz-summary-edit { border: 0; background: none; color: var(--brand-primary); font-weight: 700; cursor: pointer; }
.wiz-summary-rows { display: grid; grid-template-columns: minmax(130px, .55fr) 1fr; gap: .5rem 1rem; margin: 0; }
.wiz-summary-rows dt { color: var(--text-secondary); font-size: .8rem; }
.wiz-summary-rows dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.wiz-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: .72rem max(1rem, env(safe-area-inset-right)) max(.72rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); background: rgba(255,255,255,.96); border-top: 1px solid var(--border); backdrop-filter: blur(12px); }
.wiz-nav-inner { width: min(100%, 760px); margin: 0 auto; display: flex; justify-content: space-between; gap: .75rem; }
.wiz-nav .btn { min-height: 46px; min-width: 126px; border-radius: 9px; }
.btn--primary { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.btn--primary:hover { background: #082457; }
.btn--secondary { background: #fff; border: 1px solid #bec7d4; color: var(--brand-primary); }
.btn--ghost { background: transparent; border: 1px solid transparent; color: var(--text-secondary); }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(230,111,18,.35); outline-offset: 2px; }

.wiz-loading { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; align-content: center; gap: 1rem; background: rgba(255,255,255,.94); }
.wiz-loading.is-active { display: grid; }
.wiz-loading-logo { width: 72px; height: auto; }
.wiz-loading-text { color: var(--text-primary); font-weight: 650; }
.wiz-success { max-width: 660px; margin: 2rem auto; padding: clamp(2rem, 6vw, 4rem); border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; text-align: center; }
.wiz-success-check { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 1rem; border-radius: 50%; background: #edf8f2; color: var(--success); font-size: 1.7rem; }
.wiz-success p:last-child { color: var(--text-secondary); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 700px) {
  body.wiz-mode { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .wiz-mode .site-header { padding: .6rem .8rem; }
  .wiz-mode .brand-mark { height: 30px; }
  .wiz-mode .brand-name { font-size: 1.2rem; }
  .wiz-mode .hero { padding: 1rem .8rem .35rem; }
  #wizard-root { width: min(100% - 1rem, 940px); margin-top: .65rem; }
  .wiz-progress { padding: .75rem .9rem; }
  .wiz-progress-copy, .wiz-progress-bar { display: flex; }
  .wiz-progress-track { display: none; }
  .wiz-screen { border-radius: var(--radius-md); padding: 1.25rem 1rem 1.5rem; }
  .wiz-screen-header { text-align: left; margin-bottom: 1.35rem; }
  .wiz-screen-header h2 { font-size: 1.65rem; }
  .signature-data, .form-grid--2 { grid-template-columns: 1fr; }
  .field-group--span { grid-column: auto; }
  .section-heading { align-items: flex-start; }
  .source-badge { white-space: nowrap; }
  .representative-block { flex-direction: column; }
  .status-callout { align-items: flex-start; flex-wrap: wrap; }
  .status-callout .btn { width: 100%; }
  .otp-panel { padding: 1.25rem .75rem; }
  .otp-inputs { gap: .45rem; }
  .otp-inputs input { width: 46px; height: 54px; }
  .wiz-summary-rows { grid-template-columns: 1fr; gap: .1rem; }
  .wiz-summary-rows dd { margin-bottom: .55rem; }
  .wiz-nav-inner .btn { flex: 1; }
}

/* PASO 1 — onboarding de dos columnas en escritorio y flujo app en móvil */
body[data-wizard-step="firma"] {
  padding-bottom: 0;
  background: #fafbfc;
}
body[data-wizard-step="firma"] #hero,
body[data-wizard-step="firma"] .site-header nav { display: none; }
body[data-wizard-step="firma"] .site-header {
  position: static;
  width: min(calc(100% - 3rem), 1040px);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 1.5rem 0 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}
body[data-wizard-step="firma"] .brand-mark { height: 46px; }
body[data-wizard-step="firma"] .brand-name { font-size: 1.55rem; }
body[data-wizard-step="firma"] #wizard-root {
  width: min(calc(100% - 3rem), 1040px);
  margin: 1.6rem auto 0;
}
body[data-wizard-step="firma"] .wizard {
  min-height: auto;
  padding: 0;
}
body[data-wizard-step="firma"] .wiz-progress {
  position: relative;
  top: auto;
  z-index: auto;
  width: 100%;
  margin: 0 0 3rem;
  padding: 0 0 1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body[data-wizard-step="firma"] .wiz-progress-copy,
body[data-wizard-step="firma"] .wiz-progress-bar { display: none; }
body[data-wizard-step="firma"] .wiz-progress-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 0;
}
body[data-wizard-step="firma"] .wiz-progress-track::before {
  top: 14px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: #cbd2dc;
  transform: none;
}
body[data-wizard-step="firma"] .wiz-step {
  display: grid;
  grid-template-columns: 28px auto;
  align-items: center;
  justify-self: center;
  gap: .45rem;
  width: max-content;
  min-width: 0;
  padding: 0 .55rem;
  background: #fafbfc;
  color: #8a93a1;
  font-size: .74rem;
  font-weight: 550;
  line-height: 1;
}
body[data-wizard-step="firma"] .wiz-step-dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd2dc;
  border-radius: 50%;
  background: #fafbfc;
  color: #7e8795;
  box-shadow: none;
  font: inherit;
}
body[data-wizard-step="firma"] .wiz-step-label {
  display: block;
  max-width: none;
  margin: 0;
  overflow: visible;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  text-overflow: clip;
  white-space: nowrap;
}
body[data-wizard-step="firma"] .wiz-step[data-state="active"],
body[data-wizard-step="firma"] .wiz-step[data-state="active"] .wiz-step-label {
  color: var(--brand-primary);
  font-weight: 750;
}
body[data-wizard-step="firma"] .wiz-step[data-state="active"] .wiz-step-dot {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: #fff;
  box-shadow: none;
}
body[data-wizard-step="firma"] .wiz-step[data-state="done"] .wiz-step-dot {
  border-color: var(--success);
  background: #fafbfc;
  color: var(--success);
  font-size: inherit;
}
body[data-wizard-step="firma"] .wiz-step[data-state="done"] .wiz-step-dot::after { display: none; }
body[data-wizard-step="firma"] .wiz-screen[data-id="firma"] {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-wizard-step="firma"] .wiz-screen[data-id="firma"].is-active {
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  column-gap: clamp(3rem, 5vw, 3.5rem);
  align-items: start;
}
body[data-wizard-step="firma"] .wiz-screen[data-id="firma"] .wiz-screen-header {
  max-width: none;
  margin: 0;
  padding-top: 2rem;
  text-align: left;
}
body[data-wizard-step="firma"] .wiz-screen[data-id="firma"] h2 {
  max-width: 440px;
  font-size: clamp(2.25rem, 3.2vw, 2.65rem);
  font-weight: 650;
  line-height: 1.12;
}
body[data-wizard-step="firma"] .wiz-screen[data-id="firma"] .wiz-screen-body {
  max-width: none;
  margin: 0;
  padding: 1.25rem 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-wizard-step="firma"] .signature-main {
  width: 100%;
  max-width: none;
}
body[data-wizard-step="firma"] .upload-zone {
  min-height: 64px;
  padding: .7rem .15rem;
  border: 0;
  border-bottom: 1px solid #c8d0dc;
  border-radius: 0;
  background: transparent;
}
body[data-wizard-step="firma"] .upload-zone:hover,
body[data-wizard-step="firma"] .upload-zone.is-dragging { border-bottom-color: var(--brand-primary); background: transparent; }
body[data-wizard-step="firma"] .upload-zone:has(input:focus-visible) { outline: 0; border-bottom: 2px solid #8eaad0; }
body[data-wizard-step="firma"] .upload-zone:has(+ .field-error:not(:empty)) { border-color: var(--danger); }
body[data-wizard-step="firma"] .firma-password:has(.field-error:not(:empty)) input { border-color: var(--danger); }
body[data-wizard-step="firma"] #wiz-next { box-shadow: none; transform: none; }
body[data-wizard-step="firma"] #wiz-next:disabled { background: #dfe4eb; color: #667085; cursor: not-allowed; }
body[data-wizard-step="firma"]:has(.wiz-loading.is-active) #wiz-next { opacity: .55; pointer-events: none; }
body[data-wizard-step="firma"] .firma-password[hidden],
body[data-wizard-step="firma"] .signature-result[hidden] { display: none; }
body[data-wizard-step="firma"] .firma-password { margin-top: 1.1rem; }
body[data-wizard-step="firma"] .field-error:empty {
  min-height: 0;
  margin: 0;
}
body[data-wizard-step="firma"] .consent-row { margin-top: 1.15rem; }
body[data-wizard-step="firma"] .consent-error { margin-left: 1.6rem; }
body[data-wizard-step="firma"] .wiz-copyright { display: none; }
body[data-wizard-step="firma"] .wiz-nav {
  position: static;
  width: auto;
  padding: 1.1rem 0 1.5rem;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
body[data-wizard-step="firma"] .wiz-nav-inner {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  column-gap: clamp(3rem, 5vw, 3.5rem);
  align-items: start;
}
body[data-wizard-step="firma"] #wiz-back { display: none; }
body[data-wizard-step="firma"] #wiz-next {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 50px;
  flex: none;
}
@media (max-width: 900px) {
  body[data-wizard-step="firma"] .wiz-screen[data-id="firma"].is-active,
  body[data-wizard-step="firma"] .wiz-nav-inner {
    grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
    column-gap: 2.25rem;
  }
  body[data-wizard-step="firma"] .wiz-screen[data-id="firma"] h2 { font-size: 2.25rem; }
}

@media (max-width: 820px) {
  body[data-wizard-step="firma"] .site-header {
    width: min(calc(100% - 2.5rem), 520px);
    padding-top: 1rem;
  }
  body[data-wizard-step="firma"] .brand-mark { height: 30px; }
  body[data-wizard-step="firma"] .brand-name { font-size: 1.15rem; }
  body[data-wizard-step="firma"] #wizard-root {
    width: min(calc(100% - 2.5rem), 520px);
    margin-top: 1rem;
  }
  body[data-wizard-step="firma"] .wiz-progress {
    margin-bottom: 1.4rem;
    padding-bottom: 0;
  }
  body[data-wizard-step="firma"] .wiz-progress-copy {
    display: grid;
    justify-content: start;
    gap: .25rem;
  }
  body[data-wizard-step="firma"] .wiz-progress-copy span {
    color: #7b8492;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  body[data-wizard-step="firma"] .wiz-progress-copy strong {
    color: var(--brand-primary);
    font-size: .98rem;
    font-weight: 750;
  }
  body[data-wizard-step="firma"] .wiz-progress-bar {
    display: block;
    height: 2px;
    margin-top: .75rem;
    background: #e1e5eb;
    border-radius: 0;
  }
  body[data-wizard-step="firma"] .wiz-progress-bar span {
    background: var(--brand-primary);
    border-radius: 0;
  }
  body[data-wizard-step="firma"] .wiz-progress-track { display: none; }
  body[data-wizard-step="firma"] .wiz-screen[data-id="firma"].is-active { display: block; }
  body[data-wizard-step="firma"] .wiz-screen[data-id="firma"] .wiz-screen-header {
    margin-bottom: 1.15rem;
    padding-top: 0;
  }
  body[data-wizard-step="firma"] .wiz-screen[data-id="firma"] h2 {
    max-width: 390px;
    font-size: 1.95rem;
    font-weight: 600;
    line-height: 1.15;
  }
  body[data-wizard-step="firma"] .wiz-screen[data-id="firma"] .wiz-screen-body { padding: 0; }
  body[data-wizard-step="firma"] .upload-zone {
    min-height: 68px;
    padding: .7rem 0;
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #c8d0dc;
    background: transparent;
  }
  body[data-wizard-step="firma"] #firma-file-label { font-size: .96rem; line-height: 1.4; font-weight: 600; }
  body[data-wizard-step="firma"] #firma-file-meta { font-size: .77rem; }
  body[data-wizard-step="firma"] .firma-password { margin-top: 1.4rem; gap: .55rem; }
  body[data-wizard-step="firma"] .firma-password label { font-size: .9rem; font-weight: 600; }
  body[data-wizard-step="firma"] .firma-password input { min-height: 56px; border-radius: 11px; font-size: 16px; padding: .85rem 1rem; }
  body[data-wizard-step="firma"] .consent-row { margin-top: 1.3rem; gap: .8rem; font-size: .85rem; line-height: 1.7; min-height: 48px; align-items: flex-start; }
  body[data-wizard-step="firma"] .consent-row input { width: 22px; height: 22px; margin: .12rem 0 0; }
  body[data-wizard-step="firma"] .consent-row a { text-underline-offset: 3px; }
  body[data-wizard-step="firma"] .signature-data { grid-template-columns: 1fr; }
  body[data-wizard-step="firma"] .wiz-nav { padding: 1.5rem 0 1.5rem; }
  body[data-wizard-step="firma"] .wiz-nav-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  body[data-wizard-step="firma"] #wiz-next { width: 100%; min-height: 56px; border-radius: 12px; font-size: 1rem; font-weight: 650; background: var(--brand-primary); box-shadow: none; }
  body[data-wizard-step="firma"] #wiz-next:hover { background: #082457; }
  body[data-wizard-step="firma"] #wiz-next:disabled { background: #dfe4eb; color: #667085; }
}

/* PASO 2 — mismo lenguaje visual aprobado para el onboarding */
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) {
  padding-bottom: 0;
  background: #fafbfc;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #hero,
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .site-header nav { display: none; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .site-header {
  position: static;
  width: min(calc(100% - 3rem), 1040px);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 1.5rem 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .brand-mark { height: 36px; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #wizard-root {
  width: min(calc(100% - 3rem), 1040px);
  margin: 1.6rem auto 0;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wizard { min-height: 0; padding: 0; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress {
  position: static;
  width: 100%;
  margin: 0 0 2.4rem;
  padding: 0 0 1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress-copy,
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress-bar { display: none; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 0;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress-track::before {
  top: 14px;
  left: 8%; right: 8%; height: 1px;
  background: #cbd2dc;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-step {
  display: grid;
  grid-template-columns: 28px auto;
  align-items: center;
  justify-self: center;
  gap: .45rem;
  width: max-content;
  min-width: 0;
  padding: 0 .55rem;
  background: #fafbfc;
  color: #8a93a1;
  font-size: .74rem;
  font-weight: 550;
  line-height: 1;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-step-dot {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 1px solid #cbd2dc;
  border-radius: 50%;
  background: #fafbfc;
  color: #7e8795;
  box-shadow: none;
  font: inherit;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-step-label {
  display: block; max-width: none; margin: 0; overflow: visible;
  color: inherit; font: inherit; letter-spacing: 0;
  text-overflow: clip; white-space: nowrap;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-step[data-state="active"],
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-step[data-state="active"] .wiz-step-label {
  color: var(--brand-primary); font-weight: 750;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-step[data-state="active"] .wiz-step-dot {
  border-color: var(--brand-primary); background: var(--brand-primary); color: #fff;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-step[data-state="done"] .wiz-step-dot {
  border-color: var(--success); background: #fafbfc; color: var(--success); font-size: inherit;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-step[data-state="done"] .wiz-step-dot::after { display: none; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-screen:is([data-id="datos"], [data-id="facturacion"]) {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-screen:is([data-id="datos"], [data-id="facturacion"]).is-active {
  display: block;
  animation: wiz-enter 220ms ease both;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-screen:is([data-id="datos"], [data-id="facturacion"]) .wiz-screen-header {
  max-width: none;
  margin: 0 0 1.6rem;
  text-align: left;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-screen:is([data-id="datos"], [data-id="facturacion"]) h2 {
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  font-weight: 650;
  line-height: 1.15;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-screen:is([data-id="datos"], [data-id="facturacion"]) .wiz-screen-body {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 24px;
  margin: 0 0 1.15rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .55rem; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status strong { color: var(--text-secondary); font-size: .82rem; font-weight: 600; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status span:not(.status-spinner):not(.status-dot) { color: var(--text-secondary); font-size: .78rem; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status.status-callout--success strong { color: var(--success); }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status.status-callout--warning,
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status.status-callout--error { color: var(--text-primary); }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status.status-callout--warning strong { color: var(--warning); }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status.status-callout--error strong { color: var(--danger); }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status .status-spinner,
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status .status-dot { flex: 0 0 auto; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status .btn { margin-left: auto; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .status-callout--warning,
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .status-callout--error { background: transparent; border: 0; border-radius: 0; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .form-section {
  margin: 0;
  padding: 1.35rem 0 0;
  border-top: 1px solid #dfe4eb;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .form-section + .form-section { margin-top: 1.25rem; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .section-heading { margin-bottom: .9rem; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .section-kicker,
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .source-badge { display: none; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .section-heading h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -.01em;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .form-grid--2 { gap: .85rem 1rem; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group { gap: .38rem; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group label { font-size: .83rem; font-weight: 600; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group input {
  min-height: 48px;
  border-color: #cbd3df;
  border-radius: 9px;
  background: #fff;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group input[readonly] { background: #f2f4f7; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-error:empty { min-height: 0; margin: 0; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .representative-block {
  padding: .7rem 0 0;
  border-top: 1px solid #edf0f4;
  border-radius: 0;
  background: transparent;
  font-size: .83rem;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-nav {
  position: static;
  width: min(calc(100% - 3rem), 900px);
  margin: 1.25rem auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-nav-inner {
  width: 100%; max-width: none;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #wiz-back {
  justify-self: start;
  min-width: 0;
  padding-inline: .25rem;
  color: var(--text-secondary);
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #wiz-next {
  width: min(100%, 320px);
  min-width: 240px;
  min-height: 50px;
  border-radius: 10px;
  box-shadow: none;
}
body[data-wizard-step="datos"] .wiz-copyright { display: none; }
@media (max-width: 900px) {
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-screen:is([data-id="datos"], [data-id="facturacion"]) { max-width: none; }
}
@media (max-width: 820px) {
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .site-header,
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #wizard-root {
    width: min(calc(100% - 2.5rem), 520px);
  }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .site-header { padding-top: 1rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .brand-mark { height: 30px; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .brand-name { font-size: 1.15rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #wizard-root { margin-top: 1rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress { margin-bottom: 1.55rem; padding-bottom: 0; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress-copy { display: grid; justify-content: start; gap: .25rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress-copy span { color: #7b8492; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress-copy strong { color: var(--brand-primary); font-size: .98rem; font-weight: 750; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress-bar { display: block; height: 2px; margin-top: .75rem; background: #e1e5eb; border-radius: 0; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress-bar span { background: var(--brand-primary); border-radius: 0; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-progress-track { display: none; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-screen:is([data-id="datos"], [data-id="facturacion"]) .wiz-screen-header { margin-bottom: 1.25rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-screen:is([data-id="datos"], [data-id="facturacion"]) h2 { font-size: 1.9rem; font-weight: 600; line-height: 1.15; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status { margin-bottom: .85rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status > div { display: grid; gap: .12rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status .btn { width: auto; margin-left: auto; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .form-section { padding-top: 1rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .form-section + .form-section { margin-top: 1rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .form-grid--2 { grid-template-columns: 1fr; gap: .55rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group--span { grid-column: auto; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group input { min-height: 52px; font-size: 16px; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-nav { width: min(calc(100% - 2.5rem), 520px); margin-top: 1rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-nav-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: .75rem;
  }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #wiz-back,
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #wiz-next {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding-inline: .75rem;
    border-radius: 12px;
    justify-self: stretch;
    align-self: stretch;
  }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #wiz-back {
    border: 1px solid #cbd3df;
    color: var(--brand-primary);
  }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #wiz-next { font-weight: 650; }
}
/* PASO 2: información de solo lectura y secciones móviles desplegables. */
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section { padding-top: 0; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section > summary {
  position: relative;
  display: block;
  list-style: none;
  padding: 1.1rem 0 .9rem;
  cursor: default;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section > summary::-webkit-details-marker { display: none; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -.01em;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section-summary { display: none; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-info {
  display: grid;
  align-content: start;
  gap: .3rem;
  padding: .3rem 0 .65rem;
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-info > span { color: var(--text-secondary); font-size: .8rem; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-info output { color: var(--text-primary); font-size: .95rem; font-weight: 550; overflow-wrap: anywhere; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .representative-block[hidden] { display: none; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group input:focus { border-color: var(--brand-primary); }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group input[aria-invalid="true"] { border-color: var(--danger); }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .wiz-nav { width: min(100%, 900px); padding-bottom: 1.5rem; }
@media (max-width: 820px) {
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section > summary { padding: 1rem 1.75rem 1rem 0; cursor: pointer; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section > summary::after {
    content: ''; position: absolute; top: 1.3rem; right: .3rem;
    width: 7px; height: 7px; border-right: 1.5px solid var(--text-secondary); border-bottom: 1.5px solid var(--text-secondary);
    transform: rotate(45deg);
  }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section[open] > summary::after { top: 1.5rem; transform: rotate(225deg); }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section > summary:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section:not([open]) .datos-section-summary {
    display: block; margin-top: .35rem; color: var(--text-secondary); font-size: .77rem; line-height: 1.5; overflow-wrap: anywhere;
  }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section-content { padding-bottom: .5rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section[open] .datos-section-content { animation: datos-reveal 200ms ease; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section .form-grid--2 { gap: .9rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-info { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-info > span { max-width: 55%; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-info output { text-align: right; font-size: .88rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section .field-group { gap: .3rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-section .field-group input { min-height: 48px; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .representative-block { gap: .3rem; margin-top: 1rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .form-section + .form-section { margin-top: .7rem; }
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status.status-callout--success > div > span { display: none; }
}
body[data-wizard-step="firma"] .upload-zone { display: flex; flex-direction: row; align-items: center; gap: 1rem; min-height: 112px; padding: 1.1rem; border: 1px solid #a5b6cf; border-radius: 10px; background: #fff; }
body[data-wizard-step="firma"] .upload-zone:hover,
body[data-wizard-step="firma"] .upload-zone.is-dragging { border-color: var(--brand-primary); background: #fff; }
body[data-wizard-step="firma"] .upload-zone:has(input:focus-visible) { outline: 2px solid var(--brand-primary); outline-offset: 3px; border-bottom-width: 1px; }
body[data-wizard-step="firma"] .signature-upload-icon { flex-shrink: 0; color: var(--brand-primary); }
body[data-wizard-step="firma"] .signature-upload-copy { min-width: 0; }
body[data-wizard-step="firma"] #firma-file-label { color: var(--brand-primary); font-size: 1rem; line-height: 1.4; }
body[data-wizard-step="firma"] #firma-file-meta { margin-top: .2rem; }
body[data-wizard-step="firma"] .signature-change { display: none; margin-top: .35rem; font-size: .78rem; color: var(--brand-primary); text-decoration: underline; text-underline-offset: 3px; }
body[data-wizard-step="firma"] .upload-zone.has-file { min-height: 80px; padding: .7rem 1rem; border-color: #c8d0dc; background: transparent; }
body[data-wizard-step="firma"] .has-file .signature-upload-icon { width: 24px; height: 28px; }
body[data-wizard-step="firma"] .has-file .signature-change { display: block; }
body[data-wizard-step="firma"] .has-file #firma-file-meta { display: none; }
body[data-wizard-step="firma"] .signature-help { margin: 1.15rem 0 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .78rem; color: var(--text-secondary); }
body[data-wizard-step="firma"] .signature-help[hidden] { display: none; }
.signature-help p { margin: 0; color: var(--text-primary); font-size: .9rem; font-weight: 650; line-height: 1.5; }
.signature-help p span { display: block; color: var(--text-secondary); font-size: .78rem; font-weight: 400; }
.signature-help fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; border: 0; padding: 0; margin: .6rem 0 0; min-width: 0; }
.signature-help .signature-term { display: flex; align-items: center; gap: .5rem; min-height: 48px; cursor: pointer; }
.signature-help .signature-term input { flex-shrink: 0; width: 18px; height: 18px; margin: 0; accent-color: var(--brand-primary); }
.signature-help .signature-term strong { display: block; color: var(--text-primary); font-size: .85rem; line-height: 1.7; font-weight: 600; }
.signature-help .signature-term small { color: var(--text-secondary); font-size: .67rem; font-weight: 400; }
.signature-help .signature-request { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; color: var(--text-secondary); font-size: .8rem; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.signature-help .signature-request:hover { color: var(--brand-primary); }
.signature-help .signature-whatsapp-icon { flex: 0 0 auto; }
.signature-help #signature-offer-error:empty { display: none; }
.guided-help-link { display: flex; align-items: center; gap: .45rem; width: fit-content; min-height: 40px; margin: .2rem 0 0; padding: 0; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: .78rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.guided-help-link:hover { color: var(--brand-primary); }
.guided-help-link:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 4px; border-radius: 2px; }
@keyframes datos-reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.billing-icon { flex-shrink: 0; color: var(--brand-primary); vertical-align: middle; }
.billing-details .field-group > label { display: flex; align-items: center; gap: .4rem; }
.billing-details { animation: datos-reveal 200ms ease; }
.billing-details .form-grid { align-items: start; }
.billing-details .form-grid + .form-grid { margin-top: 1rem; }
.billing-guidance { display: grid; gap: .2rem; margin-bottom: 1.25rem; color: var(--text-secondary); font-size: .88rem; line-height: 1.45; }
.billing-guidance strong { color: var(--text-primary); font-size: .95rem; font-weight: 650; }
.billing-invoice { padding: 1rem 0 1.15rem; border-top: 1px solid #dfe4eb; border-bottom: 1px solid #dfe4eb; }
.billing-invoice > h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; color: var(--text-primary); font-size: 1rem; font-weight: 650; }
.billing-later { max-width: 68ch; margin: 1rem 0 0; color: var(--text-secondary); font-size: .82rem; line-height: 1.5; }
body[data-wizard-step="facturacion"] #wiz-next:disabled { background: #dfe4eb; color: #667085; cursor: not-allowed; transform: none; }
@media (max-width: 820px) {
  .billing-guidance { margin-bottom: 1rem; }
  .billing-invoice { padding: .85rem 0 1rem; }
  .billing-invoice > h3 { margin-bottom: .8rem; }
  body[data-wizard-step="facturacion"] .billing-invoice .form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  body[data-wizard-step="facturacion"] .billing-invoice .field-group:last-child { grid-column: 1 / -1; }
  .billing-later { margin-top: .85rem; font-size: .78rem; }
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #resolucion-slot { display: contents; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .datos-resolution { animation: datos-reveal 200ms ease; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group select {
  width: 100%; min-width: 0; min-height: 48px; box-sizing: border-box;
  border: 1px solid #cbd3df; border-radius: 9px; padding: .68rem .78rem;
  font: inherit; background: #fff; color: var(--text-primary);
}
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group select:disabled { opacity: 1; background: #f2f4f7; color: var(--text-secondary); }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group select:focus { outline: 3px solid rgba(11,45,107,.12); border-color: var(--brand-primary); }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group select[aria-invalid="true"] { border-color: var(--danger); }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status > div { min-width: 0; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status[hidden] { display: none; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #datos-contribuyente > summary { cursor: default; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #datos-contribuyente > summary::after { display: none; }
body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) #ruc-status.status-callout--error > div { display: grid; }
dialog.email-verification {
  position: fixed; inset: 0; width: min(440px, calc(100% - 2.5rem)); max-width: none;
  max-height: calc(var(--email-viewport-height, 100dvh) - 2rem); margin: auto; box-sizing: border-box;
  padding: 2rem; border: 0; border-radius: 16px; background: #fafbfc; color: var(--text-primary);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-shadow: none;
}
dialog.email-verification[open] { animation: datos-reveal 200ms ease; }
dialog.email-verification::backdrop { background: rgba(21,32,51,.4); backdrop-filter: none; }
.registration-preflight {
  position: fixed; inset: 0; width: min(540px, calc(100% - 2.5rem)); max-width: none;
  max-height: calc(100dvh - 2rem); margin: auto; box-sizing: border-box;
  padding: 2rem; border: 0; border-radius: 16px; background: #fafbfc; color: var(--text-primary);
  overflow-y: auto; overscroll-behavior: contain; box-shadow: none;
}
.registration-preflight[open] { animation: datos-reveal 200ms ease; }
.registration-preflight::backdrop { background: rgba(21,32,51,.48); }
.preflight-kicker { margin: 0 0 .45rem; color: var(--color-cta); font-size: .76rem; font-weight: 700; letter-spacing: .025em; }
.registration-preflight h2 { margin: 0; font-family: 'DM Sans', sans-serif; font-size: clamp(1.65rem, 4vw, 2rem); font-weight: 650; letter-spacing: -.035em; }
.preflight-copy { margin: .55rem 0 1.35rem; color: var(--text-secondary); font-size: .92rem; line-height: 1.5; }
.preflight-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.preflight-list li { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: .85rem; padding: .95rem 0; border-top: 1px solid #e1e6ee; }
.preflight-list li:last-child { border-bottom: 1px solid #e1e6ee; }
.preflight-list strong, .preflight-list small { display: block; }
.preflight-list strong { color: var(--text-primary); font-size: .92rem; line-height: 1.3; }
.preflight-list small { margin-top: .18rem; color: var(--text-secondary); font-size: .78rem; line-height: 1.4; }
.preflight-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--color-primary); }
.preflight-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.preflight-note { margin: 1rem 0 1.25rem; color: var(--text-secondary); font-size: .78rem; line-height: 1.45; }
.preflight-start { width: 100%; min-height: 52px; border-radius: 10px; }
.legal-consent-dialog,
.billing-help-dialog {
  position: fixed; inset: 0; width: min(640px, calc(100% - 2.5rem)); max-width: none;
  max-height: calc(100dvh - 2rem); margin: auto; box-sizing: border-box;
  padding: 2rem; border: 0; border-radius: 16px; background: #fafbfc; color: var(--text-primary);
  overflow: hidden; overscroll-behavior: contain; box-shadow: none;
}
.legal-consent-dialog::backdrop,
.billing-help-dialog::backdrop { background: rgba(21,32,51,.48); }
.legal-consent-header h2,
.billing-help-dialog h2 { margin: 0; font-family: 'DM Sans', sans-serif; font-size: 1.7rem; font-weight: 650; letter-spacing: -.035em; }
.legal-consent-kicker { margin: 0 0 .4rem; color: var(--color-cta); font-size: .75rem; font-weight: 700; }
.legal-consent-header > p:last-child { margin: .45rem 0 1rem; color: var(--text-secondary); font-size: .86rem; line-height: 1.5; }
.legal-consent-scroll {
  height: min(52dvh, 430px); padding: .25rem 1rem .25rem 0; overflow-y: auto;
  min-height: 0; overscroll-behavior: contain; scrollbar-gutter: stable; border-block: 1px solid #dfe4eb;
  -webkit-overflow-scrolling: touch; touch-action: pan-y;
}
.legal-consent-scroll:focus { outline: none; }
.legal-consent-scroll:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.legal-document { padding: 1rem 0; }
.legal-document + .legal-document { border-top: 1px solid #dfe4eb; }
.legal-document h3 { margin: 0 0 .7rem; color: var(--brand-primary); font-size: 1rem; }
.legal-document h4 { margin: 1rem 0 .35rem; font-size: .88rem; letter-spacing: .01em; }
.legal-document p { margin: 0 0 .65rem; color: var(--text-secondary); font-size: .8rem; line-height: 1.55; }
.legal-document-version { color: #7b8492 !important; font-size: .72rem !important; }
.legal-consent-hint { min-height: 1.2rem; margin: .7rem 0; color: var(--text-secondary); font-size: .76rem; }
.legal-consent-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.legal-consent-actions .btn { box-sizing: border-box; width: 100%; min-width: 0; max-width: none; height: 50px; min-height: 50px; margin: 0; padding: .65rem; border-radius: 10px; line-height: 1.2; }
.legal-consent-actions .legal-consent-cancel { border: 1px solid #cbd3df; background: transparent; color: var(--brand-primary); }
.legal-consent-actions .legal-consent-accept { box-shadow: none; }
.billing-help-dialog { width: min(440px, calc(100% - 2.5rem)); overflow-y: auto; }
.billing-help-dialog p { margin: .75rem 0; color: var(--text-secondary); font-size: .86rem; line-height: 1.5; }
.billing-help-example { display: block; padding: .85rem; border-block: 1px solid #dfe4eb; color: var(--brand-primary); font-size: 1.05rem; letter-spacing: .04em; text-align: center; }
.billing-help-close { width: 100%; min-height: 50px; margin-top: .35rem; border-radius: 10px; }
.billing-field-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.billing-field-heading label { display: inline-flex; align-items: center; gap: .35rem; }
.billing-help-link { min-height: 30px; border: 0; padding: 0; background: transparent; color: var(--brand-primary); font: inherit; font-size: .76rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.post-create-logo {
  position: fixed; inset: 0; width: min(620px, calc(100% - 2.5rem)); max-width: none;
  max-height: calc(var(--email-viewport-height, 100dvh) - 2rem); margin: auto; box-sizing: border-box;
  padding: 2rem; border: 0; border-radius: 16px; background: #fafbfc; color: var(--text-primary);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-shadow: none;
}
.post-create-logo[open] { animation: datos-reveal 200ms ease; }
.post-create-logo::backdrop { background: rgba(21,32,51,.4); }
.post-create-logo h2 { margin: 0 0 .45rem; font-family: 'DM Sans', sans-serif; font-size: 1.7rem; font-weight: 650; letter-spacing: -.035em; }
.post-logo-copy { margin: 0; color: var(--text-secondary); font-size: .9rem; line-height: 1.5; }
.post-logo-requirements { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: .8rem 0 1.15rem; color: var(--text-secondary); font-size: .78rem; }
.post-logo-requirements span { position: relative; }
.post-logo-requirements span + span::before { content: ''; position: absolute; left: -.52rem; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--color-cta); transform: translateY(-50%); }
.post-logo-preview { margin: 0; }
.post-logo-banner { display: grid; place-items: center; width: 100%; aspect-ratio: 9.9 / 1; overflow: hidden; border: 1px solid #dfe4eb; background: #fff; }
.post-logo-banner img { display: block; width: 100%; height: 100%; object-fit: contain; }
.post-logo-preparing { color: var(--text-secondary); font-size: .78rem; }
.post-logo-file-meta { margin: .45rem 0 0; color: var(--text-secondary); font-size: .76rem; overflow-wrap: anywhere; }
.post-logo-status { min-height: 1.25rem; margin: .65rem 0; color: var(--text-secondary); font-size: .79rem; line-height: 1.45; }
.post-logo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.post-logo-actions .btn { box-sizing: border-box; width: 100%; min-width: 0; max-width: none; height: 54px; min-height: 54px; margin: 0; padding: .65rem; border-radius: 10px; line-height: 1.2; white-space: normal; }
.post-logo-actions .post-logo-upload { border: 1px solid #cbd3df; background: transparent; color: var(--brand-primary); }
.post-logo-actions .post-logo-continue { box-shadow: none; }
.post-logo-status:empty { min-height: 0; margin: .75rem 0 0; }
.email-verification h2 { margin: .1rem 2rem .6rem 0; font-family: 'DM Sans', sans-serif; font-size: 1.65rem; font-weight: 650; letter-spacing: -.035em; }
.email-verification p { color: var(--text-secondary); font-size: .85rem; line-height: 1.5; }
.email-verification #email-verification-destination { margin: -.1rem 0 .35rem; overflow-wrap: anywhere; }
.email-verification form { display: grid; gap: .5rem; }
.email-verification label { font-size: .88rem; font-weight: 600; }
.email-verification #email-code { width: 100%; box-sizing: border-box; min-height: 56px; padding: .75rem 1rem; border: 1px solid #cbd3df; border-radius: 10px; background: #fff; color: var(--text-primary); font: inherit; font-size: 1.5rem; letter-spacing: .45em; text-indent: .45em; text-align: center; }
.email-verification #email-code[aria-invalid="true"] { border-color: var(--danger); }
.email-verification #email-code-status { min-height: 1.3rem; margin: .2rem 0 .6rem; }
.email-verification #email-code-demo { margin: 0 0 .5rem; padding: .7rem .8rem; border-left: 3px solid var(--color-cta); background: #fff; color: var(--color-primary); font-weight: 650; }
.email-verification .email-code-verify { width: 100%; min-height: 52px; border-radius: 10px; box-shadow: none; }
.email-verification .email-code-verify:disabled { background: #dfe4eb; color: #667085; cursor: not-allowed; }
.email-verification-close { position: absolute; top: .7rem; right: .7rem; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: 1.65rem; cursor: pointer; }
.email-code-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1rem; }
.email-code-actions button { min-height: 44px; font-size: .83rem; }
.email-code-actions button:disabled { color: var(--text-secondary); text-decoration: none; cursor: default; }
@media (max-width: 820px) {
  body:is([data-wizard-step="datos"], [data-wizard-step="facturacion"]) .field-group select { font-size: 16px; }
  dialog.email-verification { inset: auto 0 0; width: 100%; max-height: calc(var(--email-viewport-height, 100dvh) - 1rem); margin: 0; border-radius: 18px 18px 0 0; padding: 1.7rem 1.25rem max(1.1rem, env(safe-area-inset-bottom)); }
  dialog.email-verification:not(.billing-picker) {
    inset: var(--email-viewport-top, 0px) 0 var(--email-viewport-bottom, 0px);
    width: min(100% - 1.5rem, 440px);
    margin: auto;
    border-radius: 18px;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }
  dialog.email-verification:not(.billing-picker) .email-code-verify { order: 1; }
  dialog.email-verification:not(.billing-picker) #email-code-demo { order: 2; }
  .email-verification h2 { font-size: 1.55rem; }
  .post-create-logo {
    inset: var(--email-viewport-top, 0px) 0 var(--email-viewport-bottom, 0px);
    width: min(100% - 1.5rem, 620px); max-height: calc(var(--email-viewport-height, 100dvh) - 1rem);
    margin: auto; padding: 1.5rem 1.25rem max(1.25rem, env(safe-area-inset-bottom)); border-radius: 18px;
  }
  .post-create-logo h2 { font-size: 1.55rem; }
  .registration-preflight { width: min(100% - 1.5rem, 540px); max-height: calc(100dvh - 1rem); padding: 1.5rem 1.25rem max(1.25rem, env(safe-area-inset-bottom)); border-radius: 18px; }
  .preflight-copy { margin-bottom: .85rem; }
  .preflight-list li { padding: .75rem 0; }
  .post-logo-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .legal-consent-dialog,
  .billing-help-dialog { width: min(100% - 1.5rem, 640px); max-height: calc(100dvh - 1rem); padding: 1.5rem 1.25rem max(1.25rem, env(safe-area-inset-bottom)); border-radius: 18px; }
  .billing-help-dialog { width: min(100% - 1.5rem, 440px); }
  .legal-consent-scroll { height: min(56dvh, 430px); }
}

/* PASO 4 — overview compacto con el lenguaje visual aprobado. */
body[data-wizard-step="resumen"] { padding-bottom: 0; background: #fafbfc; }
body[data-wizard-step="resumen"] #hero,
body[data-wizard-step="resumen"] .site-header nav { display: none; }
body[data-wizard-step="resumen"] .site-header {
  position: static; width: min(calc(100% - 3rem), 1040px); box-sizing: border-box;
  margin: 0 auto; padding: 1.5rem 0 0; background: transparent; border: 0; box-shadow: none;
}
body[data-wizard-step="resumen"] .brand-mark { height: 36px; }
body[data-wizard-step="resumen"] #wizard-root { width: min(calc(100% - 3rem), 1040px); margin: 1.6rem auto 0; }
body[data-wizard-step="resumen"] .wizard { min-height: 0; padding: 0; }
body[data-wizard-step="resumen"] .wiz-progress {
  position: static; width: 100%; margin: 0 0 2.4rem; padding: 0 0 1rem;
  border: 0; border-radius: 0; background: transparent;
}
body[data-wizard-step="resumen"] .wiz-progress-copy,
body[data-wizard-step="resumen"] .wiz-progress-bar { display: none; }
body[data-wizard-step="resumen"] .wiz-progress-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 0; }
body[data-wizard-step="resumen"] .wiz-progress-track::before { top: 14px; left: 8%; right: 8%; height: 1px; background: #cbd2dc; }
body[data-wizard-step="resumen"] .wiz-step {
  display: grid; grid-template-columns: 28px auto; align-items: center; justify-self: center; gap: .45rem;
  width: max-content; min-width: 0; padding: 0 .55rem; background: #fafbfc; color: #8a93a1;
  font-size: .74rem; font-weight: 550; line-height: 1;
}
body[data-wizard-step="resumen"] .wiz-step-dot {
  width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #cbd2dc;
  border-radius: 50%; background: #fafbfc; color: #7e8795; box-shadow: none; font: inherit;
}
body[data-wizard-step="resumen"] .wiz-step-label { display: block; color: inherit; white-space: nowrap; }
body[data-wizard-step="resumen"] .wiz-step[data-state="active"],
body[data-wizard-step="resumen"] .wiz-step[data-state="active"] .wiz-step-label { color: var(--brand-primary); font-weight: 750; }
body[data-wizard-step="resumen"] .wiz-step[data-state="active"] .wiz-step-dot { border-color: var(--brand-primary); background: var(--brand-primary); color: #fff; }
body[data-wizard-step="resumen"] .wiz-step[data-state="done"] .wiz-step-dot { border-color: var(--success); background: #fafbfc; color: var(--success); }
body[data-wizard-step="resumen"] .wiz-step[data-state="done"] .wiz-step-dot::after { display: none; }
body[data-wizard-step="resumen"] .wiz-screen[data-id="resumen"] {
  max-width: 900px; margin: 0 auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
body[data-wizard-step="resumen"] .wiz-screen[data-id="resumen"].is-active { display: block; animation: wiz-enter 220ms ease both; }
body[data-wizard-step="resumen"] .wiz-screen[data-id="resumen"] .wiz-screen-header { max-width: none; margin: 0 0 1.1rem; text-align: left; }
body[data-wizard-step="resumen"] .wiz-screen[data-id="resumen"] h2 { font-size: clamp(1.8rem, 3vw, 2.25rem); font-weight: 650; line-height: 1.15; }
body[data-wizard-step="resumen"] .wiz-screen[data-id="resumen"] .wiz-screen-body { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body[data-wizard-step="resumen"] .wiz-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
body[data-wizard-step="resumen"] .wiz-summary-section { padding: .85rem 0; border-top: 1px solid #dfe4eb; }
body[data-wizard-step="resumen"] .wiz-summary-section-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .45rem; }
body[data-wizard-step="resumen"] .wiz-summary-section h3 { margin: 0; color: var(--text-primary); font-size: .96rem; font-weight: 650; letter-spacing: -.01em; }
body[data-wizard-step="resumen"] .wiz-summary-edit { min-height: 32px; padding: .2rem 0; border: 0; border-radius: 0; color: var(--brand-primary); font-size: .76rem; text-decoration: underline; text-underline-offset: 3px; }
body[data-wizard-step="resumen"] .wiz-summary-edit:hover { background: transparent; border-color: transparent; }
body[data-wizard-step="resumen"] .wiz-summary-section-actions { display: flex; align-items: center; gap: .55rem; }
body[data-wizard-step="resumen"] .wiz-summary-toggle { display: none; }
body[data-wizard-step="resumen"] .wiz-summary-rows { display: grid; grid-template-columns: 1fr; gap: .28rem; margin: 0; font-size: .82rem; }
body[data-wizard-step="resumen"] .wiz-summary-rows > div { display: grid; grid-template-columns: minmax(92px, 34%) minmax(0, 1fr); gap: .65rem; align-items: baseline; }
body[data-wizard-step="resumen"] .wiz-summary-rows dt { color: var(--text-secondary); font-weight: 500; }
body[data-wizard-step="resumen"] .wiz-summary-rows dd { margin: 0; color: var(--text-primary); font-weight: 600; overflow-wrap: anywhere; }
body[data-wizard-step="resumen"] .wiz-nav { position: static; width: min(100%, 520px); margin: 1rem auto 0; padding: 0 0 1.5rem; border: 0; background: transparent; backdrop-filter: none; }
body[data-wizard-step="resumen"] .wiz-nav-inner { width: 100%; max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
body[data-wizard-step="resumen"] .wiz-nav .btn { width: 100%; min-width: 0; max-width: none; height: 50px; min-height: 50px; margin: 0; border-radius: 10px; }
body[data-wizard-step="resumen"] #wiz-back { border: 1px solid #cbd3df; background: transparent; color: var(--brand-primary); }
body:is([data-wizard-step="facturacion"], [data-wizard-step="resumen"]) .wiz-copyright {
  display: block;
  width: min(calc(100% - 2.5rem), 900px);
  margin: 0 auto;
  padding: .75rem 0 calc(1rem + env(safe-area-inset-bottom));
}
@media (max-width: 820px) {
  body[data-wizard-step="resumen"] .site-header,
  body[data-wizard-step="resumen"] #wizard-root { width: min(calc(100% - 2.5rem), 520px); }
  body[data-wizard-step="resumen"] .site-header { padding-top: 1rem; }
  body[data-wizard-step="resumen"] .brand-mark { height: 30px; }
  body[data-wizard-step="resumen"] .brand-name { font-size: 1.15rem; }
  body[data-wizard-step="resumen"] #wizard-root { margin-top: 1rem; }
  body[data-wizard-step="resumen"] .wiz-progress { margin-bottom: 1.25rem; padding-bottom: 0; }
  body[data-wizard-step="resumen"] .wiz-progress-copy { display: grid; justify-content: start; gap: .25rem; }
  body[data-wizard-step="resumen"] .wiz-progress-copy span { color: #7b8492; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  body[data-wizard-step="resumen"] .wiz-progress-copy strong { color: var(--brand-primary); font-size: .98rem; font-weight: 750; }
  body[data-wizard-step="resumen"] .wiz-progress-bar { display: block; height: 2px; margin-top: .75rem; background: #e1e5eb; border-radius: 0; }
  body[data-wizard-step="resumen"] .wiz-progress-bar span { background: var(--brand-primary); border-radius: 0; }
  body[data-wizard-step="resumen"] .wiz-progress-track { display: none; }
  body[data-wizard-step="resumen"] .wiz-screen[data-id="resumen"] .wiz-screen-header { margin-bottom: .65rem; }
  body[data-wizard-step="resumen"] .wiz-screen[data-id="resumen"] h2 { font-size: 1.75rem; }
  body[data-wizard-step="resumen"] .wiz-summary { grid-template-columns: 1fr; }
  body[data-wizard-step="resumen"] .wiz-summary-section { padding: .65rem 0; }
  body[data-wizard-step="resumen"] .wiz-summary-section-header { margin-bottom: .3rem; }
  body[data-wizard-step="resumen"] .wiz-summary-toggle {
    display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: transparent;
    color: var(--text-secondary); cursor: pointer;
  }
  body[data-wizard-step="resumen"] .wiz-summary-toggle span {
    width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); transition: transform 180ms ease;
  }
  body[data-wizard-step="resumen"] .wiz-summary-toggle[aria-expanded="true"] span { transform: rotate(225deg); }
  body[data-wizard-step="resumen"] .wiz-summary-section--billing.is-collapsed .wiz-summary-section-header { margin-bottom: 0; }
  body[data-wizard-step="resumen"] .wiz-summary-section--billing.is-collapsed .wiz-summary-rows { display: none; }
  body[data-wizard-step="resumen"] .wiz-summary-rows { gap: .2rem; }
  body[data-wizard-step="resumen"] .wiz-summary-rows > div { grid-template-columns: minmax(88px, 31%) minmax(0, 1fr); }
  body[data-wizard-step="resumen"] .wiz-nav { width: min(calc(100% - 2.5rem), 520px); margin-top: .75rem; }
  body[data-wizard-step="resumen"] .wiz-nav .btn { height: 52px; min-height: 52px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
