/* Long-form reading. Case and wording in the body are never transformed. */

.article {
	padding-bottom: var(--section);
}

.article__grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: clamp(12px, 1.6vw, 24px);
	padding-top: clamp(36px, 5vw, 72px);
}

.article__side {
	grid-column: 1 / span 3;
	position: sticky;
	top: calc(var(--head-h) + 28px);
	align-self: start;
	display: grid;
	gap: 22px;
	padding-right: 12px;
}

.article__side dl {
	display: grid;
	gap: 16px;
}

.article__side dt {
	font-size: var(--t-label);
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bone-3);
}

.article__side dd {
	margin-top: 3px;
	font-family: var(--serif);
	font-size: 1.0625rem;
}

.article__side a {
	color: var(--bone);
}

.article__body {
	grid-column: 4 / span 7;
	min-width: 0;
}

@media (max-width: 900px) {
	.article__side {
		grid-column: 1 / -1;
		position: static;
		padding: 0 0 28px;
		margin-bottom: 28px;
		border-bottom: 1px dashed var(--line-2);
	}

	.article__side dl {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.article__body {
		grid-column: 1 / -1;
	}
}

div.entry-content {
	font-family: var(--serif);
	font-size: var(--t-read);
	line-height: 1.62;
	letter-spacing: 0;
	overflow-wrap: break-word;
}

div.entry-content > * {
	max-width: var(--measure);
}

/* Page text with nothing beside it sits in the middle of the page, not against its edge */

.wrap > div.entry-content > * {
	margin-inline: auto;
}

.wrap > div.entry-content > :is(figure, .wp-block-image, .wp-block-embed, .video, table, .wp-block-table) {
	max-width: min(100%, 980px);
}

div.entry-content > * + * {
	margin-top: 1.2em;
}

div.entry-content > p:first-of-type {
	font-size: 1.16em;
	line-height: 1.5;
}

div.entry-content h2,
div.entry-content h3,
div.entry-content h4 {
	font-family: var(--display);
	font-stretch: 70%;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.01em;
	text-wrap: balance;
	margin-top: 2.1em;
}

div.entry-content h2 {
	font-size: clamp(1.7rem, 2.6vw, 2.3rem);
	padding-top: .9em;
	border-top: 1px solid var(--line);
}

div.entry-content h3 {
	font-size: clamp(1.35rem, 1.9vw, 1.7rem);
}

div.entry-content h4 {
	font-size: 1.2rem;
}

div.entry-content a {
	color: var(--sky);
	text-decoration-color: color-mix(in srgb, var(--sky) 50%, transparent);
	transition: text-decoration-color var(--fast) ease;
}

div.entry-content a:hover {
	text-decoration-color: currentColor;
}

div.entry-content strong {
	font-weight: 600;
	color: var(--bone);
}

div.entry-content blockquote,
div.entry-content .wp-block-quote {
	margin-inline: 0;
	padding: .2em 0 .2em 1.4em;
	border-left: 2px solid var(--gold);
	color: var(--bone);
	font-style: normal;
}

div.entry-content blockquote > * + * {
	margin-top: 1em;
}

div.entry-content blockquote cite,
div.entry-content .wp-block-quote cite {
	display: block;
	margin-top: 1em;
	font-family: var(--sans);
	font-size: var(--t-small);
	font-style: normal;
	letter-spacing: .02em;
	color: var(--bone-2);
}

div.entry-content ul,
div.entry-content ol {
	padding-left: 1.3em;
}

div.entry-content li + li {
	margin-top: .5em;
}

div.entry-content li::marker {
	color: var(--gold);
}

div.entry-content hr,
div.entry-content .wp-block-separator {
	max-width: var(--measure);
	margin-block: 2.4em;
	border: 0;
	border-top: 1px dashed var(--line-2);
}

div.entry-content figure,
div.entry-content .wp-block-image {
	max-width: min(100%, 980px);
	margin-block: 2.2em;
}

div.entry-content figure img {
	width: 100%;
	border: 1px solid var(--line);
}

div.entry-content figcaption {
	margin-top: 10px;
	font-family: var(--sans);
	font-size: var(--t-small);
	color: var(--bone-2);
}

div.entry-content .wp-block-embed,
div.entry-content .video {
	max-width: min(100%, 980px);
	margin-block: 2.2em;
}

div.entry-content .wp-block-embed__wrapper,
div.entry-content .video {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--ink-2);
	border: 1px solid var(--line);
}

div.entry-content .wp-block-embed__wrapper iframe,
div.entry-content .video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

div.entry-content table {
	width: 100%;
	max-width: min(100%, 980px);
	border-collapse: collapse;
	font-family: var(--sans);
	font-size: .9375rem;
	line-height: 1.4;
}

div.entry-content th,
div.entry-content td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

div.entry-content th {
	font-weight: 600;
	color: var(--bone-2);
	border-bottom-color: var(--line-2);
}

div.entry-content .wp-block-table {
	overflow-x: auto;
}

.article__source {
	margin-top: 3em;
	padding-top: 1.2em;
	border-top: 1px dashed var(--line-2);
	font-family: var(--sans);
	font-size: var(--t-small);
	color: var(--bone-3);
	max-width: var(--measure);
}

.article__next {
	border-top: 1px dashed var(--line-2);
}

/* Reading progress: a gold hairline under the header */

.read-line {
	position: fixed;
	inset: var(--head-h) 0 auto 0;
	z-index: 59;
	height: 2px;
	background: var(--gold);
	transform-origin: left center;
	transform: scaleX(var(--read, 0));
}
