/* Don Bosco School Oodlabari. Tokens, layout, components. No framework, no build step. */

:root {
  --paper: #fdfcfa;
  --paper-warm: #f7f3ec;
  --band: #edf2f5;
  --band-2: #e4ebef;
  --ink: #1c2b39;
  --ink-soft: #3c4c5b;
  --ink-mute: #5d6d7c;
  --line: #d9dee3;
  --line-strong: #b9c2ca;
  --red: #b3202e;
  --red-dark: #931a26;
  --blue: #1d6fa5;
  --blue-dark: #16567f;
  --gold: #c9a227;
  --gold-soft: #e8d9a8;
  --footer-bg: #16232f;
  --footer-ink: #e8edf1;
  --footer-mute: #a7b4bf;
  --scrim-top: rgba(18, 30, 42, 0.48);
  --scrim-bottom: rgba(18, 30, 42, 0.85);
  --overlay: rgba(18, 30, 42, 0.92);
  --shadow-1: 0 1px 2px rgba(18, 30, 42, 0.08), 0 4px 16px rgba(18, 30, 42, 0.07);
  --shadow-2: 0 2px 4px rgba(18, 30, 42, 0.1), 0 12px 32px rgba(18, 30, 42, 0.12);
  --font-display: "Bricolage Grotesque", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --radius-img: 16px;
  --radius-card: 20px;
  --radius-pill: 999px;
  --radius-btn: 10px; /* every button, site-wide — one radius decision (v7) */
  --container: 1180px;
  --header-h: 66px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  overflow-x: clip;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold-soft); color: var(--ink); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }
html { scrollbar-color: var(--line-strong) var(--paper); }

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

a { color: var(--blue); transition: color 0.15s var(--ease-out); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow-wrap: break-word;
  min-width: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; margin: 0 0 var(--space-4); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin: var(--space-8) 0 var(--space-4); }
h3 { font-size: 1.45rem; line-height: 1.2; margin: var(--space-6) 0 var(--space-3); }
h4 { font-size: 1.15rem; line-height: 1.25; margin: var(--space-5) 0 var(--space-2); }

h2:first-child, h3:first-child { margin-top: 0; }

.quote-block, .quote-inline, .anthem p, .date-value, .number-figure, .pillar-numeral, .topper-score, .topper-pos, .brand-name, .footer-brand-name { font-optical-sizing: auto; }

p { margin: 0 0 var(--space-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--space-4); padding-left: var(--space-5); }
li { margin-bottom: var(--space-2); }
li:last-child { margin-bottom: 0; }

figure { margin: 0; }
figcaption {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-mute);
  margin-top: var(--space-3);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.prose { max-width: 65ch; }
.lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink-soft); max-width: 62ch; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: var(--space-3); color: var(--paper); }

/* ---------- Announcement bar ---------- */

.announce {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  line-height: 1.45;
}
.announce .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  text-align: center;
}
.announce a { color: var(--gold-soft); font-weight: 600; white-space: nowrap; }
.announce a:hover { color: var(--paper); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease-out);
}
.site-header.scrolled { box-shadow: var(--shadow-1); }

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-crest {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-sub {
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--ink-mute);
  white-space: nowrap;
}

.main-nav { margin-left: auto; }
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: var(--space-2) 12px;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.main-nav a:hover { background: var(--band); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--band); color: var(--red); font-weight: 700; }

.header-cta { margin-left: var(--space-3); flex-shrink: 0; }

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.menu-toggle svg { width: 22px; height: 22px; }
.menu-toggle:hover { background: var(--band); border-color: var(--line-strong); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  box-shadow: 0 0 0 rgba(18, 30, 42, 0);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:focus-visible { outline-offset: 3px; }
.btn-primary { background: var(--red); color: var(--paper); }
.btn-primary:hover { background: var(--red-dark); color: var(--paper); box-shadow: 0 6px 18px rgba(179, 32, 46, 0.35); }
.btn-outline { background: transparent; border-color: var(--paper); color: var(--paper); }
.btn-outline:hover { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow-1); }
.btn-small { min-height: 42px; padding: var(--space-2) var(--space-3); font-size: 0.92rem; }
/* Link lines anywhere on the site are real one-line pill buttons, never
   inline text that wraps mid-phrase (v22). */
