/* Reset and element defaults. Uses design tokens only. Component styles live in css/components/. */

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

html,
body {
    margin: 0;
    height: 100%;
}

body {
    background-color: var(--ink-0);
    background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
    color: var(--paper);
    font: 400 var(--t-sm) / var(--lh-sm) var(--font-ui);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure,
menu {
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--paper-hi);
    font-weight: 600;
    line-height: var(--lh-lg);
}

/* Page titles use the display face; section headings stay in the UI face (section 2.5). */
h1 {
    font-family: var(--font-display);
    font-size: var(--t-xl);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: .04em;
    text-transform: uppercase;
}

h2 {
    font-size: var(--t-lg);
}

h3,
h4,
h5,
h6 {
    font-size: var(--t-md);
}

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

button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-align: inherit;
}

a {
    color: var(--accent-ink);
    text-decoration: underline;
    text-underline-offset: .2em;
}

summary {
    cursor: pointer;
}

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

pre {
    margin: 0;
    overflow: auto;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: var(--focus-w) solid var(--accent);
    outline-offset: var(--focus-offset);
}

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

/* Hidden until focused; the first Tab stop on every page. */
.skip-link {
    position: absolute;
    top: var(--s-2);
    left: var(--s-4);
    z-index: 1000;
    padding: var(--s-2) var(--s-4);
    background-color: var(--ink-2);
    color: var(--paper-hi);
    border-radius: var(--r-1);
    box-shadow: var(--e-overlay);
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

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