.ypw-widget {
	--ypw-card-background: #ff7f66;
	--ypw-content-background: #ffffff;
	--ypw-title-color: #ffffff;
	--ypw-text-color: #ffffff;
	--ypw-accent-color: #ff6f61;
	--ypw-play-button-color: #ffffff;
	--ypw-title-font-family: "Shadows Into Light", "Comic Sans MS", cursive;
	--ypw-body-font-family: Arial, Helvetica, sans-serif;
	--ypw-title-font-size: clamp(1.85rem, 3vw, 2.45rem);
	--ypw-description-font-size: clamp(0.88rem, 1.4vw, 1rem);

	display: grid;
	grid-template-columns: minmax(290px, 0.95fr) minmax(280px, 1.15fr);
	gap: clamp(28px, 4.8vw, 64px);
	align-items: start;
	box-sizing: border-box;
	max-width: 1060px;
	margin: 32px auto;
	padding: 0;
	background: var(--ypw-content-background);
	color: #333333;
	font-family: var(--ypw-body-font-family);
}

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

.ypw-layout-stacked {
	grid-template-columns: 1fr;
	max-width: 720px;
}

.ypw-card {
	display: flex;
	flex-direction: column;
	min-height: 398px;
	padding: clamp(22px, 3vw, 34px) clamp(18px, 3vw, 30px);
	border-radius: 6px;
	background: var(--ypw-card-background);
	color: var(--ypw-text-color);
}

.ypw-card-title {
	margin: 0 0 28px;
	color: var(--ypw-title-color);
	font-family: var(--ypw-title-font-family);
	font-size: var(--ypw-title-font-size);
	font-weight: 400;
	line-height: 1.05;
	text-align: center;
}

.ypw-card-intro {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(120px, 150px);
	gap: 18px;
	align-items: start;
}

.ypw-description {
	margin: 0;
	color: var(--ypw-text-color);
	font-family: var(--ypw-body-font-family);
	font-size: var(--ypw-description-font-size);
	font-weight: 500;
	line-height: 1.35;
}

.ypw-thumbnail-link {
	position: relative;
	display: block;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
}

.ypw-thumbnail {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	object-fit: cover;
}

.ypw-thumbnail-placeholder {
	display: block;
	min-height: 84px;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.22) 25%, transparent 25%) 0 0 / 26px 26px,
		linear-gradient(135deg, transparent 75%, rgba(255, 255, 255, 0.22) 75%) 0 0 / 26px 26px,
		linear-gradient(135deg, #d66d5d, #ac4a3f);
}

.ypw-thumbnail-play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: inline-flex;
	width: 42px;
	height: 42px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.88);
	color: var(--ypw-card-background);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
	transform: translate(-50%, -50%);
	transition:
		background 160ms ease,
		transform 160ms ease;
}

.ypw-thumbnail-play::before {
	width: 0;
	height: 0;
	margin-left: 3px;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 11px solid currentColor;
	content: "";
}

.ypw-thumbnail-link:hover .ypw-thumbnail-play,
.ypw-thumbnail-link:focus-visible .ypw-thumbnail-play {
	background: rgba(255, 255, 255, 0.96);
	transform: translate(-50%, -50%) scale(1.06);
}

.ypw-video-list {
	margin-top: 14px;
}

.ypw-video-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 24px;
	gap: 12px;
	align-items: center;
	min-height: 64px;
	padding: 11px 0 13px;
	border-top: 1px solid rgba(255, 255, 255, 0.72);
	color: var(--ypw-text-color);
	text-decoration: none;
}

.ypw-video-row:last-child {
	border-bottom: 1px solid rgba(255, 255, 255, 0.72);
}

.ypw-video-date,
.ypw-video-title {
	display: block;
	color: var(--ypw-text-color);
	font-family: var(--ypw-body-font-family);
}

.ypw-video-date {
	margin-bottom: 5px;
	font-size: 0.74rem;
	font-weight: 500;
	opacity: 0.88;
}

