/**
 * WP Series — reader styles.
 *
 * Design notes, because the choices here are not obvious:
 *
 * 1. Dimmed text is produced by mixing the ink toward the page background, not
 *    by `opacity`. Opacity stacks with whatever the theme already applied and
 *    silently pushes secondary text under the AA contrast floor. Mixing keeps a
 *    predictable ratio, and where `color-mix` is unsupported the text degrades
 *    to full contrast — never to less.
 *
 * 2. Three blocks sit around the article and each has a different job, so each
 *    gets a different visual weight: the navigation is chrome (hairline rules,
 *    no box), the recap is an aside (a single left rule), the teaser is the one
 *    real card. Boxing all three identically made them compete instead of rank.
 *
 * 3. Every size and space comes from a scale. The first version used twelve font
 *    sizes and twelve spacing values, each chosen on its own.
 */

.wps-nav,
.wps-recap,
.wps-teaser,
.wps-archive {
	/* Ink and surface. Canvas is the page background; a theme that sets its own
	   can override --wps-bg. */
	--wps-bg: Canvas;
	--wps-ink: currentColor;
	--wps-muted: color-mix(in srgb, currentColor 68%, var(--wps-bg));
	--wps-faint: color-mix(in srgb, currentColor 42%, var(--wps-bg));
	--wps-line: color-mix(in srgb, currentColor 22%, var(--wps-bg));
	--wps-surface: color-mix(in srgb, currentColor 5%, var(--wps-bg));
	--wps-focus: currentColor;

	/* Type scale */
	--wps-t-xs: 0.75rem;
	--wps-t-sm: 0.875rem;
	--wps-t-md: 1rem;
	--wps-t-lg: 1.125rem;
	--wps-t-xl: 1.375rem;

	/* Spacing scale */
	--wps-s1: 0.25rem;
	--wps-s2: 0.5rem;
	--wps-s3: 0.75rem;
	--wps-s4: 1.25rem;
	--wps-s5: 2rem;
	--wps-s6: 3rem;

	--wps-radius: 10px;

	/* One token for every thumbnail in the plugin. Illustrations are produced in
	   16:9 — the styles say so — and cropping them to 3:2 was cutting off the
	   framing their author chose. */
	--wps-thumb-ratio: 16 / 9;
}

/* Degrade to full contrast, never to a guessed grey. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
	.wps-nav,
	.wps-recap,
	.wps-teaser,
	.wps-archive {
		--wps-muted: currentColor;
		--wps-faint: currentColor;
		--wps-line: currentColor;
		--wps-surface: transparent;
	}
}

/* ---------------------------------------------------------------------------
 * 1. Navigation — chrome, not a card
 * ------------------------------------------------------------------------ */

.wps-nav {
	margin: 0 0 var(--wps-s4);
	padding: var(--wps-s2) 0;
	line-height: 1.35;
	border-top: 1px solid var(--wps-line);
	border-bottom: 1px solid var(--wps-line);
	font-size: var(--wps-t-sm);
	line-height: 1.45;
}

.wps-skip {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.wps-skip:focus-visible {
	position: static;
	width: auto;
	height: auto;
	clip-path: none;
	display: inline-block;
	margin-bottom: var(--wps-s2);
	padding: var(--wps-s1) var(--wps-s2);
	border: 1px solid var(--wps-ink);
	border-radius: 4px;
}

/* Information and controls share one band.

   The previous pass removed content but not height: with no previous and no next
   episode, a single button still claimed a whole row of its own, below a line
   that had room to spare. One flex band, information pushing from the left and
   controls holding the right, collapses that row entirely — and wraps by itself
   when the title is long or the screen narrow. */
.wps-nav__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--wps-s1) var(--wps-s3);
}

.wps-nav__bar > .wps-nav__line {
	flex: 1 1 18rem;
	margin: 0;
}

.wps-nav__bar > .wps-nav__controls {
	flex: 0 0 auto;
}

/* One line, not four.
   The position, the series and the state are one statement — "you are here, in
   this, which is still running" — so they sit on one line and wrap together
   rather than stacking into a band of chrome taller than a paragraph. */
.wps-nav__line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--wps-s1) var(--wps-s2);
	margin: 0;
	font-size: var(--wps-t-sm);
}

/* The whole clause reads as one sentence, so nothing inside it is shouted.
   Uppercasing the position while the rest was sentence case was part of what
   broke the reading: it made the fragment look like a heading of its own. */
.wps-nav__where {
	font-size: var(--wps-t-sm);
	color: var(--wps-muted);
}

.wps-nav__pos {
	white-space: nowrap;
}

.wps-nav__of {
	color: var(--wps-faint);
}

/* Italic, not bold: the typographic convention for the name of a work. Bold put
   the series title in competition with the article's own heading right below,
   and a reader landing on the page took it for the title of what they were
   about to read. */
.wps-nav__series {
	font-style: italic;
	color: var(--wps-ink);
	text-decoration: none;
	border-bottom: 1px solid var(--wps-line);
}

.wps-nav__series:hover,
.wps-nav__series:focus-visible {
	border-bottom-color: currentColor;
}

/* Secondary facts stay secondary: they inform, they do not announce. */
.wps-nav__facts,
.wps-nav__remaining {
	font-size: var(--wps-t-xs);
	color: var(--wps-muted);
}

.wps-nav__remaining:empty,
.wps-nav__facts:empty {
	display: none;
}

/* Progress rail.
   Segments are ranked: read, current, ahead, announced-but-unwritten, and an
   open end when the author has declared no total. The open segment fades out
   rather than stopping — a hard edge would promise a last episode. */
