/*
Theme Name: Philip Mataranyika
Theme URI: https://philipmataranyika.com
Author: Philip Mataranyika
Description: Editorial theme for long-form writing published as Seasons and Chapters, with a Bio and a Gallery.
Version: 1.14.1
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: philip
*/

/* ---------- Tokens ---------- */
:root {
	/* Executive journal: warm ivory paper, navy ink, antique brass. */
	--paper: #f7f4ee;
	--paper-2: #eee9df;
	--card: #fffdf9;
	--ink: #141b26;
	--ink-2: #2f3a4a;
	--muted: #677285;
	--line: #e1dbcf;
	--accent: #1f3b63;
	--accent-hover: #142a4a;
	--on-accent: #fff;
	--gold: #94702f;
	--gold-bright: #d4b06a;
	--neg: #a8442f;
	--band: #13213a;
	--band-ink: #f3efe6;
	--band-muted: #a7b2c4;
	--rule: var(--gold-bright);
	/* Zimbabwe flag accents, used sparingly. */
	--zim-green: #1f8a4c;
	--zim-gold: #e3b23c;
	--zim-red: #c43a3f;
	--zim-black: #141b26;
	--flag: linear-gradient(90deg, var(--zim-green) 0 18%, var(--zim-gold) 18% 32%, var(--zim-red) 32% 44%, var(--zim-black) 44% 56%, var(--zim-red) 56% 68%, var(--zim-gold) 68% 82%, var(--zim-green) 82%);
	--flag-short: linear-gradient(90deg, var(--zim-green) 0 25%, var(--zim-gold) 25% 50%, var(--zim-red) 50% 75%, var(--zim-black) 75%);
	--shadow: 0 1px 2px rgba(20, 27, 38, .05), 0 10px 30px rgba(20, 27, 38, .07);

	--f-display: "Fraunces", Georgia, "Times New Roman", serif;
	--f-read: "Source Serif 4", Georgia, serif;
	--f-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

	--prose-size: 1.2rem;
	--gutter: clamp(16px, 4vw, 32px);
	--radius: 14px;
	color-scheme: light;
}

:root[data-theme="dark"] {
	--paper: #0f141c; --paper-2: #151c27; --card: #161e2a; --ink: #ece8df; --ink-2: #c9cdd4;
	--muted: #8e98a8; --line: #263041; --accent: #a9c1e6; --accent-hover: #c4d5ef; --on-accent: #0f141c;
	--gold: #d4b06a; --band: #0a0f17; --band-ink: #f3efe6; --band-muted: #8e98a8; --neg: #e08a74; --zim-black: #e9e4d8;
	--shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
	color-scheme: dark;
}
:root[data-size="s"]  { --prose-size: 1.06rem; }
:root[data-size="l"]  { --prose-size: 1.34rem; }
:root[data-size="xl"] { --prose-size: 1.5rem; }

/* ---------- 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: 400 16px/1.6 var(--f-ui);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	transition: background-color .3s, color .3s;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; line-height: 1.1; letter-spacing: -.015em; margin: 0; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }

.wrap, .wrap-mid, .wrap-wide, .wrap-narrow { width: 100%; margin-inline: auto; padding-inline: var(--gutter); }
.wrap { max-width: calc(1200px + 2 * var(--gutter)); }
.wrap-wide { max-width: calc(1080px + 2 * var(--gutter)); }
.wrap-mid { max-width: calc(880px + 2 * var(--gutter)); }
.wrap-narrow { max-width: calc(690px + 2 * var(--gutter)); }

.eyebrow, .kicker {
	font: 600 .74rem/1.3 var(--f-ui);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 .9rem;
}
.eyebrow::before { content: ""; display: inline-block; width: 1.6em; height: 2px; margin-right: .6em; vertical-align: .3em; background: var(--rule); }
.kicker { color: var(--gold); margin-bottom: .5rem; }

/* Brighter brass on the dark bands. */
.section--ink, .season-hero, .site-footer, .season-card__media { --gold: var(--gold-bright); }
.kicker a { text-decoration: none; }
.meta { font: 400 .85rem/1.4 var(--f-ui); color: var(--muted); margin: 0; }

.btn {
	display: inline-flex; align-items: center; gap: .5em;
	padding: .85em 1.5em;
	background: var(--accent); color: var(--on-accent);
	border: 1px solid var(--accent); border-radius: 999px;
	font: 600 .92rem/1 var(--f-ui); text-decoration: none; cursor: pointer;
	transition: background .2s, transform .2s, color .2s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }
.btn--light { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }
.btn--light:hover { background: #fff; border-color: #fff; color: var(--band); }
.btn--small { padding: .6em 1.1em; font-size: .82rem; }
.link-arrow { font: 600 .9rem var(--f-ui); text-decoration: none; color: var(--accent); white-space: nowrap; }
.icon-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px;
	border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); }
