@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --navy: #041630;
  --navy-light: #c3c3c3;
  --navy-deep: #0d2446;
  --gold: #fbba23;
  --gold-light: #d9ab55;
  --ink: #666564;
  --muted: #667080;
  --paper: #fdfcfa;
  --card: #f3f0ea;
  --line: #e2ddd2;

  --fs-h1: clamp(1.9rem, 1.3rem + 2.4vw, 3.4rem);
  --fs-h2: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem);
  --fs-deck: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  --fs-body: clamp(0.92rem, 0.88rem + 0.15vw, 1.02rem);
  --fs-small: clamp(0.78rem, 0.76rem + 0.1vw, 0.86rem);

  --gap: clamp(1rem, 0.7rem + 1.2vw, 2rem);
  --pad-x: clamp(1.1rem, 0.8rem + 2vw, 4rem);
  --pad-y: clamp(2rem, 1.5rem + 2vw, 4rem);
}

.hide {
  display: none !important;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Roboto", Georgia, serif;
  font-size: var(--fs-body);
  line-height: 1.6;
}
h1,
h2,
h3 {
  font-family: "constantia", sans-serif;
  margin: 0;
  line-height: 1.15;
}

h3 {
  font-family: "Roboto", Georgia, serif;
}

a {
  color: inherit;
}
img {
  /* width: 100%; */
  max-width: 100%;
  display: block;
  /* filter: contrast(0.95) saturate(0.6);
  -webkit-filter: contrast(0.95) saturate(0.6); */
}
.ui {
  font-family: "Roboto", system-ui, sans-serif;
}

/* ---------- notice ---------- */
.notice {
  margin: 0;
  padding: 0.6rem var(--pad-x);
  background: var(--navy-deep);
  color: #cfd8e3;
  font-family: "Roboto", system-ui, sans-serif;
  font-size: var(--fs-small);
  text-align: center;
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  /* align-items: center; */
  justify-content: space-between;
  background: #eaebec;
  border: none;
}
@media (max-width: 899px) {
  .site-header {
    transition: transform 0.25s ease;
  }
  .site-header.header-hidden {
    transform: translateY(-100%);
  }
}
.menu-toggle {
  border: none;
  background: #eaebec;
  color: var(--navy);
  font-weight: 600;

  height: 100px;
  width: 100px;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;

  @media (max-width: 899px) {
    display: none;
  }
}
.menu-toggle:hover {
  background: var(--gold);
  color: var(--navy);
}
.menu-toggle:hover svg * {
  fill: var(--navy);
}

.menu-toggle .hamburger rect {
  transform-box: fill-box;
  transform-origin: center;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}
.menu-toggle.is-open .hamburger rect:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.menu-toggle.is-open .hamburger rect:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open .hamburger rect:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}
.menu-toggle .menu-text {
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 10%;
}

.menu-toggle .hamburger svg * {
  fill: var(--navy);
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 var(--pad-x);
  transition: background-color 0.2s ease;

  @media (max-width: 899px) {
    display: none;
  }
}
.header-wrapper.opened {
  background-color: var(--navy);
}
.header-wrapper.opened .brand {
  color: #fff;
}

/* cover (page 1): only the menu toggle is shown, no grey bar */
.site-header.on-cover {
  background: transparent;
}
.header-wrapper.on-cover {
  justify-content: flex-end;
}
.header-wrapper.on-cover .brand,
.header-wrapper.on-cover .header-category-group {
  display: none !important;
}
.header-wrapper.on-cover .menu-toggle {
  background: var(--navy);
  color: #fff;
}
.header-wrapper.on-cover .menu-toggle .hamburger svg * {
  fill: #fff;
}

.header-category-group {
  display: none;
}
@media (min-width: 900px) {
  .header-wrapper {
    position: relative;
  }
  .header-category-group {
    display: flex;
    align-items: center;
    gap: 30px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .header-category {
    font-family: "constantia", serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 2%;
    color: var(--navy);
    pointer-events: none;
    white-space: nowrap;
  }
  .header-page-nav {
    background: #fff;
    border: none;
    border-radius: 50px;
    width: 25px;
    height: 25px;
    color: var(--navy);
    font-size: 20px;
    line-height: 1;
    font-family: "Constantia", sans-serif;
    cursor: pointer;
    padding: 0.25rem;

    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
  }
  .header-page-nav:hover {
    color: var(--gold);
  }
  /* solid/closed triangle, drawn with borders rather than a text glyph —
     a Unicode ‹/› arrow renders as a thin open chevron in most fonts, not
     a filled triangle, and consistency across fonts isn't guaranteed. */
  .header-page-nav::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
  }
  .header-page-nav.prev::before {
    border-right: 5px solid currentColor;
    margin-right: 2px;
  }
  .header-page-nav.next::before {
    border-left: 5px solid currentColor;
    margin-left: 2px;
  }
  .header-wrapper.opened .header-category {
    /* color:#FFF; */
  }
}

.header-wrapper.opened .header-category {
  color: #fff;
}

.brand {
  font-family: "constantia", serif;
  letter-spacing: 0.04em;
  font-size: 16px;
  color: var(--navy);
  text-decoration: none;

  display: flex;
  gap: 10px;
}

.brand small {
  display: block;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
}

.toc-nav.opened {
  display: flex;
}
.toc-nav {
  display: none;
  background-color: var(--navy);

  flex-wrap: wrap;
  gap: 1.1rem;
  font-family: "Roboto", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 28px 32px;

  position: absolute;
  top: 100px;
  width: 100vw;

  max-height: calc(100vh - 102px);
  overflow-y: auto;

  z-index: 10;

  @media (max-width: 899px) {
    top: 0;
    max-height: calc(100vh - 80px);
    padding-top: 80px;
    padding-right: 40px;
  }
}
.toc-nav a {
  text-decoration: none;
  color: var(--muted);
}
.toc-nav-close {
  position: fixed;
  top: 0px;
  right: 0px;
  z-index: 11;

  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--gold);

  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;

  @media (min-width: 900px) {
    display: none;
  }
}
.toc-nav-close:hover {
  color: var(--line);
}
.toc-nav a:hover {
  color: var(--navy);
}
@media (max-width: 899px) {
  .toc-nav {
    display: none;
  }
}

.toc-nav .column {
  flex: 1;
}
.toc-nav .column span {
  color: #8099ad;
  font-size: 14px;
  text-transform: uppercase;
  font-family: "constantia", sans-serif;
  letter-spacing: 4%;
}

.toc-nav .column ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  width: 100%;
}

.toc-nav .column ul li {
  width: 100%;
}
.toc-nav .column ul li a,
.toc-nav .column ul li.unavailable > span {
  color: #fff;
  text-decoration: none;
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 30px;

  background-color: #193347;
  border-radius: 10px;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 500;
  font-family: "Roboto", sans-serif;
}
.toc-nav .column ul li.unavailable > span {
  opacity: 0.45;
  cursor: default;
}
.toc-nav .column ul li a .num,
.toc-nav .column ul li.unavailable > span .num {
  font-family: "constantia", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  flex: 0 0 auto;
}

