/* ============================================================================
   base.css — reset enxuto, tipografia e regras globais de foco.
   Corpo em 13px (o tamanho do VS Code); H1 interno 14px; rótulo de grupo 11px.
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* Scrollbars e controles nativos escuros (tema único) */
html { color-scheme: dark; }

body {
    margin: 0;
    background: var(--fundo);
    color: var(--texto);
    font-family: var(--fonte-corpo);
    font-size: 13px;
    line-height: 20px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

h1 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--texto-forte); }
h2 { font-size: 13px; line-height: 20px; font-weight: 600; color: var(--texto-forte); }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }

img { max-width: 100%; }

/* Garante [hidden] também em SVG inline (o UA stylesheet nem sempre cobre) */
[hidden] { display: none !important; }

/* Números sempre tabulares (valores, datas, códigos, contadores) */
.tabular, table, time { font-variant-numeric: tabular-nums; }

/* Código, ids, comandos: a fonte mono do editor */
code, kbd, pre, .chave { font-family: var(--fonte-mono); font-size: 12px; }

/* Barras de rolagem no tom do VS Code */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgb(110 110 110 / 50%); border: 2px solid transparent; background-clip: content-box; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background-color: rgb(140 140 140 / 60%); }
::-webkit-scrollbar-track { background: transparent; }

/* Foco visível — controles clicáveis: borda + anel azul do focusBorder */
button:focus-visible,
[role="button"]:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
    outline: none;
    border-color: var(--anel);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--anel) 50%, transparent);
}

/* Foco de digitação — campos: borda de 1px no focusBorder, como o editor */
input:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--anel);
    box-shadow: 0 0 0 1px var(--anel);
}

/* Desabilitado */
:disabled { opacity: .5; pointer-events: none; }
input:disabled, textarea:disabled, select:disabled { cursor: not-allowed; pointer-events: auto; }

/* Subtítulo de página: explica a tela em uma frase, abaixo do H1 */
.subtitulo-pagina { font-size: 12px; color: var(--neutra-texto); margin-top: 2px; }

/* Rótulo de grupo em caixa alta (estilo "EXPLORER" do VS Code) */
.rotulo-grupo {
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--neutra-texto);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
