/* schoolweb.page look "Bo-Kaap" (the default). A magazine spread in the school's colour.
   Desktop: .opening is two facing pages, the colour page (name, status, facts, buttons,
   next date) and the photo page, edge to edge. Phone: a photo strip, then the field.
   Each page has two colour fields: the opening one and .close joined to the footer.
   Between them the page alternates tint and white.
     paper  --accent-tint; --link passes on it
     white  the alternate band; --link passes on it
     field  the school colour, calmed, for any colour, in Chrome, Safari and Firefox.
            --inv is the inverse of --on-accent. An oklab mix of accent and --inv tells
            white-text colours from dark-text ones (L above or below 0.5) and gives back
            the accent's own L (La).
            - white-text colours: L capped at 0.5 (towards black)
            - dark-text mid tones (La under 0.75: orange, pink, sky): also L 0.5, white text
            - light colours (yellow, lime, cyan): 20% towards white, L at most 0.9
            - near-white (La over 0.92): an ink field, L 0.28, in the colour's hue
            Then calmed: chroma at most 0.12, and a white-text field at most L 0.42.
            Warm hues (red to ochre, hue 15 to 70) are not calmed: they keep chroma up
            to 0.18 and their L (at most 0.5), so orange stays orange and not brown.
            --on-field follows the field's L: white under 0.62, else #111. Fields sit
            under 0.5 or over 0.75, so text is 5.5:1 or more. No support: --accent.
   One family, Hanken Grotesk (variable). */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../../fonts/HankenGrotesk.398face9b48b.woff2") format("woff2"); }
@font-face { font-family: "Rare Latin"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../../fonts/NotoSansRare.746d07864173.woff2") format("woff2");
  unicode-range: U+0149, U+0300-036F, U+1E00-1EFF; }

:root {
  --serif: "Hanken Grotesk", "Rare Latin", "Hanken Grotesk fallback", system-ui, sans-serif;
  --sans: "Hanken Grotesk", "Rare Latin", "Hanken Grotesk fallback", system-ui, sans-serif;
  --paper: var(--accent-tint);
  --white: #fff;
  --line: #d9dbe1;
  --muted: #4a5160;
  --ink: #161a24;
  --field: var(--accent);
  --on-field: var(--on-accent);
  --prose: 31em;
}
@supports (color: color-mix(in srgb, red, red)) { :root { --line: color-mix(in srgb, var(--accent) 16%, #d9dbe1); } }
@supports (color: oklab(from red l a b)) and (color: rgb(from red calc(255 - r) g b)) {
  :root {
    --inv: rgb(from var(--on-accent) calc((255 - r) * 255 / 238) calc((255 - g) * 255 / 238) calc((255 - b) * 255 / 238));
    --x: color-mix(in oklab, var(--accent), var(--inv));
    --field-raw: oklab(from var(--x) calc((min((2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.5) * (1 - clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1)) + 0.28 * clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1)) + (clamp(0, (l - 0.5) * 1000, 1) * (1 - clamp(0, (0.75 - (2 * l - clamp(0, (l - 0.5) * 1000, 1))) * 1000, 1)) * (1 - clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1))) * (min((2 * l - clamp(0, (l - 0.5) * 1000, 1)) + (1 - (2 * l - clamp(0, (l - 0.5) * 1000, 1))) * 0.2, 0.9) - (min((2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.5) * (1 - clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1)) + 0.28 * clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1)))) calc(2 * a * ((min((2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.5) / max((2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.001) * (1 - clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1)) + 0.5 * clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1)) + (clamp(0, (l - 0.5) * 1000, 1) * (1 - clamp(0, (0.75 - (2 * l - clamp(0, (l - 0.5) * 1000, 1))) * 1000, 1)) * (1 - clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1))) * (((1 - min((2 * l - clamp(0, (l - 0.5) * 1000, 1)) + (1 - (2 * l - clamp(0, (l - 0.5) * 1000, 1))) * 0.2, 0.9)) / max(1 - (2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.05)) - (min((2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.5) / max((2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.001) * (1 - clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1)) + 0.5 * clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1))))) calc(2 * b * ((min((2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.5) / max((2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.001) * (1 - clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1)) + 0.5 * clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1)) + (clamp(0, (l - 0.5) * 1000, 1) * (1 - clamp(0, (0.75 - (2 * l - clamp(0, (l - 0.5) * 1000, 1))) * 1000, 1)) * (1 - clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1))) * (((1 - min((2 * l - clamp(0, (l - 0.5) * 1000, 1)) + (1 - (2 * l - clamp(0, (l - 0.5) * 1000, 1))) * 0.2, 0.9)) / max(1 - (2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.05)) - (min((2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.5) / max((2 * l - clamp(0, (l - 0.5) * 1000, 1)), 0.001) * (1 - clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1)) + 0.5 * clamp(0, ((2 * l - clamp(0, (l - 0.5) * 1000, 1)) - 0.92) * 1000, 1))))));
    /* calm: chroma at most 0.12, and a white-text field at most L 0.42, so a bright colour
       reads as the school's colour without filling the screen with it. The warm weight,
       min(clamp(0, h / 15, 1), clamp(0, (90 - h) / 20, 1)), is 1 from hue 15 to 70 and 0
       from 90: it lifts the chroma cap to 0.18 and leaves L as it is */
    --field: oklch(from var(--field-raw)
      calc(l - max(0, l - 0.42) * clamp(0, (0.62 - l) * 1000, 1) * (1 - min(clamp(0, h / 15, 1), clamp(0, (90 - h) / 20, 1))))
      min(c, 0.12 + 0.06 * min(clamp(0, h / 15, 1), clamp(0, (90 - h) / 20, 1)))
      h);
    /* text on the field: white below L 0.62, else #111 (fields sit below 0.5 or above 0.75) */
    --on-field: oklab(from var(--field) clamp(0.178, (0.62 - l) * 1000, 1) 0 0);
  }
}