.home-links { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.home-links .btn { white-space: nowrap; }

/* ---------- Mobile menu ---------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-5) var(--space-7);
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
}
.mobile-menu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  margin-bottom: var(--space-5);
}
.mobile-menu nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu nav a {
  display: block;
  padding: var(--space-3) var(--space-2);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s var(--ease-out), padding-left 0.2s var(--ease-out);
}
.mobile-menu nav a:hover { color: var(--red); padding-left: var(--space-3); }
.mobile-menu nav a[aria-current="page"] { color: var(--red); }
.mobile-menu .btn { margin-top: var(--space-6); width: 100%; }
.menu-close {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.menu-close svg { width: 20px; height: 20px; }
.menu-close:hover { background: var(--band); border-color: var(--line-strong); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(78svh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: clip;
  background: var(--ink);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: hero-settle 2.6s var(--ease-out) forwards;
}
@keyframes hero-settle { to { transform: scale(1); } }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(18, 30, 42, 0.42) 0%, rgba(18, 30, 42, 0) 62%),
    linear-gradient(to top, var(--scrim-bottom) 0%, var(--scrim-top) 55%, rgba(18, 30, 42, 0.08) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: var(--space-9);
  padding-bottom: var(--space-8);
  color: var(--paper);
}
.hero-content h1 {
  color: var(--paper);
  max-width: 12ch;
  margin-bottom: var(--space-4);
}
.hero-content p {
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: 56ch;
  color: var(--paper);
  opacity: 0.94;
  margin-bottom: var(--space-6);
}
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-rise-soft {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 0.94; transform: translateY(0); }
}
.hero-content h1 { animation: hero-rise 0.9s var(--ease-out) 0.1s both; }
.hero-content p { animation: hero-rise-soft 0.9s var(--ease-out) 0.25s both; }
.hero-actions { animation: hero-rise 0.9s var(--ease-out) 0.4s both; }

/* ---------- Dates strip ---------- */

.dates-strip {
  background: var(--band);
  border-bottom: 1px solid var(--line);
}
.dates-strip .container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}
.date-item { min-width: 0; }
.date-label { font-size: 0.88rem; color: var(--ink-mute); margin-bottom: 2px; min-height: calc(2 * 1.45 * 0.88rem); }
.date-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.2;
  overflow-wrap: break-word;
}
.date-item + .date-item { border-left: 1px solid var(--line-strong); padding-left: var(--space-5); }

/* ---------- Sections ---------- */

