.ead {
  /* Base: verde claro */
  --ead-bg: var(--cream);
  --ead-bg-deep: var(--brand-soft);
  --ead-surface: #fff;
  --ead-line: #cfe3d6;
  --ead-line-strong: #6b967b; /* 3.35:1 sobre blanco, 3.15:1 sobre crema */
  --ead-ink: var(--ink);
  --ead-ink-soft: var(--ink-soft);
  --ead-brand: var(--brand);
  --ead-brand-deep: var(--brand-dark);
  --ead-lime: #c8ed9c;
  --ead-lime-deep: #a9dc6f;

  /* Semáforo de la escala */
  --ead-verde: #1f8a4c;
  --ead-verde-tint: #d6f0de;
  --ead-amarillo: #f2c200;
  --ead-amarillo-tint: #fff1b8;
  --ead-amarillo-ink: #5c4600;
  --ead-rojo: #c2362b;
  --ead-rojo-tint: #fbddd9;
  --ead-rojo-ink: #7d1f17;

  --ead-radius: 18px;
  --ead-radius-sm: 12px;
  --ead-shadow: 0 1px 2px rgb(18 48 29 / 0.08), 0 8px 24px -8px rgb(18 48 29 / 0.18);
  --ead-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ead-measure: 42rem;
}
.ead *,
.ead *::before,
.ead *::after {
  box-sizing: border-box;
}
.ead {
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
  background: var(--ead-bg);
  color: var(--ead-ink);
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  font-weight: 400;
  caret-color: var(--ead-brand);
  -webkit-tap-highlight-color: transparent;
}
.ead ::selection {
  background: var(--ead-lime);
  color: var(--ead-ink);
}
.ead h1,
.ead h2,
.ead h3,
.ead p {
  margin: 0;
}
.ead b,
.ead strong {
  font-weight: 700;
}
.ead h1,
.ead h2,
.ead h3 {
  font-family: 'Fraunces', Georgia, serif;
  text-wrap: balance;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.ead button,
.ead input,
.ead select {
  font: inherit;
  color: inherit;
}
.ead button {
  touch-action: manipulation;
}
.ead-saltar {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.ead-saltar:focus {
  top: 0.75rem;
}
.ead main:focus,
.ead .enunciado:focus,
.ead h1:focus {
  outline: none;
}
.ead :focus-visible {
  outline: 3px solid var(--ead-brand-deep);
  outline-offset: 3px;
  border-radius: 6px;
}
.ead .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.ead .wrap {
  width: min(100% - 2rem, var(--ead-measure));
  margin-inline: auto;
}
.ead svg.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* ---------- Encabezado y avance ---------- */

.ead .top {
  position: sticky;
  top: calc(var(--ead-nav, 4.5rem) - 1px); /* justo bajo la nav del sitio (medida por JS), con 1 px de solape */
  z-index: 10;
  background: var(--ead-bg);
  border-bottom: 1px solid var(--ead-line);
}
.ead .top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.65rem 0.5rem;
}
.ead .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.ead .brand-name {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.ead .brand-sub {
  display: block;
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ead-ink-soft);
}
@media (max-width: 39.99rem) {
  /* Fuera de Datos la fila de marca y «Nuevo» se oculta: el avance queda solo con la barra de pasos.
     «Nuevo» sigue disponible en Datos y en el resultado. */
  .ead:not([data-paso='datos']) .top-row {
    display: none;
  }
  .ead:not([data-paso='datos']) .rail {
    padding-top: 0.55rem;
  }
}
.ead .rail {
  list-style: none;
  margin: 0;
  padding: 0 0 0.6rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
}
.ead .rail button {
  all: unset;
  box-sizing: border-box;
  display: grid;
  align-content: center;
  min-height: 2.75rem;
  gap: 0.3rem;
  width: 100%;
  cursor: pointer;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ead-ink-soft);
  padding: 0.2rem 0;
  border-radius: 8px;
}
.ead .rail button {
  position: relative;
}
.ead .rail .lbl-mini {
  display: none;
}
@media (max-width: 23.99rem) {
  .ead .rail {
    gap: 0.25rem;
  }
  .ead .rail .lbl {
    display: none;
  }
  .ead .rail .lbl-mini {
    display: block;
  }
}
.ead .rail button::after {
  content: '';
  position: absolute;
  inset: -0.5rem 0;
}
.ead .rail button::before {
  content: '';
  height: 0.4rem;
  border-radius: 99px;
  background: var(--ead-line);
  transition: background 0.2s var(--ead-ease);
}
.ead .rail button[data-estado='hecho']::before {
  background: var(--ead-ink);
}
.ead .rail button[aria-current='step'] {
  color: var(--ead-ink);
}
.ead .rail button[aria-current='step']::before {
  background: var(--ead-lime-deep);
  box-shadow: 0 0 0 2px var(--ead-brand);
}
.ead .rail button[aria-current='step'][data-estado='hecho']::before {
  background: var(--ead-ink);
  box-shadow: 0 0 0 2px var(--ead-lime-deep);
}
.ead .rail button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.ead .rail button:focus-visible {
  outline: 3px solid var(--ead-brand-deep);
  outline-offset: 2px;
}
/* ---------- Estructura principal ---------- */

