/*
 * Blog — archive listing and single article.
 *
 * The prototype has no article page, so unlike the section stylesheets nothing
 * here is a port; it is written from the design's own tokens and type scale so a
 * post the client publishes still looks like part of the site.
 *
 * The listing reuses the design's .lp-post card and .lp-news grid directly, so
 * only the page frame, the article layout and the prose styles live here.
 */

.nb-blog {
	padding-top: 56px;
}

/*
 * The grid is inherited from the design's .lp-news (three columns, collapsing at
 * its own breakpoints) so the archive matches the News section on the home page.
 * An earlier auto-fill override produced a fourth, empty column on wide screens.
 */

/* --- Pagination ----------------------------------------------------------- */
.nb-pagination {
	margin-top: 40px;
}

.nb-pagination .nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.nb-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--card);
	font-size: 14px;
	font-weight: 600;
	color: var(--ink-2);
	transition: background var(--transition), border-color var(--transition);
}

.nb-pagination .page-numbers:hover {
	background: var(--line-2);
}

.nb-pagination .page-numbers.current {
	background: var(--nb);
	border-color: var(--nb);
	color: #fff;
}

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

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

/*
 * A readable measure, not the 1320px site container. Body copy spanning the full
 * width is what made the first version read as an unstyled document.
 */
.nb-article {
	max-width: 780px;
	padding-top: 48px;
}

.nb-article-head {
	margin-bottom: 28px;
}

.nb-article-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--mute);
	margin-bottom: 24px;
	transition: color var(--transition);
}

.nb-article-back:hover {
	color: var(--nb-3);
}

.nb-article-tag {
	display: inline-block;
	background: var(--nb-soft);
	color: var(--nb-3);
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	margin-bottom: 14px;
}

.nb-article h1 {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.12;
	letter-spacing: -.02em;
	margin: 0;
	color: var(--ink);
}

.nb-article-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
	font-family: var(--font-mono);
	font-size: 12.5px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--mute);
}

.nb-article-media {
	margin: 0 0 36px;
}

.nb-article-media img {
	width: 100%;
	/* Crop tall photos to a banner rather than letting them run down the page. */
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--r-lg);
}

.nb-article-media figcaption {
	margin-top: 10px;
	font-size: 13px;
	color: var(--mute);
	text-align: center;
}

/* --- Prose ---------------------------------------------------------------- */
.nb-prose {
	font-size: 17px;
	line-height: 1.7;
	color: var(--ink-2);
}

.nb-prose > * + * {
	margin-top: 1.15em;
}

.nb-prose h2,
.nb-prose h3,
.nb-prose h4 {
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--ink);
	letter-spacing: -.01em;
	line-height: 1.25;
	margin-top: 1.8em;
}

.nb-prose h2 {
	font-size: 28px;
}

.nb-prose h3 {
	font-size: 22px;
}

.nb-prose h4 {
	font-size: 18px;
}

.nb-prose a {
	color: var(--nb-3);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.nb-prose a:hover {
	color: var(--nb);
}

.nb-prose strong {
	font-weight: 700;
	color: var(--ink);
}

.nb-prose ul,
.nb-prose ol {
	padding-left: 1.3em;
}

.nb-prose li + li {
	margin-top: .4em;
}

.nb-prose ul {
	list-style: disc;
}

.nb-prose ol {
	list-style: decimal;
}

.nb-prose blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--nb);
	font-family: var(--font-display);
	font-size: 20px;
	line-height: 1.5;
	color: var(--ink);
}

.nb-prose blockquote p {
	margin: 0;
}

.nb-prose img,
.nb-prose figure img {
	border-radius: var(--r-md);
}

.nb-prose figure {
	margin: 1.8em 0;
}

.nb-prose figcaption {
	margin-top: 10px;
	font-size: 13px;
	color: var(--mute);
	text-align: center;
}

.nb-prose code {
	font-family: var(--font-mono);
	font-size: .9em;
	background: var(--line-2);
	border-radius: 4px;
	padding: 2px 6px;
}

.nb-prose pre {
	background: var(--ink);
	color: #fff;
	border-radius: var(--r-md);
	padding: 18px 20px;
	overflow-x: auto;
}

.nb-prose pre code {
	background: none;
	padding: 0;
	color: inherit;
}

.nb-prose hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 2.4em 0;
}

.nb-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.nb-prose th,
.nb-prose td {
	border: 1px solid var(--line);
	padding: 10px 12px;
	text-align: left;
}

.nb-prose th {
	background: var(--line-2);
	font-weight: 700;
}

/* WordPress alignment classes, which the editor can output. */
.nb-prose .aligncenter {
	margin-inline: auto;
	text-align: center;
}

.nb-prose .alignright {
	float: right;
	margin: 0 0 1em 1.4em;
}

.nb-prose .alignleft {
	float: left;
	margin: 0 1.4em 1em 0;
}

.nb-prose .wp-caption {
	max-width: 100%;
}

/* --- Tags ----------------------------------------------------------------- */
.nb-article-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
}

.nb-article-tags a {
	background: var(--line-2);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ink-2);
}

.nb-article-tags a:hover {
	background: var(--nb-soft);
	color: var(--nb-3);
}

/* --- Previous / next ------------------------------------------------------ */
.nb-postnav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	max-width: 780px;
	padding-bottom: 88px;
}

.nb-postnav-item {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	padding: 18px 20px;
	transition: transform var(--transition), box-shadow var(--transition);
}

.nb-postnav-item:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
}

/* A lone "next" card should sit on the right, where its direction implies. */
.nb-postnav-next:only-child {
	grid-column: 2;
}

.nb-postnav-next {
	text-align: right;
}

.nb-postnav-label {
	display: block;
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--mute-2);
	margin-bottom: 6px;
}

.nb-postnav-title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 17px;
	line-height: 1.3;
	color: var(--ink);
}

/* --- Comments, if the client turns them on -------------------------------- */
.nb-comments {
	max-width: 780px;
	padding-bottom: 88px;
}

.nb-comments input[type="text"],
.nb-comments input[type="email"],
.nb-comments input[type="url"],
.nb-comments textarea {
	width: 100%;
	max-width: 100%;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r);
	padding: 12px 14px;
	font-size: 15px;
}

.nb-comments label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
}

.nb-comments .comment-form-cookies-consent label {
	display: inline;
	font-weight: 400;
}

.nb-comments p {
	margin: 0 0 16px;
}

.nb-comments .submit {
	background: var(--nb);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 12px 22px;
	font-weight: 600;
	cursor: pointer;
}

.nb-comments .submit:hover {
	background: var(--nb-2);
}

@media (max-width: 700px) {
	.nb-postnav {
		grid-template-columns: 1fr;
	}

	.nb-postnav-next {
		text-align: left;
	}

	.nb-postnav-next:only-child {
		grid-column: 1;
	}

	.nb-prose {
		font-size: 16px;
	}
}
