/*
 * JourneyMan 1.7 styling: sharper type, the visit counter, reader tools, 3-D effects and the bookshelf.
 * Kept in its own file on purpose: it loads from a fresh address (so an old saved copy of style.css
 * can never hide it) and the theme reloads it by itself if a speed plugin ever serves a trimmed copy.
 * Loads right after style.css, so the cascade is exactly as if it were the end of that file.
 */
:root {
	--jm-wow: 181;
}

/* ==========================================================================
   26. Sharper, clearer, deeper (1.7.0)
   Same dark, warm, amber look. This layer makes small type bigger and stronger, lines crisper, buttons
   easier to hit, labels easier to read, and adds depth: cards that tilt toward the pointer, books that
   turn on a shelf, and a portrait whose layers float apart. Depth only moves for people using a mouse or
   a trackpad, and never for anyone who asked their device for less motion. Without JavaScript everything
   still reads and works.
   ========================================================================== */
:root {
	--muted: #bfbab5;
	--border: #4b4644;
	--hair: rgba(255, 244, 228, 0.16);
	--focus: #ffd36e;
	--edge: #92500a;
	--edge: color-mix(in srgb, var(--accent) 58%, #000);
}

/* ---- Crisp: quieter grain, firmer lines, stronger focus ---- */
body::before {
	opacity: 0.022;
}

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

::placeholder {
	color: #b1ada8;
	opacity: 1;
}

.card__media {
	box-shadow: 0 0 0 1px rgba(255, 244, 228, 0.14);
}

.post-meta,
.byline__author,
.byline__date {
	font-size: 12.5px;
	letter-spacing: 0.06em;
}

.byline__author {
	color: var(--text);
}

.chapter-head__eyebrow {
	color: var(--text-2);
	font-size: 13px;
	letter-spacing: 0.14em;
}

.lp-stats__label {
	color: var(--text-2);
	font-size: 12.5px;
	letter-spacing: 0.1em;
}

.footer-col__title {
	color: var(--text-2);
	font-size: 13px;
	letter-spacing: 0.12em;
}

.footer-bar {
	font-size: 14px;
}

.footer-bar__since {
	font-size: 12px;
	letter-spacing: 0.16em;
}

.section-head__link {
	font-size: 13px;
}

.card__subtitle {
	display: -webkit-box;
	color: var(--text-2);
	font-size: 15px;
	line-height: 22px;
	white-space: normal;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.entry-content a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.entry-content {
	hyphens: manual;
}

/* ---- Clear: the top bar says what its buttons do ---- */
.icon-btn__label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (min-width: 1000px) {
	.topbar__actions .icon-btn.topbar__search,
	.topbar__actions .icon-btn--share {
		display: inline-flex;
		gap: 8px;
		align-items: center;
		justify-content: center;
		width: auto;
		padding: 0 12px;
	}

	.topbar__actions .icon-btn__label {
		position: static;
		width: auto;
		height: auto;
		margin: 0;
		overflow: visible;
		clip: auto;
		font: 600 15px/20px var(--font-ui);
	}
}

/* ---- Easier to hit: 44px targets on touch screens ---- */
@media (pointer: coarse) {
	.icon-btn,
	.footer-bar__top {
		width: 44px;
		height: 44px;
	}

	.btn,
	.pill-btn,
	.tabs__btn,
	.subscribe-form__button,
	.subscribe-form__input {
		min-height: 44px;
	}

	.footer-links a,
	.footer-col a,
	.legal-links a {
		display: inline-block;
		padding-block: 8px;
	}
}

/* ---- Reading: time, size, progress ---- */
.byline__line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 14px;
}

.byline__read {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--muted);
	font: 500 12.5px/20px var(--font-meta);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.post-ufi__left {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.text-size {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px;
	border: 1px solid var(--border);
	border-radius: 999px;
}

.text-size[hidden] {
	display: none;
}

.text-size__btn {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--text-2);
	font-family: var(--font-head);
	font-weight: 700;
	line-height: 1;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.text-size__btn[data-size="s"] {
	font-size: 12px;
}

.text-size__btn[data-size="m"] {
	font-size: 15px;
}

.text-size__btn[data-size="l"] {
	font-size: 18px;
}

.text-size__btn[data-size="xl"] {
	font-size: 21px;
}

.text-size__btn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--text);
}