.toc-nav .column ul li a:hover {
  background-color: #2a4a64;
}

.toc-nav .column ul li a.active {
  background-color: var(--gold);
  color: var(--navy-deep);
}
.toc-nav .column ul li a.active .num {
  color: var(--navy-deep);
}

.toc-nav .column.old-boys {
  margin-left: 0px;
  padding-left: 20px;
  border-left: 1px solid #2a4a64;

  @media (max-width: 899px) {
    padding-left: 0px;
    border-left: none;
  }
}
.toc-nav .column.old-boys li a {
  background-color: #0e3b5d;
}

/* ---------- spread / page shell ---------- */

.spread {
  padding: 0 0 100px;
  border-bottom: 1px solid var(--line);

  @media (max-width: 899px) {
    padding-bottom: 40px;
  }
}
@media (min-width: 900px) {
  /* each .spread scrolls its own content on desktop; the floating pager
     overlays it (no reserved space) once .near-end slides it up, so the
     content needs enough bottom padding to clear the 129px bar when fully
     scrolled — otherwise the last bit of every page ends up hidden behind it. */
  .spread {
    padding-bottom: 250px;
  }
  /* #page-01 (.cover) sets its own `padding` shorthand further down this
     file, which overwrites .spread's padding-bottom above (same specificity,
     later source order) — so the cover needs its own explicit override here.
     The footer/pager is permanently visible on this page (no real scrollable
     content to hide it during), so this needs to exactly clear its height. */
  #page-01 {
    padding-bottom: 80px !important;
  }
}
/* Old Boys' News section (pages 19-26) */
.spread.old-boys {
  background-color: #d0dfe0;
  /* the default --navy-light (#C3C3C3) used inline for every <hr> separator
     has a contrast ratio of ~1.3 against this pale background — effectively
     invisible. Redefining the variable here fixes every inline var(--navy-light)
     usage on these pages without touching it anywhere else on the site. */
  --navy-light: var(--muted);
}
.spread.old-boys .page-kicker {
  color: var(--navy-deep);
}
.spread.old-boys p {
  color: var(--muted);
}
.spread.old-boys .hero-panel p,
.spread.old-boys .hero-panel cite {
  /* color: #fff; */
}

.spread .wrap {
  padding: var(--pad-y) var(--pad-x) 0;
  max-width: 1240px;
  margin: 0 auto;
}
.page-kicker {
  font-family: "Roboto", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.article-head {
  /* max-width: 46rem; */
  margin-bottom: var(--gap);
}
.article-head h1 {
  font-size: var(--fs-h1);
  font-weight: 600;
  color: var(--navy-deep);
  font-family: "constantia", sans-serif;
  line-height: 1.15;
  margin: 0;
}
.deck {
  color: var(--muted);
  margin-top: 0.7rem;
  font-size: 1rem;
  text-transform: uppercase;
  font-family: "constantia", sans-serif;
}

.hero-photo {
  width: 100%;
  object-fit: cover;
  object-position: top;
}
@media (min-width: 900px) {
  .hero-photo {
    max-height: 80vh;
    aspect-ratio: 16/10;
  }
}
.hero-photo.tall {
  aspect-ratio: 3/4;
}

/* ---------- hero split: photo left, kicker/title/deck panel right (desktop) ---------- */
.hero-panel {
  padding: var(--pad-y) var(--pad-x) 0;
}
.hero-panel .article-head {
  margin-bottom: 0;
}
.hero-num {
  display: none;
}

/* mobile: hero panels carrying an inline accent colour (sport/academia/
   arts-and-culture/events) default to dark on-paper text and an
   intrinsic (often cramped) height — the white-text + height rules below
   are otherwise only defined inside the >=900px hero-split grid. */
@media (max-width: 899px) {
  .hero-panel[style] {
    padding-bottom: var(--pad-y);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .hero-panel[style] .page-kicker {
    color: var(--gold-light);
    margin: 0;
  }
  .hero-panel[style] .article-head h1 {
    color: #fff;
  }
  .hero-panel[style] .deck {
    color: #fff;
    opacity: 0.85;
  }
}

@media (min-width: 900px) {
  .hero-split {
    display: flex;
    height: 600px;
  }
  .hero-split .hero-photo {
    width: 50%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    flex-shrink: 0;
  }
  .hero-panel {
    width: 50%;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--pad-y);
    overflow: hidden;
  }
  .hero-panel .page-kicker {
    color: var(--gold-light);
    margin: 0;
  }
  .hero-panel .article-head h1 {
    color: #fff;
    font-size: 40px;
    font-weight: 400;
    margin: 27px 0;
  }
  .hero-panel .deck {
    color: var(--muted);
    font-family: "constantia", serif;
    text-transform: uppercase;
    letter-spacing: 2%;
    font-size: 20px;
    font-style: normal;
    margin: 0;
  }
  .hero-panel .deck + p {
    color: #fff;
  }
  .hero-num {
    /* display: inline-block;
    margin-right: 0.5rem; */
  }
  .hero-panel .hero-num {
    /* color: var(--gold-light); */
  }
}

/* ---------- body copy ---------- */
.lede {
  font-size: var(--fs-deck);
  max-width: 42rem;
  margin: var(--gap) 0;
  color: var(--navy-deep);
}
/* article: images wrapper (25%) on the left, text (75%) in a single flowing
   column on the right. Mobile/tablet: text on top, images below, both 100%. */
.article-columns {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  /* margin-top: var(--gap); */
}
.article-columns > .article-text {
  order: 1;
}
.article-columns > .article-images {
  order: 2;
}
@media (min-width: 900px) {
  .article-columns {
    display: grid;
    grid-template-columns: 350px 1fr;
    column-gap: 45px;
    row-gap: 0;
    align-items: start;
  }
  .article-columns > .article-images {
    grid-column: 1;
    grid-row: 1;
  }
  .article-columns > .article-text {
    grid-column: 2;
    grid-row: 1;
  }
  .article-columns:not(:has(> .article-images)) {
    grid-template-columns: 1fr;
  }
  .article-columns:not(:has(> .article-images)) > .article-text {
    grid-column: 1;
  }
}
.article-columns p {
  margin: 0 0 1em;
}
.article-columns h3 {
  font-size: 21px;
  color: var(--navy);
  margin: 1.2em 0 10px;
  text-transform: uppercase;
  font-family: "constantia", serif;
}

/* two article blocks side by side inside a masthead-grid would be too narrow
   now that each one is itself a 25/75 layout — stack them */
.masthead-grid:has(.article-columns) {
  grid-template-columns: 1fr;
}

.pull-quote {
  font-family: "Roboto", serif;
  font-style: italic;
  font-size: var(--fs-h4);
  line-height: 1.35;
  color: #fff;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin: var(--gap) 0;
  /* max-width: 34rem; */
}

@media (max-width: 900px) {
  .pull-quote {
    color: var(--navy) !important;
  }
}

.pull-quote cite {
  display: block;
  font-style: normal;
  font-family: "Roboto", sans-serif;
  font-size: 0.78rem;
  color: var(--muted) !important;
  margin-top: 0.5rem;
}

/* pull-quote next to a paragraph — side by side on desktop */
.quote-grid {
  display: block;
}
.quote-grid .pull-quote {
  max-width: none;
}
@media (min-width: 900px) {
  .quote-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    align-items: start;
  }
  .quote-grid .pull-quote {
    margin: 0;
  }
}