.wps-rail {
	display: flex;
	align-items: center;
	gap: 3px;
	list-style: none;
	margin: var(--wps-s2) 0 0;
	padding: 0;
}

.wps-rail__seg {
	flex: 1 1 0;
	min-width: 6px;
	height: 5px;
	border-radius: 3px;
	background: var(--wps-line);
}

.wps-rail__seg--past,
.wps-rail__seg--current {
	background: var(--wps-ink);
}

.wps-rail__seg--current {
	box-shadow: 0 0 0 3px var(--wps-surface);
}

.wps-rail__seg--ahead {
	background: var(--wps-faint);
}

.wps-rail__seg--upcoming {
	background: transparent;
	border: 1px dashed var(--wps-line);
	box-sizing: border-box;
}

.wps-rail__seg--planned {
	background: transparent;
	border: 1px dotted var(--wps-line);
	box-sizing: border-box;
}

.wps-rail--bar {
	display: block;
	height: 4px;
	margin: var(--wps-s2) 0 0;
	border-radius: 2px;
	background: var(--wps-line);
	overflow: hidden;
}

.wps-rail__fill {
	display: block;
	height: 100%;
	background: var(--wps-ink);
	border-radius: 2px;
}

.wps-rail__seg--open {
	flex: 0 0 2.5rem;
	background: linear-gradient(to right, var(--wps-line), transparent);
	border-radius: 3px 0 0 3px;
}

/* Controls */

/* Grouped left, not spread edge to edge: three controls pushed to the corners of
   a wide column read as three unrelated things. */
.wps-nav__controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wps-s2);
}

/* The picker is a way in, not a call to action: quieter than a full button, but
   still unmistakably a control. */
.wps-nav__controls .wps-picker__toggle {
	padding: var(--wps-s1) var(--wps-s2);
	font-size: var(--wps-t-xs);
}

.wps-nav__controls .wps-btn {
	padding: var(--wps-s1) var(--wps-s2);
	font-size: var(--wps-t-xs);
}

.wps-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--wps-s1);
	padding: var(--wps-s2) var(--wps-s3);
	border: 1px solid var(--wps-line);
	border-radius: 6px;
	text-decoration: none;
	font: inherit;
	font-size: var(--wps-t-sm);
	line-height: 1.2;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.wps-btn:hover,
.wps-btn:focus-visible {
	border-color: var(--wps-ink);
	background: var(--wps-surface);
}

/* One primary per block, and only in the teaser: it is the only place asking
   the reader to do something rather than offering a way out.

   The label carries its own colour in a child element, and that is not a
   flourish: `--wps-ink` is `currentColor`, so setting `color` on the same
   element that uses it as a background made the two resolve to the same value —
   a white button with white text. The background now resolves against the
   inherited colour, the label against the surface. */
.wps-btn--solid {
	border-color: currentColor;
	background: currentColor;
	font-weight: 600;
}

.wps-btn--solid .wps-btn__text,
.wps-btn--solid .wps-btn__arrow {
	color: var(--wps-bg);
}

.wps-btn--solid:hover,
.wps-btn--solid:focus-visible {
	filter: contrast(1.15);
}

.wps-btn--quiet {
	border-color: transparent;
	color: var(--wps-muted);
	font-size: var(--wps-t-xs);
}

.wps-btn--quiet:hover,
.wps-btn--quiet:focus-visible {
	color: var(--wps-ink);
	border-color: var(--wps-line);
}

/* A disabled control carries a word, never only a lighter shade. */
.wps-btn--disabled {
	color: var(--wps-faint);
	border-style: dashed;
	cursor: default;
}

.wps-btn--disabled:hover {
	background: transparent;
	border-color: var(--wps-line);
}

.wps-btn[hidden] {
	display: none;
}

@media (max-width: 480px) {
	.wps-btn--prev .wps-btn__label,
	.wps-btn--next .wps-btn__label,
	.wps-btn--disabled .wps-btn__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

.wps-picker__toggle {
	padding: var(--wps-s2) var(--wps-s3);
	border: 1px solid var(--wps-line);
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: var(--wps-t-sm);
	cursor: pointer;
}

.wps-picker__toggle:hover,
.wps-picker__toggle:focus-visible,
.wps-picker__toggle[aria-expanded="true"] {
	border-color: var(--wps-ink);
	background: var(--wps-surface);
}

/* Episode picker */

.wps-picker {
	margin-top: var(--wps-s2);
	padding-top: var(--wps-s2);
	border-top: 1px solid var(--wps-line);
}

.wps-picker[hidden] {
	display: none;
}

.wps-picker__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--wps-s1);
}

/* Scroll only when the list is genuinely long. A five-part series should not sit
   in a scrolling well — that was a nested scroll trap on touch. */
.wps-picker__list:has(> :nth-child(9)) {
	max-height: 26rem;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.wps-card__link {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: var(--wps-s3);
	align-items: start;
	padding: var(--wps-s2);
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
}

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

.wps-card.is-current > .wps-card__link {
	background: var(--wps-surface);
	box-shadow: inset 3px 0 0 var(--wps-ink);
}

.wps-card.is-upcoming > .wps-card__link {
	cursor: default;
}

.wps-card.is-upcoming .wps-card__title {
	color: var(--wps-muted);
}

.wps-card__media img,
.wps-episode__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	aspect-ratio: var(--wps-thumb-ratio);
	object-fit: cover;
}

