/**
 * Archive system (Phase 1, design B): P02 posts index, P08–P11
 * category archives, P18 search results — rendered by the plugin
 * template (templates/archive.php) inside .fr-archive.
 *
 * Dark zone like the homepage: full-bleed charcoal, C04 cards,
 * coral monthly band. Colours resolve through the B tokens scoped
 * to .fr-archive in fr-tokens.css.
 */

/* The theme centres .site-main for its own archive templates;
   the plugin template needs the full width instead. */
body.blog main.site-main,
body.archive main.site-main,
body.search main.site-main {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
}

.fr-archive {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	background: var(--fr-bg);
	color: var(--fr-text);
}

.fra-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 64px 80px 72px;
}

.fra-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Intro ---------- */

.fra-eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .22em;
	color: var(--fr-accent);
	text-transform: uppercase;
	margin-bottom: 18px;
}

.fra-title {
	font-size: clamp(38px, 4.6vw, 58px);
	line-height: 1.28;
	margin-bottom: 16px;
}

.fra-desc {
	font-size: 18px;
	line-height: 1.8;
	color: var(--fr-muted);
	max-width: 36em;
}

/* ---------- Search ---------- */

.fra-search {
	display: flex;
	gap: 12px;
	margin-top: 36px;
	max-width: 640px;
}

.fra-search-input {
	flex: 1;
	min-width: 0;
	height: 50px;
	padding: 0 16px;
	font-size: 16px;
	color: var(--fr-text);
	background: var(--fr-surface);
	border: 1px solid var(--fr-border);
	border-radius: 3px;
}

.fra-search-input::placeholder {
	color: var(--fr-muted);
}

.fra-search-button {
	height: 50px;
	padding: 0 26px;
	font-size: 16px;
	font-weight: 700;
	color: var(--fr-reading-text);
	background: var(--fr-accent);
	border: 1px solid var(--fr-accent);
	border-radius: 3px;
	cursor: pointer;
	white-space: nowrap;
}

.fra-search-button:hover {
	opacity: .88;
}

/* ---------- Category chips ---------- */

.fra-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 26px;
}

.fra-chip {
	display: inline-block;
	padding: 9px 18px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--fr-muted);
	border: 1px solid var(--fr-border);
	border-radius: 999px;
}

.fra-chip:hover {
	color: var(--fr-text);
	border-color: var(--fr-muted);
}

.fra-chip.is-active {
	color: var(--fr-reading-text);
	background: var(--fr-accent);
	border-color: var(--fr-accent);
}

/* ---------- Post grid + cards (C04, mirrors the homepage) ---------- */

.fra-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-top: 44px;
}

.fr-archive .fr-post-card {
	background: var(--fr-surface);
	border: 1px solid var(--fr-border);
	border-radius: 3px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.fr-archive .fr-post-card-media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--fr-bg);
}

.fr-archive .fr-post-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fr-archive .fr-post-card-media.fr-media-contain img {
	object-fit: contain;
}

.fr-archive .fr-post-card-body {
	padding: 24px 26px 26px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.fr-archive .fr-post-card-type {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	color: var(--fr-accent);
	text-transform: uppercase;
}

.fr-archive .fr-post-card-body h3 {
	font-size: 21px;
	line-height: 1.45;
}

.fr-archive .fr-post-card-body h3 a {
	color: var(--fr-text);
}

.fr-archive .fr-post-card-body h3 a:hover {
	color: var(--fr-accent);
}

.fr-archive .fr-post-card-sum {
	color: var(--fr-muted);
	font-size: 15px;
	line-height: 1.7;
	flex: 1;
}

.fr-archive .fr-post-card-meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 13px;
	color: var(--fr-muted);
	border-top: 1px solid var(--fr-border);
	padding-top: 14px;
}

.fr-archive .fr-post-card-read {
	font-weight: 700;
	letter-spacing: .06em;
	color: var(--fr-text);
}

.fr-archive .fr-post-card-read:hover {
	color: var(--fr-accent);
}

/* ---------- Count line + pagination ---------- */

.fra-count {
	margin-top: 36px;
	font-size: 14.5px;
	color: var(--fr-muted);
}

.fra-pagination {
	margin-top: 28px;
}

.fra-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.fra-pagination .page-numbers a,
.fra-pagination .page-numbers span {
	display: inline-block;
	padding: 9px 15px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--fr-muted);
	border: 1px solid var(--fr-border);
	border-radius: 3px;
}

.fra-pagination .page-numbers a:hover {
	color: var(--fr-text);
	border-color: var(--fr-muted);
}

.fra-pagination .page-numbers .current {
	color: var(--fr-reading-text);
	background: var(--fr-accent);
	border-color: var(--fr-accent);
}

/* ---------- Empty states ---------- */

.fra-empty {
	margin-top: 48px;
	padding: 52px 40px;
	text-align: center;
	background: var(--fr-surface);
	border: 1px solid var(--fr-border);
	border-radius: 3px;
}

.fra-empty h2 {
	font-size: 27px;
	line-height: 1.45;
	margin-bottom: 14px;
}

.fra-empty p {
	color: var(--fr-muted);
	font-size: 16px;
	line-height: 1.8;
	max-width: 32em;
	margin: 0 auto;
}

.fra-empty-cta {
	display: inline-block;
	margin-top: 26px;
	padding: 13px 28px;
	font-size: 16px;
	font-weight: 700;
	color: var(--fr-reading-text);
	background: var(--fr-accent);
	border-radius: 3px;
}

.fra-empty-cta:hover {
	opacity: .88;
}

/* ---------- Monthly band (coral, mirrors the homepage band) ---------- */

.fra-monthly {
	background: var(--fr-accent);
	color: var(--fr-reading-text);
	margin-top: 8px;
}

.fra-monthly .fra-inner {
	padding-top: 68px;
	padding-bottom: 68px;
}

.fra-monthly-eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--fr-reading-text);
	opacity: .72;
	margin-bottom: 18px;
}

.fra-monthly h2 {
	font-size: clamp(26px, 3vw, 36px);
	margin-bottom: 12px;
}

.fra-monthly-sub {
	font-size: 16.5px;
	max-width: 34em;
}

.fra-monthly .fr-kit-form {
	margin: 26px 0 14px;
	max-width: 560px;
}

.fra-monthly .formkit-form {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	max-width: none !important;
}

.fra-monthly .formkit-input {
	background: #FFFFFF;
	color: var(--fr-reading-text);
	border: 1px solid rgba(36, 44, 40, .35) !important;
	border-radius: 3px !important;
	min-height: 50px;
	font-size: 16px;
}

.fra-monthly .formkit-submit {
	background: var(--fr-bg) !important;
	color: var(--fr-text) !important;
	border-radius: 3px !important;
	min-height: 50px;
	font-weight: 700;
}

.fra-monthly-note {
	font-size: 13.5px;
	color: var(--fr-reading-text);
	opacity: .85;
}

.fra-monthly-note a {
	color: var(--fr-reading-text);
	text-decoration: underline;
}

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

@media (max-width: 1100px) {
	.fra-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.fra-inner {
		padding: 44px 22px 52px;
	}

	.fra-title {
		font-size: 36px;
	}

	.fra-desc {
		font-size: 16px;
	}

	.fra-search {
		margin-top: 28px;
	}

	.fra-grid {
		grid-template-columns: 1fr;
		margin-top: 36px;
	}

	.fr-archive .fr-post-card-body h3 {
		font-size: 20px;
	}

	.fra-empty {
		padding: 40px 24px;
	}

	.fra-monthly .fra-inner {
		padding-top: 52px;
		padding-bottom: 52px;
	}
}
