/* Accessibility and resilience helpers. */

.screen-reader-text:focus,
.skip-link:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	overflow: visible;
	clip: auto;
	clip-path: none;
	border-radius: 0.375rem;
	background: var(--wp--preset--color--base, #ffffff);
	color: var(--wp--preset--color--contrast, #111827);
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	box-shadow: 0 0 0 3px var(--wp--preset--color--accent, #38bdf8);
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent, #38bdf8);
	outline-offset: 3px;
}

:where(button, input, textarea, select) {
	font: inherit;
}

:where(img, svg, video, canvas, iframe) {
	max-width: 100%;
}

:where(iframe, video, embed, object) {
	display: block;
}

:where(table, pre) {
	max-width: 100%;
	overflow-x: auto;
}

:where(code, pre, kbd, samp) {
	overflow-wrap: break-word;
}

[id] {
	scroll-margin-top: 6rem;
}

.site-main {
	overflow-wrap: anywhere;
}

.site-main:focus {
	outline: none;
}

.no-js .menu-toggle,
.no-js .menu-close,
.no-js .site-header__overlay {
	display: none;
}

.no-js .site-header__nav-panel {
	position: static;
	visibility: visible;
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-delay: 0ms !important;
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-delay: 0ms !important;
		transition-duration: 1ms !important;
	}
}
