/* SRP Bio Carousel — frontend styles. All selectors are namespaced under .srpbc. */

.srpbc {
	--srpbc-gap: 28px;
	--srpbc-pad: 28px;
	--srpbc-radius: 20px;
	--srpbc-accent: #1d2327;
	--srpbc-glow: #c9a24a;
	--srpbc-glow-rgb: 201, 162, 74;
	--srpbc-h: 440px;
	/* Room around the cards so the backlight is never clipped by the scroll area. */
	/* Side room stays smaller than the gap between cards, so a neighbour never peeks in. */
	--srpbc-bx: 14px;
	--srpbc-bt: 26px;
	--srpbc-bb: 44px;
	position: relative;
	overflow-x: clip;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 1.5em auto;
}

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

/* ---------- Stage: [prev] [viewport] [next] + dots ---------- */

.srpbc .srpbc__stage {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-areas:
		"prev viewport next"
		". dots .";
	align-items: center;
	column-gap: 14px;
	row-gap: 22px;
	/* Room for the arrows' pulse ring, which would otherwise be clipped at the edge. */
	padding-inline: 12px;
}

.srpbc .srpbc__viewport { position: relative; grid-area: viewport; min-width: 0; }
.srpbc .srpbc__nav--prev { grid-area: prev; }
.srpbc .srpbc__nav--next { grid-area: next; }
.srpbc .srpbc__dots { grid-area: dots; }

.srpbc.srpbc--no-arrows .srpbc__stage {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "viewport" "dots";
	column-gap: 0;
}

.srpbc:not(.is-ready) .srpbc__stage,
.srpbc.is-static .srpbc__stage {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "viewport";
	column-gap: 0;
}

.srpbc:not(.is-ready) .srpbc__nav,
.srpbc:not(.is-ready) .srpbc__dots,
.srpbc.is-static .srpbc__nav,
.srpbc.is-static .srpbc__dots {
	display: none;
}

/* ---------- Track (native scroll-snap: swipe, trackpad, keyboard) ---------- */

.srpbc .srpbc__track {
	position: relative;
	display: flex;
	gap: var(--srpbc-gap);
	overflow-x: auto;
	overflow-y: hidden;
	padding: var(--srpbc-bt) var(--srpbc-bx) var(--srpbc-bb);
	margin: calc(var(--srpbc-bt) * -1) calc(var(--srpbc-bx) * -1) calc(var(--srpbc-bb) * -1);
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--srpbc-bx);
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.srpbc .srpbc__track::-webkit-scrollbar { display: none; }

.srpbc:not(.is-ready) .srpbc__track {
	scrollbar-width: thin;
}

/* While the script eases the scroll itself, snapping must not fight it. */
.srpbc .srpbc__track.is-animating {
	scroll-snap-type: none;
}

/* ---------- Slide effect: cards ease in/out, content rises in ---------- */

.srpbc.srpbc--fx.is-ready .srpbc-card {
	opacity: 0.45;
	transform: scale(0.96);
	transition: opacity 0.45s ease-out, transform 0.45s ease-out, box-shadow 0.45s ease-out;
	will-change: transform, opacity;
}

.srpbc.srpbc--fx.is-ready .srpbc-card.is-active {
	opacity: 1;
	transform: none;
	box-shadow: 0 1px 2px rgba(20, 30, 50, 0.06), 0 16px 32px -12px rgba(20, 30, 50, 0.26);
}

.srpbc.srpbc--fx.is-ready .srpbc-card.is-active .srpbc-card__inner > * {
	animation: srpbc-rise 0.7s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}

.srpbc.srpbc--fx.is-ready .srpbc-card.is-active .srpbc-card__inner > :nth-child(2) { animation-delay: 0.08s; }
.srpbc.srpbc--fx.is-ready .srpbc-card.is-active .srpbc-card__inner > :nth-child(3) { animation-delay: 0.16s; }
.srpbc.srpbc--fx.is-ready .srpbc-card.is-active .srpbc-card__inner > :nth-child(4) { animation-delay: 0.24s; }
.srpbc.srpbc--fx.is-ready .srpbc-card.is-active .srpbc-card__inner > :nth-child(n+5) { animation-delay: 0.32s; }

@keyframes srpbc-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- Card ---------- */