.photo-grid {
  margin-bottom: 20px;
}
.photo-grid-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  grid-auto-rows: min-content;
  align-items: start;
}
.photo-grid-wrap img {
  width: 100%;
  height: 100%;
  /* aspect-ratio: 4/3; */
  object-fit: cover;
  object-position: top;
  display: block;
}
.photo-grid-wrap .tall img {
  aspect-ratio: 3/4;
}

/* a lone photo shouldn't stretch to fill the column — give it a sensible
   standalone size instead of growing edge to edge */
.photo-grid:has(> .photo-grid-wrap > :is(img, .tall):only-child) {
  /* max-width: 500px; */
}

@media (min-width: 640px) {
  .photo-grid-wrap:has(> :is(img, .tall):nth-child(2)):not(
      :has(> :is(img, .tall):nth-child(3))
    ) {
    grid-template-columns: repeat(2, 1fr);
  }
  .photo-grid-wrap:has(> :is(img, .tall):nth-child(3)):not(
      :has(> :is(img, .tall):nth-child(4))
    ) {
    grid-template-columns: repeat(3, 1fr);
  }
  .photo-grid-wrap:has(> :is(img, .tall):nth-child(4)):not(
      :has(> :is(img, .tall):nth-child(5))
    ) {
    grid-template-columns: repeat(4, 1fr);
  }
  .photo-grid-wrap:has(> :is(img, .tall):nth-child(5)):not(
      :has(> :is(img, .tall):nth-child(6))
    ) {
    grid-template-columns: repeat(5, 1fr);
  }
  .photo-grid-wrap:has(> :is(img, .tall):nth-child(6)):not(
      :has(> :is(img, .tall):nth-child(7))
    ) {
    grid-template-columns: repeat(6, 1fr);
  }
  .photo-grid-wrap:has(> :is(img, .tall):nth-child(7)):not(
      :has(> :is(img, .tall):nth-child(8))
    ) {
    grid-template-columns: repeat(7, 1fr);
  }
  .photo-grid-wrap:has(> :is(img, .tall):nth-child(8)):not(
      :has(> :is(img, .tall):nth-child(9))
    ) {
    grid-template-columns: repeat(4, 1fr);
  }

  /* manual column layouts: .grid-A-B-... = column 1 holds A photos, column 2
     holds B photos, etc., each stacked top to bottom */
  .photo-grid-wrap.grid-1-2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .photo-grid-wrap.grid-1-2 > :nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: stretch;
    height: 100%;
    aspect-ratio: auto;
  }
  .photo-grid-wrap.grid-1-2 > :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .photo-grid-wrap.grid-1-2 > :nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }

  .photo-grid-wrap.custom-3-row-3-col {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(3, 1fr) !important;
    grid-template-areas:
      "one two three"
      "one four seven"
      "five six seven";
    aspect-ratio: 3 / 2;
  }
  .photo-grid-wrap.custom-3-row-3-col img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }

  .photo-grid-wrap.custom-2-row-6-col {
    grid-template-columns: repeat(6, 1fr) !important;
    grid-template-rows: repeat(2, 1fr) !important;
    grid-template-areas:
      "one one two two three three"
      "four four four five five five";
    aspect-ratio: 3 / 2;
  }
  .photo-grid-wrap.custom-2-row-6-col img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }

  .photo-grid-wrap.custom-2-row-6-col > :nth-child(1) {
    grid-area: one;
  }
  .photo-grid-wrap.custom-2-row-6-col > :nth-child(2) {
    grid-area: two;
  }
  .photo-grid-wrap.custom-2-row-6-col > :nth-child(3) {
    grid-area: three;
  }
  .photo-grid-wrap.custom-2-row-6-col > :nth-child(4) {
    grid-area: four;
  }
  .photo-grid-wrap.custom-2-row-6-col > :nth-child(5) {
    grid-area: five;
  }
  .photo-grid-wrap.custom-3-row-3-col > :nth-child(1) {
    grid-area: one;
  }
  .photo-grid-wrap.custom-3-row-3-col > :nth-child(2) {
    grid-area: two;
  }
  .photo-grid-wrap.custom-3-row-3-col > :nth-child(3) {
    grid-area: three;
  }
  .photo-grid-wrap.custom-3-row-3-col > :nth-child(4) {
    grid-area: four;
  }
  .photo-grid-wrap.custom-3-row-3-col > :nth-child(5) {
    grid-area: five;
  }
  .photo-grid-wrap.custom-3-row-3-col > :nth-child(6) {
    grid-area: six;
  }
  .photo-grid-wrap.custom-3-row-3-col > :nth-child(7) {
    grid-area: seven;
  }

  /* custom-5-feature-*: one large "hero" photo + 4 smaller supporting photos.
     -left = hero first (DOM order 1), -top = hero spans a full-width band on
     top, -right = hero last (DOM order 5) — pick whichever reads best given
     which photo in the set is the strongest shot. */
  .photo-grid-wrap.custom-5-feature-left {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    grid-template-areas:
      "one one two three"
      "one one four five";
    aspect-ratio: 16 / 9;
  }
  .photo-grid-wrap.custom-5-feature-left img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }
  .photo-grid-wrap.custom-5-feature-left > :nth-child(1) {
    grid-area: one;
  }
  .photo-grid-wrap.custom-5-feature-left > :nth-child(2) {
    grid-area: two;
  }
  .photo-grid-wrap.custom-5-feature-left > :nth-child(3) {
    grid-area: three;
  }
  .photo-grid-wrap.custom-5-feature-left > :nth-child(4) {
    grid-area: four;
  }
  .photo-grid-wrap.custom-5-feature-left > :nth-child(5) {
    grid-area: five;
  }

  .photo-grid-wrap.custom-5-feature-top {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(0, 1.3fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "one one one one"
      "two three four five";
    aspect-ratio: 16 / 10;
  }
  .photo-grid-wrap.custom-5-feature-top img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }
  .photo-grid-wrap.custom-5-feature-top > :nth-child(1) {
    grid-area: one;
  }
  .photo-grid-wrap.custom-5-feature-top > :nth-child(2) {
    grid-area: two;
  }
  .photo-grid-wrap.custom-5-feature-top > :nth-child(3) {
    grid-area: three;
  }
  .photo-grid-wrap.custom-5-feature-top > :nth-child(4) {
    grid-area: four;
  }
  .photo-grid-wrap.custom-5-feature-top > :nth-child(5) {
    grid-area: five;
  }

  .photo-grid-wrap.custom-5-feature-right {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    grid-template-areas:
      "one two five five"
      "three four five five";
    aspect-ratio: 16 / 9;
  }
  .photo-grid-wrap.custom-5-feature-right img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }
  .photo-grid-wrap.custom-5-feature-right > :nth-child(1) {
    grid-area: one;
  }
  .photo-grid-wrap.custom-5-feature-right > :nth-child(2) {
    grid-area: two;
  }
  .photo-grid-wrap.custom-5-feature-right > :nth-child(3) {
    grid-area: three;
  }
  .photo-grid-wrap.custom-5-feature-right > :nth-child(4) {
    grid-area: four;
  }
  .photo-grid-wrap.custom-5-feature-right > :nth-child(5) {
    grid-area: five;
  }
}