.section { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.section-tight { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.section-band { background: var(--band); }
.section-warm { background: var(--paper-warm); }
.section-rule { border-top: 1px solid var(--line); }

.section-head { max-width: 65ch; margin-bottom: var(--space-7); }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--ink-soft); font-size: 1.12rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-7);
  align-items: start;
}
.split-wide { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split-narrow { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split > * > h2:first-of-type { margin-top: 0; }

.rounded-img {
  border-radius: var(--radius-img);
  width: 100%;
  object-fit: cover;
}

.gold-rule {
  width: 56px;
  height: 4px;
  background: var(--gold);
  border: 0;
  border-radius: 2px;
  margin: 0 0 var(--space-5);
}
/* The rule grows from the left once its section has revealed. */
.js .reveal .gold-rule { transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease-out) 0.15s; }
.js .reveal.in .gold-rule { transform: scaleX(1); }

/* ---------- Numbers ---------- */

.numbers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--space-5);
}
.number-item { min-width: 0; }
.number-figure {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.number-label { margin-top: var(--space-2); color: var(--ink-soft); font-size: 0.95rem; line-height: 1.45; min-height: calc(2 * 1.45em); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Pillars ---------- */

.pillars { border-top: 1px solid var(--line-strong); }
.pillar {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--space-5);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.pillar-numeral {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold);
}
.pillar h3 { margin-top: 0; font-size: 1.6rem; }
.pillar p { color: var(--ink-soft); max-width: 62ch; }
.pillar p:last-child { margin-bottom: 0; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--space-5);
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: clip;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.card-media { aspect-ratio: 16 / 10; overflow: clip; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.card-body h3 { margin: 0; font-size: 1.35rem; line-height: 1.3; min-height: calc(2 * 1.3em); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body p { color: var(--ink-soft); font-size: 0.98rem; min-height: calc(3 * 1.65em); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-link { margin-top: auto; padding-top: var(--space-3); font-weight: 600; }

/* ---------- Photo rows ---------- */

.photo-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.photo-row img { aspect-ratio: 4 / 3; border-radius: var(--radius-img); object-fit: cover; width: 100%; transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
.photo-row img:hover { transform: scale(1.02); box-shadow: var(--shadow-2); }
.photo-row .photo-wide { grid-column: span 2; aspect-ratio: 8 / 3; }

/* ---------- Toppers ---------- */

.toppers-figure { max-width: 880px; margin-inline: auto; }
.notice-figure { max-width: 400px; margin-inline: auto; }
.toppers-figure img { box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.toppers-list { margin-top: var(--space-6); display: grid; gap: var(--space-3); }
.topper-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) var(--space-5);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-soft);
}
.topper-pos {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--red);
}
.topper-name { font-weight: 600; font-size: 1.1rem; min-width: 0; line-height: 1.3; min-height: calc(2 * 1.3 * 1.1rem); display: flex; align-items: center; }
.topper-score {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Quote ---------- */

.quote-block {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.35;
  font-weight: 500;
  /* No font-style: italic — Bricolage ships no italic face and the
     declaration was dead code (v7). The slant is Jayant's call. */
  max-width: 30ch;
  text-wrap: balance;
}
.quote-attr { margin-top: var(--space-4); font-size: 0.95rem; color: var(--ink-soft); }
.quote-attr strong { color: var(--ink); }

.quote-inline {
  margin: var(--space-6) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  /* No font-style: italic — dead declaration, Bricolage has no italic (v7). */
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
}
.quote-inline::before {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--gold);
  margin-bottom: var(--space-4);
}
.quote-inline footer { margin-top: var(--space-3); font-family: var(--font-body); font-style: normal; font-size: 0.95rem; color: var(--ink-soft); }
.quote-inline footer strong { color: var(--ink); }
.quote-inline p { margin: 0; }

/* ---------- Lists: values, clubs, sports ---------- */

.tick-list { list-style: none; padding: 0; margin: 0; }
.tick-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.tick-list li:last-child { border-bottom: 0; }
.tick-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--red);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
}
.chip-list li {
  margin: 0;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--paper);
}

/* ---------- Uniform tiles (v22): equal cells for chip-like lists ----------
   A flex-wrap chip row can never be uniform — the last row always lands
   ragged (3 + 1). Tiles live in a real grid, so every cell is the same
   size at every width and every row fills the same way. Labels centre
   vertically, so one-line and two-line names still sit level. */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0;
}
.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 64px;
  padding: var(--space-2) var(--space-3);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-soft);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}
button.tile {
  font-family: var(--font-body);
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
button.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--ink-mute); background: var(--paper-warm); }
button.tile[aria-pressed="true"] { border-color: var(--red); background: var(--paper-warm); box-shadow: var(--shadow-1); }
/* The line under a tile grid: what tapping a tile does, and its answer. */
.tile-detail {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--band);
  border: 1px solid var(--line);
  border-radius: var(--radius-soft);
  color: var(--ink-soft);
  min-height: calc(2 * 1.65em + var(--space-3) * 2);
  display: flex;
  align-items: center;
}
.tile-detail strong { color: var(--ink); }

