/* ==========================================================================
   base.css – nullstilling, typografi, fokus og hjelpeklasser.
   ========================================================================== */
@layer base {
    *, *::before, *::after { box-sizing: border-box; }

    html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
    body {
        margin: 0;
        background: var(--bg-page);
        color: var(--text-main);
        font-family: system-ui, sans-serif;
        line-height: 1.5;
        -webkit-font-smoothing: antialiased;
    }
    h1, h2, h3, p { margin: 0; }
    button, input, select { font: inherit; color: inherit; }

    /* Fokus: bare for tastatur. Hvit ring med svart kant innenfor, så den synes på alle flater. */
    :focus-visible { outline: var(--focus-ring); outline-offset: 2px; box-shadow: 0 0 0 2px #000; }
    [tabindex="-1"]:focus { outline: none; box-shadow: none; }

    .noscript-note { padding: 2rem; text-align: center; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }
    [hidden] { display: none !important; }
    .text-muted { color: var(--text-muted); }

    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    }
}
