/* Quad: a website template for independent schools.

   YOUR SCHOOL COLOURS
   Change the four colours below and the whole site follows: buttons, bands, links, the crest.
     --school       your main colour (blazers, the crest)
     --school-ink   text on top of the main colour: a near white for dark colours, a near black for light ones
     --accent       your second colour
     --accent-ink   text on top of the second colour
   The guide lists ready-made pairs. */
:root {
  --school: #5b1a2c;
  --school-ink: #fdf8f6;
  --accent: #bcd7ee;
  --accent-ink: #1c2630;

  /* Neutrals */
  --paper: #f6f6f3;
  --surface: #ecece7;
  --card: #ffffff;
  --ink: #1f1a1b;
  --muted: #625b5c;
  --line: rgb(31 26 27 / 0.13);
  --brand-text: var(--school);          /* coloured text and links on the page background */
  --shadow: 0 30px 60px -30px rgb(31 26 27 / 0.28);

  /* Mixed from the colours above. No need to edit. */
  --school-deep: color-mix(in oklab, var(--school) 78%, black);
  --school-soft: color-mix(in oklab, var(--school) 8%, var(--paper));
  --school-line: color-mix(in srgb, var(--school-ink) 22%, transparent);

  /* Type */
  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, serif;
  --sans: "Figtree", "Helvetica Neue", Arial, sans-serif;

  /* Shape and movement. Buttons are pills, cards use --r, feature photographs are arches. */
  --r: 14px;
  --r-lg: 28px;
  --wrap: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space: clamp(4.5rem, 10vw, 9rem);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: color-mix(in oklab, var(--school) 9%, #131212);
    --surface: color-mix(in oklab, var(--school) 13%, #1d1b1b);
    --card: color-mix(in oklab, var(--school) 10%, #222020);
    --ink: #f4efee;
    --muted: #b6adae;
    --line: rgb(244 239 238 / 0.16);
    --brand-text: var(--accent);
    --shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7);
    --school-soft: color-mix(in oklab, var(--school) 22%, var(--paper));
  }
}
@media (prefers-color-scheme: dark) {
  /* On a dark page the main colour is lifted a little so buttons and date blocks stand clear of the background. */
  .btn:not(.btn--ghost, .btn--accent), .datebox, .chip[aria-pressed="true"], .chip[aria-selected="true"], .seg label:has(input:checked) { background: color-mix(in oklab, var(--school) 84%, white); }
  .agenda .datebox { background: var(--school-soft); }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; background: var(--surface); }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--school); color: var(--school-ink); }

