/* Standpoint – accessibility fixes for the Fox theme (loaded by Fox Child). */

/* ---------- Visually hidden text (still read by screen readers) ---------- */
.sp-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------- Skip link: appears when reached with the keyboard ---------- */
.sp-skip-link {
	position: absolute;
	top: -100px;
	left: 8px;
	z-index: 100000;
	padding: 12px 16px;
	background: #000;
	color: #fff !important;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
}
.sp-skip-link:focus {
	top: 8px;
	outline: 3px solid #fff;
	outline-offset: 2px;
}
#wi-main:focus {
	outline: none; /* target of the skip link, not a control */
}

/* ---------- Visible keyboard focus everywhere ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid currentColor !important;
	outline-offset: 2px;
}
[data-sp-button] {
	cursor: pointer;
}

/* ---------- Focused items are not hidden under the fixed header ---------- */
html {
	scroll-padding-top: var(--sp-sticky-offset, 72px);
}

/* ---------- Mobile menu close button ---------- */
.sp-menu-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0 0 8px auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}
.sp-menu-close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -4px;
}

/* ---------- Colour contrast ----------
   Fox's accent red #db4a37 is 4.16:1 against white – below the 4.5:1
   minimum. #bf3b29 is the same red, slightly darker (5.4:1). */
body:not(.darkmode) #breadcrumbs a,
body:not(.darkmode) a.more--plain,
body:not(.darkmode) .widget_calendar .wp-calendar-nav a {
	color: #bf3b29;
}
/* White on red needs the darker red in both light and dark mode. */
.widget_calendar .wp-calendar-table td:has(> a),
.widget_calendar .wp-calendar-table td > a {
	background-color: #bf3b29;
	color: #fff;
}
/* Footer menu, current page: #888 (3.5:1) -> #595959 (7:1). */
body:not(.darkmode) .footer-menu [aria-current="page"],
body:not(.darkmode) .footer-menu [aria-current="page"] span,
body:not(.darkmode) .footer-menu .current-menu-item > a,
body:not(.darkmode) .footer-menu .current-menu-item > a span {
	color: #595959;
}

/* ---------- Readable text on phones ---------- */
/* Small labels (category, date, footer, calendar): at least 12px. */
.meta56__item,
.meta56__item a,
.meta56__date,
.site-description.slogan,
.singlenav56__post__text span,
.footer-menu a,
.footer-menu span,
.footer56__element p,
.widget_calendar .wp-calendar-table th,
.widget_calendar .wp-calendar-table td {
	font-size: max(12px, 0.75rem) !important;
}
@media (max-width: 840px) {
	/* Card excerpts were 11px on phones. */
	.excerpt56 {
		font-size: 14px !important;
		line-height: 1.5 !important;
	}
	/* Article text was 14px on phones; 16px is the usual minimum for
	   long-form reading. Delete this block to keep Fox's size. */
	.single56__content,
	.single56__content p,
	.single56__content li {
		font-size: 16px !important;
		line-height: 1.65 !important;
	}
}

/* ---------- Larger tap targets (at least 24 x 24px) ---------- */
.meta56__item a {
	display: inline-block;
	min-height: 24px;
	line-height: 24px;
}
.heading56__link,
.readmore56 a,
#breadcrumbs a {
	display: inline-block;
	min-height: 24px;
	line-height: 24px;
}
.wi-logo-main > a,
.fox-logo > a {
	display: inline-block;
	padding-block: 3px;
}
.footer-menu a,
.widget_nav_menu a,
.wp-block-latest-posts__post-title {
	display: inline-block;
	min-height: 24px;
	padding-block: 4px;
}
.widget_calendar .wp-calendar-table td > a {
	display: inline-block;
	min-width: 24px;
	min-height: 24px;
	line-height: 24px;
}
.widget_calendar .wp-calendar-nav a {
	display: inline-block;
	padding: 6px 4px;
}

/* ---------- Respect "reduce motion" device settings ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
