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

html {
    scroll-behavior: smooth;
    background: var(--color-background);
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    color: var(--color-foreground);
    background: var(--color-background);
    font-family: var(--font-body);
    font-size: var(--primitive-font-base);
    line-height: 1.3;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 0.12em; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.25; }

main { min-height: 60vh; }

:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
    box-shadow: none;
}

input:not([type='checkbox']):not([type='radio']):not([type='button']):not([type='submit']):not([type='reset']):not([type='image']):not([type='range']):not([type='color']):focus-visible,
select:not(:disabled):focus-visible,
textarea:not(:disabled):focus-visible {
    outline: none;
    box-shadow: none;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: var(--space-2);
    left: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    background: var(--color-inverse);
    color: var(--color-inverse-foreground);
    transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