.wps-card__placeholder {
	display: block;
	width: 100%;
	aspect-ratio: var(--wps-thumb-ratio);
	border-radius: 4px;
	background: var(--wps-surface);
	border: 1px dashed var(--wps-line);
}

.wps-card__body {
	display: block;
	min-width: 0;
}

.wps-card__num {
	display: inline-block;
	font-variant-numeric: tabular-nums;
	font-size: var(--wps-t-xs);
	color: var(--wps-muted);
	margin-right: var(--wps-s1);
}

.wps-card__title {
	font-weight: 600;
}

/* Scoped to the picker card only. Left as a shared selector, these overrode the
   episode rules further down the file — the same kind of leftover that tore the
   ordering table apart. */
.wps-card__excerpt {
	display: block;
	font-size: var(--wps-t-sm);
	color: var(--wps-muted);
	margin-top: var(--wps-s1);
}

.wps-card__meta {
	display: block;
	font-size: var(--wps-t-xs);
	color: var(--wps-muted);
	margin-top: var(--wps-s1);
}

.wps-badge {
	display: inline-block;
	padding: 0 var(--wps-s1);
	margin-right: var(--wps-s1);
	border: 1px solid var(--wps-line);
	border-radius: 999px;
	font-size: var(--wps-t-xs);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wps-card.is-read .wps-card__num::after,
.wps-episode.is-read .wps-episode__num::after,
.wps-episode.is-read .wps-episode__meta::after {
	content: " ✓";
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
 * 2. Recap — an aside, one rule
 * ------------------------------------------------------------------------ */

.wps-recap {
	margin: 0 0 var(--wps-s5);
	padding: 0 0 0 var(--wps-s3);
	border-left: 3px solid var(--wps-line);
	font-size: var(--wps-t-sm);
}

.wps-recap[hidden] {
	display: none;
}

.wps-recap__eyebrow {
	margin: 0 0 var(--wps-s1);
	font-size: var(--wps-t-xs);
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--wps-muted);
}

.wps-recap__title {
	margin: 0 0 var(--wps-s1);
	font-weight: 600;
}

.wps-recap__text {
	margin: 0 0 var(--wps-s2);
	color: var(--wps-muted);
}

.wps-recap__link {
	font-size: var(--wps-t-xs);
}

.wps-sentinel {
	display: block;
	height: 1px;
}

/* ---------------------------------------------------------------------------
 * 3. Teaser — the one card
 * ------------------------------------------------------------------------ */

/* The readable case: the whole card is the target. */
.wps-teaser__link {
	display: grid;
	grid-template-columns: subgrid;
	grid-column: 1 / -1;
	gap: inherit;
	align-items: start;
	color: inherit;
	text-decoration: none;
}

@supports not (grid-template-columns: subgrid) {
	.wps-teaser__link {
		display: grid;
		grid-template-columns: minmax(0, 200px) 1fr;
		gap: var(--wps-s4);
	}
}

.wps-teaser--next {
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.wps-teaser--next:hover,
.wps-teaser--next:focus-within {
	border-color: var(--wps-ink);
}

@media (prefers-reduced-motion: no-preference) {
	.wps-teaser--next:hover {
		transform: translateY(-2px);
	}

	.wps-btn__arrow {
		display: inline-block;
		transition: transform 0.15s ease;
	}

	.wps-teaser--next:hover .wps-btn__arrow {
		transform: translateX(3px);
	}
}

/* What the next episode costs, next to where the reader is. */
.wps-teaser__cost {
	color: var(--wps-faint);
	text-transform: none;
	letter-spacing: 0;
}

.wps-teaser__cta {
	margin-top: var(--wps-s1);
}

.wps-teaser {
	display: grid;
	grid-template-columns: minmax(0, 240px) 1fr;
	gap: var(--wps-s4);

	/* Centred, not top-aligned: the illustration left two thirds of its column
	   empty while the text ran on beside it, and the card read as two unrelated
	   things stacked side by side. */
	align-items: center;

	margin: var(--wps-s6) 0 0;
	padding: var(--wps-s4);
	border: 1px solid var(--wps-line);
	border-radius: var(--wps-radius);
	background: var(--wps-surface);

	/* The card sets its own rhythm rather than inheriting the article's, where a
	   line-height near 2 turned a four-line summary into the heaviest thing on
	   the page — heavier than the title it was meant to introduce. */
	line-height: 1.45;
}

.wps-teaser--soon {
	border-style: dashed;
}

/* The announcement is not the invitation: the upcoming episode's title stays
   legible, but does not shout like a readable one. */
.wps-teaser--soon .wps-teaser__title {
	font-size: var(--wps-t-lg);
}

.wps-teaser--end {
	grid-template-columns: 1fr;
}

@media (max-width: 600px) {
	.wps-teaser {
		grid-template-columns: 1fr;
		gap: var(--wps-s3);
		align-items: start;
	}

	.wps-teaser__title {
		font-size: var(--wps-t-lg);
	}
}

.wps-teaser__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
	aspect-ratio: var(--wps-thumb-ratio);
	object-fit: cover;
}

.wps-teaser__eyebrow {
	margin: 0 0 var(--wps-s1);
	font-size: var(--wps-t-xs);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wps-muted);
}

.wps-teaser__title {
	margin: 0 0 var(--wps-s2);
	font-size: var(--wps-t-xl);
	font-weight: 700;
	line-height: 1.2;
}

/* Three lines, whatever the next episode opens with. Unclamped, the card's
   height was decided by someone else's first paragraph. */