.ead main {
  flex: 1;
  padding-block: 1.5rem 2.5rem;
}
.ead .pantalla {
  display: grid;
  gap: 1.5rem;
}
.ead .titulo {
  font-size: clamp(1.7rem, 5.5vw, 2.35rem);
  color: var(--brand-dark);
}
.ead .bajada {
  color: var(--ead-ink-soft);
  font-weight: 600;
  margin-top: 0.4rem;
  max-width: 38rem;
}
.ead .aviso {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--ead-surface);
  border: 2px solid var(--ead-ink);
  border-radius: var(--ead-radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
}
.ead .aviso .ico {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
}
.ead .aviso-txt {
  flex: 1 1 12rem;
}
.ead .aviso button {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.ead .aviso button:focus-visible {
  outline: 3px solid var(--ead-brand-deep);
  outline-offset: 3px;
}
/* ---------- Botones ---------- */

.ead .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--ead-brand);
  border-radius: 16px;
  background: var(--ead-brand);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s var(--ead-ease), background 0.15s, border-color 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
}
@media (hover: hover) {
  .ead .btn:hover {
    background: var(--ead-brand-deep);
    border-color: var(--ead-brand-deep);
  }
}
.ead .btn:active {
  transform: translateY(1px) scale(0.99);
}
.ead .btn:disabled {
  background: var(--ead-bg-deep);
  border-color: var(--ead-line);
  color: #5f7a67;
  cursor: not-allowed;
  transform: none;
}
.ead [hidden] {
  display: none !important;
}
/* Acción principal en tinta: ni el verde (cumple/semáforo) ni el dorado/amarillo (riesgo) compiten con el resultado */
.ead .btn-primario {
  background: var(--ead-ink);
  border-color: var(--ead-ink);
  color: #fff;
}
@media (hover: hover) {
  .ead .btn-primario:not(:disabled):hover {
    background: color-mix(in srgb, var(--ead-ink) 82%, #fff);
    border-color: color-mix(in srgb, var(--ead-ink) 82%, #fff);
  }
}
.ead .btn-primario:disabled {
  background: var(--ead-bg-deep);
  border-color: var(--ead-line);
  color: #5f7a67;
}
.ead .btn-suave {
  background: var(--ead-surface);
  color: var(--ead-ink);
  border-color: var(--ead-line-strong);
}
@media (hover: hover) {
  .ead .btn-suave:hover {
    background: var(--ead-bg-deep);
    border-color: var(--ead-brand);
  }
}
/* Confirmación destructiva: va después de .btn-suave:hover para que el hover no la apague */
.ead .btn[data-confirmar],
.ead .btn[data-confirmar]:hover {
  background: var(--ead-rojo-tint);
  border-color: var(--ead-rojo);
  color: var(--ead-rojo-ink);
}
.ead .btn-texto {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding-inline: 0.5rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--ead-ink-soft);
  border-radius: 10px;
}
@media (hover: hover) {
  .ead .btn-texto:hover {
    color: var(--ead-ink);
    background: var(--ead-bg-deep);
  }
}
.ead .btn-texto:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: none;
}
.ead .btn-texto:focus-visible {
  outline: 3px solid var(--ead-brand-deep);
  outline-offset: 2px;
}
.ead .btn-chico {
  white-space: nowrap;
  min-height: 2.75rem;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
  border-radius: 12px;
}
/* ---------- Formulario de datos ---------- */

