/* Base — reset, tipografia, acessibilidade */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }
h4 { font-size: var(--text-base); }
p { margin: 0; text-wrap: pretty; }
a { color: var(--primary-700); text-decoration: none; }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }
[data-theme="dark"] a { color: var(--primary-400); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); border-radius: var(--radius-sm); }
::selection { background: var(--primary-200); color: var(--primary-900); }

.skip-link {
  position: absolute; left: var(--space-4); top: -48px;
  background: var(--surface-inverse); color: var(--text-inverse);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  z-index: var(--z-toast); transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--space-2); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* Utilidades de texto */
.kicker {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
}
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: var(--text-sm); }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--color-success); }
.neg { color: var(--color-danger); }

/* Régua forte entre seções (DNA estrutural) */
.hr { border: 0; border-top: var(--rule); margin: 0; }
.hr-subtle { border: 0; border-top: 1px solid var(--border-subtle); margin: 0; }

/* Ícones */
.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

.grayscale img { filter: grayscale(1); }

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