.wps-teaser__text {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 var(--wps-s3);
	color: var(--wps-muted);
}

.wps-teaser__countdown {
	margin: 0 0 var(--wps-s3);
	font-variant-numeric: tabular-nums;
	font-size: var(--wps-t-sm);
	color: var(--wps-muted);
}

.wps-teaser__countdown:empty {
	display: none;
}

.wps-teaser__done {
	margin: 0 0 var(--wps-s3);
	font-weight: 600;
}

.wps-teaser__done[hidden] {
	display: none;
}

/* The action closes the card; it does not need a paragraph of air before it.
   Set here rather than in a second rule further up — the shared selector below
   would have won on file order and silently dropped the margin. */
.wps-teaser__actions,
.wps-archive__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wps-s2);
	margin: var(--wps-s2) 0 0;
}

.wps-archive__actions {
	margin-bottom: var(--wps-s4);
}

/* ---------------------------------------------------------------------------
 * 4. Series archive
 * ------------------------------------------------------------------------ */

/* The series page is a full template, not a block dropped inside the theme's
   article card — so nothing behind it guarantees a readable surface. Themes with
   a patterned or photographic body background left the text sitting straight on
   the pattern.

   Filled with the system Canvas colour rather than white: it follows the
   theme's own base colour and stays correct on a dark theme, where a hardcoded
   white card would be a flashlight. A theme that already provides its own
   surface can opt out with --wps-archive-surface: transparent. */
.wps-archive {
	--wps-archive-surface: Canvas;

	max-width: 56rem;
	margin: var(--wps-s4) auto;
	padding: var(--wps-s5) var(--wps-s5) var(--wps-s6);
	background: var(--wps-archive-surface);
	border-radius: var(--wps-radius);
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.08 );
}

@supports not (background: Canvas) {
	.wps-archive {
		--wps-archive-surface: #fff;
	}
}

@media (max-width: 600px) {
	.wps-archive {
		margin: 0 auto;
		padding: var(--wps-s4) var(--wps-s4) var(--wps-s5);
		border-radius: 0;
	}
}

/* The cover keeps the proportions it was uploaded with.
   A forced 21:9 crop cut the top and bottom off a 16:9 image — including its
   title. A cover is chosen and framed by the author; the page has no business
   recomposing it. Only a ceiling remains, so a portrait image cannot push the
   whole page off the first screen. */
.wps-archive__cover img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 70vh;
	object-fit: contain;
	border-radius: var(--wps-radius);
	margin-bottom: var(--wps-s4);
}

.wps-archive__eyebrow {
	margin: 0 0 var(--wps-s1);
	font-size: var(--wps-t-xs);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wps-muted);
}

.wps-archive__title {
	margin: 0 0 var(--wps-s2);
	line-height: 1.1;
}

.wps-archive__tagline {
	margin: 0 0 var(--wps-s3);
	font-size: var(--wps-t-lg);
	color: var(--wps-muted);
}

.wps-archive__facts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wps-s1);
	list-style: none;
	margin: 0 0 var(--wps-s4);
	padding: 0;
}

.wps-archive__fact {
	padding: var(--wps-s1) var(--wps-s2);
	border: 1px solid var(--wps-line);
	border-radius: 999px;
	font-size: var(--wps-t-xs);
}

.wps-archive__fact--complete {
	border-color: var(--wps-ink);
	font-weight: 600;
}

.wps-archive__fact--paused {
	border-style: dashed;
}

.wps-archive__description {
	margin-bottom: var(--wps-s4);
}

.wps-archive__resume {
	margin: 0 0 var(--wps-s3);
}

.wps-archive__resume[hidden] {
	display: none;
}

.wps-archive__sort {
	display: flex;
	align-items: center;
	gap: var(--wps-s2);
	margin: 0 0 var(--wps-s4);
	font-size: var(--wps-t-sm);
}

.wps-archive__empty {
	color: var(--wps-muted);
}

.wps-episodes {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--wps-s2);
}

.wps-episode__link {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: var(--wps-s4);
	align-items: center;
	padding: var(--wps-s3);
	border: 1px solid var(--wps-line);
	border-radius: var(--wps-radius);
	text-decoration: none;
	color: inherit;

	/* The card sets its own rhythm. Inheriting the theme's article line-height —
	   often close to 2 — turned a three-line excerpt into a paragraph taller
	   than the thumbnail, and made the summary outweigh the title it was
	   supposed to support. */
	line-height: 1.45;
}

a.wps-episode__link:hover,
a.wps-episode__link:focus-visible {
	border-color: var(--wps-ink);
	background: var(--wps-surface);
}

.wps-episode.is-upcoming .wps-episode__link {
	border-style: dashed;
	cursor: default;
}

.wps-episode__media {
	display: block;
}

/* Number, state and date on one line, above the title. */
.wps-episode__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--wps-s1) var(--wps-s2);
	margin-bottom: var(--wps-s1);
	font-size: var(--wps-t-xs);
	color: var(--wps-muted);
}

.wps-episode__num {
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.08em;
	color: var(--wps-faint);
	margin: 0;
}

.wps-episode__title {
	display: block;
	font-size: var(--wps-t-lg);
	font-weight: 600;
	line-height: 1.25;
}

.wps-episode.is-upcoming .wps-episode__title {
	color: var(--wps-muted);
}

/* Two lines, whatever the episode. Unclamped, every card had a different height
   and a list of twenty-four became a wall nobody scans. */
.wps-episode__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: var(--wps-s1);
	font-size: var(--wps-t-sm);
	color: var(--wps-muted);
}

