/**
 * Consultants Directory — rich-text output styles.
 *
 * The single ruleset for consultant-authored rich text. Loaded three ways so
 * the editor and the public pages render identically (improvements.md 2j):
 *   1. as TinyMCE content_css (with body_class: 'cd-richtext'),
 *   2. on the public search/details pages,
 *   3. inside the portal preview contexts.
 * Every selector lives under .cd-richtext; nothing here may leak out.
 */

.cd-richtext.cd-richtext {
	font-family: var(--cd-font-body, Arial, 'Helvetica Neue', Helvetica, sans-serif);
	font-size: var(--cd-text-md, 16px);
	line-height: 1.6;
	color: var(--cd-color-text, #3b4754);
	word-wrap: break-word;
}

.cd-richtext.cd-richtext p {
	margin: 0 0 0.9em;
}

.cd-richtext.cd-richtext p:last-child {
	margin-bottom: 0;
}

.cd-richtext.cd-richtext h3,
.cd-richtext.cd-richtext h4 {
	font-family: var(--cd-font-head, Arial, 'Helvetica Neue', Helvetica, sans-serif);
	font-weight: 700;
	line-height: 1.2;
	color: var(--cd-color-primary, #3b4754);
	margin: 1.2em 0 0.4em;
}

.cd-richtext.cd-richtext h3:first-child,
.cd-richtext.cd-richtext h4:first-child {
	margin-top: 0;
}

.cd-richtext.cd-richtext h3 {
	font-size: var(--cd-text-lg, 19px);
}

.cd-richtext.cd-richtext h4 {
	font-size: var(--cd-text-md, 16px);
}

.cd-richtext.cd-richtext ul,
.cd-richtext.cd-richtext ol {
	margin: 0 0 0.9em;
	padding-left: 1.4em;
}

.cd-richtext.cd-richtext li {
	margin-bottom: 0.25em;
}

.cd-richtext.cd-richtext a {
	color: var(--cd-color-primary, #3b4754);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cd-richtext.cd-richtext a:hover {
	color: var(--cd-color-accent-hover, #c7401e);
}

.cd-richtext.cd-richtext strong,
.cd-richtext.cd-richtext b {
	font-weight: 700;
}

/* TinyMCE renders this file inside its iframe where the tokens aren't
   defined; the var() fallbacks above carry the brand values. Give the
   editing surface comfortable padding. */
body.cd-richtext.cd-richtext {
	margin: 12px;
}
