/*
Theme Name: Sightline
Theme URI: https://example.com/sightline
Author: Your Name
Author URI: https://example.com
Description: A quiet editorial theme built around two ideas: the writer belongs at the top of the page, and every article should be readable in pieces. Newsreader for prose, Manrope for the interface, a sticky contents rail, answer-first summaries, and a fully structured author profile. Ships a complete schema.org @graph for search and answer engines.
Version: 2.3.1
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sightline
Tags: editorial, blog, minimal, accessibility-ready, seo, two-columns, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   1. Tokens
   ============================================================ */

:root {
	/* White and monochrome. Hierarchy comes from weight, size and space —
	   never from colour, so nothing on the page competes with the text.
	   To introduce a brand colour later, change --accent alone: every label,
	   rule, active state and hover in the theme reads from it. */
	--paper:      #ffffff;
	--paper-2:    #f7f7f5;
	--card:       #ffffff;
	--ink:        #111110;
	--ink-2:      #55554e;
	--ink-3:      #8c8c84;
	--line:       #e5e5e0;
	--line-soft:  #efefeb;
	--accent:     #111110;
	--accent-2:   #f2f2ee;
	--marker:     #6e6e66;

	--serif: 'Newsreader', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
	--sans:  'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--shell:  1240px;
	--column: 720px;
	--rail:   210px;

	--step:   1.5rem;
	--gap:    clamp(1.5rem, 4vw, 3rem);
	--radius: 3px;
}

/* ============================================================
   2. Base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.6;
	font-feature-settings: 'kern' 1;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin: 0 0 0.5em;
	text-wrap: balance;
}

p { margin: 0 0 1em; }

::selection { background: #e9e9e2; color: var(--ink); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	background: var(--ink);
	color: var(--paper);
	padding: 0.75rem 1.25rem;
	font-size: 0.85rem;
}
.skip:focus { left: 0; }

.shell {
	width: 100%;
	max-width: var(--column);
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}
.shell--wide { max-width: var(--shell); }

.main { padding-bottom: clamp(4rem, 9vw, 7rem); }

/* ============================================================
   3. Masthead
   ============================================================ */

.masthead {
	border-bottom: 1px solid var(--line);
	background: var(--paper);
}

.masthead__top { padding: clamp(1.25rem, 3vw, 2rem) 0; }

/* Wordmark left, tagline under it, nav right — the ribbon below carries the
   sections, so the top row never has to hold more than three things. */
.masthead__grid {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		'mark nav'
		'tag  nav';
	align-items: center;
	column-gap: var(--gap);
	row-gap: 0.25rem;
}

.wordmark {
	grid-area: mark;
	margin: 0;
	font-family: var(--serif);
	font-size: clamp(1.4rem, 3vw, 1.9rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1;
}
.wordmark a { display: inline-block; }
.wordmark--sm { font-size: 1.2rem; }

.masthead__tagline {
	grid-area: tag;
	margin: 0;
	font-size: 0.78rem;
	color: var(--ink-3);
	letter-spacing: 0.01em;
}

.mastnav {
	grid-area: nav;
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 2rem);
}

.mastnav__list {
	display: flex;
	gap: clamp(1rem, 2.5vw, 1.75rem);
	list-style: none;
	margin: 0;
	padding: 0;
}
.mastnav__list a {
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--ink-2);
	padding-block: 0.25rem;
	border-bottom: 1px solid transparent;
	transition: color 0.15s, border-color 0.15s;
}
.mastnav__list a:hover,
.mastnav__list .current-menu-item > a {
	color: var(--ink);
	border-bottom-color: var(--accent);
}

