/**
 * Quadrangle.
 *
 * ── What this theme refuses to do ─────────────────────────────────────────
 *
 * School websites converge on a small set of habits. Each is banned here by
 * name, with its replacement, because banning without replacing just produces a
 * plainer version of the same page:
 *
 *  1. BANNED  the stock-photo hero of smiling children on a lawn.
 *     INSTEAD The ground is the grounds: real dappled canopy light, computed.
 *
 *  2. BANNED  the four-tile row of "Academic / Pastoral / Sport / Arts".
 *     INSTEAD The curriculum is a content type, listed at the length it needs.
 *
 *  3. BANNED  the row of huge statistics — ratios, results, league positions.
 *     INSTEAD Numbers appear inside sentences, where they can be qualified.
 *
 *  4. BANNED  the full-bleed video header nobody can read text over.
 *     INSTEAD One quiet ground, and photographs at the size they earn.
 *
 *  5. BANNED  the crest rendered at 400px as the whole identity.
 *     INSTEAD The wordmark is type, and the school's name is legible first.
 *
 * ── The ground ───────────────────────────────────────────────────────────
 *
 * The background is a live GPU light-transport calculation
 * (assets/js/modules/canopy.js), not a colour and not an image. Everything
 * below assumes that: reading surfaces carry their own legibility, and the
 * fallback for the canopy not running is a flat paper ground declared here.
 * The safe state is the one that applies when no script has run.
 *
 * @package Quadrangle
 */

/* ───────────────────────────  1. Tokens  ─────────────────────────────── */

:root {
	--paper: #faf8f2;
	--paper-deep: #efeadd;
	--ink: #1a1c19;

	/*
	 * Three text tones, and the third one is measured rather than assumed.
	 *
	 * Body text sits directly on a moving ground, so every tone has to clear
	 * 4.5:1 against the darkest pixel the canopy is allowed to produce, not
	 * against flat paper. That darkest pixel is rgb(214,214,207): the canopy caps
	 * its own shadow at 17% toward the shade colour, which is light enough to
	 * leave real headroom. #555b53 clears it at 4.79:1 — a genuinely lighter
	 * grey, not a token that has quietly given up and matched its neighbour.
	 *
	 * Anything lighter does not clear the bar: #5c6259 measures 4.31 and #646a60
	 * measures 3.82, so this is the top of the range rather than a round number.
	 */
	--ink-soft: #3a4038;
	--ink-faint: #555b53;

	--accent: #2f5d3f;
	/* Link text is derived from the accent and darkened, so a buyer's own
	   colour choice stays legible on the ground instead of quietly failing. */
	--link: #234a31;
	--link: color-mix(in srgb, var(--accent) 78%, var(--ink));

	/* The canopy's own two colours, read by the shader from here. */
	--canopy-shade: #2c3a2a;
	--canopy-sun: #fff4d6;

	--sheet: rgba(250, 248, 242, 0.90);
	--sheet-strong: rgba(250, 248, 242, 0.97);
	--rule: rgba(26, 28, 25, 0.14);

	--serif: 'Quadrangle Serif', ui-serif, Georgia, 'Times New Roman', serif;
	--sans: 'Quadrangle Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--pad: clamp(1.1rem, 4.5vw, 4.5rem);
	--measure: 34rem;
	--maxw: 100rem;

	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─────────────────────────  2. Base + type  ──────────────────────────── */

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: clamp(1rem, 0.95rem + 0.22vw, 1.08rem);
	font-weight: 400;
	line-height: 1.62;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

.has-canopy body { background: transparent; }

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

/* The voice is the serif; the working text is the sans. */
h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: -0.014em;
	margin: 0;
	text-wrap: balance;
}

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

::selection { background: var(--accent); color: var(--paper); }

:where(a, button, [tabindex]):focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap;
}
.sr-only:focus {
	position: fixed !important;
	top: 12px; left: 12px;
	width: auto; height: auto;
	clip: auto; clip-path: none;
	padding: 12px 18px;
	background: var(--paper);
	z-index: 200;
}

/* ─────────────────────────  3. The ground  ───────────────────────────── */

.ground {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	contain: strict;
}

.ground__canvas {
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 1.8s var(--ease);
}
.ground__canvas.is-ready { opacity: 1; }