h1, h2, .display { font-family: var(--display); font-weight: 400; letter-spacing: -0.015em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 6.2vw, 6.2rem); line-height: 0.98; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.8rem); }
h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 1.9vw, 1.65rem); line-height: 1.2; letter-spacing: -0.01em; }
h4 { font: 600 1rem/1.3 var(--sans); }
h1 em, h2 em, .display em { font-family: var(--serif); font-style: italic; font-size: 0.93em; letter-spacing: -0.025em; padding-right: 0.04em; }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.15rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 58ch; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; font: 600 0.72rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-text); padding: 0.5rem 0.8rem; border-radius: 999px; background: var(--school-soft); margin-bottom: 1.4rem; }
.prose > * + * { margin-top: 1.1em; }
.prose p { max-width: 66ch; }
.prose a, .text-link { color: var(--brand-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; transition: text-decoration-color 0.3s var(--ease); }
.prose a:hover, .text-link:hover { text-decoration-color: transparent; }

.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--space); }
.section--tight { padding-block: calc(var(--space) * 0.6); }
.section__head { max-width: 46rem; margin-bottom: clamp(2.2rem, 5vw, 4rem); }
.section__head p { margin-top: 1.1rem; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--school); color: var(--school-ink); padding: 0.7rem 1rem; border-radius: 999px; transition: top 0.3s var(--ease); }
.skip:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.i { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

/* Buttons: a pill with the arrow in its own circle */
.btn { display: inline-flex; align-items: center; gap: 0.9rem; min-height: 3.25rem; padding: 0.4rem 0.45rem 0.4rem 1.5rem; border-radius: 999px; background: var(--school); color: var(--school-ink); font: 600 1rem/1 var(--sans); white-space: nowrap; transition: transform 0.5s var(--ease), background-color 0.5s var(--ease); }
.btn .btn__icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: color-mix(in srgb, var(--school-ink) 16%, transparent); transition: transform 0.6s var(--ease); }
.btn:hover .btn__icon { transform: translate(3px, -1px) scale(1.06); }
.btn:active { transform: scale(0.98); }
.btn--plain { padding-inline: 1.5rem; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost .btn__icon { background: var(--surface); }
.btn--ghost:hover { background: var(--surface); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent .btn__icon { background: color-mix(in srgb, var(--accent-ink) 12%, transparent); }
.btn--small { min-height: 2.6rem; font-size: 0.92rem; padding-left: 1.15rem; }
.btn--small .btn__icon { width: 1.9rem; height: 1.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.more { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--brand-text); }
.more .i { transition: transform 0.5s var(--ease); }
.more:hover .i { transform: translateX(4px); }

/* Cards sit in a shell: an outer tray with a hairline, and the card inside it */
.bezel { padding: 0.45rem; border-radius: calc(var(--r-lg) + 0.45rem); background: color-mix(in srgb, var(--ink) 4%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.bezel__core { border-radius: var(--r-lg); background: var(--card); padding: clamp(1.4rem, 3vw, 2.4rem); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5); }
.arch { border-radius: 999px 999px var(--r) var(--r); overflow: hidden; }
.arch img, .cover img { width: 100%; height: 100%; object-fit: cover; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.9rem; border-radius: 999px; font: 500 0.9rem/1.1 var(--sans); box-shadow: inset 0 0 0 1px var(--line); background: transparent; transition: background-color 0.4s var(--ease), color 0.4s var(--ease); }
button.chip:hover, a.chip:hover { background: var(--surface); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--school); color: var(--school-ink); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cat { display: inline-block; font: 600 0.72rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-text); }

/* Reveal on scroll. Content stays visible when JavaScript is off. */
.js [data-reveal] { opacity: 0; transform: translateY(2.2rem); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- notice and header */
.notice { background: var(--school); color: var(--school-ink); font-size: 0.92rem; }
.notice .wrap { display: flex; align-items: center; justify-content: center; gap: 0.5rem 1rem; flex-wrap: wrap; min-height: 2.6rem; padding-block: 0.45rem; position: relative; padding-inline: 2.2rem; text-align: center; }
.notice a { font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; }
.notice button { position: absolute; right: 0; top: 50%; translate: 0 -50%; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; color: inherit; }
.notice button:hover { background: var(--school-line); }
.notice :focus-visible, .band :focus-visible, .site-footer :focus-visible { outline-color: var(--accent); }

.site-header { position: sticky; top: 0.75rem; z-index: 30; margin-top: 0.75rem; }
.bar { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; padding: 0.5rem 0.6rem 0.5rem 1.1rem; border-radius: 20px; background: color-mix(in srgb, var(--paper) 84%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -28px rgb(31 26 27 / 0.35); }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; margin-right: auto; }
.brand svg { width: 2.15rem; height: 2.6rem; flex: none; }
.brand b { display: block; font: 400 1.32rem/1 var(--display); letter-spacing: -0.01em; }
.brand small { display: block; margin-top: 0.22rem; font: 500 0.66rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.crest path { fill: var(--brand-text); }
.crest text { fill: var(--paper); font-family: var(--display); }
.site-footer .crest path { fill: var(--accent); }
.site-footer .crest text { fill: var(--accent-ink); }
.nav { display: flex; align-items: center; gap: 0.15rem; }
.nav__item { position: relative; }
.nav__link { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.7rem 0.85rem; border-radius: 999px; font: 500 0.96rem/1 var(--sans); transition: background-color 0.4s var(--ease); }
.nav__link .i { width: 0.8em; height: 0.8em; opacity: 0.6; transition: transform 0.5s var(--ease); }
.nav__link:hover, .nav__item:focus-within > .nav__link, .nav__link[aria-current="page"] { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nav__item:hover .nav__link .i, .nav__item:focus-within .nav__link .i { transform: rotate(180deg); }
.nav__panel { position: absolute; left: 50%; top: 100%; padding-top: 0.9rem; translate: -50% 0; opacity: 0; visibility: hidden; transform: translateY(0.6rem); transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), visibility 0.4s; }
.nav__item:hover .nav__panel, .nav__item:focus-within .nav__panel, .nav__item.is-open .nav__panel { opacity: 1; visibility: visible; transform: none; }
.nav__panel ul { min-width: 15.5rem; padding: 0.5rem; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.nav__panel a { display: block; padding: 0.6rem 0.8rem; border-radius: 12px; font-size: 0.96rem; transition: background-color 0.3s var(--ease); }
.nav__panel a:hover { background: var(--surface); }
.tool { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; transition: background-color 0.4s var(--ease); }
.tool:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.tool .i { width: 1.3rem; height: 1.3rem; }
.menu-btn { display: none; position: relative; }
.menu-btn span { position: absolute; left: 0.85rem; right: 0.85rem; height: 1.5px; background: currentColor; transition: transform 0.6s var(--ease), top 0.6s var(--ease); }
.menu-btn span:first-child { top: 1.15rem; }
.menu-btn span:last-child { top: 1.65rem; }
.menu-open .menu-btn span:first-child { top: 1.4rem; transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { top: 1.4rem; transform: rotate(-45deg); }

/* The full-screen menu on smaller screens */
.menu { position: fixed; inset: 0; z-index: 20; overflow-y: auto; padding: 7.5rem var(--gutter) 3rem; background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0.5s; }
.menu-open .menu { opacity: 1; visibility: visible; }
.menu-open { overflow: hidden; }
.menu li { opacity: 0; transform: translateY(2rem); transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i) * 60ms + 80ms); border-bottom: 1px solid var(--line); }
.menu-open .menu li { opacity: 1; transform: none; }
.menu__main { display: block; padding: 1rem 0 0.4rem; font: 400 clamp(1.9rem, 7vw, 2.6rem)/1.1 var(--display); }
.menu__sub { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; padding-bottom: 1rem; color: var(--muted); font-size: 0.98rem; }
.menu__sub a { padding: 0.3rem 0; }
.menu .btn-row { margin-top: 2rem; }

@media (max-width: 1199px) {
  .nav, .bar > .btn { display: none; }
  .menu-btn { display: grid; }
}
@media (min-width: 1200px) { .menu { display: none; } }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--school-deep); color: var(--school-ink); padding-block: clamp(3.5rem, 7vw, 6rem) 2rem; margin-top: var(--space); }
.site-footer .brand small { color: inherit; opacity: 0.7; }
.footer__top { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 3rem 2rem; }
.footer__top address { font-style: normal; margin-top: 1.6rem; opacity: 0.86; line-height: 1.7; }
.footer__title { font: 600 0.74rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.66; margin-bottom: 1.1rem; }
.footer__top li + li { margin-top: 0.55rem; }
.footer__top a { opacity: 0.9; transition: opacity 0.3s; }
.footer__top a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 0.2em; }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem; margin-top: clamp(2.5rem, 6vw, 5rem); padding-top: 1.5rem; border-top: 1px solid var(--school-line); font-size: 0.88rem; opacity: 0.78; }
.footer__base ul { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
@media (max-width: 899px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__top > :first-child { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- home */
.hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); align-items: center; gap: clamp(2rem, 5vw, 5.5rem); padding-block: clamp(2.2rem, 4.5vw, 4rem) clamp(3rem, 6vw, 5rem); }
.hero h1 { max-width: 11ch; }
.hero .lead { margin-top: 1.6rem; max-width: 34ch; }
.hero .btn-row { margin-top: 2.2rem; }
.hero__media { position: relative; }
.hero__media .arch { aspect-ratio: 4 / 5; max-height: min(76dvh, 46rem); margin-left: auto; }
.hero__media .arch img { object-position: 50% 100%; }
.hero__card { position: absolute; left: clamp(-3.5rem, -4vw, -1rem); bottom: 1.8rem; width: min(20.5rem, 82%); }
.hero__card .bezel__core { padding: 1.15rem 1.25rem; display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1rem; align-items: center; border-radius: 20px; }
.hero__card.bezel { border-radius: calc(20px + 0.45rem); background: color-mix(in srgb, var(--paper) 70%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.datebox { grid-row: span 2; display: grid; place-items: center; width: 3.6rem; height: 3.9rem; border-radius: 12px; background: var(--school); color: var(--school-ink); text-align: center; line-height: 1; }
.datebox b { display: block; font: 400 1.7rem/1 var(--display); }
.datebox span { display: block; margin-top: 0.2rem; font: 600 0.66rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.hero__card strong { font-weight: 600; line-height: 1.25; }
.hero__card .more { font-size: 0.92rem; white-space: nowrap; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.facts > div { padding: clamp(1.4rem, 3vw, 2.4rem) 1.5rem clamp(1.4rem, 3vw, 2.4rem) 0; }
.facts > div + div { padding-left: clamp(1rem, 2.4vw, 2.2rem); border-left: 1px solid var(--line); }
.facts dt { font: 400 clamp(2.4rem, 4.6vw, 4.2rem)/1 var(--display); color: var(--brand-text); letter-spacing: -0.02em; }
.facts dd { margin-top: 0.6rem; color: var(--muted); font-size: 0.98rem; max-width: 18ch; }

.phases__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 0.9rem; transition: grid-template-columns 0.8s var(--ease); }
.phases__grid:has(.phase:nth-child(2):is(:hover, :focus-within)) { grid-template-columns: 1fr 1.7fr 1fr; }
.phases__grid:has(.phase:nth-child(3):is(:hover, :focus-within)) { grid-template-columns: 1fr 1fr 1.7fr; }
.phase { position: relative; min-height: clamp(26rem, 44vw, 36rem); border-radius: var(--r-lg); overflow: hidden; display: flex; align-items: end; color: #fff; isolation: isolate; }
.phase img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.4s var(--ease); }
.phase::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(20 12 14 / 0.92), rgb(20 12 14 / 0.55) 38%, rgb(20 12 14 / 0.05) 72%); }
.phase:hover img { transform: scale(1.04); }
.phase__body { padding: clamp(1.3rem, 2.4vw, 2.2rem); width: 100%; }
.phase__body h3 { font: 400 clamp(1.7rem, 2.6vw, 2.5rem)/1.05 var(--display); }
.phase__body small { display: block; margin-top: 0.5rem; font-size: 0.95rem; opacity: 0.85; }
.phase__more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.8s var(--ease), opacity 0.6s var(--ease); }
.phase__more > div { overflow: hidden; }
.phase__more p { padding-top: 1rem; max-width: 36ch; font-size: 1rem; opacity: 0.92; }
.phase__more .more { margin-top: 1rem; color: #fff; }
.phase:is(:hover, :focus-within) .phase__more, .phases__grid:not(:hover, :focus-within) .phase:first-child .phase__more { grid-template-rows: 1fr; opacity: 1; }
.phase > a { position: absolute; inset: 0; z-index: 1; }

.welcome { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.welcome .arch { aspect-ratio: 4 / 5; max-width: 27rem; }
.welcome blockquote p { font: 400 clamp(1.6rem, 3.1vw, 2.75rem)/1.16 var(--display); letter-spacing: -0.012em; }
.welcome footer { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.welcome cite { font-style: normal; font-weight: 600; }
.welcome cite span { display: block; font-weight: 400; color: var(--muted); }

.bento { display: grid; grid-template-columns: 7fr 3fr 2.6fr; grid-template-rows: repeat(2, clamp(13rem, 21vw, 18.5rem)); gap: 0.9rem; }
.tile { position: relative; border-radius: var(--r-lg); overflow: hidden; display: flex; align-items: end; color: #fff; isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.4s var(--ease); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(20 12 14 / 0.9), rgb(20 12 14 / 0.45) 34%, transparent 66%); }
.tile:hover img { transform: scale(1.04); }
.tile > div { padding: clamp(1.1rem, 2vw, 1.8rem); }
.tile h3 { font: 400 clamp(1.4rem, 2.1vw, 2rem)/1.08 var(--display); }
.tile p { margin-top: 0.35rem; font-size: 0.96rem; opacity: 0.9; max-width: 34ch; }
.tile--sport { grid-row: span 2; }
.tile--music { grid-column: span 2; }
.tile--plain { background: var(--school); color: var(--school-ink); align-items: stretch; }
.tile--plain::after { content: none; }
.tile--plain > div { display: flex; flex-direction: column; justify-content: space-between; width: 100%; }
.tile--plain b { font: 400 clamp(3rem, 5vw, 4.6rem)/0.9 var(--display); }
.tile--plain .more { color: inherit; font-size: 0.95rem; }
.tile > a:not(.more) { position: absolute; inset: 0; }

.trio { display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-auto-rows: clamp(18rem, 30vw, 26rem); gap: 0.9rem; }
.band { background: var(--school); color: var(--school-ink); border-radius: var(--r-lg); padding: clamp(2.2rem, 6vw, 5.5rem); }
.band .lead, .band .muted { color: inherit; opacity: 0.82; }
.band .eyebrow { background: var(--school-line); color: inherit; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(2.5rem, 5vw, 4.5rem); counter-reset: step; }
.steps li { position: relative; padding: 1.8rem 1.6rem 0 0; border-top: 1px solid var(--school-line); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: -0.95rem; left: 0; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 600 0.85rem/1 var(--sans); }
.steps h3 { font: 400 clamp(1.5rem, 2.2vw, 2rem)/1.1 var(--display); }
.steps p { margin-top: 0.6rem; font-size: 0.98rem; opacity: 0.84; max-width: 26ch; }

.latest { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.story { display: block; }
.story .cover { aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; }
.story .cover img { transition: transform 1.4s var(--ease); }
.story:hover .cover img { transform: scale(1.035); }
.story__meta { display: flex; gap: 0.9rem; align-items: center; margin-top: 1.2rem; font-size: 0.88rem; color: var(--muted); }
.story h3 { margin-top: 0.55rem; font: 400 clamp(1.5rem, 2.4vw, 2.2rem)/1.1 var(--display); transition: color 0.4s var(--ease); }
.story:hover h3 { color: var(--brand-text); }
.story p { margin-top: 0.6rem; color: var(--muted); max-width: 54ch; }
.story--row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.1rem; align-items: center; padding-block: 1.1rem; border-top: 1px solid var(--line); }
.story--row .cover { aspect-ratio: 4 / 3; border-radius: var(--r); }
.story--row h3 { margin-top: 0.3rem; font: 400 1.2rem/1.2 var(--serif); }
.story--row .story__meta { margin-top: 0; }
.stories { margin-top: 1.6rem; }
.agenda li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding-block: 0.95rem; }
.agenda li + li { border-top: 1px solid var(--line); }
.agenda .datebox { grid-row: auto; background: var(--school-soft); color: var(--brand-text); }
.agenda strong { display: block; font-weight: 600; line-height: 1.3; }
.agenda span { color: var(--muted); font-size: 0.92rem; }
.agenda a:hover strong { color: var(--brand-text); }
.bezel__core > h3 + .agenda { margin-top: 0.6rem; }
.bezel__core > .more { margin-top: 1.1rem; }

.visit { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: clamp(26rem, 46vw, 38rem); display: grid; align-items: end; color: #fff; isolation: isolate; }
.visit > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.visit::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgb(20 12 14 / 0.82) 0%, rgb(20 12 14 / 0.35) 55%, rgb(20 12 14 / 0.1)); }
.visit__body { padding: clamp(1.6rem, 5vw, 4.5rem); max-width: 40rem; }
.visit__body p { margin-top: 1.1rem; font-size: 1.15rem; opacity: 0.9; max-width: 40ch; }
.visit__body .btn { margin-top: 2rem; }

/* ---------------------------------------------------------------- inner pages */
.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); }
.crumbs { display: flex; gap: 0.5rem; align-items: center; font-size: 0.9rem; color: var(--muted); margin-bottom: 1.6rem; }
.crumbs a:hover { color: var(--brand-text); }
.crumbs .i { width: 0.75em; height: 0.75em; opacity: 0.6; }
.page-head h1 { font-size: clamp(2.7rem, 5.6vw, 5.4rem); max-width: 16ch; }
.page-head .lead { margin-top: 1.5rem; }
.page-head--split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.page-head--split .arch { aspect-ratio: 5 / 6; max-height: 30rem; margin-left: auto; }
.subnav { margin-top: 2.2rem; }
.wide-photo { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 21 / 9; }
.wide-photo img { width: 100%; height: 100%; object-fit: cover; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split--top { align-items: start; }
.split .arch { aspect-ratio: 4 / 5; max-width: 30rem; }
.split .cover { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; }
.split h2 + * { margin-top: 1.4rem; }
.split .btn, .split .more { margin-top: 1.8rem; }
.ticks li { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; padding-block: 0.6rem; }
.ticks .i { margin-top: 0.25rem; color: var(--brand-text); }
.ticks li + li { border-top: 1px solid var(--line); }

.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 6vw, 6rem); }
.values li { padding-block: 2rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; }
.values h3 { font: 400 2rem/1 var(--display); color: var(--brand-text); }
.values p { color: var(--muted); }

.timeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(16.5rem, 1fr); gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; }
.timeline li { scroll-snap-align: start; padding: 1.6rem 2rem 0 0; border-top: 1px solid var(--school-line); position: relative; }
.timeline li::before { content: ""; position: absolute; top: -0.35rem; left: 0; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--accent); }
.timeline b { display: block; font: 400 clamp(2.2rem, 3.4vw, 3rem)/1 var(--display); }
.timeline p { margin-top: 0.7rem; opacity: 0.85; max-width: 26ch; font-size: 0.98rem; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.9rem; }
.person { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding: 1.1rem; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.person__mark { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--school-soft); color: var(--brand-text); font: 400 1.25rem/1 var(--display); }
.person strong { display: block; font-weight: 600; line-height: 1.3; }
.person span { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.35; margin-top: 0.15rem; }
.person a { display: inline-block; margin-top: 0.35rem; font-size: 0.9rem; color: var(--brand-text); }
.person a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.people--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.names { columns: 3 14rem; column-gap: 3rem; }
.names li { padding-block: 0.7rem; border-top: 1px solid var(--line); break-inside: avoid; }
.names span { display: block; color: var(--muted); font-size: 0.92rem; }

.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0.9rem; }
.gallery button { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; grid-column: span 4; }
.gallery button:nth-child(4n + 1) { grid-column: span 7; aspect-ratio: 16 / 9; }
.gallery button:nth-child(4n + 2) { grid-column: span 5; aspect-ratio: auto; }
.gallery button:nth-child(4n + 3) { grid-column: span 5; aspect-ratio: auto; }
.gallery button:nth-child(4n + 4) { grid-column: span 7; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery button:hover img { transform: scale(1.04); }

.tabs__list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }
.tabs__panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.tabs__panel .cover { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 5 / 4; }
.tabs__panel h2 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); line-height: 1.05; }
.tabs__panel .ticks { margin-top: 1.4rem; }
.tabs__panel .keyline + p { margin-top: 1.1rem; }
.lead + .ticks, .lead + .day { margin-top: 1.6rem; }
.tabs__panel .keyline { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin-top: 0.7rem; color: var(--muted); font-size: 0.98rem; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.stat { padding: clamp(1.4rem, 2.6vw, 2.2rem); border-radius: var(--r-lg); background: var(--school-line); }
.stat b { display: block; font: 400 clamp(2.8rem, 5vw, 4.6rem)/0.95 var(--display); letter-spacing: -0.02em; }
.stat span { display: block; margin-top: 0.8rem; opacity: 0.85; max-width: 22ch; }
.subjects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem clamp(1.5rem, 4vw, 4rem); }
.subjects h3 { padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); margin-bottom: 0.9rem; }
.subjects p { color: var(--muted); }

