/* ============================================================================
   base.css — reset enxuto, densidade, tipografia e foco.
   DENSIDADE: html em 85% (a mesma do MaestroV4, site.css): 1rem = 13,6px.
   Texto, espaçamento e alturas sempre em rem; px só em borda, raio e breakpoint.
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 85%; }

body {
    margin: 0;
    min-height: 100svh;
    background: var(--fundo);
    color: var(--texto);
    font-family: var(--fonte-corpo);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

h1 { font-size: 1.15rem; line-height: 1.4; font-weight: 600; }

a { color: var(--link); text-underline-offset: 0.3rem; }

img, svg { max-width: 100%; }

/* Garante [hidden] também em SVG inline */
[hidden] { display: none !important; }

.tabular, time { font-variant-numeric: tabular-nums; }
code { font-family: var(--fonte-mono); font-size: 0.9rem; overflow-wrap: anywhere; }

/* Texto só para leitor de tela */
.visualmente-oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Primeiro foco da página: só aparece quando recebe o foco */
.pular-conteudo {
    position: absolute;
    top: -10rem;
    left: 0.75rem;
    z-index: 10;
    padding: 0.5rem 0.9rem;
    border-radius: var(--raio-md);
    background: var(--cartao);
    color: var(--texto);
    border: 1px solid var(--borda);
}

.pular-conteudo:focus { top: 0.75rem; }

/* Foco sempre visível: anel de 3px em clicáveis, borda + anel de 1px em campos */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--anel);
}

input:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--anel);
    box-shadow: 0 0 0 1px var(--anel);
}

main:focus { outline: none; }

:disabled { opacity: .5; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