/*
 * Legibility wash.
 *
 * The canopy has no idea where the words are. This lays paper back under the
 * masthead and along the reading column, so the light stays at full strength in
 * the open right-hand field and only tints the ground beneath the type. It is a
 * gradient of the paper colour rather than a translucent white, so it holds up
 * whatever the Customizer does to the palette.
 */
.ground::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient( to bottom, var(--paper) 0, rgb( from var(--paper) r g b / 0) 16vh ),
		linear-gradient( 96deg, var(--paper) 3%, rgb( from var(--paper) r g b / 0.68) 32%, rgb( from var(--paper) r g b / 0) 60% );
}

/* Older engines without relative colour syntax get the plain wash rather than
   an unparsed rule and no wash at all. */
@supports not ( background: linear-gradient( to bottom, rgb( from red r g b / 0 ), red ) ) {
	.ground::after {
		background: linear-gradient( 96deg, var(--paper) 3%, transparent 56% );
	}
}

/* Content sits above the ground. A fixed painted canvas otherwise draws over
   ordinary static flow content whatever the document order says. */
.site-main,
.masthead,
.site-footer { position: relative; z-index: 1; }
.masthead { z-index: 60; }
.drawer { z-index: 70; }

/* ─────────────────────  4. Reading surfaces  ─────────────────────────── */

.sheet {
	background: var(--sheet);
	backdrop-filter: blur(4px) saturate(104%);
	-webkit-backdrop-filter: blur(4px) saturate(104%);
	padding: clamp(1.4rem, 3.5vw, 3rem);
}
.sheet--strong { background: var(--sheet-strong); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ─────────────────────────  5. Masthead  ─────────────────────────────── */

.masthead {
	position: fixed;
	inset: 0 0 auto;
	padding: clamp(0.8rem, 1.6vw, 1.2rem) var(--pad);
	transition: transform 0.5s var(--out), background-color 0.4s var(--ease);
}
.masthead.is-settled {
	background: var(--sheet-strong);
	box-shadow: 0 1px 0 var(--rule);
}
.masthead.is-gone { transform: translateY(-104%); }

.masthead__inner {
	max-width: var(--maxw);
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}
.masthead__end { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }

.crest { display: grid; text-decoration: none; line-height: 1.1; }
.crest__name {
	font-family: var(--serif);
	font-size: clamp(1.15rem, 1.7vw, 1.5rem);
	font-weight: 600;
	letter-spacing: -0.012em;
}
.crest__since { font-size: 0.78rem; color: var(--ink-faint); }

.nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: clamp(0.9rem, 1.8vw, 1.8rem);
	font-size: 0.95rem;
}
.nav-list a { text-decoration: none; }
.nav-list a:hover { color: var(--link); }

@media ( max-width: 60rem ) {
	.masthead nav { display: none; }
	.masthead__cta { display: none; }
}

.drawer-toggle {
	display: none;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 0.4rem;
	width: 2.4rem;
}
.drawer-toggle i { display: block; height: 1.5px; background: var(--ink); margin: 5px 0; }
@media ( max-width: 60rem ) { .drawer-toggle { display: block; } }

.drawer {
	position: fixed;
	inset: 0;
	background: var(--sheet-strong);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	display: grid;
	place-content: center;
	gap: 1rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.9rem;
	text-align: center;
	font-family: var(--serif);
	font-size: clamp(1.6rem, 5vw, 2.6rem);
}
.drawer-list a { text-decoration: none; }

/* ─────────────────────────  6. Buttons  ──────────────────────────────── */

