/* School No.17 — the school's own layer over ScoreMarch's shared stylesheet (main.css).
   main.css arrives re-coloured by build.mjs (the maroon family becomes the school's green; the gold
   stays), so everything here uses the same tokens: --maroon is the house colour, --gold the metal.
   This file only adds what a school needs and ScoreMarch does not have: the "17" lockup,
   photographs, the bell schedule, the subject table, people, and the plain fact lists. */

/* ---------- Lockup: the "17" shield and the school's name ---------- */
.brand--school { display: flex; align-items: center; gap: 12px; padding: 4px 0; color: var(--white); text-decoration: none; }
.brand__crest {
  flex: none; display: grid; place-items: center; width: 42px; height: 44px;
  border-radius: 2px 2px 2px 16px; background: var(--white); color: var(--maroon);
  font: 600 1.45rem/1 var(--font-serif); font-variant-numeric: lining-nums;
  box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 3px rgba(15, 64, 52, .5);
  transition: width .4s var(--ease), height .4s var(--ease), font-size .4s var(--ease);
}
.brand__words { display: grid; gap: 3px; }
.brand__name { font: 600 1.32rem/1 var(--font-serif); letter-spacing: -.005em; white-space: nowrap; }
.brand__place { font: 600 .625rem/1 var(--font-label); letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }
.site-header[data-state="solid"] .brand__crest { width: 36px; height: 38px; font-size: 1.25rem; }
.site-header[data-tone="light"] .brand--school { color: var(--ink); }
.site-header[data-tone="light"] .brand__crest { background: var(--maroon); color: var(--white); box-shadow: inset 0 0 0 2px var(--maroon), inset 0 0 0 3px rgba(216, 164, 68, .7); }
.site-header[data-tone="light"] .brand__place { color: var(--gold-ink); }
html.menu-open .site-header .brand--school { color: var(--white); }
html.menu-open .site-header .brand__crest { background: var(--white); color: var(--maroon); box-shadow: none; }
@media (max-width: 479px) { .brand__name { font-size: 1.15rem; } .brand__crest { width: 36px; height: 38px; font-size: 1.25rem; } }
@media (max-width: 359px) { .brand--school { gap: 9px; } .brand__name { font-size: 1.05rem; } .brand__place { letter-spacing: .26em; } }

.brand--footer { gap: 16px; }
.brand--footer .brand__crest { width: 58px; height: 62px; border-radius: 3px 3px 3px 22px; font-size: 2rem; }
.brand--footer .brand__name { font-size: 1.9rem; }
.brand--footer .brand__place { font-size: .7rem; }
.site-footer .footer-blurb { margin-top: 22px; }
.footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-legal .lang-switch { margin-left: auto; }

/* ---------- Photographs: the shield corner and an engraved hairline ---------- */
.photo { margin: 0; }
.photo__frame { position: relative; overflow: hidden; border-radius: 3px 3px 3px var(--shield-r); background: var(--ivory-2); box-shadow: var(--shadow-2); }
.photo__frame::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(250, 249, 249, .5); border-radius: 1px 1px 1px calc(var(--shield-r) - 7px); pointer-events: none; }
.photo__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo__caption { margin-top: 14px; max-width: 46ch; font: italic 500 1.02rem/1.4 var(--font-serif); color: var(--c-muted); }

/* ---------- Home hero ---------- */
.page-hero--home .page-hero__inner { align-items: center; }
.page-hero--home .page-hero__main { grid-column: 1 / span 7; }
.page-hero--home .page-hero__side { grid-column: 8 / span 5; }
.photo--hero .photo__frame { aspect-ratio: 8 / 7; box-shadow: var(--shadow-3); }
.photo--hero .photo__caption { color: rgba(250, 249, 249, .72); }
.page-hero__meta a { color: inherit; text-decoration: none; }
.page-hero__meta a:hover { text-decoration: underline; text-decoration-color: var(--c-accent); }
@media (max-width: 959px) {
  .page-hero--home .page-hero__main, .page-hero--home .page-hero__side { grid-column: 1 / -1; }
  .photo--hero .photo__frame { aspect-ratio: 4 / 3; }
}