/* grid-8-img-1 / grid-8-2: unscoped (not gated to a min-width) so these two
   galleries stay compact on mobile too, instead of falling back to 8
   full-width stacked images and blowing well past 100vh */
.photo-grid-wrap.grid-8-img-1 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
  grid-template-areas:
    "one one two two"
    "three four four five"
    "six six seven eight";
  max-height: 900px;
  overflow: hidden;
}
.photo-grid-wrap.grid-8-img-1 img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}
.photo-grid-wrap.grid-8-img-1 > :nth-child(1) {
  grid-area: one;
}
.photo-grid-wrap.grid-8-img-1 > :nth-child(2) {
  grid-area: two;
}
.photo-grid-wrap.grid-8-img-1 > :nth-child(3) {
  grid-area: three;
}
.photo-grid-wrap.grid-8-img-1 > :nth-child(4) {
  grid-area: four;
}
.photo-grid-wrap.grid-8-img-1 > :nth-child(5) {
  grid-area: five;
}
.photo-grid-wrap.grid-8-img-1 > :nth-child(6) {
  grid-area: six;
}
.photo-grid-wrap.grid-8-img-1 > :nth-child(7) {
  grid-area: seven;
}
.photo-grid-wrap.grid-8-img-1 > :nth-child(8) {
  grid-area: eight;
}

.photo-grid-wrap.grid-8-2 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
  grid-template-areas:
    "one one two three"
    "four four five five"
    "six seven eight eight";
  max-height: 900px;
  overflow: hidden;
}
.photo-grid-wrap.grid-8-2 img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}
.photo-grid-wrap.grid-8-2 > :nth-child(1) {
  grid-area: one;
}
.photo-grid-wrap.grid-8-2 > :nth-child(2) {
  grid-area: two;
}
.photo-grid-wrap.grid-8-2 > :nth-child(3) {
  grid-area: three;
}
.photo-grid-wrap.grid-8-2 > :nth-child(4) {
  grid-area: four;
}
.photo-grid-wrap.grid-8-2 > :nth-child(5) {
  grid-area: five;
}
.photo-grid-wrap.grid-8-2 > :nth-child(6) {
  grid-area: six;
}
.photo-grid-wrap.grid-8-2 > :nth-child(7) {
  grid-area: seven;
}
.photo-grid-wrap.grid-8-2 > :nth-child(8) {
  grid-area: eight;
}

/* captions live in the lightbox only (data-caption on the <img>, read by
   lightbox.js) - the on-page <p class="photo-caption"> is not shown here,
   it's kept in the DOM only as the source text data-caption was copied
   from. Exception: .family-tree-hint, which isn't a photo description,
   it's an on-page instruction telling the reader the image is clickable -
   that has to stay visible outside the lightbox for it to do its job. */
.photo-caption {
  display: none;
}
.photo-caption.family-tree-hint {
  display: block;
  font-family: "Roboto", sans-serif;
  color: var(--navy);
  font-weight: 700;
  font-size: var(--fs-body);
  margin-top: 0.6rem;
}

/* photo-grids inside the article image wrapper always stack in one column,
   whatever their count / custom layout class */
.article-images .photo-grid {
  margin: 0 0 20px !important;
  max-width: none !important;
}
.article-images .photo-grid-wrap {
  grid-template-columns: 1fr !important;
  grid-template-rows: none !important;
  grid-template-areas: none !important;
  aspect-ratio: auto !important;
}
.article-images .photo-grid-wrap > * {
  grid-area: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
  align-self: auto !important;
}
.article-images .photo-grid-wrap img {
  width: 100% !important;
  height: auto !important;
  /* aspect-ratio: 4/3 !important; */
  object-fit: cover;
}
.article-images .photo-grid-wrap .tall img {
  aspect-ratio: 3/4 !important;
}

@media (min-width: 900px) {
  .article-images {
    /* position: sticky; */
    /* top: 20px; */
  }
  /* page-8 (10 Clive Road) has a short 6-photo gallery against ~25
     paragraphs of body text — without sticky the gallery column ends in a
     large dead gap once the text runs past it. Scoped to this page rather
     than enabling it site-wide, since other .article-images usages weren't
     designed around a sticky column. */
  #page-08 .article-images {
    position: sticky;
    top: 20px;
  }
}

.tbc {
  display: inline-block;
  font-family: "Roboto", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
  margin: 0.5rem 0;
}

.cta-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
.cta-link:hover {
  color: var(--gold);
}

.contact-block {
  font-family: "Roboto", sans-serif;
  font-size: var(--fs-small);
  margin-top: 1.2rem;
  color: var(--muted);
}
.contact-block a {
  color: var(--navy);
}

/* the header floats over the content: every page starts below it, except the
   cover, which runs underneath the menu toggle */
main {
  padding-top: 100px;
}
#page-01 {
  display: flex;
  align-items: center;
  flex-direction: row;
  padding: 0;
  gap: 0 !important;
  margin-top: -100px;
}
@media (min-width: 900px) {
  #page-01 {
    height: calc(100% + 100px) !important;
    min-height: calc(100% + 100px) !important;
  }
}

@media (max-width: 899px) {
  #page-01 {
    flex-direction: column;
    padding-left: 0;
    /* min-height: 150svh; */
  }
}

@media (min-width: 900px) {
  #page-09 .prefect-list {
    columns: 3 !important;
  }
  #page-12 .masthead-grid {
    display: flex;
    flex-direction: column;
  }
}

#page-11 h3 {
  margin-top: 0px;
}

#page-16 .blue-section {
  max-width: 350px;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
#page-16 .blue-section img {
  max-width: 200px;
  margin-bottom: 10px;
}
#page-16 .blue-section b,
#page-16 .blue-section p {
  text-align: left !important;
  margin: 0 !important;
  font-size: 14px;
  width: 100%;
  display: block;
}
#page-16 .blue-section a {
  margin: 0;
  padding-bottom: 0;
  border: none;
  text-decoration: underline;
}

@media (min-width: 900px) {
  #page-19 .presidents-report .article-images {
    display: none;
  }

  #page-19 .presidents-report {
    background-image: url(../../publication-web-resources/image/Murray_McKinnon_2026.png);
    background-repeat: no-repeat;
    background-size: cover;
    padding: 50px 0;
    grid-template-columns: 50% 1fr !important;
  }
}

