/* Diagnóstico gratis (/diagnostico). Usa los tokens de nlg-2026.css (colores, tipografías, radio).
   Se carga solo en esa página (front-matter `extraCss`). Mobile-first: base de 1 columna, 2 desde 480px. */

/* — Hero más bajo que el de las otras páginas: lo que importa acá es llegar rápido a la primera pregunta — */
.phero--form { padding: clamp(1.6rem, 4.5vh, 3rem) 0 clamp(1.4rem, 3.5vh, 2.2rem); }
.phero--form .phero__h1 { font-size: clamp(2.1rem, 6.2vw, 4.4rem); margin-top: 0.7rem; }
.phero--form .phero__lede { margin-top: 1rem; max-width: 60ch; }
.dg-sec { padding-top: clamp(1.4rem, 3.5vh, 2.4rem); }

/* En celular, el botón flotante de WhatsApp y el asistente de la esquina tapan opciones mientras se desliza la lista (y un toque ahí abriría otra cosa).
   Durante el formulario se ocultan; si algo falla, el mensaje de error ya ofrece WhatsApp. */
@media (max-width: 640px) { .wa-fab, .chat-widget { display: none; } }

/* — Tarjeta del formulario — */
.dg {
  max-width: 760px; margin-inline: auto; scroll-margin-top: 5rem;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.25rem, 3.4vw, 2.5rem);
}
.dg__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.8rem; }
.dg__cuenta { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dg__bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-bottom: clamp(1.4rem, 3.4vw, 2.2rem); }
.dg__bar-fill { height: 100%; width: 0; background: var(--lima); border-radius: 2px; transition: width 0.35s var(--ease); }

/* — Una pregunta por pantalla — */
.dg__step { border: 0; padding: 0; margin: 0; min-width: 0; }
.dg [hidden] { display: none !important; } /* los bloques que alternan (pantallas, errores, éxito) usan el atributo hidden aunque su clase defina display */
.dg__q {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.45rem, 4.2vw, 2.15rem);
  line-height: 1.1; letter-spacing: -0.02em; color: var(--bone); outline: none;
}
.dg__help { color: var(--bone-dim); font-size: 1.02rem; margin-top: 0.6rem; max-width: 58ch; }
.dg__help + .dg__help { margin-top: 0.8rem; }
.dg__help a, .dg__aviso a, .dg-faq a { color: var(--lima); text-decoration: underline; text-underline-offset: 3px; }

