/* Base — reset, tipografía, foco y utilidades · POS-SAAS-0A.2 */

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

/* [hidden] siempre oculta, aunque un componente declare display (grid/flex). */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--c-ink); }
h1 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: var(--fs-xl); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 600; }
h4 { font-size: var(--fs-md); font-weight: 600; }

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; }

a { color: var(--c-interact-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* Foco visible y consistente. Solo con teclado (focus-visible). */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-sm);
}
main:focus-visible { box-shadow: none; }

/* Iconos del sprite: los atributos de trazo viven aquí, no en cada <use>. */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Números tabulares: precios, importes, KPIs, cronómetros, totales. */
.num { font-variant-numeric: tabular-nums; }

.text-muted { color: var(--c-ink-2); }
.text-small { font-size: var(--fs-sm); color: var(--c-ink-2); }

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -80px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--c-ink);
  color: var(--c-on-fill);
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible { top: var(--s-3); }

.noscript { padding: var(--s-8); }

.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.row--end { align-items: flex-end; }
.stack { display: grid; gap: var(--s-5); }
.grid-2 { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
