/*
 * Pippin Downloads: resource cards with a picture of the PDF, filters above them. Colours and type follow the Kit
 * globals, like the Library.
 */
.pt-dl {
	--pt-d-text: var(--e-global-color-text, #22294e);
	--pt-d-muted: var(--e-global-color-e4427e8, #757575);
	--pt-d-border: var(--e-global-color-b0de001, #d9d9d9);
	--pt-d-accent: var(--e-global-color-accent, #d83040);
	--pt-d-surface: var(--e-global-color-5f0ace0, #fff);
	--pt-d-tint: var(--e-global-color-2c7a47e, #e4f6fe);
	--pt-d-focus: var(--e-global-color-primary, #37aada);
	--pt-d-navy: var(--e-global-color-secondary, #22294e);
	--pt-d-gap: var(--e-global-column-spacing, var(--pt-columns, 32px));
	display: flex;
	flex-direction: column;
	gap: var(--pt-d-gap);
	min-width: 0;
	max-width: 100%;
	color: var(--pt-d-text);
}
/* The chip rows scroll on phones: nothing may grow to their full length. */
.elementor-widget-pippin-downloads,
.pt-dl__tools,
.pt-dl__filters,
.pt-dl__row,
.pt-dl__chips {
	min-width: 0;
	max-width: 100%;
}
.pt-dl .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.pt-dl button,
.pt-dl button:is(:hover, :focus, :active) {
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
}

/* ---------- Tools ---------- */
.pt-dl__tools {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.pt-dl__search {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	max-width: 520px;
	height: 52px;
	padding: 0 18px;
	border: 1px solid var(--pt-d-border);
	border-radius: 999px;
	background: var(--pt-d-surface);
	color: var(--pt-d-muted);
	cursor: text;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pt-dl__search:focus-within {
	border-color: var(--pt-d-focus);
	box-shadow: 0 0 0 3px rgba(55, 170, 218, 0.15);
}
.pt-dl__search svg {
	flex: none;
	width: 20px;
	height: 20px;
}
.pt-dl .pt-dl__input,
.pt-dl .pt-dl__input:focus {
	flex: 1;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: var(--pt-d-text);
	font: inherit;
	font-size: 1rem;
}
.pt-dl__input::placeholder {
	color: var(--pt-d-muted);
	opacity: 1;
}
.pt-dl__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 32px;
}
.pt-dl__row {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}
.pt-dl__row-label {
	flex: none;
	color: var(--pt-d-muted);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.pt-dl__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.pt-dl .pt-dl__chip,
.pt-dl .pt-dl__chip:is(:hover, :focus, :active) {
	min-height: 0;
	margin: 0;
	padding: 7px 14px;
	border: 1px solid var(--pt-d-border);
	border-radius: 999px;
	background: var(--pt-d-surface);
	box-shadow: none;
	color: var(--pt-d-text);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.pt-dl .pt-dl__chip:hover {
	border-color: var(--pt-d-navy);
}
.pt-dl .pt-dl__chip.is-active {
	border-color: var(--pt-d-navy);
	background: var(--pt-d-navy);
	color: #fff;
}
.pt-dl .pt-dl__chip:focus-visible,
.pt-dl .pt-dl__tag:focus-visible,
.pt-dl .pt-dl__tag-active:focus-visible {
	outline: 2px solid var(--pt-d-focus);
	outline-offset: 2px;
}
.pt-dl__status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	min-height: 32px;
}
.pt-dl .pt-dl__count {
	margin: 0;
	color: var(--pt-d-muted);
	font-size: 0.9375rem;
}
.pt-dl .pt-dl__tag-active,
.pt-dl .pt-dl__tag-active:is(:hover, :focus, :active) {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 0;
	margin: 0;
	padding: 5px 12px;
	border: 0;
	border-radius: 999px;
	background: var(--pt-d-tint);
	box-shadow: none;
	color: var(--pt-d-text);
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}
.pt-dl .pt-dl__tag-active[hidden] {
	display: none;
}
.pt-dl .pt-dl__tag-active::after {
	content: "×";
	font-size: 1.125rem;
	line-height: 1;
}

/* ---------- Cards ---------- */
.pt-dl__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--pt-d-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}
.pt-dl__cell {
	display: flex;
	margin: 0;
	padding: 0;
}
.pt-dl__cell[hidden],
.pt-dl__featured[hidden] {
	display: none;
}
.pt-dl__card {
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--pt-d-border);
	border-radius: 24px;
	background: var(--pt-d-surface);
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.pt-dl__card:has(.pt-dl__thumb:hover, .pt-dl__title a:hover) {
	border-color: transparent;
	box-shadow: 0 18px 40px rgba(34, 41, 78, 0.12);
}

/* The PDF's first page, as a sheet of paper on a tinted desk. */
.pt-dl__thumb {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background:
		radial-gradient(120% 90% at 50% 110%, rgba(55, 170, 218, 0.28), transparent 60%),
		var(--pt-d-tint);
}
.pt-dl__paper {
	display: block;
	width: 54%;
	margin-top: 12%;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(34, 41, 78, 0.08), 0 18px 36px rgba(34, 41, 78, 0.22);
	transform: rotate(-2.5deg);
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}
.pt-dl__paper img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}
.pt-dl__thumb:hover .pt-dl__paper,
.pt-dl__card:has(.pt-dl__title a:hover) .pt-dl__paper {
	transform: rotate(0deg) translateY(-8px) scale(1.03);
	box-shadow: 0 2px 4px rgba(34, 41, 78, 0.08), 0 28px 48px rgba(34, 41, 78, 0.28);
}
.pt-dl__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--pt-d-accent);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.pt-dl__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 24px 24px 28px;
}
.pt-dl .pt-dl__kind {
	margin: 0;
	color: var(--pt-d-accent);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.pt-dl__for {
	color: var(--pt-d-muted);
}
.pt-dl__star {
	display: inline-block;
	margin-right: 10px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--pt-d-navy);
	color: #fff;
	letter-spacing: 0.08em;
}
/* Like the Library and Insights cards: the body font (Inter), semibold, not the display face. */
.pt-dl .pt-dl__title {
	margin: 0;
	color: var(--pt-d-text);
	font-family: inherit;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.016em;
}
.pt-dl .pt-dl__title a {
	color: inherit;
	text-decoration: none;
}
.pt-dl .pt-dl__title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
.pt-dl .pt-dl__title a:focus-visible {
	outline: 2px solid var(--pt-d-focus);
	outline-offset: 3px;
	border-radius: 4px;
}
.pt-dl .pt-dl__desc {
	margin: 0;
	color: var(--pt-d-text);
	font-size: 1rem;
	line-height: 1.55;
	opacity: 0.85;
}
.pt-dl__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
}
.pt-dl__tags li {
	margin: 0;
	padding: 0;
}
.pt-dl .pt-dl__tag,
.pt-dl .pt-dl__tag:is(:hover, :focus, :active) {
	min-height: 0;
	margin: 0;
	padding: 4px 10px;
	border: 0;
	border-radius: 999px;
	background: var(--pt-d-tint);
	box-shadow: none;
	color: var(--pt-d-text);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.pt-dl .pt-dl__tag:hover {
	background: #c9ecfb;
}
.pt-dl .pt-dl__tag.is-active {
	background: var(--pt-d-navy);
	color: #fff;
}
.pt-dl .pt-dl__meta {
	margin: auto 0 0;
	padding-top: 6px;
	color: var(--pt-d-muted);
	font-size: 0.875rem;
	line-height: 1.4;
}
.pt-dl__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin-top: 6px;
}
.pt-dl .pt-dl__btn,
.pt-dl .pt-dl__btn:is(:visited, :focus, :active) {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 999px;
	background: var(--pt-d-accent);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.pt-dl .pt-dl__btn:hover {
	background: #b92735;
	color: #fff;
	box-shadow: 0 10px 22px rgba(216, 48, 64, 0.28);
	transform: translateY(-1px);
}
.pt-dl .pt-dl__btn:focus-visible,
.pt-dl .pt-dl__preview:focus-visible {
	outline: 2px solid var(--pt-d-focus);
	outline-offset: 3px;
}
.pt-dl .pt-dl__preview,
.pt-dl .pt-dl__preview:visited {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--pt-d-text);
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
}
.pt-dl .pt-dl__preview:hover {
	color: var(--pt-d-text);
	text-decoration: underline;
	text-underline-offset: 4px;
}
.pt-dl__btn svg,
.pt-dl__preview svg {
	flex: none;
	width: 20px;
	height: 20px;
}

/* Featured: a wide card, picture beside the text. */
.pt-dl__card--wide {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.pt-dl__card--wide .pt-dl__thumb {
	aspect-ratio: auto;
	min-height: 100%;
	padding: 40px 0;
}
.pt-dl__card--wide .pt-dl__paper {
	width: 62%;
	max-width: 340px;
	margin-top: 0;
}
.pt-dl__card--wide .pt-dl__body {
	justify-content: center;
	gap: 14px;
	padding: 48px;
}
/* The featured title follows the Kit's H2 (Inter 500), a size down. */
.pt-dl .pt-dl__card--wide .pt-dl__title {
	font-size: clamp(1.625rem, 2.2vw, 2rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.022em;
}
.pt-dl__card--wide .pt-dl__desc {
	font-size: 1.125rem;
}
.pt-dl__card--wide .pt-dl__meta {
	margin-top: 4px;
}

.pt-dl .pt-dl__empty {
	margin: 0;
	padding: 40px 24px;
	border: 1px dashed var(--pt-d-border);
	border-radius: 24px;
	color: var(--pt-d-muted);
	text-align: center;
}

@media (max-width: 1024px) {
	.pt-dl__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.pt-dl__card--wide .pt-dl__body {
		padding: 32px;
	}
	.pt-dl__filters {
		flex-direction: column;
	}
}

@media (max-width: 767px) {
	.pt-dl__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.pt-dl__card--wide {
		display: flex;
	}
	.pt-dl__card--wide .pt-dl__thumb {
		aspect-ratio: 4 / 3;
		min-height: 0;
		padding: 0;
	}
	.pt-dl__card--wide .pt-dl__paper {
		width: 54%;
		margin-top: 12%;
	}
	.pt-dl__card--wide .pt-dl__body,
	.pt-dl__body {
		padding: 22px 20px 24px;
	}
	.pt-dl__search {
		max-width: none;
	}
	/* Filters: one scrolling row of chips per group, label above. */
	.pt-dl__row {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	.pt-dl__chips {
		flex-wrap: nowrap;
		max-width: none;
		margin: 0 calc(-1 * var(--pt-gutter-x, 20px));
		padding: 2px var(--pt-gutter-x, 20px);
		overflow-x: auto;
		scrollbar-width: none;
	}
	.pt-dl__chips::-webkit-scrollbar {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pt-dl__paper,
	.pt-dl .pt-dl__btn {
		transition: none;
	}
	.pt-dl__thumb:hover .pt-dl__paper,
	.pt-dl__card:has(.pt-dl__title a:hover) .pt-dl__paper {
		transform: rotate(-2.5deg);
	}
}

/* ---------- Preview lightbox (a <dialog> at the end of the page, outside .pt-dl) ---------- */
html.pt-dl-lb-open {
	overflow: hidden;
}
.pt-dl-lb {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	overflow: hidden;
}
.pt-dl-lb[open] {
	display: flex;
	flex-direction: column;
	animation: pt-dl-lb-in 0.2s ease;
}
.pt-dl-lb::backdrop {
	background: rgba(15, 19, 40, 0.9);
	backdrop-filter: blur(4px);
}
.pt-dl-lb__bar {
	display: flex;
	flex: none;
	align-items: center;
	gap: 16px;
	padding: 16px max(20px, calc((100% - 1000px) / 2));
}
.pt-dl-lb .pt-dl-lb__title {
	flex: 1;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	color: #fff;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.014em;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pt-dl-lb .pt-dl-lb__save,
.pt-dl-lb .pt-dl-lb__save:is(:visited, :focus, :active) {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border-radius: 999px;
	background: var(--e-global-color-accent, #d83040);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.2s ease;
}
.pt-dl-lb .pt-dl-lb__save:hover {
	background: #b92735;
	color: #fff;
}
.pt-dl-lb__save svg {
	width: 18px;
	height: 18px;
}
.pt-dl-lb .pt-dl-lb__close,
.pt-dl-lb .pt-dl-lb__close:is(:focus, :active) {
	position: relative;
	flex: none;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.pt-dl-lb .pt-dl-lb__close:hover {
	background: rgba(255, 255, 255, 0.24);
}
.pt-dl-lb__close::before,
.pt-dl-lb__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: #fff;
	transform: translate(-50%, -50%) rotate(45deg);
}
.pt-dl-lb__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}
.pt-dl-lb :is(.pt-dl-lb__save, .pt-dl-lb__close):focus-visible {
	outline: 2px solid var(--e-global-color-primary, #37aada);
	outline-offset: 3px;
}
.pt-dl-lb__pages {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	min-height: 0;
	padding: 8px 20px 48px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.pt-dl-lb__pages img {
	display: block;
	width: min(1000px, 100%);
	height: auto;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
@keyframes pt-dl-lb-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
@media (max-width: 767px) {
	.pt-dl-lb__bar {
		gap: 10px;
		padding: 12px;
	}
	.pt-dl-lb .pt-dl-lb__title {
		font-size: 1rem;
	}
	.pt-dl-lb__pages {
		gap: 12px;
		padding: 4px 12px 32px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.pt-dl-lb[open] {
		animation: none;
	}
}

/* ---------- "Download Brochure" modal: one card, on any page ---------- */
.pt-dl-modal {
	width: min(960px, calc(100% - 32px));
	max-width: none;
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 24px;
	background: transparent;
	overflow: auto;
	overscroll-behavior: contain;
}
.pt-dl-modal[open] {
	animation: pt-dl-lb-in 0.2s ease;
}
.pt-dl-modal::backdrop {
	background: rgba(15, 19, 40, 0.72);
	backdrop-filter: blur(4px);
}
.pt-dl-modal .pt-dl__card {
	border: 0;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.pt-dl-modal .pt-dl__tag--label {
	display: inline-block;
	cursor: default;
}
.pt-dl-modal .pt-dl-modal__close,
.pt-dl-modal .pt-dl-modal__close:is(:focus, :active) {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 2px 8px rgba(34, 41, 78, 0.15);
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.pt-dl-modal .pt-dl-modal__close:hover {
	background: #fff;
}
.pt-dl-modal__close::before,
.pt-dl-modal__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: var(--e-global-color-secondary, #22294e);
	transform: translate(-50%, -50%) rotate(45deg);
}
.pt-dl-modal__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}
.pt-dl-modal .pt-dl-modal__close:focus-visible {
	outline: 2px solid var(--e-global-color-primary, #37aada);
	outline-offset: 2px;
}
@media (max-width: 767px) {
	.pt-dl-modal {
		width: calc(100% - 24px);
		max-height: calc(100dvh - 24px);
	}
	.pt-dl-modal .pt-dl__card--wide .pt-dl__thumb {
		aspect-ratio: 16 / 11;
	}
	.pt-dl-modal .pt-dl__card--wide .pt-dl__paper {
		width: 46%;
		margin-top: 14%;
	}
}
@media (prefers-reduced-motion: reduce) {
	.pt-dl-modal[open] {
		animation: none;
	}
}
