.cxe-results,
.cxe-results * {
	box-sizing: border-box;
}

.cxe-results {
	--cxe-results-gap: clamp(10px, 1.4vw, 18px);

	width: min(100%, 1440px);
	margin:
		clamp(38px, 5vw, 70px)
		auto
		clamp(30px, 4vw, 54px);
	padding-inline: clamp(16px, 2.5vw, 32px);
	color: var(--theme-palette-color-3);
}

.cxe-results__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 28px;
	margin-bottom: clamp(16px, 2vw, 24px);
}

.cxe-results__introduction {
	min-width: 0;
	max-width: 680px;
}

.cxe-results__eyebrow {
	display: block;
	margin-bottom: 7px;
	color: var(--theme-palette-color-1);
	font-size: 11px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.cxe-results h2 {
	margin: 0;
	color: var(--theme-palette-color-4);
	font-size: clamp(27px, 3vw, 40px);
	line-height: 1.14;
	letter-spacing: -0.025em;
}

.cxe-results__introduction p {
	max-width: 540px;
	margin: 8px 0 0;
	color: var(--theme-palette-color-3);
	font-size: 13.5px;
	line-height: 1.55;
}

.cxe-results__navigation {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.cxe-results__counter {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
	min-width: 53px;
	margin-right: 2px;
	color: var(--theme-palette-color-3);
	font-size: 12px;
	line-height: 1;
	white-space: nowrap;
}

.cxe-results__counter strong {
	color: var(--theme-palette-color-4);
	font-size: 13px;
	font-weight: 800;
}

.cxe-results__navigation button {
	appearance: none;
	display: grid;
	place-items: center;
	flex: 0 0 40px;
	width: 40px;
	min-width: 40px;
	height: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: 50%;
	color: var(--theme-palette-color-4);
	background: var(--theme-palette-color-8);
	box-shadow: none;
	cursor: pointer;
	transition:
		color 160ms ease,
		background-color 160ms ease,
		border-color 160ms ease,
		opacity 160ms ease;
}

.cxe-results__navigation button svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cxe-results__navigation button:hover,
.cxe-results__navigation button:focus-visible {
	border-color: var(--theme-palette-color-1);
	color: #fff;
	background: var(--theme-palette-color-1);
}

.cxe-results__navigation button:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.cxe-results__navigation button:disabled:hover {
	border-color: var(--theme-palette-color-5);
	color: var(--theme-palette-color-4);
	background: var(--theme-palette-color-8);
}

/* Slider */

.cxe-results__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns:
		calc(
			(
				100% -
				(3 * var(--cxe-results-gap))
			) / 4
		);
	gap: var(--cxe-results-gap);
	width: 100%;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
}

.cxe-results__track::-webkit-scrollbar {
	display: none;
}

.cxe-results__track:focus-visible {
	outline: 2px solid var(--theme-palette-color-1);
	outline-offset: 5px;
	border-radius: 14px;
}

.cxe-result-card {
	min-width: 0;
	margin: 0;
	scroll-snap-align: start;
}

.cxe-result-card__open {
	appearance: none;
	display: block;
	width: 100%;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: 15px;
	color: inherit;
	background: #f7f3f4;
	box-shadow: 0 7px 20px rgba(23, 38, 56, 0.055);
	text-align: left;
	line-height: normal;
	cursor: zoom-in;
	transition:
		transform 180ms ease,
		box-shadow 180ms ease,
		border-color 180ms ease;
}

.cxe-result-card__open:hover,
.cxe-result-card__open:focus-visible {
	border-color: rgba(140, 74, 94, 0.42);
	background: #f7f3f4;
	box-shadow: 0 11px 26px rgba(23, 38, 56, 0.09);
	transform: translateY(-2px);
}

.cxe-result-card__open:focus-visible {
	outline: 2px solid var(--theme-palette-color-1);
	outline-offset: 3px;
}

.cxe-result-card__images {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 2px;
	width: 100%;
	background: var(--theme-palette-color-5);
}

.cxe-result-card__image {
	position: relative;
	display: block;
	min-width: 0;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #f2edef;
}

.cxe-result-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: center;
}

.cxe-result-card__label {
	position: absolute;
	z-index: 2;
	top: 8px;
	left: 8px;
	display: inline-flex;
	align-items: center;
	min-height: 23px;
	padding: 4px 8px;
	border-radius: 999px;
	color: #fff;
	background: rgba(23, 38, 56, 0.8);
	font-size: 8.5px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	backdrop-filter: blur(5px);
}

.cxe-result-card__label--after {
	background: rgba(140, 74, 94, 0.9);
}

.cxe-results__disclaimer {
	margin: 13px 0 0;
	color: var(--theme-palette-color-3);
	font-size: 11px;
	line-height: 1.55;
}

/* Compact result popup */

.cxe-results-dialog {
	width: min(720px, calc(100% - 32px));
	max-width: none;
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	overflow: visible;
	border: 0;
	border-radius: 18px;
	background: transparent;
	box-shadow: none;
}

.cxe-results-dialog::backdrop {
	background: rgba(17, 24, 34, 0.68);
	backdrop-filter: blur(4px);
}

.cxe-results-dialog__surface {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: calc(100dvh - 32px);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 22px 65px rgba(8, 14, 22, 0.28);
}

.cxe-results-dialog__header {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 58px;
	padding: 10px 12px 10px 18px;
	border-bottom: 1px solid #ebe5e7;
	background: #fff;
}

.cxe-results-dialog__header strong {
	margin: 0;
	color: #172638;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.3;
}

