/* =========================================================
 *
 *  alt — base styles
 *
 *  Mobile-first throughout: unprefixed rules target a phone, and the
 *  three breakpoints below (36em / 56em / 75em — roughly 576 / 900 /
 *  1200px) progressively widen the header into a horizontal nav, stack
 *  single-column card lists into grids, and cap the shell's width.
 *
 * ========================================================= */

/* ---------- reset ---------- */

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

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: var(--text-base);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	/* A defensive backstop, not a fix in itself: a flex/grid child that
	   cannot shrink below its content's intrinsic width (an un-wrapped
	   label, a nowrap tag) can otherwise widen the whole page on a
	   narrow phone rather than wrap. Real instances still get min-width
	   fixes where they occur; this just guarantees nothing can force a
	   sideways scrollbar on the document itself. */
	overflow-x: hidden;
}

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

h1, h2, h3, h4 { line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; }

/* ---------- focus ---------- */

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
	border-radius: .2em;
}

/* ---------- layout ---------- */

.shell {
	max-width: var(--shell);
	margin-inline: auto;
	padding-inline: var(--space-4);
}

@media (min-width: 36em) { .shell { padding-inline: var(--space-6); } }
@media (min-width: 75em) { .shell { padding-inline: var(--space-7); } }

.skip {
	position: absolute;
	left: var(--space-4);
	top: -3rem;
	background: var(--accent);
	color: var(--accent-ink);
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-sm);
	z-index: 100;
	transition: top .15s;
}

.skip:focus { top: var(--space-4); }

.dot { margin-inline: .5em; color: var(--ink-faint); }

/* ---------- header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: color-mix(in srgb, var(--card) 92%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--rule);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	padding-block: var(--space-3);
}

.wordmark {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
	text-decoration: none;
	margin-right: auto;
}

.wordmark__lead {
	font-weight: 800;
	font-size: 1.05rem;
	color: var(--ink);
}

.wordmark__rest {
	font-size: .78rem;
	font-weight: 600;
	color: var(--accent);
	letter-spacing: .02em;
}

.nav-toggle {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-sm);
	background: var(--card);
	color: var(--ink);
	cursor: pointer;
}

.nav-toggle__icon { position: relative; width: 18px; height: 13px; }
.nav-toggle__icon span {
	position: absolute;
	left: 0; right: 0;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
	transition: transform .2s, opacity .2s;
}
.nav-toggle__icon span:nth-child(1) { top: 0; }
.nav-toggle__icon span:nth-child(2) { top: 50%; margin-top: -1px; }
.nav-toggle__icon span:nth-child(3) { bottom: 0; }

.site-header.is-open .nav-toggle__icon span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.site-header.is-open .nav-toggle__icon span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle__icon span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.site-nav {
	display: none;
	position: absolute;
	inset-inline: 0;
	top: 100%;
	background: var(--card);
	border-bottom: 1px solid var(--rule);
	box-shadow: var(--shadow-md);
}

.site-header.is-open .site-nav { display: block; }

.site-nav ul { display: flex; flex-direction: column; padding: var(--space-3) var(--space-4); }

.site-nav a {
	display: block;
	padding: var(--space-3) var(--space-2);
	text-decoration: none;
	font-weight: 600;
	color: var(--ink-soft);
	border-radius: var(--radius-sm);
}

.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); background: var(--accent-soft); }

.theme-toggle {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-full);
	background: var(--card);
	color: var(--ink-soft);
	cursor: pointer;
	flex-shrink: 0;
}

.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle__moon { display: none; }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle__sun { display: none; }
	:root:not([data-theme="light"]) .theme-toggle__moon { display: block; }
}

:root[data-theme="dark"] .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }

@media (min-width: 56em) {
	.nav-toggle { display: none; }

	.site-nav {
		display: block;
		position: static;
		background: none;
		border: 0;
		box-shadow: none;
	}

	.site-nav ul { flex-direction: row; padding: 0; gap: var(--space-2); }
}

/* ---------- footer ---------- */

.site-footer {
	border-top: 1px solid var(--rule);
	background: var(--paper-sunk);
	margin-top: var(--space-8);
}

.site-footer__inner { padding-block: var(--space-7); }