.findbox { display: flex; align-items: center; gap: 0.5rem; }
.findbox__input {
	font: inherit;
	font-size: 0.85rem;
	width: 8.5rem;
	padding: 0.4rem 0.6rem;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--line);
	color: var(--ink);
	transition: width 0.2s, border-color 0.2s;
}
.findbox__input:focus { width: 12rem; border-bottom-color: var(--accent); outline: none; }
.findbox__input::placeholder { color: var(--ink-3); }
.findbox__go {
	font: inherit;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: none;
	border: 0;
	color: var(--accent);
	cursor: pointer;
	padding: 0.4rem 0;
}
.findbox--wide { max-width: 26rem; margin: 1.5rem auto 2rem; }
.findbox--wide .findbox__input { flex: 1; width: auto; }

.burger { display: none; }

/* Section ribbon */
.ribbon {
	border-top: 1px solid var(--line-soft);
	background: var(--paper-2);
	overflow-x: auto;
	scrollbar-width: none;
}
.ribbon::-webkit-scrollbar { display: none; }
.ribbon__list {
	display: flex;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0.7rem 0;
	white-space: nowrap;
}
.ribbon__list a {
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--ink-3);
	transition: color 0.15s;
}
.ribbon__list a:hover { color: var(--accent); }

/* Reading progress */
.railbar {
	position: sticky;
	top: 0;
	z-index: 40;
	height: 2px;
	background: var(--line-soft);
}
.railbar__fill {
	height: 100%;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

/* ============================================================
   4. Breadcrumbs & page headers
   ============================================================ */

.crumbs { padding: 1.5rem 0 0; }
.crumbs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.75rem;
	color: var(--ink-3);
}
.crumbs__item + .crumbs__item::before {
	content: '/';
	margin-right: 0.4rem;
	color: var(--line);
}
.crumbs__item a:hover { color: var(--accent); }

.pagehead {
	padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.75rem, 4vw, 2.75rem);
	border-bottom: 1px solid var(--line);
	margin-bottom: clamp(2rem, 5vw, 3.5rem);
	max-width: 46rem;
}
.pagehead__kicker {
	margin: 0 0 0.75rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}
.pagehead__title {
	font-size: clamp(2rem, 5.5vw, 3.4rem);
	margin-bottom: 0.4em;
}
.pagehead__intro {
	font-family: var(--serif);
	font-size: 1.12rem;
	line-height: 1.6;
	color: var(--ink-2);
	max-width: 38rem;
}
.pagehead__intro p:last-child { margin-bottom: 0; }
.pagehead__count {
	margin: 1rem 0 0;
	font-size: 0.78rem;
	color: var(--ink-3);
	font-variant-numeric: tabular-nums;
}
.pagehead__siblings {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1.5rem;
}
.pagehead__siblings a {
	font-size: 0.76rem;
	padding: 0.3rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: 100px;
	color: var(--ink-2);
	transition: border-color 0.15s, color 0.15s;
}
.pagehead__siblings a:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   5. Images
   ============================================================ */

.frame {
	position: relative;
	aspect-ratio: var(--frame-ratio, 16 / 10);
	overflow: hidden;
	background: var(--paper-2);
	border-radius: var(--radius);
}
.frame__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
a:hover > .frame .frame__img,
a:focus-visible > .frame .frame__img { transform: scale(1.03); }

/* ============================================================
   6. Shared meta bits
   ============================================================ */

.tag-section {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 0.6rem;
}
.tag-section:hover { text-decoration: underline; text-underline-offset: 3px; }

.metaline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	margin: 0.9rem 0 0;
	font-size: 0.78rem;
	color: var(--ink-3);
}
.metaline__sep { color: var(--line); }
.metaline a:hover { color: var(--ink); }

.penline { display: inline-flex; align-items: center; gap: 0.45rem; }
.penline__face img { border-radius: 50%; }
.penline__name { font-weight: 600; color: var(--ink-2); }

/* ============================================================
   7. Listings: lead, grid, rows
   ============================================================ */

