/* schoolweb.page look "Braamfontein". Loaded after classic.css.
   A printed poster. The school's name is the one big thing: a compressed black
   wordmark, upper case, as wide as the page, on a flat field of the school's
   colour. Under it a strict grid of heavy rules, with headings in the same
   compressed cut and dates as big numerals. Text stays plain and calm.
   One family, Archivo: its width axis gives the compressed display and the
   normal-width text. A school that picks other fonts gets a smaller wordmark
   (--fit), since those faces are wider. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 300 900; font-stretch: 62% 100%; font-display: swap;
  src: url("../../fonts/Archivo.da167322735d.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: "Archivo", "Rare Latin", "Archivo fallback", system-ui, sans-serif;
  --sans: "Archivo", "Rare Latin", "Archivo fallback", system-ui, sans-serif;
  --ink: #000;
  --muted: #4b4b4b;
  --line: #000;
  --hair: #c7c7c7;
  --rule: 6px;
  /* the rule a table or list opens on, under its heading */
  --inner: 2px;
  /* the field: the school's colour, flat; --on-accent passes AA on it */
  --field: var(--accent);
  --on-field: var(--on-accent);
  --prose: 30em;
}

/* The wordmark is sized for Archivo's compressed cut. Any other face is wider, so
   it takes 72% of the size. */
body { --fit: .72; }
@container style(--serif: "Archivo", "Rare Latin", "Archivo fallback", system-ui, sans-serif) {
  body { --fit: 1; }
}

