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

html {
	scroll-behavior: smooth;
	background: var(--ew-color-bg);
}

html:focus-within {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--ew-color-bg);
	color: var(--ew-color-text-primary);
	font-family: var(--ew-font-body);
	font-size: var(--ew-text-body);
	font-weight: var(--ew-weight-regular);
	line-height: var(--ew-leading-body);
	text-rendering: optimizeLegibility;
}

body.ew-lock {
	overflow: hidden;
}

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

img {
	height: auto;
}

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

button {
	cursor: pointer;
}

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

/* Heading defaults. theme.json declares the same for the editor; on views
   without blocks the global stylesheet is not loaded (inc/enqueue.php),
   so the front end sets them here. */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--ew-font-heading);
	font-weight: var(--ew-weight-heading);
	letter-spacing: var(--ew-tracking-tight);
	line-height: var(--ew-leading-heading);
}

ul,
ol {
	margin: 0;
	padding: 0;
}

a {
	color: inherit;
}

:focus {
	outline: none;
}

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

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

[hidden] {
	display: none !important;
}

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