.lead {
	display: grid;
	gap: clamp(1.25rem, 3vw, 2rem);
	padding-bottom: clamp(2rem, 5vw, 3rem);
	margin-bottom: clamp(2rem, 5vw, 3rem);
	border-bottom: 1px solid var(--line);
}
.lead__labels { display: flex; align-items: baseline; gap: 0.75rem; }
.lead__flag {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--marker);
}
.lead__title {
	font-size: clamp(1.8rem, 4.6vw, 3rem);
	margin-bottom: 0.35em;
	max-width: 20ch;
}
.lead__title a { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.3s; }
.lead__title a:hover { background-size: 100% 1px; }
.lead__dek {
	font-family: var(--serif);
	font-size: 1.15rem;
	line-height: 1.65;
	color: var(--ink-2);
	max-width: 52ch;
}

@media (min-width: 900px) {
	.lead {
		grid-template-columns: 1.15fr 1fr;
		align-items: center;
	}
	.lead__body { padding-right: 1rem; }
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: clamp(1.75rem, 4vw, 3rem) var(--gap);
	margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.card { display: flex; flex-direction: column; gap: 1rem; }
.card__media { display: block; }
.card__title {
	font-size: 1.32rem;
	line-height: 1.25;
	margin-bottom: 0.4em;
}
.card__title a:hover { color: var(--accent); }
.card__dek {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--ink-2);
}
.card .metaline { margin-top: 0.75rem; }

/* Compact rows for the tail of a listing */
.rows { border-top: 1px solid var(--line); }
.rows--flush { border-top: 0; }
.rows__head {
	margin: 0;
	padding: 1.25rem 0 0.5rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem 1.5rem;
	padding: 1.5rem 0;
	border-top: 1px solid var(--line-soft);
}
.row__stamp {
	margin: 0;
	font-size: 0.74rem;
	color: var(--ink-3);
	font-variant-numeric: tabular-nums;
}
.row__title { font-size: 1.18rem; margin-bottom: 0.3em; }
.row__title a:hover { color: var(--accent); }
.row__dek { margin: 0; font-size: 0.9rem; color: var(--ink-2); }
.row__media { display: none; }

@media (min-width: 760px) {
	.row {
		grid-template-columns: 7rem 1fr 9rem;
		align-items: start;
	}
	.row__stamp { padding-top: 0.3rem; }
	.row__media { display: block; }
}

/* ============================================================
   8. Author panel
   ============================================================ */

.penbox__kicker {
	margin: 0 0 0.75rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.penbox__row { display: flex; gap: clamp(1rem, 3vw, 1.75rem); align-items: flex-start; }

.penbox__portrait { flex-shrink: 0; display: block; }
.penbox__portrait img {
	border-radius: 50%;
	background: var(--paper-2);
}

.penbox__name { margin: 0 0 0.2rem; }
.penbox__role {
	margin: 0 0 0.5rem;
	font-size: 0.82rem;
	color: var(--ink-3);
}
.penbox__sep { margin-inline: 0.4rem; color: var(--line); }
.penbox__bio { margin: 0 0 0.6rem; color: var(--ink-2); }
.penbox__count { margin: 0; font-size: 0.78rem; color: var(--ink-3); }

.penbox__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	list-style: none;
	margin: 0.6rem 0 0;
	padding: 0;
}
.penbox__links a {
	font-size: 0.76rem;
	font-weight: 600;
	color: var(--ink-2);
	border-bottom: 1px solid var(--line);
	padding-bottom: 1px;
	transition: color 0.15s, border-color 0.15s;
}
.penbox__links a:hover { color: var(--accent); border-color: var(--accent); }

