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

html {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--paper);
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + var(--space-sm));
}

/* Pages carrying the sticky emergency banner need anchors to clear it too,
   otherwise every in-page jump lands behind the banner. Scoped, because the
   banner is homepage-only. */
html:has(.emergency-banner) {
    scroll-padding-top: calc(var(--header-offset) + var(--emergency-height) + var(--space-sm));
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    height: auto;
}

a {
    color: var(--green-deep);
    text-decoration: none;
}

a:hover {
    color: var(--green-pale);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: var(--tracking-section);
    text-wrap: balance;
}

h1 { font-size: var(--font-size-display); font-weight: 800; letter-spacing: var(--tracking-display); line-height: 1.02; }
h2 { font-size: var(--font-size-section); }
h3 { font-size: var(--font-size-xl); font-weight: 600; letter-spacing: -0.01em; }

p {
    text-wrap: pretty;
}

ul, ol {
    list-style: none;
}

::selection {
    background-color: rgba(93, 147, 49, 0.25);
    color: var(--text);
}