.text-size__btn[aria-pressed="true"] {
	background: var(--accent);
	color: var(--ink);
}

html[data-jm-size="s"] .entry-content {
	font-size: 17px;
}

html[data-jm-size="l"] .entry-content {
	font-size: 22px;
}

html[data-jm-size="xl"] .entry-content {
	font-size: 25px;
}

.read-progress {
	position: fixed;
	inset: 0 0 auto;
	z-index: 300;
	height: 2px;
	pointer-events: none;
}

.read-progress span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--accent), var(--accent-hi) 60%, #ffd36e);
	box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

.read-left {
	position: fixed;
	bottom: calc(16px + env(safe-area-inset-bottom));
	left: max(16px, env(safe-area-inset-left));
	z-index: 120;
	padding: 6px 14px;
	border: 1px solid var(--hair);
	border-radius: 999px;
	background: rgba(20, 17, 15, 0.88);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: var(--text-2);
	font: 600 13px/20px var(--font-ui);
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

.read-left[hidden] {
	display: none;
}

.jm-toast {
	position: fixed;
	bottom: calc(64px + env(safe-area-inset-bottom));
	left: 50%;
	z-index: 320;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	width: max-content;
	max-width: min(580px, calc(100vw - 24px));
	padding: 12px 12px 12px 18px;
	border: 1px solid var(--hair);
	border-radius: 14px;
	background: #171311;
	box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.8);
	color: var(--text);
	font: 500 15px/1.35 var(--font-ui);
	opacity: 0;
	transform: translate(-50%, 16px);
	transition: opacity 0.3s ease, transform 0.35s var(--ease);
}

.jm-toast.is-in {
	opacity: 1;
	transform: translate(-50%, 0);
}

.jm-toast__text {
	flex: 1 1 220px;
}

.jm-toast__btn {
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--hair);
	border-radius: 8px;
	background: transparent;
	color: var(--text);
	font: 600 14px/20px var(--font-ui);
}

.jm-toast__btn:hover {
	background: rgba(255, 255, 255, 0.08);
}

.jm-toast__btn--go {
	border-color: transparent;
	background: var(--accent);
	color: var(--ink);
}

.jm-toast__btn--go:hover {
	background: var(--accent-hi);
}

.jm-toast__x {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--muted);
	font-size: 24px;
	line-height: 1;
}

.jm-toast__x:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--text);
}

/* ---- Hooks: welcome back, keep reading, new, surprise me ---- */
.jm-return {
	display: grid;
	gap: 10px;
	margin: 0 8px 28px;
}

.jm-return[hidden] {
	display: none;
}

.jm-return__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin: 0;
	padding: 14px 18px;
	border: 1px solid var(--hair);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius);
	background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.03));
	color: var(--text);
	font: 500 16px/1.4 var(--font-ui);
}

.jm-return__title {
	font-family: var(--font-head);
}

.jm-return__pct {
	color: var(--text-2);
}

.jm-return__link {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	margin-left: auto;
	padding: 0 16px;
	border-radius: 8px;
	background: var(--accent);
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}

.jm-return__link:hover {
	background: var(--accent-hi);
	color: var(--ink);
}

.new-badge {
	display: inline-block;
	margin: 0 0 6px;
	padding: 1px 9px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--ink);
	font: 700 12px/18px var(--font-ui);
	letter-spacing: 0.04em;
}

.card--popular .new-badge,
.card--list .new-badge {
	margin-bottom: 4px;
}

