/*
 * Episode Bios.
 * Out of the box this follows your theme's font and text color. The Appearance screen sets the
 * --epb-* variables on each block (inline) and adds the --modifier classes used below.
 */

.epb {
	--epb-accent: #1d4ed8;
	--epb-accent-text: #ffffff;
	box-sizing: border-box;
	margin: 2em 0;
	max-width: var(--epb-maxw, none);
	padding: var(--epb-pad, 0);
	background: var(--epb-bg, transparent);
	border: var(--epb-bw, 0) solid var(--epb-border, rgba(128, 128, 128, 0.35));
	border-radius: var(--epb-radius, 0);
	font: inherit;
	font-family: var(--epb-font, inherit);
	line-height: 1.5;
	color: var(--epb-text, inherit);
}

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

.epb [hidden] {
	display: none !important;
}

.epb--center {
	margin-left: auto;
	margin-right: auto;
}

.epb--shadow {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}

/* ---- Headings ----------------------------------------------------------- */

.epb .epb__group + .epb__group {
	margin-top: 2em;
}

.epb .epb__heading {
	margin: 0 0 0.9em;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: var(--epb-h-size, 120%);
	font-weight: 700;
	line-height: 1.25;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
}

.epb--center .epb__heading {
	text-align: center;
}

.epb--caps .epb__heading {
	font-size: calc(var(--epb-h-size, 120%) * 0.72);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--epb-accent);
}

.epb--no-headings .epb__heading {
	display: none;
}

/* ---- The grid ----------------------------------------------------------- */

.epb .epb__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--epb-card-min, 220px)), 1fr));
	gap: var(--epb-gap, 20px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.epb--center .epb__list {
	justify-content: center;
}

.epb .epb__person {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	min-width: 0;
	margin: 0;
	padding: var(--epb-card-pad, 20px);
	background: var(--epb-card-bg, transparent);
	border: var(--epb-card-bw, 1px) solid var(--epb-card-border, rgba(128, 128, 128, 0.3));
	border-radius: var(--epb-card-radius, 12px);
	list-style: none;
}

.epb .epb__person::before,
.epb .epb__person::marker {
	content: none;
}

.epb--card-shadow .epb__person {
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}

.epb--center .epb__person {
	align-items: center;
	text-align: center;
}

/* Rows: the headshot sits beside the bio, and drops above it when there is no room. */
.epb--rows .epb__list {
	grid-template-columns: minmax(0, 1fr);
}

.epb--rows .epb__person,
.epb--compact .epb__person {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 14px 18px;
}

.epb--rows.epb--center .epb__person,
.epb--compact.epb--center .epb__person {
	justify-content: center;
}

/* Compact: smaller headshots, two or more columns. */
.epb--compact .epb__list {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--epb-card-min, 220px), 300px)), 1fr));
}

.epb--compact .epb__photo {
	--_s: min(var(--epb-photo, 112px), 80px);
}

/* Featured hosts: larger, one per row, above the guests. */
.epb--feature-hosts .epb__group--host .epb__list {
	grid-template-columns: minmax(0, 1fr);
}

.epb--feature-hosts .epb__group--host .epb__person {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 24px;
}

.epb--feature-hosts.epb--center .epb__group--host .epb__person {
	justify-content: center;
}

.epb--feature-hosts .epb__group--host .epb__photo {
	--_s: var(--epb-host-photo, 160px);
}

/* ---- Headshots ---------------------------------------------------------- */

.epb .epb__photo {
	--_s: var(--epb-photo, 112px);
	position: relative;
	flex: none;
	width: var(--_s);
	max-width: 100%;
	margin: 0;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 50%;
	background: rgba(128, 128, 128, 0.18);
}

.epb--shape-rounded .epb__photo {
	border-radius: 18%;
}

.epb--shape-square .epb__photo {
	border-radius: 0;
}

.epb--shape-portrait .epb__photo {
	aspect-ratio: 4 / 5;
	border-radius: 12px;
}

.epb--ring .epb__photo {
	outline: 3px solid var(--epb-accent);
	outline-offset: 3px;
}

.epb .epb__photo img,
.epb .epb__photo .epb__img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
}

.epb--gray .epb__photo img,
.epb--gray-hover .epb__photo img {
	filter: grayscale(1);
}

.epb--gray-hover .epb__photo img {
	transition: filter 0.3s ease;
}

.epb--gray-hover .epb__person:hover .epb__photo img,
.epb--gray-hover .epb__person:focus-within .epb__photo img {
	filter: none;
}

.epb .epb__initials {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--epb-accent);
	color: var(--epb-accent-text);
	font-size: calc(var(--_s) * 0.34);
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
}

.epb--no-initials .epb__photo--empty {
	display: none;
}

/* ---- Name, title, bio --------------------------------------------------- */

.epb .epb__body {
	flex: 1 1 14em;
	min-width: 0;
}

.epb .epb__name {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: var(--epb-name-size, 115%);
	font-weight: var(--epb-name-weight, 700);
	line-height: 1.25;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
}

.epb .epb__title {
	margin: 0.25em 0 0;
	font-size: 0.9em;
	line-height: 1.4;
	color: inherit;
	opacity: 0.75;
}

@supports (color: color-mix(in srgb, red, blue)) {
	.epb .epb__title {
		color: var(--epb-muted, color-mix(in srgb, currentColor 72%, transparent));
		opacity: 1;
	}
}

.epb--no-titles .epb__title {
	display: none;
}

.epb .epb__bio {
	margin: 0.8em 0 0;
	font-size: var(--epb-bio-size, 95%);
}

.epb .epb__bio p {
	margin: 0 0 0.7em;
}

.epb .epb__bio p:last-child {
	margin-bottom: 0;
}

.epb .epb__bio a {
	color: var(--epb-accent);
}

/* bios.js adds .is-clamped (and a "Read more" button) only where the text really is longer than the limit. */
.epb .epb__bio.is-clamped:not(.is-open) {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--epb-lines, 4);
	line-clamp: var(--epb-lines, 4);
	overflow: hidden;
}

.epb .epb__more {
	display: block;
	margin: 0.5em 0 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	font: inherit;
	font-size: 0.9em;
	font-weight: 600;
	color: var(--epb-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.epb .epb__more:hover {
	text-decoration-thickness: 2px;
}

.epb .epb__more:focus-visible,
.epb .epb__link:focus-visible {
	outline: 2px solid var(--epb-accent);
	outline-offset: 3px;
	border-radius: 2px;
}

.epb .epb__link {
	display: inline-block;
	margin-top: 0.8em;
	font-size: 0.9em;
	font-weight: 600;
	color: var(--epb-accent);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

.epb .epb__link::after {
	content: " \2192";
}

.epb--no-links .epb__link {
	display: none;
}

.epb .epb__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.epb--gray-hover .epb__photo img {
		transition: none;
	}
}