/* Strip: above and below an article */
.penbox--strip {
	padding: 1.1rem 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.penbox--strip .penbox__name {
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0;
}
.penbox--strip .penbox__name a:hover { color: var(--accent); }
.penbox--strip .penbox__bio { font-size: 0.86rem; }

/* Profile: the author page header */
.penbox--profile .penbox__name {
	font-size: clamp(2.1rem, 5.5vw, 3.4rem);
	margin-bottom: 0.15em;
}
.penbox--profile .penbox__role {
	font-size: 0.95rem;
	color: var(--ink-2);
	font-weight: 500;
}
.penbox--profile .penbox__bio {
	font-family: var(--serif);
	font-size: 1.15rem;
	line-height: 1.65;
	max-width: 46ch;
	margin-bottom: 1.25rem;
}

.penbox__topics {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
}
.penbox__topics li {
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 0.28rem 0.65rem;
	border-radius: 100px;
	background: var(--accent-2);
	color: var(--accent);
}

.penbox__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0 clamp(1.5rem, 4vw, 3rem);
	margin: 0 0 1rem;
	padding: 1rem 0 0;
	border-top: 1px solid var(--line-soft);
}
.penbox__stats dt {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 0.2rem;
}
.penbox__stats dd {
	margin: 0;
	font-family: var(--serif);
	font-size: 1.35rem;
	font-variant-numeric: tabular-nums;
}
.penbox__beat {
	margin: 0.75rem 0 0;
	font-size: 0.84rem;
	color: var(--ink-3);
}
.penbox__beat a {
	color: var(--ink-2);
	border-bottom: 1px solid var(--line);
}
.penbox__beat a:hover { color: var(--accent); border-color: var(--accent); }

.desk {
	padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem);
	border-bottom: 1px solid var(--line);
	margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

@media (max-width: 620px) {
	.penbox--profile .penbox__row { flex-direction: column; }
	.penbox__stats { gap: 1.25rem; }
}

/* ============================================================
   9. Dispatches (author profile listing)
   ============================================================ */

.dispatches__head { max-width: 46rem; margin-bottom: 2rem; }
.dispatches__title { font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 0.3em; }
.dispatches__note { margin: 0; font-size: 0.88rem; color: var(--ink-3); }

.dispatches__month {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 2.5rem 0 0.5rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
}
.dispatches__month::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--line);
}

.dispatch {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem 2rem;
	padding: 1.75rem 0;
	border-bottom: 1px solid var(--line-soft);
}

/* The sentence that opens every row: "… writes in Section · 14:32 · 12 Aug" */
.dispatch__line {
	margin: 0 0 0.5rem;
	font-size: 0.82rem;
	color: var(--ink-3);
}
.dispatch__who { font-weight: 700; color: var(--ink-2); }
.dispatch__topic {
	font-weight: 700;
	color: var(--accent);
	border-bottom: 1px solid transparent;
}
.dispatch__topic:hover { border-bottom-color: currentColor; }
.dispatch__sep { margin-inline: 0.35rem; color: var(--line); }
.dispatch__clock { font-variant-numeric: tabular-nums; }

.dispatch__title { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-bottom: 0.35em; }
.dispatch__title a:hover { color: var(--accent); }
.dispatch__dek {
	margin: 0;
	font-family: var(--serif);
	font-size: 1.02rem;
	line-height: 1.6;
	color: var(--ink-2);
	max-width: 56ch;
}
.dispatch__foot {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0.9rem 0 0;
	font-size: 0.78rem;
	color: var(--ink-3);
}
.dispatch__more { font-weight: 700; color: var(--accent); }
.dispatch__more:hover { text-decoration: underline; text-underline-offset: 3px; }
.dispatch__media { display: none; }

@media (min-width: 720px) {
	.dispatch { grid-template-columns: 1fr 11rem; align-items: start; }
	.dispatch__media { display: block; }
}

/* Other bylines */
.colleagues {
	margin-top: clamp(3rem, 7vw, 5rem);
	padding-top: 2rem;
	border-top: 1px solid var(--line);
}
.colleagues__head {
	font-size: 0.72rem;
	font-family: var(--sans);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 1.25rem;
}
.colleagues__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.colleagues__item a {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas: 'face name' 'face role';
	align-items: center;
	column-gap: 0.75rem;
	padding: 0.6rem;
	border: 1px solid var(--line-soft);
	border-radius: var(--radius);
	transition: border-color 0.15s, background 0.15s;
}
.colleagues__item a:hover { border-color: var(--line); background: var(--card); }
.colleagues__face { grid-area: face; }
.colleagues__face img { border-radius: 50%; }
.colleagues__name { grid-area: name; font-size: 0.9rem; font-weight: 700; }
.colleagues__role { grid-area: role; font-size: 0.74rem; color: var(--ink-3); }

