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

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.55;
    color: var(--color-text);
    background: var(--color-bg);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 var(--space-3);
    color: var(--color-ink);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }

p { margin: 0 0 var(--space-3); }

a {
    color: var(--color-navy-700);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

ul, ol { margin: 0 0 var(--space-3); padding-left: var(--space-5); }

:focus-visible {
    outline: 3px solid var(--color-navy-600);
    outline-offset: 2px;
}

small, .text-sm { font-size: var(--text-sm); }
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.text-center { text-align: center; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Páginas de erro autônomas (403/404/500) — sem layout/sidebar */
.error-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
    background: var(--color-bg);
}

.error-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-7);
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.error-code {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-navy-600);
    margin: 0 0 var(--space-2);
}