/* Below the reading width of a phone the two columns fight: an 88px image left
   the title four lines deep in a twenty-character gutter. Stacked, the title
   gets the full width and reads in two. */
@media (max-width: 600px) {
	.wps-episode__link {
		grid-template-columns: 1fr;
		gap: var(--wps-s2);
		align-items: start;
	}

	.wps-episode__title {
		font-size: var(--wps-t-md);
	}
}

.wps-body {
	margin: 0;
}

/* Focus is never removed, and never thinner than two pixels. */
.wps-nav :focus-visible,
.wps-recap :focus-visible,
.wps-teaser :focus-visible,
.wps-archive :focus-visible {
	outline: 2px solid var(--wps-focus);
	outline-offset: 2px;
}

/* Layout wrappers. min-width:0 keeps a long unbroken word from blowing the grid
   column out of the container — the classic CSS grid overflow. */
.wps-teaser__body,
.wps-episode__body,
.wps-archive__intro {
	display: block;
	min-width: 0;
}

.wps-archive__head {
	margin-bottom: var(--wps-s4);
}

/* ---------------------------------------------------------------------------
 * 5. Complements — attached to the series, outside the reading order
 * ------------------------------------------------------------------------ */

/* A bookend is an introduction or a conclusion: part of the reading order, but
   not numbered. Shown narrower than an episode so the rail still reads as a
   count of episodes. */
.wps-rail__seg--bookend {
	flex: 0 0 1.25rem;
	border-radius: 2px;
}

.wps-annexes {
	margin-top: var(--wps-s5);
	padding-top: var(--wps-s4);
	border-top: 1px solid var(--wps-line);
}

.wps-annexes__title {
	margin: 0 0 var(--wps-s1);
	font-size: var(--wps-t-lg);
}

.wps-annexes__hint {
	margin: 0 0 var(--wps-s3);
	font-size: var(--wps-t-sm);
	color: var(--wps-muted);
}

.wps-annexes__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--wps-s1);
}

.wps-annex__link {
	display: block;
	padding: var(--wps-s2) var(--wps-s3);
	border-left: 2px solid var(--wps-line);
	text-decoration: none;
	color: inherit;
}

.wps-annex__link:hover,
.wps-annex__link:focus-visible {
	border-left-color: var(--wps-ink);
	background: var(--wps-surface);
}

.wps-annex__title {
	display: block;
	font-weight: 600;
}

.wps-annex__excerpt {
	display: block;
	margin-top: var(--wps-s1);
	font-size: var(--wps-t-sm);
	color: var(--wps-muted);
}

/* Series marker on excerpts in listings. Sits above the excerpt, quiet enough
   not to compete with the post title it follows. */
.wps-listing-mark {
	margin: 0 0 var(--wps-s1);
	font-size: var(--wps-t-xs);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wps-listing-mark a {
	text-decoration: none;
	color: var(--wps-muted);
}

.wps-listing-mark a:hover,
.wps-listing-mark a:focus-visible {
	color: var(--wps-ink);
}

.wps-listing-mark__pos::before {
	content: " · ";
}

/* ---------------------------------------------------------------------------
 * 6. Detail notes
 *
 * The marker has to be visible enough to be found and quiet enough not to break
 * the line. A dotted underline is the convention readers already know from
 * dictionaries and footnotes; a button-looking control inside a sentence would
 * fight the prose.
 * ------------------------------------------------------------------------ */

.wps-note {
	position: relative;
	display: inline;
}

.wps-note__anchor {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px dotted currentColor;
	cursor: pointer;
}

.wps-note__anchor::after {
	content: "°";
	margin-left: 1px;
	font-size: 0.8em;
	vertical-align: super;
	line-height: 0;
}

.wps-note__anchor:hover,
.wps-note__anchor:focus-visible {
	border-bottom-style: solid;
	background: var(--wps-surface);
}

.wps-note.is-open > .wps-note__anchor {
	border-bottom-style: solid;
	font-weight: 600;
}

/* Already read elsewhere on the site — the reader is recognised as a regular. */
.wps-note.is-read > .wps-note__anchor::after {
	content: "✓";
	font-size: 0.7em;
}

/* Preview */

.wps-note__tip {
	position: absolute;
	left: 0;
	top: 1.6em;
	z-index: 20;
	display: block;
	width: min(22rem, 80vw);
	padding: var(--wps-s3);
	border: 1px solid var(--wps-line);
	border-radius: var(--wps-radius);
	background: var(--wps-bg);
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.12 );
	font-size: var(--wps-t-sm);
	line-height: 1.45;
	text-align: left;
}

.wps-note__tip[hidden] {
	display: none;
}

.wps-note__tip-title {
	display: block;
	font-weight: 600;
	margin-bottom: var(--wps-s1);
}

.wps-note__tip-text {
	display: block;
	color: var(--wps-muted);
	margin-bottom: var(--wps-s1);
}

.wps-note__tip-meta {
	display: block;
	font-size: var(--wps-t-xs);
	color: var(--wps-faint);
}

/* Touch pointers have no hover: the preview would either never appear or appear
   stuck. There, the first tap simply opens the note. */
@media (hover: none) {
	.wps-note__tip {
		display: none !important;
	}
}

/* Inline expansion */

.wps-note__panel {
	display: block;
	margin: var(--wps-s3) 0;
	padding: var(--wps-s3) var(--wps-s4);
	border-left: 3px solid var(--wps-ink);
	background: var(--wps-surface);
	border-radius: 0 var(--wps-radius) var(--wps-radius) 0;
	font-size: var(--wps-t-sm);
}