.chip {
	padding: .45em .95em; border: 1px solid var(--line); border-radius: 999px; background: transparent;
	font: 500 .8rem var(--f-ui); color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { display: flex; align-items: center; gap: 2rem; height: 72px; }
.wordmark { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.wordmark:hover { color: var(--ink); }
.wordmark__mono {
	position: relative; display: block; width: 42px; height: 42px; border-radius: 50%; flex: none;
	background: var(--ink); color: var(--paper); font-size: 0;
}
.wordmark__mono::before {
	content: ""; position: absolute; inset: 21% 15% 19%; background: currentColor;
	-webkit-mask: url(assets/img/pm-monogram.svg) center / contain no-repeat;
	mask: url(assets/img/pm-monogram.svg) center / contain no-repeat;
}
.wordmark__name { font: 500 1.15rem/1 var(--f-display); letter-spacing: -.01em; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 1.8rem; margin: 0; padding: 0; }
.site-nav a { font: 500 .92rem var(--f-ui); text-decoration: none; color: var(--ink-2); padding: .4rem 0; position: relative; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: var(--accent); transform: scaleX(0); transition: transform .25s; transform-origin: left; }
.site-nav a:hover { color: var(--ink); }
.site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a, .site-nav .current_page_parent > a { color: var(--accent); font-weight: 700; }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav .current-menu-item > a::after, .site-nav .current-menu-ancestor > a::after, .site-nav .current_page_parent > a::after { display: none; }
.site-header__tools { display: flex; align-items: center; gap: .6rem; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
.nav-toggle { display: none; }
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .25s; }
.nav-toggle span + span { margin-top: -10px; }

@media (max-width: 860px) {
	.site-header__inner { gap: 1rem; height: 64px; }
	.nav-toggle { display: inline-grid; gap: 5px; align-content: center; }
	.nav-toggle span + span { margin-top: 0; }
	.nav-open .nav-toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
	.nav-open .nav-toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
	.site-header__tools .btn { display: none; }
	.site-header__tools { margin-left: auto; }
	.site-nav {
		position: fixed; inset: 64px 0 auto 0; margin: 0;
		background: var(--paper); border-bottom: 1px solid var(--line);
		padding: 1rem var(--gutter) 1.5rem;
		transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .25s;
	}
	.nav-open .site-nav { transform: none; opacity: 1; pointer-events: auto; }
	.site-nav ul { flex-direction: column; gap: 0; }
	.site-nav a { display: block; padding: .9rem 0; font: 500 1.4rem var(--f-display); border-bottom: 1px solid var(--line); }
	.site-nav a::after { display: none; }
	.wordmark__name { font-size: 1.02rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--flush { padding-top: 0; }
.section--tint { background: var(--paper-2); }
.section--ink { background: var(--band); color: var(--band-ink); }
.section--ink .eyebrow { color: var(--gold); }
.section-head { margin-bottom: 2.5rem; max-width: 640px; }
.section-head--row { display: flex; justify-content: space-between; align-items: end; gap: 1rem; max-width: none; }
.section-title { font-size: clamp(2rem, 4.2vw, 3rem); }
.page-head { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.page-title { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 400; }
.page-intro { font: 400 1.2rem/1.6 var(--f-read); color: var(--ink-2); max-width: 620px; margin-top: 1.2rem; }
.page-intro p { margin: 0; }
.empty { color: var(--muted); font-style: italic; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6rem); position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero__title { font-size: clamp(2.9rem, 7.4vw, 5.8rem); font-weight: 400; line-height: .98; letter-spacing: -.03em; }
.hero__title::after { content: ""; display: block; width: 64px; height: 3px; background: var(--accent); margin-top: 1.8rem; }
.hero__intro { font: 400 clamp(1.1rem, 1.8vw, 1.3rem)/1.6 var(--f-read); color: var(--ink-2); max-width: 540px; margin: 1.6rem 0 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.stats { display: flex; gap: clamp(1.5rem, 4vw, 3rem); margin: 3rem 0 0; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font: 500 .75rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 0; font: 400 2.4rem/1.1 var(--f-display); }
.stats__date { font-size: 1.6rem !important; line-height: 1.5 !important; }
.hero__portrait { position: relative; }
.hero__frame { position: relative; }
.hero__frame::before {
	content: ""; position: absolute; inset: 4% -4% -4% 4%;
	border: 1px solid var(--gold); border-radius: 220px 220px var(--radius) var(--radius); opacity: .6;
}
.hero__img, .hero__frame > .hero__monogram {
	position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
	border-radius: 220px 220px var(--radius) var(--radius); box-shadow: var(--shadow);
}
.hero__monogram {
	display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5;
	background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--gold) 40%, var(--paper-2)), var(--paper-2));
	font: 300 clamp(4rem, 12vw, 8rem)/1 var(--f-display); color: var(--ink); letter-spacing: -.04em;
	border-radius: var(--radius);
}
.hero__caption { position: relative; margin: 2rem 0 0; font: italic 400 .95rem var(--f-display); color: var(--muted); text-align: right; }
@media (max-width: 860px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero__portrait { max-width: 360px; order: -1; margin-inline: auto; width: 78%; }
	.hero__caption { text-align: center; }
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 2.5rem 2rem; }
.card { display: flex; flex-direction: column; gap: 1.1rem; }
.card__media { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; background: var(--paper-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card__media img { transform: scale(1.04); }
.card__placeholder {
	display: grid; place-items: center; height: 100%;
	background: linear-gradient(135deg, var(--paper-2), color-mix(in srgb, var(--gold) 22%, var(--paper-2)));
}
.card__placeholder span { font: 300 4.5rem/1 var(--f-display); color: color-mix(in srgb, var(--ink) 55%, transparent); }
.card__title { font-size: 1.5rem; line-height: 1.18; }
.card__title a { text-decoration: none; }
.card__excerpt { font: 400 1.05rem/1.55 var(--f-read); color: var(--ink-2); margin: .6rem 0 .8rem; }
.card__body .meta { margin-top: .5rem; }
.card--large { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.card--large .card__media { aspect-ratio: 16 / 10; }
.card--large .card__title { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 400; }
.card--large .card__excerpt { font-size: 1.15rem; }
@media (max-width: 760px) { .card--large { grid-template-columns: 1fr; } }

/* ---------- Season cards ---------- */
.season-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1.5rem; }
.season-card {
	display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
	border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink);
	transition: transform .25s, box-shadow .25s, border-color .25s;
}
.season-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.season-card__media { aspect-ratio: 16 / 10; background: var(--band); display: grid; place-items: center; overflow: hidden; }
.season-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.season-hero__bg img { object-position: center 25%; }
.chapter-row__thumb img { object-position: center 20%; }
.season-card__num { font: 300 5.5rem/1 var(--f-display); color: var(--gold); letter-spacing: -.04em; }
.season-card__body { padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.season-card__title { font-size: 1.55rem; }
.season-card__sub { font: italic 400 1rem/1.45 var(--f-read); color: var(--ink-2); margin: .5rem 0 0; }
.season-card .meta { margin-top: auto; padding-top: 1.2rem; display: flex; justify-content: space-between; }
.season-card__go { color: var(--accent); font-weight: 600; }

/* ---------- Bio teaser ---------- */
.bio-teaser { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.bio-teaser__img img, .bio-teaser__img .hero__monogram { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.bio-teaser__img .hero__monogram { background: var(--band); color: var(--band-ink); }
.bio-teaser__role { font: italic 400 1.15rem var(--f-display); color: var(--band-muted); margin: .6rem 0 1.6rem; }
.bio-teaser__excerpt { font: 400 1.2rem/1.7 var(--f-read); color: var(--band-ink); opacity: .9; margin: 0 0 2rem; max-width: 560px; }
@media (max-width: 760px) { .bio-teaser { grid-template-columns: 1fr; } .bio-teaser__img { max-width: 320px; } }

/* ---------- Gallery strip ---------- */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75rem; }
.strip__item { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.strip__item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.strip__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.strip__item:hover img { transform: scale(1.05); }
@media (max-width: 760px) { .strip { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Reader ---------- */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.admin-bar .progress { top: 32px; }
.reader__head { padding-block: clamp(3rem, 7vw, 5.5rem) 2rem; text-align: center; }
.reader__chapter { font: italic 400 1.15rem var(--f-display); color: var(--muted); margin: 0 0 .6rem; }
.reader__title { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 400; letter-spacing: -.025em; text-wrap: balance; }
.reader__dek { font: italic 400 clamp(1.15rem, 2vw, 1.35rem)/1.5 var(--f-read); color: var(--ink-2); margin: 1.4rem auto 0; max-width: 580px; text-wrap: pretty; }
.reader__meta { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; font: 500 .88rem var(--f-ui); color: var(--muted); }
.reader__tools { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.reader__hero { margin-block: 1rem 3.5rem; }
.reader__hero img { width: 100%; border-radius: var(--radius); max-height: 640px; object-fit: cover; }
.reader__hero--cover img { width: auto; max-width: min(440px, 100%); max-height: none; margin-inline: auto; box-shadow: var(--shadow); border-radius: 8px; }
.reader__pdf { margin: -1.2rem 0 2rem; font: 500 .9rem var(--f-ui); }
.reader__pdf a { color: var(--accent); }
.prose .pm-notes { margin-top: 3em; padding-top: 1.4em; border-top: 1px solid var(--line); font: 400 .82rem/1.6 var(--f-ui); color: var(--muted); }
.prose .pm-notes > * { margin: 0 0 .7em; }
.prose .pm-notes h3 { font: 600 .72rem var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 1em; }
.prose .pm-notes a { word-break: break-all; }
.prose .pm-notes p:first-of-type::first-letter { all: unset; }
.prose .pm-aside { font-style: italic; color: var(--ink-2); }
.reader__hero figcaption, .prose figcaption { font: 400 .85rem/1.5 var(--f-ui); color: var(--muted); margin-top: .7rem; text-align: center; }

.prose { font: 400 var(--prose-size)/1.75 var(--f-read); color: var(--ink); }
.prose > * { margin-block: 0 1.4em; }
.prose > p:first-of-type::first-letter {
	float: left; font: 400 4.6em/.82 var(--f-display); margin: .06em .1em 0 -.03em; color: var(--accent);
}
.prose--bio > p:first-of-type::first-letter { font-size: 3.6em; }
.prose > p.no-dropcap::first-letter { all: unset; } /* e.g. the "Last updated" line on the Privacy Policy */
.prose h2 { font-size: 1.75em; margin-top: 2em; margin-bottom: .6em; font-weight: 500; }
.prose h3 { font-size: 1.35em; margin-top: 1.8em; margin-bottom: .5em; }
.prose a { color: var(--accent); }
.prose blockquote, .prose .wp-block-quote {
	margin: 2em 0; padding: 0 0 0 1.4em; border-left: 3px solid var(--gold);
	font-style: italic; color: var(--ink-2);
}
.prose .wp-block-pullquote, .prose .is-style-large {
	border: 0; border-block: 1px solid var(--line); padding: 1.6em 0; text-align: center;
	font: italic 400 1.5em/1.35 var(--f-display); color: var(--ink);
}
.prose .wp-block-pullquote blockquote { border: 0; padding: 0; margin: 0; }
.prose cite { display: block; font: 600 .7rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; font-style: normal; color: var(--muted); margin-top: 1em; }
.prose hr, .prose .wp-block-separator { border: 0; text-align: center; margin: 2.6em 0; height: auto; }
.prose hr::before, .prose .wp-block-separator::before { content: "· · ·"; letter-spacing: .6em; color: var(--muted); }
.prose figure img { border-radius: 10px; }
.prose .alignwide { width: min(1080px, calc(100vw - 2 * var(--gutter))); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.prose .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.prose .alignfull img { border-radius: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--gold); }
.prose code { font-size: .85em; background: var(--paper-2); padding: .1em .35em; border-radius: 4px; }

.reader__end { text-align: center; padding-block: 1rem 3rem; }
.fin { font-size: 1.8rem; color: var(--gold); margin: 0; }
.reader__endnote { font: italic 400 1rem var(--f-display); color: var(--muted); margin: .4rem 0 2.2rem; }
.share { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem 1.1rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font: 500 .85rem var(--f-ui); }
.share > span { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; }
.share a, .share button { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; color: var(--ink-2); }
.share a:hover, .share button:hover { color: var(--accent); }
.share [hidden] { display: none; }

/* Engagement */
.stats-bar { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; margin-top: 1.2rem; }
.stat {
	display: inline-flex; align-items: center; gap: .4rem;
	padding: .38em .8em; border-radius: 999px; border: 1px solid transparent;
	background: none; font: 500 .85rem var(--f-ui); color: var(--muted); text-decoration: none; cursor: default;
}
.stat b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stat__label { font-size: .8rem; }
a.stat, button.stat { cursor: pointer; }
a.stat:hover, button.stat:hover { border-color: var(--line); color: var(--ink); }
.stat--like.is-liked, .stat--like.is-liked b { color: var(--accent); }
.is-liked .i-heart { fill: currentColor; }
.engage { padding-top: 2rem; border-top: 1px solid var(--line); }
.engage__ask { font: italic 400 1.25rem var(--f-display); margin: 0 0 1.1rem; }
.engage__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; margin-bottom: 2rem; }
.like-btn {
	display: inline-flex; align-items: center; gap: .55rem;
	padding: .8em 1.4em; border-radius: 999px; cursor: pointer;
	border: 1.5px solid var(--accent); background: transparent; color: var(--accent);
	font: 600 .95rem var(--f-ui); text-decoration: none; transition: background .2s, color .2s, transform .2s;
}
.like-btn:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.like-btn.is-liked { background: var(--accent); color: var(--on-accent); }
.like-btn__count { padding-left: .55rem; border-left: 1px solid currentColor; font-variant-numeric: tabular-nums; opacity: .9; }
.like-btn--ghost { border-color: var(--line); color: var(--ink-2); }
.like-btn--ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.like-btn.pop .i-heart, .stat--like.pop .i-heart { animation: pm-pop .4s ease; }
@keyframes pm-pop { 40% { transform: scale(1.35); } }
.engage .share { border-top: 0; padding-top: 0; }
.engage__shares { margin: 1rem 0 0; font: 400 .82rem var(--f-ui); color: var(--muted); }

.chapter-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-block: 1rem 4rem; max-width: calc(980px + 2 * var(--gutter)); }
.chapter-nav__link {
	display: flex; flex-direction: column; gap: .3rem; padding: 1.5rem 1.6rem;
	border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--card);
	transition: border-color .2s, transform .2s;
}
.chapter-nav__link:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.chapter-nav__link .kicker { margin: 0; }
.chapter-nav__link--next { text-align: right; grid-column: 2; }
.chapter-nav__title { font: 400 1.35rem/1.25 var(--f-display); }
@media (max-width: 640px) {
	.chapter-nav { grid-template-columns: 1fr; }
	.chapter-nav__link--next { grid-column: auto; }
}

/* Contents drawer */
.toc { position: fixed; inset: 0; z-index: 80; background: rgba(10, 8, 5, 0); transition: background .25s; }
.toc.is-open { background: rgba(10, 8, 5, .45); }
.toc__panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); overflow: auto;
	background: var(--paper); padding: 1.6rem; transform: translateX(100%); transition: transform .25s ease;
	box-shadow: -10px 0 40px rgba(0,0,0,.15);
}
.toc.is-open .toc__panel { transform: none; }
.toc__head { display: flex; justify-content: space-between; align-items: start; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.toc__title { font: 400 1.6rem/1.2 var(--f-display); margin: 0; }
.toc__list { list-style: none; margin: 0; padding: 0; }
.toc__list a { display: flex; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 400 1.05rem/1.35 var(--f-read); }
.toc__num { font: 400 1rem var(--f-display); color: var(--gold); min-width: 1.6em; }
/* "Introduction", "Part 1" … shown above the title of a labelled (unnumbered) article in chapter lists. */
.row-label { display: block; font: 600 .7rem/1.2 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .3rem; }
.toc__list .is-current a { color: var(--accent); font-weight: 600; }

/* ---------- Season page ---------- */
.season-hero { position: relative; padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 7vw, 5rem); background: var(--band); color: var(--band-ink); overflow: hidden; }
.season-hero__bg { position: absolute; inset: 0; }
.season-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.season-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,8,5,.3), rgba(10,8,5,.85)); }
.season-hero__inner { position: relative; max-width: calc(880px + 2 * var(--gutter)); }
.season-hero .eyebrow { color: var(--gold); }
.season-hero__title { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 400; letter-spacing: -.03em; }
.season-hero__sub { font: italic 400 clamp(1.15rem, 2vw, 1.4rem)/1.4 var(--f-display); color: var(--band-muted); margin: 1rem 0 0; }
.season-hero__desc { font: 400 1.15rem/1.65 var(--f-read); opacity: .9; max-width: 640px; margin-top: 1.4rem; }
.season-hero__desc p { margin: 0 0 1em; }
.season-hero .meta { color: var(--band-muted); margin: 1.4rem 0 1.8rem; }

.chapter-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.chapter-row a {
	display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 1.2rem; align-items: start;
	padding: 1.8rem 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s;
}
.chapter-row a:hover { color: var(--ink); }
.chapter-row a:hover .chapter-row__title { color: var(--accent); }
.chapter-row__num { font: 300 2.6rem/1 var(--f-display); color: var(--gold); letter-spacing: -.03em; }
.chapter-row__body { display: flex; flex-direction: column; gap: .45rem; }
.chapter-row__title { font: 400 1.6rem/1.2 var(--f-display); transition: color .2s; }
.chapter-row__excerpt { font: 400 1.05rem/1.55 var(--f-read); color: var(--ink-2); }
.chapter-row__thumb img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.chapter-list--compact .chapter-row a { padding: 1.1rem 0; grid-template-columns: 3rem 1fr; }
.chapter-list--compact .chapter-row__num { font-size: 1.6rem; }
.chapter-list--compact .chapter-row__title { font-size: 1.25rem; }
@media (max-width: 640px) {
	.chapter-row a { grid-template-columns: 3rem 1fr; }
	.chapter-row__num { font-size: 1.8rem; }
	.chapter-row__thumb { display: none; }
	.chapter-row__title { font-size: 1.3rem; }
}

.volume-divider { font-size: clamp(1.5rem, 3vw, 2rem); margin: 3.5rem 0 .4rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.volume-divider:first-child { margin-top: 0; }
.volume-divider a { text-decoration: none; }
.volume-divider .kicker { display: block; }
.volume-list { border-top: 0; }
.library-season { display: grid; grid-template-columns: 340px 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: 2.5rem; border-bottom: 1px solid var(--line); }
.library-season:first-child { padding-top: 0; }
.library-season .chapter-list { border-top: 0; }
@media (max-width: 860px) { .library-season { grid-template-columns: 1fr; } }

/* ---------- Bio page ---------- */
.bio { padding-block: clamp(3rem, 7vw, 5.5rem); }
.bio__grid { display: grid; grid-template-columns: 340px 1fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.bio__side { position: sticky; top: 100px; }
.bio__portrait img, .bio__portrait .hero__monogram { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 180px 180px var(--radius) var(--radius); box-shadow: var(--shadow); }
.bio__name { font: 400 1.6rem var(--f-display); margin: 1.4rem 0 .2rem; }
.bio__role { font: italic 400 1.05rem var(--f-display); color: var(--muted); margin: 0; }
.bio__links { list-style: none; padding: 1.2rem 0 0; margin: 1.2rem 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font: 500 .9rem var(--f-ui); }
.bio__links a { text-decoration: none; color: var(--accent); }
.bio__main .page-title { margin-bottom: 2rem; }
.bio__main .prose { margin-bottom: 2.5rem; }
@media (max-width: 860px) {
	.bio__grid { grid-template-columns: 1fr; }
	.bio__side { position: static; max-width: 320px; }
}

/* ---------- Gallery page ---------- */
.gallery-page h2, .gallery-page h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 3rem 0 1.2rem; }
.gallery-page > :first-child { margin-top: 0; }
.gallery-page p { font: 400 1.1rem/1.6 var(--f-read); color: var(--ink-2); max-width: 640px; }
.gallery-page .wp-block-gallery.has-nested-images { display: block; columns: 3 260px; column-gap: 1rem; }
.gallery-page .wp-block-gallery.has-nested-images figure.wp-block-image {
	width: 100% !important; margin: 0 0 1rem !important; break-inside: avoid; display: block;
	border-radius: 10px; overflow: hidden; position: relative;
}
.gallery-page .wp-block-gallery.has-nested-images figure.wp-block-image img { width: 100%; height: auto !important; object-fit: cover; transition: transform .5s; }
.gallery-page .wp-block-gallery.has-nested-images figure.wp-block-image:hover img { transform: scale(1.03); }
.gallery-page .wp-block-image img { border-radius: 10px; }
.gallery-page .wp-block-gallery figcaption { font-family: var(--f-ui) !important; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8, 7, 5, .94); display: grid; place-items: center; padding: 4rem 1rem; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 6px; }
.lightbox figcaption { color: #d8d0c0; font: 400 .95rem var(--f-ui); margin-top: 1rem; }
.lightbox button { position: absolute; background: rgba(255,255,255,.08); border: 0; color: #fff; cursor: pointer; border-radius: 50%; width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; }
.lightbox button:hover { background: rgba(255,255,255,.18); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-open { overflow: hidden; }

/* ---------- Comments, forms, pagination ---------- */
.comments { border-top: 1px solid var(--line); padding-block: 3rem; }
.comments__title, .comment-reply-title { font-size: 1.6rem; margin-bottom: 1.4rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.comment-list .comment { padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-meta { font-size: .85rem; color: var(--muted); }
.comment-meta img { display: inline-block; border-radius: 50%; vertical-align: middle; margin-right: .5rem; }
.comment-content { font: 400 1.05rem/1.6 var(--f-read); }
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], textarea {
	width: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px;
	background: var(--card); color: var(--ink); font: 400 1rem var(--f-ui);
}
.comment-form label { display: block; font: 500 .85rem var(--f-ui); margin-bottom: .3rem; }
.comment-form p { margin: 0 0 1rem; }
.pagination { margin-top: 3rem; }
.nav-links { display: flex; gap: .4rem; flex-wrap: wrap; }
.page-numbers { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.notfound { min-height: 50vh; }

/* ---------- Footer ---------- */
.site-footer {
	position: relative; overflow: hidden; isolation: isolate;
	background: var(--band); color: var(--band-ink);
	padding-top: clamp(3.5rem, 7vw, 5rem);
}
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--rule); }
.site-footer .wordmark { color: var(--band-ink); }
.site-footer .wordmark__mono { background: var(--band-ink); color: var(--band); }
.site-footer__grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer__role { font: italic 400 .98rem/1.4 var(--f-display); color: var(--gold); margin: 1rem 0 .8rem; }
.site-footer__bio { color: var(--band-ink); opacity: .82; font: 400 1rem/1.65 var(--f-read); max-width: 420px; margin: 0 0 1rem; }
.site-footer .link-arrow { color: var(--gold); }
.footer-title { font: 600 .72rem var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-links, .footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { color: var(--band-ink); text-decoration: none; font-size: .93rem; opacity: .85; }
.footer-links a:hover { opacity: 1; color: var(--gold); }
.site-footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 3rem; padding-block: 1.4rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .83rem; color: var(--band-muted); }
.to-top { color: var(--band-muted); text-decoration: none; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.site-footer__legal a { color: var(--band-muted); text-decoration: none; }
.site-footer__legal a:hover { color: #fff; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }

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

/* ---------- Reader accounts ---------- */
.signin-link { color: var(--ink-2); text-decoration: none; }
.signin-link:hover { color: var(--accent); }
.account-link { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink-2); font: 500 .88rem var(--f-ui); }
.account-link__avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); }
@media (max-width: 860px) { .account-link__name { display: none; } }

.auth { display: grid; place-items: center; padding: clamp(3rem, 8vw, 6rem) var(--gutter); }
.auth__card {
	width: 100%; max-width: 460px; padding: clamp(1.6rem, 5vw, 2.8rem);
	background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
}
.auth__title { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 400; }
.auth__lead { font: 400 1.05rem/1.55 var(--f-read); color: var(--ink-2); margin: .8rem 0 1.6rem; }
.auth__switch { margin: 1.6rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); font: 400 .92rem var(--f-ui); color: var(--muted); text-align: center; }
.auth__switch a { color: var(--accent); font-weight: 600; }

.form { display: grid; gap: 1rem; }
.field { margin: 0; display: grid; gap: .4rem; }
.field label { font: 600 .85rem var(--f-ui); color: var(--ink-2); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.field__aside { font-weight: 500; color: var(--accent); text-decoration: none; }
.field__hint { font: 400 .78rem var(--f-ui); color: var(--muted); }
.field input[type="password"], .field input[type="text"], .field input[type="email"], .field textarea { font-size: 1rem; }
.field input:focus, .field textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: var(--accent); }
.field--check label { font-weight: 500; justify-content: flex-start; gap: .5rem; cursor: pointer; }
.form__fine { font: 400 .8rem var(--f-ui); color: var(--muted); margin: 0; }
.btn--block { width: 100%; justify-content: center; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: .8rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--paper-2); font: 400 .92rem/1.5 var(--f-ui); margin: 0 0 1rem; }
.notice--error { border-color: color-mix(in srgb, #c0392b 40%, transparent); background: color-mix(in srgb, #c0392b 9%, var(--card)); color: var(--ink); }
.notice--ok { border-color: color-mix(in srgb, #2e7d4f 40%, transparent); background: color-mix(in srgb, #2e7d4f 10%, var(--card)); }
.notice a { color: var(--accent); font-weight: 600; }

.join-card { padding: 1.6rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: center; }
.join-card__title { font: 400 1.5rem var(--f-display); margin: 0 0 .4rem; }
.join-card p { margin: 0 0 1rem; color: var(--ink-2); }
.join-card__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; margin: 0 !important; }
.logged-in-as { font: 400 .88rem var(--f-ui); color: var(--muted); }
.logged-in-as a { color: var(--accent); }

.profile-head { padding-block: clamp(2.5rem, 6vw, 4rem) 0; border-bottom: 1px solid var(--line); }
.profile-head__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 1.6rem; align-items: center; }
.profile-head__avatar .avatar { width: 112px; height: 112px; border-radius: 50%; border: 3px solid var(--card); box-shadow: var(--shadow); }
.profile-head__name { font-size: clamp(2rem, 5vw, 3rem); font-weight: 400; }
.profile-head__text .eyebrow { margin-bottom: .4rem; }
.profile-head__bio { font: 400 1.05rem/1.55 var(--f-read); color: var(--ink-2); margin: .6rem 0 0; max-width: 560px; }
.profile-head__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.profile-stats { display: flex; gap: clamp(1.5rem, 5vw, 3.5rem); margin: 2rem 0 0; padding: 1.4rem 0; }
.profile-stats div { display: flex; flex-direction: column-reverse; }
.profile-stats dt { font: 500 .72rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.profile-stats dd { margin: 0; font: 400 2.2rem/1.1 var(--f-display); }
@media (max-width: 700px) {
	.profile-head__inner { grid-template-columns: 1fr; text-align: left; }
	.profile-head__avatar .avatar { width: 84px; height: 84px; }
}
.section--compact { padding-block: clamp(2.5rem, 5vw, 4rem); }
.profile-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 800px) { .profile-cols { grid-template-columns: 1fr; } }
.profile-h { font-size: 1.5rem; margin: 0 0 1rem; }
.profile-h:not(:first-child) { margin-top: 2.5rem; }
.mini-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mini-list a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 400 1.08rem/1.35 var(--f-display); }
.mini-list .kicker { display: block; margin-bottom: .2rem; font-size: .66rem; }
.comment-history { list-style: none; margin: 0; padding: 0; }
.comment-history li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-history__text { font: italic 400 1.02rem/1.55 var(--f-read); margin: 0 0 .4rem; }
.comment-history a { color: var(--accent); }
.badge { display: inline-block; margin-left: .4rem; padding: .15em .6em; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); font: 600 .7rem var(--f-ui); color: var(--gold); }
.wrap > .notice:first-child { margin-top: 1.6rem; }

/* ---------- Gallery timeline ---------- */
/* WordPress wraps group content in .wp-block-group__inner-container; the grid lives there. */
.gallery-page .gallery-intro { font: 400 1.2rem/1.6 var(--f-read); color: var(--ink-2); max-width: 640px; margin: 0 0 3rem; }
.gallery-page .era { position: relative; padding-bottom: 3.5rem; }
.gallery-page .era::before { /* the timeline thread */
	content: ""; position: absolute; left: 4.5rem; top: 4.4rem; bottom: .5rem; width: 1px; background: var(--line);
}
.gallery-page .era:last-child::before { display: none; }
.gallery-page .era > .wp-block-group__inner-container,
.gallery-page .era:not(:has(> .wp-block-group__inner-container)) {
	display: grid; grid-template-columns: 9rem minmax(0, 1fr); column-gap: 2.5rem;
}
.gallery-page .era h2 {
	grid-column: 1 / -1; display: grid; grid-template-columns: 9rem minmax(0, 1fr); column-gap: 2.5rem; align-items: center;
	margin: 0 0 .4rem; font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.gallery-page .era__year { font: 300 clamp(2.6rem, 6vw, 3.6rem)/1 var(--f-display); color: var(--gold); letter-spacing: -.03em; text-align: center; }
.gallery-page .era p { grid-column: 2; margin: 0 0 1.4rem; }
.gallery-page .era .wp-block-gallery { grid-column: 2; }
.gallery-page .era .wp-block-gallery.has-nested-images { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.2rem 1rem; columns: auto; align-items: start; }
.gallery-page .era .wp-block-gallery.has-nested-images figure.wp-block-image { display: flex; flex-direction: column; margin: 0 !important; width: auto !important; }
.gallery-page .era .wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 10px; }
.gallery-page .era .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	position: static; background: none; color: var(--muted); padding: .55rem .1rem 0; text-align: left;
	font: 400 .85rem/1.45 var(--f-ui) !important; max-height: none; overflow: visible; text-shadow: none;
}
.gallery-page .era .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { display: none; }
@media (max-width: 760px) {
	.gallery-page .era > .wp-block-group__inner-container,
	.gallery-page .era:not(:has(> .wp-block-group__inner-container)),
	.gallery-page .era h2 { grid-template-columns: minmax(0, 1fr); }
	.gallery-page .era::before { display: none; }
	.gallery-page .era p, .gallery-page .era .wp-block-gallery { grid-column: 1; }
	.gallery-page .era__year { text-align: left; font-size: 2.4rem; display: block; margin-bottom: .2rem; }
	.gallery-page .era .wp-block-gallery.has-nested-images { grid-template-columns: 1fr; }
}
/* Account link lives in the header on desktop and in the menu on phones. */
.menu-item--account { display: none; }
@media (max-width: 860px) {
	.menu-item--account { display: block; }
	.wordmark__name { white-space: nowrap; }
}

/* ---------- Studio (editors) ---------- */
.studio-link { font: 600 .85rem var(--f-ui); text-decoration: none; color: var(--accent); padding: .45em .9em; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 999px; }
.studio-link:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
@media (max-width: 860px) { .studio-link { display: none; } }
.chip--edit { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); text-decoration: none; }