.surprise-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--hair);
	border-radius: 999px;
	color: var(--text);
	font: 600 15px/20px var(--font-ui);
	text-decoration: none;
	transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.25s var(--ease);
}

.surprise-link .icon {
	color: var(--accent-hi);
	transition: transform 0.5s var(--ease);
}

.surprise-link:hover {
	border-color: var(--accent-hi);
	background: rgba(245, 158, 11, 0.09);
	box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.surprise-link:hover .icon {
	transform: rotate(180deg);
}

.surprise-link--footer {
	margin-top: 18px;
}

.lp-intro__surprise,
.post-more {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 14px;
	margin: 22px 0 0;
	color: var(--text-2);
	font: italic 400 18px/1.4 var(--font-body);
}

.post-more {
	margin: 32px 0 0;
	padding-top: 24px;
	border-top: 1px solid var(--hair);
}

/* ---- The small visit counter ---- */
.visit-counter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--text-2);
	font: 500 13px/20px var(--font-ui);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.visit-counter .icon {
	color: var(--accent-hi);
	opacity: 0.9;
}

.visit-counter__num {
	color: var(--text);
	font-weight: 700;
}

/* ---- Depth 1: the 3-D bookshelf ----
   Compact on purpose: small books, one continuous board per row, and the same neat grid on every screen
   (6 across on a computer, 4 on a tablet, 3 on a phone). The row height is fixed so the board always
   lines up with the bottom of the books. */
.lp-shelf {
	padding: 72px 0 64px;
	border-top: 1px solid var(--border);
	background: radial-gradient(900px 320px at 50% 100%, rgba(245, 158, 11, 0.1), transparent 70%), var(--bg);
}

.lp-shelf__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 28px;
	padding: 0 8px;
}

.lp-shelf__head .chapter-head {
	margin-bottom: 0;
}

.shelf-wrap {
	--bw: 108px;
	--bh: calc(var(--bw) * 1.5);
	--t: calc(var(--bw) * 0.17);
	--pad: 14px;
	--board: 14px;
	--name: 40px;
	--by: calc(var(--pad) + var(--bh) - 2px);
	--pitch: calc(var(--pad) + var(--bh) + var(--board) + var(--name) + 16px);
	/* One wooden board under every row, drawn once, so it runs the full width however many books there are. */
	background:
		linear-gradient(
			180deg,
			transparent 0,
			transparent var(--by),
			rgba(255, 244, 228, 0.22) var(--by),
			#3d3532 calc(var(--by) + 1px),
			#231e1c calc(var(--by) + 9px),
			#1a1615 calc(var(--by) + var(--board)),
			rgba(0, 0, 0, 0.5) calc(var(--by) + var(--board)),
			transparent calc(var(--by) + var(--board) + 14px),
			transparent 100%
		)
		0 0 / 100% var(--pitch) repeat-y;
}

.shelf {
	display: grid;
	grid-template-columns: repeat(var(--cols-d, 6), minmax(0, 1fr));
	max-width: calc(var(--cols-d, 6) * 164px);
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.shelf__slot {
	position: relative;
	box-sizing: border-box;
	height: var(--pitch);
	margin: 0;
	padding: var(--pad) 6px 0;
	list-style: none;
}

.book {
	position: relative;
	display: block;
	color: var(--text);
	text-decoration: none;
}

.shelf__stage {
	position: relative;
	z-index: 1;
	display: block;
	width: var(--bw);
	height: var(--bh);
	margin: 0 auto;
	perspective: 900px;
}

/* Soft shadow on the board under the book. */
.shelf__stage::before {
	position: absolute;
	right: -8%;
	bottom: -4px;
	left: 4%;
	height: 12px;
	background: radial-gradient(closest-side, rgba(0, 0, 0, 0.7), transparent);
	content: "";
	filter: blur(3px);
	transition: transform 0.5s var(--ease), opacity 0.5s ease;
}

.book__3d {
	--base: 24deg;
	position: absolute;
	inset: 0;
	display: block;
	transform: translate3d(0, var(--lift, 0px), var(--pop, 0px)) rotateX(calc(-4deg + var(--rx, 0deg))) rotateY(calc(var(--base) + var(--ry, 0deg)));
	transform-style: preserve-3d;
	transition: transform 0.6s var(--ease);
}

.book__face {
	position: absolute;
	display: block;
	backface-visibility: hidden;
}

.book__cover {
	inset: 0;
	overflow: hidden;
	border-radius: 2px 5px 5px 2px;
	background: var(--bg-elev);
	box-shadow: 0 0 0 1px rgba(255, 244, 228, 0.1);
	transform: translateZ(calc(var(--t) / 2));
}

.book__cover::after {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 4%;
	width: 2px;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.4), rgba(255, 255, 255, 0.14));
	content: "";
}

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

