/* =========================================================
   Saint Francis of Assisi College: Institutional Website
   VOICE   formal, warm, Franciscan; a printed college prospectus
   IDEA    "Shades of Red": one red family carries the whole site
   PICTURE real campus photography in every section (placeholders for now)
   TYPE    Source Serif 4 for display (h1, h2, names), Public Sans for text: both built for screens
   LAYOUT  1180px, 12-column grid, one left edge; 8px spacing scale

   DESIGN RULES (CRAP + typography)
   Contrast    one dominant red (#a70000), one accent (#ff0000, decorative only),
               neutrals for text. Serif display vs sans text. Filled primary vs outline secondary.
   Repetition  every colour, size and space comes from the tokens below;
               cards, buttons, section heads and pills are reused on every page.
   Alignment   all text left-aligned to the grid's left edge; columns end together.
   Proximity   small gaps inside a group (--s1/--s2), large gaps between groups (--s5+).
   Type        7-step scale (ratio ~1.25 from 18px), 2 families, 3 weights,
               body 18px / line-height 1.65, headings 1.15, measure 60-70 characters,
               nothing below 14px, secondary text at 7.6:1 contrast.
   ========================================================= */

/* ---------- Fonts (self-hosted: faster, private, no Google dependency) ---------- */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2-variations"), url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("../fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2-variations"), url("../fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;

  /* ---- Palette: Shades of Red ---- */
  --red-100: #ffbaba;   /* tints: pills, secondary text on red bands (4.9:1 on #a70000) */
  --red-200: #ff7b7b;   /* on dark backgrounds only (6.8:1 on ink) */
  --red-300: #ff5252;   /* on dark backgrounds only: footer accents (5.4:1 on ink) */
  --red-400: #ff0000;   /* ACCENT, decorative only: rules, dots, focus, large numerals (4:1, large text only) */
  --red-500: #a70000;   /* PRIMARY: buttons, links, bands (white text 7.9:1) */
  --red-600: #7d0000;   /* hover/pressed state of --red-500 (darker shade of the same hue) */
  --red-050: #fff3f3;   /* very light tint of --red-100 for section backgrounds */

  /* ---- Neutrals ---- */
  --ink:   #1d1b1c;     /* body text 17:1 */
  --muted: #4f4a49;     /* secondary text 8.5:1 */
  --line:  #eadede;
  --white: #ffffff;     /* always white: text on red bands and photos */

  /* ---- Roles (these change in dark mode) ---- */
  --bg:           #ffffff;              /* page */
  --surface:      #ffffff;              /* cards, form, mobile menu */
  --tint:         var(--red-050);       /* soft section background */
  --tint-border:  var(--red-100);       /* pill and hover borders */
  --text:         var(--ink);
  --link:         var(--red-500);       /* red used AS TEXT (links, labels, accents) */
  --link-hover:   var(--red-600);
  --header-bg:    rgba(255,255,255,.97);
  --input-border: #cdbfbf;
  --footer-bg:    var(--ink);
  --tbc-bg: #fff1cc;  --tbc-text: #7a5200;  --tbc-rule: #d9a300;

  /* ---- Type ---- */
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans:  "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs:  0.875rem;                           /* 14  labels, meta */
  --fs-sm:  1rem;                               /* 16  secondary text */
  --fs-md:  clamp(1.0625rem, 1rem + .25vw, 1.125rem); /* 17-18  body */
  --fs-lg:  clamp(1.25rem, 1.15rem + .4vw, 1.375rem); /* 20-22  h3, card titles, lede */
  --fs-xl:  clamp(1.625rem, 2.6vw, 2rem);       /* 26-32  names, h2 small */
  --fs-2xl: clamp(2rem, 4vw, 2.75rem);          /* 32-44  h2 */
  --fs-3xl: clamp(2.5rem, 6vw, 4.25rem);        /* 40-68  h1 */
  --lh-body: 1.65;
  --lh-tight: 1.15;

  /* ---- Spacing: 8px scale ---- */
  --s1: .5rem;  --s2: 1rem;  --s3: 1.5rem;  --s4: 2rem;
  --s5: 3rem;   --s6: 4rem;  --s7: clamp(4rem, 8vw, 6rem);

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 8px;
}