.ead .form {
  display: grid;
  gap: 1.25rem;
}
.ead .campos {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 34rem) {.ead .campos {
    grid-template-columns: 1fr 1fr;
  }
}
.ead .campo {
  display: grid;
  gap: 0.4rem;
}
.ead .campo label,
.ead .campo .etiqueta {
  font-weight: 700;
  font-size: 0.98rem;
}
.ead .campo .ayuda {
  font-size: 0.88rem;
  color: var(--ead-ink-soft);
  font-weight: 600;
}
.ead .entrada {
  width: 100%;
  min-height: 3.5rem;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--ead-line-strong);
  border-radius: 14px;
  background: var(--ead-surface);
  font-weight: 700;
  font-size: 1.1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
@media (hover: hover) {
  .ead .entrada:hover {
    border-color: var(--ead-brand);
  }
}
.ead .entrada:focus-visible {
  outline: none;
  border-color: var(--ead-brand-deep);
  box-shadow: 0 0 0 4px var(--ead-lime);
}
.ead .entrada[aria-invalid='true'] {
  border-color: var(--ead-rojo);
}
.ead .interruptor input {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  accent-color: var(--ead-brand);
}
.ead .interruptor {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 3.5rem;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--ead-line-strong);
  border-radius: 14px;
  background: var(--ead-surface);
  cursor: pointer;
  font-weight: 700;
}
@media (hover: hover) {
  .ead .interruptor:hover {
    border-color: var(--ead-brand);
  }
}
.ead .interruptor:has(input:focus-visible) {
  box-shadow: 0 0 0 4px var(--ead-lime);
  border-color: var(--ead-brand-deep);
}
.ead .edad-panel {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: var(--ead-radius);
  background: var(--ead-bg-deep);
  min-height: 5.5rem;
  align-content: center;
}
.ead .edad-panel strong {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}
.ead .edad-panel .nota {
  font-size: 0.92rem;
  color: var(--ead-ink-soft);
  font-weight: 600;
}
.ead .edad-panel.error strong {
  color: var(--ead-rojo-ink);
  font-size: 1.05rem;
}
.ead .acciones {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.ead .acciones-fija {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding-block: 1.25rem 0.75rem;
  background: linear-gradient(to bottom, transparent, var(--ead-bg) 1.1rem);
}
.ead .acciones-fija .btn:not(:disabled) {
  box-shadow: var(--ead-shadow);
}
.ead .entrada,
.ead .interruptor {
  scroll-margin-bottom: 8rem;
}
/* Mientras el botón está deshabilitado no flota sobre los campos: queda en el flujo al final del formulario */
.ead .acciones-fija:has(#comenzar:disabled) {
  position: static;
  background: none;
  padding-block: 1rem 0;
}
@media (max-height: 700px) {
  .ead .acciones-fija {
    position: static;
    background: none;
    padding-block: 1rem 0;
  }
  .ead .entrada,
  .ead .interruptor {
    scroll-margin-bottom: 1rem;
  }
}
.ead .acciones .btn {
  flex: 1 1 14rem;
}
/* ---------- Pantalla de área ---------- */

.ead .rango-chip {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-top: 0.5rem;
  font-weight: 700;
  color: var(--ead-ink-soft);
  font-size: 0.95rem;
}
.ead .escalera-plegable > summary {
  cursor: pointer;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--ead-ink);
}
/* Flecha dibujada con bordes para indicar que el resumen se abre */
.ead .escalera-plegable > summary::after,
.ead .ayuda > summary::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.65rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s var(--ead-ease);
}
.ead .escalera-plegable[open] > summary::after,
.ead .ayuda[open] > summary::after {
  transform: rotate(-135deg) translateY(-2px);
}
.ead .escalera-plegable[open] > summary {
  margin-bottom: 0.25rem;
}
@media (min-width: 34rem) {
  .ead .escalera-plegable > summary {
    display: none;
  }
}
.ead .leyenda i[data-e='actual'] {
  background: var(--ead-surface);
  border: 2.5px solid var(--ead-brand-deep);
}
.ead .leyenda i[data-e='rango'] {
  background: var(--ead-bg-deep);
  box-shadow: inset 0 0 0 2px var(--ead-brand);
  border-color: transparent;
}
.ead .acciones-copiar {
  margin-top: -0.25rem;
}
.ead .acciones-copiar .btn {
  flex: 0 0 auto;
}
.ead .escalera {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
.ead .escalera .grupo {
  display: flex;
  gap: 2px;
  flex: 1;
  padding: 3px;
  border-radius: 8px;
}
/* Rango de edad del niño: el grupo de tres ítems queda enmarcado */
.ead .escalera .grupo[data-actual='true'] {
  background: var(--ead-bg-deep);
  box-shadow: inset 0 0 0 2px var(--ead-brand);
}
/* Móvil: dos filas de 6 grupos; en una sola fila cada tick medía ~3 px y los estados no se distinguían */
@media (max-width: 33.99rem) {
  .ead .escalera {
    flex-wrap: wrap;
    gap: 0.5rem 0.35rem;
  }
  .ead .escalera .grupo {
    flex: 0 0 calc((100% - 5 * 0.35rem) / 6);
  }
  .ead .tick {
    height: 1.25rem;
  }
}
.ead .tick {
  flex: 1;
  height: 1.5rem;
  border-radius: 4px;
  border: 1.5px solid var(--ead-line-strong);
  background: transparent;
  position: relative;
}
.ead .tick[data-e='previo'] {
  background: var(--ead-line);
  border-color: var(--ead-line-strong);
}
.ead .tick[data-e='si'] {
  background: var(--ead-ink);
  border-color: var(--ead-ink);
}
.ead .tick[data-e='no'] {
  background: repeating-linear-gradient(135deg, var(--ead-surface) 0 3px, var(--ead-line) 3px 5px);
  border-color: var(--ead-ink-soft);
}
.ead .tick[data-e='actual'] {
  background: var(--ead-surface);
  border-color: var(--ead-brand-deep);
  border-width: 2.5px;
  transform: scaleY(1.3);
  box-shadow: 0 0 0 3px var(--ead-line-strong);
}
.ead .tick[data-e='fuera'] {
  opacity: 0.35;
}
.ead .leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ead-ink-soft);
  margin-top: 0.35rem;
}
.ead .leyenda span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.ead .leyenda i {
  position: relative;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  border: 1.5px solid var(--ead-line-strong);
  display: inline-block;
}
.ead .leyenda i[data-e='previo'] {
  background: var(--ead-line);
  border-color: var(--ead-line-strong);
}
.ead .leyenda i[data-e='si'] {
  background: var(--ead-ink);
  border-color: var(--ead-ink);
}
.ead .leyenda i[data-e='no'] {
  background: repeating-linear-gradient(135deg, var(--ead-surface) 0 2px, var(--ead-line) 2px 4px);
  border-color: var(--ead-ink-soft);
}
.ead .item {
  background: var(--ead-surface);
  border-radius: calc(var(--ead-radius) + 6px);
  box-shadow: var(--ead-shadow);
  padding: clamp(1.25rem, 4vw, 2rem);
  display: grid;
  gap: 1.5rem;
  animation: ead-entra 0.28s var(--ead-ease);
}
@keyframes ead-entra {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.ead .et-corta {
  display: none;
}
.ead .ico-area {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.4rem;
  vertical-align: -0.1em;
}
.ead .mini-esc {
  margin-top: 0.9rem;
}
.ead .mini-esc-barra {
  display: flex;
  gap: 0.3rem;
}
.ead .mini-esc .grupo {
  display: flex;
  flex: 1;
  gap: 1px;
  padding: 2px;
  border-radius: 4px;
}
.ead .mini-esc .grupo[data-actual='true'] {
  background: var(--ead-bg-deep);
  box-shadow: inset 0 0 0 1.5px var(--ead-brand);
}
.ead .mini-esc .tick {
  flex: 1;
  height: 0.7rem;
  border-width: 1px;
  border-radius: 2px;
}
.ead .mini-esc .tick[data-e='actual'] {
  transform: scaleY(1.5);
  border-width: 2px;
  box-shadow: 0 0 0 2px var(--ead-line-strong);
}
.ead .mini-esc-txt .lg {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.6rem;
}
.ead .mini-esc-txt .lg i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  border: 1px solid var(--ead-ink-soft);
}
.ead .mini-esc-txt .lg i[data-e='si'] {
  background: var(--ead-ink);
}
.ead .mini-esc-txt .lg i[data-e='no'] {
  background: repeating-linear-gradient(135deg, var(--ead-surface) 0 2px, var(--ead-line) 2px 4px);
}
.ead .mini-esc-txt {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ead-ink-soft);
}
.ead .item-cab {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--ead-line);
}
.ead .item-area {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ead-brand-deep);
}
.ead .item-rango {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ead-ink-soft);
  white-space: nowrap;
}
.ead .elegida {
  background: var(--ead-ink);
  border-color: var(--ead-ink);
  color: var(--ead-surface);
}
#cambio-caja:empty {
  display: none;
}
.ead .item-num {
  text-wrap: balance;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ead-brand-deep);
}
.ead .enunciado {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-top: 0.35rem;
}
.ead .respuestas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.ead .resp {
  white-space: nowrap;
  min-height: 4.75rem;
  font-size: 1.2rem;
  flex-direction: column;
  gap: 0.2rem;
  border-radius: 18px;
}
.ead .resp:active {
  background: var(--ead-bg-deep);
  border-color: var(--ead-ink);
}
.ead .resp .ico {
  width: 1.5em;
  height: 1.5em;
}
@media (hover: hover) and (min-width: 40rem) {.ead .resp {
    flex-direction: row;
    gap: 0.7rem;
  }
}
@media (max-width: 39.99rem) {
  .ead .item:has(> .respuestas) {
    min-height: max(calc(100svh - var(--ead-fijo, 10.5rem) - 1.5rem), 22rem);
    grid-template-rows: auto 1fr auto auto;
    align-content: start;
  }
  .ead .item:has(> .respuestas) > .item-cab + div {
    align-self: end;
  }
}
/* Pantallas muy estrechas: enunciado y guía algo menores y menos aire, para que el peor caso (enunciado de 4 líneas) quepa */
@media (max-width: 23.99rem) {
  .ead .item:has(> .respuestas) {
    gap: 1rem;
    padding: 1.1rem;
    min-height: max(calc(100svh - var(--ead-fijo, 10.5rem) - 1.5rem), 28rem);
  }
  .ead .item .enunciado {
    font-size: 1.2rem;
  }
  .ead .item .enunciado.largo {
    font-size: 1.08rem;
  }
  .ead .item .resp {
    min-height: 4rem;
  }
  .ead .item .guia {
    font-size: 0.875rem;
    margin-top: 0.4rem;
  }
  .ead .mini-esc {
    margin-top: 0.6rem;
  }
  .ead .item-rango {
    display: none;
  }
  .ead .pie-item {
    gap: 0.5rem;
  }
  .ead .como-btn {
    font-size: 0.88rem;
  }
  .ead .como-btn .ico {
    display: none;
  }
  .ead .et-larga {
    display: none;
  }
  .ead .et-corta {
    display: inline;
  }
}
/* Pantalla estrecha y corta (320x568): no hay hueco arriba y la cabecera del área no cabe; el rail ya marca el área activa */
@media (max-width: 23.99rem) and (max-height: 600px) {
  .ead .item-cab {
    display: none;
  }
  .ead .item:has(> .respuestas) {
    grid-template-rows: 1fr auto auto;
  }
}
/* Escritorio: el bloque del enunciado tiene un alto mínimo para que Sí/No no cambien de sitio con el ratón */
@media (min-width: 40rem) {
  .ead .item:has(> .respuestas) > .item-cab + div {
    min-height: 15rem;
  }
}
.ead .pie-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.ead .atajos {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ead-ink-soft);
  display: none;
}
.ead .atajos kbd {
  font: inherit;
  font-weight: 700;
  padding: 0.05rem 0.4rem;
  border: 1.5px solid var(--ead-line-strong);
  border-radius: 6px;
  background: var(--ead-bg);
}
@media (hover: hover) and (min-width: 40rem) {.ead .atajos {
    display: block;
  }
}
.ead .resumen-area {
  display: grid;
  gap: 1rem;
}
.ead .cifras {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: baseline;
}
.ead .cifra {
  display: grid;
}
.ead .cifra b {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ead .cifra b.cifra-texto {
  font-size: 1.15rem;
  line-height: 1.25;
  align-self: end;
}
.ead .cifra span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ead-ink-soft);
}
/* ---------- Semáforo ---------- */

