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

html { min-width: 320px; scroll-behavior: smooth; }

body {
    min-height: 100vh;
    margin: 0;
    background: var(--rz-color-page);
    color: var(--rz-color-ink);
    font-family: var(--rz-font-sans);
    font-size: var(--rz-text-base);
    line-height: var(--rz-leading-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(circle at 10% 0%, rgb(64 185 121 / 0.08), transparent 30rem),
        linear-gradient(180deg, var(--rz-color-surface) 0, var(--rz-color-page) 26rem);
    content: "";
    pointer-events: none;
}

img, svg { max-width: 100%; }
img { height: auto; }

a {
    color: var(--rz-color-brand);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    font-weight: 500;
}

a:hover { color: var(--rz-color-brand-hover); }

h1, h2, h3, h4, h5, h6 {
    color: var(--rz-color-ink);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: var(--rz-leading-heading);
}

h1 { font-size: var(--rz-text-3xl); }
h2 { font-size: var(--rz-text-2xl); }
h3 { font-size: var(--rz-text-xl); }
h4 { font-size: var(--rz-text-lg); }
h5, h6 { font-size: var(--rz-text-base); }

p:last-child { margin-bottom: 0; }

code, kbd, pre, samp { font-family: var(--rz-font-mono); }
code { color: var(--rz-color-ink-soft); }

::selection {
    background: var(--rz-color-brand);
    color: var(--rz-color-white);
}

:focus-visible {
    outline: 2px solid var(--rz-color-brand);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    z-index: 1100;
    top: var(--rz-space-2);
    left: var(--rz-space-2);
    padding: var(--rz-space-3) var(--rz-space-4);
    transform: translateY(-150%);
    background: var(--rz-color-ink);
    color: var(--rz-color-white);
    border-radius: var(--rz-radius-sm);
}

.skip-link:focus { transform: translateY(0); color: var(--rz-color-white); }

.text-muted, .small { color: var(--rz-color-text-muted) !important; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
