/* ============================================================
   Adoria Sostemove — Test «¿Está obligada tu empresa?» (una pregunta por pantalla)
   Hereda tokens y componentes de styles.css
   ============================================================ */

.dx {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  padding-top: 88px; /* libra el nav flotante (top 18px + alto 62px) */
}

/* el atributo hidden debe ganar a display:flex de .dx-nav/.dx-progreso */
.dx-nav[hidden], .dx-progreso[hidden] { display: none !important; }

/* texto solo para lectores de pantalla */
.dx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* títulos que reciben el foco al cambiar de pantalla (tabindex=-1) */
.dx-foco:focus { outline: none; }

/* ---------- Barra de progreso por bloques ---------- */

.dx-progreso {
  display: flex;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px var(--pad-x) 0;
  width: 100%;
}

.dx-progreso-paso {
  flex: 1;
  display: grid;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(35, 54, 46, 0.62);
  transition: color 0.3s ease;
}

.dx-progreso-paso .barra {
  height: 4px;
  border-radius: 9999px;
  background: rgba(35, 54, 46, 0.14);
  overflow: hidden;
}

.dx-progreso-paso .barra::after {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  background: var(--forest);
  transition: width 0.4s ease;
}

.dx-progreso-paso.activo { color: var(--forest); }
.dx-progreso-paso.activo .barra::after,
.dx-progreso-paso.completo .barra::after { width: 100%; }
.dx-progreso-paso.completo .barra::after { background: var(--lime); }

/* ---------- Cuerpo ---------- */

.dx-cuerpo {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vh, 72px) var(--pad-x) clamp(110px, 14vh, 140px);
  width: 100%;
}

.dx-paso {
  width: 100%;
  max-width: 760px;
  display: none;
}

.dx-paso.activo {
  display: block;
  animation: dxEntra 0.45s ease both;
}

@keyframes dxEntra {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.dx-paso-kicker {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 0 0 22px;
}

.dx-paso h1,
.dx-paso h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--forest);
  max-width: 18ch;
  margin: 0 0 14px;
  text-wrap: balance;
}

.dx-paso .dx-ayuda {
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 34px;
}

/* nota contextual encima de la pregunta (varios centros, inicio de la fase 2) */
.dx-nota-fase1 {
  margin: -6px 0 22px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--forest);
  background: rgba(186, 204, 128, 0.22);
  border-radius: 10px;
  max-width: 62ch;
}

/* ---------- Preguntas ---------- */

.dx-pregunta {
  margin: 0 0 34px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.dx-pregunta:last-child { margin-bottom: 0; }
.dx-pregunta legend { padding: 0; margin: 0; width: 100%; }

.dx-paso .dx-pregunta-titulo {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--forest);
  max-width: 26ch;
  margin: 0 0 8px;
  text-wrap: balance;
}

.dx-pregunta .dx-sub {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 20px;
}

/* Opciones seleccionables (radio / checkbox como tarjetas) */

.dx-opciones {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.dx-sub + .dx-opciones { margin-top: 0; }

.dx-opciones.cols-2 { grid-template-columns: 1fr 1fr; }

.dx-opcion {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--warm-white);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
}

.dx-opcion:hover { border-color: rgba(35, 54, 46, 0.4); }
.dx-opcion:active { transform: translateY(1px); }

.dx-opcion input { position: absolute; opacity: 0; pointer-events: none; }

.dx-opcion .marca {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid rgba(35, 54, 46, 0.45);
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dx-opcion .marca::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

/* checkbox = marca cuadrada con check */
.dx-opcion.check .marca { border-radius: 6px; }
.dx-opcion.check .marca::after {
  width: 12px; height: 7px;
  border: 0;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: none;
  transform: rotate(-45deg) scale(0);
  margin-top: -2px;
}

.dx-opcion .texto { font-size: 16px; color: var(--forest); }

.dx-opcion:has(input:checked) {
  border-color: var(--forest);
  background: #fff;
}

.dx-opcion:has(input:checked) .marca { border-color: var(--forest); }
.dx-opcion:has(input:checked) .marca::after { transform: scale(1); }
.dx-opcion.check:has(input:checked) .marca { background: var(--lime); border-color: var(--lime); }
.dx-opcion.check:has(input:checked) .marca::after { transform: rotate(-45deg) scale(1); }

.dx-opcion:has(input:focus-visible) { outline: 2px solid var(--forest); outline-offset: 2px; }

/* Inputs numéricos / texto */

.dx-campo { display: grid; gap: 8px; max-width: 360px; }

.dx-campo input,
.dx-campo select,
.dx-campo textarea {
  font-family: var(--prosa);
  font-size: 17px;
  color: var(--forest);
  background: var(--warm-white);
  border: 1px solid rgba(35, 54, 46, 0.28);
  border-radius: 10px;
  height: 54px;
  padding: 0 16px;
}

.dx-campo textarea {
  height: auto;
  min-height: 92px;
  padding: 13px 16px;
  line-height: 1.5;
  resize: vertical;
}

.dx-campo input:focus-visible,
.dx-campo select:focus-visible,
.dx-campo textarea:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; }