#page-25 .photo-grid-wrap {
  /* grid-template-columns: 1fr 3fr !important; */
}

@media (max-width: 900px) {
  #page-25 .photo-grid-wrap img {
    height: 300px !important;
  }
}

/* PAGE 11 AND 12 */
article.academia h2,
article.academia h3,
article.academia .page-kicker,
article.academia .page-kicker {
  color: #638e46 !important;
}

/* PAGE 13 AND 14 */
article.sport h2,
article.sport h3,
article.sport .page-kicker {
  color: #eea12c !important;
}
article.sport h4 {
  color: #454547 !important;
  margin: 5px 0;
}
article.sport .article-head {
  margin-bottom: 15px;
}

/* PAGE 15 */
article.extracurricular h2,
article.extracurricular h3,
article.extracurricular .page-kicker,
article.extracurricular .page-kicker {
  color: #638e46 !important;
}

/* PAGE 15 */
article.arts-and-culture h2,
article.arts-and-culture h3,
article.arts-and-culture .page-kicker,
article.arts-and-culture .page-kicker {
  color: #f15c34 !important;
}
article.giving-to-grammar .page-kicker,
article.giving-to-grammar .page-kicker {
  color: #ab425c !important;
}
article.events h2,
article.events h3,
article.events .page-kicker {
  color: #a71e56 !important;
}

dd {
  margin-inline-start: 0px;
}

/* ---------- cover ---------- */
.cover {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background-size: cover;
  background-position: center;
  padding: var(--pad-y) var(--pad-x);

  @media (max-width: 899px) {
    justify-content: flex-start;
    flex-direction: column-reverse !important;
    min-height: initial !important;
  }
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 33, 56, 0.55) 0%,
    rgba(14, 33, 56, 0.05) 30%,
    rgba(14, 33, 56, 0.15) 60%,
    rgba(14, 33, 56, 0.85) 100%
  );
  pointer-events: none;
}
.cover > * {
  position: relative;
  z-index: 1;
}
.cover-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--navy);
  height: 100%;
  width: 40vw;
}
@media (max-width: 899px) {
  .cover-left {
    padding: 100px 40px !important;
    max-width: 100% !important;
    min-height: 50svh !important;
  }
  .cover-right {
    width: 100%;
    padding: var(--pad-y) var(--pad-x);
  }
}

.cover-right small {
  text-transform: uppercase;
  font-size: 24px;
  font-family: "constantia", sans-serif;
}
.cover-right .date {
  margin-top: 100px;
  font-size: 30px;
  font-family: "constantia", sans-serif;
}

.cover-kicker {
  font-family: "constantia", sans-serif;
  font-size: 50px;
  margin-top: 40px;
}

.cover-crest {
  width: 266px;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.cover-left {
  width: 100%;
  max-width: 60vw;
  height: 100%;

  background-size: cover;
  background-position: center;

  padding: var(--pad-y) var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* .cover-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #00000050;
  background-size: cover;
  background-position: center;
  z-index: -1;
} */

.cover-headline {
  background: linear-gradient(
    90deg,
    #08304ec2 0%,
    #073250c2 36%,
    #073558c2 54%,
    #063c65c2 68%,
    #054678c2 81%,
    #035391c2 92%,
    #0260a9c2 100%
  );
  position: absolute;
  bottom: 40px;
  left: 0;

  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px 40px 40px 60px;
  /* max-width: 500px; */
}

.cover-headline h1 {
  margin: 15px 0 10px;
  font-weight: 400;
  font-size: 34x;
}

.cover-headline span,
.cover-headline p {
  font-size: 65px;
  font-family: "constantia", sans-serif;
  margin: 0;
  line-height: 1;
}

.cover-headline span {
  font-size: 120px;
}

.cover-teaser {
  margin-top: 1rem;
  font-family: "constantia", sans-serif;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 60%;
  text-align: center;
}

/* ---------- masthead / ad / contents (page-02) ---------- */
.masthead-grid {
  /* display: flex; */
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 760px) {
  .masthead-grid {
    grid-template-columns: 1.3fr 1fr;
  }
}

.promo-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto;
}
.promo-card img {
  width: 100%;
}
.promo-card a {
  display: block;
}
/* a masonry-style grid of ads with no fixed per-card max-width - each card
   keeps its own native aspect ratio (no forced height), and multi-column
   layout packs them tightly instead of leaving gaps like a strict grid
   would when the cards are different heights. Single column (full width)
   on mobile; columns at least 500px wide from the desktop breakpoint up. */
.ads-grid {
  margin-top: 1rem;
}
.ads-grid .promo-card {
  margin-bottom: 1.5rem;
}
.ads-grid .promo-card:last-child {
  margin-bottom: 0;
}
@media (min-width: 900px) {
  .ads-grid {
    column-width: 500px;
    column-gap: 1.5rem;
  }
  .ads-grid .promo-card {
    break-inside: avoid;
  }
}
.promo-label {
  font-family: "Roboto", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 0.7rem;
  background: var(--card);
}

.masthead-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.2rem 1.4rem;
  font-family: "Roboto", sans-serif;
  font-size: var(--fs-small);
}
dt {
  font-weight: 700 !important;
  color: var(--navy) !important;
  margin-top: 0.7rem;
}
.masthead-box dt:first-child {
  margin-top: 0;
}
.masthead-box dd {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

.contents-title {
  font-size: var(--fs-h2);
  color: var(--navy-deep);
  margin-bottom: 1rem;
}
/* page-14 only has one masthead-grid pair (Staff Awards) sitting among a
   handful of full-width sections — that pair alone stays smaller. */
#page-14 .masthead-grid .contents-title {
  font-size: 1.3rem;
}
.toc-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.8rem;
  margin-bottom: var(--gap);
}
.toc-featured a,
.toc-featured .unavailable {
  display: block;
  text-decoration: none;
  color: inherit;
}
.toc-featured img {
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 3px;
}
.toc-featured .unavailable img {
  opacity: 0.45;
  filter: grayscale(1);
}
.toc-featured a {
  position: relative;
}
.toc-featured .num {
  display: inline-block;
  margin: 0;
  font-family: "constantia", serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--gold);

  position: absolute;
  bottom: 35px;
  left: 10px;
  z-index: 1;
}
.toc-featured .unavailable .num {
  color: var(--muted);
}
.toc-featured .t {
  display: block;
  font-family: "Roboto", sans-serif;
  font-size: 0.78rem;
  margin-top: 0.5rem;
}