.wps-note__panel[hidden] {
	display: none;
}

.wps-note__panel-head {
	display: block;
	font-weight: 700;
	margin-bottom: var(--wps-s2);
}

.wps-note__panel-body {
	display: block;
}

.wps-note__panel-body > :first-child {
	margin-top: 0;
}

.wps-note__panel-body > :last-child {
	margin-bottom: 0;
}

.wps-note__panel-link {
	display: inline-block;
	margin-top: var(--wps-s2);
	font-size: var(--wps-t-xs);
}

.wps-note__loading {
	color: var(--wps-muted);
}

/* Index and backlinks */

.wps-notes-index,
.wps-backlinks {
	margin: var(--wps-s5) 0 0;
	padding-top: var(--wps-s3);
	border-top: 1px solid var(--wps-line);
	font-size: var(--wps-t-sm);
}

.wps-notes-index__title,
.wps-backlinks__title {
	margin: 0 0 var(--wps-s2);
	font-size: var(--wps-t-md);
}

.wps-notes-index__list,
.wps-backlinks__list {
	margin: 0;
	padding-left: 1.1rem;
	list-style: disc;
	line-height: 1.7;
}

@media print {
	.wps-note__tip {
		display: none;
	}

	/* A marker that cannot be clicked on paper should at least say where it goes. */
	.wps-note__anchor::after {
		content: " (note)";
		font-size: 0.85em;
		vertical-align: baseline;
	}
}

/* Complements carry a featured image like every other element of the series. */
.wps-annex.has-media .wps-annex__link {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: var(--wps-s3);
	align-items: start;
}

.wps-annex__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	aspect-ratio: var(--wps-thumb-ratio);
	object-fit: cover;
}

.wps-annex__body {
	display: block;
	min-width: 0;
}

/* ---------------------------------------------------------------------------
 * 7. Episode videos
 * ------------------------------------------------------------------------ */

.wps-videos {
	margin: var(--wps-s6) 0 0;
	padding-top: var(--wps-s4);
	border-top: 1px solid var(--wps-line);
	line-height: 1.45;
}

.wps-videos__title {
	margin: 0 0 var(--wps-s4);
	font-size: var(--wps-t-lg);
}

/* Two per row on a wide screen, one on a phone: a video card needs its width to
   stay watchable, and three abreast turns each into a stamp. */
.wps-videos__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: var(--wps-s4);
}

.wps-video {
	display: flex;
	flex-direction: column;
	gap: var(--wps-s2);
}

/* The facade. A button, so it is reachable by keyboard and announced as a
   control — an image with a click handler is neither. */
.wps-video__player {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 1px solid var(--wps-line);
	border-radius: var(--wps-radius);
	overflow: hidden;
	background: var(--wps-surface);
	cursor: pointer;
	aspect-ratio: var(--wps-thumb-ratio);
}

.wps-video__thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wps-video__play {
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%);
	display: grid;
	place-items: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 50%;
	background: rgba( 0, 0, 0, 0.72 );
	color: #fff;
	font-size: 1.1rem;
	padding-left: 0.15em;
}

.wps-video__player:hover .wps-video__play,
.wps-video__player:focus-visible .wps-video__play {
	background: rgba( 0, 0, 0, 0.9 );
}

.wps-video__player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.wps-video__name {
	margin: 0;
	font-size: var(--wps-t-md);
	font-weight: 600;
	line-height: 1.3;
}

.wps-video__name a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid var(--wps-line);
}

.wps-video__name a:hover,
.wps-video__name a:focus-visible {
	border-bottom-color: currentColor;
}

.wps-video__desc {
	margin: 0;
	font-size: var(--wps-t-sm);
	color: var(--wps-muted);
}

.wps-videos__notice {
	margin: var(--wps-s4) 0 0;
	font-size: var(--wps-t-xs);
	color: var(--wps-faint);
}

/* ---------------------------------------------------------------------------
 * 8. Head media and PDF
 *
 * The audio bar sits above the article, so it has to be inviting without
 * shouting: a reader who came to read must not feel pushed to listen. Hence a
 * single filled control on a quiet surface, and motion only where it means
 * something — the play button, and the pulse that says sound is coming out.
 * ------------------------------------------------------------------------ */

.wps-listen {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--wps-s3) var(--wps-s4);
	align-items: center;
	margin: 0 0 var(--wps-s5);
	padding: var(--wps-s3) var(--wps-s4);
	border: 1px solid var(--wps-line);
	border-radius: var(--wps-radius);
	background: var(--wps-surface);
	line-height: 1.4;
}

.wps-listen__engine {
	display: none;
}

.wps-listen__toggle {
	position: relative;
	display: grid;
	place-items: center;
	width: 3.25rem;
	height: 3.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: currentColor;
	cursor: pointer;
	transition: transform 0.15s ease;
}

.wps-listen__toggle:hover,
.wps-listen__toggle:focus-visible {
	transform: scale(1.06);
}

/* A ring that breathes while the audio plays. It is the only moving thing on
   the page, and it stops the moment playback does — motion that reports state
   rather than decorating. */
.wps-listen.is-playing .wps-listen__toggle::after {
	content: "";
	position: absolute;
	inset: -5px;
	border-radius: 50%;
	border: 2px solid currentColor;
	opacity: 0.35;
	animation: wps-pulse 2s ease-out infinite;
}