.dx-opt { font-weight: 400; color: var(--muted); font-size: 0.85em; }

.dx-campo-fila { display: flex; align-items: center; gap: 12px; }
.dx-campo-numero input { width: 180px; font-variant-numeric: tabular-nums; }
.dx-campo-numero input[aria-invalid="true"] { border-color: #b3261e; }

.dx-campo .dx-unidad {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dx-campo-error { color: #b3261e; font-size: 13.5px; line-height: 1.45; margin: 2px 0 0; }
.dx-campo-ayuda { font-size: 12.5px; line-height: 1.45; color: var(--muted); margin: 0; }

/* Slider / rango */

.dx-rango { display: grid; gap: 14px; max-width: 460px; }

.dx-rango-valor {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.dx-rango input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 9999px;
  background: rgba(35, 54, 46, 0.18);
  outline: none;
}

.dx-rango input[type="range"]:focus-visible { outline: 2px solid var(--forest); outline-offset: 8px; }

.dx-rango input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--forest);
  cursor: pointer;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--forest);
}

.dx-rango input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--forest);
  cursor: pointer;
  border: 3px solid var(--paper);
}

.dx-rango-et {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Pie de navegación fijo ---------- */

.dx-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px var(--pad-x);
  background: rgba(239, 238, 225, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--hairline);
}

.dx-nav-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dx-nav .btn { border: 0; cursor: pointer; }
.dx-nav .btn:disabled { opacity: 0.45; cursor: not-allowed; }

.dx-atras {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--prosa);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 4px;
}

.dx-atras:hover { color: var(--forest); }
.dx-atras:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 4px; }
.dx-atras[hidden] { visibility: hidden; }

.dx-cuenta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ---------- Pantalla de resultado ---------- */

.dx-resultado { width: 100%; max-width: 880px; display: none; }
.dx-resultado.activo { display: block; animation: dxEntra 0.5s ease both; }

.dx-veredicto {
  display: grid;
  gap: 18px;
  padding-bottom: clamp(32px, 5vw, 48px);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: clamp(32px, 5vw, 48px);
}

.dx-resultado h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: var(--forest);
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
}

/* Etiqueta del veredicto: con la forma del «tramo» de la marca y un color por resultado */
.dx-obligacion-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  margin: 0;
  padding: 10px 30px 10px 16px;
  border-radius: 8px 0 0 8px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dx-obligacion-badge .punto { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* A · apunta a obligación: forest (contraste 12:1) */
.dx-obligacion-badge.result-a { background: var(--forest); color: var(--warm-white); }
.dx-obligacion-badge.result-a .punto { background: var(--lime); }
/* B · obligación + alta ocupación: petrol (9:1) */
.dx-obligacion-badge.result-b { background: var(--petrol); color: var(--warm-white); }
.dx-obligacion-badge.result-b .punto { background: var(--lime); box-shadow: 0 0 0 3px rgba(205, 225, 79, 0.28); }
/* C · no apunta por ahora: sage con texto ink (9:1) */
.dx-obligacion-badge.result-c { background: var(--sage); color: var(--ink); }
.dx-obligacion-badge.result-c .punto { background: var(--forest); }
/* E · valoración específica: warm white con texto petrol (9:1) */
.dx-obligacion-badge.result-e { background: var(--warm-white); color: var(--petrol); }
.dx-obligacion-badge.result-e .punto { background: var(--petrol); }

/* Plazo destacado */
.dx-plazo {
  display: grid;
  gap: 8px;
  padding: 18px 22px;
  background: var(--warm-white);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--forest);
  border-radius: 4px 16px 16px 4px;
}
.dx-plazo-et {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--petrol);
}
.dx-plazo-txt { margin: 0; font-size: 16px; line-height: 1.55; color: var(--forest); }
.dx-plazo-txt strong { font-weight: 700; color: var(--ink); }