.houses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.house { padding: 1.5rem; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.house i { display: block; width: 2.6rem; height: 3.1rem; border-radius: 4px 4px 1.3rem 1.3rem; background: var(--house); margin-bottom: 1.3rem; }
.house span { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.92rem; }
.day { display: grid; grid-template-columns: 5.5rem 1fr; }
.day dt { font: 400 1.25rem/1.4 var(--serif); color: var(--brand-text); padding-block: 0.9rem; border-top: 1px solid var(--line); }
.day dd { padding-block: 0.9rem; border-top: 1px solid var(--line); }
.clubs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
.club { padding: 0.7rem 1.05rem; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.club small { margin-left: 0.5rem; color: var(--muted); font-weight: 400; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.25rem; cursor: pointer; list-style: none; font: 400 clamp(1.15rem, 1.6vw, 1.4rem)/1.3 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform 0.6s var(--ease); color: var(--brand-text); }
.faq details[open] summary .i { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.4rem; max-width: 64ch; color: var(--muted); }

/* ---------------------------------------------------------------- forms */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field { display: grid; gap: 0.45rem; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field > span, .field > label, legend { font: 600 0.92rem/1.3 var(--sans); padding: 0; }
.field small { color: var(--muted); font-size: 0.88rem; }
input:not([type="checkbox"], [type="radio"]), select, textarea { width: 100%; min-height: 3.1rem; padding: 0.7rem 0.95rem; border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 12px; background: var(--card); transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 1.25rem) 50%, calc(100% - 0.95rem) 50%; background-size: 0.3rem 0.3rem; background-repeat: no-repeat; padding-right: 2.4rem; }
textarea { min-height: 8rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-text) 25%, transparent); }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--school); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.check { display: flex; align-items: center; gap: 0.65rem; }
.hp { position: absolute; left: -200vw; }
.form__status { grid-column: 1 / -1; padding: 0.9rem 1.1rem; border-radius: 12px; background: var(--school-soft); color: var(--ink); }
.form__status[data-state="error"] { background: color-mix(in srgb, #b3261e 14%, var(--card)); }
.seg { display: inline-flex; padding: 0.25rem; border-radius: 999px; background: var(--surface); }
.seg label { position: relative; padding: 0.55rem 1rem; border-radius: 999px; font: 500 0.92rem/1 var(--sans); cursor: pointer; transition: background-color 0.4s var(--ease), color 0.4s var(--ease); }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--school); color: var(--school-ink); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--brand-text); outline-offset: 2px; }