/* ---------- Steps (admissions process) ---------- */

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 var(--space-6) 64px;
  margin: 0;
  border-left: 2px solid var(--line);
  margin-left: 22px;
}
.steps li:last-child { padding-bottom: 0; border-left-color: transparent; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -24px;
  top: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { margin-top: 2px; }
.steps p { color: var(--ink-soft); max-width: 62ch; }

/* ---------- Stream switcher ---------- */

.switcher-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.switcher-tab {
  min-height: 48px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  border: 2px solid var(--line-strong);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.switcher-tab:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.switcher-tab:active { transform: translateY(0); box-shadow: none; }
.switcher-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.switcher-panel { display: none; }
.switcher-panel.active { display: block; animation: panel-in 0.35s var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.subject-list { columns: 2; column-gap: var(--space-6); max-width: 34rem; }
.subject-list li { break-inside: avoid; }

/* ---------- Payment rules ---------- */

.rule-list { list-style: none; padding: 0; margin: 0; }
.rule-list li { padding-top: var(--space-4); padding-bottom: var(--space-4); border-top: 1px solid var(--line); margin: 0; }
.rule-list li:last-child { border-bottom: 1px solid var(--line); }
.rule-list strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }

/* ---------- Tables ---------- */

.table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  overflow: clip;
}
.table-card .table-wrap { border: 0; border-radius: 0; }
.table-title { padding: var(--space-4) var(--space-5); font-weight: 600; border-bottom: 1px solid var(--line); margin: 0; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}
table.fees {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
table.fees caption {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
table.fees th, table.fees td {
  padding: var(--space-3) var(--space-4);
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.fees th:first-child, table.fees td:first-child { text-align: left; white-space: normal; }
table.fees th:first-child { min-width: 120px; }
table.fees thead th:first-child { position: sticky; left: 0; z-index: 2; }
table.fees tbody th:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); box-shadow: 1px 0 0 var(--line); }
table.fees tbody tr:nth-child(even) th:first-child { background: var(--band); }
table.fees tbody tr:hover td, table.fees tbody tr:hover th { background: #eef4f7; }
table.fees tbody tr:hover th:first-child { background: #eef4f7; }
table.fees thead th {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.92rem;
}
table.fees tbody tr:last-child th, table.fees tbody tr:last-child td { border-bottom: 0; }
table.fees tbody tr:nth-child(even) { background: var(--band); }
table.fees td.total, table.fees th.total { font-weight: 700; }
.scroll-hint { font-size: 0.88rem; color: var(--ink-mute); margin-top: var(--space-3); display: none; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}
.summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  background: var(--paper);
  min-width: 0;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.summary-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-1); border-color: var(--line-strong); }
.summary-card h3 { margin-top: 0; font-size: 1.15rem; min-height: 2.4em; }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.summary-row span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-row:first-of-type { border-top: 0; }
.summary-row.total { border-top: 2px solid var(--line-strong); margin-top: var(--space-1); padding-top: var(--space-3); }
.summary-row.total span:last-child { font-size: 1.1rem; }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.gallery-item {
  margin: 0;
  min-width: 0;
}
.gallery-item button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-img);
  overflow: clip;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-img);
  transition: transform 0.5s var(--ease-out);
}
.gallery-item button { transition: box-shadow 0.3s var(--ease-out); }
.gallery-item button:hover img { transform: scale(1.04); }
.gallery-item button:hover { box-shadow: var(--shadow-2); }
.gallery-item button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.gallery-item figcaption { font-size: 0.88rem; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: var(--overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.lightbox.open { display: flex; animation: lb-fade 0.25s var(--ease-out); }
.lightbox.open figure { animation: lb-in 0.3s var(--ease-out); }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lb-in { from { opacity: 0; transform: scale(0.97) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.lightbox figure { max-width: 1000px; width: 100%; margin: 0; }
.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-img);
  background: var(--ink);
}
.lightbox figcaption { color: var(--footer-ink); text-align: center; margin-top: var(--space-3); }
.lightbox-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--footer-mute);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.lightbox-btn svg { width: 20px; height: 20px; }
.lightbox-close { top: var(--space-4); right: var(--space-4); }
.lightbox-prev { left: var(--space-4); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-4); top: 50%; transform: translateY(-50%); }
.lightbox-btn:hover { background: var(--paper); color: var(--ink); }

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