.btn {
	display: inline-block;
	padding: 0.68em 1.5em;
	border: 1px solid var(--ink);
	text-decoration: none;
	font-size: 0.95rem;
	transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--fill { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn--fill:hover { background: var(--ink); border-color: var(--ink); }

/* ─────────────────────────  7. Reveals  ──────────────────────────────── */

/*
 * Hidden only once the script has said it is safe to hide things: the
 * reveals-ready class is added by the module itself, so a failed or blocked
 * bundle leaves a fully readable page rather than an empty one.
 */
.reveals-ready [data-reveal] {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.8s var(--out), transform 0.8s var(--out);
}
.reveals-ready [data-reveal].is-in { opacity: 1; transform: none; }

.reveals-ready [data-reveal-words] .w { display: inline-block; overflow: hidden; }
.reveals-ready [data-reveal-words] .w i {
	display: inline-block;
	font-style: inherit;
	transform: translateY(105%);
	transition: transform 0.9s var(--out);
	transition-delay: calc( var(--i) * 45ms );
}
.reveals-ready [data-reveal-words].is-in .w i { transform: none; }

@media ( prefers-reduced-motion: reduce ) {
	.reveals-ready [data-reveal],
	.reveals-ready [data-reveal-words] .w i {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* ─────────────────────────  8. Opening  ──────────────────────────────── */

.opening {
	min-height: 100svh;
	display: grid;
	align-items: end;
	padding: 0 var(--pad) clamp(4rem, 12vh, 7rem);
}
.opening__inner { max-width: var(--maxw); margin-inline: auto; width: 100%; }
.opening__line {
	font-size: clamp(2.2rem, 5.6vw, 5.4rem);
	font-weight: 450;
	letter-spacing: -0.018em;
	margin-bottom: 0.5em;
	max-width: 20ch;
}
.opening__sub {
	max-width: var(--measure);
	font-size: clamp(1rem, 1.25vw, 1.18rem);
	color: var(--ink-soft);
}

/* ─────────────────────────  9. Footer  ───────────────────────────────── */

.site-footer {
	margin-top: clamp(4rem, 10vh, 7rem);
	border-top: 1px solid var(--rule);
	background: var(--sheet);
	padding-block: clamp(3rem, 8vh, 5rem) clamp(2rem, 5vh, 3rem);
}
.site-footer__inner { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.footer__grid {
	display: grid;
	gap: clamp(2rem, 5vw, 4rem);
	grid-template-columns: 1fr;
}
@media ( min-width: 52rem ) {
	.footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer__line {
	font-family: var(--serif);
	font-size: clamp(1.3rem, 2.4vw, 2rem);
	line-height: 1.14;
	max-width: 18ch;
	margin-bottom: 1.2rem;
}
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-list a { text-decoration: none; color: var(--ink-soft); }
.footer-list a:hover { color: var(--ink); }
.footer__address, .footer__tel, .footer__mail { color: var(--ink-soft); margin-bottom: 0.4rem; }
.footer__tel a, .footer__mail a { text-decoration: none; }
.footer__base {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	margin-top: clamp(2.5rem, 6vh, 4rem);
	padding-top: 1.4rem;
	border-top: 1px solid var(--rule);
	font-size: 0.85rem;
	color: var(--ink-soft);
}

/* ─────────────────────────  10. Utilities  ───────────────────────────── */

.img-absent {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	background-color: var(--paper-deep);
	background-image:
		repeating-linear-gradient( 118deg, rgb( from var(--ink) r g b / 0.045 ) 0 1px, transparent 1px 9px ),
		radial-gradient( 130% 90% at 28% 12%, rgb( from var(--paper) r g b / 0.85 ), transparent 62% );
}

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* ──────────────────  11. Shared section measures  ────────────────────── */

/*
 * One grid for the whole page. Sections differ by where they start and how far
 * they run across it, which keeps the composition varied without any section
 * needing a layout of its own. Half the vertical air each, because two of these
 * are always adjacent — at a full measure each the gap between sections reads
 * as a missing section rather than as breathing room.
 */
.stance,
.curriculum,
.commonroom,
.diary,
.ask {
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: var(--pad);
	padding-block: clamp(3rem, 7vh, 5.5rem);
}
.stance { padding-top: clamp(5rem, 12vh, 8rem); }
.ask { padding-bottom: clamp(5rem, 12vh, 8rem); }

@media ( min-width: 62rem ) {
	.stance,
	.curriculum,
	.commonroom,
	.diary {
		display: grid;
		grid-template-columns: repeat(12, 1fr);
		column-gap: clamp(1rem, 2vw, 2.2rem);
	}
}

/* ──────────────────────  12. The next visit  ─────────────────────────── */

/*
 * A prospective parent's actual errand, on the first screen. It reads the
 * calendar rather than repeating it, so it cannot go stale independently.
 */
.nextup {
	display: inline-grid;
	gap: 0.15rem;
	margin-top: clamp(2rem, 5vh, 3.2rem);
	padding: 1rem 1.4rem;
	text-decoration: none;
	background: var(--sheet-strong);
	border-left: 3px solid var(--accent);
	transition: transform 0.4s var(--out);
}
.nextup:hover { transform: translateX(4px); }
.nextup__label { font-size: 0.82rem; color: var(--ink-faint); }
.nextup__name { font-family: var(--serif); font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 550; }
.nextup__when { font-size: 0.92rem; color: var(--ink-soft); }

/* ─────────────────────────  13. Stance  ──────────────────────────────── */

.stance__line {
	font-family: var(--serif);
	font-size: clamp(1.5rem, 3.1vw, 2.7rem);
	font-weight: 420;
	line-height: 1.18;
	letter-spacing: -0.012em;
	margin: 0 0 clamp(1.6rem, 4vh, 2.6rem);
}
.stance__note { color: var(--ink-soft); max-width: var(--measure); }

@media ( min-width: 62rem ) {
	.stance__line { grid-column: 2 / 11; }
	.stance__note { grid-column: 2 / 7; }
}

/* ─────────────────────────  14. Curriculum  ──────────────────────────── */

.curriculum__head,
.commonroom__head,
.diary__head {
	font-size: clamp(1.35rem, 2.3vw, 2rem);
	font-weight: 480;
	max-width: 18ch;
	margin-bottom: clamp(2rem, 5vh, 3rem);
}

.curriculum__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0;
}
.subject + .subject,
.curriculum__list .subject { border-top: 1px solid var(--rule); }
.curriculum__list .subject:first-child { border-top: 0; }

.subject__link {
	display: grid;
	gap: 0.35rem;
	padding-block: clamp(1.3rem, 3vh, 2rem);
	text-decoration: none;
	color: inherit;
	transition: padding-inline-start 0.5s var(--out);
}
.subject__link:hover,
.subject__link:focus-visible { padding-inline-start: 1rem; }

.subject__name { font-size: clamp(1.2rem, 2.2vw, 1.9rem); font-weight: 480; }
.subject__years { font-size: 0.88rem; color: var(--ink-faint); }
.subject__note { margin: 0.2rem 0 0; color: var(--ink-soft); max-width: 52ch; }

@media ( min-width: 62rem ) {
	.curriculum__head { grid-column: 1 / 5; }
	.curriculum__list { grid-column: 5 / 13; }
	.subject__link { grid-template-columns: 1fr 1.15fr; gap: 2rem; align-items: baseline; }
	.subject__years { grid-row: 2; grid-column: 1; }
	.subject__note { grid-row: 1 / 3; grid-column: 2; }
	.curriculum .more { grid-column: 5 / 10; }
}

.more {
	display: inline-block;
	margin-top: clamp(2rem, 5vh, 3rem);
	text-decoration: none;
	font-size: clamp(1rem, 1.4vw, 1.2rem);
	border-bottom: 1px solid var(--rule);
	padding-bottom: 0.15em;
	transition: border-color 0.4s var(--ease);
}
.more:hover { border-color: var(--accent); }

/* ─────────────────────────  15. Common room  ─────────────────────────── */

.commonroom__note { color: var(--ink-soft); max-width: var(--measure); }
.commonroom__list {
	list-style: none;
	margin: clamp(2.5rem, 6vh, 4rem) 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
	gap: clamp(1.4rem, 3vw, 2.4rem);
}
.face__link { display: grid; gap: 0.35rem; text-decoration: none; color: inherit; }
.face__frame {
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: var(--paper-deep);
}
.face__frame img {
	width: 100%; height: 100%; object-fit: cover;
	transition: transform 0.9s var(--out);
}
.face__link:hover .face__frame img { transform: scale(1.03); }
.face__name { font-family: var(--serif); font-weight: 550; }
.face__role { font-size: 0.88rem; color: var(--ink-soft); }

@media ( min-width: 62rem ) {
	.commonroom__said { grid-column: 1 / 6; }
	.commonroom__list { grid-column: 1 / 13; }
}

/* ─────────────────────────  16. Diary  ───────────────────────────────── */

.diary__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.entry { border-top: 1px solid var(--rule); }
.entry:first-child { border-top: 0; }
.entry__link {
	display: grid;
	gap: 0.25rem;
	padding-block: clamp(1.1rem, 2.6vh, 1.7rem);
	text-decoration: none;
	color: inherit;
}
.entry__when { font-size: 0.9rem; color: var(--ink-soft); }
.entry__name { font-family: var(--serif); font-size: clamp(1.1rem, 1.7vw, 1.4rem); font-weight: 500; }
.entry__where { font-size: 0.9rem; color: var(--ink-faint); }
.entry__link:hover .entry__name { color: var(--link); }

@media ( min-width: 62rem ) {
	.diary__head { grid-column: 1 / 5; }
	.diary__list { grid-column: 5 / 13; }
	.entry__link { grid-template-columns: 12rem 1fr auto; align-items: baseline; gap: 1.5rem; }
	.diary .more { grid-column: 5 / 10; }
}

/* ─────────────────────────  17. Ask  ─────────────────────────────────── */

.ask__line {
	font-size: clamp(2rem, 5vw, 4.2rem);
	font-weight: 450;
	letter-spacing: -0.018em;
	max-width: 16ch;
	margin-bottom: clamp(1.2rem, 3vh, 2rem);
}
.ask__note { color: var(--ink-soft); max-width: var(--measure); margin-bottom: 1.8rem; }

/* ─────────────  18. Listings, prose and singles  ─────────────────────── */

.listing-top, .single, .talk, .bulletin {
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: var(--pad);
}
.listing-top { padding-block: clamp(6rem, 15vh, 10rem) clamp(2rem, 5vh, 3.4rem); }
.listing-title {
	font-size: clamp(2rem, 5vw, 4.4rem);
	letter-spacing: -0.018em;
	max-width: 18ch;
}
.listing-intro {
	margin-top: clamp(1rem, 2.5vh, 1.8rem);
	max-width: var(--measure);
	color: var(--ink-soft);
}
.listing-empty { color: var(--ink-soft); padding-block: 4rem; }

.curriculum--archive, .commonroom--archive, .diary--archive, .bulletin {
	padding-block: 0 clamp(5rem, 12vh, 8rem);
}
.curriculum__list--wide, .commonroom__list--wide, .diary__list--wide { grid-column: 1 / -1; }
.commonroom__list--wide { margin-top: 0; }

.bulletin__list { display: grid; gap: clamp(2.2rem, 5vh, 3.2rem); }
@media ( min-width: 52rem ) {
	.bulletin__list { grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: clamp(2.4rem, 5vh, 3.4rem) clamp(1.4rem, 2.5vw, 2.6rem); }
}
.note__link { display: grid; gap: 0.4rem; text-decoration: none; color: inherit; }
.note__frame { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-deep); margin-bottom: 0.3rem; }
.note__frame img { width: 100%; height: 100%; object-fit: cover; }
.note__name { font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 500; }
.note__link:hover .note__name { color: var(--link); }
.note__sub { margin: 0; color: var(--ink-soft); }
.note__when { font-size: 0.88rem; color: var(--ink-faint); }

/* A past event stays listed rather than vanishing, but stops competing. */
.entry--past .entry__name { color: var(--ink-soft); }
.entry__gone {
	font-style: normal;
	margin-inline-start: 0.5rem;
	padding: 0.1em 0.5em;
	border: 1px solid var(--rule);
	font-size: 0.78rem;
}

.prose { max-width: var(--measure); }
.prose > * { margin: 0; }
/* Declared after the reset and at equal specificity, so the flow rule wins on
   order. Putting the reset on `.prose p` instead would give it a type selector
   and silently outrank this. */
.prose > * + * { margin-top: 1.05em; }
.prose p { font-size: clamp(1rem, 1.1vw, 1.08rem); line-height: 1.68; }
.prose h2 { font-size: clamp(1.3rem, 2.1vw, 1.8rem); margin-top: 1.9em; font-weight: 520; }
.prose h3 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); margin-top: 1.5em; font-weight: 540; }
.prose a { color: var(--link); text-underline-offset: 0.18em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose blockquote {
	margin: 1.8em 0;
	padding-inline-start: 1.1em;
	border-inline-start: 2px solid var(--accent);
	font-family: var(--serif);
	font-size: 1.1em;
	color: var(--ink-soft);
}

.single__top { padding-block: clamp(6rem, 15vh, 10rem) clamp(1.6rem, 4vh, 2.8rem); }
.single__title { font-size: clamp(2rem, 4.8vw, 4rem); letter-spacing: -0.018em; max-width: 18ch; }
.single__role, .single__when { margin-top: 0.9rem; color: var(--ink-soft); }
.single__when { margin-top: 0; margin-bottom: 0.8rem; }
.single__hero { margin: 0 0 clamp(2rem, 6vh, 3.6rem); max-width: var(--maxw); }
.single .single__hero { max-width: 44rem; }
.single .sheet { max-width: calc(var(--measure) + 8rem); }

.single__facts {
	margin: 1.6rem 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1.6rem 2.4rem;
}
.single__facts dt { color: var(--ink-faint); font-size: 0.85rem; }
.single__facts dd { margin: 0.15rem 0 0; font-family: var(--serif); font-size: 1.05rem; }

.single__book { margin-top: 1.8rem; }
.single__book--past { color: var(--ink-soft); }

.single__near {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1.4rem;
	padding-block: clamp(2.5rem, 6vh, 4rem) clamp(4rem, 10vh, 7rem);
	border-top: 1px solid var(--rule);
	margin-top: clamp(2.5rem, 6vh, 4rem);
}
.single__near a { text-decoration: none; color: var(--ink-soft); }
.single__near a:hover { color: var(--ink); }

/* ────────────  19. Search, pager and discussion  ─────────────────────── */

.searchform { display: flex; gap: 0.6rem; max-width: 26rem; }
.searchform__field {
	flex: 1; font: inherit; color: inherit;
	padding: 0.65rem 0.9rem;
	background: var(--sheet-strong);
	border: 1px solid var(--rule);
}
.searchform__go {
	font: inherit; cursor: pointer;
	padding: 0.65rem 1.2rem;
	background: var(--ink); color: var(--paper);
	border: 1px solid var(--ink);
}

.pager { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: clamp(2.5rem, 6vh, 4rem); }
.pager .page-numbers {
	display: inline-grid; place-items: center;
	min-width: 2.6rem; padding: 0.5rem 0.7rem;
	text-decoration: none; border: 1px solid var(--rule); color: var(--ink-soft);
}
.pager .page-numbers:hover { color: var(--ink); border-color: var(--ink); }
.pager .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.talk { padding-block: clamp(2.5rem, 6vh, 4rem) clamp(5rem, 12vh, 8rem); }
.talk__head { font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 520; margin-bottom: 1.4rem; }
.talk__list { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; gap: 1.4rem; }
.talk__list .children { list-style: none; margin: 1rem 0 0 1.3rem; padding: 0; display: grid; gap: 1rem; }
.talk__list .comment-body { background: var(--sheet); padding: 1.1rem 1.3rem; }
.talk__list .comment-meta { font-size: 0.86rem; color: var(--ink-soft); margin-bottom: 0.4rem; }
.talk .comment-form { display: grid; gap: 0.9rem; max-width: 40rem; }
.talk .comment-form input:not([type="submit"]):not([type="checkbox"]),
.talk .comment-form textarea {
	font: inherit; color: inherit; width: 100%;
	padding: 0.65rem 0.9rem;
	background: var(--sheet-strong); border: 1px solid var(--rule);
}
.talk .comment-form label { display: block; margin-bottom: 0.25rem; color: var(--ink-soft); font-size: 0.9rem; }
.talk .comment-form .submit {
	font: inherit; cursor: pointer; justify-self: start;
	padding: 0.7rem 1.5rem;
	background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
}

/* ─────────────────────  20. The staff monogram  ──────────────────────── */

/*
 * What a staff square looks like before the school has uploaded its own
 * photographs. Designed rather than apologised for: paper, a hairline, and the
 * initials in the theme's serif at a size that reads at 9rem and still reads at
 * 5rem on a phone.
 */
.face__mono {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--paper-deep);
	box-shadow: inset 0 0 0 1px var(--rule);
}
.face__mono i {
	font-family: var(--serif);
	font-style: normal;
	font-weight: 420;
	font-size: clamp(1.6rem, 4.2vw, 2.4rem);
	letter-spacing: 0.06em;
	/* Optical centring: the letterspacing above adds a trailing gap that makes
	   a two-letter monogram sit visibly left of centre without this. */
	text-indent: 0.06em;
	color: var(--ink-faint);
}
.face__link:hover .face__mono { box-shadow: inset 0 0 0 1px var(--accent); }
