/* base.css — reset, tipografia, superfícies do navegador e utilitários. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--fundo);
  color: var(--tinta);
  font-family: var(--fonte);
  font-size: var(--t-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, p, ul, ol, figure, dl, dd {
  margin: 0;
}

h1, h2, h3 {
  line-height: 1.25;
  text-wrap: balance;
}

ul, ol {
  padding: 0;
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

a {
  color: var(--marca-tinta);
  text-underline-offset: 0.2em;
}

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

/* Superfícies que o navegador desenharia com o padrão dele */
::selection {
  background: var(--marca-suave);
  color: var(--tinta);
}

input, textarea {
  caret-color: var(--marca);
}

:root {
  accent-color: var(--marca);
  scrollbar-color: var(--borda-forte) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--borda-forte);
  border-radius: 999px;
  border: 2px solid var(--fundo);
}

::-webkit-scrollbar-track {
  background: transparent;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--foco);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Números em colunas alinham; números grandes isolados ficam proporcionais. */
.num,
td.valor,
th.valor {
  font-variant-numeric: tabular-nums;
}

.oculto-visual {
  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-conteudo {
  position: absolute;
  left: var(--e-4);
  top: -100px;
  z-index: 1000;
  padding: var(--e-2) var(--e-4);
  background: var(--marca);
  color: #fff;
  border-radius: var(--raio-sm);
  font-weight: 600;
  text-decoration: none;
}

.pular-conteudo:focus {
  top: var(--e-3);
}

[hidden] {
  display: none !important;
}

/* Movimento reduzido: as regras específicas ficam junto de cada componente
   (components.css). O estado final aparece na hora; nada é escondido. */

/* Aviso para quem está com o JavaScript desligado (sem estilo embutido: a CSP da versão publicada não permite). */
.sem-js {
  padding: 24px;
}
