/* =========================================================
   Article list — category / tag / date / author / search / blog index
   Templates: templates/archive.html, templates/index.html
   Patterns : patterns/archive-hero.php, patterns/article-list.php
   Header and footer come from parts/header.html and parts/footer.html.
   Tokens follow the homepage: #1769e0 accent, Jost, 14-16px radii, 1160px shell.
   ========================================================= */

.wp-block-group.cpt-alist-page {
	padding: 0;
	margin: 0;
}

/* ---------------- Page header band ---------------- */

.cpt-alist-hero {
	background: #f7f9fc;
	border-bottom: 1px solid #e9edf3;
	padding: 62px 24px 44px;
}

.cpt-alist-hero-in {
	width: 100%;
	max-width: 820px;
	margin: 0 auto;
	text-align: center;
}

.cpt-alist-hero .cpt-eyebrow {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #1769e0;
}

.cpt-eyebrow-sep {
	margin: 0 9px;
	color: #a9bcd6;
}

.cpt-alist-hero .cpt-alist-title {
	margin: 0 0 14px;
	font-size: clamp(2rem, 3.4vw, 2.85rem);
	line-height: 1.12;
	letter-spacing: -0.025em;
	font-weight: 700;
	color: #111827;
	text-wrap: balance;
}

.cpt-alist-hero .cpt-alist-sub {
	margin: 0 auto;
	max-width: 640px;
	font-size: 16.5px;
	line-height: 1.65;
	color: #596579;
}

/* Category chips */

.cpt-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 26px 0 0;
}

.cpt-chips .cpt-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #fff;
	color: #3b4658;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cpt-chips .cpt-chip:hover,
.cpt-chips .cpt-chip:focus-visible {
	border-color: #bcd0ef;
	color: #1769e0;
	background: #fff;
}

.cpt-chips .cpt-chip.is-active {
	background: #1769e0;
	border-color: #1769e0;
	color: #fff;
}

.cpt-chip-n {
	font-size: 11.5px;
	font-weight: 500;
	opacity: 0.7;
	font-variant-numeric: tabular-nums;
}

/* ---------------- Two-column shell ---------------- */

.wp-block-group.cpt-alist {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 56px;
	align-items: start;
	width: 100%;
	max-width: 1160px;
	margin: 0 auto;
	padding: 52px 24px 84px;
}

.cpt-alist-main {
	min-width: 0;
}

/* ---------------- Article rows ---------------- */