.ead .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem 0.25rem 0.5rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  border: 1.5px solid currentColor; /* sello de estado: se distingue de la decoración verde de la marca */
}
.ead .chip .ico {
  width: 1.1em;
  height: 1.1em;
}
.ead .chip[data-n='verde'] {
  background: var(--ead-verde-tint);
  color: #0d5a2c;
}
.ead .chip[data-n='amarillo'] {
  background: var(--ead-amarillo-tint);
  color: var(--ead-amarillo-ink);
}
.ead .chip[data-n='rojo'] {
  background: var(--ead-rojo-tint);
  color: var(--ead-rojo-ink);
}
/* ---------- Resultado ---------- */

.ead .veredicto {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.1rem;
  align-items: start;
  padding: clamp(1.1rem, 4vw, 1.75rem);
  border-radius: calc(var(--ead-radius) + 6px);
}
.ead .veredicto[data-n='verde'] {
  background: var(--ead-verde-tint);
  color: #0b4a25;
}
.ead .veredicto[data-n='amarillo'],
.ead .veredicto[data-n='rojo'] {
  background: var(--ead-surface);
  color: var(--ead-ink);
  box-shadow: inset 0 0 0 2px var(--ead-line-strong);
}
.ead .veredicto[data-n='amarillo'] .areas-alerta {
  color: var(--ead-amarillo-ink);
}
.ead .veredicto[data-n='rojo'] .areas-alerta {
  color: var(--ead-rojo-ink);
}
.ead .veredicto > * {
  min-width: 0;
}
.ead .veredicto .clasif .chip {
  white-space: normal;
  max-width: 100%;
}
.ead .veredicto .clasif {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
}
.ead .veredicto .sello {
  width: 3.4rem;
  height: 3.4rem;
}
.ead .veredicto h1 {
  font-size: clamp(1.7rem, 6vw, 2.25rem);
}
.ead .veredicto p,
.ead .veredicto .bloque-fam,
.ead .veredicto .que-hacer {
  grid-column: 1 / -1;
  font-weight: 600;
  max-width: 38rem;
  text-wrap: pretty;
}
@media (min-width: 34rem) {.ead .veredicto p,
.ead .veredicto .bloque-fam,
.ead .veredicto .que-hacer {
    grid-column: 2;
  }
}
.ead .veredicto .que-hacer {
  list-style: disc;
  margin: 0.4rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
  max-width: 38rem;
}
.ead .leyenda-barras {
  text-wrap: balance;
  margin: 0.15rem 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ead-ink-soft);
  max-width: 38rem;
}
.ead .lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.ead .fila-area {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 0;
  border-top: 1px solid var(--ead-line);
}
.ead .fila-area:first-child {
  border-top: 0;
  padding-top: 0.25rem;
}
.ead .fila-cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
@media (max-width: 33.99rem) {
  .ead .fila-cab {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}
.ead .fila-cab h3 {
  font-size: 1.1rem;
}
.ead .puntajes {
  font-weight: 700;
  color: var(--ead-ink-soft);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.ead .puntajes b {
  color: var(--ead-ink);
  font-weight: 700;
}
.ead .banda {
  position: relative;
  height: 0.9rem;
  border-radius: 99px;
  overflow: visible;
}
.ead .banda-fondo {
  position: absolute;
  inset: 0;
  border-radius: 99px;
}
.ead .banda-marca {
  position: absolute;
  top: 50%;
  width: 1.35rem;
  height: 1.35rem;
  /* --p va de 0 a 1 sobre el recorrido útil: el círculo nunca se sale de la barra ni queda recortado en los extremos */
  left: calc(0.675rem + (100% - 1.35rem) * var(--p, 0));
  margin: -0.675rem 0 0 -0.675rem;
  border-radius: 50%;
  background: var(--ead-surface);
  border: 3px solid var(--ead-ink);
  box-shadow: 0 2px 6px rgb(18 48 29 / 0.3);
  animation: ead-marca 0.7s var(--ead-ease) 0.15s backwards;
}
.ead .banda-marca.bajo {
  background: var(--ead-ink);
  border-color: var(--ead-surface);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}
.ead .banda-marca.bajo::after {
  content: '‹';
  margin-top: -0.1rem;
}
@keyframes ead-marca {
  from {
    opacity: 0;
    transform: translateX(-3rem) scale(0.6);
  }
}
.ead .datos-resumen {
  display: grid;
  gap: 0.15rem;
}
.ead .dato {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--ead-line);
  font-weight: 600;
}
.ead .dato:first-child {
  border-top: 0;
}
.ead .dato span:first-child {
  color: var(--ead-ink-soft);
  flex: none;
}
.ead .dato span:last-child {
  font-weight: 700;
  text-align: right;
}
.ead .seccion h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.ead .seccion p + p {
  margin-top: 0.6rem;
}
.ead .dos-col {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 52rem) {.ead {
    --ead-measure: 52rem;
  }
.ead .dos-col {
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: start;
  }
}
.ead .veredicto .areas-alerta {
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
}
.ead .veredicto .tamizaje {
  font-size: 1rem;
  font-weight: 700;
}
.ead .veredicto .bloque-fam {
  max-width: 38rem;
  margin-top: 0.4rem;
  padding: 0.9rem 1rem;
  background: var(--ead-bg-deep);
  border-radius: var(--ead-radius-sm);
}
.ead .bloque-prof .que-hacer {
  list-style: disc;
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--ead-ink);
}
.ead .bloque-prof .regla {
  font-size: 0.875rem;
}
.ead .veredicto .bloque-fam h2 {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}
.ead .veredicto .bloque-fam p {
  margin: 0;
  font-size: 1.05rem;
}
.ead .veredicto .areas-alerta-sec {
  font-size: 1.05rem;
  margin-top: -0.1rem;
}
.ead .veredicto .regla {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.35rem;
  opacity: 1;
}
.ead .chip-sentido {
  font-weight: 600;
}
.ead .ayuda {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--ead-ink-soft);
}
.ead .ayuda summary {
  cursor: pointer;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--ead-ink);
}
.ead .ayuda p {
  margin-top: 0.35rem;
  font-weight: 600;
}
.ead .guia {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ead-ink-soft);
  max-width: 38rem;
}
.ead .guia[data-fase='retroceso'] {
  font-weight: 700;
  color: var(--ead-ink);
}
.ead .error-campo {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  margin-top: 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ead-rojo-ink);
}
.ead .error-campo .ico {
  margin-top: 0.1em;
}
.ead .respuestas-previas ol {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}
.ead .respuestas-previas li {
  display: block;
  padding-block: 0.1rem;
  border-bottom: 1px solid var(--ead-line);
}
.ead .respuestas-previas .rp-fila {
  all: unset;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.1rem 0.75rem;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  cursor: pointer;
  border-radius: 8px;
}
@media (hover: hover) {
  .ead .respuestas-previas .rp-fila:hover {
    background: var(--ead-bg-deep);
  }
}
.ead .respuestas-previas .rp-fila:focus-visible {
  outline: 3px solid var(--ead-brand-deep);
  outline-offset: 2px;
}
.ead .respuestas-previas .rp-resp {
  border: 2px solid var(--ead-line-strong);
  border-radius: 99px;
  padding: 0.1rem 0.7rem;
  background: var(--ead-surface);
}
.ead .rp-num,
.ead .rp-resp {
  font-weight: 700;
  color: var(--ead-ink);
}
.ead .nota-clinica {
  text-wrap: pretty;
  font-size: 0.9rem;
  color: var(--ead-ink-soft);
  font-weight: 600;
}
/* ---------- Pie y avisos ---------- */