.site-footer__grid {
	display: grid;
	gap: var(--space-6);
	margin-bottom: var(--space-6);
}

@media (min-width: 36em) {
	.site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
}

.site-footer__brand .wordmark__lead { font-size: 1.1rem; }
.site-footer__note {
	color: var(--ink-soft);
	margin-top: var(--space-3);
	max-width: 32rem;
}

.site-footer__note a { color: var(--accent); }

.site-footer__heading {
	font-size: var(--text-xs);
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--ink-faint);
	margin-bottom: var(--space-3);
}

.site-footer__links li { margin-bottom: var(--space-2); }
.site-footer__links a { color: var(--ink-soft); text-decoration: none; }
.site-footer__links a:hover { color: var(--accent); text-decoration: underline; }

.site-footer__meta {
	color: var(--ink-faint);
	font-size: var(--text-sm);
	border-top: 1px solid var(--rule);
	padding-top: var(--space-5);
}

/* ---------- buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: .7em 1.3em;
	border-radius: var(--radius-full);
	font-weight: 600;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .12s, box-shadow .12s, background-color .12s, border-color .12s;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn--primary:hover { box-shadow: var(--shadow-md); }

.btn--ghost { background: var(--card); color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- badges ---------- */

.badge {
	display: inline-flex;
	align-items: center;
	font-size: var(--text-xs);
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	padding: .3em .7em;
	border-radius: var(--radius-full);
	background: var(--accent-soft);
	color: var(--accent-soft-ink);
	white-space: nowrap;
}

/* ---------- breadcrumb ---------- */

.breadcrumb { margin-bottom: var(--space-4); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .4em; }
.breadcrumb li { display: flex; align-items: center; gap: .4em; font-size: var(--text-sm); color: var(--ink-faint); }
.breadcrumb li:not(:last-child)::after { content: "/"; color: var(--rule-strong); margin-left: .4em; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- notice ---------- */

.notice {
	display: flex;
	gap: var(--space-3);
	background: var(--accent-soft);
	color: var(--accent-soft-ink);
	border-radius: var(--radius-md);
	padding: var(--space-4) var(--space-5);
	margin-block: var(--space-6);
}

.notice__icon { flex-shrink: 0; width: 1.3em; height: 1.3em; margin-top: .15em; }
.notice__text { margin: 0; font-size: var(--text-sm); line-height: 1.6; }

/* ---------- page head ---------- */

.page-head { padding-block: var(--space-7) var(--space-6); }
.page-head h1 { font-size: var(--text-3xl); }
.page-head .lede { font-size: var(--text-lg); color: var(--ink-soft); max-width: 42rem; margin-top: var(--space-3); }
.page-head__meta { color: var(--ink-faint); margin-top: var(--space-4); font-size: var(--text-sm); }

/* ---------- hero (home) ---------- */

.hero {
	position: relative;
	padding-block: var(--space-8) var(--space-7);
	text-align: center;
	color: #fdfcfa;
	overflow: hidden;
}

.hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }

/* a scrim rather than a flat tint, so the photo still reads at the
   bottom of the banner where there is no text over it */
.hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 16, 26, .72) 0%, rgba(10, 16, 26, .8) 55%, rgba(10, 16, 26, .88) 100%);
}

.hero__inner { position: relative; z-index: 1; }

.hero__eyebrow {
	display: inline-block;
	font-size: var(--text-xs);
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #cfe0fb;
	margin-bottom: var(--space-4);
}

.hero h1 {
	font-size: var(--text-4xl);
	max-width: 22ch;
	margin-inline: auto;
	color: #fff;
}

.hero .lede {
	font-size: var(--text-lg);
	color: rgba(253, 252, 250, .88);
	max-width: 42rem;
	margin: var(--space-4) auto 0;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-3);
	margin-top: var(--space-6);
}

.hero .btn--ghost {
	background: rgba(255, 255, 255, .1);
	color: #fff;
	border-color: rgba(255, 255, 255, .5);
}

.hero .btn--ghost:hover { background: rgba(255, 255, 255, .18); border-color: #fff; color: #fff; }

.hero__stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-6);
	margin-top: var(--space-7);
	color: rgba(253, 252, 250, .75);
	font-size: var(--text-sm);
}

