/* Links to the posts before and after a post (platform post-nav.html),
   in the page's footer, on one line with what the footer has (the blog's
   name): the older on the left, the footer's own content in the middle,
   the newer on the right. The links are small; their colours come from
   the footer's text, so they suit light and dark footers alike. Themes
   may restyle them. */
footer:has(> .post-nav) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 1.5rem;
}

footer:has(> .post-nav) > :not(.post-nav) {
	grid-column: 2;
	grid-row: 1;
	justify-self: center;
}

/* The links take the footer's first and last columns. */
.post-nav { display: contents; }

.post-nav a {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
	color: inherit;
	text-align: left;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
}

.post-nav-older { grid-column: 1; grid-row: 1; justify-self: start; }
.post-nav-newer { grid-column: 3; grid-row: 1; justify-self: end; text-align: right; }

.post-nav-label {
	font-family: var(--sans, system-ui, sans-serif);
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.65;
}

.post-nav-title {
	font-family: var(--serif-display, Georgia, serif);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.3;
}

.post-nav a:hover .post-nav-title { text-decoration: underline; text-underline-offset: 0.2em; }

/* Narrow: the links side by side, the rest under them. */
@media (max-width: 40rem) {
	footer:has(> .post-nav) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	footer:has(> .post-nav) > :not(.post-nav) { grid-column: 1 / -1; grid-row: 2; }
	.post-nav-newer { grid-column: 2; }
}
