/* Shared typography and spacing across native and inherited page templates. */
:root {
	--text-body: 1rem;
	--text-heading: clamp(1.75rem, 3vw, 2.5rem);
	--space-paragraph: 1.25rem;
	--space-heading: clamp(36px, 5vw, 64px);
}

html body :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--f-serif) !important;
	font-weight: 600 !important;
}
html body .home-extra .alcair-section .alcair-related > h2 { font-family: var(--f-serif) !important; }
html body main p { font-family: var(--f-sans) !important; }
html body main h1:not(.screen-reader-text) {
	font-size: clamp(2.25rem, 5.2vw, 4.5rem) !important;
	line-height: 1.12 !important;
	letter-spacing: -.025em !important;
}
html body :is(.entry-content, .dbody__main) {
	font-family: var(--f-sans);
	font-size: var(--text-body);
	line-height: 1.75;
}
html body :is(.alcair-seo-content, .mag, .mag-split__text) > p:not(.mag-lead):not(.nexa-faq-intro) {
	font-size: var(--text-body);
	line-height: 1.75;
	margin-bottom: var(--space-paragraph);
}
html body :is(.alcair-seo-content, .mag, .mag-split__text) > h2,
html body article.entry-content > h2 {
	font-size: var(--text-heading) !important;
	line-height: 1.2 !important;
	letter-spacing: -.02em;
	margin-top: var(--space-heading) !important;
	margin-bottom: 24px !important;
}
html body :is(.alcair-seo-content, .mag, .mag-split__text) > h2:first-child { margin-top: 0 !important; }
html body :is(.alcair-seo-content, .mag, .mag-split__text) > h3 {
	font-size: 1.25rem !important;
	line-height: 1.35 !important;
	margin-top: 32px !important;
	margin-bottom: 12px !important;
}

/* Prose links always have the same visible underline and focus treatment. */
html body .entry-content :is(p, li, dd) a:not(:is(.btn, .alcair-btn, .wp-block-button__link, .wp-element-button, .link-arrow)) {
	color: inherit;
	font-weight: 500;
	text-decoration: underline !important;
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
}
html body .entry-content :is(p, li, dd) a:not(:is(.btn, .alcair-btn, .wp-block-button__link, .wp-element-button, .link-arrow)):hover {
	text-decoration-thickness: 2px;
}

/* A long action label can wrap instead of being clipped on a small phone. */
html body :is(.btn, .alcair-btn, .wp-block-button__link, .wp-element-button, .ff-btn-submit) {
	font-family: var(--f-sans) !important;
	font-size: .875rem !important;
	font-weight: 500 !important;
	line-height: 1.35 !important;
	max-width: 100%;
	min-height: 48px;
	white-space: normal !important;
	text-align: center;
	justify-content: center;
}
html body :is(.btn, .alcair-btn) :is(svg, .icon) { flex-shrink: 0; }
html body .entry-content :is(.wp-block-buttons, .alcair-hero__cta-group, .dhero__ctas, .btn-row) { gap: 12px; }
html body .fluentform :is(input.ff-el-form-control, select.ff-el-form-control, textarea.ff-el-form-control) {
	font-family: var(--f-sans);
	font-size: 1rem;
}

/* About and doctor biographies follow the FAQ's reading layout without a drop cap. */
body:is(.page-slug-about, .page-slug-dr-sal-alcaire) .design-about .dbody__main > .alcair-seo-content:first-child > p:first-child,
body:is(.page-slug-about, .page-slug-dr-sal-alcaire) .design-about .dbody__main > p:first-child {
	font-size: var(--text-body);
	line-height: 1.75;
}
body:is(.page-slug-about, .page-slug-dr-sal-alcaire) .design-about .dbody__main > .alcair-seo-content:first-child > p:first-child::first-letter,
body:is(.page-slug-about, .page-slug-dr-sal-alcaire) .design-about .dbody__main > p:first-child::first-letter {
	float: none;
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

@media (max-width: 600px) {
	html body main h1:not(.screen-reader-text) { overflow-wrap: break-word; }
	html body :is(.alcair-seo-content, .mag, .mag-split__text) > h2,
	html body article.entry-content > h2 { margin-bottom: 20px !important; }
	html body main :is(.btn, .alcair-btn, .wp-block-button__link) {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}
	html body .post-navigation .nav-links { flex-direction: column; gap: 24px; }
	html body .post-navigation :is(.nav-next, .nav-previous) { width: 100%; margin-left: 0; text-align: left; }
}
