*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--cor-fundo);
  background-image:
    linear-gradient(var(--cor-grade) 1px, transparent 1px),
    linear-gradient(90deg, var(--cor-grade) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--cor-texto);
  font-family: var(--fonte-texto);
  font-size: var(--texto-base);
  line-height: var(--altura-linha);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  line-height: var(--altura-linha-titulo);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 var(--esp-3);
}
h1 { font-size: var(--texto-h1); }
h2 { font-size: var(--texto-h2); }
h3 { font-size: var(--texto-lg); }

p { margin: 0 0 var(--esp-3); }
ul, ol { margin: 0 0 var(--esp-3); padding-left: var(--esp-4); }
li + li { margin-top: var(--esp-2); }

a { color: var(--cor-destaque); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--fonte-mono); font-size: 0.9em; background: var(--cor-superficie-alta); padding: 0.1em 0.35em; border-radius: var(--raio-pequeno); overflow-wrap: anywhere; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--cor-foco); outline-offset: 3px; border-radius: var(--raio-pequeno); }
[tabindex="-1"]:focus-visible { outline: none; }

table { border-collapse: collapse; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
