/* Reset */

/* ---------- base ---------- */
*, *::before, *::after { 
    box-sizing: border-box; 
}
html { 
    -webkit-text-size-adjust: 100%; 
    scroll-behavior: smooth; 
}

/* Body reserves space at the bottom so content is never hidden behind the fixed nav bar. */
body {
    margin: 0; 
    min-height: 100dvh; 
    background: var(--bg); 
    color: var(--text);
    font-family: var(--font-body); 
    font-size: 16px; 
    line-height: 1.45;
    padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px);
    transition: background-color .25s, color .25s;
}

body.locked { 
    overflow: hidden; 
}
img { 
    max-width: 100%; 
    display: block; 
}
button, input, select { 
    font: inherit; 
    color: inherit; 
}
button { 
    cursor: pointer; 
}
h1, h2, h3, p { 
    margin: 0; 
}
a { 
    color: var(--accent); 
}

/* ----- utility classes ----- */
/* decorative icon never shrinks inside flex rows */
.ico { 
    flex: none; 
}
/* screen-reader-only text */
.sr { 
    position: absolute; 
    width: 1px; 
    height: 1px; 
    overflow: hidden; 
    clip: rect(0 0 0 0); 
    white-space: nowrap; 
}
.muted { 
    color: var(--muted); 
}
.small { 
    font-size: .82rem; 
}
.center { 
    text-align: center; 
}
.clip { 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}

/* keyboard focus ring + "skip to content" link */
:focus-visible { 
    outline: 3px solid var(--accent); 
    outline-offset: 2px; 
    border-radius: 8px; 
}
.skip { 
    position: absolute; 
    left: 12px; 
    top: -60px; 
    background: var(--accent); 
    color: var(--accent-contrast);
    padding: 8px 14px; 
    border-radius: 10px; 
    z-index: 200; 
}
.skip:focus { 
    top: 10px; 
}

/* anything with the [hidden] attribute stays hidden, even if a class sets display */
[hidden] { 
    display: none !important; 
}

/* accessibility: respect "reduce motion" OS setting */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { 
        animation-duration: .001ms !important; 
        transition-duration: .001ms !important; 
        scroll-behavior: auto !important; 
    }
}
