/* CRC Blueprint Research — article styles
 *
 * Scoped to the blocks the plugin inserts, so nothing here touches the rest of
 * the theme. Colours come from custom properties, and both light and dark
 * schemes are defined, since the theme decides which one applies.
 */

:root {
	--crcbp-teal: #0f6f6c;
	--crcbp-teal-soft: #eaf4f3;
	--crcbp-amber: #b8500f;
	--crcbp-amber-soft: #fdf2e8;
	--crcbp-ink: #1d2327;
	--crcbp-muted: #5c6670;
	--crcbp-line: #dfe3e6;
	--crcbp-panel: #f7f9f9;
}

@media (prefers-color-scheme: dark) {
	:root {
		--crcbp-teal: #5bbdb8;
		--crcbp-teal-soft: #12302f;
		--crcbp-amber: #e0955c;
		--crcbp-amber-soft: #33241a;
		--crcbp-ink: #e8eaed;
		--crcbp-muted: #a6adb4;
		--crcbp-line: #333a40;
		--crcbp-panel: #1c2126;
	}
}

.crcbp-dek {
	font-size: 1.15em;
	line-height: 1.55;
	color: var(--crcbp-ink);
}

/* Source and publication date */

.crcbp-source {
	margin: 0 0 1.2em;
	padding-bottom: .8em;
	border-bottom: 1px solid var(--crcbp-line);
	font-size: .92em;
	color: var(--crcbp-muted);
}

.crcbp-source__label {
	text-transform: uppercase;
	letter-spacing: .05em;
	font-size: .82em;
	font-weight: 700;
}

.crcbp-source__journal {
	font-style: italic;
	color: var(--crcbp-ink);
}

.crcbp-source__date {
	color: var(--crcbp-ink);
	font-weight: 600;
}

.crcbp-source__sep {
	opacity: .5;
}

/* Preprint warning */

.crcbp-banner--preprint {
	background: var(--crcbp-amber-soft);
	border-left: 4px solid var(--crcbp-amber);
	padding: 14px 18px;
	margin: 0 0 1.5em;
	border-radius: 0 3px 3px 0;
}

.crcbp-banner--preprint p {
	margin: 0;
	font-size: .95em;
	line-height: 1.55;
}

/* Evidence badge */

.crcbp-evidence {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
	background: var(--crcbp-teal-soft);
	border-radius: 3px;
	padding: 12px 16px;
	margin: 0 0 1.5em;
}

.crcbp-evidence__label {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	font-size: .78em;
	color: var(--crcbp-teal);
	white-space: nowrap;
}

.crcbp-evidence__caveat {
	font-size: .9em;
	color: var(--crcbp-muted);
	line-height: 1.5;
}

/* Study snapshot */

.crcbp-snapshot {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.8em;
	font-size: .95em;
	display: block;
	overflow-x: auto;
}

.crcbp-snapshot caption {
	text-align: left;
	font-weight: 700;
	padding-bottom: .5em;
	color: var(--crcbp-ink);
}

.crcbp-snapshot th,
.crcbp-snapshot td {
	border-top: 1px solid var(--crcbp-line);
	padding: 9px 12px 9px 0;
	text-align: left;
	vertical-align: top;
}

.crcbp-snapshot th {
	width: 34%;
	color: var(--crcbp-muted);
	font-weight: 600;
	white-space: nowrap;
}

/* Why this is interesting */

.crcbp-context {
	margin: 2em 0;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--crcbp-teal);
}

.crcbp-context h2 {
	margin-top: .6em;
	font-size: 1.15em;
}

.crcbp-context__lead {
	font-size: 1.05em;
	line-height: 1.6;
	color: var(--crcbp-ink);
}

.crcbp-context__part {
	font-size: .96em;
	line-height: 1.6;
}

.crcbp-context__label {
	display: block;
	font-size: .78em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--crcbp-teal);
	margin-bottom: .2em;
}

/* Infographic */

.crcbp-infographic {
	margin: 2em 0;
}

.crcbp-infographic__image {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	border-radius: 3px;
}

.crcbp-infographic__caption {
	margin-top: 1em;
	padding: 14px 16px;
	background: var(--crcbp-panel);
	border-radius: 3px;
	font-size: .92em;
}

.crcbp-figures {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 10px 20px;
}

.crcbp-figures li {
	margin: 0;
}

.crcbp-figure__label {
	display: block;
	font-size: .82em;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--crcbp-muted);
}

.crcbp-figure__value {
	display: block;
	font-weight: 700;
	color: var(--crcbp-ink);
}

.crcbp-infographic__footer {
	margin: 12px 0 0;
	font-size: .88em;
	color: var(--crcbp-muted);
}

/* Numbers */

.crcbp-numbers ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.crcbp-numbers li {
	margin: 0;
	padding: 14px 16px;
	background: var(--crcbp-panel);
	border-radius: 3px;
}

.crcbp-number__value {
	display: block;
	font-size: 1.3em;
	font-weight: 700;
	color: var(--crcbp-teal);
	line-height: 1.25;
}

.crcbp-number__label {
	display: block;
	margin-top: 4px;
	font-weight: 600;
	font-size: .95em;
}

.crcbp-number__context {
	display: block;
	margin-top: 4px;
	font-size: .88em;
	color: var(--crcbp-muted);
	line-height: 1.5;
}

/* Takeaways, limitations, questions */

.crcbp-takeaways,
.crcbp-questions {
	background: var(--crcbp-panel);
	border-radius: 3px;
	padding: 4px 20px 16px;
	margin: 2em 0;
}

.crcbp-limitations {
	border-left: 4px solid var(--crcbp-amber);
	padding: 4px 0 4px 18px;
	margin: 2em 0;
}

.crcbp-questions p {
	font-size: .92em;
	color: var(--crcbp-muted);
}

/* Citation and disclaimer */

.crcbp-citation {
	border-top: 1px solid var(--crcbp-line);
	margin-top: 2.5em;
	padding-top: 1em;
}

.crcbp-citation__ref {
	font-size: .92em;
	line-height: 1.6;
	color: var(--crcbp-muted);
}

.crcbp-citation__links {
	font-size: .92em;
}

.crcbp-disclaimer {
	margin-top: 2em;
	padding: 14px 16px;
	background: var(--crcbp-panel);
	border-radius: 3px;
}

.crcbp-disclaimer p {
	margin: 0;
	font-size: .88em;
	line-height: 1.6;
	color: var(--crcbp-muted);
}
