/*
 * TEXT-6: article with side notes.
 * A text to read, in passages that staff add and remove, and beside it a
 * narrow column of short notes: the gist, who it is for, a thing to remember.
 * On a narrow screen the notes follow the text.
 */

.wprk-text-6 .wprk-text-6__inner {
	display: grid;
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60);
}

.wprk-text-6 .wprk-text-6__inner > * {
	margin: 0;
	min-width: 0;
}

/* The article keeps its heading at the side in every theme: it is a column of reading. */
.wprk-text-6 .wprk-text-6__main > * {
	margin-block: 0;
	max-width: 44rem;
}

.wprk-text-6 .wprk-text-6__main > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.wprk-text-6 .wprk-text-6__main > .wprk-eyebrow + * {
	margin-block-start: var(--wp--preset--spacing--20);
}

/* The passages, one under another. */
.wprk-section.wprk-text-6 .wprk-text-6__passages {
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: minmax(0, 1fr);
	margin-block-start: var(--wp--preset--spacing--50);
}

.wprk-text-6 .wprk-text-6__passage > * {
	margin: 0;
}

.wprk-text-6 .wprk-text-6__passage > * + * {
	margin-block-start: var(--wp--preset--spacing--20);
}

.wprk-text-6 .wprk-text-6__passage :where(h3) {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
}

.wprk-text-6 .wprk-text-6__passage :where(p) {
	line-height: 1.7;
	text-wrap: pretty;
}

/* The notes: under one line in the accent colour, a hairline between them. */
.wprk-section.wprk-text-6 .wprk-text-6__notes {
	border-block-start: 2px solid var(--wprk-accent);
	gap: 0 var(--wp--preset--spacing--40);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.wprk-text-6 .wprk-text-6__note {
	padding-block: var(--wp--preset--spacing--30);
}

.wprk-text-6 .wprk-text-6__note > * {
	margin: 0;
}

.wprk-text-6 .wprk-text-6__label {
	color: var(--wprk-heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.4;
}

.wprk-text-6 .wprk-text-6__note > * + * {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
	margin-block-start: 0.25rem;
}

/* From a wide screen on, the notes stand beside the text, one under another. */
@media (min-width: 960px) {
	.wprk-text-6 .wprk-text-6__inner {
		align-items: start;
		grid-template-columns: minmax(0, 1fr) minmax(0, 18rem);
	}

	.wprk-section.wprk-text-6 .wprk-text-6__notes {
		grid-template-columns: minmax(0, 1fr);
	}

	.wprk-text-6 .wprk-text-6__note + .wprk-text-6__note {
		border-block-start: 1px solid var(--wprk-border);
	}

	/* Without notes the text keeps its reading width and stands alone. */
	.wprk-text-6 .wprk-text-6__inner:not(:has(> .wprk-text-6__notes)) {
		grid-template-columns: minmax(0, 1fr);
	}
}
