/*
 * Single post (templates/single.html). Loaded on the front end and in the
 * editor.
 *
 *   .bl-article          the <article> wrapper
 *   .bl-article-head     <header>: category label, title, byline; a Section,
 *                        so it carries the first spine marker (on the label)
 *   .bl-article-kicker   category label (Post Terms block)
 *   .bl-article-title    the post's one H1 (Post Title block)
 *   .bl-post-meta        byline "Bronwen Lemmon, LMFT · date" (parts/post-meta.html)
 *   .bl-contents         "In this essay" (blocks/contents, inc/contents.php);
 *                        long posts only
 *   .bl-article-body     Post Content; each direct H2 is a spine section
 *                        (spine.css, spine.js)
 *
 * Title size: the "title" preset (Article title), one step below the
 * homepage Headline: 56px, 48px at 1100px and below, 30-36px at 820px and
 * below (base.css). Always larger than H2.
 *
 * Spacing follows the homepage sections (desktop / 820px and below):
 *   head        top 72 / 48, label to title 22, title to byline 14 / 12,
 *               byline to body 72 / 48, or to the contents list 44 / 32
 *   contents    72 / 56 below its bottom hairline
 *   H2          88 / 64 above, 28 / 24 to the first text
 *   body end    128 / 96 below the last block
 */

.bl-article,
.bl-article > * {
	margin-block-start: 0;
}

/* Head */
.bl-article-head {
	--bl-pt: 72px;
	padding-top: var(--bl-pt);
	padding-bottom: 72px;
}

/* With a contents list below, the head closes 44px under the byline */
.bl-article-head:has(+ .bl-contents) {
	padding-bottom: 44px;
}

/*
 * The spine marker centres on the category label (.bl-spine-anchor, measured
 * by spine.js). No-JS estimate: half the label's 18px line. Outranks
 * spine.css's :has(h1) rule.
 */
.is-style-section.bl-article-head:has(h1) {
	--bl-mk-c: 9px;
}

/* Category label above the title: the original design's .kick */
.bl-article-kicker {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 400;
	letter-spacing: 0.16em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-text);
}

.bl-article-kicker a {
	color: inherit;
	text-decoration: none;
}

.bl-article-kicker a:hover,
.bl-article-kicker a:focus-visible {
	color: var(--wp--preset--color--contrast);
}

.bl-article-title {
	margin-block-start: 22px;
	font-size: var(--wp--preset--font-size--title);
	line-height: 1.1;
	letter-spacing: -0.018em;
}

/*
 * Byline: the original design's .by (mixed case, muted sans, 14px). A
 * wrapping flex row with no gap, so ", LMFT" sits against the name. The dot
 * belongs to the end of the credential, so when a narrow screen wraps the
 * line, the date starts the new line cleanly. Each part stays whole.
 */
.bl-post-meta {
	gap: 0;
	margin-block-start: 14px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.875rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	line-height: 1.5;
	color: var(--wp--preset--color--muted);
}

.bl-post-meta > * {
	margin: 0;
	white-space: nowrap;
}

.bl-post-meta__credential::after {
	content: "\00a0\00a0·\00a0\00a0" / "";
}

/*
 * Contents: the original design's .toc. Hairlines above and below; numbers
 * 01, 02 ... in their own muted column, styled as Selected writing's; no list
 * indent, so the numbers sit on the text column's edge.
 */
.bl-contents {
	margin-bottom: 72px;
	padding: 20px 0 4px;
	border-top: 1px solid var(--wp--preset--color--hairline);
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	font-family: var(--wp--preset--font-family--sans);
}

.bl-contents__title {
	margin: 0 0 6px;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.16em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.bl-contents__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bl-contents__list a {
	display: flex;
	gap: 16px;
	align-items: baseline;
	padding: 9px 0;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.bl-contents__list a:hover,
.bl-contents__list a:focus-visible {
	color: var(--wp--preset--color--accent-text);
}

.bl-contents__n {
	flex: none;
	min-width: 20px;
	font-size: 13px;
	letter-spacing: 0.1em;
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--muted);
}

/* Editor placeholder (Site Editor, single template) */
.bl-contents__note {
	margin: 0 0 16px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

/* Body */
.bl-article-body {
	padding-bottom: 128px;
}

.bl-article-body > h2 {
	margin-block-start: 88px;
	scroll-margin-top: 32px;
}

.bl-article-body > h2 + * {
	margin-block-start: 28px;
}

@media (max-width: 820px) {
	.bl-article-head {
		--bl-pt: 48px;
		padding-bottom: 48px;
	}

	.bl-article-head:has(+ .bl-contents) {
		padding-bottom: 32px;
	}

	.bl-post-meta {
		margin-block-start: 12px;
	}

	.bl-contents {
		margin-bottom: 56px;
	}

	.bl-article-body {
		padding-bottom: 96px;
	}

	.bl-article-body > h2 {
		margin-block-start: 64px;
	}

	.bl-article-body > h2 + * {
		margin-block-start: 24px;
	}
}