.ead-pie {
  padding-block: 1.25rem 2rem;
  border-top: 1px solid var(--ead-line);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ead-ink-soft);
}
.ead-pie p,
.ead .bloque-prof li {
  text-wrap: pretty;
}
.ead-pie p + p {
  margin-top: 0.4rem;
}
.ead .toast {
  position: fixed;
  top: 11.5rem; /* bajo la nav (~71 px) y la barra de avance (~107 px) */
  left: 1rem;
  right: 1rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin-inline: auto;
  transform: translateY(-1rem);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: var(--ead-ink);
  color: #f2fbed;
  padding: 0.7rem 1.1rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--ead-shadow);
  transition: transform 0.3s var(--ead-ease), opacity 0.3s, visibility 0s 0.3s;
  z-index: 20;
}
.ead .toast[data-visible='true'] {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}
.ead .toast {
  top: auto;
  bottom: calc(var(--ead-cta, 0px) + 0.75rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(1rem);
}
.ead .toast[data-visible='true'] {
  transform: translateY(0);
}
.ead #tarjeta,
.ead .enunciado {
  scroll-margin-top: 11.5rem;
}
.ead noscript p {
  padding: 2rem 1rem;
  font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {.ead *,
.ead *::before,
.ead *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
@media print {.ead .top,
.ead .acciones,
.ead .toast,
.ead .aviso,
.ead .no-print {
    display: none !important;
  }
.ead {
    background: #fff;
    font-size: 11pt;
  }
.ead main {
    padding: 0;
  }
.ead .veredicto,
.ead .chip,
.ead .banda-fondo,
.ead .banda-marca {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Zoom 200 % o teléfono en horizontal: la barra de avance no se fija para no tapar la pregunta */
@media (max-height: 500px) {
  .ead .top {
    position: static;
  }
  nav.sticky {
    position: static;
  }
  .ead .toast {
    top: 1rem;
    bottom: auto;
  }
  .ead #tarjeta,
  .ead .enunciado {
    scroll-margin-top: 1rem;
  }
}

/* ---------- Cómo observarlo / Antes de empezar (texto del manual) ---------- */

.ead .como-btn {
  margin-left: auto;
  gap: 0.35rem;
  padding-inline: 0.25rem;
  font-size: 0.92rem;
}
.ead .como-btn .ico {
  width: 1.1em;
  height: 1.1em;
}
.ead .como-txt {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--ead-radius);
  background: var(--ead-bg-deep);
  font-size: 0.88rem;
  line-height: 1.4;
}
.ead .como-txt[hidden] {
  display: none;
}
.ead .como-txt p {
  margin: 0;
}
.ead .como-txt b {
  color: var(--ead-ink);
}
.ead .fuente {
  font-size: 0.8rem;
  color: var(--ead-ink-soft);
}
.ead .puntajes-lista {
  margin: 0.5rem 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.25rem;
}
.ead .antes ul {
  margin: 0.5rem 0;
  padding-left: 1.3rem;
  list-style: disc;
}
.ead .antes li {
  display: list-item;
  margin-bottom: 0.4rem;
  padding-left: 0.2rem;
}
.ead .antes li::marker {
  color: var(--ead-brand-deep);
}
/* Ayuda pegada a su campo (la regla general de .ayuda separa 0,75 rem hacia arriba) */
.ead .campo > .ayuda {
  margin-top: 0;
}
/* Sin texto (fecha con error) no se dibuja la caja verde vacía */
.ead .edad-panel:empty {
  display: none;
}
/* Escritorio: dentro del rango de edad el encabezado ya lo dice; el sufijo solo queda en móvil y en etapas anterior/siguiente */
@media (min-width: 40rem) {
  .ead .et-sufijo {
    display: none;
  }
}
/* Las cuatro áreas con el mismo color: una sola etiqueta sobre las barras, no cuatro iguales */
.ead .todas-iguales {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin: 0.5rem 0 0.25rem;
  font-weight: 700;
}
/* Escritorio: la escalera grande ya está abierta, la mini y el nombre del área repetido en la tarjeta sobran */
@media (min-width: 34rem) {
  .ead .mini-esc-barra {
    display: none;
  }
}
@media (min-width: 40rem) {
  .ead .item-cab {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    padding: 0;
  }
}

/* La barra del sitio no se fija en esta pantalla: solo queda fija la barra de avance (menos pantalla ocupada) */
nav.sticky {
  position: static;
}
/* «Antes de empezar»: tarjeta visible justo bajo el título de Datos */
.ead .antes {
  margin-top: 0;
  padding: 0 0.9rem 0.6rem;
  border: 2px solid var(--ead-line-strong);
  border-radius: var(--ead-radius);
  background: var(--ead-bg-deep);
}
.ead .antes > summary {
  flex-wrap: wrap;
  gap: 0 0.6rem;
  font-size: 1rem;
}
.ead .antes .antes-sub {
  margin-right: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ead-ink-soft);
}
