/*
 * APCS readability layer.
 *
 * This intentionally targets the body/content region instead of the global
 * navigation chrome so larger type helps older readers without breaking the
 * header, footer, or mega navigation. User scale is controlled by
 * html[data-apcs-readable-scale="default|large|xlarge"].
 */

:root,
html[data-apcs-readable-scale="default"] {
	--apcs-readable-body-font-size: clamp(1.0625rem, 0.98rem + 0.28vw, 1.25rem);
	--apcs-readable-secondary-font-size: clamp(0.875rem, 0.84rem + 0.12vw, 1rem);
	--apcs-readable-control-font-size: 1rem;
	--apcs-readable-small-font-size: 0.875rem;
	--apcs-readable-price-font-size: clamp(1.25rem, 1.12rem + 0.34vw, 1.4375rem);
	--apcs-readable-h2-font-size: clamp(1.5rem, 1.32rem + 0.48vw, 2rem);
	--apcs-readable-h3-font-size: clamp(1.3125rem, 1.18rem + 0.36vw, 1.6875rem);
	--apcs-readable-h4-font-size: clamp(1.125rem, 1.02rem + 0.28vw, 1.4375rem);
	--apcs-readable-line-height: 1.72;
	--apcs-readable-tight-line-height: 1.35;
}

html[data-apcs-readable-scale="large"] {
	--apcs-readable-body-font-size: clamp(1.1875rem, 1.08rem + 0.34vw, 1.4rem);
	--apcs-readable-secondary-font-size: clamp(1rem, 0.94rem + 0.18vw, 1.125rem);
	--apcs-readable-control-font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
	--apcs-readable-small-font-size: clamp(0.9375rem, 0.9rem + 0.14vw, 1rem);
	--apcs-readable-price-font-size: clamp(1.4rem, 1.24rem + 0.4vw, 1.625rem);
	--apcs-readable-h2-font-size: clamp(1.6875rem, 1.48rem + 0.54vw, 2.25rem);
	--apcs-readable-h3-font-size: clamp(1.5rem, 1.32rem + 0.42vw, 1.875rem);
	--apcs-readable-h4-font-size: clamp(1.3125rem, 1.16rem + 0.36vw, 1.625rem);
}

html[data-apcs-readable-scale="xlarge"] {
	--apcs-readable-body-font-size: clamp(1.3125rem, 1.18rem + 0.42vw, 1.6rem);
	--apcs-readable-secondary-font-size: clamp(1.125rem, 1rem + 0.22vw, 1.25rem);
	--apcs-readable-control-font-size: clamp(1.1875rem, 1.08rem + 0.26vw, 1.3125rem);
	--apcs-readable-small-font-size: clamp(1rem, 0.96rem + 0.16vw, 1.0625rem);
	--apcs-readable-price-font-size: clamp(1.5625rem, 1.38rem + 0.48vw, 1.8125rem);
	--apcs-readable-h2-font-size: clamp(1.875rem, 1.64rem + 0.62vw, 2.5rem);
	--apcs-readable-h3-font-size: clamp(1.6875rem, 1.48rem + 0.5vw, 2.125rem);
	--apcs-readable-h4-font-size: clamp(1.5rem, 1.32rem + 0.42vw, 1.875rem);
}

main.wp-block-group .wp-block-post-content :where(
	p,
	li,
	dd,
	dt,
	td,
	th,
	figcaption,
	label,
	input,
	textarea,
	select,
	button,
	.wp-block-button__link,
	.wp-element-button
) {
	font-size: var(--apcs-readable-body-font-size) !important;
	line-height: var(--apcs-readable-line-height) !important;
}

main.wp-block-group .wp-block-post-content :where(input, textarea, select, button, .wp-block-button__link, .wp-element-button) {
	font-size: var(--apcs-readable-control-font-size) !important;
	line-height: 1.45 !important;
}

main.wp-block-group .wp-block-post-content :where(small, .has-small-font-size, .screen-reader-text + *) {
	font-size: var(--apcs-readable-small-font-size) !important;
	line-height: 1.55 !important;
}

main.wp-block-group .wp-block-post-content :where(h2, h3, h4, h5, h6, .wp-block-heading):not(.apcs-page-hero__title) {
	line-height: var(--apcs-readable-tight-line-height) !important;
}