/* ---------- Dark mode ----------
   Set by the theme toggle (assets/js/main.js) or, on first visit, by the device setting.
   Red as a background (buttons, bands) stays #a70000; red as text switches to #ff7b7b,
   because #a70000 text on a dark page is unreadable (2.2:1). All pairs pass WCAG AA. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:           #141011;   /* text 16.3:1 */
  --surface:      #1d1819;
  --tint:         #221a1b;
  --tint-border:  #4a2a2c;
  --text:         #f2eded;
  --muted:        #b9adad;   /* 8.7:1 */
  --line:         #3a3031;
  --link:         var(--red-200);   /* #ff7b7b, 7.5:1 */
  --link-hover:   var(--red-100);
  --header-bg:    rgba(20,16,17,.95);
  --input-border: #5a4d4e;
  --footer-bg:    #0b0909;
  --tbc-bg: #3d3000;  --tbc-text: #ffd966;  --tbc-rule: #b38600;
}
:root[data-theme="dark"] img[src*="/photos/"], :root[data-theme="dark"] img[src^="assets/img/photos/"] { filter: brightness(.9); }
:root[data-theme="dark"] img[src*="placeholders/"] { filter: brightness(.45) saturate(.7); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; font-family: var(--sans); font-size: var(--fs-md); line-height: var(--lh-body);
  color: var(--text); background: var(--bg); overflow-x: clip;
  font-optical-sizing: auto; font-kerning: normal; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--red-400); outline-offset: 3px; }

/* Headings: serif display only at large sizes; h3 and below in the text face */
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: var(--lh-tight); letter-spacing: -0.01em; margin: 0 0 var(--s2); text-wrap: balance; }
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-family: var(--sans); font-weight: 600; font-size: var(--fs-lg); line-height: 1.3; margin: 0 0 var(--s1); }
p { margin: 0 0 var(--s2); max-width: 66ch; text-wrap: pretty; }
strong { font-weight: 600; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.section { padding: var(--s7) 0; }
.section-mist { background: var(--tint); }
.lede { font-size: var(--fs-lg); line-height: 1.5; color: var(--muted); max-width: 60ch; }
.rounded { border-radius: var(--radius); }
.scroll { overflow-x: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s2); top: -3rem; z-index: 100; background: var(--text); color: var(--bg); padding: var(--s1) var(--s2); border-radius: 4px; }
.skip-link:focus { top: var(--s2); }

/* Review markers for content still to come (temporary, outside the palette on purpose) */
.tbc { color: var(--tbc-text); background: var(--tbc-bg); padding: 0 .3em; border-radius: 3px; font-size: .92em; }
.tbc-block { background: var(--tbc-bg); border-left: 3px solid var(--tbc-rule); padding: var(--s2); color: var(--tbc-text); border-radius: 0 6px 6px 0; }
.sample-note { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--s3); }