/* in-page contents in a hero */
.hero-toc { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: clamp(36px, 4vw, 56px) 0 0; padding: 20px 0 0; list-style: none; border-top: 1px solid var(--c-line); }
.hero-toc a { display: inline-flex; align-items: baseline; gap: 10px; min-height: 32px; font: 600 var(--fs-label)/1.3 var(--font-label); letter-spacing: .22em; text-transform: uppercase; color: var(--c-fg); text-decoration: none; }
.hero-toc a:hover { color: var(--c-accent); }
.hero-toc i { font: italic 500 1.1rem/1 var(--font-serif); letter-spacing: 0; text-transform: none; color: var(--c-num); }
.hero-toc .link-arrow { letter-spacing: .16em; }

/* ---------- The school day ---------- */
.day { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.day__intro { grid-column: 1 / span 5; display: grid; gap: 22px; align-content: start; }
.day__intro .h2 { margin-top: 0; }
.day__panel { grid-column: 7 / span 6; padding: clamp(22px, 2.6vw, 36px); border: 1px solid var(--c-line-soft); border-radius: 2px 2px 2px var(--shield-r-card); background: var(--c-surface); box-shadow: var(--shadow-1); }
.day__status { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; font: italic 500 clamp(1.3rem, 1.1rem + .7vw, 1.7rem)/1.2 var(--font-serif); color: var(--c-fg); }
.day__status::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 0 0 0 4px; background: var(--c-accent); translate: 0 -2px; }
.day__status:empty { display: none; }
.day__lists .kicker { margin: 0 0 6px; }
.day__clock { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--c-line-soft); font: 600 var(--fs-label)/1.3 var(--font-label); letter-spacing: .2em; text-transform: uppercase; color: var(--c-label); }
.day__clock b { font: 400 1.5rem/1 var(--font-display); letter-spacing: .02em; color: var(--c-fg); }
.schedule { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.schedule__tabs { grid-column: 1 / span 7; }
.schedule__aside { grid-column: 9 / span 4; padding-top: 14px; border-top: 2px solid var(--c-fg); }
.schedule__aside .day__clock { margin-top: 0; }
.schedule__note { margin: 20px 0 0; font-size: .95rem; line-height: 1.6; color: var(--c-muted); }
@media (max-width: 959px) {
  .day__intro, .day__panel, .schedule__tabs, .schedule__aside { grid-column: 1 / -1; }
  .day__panel, .schedule__aside { margin-top: 36px; }
}

.bell { width: 100%; border-collapse: collapse; }
.bell thead th { padding: 0 0 10px; text-align: left; font: 600 var(--fs-label)/1.3 var(--font-label); letter-spacing: .2em; text-transform: uppercase; color: var(--c-label); border-bottom: 2px solid var(--c-fg); }
.bell thead th + th, .bell td { width: 5.5em; text-align: right; }
.bell th, .bell td { padding: 11px 0; border-bottom: 1px solid var(--c-line-soft); }
.bell tbody th { text-align: left; font: 500 1.2rem/1.2 var(--font-serif); color: var(--c-fg); }
.bell td { font-size: .98rem; color: var(--c-fg); }
.bell__row--b th, .bell__row--m th { font: 400 .92rem/1.3 var(--font-sans); color: var(--c-muted); }
.bell__row--b td, .bell__row--m td { color: var(--c-muted); font-size: .9rem; }
.bell__row--b th, .bell__row--b td { padding-block: 6px; }
.bell__row.is-now th, .bell__row.is-now td { background: var(--accent-tint); color: var(--c-fg); }
.bell__row.is-now th { box-shadow: inset 3px 0 0 var(--c-accent); padding-left: 12px; }
.bell__now { display: inline-block; margin-left: 10px; padding: 3px 8px; border-radius: 2px 2px 2px 8px; background: var(--c-accent); color: var(--c-on-accent); font: 600 var(--fs-label-sm)/1.2 var(--font-label); letter-spacing: .14em; text-transform: uppercase; vertical-align: middle; }
.day__panel .bell thead { display: none; }
.day__panel .bell tbody tr:first-child th, .day__panel .bell tbody tr:first-child td { border-top: 2px solid var(--c-fg); }

/* ---------- Subjects and hours ---------- */
.curriculum { min-width: 900px; font-size: .92rem; }
.curriculum th, .curriculum td { padding: 11px 10px; }
.curriculum thead th { padding-block: 14px 12px; }
.curriculum td, .curriculum thead th + th { text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.curriculum tbody th { font: 400 .98rem/1.3 var(--font-sans); min-width: 15em; }
.curriculum .curriculum__group th { padding-top: 26px; font: 600 var(--fs-label)/1.3 var(--font-label); letter-spacing: .2em; text-transform: uppercase; color: var(--c-label); border-bottom-color: var(--c-fg); }
.curriculum__total { font-weight: 600; color: var(--c-accent); }
.curriculum thead .curriculum__total { color: var(--c-label); }
.curriculum tfoot th, .curriculum tfoot td { border-top: 2px solid var(--c-fg); border-bottom: 0; font: 500 1.12rem/1.2 var(--font-serif); }
.curriculum tfoot td { text-align: center; }
.curriculum .nil { color: var(--c-line); }
.curriculum abbr { text-decoration: none; }
.curriculum__group span { position: sticky; left: 10px; display: inline-block; }
.table-note { margin-top: 16px; max-width: 70ch; font: italic 500 1rem/1.4 var(--font-serif); color: var(--c-muted); }
.table-note a { color: var(--c-accent); }
/* On a phone the subject names wrap in a narrow fixed column, so the first grades are in view
   beside them and it is plain that the table scrolls sideways. */
@media (max-width: 719px) {
  .curriculum { width: max-content; min-width: 0; font-size: .86rem; }
  .curriculum th, .curriculum td { padding: 10px 6px; }
  .curriculum td, .curriculum thead th + th { min-width: 2.5rem; }
  .curriculum tbody th, .curriculum tfoot th { min-width: 0; font-size: .9rem; line-height: 1.25; }
  .curriculum__name { display: block; width: 8.2rem; }
  .curriculum th:first-child { padding-left: 0; }
  .curriculum__group span { left: 0; }
}
.stage__hours { justify-content: flex-start; gap: 8px; font-size: .9rem; color: var(--c-muted); }
.stage__hours b { font: 400 1.6rem/1 var(--font-display); color: var(--c-accent); }
.card__kicker .card__num { margin-right: 6px; }

/* ---------- About: the story, photographs, people, facts ---------- */
.story { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.story__head { grid-column: 1 / span 5; display: grid; gap: 18px; }
.story__head .h2 { margin-top: 0; }
.story__text { grid-column: 7 / span 6; }
.story__text p { font-size: 1.06rem; }
.story__text .story__first { font: 500 clamp(1.4rem, 1.2rem + .7vw, 1.75rem)/1.35 var(--font-serif); letter-spacing: -.005em; }
.photos { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(20px, 3vw, 48px); align-items: end; margin-top: clamp(48px, 6vw, 96px); }
.photos .photo__frame { aspect-ratio: 4 / 3; }
@media (max-width: 959px) { .story__head, .story__text { grid-column: 1 / -1; } .story__text { margin-top: 28px; } }
@media (max-width: 759px) { .photos { grid-template-columns: 1fr; } }

.person .card__body { gap: 8px; }
.person__mark { display: grid; place-items: center; width: 54px; height: 58px; margin-bottom: 10px; border-radius: 2px 2px 2px 20px; background: var(--house-grad); color: var(--gold-light); font: 500 1.5rem/1 var(--font-serif); letter-spacing: .02em; }
.person .card__title { font-size: 1.5rem; }
.person__contact { flex-direction: column; align-items: flex-start; gap: 4px; font-size: .86rem; }
.person__contact a { color: var(--c-muted); text-decoration: none; overflow-wrap: anywhere; }
.person__contact a:hover { color: var(--c-accent); text-decoration: underline; }

.facts { display: grid; margin: 0; border-top: 2px solid var(--c-fg); }
.facts > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--gap); padding: 18px 0; border-bottom: 1px solid var(--c-line); }
.facts dt { font: 600 var(--fs-label)/1.5 var(--font-label); letter-spacing: .2em; text-transform: uppercase; color: var(--c-label); padding-top: .3em; }
.facts dd { margin: 0; font: 500 1.24rem/1.35 var(--font-serif); color: var(--c-fg); }
.facts dd small { display: block; margin-top: 4px; font: 400 .88rem/1.5 var(--font-sans); color: var(--c-muted); }
.facts a { color: var(--c-accent); text-decoration-color: var(--c-rule); text-underline-offset: 3px; }
.facts__links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.facts--tight > div { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); padding: 14px 0; }
@media (max-width: 639px) { .facts > div, .facts--tight > div { grid-template-columns: 1fr; row-gap: 4px; } }

