/*
 * MEG redesign: list views only (posts page, category, tag, author, search).
 * Page head, pager and empty state. Shared tag/card/grid/art rules live in meg-base.css.
 * Logical properties only; physical left/right lives in rtl.css.
 */

/* Page ---------------------------------------------------------------------- */

html body.meg main.meg-list-main {
	display: block;
	font: 500 16px/1.45 var(--meg-sans);
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

html body.meg main.meg-list-main a,
html body.meg main.meg-list-main a:hover,
html body.meg main.meg-list-main a:focus-visible {
	color: inherit;
}

.meg-sr {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Head: eyebrow, h1, description, search form on search results ----------- */

.meg-list__head {
	padding-block: 40px 32px;
	border-block-end: 1px solid var(--meg-line);
}

html body.meg .meg-list__eyebrow {
	margin: 0;
}

html body.meg .meg-list__title {
	max-inline-size: 18ch;
	margin: 16px 0 0;
	font-size: clamp(40px, 5.6vw, 84px);
	overflow-wrap: anywhere;
	color: inherit;
}

html body.meg .meg-list__desc {
	max-inline-size: 60ch;
	margin-block-start: 20px;
	color: var(--meg-muted);
	font-size: 20px;
	line-height: 1.4;
}

html body.meg .meg-list__desc p {
	margin: 0 0 0.6em;
}

html body.meg .meg-list__desc p:last-child {
	margin-block-end: 0;
}

html body.meg .meg-list__head .meg-search,
html body.meg .meg-list__empty .meg-search {
	max-inline-size: 720px;
	margin-block-start: 28px;
}

/* Posts --------------------------------------------------------------------- */

.meg-list__posts {
	padding-block: 48px var(--meg-sec);
}

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

.meg-list__empty {
	max-inline-size: 720px;
}

html body.meg .meg-list__empty-title {
	margin: 0;
	font: 700 28px/1.2 var(--meg-sans);
	letter-spacing: -0.01em;
	text-transform: none;
	color: inherit;
}

html body.meg .meg-list__empty-text {
	margin: 12px 0 0;
	color: var(--meg-muted);
	font-size: 18px;
}

/* Pager: prev, numbers, next ------------------------------------------------ */

.meg-pager {
	margin-block-start: 64px;
	padding-block-start: 24px;
	border-block-start: 1px solid var(--meg-line);
}

html body.meg .meg-pager__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

html body.meg .meg-pager__list li {
	margin: 0;
	padding: 0;
}

html body.meg .meg-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	min-inline-size: 44px;
	block-size: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--meg-line);
	border-radius: 0;
	background: none;
	color: var(--meg-kohl);
	font: 700 12px/1 var(--meg-mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}

html body.meg .meg-pager a.page-numbers:hover,
html body.meg .meg-pager a.page-numbers:focus-visible {
	border-color: var(--meg-kohl);
	color: var(--meg-kohl);
	text-decoration: none;
}

html body.meg .meg-pager .page-numbers.current {
	border-color: var(--meg-kohl);
	background-color: var(--meg-kohl);
	color: var(--meg-offwhite);
}

html body.meg .meg-pager .page-numbers.dots {
	min-inline-size: 0;
	padding-inline: 4px;
	border-color: transparent;
}

/* Below 760px --------------------------------------------------------------- */

@media (max-width: 760px) {
	.meg-list__head {
		padding-block: 24px;
	}

	html body.meg .meg-list__title {
		font-size: 40px;
	}

	html body.meg .meg-list__desc {
		font-size: 18px;
	}

	.meg-list__posts {
		padding-block-start: 32px;
	}

	.meg-pager {
		margin-block-start: 40px;
	}
}
