/* ==========================================================================
   ICFESSK — Base Styles (Reset + Typography + Global)
   ========================================================================== */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Íconos mientras carga su fuente (clase .icons-pending: la pone y la quita
   index.html). Sin fuente, cada ícono se pinta como su nombre en texto
   ("local_fire_department" ≈ 250px) y al llegar la fuente se encoge a 1em:
   todo lo de alrededor salta (Lighthouse: CLS). Aquí ocupa ya su tamaño
   final y el texto no se ve.
   - :where() → especificidad 0: cualquier regla con tamaño propio gana.
   - content-box → 1em de glifo + su padding, igual que con la fuente.
   - El color sí lleva !important: debe ganar a los colores de cada ícono,
     incluso a los inline, solo durante la espera. */
:where(.icons-pending .material-symbols-outlined) {
  display: inline-block;
  box-sizing: content-box;
  width: 1em;
  overflow: clip;
}
.icons-pending .material-symbols-outlined { color: transparent !important; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-family);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  min-height: 100vh;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--violet); text-decoration: none; transition: opacity var(--duration) var(--ease); }
a:hover { opacity: 0.8; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: var(--fw-bold); color: var(--text-primary); }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p { color: var(--text-secondary); }
code {
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-size: 0.9em;
}

/* Hidden utility */
[hidden] { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-secondary); border-radius: var(--r-full); }


/* Standalone outlet for non-shell views (quiz, simulacro, etc.) */
#standalone-outlet { min-height: 100vh; }


/* ══════════════════════════════════════════════════════════════════════
   Global Mobile Safety (Round 12, from responsive.css)
   Applies to all viewports.
   ══════════════════════════════════════════════════════════════════════ */
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* Mobile-only: tap highlights + touch optimizations */
@media (max-width: 768px) {
  a, button, input, select, textarea, [role="button"], [tabindex] {
    -webkit-tap-highlight-color: transparent;
  }

  html {
    overscroll-behavior-x: none;
    overscroll-behavior-y: auto;
  }

  .btn-primary, .btn-secondary, .btn-outline, button {
    touch-action: manipulation;
  }

  html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--m-pad);
  }

  body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
}

/* Reduced motion preference (accessibility) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