/* Section head: title and its link sit together (proximity), aligned to one baseline */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s4); }
.section-head h2 { margin: 0; }
.text-link { font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.text-link::after { content: " →"; }

/* ---------- Buttons (repeated everywhere: one primary, one secondary style) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  font: 600 var(--fs-sm) var(--sans); text-decoration: none; padding: .7rem 1.4rem;
  border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary, .btn-small { background: var(--red-500); color: var(--white); }
.btn-primary:hover, .btn-small:hover { background: var(--red-600); color: var(--white); }
.btn-small { padding: .45rem 1.1rem; min-height: 40px; }
.btn-outline { border-color: var(--link); color: var(--link); background: transparent; }
.btn-outline:hover { background: var(--red-500); color: var(--white); }
.btn-light { background: var(--white); color: var(--red-500); }
.btn-light:hover { background: var(--red-050); color: var(--red-600); }
.btn-outline-light { border-color: var(--red-100); color: var(--white); }
.btn-outline-light:hover { background: var(--white); border-color: var(--white); color: var(--red-500); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--header-bg);
  backdrop-filter: blur(8px); border-top: 4px solid var(--red-500); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: var(--s2); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--text); }
.brand img, .seal-ph { border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.125rem; }
.brand-sub { font-family: var(--serif); font-style: italic; font-size: var(--fs-sm); color: var(--link); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--s3); }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover { border-bottom-color: var(--tint-border); }
.site-nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--red-400); }
.nav-toggle { display: none; }

/* Theme toggle */
.header-actions { display: flex; align-items: center; gap: var(--s1); order: 3; }
.site-nav { order: 2; margin-left: auto; }
.header-inner > .brand { order: 1; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; transition: border-color .2s, background-color .2s; }
.theme-toggle:hover { border-color: var(--link); background: var(--tint); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Home hero ---------- */
.hero { position: relative; min-height: clamp(460px, 64vh, 640px); display: flex; align-items: flex-end; color: var(--white); isolation: isolate; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(40,0,0,.82) 0%, rgba(40,0,0,.55) 45%, rgba(40,0,0,0) 75%), linear-gradient(180deg, rgba(40,0,0,0) 40%, rgba(40,0,0,.6)); }
@media (max-width: 720px) { .hero::after { background: linear-gradient(180deg, rgba(40,0,0,.35) 0%, rgba(40,0,0,.85) 70%); } }
.hero-content { padding-top: var(--s6); padding-bottom: var(--s6); }
.hero h1 { max-width: 18ch; color: var(--white); margin-bottom: var(--s2); }
.hero h1, .hero .lede, .campus-hero h1, .campus-hero .lede { text-shadow: 0 1px 12px rgba(40,0,0,.45); }
.hero .lede { color: var(--red-050); margin-bottom: var(--s4); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- Key facts ---------- */
.facts { background: var(--red-500); color: var(--white); }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts p { margin: 0; padding: var(--s3) var(--s3) var(--s3) 0; font-size: var(--fs-sm); color: var(--red-100); line-height: 1.45; }
.facts p + p { padding-left: var(--s3); border-left: 1px solid rgba(255,186,186,.35); }
.facts strong { display: block; font-family: var(--serif); font-size: var(--fs-xl); font-weight: 600; color: var(--white); line-height: var(--lh-tight); margin-bottom: .25rem; }

/* ---------- Inner page hero ---------- */
.page-hero { background: var(--tint); border-bottom: 1px solid var(--line); padding: var(--s6) 0 var(--s5); }
.page-hero h1 { margin-bottom: var(--s2); }
.page-hero .lede { margin: 0; }
.crumb { font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--s2); }
.crumb a { color: inherit; }

/* ---------- Campus cards ---------- */
.campus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.campus-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: box-shadow .25s, border-color .25s; }
.campus-card:hover { border-color: var(--tint-border); box-shadow: 0 12px 28px rgba(167,0,0,.10); }
.campus-card-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: var(--text); }
.campus-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.campus-card-body { display: flex; flex-direction: column; padding: var(--s3); }
.campus-card-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .01em; color: var(--link); margin-bottom: .25rem; }
.campus-card-name { font-family: var(--serif); font-size: var(--fs-xl); font-weight: 600; line-height: var(--lh-tight); margin-bottom: var(--s1); }
.campus-card-meta { font-size: var(--fs-sm); color: var(--muted); }
.campus-card-levels { font-size: var(--fs-sm); font-weight: 600; margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line); }
.campus-card-site { border-top: 1px solid var(--line); padding: var(--s2) var(--s3); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.campus-card-site:hover { background: var(--tint); }

/* ---------- Levels ---------- */
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.level img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; margin-bottom: var(--s3); }
.level p { color: var(--muted); margin: 0; }

/* ---------- Admissions band ---------- */
.admissions { background: var(--red-600); color: var(--white); padding: var(--s6) 0; }
.admissions-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.admissions h2 { margin-bottom: var(--s1); color: var(--white); }
.admissions p { margin: 0; color: var(--red-100); max-width: 52ch; }
.admissions-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.news-card { display: flex; flex-direction: column; color: var(--text); text-decoration: none; }
.news-card img { border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; margin-bottom: var(--s2); }
.news-card-meta { display: flex; gap: .75rem; font-size: var(--fs-xs); color: var(--muted); flex-wrap: wrap; margin-bottom: var(--s1); }
.news-campus { font-weight: 600; color: var(--link); }
.news-card-title { font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; margin-bottom: var(--s1); }
a.news-card:hover .news-card-title { text-decoration: underline; text-decoration-color: var(--red-400); }
.news-card-summary { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: center; }
.vm { display: grid; gap: var(--s4); }
.vm h2, .vm + div > h2 { font-size: var(--fs-xl); color: var(--link); margin-bottom: var(--s1); }
.vm p { margin: 0; }
.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s3); }
.values li { padding: var(--s3) 0; border-top: 2px solid var(--red-400); }
.value-word { font-family: var(--serif); font-size: var(--fs-xl); font-weight: 600; }
.timeline { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5) var(--s3); position: relative; }
.timeline li::after { content: ""; position: absolute; left: 0; right: calc(-1 * var(--s3)); top: 2.5rem; height: 1px; background: var(--red-100); z-index: -1; }
.timeline li:nth-child(4n)::after { right: 0; }
.timeline { isolation: isolate; }
.timeline li { position: relative; padding-top: 3.5rem; }
.timeline li::before { content: ""; position: absolute; left: 0; top: calc(2.5rem - 5px); width: 11px; height: 11px; border-radius: 50%; background: var(--red-400); box-shadow: 0 0 0 4px var(--bg); }
.year { position: absolute; top: 0; left: 0; font-family: var(--serif); font-weight: 700; font-size: var(--fs-xl); color: var(--link); line-height: 1; }
.timeline p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.seal-ph { width: min(280px, 70%); }
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s3); }
.person { margin: 0; }
.person img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; margin-bottom: var(--s2); }
.person figcaption { display: flex; flex-direction: column; gap: .15rem; }
.person span { color: var(--muted); font-size: var(--fs-sm); }
.badges { list-style: none; padding: 0; margin: var(--s2) 0 0; display: flex; flex-wrap: wrap; gap: var(--s1); }
.badges li { background: var(--tint); border: 1px solid var(--tint-border); border-radius: 999px; padding: var(--s1) var(--s3); font-weight: 600; font-size: var(--fs-sm); }