.page-head {
  padding-top: var(--space-8);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: var(--space-3); animation: hero-rise 0.7s var(--ease-out) 0.08s both; }
.page-head p { color: var(--ink-soft); font-size: 1.15rem; max-width: 62ch; margin: 0; animation: hero-rise 0.7s var(--ease-out) 0.16s both; }
.back-link {
  display: inline-block;
  margin-bottom: var(--space-5);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease-out);
}
.back-link:hover { text-decoration: underline; transform: translateX(-2px); }

/* ---------- Call to action band ---------- */

.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-card);
  padding: var(--space-7);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-6);
  align-items: center;
}
.cta-band h2 { color: var(--paper); margin: 0 0 var(--space-2); }
.cta-band p { color: var(--footer-ink); margin: 0; max-width: 58ch; }
.cta-band .btn { flex-shrink: 0; }

/* ---------- Notice panel (science labs honesty panel) ---------- */

.notice-panel {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  background: var(--paper-warm);
}
.notice-panel h3 { margin-top: 0; }
.notice-panel p { color: var(--ink-soft); }

/* ---------- News ---------- */

.news-list { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.news-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5);
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.news-item h3 { margin: 0 0 var(--space-2); font-size: 1.35rem; line-height: 1.3; min-height: calc(2 * 1.3em); }
.news-item p { color: var(--ink-soft); margin: 0; max-width: 64ch; }
.news-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-3);
  white-space: nowrap;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}
/* Posters: same-height frames so the two mismatched poster ratios sit level. */
.poster-pair { align-items: stretch; }
.poster-pair figure { display: flex; flex-direction: column; }
.poster-pair .rounded-img {
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-1);
}
.poster-pair figcaption { margin-top: var(--space-3); }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  caret-color: var(--red);
  width: 100%;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-mute); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}
.field .hint { font-size: 0.88rem; color: var(--ink-mute); min-height: 1lh; }
.field .error-text { font-size: 0.88rem; color: var(--red); min-height: 1lh; font-weight: 600; }
.field [aria-invalid="true"] { border-color: var(--red); }
.form-note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  background: var(--band);
  border-radius: 14px;
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-5);
}

.contact-lines { list-style: none; padding: 0; margin: 0; }
.contact-lines li {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.contact-lines li:last-child { border-bottom: 0; }
.contact-lines svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; color: var(--red); }
.contact-lines strong { display: block; }
.contact-lines span { color: var(--ink-soft); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  margin-top: var(--space-8);
  position: relative;
  overflow: clip;
}
/* The crest, large and faint, behind the footer columns. */
.site-footer::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 380px;
  height: 380px;
  background: url('../img/crest-transparent-512.png') center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}
.footer-inner, .footer-bottom { position: relative; z-index: 1; }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: var(--space-7);
  padding-top: var(--space-8);
  padding-bottom: var(--space-7);
}
.footer-brand { display: flex; gap: var(--space-4); align-items: flex-start; }
.footer-brand img { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.footer-brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; }
.footer-brand-sub { color: var(--footer-mute); font-size: 0.92rem; margin-top: var(--space-1); }
.footer-about { color: var(--footer-mute); font-size: 0.95rem; margin-top: var(--space-4); max-width: 46ch; }
.footer-motto {
  font-family: var(--font-display);
  /* No font-style: italic — dead declaration, Bricolage has no italic (v7). */
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--gold-soft);
  margin: var(--space-5) 0 0;
}
.footer-dates { color: var(--footer-mute); font-size: 0.92rem; margin-top: var(--space-4); }
.footer-cta { margin-top: var(--space-4); }
.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--paper);
  margin: 0 0 var(--space-4);
  letter-spacing: 0;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: var(--space-2); }
