/* ==========================================================================
   Post listings — the blog, category archives and search results.
   Loaded only on those views; the card grid is not used anywhere else.
   ========================================================================== */

.pp93-archive {
	padding-block: 48px 96px;
}

.pp93-archive__head {
	max-width: 760px;
	margin-bottom: 48px;
}

.pp93-archive__title {
	margin: 0;
	font-size: 48px;
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.5px;
	color: var(--pp93-ink);
}

.pp93-archive__lead {
	margin-top: 16px;
	color: var(--pp93-muted);
	font-size: 17px;
	line-height: 28px;
}

.pp93-archive__lead > *:last-child { margin-bottom: 0; }

.pp93-archive__empty {
	padding: 40px 0;
	color: var(--pp93-muted);
	font-size: 17px;
}

/* --- Category strip ------------------------------------------------------- */

.pp93-archive__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 32px;
}

.pp93-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border: 1px solid rgba(61, 79, 183, .18);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	color: var(--pp93-ink);
	transition: background-color .18s ease, border-color .18s ease;
}

.pp93-chip:hover { border-color: var(--pp93-ink); }

.pp93-chip.is-current {
	background: var(--pp93-gold);
	border-color: var(--pp93-gold);
}

.pp93-chip__count {
	font-size: 11px;
	font-weight: 700;
	color: var(--pp93-muted);
}

.pp93-chip.is-current .pp93-chip__count { color: rgba(7, 7, 7, .55); }

/* --- The lead entry -------------------------------------------------------
   The newest post runs the full content width with the image beside the copy,
   so an archive opens on one thing rather than on a wall of equal tiles. */

.pp93-post-card--lead {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: stretch;
	margin-bottom: 32px;
}

.pp93-post-card--lead .pp93-post-card__media { aspect-ratio: auto; height: 100%; }

.pp93-post-card--lead .pp93-post-card__body {
	justify-content: center;
	gap: 14px;
	padding: 40px;
}

.pp93-post-card--lead .pp93-post-card__title { font-size: 30px; line-height: 38px; }
.pp93-post-card--lead .pp93-post-card__excerpt { font-size: 16px; line-height: 26px; }

/* Without a featured image the lead has nothing to sit beside, so it becomes a
   single wide band instead of a half-empty two-column card. */
.pp93-post-card--lead:not(:has(.pp93-post-card__media)) {
	grid-template-columns: minmax(0, 1fr);
}

/* --- The grid ------------------------------------------------------------ */

.pp93-post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: start;
	gap: 32px;
}

/* --- One card ------------------------------------------------------------ */

.pp93-post-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	/* INSIDE stroke: the 1px border is taken back out of the padding below. */
	border: 1px solid rgba(61, 79, 183, .18);
	border-radius: var(--pp93-radius-lg);
	background: var(--pp93-bg);
	transition: border-color .2s ease, transform .2s ease;
}

.pp93-post-card:hover {
	border-color: var(--pp93-ink);
	transform: translateY(-2px);
}

.pp93-post-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #F5F7FE;
}

.pp93-post-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.pp93-post-card:hover .pp93-post-card__img { transform: scale(1.03); }

.pp93-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	padding: 23px;
}

.pp93-post-card__terms {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.pp93-post-card__term {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--pp93-gold);
	color: var(--pp93-ink);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .2s ease;
}

.pp93-post-card__term:hover { background: rgba(200, 255, 0, .6); }

.pp93-post-card__title {
	margin: 0;
	font-size: 20px;
	line-height: 28px;
	font-weight: 700;
}

.pp93-post-card__link {
	color: var(--pp93-ink);
	text-decoration: none;
}

.pp93-post-card__link:hover { color: var(--pp93-ink); }

/* Stretches the title's link over the whole card so the entire surface is clickable,
   while the markup keeps a single, honestly-labelled link for assistive tech. */
.pp93-post-card__link::after {
	content: '';
	position: absolute;
	inset: 0;
}

.pp93-post-card { position: relative; }
.pp93-post-card__term { position: relative; z-index: 1; }

.pp93-post-card__excerpt {
	margin: 0;
	color: var(--pp93-muted);
	font-size: 15px;
	line-height: 24px;
}

/* Cards size to their own content (align-items: start above), so the meta line sits
   under the excerpt rather than being pushed to the bottom of a stretched card — an
   entry with no featured image would otherwise open a hole the height of its
   neighbour's image. */
.pp93-post-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding-top: 4px;
	color: var(--pp93-muted);
	font-size: 13px;
}

.pp93-post-card__dot { color: rgba(61, 79, 183, .18); }

/* --- Pagination ---------------------------------------------------------- */

.pp93-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 48px;
}

.pp93-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid rgba(61, 79, 183, .18);
	border-radius: 10px;
	color: var(--pp93-muted);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .2s ease, color .2s ease;
}

.pp93-pagination .page-numbers:hover {
	border-color: var(--pp93-ink);
	color: var(--pp93-ink);
}

.pp93-pagination .page-numbers.current {
	border-color: var(--pp93-ink);
	background: var(--pp93-ink);
	color: #FFFFFF;
}

.pp93-pagination .page-numbers.dots {
	border-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
	.pp93-post-card,
	.pp93-post-card__img { transition: none; }
	.pp93-post-card:hover { transform: none; }
	.pp93-post-card:hover .pp93-post-card__img { transform: none; }
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1199px) {
	.pp93-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.pp93-archive__title { font-size: 40px; }
	.pp93-post-card--lead .pp93-post-card__body { padding: 28px; }
	.pp93-post-card--lead .pp93-post-card__title { font-size: 24px; line-height: 32px; }
}

@media (max-width: 767px) {
	.pp93-archive { padding-block: 32px 64px; }
	.pp93-archive__head { margin-bottom: 32px; }
	.pp93-archive__title { font-size: 30px; line-height: 1.2; }
	.pp93-archive__lead { font-size: 15px; line-height: 25px; }
	.pp93-post-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.pp93-post-card__body { padding: 19px; gap: 10px; }
	.pp93-post-card__title { font-size: 18px; line-height: 26px; }

	/* Stacked on a phone: two columns leave neither the image nor the copy usable. */
	.pp93-post-card--lead { grid-template-columns: minmax(0, 1fr); margin-bottom: 20px; }
	.pp93-post-card--lead .pp93-post-card__media { aspect-ratio: 16 / 9; height: auto; }
	.pp93-post-card--lead .pp93-post-card__body { padding: 19px; }
	.pp93-post-card--lead .pp93-post-card__title { font-size: 20px; line-height: 28px; }
	.pp93-post-card--lead .pp93-post-card__excerpt { font-size: 15px; line-height: 24px; }
	.pp93-archive__cats { gap: 8px; margin-bottom: 24px; }
	.pp93-chip { padding: 7px 13px; font-size: 12px; }
}