main.wp-block-group .wp-block-post-content :where(h2, .wp-block-heading.has-2-xl-font-size):not(.apcs-page-hero__title) {
	font-size: var(--apcs-readable-h2-font-size) !important;
}

main.wp-block-group .wp-block-post-content :where(h3):not(.apcs-page-hero__title, .apcs-registration-launcher__mobile-title) {
	font-size: var(--apcs-readable-h3-font-size) !important;
}

main.wp-block-group .wp-block-post-content :where(h4):not(.apcs-page-hero__title) {
	font-size: var(--apcs-readable-h4-font-size) !important;
}

.apcs-page-hero__body,
.apcs-page-hero__detail-copy,
.apcs-page-hero__detail-list,
.apcs-page-hero__note-copy,
.apcs-content-card__body,
.apcs-content-card__list,
.apcs-timeline-card__status,
.apcs-subtle-copy {
	font-size: var(--apcs-readable-body-font-size) !important;
	line-height: var(--apcs-readable-line-height) !important;
}

.apcs-page-hero__eyebrow,
.apcs-page-hero__detail-label,
.apcs-page-hero__note-label,
.apcs-content-card__eyebrow,
.apcs-timeline-card__date,
.apcs-section-kicker,
.apcs-section-heading__eyebrow,
main.wp-block-group .wp-block-post-content :where(
	.apcs-page-hero__eyebrow,
	.apcs-page-hero__detail-label,
	.apcs-page-hero__note-label,
	.apcs-content-card__eyebrow,
	.apcs-timeline-card__date,
	.apcs-section-kicker,
	.apcs-section-heading__eyebrow
) {
	font-size: var(--apcs-readable-secondary-font-size) !important;
	line-height: 1.45 !important;
}

main.wp-block-group .wp-block-post-content :where(table) {
	font-size: var(--apcs-readable-secondary-font-size) !important;
	line-height: 1.55 !important;
}

main.wp-block-group .apcs-registration-launcher :where(
	th,
	td,
	.apcs-registration-launcher__mobile-window,
	.apcs-registration-launcher__table-copy,
	.apcs-registration-launcher__table-unavailable,
	.apcs-registration-launcher__table-action
) {
	font-size: var(--apcs-readable-control-font-size) !important;
	line-height: 1.45 !important;
}

main.wp-block-group .apcs-registration-launcher :where(
	.apcs-registration-launcher__table-price,
	.apcs-registration-launcher__mobile-title
) {
	font-size: clamp(1rem, 1.18vw, 1.125rem) !important;
	line-height: 1.2 !important;
}

main.wp-block-group .apcs-registration-launcher :where(
	.apcs-registration-launcher__table thead th,
	.apcs-registration-launcher__mobile-window
) {
	font-size: var(--apcs-readable-small-font-size) !important;
	line-height: 1.25 !important;
}

@media (max-width: 767px) {
	:root,
	html[data-apcs-readable-scale="default"] {
		--apcs-readable-body-font-size: clamp(1rem, 0.94rem + 0.7vw, 1.125rem);
		--apcs-readable-secondary-font-size: 1rem;
		--apcs-readable-control-font-size: 1rem;
		--apcs-readable-price-font-size: clamp(1.125rem, 1.02rem + 1vw, 1.25rem);
		--apcs-readable-line-height: 1.68;
	}

	html[data-apcs-readable-scale="large"] {
		--apcs-readable-body-font-size: clamp(1.125rem, 1.04rem + 0.82vw, 1.25rem);
		--apcs-readable-secondary-font-size: clamp(1.0625rem, 1rem + 0.62vw, 1.125rem);
		--apcs-readable-control-font-size: clamp(1.0625rem, 1rem + 0.62vw, 1.125rem);
		--apcs-readable-price-font-size: clamp(1.25rem, 1.12rem + 1.2vw, 1.4375rem);
	}

	html[data-apcs-readable-scale="xlarge"] {
		--apcs-readable-body-font-size: clamp(1.25rem, 1.14rem + 1vw, 1.4rem);
		--apcs-readable-secondary-font-size: clamp(1.125rem, 1.06rem + 0.72vw, 1.25rem);
		--apcs-readable-control-font-size: clamp(1.125rem, 1.06rem + 0.72vw, 1.25rem);
		--apcs-readable-price-font-size: clamp(1.375rem, 1.24rem + 1.35vw, 1.625rem);
	}
}
