/**
 * Typography scale — scoped to frontend (not WP admin / media modal).
 */

/* Safety reset: WP media library + Divi builder chrome */
.media-modal h1,
.media-modal h2,
.media-modal h3,
.media-frame .media-frame-title,
.media-frame h1,
.et-fb-modal h1,
.et-fb-modal h2 {
	font-size: 22px !important;
	line-height: 1.4 !important;
	font-weight: 600 !important;
}

#page-container h1,
#page-container h2,
#page-container h3,
#page-container h4,
#page-container h5,
#page-container h6,
#et-boc h1,
#et-boc h2,
#et-boc h3,
#et-boc h4,
#et-boc h5,
#et-boc h6,
.et-l h1,
.et-l h2,
.et-l h3,
.et-l h4,
.et-l h5,
.et-l h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.et_pb_text h1,
.et_pb_text h2,
.et_pb_text h3,
.et_pb_text h4,
.et_pb_text h5,
.et_pb_text h6,
h1.et_pb_module_header,
h2.et_pb_module_header,
h3.et_pb_module_header,
h4.et_pb_module_header,
h5.et_pb_module_header,
h6.et_pb_module_header,
#main-content .et_pb_post_content h1,
#main-content .et_pb_post_content h2,
#main-content .et_pb_post_content h3,
#main-content .et_pb_post_content h4,
#main-content .et_pb_post_content h5,
#main-content .et_pb_post_content h6 {
	font-family: var(--d71-font-heading);
	line-height: var(--d71-heading-line-height);
}

#page-container h1,
#et-boc h1,
.et-l h1,
.entry-content h1,
.et_pb_text h1,
h1.et_pb_module_header,
#main-content .et_pb_post_content h1 {
	font-size: var(--d71-h1-size) !important;
}

#page-container h2,
#et-boc h2,
.et-l h2,
.entry-content h2,
.et_pb_text h2,
h2.et_pb_module_header,
#main-content .et_pb_post_content h2 {
	font-size: var(--d71-h2-size) !important;
}

#page-container h3,
#et-boc h3,
.et-l h3,
.entry-content h3,
.et_pb_text h3,
h3.et_pb_module_header,
#main-content .et_pb_post_content h3 {
	font-size: var(--d71-h3-size) !important;
}

#page-container h4,
#et-boc h4,
.et-l h4,
.entry-content h4,
.et_pb_text h4,
h4.et_pb_module_header,
#main-content .et_pb_post_content h4 {
	font-size: var(--d71-h4-size) !important;
}

#page-container h5,
#et-boc h5,
.et-l h5,
.entry-content h5,
.et_pb_text h5,
h5.et_pb_module_header,
#main-content .et_pb_post_content h5 {
	font-size: var(--d71-h5-size) !important;
}

#page-container h6,
#et-boc h6,
.et-l h6,
.entry-content h6,
.et_pb_text h6,
h6.et_pb_module_header,
#main-content .et_pb_post_content h6 {
	font-size: var(--d71-h6-size) !important;
}

@media (max-width: 980px) {
	#page-container h1,
	#et-boc h1,
	.et-l h1,
	.entry-content h1,
	.et_pb_text h1,
	h1.et_pb_module_header,
	#main-content .et_pb_post_content h1 {
		font-size: var(--d71-h1-size-mobile) !important;
	}

	#page-container h2,
	#et-boc h2,
	.et-l h2,
	.entry-content h2,
	.et_pb_text h2,
	h2.et_pb_module_header,
	#main-content .et_pb_post_content h2 {
		font-size: var(--d71-h2-size-mobile) !important;
	}

	#page-container h3,
	#et-boc h3,
	.et-l h3,
	.entry-content h3,
	.et_pb_text h3,
	h3.et_pb_module_header,
	#main-content .et_pb_post_content h3 {
		font-size: var(--d71-h3-size-mobile) !important;
	}

	#page-container h4,
	#et-boc h4,
	.et-l h4,
	.entry-content h4,
	.et_pb_text h4,
	h4.et_pb_module_header,
	#main-content .et_pb_post_content h4 {
		font-size: var(--d71-h4-size-mobile) !important;
	}

	#page-container h5,
	#et-boc h5,
	.et-l h5,
	.entry-content h5,
	.et_pb_text h5,
	h5.et_pb_module_header,
	#main-content .et_pb_post_content h5 {
		font-size: var(--d71-h5-size-mobile) !important;
	}

	#page-container h6,
	#et-boc h6,
	.et-l h6,
	.entry-content h6,
	.et_pb_text h6,
	h6.et_pb_module_header,
	#main-content .et_pb_post_content h6 {
		font-size: var(--d71-h6-size-mobile) !important;
	}
}

body.et_divi_theme,
body.et_divi_theme .entry-content,
body.et_divi_theme .et_pb_text p,
body.et_divi_theme .et_pb_text ol,
body.et_divi_theme .et_pb_text ul {
	font-family: var(--d71-font-body);
	font-size: var(--d71-body-size);
	line-height: var(--d71-body-line-height);
}
