/* Element defaults: the page as the browser draws it, in the tokens. */

/* The fonts are files under assets/fonts/, served from this origin: a health site makes no call to a font service. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/inter-latin-400-normal-Nq2MFc6.woff2") format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/inter-latin-500-normal-G_crC3O.woff2") format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/inter-latin-600-normal-5rtOGK2.woff2") format('woff2');
}

@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/nunito-sans-latin-700-normal-vGKIJjn.woff2") format('woff2');
}

@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("../fonts/nunito-sans-latin-800-normal-Uvz_vjX.woff2") format('woff2');
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--color-canvas);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.375rem;
}

h3 {
    font-size: 1.125rem;
}

@media (min-width: 40.0625rem) {
    h1 {
        font-size: 2.125rem;
    }
}

p {
    margin: 0;
}

a {
    color: var(--color-primary);
}

a:hover {
    color: var(--color-primary-strong);
}

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

/* A keyboard user always sees where they are: navy 2px, 2px off the edge (white on teal grounds). */
:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* The main region takes focus from "Skip to content"; it is not a control, so it draws no ring. */
main:focus {
    outline: none;
}

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

.skip-link {
    position: absolute;
    inset-inline-start: var(--space-2);
    inset-block-start: -4rem;
    z-index: 100;
    padding: var(--space-3) var(--space-4);
    background: var(--color-primary);
    color: var(--color-on-primary);
    border-radius: var(--radius-control);
    font-weight: 600;
    /* It slides in over the teal bar, where the ring is white. */
    --focus-ring: var(--color-on-header);
}

.skip-link:hover {
    color: var(--color-on-primary);
}

.skip-link:focus {
    inset-block-start: var(--space-2);
}