.cpt-rows {
	display: grid;
	gap: 14px;
	counter-reset: cptrow;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cpt-rows .cpt-row {
	position: relative;
	padding: 26px 56px 24px 80px;
	background: #fff;
	border: 1px solid #e3e9f2;
	border-radius: 16px;
	box-shadow: 0 6px 18px rgba(17, 24, 39, 0.035);
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.cpt-rows .cpt-row:hover {
	border-color: #cfdcef;
	box-shadow: 0 14px 32px rgba(17, 24, 39, 0.075);
	transform: translateY(-1px);
}

/* The 01, 02, 03 index — same badge on every card */
.cpt-rows .cpt-row::before {
	counter-increment: cptrow;
	content: counter(cptrow, decimal-leading-zero);
	position: absolute;
	left: 24px;
	top: 25px;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: #f2f6fc;
	color: #7f93ad;
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
}

/* Arrow that slides in on hover */
.cpt-rows .cpt-row::after {
	content: "\2192";
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translate(-6px, -50%);
	font-size: 18px;
	line-height: 1;
	color: #1769e0;
	opacity: 0;
	transition: opacity 180ms ease, transform 180ms ease;
}

.cpt-rows .cpt-row:hover::after {
	opacity: 1;
	transform: translate(0, -50%);
}

.cpt-alist .cpt-row-cat {
	margin: 0 0 7px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #1769e0;
}

.cpt-alist .cpt-row-cat a {
	color: #1769e0;
	text-decoration: none;
	background: none;
}

.cpt-alist .cpt-row-cat a:hover {
	color: #1259c4;
}

.cpt-alist .cpt-row-title {
	margin: 0 0 8px;
	font-size: 21.5px;
	line-height: 1.3;
	letter-spacing: -0.015em;
	font-weight: 600;
	color: #111827;
}

.cpt-alist .cpt-row-title a {
	color: #111827;
	text-decoration: none;
	background: none;
	transition: color 140ms ease;
}

.cpt-alist .cpt-row-title a:hover,
.cpt-alist .cpt-row-title a:focus-visible {
	color: #1769e0;
}

/* kill the theme's animated underline inside rows */
.cpt-alist .cpt-row-title a::after {
	display: none;
}

.cpt-alist .cpt-row-ex {
	margin: 0 0 12px;
	max-width: 66ch;
	font-size: 15.5px;
	line-height: 1.66;
	color: #596579;
}

.cpt-alist .cpt-row-ex p {
	margin: 0;
}

.cpt-alist .cpt-row-foot {
	margin-top: 0;
	justify-content: flex-start;
	gap: 10px;
	font-size: 13px;
	color: #8a94a2;
}

.cpt-alist .cpt-row-date {
	font-size: 13px;
	color: #8a94a2;
	font-weight: 500;
}

/* Every card is identical — no featured first item */

.cpt-empty {
	margin: 0;
	padding: 28px 0;
	color: #596579;
	font-size: 15.5px;
}

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

.cpt-alist .wp-block-query-pagination {
	margin-top: 34px;
	padding-top: 26px;
	border-top: 1px solid #e9edf3;
	gap: 12px;
	align-items: center;
}

.cpt-alist .wp-block-query-pagination a,
.cpt-alist .wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #fff;
	color: #3b4658;
	font-size: 13.5px;
	font-weight: 500;
	text-decoration: none;
	transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.cpt-alist .wp-block-query-pagination a:hover {
	border-color: #bcd0ef;
	color: #1769e0;
}

.cpt-alist .wp-block-query-pagination .page-numbers.current {
	background: #1769e0;
	border-color: #1769e0;
	color: #fff;
}

.cpt-alist .wp-block-query-pagination-numbers {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

.cpt-alist .wp-block-query-pagination-previous,
.cpt-alist .wp-block-query-pagination-next {
	font-size: 13.5px;
}

/* ---------------- Sidebar ---------------- */

.cpt-alist-side {
	position: sticky;
	top: 28px;
	align-self: start;
	display: grid;
	gap: 18px;
}

.cpt-side-card {
	padding: 22px 22px 24px;
	background: #fff;
	border: 1px solid #e3e9f2;
	border-radius: 16px;
}

.cpt-alist-side .cpt-side-kicker {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #1769e0;
}

.cpt-alist-side .cpt-side-kicker-dark {
	color: #8a94a2;
}

.cpt-alist-side .cpt-side-h {
	margin: 0 0 9px;
	font-size: 20px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	font-weight: 600;
	color: #111827;
}

.cpt-alist-side .cpt-side-p {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.6;
	color: #596579;
}

.cpt-alist-side .cpt-side-p-dark {
	margin: 0;
	color: #596579;
}

/* Track card: soft blue surface instead of the heavy black block */
.cpt-side-track {
	background: linear-gradient(165deg, #eef5ff 0%, #e3eefd 100%);
	border-color: #cfe0f8;
	box-shadow: 0 10px 24px rgba(23, 105, 224, 0.08);
}

.cpt-side-track .cpt-side-p {
	color: #4f5d73;
}

.cpt-alist-side .cpt-side-cta {
	margin: 0;
}

.cpt-side-btn {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 11px 16px;
	border-radius: 10px;
	background: #1769e0;
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 6px 14px rgba(23, 105, 224, 0.22);
	transition: background 140ms ease, box-shadow 140ms ease;
}

.cpt-side-btn:hover,
.cpt-side-btn:focus-visible {
	background: #1259c4;
	color: #fff !important;
	box-shadow: 0 8px 18px rgba(23, 105, 224, 0.28);
}

.cpt-alist-side .cpt-side-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cpt-alist-side .cpt-side-list li {
	margin: 0;
	padding: 0;
}

.cpt-alist-side .cpt-side-list a {
	display: block;
	padding: 10px 18px 10px 0;
	border-bottom: 1px solid #f0f3f8;
	color: #3b4658;
	font-size: 14.5px;
	line-height: 1.45;
	text-decoration: none;
	background: none;
	position: relative;
	transition: color 140ms ease;
}

.cpt-alist-side .cpt-side-list li:last-child a {
	border-bottom: 0;
	padding-bottom: 0;
}

.cpt-alist-side .cpt-side-list a::after {
	content: "\2192";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translate(-4px, -50%);
	font-size: 14px;
	color: #b7c2d3;
	opacity: 0;
	transition: opacity 160ms ease, transform 160ms ease;
}

.cpt-alist-side .cpt-side-list a:hover {
	color: #1769e0;
}

.cpt-alist-side .cpt-side-list a:hover::after {
	opacity: 1;
	transform: translate(0, -50%);
	color: #1769e0;
}

/* Category directory card */

.cpt-alist-side .cpt-side-h-dark {
	margin: 0 0 12px;
	font-size: 15.5px;
	line-height: 1.35;
	letter-spacing: 0;
	font-weight: 600;
	color: #111827;
}

.cpt-alist-side .cpt-side-cats a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	padding: 9px 0;
	font-size: 14px;
}

.cpt-alist-side .cpt-side-cats a::after {
	display: none;
}

.cpt-alist-side .cpt-side-cats li:last-child a {
	padding-bottom: 0;
}

.cpt-alist-side .cpt-side-cats .cpt-cat-name {
	min-width: 0;
}

.cpt-alist-side .cpt-side-cats .cpt-cat-n {
	flex: none;
	font-size: 12.5px;
	font-weight: 500;
	color: #a3aebd;
	font-variant-numeric: tabular-nums;
	transition: color 140ms ease;
}

.cpt-alist-side .cpt-side-cats a:hover .cpt-cat-n {
	color: #1769e0;
}

.cpt-alist-side .cpt-side-cats a.is-active {
	color: #1769e0;
	font-weight: 600;
}

.cpt-alist-side .cpt-side-cats a.is-active .cpt-cat-n {
	color: #1769e0;
	font-weight: 600;
}

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

@media (max-width: 1024px) {
	.cpt-alist-hero {
		padding: 52px 24px 38px;
	}

	.wp-block-group.cpt-alist {
		grid-template-columns: 1fr;
		gap: 40px;
		padding: 40px 24px 72px;
	}

	/* keep a readable measure once the sidebar drops below the list */
	.cpt-alist-main,
	.cpt-alist-side {
		width: 100%;
		max-width: 760px;
		margin-left: auto;
		margin-right: auto;
	}

	.cpt-alist-side {
		position: static;
		grid-template-columns: 1fr 1fr;
	}

	.cpt-side-track {
		grid-column: 1 / -1;
	}

	/* the track card spans both columns here — keep the CTA from stretching */
	.cpt-alist-side .cpt-side-btn {
		max-width: 240px;
	}
}

@media (max-width: 640px) {
	.cpt-alist-hero {
		padding: 40px 20px 30px;
	}

	.cpt-alist-hero .cpt-alist-sub {
		font-size: 15.5px;
	}

	.cpt-chips {
		margin-top: 20px;
	}

	.wp-block-group.cpt-alist {
		padding: 30px 20px 56px;
	}

	.cpt-rows {
		gap: 12px;
	}

	.cpt-rows .cpt-row {
		padding: 18px 18px 20px;
		border-radius: 14px;
	}

	/* the index badge eats too much width on a phone */
	.cpt-rows .cpt-row::before,
	.cpt-rows .cpt-row::after {
		display: none;
	}

	.cpt-alist .cpt-row-title {
		font-size: 19px;
		line-height: 1.32;
	}

	.cpt-alist .cpt-row-ex {
		font-size: 15px;
		line-height: 1.62;
		margin-bottom: 10px;
	}

	.cpt-alist-side {
		grid-template-columns: 1fr;
	}

	.cpt-alist .wp-block-query-pagination {
		flex-wrap: wrap;
	}
}

/* On a category archive every row would repeat the same label — drop it there. */
body.category .cpt-alist .cpt-row-cat {
	display: none;
}
