/* schoolweb.page look "classic". One look = one CSS file; the site's /theme.css sets its colours.
   Copied from docs/design/mockups/classic.css. Changes for real content: the fonts are the cut
   copies (VENDORED.md), text in the accent reads --link (the accent darkened until it passes AA
   on white), large areas (footer, a hero without a photo) sit on --deep with white text, and
   the block at the end. */

/* The contract for a look (code-quality#6). Every page loads this sheet, then the look's
   sheets (public/looks.py: LOOKS; Knightsbridge loads mayfair.css first), then the site's
   /theme.css.
   A look must:
   - live in looks/<key>.css, with its key in content.schemas.Look and a LookFiles entry
     (sheets, preloaded font, feel, photo sizes);
   - bring its own fonts (@font-face, files under public/fonts/, in VENDORED.md) and set
     --serif and --sans; a font the school chooses replaces both from /theme.css;
   - name each web font's stand-in right after "Rare Latin" in those stacks: "<font>
     fallback", and for a serif also "<font> fallback noto", declared below with the
     font's metrics, so nothing moves when the web font arrives;
   - take every colour from the school's variables, never a fixed hue: --accent,
     --on-accent, --link, --accent-tint, --band, --deep and --edge come from /theme.css on
     :root, so a look that changes them sets them on body. Text keeps AA contrast against
     any school colour (public/colour.py);
   - restyle the shared parts it changes, by these classes: .top, .home, .logo, .name,
     .top-links, .nav, .opening, .hero (.tall, .bare), .hero-text, .first, .status, .acts,
     .btn (.main, .alt), .page-head, .head-photo, .block, .band, .close, .table, .items,
     .list, .docs, .steps, .dates, .photos, .gallery, .lightbox and .foot;
   - pass public/tests/test_quality.py, which runs every look at every width.
   A look may set its own tokens (--field, --side, --fit, ...), and size things with
   container units if each has a fallback for an engine without them. It never adds
   markup, a script, an inline style or an image. */