.book__blank {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 100%;
	padding: 8px 6px 8px 10px;
	background: linear-gradient(160deg, #5a4630, #2a2017 70%);
	color: #fbe9c6;
	font: 700 clamp(10px, calc(var(--bw) * 0.125), 14px) / 1.25 var(--font-head);
	text-align: center;
	text-wrap: balance;
	overflow-wrap: anywhere;
}

.book__shine {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at var(--gx, 25%) var(--gy, 15%), rgba(255, 255, 255, 0.34), transparent 58%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.book__spine {
	top: 0;
	bottom: 0;
	left: calc(var(--t) / -2);
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--t);
	overflow: hidden;
	border-radius: 2px 0 0 2px;
	background: linear-gradient(90deg, #2b1d0d, #5b3a12 45%, #34230f);
	transform: rotateY(-90deg);
}

.book__spine-title {
	max-height: 88%;
	overflow: hidden;
	color: #f3d9a8;
	font: 700 calc(var(--t) * 0.5) / 1 var(--font-head);
	letter-spacing: 0.04em;
	text-overflow: ellipsis;
	white-space: nowrap;
	-webkit-writing-mode: vertical-rl;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
}

.book__pages {
	top: 1.2%;
	right: calc(var(--t) / -2);
	bottom: 1.2%;
	width: var(--t);
	background: repeating-linear-gradient(90deg, #f1e8d6 0 2px, #d9cdb5 2px 3px);
	transform: rotateY(90deg);
}

.book__top {
	top: calc(var(--t) / -2);
	right: 0;
	left: 0;
	height: var(--t);
	background: repeating-linear-gradient(0deg, #ede3cf 0 2px, #d3c7ad 2px 3px);
	transform: rotateX(90deg);
}

.book__back {
	inset: 0;
	background: #2a1f14;
	transform: translateZ(calc(var(--t) / -2)) rotateY(180deg);
}

/* The title under each book: two lines at most, so every row stays the same height. */
.book__name {
	display: -webkit-box;
	height: var(--name);
	margin-top: calc(var(--board) + 6px);
	padding: 0 6px;
	overflow: hidden;
	color: var(--text-2);
	font: 600 14px/1.35 var(--font-ui);
	text-align: center;
	text-wrap: balance;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.book:hover .book__name,
.book:focus-visible .book__name {
	color: var(--accent-soft);
}

.book:hover .book__3d,
.book:focus-visible .book__3d {
	--base: -6deg;
	--lift: -8px;
	--pop: 20px;
}

.book:hover .book__shine,
.book:focus-visible .book__shine {
	opacity: 1;
}

.book:hover .shelf__stage::before,
.book:focus-visible .shelf__stage::before {
	opacity: 0.55;
	transform: translateY(5px) scaleX(0.86);
}

.book.is-tilting .book__3d {
	transition-duration: 0.12s;
	transition-timing-function: linear;
}

.book:focus-visible {
	outline-offset: 6px;
}

/* Tablet: four across. */
@media (max-width: 999px) {
	.shelf-wrap {
		--bw: 100px;
	}

	.shelf {
		grid-template-columns: repeat(var(--cols-t, 4), minmax(0, 1fr));
		max-width: calc(var(--cols-t, 4) * 160px);
	}
}

/* Phone: three across, small books, a short shelf. Only the first nine show; "See all books" has the rest. */
@media (max-width: 699px) {
	.lp-shelf {
		padding: 48px 0 44px;
	}

	.lp-shelf__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		margin-bottom: 20px;
	}

	.shelf-wrap {
		--bw: clamp(64px, 21vw, 88px);
		--name: 36px;
		--pad: 10px;
	}

	.shelf {
		grid-template-columns: repeat(var(--cols-m, 3), minmax(0, 1fr));
		max-width: none;
	}

	.shelf__slot {
		padding-right: 4px;
		padding-left: 4px;
	}

	.shelf__slot:nth-child(n + 10) {
		display: none;
	}

	.book__name {
		font-size: 13px;
	}
}

/* On a touch screen the books stand at an angle and rock gently, so the shelf still feels alive. */
@media (hover: none) and (prefers-reduced-motion: no-preference) {
	@keyframes jm-rock {
		from {
			transform: translate3d(0, 0, 0) rotateX(-4deg) rotateY(18deg);
		}

		to {
			transform: translate3d(0, -3px, 8px) rotateX(-4deg) rotateY(30deg);
		}
	}

	.book__3d {
		animation: jm-rock 4.8s ease-in-out calc(var(--i, 0) * -0.9s) infinite alternate;
	}
}

/* ---- Depth 2: cards and the portrait lean toward the pointer ---- */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.has-fx3d .card--feature,
	.has-fx3d .card--grid,
	.has-fx3d .card--stack {
		isolation: auto;
		transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
		transform-style: preserve-3d;
		transition: transform 0.55s var(--ease), box-shadow 0.3s var(--ease), background-color 0.25s ease;
	}

	.has-fx3d .card--feature .card__media,
	.has-fx3d .card--grid .card__media,
	.has-fx3d .card--stack .card__media,
	.has-fx3d .card--feature .card__body,
	.has-fx3d .card--grid .card__body,
	.has-fx3d .card--stack .card__body {
		transition: transform 0.55s var(--ease), box-shadow 0.4s ease;
	}

	.has-fx3d .card--feature.is-tilting,
	.has-fx3d .card--grid.is-tilting,
	.has-fx3d .card--stack.is-tilting {
		--lift: -4px;
		transition-duration: 0.1s, 0.3s, 0.25s;
		transition-timing-function: linear, var(--ease), ease;
		box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3), 0 30px 50px -26px rgba(0, 0, 0, 0.9);
	}

	.has-fx3d .card.is-tilting .card__media {
		transform: translateZ(34px);
		box-shadow: 0 0 0 1px rgba(255, 244, 228, 0.2), 0 22px 32px -14px rgba(0, 0, 0, 0.75);
	}

	.has-fx3d .card.is-tilting .card__body {
		transform: translateZ(16px);
	}

	/* A glint slides across the picture where the pointer is. */
	.has-fx3d .card--feature .card__media,
	.has-fx3d .card--grid .card__media,
	.has-fx3d .card--stack .card__media {
		position: relative;
	}

	.has-fx3d .card--feature .card__media::after,
	.has-fx3d .card--grid .card__media::after,
	.has-fx3d .card--stack .card__media::after {
		position: absolute;
		inset: 0;
		background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, 0.22), transparent 55%);
		content: "";
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.3s ease;
	}

	.has-fx3d .card.is-tilting .card__media::after {
		opacity: 1;
	}

	/* The portrait: the frame sits behind, the name tag floats in front. */
	.has-fx3d .lp-about__media,
	.has-fx3d .lp-about__frame {
		transform-style: preserve-3d;
	}

	.has-fx3d .lp-about__media.is-tilting {
		transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
		transition-duration: 0.1s;
		transition-timing-function: linear;
	}

	.has-fx3d .lp-about__frame::before {
		transform: translateZ(-36px);
	}

	.has-fx3d .lp-about__frame:hover::before {
		transform: translate3d(-6px, -6px, -36px);
	}

	.has-fx3d .lp-about__caption {
		transform: translateZ(54px);
	}

	.has-fx3d .lp-about__img {
		transform: translateZ(0);
	}

	/* Story rows (blog, search, archives): the thumbnail leans and catches a glint, like the cards on the homepage. */
	.has-fx3d .card--list .card__media {
		position: relative;
		transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
		transition: transform 0.5s var(--ease), box-shadow 0.4s ease;
	}

	.has-fx3d .card--list .card__media.is-tilting {
		box-shadow: 0 0 0 1px rgba(255, 244, 228, 0.2), 0 18px 28px -12px rgba(0, 0, 0, 0.8);
		transition-duration: 0.1s, 0.3s;
		transition-timing-function: linear, ease;
	}

	/* One glint, used by every flat panel that tilts (story thumbnails, Press Box tiles). */
	.has-fx3d .card--list .card__media::after,
	.has-fx3d .pbx-deck::after,
	.has-fx3d .pbx-starcard::after {
		position: absolute;
		inset: 0;
		background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, 0.22), transparent 58%);
		content: "";
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.3s ease;
	}

	.has-fx3d .card--list .card__media.is-tilting::after,
	.has-fx3d .pbx-deck.is-tilting::after,
	.has-fx3d .pbx-starcard.is-tilting::after {
		opacity: 1;
	}

	/* Press Box: the "Latest interview" card and the Five Stars tiles lean toward the pointer too. */
	.has-fx3d .pbx-deck,
	.has-fx3d .pbx-starcard {
		position: relative;
		transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
		transition: transform 0.5s var(--ease);
	}

	.has-fx3d .pbx-deck.is-tilting,
	.has-fx3d .pbx-starcard.is-tilting {
		transition-duration: 0.1s;
		transition-timing-function: linear;
	}
}