/* después del 5-dic-2026: bloque en petrol */
.dx-plazo.vencido { background: var(--petrol); border-color: var(--petrol); }
.dx-plazo.vencido .dx-plazo-et { color: var(--sage); }
.dx-plazo.vencido .dx-plazo-txt,
.dx-plazo.vencido .dx-plazo-txt strong { color: var(--warm-white); }

/* Viñetas de marca: pequeño trapecio lima */
.dx-lista-llana {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.dx-lista-llana li {
  position: relative;
  padding-left: 30px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--forest);
  max-width: 64ch;
}
.dx-lista-llana li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 17px;
  height: 7px;
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}

.dx-nivel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  margin: 0;
  padding: 8px 16px;
  border-radius: 9999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dx-nivel .punto { width: 9px; height: 9px; border-radius: 50%; }
.dx-nivel.alto { background: rgba(42, 73, 82, 0.1); color: var(--petrol); }
.dx-nivel.alto .punto { background: var(--lime); }
.dx-nivel.medio { background: rgba(35, 54, 46, 0.08); color: var(--forest); }
.dx-nivel.medio .punto { background: var(--sage); }
.dx-nivel.bajo { background: rgba(35, 54, 46, 0.06); color: var(--forest); }
.dx-nivel.bajo .punto { background: rgba(35, 54, 46, 0.4); }

.dx-resumen { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 60ch; margin: 0; }

.dx-cautela { font-size: 13.5px; line-height: 1.5; color: var(--muted); font-style: italic; max-width: 62ch; margin: 0; }
.dx-cautela a { color: var(--forest); font-style: normal; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.dx-cautela a:hover { color: var(--ink); }

/* lectura de preparación (fase 2) */
.dx-prep-bloque {
  display: grid;
  gap: 14px;
  margin-top: clamp(10px, 2vw, 18px);
  padding-top: clamp(22px, 3.4vw, 30px);
  border-top: 1px solid var(--hairline);
}
.dx-resultado .dx-prep-tit {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--forest);
  margin: 0;
  max-width: 32ch;
}

/* lista del plan */

.dx-hallazgos { list-style: none; padding: 0; display: grid; gap: 0; margin: 0 0 clamp(32px, 5vw, 48px); }

.dx-hallazgo {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
}

.dx-hallazgo:last-child { border-bottom: 1px solid var(--hairline); }

.dx-hallazgo .indice {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  min-width: 2ch;
}

.dx-hallazgo-txt { margin: 0; font-size: 16px; line-height: 1.5; color: var(--forest); max-width: 64ch; }

.dx-hallazgo .señal {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
}
.dx-hallazgo .señal.alta { background: var(--lime); }
.dx-hallazgo .señal.media { background: var(--sage); }
.dx-hallazgo .señal.baja { background: rgba(35, 54, 46, 0.25); }

/* bloque de huella estimada */

.dx-huella {
  background: var(--forest);
  color: var(--paper);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  gap: 8px;
  margin-bottom: clamp(32px, 5vw, 48px);
  clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 32px, 100% 100%, 0 100%);
}

.dx-huella .et { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); }
.dx-huella .cifra {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--warm-white);
  font-variant-numeric: tabular-nums;
}
.dx-huella .cifra small { font-size: 0.35em; color: var(--sage); margin-left: 8px; letter-spacing: 0; }
.dx-huella .equis { font-size: 14.5px; line-height: 1.55; color: var(--muted-claro); margin-top: 8px; max-width: 58ch; }
.dx-huella .dx-huella-sin { margin-top: 0; }
.dx-huella a { color: var(--lime); font-weight: 600; }

.dx-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}

/* CTA sobre la tarjeta oscura: primario en lima para contrastar con forest;
   el secundario es un botón fantasma claro a juego. */
