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

html {
    min-width: 20rem;
    scroll-behavior: smooth;
    scrollbar-color: var(--color-accent) var(--color-background);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 20rem;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-synthesis: none;
    line-height: var(--line-height-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

main {
    min-height: var(--content-min-height);
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
    margin-block-start: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text);
    font-family: var(--font-display);
    font-weight: var(--font-weight-display);
    font-variation-settings:
        "XROT" 0,
        "YROT" 0;
    letter-spacing: 0.01em;
    line-height: 1.08;
    text-wrap: balance;
}

h1 {
    font-size: var(--text-display);
    line-height: var(--line-height-tight);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5,
h6 {
    font-size: var(--text-lg);
}

p {
    margin-block-end: var(--space-4);
}

strong,
b {
    font-weight: var(--font-weight-bold);
}

a {
    color: inherit;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 0.125em;
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--color-text-soft);
}

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

img,
video,
canvas {
    height: auto;
}

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

input,
select,
textarea {
    font-size: var(--text-base);
}

button {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
}

textarea {
    resize: vertical;
}

ul,
ol {
    padding-inline-start: var(--space-6);
}

blockquote {
    margin-inline: 0;
    padding-inline-start: var(--space-5);
    border-inline-start: var(--border-accent-width) solid var(--color-accent);
    color: var(--color-text-soft);
}

hr {
    height: var(--border-width);
    margin-block: var(--space-8);
    border: 0;
    background: var(--color-border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: start;
}

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

:where(a, button, input, select, textarea, summary):focus-visible {
    outline: 0.1875rem solid var(--color-focus);
    outline-offset: 0.1875rem;
}

:target {
    scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

[hidden] {
    display: none !important;
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
