.xl-pf-categories {
	--xl-pf-accent: #2f8fe0;
	--xl-pf-border: #e7e9ee;
	--xl-pf-number: #f2f2f2;
	--xl-pf-number-hover: #e5f6ff;

	list-style: none;
	margin: 0 0 100px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.xl-pf-cat {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 88px 1fr auto;
	grid-template-rows: auto auto;
	align-items: center;
	column-gap: 28px;
	padding: 26px 32px;
	border: 1px solid var(--xl-pf-border);
	border-radius: 18px;
	background: #fff;
	overflow: visible;
	opacity: 0;
	transform: translateY(28px) scale(.97);
	will-change: opacity, transform;
	transition:
		opacity .7s cubic-bezier(.16, 1, .3, 1) var(--xl-pf-delay, 0ms),
		transform .7s cubic-bezier(.16, 1, .3, 1) var(--xl-pf-delay, 0ms),
		background .35s ease,
		border-color .35s ease,
		box-shadow .35s ease;
	/* overflow: hidden; */
}

.xl-pf-cat .xl-pf-cat__number,
.xl-pf-cat .xl-pf-cat__body,
.xl-pf-cat .xl-pf-cat__meta,
.xl-pf-cat .xl-pf-cat__pills-row {
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .5s ease calc(var(--xl-pf-delay, 0ms) + 160ms),
		transform .5s ease calc(var(--xl-pf-delay, 0ms) + 160ms);
}

.xl-pf-cat.xl-in-view .xl-pf-cat__number,
.xl-pf-cat.xl-in-view .xl-pf-cat__body,
.xl-pf-cat.xl-in-view .xl-pf-cat__meta,
.xl-pf-cat.xl-in-view .xl-pf-cat__pills-row {
	opacity: 1;
	transform: translateY(0);
}

.xl-pf-cat:hover,
.xl-pf-cat:focus-within {
	z-index: 20;
	background: linear-gradient(100deg, #ffffff 0%, #fdf3f1 45%, #eef7fd 100%);
	/* border-color: transparent;
	box-shadow: 0 16px 36px -18px rgba(20, 30, 60, .16); */
}

.xl-pf-cat.xl-in-view {
	opacity: 1;
	transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
	.xl-pf-cat,
	.xl-pf-cat__number,
	.xl-pf-cat__body,
	.xl-pf-cat__meta,
	.xl-pf-cat__pills-row {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

.xl-pf-cat__link {
	position: absolute;
	inset: 0;
	z-index: 1;
	text-decoration: none;
	color: inherit;
}

.xl-pf-categories .xl-pf-cat__link,
.xl-pf-categories .xl-pf-cat__link:hover,
.xl-pf-categories .xl-pf-cat__link:focus,
.xl-pf-categories .xl-pf-cat__link *,
.xl-pf-categories .xl-pf-cat__link:hover *,
.xl-pf-categories .xl-pf-cat__link:focus * {
	text-decoration: none !important;
}

.xl-pf-cat__number {
	position: absolute;
	left: 30px;
	bottom: 0px;
	z-index: 0;
	height: 56px;
	color: var(--xl-pf-number);
	transition: color .25s ease;
	pointer-events: none;
}

/* Size numerals by height so every digit shares one cap height regardless of
   the glyph's aspect ratio (a "1" is narrow, a "5" is wide). */
.xl-pf-cat__number svg {
	width: auto;
	height: 100%;
	display: block;
}

.xl-pf-cat__number-fallback {
	font-size: 3.4rem;
	font-weight: 800;
	line-height: 1;
}

.xl-pf-cat:hover .xl-pf-cat__number,
.xl-pf-cat:focus-within .xl-pf-cat__number {
	color: var(--xl-pf-number-hover);
}

.xl-pf-cat__body {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
}

.xl-pf-cat__pills-row {
	grid-column: 2;
	grid-row: 2;
	position: relative;
	z-index: 2;
	margin-top: 10px;
}

.xl-pf-cat__title {
	font-size: 1.5rem;
	font-weight: 800;
	color: #171a21;
	transition: color .25s ease;
}

.xl-pf-cat:hover .xl-pf-cat__title,
.xl-pf-cat:focus-within .xl-pf-cat__title {
	color: var(--xl-pf-accent);
}

.xl-pf-cat__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.xl-pf-pill {
	display: inline-block;
	padding: 5px 14px;
	border: 1px solid var(--xl-pf-border);
	border-radius: 999px;
	font-size: .82rem;
	color: #4a5568;
	background: #fafbfc;
	white-space: nowrap;
}

.xl-pf-categories .xl-pf-pill,
.xl-pf-categories .xl-pf-pill:hover,
.xl-pf-categories .xl-pf-pill:focus {
	text-decoration: none !important;
}

.xl-pf-categories .xl-pf-pill:hover,
.xl-pf-categories .xl-pf-pill:focus {
	color: #4a5568;
	border-color: var(--xl-pf-border);
	background: #fafbfc;
}

.xl-pf-pill--more {
	border-color: transparent;
	background: #eaf4fd;
	color: var(--xl-pf-accent);
	font-weight: 600;
}

.xl-pf-categories .xl-pf-pill--more:hover,
.xl-pf-categories .xl-pf-pill--more:focus {
	color: var(--xl-pf-accent);
	background: #eaf4fd;
	border-color: transparent;
}

.xl-pf-cat__meta {
	grid-column: 3;
	grid-row: 1 / span 2;
	display: flex;
	align-items: center;
	gap: 16px;
	white-space: nowrap;
}

.xl-pf-cat__count {
	font-size: .92rem;
	color: #171a21;
	font-weight: 500;
}

.xl-pf-cat__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #eaf4fd;
	color: var(--xl-pf-accent);
	flex: 0 0 auto;
}

.xl-pf-cat:hover .xl-pf-cat__arrow {
	background: var(--xl-pf-accent);
	color: #fff;
}

.xl-pf-cat__hover-image {
	position: absolute;
	top: 50%;
	right: 20%;
	height: 220px;
	width: min(320px, 32vw);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: translateY(-50%) translateX(24px) scale(.96);
	transition: opacity .3s ease, transform .3s ease;
	pointer-events: none;
}

.xl-pf-cat__hover-image img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.xl-pf-cat.has-hover-image:hover .xl-pf-cat__hover-image,
.xl-pf-cat.has-hover-image:focus-within .xl-pf-cat__hover-image {
	opacity: 1;
	transform: translateY(-50%) translateX(0) scale(1);
}

@media (max-width: 1024px) {
	.xl-pf-cat__hover-image {
		display: none;
	}

	.xl-pf-categories {
		margin-bottom: 0;
	}
}

@media (max-width: 720px) {
	.xl-pf-cat {
		grid-template-columns: 1fr auto;
		grid-template-rows: auto auto;
		row-gap: 16px;
		column-gap: 14px;
		padding: 22px 20px;
		align-items: center;
	}

	/* Decorative numerals bleed off-canvas on narrow screens; hide them. */
	.xl-pf-cat__number {
		display: none;
	}

	.xl-pf-cat__body {
		grid-column: 1;
		grid-row: 1;
	}

	.xl-pf-cat__title {
		font-size: 1.2rem;
	}

	.xl-pf-cat__meta {
		grid-column: 2;
		grid-row: 1;
		align-items: center;
		gap: 12px;
		white-space: normal;
	}

	.xl-pf-cat__count {
		text-align: right;
		max-width: 6em;
		line-height: 1.3;
	}

	.xl-pf-cat__pills-row {
		grid-column: 1 / span 2;
		grid-row: 2;
		margin-top: 0;
	}
}
