/* =========================================================================
   BASE: reset, tipografia, foco, acessibilidade. Cores so por token.
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--fonte);
  font-size: var(--fs-15);
  line-height: 1.45;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1 { font-size: var(--fs-24); font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
h2 { font-size: var(--fs-20); font-weight: 800; line-height: 1.25; }
h3 { font-size: var(--fs-17); font-weight: 800; }
h4 { font-size: var(--fs-15); font-weight: 800; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--link); font-weight: 700; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* numeros alinhados em listas de dinheiro */
.num { font-variant-numeric: tabular-nums; }

/* `hidden` sempre esconde, mesmo com classe que define display (ex.: .bt): bug real do Excluir no plano 3 */
[hidden]:not(#_) { display: none; }   /* :not(#id) da peso de id: vence qualquer classe, sem !important */

/* icones do sprite */
.ic { width: 20px; height: 20px; flex: none; }
.ic--p { width: 16px; height: 16px; }
.ic--g { width: 24px; height: 24px; }

/* foco visivel so pelo teclado */
:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 2px;
  border-radius: var(--r-10);
}
:focus:not(:focus-visible) { outline: none; }

/* so pra leitor de tela */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* pular direto pro conteudo (teclado) */
.pular {
  position: absolute;
  left: var(--e-2);
  top: -60px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: var(--toque);
  padding: 0 var(--e-4);
  background: var(--superficie);
  color: var(--texto);
  border-radius: var(--r-10);
}
.pular:focus { top: var(--e-2); }

/* Movimento reduzido: TODA transicao do app usa var(--transicao) (teste garante),
   entao zerar a variavel desliga todas, sem precisar de !important. */
@media (prefers-reduced-motion: reduce) {
  :root { --transicao: 0s linear; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    scroll-behavior: auto;
  }
}