/* ---- Depth 3: the main buttons are keys you press ---- */
.has-fx3d .btn--accent {
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 3px 0 var(--edge), 0 10px 22px -8px rgba(217, 119, 6, 0.7);
	transform: translateY(0);
}

.has-fx3d .btn--accent:hover {
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 0 var(--edge), 0 14px 28px -8px rgba(245, 158, 11, 0.8);
	transform: translateY(-1px);
}

.has-fx3d .btn--accent:active {
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 0 var(--edge), 0 4px 10px -6px rgba(217, 119, 6, 0.6);
	transform: translateY(3px);
}

/* ---- Reduced motion: no tilt, no rocking, no glints ---- */
@media (prefers-reduced-motion: reduce) {
	.book__3d {
		transition: none;
		animation: none;
	}

	.read-left,
	.jm-toast {
		transition: none;
	}
}

/* ---- Higher contrast on request ---- */
@media (prefers-contrast: more) {
	:root {
		--muted: #dcd8d3;
		--border: #8a8380;
		--hair: rgba(255, 244, 228, 0.4);
	}

	.card__media,
	.btn--outline,
	.pill-btn {
		border: 1px solid var(--hair);
	}
}

@media (forced-colors: active) {
	.btn,
	.pill-btn,
	.text-size__btn,
	.surprise-link,
	.jm-return__link,
	.jm-toast__btn {
		border: 1px solid ButtonText;
	}

	.text-size__btn[aria-pressed="true"] {
		outline: 2px solid Highlight;
	}
}

