/* ==========================================================================
   Marginalia — the annotated textbook
   The signature move: on wide screens the table of contents leaves the flow
   and hangs in a margin column beside the text, the way a study edition puts
   apparatus in the margin. Section headings get a short rule that starts in
   that margin, so the reader's eye finds structure without a boxed sidebar.
   ========================================================================== */

body.variation-marginalia {
	--color-page: #fbfaf7;
	--color-raised: #f1efe8;
	--color-ink: #1b1f2a;
	--color-ink-muted: #5c6270;
	--color-rule: #d8d5cc;
	--color-accent: #2f5d8a;
	--color-accent-ink: #fbfaf7;
	--color-link: #2f5d8a;
	--color-link-hover: #1b1f2a;
	--color-mark: #f2e06b;

	--font-display: "Newsreader", Georgia, serif;
	--font-body: "Source Sans 3", system-ui, sans-serif;
	--weight-display: 600;
	--weight-strong: 600;

	--measure: 68ch;
	--leading-body: 1.62;
	--radius: 2px;
	--radius-lg: 2px;
	--rule-width: 1px;
}

.variation-marginalia .site-header {
	border-bottom-width: 2px;
}

.variation-marginalia .site-title {
	font-size: var(--step-2);
	letter-spacing: -0.01em;
}

/* Headings carry a rule that reaches back into the margin. */
.variation-marginalia .entry-content > h2 {
	position: relative;
	padding-top: var(--space-s);
	border-top: 1px solid var(--color-rule);
}

.variation-marginalia .entry-content > h3 {
	color: #2f5d8a;
}

.variation-marginalia .entry-standfirst {
	font-family: var(--font-display);
	font-style: italic;
}

@media (min-width: 75em) {
	.variation-marginalia .entry {
		--entry-margin: 13rem;
	}

	/* The apparatus column. */
	.variation-marginalia .toc {
		grid-column: 1;
		grid-row: span 20;
		align-self: start;
		position: sticky;
		top: var(--space-m);
		margin: 0;
		padding: 0 var(--space-m) 0 0;
		background: none;
		border-right: 1px solid var(--color-rule);
		font-size: 0.8rem;
		line-height: 1.45;
	}

	.variation-marginalia .toc__heading {
		font-size: 0.8rem;
		font-style: italic;
		font-weight: 400;
		color: var(--color-ink-muted);
	}

	.variation-marginalia .toc__list {
		list-style: none;
		padding-left: 0;
	}

	.variation-marginalia .toc__item {
		margin-bottom: var(--space-xs);
	}

	.variation-marginalia .entry-header,
	.variation-marginalia .entry-figure {
		grid-column: 1 / -1;
	}
}

.variation-marginalia blockquote {
	border-left-color: #f2e06b;
	border-left-width: 4px;
	font-style: normal;
	font-family: var(--font-display);
	color: var(--color-ink);
}

.variation-marginalia .post-card__title a:hover {
	text-decoration-color: #f2e06b;
	text-decoration-thickness: 3px;
}