/* ---------------------------------------------------------------- admissions */
.finder { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.finder__out { min-height: 9rem; padding: 1.5rem; border-radius: 20px; background: var(--school-soft); }
.finder__out b { display: block; font: 400 clamp(1.8rem, 3vw, 2.6rem)/1.05 var(--display); color: var(--brand-text); }
.finder__out p { margin-top: 0.6rem; }
.finder__out ul { margin-top: 0.9rem; font-size: 0.95rem; color: var(--muted); }
.opendays { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.openday { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.5rem; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.openday .datebox { grid-row: auto; }
.openday p { color: var(--muted); font-size: 0.98rem; }
.openday footer { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.92rem; }
.table-scroll { overflow-x: auto; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); background: var(--card); }
.fees { min-width: 34rem; font-variant-numeric: tabular-nums; }
.fees th, .fees td { padding: 0.85rem 1.3rem; text-align: right; white-space: nowrap; }
.fees th:first-child, .fees td:first-child { text-align: left; }
.fees thead th { font: 600 0.76rem/1.2 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-block: 1.1rem; }
.fees tbody tr { border-top: 1px solid var(--line); }
.fees .fees__group th { background: var(--school-soft); font: 400 1.15rem/1.2 var(--serif); color: var(--brand-text); }
.estimator { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 3vw, 3rem); }
.estimator__group + .estimator__group { margin-top: 1.8rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.estimator__group > h3, .estimator legend { font: 600 0.92rem/1.3 var(--sans); margin-bottom: 0.9rem; letter-spacing: 0; }
.estimator legend { float: left; width: 100%; }
.estimator legend + * { clear: both; }
.child { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.6rem; align-items: end; }
.child + .child { margin-top: 0.8rem; }
.child .tool { box-shadow: inset 0 0 0 1px var(--line); }
.estimator .check + .check { margin-top: 0.7rem; }
.estimator .check span { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.summary { padding: clamp(1.4rem, 2.6vw, 2.2rem); border-radius: 20px; background: var(--school); color: var(--school-ink); align-self: start; position: sticky; top: 6.5rem; }
.summary > span { font-size: 0.92rem; opacity: 0.8; }
.summary > b { display: block; margin-top: 0.3rem; font: 400 clamp(2.6rem, 4.4vw, 3.8rem)/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.summary dl { margin-top: 1.5rem; font-variant-numeric: tabular-nums; }
.summary dl div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.6rem; border-top: 1px solid var(--school-line); font-size: 0.96rem; }
.summary dl dt { opacity: 0.85; }
.summary p { margin-top: 1.2rem; font-size: 0.86rem; opacity: 0.75; }
.summary .btn { margin-top: 1.3rem; }

/* ---------------------------------------------------------------- news */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }
.toolbar input { max-width: 22rem; border-radius: 999px; padding-inline: 1.2rem; }
.newsgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.4rem) clamp(1.2rem, 2.4vw, 2rem); }
.newsgrid .story:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.newsgrid .story:first-child h3 { font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1.04; }
.newsgrid .story:not(:first-child) h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); line-height: 1.15; }
.empty { padding: 2.5rem; border-radius: var(--r-lg); background: var(--surface); text-align: center; color: var(--muted); }
.article { max-width: 46rem; margin-inline: auto; }
.article h1 { font-size: clamp(2.4rem, 4.8vw, 4.2rem); line-height: 1.02; margin-top: 1rem; }
.article .lead { margin-top: 1.4rem; color: var(--ink); }
.article__cover { margin-block: clamp(2rem, 4vw, 3.5rem); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 3 / 2; }
.article__cover img { width: 100%; height: 100%; object-fit: cover; }
.article .prose { font: 400 1.2rem/1.7 var(--serif); }
.article__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- calendar */
.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.9rem; }
.term { padding: 1.6rem; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.term dl { margin-top: 1.1rem; }
.term dl div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.6rem; border-top: 1px solid var(--line); font-size: 0.97rem; }
.term dt { color: var(--muted); }
.term dd { text-align: right; font-weight: 500; }
.cal__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.cal__bar h3 { font: 400 clamp(1.7rem, 2.8vw, 2.4rem)/1 var(--display); min-width: 12ch; }
.cal__nav { display: flex; align-items: center; gap: 0.4rem; }
.cal__nav .tool { box-shadow: inset 0 0 0 1px var(--line); }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); }
.cal__dow { padding: 0.8rem 0.7rem; font: 600 0.72rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal__day { min-height: 7.2rem; padding: 0.55rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day > span { display: inline-grid; place-items: center; min-width: 1.8rem; height: 1.8rem; border-radius: 50%; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.cal__day.is-out > span { opacity: 0.35; }
.cal__day.is-today > span { background: var(--school); color: var(--school-ink); font-weight: 600; }
.cal__day.is-break { background: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--ink) 5%, transparent) 7px 8px); }
.cal__event { display: block; width: 100%; margin-top: 0.25rem; padding: 0.3rem 0.5rem; border-radius: 7px; background: var(--cat); color: #fff; font: 500 0.78rem/1.25 var(--sans); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.events li { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; padding-block: 1.2rem; border-top: 1px solid var(--line); scroll-margin-top: 7rem; }
.events li:target { background: var(--school-soft); border-radius: var(--r); padding-inline: 1rem; border-top-color: transparent; }
.events .datebox { grid-row: auto; }
.events h3 { font: 400 1.3rem/1.2 var(--serif); }
.events p { margin-top: 0.3rem; color: var(--muted); font-size: 0.98rem; max-width: 60ch; }
.events .keyline { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin-top: 0.45rem; font-size: 0.9rem; color: var(--muted); }
.events .keyline span { display: inline-flex; align-items: center; gap: 0.35rem; }
.dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--cat); }