.dx-cta-bloque .btn-primary { background: var(--lime); color: var(--ink); }
.dx-cta-bloque .btn-primary::after { background: var(--sage); }

.dx-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 10px 28px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid rgba(239, 238, 225, 0.34);
  color: var(--paper);
  font-family: var(--prosa);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.dx-btn-link:hover { background: rgba(205, 225, 79, 0.12); border-color: var(--lime); color: var(--lime); }
.dx-btn-link:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.dx-btn-link .flecha { font-size: 1.15em; line-height: 0; transition: transform 0.2s ease; }
.dx-btn-link:hover .flecha { transform: translateX(4px); }

.dx-legal {
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  max-width: 76ch;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .dx-progreso-paso { font-size: 0; gap: 0; }
  .dx-opciones.cols-2 { grid-template-columns: 1fr; }
  .dx-hallazgo { grid-template-columns: auto 1fr; }
  .dx-hallazgo .señal { display: none; }
  .dx-cta .btn, .dx-cta .dx-btn-link { width: 100%; }
  .dx-opcion { padding: 14px 16px; }
}

/* ---------- Aviso de cabecera ---------- */

.dx-disclaimer-top {
  margin: 0;
  padding: 9px var(--pad-x);
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--pale-stone, #eeeee9);
  border-bottom: 1px solid var(--hairline);
}

/* tras la primera pantalla se reduce a una línea */
.dx-disclaimer-top.dx-disclaimer-plegado {
  padding: 6px var(--pad-x);
  font-size: 12px;
  line-height: 1.4;
}

/* ---------- Pantalla de inicio ---------- */

.dx-inicio { max-width: 720px; }

.dx-inicio-lista {
  list-style: none;
  margin: clamp(24px, 4vw, 36px) 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.dx-inicio-lista li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--forest);
}

.dx-inicio-lista .tramo-s { margin-top: 9px; }

.dx-inicio .btn { border: 0; cursor: pointer; }
.dx-legal-inicio { margin-top: clamp(24px, 4vw, 40px); }

/* ---------- «Por qué» y señales ---------- */

.dx-disparador {
  padding: 20px 24px;
  background: var(--warm-white);
  border: 1px solid var(--hairline);
  border-radius: 16px;
}

.dx-disparador-tit {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.dx-disparador .dx-disparador-tit-2 { margin-top: 16px; }

.dx-disparador p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--forest); }
.dx-disparador .dx-disparador-tit { font-size: 11px; color: var(--muted); }
.dx-disparador strong { font-weight: 600; }

.dx-flags {
  list-style: none;
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 10px;
}
.dx-flags li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--forest);
}
.dx-flags li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 6px;
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}

/* ---------- Bloques del resultado completo ---------- */

.dx-bloque-res { margin-bottom: clamp(32px, 5vw, 48px); }

.dx-resultado .dx-bloque-tit {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--forest);
  margin: 0 0 16px;
  max-width: 60ch;
}
.dx-bloque-sub { font-size: 14.5px; color: var(--muted); margin: -8px 0 18px; }

/* medidas priorizadas */
.dx-medidas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dx-medida {
  position: relative;
  padding: 22px;
  background: var(--warm-white);
  border: 1px solid var(--hairline);
  border-radius: 16px;
}

.dx-medida-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.dx-medida-esf {
  float: right;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 9999px;
}
.esf-bajo { background: rgba(186, 204, 128, 0.3); color: var(--forest); }
.esf-medio { background: rgba(42, 73, 82, 0.1); color: var(--petrol); }
.esf-alto { background: rgba(205, 225, 79, 0.35); color: var(--forest); }

.dx-medida h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--forest);
  margin: 12px 0 8px;
}
.dx-medida p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

@media (max-width: 640px) {
  .dx-medidas { grid-template-columns: 1fr; }
}

/* ---------- Siguiente paso + formulario ---------- */

.dx-cta-final {
  margin-top: clamp(32px, 5vw, 48px);
  display: grid;
  gap: 24px;
  justify-items: start;
}
.dx-veredicto + .dx-cta-final { margin-top: 0; }

.dx-cta-bloque {
  width: 100%;
  background: var(--forest);
  color: var(--paper);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 44px);
  clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 32px, 100% 100%, 0 100%);
}

.dx-cta-bloque h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--warm-white);
  margin: 0 0 10px;
  max-width: 22ch;
}

