/**
 * Blog index, archives and search results (home.php, archive.php,
 * search.php): header, category chips, search form, post cards
 * (post-card.css), pagination, empty state; and the 404 page.
 */

.archive-header__lead {
	max-width: var(--measure);
	margin: var(--space-3) 0 0;
	color: var(--color-text-muted);
}

.archive-author {
	display: flex;
	gap: var(--space-5);
	align-items: center;
}

.archive-author__avatar {
	flex-shrink: 0;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
}

@media (max-width: 30rem) {

	.archive-author {
		flex-direction: column;
		align-items: flex-start;
	}
}

.archive {
	padding-bottom: var(--section-padding);
}

/* After the blog's coloured hero (home.php): the chips belong to the list,
   so less than a whole section's space. */
.section-hero + .archive {
	padding-top: var(--space-7);
}

/* ---------- Category chips and search ---------- */

.archive-tools {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4) var(--space-6);
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: var(--space-7);
}

.archive-header__search {
	max-width: 32rem;
	margin-top: var(--space-5);
}

.search-form {
	display: flex;
	flex: 1 1 16rem;
	max-width: 24rem;
}

.search-form__field {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: var(--space-2) var(--space-4);
	border: 1px solid var(--color-border-strong);
	border-right: 0;
	border-radius: var(--radius-sm) 0 0 var(--radius-sm);
	background: var(--color-surface);
	color: var(--color-text);
	font: inherit;
	font-size: var(--step--1);
}

.search-form__field::placeholder {
	color: var(--color-text-subtle);
}

.search-form__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-height: 44px;
	border: 1px solid var(--color-navy);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	background: var(--color-navy);
	color: var(--color-text-inverse);
	cursor: pointer;
}

.search-form__button:hover {
	background: var(--color-navy-hover);
}

.category-chips__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.category-chips__chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: var(--space-2) var(--space-4);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-pill);
	color: var(--color-navy);
	font-family: var(--font-heading);
	font-size: var(--step--1);
	font-weight: 600;
	text-decoration: none;
	transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.category-chips__chip:hover {
	border-color: var(--color-navy);
	background: var(--color-surface-alt);
	color: var(--color-navy);
}

/* The current category: filled, not color alone (aria-current for screen readers). */
.category-chips__chip[aria-current="page"] {
	border-color: var(--color-navy);
	background: var(--color-navy);
	color: var(--color-text-inverse);
}

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

.pagination {
	margin-top: var(--space-8);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	justify-content: center;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 var(--space-3);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-button);
	color: var(--color-navy);
	font-family: var(--font-heading);
	font-weight: 600;
	text-decoration: none;
}

.pagination a.page-numbers:hover {
	border-color: var(--color-navy);
	background: var(--color-surface-alt);
}

.pagination .page-numbers.current {
	border-color: var(--color-navy);
	background: var(--color-navy);
	color: var(--color-text-inverse);
}

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

/* ---------- Empty state ---------- */

.archive-empty {
	padding: var(--space-8) 0;
	text-align: center;
}

.archive-empty__text {
	color: var(--color-text-muted);
	font-size: var(--step-1);
}

/* ---------- Page not found (404.php): one centered column ---------- */

.not-found__inner {
	max-width: calc(var(--measure) + 2 * var(--gutter));
	text-align: center;
}

/* Large display text: brand pink passes 3:1 here (decorative/large only). */
.not-found__code {
	margin: 0 0 var(--space-4);
	color: var(--color-brand);
	font-family: var(--font-heading);
	font-size: var(--step-5);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.not-found__title {
	margin-bottom: var(--space-4);
}

.not-found__lead {
	margin-inline: auto;
}

.not-found__search {
	max-width: 28rem;
	margin: var(--space-6) auto 0;
	text-align: left;
}

.not-found__search .search-form {
	max-width: none;
}

.not-found__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	justify-content: center;
	margin: var(--space-6) 0 0;
}
