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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    background-image: radial-gradient(rgb(var(--fg) / 7%) 0.1rem, transparent 0.1rem);
    background-size: 2.6rem 2.6rem;
    transition: background-color 0.3s, color 0.3s;
}

img,
video,
iframe {
    max-width: 100%;
}

img {
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    padding: 0;
    margin: 0;
    list-style: none;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd {
    margin: 0;
}

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

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 0.3rem solid var(--lime);
    outline-offset: 0.3rem;
    border-radius: 0.8rem;
}

:root[data-theme="light"] :focus-visible {
    outline-color: var(--violet);
}

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

.skip-link {
    position: fixed;
    top: -6rem;
    left: 1.6rem;
    z-index: 200;
    padding: 1rem 1.8rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--lime);
    border-radius: 0 0 1rem 1rem;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

.u-hand {
    font-family: var(--font-hand);
}

.u-muted {
    color: var(--muted);
}

main {
    overflow-x: clip;
}

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

    html {
        scroll-behavior: auto;
    }
}