.footer-col a { color: var(--footer-ink); text-decoration: none; transition: color 0.15s var(--ease-out); }
.footer-col a:hover { color: var(--paper); text-decoration: underline; }
.footer-col p { color: var(--footer-mute); font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(232, 237, 241, 0.18);
  padding-top: var(--space-4);
  padding-bottom: var(--space-5);
  font-size: 0.88rem;
  color: var(--footer-mute);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ---------- Reveal animation (JS-scoped: visible without JS) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Back to top ---------- */

.to-top {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-2);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s linear 0.3s, box-shadow 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
.to-top.show { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.2s var(--ease-out), background-color 0.2s var(--ease-out); }
.to-top:hover { background: var(--band); }
.to-top svg { width: 18px; height: 18px; }

/* ---------- Gallery albums ---------- */

.album { scroll-margin-top: 84px; } /* mobile: only the ~59px header covers the top (jump bar is static), so 84px lands the heading just under it */
@media (min-width: 861px) { .album { scroll-margin-top: 160px; } } /* v8 desktop: sticky stack is header ~59px + compact jump bar ~83px = ~142px; 84px hid album headings under the bars on pill click (150px left the heading flush, 160px clears it). v10: the 160px margin is desktop-only — on mobile it left ~99px of dead space above every album heading. */
.album + .album { margin-top: var(--space-9); }
.album-head { margin-bottom: var(--space-5); }
.album-head h2 { margin-top: 0; }
.album-head p { color: var(--ink-mute); margin: 0; }

.album-nav { background: var(--band); border-bottom: 1px solid var(--line); padding-top: var(--space-4); padding-bottom: var(--space-4); }
.album-nav .container { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-4); }
.album-nav-label { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.album-nav ul { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.album-nav a {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.album-nav a:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateY(-1px); }
.album-nav-toggle { display: none; }

/* ---------- Anthem, lineage, awards ---------- */

.anthem {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-6);
}
.anthem h3 { margin: 0 0 var(--space-2); font-size: 1rem; }
.anthem-verse + .anthem-verse { margin-top: var(--space-5); }
@media (min-width: 861px) {
  .anthem { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-8); row-gap: var(--space-5); }
  .anthem-verse + .anthem-verse { margin-top: 0; }
}
.anthem p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.65;
  margin: 0;
}
.lineage { margin: 0; }
.lineage-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}
.lineage-row:last-child { border-bottom: 1px solid var(--line); }
.lineage-years { color: var(--ink-mute); white-space: nowrap; }
.lineage-row p { margin: 0; }
.lineage-block { margin-top: var(--space-8); }
.lineage-block h3 { margin-top: 0; margin-bottom: var(--space-4); }
.lineage-wide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--space-6); border-top: 1px solid var(--line); }
.lineage-wide .lineage-row { border-top: 0; border-bottom: 1px solid var(--line); }
.lineage-wide .lineage-row:last-child { border-bottom: 1px solid var(--line); }
.award-group + .award-group { margin-top: var(--space-6); }
.award-group h3 { margin: 0 0 var(--space-2); }
.award-group ul { list-style: none; padding: 0; margin: 0; }
.award-group li {
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
  border-top: 1px solid var(--line);
  position: relative;
}
.award-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
}
.meaning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--space-4);
}
.meaning { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-card); padding: var(--space-4) var(--space-5); }
.meaning dt { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; line-height: 1.3; min-height: calc(2 * 1.3em); }
.meaning dd { margin: var(--space-1) 0 0; color: var(--ink-soft); min-height: calc(2 * 1.65em); }
@media (max-width: 1080px) {
  /* At tablet/phone widths the longest gloss needs three lines. */
  .meaning dd { min-height: calc(3 * 1.65em); }
}
.tick-list.two-col { columns: 2; column-gap: var(--space-6); }
.tick-list.two-col li { break-inside: avoid; }

