/**
 * Element defaults and shared utilities.
 */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--px-header) + 16px);
}

body {
	margin: 0;
	background: var(--px-white);
	color: var(--px-fg);
	font-family: var(--px-font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

body.px-menu-open,
body:has(.px-lightbox[open]) {
	overflow: hidden;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 .5em;
	color: var(--px-fg);
	font-family: var(--px-font-display);
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.14;
	text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); letter-spacing: -.01em; line-height: 1.28; }

p {
	margin: 0 0 1em;
}

p:last-child {
	margin-bottom: 0;
}

a {
	color: var(--px-accent);
	text-underline-offset: 3px;
}

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

img {
	display: block;
	height: auto;
}

address {
	font-style: normal;
}

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

:focus-visible {
	outline: 3px solid var(--px-orange);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

/* The skip link lands on screen when it takes focus. */
a.screen-reader-text:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 1000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 20px;
	clip-path: none;
	border-radius: var(--px-radius-sm);
	background: var(--px-char);
	color: #fff;
	font-weight: 600;
}

.px-icon {
	display: block;
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

/* Long-form copy from the editor. */
.px-prose h2 { margin-top: 1.6em; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.px-prose h3 { margin-top: 1.4em; }
.px-prose ul,
.px-prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.px-prose ul { list-style: disc; }
.px-prose ol { list-style: decimal; }
.px-prose li { margin-bottom: .4em; }
.px-prose ul > li::marker { color: var(--px-orange); font-size: 1.15em; }
.px-prose ol > li::marker { color: var(--px-ember); font-weight: 700; }
.px-prose > :first-child { margin-top: 0; }

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

	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		transition-delay: 0s !important;
	}
}
