/* Base (T028): reinicio mínimo y estilos de los elementos HTML. Solo usa variables de tokens.css. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable; /* reserva el hueco de la barra: la página no salta de lado (P11) */
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: var(--texto-m);
  line-height: var(--interlineado);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; /* sin el recuadro azul al tocar en el móvil (F25) */
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--fuente-titulos);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

h1 { font-size: var(--texto-xl); }
h2 { font-size: var(--texto-l); }
h3 { font-size: var(--texto-m); }

p {
  margin: 0;
}

a {
  color: var(--acento);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

code,
kbd,
samp {
  font-family: var(--fuente-datos);
  font-size: 0.92em;
}

:focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 2px;
}

::selection {
  background: var(--acento);
  color: var(--sobre-acento);
}

[hidden] {
  display: none !important;
}

/* Solo para lectores de pantalla */
.oculto {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Etiqueta pequeña en monoespaciada (el toque «Consola») */
.etiqueta {
  font-family: var(--fuente-datos);
  font-size: var(--texto-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--espaciado-etiquetas);
  color: var(--texto-suave);
}

.dato {
  font-family: var(--fuente-datos);
  font-size: var(--texto-s);
}

.suave {
  color: var(--texto-suave);
}

@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;
  }
}
