/**
 * Public styles for CMS rich text.
 * Scoped so navigation, cards, and layout lists keep their own markers.
 */

.njcms-richtext {
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.njcms-richtext > *:first-child {
	margin-top: 0;
}

.njcms-richtext > *:last-child {
	margin-bottom: 0;
}

.njcms-richtext p,
.njcms-richtext li {
	overflow-wrap: anywhere;
}

.njcms-richtext h2,
.njcms-richtext h3,
.njcms-richtext h4 {
	margin: 1.15rem 0 0.45rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
}

.njcms-richtext h2 {
	font-size: clamp(1.35rem, 2.2vw, 1.7rem);
}

.njcms-richtext h3 {
	font-size: clamp(1.15rem, 1.8vw, 1.35rem);
}

.njcms-richtext h4 {
	font-size: 1.05rem;
}

.njcms-richtext strong,
.njcms-richtext b {
	font-weight: 700 !important;
}

.njcms-richtext em,
.njcms-richtext i {
	font-style: italic !important;
}

.njcms-richtext u,
.njcms-richtext span[style*="text-decoration: underline"],
.njcms-richtext span[style*="text-decoration:underline"] {
	text-decoration: underline !important;
	text-underline-offset: 0.12em;
}

.njcms-richtext a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
	overflow-wrap: anywhere;
}

.njcms-richtext ul,
.njcms-richtext ol {
	margin: 0.4rem 0 1rem;
	padding-left: 1.35rem;
	list-style-position: outside;
}

.njcms-richtext ul {
	list-style: disc outside !important;
}

.njcms-richtext ol {
	list-style: decimal outside !important;
}

.njcms-richtext li {
	margin: 0.25rem 0;
}

.njcms-richtext li::marker {
	color: currentColor;
}

.njcms-richtext blockquote {
	margin: 1rem 0;
	padding: 0.15rem 0 0.15rem 0.9rem;
	border-left: 3px solid #c9a227;
}

.njcms-richtext img {
	max-width: 100%;
	height: auto;
}

@media (max-width: 640px) {
	.njcms-richtext ul,
	.njcms-richtext ol {
		padding-left: 1.15rem;
	}
}