body { font-size: 1.0625rem; line-height: 1.55; background: var(--paper); }
h1, h2, h3 { font-weight: 760; letter-spacing: -.03em; line-height: 1.04; }
.btn { border-radius: 4px; font-weight: 700; }
/* the two buttons are one pair of equal halves */
.acts:not(.one) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* below 380 px a half cannot hold "WhatsApp us" on one line: one under the other */
@media (max-width: 379px) { .acts:not(.one) { grid-template-columns: minmax(0, 1fr); } }
.status { border-radius: 4px; display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; }
.status span, .first .status span { grid-column: 2; margin-left: 0; justify-self: start; flex-basis: auto; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }

/* ---------- header ---------- */
.top { background: var(--paper); border-bottom: 0; }
.top .name { font-weight: 760; letter-spacing: -.025em; }
.nav > nav { background: var(--paper); }

/* ---------- the field: name, first facts, page titles, contact, footer ---------- */
.hero-text, .first, .page-head, .close, .foot {
  --on: var(--on-field);
  --on-deep: var(--on-field);
  --hair: var(--on-field);
  background: var(--field); color: var(--on);
}
@supports (color: color-mix(in srgb, red, red)) { .hero-text, .first, .page-head, .close, .foot { --hair: color-mix(in srgb, var(--on-field) 30%, var(--field)); } }
:is(.first, .page-head, .close) :where(h1, h2, h3, a:not(.btn, .status), address, p, b) { color: var(--on); }
:is(.hero-text, .first, .page-head, .close, .foot, .block:has(> .status:only-child)) :focus-visible { outline-color: var(--on); }
.first .share, .visit .map { color: var(--on); }
:is(.first, .close) .btn.main { background: var(--on-field); color: var(--field); box-shadow: none; }
:is(.first, .close) .btn.alt { background: transparent; color: var(--on-field); box-shadow: inset 0 0 0 2px var(--on-field); }
.first a.status span, .block a.status span { color: inherit; }
.first .tile, .close .tile { background: var(--on-field); color: var(--field); border-radius: 4px; }
main :is(.first, .close) .tile.tile :is(b, small) { color: var(--field); }
:is(.first, .close) .rows a { border-color: var(--hair); color: var(--on-field); }
:is(.first, .close) .rows a :is(.ic, small) { color: var(--on-field); }
.close .hours { color: var(--on-field); }

