/* =============================================================================
   ICFES Lab · Base: reinicio, tipografía y utilidades
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fuente-texto);
  font-size: var(--texto-md);
  line-height: 1.55;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 var(--esp-3);
  font-family: var(--fuente-titulos);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--texto-3xl); }
h2 { font-size: var(--texto-2xl); }
h3 { font-size: var(--texto-xl); }
h4 { font-size: var(--texto-lg); }

p { margin: 0 0 var(--esp-3); }

a {
  color: var(--primario);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

img, svg, canvas { display: block; max-width: 100%; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--enfoque);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--lima); color: var(--indigo-900); }

hr {
  border: 0;
  border-top: 1px solid var(--borde);
  margin: var(--esp-6) 0;
}

table { border-collapse: collapse; width: 100%; }

/* Iconos (sprite de Lucide) */
.icono {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
}

.icono-sm { width: 1em; height: 1em; }
.icono-lg { width: 1.75em; height: 1.75em; }
.icono-xl { width: 2.5em; height: 2.5em; }

/* Accesibilidad */
.solo-lector {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.saltar-contenido {
  position: absolute;
  left: var(--esp-4);
  top: -60px;
  z-index: 1000;
  padding: var(--esp-2) var(--esp-4);
  background: var(--primario);
  color: #fff;
  border-radius: var(--radio);
}

.saltar-contenido:focus { top: var(--esp-4); }

/* Utilidades */
[hidden] { display: none !important; }
.oculto { display: none !important; }
.texto-2 { color: var(--texto-2); }
.texto-3 { color: var(--texto-3); }
.texto-sm { font-size: var(--texto-sm); }
.texto-xs { font-size: var(--texto-xs); }
.negrita { font-weight: 700; }
.centrado { text-align: center; }
.fila { display: flex; align-items: center; gap: var(--esp-3); }
.fila-entre { display: flex; align-items: center; justify-content: space-between; gap: var(--esp-3); }
.columna { display: flex; flex-direction: column; gap: var(--esp-3); }
.envolver { flex-wrap: wrap; }
.crecer { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--esp-4); }
.mt-6 { margin-top: var(--esp-6); }
.mb-4 { margin-bottom: var(--esp-4); }
.gap-2 { gap: var(--esp-2); }
.truncar { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
