/* Podcast Maker — front-end styles.
   Themes style buttons and links heavily, so resets on interactive elements are
   deliberately forced. Layout rules are plain. */

/* The tint covers the whole page, not just the article column. `clip` keeps the
   full-bleed foot bar below from creating a horizontal scrollbar. */
body.pm-page {
	background-color: var(--pm-bg, #d7dcdc);
	overflow-x: clip;
}

body.pm-page #page,
body.pm-page #content,
body.pm-page .site,
body.pm-page .site-content,
body.pm-page main,
body.pm-page article {
	background-color: transparent;
}

.pm-wrap {
	--pm-accent: #f2ba4d;
	--pm-text: #413d3d;
	--pm-muted: #6f6b6b;
	--pm-bg: #d7dcdc;
	--pm-line: #a9b0b0;
	--pm-orange: #d95b2b;
	--pm-brand: #7d232c;

	--pm-font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--pm-font-head: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	/* Layout dials — the rail, the gap either side of the divider, and the
	   height of the "All Episodes" link that the right column drops past. */
	--pm-rail: 515px;
	--pm-gap: 44px;
	--pm-back-h: 24px;
	--pm-back-gap: 22px;
	--pm-door-gap: 30px;
	--pm-pad: 40px;

	/* How far the hinge sits from the left edge of the content column. The
	   rule is cut for exactly the width of the hinge. */
	--pm-door-pos: 368px;

	max-width: 1380px;
	margin: 0 auto;
	padding: 34px var(--pm-pad) 0;
	background: transparent;
	color: var(--pm-text);
	font-family: var(--pm-font-body);
	line-height: 1.55;
}

.pm-wrap *,
.pm-wrap *::before,
.pm-wrap *::after {
	box-sizing: border-box;
}

/* -------------------------------------------------- top rule with the door */

.pm-doorline {
	position: relative;
	height: 37px;
	margin-bottom: var(--pm-door-gap);
	color: var(--pm-line);
	pointer-events: none;
}

/* The rule itself runs edge to edge; the box above stays aligned to the
   content column so the hinge can be placed against the layout. */
.pm-doorline::after {
	content: "";
	position: absolute;
	left: calc(50% - 50vw);
	right: calc(50% - 50vw);
	bottom: 0;
	height: 1px;
	background: var(--pm-line);
}

/* Sits on top of the rule and paints it out for its own width, so the line
   breaks and picks up again either side of the hinge. */
.pm-door {
	position: absolute;
	z-index: 1;
	left: var(--pm-door-pos, 368px);
	bottom: 0;
	display: block;
	overflow: visible;
	background: var(--pm-bg, #d7dcdc);
}

/* ------------------------------------------------------------------- layout */

.pm-grid {
	display: grid;
	grid-template-columns: var(--pm-rail) minmax(0, 1fr);
	column-gap: calc(var(--pm-gap) * 2);
	align-items: start;
	position: relative;
}

/* The hairline between the columns. It runs up through the gap below the door
   rule so the two meet at a clean corner. */
.pm-grid::before {
	content: "";
	position: absolute;
	top: calc(var(--pm-door-gap) * -1);
	bottom: 0;
	left: calc(var(--pm-rail) + var(--pm-gap));
	width: 1px;
	background: var(--pm-line);
}

.pm-wrap .pm-episode {
	margin-top: 0;
}

.pm-rail {
	padding: 0 0 60px;
	position: sticky;
	top: 24px;
}

/* Drops the right column past the "All Episodes" link so the eyebrow lines up
   with the top edge of the cover art. */
.pm-main {
	padding: calc(var(--pm-back-h) + var(--pm-back-gap)) 0 72px;
	min-width: 0;
}

/* ---------------------------------------------------------------- back link */

.pm-wrap a.pm-back {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	height: var(--pm-back-h);
	margin-bottom: var(--pm-back-gap);
	font-size: 14px;
	font-weight: 500;
	color: var(--pm-text) !important;
	text-decoration: none !important;
}

.pm-arrow {
	display: inline-block;
	position: relative;
	width: 26px;
	height: 1px;
	background: currentColor;
	flex: 0 0 auto;
	transition: transform .22s ease;
}

.pm-arrow::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 8px;
	height: 8px;
	border-left: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: translateY(-50%) rotate(45deg);
}

.pm-arrow--right::before {
	left: auto;
	right: 0;
	border-left: 0;
	border-bottom: 1px solid currentColor;
	border-right: 1px solid currentColor;
	transform: translateY(-50%) rotate(-45deg);
}

/* Nudge in the direction of travel rather than stretching. */
.pm-wrap a:hover > .pm-arrow,
.pm-wrap a:focus-visible > .pm-arrow {
	transform: translateX(-5px);
}

.pm-wrap a:hover > .pm-arrow--right,
.pm-wrap a:focus-visible > .pm-arrow--right {
	transform: translateX(5px);
}

@media (prefers-reduced-motion: reduce) {
	.pm-arrow {
		transition: none;
	}
}

/* --------------------------------------------------------------- cover art */

.pm-cover {
	margin: 0 0 20px;
	line-height: 0;
	max-width: var(--pm-rail);
}

.pm-cover img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

/* ------------------------------------------------------------------- terms */

.pm-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 26px;
	margin: 0 0 34px;
}