/* ---------- Campuses page ---------- */
.matrix { width: 100%; border-collapse: collapse; margin-top: var(--s2); background: var(--surface); font-size: var(--fs-sm); }
.matrix th, .matrix td { padding: .75rem var(--s2); border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.matrix th[scope="row"], .matrix thead th:first-child { text-align: left; }
.matrix thead th { font-weight: 600; font-size: var(--fs-xs); color: var(--muted); border-bottom: 2px solid var(--text); }
.yes { color: var(--link); }
.no { color: #bbb0b0; }

/* ---------- Campus page ---------- */
.campus-hero { position: relative; color: var(--white); isolation: isolate; min-height: clamp(380px, 52vh, 540px); display: flex; align-items: flex-end; }
.campus-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.campus-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(40,0,0,.05) 15%, rgba(40,0,0,.85)); }
.campus-hero-text { padding: var(--s6) var(--gutter) var(--s5); }
.campus-hero .crumb, .campus-hero .crumb a { color: var(--red-050); }
.campus-hero h1 { color: var(--white); margin-bottom: var(--s2); }
.campus-hero .lede { color: var(--red-050); margin: 0; }
.campus-label { font-weight: 600; font-size: var(--fs-sm); color: var(--red-100); margin: 0 0 var(--s1); }
.campus-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); align-items: start; }
.campus-layout h2 { font-size: var(--fs-xl); }
.level-list { list-style: none; padding: 0; margin: 0 0 var(--s5); display: flex; flex-wrap: wrap; gap: var(--s1); }
.level-list li { background: var(--tint); border: 1px solid var(--tint-border); border-radius: 999px; padding: .4rem var(--s2); font-weight: 500; font-size: var(--fs-sm); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s1); }
.gallery img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.info-card { border: 1px solid var(--line); border-top: 4px solid var(--red-500); border-radius: var(--radius); padding: var(--s3); position: sticky; top: 100px; }
.info-card dl { margin: 0 0 var(--s3); font-size: var(--fs-sm); }
.info-card dt { font-weight: 600; color: var(--muted); font-size: var(--fs-xs); margin-top: var(--s2); }
.info-card dt:first-child { margin-top: 0; }
.info-card dd { margin: 0; }
.info-actions { display: flex; flex-direction: column; gap: .75rem; align-items: stretch; }

/* Online services on campus pages */
.services { list-style: none; padding: 0; margin: 0 0 var(--s5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1); }
.services a { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: .6rem var(--s2);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); background: var(--surface); }
.services a:hover { border-color: var(--link); background: var(--tint); }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }
.info-card dd a { overflow-wrap: anywhere; }

/* Program lists on campus pages */
.programs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s4); margin-bottom: var(--s5); }
.program-group h3 { padding-bottom: var(--s1); border-bottom: 2px solid var(--red-400); margin-bottom: var(--s2); }
.program-group ul { list-style: none; margin: 0; padding: 0; }
.program-group li { padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.program-group.wide { grid-column: 1 / -1; }
.program-group.wide ul { columns: 2; column-gap: var(--s4); }
.program-group.wide li { break-inside: avoid; }
@media (max-width: 600px) { .programs { grid-template-columns: 1fr; } .program-group.wide ul { columns: 1; } }

/* ---------- Academics ---------- */
.academics-list { display: grid; gap: var(--s6); }
.academic-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s5); align-items: center; }
.offered { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; font-weight: 600; font-size: var(--fs-sm); }
.chip { border: 1px solid var(--link); border-radius: 999px; padding: .2rem .8rem; text-decoration: none; font-weight: 500; }
.chip:hover { background: var(--red-500); color: var(--white); }