/* ============================================================
   10. Article
   ============================================================ */

.entry { padding-top: clamp(1.5rem, 4vw, 2.5rem); }

.entry__head { max-width: 46rem; }
.entry__title {
	font-size: clamp(2.1rem, 6vw, 3.9rem);
	line-height: 1.08;
	margin-bottom: 1.25rem;
	max-width: 18ch;
}

/* ── Standfirst: author and summary as one unit ─────────────
   Bounded top and bottom by a hairline, split inside by a third. The avatar
   holds its own column and the summary starts on the same left edge as the
   author's name, so the block reads as one object rather than two stacked
   ones. */
.standfirst {
	margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
	padding: 1.1rem 0 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	max-width: 46rem;
}

.standfirst__by {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.5rem 1rem;
	padding-bottom: 1.1rem;
}

.standfirst__face { display: block; }
.standfirst__face img {
	border-radius: 50%;
	background: var(--paper-2);
}

.standfirst__id { min-width: 0; }

.standfirst__name {
	margin: 0 0 0.15rem;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.3;
}
.standfirst__name a:hover { text-decoration: underline; text-underline-offset: 3px; }

.standfirst__role {
	font-weight: 500;
	color: var(--ink-3);
}
.standfirst__role::before {
	content: '—';
	margin: 0 0.35rem;
	color: var(--line);
}

.standfirst__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0;
	font-size: 0.76rem;
	color: var(--ink-3);
}
.standfirst__sep { color: var(--line); }
.standfirst__revised { color: var(--marker); font-weight: 600; }

.standfirst__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-self: end;
}
.standfirst__links a {
	font-size: 0.74rem;
	font-weight: 600;
	color: var(--ink-2);
	border-bottom: 1px solid var(--line);
	padding-bottom: 1px;
	transition: border-color 0.15s;
}
.standfirst__links a:hover { border-color: var(--accent); }

/* The summary half: separated by the inner rule, indented to the same text
   edge as the byline above it. */
.standfirst__gist {
	border-left: 0;
	border-top: 1px solid var(--line-soft);
	margin: 0;
	padding: 1.1rem 0;
	max-width: none;
}

/* Line the summary up with the author's name — only when there is an avatar
   column to line it up against. */
@media (min-width: 640px) {
	.standfirst:has(.standfirst__face) .standfirst__gist {
		padding-left: calc(56px + 1rem); /* avatar + column gap */
	}
}

@media (max-width: 560px) {
	.standfirst__by { grid-template-columns: auto minmax(0, 1fr); }
	.standfirst__links {
		grid-column: 1 / -1;
		justify-self: start;
	}
	.standfirst__name { font-size: 0.9rem; }
	.standfirst__role { display: block; }
	.standfirst__role::before { content: none; }
}

/* The answer-first summary. Also the speakable target in the schema graph. */
.gist {
	border-left: 2px solid var(--accent);
	padding: 0.25rem 0 0.25rem 1.25rem;
	margin: 0 0 2rem;
	max-width: 44rem;
}
.gist__label {
	margin: 0 0 0.35rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}
.gist__text {
	margin: 0;
	font-family: var(--serif);
	font-size: 1.18rem;
	line-height: 1.6;
	color: var(--ink);
}

.entry__figure { margin: 0 0 clamp(2rem, 5vw, 3.25rem); }
.entry__figure figcaption,
.sheet__figure figcaption {
	margin-top: 0.7rem;
	font-size: 0.78rem;
	color: var(--ink-3);
}

.entry__grid { display: grid; gap: var(--gap); }