.srpbc .srpbc-card {
	position: relative;
	flex: 0 0 100%;
	min-width: 0;
	height: min(var(--srpbc-h), 90vh);
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: var(--srpbc-pad);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: var(--srpbc-radius);
	background-color: var(--srpbc-card-bg, #ffffff);
	color: var(--srpbc-text, #1d2327);
	box-shadow: 0 1px 2px rgba(20, 30, 50, 0.06), 0 12px 28px -12px rgba(20, 30, 50, 0.2);
	overflow: hidden;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	container: srpbc-card / inline-size;
}

@media (min-width: 641px) {
	.srpbc.srpbc--d2 .srpbc-card,
	.srpbc.srpbc--d3 .srpbc-card {
		flex-basis: calc((100% - var(--srpbc-gap)) / 2);
	}
}

@media (min-width: 1025px) {
	.srpbc.srpbc--d3 .srpbc-card {
		flex-basis: calc((100% - 2 * var(--srpbc-gap)) / 3);
	}
}

.srpbc .srpbc-card__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

/* Manual position/zoom: the image box is zoom x the card; left/top pan it so the
   chosen focal point (x%, y%) stays aligned. Matches the admin drag preview. */
.srpbc .srpbc-card__bg img {
	position: absolute;
	display: block;
	width: calc(var(--srpbc-bg-zoom, 1) * 100%);
	height: calc(var(--srpbc-bg-zoom, 1) * 100%);
	left: calc((1 - var(--srpbc-bg-zoom, 1)) * var(--srpbc-bg-x, 50%));
	top: calc((1 - var(--srpbc-bg-zoom, 1)) * var(--srpbc-bg-y, 50%));
	max-width: none;
	object-fit: var(--srpbc-bg-fit, cover);
	object-position: var(--srpbc-bg-x, 50%) var(--srpbc-bg-y, 50%);
	opacity: var(--srpbc-bg-opacity, 1);
}

/* Blur: scale up slightly so the soft edge of the blurred image stays outside the card. */
.srpbc .srpbc-card.has-bg-blur .srpbc-card__bg img {
	filter: blur(calc(var(--srpbc-bg-blur, 0) * 1px));
	transform: scale(calc(1 + var(--srpbc-bg-blur, 0) / 100));
	transform-origin: var(--srpbc-bg-x, 50%) var(--srpbc-bg-y, 50%);
}

/* Fade: masks the image layer so it dissolves into the card background color. */
.srpbc .srpbc-fade-bottom .srpbc-card__bg {
	-webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
}
.srpbc .srpbc-fade-top .srpbc-card__bg {
	-webkit-mask-image: linear-gradient(to top, #000 35%, transparent 100%);
	mask-image: linear-gradient(to top, #000 35%, transparent 100%);
}
.srpbc .srpbc-fade-right .srpbc-card__bg {
	-webkit-mask-image: linear-gradient(to right, #000 35%, transparent 100%);
	mask-image: linear-gradient(to right, #000 35%, transparent 100%);
}
.srpbc .srpbc-fade-left .srpbc-card__bg {
	-webkit-mask-image: linear-gradient(to left, #000 35%, transparent 100%);
	mask-image: linear-gradient(to left, #000 35%, transparent 100%);
}
.srpbc .srpbc-fade-edges .srpbc-card__bg {
	-webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
	mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
}
.srpbc .srpbc-fade-vignette .srpbc-card__bg {
	-webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 100%);
	mask-image: radial-gradient(ellipse at center, #000 35%, transparent 100%);
}

.srpbc .srpbc-card__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: var(--srpbc-ig, 14px);
	min-height: 0;
}

/* ---------- Title + photo ---------- */

.srpbc .srpbc-card__title {
	flex: none;
	margin: 0;
	padding: 0;
	color: var(--srpbc-title, inherit);
	font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-align: start;
}

.srpbc .srpbc-t-center .srpbc-card__title { text-align: center; }
.srpbc .srpbc-t-end .srpbc-card__title { text-align: end; }

.srpbc .srpbc-card__media { flex: none; margin: 0; }

.srpbc .srpbc-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.srpbc .srpbc-card__media--round {
	width: 112px;
	height: 112px;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid rgba(255, 255, 255, 0.9);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.srpbc .srpbc-i-center .srpbc-card__media--round { margin-inline: auto; }
.srpbc .srpbc-i-end .srpbc-card__media--round { margin-inline-start: auto; }

.srpbc .srpbc-card__media--banner {
	height: 170px;
	margin: calc(var(--srpbc-pad) * -1) calc(var(--srpbc-pad) * -1) 0;
}

/* ---------- Scrollable text ---------- */

.srpbc .srpbc-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior-y: contain; /* never block horizontal swipes between cards */
	font-size: 1rem;
	line-height: 1.7;
	overflow-wrap: break-word;
	scrollbar-width: thin;
	scrollbar-color: rgba(120, 120, 120, 0.55) transparent;
}

.srpbc .srpbc-card__body::-webkit-scrollbar { width: 8px; }
.srpbc .srpbc-card__body::-webkit-scrollbar-track { background: transparent; }
.srpbc .srpbc-card__body::-webkit-scrollbar-thumb {
	background: rgba(120, 120, 120, 0.55);
	border-radius: 8px;
}

/* Content wrapper: centered vertically when short (auto margins never clip),
   fills the area and scrolls inside .srpbc-card__body when long. */
.srpbc .srpbc-card__content {
	width: 100%;
	margin-block: auto;
	text-align: start;
}

.srpbc .srpbc-v-top .srpbc-card__content { margin-block: 0; }
.srpbc .srpbc-x-center .srpbc-card__content { text-align: center; }
.srpbc .srpbc-x-end .srpbc-card__content { text-align: end; }

.srpbc .srpbc-card__content.has-panel {
	padding: 16px 18px;
	border-radius: 12px;
	background: var(--srpbc-panel, transparent);
}

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

.srpbc .srpbc-card__content > :first-child { margin-top: 0; }
.srpbc .srpbc-card__content > :last-child { margin-bottom: 0; }

.srpbc .srpbc-card__body p { margin: 0 0 1em; }

.srpbc .srpbc-card__body h2,
.srpbc .srpbc-card__body h3,
.srpbc .srpbc-card__body h4 {
	margin: 1.2em 0 0.5em;
	color: inherit;
	line-height: 1.3;
}

.srpbc .srpbc-card__body h2 { font-size: 1.35em; }
.srpbc .srpbc-card__body h3 { font-size: 1.2em; }
.srpbc .srpbc-card__body h4 { font-size: 1.05em; }

.srpbc .srpbc-card__body ul,
.srpbc .srpbc-card__body ol {
	margin: 0 0 1em;
	padding-inline-start: 1.4em;
}

.srpbc .srpbc-card__body ul { list-style: disc; }
.srpbc .srpbc-card__body ol { list-style: decimal; }

.srpbc .srpbc-card__body blockquote {
	margin: 0 0 1em;
	padding: 0.2em 0 0.2em 1em;
	border-inline-start: 3px solid currentColor;
	opacity: 0.9;
	font-style: italic;
}

.srpbc .srpbc-card__body img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.srpbc .srpbc-card__body .aligncenter { display: block; margin-inline: auto; }
.srpbc .srpbc-card__body .alignleft { float: left; margin: 0.2em 1em 0.5em 0; }
.srpbc .srpbc-card__body .alignright { float: right; margin: 0.2em 0 0.5em 1em; }

.srpbc .srpbc-card__body a {
	color: var(--srpbc-link, inherit);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.srpbc .srpbc-card__body a:hover { text-decoration-thickness: 2px; }

/* ---------- Link buttons ---------- */

.srpbc .srpbc-card__actions {
	display: flex;
	flex: none;
	flex-wrap: wrap;
	gap: 10px;
}

.srpbc .srpbc-a-start { justify-content: flex-start; }
.srpbc .srpbc-a-center { justify-content: center; }
.srpbc .srpbc-a-end { justify-content: flex-end; }

.srpbc .srpbc-btn,
.srpbc .srpbc-btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0.7em 1.55em;
	border: 1.5px solid var(--srpbc-btn-bg, var(--srpbc-accent));
	border-radius: 999px;
	background: var(--srpbc-btn-bg, var(--srpbc-accent));
	color: var(--srpbc-btn-fg, #ffffff);
	box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.45);
	font: inherit;
	font-size: 0.92rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: transform 0.18s ease, filter 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.srpbc .srpbc-btn--outline,
.srpbc .srpbc-btn--outline:visited {
	background: transparent;
	color: var(--srpbc-btn-bg, var(--srpbc-accent));
}

.srpbc .srpbc-btn:hover,
.srpbc .srpbc-btn:focus-visible {
	transform: translateY(-2px);
	filter: brightness(1.1);
	text-decoration: none;
	box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(var(--srpbc-glow-rgb), 0.28);
}

.srpbc .srpbc-btn--outline,
.srpbc .srpbc-btn--outline:visited {
	box-shadow: none;
}

.srpbc .srpbc-btn--outline:hover,
.srpbc .srpbc-btn--outline:focus-visible {
	background: var(--srpbc-btn-bg, var(--srpbc-accent));
	color: var(--srpbc-btn-fg, #ffffff);
	filter: none;
	box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(var(--srpbc-glow-rgb), 0.28);
}

/* One button per line: full-width up to a comfortable maximum, aligned left / center / right. */
.srpbc .srpbc-al-stack { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.srpbc .srpbc-al-stack.srpbc-a-start { align-items: flex-start; }
.srpbc .srpbc-al-stack.srpbc-a-center { align-items: center; }
.srpbc .srpbc-al-stack.srpbc-a-end { align-items: flex-end; }
.srpbc .srpbc-al-stack .srpbc-btn { width: 100%; max-width: 360px; }

.srpbc .srpbc-btn:focus-visible {
	outline: 3px solid var(--srpbc-accent);
	outline-offset: 2px;
}

/* ---------- Arrows ---------- */

.srpbc .srpbc__nav {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(var(--srpbc-glow-rgb), 0.55);
	border-radius: 50%;
	background: #ffffff;
	color: var(--srpbc-accent);
	box-shadow: 0 4px 14px -4px rgba(20, 30, 50, 0.28);
	line-height: 1;
	cursor: pointer;
	transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.srpbc .srpbc__nav svg { display: block; pointer-events: none; }

.srpbc .srpbc__nav .srpbc__ico--rewind { display: none; }
.srpbc .srpbc__nav.is-rewind .srpbc__ico--next { display: none; }
.srpbc .srpbc__nav.is-rewind .srpbc__ico--rewind { display: block; }

.srpbc .srpbc__nav:focus-visible {
	outline: 3px solid var(--srpbc-accent);
	outline-offset: 3px;
}

@media (hover: hover) {
	.srpbc .srpbc__nav:not(:disabled):hover {
		background: var(--srpbc-accent);
		border-color: var(--srpbc-accent);
		color: #ffffff;
		transform: scale(1.07);
	}
}

.srpbc .srpbc__nav:disabled {
	opacity: 0.32;
	cursor: default;
	box-shadow: none;
}

/* The hint: a soft ring keeps radiating from an arrow that still has somewhere to go.
   This is essential behaviour and is always on (it only goes static for reduced motion). */
.srpbc .srpbc__nav::after {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: 50%;
	border: 2px solid rgba(var(--srpbc-glow-rgb), 0.95);
	opacity: 0;
	pointer-events: none;
}

.srpbc .srpbc__nav.is-pulse {
	animation: srpbc-breathe 2.4s ease-in-out infinite;
}

.srpbc .srpbc__nav.is-pulse::after {
	animation: srpbc-ping 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

/* The way back is a quieter hint than the way forward. */
.srpbc .srpbc__nav--prev.is-pulse { --srpbc-ping-o: 0.45; }
.srpbc .srpbc__nav--next.is-pulse { --srpbc-ping-o: 0.95; }

/* Last card: the next arrow becomes "back to the first card". */
.srpbc .srpbc__nav.is-rewind {
	background: rgba(var(--srpbc-glow-rgb), 0.16);
	border-color: rgba(var(--srpbc-glow-rgb), 0.9);
}

@media (hover: hover) {
	.srpbc .srpbc__nav:not(:disabled):hover::after { animation: none; opacity: 0; }
	.srpbc .srpbc__nav:not(:disabled):hover { animation: none; }
}

@keyframes srpbc-ping {
	0% { transform: scale(1); opacity: var(--srpbc-ping-o, 0.9); }
	70%, 100% { transform: scale(1.4); opacity: 0; }
}

@keyframes srpbc-breathe {
	0%, 100% { box-shadow: 0 4px 14px -4px rgba(20, 30, 50, 0.28), 0 0 0 0 rgba(var(--srpbc-glow-rgb), 0); }
	50% { box-shadow: 0 4px 14px -4px rgba(20, 30, 50, 0.28), 0 0 12px 2px rgba(var(--srpbc-glow-rgb), 0.5); }
}

/* RTL: mirror the chevrons. */
[dir="rtl"] .srpbc .srpbc__nav svg { transform: scaleX(-1); }

/* ---------- Dots ---------- */

.srpbc .srpbc__dots {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.srpbc .srpbc__dot {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	width: 10px;
	height: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--srpbc-accent);
	opacity: 0.25;
	cursor: pointer;
	transition: width 0.2s ease, opacity 0.2s ease;
}

.srpbc .srpbc__dot::after {
	content: "";
	position: absolute;
	inset: -10px -4px;
}

.srpbc .srpbc__dot[aria-current="true"] {
	width: 26px;
	opacity: 1;
	box-shadow: 0 0 10px 1px rgba(var(--srpbc-glow-rgb), 0.65);
}

.srpbc .srpbc__dot:focus-visible {
	outline: 3px solid var(--srpbc-accent);
	outline-offset: 3px;
}

/* ---------- Admin-only notice ---------- */

.srpbc-empty {
	padding: 12px 16px;
	border: 1px dashed #b32d2e;
	border-radius: 6px;
	font-size: 0.9rem;
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
	.srpbc {
		--srpbc-gap: 20px;
		--srpbc-pad: 20px;
		--srpbc-radius: 16px;
		--srpbc-bx: 8px;
		--srpbc-bt: 18px;
		--srpbc-bb: 42px;
	}

	.srpbc .srpbc__stage {
		grid-template-columns: auto 1fr auto;
		grid-template-areas:
			"viewport viewport viewport"
			"prev dots next";
		column-gap: 10px;
		padding-inline: 8px;
	}

	.srpbc .srpbc__nav {
		width: 42px;
		height: 42px;
	}

	.srpbc .srpbc-card__media--round {
		width: 92px;
		height: 92px;
	}

	.srpbc .srpbc-card__media--banner { height: 140px; }
}

/* Keep the single-column layouts above winning over the mobile grid. */
@media (max-width: 640px) {
	.srpbc.srpbc--no-arrows .srpbc__stage {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "viewport" "dots";
	}

	.srpbc:not(.is-ready) .srpbc__stage,
	.srpbc.is-static .srpbc__stage {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "viewport";
	}
}

@media (prefers-reduced-motion: reduce) {
	.srpbc .srpbc__nav,
	.srpbc .srpbc__dot,
	.srpbc .srpbc-btn {
		transition: none;
	}

	.srpbc .srpbc__track { scroll-behavior: auto; }

	.srpbc.srpbc--fx.is-ready .srpbc-card,
	.srpbc.srpbc--fx.is-ready .srpbc-card.is-active {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.srpbc.srpbc--fx.is-ready .srpbc-card.is-active .srpbc-card__inner > * {
		animation: none;
	}

	/* Calm version of the hint: a still ring, no movement. */
	.srpbc .srpbc__nav.is-pulse,
	.srpbc .srpbc__nav.is-pulse::after,
	.srpbc.srpbc--glow.is-ready .srpbc-card.is-active {
		animation: none;
	}

	.srpbc .srpbc__nav.is-pulse::after {
		opacity: 0.7;
		transform: scale(1.22);
	}

	.srpbc .srpbc__notes { display: none; }
}

/* Centered text: keep list bullets with the text. */
.srpbc .srpbc-x-center .srpbc-card__content ul,
.srpbc .srpbc-x-center .srpbc-card__content ol {
	padding-inline-start: 0;
	list-style-position: inside;
}

/* ---------- Video (click-to-play YouTube) ---------- */

.srpbc .srpbc-video {
	position: relative;
	flex: none;
	width: var(--srpbc-vw, 100%);
	max-width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.srpbc .srpbc-va-center { margin-inline: auto; }
.srpbc .srpbc-va-end { margin-inline-start: auto; }

.srpbc .srpbc-video__play {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #000;
	color: #fff;
	cursor: pointer;
}

.srpbc .srpbc-video__play[hidden] { display: none; }

.srpbc .srpbc-video__play img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
	transition: transform 0.35s ease, opacity 0.2s ease;
}

.srpbc .srpbc-video__icon {
	position: absolute;
	left: 50%;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.62);
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85) inset;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.srpbc .srpbc-video__icon svg { display: block; margin-left: 3px; }

@media (hover: hover) {
	.srpbc .srpbc-video__play:hover .srpbc-video__icon { transform: scale(1.1); background: var(--srpbc-accent); }
	.srpbc .srpbc-video__play:hover img { transform: scale(1.03); }
}

.srpbc .srpbc-video__play:focus-visible {
	outline: 3px solid var(--srpbc-accent);
	outline-offset: -3px;
}

.srpbc .srpbc-video__frame {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	border: 0;
}

.srpbc .srpbc-video__fallback {
	position: absolute;
	left: 8px;
	bottom: 8px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-size: 0.85rem;
	text-decoration: none;
}

/* ---------- Layouts ---------- */

/* Stacked with a video: the whole card content scrolls so a tall video never squeezes the text. */
.srpbc .srpbc-l-stack.has-video .srpbc-card__inner {
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior-y: contain; /* never block horizontal swipes between cards */
	scrollbar-width: thin;
	scrollbar-color: rgba(120, 120, 120, 0.55) transparent;
}

.srpbc .srpbc-l-stack.has-video .srpbc-card__body {
	flex: 1 0 auto;
	overflow: visible;
}

/* Side by side: media (video or photo) beside the text. */
.srpbc .srpbc-l-side-left .srpbc-card__inner,
.srpbc .srpbc-l-side-right .srpbc-card__inner {
	flex-direction: row;
	align-items: stretch;
	gap: calc(var(--srpbc-ig, 14px) + 8px);
}

.srpbc .srpbc-l-side-right .srpbc-card__inner { flex-direction: row-reverse; }

.srpbc .srpbc-card__aside {
	display: flex;
	flex: 0 0 var(--srpbc-split, 40%);
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
}

.srpbc .srpbc-card__aside .srpbc-video {
	width: 100%;
	max-height: 100%;
}

.srpbc .srpbc-card__main {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: var(--srpbc-ig, 14px);
	min-width: 0;
	min-height: 0;
}

.srpbc .srpbc-card__media--side {
	align-self: stretch;
	width: 100%;
	height: 100%;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.srpbc .srpbc-card__main .srpbc-card__media--banner {
	height: 140px;
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
}

/* Narrow cards (phones, 2-3 per view): side layouts fall back to one column. */
@container srpbc-card (max-width: 560px) {
	.srpbc .srpbc-l-side-left .srpbc-card__inner,
	.srpbc .srpbc-l-side-right .srpbc-card__inner {
		flex-direction: column;
		gap: var(--srpbc-ig, 14px);
		overflow-x: hidden;
		overflow-y: auto;
	}

	.srpbc .srpbc-card__aside {
		flex: none;
		width: 100%;
	}

	.srpbc .srpbc-card__media--side {
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.srpbc .srpbc-card__main { flex: none; }

	.srpbc .srpbc-l-side-left .srpbc-card__body,
	.srpbc .srpbc-l-side-right .srpbc-card__body {
		flex: 1 0 auto;
		overflow: visible;
	}
}

/* Touch: vertical panning scrolls the text; horizontal swipes are handled by the script so they
   work from anywhere on the card (only once the script is running). */
.srpbc.is-ready .srpbc-card__inner {
	touch-action: pan-y;
}

/* ======================================================================
   Elegance layer (v1.1): backlight outline, floating notes, title divider
   ====================================================================== */

/* ---------- Card outline backlight (toggle: glow) ---------- */

.srpbc.srpbc--glow .srpbc-card {
	box-shadow:
		0 0 0 1px rgba(var(--srpbc-glow-rgb), 0.3),
		0 0 16px -3px rgba(var(--srpbc-glow-rgb), 0.42),
		0 12px 28px -12px rgba(20, 30, 50, 0.22);
}

/* A hairline gradient edge, drawn just inside the border. */
.srpbc.srpbc--glow .srpbc-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	padding: 1px;
	border-radius: inherit;
	background: linear-gradient(135deg, rgba(var(--srpbc-glow-rgb), 0.95), rgba(var(--srpbc-glow-rgb), 0.16) 38%, rgba(var(--srpbc-glow-rgb), 0.1) 62%, rgba(var(--srpbc-glow-rgb), 0.8));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
}

/* The card in view breathes very slowly. */
.srpbc.srpbc--glow.is-ready .srpbc-card.is-active {
	animation: srpbc-halo 5.5s ease-in-out infinite;
}

@keyframes srpbc-halo {
	0%, 100% {
		box-shadow:
			0 0 0 1px rgba(var(--srpbc-glow-rgb), 0.34),
			0 0 16px -3px rgba(var(--srpbc-glow-rgb), 0.38),
			0 16px 32px -12px rgba(20, 30, 50, 0.26);
	}
	50% {
		box-shadow:
			0 0 0 1px rgba(var(--srpbc-glow-rgb), 0.55),
			0 0 19px -3px rgba(var(--srpbc-glow-rgb), 0.66),
			0 16px 32px -12px rgba(20, 30, 50, 0.26);
	}
}

/* ---------- Floating musical notes (toggle: notes) ---------- */

.srpbc .srpbc__notes {
	position: absolute;
	inset: 0;
	z-index: 3;
	overflow: hidden;
	border-radius: var(--srpbc-radius);
	pointer-events: none;
	transition: opacity 0.35s ease;
}

/* A video is playing: no notes over the player. */
.srpbc.srpbc--playing .srpbc__notes { opacity: 0; }

.srpbc .srpbc__note {
	position: absolute;
	bottom: -12%;
	left: var(--x);
	width: var(--s);
	height: var(--s);
	color: var(--srpbc-glow);
	opacity: 0;
	animation: srpbc-note var(--t) linear var(--d) infinite;
	will-change: transform, opacity;
}

.srpbc .srpbc__note svg { display: block; width: 100%; height: 100%; }

@keyframes srpbc-note {
	0% { transform: translate3d(0, 0, 0) rotate(var(--r)); opacity: 0; }
	12% { opacity: var(--o); }
	50% { transform: translate3d(var(--dx), calc(var(--srpbc-h) * -0.5), 0) rotate(calc(var(--r) * -1)); }
	88% { opacity: var(--o); }
	100% { transform: translate3d(calc(var(--dx) * -0.4), calc(var(--srpbc-h) * -1.08), 0) rotate(var(--r)); opacity: 0; }
}

/* Save battery: notes stand still while the carousel is off-screen. */
.srpbc.is-offscreen .srpbc__note { animation-play-state: paused; }

/* ---------- Title divider (toggle: ornament) ---------- */

.srpbc.srpbc--orn .srpbc-card__title::after {
	content: "";
	display: block;
	width: 56px;
	height: 2px;
	margin: 0.6em auto 0;
	border-radius: 2px;
	background: linear-gradient(90deg, rgba(var(--srpbc-glow-rgb), 0), rgb(var(--srpbc-glow-rgb)), rgba(var(--srpbc-glow-rgb), 0));
}

.srpbc.srpbc--orn .srpbc-t-start .srpbc-card__title::after {
	margin-inline: 0 auto;
	background: linear-gradient(90deg, rgb(var(--srpbc-glow-rgb)), rgba(var(--srpbc-glow-rgb), 0));
}

.srpbc.srpbc--orn .srpbc-t-end .srpbc-card__title::after {
	margin-inline: auto 0;
	background: linear-gradient(270deg, rgb(var(--srpbc-glow-rgb)), rgba(var(--srpbc-glow-rgb), 0));
}

@media (prefers-reduced-motion: reduce) {
	.srpbc.srpbc--glow.is-ready .srpbc-card.is-active,
	.srpbc .srpbc__note {
		animation: none;
	}

	.srpbc .srpbc__notes { display: none; }
}

/* ======================================================================
   v1.3 polish: calmer surface, better type, a ringed portrait, finer details
   ====================================================================== */

/* Visually hidden, still in the page: used for card titles set to "hide" (search engines and screen readers keep them). */
.srpbc .srpbc-vh,
.srpbc .srpbc-sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.srpbc { --srpbc-radius: 22px; }

/* Surface: hairline border, a faint top sheen (works on light and dark card colors) and softer layered shadow. */
.srpbc .srpbc-card {
	border-color: rgba(20, 30, 50, 0.08);
	background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 38%);
	background-repeat: no-repeat;
	box-shadow: 0 1px 2px rgba(20, 30, 50, 0.05), 0 4px 10px -4px rgba(20, 30, 50, 0.1), 0 18px 34px -18px rgba(20, 30, 50, 0.28);
}

.srpbc .srpbc-card ::selection { background: rgba(var(--srpbc-glow-rgb), 0.3); }

/* Type */
.srpbc .srpbc-card__title {
	font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
	letter-spacing: -0.015em;
	line-height: 1.2;
	text-wrap: balance;
}

.srpbc .srpbc-card__body {
	font-size: 1.02rem;
	line-height: 1.72;
	text-wrap: pretty;
}

.srpbc .srpbc-card__body a {
	text-decoration-color: rgba(var(--srpbc-glow-rgb), 0.75);
	text-decoration-thickness: 1.5px;
}

.srpbc .srpbc-card__body blockquote {
	padding: 0.6em 1em;
	border-inline-start: 3px solid rgba(var(--srpbc-glow-rgb), 0.9);
	border-radius: 4px 12px 12px 4px;
	background: rgba(var(--srpbc-glow-rgb), 0.08);
	opacity: 1;
}

.srpbc .srpbc-card__body hr {
	width: 56px;
	height: 2px;
	margin: 1.4em auto;
	border: 0;
	background: linear-gradient(90deg, transparent, rgb(var(--srpbc-glow-rgb)), transparent);
}

/* Text panel: a frosted plate with a fine edge. */
.srpbc .srpbc-card__content.has-panel {
	border: 1px solid rgba(255, 255, 255, 0.35);
	box-shadow: 0 10px 26px -16px rgba(20, 30, 50, 0.4);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* Portrait: white edge, a gold ring and a soft halo. */
.srpbc .srpbc-card__media--round {
	border: 3px solid #ffffff;
	box-shadow: 0 0 0 2px rgba(var(--srpbc-glow-rgb), 0.8), 0 0 0 8px rgba(var(--srpbc-glow-rgb), 0.16), 0 12px 26px -8px rgba(20, 30, 50, 0.4);
}

/* Banner photo: a soft shade at the bottom so it sits into the card. */
.srpbc .srpbc-card__media--banner { position: relative; }

.srpbc .srpbc-card__media--banner::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 45%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0));
	pointer-events: none;
}

/* Buttons: easier to tap, a gentle highlight on the filled look. */
.srpbc .srpbc-btn,
.srpbc .srpbc-btn:visited {
	min-height: 44px;
	padding: 0.72em 1.7em;
	background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 62%);
}

.srpbc .srpbc-btn--outline,
.srpbc .srpbc-btn--outline:visited { background-image: none; }

/* Dots: the current one is a small gold-tipped pill. */
.srpbc .srpbc__dot[aria-current="true"] {
	background: linear-gradient(90deg, var(--srpbc-accent), rgb(var(--srpbc-glow-rgb)));
}

/* Arrows: a touch of glass. */
.srpbc .srpbc__nav {
	background: rgba(255, 255, 255, 0.94);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* Title divider: fine gold lines with a small centre dot (start / end aligned titles keep the simple line). */
.srpbc.srpbc--orn .srpbc-card__title::after {
	width: 92px;
	height: 9px;
	margin: 0.55em auto 0;
	background:
		radial-gradient(circle, rgb(var(--srpbc-glow-rgb)) 0 3px, transparent 3.6px) center / 9px 9px no-repeat,
		linear-gradient(90deg, rgba(var(--srpbc-glow-rgb), 0), rgba(var(--srpbc-glow-rgb), 0.95)) left center / calc(50% - 10px) 1.5px no-repeat,
		linear-gradient(270deg, rgba(var(--srpbc-glow-rgb), 0), rgba(var(--srpbc-glow-rgb), 0.95)) right center / calc(50% - 10px) 1.5px no-repeat;
}

.srpbc.srpbc--orn .srpbc-t-start .srpbc-card__title::after,
.srpbc.srpbc--orn .srpbc-t-end .srpbc-card__title::after {
	width: 56px;
	height: 2px;
}

@media (max-width: 640px) {
	.srpbc { --srpbc-radius: 18px; }

}