/* ---------- Admissions page ---------- */
.steps { list-style: none; padding: 0; margin: var(--s3) 0 var(--s4); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); counter-reset: s; }
.steps li { counter-increment: s; border-top: 2px solid var(--red-400); padding-top: var(--s2); }
.steps li::before { content: counter(s); font-family: var(--serif); font-size: var(--fs-2xl); color: var(--link); line-height: 1; display: block; margin-bottom: var(--s1); }
.steps p { color: var(--muted); margin: 0; font-size: var(--fs-sm); }
.form-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6); align-items: start; }
.fine { font-size: var(--fs-xs); color: var(--muted); }
.form { background: var(--surface); border-radius: var(--radius); padding: var(--s4); display: flex; flex-direction: column; border: 1px solid var(--line); }
.form label { font-weight: 600; font-size: var(--fs-sm); margin: var(--s2) 0 .35rem; }
.form > label:first-of-type { margin-top: 0; }
.form input:not([type=checkbox]), .form select, .form textarea {
  font: 16px var(--sans); padding: .7rem .8rem; border: 1px solid var(--input-border); border-radius: 6px; width: 100%; background: var(--bg); color: var(--text);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--red-400); outline-offset: 1px; border-color: var(--red-500); }
.form .invalid { border-color: var(--red-500); background: var(--tint); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.form-row > div { display: flex; flex-direction: column; }
.form .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: var(--fs-xs); color: var(--muted); margin: var(--s3) 0; line-height: 1.5; }
.form .check input { margin-top: .2rem; width: 18px; height: 18px; flex: none; accent-color: var(--red-500); }
.form button { align-self: flex-start; }
.form-msg { font-size: var(--fs-sm); color: var(--link); margin: var(--s1) 0 0; min-height: 1.5em; }
.form-alert { padding: .8rem var(--s2); border-radius: 6px; margin: 0 0 var(--s2); }
.form-alert.ok { background: #e8f5ec; color: #1e5b32; }
.form-alert.err { background: var(--tint); color: var(--link); border: 1px solid var(--tint-border); }
.hp { position: absolute; left: -9999px; }

/* ---------- Contact directory ---------- */
.directory { width: 100%; border-collapse: collapse; margin-bottom: var(--s4); font-size: var(--fs-sm); }
.directory th { text-align: left; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; padding: .6rem .75rem; border-bottom: 2px solid var(--text); }
.directory td { padding: var(--s2) .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--s5); }