.hero__stats strong { display: block; font-size: var(--text-2xl); color: #fff; font-weight: 800; }

/* ---------- section heading ---------- */

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-2) var(--space-4);
	margin-bottom: var(--space-5);
}

.section-head h2 { font-size: var(--text-2xl); min-width: 0; }
.section-head a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: var(--text-sm); }
.section-head a:hover { text-decoration: underline; }

section + section { margin-top: var(--space-8); }

/* Clears the hero banner below it: the hero's own bottom padding isn't
   enough breathing room once the card sits right underneath. */
.home-recordings { margin-top: var(--space-7); }

/* ---------- card grids ---------- */

.card-grid {
	display: grid;
	gap: var(--space-5);
	grid-template-columns: 1fr;
}

@media (min-width: 36em) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56em) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	transition: transform .15s, box-shadow .15s, border-color .15s;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--rule-strong); }

.card__accent { height: .35rem; background: var(--accent); }
.card__body { padding: var(--space-5); flex: 1; display: flex; flex-direction: column; }
.card__eyebrow { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: var(--space-2); }
.card__title { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.card__desc { color: var(--ink-soft); font-size: var(--text-sm); flex: 1; }
.card__meta { color: var(--ink-faint); font-size: var(--text-xs); margin-top: var(--space-4); display: flex; align-items: center; flex-wrap: wrap; }

/* a plain, wide card for a track or recording */
.card--row { flex-direction: row; align-items: stretch; }
.card--row .card__accent { width: .35rem; height: auto; flex-shrink: 0; }
.card--row .card__body { flex-direction: row; align-items: center; gap: var(--space-4); min-width: 0; }
.card--row .card__title { margin-bottom: 0; }
.card--row .card__text { flex: 1; min-width: 0; }

/* ---------- chapter/book list rows ---------- */

.entry-list { display: grid; gap: var(--space-3); }

.entry {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--radius-md);
	padding: var(--space-4) var(--space-5);
	text-decoration: none;
	color: inherit;
	transition: border-color .15s, box-shadow .15s;
}

.entry:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.entry__num { color: var(--ink-faint); font-variant-numeric: tabular-nums; font-size: var(--text-sm); width: 2ch; flex-shrink: 0; }
.entry__name { font-weight: 600; flex: 1; min-width: 0; }
.entry__meta { color: var(--ink-faint); font-size: var(--text-sm); white-space: nowrap; flex-shrink: 0; }

/* ---------- prose (long-form reading) ----------
 *
 * Styles the exact markup inc/render.php emits for both a chapter and
 * a transcript (both reused unchanged): bare <p>, <blockquote><p>,
 * <h2 id> with a leading <a class="anchor">, <ul class="list">. Always
 * loaded, not chapter-only, because the reused root css/player.css
 * pairs its own .transcript rules with whatever the active style's
 * .prose already provides — see that file's comment above .transcript.
 * Footnote markup (.notes/.note-ref) is intentionally not styled here:
 * it comes free, correctly themed, from the reused root css/notes.css.
 */

.prose {
	max-width: var(--measure);
	font-size: 1.125rem;
	line-height: 1.75;
}

.prose h2 {
	font-size: var(--text-xl);
	margin-top: var(--space-7);
	margin-bottom: var(--space-4);
	scroll-margin-top: calc(3px + var(--space-5));
	position: relative;
}

.prose h2:first-child { margin-top: 0; }

.prose .anchor {
	position: absolute;
	left: -1.1em;
	color: var(--accent);
	text-decoration: none;
	opacity: 0;
	transition: opacity .12s;
}

.prose h2:hover .anchor, .prose .anchor:focus { opacity: 1; }

.prose p, .prose ul.list { margin-bottom: 1.3em; }

.prose blockquote {
	margin: var(--space-5) 0;
	padding: var(--space-4) var(--space-5);
	background: var(--card);
	border-inline-start: 3px solid var(--accent);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	color: var(--ink-soft);
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose ul.list { padding-inline-start: 1.3em; }
.prose ul.list li { list-style: disc; margin-bottom: .5em; }

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

/* ---------- utility ---------- */

.note { color: var(--ink-faint); }
.visually-hidden {
	position: absolute; width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