@keyframes wps-pulse {
	0%   { transform: scale(1);    opacity: 0.35; }
	70%  { transform: scale(1.28); opacity: 0; }
	100% { transform: scale(1.28); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.wps-listen.is-playing .wps-listen__toggle::after {
		animation: none;
		opacity: 0.3;
	}

	.wps-listen__toggle {
		transition: none;
	}
}

/* Triangle and bars drawn in CSS: two glyphs would depend on the theme's font
   and a sprite would be one more request for twelve pixels. */
.wps-listen__icon--play {
	width: 0;
	height: 0;
	margin-left: 3px;
	border-top: 9px solid transparent;
	border-bottom: 9px solid transparent;
	border-left: 15px solid var(--wps-bg);
}

.wps-listen__icon--pause {
	display: none;
	width: 14px;
	height: 17px;
	border-left: 4px solid var(--wps-bg);
	border-right: 4px solid var(--wps-bg);
}

.wps-listen.is-playing .wps-listen__icon--play {
	display: none;
}

.wps-listen.is-playing .wps-listen__icon--pause {
	display: block;
}

.wps-listen__body {
	min-width: 0;
}

.wps-listen__label {
	margin: 0 0 var(--wps-s1);
	font-weight: 600;
	font-size: var(--wps-t-md);
}

.wps-listen__bar {
	display: flex;
	align-items: center;
	gap: var(--wps-s2);
}

.wps-listen__seek {
	flex: 1 1 auto;
	min-width: 0;
	height: 4px;
	margin: 0;
	appearance: none;
	background: var(--wps-line);
	border-radius: 2px;
	cursor: pointer;
}

.wps-listen__seek::-webkit-slider-thumb {
	appearance: none;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: currentColor;
	border: 0;
	transition: transform 0.12s ease;
}

.wps-listen__seek:hover::-webkit-slider-thumb,
.wps-listen__seek:focus-visible::-webkit-slider-thumb {
	transform: scale(1.25);
}

.wps-listen__seek::-moz-range-thumb {
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: currentColor;
	border: 0;
}

.wps-listen__time {
	font-size: var(--wps-t-xs);
	font-variant-numeric: tabular-nums;
	color: var(--wps-muted);
	white-space: nowrap;
}

.wps-listen__sep {
	opacity: 0.5;
	margin: 0 0.15em;
}

.wps-listen__extras {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wps-s2);
	margin-top: var(--wps-s2);
	font-size: var(--wps-t-xs);
}

.wps-listen__step,
.wps-listen__rate {
	padding: 0.15rem 0.5rem;
	border: 1px solid var(--wps-line);
	border-radius: 999px;
	background: transparent;
	color: var(--wps-muted);
	font: inherit;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}

.wps-listen__step:hover,
.wps-listen__rate:hover,
.wps-listen__step:focus-visible,
.wps-listen__rate:focus-visible {
	border-color: currentColor;
	color: var(--wps-ink);
}

.wps-listen__download {
	margin-left: auto;
	color: var(--wps-muted);
	font-size: var(--wps-t-xs);
}

@media (max-width: 600px) {
	.wps-listen {
		gap: var(--wps-s2) var(--wps-s3);
		padding: var(--wps-s3);
	}

	.wps-listen__toggle {
		width: 2.75rem;
		height: 2.75rem;
	}

	.wps-listen__download {
		margin-left: 0;
	}
}

/* Video summary */

.wps-watch {
	margin: 0 0 var(--wps-s5);
}

.wps-watch__label {
	margin: 0 0 var(--wps-s2);
	font-weight: 600;
	font-size: var(--wps-t-md);
}

.wps-watch__native {
	width: 100%;
	height: auto;
	border-radius: var(--wps-radius);
	aspect-ratio: var(--wps-thumb-ratio);
	background: #000;
}

/* PDF download */

.wps-pdf {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wps-s3);
	align-items: center;
	margin: var(--wps-s5) 0 0;
	padding: var(--wps-s4);
	border: 1px solid var(--wps-line);
	border-radius: var(--wps-radius);
	background: var(--wps-surface);
	line-height: 1.45;
}

.wps-pdf.has-cover {
	grid-template-columns: minmax(0, 120px) 1fr;
	gap: var(--wps-s4);
}

/* A book cover stands up; it is not a thumbnail lying on its side. */
.wps-pdf__cover img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.16 );
	transition: transform 0.18s ease;
}

@media (prefers-reduced-motion: no-preference) {
	.wps-pdf:hover .wps-pdf__cover img {
		transform: translateY(-3px) rotate(-1deg);
	}
}

.wps-pdf__body {
	display: block;
	min-width: 0;
}

.wps-pdf__label {
	display: block;
	font-size: var(--wps-t-lg);
	font-weight: 600;
	line-height: 1.25;
}

.wps-pdf__note {
	display: block;
	margin-top: var(--wps-s1);
	font-size: var(--wps-t-sm);
	color: var(--wps-muted);
}

.wps-pdf__link {
	margin-top: var(--wps-s3);
}

.wps-pdf__size {
	opacity: 0.75;
	font-weight: 400;
}

@media (max-width: 600px) {
	.wps-pdf.has-cover {
		grid-template-columns: minmax(0, 84px) 1fr;
		gap: var(--wps-s3);
	}

	.wps-pdf__label {
		font-size: var(--wps-t-md);
	}
}

/* A complement names its role where an episode shows its number. */
.wps-episode__role {
	font-size: var(--wps-t-xs);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wps-faint);
}