/* — Opciones: tarjetas que se tocan — */
.dg__opts { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin-top: 1.2rem; }
@media (min-width: 480px) { .dg__opts--2 { grid-template-columns: 1fr 1fr; } }
.dg__opt { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dg .btn { -webkit-tap-highlight-color: transparent; }
.dg__opt:active .dg__opt-t { border-color: var(--lima); }
/* El input real cubre toda la tarjeta (invisible): se puede tocar en cualquier parte y sigue siendo accesible con teclado */
.dg__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dg__opt-t {
  display: flex; align-items: center; gap: 0.8rem; min-height: 3.3rem; padding: 0.75rem 1rem;
  background: var(--ink); border: 1.5px solid var(--line-strong); border-radius: 12px;
  color: var(--bone); font-weight: 600; font-size: 1rem; line-height: 1.3;
  transition: border-color 0.15s, background 0.15s;
}
.dg__opt-t::before {
  content: ""; flex: none; width: 1.3rem; height: 1.3rem; border: 2px solid var(--line-strong); border-radius: 50%;
  background: transparent center / 80% no-repeat; transition: border-color 0.15s, background-color 0.15s;
}
.dg__opt--multi .dg__opt-t::before { border-radius: 6px; }
.dg__opt:hover .dg__opt-t { border-color: var(--bone-dim); }
.dg__opt input:checked + .dg__opt-t { border-color: var(--lima); background: rgba(215, 255, 62, 0.08); }
.dg__opt input:checked + .dg__opt-t::before {
  border-color: var(--lima); background-color: var(--lima);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.4l3 3 6-6.8' fill='none' stroke='%230e0e10' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.dg__opt input:focus-visible + .dg__opt-t { outline: 3px solid var(--lima); outline-offset: 3px; }
.dg__opt input:disabled { cursor: not-allowed; }
.dg__opt input:disabled + .dg__opt-t { opacity: 0.45; }
.dg__tope { min-height: 1.4rem; margin-top: 0.7rem; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }

/* — Campos de texto — */
.dg__campo { margin-top: 1.1rem; }
.dg__otro { margin-top: 1rem; }
.dg__label { display: block; font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.5rem; }
.dg__opcional { text-transform: none; letter-spacing: 0; opacity: 0.8; }
.dg input[type="text"], .dg input[type="tel"], .dg input[type="email"], .dg select, .dg textarea {
  width: 100%; background: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 0.85rem 1rem; color: var(--bone); font: inherit; font-size: 16px; transition: border-color 0.2s;
}
.dg input[type="text"]:focus, .dg input[type="tel"]:focus, .dg input[type="email"]:focus, .dg select:focus, .dg textarea:focus { outline: none; border-color: var(--lima); }
.dg input::placeholder, .dg textarea::placeholder { color: rgba(243, 239, 233, 0.58); opacity: 1; }
.dg textarea { resize: vertical; min-height: 7rem; margin-top: 1.1rem; line-height: 1.5; }
.dg__tel { display: flex; gap: 8px; }
.dg__tel select { flex: none; width: auto; max-width: 48%; }
.dg__tel input { flex: 1; min-width: 0; }
.dg__contador { margin-top: 0.4rem; text-align: right; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.dg__aviso { margin-top: 1rem; color: var(--bone-dim); font-size: 0.92rem; line-height: 1.5; max-width: 62ch; }

/* — Errores — */
.dg__err, .dg__fallo { margin-top: 1rem; color: #ff9d8e; font-size: 0.98rem; font-weight: 600; line-height: 1.4; }
.dg__err::before, .dg__fallo::before { content: "⚠ "; }
.dg input[aria-invalid="true"], .dg select[aria-invalid="true"] { border-color: #ff9d8e; }

/* — Botones — */
.dg__nav { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.dg__nav .btn { justify-content: center; }
.dg__seguir { flex: 1 1 auto; }
.dg__seguir[disabled] { opacity: 0.6; cursor: wait; transform: none; }
.dg__nav--exito { margin-top: 1.4rem; }
.dg__nav--exito .btn { flex: 1 1 14rem; }

/* — Honeypot (invisible para personas) — */
.dg__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* — Sin JavaScript — */
.dg__sin-js .dg__help { margin-top: 0.8rem; }

/* — Qué pasa después — */
.dg-sig { list-style: none; margin-top: 1.6rem; display: flex; flex-direction: column; gap: 1.3rem; }
.dg-sig li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; color: var(--bone-dim); font-size: 1.04rem; line-height: 1.55; }
.dg-sig li strong { color: var(--bone); }
.dg-sig__n { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--lima); color: var(--lima-ink); font-family: var(--mono); font-weight: 700; font-size: 1rem; }

/* — Preguntas frecuentes — */
.dg-faq { margin-top: 1.4rem; border-top: 1px solid var(--line); }
.dg-faq details { border-bottom: 1px solid var(--line); }
.dg-faq summary {
  position: relative; list-style: none; cursor: pointer; padding: 1.1rem 2.2rem 1.1rem 0;
  font-family: var(--display); font-weight: 700; font-size: 1.12rem; line-height: 1.25;
}
.dg-faq summary::-webkit-details-marker { display: none; }
.dg-faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%); color: var(--lima); font-size: 1.6rem; font-weight: 400; }
.dg-faq details[open] summary::after { content: "–"; }
.dg-faq p { color: var(--bone-dim); padding-bottom: 1.2rem; max-width: 60ch; line-height: 1.6; }

/* — Video — */
.dg-video { width: 100%; max-width: 960px; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: var(--radius); }

@media (prefers-reduced-motion: reduce) {
  .dg__bar-fill, .dg__opt-t, .dg__opt-t::before { transition: none; }
}