/* ---------------------------------------------------------------- documents and contact */
.docs li { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.2rem; border-radius: var(--r); transition: background-color 0.3s var(--ease); }
.docs li:hover { background: var(--surface); }
.docs li + li { margin-top: 0.15rem; }
.docs .i { width: 1.6rem; height: 1.6rem; color: var(--brand-text); }
.docs strong { display: block; font-weight: 600; }
.docs span { color: var(--muted); font-size: 0.9rem; }
.docs h3 { margin: 2.6rem 0 0.8rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.docs h3:first-child { margin-top: 0; }
.contacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
.contact { padding: 1.5rem; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.contact p { margin-top: 0.5rem; color: var(--muted); font-size: 0.96rem; }
.contact a { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.7rem; color: var(--brand-text); font-weight: 500; word-break: break-word; }
.contact a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.findus { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); border-radius: var(--r-lg); overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.findus img { width: 100%; height: 100%; object-fit: cover; min-height: 20rem; }
.findus > div { padding: clamp(1.5rem, 4vw, 3.5rem); }
.findus address { font-style: normal; margin-top: 1rem; line-height: 1.7; }
.findus .day { margin-top: 1.5rem; grid-template-columns: 6.5rem 1fr; }
.findus .day dt { font: 600 0.92rem/1.6 var(--sans); color: var(--ink); }
.notfound { min-height: 60dvh; display: grid; place-items: center; text-align: center; }
.notfound b { display: block; font: 400 clamp(6rem, 22vw, 15rem)/0.85 var(--display); color: var(--brand-text); }

/* ---------------------------------------------------------------- dialogs */
dialog { border: 0; padding: 0; color: var(--ink); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgb(20 12 14 / 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.search { width: min(44rem, 100% - 2rem); margin: clamp(1rem, 9vh, 6rem) auto auto; }
.search[open] { animation: rise 0.5s var(--ease); }
.search .bezel__core { padding: 0.6rem; }
.search__field { display: flex; align-items: center; gap: 0.8rem; padding: 0.4rem 0.6rem 0.4rem 1rem; }
.search__field .i { width: 1.4rem; height: 1.4rem; color: var(--muted); }
.search__field input { border: 0; background: none; min-height: 3.2rem; padding: 0; font-size: 1.2rem; box-shadow: none; }
.search__results { max-height: min(60vh, 30rem); overflow-y: auto; border-top: 1px solid var(--line); padding: 0.4rem; }
.search__results:empty { display: none; }
.search__results h3 { padding: 0.9rem 0.8rem 0.4rem; font: 600 0.72rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.search__results a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0.8rem; border-radius: 12px; }
.search__results a span { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.search__results a:hover, .search__results a.is-active { background: var(--school-soft); }
.search__results p { padding: 1.2rem 0.8rem; color: var(--muted); }
.lightbox { width: 100vw; height: 100dvh; display: none; place-items: center; }
.lightbox[open] { display: grid; }
.lightbox img { max-width: min(92vw, 90rem); max-height: 84dvh; border-radius: var(--r); background: none; }
.lightbox p { position: fixed; left: 0; right: 0; bottom: 1.4rem; text-align: center; color: #fff; }
.lightbox button { position: fixed; top: 1rem; right: 1rem; color: #fff; background: rgb(255 255 255 / 0.14); }
@keyframes rise { from { opacity: 0; transform: translateY(1.5rem); } }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1023px) {
  .hero, .welcome, .latest, .page-head--split, .split, .tabs__panel, .finder, .estimator, .findus, .newsgrid .story:first-child { grid-template-columns: minmax(0, 1fr); }
  .hero__media .arch { margin-inline: auto; width: min(100%, 30rem); }
  .hero__card { left: 0.5rem; }
  .welcome .arch, .split .arch { max-width: 22rem; }
  .page-head--split .arch { margin-left: 0; max-width: 22rem; }
  .phases__grid, .phases__grid:has(.phase:hover), .phases__grid:has(.phase:focus-within) { grid-template-columns: 1fr; }
  .phase { min-height: 20rem; }
  .phase .phase__more { grid-template-rows: 1fr; opacity: 1; }
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 15rem; }
  .tile--sport { grid-column: 1 / -1; grid-row: auto; }
  .steps { grid-template-columns: 1fr 1fr; gap: 2.6rem 0; }
  .opendays, .terms, .stats { grid-template-columns: 1fr; }
  .contacts, .houses { grid-template-columns: 1fr 1fr; }
  .people--three { grid-template-columns: 1fr 1fr; }
  .newsgrid, .subjects { grid-template-columns: 1fr 1fr; }
  .summary { position: static; }
  .split--flip > :first-child { order: 2; }
}
@media (max-width: 719px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .values, .newsgrid, .subjects, .contacts, .form, .steps, .people--three { grid-template-columns: minmax(0, 1fr); }
  .values li { grid-template-columns: 1fr; gap: 0.6rem; }
  .bento { grid-template-columns: 1fr; }
  .trio { grid-template-columns: 1fr; grid-auto-rows: 16rem; }
  .tile--music { grid-column: auto; }
  .gallery button, .gallery button:nth-child(n) { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
  .child { grid-template-columns: 1fr auto; }
  .child .field:first-child { grid-column: 1 / -1; }
  .events li { grid-template-columns: auto 1fr; }
  .events li > .btn { grid-column: 1 / -1; justify-self: start; }
  .cal__day { min-height: 3.6rem; padding: 0.3rem; text-align: center; }
  .cal__dow { padding-inline: 0; text-align: center; letter-spacing: 0.04em; }
  .cal__event { width: 0.55rem; height: 0.55rem; padding: 0; margin: 0.25rem auto 0; border-radius: 50%; font-size: 0; display: inline-block; margin-inline: 0.08rem; }
  .docs li { grid-template-columns: auto 1fr; }
  .docs li .btn { grid-column: 2; justify-self: start; }
  .story--row { grid-template-columns: 5.5rem 1fr; }
  .brand small { display: none; }
}

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

@media print {
  .notice, .site-header, .menu, .site-footer, .btn, .tool, .subnav, dialog, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .page-head { padding-block: 1.2rem; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .summary { position: static; background: none; color: #000; box-shadow: inset 0 0 0 1px #999; }
  .estimator { grid-template-columns: 1fr 1fr; }
  .bezel, .bezel__core { padding: 0; background: none; box-shadow: none; }
}