.dx-cta-bloque p { color: var(--muted-claro); max-width: 54ch; margin: 0 0 24px; font-size: 15.5px; line-height: 1.55; }
.dx-cta-bloque .dx-cta { margin: 0; }
.dx-cta-bloque .btn { border: 0; cursor: pointer; }
.dx-cta-bloque .enlace-ghost { color: var(--warm-white); }

.dx-rehacer-link {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 6px;
  background: none; border: 0; cursor: pointer;
  font-family: var(--prosa); font-weight: 600; font-size: 14px;
  color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.dx-rehacer-link:hover { color: var(--forest); }
.dx-rehacer-link:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 4px; }

/* Barra fija con el siguiente paso: visible mientras el bloque de contacto no se ve */
.dx-cta-fija {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 12px var(--pad-x) calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(239, 238, 225, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--hairline);
  transition: transform 0.25s ease, visibility 0.25s;
}
.dx-cta-fija[data-oculta="true"] { transform: translateY(110%); visibility: hidden; }
.dx-cta-fija-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
}
.dx-cta-fija .btn { border: 0; cursor: pointer; height: 50px; }
@media (max-width: 640px) {
  .dx-cta-fija .btn { width: 100%; }
}

/* ventana modal */
.dx-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.dx-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(19, 35, 29, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: dxScrim 0.25s ease both;
}
@keyframes dxScrim { from { opacity: 0; } to { opacity: 1; } }

.dx-modal-card {
  position: relative;
  width: min(460px, 100%);
  max-height: 92svh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 40px);
  animation: dxModal 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes dxModal { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

.dx-modal-cerrar {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  border-radius: 9999px;
}
.dx-modal-cerrar:hover { color: var(--forest); }
.dx-modal-cerrar:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

.dx-modal-card h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--forest);
  margin: 0 0 10px;
  max-width: 18ch;
}
.dx-modal-card h2:focus { outline: none; }

.dx-modal-sub { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0 0 24px; }
.dx-modal-sub strong { color: var(--forest); }

#dx-lead-form { display: grid; gap: 16px; }
#dx-lead-form .dx-campo { max-width: none; }
#dx-lead-form label { font-family: var(--prosa); font-weight: 600; font-size: 13px; color: var(--forest); }
#dx-lead-form input {
  font-family: var(--prosa); font-size: 16px; color: var(--forest);
  background: var(--warm-white); border: 1px solid rgba(35, 54, 46, 0.25);
  border-radius: 10px; height: 50px; padding: 0 14px; width: 100%;
}
#dx-lead-form input:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; }
#dx-lead-form input[aria-invalid="true"] { border-color: #b3261e; }
#dx-lead-form .btn { border: 0; cursor: pointer; margin-top: 4px; width: 100%; }
#dx-lead-form .btn:disabled { opacity: 0.7; cursor: progress; }

/* campo trampa antispam (lo añade forms.js): fuera de la vista y del tabulador */
.dx-modal .hp-campo {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dx-consent {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--prosa); font-size: 13px; line-height: 1.5;
  color: var(--muted); cursor: pointer; margin: -2px 0 0;
}
#dx-lead-form input[type="checkbox"] {
  width: 18px; height: 18px; min-width: 18px; padding: 0;
  margin: 1px 0 0; flex: 0 0 auto; border-radius: 5px;
  accent-color: var(--forest); cursor: pointer;
}
.dx-consent a { color: var(--forest); text-decoration: underline; text-underline-offset: 2px; }
.dx-consent a:hover { color: var(--ink); }

.dx-lead-error { color: #b3261e; font-size: 13.5px; line-height: 1.5; margin: -4px 0 0; }
.dx-lead-error a { color: inherit; font-weight: 600; }

.dx-lead-ok { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 8px 0; }
.dx-lead-tic {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--lime); color: var(--ink);
  display: grid; place-items: center; margin-bottom: 4px;
}
.dx-lead-tic svg { width: 28px; height: 28px; }
.dx-lead-ok h2 { max-width: none; }
.dx-lead-ok .btn { border: 0; cursor: pointer; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .dx-paso.activo, .dx-resultado.activo,
  .dx-modal-scrim, .dx-modal-card { animation: none; }
  * { transition: none !important; }
}
