/*
 * Pippin Insights article rail. The rail starts at the content edge and runs to the right edge of the window; the
 * section around it should hide overflow (Elementor container > Overflow: Hidden). Type and colours follow the Kit:
 * the subheading uses the Subheading global font and colour, the lead uses Text- Large, the heading takes the Kit's
 * H2 look through .pt-as-h2 (Pippin_WP_Heading_Levels).
 */
.pt-insights {
	--pt-i-text: var(--e-global-color-text, #22294e);
	--pt-i-muted: var(--e-global-color-e4427e8, #757575);
	--pt-i-border: var(--e-global-color-b0de001, #d9d9d9);
	--pt-i-accent: var(--e-global-color-accent, #d83040);
	--pt-i-card: 370px;
	--pt-i-gap: 32px;
	color: var(--pt-i-text);
}

.pt-insights__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px var(--pt-columns, 40px);
	margin-bottom: var(--pt-section-sm, 48px);
}
.pt-insights__intro {
	display: flex;
	flex-direction: column;
	gap: var(--pt-section-xs, 16px);
	max-width: 760px;
}
.pt-insights .pt-insights__eyebrow {
	margin: 0;
	color: var(--e-global-color-5ab0001, #d83040);
	font-family: var(--e-global-typography-5ab0d00-font-family), sans-serif;
	font-size: var(--e-global-typography-5ab0d00-font-size, 0.875rem);
	font-weight: var(--e-global-typography-5ab0d00-font-weight, 700);
	line-height: var(--e-global-typography-5ab0d00-line-height, 1.4);
	letter-spacing: var(--e-global-typography-5ab0d00-letter-spacing, 0.16em);
	text-transform: uppercase;
}
.pt-insights .pt-insights__title {
	margin: 0;
	color: var(--pt-i-text);
}
.pt-insights .pt-insights__lead {
	margin: 0;
	color: var(--pt-i-muted);
	font-size: var(--e-global-typography-3bc6d1e-font-size, 1.5rem);
	line-height: var(--e-global-typography-3bc6d1e-line-height, 1.4);
	letter-spacing: var(--e-global-typography-3bc6d1e-letter-spacing, -0.019em);
}

/* The toggle (report type pages: Report types / Articles): a segmented pill under the lead. */
.pt-insights__tabs {
	display: inline-flex;
	align-self: flex-start;
	gap: 4px;
	margin-top: 8px;
	padding: 4px;
	border: 1px solid var(--pt-i-border);
	border-radius: 999px;
	background: var(--e-global-color-5f0ace0, #fff);
}
.pt-insights .pt-insights__tab,
.pt-insights .pt-insights__tab:is(:hover, :focus, :active) {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 0;
	margin: 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: var(--pt-i-text);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.pt-insights .pt-insights__tab:hover {
	background: var(--e-global-color-2c7a47e, #e4f6fe);
}
.pt-insights .pt-insights__tab[aria-selected="true"] {
	background: var(--e-global-color-3fbeb61, #0f1328);
	color: #fff;
}
.pt-insights .pt-insights__tab:focus-visible {
	outline: 2px solid var(--e-global-color-primary, #37aada);
	outline-offset: 2px;
}
.pt-insights__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba(15, 19, 40, 0.08);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
}
.pt-insights__tab[aria-selected="true"] .pt-insights__count {
	background: rgba(255, 255, 255, 0.2);
}
.pt-insights__rail[hidden],
.pt-insights__all[hidden] {
	display: none !important;
}

.pt-insights__controls {
	display: flex;
	align-items: center;
	gap: 16px;
}
.pt-arrow {
	display: inline-block;
	width: 0.9em;
	height: 0.9em;
	margin-left: 8px;
	vertical-align: -0.1em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.2s ease;
}
.pt-insights .pt-insights__all,
.pt-insights .pt-post__more {
	color: var(--e-global-color-11a0001, #d83040);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}
.pt-insights .pt-insights__all:hover,
.pt-insights .pt-post__more:hover {
	color: var(--e-global-color-11a0002, #54bde9);
}
.pt-insights__all:hover .pt-arrow,
.pt-post__more:hover .pt-arrow {
	transform: translateX(3px);
}

.pt-insights .pt-insights__nav,
.pt-insights .pt-insights__nav:is(:hover, :focus, :active) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 48px;
	height: 48px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--pt-i-border);
	border-radius: 999px;
	background: var(--e-global-color-5f0ace0, #fff);
	box-shadow: none;
	color: var(--pt-i-text);
	cursor: pointer;
	transition: border-color 0.2s ease, opacity 0.2s ease;
}
.pt-insights .pt-insights__nav:hover:not(:disabled) {
	border-color: var(--pt-i-text);
}
.pt-insights .pt-insights__nav:focus-visible {
	outline: 2px solid var(--e-global-color-primary, #37aada);
	outline-offset: 2px;
}
.pt-insights .pt-insights__nav:disabled {
	opacity: 0.4;
	cursor: default;
}
.pt-insights__nav span {
	width: 9px;
	height: 9px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: translateX(-2px) rotate(45deg);
}
.pt-insights__nav--prev span {
	transform: translateX(2px) rotate(-135deg);
}

/* The rail: runs from the content edge to the window edge. */
.pt-insights__rail {
	display: flex;
	gap: var(--pt-i-gap);
	margin-right: calc(50% - 50vw);
	padding: 4px var(--pt-gutter, 40px) 4px 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}
/* Mouse: drag to slide (insights.js). Snapping is off while dragging; the script eases to the nearest card. */
@media (hover: hover) and (pointer: fine) {
	.pt-insights__rail {
		cursor: grab;
	}
}
.pt-insights__rail.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}
.pt-insights__rail.is-dragging .pt-post:hover .pt-post__media img {
	transform: none;
}
.pt-insights__rail::-webkit-scrollbar {
	display: none;
}
.pt-insights__rail:focus-visible {
	outline: 2px solid var(--e-global-color-primary, #37aada);
	outline-offset: 4px;
}

.pt-post {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	width: var(--pt-i-card);
	scroll-snap-align: start;
}
.pt-post__media {
	display: block;
	width: 100%;
	height: 230px;
	overflow: hidden;
	border-radius: 12px;
	background: var(--e-global-color-5f0ace1, #fafafa);
}
.pt-post__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.pt-post:hover .pt-post__media img {
	transform: scale(1.03);
}
.pt-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	font-size: 0.875rem;
	line-height: 1.4;
}
.pt-post__category {
	color: var(--pt-i-accent);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.pt-post__dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--pt-i-border);
}
.pt-post__time {
	color: var(--pt-i-muted);
}
.pt-insights .pt-post__title {
	margin: 0;
	color: var(--pt-i-text);
	font-family: inherit;
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.018em;
	text-transform: none;
}
.pt-insights .pt-post__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}
.pt-insights .pt-post__title a:hover {
	color: var(--pt-i-accent);
}
.pt-post__excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--pt-i-muted);
	font-size: 0.875rem;
	line-height: 1.4;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}
.pt-post__more {
	margin-top: auto;
}

.pt-insights__progress {
	position: relative;
	height: 2px;
	margin-top: var(--pt-section-sm, 48px);
	overflow: hidden;
	border-radius: 999px;
	background: var(--pt-i-border);
}
.pt-insights__thumb {
	position: absolute;
	top: 0;
	left: 0;
	width: 30%;
	height: 100%;
	border-radius: inherit;
	background: var(--pt-i-accent);
	transition: left 0.15s linear, width 0.15s linear;
}

@media (prefers-reduced-motion: reduce) {
	.pt-insights * {
		transition: none !important;
	}
}

@media (max-width: 1024px) {
	.pt-insights {
		--pt-i-card: 320px;
		--pt-i-gap: 24px;
	}
}

@media (max-width: 767px) {
	.pt-insights {
		--pt-i-card: min(300px, 80vw);
		--pt-i-gap: 20px;
	}
	.pt-insights__header {
		align-items: flex-start;
	}
	.pt-insights .pt-insights__lead {
		font-size: 1.125rem;
	}
	.pt-post__media {
		height: 190px;
	}
	.pt-insights .pt-post__title {
		font-size: 1.25rem;
	}
}