/* ---------------------------------------------------------------------------
 * 9. Series index
 *
 * The card had one job it was failing: looking like something you press. It was
 * already a link, and nothing on it said so — no affordance, no motion, no verb.
 * A reader was expected to guess that the title was clickable.
 * ------------------------------------------------------------------------ */

.wps-index {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--wps-s5);
	line-height: 1.45;
}

.wps-index--cols-2 {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}

.wps-index--cols-3 {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

/* Arrival, staggered by rank. Two hundred milliseconds of difference between
   cards reads as a page settling into place rather than a list appearing. */
@media (prefers-reduced-motion: no-preference) {
	.wps-index__item {
		animation: wps-index-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
		animation-delay: calc(var(--wps-rank, 0) * 60ms);
	}
}

@keyframes wps-index-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: none; }
}

.wps-index__link {
	display: flex;
	flex-direction: column;
	gap: var(--wps-s3);
	width: 100%;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.wps-index__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--wps-radius);
	aspect-ratio: var(--wps-thumb-ratio);
	background: var(--wps-surface);
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.1 );
}

.wps-index__img,
.wps-index__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
	.wps-index__link:hover .wps-index__img,
	.wps-index__link:hover .wps-index__media img,
	.wps-index__link:focus-visible .wps-index__media img {
		transform: scale(1.05);
	}
}

/* No cover anywhere: the card draws its own mark rather than showing an empty
   grey rectangle, which reads as an image that failed to load. */
.wps-index__mark {
	display: grid;
	place-items: center;
	overflow: hidden;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(
			145deg,
			hsl(var(--wps-hue, 200) 42% 34%),
			hsl(calc(var(--wps-hue, 200) + 40) 38% 22%)
		);
	color: rgba( 255, 255, 255, 0.92 );
	font-size: clamp( 2.5rem, 7vw, 4rem );
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.wps-index__flag {
	position: absolute;
	inset: var(--wps-s2) var(--wps-s2) auto auto;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	background: rgba( 0, 0, 0, 0.72 );
	color: #fff;
	font-size: var(--wps-t-xs);
	letter-spacing: 0.04em;
}

/* The one thing worth a delight here: the site remembers a series you started.
   Written by the script from the reading state, so it says nothing to a reader
   who has read nothing — a badge everyone sees is decoration. */
.wps-index__resume {
	position: absolute;
	inset: auto var(--wps-s2) var(--wps-s2) var(--wps-s2);
	padding: 0.25rem 0.6rem;
	border-radius: var(--wps-radius);
	background: rgba( 0, 0, 0, 0.78 );
	color: #fff;
	font-size: var(--wps-t-xs);
	backdrop-filter: blur(4px);
}

.wps-index__resume[hidden] {
	display: none;
}

.wps-index__body {
	display: flex;
	flex-direction: column;
	gap: var(--wps-s1);
	min-width: 0;
}

.wps-index__title {
	display: block;
	font-size: var(--wps-t-lg);
	font-weight: 700;
	line-height: 1.2;
}

.wps-index__link:hover .wps-index__title,
.wps-index__link:focus-visible .wps-index__title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Two lines, so a long pitch cannot make one card twice the height of its
   neighbour and break the grid's rhythm. */
.wps-index__tagline {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: var(--wps-t-sm);
	color: var(--wps-muted);
}

.wps-index__facts {
	display: block;
	font-size: var(--wps-t-xs);
	color: var(--wps-faint);
	font-variant-numeric: tabular-nums;
}

/* The affordance the card never had. */
.wps-index__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: var(--wps-s1);
	font-size: var(--wps-t-sm);
	font-weight: 600;
}

.wps-index__cta-text {
	border-bottom: 1px solid currentColor;
	padding-bottom: 1px;
}

@media (prefers-reduced-motion: no-preference) {
	.wps-index__arrow {
		display: inline-block;
		transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	}

	.wps-index__link:hover .wps-index__arrow,
	.wps-index__link:focus-visible .wps-index__arrow {
		transform: translateX(4px);
	}
}

.wps-index__link:focus-visible {
	outline: 2px solid var(--wps-focus);
	outline-offset: 4px;
	border-radius: var(--wps-radius);
}

.wps-index__empty {
	color: var(--wps-muted);
}

.wps-archive--index .wps-archive__kicker {
	margin-bottom: var(--wps-s1);
}

/* ---------------------------------------------------------------------------
 * Classes rendues sans style — repérées par le vérificateur d'intégrité.
 * Aucune ne cassait la page, mais chacune laissait un élément à la merci du
 * thème : c'est exactement ainsi qu'une mise en page se met à dépendre d'un
 * thème plutôt que de l'extension.
 * ------------------------------------------------------------------------ */

.wps-episode__date {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.wps-index__item {
	display: flex;
	min-width: 0;
}

.wps-video__body {
	display: flex;
	flex-direction: column;
	gap: var(--wps-s1);
	min-width: 0;
}

/* Un appel de note à la profondeur maximale : reste un lien, sans l'affordance
   de dépliage qu'il ne peut pas honorer. */
.wps-note--flat {
	color: inherit;
	border-bottom: 1px dotted currentColor;
	text-decoration: none;
}

.wps-note--flat::after {
	content: "°";
	margin-left: 1px;
	font-size: 0.8em;
	vertical-align: super;
	line-height: 0;
}

.wps-listing-mark__series {
	font-weight: 600;
}

/* Signalé à l'auteur seul : une carte muette ne permet pas de choisir, et le
   texte manquant est à un champ de distance. */
.wps-index__missing {
	display: block;
	font-size: var(--wps-t-sm);
	font-style: italic;
	color: var(--wps-faint);
}
