/**
 * Single article: the reading column, core block details (images, captions, embeds), tags,
 * share links, the reading-progress bar and the related-articles section. Hand-written; tokens only.
 */

/* Reading-progress bar: fixed under the header, filled by reading-progress.js through --progress. */
.ReadingProgress__bar {
	position: fixed;
	inset: 0 0 auto;
	z-index: 40;
	height: var(--space-1);
	background: transparent;
	pointer-events: none;
}

.ReadingProgress__fill {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--color-action);
	transform: scaleX(var(--progress, 0));
	transform-origin: left;
}

/* The article: a centred reading column below the hero. */
.Article__root {
	padding: var(--space-12) 0;
}

.Article__container {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.Article__body {
	width: 100%;
}

/* Images and figures inside the article keep their ratio and never overflow the column. */
.Article__body img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-lg);
}

.Article__body figure {
	margin-inline: 0;
}

.Article__body figcaption {
	margin-top: var(--space-2);
	font: var(--text-body-sm);
	color: var(--text-2);
}

.Article__body .aligncenter {
	display: block;
	margin-inline: auto;
}

.Article__body iframe,
.Article__body video {
	max-width: 100%;
	border-radius: var(--radius-lg);
}

/* Tags under the article. */
.Article__tags {
	width: 100%;
	max-width: var(--size-prose-max);
	margin: var(--space-8) 0 0;
	font: var(--text-body-sm);
}

.Article__tags a {
	display: inline-block;
	margin: 0 var(--space-2) var(--space-2) 0;
	padding: var(--space-1) var(--space-3);
	border: 1px solid var(--border-1);
	border-radius: var(--radius-full);
	color: var(--text-1);
	text-decoration: none;
}

.Article__tags a:hover,
.Article__tags a:focus-visible {
	background: var(--surface-hover-strong);
}

/* Tablet and phone: less vertical air around the article. */
@media (max-width: 1024px) {
	.Article__root {
		padding: var(--space-10) 0;
	}
}

/* No movement for visitors who prefer less: the bar still reports progress, without easing. */
@media (prefers-reduced-motion: reduce) {
	.ReadingProgress__fill {
		transition: none;
	}
}