/* ---------- Staff ---------- */

.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--space-4);
}
.staff-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.staff-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-1); border-color: var(--line-strong); }
.staff-photo img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
.staff-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; min-height: calc(2 * 1.3em); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.staff-card p { margin: 2px 0 0; color: var(--ink-mute); font-size: 0.95rem; }

/* Leadership: portrait cards. */
.leader-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--space-4); }
.leader-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: clip;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.leader-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.leader-visual { display: block; aspect-ratio: 4 / 5; overflow: clip; background: var(--band); }
.leader-visual img { width: 100%; height: 100%; object-fit: cover; }
.leader-body { padding: var(--space-4) var(--space-5) var(--space-5); }
.leader-body h3 { margin: 0; font-size: 1.2rem; line-height: 1.3; min-height: calc(2 * 1.3em); }
.leader-body p { margin: 2px 0 0; color: var(--ink-mute); font-size: 0.95rem; min-height: calc(2 * 1.65em); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  /* Nav visibility is owned by nav.css (breakpoint 1330px) — not here. */
}

@media (max-width: 1080px) {
  /* Nav visibility is owned by nav.css (breakpoint 1330px) — not here. */
  /* Five stats stay five-across only on a wide screen: at tablet width
     the columns get too narrow for two-line labels, so two columns with
     the fifth spanning both (one wide card) is the uniform layout. */
  .numbers { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .number-item:nth-child(5) { grid-column: span 2; display: flex; align-items: center; gap: var(--space-4); }
  .number-item:nth-child(5) .number-label { margin-top: 0; min-height: 0; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lineage-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .split, .split-wide, .split-narrow { grid-template-columns: minmax(0, 1fr); }
  .card-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .photo-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .photo-row .photo-wide { grid-column: span 2; }
  .gallery-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cta-band { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .subject-list { columns: 1; }
  .staff-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .leader-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .container { padding-inline: var(--space-4); }
  .hero { min-height: 72svh; }
  .hero-content { padding-bottom: var(--space-6); }
  .hero-content p { font-size: 1.05rem; }
  .dates-strip .container { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .date-item + .date-item { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-strong); padding-top: var(--space-4); }
  .numbers { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Tiles: one size smaller, so the longest label (Elocution, four
     languages) still fits two lines and every tile stays 64px. */
  .tile { font-size: 0.88rem; padding: var(--space-2); }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .photo-row { grid-template-columns: minmax(0, 1fr); }
  .photo-row .photo-wide { grid-column: auto; aspect-ratio: 4 / 3; }
  .gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .pillar { grid-template-columns: 52px minmax(0, 1fr); gap: var(--space-4); }
  .pillar-numeral { font-size: 1.9rem; }
  .summary-grid { grid-template-columns: minmax(0, 1fr); }
  .lineage-wide { grid-template-columns: minmax(0, 1fr); }
  .topper-row { grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--space-3); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .news-item { grid-template-columns: minmax(0, 1fr); }
  .news-tag { justify-self: start; }
  .scroll-hint { display: block; }
  .brand-sub { display: none; }
  .lightbox-prev { left: var(--space-2); }
  .lightbox-next { right: var(--space-2); }
  .btn { text-align: center; }
  .hero-actions .btn { width: 100%; }
  .staff-grid { grid-template-columns: minmax(0, 1fr); }
  .meaning-grid { grid-template-columns: minmax(0, 1fr); }
  .tick-list.two-col { columns: 1; }
  .lineage-row { grid-template-columns: 104px minmax(0, 1fr); }
  /* Album nav: first few pills only, expand on tap. Scoped to html.js
     so the full list stays visible when scripts are off. */
  html.js .album-nav-toggle {
    display: inline-block;
    margin-top: var(--space-2);
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--ink);
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: var(--paper);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
  }
  html.js .album-nav ul li:nth-child(n+9) { display: none; }
  html.js .album-nav.expanded ul li:nth-child(n+9) { display: block; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img { animation: none; transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