@media (min-width: 1000px) {
	.entry__grid {
		grid-template-columns: var(--rail) minmax(0, var(--column));
		justify-content: start;
		column-gap: clamp(2.5rem, 6vw, 5rem);
	}
}

/* Contents rail */
.rail { align-self: start; }

@media (min-width: 1000px) {
	.rail {
		position: sticky;
		top: 2rem;
		max-height: calc(100vh - 4rem);
		overflow-y: auto;
		scrollbar-width: thin;
	}
}

.toc__label,
.rail__label {
	margin: 0 0 0.7rem;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
}
.toc__list {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	border-left: 1px solid var(--line);
}
.toc__item a {
	display: block;
	padding: 0.3rem 0 0.3rem 0.85rem;
	margin-left: -1px;
	border-left: 1px solid transparent;
	font-size: 0.82rem;
	line-height: 1.4;
	color: var(--ink-3);
	transition: color 0.15s, border-color 0.15s;
}
.toc__item--h3 a { padding-left: 1.6rem; font-size: 0.78rem; }
.toc__item a:hover { color: var(--ink); }
.toc__item a.is-current {
	color: var(--accent);
	border-left-color: var(--accent);
	font-weight: 600;
}

/* Hand the article to an assistant, prompt already written */
.askai {
	padding-top: 1.25rem;
	border-top: 1px solid var(--line-soft);
}
.askai__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.askai__btn {
	display: inline-block;
	font: inherit;
	font-size: 0.76rem;
	font-weight: 600;
	color: var(--ink-2);
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 100px;
	padding: 0.3rem 0.75rem;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.askai__btn:hover {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--accent-2);
}
.askai__btn--copy { background: none; }
.askai__note {
	margin: 0.7rem 0 0;
	font-size: 0.7rem;
	line-height: 1.45;
	color: var(--ink-3);
}

/* ============================================================
   11. Prose
   ============================================================ */

.prose {
	font-family: var(--serif);
	font-size: 1.19rem;
	line-height: 1.72;
	color: var(--ink);
	max-width: var(--column);
}

.prose > * + * { margin-top: 1.35rem; }
.prose p { margin: 0; }

.prose h2,
.prose h3,
.prose h4 {
	position: relative;
	scroll-margin-top: 2rem;
	margin-top: 2.75rem;
	margin-bottom: 0.6rem;
}
.prose h2 { font-size: clamp(1.55rem, 3.4vw, 2rem); }
.prose h3 { font-size: clamp(1.25rem, 2.6vw, 1.5rem); }
.prose h4 { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; letter-spacing: 0; }

/* A quiet per-heading anchor: invisible until the heading is hovered. */
.prose__anchor {
	position: absolute;
	left: -1.5rem;
	top: 0.1em;
	font-family: var(--sans);
	font-size: 0.9rem;
	color: var(--line);
	opacity: 0;
	transition: opacity 0.15s;
}
.prose h2:hover .prose__anchor,
.prose h3:hover .prose__anchor,
.prose__anchor:focus-visible { opacity: 1; }
@media (max-width: 1100px) { .prose__anchor { display: none; } }

.prose a {
	color: var(--ink);
	border-bottom: 1px solid var(--accent);
	transition: background 0.15s;
}
.prose a:hover { background: var(--accent-2); }

.prose strong { font-weight: 600; }
.prose em { font-style: italic; }

.prose ul, .prose ol { padding-left: 1.35rem; margin-block: 1.35rem; }
.prose li + li { margin-top: 0.45rem; }
.prose ul { list-style: none; padding-left: 1.1rem; }
.prose ul > li { position: relative; }
.prose ul > li::before {
	content: '';
	position: absolute;
	left: -1.1rem;
	top: 0.72em;
	width: 0.4rem;
	height: 1px;
	background: var(--accent);
}

.prose blockquote {
	margin: 2rem 0;
	padding-left: 1.5rem;
	border-left: 2px solid var(--line);
	font-style: italic;
	color: var(--ink-2);
}

