/* HTML Cleaner — base: reset, tipografía, iconos, foco y utilidades.
   Solo lee tokens de tokens.css. */

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: var(--font-line-height-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h2 { font-size: var(--font-size-h2); line-height: var(--font-line-height-h2); font-weight: var(--font-weight-h2); letter-spacing: -0.01em; text-wrap: balance; }
h3 { font-size: var(--font-size-h3); line-height: var(--font-line-height-h3); font-weight: var(--font-weight-h3); }

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

code, kbd, pre, textarea.code {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
  font-feature-settings: "calt" 0, "liga" 0;
}

code {
  font-size: 0.9em;
  background: var(--color-surface-sunken);
  border-radius: var(--radius-xs);
  padding: 0 var(--space-1);
}

kbd {
  font-size: var(--font-size-caption);
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-1);
  color: var(--color-text-muted);
}

a { color: var(--color-primary); text-underline-offset: 0.15em; }
a:hover { color: var(--color-primary-hover); }

:focus-visible {
  outline: var(--border-width-2) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

/* Iconos: sprite en línea. Grosor según tamaño (manual §5). */
.i {
  flex: none;
  width: var(--size-icon-md);
  height: var(--size-icon-md);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i--16 { width: var(--size-icon-sm); height: var(--size-icon-sm); stroke-width: 1.5; }
.i--24 { width: var(--size-icon-lg); height: var(--size-icon-lg); stroke-width: 2; }

.logo { height: 26px; width: auto; display: block; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.muted { color: var(--color-text-muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.spin { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

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