/* ---------- Admissions: steps beside what to bring ---------- */
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.ready .card__body { position: relative; z-index: 1; gap: 16px; }
.ready__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ready__list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; font-size: .98rem; line-height: 1.5; }
.ready__list svg { width: 18px; height: 18px; margin-top: .2em; color: var(--c-accent); }
.faq__note { margin-top: 26px; }
@media (max-width: 899px) { .split { grid-template-columns: 1fr; } }

/* ---------- News ---------- */
.more { margin-top: clamp(28px, 3vw, 44px); }
.notices { display: grid; }
.notice { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: clamp(28px, 3.4vw, 48px) 0; border-top: 1px solid var(--c-line); scroll-margin-top: 90px; }
.notice:first-child { border-top: 2px solid var(--c-fg); }
.notice__date { grid-column: 1 / span 3; padding-top: .55em; }
.notice__body { grid-column: 4 / span 6; display: grid; gap: 12px; align-content: start; }
.notice__body p { margin: 0; }
.notice__title { margin: 0; }
.notice__photo { grid-column: 10 / span 3; align-self: start; }
.notice__photo .photo__frame { border-radius: 2px 2px 2px var(--shield-r-card); aspect-ratio: 4 / 3; box-shadow: var(--shadow-1); }
.notice__photo .photo__frame::after { display: none; }
.notice:target .notice__title { color: var(--c-accent); }
@media (max-width: 899px) { .notice__date, .notice__body, .notice__photo { grid-column: 1 / -1; } .notice__body { margin-top: 8px; } .notice__photo { margin-top: 18px; max-width: 420px; } }

