/* Reset, tipografia e utilitários globais. Usa apenas tokens de tokens.css. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg-canvas);
  color: var(--ink-primary);
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--ink-primary);
}
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
@media (min-width: 48em) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}

p { max-width: var(--container-reading); line-height: var(--leading-reading); }
img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { padding-left: var(--space-5); }
a { color: var(--accent-sage); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-sage-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::placeholder { color: var(--ink-muted); opacity: 1; }

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

/* Texto ampliado: palavras longas quebram em vez de estourar a coluna */
h1, h2, h3, h4, p, li, dt, dd, label { overflow-wrap: anywhere; }

main:focus { outline: none; } /* alvo do link "pular para o conteúdo" */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

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

.skip-link {
  position: absolute; left: var(--space-3); top: -100%;
  z-index: 1000; padding: var(--space-2) var(--space-4);
  background: var(--sage-fill-dark); color: #fff;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-3); color: #fff; }

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