/* ═══════════════════════════════════════════════════════════════════
   MY RESEARCH · BASE Y COMPONENTES DE LAS PÁGINAS DEL PORTAL
   ───────────────────────────────────────────────────────────────────
   Lo cargan /acceso, /home, /configuracion y la página 404, después de
   /comun/marca.css (de donde salen todos los colores). Los estudios NO
   lo cargan: estas reglas tocan etiquetas (body, h1, a…) y pisarían su
   diseño propio.
   ═══════════════════════════════════════════════════════════════════ */

/* ── [4] BASE ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 1.6vw + 1.3rem, 2.5rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; }
h2 { font-size: clamp(1.25rem, .8vw + 1rem, 1.625rem); line-height: 1.2; letter-spacing: -0.015em; font-weight: 600; }
h3 { font-size: 1.0625rem; line-height: 1.3; font-weight: 600; }
a { color: var(--azul); text-underline-offset: 3px; }
a:hover { color: var(--azul-hover); }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; border-radius: var(--radio); }
img { max-width: 100%; }
.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 var(--aire); }

/* Antetítulo: una línea corta en cerceta y el texto en azul. */
.antetitulo {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--azul);
}
.antetitulo::before { content: ""; width: 20px; height: 3px; border-radius: 2px; background: var(--cerceta); }

/* ── [6] BOTONES ──────────────────────────────────────────────────── */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 1px solid var(--azul); border-radius: var(--radio);
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; color: var(--blanco); background: var(--azul);
  cursor: pointer; text-decoration: none; transition: background-color var(--transicion), border-color var(--transicion);
}
.boton:hover { background: var(--azul-hover); border-color: var(--azul-hover); color: var(--blanco); }
.boton:disabled { cursor: progress; }
.boton svg { width: 18px; height: 18px; flex: none; }
/* Secundario: el borde delimita un control sobre fondo claro (borde funcional). */
.boton--secundario { background: var(--blanco); color: var(--azul); border-color: var(--azul); }
.boton--secundario:hover { background: var(--fondo); color: var(--azul-hover); border-color: var(--azul-hover); }
.boton--chico { min-height: 40px; padding: 0 16px; font-size: .875rem; }
.boton--peligro { background: var(--blanco); color: var(--error); border-color: var(--error); }
.boton--peligro:hover { background: var(--error-fondo); color: var(--error); border-color: var(--error); }
.girador { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--blanco); border-right-color: var(--azul); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ── [7] CAMPOS ───────────────────────────────────────────────────── */
.campo { display: grid; gap: 6px; }
.campo label, .campo__etiqueta { font-weight: 600; font-size: .875rem; }
.campo__ayuda { font-size: .8125rem; color: var(--texto-suave); }
.campo input, .campo textarea, .campo select {
  width: 100%; min-height: 48px; padding: 12px 16px; font: inherit; color: inherit;
  border: 1px solid var(--linea-control); border-radius: var(--radio); background: var(--blanco);
  transition: border-color var(--transicion);
}
.campo textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: 3px solid var(--azul-claro); outline-offset: 0; border-color: var(--azul); }
.campo[data-estado="error"] input, .campo[data-estado="error"] textarea { border-color: var(--error); }
.campo__error { display: none; align-items: flex-start; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--error); }
.campo__error svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.campo[data-estado="error"] .campo__error { display: flex; }

.opcion { display: flex; align-items: flex-start; gap: 10px; min-height: 32px; font-size: .9375rem; cursor: pointer; }
.opcion input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--azul); flex: none; }

/* ── [8] AVISOS ───────────────────────────────────────────────────── */
.aviso { padding: 12px 16px; border-radius: var(--radio); font-size: .875rem; font-weight: 600; background: var(--info-fondo); color: var(--info); }
.aviso--error { background: var(--error-fondo); color: var(--error); }
.aviso--exito { background: var(--exito-fondo); color: var(--exito); }

/* ── [9] PIE ──────────────────────────────────────────────────────── */
.mr-pie { margin-top: 72px; padding: 28px 0 40px; background: var(--blanco); }
.mr-pie__interior { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8125rem; color: var(--texto-suave); }

/* ── [10] MOVIMIENTO ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ── [11] PÁGINA NO ENCONTRADA ────────────────────────────────────── */
.no-encontrada { display: grid; gap: 16px; padding-top: 96px; padding-bottom: 96px; max-width: 720px; }
.no-encontrada .boton { margin-top: 8px; }
