body.wme-word-template-post .wme-alphabet-template #wme-preview-heading {
	display: none;
}

/* Reserve the tallest natural slide height so lazy loading and slide changes
 * do not move the rest of the page. JavaScript supplies the exact min-height. */
[data-wme-preview-carousel] {
	overflow-anchor: none;
}

[data-wme-preview-carousel] [data-wme-preview-slide] .wme-ar-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

[data-wme-preview-carousel] [data-wme-preview-slide] .wme-ar-caption {
	min-height: 1.5em;
}

.wme-preview-related {
	padding: 18px;
	border: 1px solid #dce5ee;
	border-radius: 14px;
	background: #f7f9fc;
}

.wme-alphabet-template .wme-preview-related__heading {
	margin: 0 0 14px;
	font-size: clamp(1.15rem, 2vw, 1.35rem);
	line-height: 1.25;
}

.wme-preview-related__heading a {
	color: inherit;
	text-decoration-color: rgba(24, 50, 81, 0.45);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.wme-preview-related__heading a:hover,
.wme-preview-related__heading a:focus-visible {
	color: #183251;
	text-decoration-color: currentColor;
}

.wme-preview-related__heading a:focus-visible {
	outline: 3px solid #295294;
	outline-offset: 4px;
}

.wme-preview-related__tiles {
	display: grid;
	gap: 12px;
}

.wme-preview-related__tile {
	display: grid;
	grid-template-columns: 82px minmax(0, 1fr);
	align-items: center;
	gap: 8px;
	min-width: 0;
	padding: 4px;
	border: 1px solid #dce5ee;
	border-radius: 11px;
	background: #fff;
	color: #183251;
	text-decoration: none;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.wme-preview-related__tile:hover,
.wme-preview-related__tile:focus-visible {
	border-color: #183251;
	box-shadow: 0 8px 20px rgba(24, 50, 81, 0.12);
	transform: translateY(-2px);
}

.wme-preview-related__tile:focus-visible,
.wme-preview-related__more:focus-visible {
	outline: 3px solid #295294;
	outline-offset: 3px;
}

.wme-preview-related__media {
	display: grid;
	width: 82px;
	height: 72px;
	place-items: center;
	overflow: hidden;
	border-radius: 8px;
	background: #eef2f6;
}

body.wme-word-template-post .wme-alphabet-template .wme-preview-related__media img {
	display: block;
	width: 82px !important;
	height: 72px !important;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain !important;
	object-position: center;
}

.wme-preview-related__title {
	display: -webkit-box;
	min-width: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.25;
}

.wme-preview-related__more {
	display: flex;
	align-items: center;
	justify-content: center;
	width: max-content;
	min-width: 108px;
	height: 36px;
	box-sizing: border-box;
	margin: 14px auto 0;
	padding: 6px 16px;
	border-radius: 999px;
	background: #183251;
	color: #fff;
	font-size: 0.8rem;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
}

.wme-preview-related__more:hover,
.wme-preview-related__more:focus-visible {
	background: #183251;
	color: #fff;
}

/* The site keeps its right sidebar at intermediate desktop widths, leaving the
 * article column too narrow for the preview and related panel to sit together. */
@media (min-width: 1200px) {
	body.wme-word-template-post .wme-alphabet-template .wme-ar-card.wme-ar-card--with-related {
		display: grid;
		grid-template-columns: minmax(0, 442px) minmax(220px, 1fr);
		column-gap: clamp(24px, 3vw, 40px);
		align-items: start;
	}

	body.wme-word-template-post .wme-alphabet-template .wme-ar-card--with-related .wme-ar-preview {
		grid-column: 1;
		grid-row: 1;
		width: 100%;
		max-width: none;
		box-sizing: border-box;
		margin-left: 0;
		margin-right: auto;
		margin-top: 0;
		margin-bottom: 0;
	}

	body.wme-word-template-post .wme-alphabet-template .wme-ar-card--with-related .wme-ar-caption {
		grid-column: 1;
		grid-row: 2;
	}

	body.wme-word-template-post .wme-alphabet-template .wme-ar-card--with-related .wme-preview-related {
		grid-column: 2;
		grid-row: 1 / span 2;
	}
}

.wme-preview-lightbox-trigger {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	cursor: zoom-in;
}

.wme-preview-lightbox-trigger img {
	display: block;
	width: 100%;
	height: auto;
}

.wme-preview-lightbox-trigger__cue {
	position: absolute;
	right: 12px;
	top: 12px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 12px;
	border-radius: 999px;
	background: rgba(24, 50, 81, 0.94);
	box-shadow: 0 5px 16px rgba(15, 35, 57, 0.24);
	color: #fff;
	font-size: 0.84rem;
	font-weight: 800;
	line-height: 1;
}

.wme-preview-lightbox-trigger__cue svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 2;
}

.wme-preview-lightbox-trigger:hover .wme-preview-lightbox-trigger__cue,
.wme-preview-lightbox-trigger:focus-visible .wme-preview-lightbox-trigger__cue {
	background: #183251;
}

.wme-preview-lightbox-trigger:focus-visible {
	outline: 4px solid #295294;
	outline-offset: 4px;
}

.wme-preview-lightbox {
	width: min(88vw, 860px);
	max-width: none;
	height: min(82vh, 760px);
	max-height: none;
	padding: 0;
	border: 0;
	border-radius: 18px;
	background: #f7f9fc;
	box-shadow: 0 28px 90px rgba(8, 25, 44, 0.42);
	color: #183251;
}

.wme-preview-lightbox::backdrop {
	background: rgba(10, 27, 46, 0.84);
	backdrop-filter: blur(3px);
}

.wme-preview-lightbox__shell {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	height: 100%;
}

.wme-preview-lightbox__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 13px 16px 13px 20px;
	border-bottom: 1px solid #dce6f1;
	background: #fff;
}

