/* =====================================================================
   Blog

   The index reuses the .blog-card vocabulary the section gallery already
   defines; everything here is either the post page, which has no equivalent
   yet, or the small amount the cards need in order to be links rather than
   illustrations.
   ===================================================================== */

.blog-hero {
	max-width: var(--container);
	margin: 0 auto;
	/* The nav is fixed, so every page has to make room for it itself — the
	   same clearance the landing pages take. */
	padding: calc(var(--nav-h) + clamp(2rem, 5vw, 3.5rem)) 1.25rem 1rem;
}

.blog-hero h1 {
	max-width: 18ch;
	font-size: clamp(2.75rem, 7vw, 4.5rem);
	line-height: 0.95;
	margin: 0.5rem 0 0;
}

.blog-standfirst {
	max-width: 52ch;
	margin: 1rem 0 0;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--text-muted);
}

/* A card is a link now, so it needs the reset the gallery's <article> never
   did — and a focus ring, because a card with no visible focus is unusable
   by keyboard. */
a.blog-card {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

a.blog-card:focus-visible {
	outline: 2px solid var(--accent-2);
	outline-offset: 3px;
}

.blog-thumb {
	display: block;
}

.blog-meta {
	display: block;
	margin-top: 0.75rem;
	font-size: 0.75rem;
	color: var(--text-faint);
}

/* ---------------------------------------------------------------- post */

.post {
	max-width: 44rem;
	margin: 0 auto;
	padding: calc(var(--nav-h) + 2rem) 1.25rem 1rem;
}

.post-back {
	display: inline-block;
	margin-bottom: 1.75rem;
	font-size: 0.8125rem;
	color: var(--text-muted);
	text-decoration: none;
}

.post-back:hover {
	color: var(--accent-2);
}

.post-tag {
	margin: 0;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent-2);
}

.post h1 {
	margin: 0.5rem 0 0;
	font-size: clamp(2.25rem, 5.5vw, 3.5rem);
	line-height: 1.02;
}

.post-meta {
	margin: 1rem 0 0;
	font-size: 0.8125rem;
	color: var(--text-faint);
}

/* 65-ish characters, which is where running text stops being a wall. */
.post-body {
	margin-top: 2.25rem;
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--text-muted);
}

.post-lead {
	font-size: 1.25rem;
	line-height: 1.55;
	color: var(--text);
}

.post-body h2 {
	margin: 2.5rem 0 0.75rem;
	font-size: 1.5rem;
	line-height: 1.2;
	color: var(--text);
	text-transform: none;
}

.post-body p {
	margin: 0 0 1.125rem;
}

.post-body em {
	color: var(--text);
	font-style: normal;
	font-weight: 600;
}

.post-body code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.9em;
	color: var(--accent-2);
}

/* The one place a horizontal scrollbar is correct: a captured stream title is
   one long line and wrapping it would misrepresent what arrived. */
.post-code {
	margin: 0 0 1.5rem;
	padding: 1rem 1.125rem;
	overflow-x: auto;
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius-md);
	background: var(--bg-elevated);
	font-size: 0.8125rem;
	line-height: 1.6;
}

.post-code code {
	color: var(--text);
	white-space: pre;
}

.post-cta-wrap {
	padding-top: 1rem;
}

.post-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
	padding: 1.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: linear-gradient(135deg, rgba(255, 47, 176, 0.12), rgba(186, 255, 41, 0.08));
}

.post-cta h2 {
	margin: 0;
	font-size: 1.75rem;
}

.post-cta p {
	margin: 0.25rem 0 0;
	color: var(--text-muted);
	font-size: 0.9375rem;
}

@media (max-width: 640px) {
	.post-cta {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ---------------------------------------------------------- pictures */

/* The card's picture is an <img> when there is a screenshot for the post and a
   gradient <span> when there is not, so both have to size identically. */
img.blog-thumb {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	background: var(--bg-elevated);
}

.post-hero {
	margin: 2rem 0 0;
}

.post-hero img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--bg-elevated);
}

/* The one line that says the pictures are generated. Quiet, but on the page
   rather than in a policy, for the same reason the posts say where a
   recording goes. */
.blog-note {
	max-width: 52ch;
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--text-faint);
}