/* ---------- phone: a photo strip, then the colour field ---------- */
.hero { display: block; min-height: 0; background: var(--field); overflow: visible; }
.hero img { position: relative; inset: auto; display: block; height: auto; aspect-ratio: 16 / 10; max-height: 300px; }
.hero.tall img { height: clamp(220px, 64vw, 440px); aspect-ratio: auto; }
.hero-text { padding: 18px var(--pad) 0; }
.hero h1 { color: var(--on-field); text-shadow: none; font-size: 2.5rem; font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.hero h1.long { font-size: 2rem; line-height: 1; letter-spacing: -.035em; }
.hero .town { font-size: 1rem; font-weight: 600; margin-top: 8px; }
.hero.bare, .hero.tall { min-height: 0; }
.hero.bare .hero-text { padding: 40px var(--pad) 0; background: var(--field); color: var(--on-field); }
.hero.bare h1 { color: var(--on-field); }

.first { padding-top: 16px; padding-bottom: 32px; }
.first .lines { margin-top: 12px; }
.first .lines p { font-size: 1rem; line-height: 1.4; }
.first .lines p + p { margin-top: 2px; }
.first .acts { margin-top: 14px; }
.first .next { border: 0; border-top: 2px solid var(--hair); border-radius: 0; padding: 18px 0 0; margin-top: 18px; }
.first .next h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.first > :first-child { margin-top: 0; }

/* an inner page's title: the same field, the same voice */
.page-head { border-bottom: 0; padding: 44px var(--pad) 26px; }
.page-head h1 { color: var(--on-field); font-size: 2.75rem; font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.page-head + .first { padding-top: 6px; }

.block:has(> .status:only-child) { --on: var(--on-field); background: var(--field); padding-bottom: 0; }
.block:has(> .status:only-child) + .close { padding-top: 48px; }

/* About: the status follows Ask the office, so the heading leads the closing field */
main:has(> .block > .status:only-child) { display: flex; flex-direction: column; }
main > .block.block:has(> .status:only-child):has(+ .close) { order: 1; padding-top: 0; padding-bottom: 48px; }
main > .block:has(> .status:only-child) + .close.close { padding-bottom: 20px; }

/* a one-page site: main grows to the footer, so it stays on the field */
main:not(:has(> .block, > .pair)) { background: var(--field); }
/* phone: on a one-page site the photo grows, so no empty field sits above the footer */
@media (max-width: 959px) {
  main:not(:has(> .block, > .pair)) { display: flex; flex-direction: column; }
  main:not(:has(> .block, > .pair)) > .opening { flex: 1; display: flex; flex-direction: column; }
  main:not(:has(> .block, > .pair)) .hero { flex: none; display: flex; flex-direction: column; justify-content: flex-start; }
  main:not(:has(> .block, > .pair)) .hero img { height: calc(64vw + 60px); max-height: 480px; object-fit: cover; }
  main:not(:has(> .block, > .pair)) .first { flex: 1; justify-content: flex-start; }
  /* the next date fits the first screen: Send to a friend moves to the end */
  .opening > .first { display: flex; flex-direction: column; }
  .opening > .first > .share { order: 1; align-self: center; }
  .opening > .first > .next { margin-top: 14px; padding-top: 14px; }
  .opening > .first > .next + .share { margin-top: 10px; }
  /* the events list ends on a rule, so the newsletter needs none of its own */
  #coming-up + #newsletter .letter { border-top: 0; padding-top: 0; }
}

/* ---------- the quiet middle: tint and white ---------- */
.block.band, .pair { background: var(--white); }
.pair > .block.band { background: none; }
/* the closing field wins over any band class it also carries */
.block.close.close { background: var(--field); }
.first .next p { color: var(--on-field); color: color-mix(in srgb, var(--on-field) 85%, var(--field)); }
/* phone: Photos goes back to the tint, so tint and white alternate */
.block.band:has(> .photos) { background: var(--paper); }
.pair > .block + .block { padding-top: 0; }
.dates .tile { background: var(--field); color: var(--on-field); border-radius: 4px; }
.dates .tile :is(b, small) { color: var(--on-field); }
/* second#DES-50: an inner page's date keeps the same filled tile, in a band or not */
.block > .next .tile { background: var(--field); color: var(--on-field); border-radius: 4px; }
.block > .next .tile :is(b, small) { color: var(--on-field); }
/* an inner page's date: a rule above it, like the tables and lists, not a card */
.block > .next { border: 0; border-top: 2px solid var(--line); border-radius: 0; padding: 18px 0 0; }
.letter { background: transparent; border: 0; border-top: 2px solid var(--line); border-radius: 0; padding: 18px 0 0; }
.foot .who b { font-size: 1.3125rem; font-weight: 760; letter-spacing: -.03em; line-height: 1.1; }
/* the footer menu is a quiet list under the name, not a second header */
.foot nav { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 8px; border: 0; }
.foot nav a { border: 0; font-size: .9375rem; font-weight: 400; color: var(--on-field); color: color-mix(in srgb, var(--on-field) 82%, var(--field)); }
.foot nav a:hover { color: var(--on-field); text-decoration: underline; text-underline-offset: 3px; }
.foot nav a[aria-current="page"] { text-decoration: none; }
.foot .small { color: var(--on-field); color: color-mix(in srgb, var(--on-field) 82%, var(--field)); }
/* the closing field and the footer read as one: a hairline between them */
main:has(> .close:last-child) + .foot,
main:not(:has(> .block, > .pair)) + .foot { border-top: 1px solid var(--hair); }

.block h2 { font-size: 2rem; }
.block:not(.band, .first, .close) + .block:not(.band, .close) { border-top: 1px solid var(--line); }
.block.band .items .mark, .block.band .tile:not(.dates .tile, .next .tile) { background: var(--paper); color: var(--deep); }
.facts, .table, .list { border-top: 3px solid var(--edge); }
.facts b { font-size: 1.625rem; font-weight: 780; letter-spacing: -.035em; }
.table dd { font-weight: 760; letter-spacing: -.03em; }
.table.plain dd { font-weight: 400; letter-spacing: 0; }
#hours .table dd { white-space: nowrap; }
/* phone: a role sits under the name, so neither wraps */
@media (max-width: 519px) {
  #team .table div { flex-direction: column; align-items: flex-start; gap: 2px; }
  #team .table dd { text-align: left; }
  /* three facts share one row */
  .facts:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts:has(> :nth-child(3):last-child) > div { grid-column: auto; padding: 12px 8px 14px; border-left: 1px solid var(--line); }
  .facts:has(> :nth-child(3):last-child) > div:first-child { padding-left: 0; border-left: 0; }
  .facts:has(> :nth-child(3):last-child) > div:last-child { padding-right: 0; }
  .facts:has(> :nth-child(3):last-child) b { font-size: 1.1875rem; }
}
.lede { font-family: var(--sans); font-size: 1.25rem; line-height: 1.5; letter-spacing: -.01em; }
.welcome { border-left: 4px solid var(--edge); }
.welcome p { font-family: var(--sans); }
.byline b, .tile b { font-weight: 800; letter-spacing: -.03em; }
.steps li::before { font-weight: 800; background: transparent; }
.items .mark { border-radius: 4px; background: var(--paper); color: var(--deep); }
/* a band that is also a field (Visit us on the home page, a contact block) keeps the field's text */
.close.block :is(a:not(.btn, .status), .cal) { color: var(--on); }

/* ---------- photos run edge to edge ---------- */
.block:has(> .photos) { padding-inline: 0; padding-bottom: 0; }
.block:has(> .photos) > .head2 { padding-inline: var(--pad); }
.photos { border-radius: 0; gap: 3px; margin-top: 18px; }
.block:has(> .gallery) { padding-inline: 0; }
.block:has(> .gallery) > :not(.gallery, .more-photos) { margin-inline: var(--pad); }
.block:has(> .gallery) .more-photos > summary { width: auto; margin-inline: var(--pad); }
.gallery { gap: 18px 3px; }
.gallery img { border-radius: 0; }
.gallery figcaption { padding-inline: 12px; color: var(--muted); }

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  .top { min-height: 72px; }
  .top .name { font-size: 1.25rem; }
  .top-links a { font-weight: 550; }
  /* Visit us: the buttons keep their own height beside the address */
  .visit > .acts { align-self: start; }
  .top-links a[aria-current="page"]::after { bottom: 4px; height: 3px; border-radius: 0; background: var(--link); }

  /* the first screen: two facing pages, colour left, photo right. The colour page is its own
     grid area (main::before), so spare height splits above the name and below the date. */
  .opening { container-type: inline-size; --side: max(var(--pad), (100cqw - 1120px) / 2); }
  .opening:has(> .hero) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; background: var(--field); }
  .opening > .hero { grid-column: 1 / -1; grid-row: 1 / span 2; display: grid; grid-template-columns: subgrid; grid-template-rows: subgrid; background: none; }
  /* no subgrid (Chrome before 117, Safari before 16): the hero's photo and name sit on the
     opening's grid directly, in the same cells */
  @supports not (grid-template-columns: subgrid) {
    .opening > .hero { display: contents; }
  }
  .hero img, .hero.tall img { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; width: 100%; height: auto; aspect-ratio: auto; min-height: min(calc(100svh - 72px), 820px); object-fit: cover; }
  .hero-text { grid-column: 1; grid-row: 1; align-self: end; padding: 64px 56px 0 var(--side); background: none; }
  /* from 1280 the colour page's text column stays 504 px wide (--side takes the rest), so
     the name and the facts stop growing at their 1280 size */
  .hero h1 { font-size: clamp(3.5rem, 5.4vw, 4.32rem); }
  .hero h1.long { font-size: clamp(2.5rem, 3.4vw, 2.72rem); }
  .hero .town { font-size: 1.125rem; margin-top: 14px; }
  .opening > .first { position: relative; grid-column: 1; grid-row: 2; align-self: start; display: flex; flex-direction: column; align-items: stretch; padding: 28px 56px 64px var(--side); border-bottom: 0; background: none; }
  .opening > .first > * { margin-top: 0; }
  .opening > .first > .lines { margin-top: 14px; }
  .opening > .first > .acts { margin-top: 20px; }
  .opening > .first > .share { align-self: start; margin-top: 4px; }
  .opening > .first > .next { margin-top: 24px; padding: 22px 0 0; border: 0; border-top: 2px solid var(--hair); max-width: 460px; }

  /* no photo: the name page faces the facts page */
  .opening > .hero.bare .hero-text { grid-row: 1 / span 2; align-self: stretch; padding: 96px 56px 64px var(--side); }
  .opening:has(> .hero.bare) > .first { grid-column: 2; grid-row: 1 / span 2; justify-content: end; padding: 96px var(--side) 64px 56px; border-left: 2px solid var(--hair); }

  .first { padding: 40px var(--side) 56px; border-bottom: 0; }
  .first .next { margin-top: 0; padding-top: 0; border-top: 0; border-left: 2px solid var(--hair); padding-left: 28px; }

  /* inner pages: the title on a wide field, then a two-column page: heading left */
  main:has(> .page-head) { --side: max(var(--pad), (100cqw - 1120px) / 2); }
  main:has(> .page-head) .block:has(> .status:only-child) { padding-bottom: 0; }
  .page-head { padding: 88px var(--side) 48px; }
  .page-head h1 { font-size: clamp(4rem, 6.4vw, 5.75rem); }
  /* MP-35: with a photo, an inner page opens as Home does, two facing pages: the title, and
     a status or the contact rows under it, on the colour page; the photo on the other, edge
     to edge. The page head spans the title's row and the one under it, so the photo does
     too. (.head-photo twice: it must win over the About page's flex column below.) */
  main:has(> .page-head > .head-photo.head-photo) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-content: start; }
  main:has(> .page-head > .head-photo) > * { grid-column: 1 / -1; }
  main > .page-head:has(> .head-photo) { grid-row: 1; display: grid; grid-template-columns: subgrid; grid-template-rows: subgrid; padding: 0; }
  main > .page-head:has(> .head-photo):has(+ .first) { grid-row: 1 / span 2; }
  .page-head:has(> .head-photo) > h1 { grid-column: 1; grid-row: 1; display: flex; align-items: flex-end; min-height: clamp(340px, 28vw, 460px); padding: 88px 56px 48px var(--side); }
  .page-head:has(> .head-photo):has(+ .first) > h1 { min-height: 0; }
  .page-head > .head-photo { display: block; grid-column: 2; grid-row: 1 / -1; width: 100%; height: 0; min-height: 100%; object-fit: cover; }
  main > .page-head:has(> .head-photo) + .first { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding: 0 56px 64px var(--side); }
  main > .page-head:has(> .head-photo) + .first > * { margin: 0; max-width: none; }
  main > .page-head:has(> .head-photo) + .first > .status { align-self: start; }
  @supports not (grid-template-columns: subgrid) {
    main > .page-head:has(> .head-photo) { display: contents; }
    .page-head:has(> .head-photo) > h1 { background: var(--field); }
    main > .page-head:has(+ .first) > .head-photo { grid-row: 1 / span 2; }
  }
  main:has(> .page-head) .block {
    display: grid; grid-template-rows: none; grid-template-columns: 280px minmax(0, 1fr); column-gap: 72px; align-items: start;
  }
  main:has(> .page-head) .block.block.block > * { grid-column: 2; grid-row: auto; margin-inline: 0; }
  main:has(> .page-head) .block.block.block > h2 { grid-column: 1; grid-row: 1 / span 8; position: sticky; top: 24px; margin: 0; }
  main:has(> .page-head) .block.block.block > h2 + * { margin-top: 0; }
  main:has(> .page-head) .block:has(> .gallery, > .list) { --side: max(var(--pad), (100cqw - 1120px) / 2); }
  /* cross-browser#8: an engine without container units cannot read --side above; the
     window's width stands in (a custom property takes no fallback line) */
  @supports not (width: 1cqw) {
    .opening { --side: max(var(--pad), (100vw - 1120px) / 2); }
    main:has(> .page-head), main:has(> .page-head) .block:has(> .gallery, > .list) {
      --side: max(var(--pad), (100vw - 1120px) / 2);
    }
  }
  main:has(> .page-head) .block.block.block.block > .gallery { grid-column: 1 / -1; }
  main:has(> .page-head) .block.block.block.block:has(> .gallery) > h2 { grid-column: 1 / -1; grid-row: auto; position: static; margin-bottom: 28px; }
  main:has(> .page-head) .block:has(> .gallery) { padding-inline: 0; }
  main:has(> .page-head) .block:has(> .gallery) > :not(.gallery, .more-photos) { margin-inline: 0; }
  main:has(> .page-head) .block:has(> .gallery) > h2 { padding-left: var(--side); }
  main:has(> .page-head) .block:has(> .gallery) > :not(h2, .gallery, .more-photos) { padding-right: var(--side); }
  main:has(> .page-head) .block.block.block.block > .more-photos { grid-column: 1 / -1; }
  /* the photos run edge to edge; the outer columns' captions start and end on the page grid */
  main:has(> .page-head) .gallery > :nth-child(3n + 1) figcaption { padding-left: var(--side); }
  main:has(> .page-head) .gallery > :nth-child(3n) figcaption { padding-right: var(--side); }
  main:has(> .page-head) .block > :is(p, .prose, .lede, .welcome, .note, .text) { max-width: 62ch; }
  /* a section without a heading (About's opening text, the hours) starts on the left edge,
     the lead and the body at one measure */
  main:has(> .page-head) .block.block.block:not(:has(> h2, > .status:only-child)) > * { grid-column: 1 / -1; max-width: 62ch; }
  main:has(> .page-head) .block.block.block:not(:has(> h2, > .status:only-child)) > .items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); column-gap: 56px; max-width: none; }
  /* lists, tables, dates and buttons all end on the content column's right edge */
  main:has(> .page-head) .block.block.block > :is(.steps, .next, .acts, .rows, .status, .table, .list, .docs, .items, .campuses) { max-width: none; }
  main:has(> .page-head) .block > .steps li { max-width: none; padding-right: max(0px, 100% - 65ch); }
  main:has(> .page-head) .block:not(:has(> h2)) > .items li { border-bottom: 1px solid var(--line); margin-top: -1px; }
  .lede { max-width: 54ch; }
  /* Welcome keeps its facts beside the text, however few, so the right half is never empty */
  .block.intro.intro:has(> .facts) { display: grid; }
  .block.intro.intro:has(> .facts) > * { max-width: none; }

  .block { padding-block: 80px; }
  .block h2 { font-size: 2.5rem; }
  .facts b { font-size: 2rem; }
  /* three facts sit in one row, so none is left alone on a second */
  .facts:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts:has(> :nth-child(3):last-child) > div { grid-column: auto; padding: 14px 14px 16px; }
  .facts:has(> :nth-child(3):last-child) > div:first-child { padding-left: 0; }
  .facts:has(> :nth-child(3):last-child) > div:last-child { padding-right: 0; border-left: 1px solid var(--line); }
  .facts:has(> :nth-child(3):last-child) b { font-size: clamp(1.375rem, 2.2vw, 1.76rem); }

  /* the same split as Welcome and Visit us */
  .pair { padding-block: 80px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* the newsletter's rule sits level with the events' rule, under the heading */
  .pair > .block:last-child { padding-top: calc(2.5rem * 1.04 + 14px); }
  .block.band, .pair { background: none; }
  .pair, .pair.band-wide, .block.band-wide { background: var(--white); }
  .pair > .block.band-wide { background: none; }
  .block.close.close { background: var(--field); }

  .block:has(> .photos) { padding-inline: 0; padding-bottom: 0; }
  .block:has(> .photos) > .head2 { padding-inline: var(--side); }
  .photos { margin-top: 28px; }
  /* three photos a row at one size: six make two rows, none cut to a sliver */
  .photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .photos .wide { grid-column: auto; }
  .photos img, .photos .wide { aspect-ratio: auto; height: clamp(260px, 25vw, 360px); }
  .photos.two img { height: clamp(360px, 36vw, 540px); }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 24px 3px; }
  .block:has(> .gallery) .more-photos > summary { margin-inline: auto; max-width: 560px; }

  .foot { display: block; padding: 56px var(--side) 40px; }
  .foot .who b { font-size: 1.625rem; }
  .foot nav { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