.pm-wrap .pm-terms .pm-term,
.pm-wrap .pm-terms a.pm-term {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--pm-font-body);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--pm-text) !important;
	text-decoration: none !important;
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
}

.pm-term-mark {
	width: 10px;
	height: 10px;
	background: var(--pm-accent);
	flex: 0 0 auto;
}

.pm-wrap .pm-terms .pm-term:hover .pm-term-name {
	border-bottom: 1px solid var(--pm-text);
}

/* ---------------------------------------------------------------- listen on */

.pm-listen {
	margin: 0 0 34px;
}

.pm-listen-label {
	margin: 0 0 16px;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--pm-brand);
}

/* All three marks share one line — they shrink rather than wrap. */
.pm-listen-links {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

/* One brand colour for all three marks, matching the design. */
.pm-wrap a.pm-listen-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	white-space: nowrap;
	font-family: var(--pm-font-body);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--pm-brand) !important;
	text-decoration: none !important;
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
}

.pm-listen-icon {
	display: inline-flex;
	flex: 0 0 auto;
	color: var(--pm-brand);
}

.pm-listen-icon svg {
	width: 21px;
	height: 21px;
	display: block;
	fill: currentColor;
}

.pm-wrap a.pm-listen-link:hover,
.pm-wrap a.pm-listen-link:focus-visible {
	color: var(--pm-brand) !important;
	opacity: .78;
}

/* ----------------------------------------------------------------- eyebrow */

.pm-eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 14px;
	font-family: var(--pm-font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.pm-eyebrow-show {
	color: var(--pm-text);
}

.pm-eyebrow-number {
	color: var(--pm-orange);
}

/* ------------------------------------------------------------------- title */

.pm-wrap .pm-title {
	font-family: var(--pm-font-head);
	font-size: clamp(30px, 3.2vw, 42px);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.1;
	margin: 0 0 14px;
	color: var(--pm-text);
}

.pm-dates {
	margin: 0 0 34px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--pm-text);
}

.pm-dates-sep {
	margin: 0 8px;
	color: var(--pm-muted);
}

/* --------------------------------------------------------------- guest + body */

.pm-guest {
	margin: 0 0 24px;
	width: 167px;
	line-height: 0;
}

.pm-guest img {
	width: 100%;
	height: auto;
	display: block;
}

.pm-body {
	font-size: 16px;
	line-height: 1.6;
	max-width: 66ch;
}

.pm-body > p:first-child {
	margin-top: 0;
}

.pm-body p {
	margin: 0 0 15px;
}

.pm-body a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.pm-note {
	margin: 18px 0 0;
	color: var(--pm-text);
}

/* ------------------------------------------------ in this episode, we cover */

/* The rule stays inside the right column — it stops short of the vertical
   divider rather than running into it. */
.pm-main .pm-section {
	border-top: 1px solid var(--pm-line);
	margin: 46px 0 0;
	padding: 24px 0 0;
}

/* A matching hairline under the heading, so the label is banded between two
   rules of identical width. */
.pm-covers-title {
	font-family: var(--pm-font-body);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	margin: 0 0 20px;
	padding: 0 0 20px;
	border-bottom: 1px solid var(--pm-line);
	color: var(--pm-text);
}

.pm-covers-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pm-covers-list li {
	position: relative;
	padding-left: 22px;
	margin: 0 0 12px;
	font-size: 15.5px;
	line-height: 1.5;
}

.pm-covers-list li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 9px;
	width: 4px;
	height: 4px;
	background: var(--pm-text);
	border-radius: 50%;
}

.pm-wrap .pm-seek,
.pm-wrap button.pm-seek {
	display: inline !important;
	width: auto !important;
	height: auto !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 3px 0 0 !important;
	font: inherit !important;
	text-transform: none !important;
	color: var(--pm-text) !important;
	cursor: pointer;
	box-shadow: none !important;
	border-bottom: 1px solid transparent !important;
	-webkit-appearance: none;
	appearance: none;
}

.pm-wrap .pm-seek:hover,
.pm-wrap .pm-seek:focus-visible {
	border-bottom-color: var(--pm-accent) !important;
	background: none !important;
}

.pm-time {
	margin-right: 3px;
}

/* -------------------------------------------------------- transcript in rail */

.pm-rail .pm-transcript {
	border-top: 1px solid var(--pm-line);
	border-bottom: 1px solid var(--pm-line);
	margin: 0;
	padding: 0;
	max-width: var(--pm-rail);
}

