/**
 * Base — reset + bare element defaults, built on tokens.css.
 */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	overflow-x: hidden;
}

body {
	margin: 0;
	/* overflow-x is intentionally left un-set here: sticky-positioned
	   descendants (.site-header) lose position: sticky in some browsers
	   once an ancestor gets an explicit overflow value. html{overflow-x:
	   hidden} above already prevents page-level horizontal scroll. */
	background: var(--color-paper);
	color: var(--color-ink);
	font-family: var(--font-body);
	font-weight: var(--fw-regular);
	font-size: var(--fs-base);
	line-height: var(--lh-normal);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--color-ink);
	color: var(--color-paper);
}

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

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

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

hr {
	border: 0;
	border-top: var(--border-width) solid var(--color-line);
	margin: var(--space-lg) 0;
}

small {
	font-size: var(--fs-xs);
}

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

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	line-height: var(--lh-tight);
	letter-spacing: var(--ls-tight);
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
h5, h6 { font-size: var(--fs-base); }

@media (min-width: 1024px) {
	h1 { font-size: var(--fs-3xl); }
	h2 { font-size: var(--fs-2xl); }
}

p {
	margin: 0 0 var(--space-sm);
}

button {
	font-family: inherit;
	cursor: pointer;
}

input,
textarea,
select {
	font-family: inherit;
	font-size: var(--fs-base);
}

/* Accessibility utilities */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: fixed;
	top: -100px;
	left: var(--space-sm);
	z-index: 999;
	background: var(--color-ink);
	color: var(--color-paper);
	padding: var(--space-2xs) var(--space-sm);
	transition: top var(--duration-base) var(--ease);
}

.skip-link:focus {
	top: var(--space-sm);
	width: auto;
	height: auto;
	clip: auto;
}

:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}