.toc-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.toc-list li {
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.toc-list li > a,
.toc-list li.unavailable {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.5rem 0px;
}
.toc-list li > a {
  text-decoration: none;
  color: var(--ink);
  /* background: #e0dfdf; */
}
.toc-list li > a:hover {
  color: var(--navy);
}
.toc-list li > a:hover .num {
  color: var(--navy);
  text-decoration: underline;
}
.toc-list li.unavailable {
  color: var(--muted);
  opacity: 0.55;
}
.toc-list li.unavailable .num {
  color: var(--muted);
}
.toc-list .num {
  font-family: "constantia", serif;
  font-weight: 700;
  color: var(--navy);
  min-width: 2.4ch;
}
.toc-list.old-boys-news li a {
  background: #e0dfdf;
  padding: 0.5rem 10px;
}
.toc-sub {
  font-family: "Roboto", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #628f46 !important;
  margin: 1.5rem 0 0.5rem;
}
.toc-note {
  font-size: var(--fs-small);
  color: var(--muted);
  font-style: italic;
  margin-top: 0.75rem;
}

/* ---------- prefect list ---------- */
.prefect-list {
  columns: 2;
  column-gap: 1.5rem;
  font-family: "Roboto", sans-serif;
  font-size: var(--fs-small);
  margin-top: var(--gap);
  border: none;
  padding: 0 !important;
}

@media (min-width: 640px) {
  .prefect-list {
    columns: 3;
  }
}
@media (min-width: 900px) {
  .prefect-list {
    columns: 2 !important;
  }
  .prefect-list.upcoming-events-21,
  .prefect-list.grammar-families {
    columns: 1 !important;
  }
}
.prefect-list .p {
  padding: 10px 20px !important;
  border: 1px solid #bcc5c6;
  background-color: #d0dfe0;
  break-inside: avoid;
  margin: 0;
}

.prefect-list .p:nth-child(even) {
  background-color: #fff;
}

.prefect-list .p b {
  display: block;
  color: var(--navy);
  font-weight: 600;
  text-transform: uppercase;
}
.prefect-list .p span {
  color: var(--muted);
  font-size: 0.82em;
}
.prefect-list .p.lead b {
  color: var(--gold);
}

/* ---------- donor list ---------- */
.donor-list {
  columns: 2;
  column-gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 1.5rem;
  font-family: "Roboto", sans-serif;
  font-size: var(--fs-small);
  color: var(--muted);
}
@media (min-width: 640px) {
  .donor-list {
    columns: 3;
  }
}
@media (min-width: 900px) {
  .donor-list {
    columns: 4;
  }
}
.donor-list li {
  break-inside: avoid;
  padding: 0.3rem 20px;
  border: 1px solid #8fa7ab;
  border-top: 0.5px solid #8fa7ab;
  border-bottom: 0.5px solid #8fa7ab;
  background-color: #d0dfe0;
}
.donor-list li:nth-child(even) {
  background-color: #fff;
}

/* ---------- sport nav: sticky anchor menu + stacked sport items ---------- */
.sport-layout {
  display: block;
  margin-top: 1.5rem;
}
.sport-layout p.deck {
  font-size: 16px !important;
 font-weight: 600;
 font-family: "Roboto", sans-serif !important;
}
.sport-layout h3 {
  font-size: 21px;
  text-transform: uppercase;
  font-family: "constantia", serif;
}

.sport-nav {
  position: sticky;
  top: 10px;
  z-index: 2;
  background: var(--paper);
  margin-bottom: 1.2rem;
  padding: 0.4rem 0;
}
.sport-nav-group {
  margin: 0 0 0.5rem;
  font-family: "Roboto", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sport-nav ul + .sport-nav-group {
  margin-top: 0.9rem;
}
.sport-nav ul + ul {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.sport-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 11px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sport-nav ul::-webkit-scrollbar {
  display: none;
}
.sport-nav a {
  display: block;
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: #19334712;
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
  font-size: 14px;
  color: #454547;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0 !important;
}
.sport-nav a.active {
  background: #eea12c16;
}
.sport-item {
  scroll-margin-top: 15px;
}
@media (min-width: 900px) {
  .sport-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 45px;
    align-items: start;
  }
  .sport-nav {
    padding: 0;
    background: none;
    align-self: start;
  }
  .sport-nav ul {
    flex-direction: column;
    overflow-x: visible;
  }
  .sport-nav a {
    border-radius: 6px;
    white-space: normal;
  }
}

/* ---------- academia nav: same pattern as sport nav, green accent ---------- */
.academia-layout {
  display: block;
  margin-top: 1.5rem;
}
.academia-layout p.deck {
  font-size: 16px !important;
 font-weight: 600;
 font-family: "Roboto", sans-serif !important;
}
.academia-layout h3 {
  font-size: 21px;
  text-transform: uppercase;
  font-family: "constantia", serif;
}

.academia-nav {
  position: sticky;
  top: 10px;
  z-index: 2;
  background: var(--paper);
  margin-bottom: 1.2rem;
  padding: 0.4rem 0;
}
.academia-nav-group {
  margin: 0 0 0.5rem;
  font-family: "Roboto", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.academia-nav ul + .academia-nav-group {
  margin-top: 0.9rem;
}
.academia-nav ul + ul {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.academia-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 11px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.academia-nav ul::-webkit-scrollbar {
  display: none;
}
.academia-nav a {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: #19334712;
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
  font-size: 14px;
  line-height: 1.2;
  color: #454547;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0 !important;
  min-height: 40px;
  transition: background 0.2s ease-in-out;
}
.academia-nav a.active {
  background: #638e4640;
}
.academia-item {
  scroll-margin-top: 15px;
}
@media (min-width: 900px) {
  .academia-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .academia-nav {
    padding: 0;
    background: none;
    align-self: start;
  }
  .academia-nav ul {
    flex-direction: column;
    overflow-x: visible;
  }
  .academia-nav a {
    border-radius: 6px;
    white-space: normal;
  }
}

/* ---------- arts nav: same pattern as sport/academia nav, orange-red accent ---------- */
.arts-layout {
  display: block;
  margin-top: 1.5rem;
}
.arts-layout p.deck {
  font-size: 16px !important;
}
.arts-layout h3 {
  font-size: 21px;
  text-transform: uppercase;
  font-family: "constantia", serif;
}

.arts-nav {
  position: sticky;
  top: 10px;
  z-index: 2;
  background: var(--paper);
  margin-bottom: 1.2rem;
  padding: 0.4rem 0;
}
.arts-nav-group {
  margin: 0 0 0.5rem;
  font-family: "Roboto", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.arts-nav ul + .arts-nav-group {
  margin-top: 0.9rem;
}
.arts-nav ul + ul {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.arts-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 11px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.arts-nav ul::-webkit-scrollbar {
  display: none;
}
.arts-nav a {
  display: block;
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: #19334712;
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
  font-size: 1rem;
  color: #454547;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0 !important;
}
.arts-nav a.active {
  background: #f15c3416;
}
.arts-item {
  scroll-margin-top: 15px;
}
@media (min-width: 900px) {
  .arts-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .arts-nav {
    padding: 0;
    background: none;
    align-self: start;
  }
  .arts-nav ul {
    flex-direction: column;
    overflow-x: visible;
  }
  .arts-nav a {
    border-radius: 6px;
    white-space: normal;
  }
}

/* ---------- events nav: same pattern as sport/academia/arts nav, magenta accent ---------- */
.events-layout {
  display: block;
  margin-top: 1.5rem;
}
.events-layout p.deck {
  font-size: 16px !important;
 font-weight: 600;
 font-family: "Roboto", sans-serif !important;
}
.events-layout h3 {
  font-size: 21px;
  text-transform: uppercase;
  font-family: "constantia", serif;
}

.events-nav {
  position: sticky;
  top: 10px;
  z-index: 2;
  background: var(--paper);
  margin-bottom: 1.2rem;
  padding: 0.4rem 0;
}

@media (max-width: 899px) {
  .academia-nav,
  .arts-nav,
  .sport-nav,
  .events-nav,
  .news-nav,
  .news-nav {
    display: none !important;
  }
}

.events-nav-group {
  margin: 0 0 0.5rem;
  font-family: "Roboto", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.events-nav ul + .events-nav-group {
  margin-top: 0.9rem;
}
.events-nav ul + ul {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.events-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 11px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.events-nav ul::-webkit-scrollbar {
  display: none;
}
.events-nav a {
  display: block;
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: #19334712;
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
  font-size: 1rem;
  color: #454547;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0 !important;
}
.events-nav a.active {
  background: #19334722;
}
.events-item {
  scroll-margin-top: 15px;
}
@media (min-width: 900px) {
  .events-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .events-nav {
    padding: 0;
    background: none;
    align-self: start;
  }
  .events-nav ul {
    flex-direction: column;
    overflow-x: visible;
  }
  .events-nav a {
    border-radius: 6px;
    white-space: normal;
  }
}

.news-layout {
  display: block;
  margin-top: 1.5rem;
}
.news-layout p.deck {
  font-size: 16px !important;
 font-weight: 600;
 font-family: "Roboto", sans-serif !important;
}
.news-layout h3 {
  font-size: 21px;
  text-transform: uppercase;
  font-family: "constantia", serif;
}

.news-nav {
  position: sticky;
  top: 10px;
  z-index: 2;
  background: var(--paper);
  margin-bottom: 1.2rem;
  padding: 0.4rem 0;
}
.news-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 11px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.news-nav ul::-webkit-scrollbar {
  display: none;
}
.news-nav a {
  display: block;
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: #19334712;
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
  font-size: 1rem;
  color: #454547;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0 !important;
}
.news-nav a.active {
  background: #19334722;
}
.news-item {
  scroll-margin-top: 15px;
}
@media (min-width: 900px) {
  .news-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .news-nav {
    padding: 0;
    background: none;
    align-self: start;
  }
  .news-nav ul {
    flex-direction: column;
    overflow-x: visible;
  }
  .news-nav a {
    border-radius: 6px;
    white-space: normal;
  }
}

/* ---------- family tree (genealogy chart reproduction) ---------- */
.family-tree {
  margin: 1.5rem 0 2rem;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #cbd5e0;
  text-align: center;
}
.site-footer .wrap {
  padding-block: var(--pad-y);
}
.site-footer p {
  margin: 0.3rem 0;
  font-family: "Roboto", sans-serif;
  font-size: var(--fs-small);
}

/* =========================================================
   DESKTOP: horizontal slider
   ========================================================= */
@media (min-width: 900px) {
  html,
  body {
    height: 100%;
  }
  body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .notice,
  .site-header {
    flex: 0 0 auto;
  }
  main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  main::-webkit-scrollbar {
    display: none;
    height: 0;
  }
  main > .spread {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-snap-align: start;
    border-bottom: none;
    border-right: 1px solid var(--line);
  }
  main > .spread:last-child {
    border-right: none;
  }
  .cover {
    min-height: 100%;
    height: 100%;
  }
}

/* prev/next arrows — sit beside the floating pager, same styling, every breakpoint */
.slide-nav.is-disabled,
.header-page-nav.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}
.slide-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  /* width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--gold-light);*/
  background: transparent;
  border: none;
  color: var(--navy);
  font-size: 16px;
  cursor: pointer;
  font-family: "Constantia", sans-serif;
  white-space: nowrap;
}
@media (min-width: 900px) {
  .slide-nav {
    font-size: 24px;
  }
}
@media (max-width: 600px) {
  .slide-nav {
    font-size: 0;
    padding: 30px;
    text-decoration: none !important;
    width: 60px;
  }
  .slide-nav.prev::before {
    content: "‹";
    font-size: 30px;
  }
  .slide-nav.next::before {
    content: "›";
    font-size: 30px;
  }
}
.slide-nav:hover {
  text-decoration: underline;
  /* background: var(--gold); */
  /* border-color: var(--gold); */
}

/* =========================================================
   MOBILE: floating pager
   ========================================================= */
.mobile-pager {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 1;
  font-family: "Roboto", sans-serif;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 0 20px;

  background-color: #eaebec;
  width: 100vw;
  height: 80px;

  /* desktop: overlays the content instead of reserving space for it — no
     padding-bottom hack needed on the sections. Starts slid fully below
     the viewport; mobile-pager.js adds .near-end once scroll position is
     within 300px of the bottom of the CURRENT spread. */
  transform: translate(-50%, 100%);
  transition: transform 0.3s ease;

  @media (max-width: 599px) {
    padding: 0 0px;

    .slide-nav {
      padding: 17px 30px 40px 30px;
    }
  }
}
.mobile-pager.near-end {
  transform: translate(-50%, 0);
}
@media (max-width: 899px) {
  /* mobile: always fixed at the bottom, no hide/reveal-on-scroll — unlike
     desktop, where the pager slides up only near the end of a page. */
  .mobile-pager {
    transform: translate(-50%, 0);
    transition: none;
  }
}
.pager-row {
  /* "‹ Previous Story" is wider than "Next Story ›", so centering this as a
     flex row (content-width-dependent) pushes the middle toggle off-center.
     A grid with two equal 1fr side tracks keeps the toggle truly centered
     regardless of how long either button's label is. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  height: 100%;
}
.pager-row .slide-nav.prev {
  justify-self: start;
}
.pager-row .slide-nav.next {
  justify-self: end;
}
.pager-sheet {
  background: var(--navy-deep);
  color: #fff;
  border-radius: 10px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: min(78vw, 320px);
}
.pager-sheet[hidden] {
  display: none;
}
.pager-sheet ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pager-sheet a {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  color: #dbe4f0;
  font-size: 0.82rem;
}
.pager-sheet a .n {
  color: var(--gold-light);
  font-weight: 700;
  min-width: 1.6em;
}
.pager-sheet a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.pager-sheet a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pager-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  border: none;
  /* border: 1px solid var(--gold-light); */
  border-radius: 999px;
  padding: 0.7rem;
  /* box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); */
  cursor: pointer;
  width: 200px;
  margin: 0 auto;

  @media (max-width: 899px) {
   padding-top: 5px !important;
  }
}
.pager-num {
  font-size: 0.7rem;
  font-weight: 600;
     color: #8a93a1;
  margin-top: 0.2rem;
  font-family: "Roboto", sans-serif;
}
.pager-sep {
  font-size: 0.8rem;
  transform: translateY(9px);
  color: var(--navy);
  
  @media (max-width: 899px) {
    font-size: 0.6rem;
     transform: translateY(3px);
  }
}
.pager-name {
  display: block;
  font-size: 18px;
  font-family: "Constantia", sans-serif;
  font-weight: 500;
  color: var(--navy);
  max-width: 46vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  height: 20px;
}

@media (min-width: 900px) {
  .pager-num {
    font-size: 24px;
  }
.pager-info,
  .pager-name {
    display: none;
  }
}

.pager-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  width: 100%;
  transform: translateY(0px);
  
  @media (max-width: 899px) {
    transform: translateY(-5px);
  }

  .pager-info {
    font-size: 0.6rem;
    font-weight: 700;
    color: #8a93a1;
    margin-top: 0.5rem;
  }
}
.pager-page-wrapper {
  display: flex;
  gap: 5px;
  justify-content: center;
  width: 50%;
  margin: 5px 0;
  font-family: "Constantia", sans-serif;
  color: var(--navy);
}

.footer {
  background-color: #193347;
  width: 100vw;
  padding: 0.5rem 1rem;
  text-align: center;
  color: #fff;
  font-family: "Constantia", sans-serif;
  font-size: 1rem;
  display: none;
}
.mobile-pager.is-cover .footer {
  /* display: none; */
}

/* ---------- photo gallery lightbox ---------- */
.photo-grid img,
img.hero-photo {
  cursor: zoom-in;
}
.photo-grid img:focus-visible,
img.hero-photo:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
html.lb-open {
  overflow: hidden;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 22, 48, 0.94);
  /* .lb-zoom-controls/.lb-count sit outside <figure>, absolutely positioned
     off the viewport bottom (not the figure), so they don't get pushed
     down by a tall caption - the figure just has to stay out of their way.
     The figure is centered in this box's content area, so what actually
     keeps it clear of the controls is this bottom padding, not .lb-img's
     own max-height: the controls' top edge sits ~5rem above the viewport
     bottom (2.6rem offset + 2.4rem button height), so padding-bottom needs
     to reserve at least that much, plus a little breathing room. */
  padding: 3.5rem 1rem 5.5rem;
}
.lightbox[hidden],
.lightbox [hidden] {
  display: none !important;
}
.lb-figure {
  margin: 0;
  max-width: min(1200px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  /* last-resort safety clip: nothing inside should ever visually escape
     this box and land on the zoom controls outside it. */
  overflow: hidden;
}
.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 14rem);
  max-height: calc(100dvh - 14rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  background: #0e2138;
  /* flex items default to a content-based min-height, which stops a tall
     image from shrinking below its own intrinsic size even when the
     caption needs the room - min-height:0 lets flex-shrink actually do
     its job so the caption always wins the space it needs. */
  min-height: 0;
  flex-shrink: 1;
}
.lb-caption {
  max-width: 60rem;
  /* long captions used to grow past the reserved space below the image and
     end up hidden under the zoom controls (position:absolute, anchored to
     the viewport bottom, so they never move out of the way). Capping the
     caption's own height and scrolling the overflow keeps it inside its
     slot no matter how long the text is. */
  max-height: 4.5rem;
  overflow-y: auto;
  flex-shrink: 0;
  color: #e6ecf3;
  font-family: "Roboto", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.5;
  text-align: center;
}
.lb-count {
  position: absolute;
  bottom: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-light);
  font-family: "Roboto", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.lb-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  background: var(--navy-deep);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding-bottom: 4px;
  z-index: 99;
}
.lb-btn:hover,
.lb-btn:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  outline: none;
}
.lb-close {
  top: 0.8rem;
  right: 0.8rem;
  padding-top: 7px;
  padding-bottom: 4px;
}
.lb-prev {
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
}
.lb-next {
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
}
.lb-zoom-controls {
  position: absolute;
  bottom: 2.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 99;
}
.lb-zoom-controls .lb-btn {
  position: static;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.3rem;
}
.lb-btn:disabled,
.lb-btn:disabled:hover {
  opacity: 0.35;
  cursor: default;
  background: var(--navy-deep);
  border-color: var(--gold-light);
  color: #fff;
}
.lb-img.zoomed {
  cursor: grab;
}
.lb-img.zoomed.dragging {
  cursor: grabbing;
}

.blue-section {
  background-color: var(--navy-deep);
}
.blue-section {
  padding: 40px;
  color: #fff;
}
.blue-section a,
.blue-section p {
  color: #fff !important;
}
.blue-section.online-access h2 {
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 400;
  font-size: 24px;
}
@media (min-width: 900px) {
  .blue-section.online-access .article-columns {
    grid-template-columns: 15% 1fr;
  }
}

.blue-section.online-access .frame {
  padding: 20px;
  border: 1px solid #ffffff20;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .blue-section.online-access .article-columns > .article-images {
    order: 1 !important;

    display: flex;
    justify-content: center;
  }
}

#page-26 .photo-grid-wrap .promo-card,
#page-26 .photo-grid-wrap img {
  height: 100%;
  width: 100%;
  aspect-ratio: initial !important;
}