.pm-wrap .pm-transcript-toggle,
.pm-wrap button.pm-transcript-toggle {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 20px;
	width: 100% !important;
	max-width: none !important;
	height: auto !important;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	padding: 20px 0 !important;
	margin: 0 !important;
	font-family: var(--pm-font-body) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: .08em !important;
	line-height: 1.2 !important;
	text-transform: uppercase !important;
	color: var(--pm-text) !important;
	cursor: pointer;
	text-align: left !important;
	text-decoration: none !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
	transition: none;
}

.pm-wrap .pm-transcript-toggle:hover,
.pm-wrap .pm-transcript-toggle:focus,
.pm-wrap .pm-transcript-toggle:active,
.pm-wrap button.pm-transcript-toggle:hover,
.pm-wrap button.pm-transcript-toggle:focus,
.pm-wrap button.pm-transcript-toggle:active {
	background: none !important;
	background-color: transparent !important;
	color: var(--pm-text) !important;
	transform: none !important;
	box-shadow: none !important;
}

.pm-wrap .pm-transcript-toggle:focus-visible {
	outline: 2px solid var(--pm-accent);
	outline-offset: 2px;
}

.pm-wrap .pm-transcript-icon {
	flex: 0 0 auto;
	font-size: 24px !important;
	font-weight: 300 !important;
	line-height: 1 !important;
	color: var(--pm-text) !important;
	transition: transform .2s ease;
}

.pm-wrap .pm-transcript-toggle[aria-expanded="true"] .pm-transcript-icon {
	transform: rotate(45deg);
}

.pm-wrap .pm-transcript-body {
	padding: 4px 0 24px;
	font-size: 14.5px;
	line-height: 1.6;
	max-height: 60vh;
	overflow-y: auto;
}

/* Themes that set `display` on divs beat the browser's [hidden] rule. */
.pm-wrap .pm-transcript-body[hidden] {
	display: none !important;
}

/* --------------------------------------------------------------- foot bar */

/* Full-bleed: escapes the wrapper's max-width so the bar reaches both edges. */
.pm-footbar {
	background: var(--pm-accent);
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 0 40px;
}

.pm-footbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: 1300px;
	margin: 0 auto;
	min-height: 66px;
	padding: 14px 0;
}

.pm-wrap a.pm-footbar-link {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	font-family: var(--pm-font-body);
	font-size: 15px;
	font-weight: 600;
	color: var(--pm-text) !important;
	text-decoration: none !important;
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	line-height: 1.3;
}

.pm-footbar-next {
	text-align: right;
}

.pm-comments {
	padding: 40px 0 60px;
}

/* ----------------------------------------------------------------- archive */

.pm-archive-header {
	margin-bottom: 36px;
}

.pm-archive-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 48px 36px;
	padding-bottom: 60px;
}

.pm-card-media img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

.pm-card-title {
	font-family: var(--pm-font-head);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
	margin: 16px 0 8px;
}

.pm-card-title a {
	color: var(--pm-text);
	text-decoration: none;
}

.pm-card-excerpt {
	font-size: 15px;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1280px) {
	.pm-wrap {
		--pm-rail: 400px;
		--pm-gap: 36px;
		--pm-pad: 28px;
		--pm-door-pos: 287px;
	}

	.pm-footbar {
		padding: 0 28px;
	}
}

@media (max-width: 900px) {
	.pm-wrap {
		--pm-gap: 0px;
		--pm-door-gap: 22px;
		--pm-pad: 18px;
		--pm-door-pos: 30%;
		padding-top: 24px;
	}

	.pm-doorline {
		height: 26px;
	}

	.pm-door {
		width: 26px;
		height: 14px;
	}

	/* One column, and the rail's children become grid items in their own
	   right so the transcript can be ordered past the episode body. */
	.pm-grid {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		column-gap: 0;
	}

	/* Blockified by the flex context — keep it to its own width. */
	.pm-wrap a.pm-back {
		align-self: flex-start;
	}

	.pm-grid::before {
		display: none;
	}

	.pm-rail {
		display: contents;
	}

	.pm-cover,
	.pm-rail .pm-transcript {
		max-width: none;
	}

	/* Title and description sit straight after the listen row; the
	   transcript drops below "In this episode, we cover". */
	.pm-main {
		order: 1;
		padding-top: 32px;
		padding-bottom: 36px;
		border-top: 1px solid var(--pm-line);
		margin-top: 32px;
	}

	.pm-rail .pm-transcript {
		order: 2;
		margin-bottom: 40px;
	}

	/* The rail no longer closes with a rule of its own, so the transcript's
	   own bottom border is the only line under it. */
	.pm-listen {
		margin-bottom: 0;
	}

	.pm-footbar {
		padding: 0 18px;
	}

	.pm-footbar-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.pm-footbar-next {
		text-align: left;
		flex-direction: row-reverse;
	}
}

/* Narrow phones: the three marks still share a line, just tighter. */
@media (max-width: 420px) {
	.pm-listen-links {
		gap: 10px;
	}

	.pm-wrap a.pm-listen-link {
		gap: 6px;
		font-size: 13px;
	}

	.pm-listen-icon svg {
		width: 18px;
		height: 18px;
	}
}