.prose figure { margin: 2.25rem 0; }
.prose img { border-radius: var(--radius); }
.prose figcaption {
	margin-top: 0.7rem;
	font-family: var(--sans);
	font-size: 0.78rem;
	color: var(--ink-3);
}

.prose hr {
	border: 0;
	height: 1px;
	background: var(--line);
	margin: 2.75rem 0;
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--sans);
	font-size: 0.92rem;
	margin: 2rem 0;
}
.prose th {
	text-align: left;
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-3);
	padding: 0.6rem 0.8rem 0.6rem 0;
	border-bottom: 1px solid var(--ink);
}
.prose td {
	padding: 0.8rem 0.8rem 0.8rem 0;
	border-bottom: 1px solid var(--line-soft);
	vertical-align: top;
	color: var(--ink-2);
}

.prose code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.86em;
	background: var(--paper-2);
	padding: 0.12em 0.35em;
	border-radius: 2px;
}
.prose pre {
	background: var(--ink);
	color: #f4f2ea;
	padding: 1.25rem;
	border-radius: var(--radius);
	overflow-x: auto;
	font-size: 0.85rem;
	line-height: 1.6;
}
.prose pre code { background: none; padding: 0; }

.prose .wp-block-image,
.prose .alignwide { margin-inline: 0; }

.taglist {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}
.taglist__tag {
	font-family: var(--sans);
	font-size: 0.76rem;
	padding: 0.3rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: 100px;
	color: var(--ink-2);
	transition: border-color 0.15s, color 0.15s;
}
.taglist__tag:hover { border-color: var(--accent); color: var(--accent); }

.pagelinks {
	display: flex;
	gap: 0.5rem;
	font-family: var(--sans);
	font-size: 0.82rem;
	margin-top: 2rem;
}

/* ============================================================
   12. Article tail
   ============================================================ */

.entry__signoff {
	max-width: 46rem;
	margin: clamp(3rem, 7vw, 5rem) 0 0;
}
.entry__signoff-more {
	margin: 1rem 0 0;
	font-size: 0.84rem;
	font-weight: 600;
}
.entry__signoff-more a { color: var(--accent); }
.entry__signoff-more a:hover { text-decoration: underline; text-underline-offset: 3px; }

.related {
	margin-top: clamp(3rem, 7vw, 5rem);
	padding-top: 2rem;
	border-top: 1px solid var(--line);
}
.related__head {
	font-family: var(--sans);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 1.75rem;
}
.related__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: 2rem var(--gap);
}
.related__list { list-style: none; margin: 0; padding: 0; }
.related__list li + li { border-top: 1px solid var(--line-soft); }
.related__list a {
	display: block;
	padding: 0.85rem 0;
	font-family: var(--serif);
	font-size: 1.05rem;
}
.related__list a:hover { color: var(--accent); }

.stepper {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1px;
	background: var(--line);
	border-block: 1px solid var(--line);
	margin-top: clamp(3rem, 7vw, 5rem);
}
.stepper__item {
	display: block;
	background: var(--paper);
	padding: 1.5rem 0;
	transition: background 0.15s;
}
.stepper__item:hover { background: var(--card); }
.stepper__item--next { text-align: right; }
.stepper__label {
	display: block;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 0.4rem;
}
.stepper__title {
	font-family: var(--serif);
	font-size: 1.1rem;
	line-height: 1.3;
}

@media (min-width: 700px) {
	.stepper { grid-template-columns: 1fr 1fr; }
	.stepper__item { padding-inline: 1.5rem; }
	.stepper__item--prev { padding-left: 0; }
	.stepper__item--next { padding-right: 0; }
}

/* ============================================================
   13. Static page
   ============================================================ */