.studio { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 70vh; border-top: 1px solid var(--line); }
.studio__nav { padding: 2rem 1.4rem; border-right: 1px solid var(--line); background: var(--paper-2); position: sticky; top: 72px; align-self: start; min-height: calc(100vh - 72px); }
.studio__hello { font: 400 1.35rem var(--f-display); margin: 0 0 1.4rem; }
.studio__link { display: flex; justify-content: space-between; align-items: center; padding: .65rem .8rem; border-radius: 10px; text-decoration: none; font: 500 .95rem var(--f-ui); color: var(--ink-2); margin-bottom: .2rem; }
.studio__link:hover { background: var(--card); color: var(--ink); }
.studio__link.is-active { background: var(--card); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.studio__count { font: 600 .75rem var(--f-ui); color: var(--muted); background: var(--paper); border: 1px solid var(--line); padding: .1em .55em; border-radius: 999px; }
.studio__count.is-alert { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.studio__aside-links { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; font: 400 .85rem var(--f-ui); }
.studio__aside-links a { color: var(--muted); text-decoration: none; }
.studio__aside-links a:hover { color: var(--accent); }
.studio__main { padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; min-width: 0; }
.studio__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.studio__head h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 400; }
.studio__head .eyebrow { margin-bottom: .3rem; }
.report-download { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: -.6rem 0 1.4rem; }
.report-download .field__hint { margin: 0; }
.studio__filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.studio__filters input[type="search"] { flex: 1 1 240px; width: auto; }
.studio select, .studio input[type="number"], .studio input[type="datetime-local"] {
	padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 400 .95rem var(--f-ui); width: 100%;
}
.studio__filters select { width: auto; }
.studio-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.studio-table { width: 100%; border-collapse: collapse; font: 400 .9rem var(--f-ui); }
.studio-table th { text-align: left; font: 600 .72rem var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: .8rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.studio-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.studio-table tr:last-child td { border-bottom: 0; }
.studio-table tbody tr:hover { background: var(--paper); }
.studio-table .title a { font: 500 1rem/1.35 var(--f-display); text-decoration: none; color: var(--ink); }
.studio-table .title a:hover { color: var(--accent); }
.studio-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.studio-table .muted, .muted { color: var(--muted); }
.studio-table .actions { white-space: nowrap; text-align: right; }
.studio-table .actions a { margin-left: .8rem; color: var(--accent); text-decoration: none; font-weight: 500; }
.block { display: block; font-size: .82rem; margin-top: .15rem; }
.pill { display: inline-block; padding: .15em .65em; border-radius: 999px; font: 600 .72rem var(--f-ui); border: 1px solid var(--line); white-space: nowrap; }
.pill--publish { color: #2e7d4f; border-color: color-mix(in srgb, #2e7d4f 40%, transparent); }
.pill--draft { color: var(--muted); }
.pill--future { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.pill--pending { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.studio__pager { display: flex; gap: .4rem; margin-top: 1.2rem; flex-wrap: wrap; }

.studio-form { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.studio-form__main { display: grid; gap: 1.2rem; min-width: 0; }
.studio-form__side { display: grid; gap: 1rem; position: sticky; top: 90px; }
.input--title { font: 400 1.6rem var(--f-display) !important; padding: .7rem 1rem !important; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; display: grid; gap: .8rem; }
.panel__title { font: 600 .72rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0; }
.panel .meta { margin: 0; }
.panel__actions { display: grid; gap: .5rem; }
.panel__actions--row { display: flex; gap: .5rem; flex-wrap: wrap; }
.field-row { display: flex; gap: .8rem; }
.field-row .field { flex: 1; }
.field-row .field--grow { flex: 3; }
.media-pick { display: grid; gap: .6rem; justify-items: start; }
.media-pick__preview img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.media-pick__preview:empty { display: none; }
.media-pick__file { display: inline-block; padding: .5rem .8rem; border-radius: 8px; background: var(--paper-2); font: 500 .85rem var(--f-ui); word-break: break-all; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font: 500 .85rem var(--f-ui); color: var(--muted); text-decoration: underline; }
.link-btn:hover { color: var(--ink); }
.link-btn--danger { color: #b3392b; }
.link-btn--danger:hover { color: #8e2418; }
.studio-danger { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.studio .wp-editor-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.studio .wp-editor-container { border: 0; }
.studio .wp-editor-tabs { padding: .4rem .4rem 0; }
.studio .wp-media-buttons { padding: .4rem; }
.studio .wp-editor-area { font: 400 1rem/1.6 ui-monospace, Menlo, monospace; }
.studio-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: 1.6rem; align-items: start; }

.studio-tabs { display: flex; gap: .4rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.studio-tabs a { padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font: 500 .88rem var(--f-ui); color: var(--ink-2); }
.studio-tabs a span { color: var(--muted); margin-left: .3rem; }
.studio-tabs a.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.studio-tabs a.is-active span { color: inherit; opacity: .7; }
.mod-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.mod { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; }
.mod__who { display: flex; gap: .7rem; align-items: center; }
.mod__who img { border-radius: 50%; }
.mod__who strong { display: block; font: 600 .95rem var(--f-ui); }
.mod__who .meta a { color: var(--accent); }
.mod__text { font: 400 1.02rem/1.6 var(--f-read); margin: .6rem 0; }
.mod__text p { margin: 0 0 .6rem; }
.mod__actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.mod__actions form { margin: 0; }

@media (max-width: 1000px) {
	.studio-form, .studio-split { grid-template-columns: 1fr; }
	.studio-form__side { position: static; }
}
@media (max-width: 760px) {
	.studio { grid-template-columns: 1fr; }
	.studio__nav { position: static; min-height: 0; min-width: 0; padding: 1rem var(--gutter); border-right: 0; border-bottom: 1px solid var(--line); }
	.studio__hello, .studio__aside-links { display: none; }
	.studio__nav nav { display: flex; gap: .3rem; overflow-x: auto; }
	.studio__link { white-space: nowrap; gap: .5rem; }
}

/* The hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }
.notice ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.notice li { margin-bottom: .3rem; }

/* ---------- Studio: "not saved yet" pop-up and inline messages ---------- */
.pm-dialog {
	width: min(460px, calc(100vw - 2rem)); padding: 1.8rem 1.8rem 1.5rem; border: 0; border-radius: 18px;
	background: var(--card); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, .3); text-align: center;
}
.pm-dialog::backdrop { background: rgba(20, 16, 10, .45); backdrop-filter: blur(2px); }
.pm-dialog[open] { animation: pm-dialog-in .22s ease-out; }
@keyframes pm-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.pm-dialog__icon {
	width: 46px; height: 46px; margin: 0 auto .8rem; border-radius: 50%;
	display: grid; place-items: center; background: color-mix(in srgb, #c0392b 12%, var(--card));
	color: #b3392b; font: 700 1.4rem var(--f-ui);
}
.pm-dialog__title { font-size: 1.6rem; font-weight: 400; margin: 0 0 .4rem; }
.pm-dialog__lead { font: 400 .95rem/1.5 var(--f-ui); color: var(--muted); margin: 0 0 1rem; }
.pm-dialog__list { list-style: none; margin: 0 0 1.4rem; padding: 0; text-align: left; display: grid; gap: .6rem; }
.pm-dialog__list li {
	padding: .75rem .9rem; border-radius: 10px; border-left: 3px solid #b3392b;
	background: color-mix(in srgb, #c0392b 7%, var(--paper)); font: 400 .92rem/1.5 var(--f-ui);
}

.save-errors {
	border: 1px solid color-mix(in srgb, #c0392b 40%, transparent); border-radius: 10px;
	background: color-mix(in srgb, #c0392b 8%, var(--card)); padding: .7rem .85rem;
}
.save-errors__title { margin: 0 0 .3rem; font: 600 .78rem var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: #b3392b; }
.save-errors ul { margin: 0; padding-left: 1.1rem; font: 400 .84rem/1.45 var(--f-ui); }
.save-errors li + li { margin-top: .35rem; }

.field__error { margin: -.2rem 0 .2rem; font: 500 .8rem/1.4 var(--f-ui); color: #b3392b; }
.studio [data-invalid] { border-color: #b3392b !important; box-shadow: 0 0 0 3px color-mix(in srgb, #c0392b 18%, transparent); }

/* ---------- Footer: social icons ---------- */
.social { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .55rem; }
.social__link {
	display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .18); color: var(--band-ink); text-decoration: none;
	transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.social__link:hover, .social__link:focus-visible { background: var(--gold); border-color: var(--gold); color: var(--band); transform: translateY(-2px); }
.footer-email { display: inline-flex; align-items: center; gap: .55rem; color: var(--band-ink); opacity: .85; text-decoration: none; font-size: .9rem; word-break: break-all; }
.footer-email:hover { opacity: 1; color: var(--gold); }
.footer-hint { font-size: .82rem; line-height: 1.5; color: var(--band-muted); margin: 0 0 1rem; }
.footer-hint a { color: var(--gold); }
@media (max-width: 480px) {
	.site-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.2rem; }
	.site-footer__brand, .site-footer__follow { grid-column: 1 / -1; }
}

/* ---------- Executive journal layer ---------- */
:root { --hero-bg: linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, var(--paper)), var(--paper)); --tint-bg: var(--paper-2); }
:root[data-theme="dark"] { --hero-bg: linear-gradient(180deg, #131c2b, var(--paper)); }

/* Hero: quiet paper, refined serif, a short brass rule. */
.hero { background: var(--hero-bg); isolation: isolate; padding-bottom: clamp(3rem, 8vw, 6rem); }
.hero__title { font-weight: 500; }
.hero__title::after, .section-title::after {
	content: ""; display: block; width: 44px; height: 2px; margin-top: 1.1rem; background: var(--rule);
}
.hero__title::after { width: 64px; margin-top: 1.6rem; }
.hero__intro { color: var(--ink-2); }
.hero__frame::before { border: 1px solid var(--gold); opacity: .7; }
.hero__img { border: 6px solid var(--card); }

/* Stats: understated cards, numbers in ink. */
.stats { border-top: 0; gap: .8rem; flex-wrap: wrap; }
.stats div { padding: .8rem 1.2rem; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stats dd { font-weight: 500; color: var(--ink); }

.section-title { font-weight: 500; }
.section--tint { background: var(--tint-bg); }

/* Buttons: navy primary, cream on dark bands. */
.btn { box-shadow: none; }
.btn--ghost:hover { background: var(--paper-2); border-color: var(--ink); color: var(--ink); }
.btn--light { background: var(--band-ink); border-color: var(--band-ink); color: var(--band); }
.btn--light:hover { background: #fff; border-color: #fff; color: var(--band); }

/* Dark bands: deep navy with a faint brass glow. */
.section--ink { background: radial-gradient(70% 90% at 85% 10%, rgba(212, 176, 106, .10), transparent 60%), var(--band); }
.season-hero__bg::after { background: linear-gradient(180deg, rgba(19, 33, 58, .45), rgba(10, 16, 28, .92)); }
.season-hero { border-bottom: 2px solid var(--rule); }
.site-header { border-bottom-color: var(--line); }

/* Faint buffalo texture (Nyati) on the paper areas. */
:root { --texture: url(assets/img/buffalo-tile.svg); }
:root[data-theme="dark"] { --texture: url(assets/img/buffalo-tile-dark.svg); }
body { background-image: var(--texture); background-size: 260px 180px; background-attachment: fixed; }
.hero { background: var(--texture) 0 0 / 260px 180px fixed, var(--hero-bg); }
.section--tint { background: var(--texture) 0 0 / 260px 180px fixed, var(--tint-bg); }

/* Signature quote on the Bio page. */
.bio-quote {
	position: relative; margin: 0 0 2.8rem; padding: clamp(3.6rem, 6vw, 4.2rem) clamp(1.6rem, 4vw, 3rem) clamp(1.6rem, 3vw, 2rem);
	background: radial-gradient(70% 90% at 90% 0%, rgba(212, 176, 106, .12), transparent 60%), var(--band);
	color: var(--band-ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.bio-quote::before {
	content: "\201C"; position: absolute; top: .3rem; left: 1.4rem;
	font: 700 5.5rem/1 var(--f-display); color: var(--gold-bright); opacity: .9;
}
.bio-quote::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--rule); }
.bio-quote blockquote { margin: 0; padding: 0; border: 0; }
.bio-quote p { position: relative; margin: 0; font: 500 clamp(1.3rem, 2.4vw, 1.7rem)/1.4 var(--f-display); letter-spacing: -.01em; }
.bio-quote figcaption { display: flex; align-items: baseline; gap: .7rem; margin-top: 1.3rem; }
.bio-quote__name { font: italic 400 1.15rem var(--f-display); color: var(--gold-bright); }
.bio-quote__name::before { content: "— "; }
.bio-quote__year { font: 600 .74rem var(--f-ui); letter-spacing: .14em; color: var(--band-muted); }

/* Season and chapter covers: muted under a navy wash, clearer on hover. */
.season-card__media, .card__media { position: relative; }
.season-card__media img, .card__media img { filter: saturate(.55) contrast(.95); transition: filter .4s, transform .6s cubic-bezier(.2,.7,.2,1); }
.season-card__media::after, .card__media::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(180deg, rgba(19, 33, 58, .32), rgba(10, 16, 28, .58));
	mix-blend-mode: multiply; transition: opacity .4s;
}
.season-card:hover .season-card__media img, .card:hover .card__media img { filter: saturate(.85); transform: scale(1.03); }
.season-card:hover .season-card__media::after, .card:hover .card__media::after { opacity: .55; }

/* Light navy wash on the homepage hero portrait. Delete this block to revert. */
.hero__frame::after {
	content: ""; position: absolute; inset: 6px; pointer-events: none;
	border-radius: 214px 214px calc(var(--radius) - 6px) calc(var(--radius) - 6px);
	background: linear-gradient(180deg, rgba(19, 33, 58, .05), rgba(10, 16, 28, .28));
	mix-blend-mode: multiply;
}
.hero__img { filter: saturate(.8); }
/* End hero portrait wash */

/* ---------- Studio: Reports ---------- */
.studio-tabs--tight { margin-bottom: 0; }
.studio-tabs--tight a { padding: .4rem .85rem; font-size: .82rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .7rem; margin-bottom: .6rem; }
.kpis__note { margin: 0 0 1.4rem; }
/* Reports: 8 tiles sit as two even rows of four (two columns on phones). */
.kpis--report, .kpis--facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .kpis--report, .kpis--facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpis--facts { margin-bottom: 0; }
/* Chapter filter above the day/week/month table. */
.report-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: -.3rem 0 1rem; }
.report-filter label { font: 600 .72rem var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.report-filter select { width: auto; max-width: 100%; min-width: 0; flex: 0 1 28rem; }
.report-filter__clear { font: 500 .85rem var(--f-ui); }
.kpis--facts .kpi__value { font-size: 1.4rem; }
.studio-table tfoot th { color: var(--ink); border-top: 2px solid var(--ink-2); border-bottom: 0; }
.studio-table tfoot th.num, .studio-table th.num { text-align: right; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; }
.kpi__label { margin: 0; font: 600 .7rem var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi__value { margin: .35rem 0 .2rem; font: 500 1.8rem/1.1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi__delta { margin: 0; font: 500 .75rem var(--f-ui); color: var(--muted); }
.kpi__delta.is-up { color: var(--accent); }
.kpi__delta.is-down { color: var(--neg); }
.rcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.3rem 1.3rem; margin-bottom: 1.2rem; min-width: 0; }
.rcard__head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rcard__head h2 { font: 500 1.25rem var(--f-display); }
.rcard .studio-table-wrap { border-radius: 10px; }
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.rgrid .rcard { margin-bottom: 0; }
.rgrid + .rcard { margin-top: 1.2rem; }
@media (max-width: 860px) { .rgrid { grid-template-columns: 1fr; } }

.rchart { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 200px auto; column-gap: .6rem; }
.rchart svg { width: 100%; height: 200px; display: block; overflow: visible; }
.rchart__y { display: flex; flex-direction: column; justify-content: space-between; font: 500 .72rem var(--f-ui); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rchart__x { grid-column: 2; display: flex; justify-content: space-between; margin-top: .4rem; font: 500 .72rem var(--f-ui); color: var(--muted); }
.rchart__grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.rchart__base { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .5; }
.rchart__bar { fill: var(--accent); }
.rchart__hit { fill: transparent; }
.rchart g:hover .rchart__hit, .rchart g.is-on .rchart__hit { fill: color-mix(in srgb, var(--accent) 8%, transparent); }
.rchart g:hover .rchart__bar, .rchart g.is-on .rchart__bar { fill: var(--accent-hover); }
.rchart__tip {
	position: absolute; z-index: 2; pointer-events: none; transform: translate(-50%, calc(-100% - 10px));
	background: var(--ink); color: var(--paper); border-radius: 8px; padding: .45rem .65rem; white-space: nowrap;
	font: 400 .78rem/1.45 var(--f-ui); box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.rchart__tip strong { display: block; font-weight: 600; }
.rcard__table { margin-top: 1rem; }
.rcard__table summary { cursor: pointer; font: 500 .82rem var(--f-ui); color: var(--accent); margin-bottom: .6rem; }
.rcard__table .studio-table-wrap { max-height: 320px; overflow-y: auto; }

.rbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.rbars li { display: grid; grid-template-columns: minmax(90px, 9rem) minmax(0, 1fr) auto; align-items: center; gap: .8rem; font: 400 .88rem var(--f-ui); }
.rbars__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.rbars__track { height: 8px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.rbars__fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.rbars__n { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); min-width: 2.5ch; text-align: right; }
.empty--small { padding: 1rem 0; font-size: .9rem; }
.rnote { margin-top: 1.4rem; max-width: 760px; line-height: 1.6; }

/* ---------- Flag accents on the business base ---------- */
/* A thin flag ribbon frames the page: under the header and over the footer. */
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--flag); }
.site-footer::before { height: 4px; background: var(--flag); }
/* Headings get a short four-colour rule instead of the plain brass one. */
.hero__title::after, .section-title::after { height: 3px; border-radius: 2px; background: var(--flag-short); }
/* Section labels: small marker cycles through the flag colours by section. */
.section:nth-of-type(4n+1) .eyebrow::before { background: var(--zim-green); }
.section:nth-of-type(4n+2) .eyebrow::before { background: var(--zim-gold); }
.section:nth-of-type(4n+3) .eyebrow::before { background: var(--zim-red); }
.hero .eyebrow::before { background: var(--zim-green); }
/* Season cards: a coloured top edge in flag order. */
.season-card { border-top: 3px solid var(--zim-green); }
.season-grid > :nth-child(3n+2) .season-card, .season-grid > .season-card:nth-child(3n+2) { border-top-color: var(--zim-gold); }
.season-grid > :nth-child(3n) .season-card, .season-grid > .season-card:nth-child(3n) { border-top-color: var(--zim-red); }
/* Stats: numbers pick up the flag colours. */
.stats div:nth-child(1) dd { color: var(--zim-green); }
.stats div:nth-child(2) dd { color: var(--zim-red); }
.stats div:nth-child(3) dd { color: var(--ink); }
/* Bio quote and season banners close with the ribbon. */
.bio-quote::after { height: 4px; background: var(--flag); }
.season-hero { border-bottom: 0; }
.season-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--flag); }
/* Primary buttons on dark bands use the flag gold so they stand out. */
.season-hero .btn:not(.btn--ghost), .section--ink .btn:not(.btn--ghost) { background: var(--zim-gold); border-color: var(--zim-gold); color: #141b26; }
.season-hero .btn:not(.btn--ghost):hover, .section--ink .btn:not(.btn--ghost):hover { background: #f0c75c; border-color: #f0c75c; color: #141b26; }

/* ---------- Newsletter sign-up ---------- */
.subscribe__title { font: 500 clamp(1.4rem, 2.6vw, 1.9rem)/1.2 var(--f-display); margin: 0 0 .5rem; color: var(--ink); }
.subscribe__lead { font: 400 1.02rem/1.6 var(--f-read); color: var(--ink-2); margin: 0 0 1.1rem; max-width: 520px; }
.subscribe__form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.subscribe__form input[type="email"] {
	flex: 1 1 240px; min-width: 0; padding: .85em 1.1em; border: 1px solid var(--line); border-radius: 999px;
	background: var(--card); color: var(--ink); font: 400 1rem var(--f-ui);
}
.subscribe__form input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.subscribe__msg { flex-basis: 100%; margin: .2rem 0 0; font: 500 .88rem/1.4 var(--f-ui); min-height: 1.2em; }
.subscribe__msg.is-ok { color: var(--zim-green); }
.subscribe__msg.is-error { color: var(--neg); }
.subscribe__form.is-done input, .subscribe__form.is-done button { display: none; }

.subscribe--card {
	margin-top: 2.5rem; padding: clamp(1.4rem, 3vw, 2rem); border-radius: var(--radius); position: relative; overflow: hidden;
	background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: left;
}
.subscribe--card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--flag); }

.subscribe-band { background: var(--paper-2); }
.subscribe--band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem 3rem; align-items: center; }
.subscribe--band .subscribe__lead { margin-bottom: 0; }
@media (max-width: 860px) { .subscribe--band { grid-template-columns: 1fr; } }

.subscribe--footer { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.12); max-width: 420px; }
.subscribe--footer .subscribe__form { flex-direction: column; align-items: stretch; }
.subscribe--footer input[type="email"] { flex: 0 0 auto; width: 100%; }
.subscribe--footer .footer-title { margin-bottom: .5rem; }
.subscribe--footer .subscribe__lead { color: var(--band-ink); opacity: .82; font-size: .95rem; margin-bottom: .8rem; }
.subscribe--footer input[type="email"] { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: var(--band-ink); }
.subscribe--footer input[type="email"]::placeholder { color: var(--band-muted); }
.subscribe--footer .btn { background: var(--zim-gold); border-color: var(--zim-gold); color: #141b26; }
.subscribe--footer .subscribe__msg.is-ok { color: var(--gold-bright); }

.subscribe--slide {
	position: fixed; z-index: 70; right: 20px; bottom: 20px; width: min(380px, calc(100vw - 32px));
	padding: 1.4rem 1.4rem 1.2rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
	box-shadow: 0 18px 50px rgba(20, 27, 38, .22); transform: translateY(20px); opacity: 0; transition: transform .3s, opacity .3s;
}
.subscribe--slide.is-in { transform: none; opacity: 1; }
.subscribe--slide::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0; background: var(--flag); }
.subscribe--slide .subscribe__title { font-size: 1.3rem; padding-right: 1.5rem; }
.subscribe--slide .subscribe__lead { font-size: .95rem; }
.subscribe__close { position: absolute; top: .6rem; right: .7rem; background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; padding: .2rem .4rem; }
.subscribe__close:hover { color: var(--ink); }
@media (max-width: 560px) { .subscribe--slide { right: 16px; left: 16px; bottom: 16px; width: auto; } }

/* ---------- Audio edition ---------- */
.listen { margin-top: 1.4rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.listen__label { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; font: 600 .78rem var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.listen audio { width: 100%; display: block; }
.listen__note { margin: .5rem 0 0; font: 400 .75rem var(--f-ui); color: var(--muted); }

/* Read-aloud by the reader's device, for chapters without a recording */
.listen--tts { text-align: left; }
.tts { display: flex; align-items: center; gap: .8rem; }
.tts__play {
	flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
	background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-bright) 45%, transparent);
	transition: background .2s, transform .15s;
}
.tts__play:hover { background: var(--accent-hover); }
.tts__play:active { transform: scale(.95); }
.tts__play svg { width: 22px; height: 22px; }
.tts__i-pause, .is-playing .tts__i-play { display: none; }
.is-playing .tts__i-pause { display: block; }
.tts__body { flex: 1; min-width: 0; }
.tts__bar { height: 4px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.tts__bar span { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); transition: transform .4s; }
.tts__status { margin: .45rem 0 0; font: 400 .8rem/1.35 var(--f-ui); color: var(--muted); }
.tts__btn {
	flex: none; min-width: 36px; height: 36px; padding: 0 .55rem; border-radius: 999px; cursor: pointer; display: grid; place-items: center;
	border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 600 .8rem var(--f-ui);
}
.tts__btn:hover { border-color: var(--ink); color: var(--ink); }
.tts__btn svg { width: 14px; height: 14px; }
.prose .is-speaking {
	background: color-mix(in srgb, var(--gold-bright) 18%, transparent); border-radius: 6px;
	box-shadow: 0 0 0 .35em color-mix(in srgb, var(--gold-bright) 18%, transparent); transition: background .3s;
}
/* Mini player while listening further down the page */
.tts-dock {
	position: fixed; z-index: 65; left: 50%; bottom: 18px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
	display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem .4rem .4rem; border-radius: 999px;
	background: var(--card); border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(20, 27, 38, .22);
	transition: transform .25s, opacity .25s; max-width: calc(100vw - 32px);
}
.tts-dock.is-in { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.tts-dock .tts__play { width: 38px; height: 38px; box-shadow: none; }
.tts-dock .tts__play svg { width: 18px; height: 18px; }
.tts-dock__text { font: 500 .8rem var(--f-ui); color: var(--ink-2); white-space: nowrap; }
.tts-dock .tts__btn { width: 32px; min-width: 32px; height: 32px; padding: 0; }
@media (prefers-reduced-motion: reduce) { .tts-dock, .tts__bar span { transition: none; } }
@media print { .listen--tts, .tts-dock { display: none !important; } }

/* ---------- Comment likes ---------- */
.c-actions { margin-top: .5rem; }
.c-like {
	display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; cursor: pointer;
	border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 .8rem var(--f-ui);
}
.c-like b { font-weight: 600; }
.c-like:hover { color: var(--zim-red); border-color: color-mix(in srgb, var(--zim-red) 40%, var(--line)); }
.c-like.is-liked { color: var(--zim-red); border-color: color-mix(in srgb, var(--zim-red) 45%, transparent); background: color-mix(in srgb, var(--zim-red) 7%, transparent); }
.comment-list .reply { display: inline-block; margin-left: .4rem; font: 500 .82rem var(--f-ui); }
.comment-list .reply a { color: var(--accent); text-decoration: none; }

/* ---------- Read next ---------- */
.more-reads { background: var(--paper-2); }

/* ---------- Recommendations page ---------- */
.recs { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.rec a { display: grid; gap: .25rem; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s; }
.rec a:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.rec__title { font: 500 1.3rem var(--f-display); }
.rec__host { font: 500 .8rem var(--f-ui); color: var(--accent); }
.rec__note { font: 400 1rem/1.55 var(--f-read); color: var(--ink-2); }

/* ---------- Studio: newsletter ---------- */
.nl-side { display: grid; gap: 1rem; }
.nl-unsent { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.nl-unsent li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font: 400 .95rem var(--f-ui); }
.nl-unsent li:last-child { border-bottom: 0; }
.nl-runner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; font: 400 .92rem var(--f-ui); }
.nl-runner p { margin: 0; flex: 1 1 22rem; }
.nl-settings fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.nl-settings .panel { display: grid; gap: .8rem; align-content: start; }
.nl-settings .panel__title:not(:first-child) { margin-top: .8rem; }
.nl-settings > fieldset > .btn { margin-top: 1.2rem; }
.nl-test { margin-top: 1.4rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.nl-sent { color: var(--zim-green); }
.inline-form { display: inline; }
.inline-form + .inline-form { margin-left: .6rem; }

/* Header Subscribe button and its pop-up window. */
.btn--sub { background: var(--zim-gold); border-color: var(--zim-gold); color: #141b26; }
.btn--sub:hover { background: #f0c75c; border-color: #f0c75c; color: #141b26; }
.sub-modal {
	width: min(480px, calc(100vw - 32px)); padding: 2rem 1.8rem 1.6rem; border: 0; border-radius: var(--radius);
	background: var(--card); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, .3); overflow: hidden;
}
.sub-modal::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--flag); }
.sub-modal::backdrop { background: rgba(10, 16, 28, .5); backdrop-filter: blur(2px); }
.sub-modal .subscribe__close { top: .8rem; }
.sub-modal .subscribe__title { padding-right: 1.5rem; }

/* Home hero with a cut-out portrait: a navy circle with a fine brass ring behind him; his body fades out at the bottom. */
.hero__frame--cutout { aspect-ratio: 4 / 5; isolation: isolate; }
.hero__frame--cutout::before {
	inset: auto; left: 6%; right: 6%; top: 14%; aspect-ratio: 1; z-index: 0; border: 0; opacity: 1; border-radius: 50%;
	background:
		radial-gradient(70% 60% at 65% 25%, rgba(212, 176, 106, .3), transparent 70%),
		linear-gradient(160deg, #27436f, #13213a 72%);
	box-shadow: var(--shadow);
}
.hero__frame--cutout::after {
	content: ""; position: absolute; z-index: -1; inset: auto; left: 1%; right: 1%; top: 10%; aspect-ratio: 1;
	border: 1px solid var(--gold); border-radius: 50%; background: none; mix-blend-mode: normal; opacity: .6;
}
.hero__frame > .hero__img--cutout {
	position: relative; z-index: 1; width: 100%; height: 100%; aspect-ratio: auto;
	object-fit: contain; object-position: center bottom;
	border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 12px 18px rgba(10, 16, 28, .25));
	-webkit-mask: linear-gradient(#000 82%, transparent); mask: linear-gradient(#000 82%, transparent);
}
.hero__frame--cutout + .hero__caption { margin-top: .4rem; }

/* About the author: circular portrait with the same fine brass ring as the hero. */
.bio-teaser__img { position: relative; isolation: isolate; width: min(100%, 420px); justify-self: center; }
.bio-teaser__img::after {
	content: ""; position: absolute; z-index: -1; left: -5%; right: -5%; top: -6%; aspect-ratio: 1;
	border: 1px solid var(--gold-bright); border-radius: 50%; opacity: .55;
}
.bio-teaser__img img, .bio-teaser__img .hero__monogram {
	aspect-ratio: 1; border-radius: 50%; object-position: center 18%;
	box-shadow: 0 0 0 6px rgba(212, 176, 106, .18), 0 20px 50px rgba(0, 0, 0, .35);
	filter: none;
}
@media (max-width: 760px) { .bio-teaser__img { max-width: 280px; margin: 0 auto 1rem; } }
.studio-table .group-row td { background: var(--paper-2); font: 600 .72rem var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); padding-block: .55rem; }

/* Phone header: logo and name, light/dark, sign-in icon and menu on one row (Subscribe is desktop-only; phones get it in the page). */
@media (max-width: 860px) {
	.site-header__inner { gap: .6rem; }
	.wordmark { min-width: 0; }
	.wordmark__name { overflow: hidden; text-overflow: ellipsis; line-height: 1.35; padding-block: .1em; }
	.site-header__tools { gap: .4rem; flex: none; }
	.site-header__tools .icon-btn { width: 36px; height: 36px; }
	.account-link__avatar { width: 32px; height: 32px; }
}
@media (max-width: 400px) {
	.wordmark { gap: .55rem; }
	.wordmark__name { font-size: .95rem; }
	.wordmark__mono { width: 38px; height: 38px; }
}

/* ---------- Search ---------- */
.search-form { position: relative; display: flex; align-items: center; gap: .5rem; max-width: 560px; margin: 1.2rem 0; }
.search-form__icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); display: grid; pointer-events: none; }
.search-form__input {
	flex: 1; min-width: 0; padding: .8em 1em .8em 2.7em !important; border: 1px solid var(--line); border-radius: 999px !important;
	background: var(--card); color: var(--ink); font: 400 1rem var(--f-ui);
}
.search-form__input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.search-form__input::-webkit-search-cancel-button { cursor: pointer; }
.search-form__btn { flex: none; }
.search-form--large .search-form__input { font-size: 1.1rem; padding-block: .95em !important; }

/* Header: icon on desktop; on phones the search box sits at the top of the menu. */
.search-form--nav { display: none; }
@media (max-width: 860px) {
	.search-toggle { display: none; }
	.search-form--nav { display: flex; margin: 0 0 .6rem; max-width: none; }
}

.search-modal {
	width: min(640px, calc(100vw - 32px)); margin-top: 12vh; padding: 1.8rem 1.8rem 1.4rem; border: 0; border-radius: var(--radius);
	background: var(--card); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
}
.search-modal::backdrop { background: rgba(10, 16, 28, .5); backdrop-filter: blur(2px); }
.search-modal .subscribe__close { top: .8rem; }
.search-modal .search-form { margin: .4rem 0 .6rem; max-width: none; }
.search-modal__hint { margin: 0; }

/* Results */
.search-head .search-form { margin-top: 1.6rem; }
.search-terms { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 2rem; }
.search-term { display: grid; gap: .15rem; padding: .8rem 1.1rem; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; background: var(--card); text-decoration: none; color: var(--ink); }
.search-term:hover { border-color: var(--gold); color: var(--ink); }
.search-term .kicker { margin: 0; }
.search-term__name { font: 500 1.1rem var(--f-display); }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-result + .search-result { border-top: 1px solid var(--line); }
.search-result__link { display: flex; gap: 1.2rem; padding: 1.4rem 0; text-decoration: none; color: var(--ink); }
.search-result__img img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.search-result__body { display: grid; gap: .35rem; min-width: 0; }
.search-result__body .kicker { margin: 0; }
.search-result__title { font: 500 1.35rem/1.25 var(--f-display); }
.search-result__link:hover .search-result__title { color: var(--accent); }
.search-result__snippet { font: 400 1.02rem/1.6 var(--f-read); color: var(--ink-2); }
.search-results mark, .search-term mark { background: color-mix(in srgb, var(--zim-gold) 35%, transparent); color: inherit; padding: 0 .1em; border-radius: 3px; }
.search-empty { padding: 1rem 0 2rem; }
.search-empty__title { font: 500 1.4rem var(--f-display); margin: 0 0 .4rem; }
.search-empty__links { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 560px) { .search-result__img img { width: 64px; height: 64px; } .search-result__link { gap: .9rem; } }

.studio fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.notice--warn { border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold-bright) 14%, var(--card)); }
