/* ─── Base: reset enxuto, tipografia, utilitários ─────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face-corpo);
  font-size: var(--t-16);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-inline-size: 0; }

img { max-width: 100%; height: auto; display: block; }

/* Componentes com `display` próprio venceriam o `[hidden]` da folha do
   navegador. Sem isto, botão escondido pelo JS continua aparecendo. */
[hidden] { display: none !important; }

a {
  color: var(--makro-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--ink); }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  touch-action: manipulation;
  cursor: pointer;
}

/* Foco - nunca removido, sempre visível nos dois fundos */
:focus-visible {
  outline: 3px solid var(--makro);
  outline-offset: 2px;
  border-radius: var(--raio-pequeno);
}

/* Numerais fiscais: tabulares, para o texto não pular enquanto digita */
.entrada--num,
.regua__num {
  font-family: var(--face-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.visualmente-oculto {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pular {
  position: absolute;
  left: var(--e-4);
  top: -100%;
  z-index: var(--z-pular);
  padding: var(--e-3) var(--e-4);
  background: var(--ink);
  color: var(--paper);
  /* o painel escuro fica atrás deste link: o fio branco separa os dois */
  box-shadow: 0 0 0 2px var(--paper);
  border-radius: 0 0 var(--raio) var(--raio);
  text-decoration: none;
  font-weight: 500;
}
.pular:focus { top: 0; color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
