/*
 * Global custom site CSS.
 *
 * Define client-specific design rules in theme.json first. Add CSS here only
 * when the Global Styles system cannot express the required behaviour.
 */

.skip-link {
	position: absolute;
	inset-inline-start: -9999px;
}

.skip-link:focus {
	inset-block-start: var(--wp--preset--spacing--xx-small);
	inset-inline-start: var(--section-gutter);
	z-index: 100000;
	padding: var(--wp--preset--spacing--xx-small) var(--wp--preset--spacing--x-small);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--preset--shadow--small);
}

/*
 * Template-level page layout. ACF blocks can use alignwide or alignfull in
 * their block.json support settings. Full-width blocks own their inner padding.
 */
.site-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, var(--layout-content-max)) minmax(0, 1fr);
	padding-inline: var(--section-gutter);
}

.site-main > * {
	grid-column: 2;
	min-width: 0;
}

.site-main > .alignwide {
	grid-column: 1 / -1;
	width: min(100%, var(--layout-wide-max));
	justify-self: center;
}

.site-main > .alignfull {
	grid-column: 1 / -1;
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
}

/* Keep inline copy links readable on both light and dark block backgrounds. */
:is(.site-main, .editor-styles-wrapper) :where(p, li, blockquote, figcaption) a:not([class]):not(.wp-element-button) {
	color: inherit;
	text-decoration-color: currentColor;
	text-decoration-thickness: 0.0625em;
	text-underline-offset: 0.18em;
	transition: text-decoration-thickness var(--transition);
}

:is(.site-main, .editor-styles-wrapper) :where(p, li, blockquote, figcaption) a:not([class]):not(.wp-element-button):hover,
:is(.site-main, .editor-styles-wrapper) :where(p, li, blockquote, figcaption) a:not([class]):not(.wp-element-button):focus-visible {
	color: inherit;
	text-decoration-thickness: 0.14em;
}

:is(.site-main, .editor-styles-wrapper) :where(p, li, blockquote, figcaption) a:not([class]):not(.wp-element-button):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Top-level page blocks sit in a grid on the front end, so they have no flow gap. */
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > * {
	margin-block-start: 0;
}

/* Accessibility: visible focus, sticky-header clearance and resilient text reflow. */
:root :where(.site-header, .site-main, .site-footer) :is(a, button, input, select, textarea, [tabindex]):focus-visible,
.skip-link:focus-visible {
 outline: 2px solid var(--primary);
 outline-offset: 2px;
 box-shadow: 0 0 0 4px var(--base);
}
.site-main:focus { outline: none; }
:where(.site-header, .site-main, .site-footer) :is(a, button, input, select, textarea, [tabindex]) {
 scroll-margin-block: 9rem 2rem;
}
:where(.site-main, .site-footer) :is(p, h1, h2, h3, h4, h5, h6, li) { overflow-wrap: anywhere; }
.site-footer__social a:focus-visible { opacity: 1; }