/* Recognition logos (About) */
.recognition { list-style: none; padding: 0; margin: var(--s3) 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.recognition li { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); font-size: var(--fs-sm); font-weight: 600; }
.recognition img { width: 80px; height: 80px; object-fit: contain; background: #fff; border-radius: 50%; padding: 4px; }
@media (max-width: 720px) { .recognition { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Admission requirements */
.req-title { font-size: var(--fs-xl); margin-top: var(--s5); }
.requirements { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.requirements ul { margin: 0; padding-left: 1.2em; }
.requirements li { padding: .25rem 0; }
@media (max-width: 720px) { .requirements { grid-template-columns: 1fr; } }
.dept { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: #ddd5d5; padding: var(--s6) 0 var(--s3); font-size: var(--fs-sm); }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--red-200); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 3fr); gap: var(--s4); padding-bottom: var(--s5); border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand img { margin-bottom: var(--s2); border-radius: 50%; }
.footer-name { font-family: var(--serif); font-size: var(--fs-lg); font-weight: 600; color: var(--white); margin: 0; }
.footer-motto { font-family: var(--serif); font-style: italic; color: var(--red-300); margin: 0 0 var(--s2); }
.footer-note { margin: 0 0 var(--s3); }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1); }
.social a { display: inline-flex; align-items: center; min-height: 36px; padding: .3rem .9rem; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; }
.social a:hover { border-color: var(--red-200); text-decoration: none; }
.footer-title { font: 600 var(--fs-xs) var(--sans); color: var(--red-200); margin: 0 0 var(--s2); }
.footer-links { list-style: none; margin: 0; padding: 0; line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s1) var(--s4); padding-top: var(--s3); font-size: var(--fs-xs); color: #b9aeae; }
.footer-bottom p { margin: 0; }
.footer-bottom a, .footer-credit a { text-decoration: underline; text-underline-offset: 3px; }
.footer-links a { display: inline-block; padding: .3rem 0; }
.crumb a { display: inline-block; padding: .35rem 0; }
.form button:disabled { opacity: .7; cursor: progress; }
.footer-credit p { margin: var(--s2) 0 0; max-width: none; font-size: var(--fs-xs); color: #b9aeae; }
.footer-credit a { overflow-wrap: anywhere; }

/* ---------- Announcement bar (v0.9) ---------- */
.notice { font-size: var(--fs-sm); line-height: 1.45; }
.notice-info { background: var(--red-600); color: var(--white); }
.notice-urgent { background: #ffd966; color: #2b1d00; }
.notice-inner { display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding-top: .5rem; padding-bottom: .5rem; }
.notice p { margin: 0; flex: 1; max-width: none; }
.notice a { color: inherit; font-weight: 600; text-decoration: underline; white-space: nowrap; }
.notice a:hover { color: inherit; text-decoration-thickness: 2px; }
.notice-close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: -8px;
  border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.notice-close:hover { background: rgba(255,255,255,.15); }
.notice-urgent .notice-close:hover { background: rgba(0,0,0,.08); }
.notice :focus-visible { outline-color: currentColor; }

/* ---------- "Information for" bar ---------- */
.topbar { background: var(--tint); border-bottom: 1px solid var(--line); font-size: var(--fs-xs); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 40px; }
.audience { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.topbar-label { color: var(--muted); }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s2); }
.topbar a { display: inline-flex; align-items: center; min-height: 36px; color: var(--text); font-weight: 600; text-decoration: none; }
.topbar a:hover { color: var(--link); text-decoration: underline; }
.topbar a[aria-current="page"] { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 600px) {
  .topbar-label, .topbar-links { display: none; }
  .topbar ul { gap: 0 var(--s3); }
}

/* ---------- Audience pages: quick links ---------- */
.audience-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s3); }
.audience-services .services { grid-template-columns: 1fr; margin-bottom: var(--s2); }
.quicklink-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.ql-title { font-size: var(--fs-xl); }
.quicklinks { list-style: none; margin: 0 0 var(--s3); padding: 0; border-top: 1px solid var(--line); }
.quicklinks li { border-bottom: 1px solid var(--line); }
.quicklinks a, .ql-missing { display: flex; flex-direction: column; gap: .15rem; padding: var(--s2) 0; text-decoration: none; }
.quicklinks a .ql-label { color: var(--link); font-weight: 600; }
.quicklinks a:hover .ql-label { text-decoration: underline; color: var(--link-hover); }
.ql-missing .ql-label { color: var(--text); font-weight: 600; }
.ql-note { color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 720px) { .audience-services, .quicklink-groups { grid-template-columns: 1fr; gap: var(--s4); } }

/* ---------- Admissions FAQ ---------- */
#faq { border-top: 1px solid var(--line); }
.faq { border-top: 1px solid var(--line); margin-top: var(--s3); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); min-height: 56px; padding: var(--s2) 0;
  font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.5rem; line-height: 1; color: var(--link); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--link); }
.faq details > :not(summary) { margin-top: 0; }
.faq details[open] { padding-bottom: var(--s2); }

.fb-links { margin: var(--s1) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.fb-links a { display: inline-block; padding: .3rem 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Footer legal links ---------- */
.footer-legal { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s3); }
.footer-legal a { display: inline-block; padding: .3rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .campus-grid, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--s5); }
  .timeline li::after { display: none; }
  .people, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts p:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts p:nth-child(n+3) { border-top: 1px solid rgba(255,186,186,.35); }
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 22px; height: 2px; background: var(--text); position: relative; transition: transform .2s, background-color .2s; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -7px; }
  .nav-toggle-bar::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: var(--s1) var(--gutter) var(--s3); }
  .site-nav li a:not(.btn) { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: var(--s2); width: 100%; }
  .split, .campus-layout, .form-wrap, .academic-row { grid-template-columns: 1fr; gap: var(--s4); }
  .info-card { position: static; }
}

@media (max-width: 600px) {
  .campus-grid, .news-grid, .levels, .gallery, .steps, .form-row { grid-template-columns: 1fr; }
  .timeline, .people { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 1rem; }
  .brand-sub { display: none; }
  .form { padding: var(--s3); }
  .directory thead { display: none; }
  .directory tr { display: grid; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .directory td { border: 0; padding: .2rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