#page-27 {
  padding-bottom: 200px;

  @media (max-width: 899px) {
    padding-bottom: 0px;
  }
}

article.spread.lead-stories {
  .hero-panel {
    .page-kicker {
      display: none;
    }
    .hero-desk * {
      color: #fff !important;
    }
  }

  @media (min-width: 900px) {
    .hero-split {
      display: flex;
      height: 800px;
    }
    .hero-photo {
      /* object-position: bottom; */
    }
  }
}

.hero-mobile {
  display: none !important;
}
@media (max-width: 900px) {
  .hero-mobile {
    display: block !important;
  }
  .hero-desk {
    display: none !important;
  }
}
.hero-desk {
  position: relative;
  height: 800px;
  min-height: 800px;

  img {
    object-fit: cover;
    object-position: 40% center;
    width: 100%;
    height: 100%;
    display: block;
    height: 800px;
    min-height: 800px;

    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
  }

  .text {
    position: absolute;
    top: 50%;
    right: 8%;
    transform: translateY(-50%);
    color: #fff;
    pointer-events: none;

    max-width: 500px;
    margin-left: auto;

    @media (min-width: 1200px) {
      right: 15vw;
    }

    * {
      color: #fff;
    }
  }
}

#page-04 .hero-desk .text *:not(cite),
#page-19 .hero-desk .text *:not(cite) {
  color: var(--navy) !important;
}

#page-01 {
  position: relative;

  .only-mobile {
    display: none;

    @media (max-width: 899px) {
      display: block;

      position: absolute;
      top: 30px;
      left: 50%;
      transform: translateX(-50%);
      width: 90%;
    }

    img {
      width: 100%;
    }
  }

  @media (max-width: 899px) {
    .cover-left {
      min-height: 100vh !important;
    }
    .cover-right {
      display: none;
    }
  }
}