body { font-size: 1.0625rem; line-height: 1.55; color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 800; letter-spacing: 0; line-height: 1.05; color: var(--ink); }
/* the display voice: compressed, black, upper case */
.hero h1, .page-head h1, .block h2, .foot .who b, .top .name {
  font-family: var(--serif); font-stretch: 62%; font-weight: 900; text-transform: uppercase;
  letter-spacing: .005em; text-wrap: balance;
}
/* the caps stack at a line height of 1, so the marks of Ê, Ô and Ë clear the line above */
h3 { font-weight: 750; letter-spacing: -.005em; }
a { text-decoration-thickness: 2px; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---- header: white, plain words ---- */
.top { min-height: 64px; border-bottom: 0; background: #fff; }
.top .name { font-size: 1.375rem; line-height: 1; font-stretch: 75%; font-weight: 850; }
.top .name.long { font-size: 1.0625rem; line-height: 1; }
/* on a phone the name takes the poster's narrowest cut, so it keeps to fewer lines */
@media (max-width: 959px) {
  .top .name { font-stretch: 62%; }
}
.top .menu { font-weight: 750; font-size: 1.0625rem; }
.nav > nav { padding: 0 var(--pad) 8px; background: var(--ink); border: 0; border-bottom: var(--rule) solid var(--field);
  /* a dim over the page below the sheet; a shadow, so a tap still reaches the page */
  box-shadow: 0 100vh 0 100vh rgb(0 0 0 / .45); }
.nav > nav a { min-height: 56px; border-bottom: 1px solid #3d3d3d; color: #fff;
  font-stretch: 62%; font-weight: 900; font-size: 2rem; text-transform: uppercase; line-height: 1; }
.nav > nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.nav > nav :focus-visible { outline-color: #fff; }

/* ---- the poster: the name on the field, then the photo at a hard edge ---- */
.hero, .hero.tall, .hero.bare { display: flex; flex-direction: column; justify-content: flex-start; min-height: 0; overflow: visible; background: var(--field); }
.hero-text, .hero.bare .hero-text { order: 1; padding: 30px var(--pad) 22px; background: var(--field); color: var(--on-field); container-type: inline-size; }
/* cross-browser#6: each size in container units follows a vw size for an engine without them */
.hero h1, .hero.bare h1 { color: var(--on-field); text-shadow: none; font-size: calc(14vw * var(--fit)); font-size: calc(15cqi * var(--fit)); line-height: 1; }
.hero h1.long { font-size: calc(10.5vw * var(--fit)); font-size: calc(11.5cqi * var(--fit)); line-height: 1; }
.hero .town { margin-top: 16px; font-size: 1.0625rem; font-weight: 700; }
.hero img { order: 2; position: static; width: 100%; height: clamp(180px, 52vw, 340px); object-fit: cover; }
.hero.tall img { height: clamp(240px, 78vw, 480px); }
.hero-text :focus-visible { outline-color: var(--on-field); }

/* ---- the first screen's facts, on white ---- */
.first { padding: 22px var(--pad) 30px; }
.status { border-radius: 0; min-height: 52px; padding: 10px 14px; font-weight: 750;
  display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 10px; row-gap: 1px; }
.status::before { border-radius: 0; width: 10px; height: 10px; margin-top: .42em; align-self: start; }
/* a pale cut of the school's colour, so it sits with the field above; the
   square carries the state */
.status.open, .status.wait { background: var(--accent-tint); background: color-mix(in srgb, var(--accent) 9%, #fff); color: var(--ink); }
.status.open::before { background: var(--ink); }
.status.wait::before { background: var(--wait); }
.status span, .first .status span { grid-column: 2; margin-left: 0; justify-self: start; flex-basis: auto; font-weight: 500; }
.lines { margin-top: 14px; }
.acts { margin-top: 16px; gap: 8px; }
.btn { min-height: 56px; border-radius: 0; font-weight: 750; letter-spacing: 0; padding: 0 16px; }
.btn.main { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 3px var(--edge); }
.btn.alt { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 3px var(--accent); }
.btn.main:hover { background: var(--ink); color: #fff; }
.btn.alt:hover { background: var(--ink); color: #fff; }
.share { justify-content: flex-start; color: var(--ink); font-weight: 700; margin-top: 6px; }
.share .ic { color: var(--link); }

/* ---- dates: the day as a big numeral, the month under it ---- */
.date { grid-template-columns: 4.25rem minmax(0, 1fr); gap: 16px; align-items: start; }
.tile, .first .tile { display: flex; flex-direction: column-reverse; align-items: flex-start; width: auto; min-height: 0; padding: 0; border-radius: 0; background: none; color: var(--ink); }
.tile b { font-family: var(--serif); font-stretch: 62%; font-weight: 900; font-size: calc(4rem * var(--fit)); line-height: .8; margin: 0; letter-spacing: -.01em; }
.tile small { margin-top: 6px; color: var(--link); font-size: .9375rem; font-weight: 800; }
.date h2, .date h3 { font-size: 1.25rem; font-weight: 750; line-height: 1.2; }
/* the open day's heading is the school's own title, often a sentence: the item voice, as the newsletter's */
.block > h2:has(+ .next.date) { font-family: var(--sans); font-stretch: 100%; text-transform: none; font-size: 1.25rem; font-weight: 750; line-height: 1.2; letter-spacing: 0; }
.date p { color: var(--muted); }
.next { margin-top: 24px; padding: 16px 0 4px; border: 0; border-top: var(--rule) solid var(--ink); border-radius: 0; }
.block .next { border-top-width: var(--inner); }
.next .cal { color: var(--ink); font-weight: 700; }
.next .cal .ic { color: var(--link); }

/* ---- blocks: each opens on a heavy rule at the content's width ---- */
.block { position: relative; padding: 22px var(--pad) 52px; }
.block::before { content: ""; position: absolute; top: 0; left: var(--side, var(--pad)); right: var(--side, var(--pad)); height: var(--rule); background: var(--ink); }
/* no rule where a field or the black sheet already marks the start */
.block.close::before, :is(.block:has(> .photos))::before, .page-head + .block::before { content: none; }
/* a block that only holds the status has no heading for the rule to open */
.block:has(> .status:only-child)::before { content: none; }
.block.band, .pair, .pair.band-wide, .block.band-wide { background-color: transparent; }
.block h2 { font-size: calc(2.875rem * var(--fit)); line-height: 1; }
.block h2 + * { margin-top: 20px; }
.lede { font-family: var(--sans); font-size: 1.25rem; line-height: 1.45; font-weight: 500; letter-spacing: -.005em; }
.more { color: var(--ink); font-weight: 750; text-decoration-color: var(--link); }
.head2 { align-items: end; }
.head2 a { font-weight: 700; }

.facts { margin-top: 26px; border-top: var(--inner) solid var(--ink); }
.facts div { border-bottom: 1px solid var(--ink); }
.facts div:nth-child(even) { border-left: 1px solid var(--ink); }
.facts > div { min-width: 0; }
.facts b { font-stretch: 75%; font-weight: 850; font-size: clamp(1.375rem, 7.4vw, 1.875rem); line-height: 1; letter-spacing: -.01em; }
.facts span { color: var(--muted); }

.dates li { padding: 16px 0; border-top: 1px solid var(--ink); }
.dates li:first-child { border-top: var(--inner) solid var(--ink); }
.dates li:last-child { border-bottom: 1px solid var(--ink); }
.letter { padding: 0; background: none; border: 0; border-radius: 0; }
.letter svg { border-radius: 0; box-shadow: 0 0 0 1px var(--ink); }
.block .letter h2 { font-family: var(--sans); font-stretch: 100%; text-transform: none; font-size: 1.25rem; font-weight: 750; line-height: 1.2; letter-spacing: 0; }
.letter span { color: var(--ink); text-decoration-color: var(--link); font-weight: 750; }

/* ---- photos: a contact sheet on black, edge to edge ---- */
.block:has(> .photos) { padding: 24px 0 3px; background: var(--ink); color: #fff; }
.block:has(> .photos) > .head2 { padding-inline: var(--pad); }
.block:has(> .photos) h2, .block:has(> .photos) .head2 a { color: #fff; }
.block:has(> .photos) :focus-visible { outline-color: #fff; }
.photos { margin-top: 18px; gap: 3px; border-radius: 0; }

/* the photo opened large: the contact sheet's black, square buttons, the count as a numeral */
.lightbox, .lightbox::backdrop { background: #000; }
.lightbox button { border-radius: 0; background: #fff; color: #000; }
.lightbox button:hover { background: var(--field); color: var(--on-field); }
.lightbox .count { font-family: var(--serif); font-stretch: 62%; font-weight: 900; font-size: 1.375rem; line-height: 1; letter-spacing: .02em; word-spacing: .15em; color: #fff; }

/* ---- visit, contact: the closing field ---- */
.block.close, .block.close.band { background: var(--field); color: var(--on-field); padding-top: 36px; }
.close :is(h2, h3, p, address, .hours, .grades, a:not(.btn, .status)) { color: var(--on-field); }
.close .rows a, .close .rows a:last-child { border-color: var(--on-field); border-color: color-mix(in srgb, var(--on-field) 40%, var(--field)); }
.close .rows a:first-child { border-top: var(--inner) solid var(--on-field); }
.close .rows a :is(.ic, small), .close .share .ic { color: var(--on-field); }
.close .btn.main { background: var(--on-field); color: var(--field); box-shadow: none; }
.close .btn.alt { background: transparent; color: var(--on-field); box-shadow: inset 0 0 0 3px var(--on-field); }
.close .btn:hover { background: var(--ink); color: #fff; box-shadow: none; }
.close :focus-visible { outline-color: var(--on-field); }
.visit address { font-size: 1.1875rem; font-weight: 500; }
.visit .map { font-weight: 700; }
.rows a { font-weight: 700; border-top: 1px solid var(--ink); }
.rows a:first-child { border-top: var(--inner) solid var(--ink); }
.rows a:last-child { border-bottom: 1px solid var(--ink); }
/* an address in a narrow column: a narrower cut, so the part after the @ fits one line */
.rows a[href^="mailto:"] span { font-stretch: 87.5%; }

/* ---- inner pages: the title as a poster too ---- */
.page-head { padding: 40px var(--pad) 26px; background: var(--field); border: 0; container-type: inline-size; }
.page-head h1 { color: var(--on-field); font-size: calc(16vw * var(--fit)); font-size: calc(17cqi * var(--fit)); line-height: 1; letter-spacing: .005em; }
.page-head + .first { padding-top: 24px; padding-bottom: 28px; }
.page-head + .block { padding-top: 32px; }

.table { border-top: var(--inner) solid var(--ink); }
.table div { border-bottom: 1px solid var(--ink); padding: 14px 0; }
.table dt { font-weight: 400; }
.table dd { font-stretch: 75%; font-weight: 850; font-size: 1.625rem; line-height: 1; letter-spacing: -.01em; }
.table dd small { margin-top: 4px; font-stretch: 100%; letter-spacing: 0; line-height: 1.3; }
.table.plain dd { font-stretch: 100%; font-weight: 400; font-size: 1.0625rem; line-height: 1.4; letter-spacing: 0; }
#hours .table dd { white-space: nowrap; }
/* on a phone the role goes under the name, so neither wraps beside the other */
@media (max-width: 519px) {
  #team .table div { display: block; }
  #team .table dt { font-weight: 700; }
  #team .table dd { margin-top: 2px; text-align: left; }
}
/* beside or under the heading, the block's own rule is enough */
.block > h2 + :is(.table, .list) { border-top-width: 0; }
.block > h2 + :is(.items, .steps, .dates) > li:first-child,
.block > h2 + .docs > li:first-child > .doc,
.block > h2 + .rows > a:first-child { border-top-width: 0; }
.block > h2 + .next { border-top-width: 0; padding-top: 0; }
.list { border-top: var(--inner) solid var(--ink); }
.list li { border-bottom: 1px solid var(--ink); font-weight: 400; }
.steps li { border-top: 1px solid var(--ink); grid-template-columns: 2.75rem 1fr; padding: 14px 0; }
.steps li:first-child { border-top: var(--inner) solid var(--ink); }
.steps li:last-child { border-bottom: 1px solid var(--ink); }
.steps li::before { width: auto; min-height: 0; border-radius: 0; background: none; box-shadow: none; place-items: start;
  color: var(--link); font-family: var(--serif); font-stretch: 62%; font-weight: 900; font-size: calc(2.5rem * var(--fit)); line-height: .82; }
.doc { border-top: 1px solid var(--ink); }
.docs li:first-child .doc { border-top: var(--inner) solid var(--ink); }
.docs li:last-child .doc { border-bottom: 1px solid var(--ink); }
.doc .cover { border-radius: 0; box-shadow: 0 0 0 1px var(--ink); }
.doc b { font-weight: 750; }
.items li { border-top: 1px solid var(--ink); }
.items li:first-child { border-top: var(--inner) solid var(--ink); }
.items li:last-child { border-bottom: 1px solid var(--ink); }
.items .mark { border-radius: 0; background: none; color: var(--link); }
.items h3 { font-family: var(--sans); font-stretch: 100%; text-transform: none; font-size: 1.25rem; font-weight: 750; line-height: 1.2; letter-spacing: 0; }
.byline b { font-family: var(--serif); font-stretch: 75%; font-weight: 850; font-size: 1.5rem; }
.welcome { padding-left: 18px; border-left: var(--rule) solid var(--edge); }
.welcome p { font-family: var(--sans); font-size: 1.125rem; }
.gallery { gap: 18px 3px; }
.gallery img { border-radius: 0; }
.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 figcaption { padding-inline: 10px; }
/* public-a11y-2#8: an edge-to-edge photo keeps its whole focus ring on the screen */
.gallery a.zoom:focus-visible { outline-offset: -3px; }
.block .cal { color: var(--ink); text-decoration-color: var(--link); }
.block .cal .ic { color: var(--link); }
.note { color: var(--muted); }

/* ---- footer: black, the name as a small sign-off ---- */
.foot { background: var(--ink); color: #fff; --on-deep: #fff; padding-top: 40px; }
.foot .who b { font-size: calc(2rem * var(--fit)); line-height: 1; }
/* the links are a plain list under the name: small, regular and grey, with no
   mark on the current page, so they do not read as a second menu */
.foot nav { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 12px; border-top: 0; }
.foot nav a { padding-inline: 0; border-bottom: 0; font-size: .9375rem; font-weight: 400; color: #b8b8b8; }
.foot nav a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; }
.foot nav a[aria-current="page"] { text-decoration: none; }
/* on a phone, rows of three in columns, so no link is left alone on a line */
@media (max-width: 959px) {
  .foot nav { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); column-gap: 24px; }
}
/* the narrowest phones have no room for three columns: the links wrap as a
   plain row, so no word is pushed past the page's edge */
@media (max-width: 299px) {
  .foot nav { display: flex; }
}

/* a site with no menu is one short page: the poster already shows the name */
body:has(main .hero h1) .foot:not(:has(nav)) .who { display: none; }
body:has(main .hero h1) .foot:not(:has(nav)) { padding-top: 24px; }
body:has(main .hero h1) .foot:not(:has(nav)) .who + * { margin-top: 0; }

/* ---- desktop ---- */
@media (min-width: 960px) {
  body { font-size: 1.125rem; }
  .top { min-height: 80px; }
  .top .name { font-size: 1.75rem; }
  .top .name.long { font-size: 1.25rem; }
  .top-links { gap: 0; }
  .top-links a { font-weight: 700; font-size: 1.0625rem; color: var(--ink); }
  .top-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
  .top-links a[aria-current="page"]::after { left: 12px; right: 12px; bottom: 6px; height: 4px; border-radius: 0; background: var(--ink); }

  /* the opening: the name across the whole page, then the photo bleeding off the
     left edge beside the facts */
  /* the third column is the page margin, so the facts end where the name does */
  .opening { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr) var(--side); }
  .opening > .hero { display: contents; }
  .hero-text, .hero.bare .hero-text { grid-column: 1 / -1; grid-row: 1; padding: 56px var(--side) 36px; }
  /* design-director#2: a short laptop screen keeps the buttons on the first screen */
  .hero h1, .hero.bare h1 { font-size: calc(min(11.4vw, 145px, 14vh) * var(--fit)); font-size: calc(min(13cqi, 14svh) * var(--fit)); line-height: 1; }
  .hero h1.long { font-size: calc(min(5.5vw, 70px) * var(--fit)); font-size: calc(6.25cqi * var(--fit)); line-height: 1; }
  .hero .town { font-size: 1.25rem; margin-top: 22px; }
  .hero img, .hero.tall img { grid-column: 1; grid-row: 2; height: auto; min-height: 420px; max-height: none; align-self: stretch; }
  .opening > .first { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; justify-content: center; padding: 36px 0 48px 48px; border: 0; }
  .opening > .first > :first-child { margin-top: 0; }
  .opening > .first .acts { grid-template-columns: 1fr; margin-top: 20px; }
  .opening > .first > * { max-width: none; align-self: stretch; }
  /* no photo: the same column of facts, under the name at the left edge */
  .opening:has(> .hero.bare) > .first { grid-column: 1 / -1; padding: 36px var(--side) 56px; }
  .opening:has(> .hero.bare) > .first > :is(.status, .acts, .next) { max-width: 420px; }

  /* blocks: an index. The heading on the left third, the matter on the right */
  .block { padding: 28px var(--side) 88px; }
  .opening + * { margin-top: 72px; }
  .opening + .block.close { margin-top: 0; }
  /* small enough that a long word (Extramurals) fits the heading's third */
  .block h2 { font-size: calc(3.5rem * var(--fit)); }
  /* four classes: enough to win over classic's intro and wide-block rules */
  main .block.block.block.block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-template-rows: none; column-gap: 64px; align-content: start; align-items: start; }
  main .block.block > * { grid-column: 2; grid-row: auto; margin-inline: 0; max-width: none; }
  main:has(> .page-head) .block.block.block:has(> .gallery, > .list) > * { margin-inline: 0; }
  main .block.block > :is(h2, .head2) { grid-column: 1; grid-row: 1 / span 12; margin: 0; }
  main .block.block > h2 + * { margin-top: 0; }
  main .block.block > :is(p, .prose, .lede, .welcome, .note, .text) { max-width: 62ch; }
  /* the lede's larger size, held to the same measure as the text under it */
  main .block.block .lede { max-width: 56ch; }
  main .block.block > .acts, main .block.block > .rows, main .block.block > .status, main .block.block > .next { max-width: 560px; }
  main .block.block > .facts { margin-top: 32px; }
  main .block.block.block.block > .facts { max-width: none; }
  .steps li { max-width: none; }
  main .block.intro > .more { justify-self: start; }

  /* the pair: dates and newsletter side by side under one rule */
  .pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; padding: 0 var(--side); background: none; }
  main .pair > .block.block.block.block { display: block; padding: 28px 0 88px; }
  .pair > .block::before { left: 0; right: 0; }
  /* second#DES-72: one rule runs over both, so the newsletter without a poster heading does
     not stand under a rule of its own */
  .pair > .block:first-child:not(:last-child)::before { right: calc(-100% - 64px); }
  .pair > .block:last-child:not(:first-child)::before { content: none; }

  /* photos: the heading row, then the sheet edge to edge */
  main .block.block.block.block:has(> .photos) { display: block; padding: 40px 0 3px; background: var(--ink); }
  .block:has(> .photos) > .head2 { padding-inline: var(--side); }
  .photos, .photos.two { margin-top: 28px; }
}
/* one strip, however many: the first photo twice as wide. From 1200 px, so six photos in a
   row are not cut to slivers on a small laptop, which keeps the tablet's grid
   (second#DES-73) */
@media (min-width: 960px) and (max-width: 1199px) {
  /* six photos: the wide one over two rows, two beside it, three under */
  .photos.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .photos.n6 img { aspect-ratio: 3 / 2; }
  .photos.n6 .wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; height: 100%; }
}
@media (min-width: 1200px) {
  .photos, .photos.two { grid-template-columns: 2fr; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .photos img, .photos .wide, .photos.two img { grid-column: auto; grid-row: auto; aspect-ratio: auto; height: clamp(240px, 24vw, 340px); }
  .photos.two { grid-auto-columns: 1.5fr; }
  .photos.two img { height: clamp(320px, 32vw, 460px); }
}
@media (min-width: 960px) {

  /* Visit and contact: three columns on the field. The first is the index's
     heading third, so the second starts on the same line as every block above */
  main .block.block.block.close { grid-template-columns: calc((100% - 64px) / 3) minmax(0, 1fr) minmax(0, 1.25fr); padding-top: 56px; background: var(--field); }
  main .block.block.close > * { grid-column: 2; }
  main .block.block.close > h2 { grid-column: 1; grid-row: 1 / span 12; }
  main .block.block.close > :is(.acts, .rows) { grid-column: 3; margin-top: 0; }
  main .block.block.close > .acts { grid-row: 1; }
  main .block.block.close > .acts + .rows { grid-row: 2 / span 10; margin-top: 16px; }
  main .block.block.close:not(:has(> .acts)) > .rows { grid-row: 1 / span 10; }
  /* Home's Visit us with no address: the ways to reach the school lead the matter column,
     Send to a friend under them. Inner pages' closing blocks keep the rows under the buttons. */
  main:has(> .opening) .block.block.close:not(:has(> address, > .campuses)) > .rows { grid-column: 2; grid-row: auto; }
  /* campuses take both right columns; the buttons, rows and hours stack under
     the heading. The last row is 1fr so the campuses' height lands there and
     not between the heading and the buttons */
  main .block.block.block.block.close:has(> .campuses) { grid-template-rows: repeat(4, auto) 1fr; }
  main .block.block.close:has(> .campuses) > * { grid-column: 1; }
  main .block.block.close:has(> .campuses) > h2 { grid-row: 1; }
  main .block.block.close > .campuses { grid-column: 2 / -1; grid-row: 1 / -1; }
  main .block.block.close:has(> .campuses) > .acts { grid-row: 2; margin-top: 32px; grid-template-columns: 1fr; }
  main .block.block.close:has(> .campuses) > .acts + .rows { grid-row: 3; margin-top: 16px; }
  main .block.block.close:has(> .campuses):not(:has(> .acts)) > .rows { grid-row: 2 / 4; margin-top: 32px; }
  main .block.block.close:has(> .campuses) > .hours { grid-row: 4; margin-top: 20px; }
  main .block.block.close:has(> .campuses) > .share { grid-row: 5; align-self: start; }
  main .block.block.close > h2 + * { margin-top: 0; }

  /* inner pages: the same 1120 grid as home */
  main:has(> .page-head) { --side: max(var(--pad), calc((100% - 1120px) / 2)); }
  main:has(> .page-head) .block:has(> .gallery, > .list) { --side: max(var(--pad), calc((100% - 1120px) / 2)); }
  .page-head { padding: 72px var(--side) 44px; }
  .page-head h1 { font-size: calc(min(10.5vw, 134px) * var(--fit)); font-size: calc(12cqi * var(--fit)); }
  .page-head + .first { padding: 36px var(--side) 40px; border-bottom: 0; }
  main .block.block > h2 + :is(.table, .items, .docs, .steps, .dates, .list) { margin-top: -14px; }
  /* in the pair the heading sits above the list, not beside it */
  main .pair > .block.block > h2 + .dates { margin-top: 20px; }
  /* headless matter on an inner page starts on the matter column, like every block */
  main:has(> .page-head) > .first:not(.touch) { display: block; padding-left: calc(var(--side) + (100% - 2 * var(--side) - 64px) / 3 + 64px); }
  main:has(> .page-head) > .first .status { max-width: 560px; }
  /* contact: the buttons, then the rows, in the matter column */
  main:has(> .page-head) > .first.touch { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 64px; padding-bottom: 56px; }
  main:has(> .page-head) > .first.touch .acts { grid-column: 2; grid-row: 1; grid-template-columns: 1fr 1fr; max-width: none; }
  main:has(> .page-head) > .first.touch .rows { grid-column: 2; grid-row: 2; margin-top: 24px; max-width: none; }
  /* wide columns have room for whole words */
  .lines, .facts span, .rows small, .list li, .items p, .steps li, .table dt, .table dd, .note { hyphens: manual; }
  .page-head + .block { padding-top: 48px; }
  /* a lone status follows the block above at that block's own gap */
  main .block.block.block.block:has(> .status:only-child) { padding-top: 0; }
  main .block.block.block.block:has(> .gallery) { display: block; padding-inline: var(--side); }
  main .block.block:has(> .gallery) > h2 { margin-bottom: 32px; }
  main .block.block:has(> .gallery) .more-photos > summary { margin-inline: 0; max-width: 420px; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 24px 3px; }
  main .block.block > .list { grid-template-columns: repeat(2, 1fr); }

  .foot { display: block; padding: 64px var(--side) 40px; }
  .foot .who b { font-size: calc(2.5rem * var(--fit)); }
  .foot nav { margin-top: 12px; }
}
/* on a small laptop the closing block's third column holds one label a line */
@media (min-width: 960px) and (max-width: 1119px) {
  main .block.block.close > .acts:not(.one) { grid-template-columns: minmax(0, 1fr); }
}

/* design-director#2: on a short laptop screen the facts start at the photo's top, so both
   buttons stay on the first screen (the name gives up height above) */
@media (min-width: 960px) and (max-height: 900px) {
  .opening > .first { justify-content: flex-start; }
}

/* design-director#1: on a short phone screen the photo takes what the first screen leaves,
   so Call and WhatsApp stay on it (audit-public-css) */
@media (max-width: 599px) {
  :is(.hero, .hero.tall) img { max-height: max(120px, 100svh - 534px); }
}