.cxe-results-dialog__close {
	appearance: none;
	display: grid;
	place-items: center;
	flex: 0 0 36px;
	width: 36px;
	min-width: 36px;
	height: 36px;
	min-height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #172638;
	background: #f6f2f3;
	box-shadow: none;
	cursor: pointer;
}

.cxe-results-dialog__close:hover,
.cxe-results-dialog__close:focus-visible {
	color: #fff;
	background: var(--theme-palette-color-1);
}

.cxe-results-dialog__close svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.cxe-results-dialog__images {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 2px;
	height: min(64vh, 520px);
	min-height: 0;
	overflow: hidden;
	background: #e8e2e4;
}

.cxe-results-dialog figure {
	position: relative;
	display: grid;
	place-items: center;
	min-width: 0;
	height: 100%;
	margin: 0;
	overflow: hidden;
	background: #f2edef;
}

.cxe-results-dialog figure span {
	position: absolute;
	z-index: 2;
	top: 10px;
	left: 10px;
	display: inline-flex;
	align-items: center;
	min-height: 25px;
	padding: 5px 9px;
	border-radius: 999px;
	color: #fff;
	background: rgba(23, 38, 56, 0.82);
	font-size: 9px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	backdrop-filter: blur(5px);
}

.cxe-results-dialog figure:last-child span {
	background: rgba(140, 74, 94, 0.92);
}

.cxe-results-dialog img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center;
}

.cxe-results-dialog[open] {
	animation: cxe-results-dialog-in 180ms ease-out;
}

body:has(.cxe-results-dialog[open]) {
	overflow: hidden;
}

@keyframes cxe-results-dialog-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.985);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* Three cards on regular laptops */

@media (max-width: 1199px) {
	.cxe-results__track {
		grid-auto-columns:
			calc(
				(
					100% -
						(2 * var(--cxe-results-gap))
				) / 3
			);
	}
}

/* Two cards on tablets */

@media (max-width: 899px) {
	.cxe-results__track {
		grid-auto-columns:
			calc(
				(
					100% -
						var(--cxe-results-gap)
				) / 2
			);
	}
}

/* Mobile */

@media (max-width: 689px) {
	.cxe-results {
		--cxe-results-gap: 12px;

		margin-top: 34px;
		margin-bottom: 34px;
		padding-inline: 16px;
	}

	.cxe-results__header {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		margin-bottom: 16px;
	}

	.cxe-results__introduction {
		width: 100%;
		max-width: none;
	}

	.cxe-results__eyebrow {
		margin-bottom: 6px;
		font-size: 10px;
	}

	.cxe-results h2 {
		font-size: clamp(27px, 8vw, 33px);
		line-height: 1.16;
	}

	.cxe-results__introduction p {
		max-width: 100%;
		margin-top: 7px;
		padding: 0;
		font-size: 12.5px;
		line-height: 1.5;
	}

	.cxe-results__navigation {
		position: static;
		width: 100%;
		align-self: auto;
		justify-content: flex-end;
		gap: 7px;
		margin: 0;
	}

	.cxe-results__counter {
		position: static;
		right: auto;
		min-width: 48px;
		margin: 0 2px 0 0;
		font-size: 11px;
	}

	.cxe-results__counter strong {
		font-size: 12px;
	}

	.cxe-results__navigation button {
		flex-basis: 37px;
		width: 37px;
		min-width: 37px;
		height: 37px;
		min-height: 37px;
	}

	.cxe-results__navigation button svg {
		width: 16px;
		height: 16px;
	}

	.cxe-results__track {
		grid-auto-columns: 88%;
		scroll-padding-inline: 0;
	}

	.cxe-result-card__open {
		border-radius: 14px;
	}

	.cxe-result-card__label {
		top: 7px;
		left: 7px;
		min-height: 22px;
		padding: 4px 7px;
		font-size: 8px;
	}

	.cxe-results__disclaimer {
		margin-top: 11px;
		font-size: 10.5px;
		line-height: 1.5;
	}

	.cxe-results-dialog {
		width: calc(100% - 20px);
		max-height: calc(100dvh - 20px);
		border-radius: 16px;
	}

	.cxe-results-dialog__surface {
		max-height: calc(100dvh - 20px);
		border-radius: 16px;
	}

	.cxe-results-dialog__header {
		min-height: 52px;
		padding: 8px 9px 8px 14px;
	}

	.cxe-results-dialog__header strong {
		font-size: 13px;
	}

	.cxe-results-dialog__close {
		flex-basis: 34px;
		width: 34px;
		min-width: 34px;
		height: 34px;
		min-height: 34px;
	}

	.cxe-results-dialog__close svg {
		width: 16px;
		height: 16px;
	}

	.cxe-results-dialog__images {
		grid-template-columns:
			minmax(0, 1fr)
			minmax(0, 1fr);
		height: min(56dvh, 410px);
		max-height: none;
		overflow: hidden;
	}

	.cxe-results-dialog figure {
		height: 100%;
	}

	.cxe-results-dialog figure span {
		top: 7px;
		left: 7px;
		min-height: 22px;
		padding: 4px 7px;
		font-size: 8px;
	}

	.cxe-results-dialog img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}
}

@media (max-width: 380px) {
	.cxe-results {
		padding-inline: 13px;
	}

	.cxe-results h2 {
		font-size: 26px;
	}

	.cxe-results__track {
		grid-auto-columns: 90%;
	}

	.cxe-results-dialog__images {
		height: min(52dvh, 360px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cxe-results__track {
		scroll-behavior: auto;
	}

	.cxe-result-card__open,
	.cxe-results-dialog[open] {
		animation: none;
		transition: none;
	}
}