@font-face { font-family: "Classic Serif"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../fonts/ClassicSerif.c3ca5f3a5833.woff2") format("woff2"); }
@font-face { font-family: "Classic Sans"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../fonts/ClassicSans.4b6f0c72e1bc.woff2") format("woff2"); }
/* Stand-ins sized to each web font's metrics, so the text does not move when the web font
   arrives (audit second#PERF-09). Every stack names them after "Rare Latin". A device uses
   the first one it has: Arial or Roboto (their metrics are within 0.4%) for a sans, Georgia
   (Mac, Windows, iPhone) then Noto Serif (Android) for a serif. Numbers from fontTools: the
   width of a sample line, and the hhea ascent and descent, over the stand-in's. Three were then
   tuned by measuring the looks' first screens in a browser: Jakarta 110%, DM Sans 100%,
   Instrument Sans 95%. local() fonts cost
   no download. */
@font-face { font-family: "EB Garamond fallback"; src: local("Georgia");
  size-adjust: 86.86%; ascent-override: 115.93%; descent-override: 34.31%; line-gap-override: 0%; }
@font-face { font-family: "EB Garamond fallback noto"; src: local("Noto Serif"), local("NotoSerif-Regular");
  size-adjust: 80.55%; ascent-override: 125.02%; descent-override: 37.0%; line-gap-override: 0%; }
@font-face { font-family: "Newsreader fallback"; src: local("Georgia");
  size-adjust: 93.33%; ascent-override: 78.75%; descent-override: 28.39%; line-gap-override: 0%; }
@font-face { font-family: "Newsreader fallback noto"; src: local("Noto Serif"), local("NotoSerif-Regular");
  size-adjust: 86.54%; ascent-override: 84.93%; descent-override: 30.62%; line-gap-override: 0%; }
@font-face { font-family: "Classic Serif fallback"; src: local("Georgia");
  size-adjust: 100.09%; ascent-override: 103.51%; descent-override: 33.47%; line-gap-override: 0%; }
@font-face { font-family: "Classic Serif fallback noto"; src: local("Noto Serif"), local("NotoSerif-Regular");
  size-adjust: 92.81%; ascent-override: 111.63%; descent-override: 36.1%; line-gap-override: 0%; }
@font-face { font-family: "Jakarta fallback"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 110%; ascent-override: 94.36%; descent-override: 20.18%; line-gap-override: 0%; }
@font-face { font-family: "Hanken Grotesk fallback"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 101.26%; ascent-override: 98.76%; descent-override: 29.92%; line-gap-override: 0%; }
@font-face { font-family: "Archivo fallback"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 102.04%; ascent-override: 86.04%; descent-override: 20.58%; line-gap-override: 0%; }
@font-face { font-family: "Bricolage Grotesque fallback"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 100.05%; ascent-override: 92.95%; descent-override: 26.99%; line-gap-override: 0%; }
@font-face { font-family: "Figtree fallback"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 100.04%; ascent-override: 94.97%; descent-override: 24.99%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Sans fallback"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 95%; ascent-override: 102.11%; descent-override: 26.32%; line-gap-override: 0%; }
@font-face { font-family: "Manrope fallback"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 99.32%; ascent-override: 107.33%; descent-override: 30.21%; line-gap-override: 0%; }
@font-face { font-family: "DM Sans fallback"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 100%; ascent-override: 99.2%; descent-override: 31.0%; line-gap-override: 0%; }
@font-face { font-family: "Nunito fallback"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 99.25%; ascent-override: 101.87%; descent-override: 35.57%; line-gap-override: 0%; }
@font-face { font-family: "Classic Sans fallback"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 88.31%; ascent-override: 115.95%; descent-override: 45.29%; line-gap-override: 0%; }

:root {
  --accent: #1F3A93; --on-accent: #fff; --link: #1F3A93; --deep: #1F3A93; --on-deep: #fff; --edge: #1F3A93; --accent-tint: #EEF1F9; --accent-soft: #C9D2EE;
  --ink: #1D2230; --muted: #555D6D; --line: #E2E4EA; --paper: #fff; --band: #F4F5F8;
  --open: #1B5E35; --open-bg: #E6F2E9; --wait: #6E4700; --wait-bg: #FBEFD8;
  --serif: "Classic Serif", "Classic Serif fallback", "Classic Serif fallback noto", Georgia, "Times New Roman", serif;
  --sans: "Classic Sans", "Classic Sans fallback", -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: 18px;
  --prose: 31em;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
ul, ol { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
body { font-family: var(--sans); font-size: 1.0625rem; line-height: 1.5; color: var(--ink); background: var(--paper); }
h1, h2, h3 { font-family: var(--serif); font-optical-sizing: auto; font-weight: 600; letter-spacing: -.012em; line-height: 1.12; color: var(--ink); }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.ic { width: 20px; height: 20px; flex: none; }

/* the bar a member sees after "Open your site": the way back to editing. Fixed colours,
   the same in every look. */
.editbar { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px var(--pad); background: #111; color: #fff; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 1rem; font-weight: 600; }
.editbar a { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; color: #fff; }
.editbar :focus-visible { outline-color: #fff; }
/* A demo school opened by its own address: schoolweb's bar along the bottom, in schoolweb's
   own blue and sun (editor/static/editor/brand.css), not the school's colours. demo-frame.js marks the page "alone" outside a
   frame; without it, and in a frame, the bar stays away. The page keeps room under the footer. */
.demobar { display: none; }
.alone .demobar { position: fixed; z-index: 18; inset: auto 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); background: #2f5bb5; color: #fff; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.alone .demobar a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; background: #ffd23f; color: #14275a; font-weight: 700; text-decoration: none; }
.alone .demobar a:hover { background: #ffdd66; }
.alone .demobar :focus-visible { outline-color: #ffd23f; }
.alone body:has(> .demobar) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
@media (max-width: 520px) { .alone body:has(> .demobar) { padding-bottom: calc(98px + env(safe-area-inset-bottom)); } }

/* top bar */
.top { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 8px 8px var(--pad); background: var(--paper); border-bottom: 1px solid var(--line); }
/* logo and name are one Home link; the logo takes at most 40% of it, the name
   wraps. A long name needs 7em beside the logo, else it goes under it. */
.top .home { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; min-height: 44px; color: var(--ink); text-decoration: none; }
.top .logo { width: auto; height: 40px; max-width: 40%; object-fit: contain; object-position: left center; flex: none; }
.top .name { flex: 1 1 0; min-width: 0; font-family: var(--serif); font-weight: 600; font-size: 1.1875rem; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.top .name.long { flex-basis: 7em; font-size: 1rem; }
/* a logo that carries the name shows alone, taller, so its small lettering reads;
   the bar keeps its height on a phone */
/* Home hides the header's name beside the big one: the logo then has the link to itself */
.top .home:has(> .logo):has(> .name.sr) { min-width: 44px; }
/* no logo and no menu either: Home's header would be an empty bar, so it goes. The
   page's own heading carries the name. */
.top:has(.name.sr):not(:has(.logo, .nav)) { display: none; }
.top .home:has(> .name.sr) .logo { max-width: 52vw; }
.top .logo.alone { max-width: 100%; height: 48px; }
.top:has(.logo.alone) { padding-block: 6px; }
@media (min-width: 960px) { .top .logo.alone { height: 56px; } }
.skip { position: absolute; z-index: 30; top: 8px; left: 8px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: #111; color: #fff; font-weight: 600; transform: translateY(-200%); }
.skip:focus { transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.top .menu { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; background: none; font: inherit; font-weight: 500; color: var(--ink); }

/* hero: the photo sits behind the name. The name is in flow at the bottom and
   the hero grows with it. The shade is the text block's background: it starts
   --lift above the name and reaches half by --half, so any number of lines
   sits on it. */
.hero { --lift: 128px; --half: 98px; position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 280px; overflow: hidden; background: var(--deep); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-text { position: relative; z-index: 1; padding: var(--lift) var(--pad) 18px; color: #fff; background: linear-gradient(to bottom, rgb(12 16 32 / 0), rgb(12 16 32 / .5) var(--half), rgb(12 16 32 / .84)); }
.hero h1 { color: #fff; text-shadow: 0 1px 14px rgb(0 0 0 / .3); font-size: 2.25rem; line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; }
.hero h1.long { font-size: 1.75rem; line-height: 1.08; }
.hero .town { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 1.125rem; font-weight: 600; }
.hero .town .ic { width: 18px; height: 18px; }

/* the first screen's facts */
.first { padding: 18px var(--pad) 8px; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-radius: 10px; text-decoration: none; font-weight: 650; font-size: 1.0625rem; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.status span { margin-left: auto; font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
.status.open { background: var(--open-bg); color: var(--open); }
.status.wait { background: var(--wait-bg); color: var(--wait); }
/* Narrow columns break long words at the language of the text, never in headings or the name. */
.lines, .facts span, .rows small, .list li, .items p, .steps li, .table dt, .table dd, .note { hyphens: auto; }
/* only long words break, and never into a stub: "certifi-cate" and "clos-es" stay whole */
.lines, .facts span, .rows small, .list li, .items p, .steps li, .table dt, .table dd, .note { hyphenate-limit-chars: 12 5 5; -webkit-hyphenate-limit-before: 5; -webkit-hyphenate-limit-after: 5; }
/* an inner page's photo: hidden unless the look shows it, and then never fetched early */
.head-photo { display: none; }
h1, h2, h3, .name, .who b, .facts b { hyphens: manual; }
.lines { margin-top: 14px; }
.lines p + p { margin-top: 2px; }
.acts { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(max-content, 1fr); gap: 10px; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 16px; border-radius: 10px; font-weight: 650; font-size: 1.0625rem; text-decoration: none; }
.btn.main { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--edge); }
.btn.alt { background: var(--paper); color: var(--link); box-shadow: inset 0 0 0 1.5px var(--link); }
/* "WhatsApp us" and "Call us" never break; a look stacks the pair where it has no room */
.acts .btn { white-space: nowrap; }
.share { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; margin-top: 4px; font-weight: 600; }
.share .ic { width: 18px; height: 18px; }

/* a dated line */
.date { display: grid; grid-template-columns: 3.625rem 1fr; gap: 14px; align-items: center; }
.tile { display: grid; place-items: center; align-content: center; width: 3.625rem; min-height: 3.875rem; padding: 4px 0; border-radius: 10px; background: var(--accent-tint); color: var(--link); line-height: 1; }
.tile small { font-size: 0.875rem; font-weight: 650; }
.tile b { font-family: var(--serif); font-size: 1.6875rem; font-weight: 600; margin-top: 3px; }
.date h3, .date h2 { font-size: 1.25rem; }
.date p { color: var(--muted); font-size: 1rem; margin-top: 2px; }
.next { margin-top: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.next .cal { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-top: 2px; font-size: 1rem; font-weight: 600; }
.next .cal .ic { width: 16px; height: 16px; }

/* blocks below the first screen */
.block { padding: 36px var(--pad); }
.block.band { background: var(--band); }
.block h2 { font-size: 1.6875rem; }
.block h2 + * { margin-top: 14px; }
.lede { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.55; max-width: 62ch; }
.more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-weight: 600; }
.head2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.head2 a { font-weight: 600; font-size: 1rem; }

.facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--accent); }
.facts div { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { padding-right: 14px; }
.facts div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
.facts div:last-child:nth-child(odd) { grid-column: 1 / -1; padding-right: 0; }
.facts b { display: block; font-family: var(--serif); font-size: 1.375rem; font-weight: 600; line-height: 1.15; color: var(--ink); text-wrap: balance; }
.facts span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.9375rem; line-height: 1.3; }

.dates li { padding: 14px 0; border-top: 1px solid var(--line); }
.dates li:last-child { border-bottom: 1px solid var(--line); }

.letter { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: center; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.letter svg { width: 92px; height: 120px; border-radius: 3px; box-shadow: 0 1px 3px rgb(20 25 40 / .18); }
.block .letter h2 { font-size: 1.3125rem; }
.letter p { color: var(--muted); margin-top: 2px; }
.letter span { display: inline-block; margin-top: 8px; color: var(--link); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 10px; overflow: hidden; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photos .wide { grid-column: span 2; grid-row: span 2; }

.visit address { font-style: normal; font-size: 1.125rem; line-height: 1.45; }
.visit .map { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; }
.visit .hours { color: var(--muted); margin-top: 4px; }
.visit .acts { margin-top: 18px; }
.visit .share { justify-content: flex-start; margin-top: 10px; }
.rows { margin-top: 16px; }
.rows a { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.rows a:last-child { border-bottom: 1px solid var(--line); }
.rows a .ic { color: var(--link); }
.rows a small { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 0.9375rem; }

/* footer */
.foot { background: var(--deep); color: var(--on-deep); padding: 32px var(--pad) 28px; }
.foot .who { display: flex; align-items: center; gap: 12px; }
.foot .who b { min-width: 0; overflow-wrap: anywhere; font-family: var(--serif); font-size: 1.3125rem; font-weight: 600; line-height: 1.15; }
.foot nav { display: grid; grid-template-columns: 1fr 1fr; margin-top: 20px; border-top: 1px solid currentColor; border-top: 1px solid color-mix(in srgb, var(--on-deep) 22%, transparent); }
.foot nav a { display: flex; align-items: center; min-height: 46px; color: var(--on-deep); text-decoration: none; border-bottom: 1px solid currentColor; border-bottom: 1px solid color-mix(in srgb, var(--on-deep) 22%, transparent); font-weight: 600; }
.foot .small { margin-top: 20px; font-size: 0.875rem; line-height: 1.5; color: var(--on-deep); }
.foot .small a { color: var(--on-deep); }
/* the ring on the deep tone is the text colour on it */
.foot :focus-visible { outline-color: var(--on-deep); }
.foot .made { margin-top: 10px; }
/* The page's one small link gets a full-size target. */
.foot .made a { display: inline-block; padding-block: 12px; }

/* ======================================================================
   Additions (2026-11-11): the menu, inner pages, the floor site, desktop.
   The approved rules above stay as they are; everything below only adds.
   ====================================================================== */

/* the menu: a <details>, so it works without JavaScript */
.top { position: relative; }
.nav { margin-left: auto; }
.nav > summary { list-style: none; cursor: pointer; }
.nav > summary::-webkit-details-marker { display: none; }
.nav .when-open { display: none; }
.nav[open] .when-open { display: inline; }
.nav[open] .when-shut { display: none; }
.nav > nav { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; padding: 4px var(--pad) 14px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 16px 28px rgb(20 25 40 / .14); }
.nav > nav a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1.125rem; }
.nav > nav a:last-child { border-bottom: 0; }
.nav > nav a[aria-current="page"] { color: var(--link); font-weight: 650; }
.top-links { display: none; }
.foot nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

/* an inner page's title */
.page-head { padding: 30px var(--pad) 24px; background: var(--band); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 2.375rem; line-height: 1.05; letter-spacing: -.02em; }

/* a two-column table: fees, hours, term dates, extramurals */
.table { border-top: 2px solid var(--accent); }
.table div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.table dt { font-weight: 600; }
.table dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-family: var(--serif); font-size: 1.375rem; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.table dd small { display: block; margin-top: 2px; font-family: var(--sans); font-size: 0.9375rem; font-weight: 400; color: var(--muted); }
.table.plain dd { font-family: var(--sans); font-size: 1.0625rem; font-weight: 400; white-space: normal; }
.note { max-width: 65ch; margin-top: 14px; color: var(--muted); font-size: 1rem; }
.block > p:not(.lede):not(.note) { max-width: 65ch; }
.block > p + .table { margin-top: 16px; }
.block .cal { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; font-weight: 600; }

/* how to apply */
.steps { counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.375rem 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); max-width: 65ch; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.375rem; min-height: 2.375rem; align-self: start; border-radius: 50%; background: var(--paper); color: var(--link); box-shadow: inset 0 0 0 1.5px var(--link); font-family: var(--serif); font-size: 1.1875rem; font-weight: 600; }

/* documents */
.doc { display: grid; grid-template-columns: 46px 1fr 24px; gap: 14px; align-items: center; min-height: 82px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.docs li:last-child .doc { border-bottom: 1px solid var(--line); }
/* the fee schedule under the fees */
:is(.table, .lede, .note) + .docs { margin-top: 24px; }
.doc .cover { width: 46px; height: 60px; border-radius: 2px; box-shadow: 0 1px 3px rgb(20 25 40 / .2); }
.doc b { display: block; font-weight: 650; font-size: 1.125rem; line-height: 1.25; }
.doc small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.9375rem; }
.doc .ic { width: 22px; height: 22px; color: var(--link); }

/* About: the text, the principal, accreditations */
.prose p + p { margin-top: 14px; }
.prose .lede + p { margin-top: 16px; }
.byline { display: grid; grid-template-columns: 80px 1fr; gap: 16px; align-items: center; }
.byline img { width: 80px; height: 80px; border-radius: 50%; background: var(--accent-tint); }
.byline b { display: block; font-family: var(--serif); font-size: 1.3125rem; font-weight: 600; line-height: 1.2; }
.byline span { color: var(--muted); }
.welcome { margin-top: 20px; padding-left: 18px; border-left: 3px solid var(--accent); max-width: 62ch; }
.welcome p { font-family: var(--serif); font-size: 1.125rem; line-height: 1.6; }
.welcome p + p { margin-top: 12px; }

/* a list of named things with an icon: accreditations, hours, meals */
.items li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.items li:last-child { border-bottom: 1px solid var(--line); }
.items .mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: var(--accent-tint); color: var(--link); }
.items .mark .ic { width: 24px; height: 24px; }
.items h3 { font-size: 1.25rem; margin-top: 2px; }
.items p { margin-top: 3px; max-width: 60ch; }
.items p.sub { color: var(--muted); font-size: 1rem; }

/* the photo gallery */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.gallery figcaption { margin-top: 6px; font-size: 0.9375rem; line-height: 1.35; color: var(--muted); }
.btn.full { display: flex; width: 100%; margin-top: 20px; }

/* Contact */
.first .rows { margin-top: 18px; }

/* the floor site: name, phone and one photo */
/* The editor's frame of a site with no photos yet: a generated photo in the hero, marked. It is
   the product's own mark, in schoolweb's sun and navy, not the school's colours. */
.hero .sample { position: absolute; z-index: 2; top: 14px; right: 14px; padding: 5px 12px; border-radius: 99px;
  background: #ffd23f; color: #14275a; font: 700 15px/1.2 system-ui, sans-serif; letter-spacing: 0;
  box-shadow: 0 1px 2px rgb(20 39 90 / .2), 0 4px 10px rgb(20 39 90 / .18); }
.hero.tall { --lift: 238px; --half: 147px; min-height: 420px; }
.acts.one { grid-template-columns: 1fr; }

/* desktop: the same pages, laid out for a wide screen */
@media (min-width: 960px) {
  :root { --pad: 32px; --side: max(var(--pad), calc((100% - 1120px) / 2)); }
  .top { min-height: 76px; padding: 8px var(--side); }
  .top .name { font-size: 1.375rem; }
  .top .name.long { font-size: 1.1875rem; }
  .nav { display: none; }
  .top-links { display: flex; gap: 4px; margin-left: auto; }
  .top-links a { position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem; }
  .top-links a:hover { color: var(--link); }
  /* the current page: a bar under its word only, on the header's lower edge */
  /* same weight as the others, so the words do not shift from page to page */
  .top-links a[aria-current="page"] { color: var(--ink); }
  .top-links a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -8px; height: 2px; border-radius: 2px; background: var(--link); }

  .hero { --lift: 132px; --half: 120px; min-height: 380px; }
  .hero.tall { --lift: 160px; --half: 132px; }
  .hero img { object-position: 50% 62%; }
  .hero-text { padding: var(--lift) var(--side) 30px; }
  .hero h1 { font-size: 3.75rem; }
  .hero h1.long { font-size: 2.875rem; }
  .hero .town { font-size: 1.3125rem; margin-top: 10px; }

  .first { display: grid; grid-template-columns: 1fr 1fr 340px; column-gap: 40px; align-items: start; padding: 32px var(--side) 40px; border-bottom: 1px solid var(--line); }
  .first .status { grid-column: 1; grid-row: 1; }
  .first .lines { grid-column: 1; grid-row: 2; }
  .first .acts { grid-column: 2; grid-row: 1; margin-top: 0; }
  .first .share { grid-column: 2; grid-row: 2; justify-self: start; margin-top: 6px; }
  .first .next { grid-column: 3; grid-row: 1 / span 2; margin-top: 0; }

  .block { padding: 64px var(--side); }
  .block h2 { font-size: 2rem; }
  .block.intro { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto 1fr; column-gap: 64px; align-items: start; }
  .intro > * { grid-column: 1; }
  .intro .facts { grid-column: 2; grid-row: 2 / span 2; margin-top: 14px; }
  .intro .more { justify-self: start; align-self: start; }
  .block.intro:not(:has(.facts > :nth-child(3))) { display: block; }
  .block.intro:not(:has(.facts > :nth-child(3))) > * { max-width: 65ch; }

  .pair { display: grid; grid-template-columns: 1.3fr 1fr; column-gap: 64px; padding: 64px var(--side); background: var(--band); }
  .pair > .block { padding: 0; background: none; }
  .pair > .block:last-child { padding-top: 50px; }

  .photos { grid-template-columns: 2fr repeat(5, 1fr); }
  .photos .wide { grid-column: auto; grid-row: auto; aspect-ratio: 2 / 1; }

  .visit { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; align-content: start; }
  .visit > * { grid-column: 1; }
  .visit .map { justify-self: start; }
  /* the buttons sit beside the heading at their own height, and the rows beside the
     address: a tall address never stretches the buttons or opens a gap under them */
  .visit .acts { grid-column: 2; grid-row: 1; align-self: start; margin-top: 0; }
  .visit .rows { grid-column: 2; grid-row: 2 / span 3; align-self: start; margin-top: 0; }
  /* under the buttons the list keeps a clear step, so its top rule is not their underline */
  .visit:has(> .acts) .rows { margin-top: 16px; }
  /* wide columns have room: no word breaks there */
  .lines, .facts span, .rows small, .list li, .items p, .steps li, .table dt, .table dd, .note { hyphens: manual; }
  .visit .share { justify-self: start; }
  /* the rows beside take their height from the last row, so the address, map link and
     hours stay together */
  .visit { grid-template-rows: auto auto auto 1fr; }
  .visit > :not(.acts, .rows) { align-self: start; }

  .foot { display: grid; grid-template-columns: 1fr auto; column-gap: 40px; align-items: center; padding: 40px var(--side) 32px; }
  .foot nav { display: flex; gap: 28px; margin-top: 0; border: 0; }
  .foot nav a { border: 0; }
  .foot .small { grid-column: 1 / -1; }
}

/* ======================================================================
   Additions for real content (2026-11-11). Everything below only adds.
   ====================================================================== */

/* long words and addresses wrap instead of pushing the page sideways */
body { overflow-wrap: break-word; }

/* a short page: main grows, so the footer sits at the bottom of the screen */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main { flex: 1 0 auto; }
body > .top, body > .foot { flex: none; }

/* a site without photos: the name on the deep tone */
.hero.bare { min-height: 210px; }
.hero.bare .hero-text { padding-top: 24px; background: none; }
.hero.bare h1 { text-shadow: none; }
.hero.bare .hero-text { color: var(--on-deep); }
.hero.bare h1 { color: var(--on-deep); }

/* a status with nowhere to go */
div.status span { text-decoration: none; }

/* two photos on Home */
.photos.two { grid-template-columns: 1fr 1fr; }
.photos.two img { aspect-ratio: 4 / 3; }

/* text the school typed: paragraphs */
.lede p + p, .note p + p, .steps p + p { margin-top: 10px; }
.block .text p + p { margin-top: 14px; }
.block .text { max-width: 65ch; }

/* a principal without a portrait */
.byline.solo { display: block; }

/* a plain list: extramurals */
.list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; border-top: 2px solid var(--accent); }
.list li { display: flex; align-items: center; min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 600; }

/* the drawn covers take the site's colour */
.cover .ink, .letter .ink { fill: var(--accent); }

/* Sources, in the footer */
.foot details { margin-top: 2px; font-size: 0.875rem; }
.foot details summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--on-deep); }
.foot details summary::-webkit-details-marker { display: none; }
.foot details summary { list-style: none; }
.foot details p.small { margin-top: 0; }
.foot details + .made { margin-top: 6px; }

/* the stub of a closed site */
.stub .rows { margin-top: 18px; }

/* the focal point of a photo, to the nearest tenth */
.fx-0.fy-0 { object-position: 0% 0%; } .fx-0.fy-1 { object-position: 0% 10%; } .fx-0.fy-2 { object-position: 0% 20%; } .fx-0.fy-3 { object-position: 0% 30%; } .fx-0.fy-4 { object-position: 0% 40%; } .fx-0.fy-5 { object-position: 0% 50%; } .fx-0.fy-6 { object-position: 0% 60%; } .fx-0.fy-7 { object-position: 0% 70%; } .fx-0.fy-8 { object-position: 0% 80%; } .fx-0.fy-9 { object-position: 0% 90%; } .fx-0.fy-10 { object-position: 0% 100%; }
.fx-1.fy-0 { object-position: 10% 0%; } .fx-1.fy-1 { object-position: 10% 10%; } .fx-1.fy-2 { object-position: 10% 20%; } .fx-1.fy-3 { object-position: 10% 30%; } .fx-1.fy-4 { object-position: 10% 40%; } .fx-1.fy-5 { object-position: 10% 50%; } .fx-1.fy-6 { object-position: 10% 60%; } .fx-1.fy-7 { object-position: 10% 70%; } .fx-1.fy-8 { object-position: 10% 80%; } .fx-1.fy-9 { object-position: 10% 90%; } .fx-1.fy-10 { object-position: 10% 100%; }
.fx-2.fy-0 { object-position: 20% 0%; } .fx-2.fy-1 { object-position: 20% 10%; } .fx-2.fy-2 { object-position: 20% 20%; } .fx-2.fy-3 { object-position: 20% 30%; } .fx-2.fy-4 { object-position: 20% 40%; } .fx-2.fy-5 { object-position: 20% 50%; } .fx-2.fy-6 { object-position: 20% 60%; } .fx-2.fy-7 { object-position: 20% 70%; } .fx-2.fy-8 { object-position: 20% 80%; } .fx-2.fy-9 { object-position: 20% 90%; } .fx-2.fy-10 { object-position: 20% 100%; }
.fx-3.fy-0 { object-position: 30% 0%; } .fx-3.fy-1 { object-position: 30% 10%; } .fx-3.fy-2 { object-position: 30% 20%; } .fx-3.fy-3 { object-position: 30% 30%; } .fx-3.fy-4 { object-position: 30% 40%; } .fx-3.fy-5 { object-position: 30% 50%; } .fx-3.fy-6 { object-position: 30% 60%; } .fx-3.fy-7 { object-position: 30% 70%; } .fx-3.fy-8 { object-position: 30% 80%; } .fx-3.fy-9 { object-position: 30% 90%; } .fx-3.fy-10 { object-position: 30% 100%; }
.fx-4.fy-0 { object-position: 40% 0%; } .fx-4.fy-1 { object-position: 40% 10%; } .fx-4.fy-2 { object-position: 40% 20%; } .fx-4.fy-3 { object-position: 40% 30%; } .fx-4.fy-4 { object-position: 40% 40%; } .fx-4.fy-5 { object-position: 40% 50%; } .fx-4.fy-6 { object-position: 40% 60%; } .fx-4.fy-7 { object-position: 40% 70%; } .fx-4.fy-8 { object-position: 40% 80%; } .fx-4.fy-9 { object-position: 40% 90%; } .fx-4.fy-10 { object-position: 40% 100%; }
.fx-5.fy-0 { object-position: 50% 0%; } .fx-5.fy-1 { object-position: 50% 10%; } .fx-5.fy-2 { object-position: 50% 20%; } .fx-5.fy-3 { object-position: 50% 30%; } .fx-5.fy-4 { object-position: 50% 40%; } .fx-5.fy-5 { object-position: 50% 50%; } .fx-5.fy-6 { object-position: 50% 60%; } .fx-5.fy-7 { object-position: 50% 70%; } .fx-5.fy-8 { object-position: 50% 80%; } .fx-5.fy-9 { object-position: 50% 90%; } .fx-5.fy-10 { object-position: 50% 100%; }
.fx-6.fy-0 { object-position: 60% 0%; } .fx-6.fy-1 { object-position: 60% 10%; } .fx-6.fy-2 { object-position: 60% 20%; } .fx-6.fy-3 { object-position: 60% 30%; } .fx-6.fy-4 { object-position: 60% 40%; } .fx-6.fy-5 { object-position: 60% 50%; } .fx-6.fy-6 { object-position: 60% 60%; } .fx-6.fy-7 { object-position: 60% 70%; } .fx-6.fy-8 { object-position: 60% 80%; } .fx-6.fy-9 { object-position: 60% 90%; } .fx-6.fy-10 { object-position: 60% 100%; }
.fx-7.fy-0 { object-position: 70% 0%; } .fx-7.fy-1 { object-position: 70% 10%; } .fx-7.fy-2 { object-position: 70% 20%; } .fx-7.fy-3 { object-position: 70% 30%; } .fx-7.fy-4 { object-position: 70% 40%; } .fx-7.fy-5 { object-position: 70% 50%; } .fx-7.fy-6 { object-position: 70% 60%; } .fx-7.fy-7 { object-position: 70% 70%; } .fx-7.fy-8 { object-position: 70% 80%; } .fx-7.fy-9 { object-position: 70% 90%; } .fx-7.fy-10 { object-position: 70% 100%; }
.fx-8.fy-0 { object-position: 80% 0%; } .fx-8.fy-1 { object-position: 80% 10%; } .fx-8.fy-2 { object-position: 80% 20%; } .fx-8.fy-3 { object-position: 80% 30%; } .fx-8.fy-4 { object-position: 80% 40%; } .fx-8.fy-5 { object-position: 80% 50%; } .fx-8.fy-6 { object-position: 80% 60%; } .fx-8.fy-7 { object-position: 80% 70%; } .fx-8.fy-8 { object-position: 80% 80%; } .fx-8.fy-9 { object-position: 80% 90%; } .fx-8.fy-10 { object-position: 80% 100%; }
.fx-9.fy-0 { object-position: 90% 0%; } .fx-9.fy-1 { object-position: 90% 10%; } .fx-9.fy-2 { object-position: 90% 20%; } .fx-9.fy-3 { object-position: 90% 30%; } .fx-9.fy-4 { object-position: 90% 40%; } .fx-9.fy-5 { object-position: 90% 50%; } .fx-9.fy-6 { object-position: 90% 60%; } .fx-9.fy-7 { object-position: 90% 70%; } .fx-9.fy-8 { object-position: 90% 80%; } .fx-9.fy-9 { object-position: 90% 90%; } .fx-9.fy-10 { object-position: 90% 100%; }
.fx-10.fy-0 { object-position: 100% 0%; } .fx-10.fy-1 { object-position: 100% 10%; } .fx-10.fy-2 { object-position: 100% 20%; } .fx-10.fy-3 { object-position: 100% 30%; } .fx-10.fy-4 { object-position: 100% 40%; } .fx-10.fy-5 { object-position: 100% 50%; } .fx-10.fy-6 { object-position: 100% 60%; } .fx-10.fy-7 { object-position: 100% 70%; } .fx-10.fy-8 { object-position: 100% 80%; } .fx-10.fy-9 { object-position: 100% 90%; } .fx-10.fy-10 { object-position: 100% 100%; }

/* desktop: a band per unit, where two blocks share one band */
@media (min-width: 960px) {
  .block.band, .pair { background: none; }
  .block.band-wide, .pair.band-wide { background: var(--band); }
  .pair > .block.band-wide { background: none; }
  .list { grid-template-columns: repeat(3, 1fr); }
}

/* ======================================================================
   Quality bar (2026-11-11): 44 px targets and long addresses at 320 px.
   ====================================================================== */
.next .cal { min-height: 44px; margin: -4px 0 -10px; }
.head2 a { display: inline-flex; align-items: center; min-height: 44px; }
.rows a span { min-width: 0; overflow-wrap: anywhere; }
.foot nav a { min-width: 44px; }
.foot .small { max-width: 65ch; }

/* the rest of the gallery, behind "Show more photos"; no JavaScript */
.more-photos > summary { list-style: none; cursor: pointer; }
.more-photos > summary::-webkit-details-marker { display: none; }
/* once every photo shows, the button goes: the two grids read as one */
.more-photos[open] > summary { display: none; }
.more-photos .gallery, .more-photos[open] .gallery { margin-top: 16px; }

/* a photo opened large over the page (gallery.js) */
.gallery a.zoom { display: block; cursor: zoom-in; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0E0E0E; color: #fff; }
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.lightbox::backdrop { background: #0E0E0E; }
.lightbox figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; min-width: 0; min-height: 0; padding: 64px 12px 0; }
.lightbox img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox figcaption { max-width: 60ch; padding-top: 12px; text-align: center; font-size: 1rem; line-height: 1.4; }
.lightbox .count { padding: 4px 0 16px; text-align: center; font-size: .875rem; color: #C4C4C4; }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .14); color: #fff; cursor: pointer; }
.lightbox button:hover { background: rgb(255 255 255 / .26); }
.lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox .lb-shut { top: 8px; right: 8px; }
/* on a phone the arrows sit under the photo, beside the caption, not over it */
.lightbox .lb-prev { left: 8px; bottom: 12px; }
.lightbox .lb-next { right: 8px; bottom: 12px; }
.lightbox figcaption, .lightbox .count { padding-inline: 64px; }
@media (min-width: 960px) {
  .lightbox figure { padding: 48px 88px 0; }
  .lightbox .lb-shut { top: 16px; right: 16px; }
  .lightbox .lb-prev, .lightbox .lb-next { top: 50%; bottom: auto; translate: 0 -50%; }
  .lightbox .lb-prev { left: 20px; }
  .lightbox .lb-next { right: 20px; }
  .lightbox figcaption, .lightbox .count { padding-inline: 0; }
}

/* desktop inner pages: the title on the content's edge, and tables, lists
   and controls at a width the eye can cross */
@media (min-width: 960px) {
  .page-head { padding: 48px var(--side) 40px; }
  .page-head h1 { font-size: 3.25rem; }
  .block > .acts, .block > .rows, .block > .status, .block > .next { max-width: 560px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
  .more-photos > summary { max-width: 560px; margin-left: auto; margin-right: auto; }

  .first.touch { grid-template-columns: minmax(0, 1fr) 420px; column-gap: 64px; }
  .first.touch .rows { grid-column: 1; grid-row: 1 / span 2; margin-top: 0; }
  .first.touch .acts { grid-column: 2; grid-row: 1; }
  .first.touch .share { grid-column: 2; grid-row: 2; justify-self: center; }
}
@media (min-width: 960px) {
  /* no applications status: the lines start level with the buttons and run
     beside the share link, so a long line block opens no gap under them */
  .first:not(:has(> .status)) .lines { grid-row: 1 / span 2; margin-top: 0; }
}

/* ======================================================================
   Grids from content (2026-11-11): a new site has few facts, no next date
   and no applications status; inner pages share one centred width.
   ====================================================================== */
@media (max-width: 359px) {
  .list { grid-template-columns: 1fr; }
}
@media (min-width: 960px) {
  /* the first screen: the second row takes what is left, so the share link
     sits under the buttons; no next date, no third column */
  .first { grid-template-rows: auto 1fr; }
  .first .share { align-self: start; }
  .first:not(.touch):not(:has(> .next)) { grid-template-columns: minmax(0, 1fr) 420px; column-gap: 64px; }

  /* Visit us: the rows start level with the address when there are no
     buttons, and take the first column when there is no address */
  .visit:not(:has(> .acts)) .rows { grid-row: 2 / span 3; margin-top: 0; }
  .visit:not(:has(> address)):not(:has(> .acts)) .rows { grid-column: 1; grid-row: auto; margin-top: 16px; }

  /* inner pages: one content width, centred; photos and lists may go wider */
  main:has(> .page-head) { --side: max(var(--pad), calc((100% - 760px) / 2)); }
  main:has(> .page-head) .block:has(> .gallery, > .list) { --side: max(var(--pad), calc((100% - 1120px) / 2)); }
  /* the heading and intro of a wide block stay on the content column's edge */
  main:has(> .page-head) { container-type: inline-size; }
  main:has(> .page-head) .block:has(> .gallery, > .list) > :not(.gallery, .list, .more-photos) {
    margin-inline: calc(max(var(--pad), (100cqw - 760px) / 2) - max(var(--pad), (100cqw - 1120px) / 2));
  }
}

/* The editor opens the site at the part a save changed: it is marked for a moment. */
:target, .changed { scroll-margin-top: 16px; animation: changed 2.4s ease-out; }
@keyframes changed {
  0%, 40% { box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--accent) 14%, transparent); }
  100% { box-shadow: inset 0 0 0 999px transparent; }
}
@media (prefers-reduced-motion: reduce) { :target, .changed { animation: none; } }

/* Polish (2026-11-12) */
/* the pin sits on the town's first line when the town wraps */
.hero .town .ic { margin-top: .2em; }
@media (min-width: 960px) {
  /* the status column is narrow: its link sits under the words, on their edge */
  .first .status span { flex-basis: 100%; margin-left: 20px; }
}

/* Campuses (2026-11-13): a school with more than one place shows a block for each,
   side by side where there is room */
.campuses { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 28px 40px; margin-top: 4px; }
.campus h3 { font-size: 1.25rem; }
.campus .grades { margin-top: 4px; }
.campus address { margin-top: 10px; }
.campus .map { display: flex; width: fit-content; }
.campus .map + .map { margin-top: -4px; }
@media (min-width: 960px) {
  /* the campuses take the block's width; the hours, buttons and rows follow below */
  .visit > .campuses { grid-column: 1 / -1; margin-bottom: 16px; }
  .visit:has(> .campuses) > .acts { grid-row: 3; }
  .visit:has(> .campuses) > .rows { grid-row: 4; }
  .visit:has(> .campuses):not(:has(> .acts)) > .rows { grid-row: 3 / span 2; margin-top: 0; }
}

/* Audit fixes (2026-11-16) */
/* A long word the school typed (a 34-letter Afrikaans compound) breaks inside its column.
   break-word on the body never lets a grid or flex cell shrink below its longest word. */
#team dd, .list li, .items h3, .items p, .table dt, .facts b, .facts span, .steps li, .lines p,
.gallery figcaption, .lightbox figcaption { overflow-wrap: anywhere; }
/* The note under an amount wraps. The amount's side starts at its narrowest and takes the
   room left, so a short label (a year) keeps its width and only the note wraps. */
.table dd small { white-space: normal; }
.table:not(.plain) dd { flex: 1 1 min-content; }
/* A tablet (600 to 959 px) keeps the phone's one column, with a wider margin and lines a
   reader can follow. */
@media (min-width: 600px) and (max-width: 959px) {
  :root { --pad: 40px; }
  .prose > p, .lines { max-width: 65ch; }
}
/* On Home the logo shows without the name: sized here as well as by the :has() rules
   above, so a browser without :has() never shrinks it to a dot. */
.top .home.only { min-width: 44px; }
.top .home.only .logo { max-width: 52vw; }
/* Forced colours (Windows contrast themes) drop backgrounds and box-shadows: the buttons
   and the applications status keep a real edge. */
@media (forced-colors: active) {
  .btn, .status { border: 1.5px solid currentColor; }
}
/* A phone on its side: Home's photos go 3:2, so the big one fits the short screen. */
@media (max-width: 959px) and (max-height: 500px) and (orientation: landscape) {
  .photos img { aspect-ratio: 3 / 2; }
}
/* Three or five campuses: a third each where three fit (with any gap up to 64 px), else
   one column, so no campus stands alone on a last row. */
.campuses:has(> .campus:nth-child(3)):has(> .campus:last-child:nth-child(odd)) {
  grid-template-columns: repeat(auto-fit, minmax(clamp(100% / 3 - 64px, (45rem + 128px - 100%) * 999, 100%), 1fr));
}
/* Visit us: two campuses share the block's 64 px column gap, so the buttons and rows
   below line up with the second campus. */
@media (min-width: 960px) {
  .visit > .campuses { column-gap: 64px; }
}
/* A narrow screen has no room for two labels side by side ("WhatsApp us", "Call us"):
   the buttons stack. */
@media (max-width: 339px) {
  .acts { grid-template-columns: minmax(0, 1fr); }
}
/* How to apply: the steps' rules run to the column's edge like every other list; the
   text stays inside the 65-character measure. 62ch of the item's own digits, because
   the paragraph's face can set a narrower digit, and text runs a little wider on Linux. */
.steps li { max-width: none; padding-right: max(0px, 100% - 62ch - 2.375rem - 14px); }
/* the opening times never break between "06:30 to" and "18:00" */
.items .when { white-space: nowrap; }
/* no word left alone on the last line of the first screen's lines or the prose */
.lines p, .prose p, .lede { text-wrap: pretty; }
/* Next year's term dates: their heading stands clear of this year's table and sits close
   over its own. */
.block > .table + h3 { margin-top: 36px; }
.block > h3 + .table { margin-top: 12px; }
/* About's applications status in the closing block keeps the same step from the line
   above it as the buttons keep under it. */
.block.close > .status { margin-top: 16px; }

/* share-surfaces#7: a printed page is text and tables in black on white. The menu, the
   buttons, the photos and the viewer stay off paper; the footer prints the number and
   the address the buttons and links carried. !important wins over each look's colours. */
@media print {
  .skip, .editbar, .demobar, .top-links, .nav, .acts, .cal, .share, .lightbox, .gallery, .more-photos,
  .photos, :is(.block:has(> .photos, > .gallery)), .hero img, .head-photo, .foot nav, .foot details,
  .ic { display: none !important; }
  *, *::before, *::after { color: #000 !important; background: #fff !important; box-shadow: none !important; text-shadow: none !important; }
  .foot .who::after { content: attr(data-print); display: block; margin-top: 4px; font-size: .875rem; }
  h1, h2, h3 { break-after: avoid; }
  .table > div, .items > li, .dates > li, .docs > li, .steps > li { break-inside: avoid; }
}

/* second#DES-18: a date's tile sits level with its title, so a line under the text (Add to
   my calendar) never pushes the tile down beside the others. */
.date { align-items: start; }
/* second#DES-20: three or five campuses take a third each, so Visit us keeps three columns:
   the buttons and rows below start under the second campus and run to the third's edge.
   :where() keeps these as weak as the rules they replace, so a look's own grid wins. */
@media (min-width: 960px) {
  .visit:where(:has(> .campuses > .campus:nth-child(3)):has(> .campuses > .campus:last-child:nth-child(odd))) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .visit:where(:has(> .campuses > .campus:nth-child(3)):has(> .campuses > .campus:last-child:nth-child(odd))) > :is(.acts, .rows) {
    grid-column: 2 / -1; max-width: none;
  }
}
/* second#DES-21: on a tablet 65ch of a wide face is 85 to 100 letters a line. The text
   also stops at 32em, at most about 75 letters, in every look. */
@media (min-width: 600px) and (max-width: 959px) {
  main :is(.lede, .prose > p, .welcome, .note, .block > p:not(.lede):not(.note), .block .text, .lines, .items p) {
    max-width: min(65ch, 32em);
  }
  main .steps li { padding-right: max(0px, 100% - min(62ch, 32em) - 2.375rem - 14px); }
}
/* second#DES-45: four photos make two rows of two, and with five the first takes two cells,
   so no photo stands alone on the last row and no cell stays empty */
@media (min-width: 960px) {
  .block > .gallery:has(> figure:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .block > .gallery:has(> figure:nth-child(5):last-child) > figure:first-child { grid-column: span 2; }
  .block > .gallery:has(> figure:nth-child(5):last-child) > figure:first-child img { aspect-ratio: 8 / 3; }
}
/* second#DES-51: the open phone menu dims the page under it, so the panel reads as a layer
   in every look, with or without its own shadow. Taps pass through: menu.js closes it. */
@media (max-width: 959px) {
  .nav[open]::after { content: ""; position: absolute; z-index: 19; top: 100%; left: 0; right: 0; height: 100vh; height: 100dvh; background: rgb(12 16 32 / .4); pointer-events: none; }
}
/* second#DES-80: the photo and its caption stand together in the middle of the viewer; the
   photo takes its own height, up to what the screen leaves, so the caption sits under it */
.lightbox figure { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox img { flex: 0 1 auto; width: 100%; height: auto; max-height: 100%; }
.lightbox figcaption { flex: none; }
/* second#DES-79: a phone on its side takes the desktop's arrows at the sides, so the photo
   gets nearly the whole height */
@media (max-width: 959px) and (max-height: 500px) and (orientation: landscape) {
  .lightbox figure { padding: 12px 72px 0; }
  .lightbox figcaption { padding-top: 6px; padding-inline: 0; }
  .lightbox .count { padding: 2px 0 8px; }
  .lightbox .lb-prev, .lightbox .lb-next { top: 50%; bottom: auto; translate: 0 -50%; }
}
/* MP-31: running prose holds about 65 letters a line. 65ch is about 80 letters in these
   faces, so each look sets --prose in em for its own face. It is a width, not a max-width,
   so it caps the paragraph inside whatever column the look gives it; lists, tables and
   facts keep their own widths. */
main :is(.lede, .prose > p, .welcome p, .text p, .block:not(.visit) > p) { width: min(100%, var(--prose)); }
