/* =============================================================================
   Farol — base (camada 2 de 5): reset, tipografia, foco, rolagem, movimento.
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--fonte);
  font-size: var(--t-14);
  line-height: var(--altura-linha);
  color: var(--texto-1);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, dl, dd, ul, ol, pre, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1 { font-size: var(--t-22); font-weight: var(--peso-forte); letter-spacing: -0.01em; line-height: 1.25; }
h2 { font-size: var(--t-16); font-weight: var(--peso-forte); letter-spacing: -0.005em; line-height: 1.3; }
h3 { font-size: var(--t-14); font-weight: var(--peso-forte); line-height: 1.35; }
small { font-size: var(--t-12); }
strong, b { font-weight: var(--peso-forte); }
code, kbd, pre, samp { font-family: var(--fonte-mono); font-size: 0.92em; }
img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--borda); margin: var(--e-4) 0; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: var(--peso-medio); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }

::selection { background: var(--marca-lavagem-forte); color: var(--texto-1); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--borda-foco);
  outline-offset: 2px;
  border-radius: var(--raio-1);
}

/* Rolagem discreta */
* { scrollbar-width: thin; scrollbar-color: var(--borda-forte) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--borda-forte); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Números tabulares em colunas e métricas */
.num, td.num, th.num, .tabular { font-variant-numeric: tabular-nums; }

/* Leitor de tela */
.sr, .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;
}

.pular {
  position: fixed; left: var(--e-3); top: -60px; z-index: 1000;
  padding: var(--e-2) var(--e-3); background: var(--marca); color: var(--marca-tinta);
  border-radius: var(--raio-2); font-weight: var(--peso-forte);
  transition: top var(--dur-2) var(--curva);
}
.pular:focus { top: var(--e-3); }

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

@media (forced-colors: active) {
  .btn, .input, .cartao, .chip { border: 1px solid CanvasText; }
}