.wme-preview-lightbox__header h2 {
	margin: 0;
	color: #183251;
	font-size: clamp(1.15rem, 2.5vw, 1.45rem);
}

.wme-preview-lightbox__actions {
	display: flex;
	align-items: center;
	gap: 7px;
}

.wme-preview-lightbox__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid #c8d6e5;
	border-radius: 10px;
	background: #fff;
	color: #183251;
	font: inherit;
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
}

.wme-preview-lightbox__button svg {
	display: block;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2.25;
}

.wme-preview-lightbox__button:hover,
.wme-preview-lightbox__button:focus-visible {
	border-color: #183251;
	background: #eef3f9;
	color: #183251;
}

.wme-preview-lightbox__button:focus-visible {
	outline: 3px solid #295294;
	outline-offset: 2px;
}

.wme-preview-lightbox__button[disabled] {
	cursor: not-allowed;
	opacity: 0.45;
}

.wme-preview-lightbox__status {
	min-width: 62px;
	color: #50667f;
	font-size: 0.9rem;
	font-weight: 800;
	text-align: center;
}

.wme-preview-lightbox__viewport {
	overflow: auto;
	padding: 22px;
	background: #e9eef5;
	overscroll-behavior: contain;
	touch-action: pinch-zoom;
}

.wme-preview-lightbox__stage {
	display: grid;
	min-width: 100%;
	min-height: 100%;
	place-items: center;
}

.wme-preview-lightbox__image {
	display: block;
	max-width: none;
	height: auto;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 12px 38px rgba(24, 50, 81, 0.22);
	user-select: none;
	-webkit-user-drag: none;
}

body.wme-preview-lightbox-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.wme-preview-lightbox {
		width: 100vw;
		height: 100dvh;
		margin: 0;
		border-radius: 0;
	}

	.wme-preview-lightbox__header {
		align-items: flex-start;
		padding: 10px 9px 10px 14px;
	}

	.wme-preview-lightbox__header h2 {
		padding-top: 10px;
		font-size: 1.05rem;
	}

	.wme-preview-lightbox__actions {
		gap: 4px;
	}

	.wme-preview-lightbox__button {
		width: 42px;
		min-width: 42px;
		height: 42px;
		padding: 0;
	}

	.wme-preview-lightbox__status {
		display: none;
	}

	.wme-preview-lightbox__viewport {
		padding: 12px;
	}

	.wme-preview-lightbox-trigger__cue {
		right: 9px;
		top: 9px;
		padding: 7px 9px;
	}
}

@media (max-width: 1199px) {
	.wme-preview-related {
		margin-top: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wme-preview-lightbox,
	.wme-preview-lightbox::backdrop {
		scroll-behavior: auto;
	}
}