/* ---------- Contact ---------- */
.find { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.find__text { grid-column: 1 / span 5; display: grid; gap: 22px; }
.find__text .h2 { margin-top: 0; }
.find__map { grid-column: 7 / span 6; }
.map { aspect-ratio: 4 / 3; }
.map::after { display: none; }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }
.find__links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; }
@media (max-width: 959px) { .find__text, .find__map { grid-column: 1 / -1; } .find__map { margin-top: 36px; } }

/* ---------- Sample photographs: credited on the About page ---------- */
.photo--sample .photo__frame { border-radius: 2px 2px 2px var(--shield-r-card); box-shadow: var(--shadow-1); }
.photo--sample .photo__frame::after { display: none; }
.photo__caption b { display: block; font: 500 1.28rem/1.2 var(--font-serif); color: var(--c-fg); }

.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(22px, 2.4vw, 36px) clamp(14px, 1.8vw, 26px); }
.mosaic .photo { grid-column: span 3; display: flex; flex-direction: column; }
.mosaic .photo__frame { aspect-ratio: 4 / 3; }
.mosaic .photo__caption { margin-top: 10px; font-size: 1rem; }
/* Home: one large frame and four small ones */
.mosaic--day .photo:first-child { grid-column: span 6; grid-row: span 2; }
.mosaic--day .photo:first-child .photo__frame { flex: 1 1 auto; aspect-ratio: auto; min-height: 280px; border-radius: 3px 3px 3px var(--shield-r); }
.mosaic--day .photo:first-child img { position: absolute; inset: 0; }
/* Learning: three larger frames over four smaller ones */
.mosaic--subjects { margin-top: clamp(40px, 5vw, 72px); }
.mosaic--subjects .photo:nth-child(-n+3) { grid-column: span 4; }
@media (max-width: 759px) {
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mosaic .photo, .mosaic--subjects .photo:nth-child(-n+3) { grid-column: span 1; }
  .mosaic .photo:first-child, .mosaic--subjects .photo:first-child { grid-column: 1 / -1; grid-row: auto; }
  .mosaic--day .photo:first-child .photo__frame { flex: none; aspect-ratio: 4 / 3; min-height: 0; }
  .mosaic .photo__caption { font-size: .95rem; }
  .photo__caption b { font-size: 1.12rem; }
}

.credits { margin-top: clamp(40px, 5vw, 72px); scroll-margin-top: 100px; }
.credits__text { max-width: 76ch; margin: 12px 0 0; font-size: .92rem; line-height: 1.6; color: var(--c-muted); }
.credits__list { columns: 2; column-gap: var(--gap); margin: 18px 0 0; padding: 0; list-style: none; font-size: .82rem; line-height: 1.5; color: var(--c-muted); }
.credits__list li { break-inside: avoid; padding: 7px 0; border-top: 1px solid var(--c-line-soft); overflow-wrap: anywhere; }
.credits__list a { color: var(--c-fg); text-decoration-color: var(--c-rule); text-underline-offset: 3px; }
.credits__list a:hover { color: var(--c-accent); }
@media (max-width: 759px) { .credits__list { columns: 1; } }

/* ---------- Small things ---------- */
.stats__num { text-transform: none; }
.cta-band__actions a[href^="tel:"] { white-space: nowrap; }