.sheet { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.sheet__head { margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
.sheet__title { font-size: clamp(2rem, 5.5vw, 3.4rem); }
.sheet__stamp { margin: 0; font-size: 0.78rem; color: var(--ink-3); }
.sheet__figure { margin: 0 0 2.5rem; }

/* ============================================================
   14. Pagination and empty states
   ============================================================ */

.pager { margin-top: clamp(2.5rem, 6vw, 4rem); }
.pager .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.84rem;
}
.pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding-inline: 0.6rem;
	border: 1px solid var(--line);
	border-radius: 100px;
	color: var(--ink-2);
	font-variant-numeric: tabular-nums;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.pager .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pager .page-numbers.current {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}
.pager .page-numbers.dots { border: 0; }

.empty {
	padding: clamp(3rem, 8vw, 6rem) 0;
	text-align: center;
	max-width: 34rem;
	margin-inline: auto;
}
.empty__line { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 0.4rem; }
.empty__hint { color: var(--ink-3); font-size: 0.9rem; }
.empty .ribbon__list { justify-content: center; flex-wrap: wrap; white-space: normal; }

.void {
	padding: clamp(3rem, 9vw, 6rem) 0 2rem;
	text-align: center;
}
.void__code {
	font-family: var(--serif);
	font-size: clamp(4rem, 14vw, 8rem);
	line-height: 1;
	color: var(--line);
	margin: 0 0 0.5rem;
}
.void__title { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.void__text { color: var(--ink-2); max-width: 34rem; margin-inline: auto; }

/* ============================================================
   15. Footer
   ============================================================ */

/* No tinted slab and no top margin games — a hairline is enough to say the
   page has ended. */
.baseline {
	border-top: 1px solid var(--line);
	background: var(--paper);
	padding: clamp(1.75rem, 4vw, 2.5rem) 0;
}
/* Everything on one centred line. Inline flow does the work; the flex box only
   tidies the spacing, so the row survives even if this file never arrives. */
.baseline__line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0.4rem 0.75rem;
	margin: 0;
	font-size: 0.8rem;
	color: var(--ink-3);
	text-align: center;
}

.baseline__mark {
	font-family: var(--serif);
	font-size: 1.02rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.baseline__line a {
	color: var(--ink-2);
	border-bottom: 1px solid transparent;
	transition: border-color 0.15s, color 0.15s;
}
.baseline__line a:hover {
	color: var(--ink);
	border-bottom-color: var(--accent);
}

.baseline__dot { color: var(--line); }
.baseline__legal { color: var(--ink-3); }

/* ============================================================
   16. Small screens
   ============================================================ */

@media (max-width: 860px) {
	.masthead__grid {
		grid-template-columns: 1fr auto;
		grid-template-areas: 'mark burger' 'tag burger' 'nav nav';
	}

	.burger {
		grid-area: burger;
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		width: 2.5rem;
		height: 2.5rem;
		padding: 0;
		background: none;
		border: 1px solid var(--line);
		border-radius: 100px;
		cursor: pointer;
	}
	.burger__bar {
		display: block;
		width: 1rem;
		height: 1px;
		margin-inline: auto;
		background: var(--ink);
		transition: transform 0.2s;
	}
	.burger.is-open .burger__bar:first-child { transform: translateY(3px) rotate(45deg); }
	.burger.is-open .burger__bar:last-child { transform: translateY(-3px) rotate(-45deg); }

	.mastnav {
		grid-area: nav;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
		padding-top: 1.25rem;
		margin-top: 1rem;
		border-top: 1px solid var(--line-soft);
	}
	.mastnav.is-open { display: flex; }
	.mastnav__list { flex-direction: column; gap: 0.75rem; }
	.mastnav__list a { font-size: 1rem; }
	.findbox__input { width: 100%; }
	.findbox__input:focus { width: 100%; }
	.findbox { width: 100%; }
}

/* ============================================================
   17. Print, motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

@media print {
	.masthead, .baseline, .rail, .stepper, .related, .railbar, .crumbs { display: none !important; }
	body { background: #fff; color: #000; font-size: 11pt; }
	.entry__grid { display: block; }
	.prose a { border: 0; }
	.prose a::after { content: ' (' attr(href) ')'; font-size: 0.8em; color: #555; }
}