/* ---- Comment form heading: always there for screen readers, shown when replying to someone ---- */
.comment-respond > .comment-reply-title {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.comment-list .comment-respond > .comment-reply-title {
	position: static;
	width: auto;
	height: auto;
	margin: 0 0 12px;
	overflow: visible;
	clip: auto;
	white-space: normal;
}

@media (max-width: 560px) {
	.jm-toast {
		width: calc(100vw - 24px);
		padding: 14px 12px 12px 16px;
	}

	.jm-toast__text {
		flex-basis: 100%;
	}

	.jm-toast__x {
		margin-left: auto;
	}
}

/* ==========================================================================
   29. Listen to this story (1.8.0)
   The voiceover player under the byline, and the small "Listen" mark on cards of stories that have one.
   ========================================================================== */
.listen {
	margin: 22px 0 6px;
	padding: 14px 16px 12px;
	border: 1px solid var(--hair);
	border-radius: 14px;
	background:
		radial-gradient(120% 140% at 0% 0%, rgba(245, 158, 11, 0.13), transparent 58%),
		linear-gradient(180deg, rgba(255, 244, 228, 0.05), rgba(255, 244, 228, 0.02)), var(--bg-elev);
	box-shadow: inset 0 1px 0 rgba(255, 244, 228, 0.1), 0 10px 26px -16px rgba(0, 0, 0, 0.7);
}

.listen__top {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.listen__badge {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: radial-gradient(circle at 32% 26%, var(--accent-hi), var(--accent) 62%, var(--edge));
	color: #1c1410;
	box-shadow: 0 6px 14px -6px rgba(245, 158, 11, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.listen__text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	line-height: 1.25;
}

.listen__title {
	color: var(--text);
	font: 600 16px/1.25 var(--font-head);
}

.listen__len {
	margin-top: 2px;
	color: var(--muted);
	font: 500 12.5px/1.3 var(--font-meta);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.listen__tools {
	display: inline-flex;
	flex: 0 0 auto;
	gap: 6px;
}

.listen__tools[hidden] {
	display: none;
}

.listen__btn {
	min-width: 48px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: transparent;
	color: var(--text-soft);
	font: 600 13px/1 var(--font-meta);
	cursor: pointer;
	transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.listen__btn:hover {
	border-color: var(--accent);
	background: rgba(245, 158, 11, 0.12);
	color: var(--text);
}

.listen__btn:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

.listen__audio {
	display: block;
	width: 100%;
	height: 42px;
	color-scheme: dark;
}

.post-meta__listen {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--accent-soft);
}

.post-meta__listen .icon {
	flex: none;
}

.card--popular .post-meta__listen span {
	display: none;
}

@media (max-width: 560px) {
	.listen {
		margin-top: 18px;
		padding: 12px 12px 10px;
		border-radius: 12px;
	}

	.listen__badge {
		width: 36px;
		height: 36px;
	}

	.listen__btn {
		min-width: 44px;
		height: 40px;
	}
}

/* ==========================================================================
   30. Footer banner (1.8.0)
   A centered strip between the footer columns and the copyright line. The picture is a see-through PNG
   made for a dark page, so it sits straight on the footer with no frame or panel, at about its natural size
   (never stretched) so the lettering stays sharp. The figure stands on the line above the copyright bar.
   ========================================================================== */
.footer-banner {
	border-top: 1px solid var(--border);
	background: var(--bg-deep);
}

.footer-banner[hidden] {
	display: none;
}

.footer-banner__inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 40px var(--gutter) 0;
}

.footer-banner__frame {
	display: block;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	line-height: 0;
	transition: filter 0.25s ease;
}

a.footer-banner__frame:hover {
	filter: brightness(1.12) drop-shadow(0 0 18px rgba(245, 158, 11, 0.28));
}

a.footer-banner__frame:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 4px;
}

.footer-banner__img {
	display: block;
	width: 100%;
	height: auto;
	image-rendering: auto;
}

@media (max-width: 700px) {
	.footer-banner__inner {
		padding-top: 28px;
	}
}