.ypw-video-title {
	font-size: clamp(0.95rem, 1.6vw, 1.08rem);
	font-weight: 500;
	line-height: 1.24;
}

.ypw-row-play {
	position: relative;
	display: inline-flex;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--ypw-play-button-color);
	color: var(--ypw-card-background);
	flex: 0 0 auto;
	transition:
		filter 160ms ease,
		transform 160ms ease;
}

.ypw-row-play::before {
	width: 0;
	height: 0;
	margin-left: 2px;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 7px solid currentColor;
	content: "";
}

.ypw-video-row:hover .ypw-row-play,
.ypw-video-row:focus-visible .ypw-row-play {
	filter: brightness(0.98);
	transform: scale(1.08);
}

.ypw-cta {
	display: inline-flex;
	align-self: center;
	align-items: center;
	justify-content: center;
	margin-top: auto;
	padding: 9px 15px;
	border-radius: 3px;
	background: #ffffff;
	color: var(--ypw-accent-color);
	font-family: var(--ypw-body-font-family);
	font-size: 0.83rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition:
		filter 160ms ease,
		transform 160ms ease;
}

.ypw-cta:hover,
.ypw-cta:focus-visible {
	color: var(--ypw-accent-color);
	filter: brightness(0.96);
	transform: translateY(-1px);
}

.ypw-content {
	padding-top: 2px;
	background: transparent;
	box-shadow: none;
}

.ypw-content-title {
	margin: 0 0 22px;
	color: var(--ypw-accent-color);
	font-family: var(--ypw-title-font-family);
	font-size: clamp(2rem, 4vw, 2.8rem);
	font-weight: 400;
	line-height: 1.05;
}

.ypw-content-text {
	max-width: 440px;
	margin: 0;
	color: #3f454d;
	font-family: var(--ypw-body-font-family);
	font-size: clamp(0.95rem, 1.5vw, 1.08rem);
	font-weight: 500;
	line-height: 1.47;
}

.ypw-thumbnail-link:focus-visible,
.ypw-video-row:focus-visible,
.ypw-cta:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--ypw-accent-color), #ffffff 28%);
	outline-offset: 4px;
}

.ypw-widget .screen-reader-text,
.ypw-widget .ypw-screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	word-wrap: normal !important;
	white-space: nowrap;
}

@media (max-width: 760px) {
	.ypw-widget {
		grid-template-columns: 1fr;
		gap: 22px;
		margin: 20px auto;
	}

	.ypw-card {
		min-height: 0;
		padding: 20px 16px 24px;
	}

	.ypw-card-title {
		margin-bottom: 18px;
	}

	/*
	 * On phones the side-by-side intro becomes a single column. Keep the
	 * description and thumbnail stacked but centered so the layout no longer
	 * feels awkwardly left-aligned, and cap the thumbnail width so it does not
	 * dominate the screen.
	 */
	.ypw-card-intro {
		grid-template-columns: 1fr;
		gap: 16px;
		justify-items: center;
		text-align: center;
	}

	.ypw-thumbnail-link {
		width: 100%;
		max-width: 360px;
		margin: 0 auto;
	}

	.ypw-video-list {
		margin-top: 10px;
		text-align: left;
	}

	.ypw-content {
		padding: 0 4px;
		text-align: center;
	}

	.ypw-content-text {
		max-width: none;
	}
}

/* Small phones: tighten further and shrink the thumbnail. */
@media (max-width: 480px) {
	.ypw-widget {
		gap: 18px;
		margin: 16px auto;
	}

	.ypw-card {
		padding: 18px 14px 20px;
	}

	.ypw-card-title {
		margin-bottom: 14px;
	}

	.ypw-card-intro {
		gap: 14px;
	}

	.ypw-thumbnail-link {
		max-width: 280px;
	}

	.ypw-thumbnail-play {
		width: 36px;
		height: 36px;
	}

	.ypw-video-row {
		min-height: 56px;
		padding: 9px 0 11px;
	}

	.ypw-content-title {
		margin-bottom: 16px;
	}
}
