/* ===== /diagnostico — estilos propios (MVP diagnóstico automático) =====
   Reutiliza la paleta y los componentes de styles.css. Aquí solo lo que la
   página necesita y la home no tiene: chips de selección múltiple, panel de
   espera, bloques del resultado y botones de feedback/contacto. */

/* Primer impacto: hero compacto y formulario inmediatamente debajo */
.hero { padding-bottom: 0.9rem; }
.hero h1 { margin-bottom: 0.5rem; }
.hero .hero-sub { margin-bottom: 0.35rem; }
.hero .hero-note { margin-bottom: 0; font-weight: 600; color: var(--brand-blue); }
.diag { padding-top: 1rem; }
.diag-inner { max-width: 720px; }
.diag-panel + .diag-panel { margin-top: 1.2rem; }

/* La pregunta principal destaca sobre las demás */
.diag-principal label {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}
.diag-principal textarea { min-height: 140px; font-size: 1.05rem; }

/* Selección múltiple como chips accesibles (checkbox nativo, visible para el teclado) */
.diag-impactos { border: 0; padding: 0; margin: 0 0 1.1rem; }
.diag-impactos legend {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  padding: 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; display: inline-flex; }
.chip input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.chip span {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--border-light);
  border-radius: 999px;
  background: var(--surface-light);
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  user-select: none;
}
.chip input:checked + span { background: var(--brand-blue); border-color: var(--brand-blue); color: var(--brand-white); }
.chip input:focus-visible + span { outline: none; box-shadow: 0 0 0 3px rgba(9, 96, 170, .3); border-color: var(--brand-blue); }
.chip:hover span { border-color: var(--brand-blue); }

/* Espera */
.diag-espera { display: flex; align-items: center; gap: 0.9rem; font-weight: 600; }
.diag-espera[hidden] { display: none; }
.diag-spinner {
  width: 22px; height: 22px; flex: 0 0 auto;
  border: 3px solid var(--border-light);
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: diag-girar 0.9s linear infinite;
}
@keyframes diag-girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .diag-spinner { animation: none; } }

/* Resultado */
.diag-h2 { margin-bottom: 0.4rem; }
.diag-aviso { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.2rem; }
.diag-h2:focus { outline: none; }
.diag-bloques { display: grid; gap: 1rem; }
.diag-bloque {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--surface-light);
}
.diag-bloque h3 { font-size: 0.85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-blue); margin-bottom: 0.35rem; }
.diag-bloque p { color: var(--text-dark); line-height: 1.5; white-space: pre-line; }
.diag-bloque-destacado { background: var(--brand-navy); border-color: var(--brand-navy); }
.diag-bloque-destacado h3 { color: var(--brand-cyan); }
.diag-bloque-destacado p { color: var(--brand-white); }

/* Feedback y contacto */
.diag-feedback, .diag-contacto { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--border-light); }
.diag-pregunta { font-weight: 600; margin-bottom: 0.7rem; }
.diag-botones { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.6rem; }
.diag-botones .btn { flex: 0 1 auto; }
.btn-ghost[aria-pressed="true"] { background: var(--brand-blue); border-color: var(--brand-blue); color: var(--brand-white); }
.btn-suave { color: var(--text-muted); }
#contacto-form { margin-top: 0.8rem; }
.diag-otro { margin-top: 1.6rem; text-align: center; }
.diag-legal { padding: 1.4rem 1.5rem; }
.diag-legal ul { padding-left: 1.1rem; margin-bottom: 0.8rem; }
.diag-legal li { color: var(--text-muted); margin-bottom: 0.3rem; font-size: 0.95rem; }

@media (max-width: 680px) {
  .diag-botones .btn { flex: 1 1 auto; text-align: center; }
}
