/*
 * Legacy of Angkatan V
 * Editorial Islamic yearbook design system
 * Frontend-only. PHP data flow, API hooks, form names, and JS data attributes remain untouched.
 */

:root {
  color-scheme: light;
  --color-emerald-950: #071f1a;
  --color-emerald-900: #0b2e26;
  --color-emerald-800: #123f34;
  --color-emerald-700: #1f5a49;
  --color-emerald-600: #2e6e5a;
  --color-emerald-100: #dfe9e3;
  --color-gold-600: #9f7d3f;
  --color-gold-500: #b99755;
  --color-gold-300: #d8c08a;
  --color-ivory-50: #fbf8f1;
  --color-cream-100: #f3ecdd;
  --color-cream-200: #e9dfcd;
  --color-stone-300: #d8d1c3;
  --color-stone-100: #eee9df;
  --color-charcoal: #17211d;
  --color-muted: #6f7972;
  --color-white: #fff;
  --color-danger: #9f4448;
  --color-danger-soft: #faecec;
  --color-success: #2f6d52;
  --color-success-soft: #e8f3ec;

  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-body: "Plus Jakarta Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-arabic: "Noto Naskh Arabic", serif;

  --text-display: clamp(3.35rem, 8vw, 7.75rem);
  --text-h1: clamp(2.65rem, 6vw, 5.6rem);
  --text-h2: clamp(2.05rem, 4.2vw, 4rem);
  --text-h3: clamp(1.3rem, 2vw, 1.75rem);
  --text-lead: clamp(1.02rem, 1.5vw, 1.18rem);
  --text-body: 0.96rem;
  --text-small: 0.82rem;
  --text-caption: 0.72rem;

  --space-1: 0.35rem;
  --space-2: 0.65rem;
  --space-3: 0.9rem;
  --space-4: 1.2rem;
  --space-5: 1.6rem;
  --space-6: 2rem;
  --space-7: 2.75rem;
  --space-8: 3.75rem;
  --space-9: 5rem;
  --space-10: 7rem;
  --section-space: clamp(5rem, 9vw, 9rem);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 34px;
  --radius-pill: 999px;

  --border-soft: rgba(23, 33, 29, 0.11);
  --border-light: rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 10px 28px rgba(7, 31, 26, 0.07);
  --shadow-md: 0 24px 60px rgba(7, 31, 26, 0.11);
  --shadow-lg: 0 40px 100px rgba(7, 31, 26, 0.18);
  --container-width: 1240px;
  --container-narrow: 880px;
  --header-height: 82px;
  --transition-fast: 180ms ease;
  --transition: 320ms cubic-bezier(0.22, 1, 0.36, 1);
  --z-header: 80;
  --z-drawer: 100;
  --z-modal: 140;

  /* aliases retained for old templates and admin pages */
  --emerald-950: var(--color-emerald-950);
  --emerald-900: var(--color-emerald-900);
  --emerald-800: var(--color-emerald-800);
  --emerald-700: var(--color-emerald-700);
  --emerald-500: var(--color-emerald-600);
  --sage-950: var(--color-emerald-950);
  --sage-900: var(--color-emerald-900);
  --sage-800: var(--color-emerald-800);
  --sage-700: var(--color-emerald-700);
  --sage-500: var(--color-emerald-600);
  --sage-300: #aebfb4;
  --sage-100: var(--color-emerald-100);
  --terracotta-700: #8c5c46;
  --terracotta-500: #aa745c;
  --sand-100: var(--color-cream-100);
  --sand-300: var(--color-cream-200);
  --cream-100: var(--color-ivory-50);
  --text-primary: var(--color-charcoal);
  --text-muted: var(--color-muted);
  --danger: var(--color-danger);
  --success: var(--color-success);
  --shadow: var(--shadow-md);
  --content: var(--container-width);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
  background: var(--color-ivory-50);
}
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--color-charcoal);
  background: var(--color-ivory-50);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; touch-action: none; }
main { min-height: 64vh; }
::selection { color: var(--color-white); background: var(--color-emerald-700); }

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--color-gold-500);
  outline-offset: 3px;
}
:where(button, input, select, textarea) { font: inherit; }
button, select, summary { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: 0.58; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p { margin: 0; }
p + p { margin-top: 0.9em; }

h1, h2, h3 {
  margin: 0;
  color: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

.container {
  width: min(var(--container-width), calc(100% - clamp(36px, 7vw, 96px)));
  margin-inline: auto;
}
.arabic {
  font-family: var(--font-arabic);
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  line-height: 1.8;
}
.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--color-emerald-700);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.section-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  flex: 0 0 auto;
  background: currentColor;
  opacity: 0.55;
}
.role {
  color: var(--color-emerald-700);
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* Shared controls */
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: var(--color-white);
  background: var(--color-emerald-800);
  box-shadow: 0 14px 34px rgba(11, 46, 38, 0.18);
}
.btn-primary:hover { background: var(--color-emerald-700); box-shadow: 0 18px 40px rgba(11, 46, 38, 0.23); }
.btn-ghost {
  color: var(--color-emerald-900);
  border-color: var(--border-soft);
  background: transparent;
}
.btn-ghost:hover { border-color: rgba(11, 46, 38, 0.3); background: rgba(11, 46, 38, 0.05); }
.btn-light { color: var(--color-emerald-950); background: rgba(255,255,255,.9); }
.text-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 5px;
  color: var(--color-emerald-800);
  border-bottom: 1px solid rgba(31, 90, 73, 0.35);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  transition: gap var(--transition-fast), border-color var(--transition-fast);
}
.text-link:hover { gap: 14px; border-color: currentColor; }
.text-link--light { color: var(--color-white); border-color: rgba(255,255,255,.4); }
.mini-btn, .portrait-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--color-emerald-800);
  border: 0;
  border-bottom: 1px solid rgba(31,90,73,.28);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.9;
}
.mini-btn.danger { color: var(--color-danger); }
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

/* Navigation */
.site-header {
  position: fixed;
  z-index: var(--z-header);
  inset: 0 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 max(28px, env(safe-area-inset-left));
  color: var(--color-white);
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: linear-gradient(180deg, rgba(5,24,19,.5), rgba(5,24,19,0));
  transition: height var(--transition), color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  height: 72px;
  color: var(--color-emerald-950);
  border-color: var(--border-soft);
  background: rgba(251,248,241,.96);
  box-shadow: 0 12px 36px rgba(7,31,26,.07);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__seal {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  color: var(--color-emerald-950);
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  background: var(--color-gold-300);
}
.brand__seal img { width: 100%; height: 100%; padding: 5px; object-fit: contain; background: var(--color-white); }
.brand__seal b { font-family: var(--font-display); font-size: 1.25rem; }
.brand__copy { min-width: 0; }
.brand__copy strong { display: block; overflow: hidden; font-size: 0.84rem; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.brand__copy small { display: block; max-width: 360px; overflow: hidden; font-size: 0.64rem; line-height: 1.35; opacity: .72; text-overflow: ellipsis; white-space: nowrap; }
.desktop-nav { display: flex; align-items: center; gap: 1px; }
.desktop-nav a {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  font-size: 0.77rem;
  font-weight: 600;
  white-space: nowrap;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 8px;
  left: 11px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}
.desktop-nav a:hover::after, .desktop-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-trigger {
  width: 46px;
  height: 46px;
  display: none;
  place-items: center;
  padding: 0;
  color: currentColor;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: transparent;
}
.site-header.scrolled .nav-trigger { border-color: var(--border-soft); }
.nav-trigger span { width: 18px; height: 1px; display: block; background: currentColor; }
.nav-trigger span + span { width: 12px; margin-top: 5px; margin-left: 6px; }
.drawer-overlay {
  position: fixed;
  z-index: calc(var(--z-drawer) - 1);
  inset: 0;
  visibility: hidden;
  opacity: 0;
  background: rgba(3,18,14,.62);
  transition: opacity var(--transition), visibility var(--transition);
}
.drawer-overlay.open { visibility: visible; opacity: 1; }
.mobile-drawer {
  position: fixed;
  z-index: var(--z-drawer);
  inset: 0 0 0 auto;
  width: min(410px, 92vw);
  display: flex;
  flex-direction: column;
  padding: max(26px, env(safe-area-inset-top)) 26px max(24px, env(safe-area-inset-bottom));
  color: var(--color-charcoal);
  background: var(--color-ivory-50);
  box-shadow: -30px 0 80px rgba(7,31,26,.18);
  visibility: hidden;
  clip-path: inset(0 0 0 100%);
  transition: clip-path var(--transition), visibility var(--transition);
}
.mobile-drawer.open { visibility: visible; clip-path: inset(0 0 0 0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--border-soft); }
.brand--drawer .brand__seal { border-color: var(--border-soft); }
.mobile-drawer__nav { margin-top: 18px; }
.mobile-drawer__nav a {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--color-emerald-950);
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}
.mobile-drawer__nav a i { font-size: .72rem; opacity: .45; transition: transform var(--transition-fast); }
.mobile-drawer__nav a:hover i { transform: translateX(5px); }
.mobile-drawer__foot { margin-top: auto; padding-top: 26px; color: var(--color-muted); }
.mobile-drawer__foot span { color: var(--color-gold-600); font-size: .72rem; font-weight: 700; letter-spacing: .15em; }
.mobile-drawer__foot p { margin-top: 8px; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.15; }

/* Home hero */
.yearbook-hero {
  position: relative;
  min-height: min(920px, 100svh);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  color: var(--color-white);
  background: var(--color-emerald-950);
}
.yearbook-hero__media {
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-position: 52% 50%;
  background-size: cover;
}
.yearbook-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,25,20,.96) 0%, rgba(5,25,20,.8) 42%, rgba(5,25,20,.22) 74%, rgba(5,25,20,.38) 100%),
    linear-gradient(180deg, rgba(5,25,20,.34) 0%, transparent 42%, rgba(5,25,20,.74) 100%);
}
.yearbook-hero__line {
  position: absolute;
  inset: var(--header-height) clamp(20px, 4vw, 64px) 44px;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.13);
}
.yearbook-hero__line::before {
  content: "05";
  position: absolute;
  top: 24px;
  right: 26px;
  color: rgba(255,255,255,.42);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
}
.yearbook-hero__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  align-items: end;
  gap: clamp(40px, 9vw, 130px);
  padding-top: calc(var(--header-height) + 120px);
  padding-bottom: 150px;
}
.yearbook-hero__content { max-width: 760px; }
.yearbook-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 24px;
  color: var(--color-gold-300);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.yearbook-hero__eyebrow::before { content: ""; width: 44px; height: 1px; background: currentColor; }
.yearbook-hero h1 { max-width: 760px; font-size: var(--text-display); font-weight: 500; letter-spacing: -.055em; }
.yearbook-hero__lead { max-width: 620px; margin-top: 24px; color: rgba(255,255,255,.78); font-family: var(--font-display); font-size: clamp(1.2rem, 2.2vw, 1.65rem); line-height: 1.34; }
.yearbook-hero__meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; color: rgba(255,255,255,.64); font-size: .7rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.yearbook-hero__meta span { position: relative; }
.yearbook-hero__meta span + span::before { content: ""; position: absolute; top: 50%; left: -16px; width: 4px; height: 4px; border-radius: 50%; background: var(--color-gold-300); transform: translateY(-50%); }
.yearbook-hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 38px; }
.yearbook-hero__actions .btn-primary { color: var(--color-emerald-950); background: var(--color-gold-300); box-shadow: none; }
.yearbook-hero__actions .btn-primary:hover { background: var(--color-white); }
.yearbook-hero__identity {
  align-self: center;
  max-width: 320px;
  justify-self: end;
  padding: 32px 0 32px 34px;
  border-left: 1px solid rgba(255,255,255,.2);
}
.yearbook-hero__monogram {
  width: clamp(140px, 17vw, 230px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(4,25,19,.22);
}
.yearbook-hero__monogram img { width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 16px 28px rgba(0,0,0,.26)); }
.yearbook-hero__monogram span { color: var(--color-gold-300); font-family: var(--font-display); font-size: clamp(6rem, 13vw, 11rem); font-weight: 500; line-height: 1; }
.yearbook-hero__identity-copy { margin-top: 24px; }
.yearbook-hero__identity-copy small { display: block; color: var(--color-gold-300); font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.yearbook-hero__identity-copy strong { display: block; margin-top: 8px; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.yearbook-hero__identity-copy span { display: block; margin-top: 8px; color: rgba(255,255,255,.6); font-size: .72rem; line-height: 1.55; }
.yearbook-hero__foot {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 72px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255,255,255,.54);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.yearbook-hero__foot a { display: flex; align-items: center; gap: 10px; }
.yearbook-hero__foot i { color: var(--color-gold-300); }

/* Editorial sections */
.editorial-section { position: relative; padding-block: var(--section-space); }
.editorial-section--ivory { background: var(--color-ivory-50); }
.editorial-section--parchment { background: var(--color-cream-100); }
.editorial-section--emerald { overflow: hidden; color: var(--color-white); background: var(--color-emerald-900); }
.editorial-section--emerald::after {
  content: "V";
  position: absolute;
  right: 0;
  bottom: -9vw;
  color: rgba(255,255,255,.025);
  font-family: var(--font-display);
  font-size: min(38vw, 560px);
  line-height: 1;
  pointer-events: none;
}
.editorial-section__header { max-width: 820px; margin-bottom: clamp(38px, 5.5vw, 72px); }
.editorial-section__header h2 { max-width: 760px; }
.editorial-section__header--split { max-width: none; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(240px, .55fr); align-items: end; gap: 48px; }
.editorial-section__header--split > .text-link { justify-self: end; }
.editorial-section__intro { max-width: 490px; color: var(--color-muted); font-size: var(--text-lead); line-height: 1.8; }
.editorial-section__header--light .section-kicker, .editorial-section--emerald .section-kicker { color: var(--color-gold-300); }
.editorial-section__header--light .editorial-section__intro, .editorial-section--emerald .editorial-section__intro { color: rgba(255,255,255,.65); }

/* Statistics */
.legacy-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid rgba(23,33,29,.18);
  border-bottom: 1px solid rgba(23,33,29,.18);
}
.legacy-stat { min-width: 0; padding: 30px 18px; text-align: center; }
.legacy-stat + .legacy-stat { border-left: 1px solid rgba(23,33,29,.14); }
.legacy-stat strong { display: block; color: var(--color-emerald-900); font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 4rem); font-weight: 500; line-height: .9; }
.legacy-stat span { display: block; margin-top: 12px; color: var(--color-muted); font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.legacy-stats--compact { grid-template-columns: repeat(3, 1fr); margin-top: 36px; }

/* Greetings */
.greeting-editorial { display: grid; grid-template-columns: 1.25fr .75fr .75fr; gap: 26px; }
.greeting-story { position: relative; min-width: 0; overflow: hidden; background: var(--color-cream-100); }
.greeting-story--featured { grid-row: span 2; display: grid; grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.1fr); }
.greeting-story__portrait { min-height: 280px; overflow: hidden; }
.greeting-story__portrait img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) contrast(.98); transition: transform 700ms var(--transition); }
.greeting-story:hover .greeting-story__portrait img { transform: scale(1.025); }
.greeting-story__copy { padding: clamp(24px, 3vw, 44px); }
.greeting-story__copy h3 { margin-top: 8px; }
.greeting-story__copy blockquote { margin: 28px 0; color: var(--color-emerald-800); font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.85rem); font-style: italic; line-height: 1.32; }
.greeting-story:not(.greeting-story--featured) { display: grid; grid-template-columns: 110px 1fr; }
.greeting-story:not(.greeting-story--featured) .greeting-story__portrait { min-height: 190px; }
.greeting-story:not(.greeting-story--featured) .greeting-story__copy { padding: 24px; }
.greeting-story:not(.greeting-story--featured) blockquote { display: -webkit-box; overflow: hidden; font-size: 1.08rem; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

/* Portraits */
.portrait-collection { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.student-portrait {
  position: relative;
  min-width: 0;
  min-height: 390px;
  overflow: hidden;
  color: var(--color-white);
  border-radius: var(--radius-sm);
  background: #102e27;
  cursor: pointer;
}
.student-portrait--lead { grid-column: span 2; }
.student-portrait__image { position: absolute; inset: 0; }
.student-portrait__image::after { content: ""; position: absolute; inset: 25% 0 0; background: linear-gradient(180deg, transparent, rgba(4,22,18,.92)); }
.student-portrait__image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.86); transition: transform 700ms var(--transition), filter 500ms ease; }
.student-portrait:hover .student-portrait__image img { transform: scale(1.035); filter: saturate(1); }
.student-portrait__content { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; padding: 24px 20px; }
.student-portrait__content > p { color: var(--color-gold-300); font-size: .62rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.student-portrait__content h3 { margin-top: 5px; font-size: clamp(1.4rem, 2.2vw, 1.8rem); line-height: 1.02; }
.student-portrait__content > span { display: -webkit-box; margin-top: 9px; overflow: hidden; color: rgba(255,255,255,.69); font-size: .72rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.student-portrait__content small { display: block; margin-top: 10px; color: rgba(255,255,255,.65); font-size: .67rem; }
.student-portrait .portrait-action { margin-top: 18px; color: var(--color-white); border-color: rgba(255,255,255,.35); opacity: .78; }

/* Mentors */
.mentor-layout { display: grid; grid-template-columns: minmax(260px, .52fr) minmax(0, 1.48fr); gap: clamp(50px, 8vw, 110px); }
.mentor-layout__intro { position: sticky; top: 110px; align-self: start; margin-bottom: 0; }
.mentor-layout__intro .text-link { margin-top: 34px; }
.mentor-collection { border-top: 1px solid var(--border-soft); }
.teacher-portrait { display: grid; grid-template-columns: 128px 1fr; align-items: center; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.teacher-portrait img { width: 128px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-xs); filter: saturate(.75); transition: filter var(--transition), transform var(--transition); }
.teacher-portrait:hover img { filter: saturate(1); transform: translateY(-3px); }
.teacher-portrait h3 { margin-top: 6px; }
.teacher-portrait div > p:not(.role) { display: -webkit-box; max-width: 620px; margin-top: 10px; overflow: hidden; color: var(--color-muted); font-size: .84rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.teacher-portrait .portrait-action { margin-top: 13px; }

/* Gallery */
.gallery-editorial { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 92px; gap: 14px; }
.gallery-feature { position: relative; min-width: 0; overflow: hidden; border-radius: var(--radius-sm); background: var(--color-emerald-900); cursor: zoom-in; }
.gallery-feature--1 { grid-column: span 7; grid-row: span 6; }
.gallery-feature--2 { grid-column: span 5; grid-row: span 3; }
.gallery-feature--3 { grid-column: span 5; grid-row: span 3; }
.gallery-feature--4 { grid-column: span 4; grid-row: span 4; }
.gallery-feature--5 { grid-column: span 4; grid-row: span 4; }
.gallery-feature--6 { grid-column: span 4; grid-row: span 4; }
.gallery-feature--7 { grid-column: span 7; grid-row: span 5; }
.gallery-feature img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82); transition: transform 750ms var(--transition), filter 500ms ease; }
.gallery-feature:hover img { transform: scale(1.025); filter: saturate(1); }
.gallery-feature::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(180deg, transparent, rgba(5,25,20,.86)); }
.gallery-feature figcaption { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 22px; color: var(--color-white); }
.gallery-feature figcaption div:first-child { min-width: 0; }
.gallery-feature figcaption small { display: block; color: var(--color-gold-300); font-size: .62rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.gallery-feature figcaption strong { display: block; margin-top: 4px; overflow: hidden; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.gallery-feature figcaption > span { flex: 0 0 auto; color: rgba(255,255,255,.7); font-size: .7rem; }
.gallery-feature__actions { display: flex; align-items: center; gap: 12px; }
.like-btn, .report-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: .7rem;
  opacity: .78;
}
.like-btn.active { color: #ad3e48; background: rgba(255,255,255,.94); opacity: 1; }
.like-btn.pop { animation: heart-pop 340ms ease; }
@keyframes heart-pop { 50% { transform: scale(1.14); } }
.gallery-placeholder { min-height: 560px; display: grid; grid-template-columns: 1.45fr .65fr .9fr; grid-template-rows: 1fr 1fr; gap: 14px; }
.gallery-placeholder__frame { position: relative; overflow: hidden; border: 1px solid rgba(11,46,38,.13); border-radius: var(--radius-sm); background: linear-gradient(145deg, rgba(11,46,38,.07), rgba(185,151,85,.12)); }
.gallery-placeholder__frame::before { content: "V"; position: absolute; inset: 50% auto auto 50%; color: rgba(11,46,38,.13); font-family: var(--font-display); font-size: 8rem; transform: translate(-50%,-50%); }
.gallery-placeholder__frame--wide { grid-row: 1 / 3; }
.gallery-placeholder__copy { grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: end; padding: 34px; color: var(--color-white); border-radius: var(--radius-sm); background: var(--color-emerald-900); }
.gallery-placeholder__copy span { color: var(--color-gold-300); font-size: .65rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.gallery-placeholder__copy strong { margin-top: 12px; font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.gallery-placeholder__copy p { margin-top: 18px; color: rgba(255,255,255,.62); font-size: .82rem; }

/* Messages and prayer */
.memory-prayer-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .55fr); gap: clamp(56px, 8vw, 110px); }
.memory-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
.memory-quote { position: relative; min-width: 0; padding: 30px; border: 1px solid var(--border-soft); background: var(--color-white); }
.memory-quote--featured { grid-column: span 2; padding: clamp(34px, 5vw, 58px); background: var(--color-cream-100); }
.memory-quote__mark { position: absolute; top: 14px; right: 22px; color: rgba(185,151,85,.28); font-family: var(--font-display); font-size: 5rem; line-height: 1; }
.memory-quote > p { position: relative; z-index: 1; color: var(--color-emerald-950); font-family: var(--font-display); font-size: clamp(1.22rem, 2vw, 1.65rem); line-height: 1.35; }
.memory-quote--featured > p { max-width: 760px; font-size: clamp(1.55rem, 3vw, 2.35rem); }
.memory-quote footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.memory-quote footer strong, .memory-quote footer small { display: block; }
.memory-quote footer strong { font-size: .78rem; }
.memory-quote footer small { margin-top: 3px; color: var(--color-muted); font-size: .66rem; }
.memory-quote .like-btn { color: var(--color-emerald-800); border-color: var(--border-soft); }
.memory-quote__photo { width: 100%; max-height: 340px; margin-bottom: 24px; object-fit: cover; border-radius: var(--radius-xs); }
.prayer-ledger { align-self: start; padding: 34px; color: var(--color-white); background: var(--color-emerald-900); }
.prayer-ledger__header .section-kicker { color: var(--color-gold-300); }
.prayer-ledger__header h3 { font-size: 2.1rem; }
.prayer-ledger__header > p:last-child { margin-top: 12px; color: rgba(255,255,255,.56); font-size: .78rem; }
.prayer-ledger__list { margin-top: 32px; border-top: 1px solid rgba(255,255,255,.16); }
.prayer-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; min-height: 56px; border-bottom: 1px solid rgba(255,255,255,.13); }
.prayer-row span { font-size: .78rem; }
.prayer-row i { height: 1px; background: rgba(255,255,255,.12); }
.prayer-row strong { color: var(--color-gold-300); font-size: .82rem; }
.prayer-ledger .arabic { margin-top: 28px; color: rgba(255,255,255,.7); text-align: center; }

/* Empty states */
.editorial-empty, .empty-state {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 34px;
  color: var(--color-charcoal);
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.42);
}
.editorial-empty > span { color: rgba(185,151,85,.55); font-family: var(--font-display); font-size: 4rem; line-height: 1; }
.editorial-empty strong { display: block; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.1; }
.editorial-empty p { margin-top: 7px; color: var(--color-muted); font-size: .82rem; }
.editorial-empty--dark { color: var(--color-white); border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.04); }
.editorial-empty--dark p { color: rgba(255,255,255,.58); }
.empty-state { min-height: 140px; color: var(--color-muted); font-size: .84rem; text-align: center; }

/* Interior hero */
.interior-hero {
  position: relative;
  padding: calc(var(--header-height) + clamp(92px, 12vw, 160px)) 0 clamp(70px, 8vw, 110px);
  overflow: hidden;
  color: var(--color-white);
  background: var(--color-emerald-900);
}
.interior-hero::after {
  content: "V";
  position: absolute;
  top: 45%;
  right: clamp(-40px, 3vw, 80px);
  color: rgba(255,255,255,.035);
  font-family: var(--font-display);
  font-size: clamp(15rem, 34vw, 34rem);
  line-height: .7;
  transform: translateY(-50%);
}
.interior-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, .55fr); align-items: end; gap: 70px; }
.interior-hero .section-kicker { color: var(--color-gold-300); }
.interior-hero h1 { max-width: 780px; }
.interior-hero__grid > p { max-width: 470px; color: rgba(255,255,255,.62); font-size: var(--text-lead); }
.page-hero { padding: calc(var(--header-height) + 80px) 0 80px; color: var(--color-white); background: var(--color-emerald-900); }
.page-hero .section-kicker { color: var(--color-gold-300); }
.page-hero p { max-width: 680px; margin-top: 18px; color: rgba(255,255,255,.64); }
.page-hero.compact { min-height: 70vh; display: grid; place-items: center; }

/* Directory pages */
.directory-section, .gallery-page, .messages-page, .speech-index { padding-block: clamp(54px, 8vw, 100px); }
.content-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(130px, .7fr)) auto auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  background: var(--color-white);
}
.content-toolbar__search { position: relative; }
.content-toolbar__search i { position: absolute; top: 50%; left: 16px; color: var(--color-muted); font-size: .76rem; transform: translateY(-50%); }
.content-toolbar__search input { padding-left: 42px; }
.content-toolbar input, .content-toolbar select { width: 100%; min-height: 48px; padding: 0 14px; color: var(--color-charcoal); border: 1px solid transparent; border-radius: var(--radius-xs); background: var(--color-ivory-50); outline: 0; }
.content-toolbar input:focus, .content-toolbar select:focus { border-color: rgba(31,90,73,.35); background: var(--color-white); }
.toolbar-reset { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; color: var(--color-muted); font-size: .75rem; font-weight: 700; }
.directory-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 24px 0 38px; color: var(--color-muted); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.portrait-directory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.directory-portrait { min-height: 470px; color: var(--color-white); background: var(--color-emerald-900); }
.mentor-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 46px; border-top: 1px solid var(--border-soft); }
.directory-mentor { grid-template-columns: 160px 1fr; padding-block: 32px; }
.directory-mentor img { width: 160px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 52px; }
.pagination a { width: 42px; height: 42px; display: grid; place-items: center; color: var(--color-muted); border: 1px solid var(--border-soft); border-radius: 50%; font-size: .74rem; font-weight: 700; }
.pagination a.active, .pagination a:hover { color: var(--color-white); border-color: var(--color-emerald-800); background: var(--color-emerald-800); }
.toolbar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }

/* Profile details */
.profile-overview { padding: calc(var(--header-height) + 70px) 0 0; color: var(--color-white); background: var(--color-emerald-900); }
.profile-overview__grid { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); align-items: end; gap: clamp(48px, 8vw, 110px); }
.profile-overview__portrait { position: relative; }
.profile-overview__portrait .back-link { position: absolute; z-index: 2; top: -48px; left: 0; color: rgba(255,255,255,.66); }
.profile-overview__portrait img { width: 100%; max-height: 680px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.profile-overview__edition { position: absolute; right: 18px; bottom: 18px; padding: 7px 12px; color: var(--color-emerald-950); border-radius: var(--radius-pill); background: var(--color-gold-300); font-size: .64rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.profile-overview__intro { padding-bottom: clamp(60px, 8vw, 110px); }
.profile-overview__intro .section-kicker { color: var(--color-gold-300); }
.profile-overview__intro h1 { max-width: 780px; }
.profile-overview__intro blockquote { max-width: 720px; margin: 28px 0 0; color: rgba(255,255,255,.72); font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 2rem); font-style: italic; line-height: 1.35; }
.profile-overview__quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 44px; border-top: 1px solid rgba(255,255,255,.17); border-bottom: 1px solid rgba(255,255,255,.17); }
.profile-overview__quick div { padding: 20px 20px 20px 0; }
.profile-overview__quick div + div { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.17); }
.profile-overview__quick span, .profile-overview__quick strong { display: block; }
.profile-overview__quick span { color: rgba(255,255,255,.52); font-size: .62rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.profile-overview__quick strong { margin-top: 6px; font-size: .84rem; }
.profile-member-lead { margin-top: 22px; color: rgba(255,255,255,.65); font-size: var(--text-lead); }
.profile-editorial { padding-block: var(--section-space); }
.profile-editorial__grid { display: grid; grid-template-columns: minmax(240px, .55fr) minmax(0, 1.45fr); gap: clamp(56px, 9vw, 130px); }
.profile-editorial__aside { align-self: start; }
.profile-facts { margin: 0; border-top: 1px solid var(--border-soft); }
.profile-facts div { padding: 18px 0; border-bottom: 1px solid var(--border-soft); }
.profile-facts dt { color: var(--color-muted); font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.profile-facts dd { margin: 7px 0 0; color: var(--color-charcoal); font-size: .88rem; line-height: 1.65; }
.profile-narrative__lead { margin-bottom: 46px; }
.profile-narrative__lead span { color: var(--color-gold-600); font-size: .68rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.profile-narrative__lead h2 { max-width: 720px; margin-top: 12px; }
.profile-story { display: grid; grid-template-columns: minmax(170px, .35fr) minmax(0, 1fr); gap: 36px; padding: 30px 0; border-top: 1px solid var(--border-soft); }
.profile-story h3 { font-size: 1.25rem; }
.profile-story p { max-width: 740px; color: var(--color-muted); font-size: .95rem; line-height: 1.9; }
.profile-story--quote p { color: var(--color-emerald-800); font-family: var(--font-display); font-size: 1.5rem; font-style: italic; line-height: 1.5; }
.member-profile-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .6fr); gap: 80px; }
.member-upload { padding: 34px; background: var(--color-cream-100); }
.member-upload h2 { margin-bottom: 24px; font-size: 2.25rem; }

/* Legacy profile-detail retained for AJAX modal */
.profile-detail { display: grid; grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr); gap: 34px; }
.profile-detail > img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius-sm); }
.profile-detail h2 { margin: 8px 0 12px; }
.profile-detail > div > p:not(.section-kicker) { color: var(--color-muted); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin-top: 25px; border-top: 1px solid var(--border-soft); }
.detail-item { padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.detail-item strong, .detail-item span { display: block; }
.detail-item strong { color: var(--color-muted); font-size: .62rem; letter-spacing: .11em; text-transform: uppercase; }
.detail-item span { margin-top: 5px; font-size: .83rem; }
.comments-box { margin-top: 26px; }
.comments-box > .btn { margin-top: 20px; }

/* Speeches */
.speech-index { background: var(--color-ivory-50); }
.speech-story { display: grid; grid-template-columns: minmax(320px, .78fr) minmax(0, 1.22fr); align-items: center; gap: clamp(50px, 9vw, 130px); padding: clamp(54px, 8vw, 100px) 0; border-bottom: 1px solid var(--border-soft); }
.speech-story:first-child { padding-top: 0; }
.speech-story--reverse .speech-story__portrait { order: 2; }
.speech-story--reverse .speech-story__copy { order: 1; }
.speech-story__portrait { position: relative; }
.speech-story__portrait > span { position: absolute; z-index: 2; top: -22px; left: -22px; color: var(--color-gold-600); font-family: var(--font-display); font-size: 4rem; line-height: 1; }
.speech-story__portrait img { width: 100%; max-height: 560px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius-xs); filter: saturate(.82); }
.speech-story__copy h2 { margin-top: 8px; }
.speech-story__copy blockquote { max-width: 760px; margin: 26px 0; color: var(--color-emerald-800); font-family: var(--font-display); font-size: clamp(1.45rem, 2.6vw, 2.25rem); font-style: italic; line-height: 1.4; }
.speech-story__copy > p:not(.section-kicker) { max-width: 680px; color: var(--color-muted); }
.speech-story__meta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.speech-story__meta > span { color: var(--color-muted); font-size: .68rem; }
.speech-detail { padding: calc(var(--header-height) + 90px) 0 var(--section-space); background: var(--color-ivory-50); }
.speech-detail__masthead { max-width: var(--container-narrow); }
.back-link { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 50px; color: var(--color-muted); font-size: .72rem; font-weight: 700; }
.speech-detail__masthead h1 { margin-top: 7px; }
.speech-detail__masthead blockquote { margin: 32px 0 0; color: var(--color-emerald-800); font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.6rem); font-style: italic; line-height: 1.45; }
.speech-detail__body { display: grid; grid-template-columns: minmax(200px, .42fr) minmax(0, 1.18fr); gap: clamp(55px, 10vw, 150px); margin-top: 70px; padding-top: 60px; border-top: 1px solid var(--border-soft); }
.speech-detail__body aside img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius-xs); }
.speech-detail__body aside p { margin-top: 14px; color: var(--color-muted); font-size: .7rem; }
.speech-detail__content { color: #39423e; font-family: var(--font-display); font-size: clamp(1.15rem, 1.7vw, 1.38rem); line-height: 2; }
.speech-signature { max-width: 220px; margin-top: 32px; }
.speech-date { margin-top: 30px; color: var(--color-muted); font-size: .7rem; }

/* Gallery page */
.album-filter, .message-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 42px;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.album-filter a, .message-filter a { min-height: 42px; display: inline-flex; align-items: center; flex: 0 0 auto; padding: 0 17px; color: var(--color-muted); border: 1px solid var(--border-soft); border-radius: var(--radius-pill); font-size: .72rem; font-weight: 700; }
.album-filter a.active, .message-filter a.active, .album-filter a:hover, .message-filter a:hover { color: var(--color-white); border-color: var(--color-emerald-800); background: var(--color-emerald-800); }
.gallery-editorial--archive { grid-auto-rows: 72px; }
.gallery-placeholder--page { min-height: 480px; }

/* Messages page */
.messages-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .6fr); align-items: start; gap: clamp(48px, 8vw, 100px); }
.memory-notes--page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.memory-notes--page .memory-quote--featured { grid-column: span 2; }
.memory-quote__tools { display: flex; align-items: center; gap: 7px; }
.memory-quote .report-btn { width: 36px; padding: 0; color: var(--color-muted); border-color: var(--border-soft); }
.comment-drawer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.comment-drawer summary { color: var(--color-muted); font-size: .7rem; font-weight: 700; list-style: none; }
.comment-drawer summary::-webkit-details-marker { display: none; }
.comment-drawer[open] summary { color: var(--color-emerald-800); }
.comment { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.comment strong { font-size: .74rem; }
.comment p { margin-top: 4px; color: var(--color-muted); font-size: .78rem; }
.comment small { display: block; margin-top: 5px; color: #959d98; font-size: .6rem; }
.comment-form { display: grid; gap: 9px; margin-top: 16px; }
.comment-form input, .comment-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-xs); background: var(--color-ivory-50); }
.message-compose { position: sticky; top: 96px; padding: clamp(28px, 4vw, 42px); background: var(--color-cream-100); }
.message-compose__intro h2 { font-size: 2.65rem; }
.message-compose__intro > p:last-child { margin: 14px 0 28px; color: var(--color-muted); font-size: .82rem; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid > *, .messages-layout > *, .messages-feed, .message-compose { min-width: 0; }
.form-grid input[type="file"] { max-width: 100%; min-width: 0; overflow: hidden; }
.form-grid label { display: grid; gap: 8px; color: var(--color-charcoal); font-size: .72rem; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--color-charcoal);
  border: 1px solid rgba(23,33,29,.16);
  border-radius: var(--radius-xs);
  background: var(--color-white);
  outline: 0;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.form-grid textarea { min-height: 120px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: rgba(31,90,73,.58); box-shadow: 0 0 0 3px rgba(31,90,73,.08); }
.form-grid input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--color-emerald-700); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid--editorial { gap: 18px 14px; }
.consent-field span { display: flex; align-items: flex-start; gap: 10px; color: var(--color-muted); font-size: .68rem; font-weight: 500; line-height: 1.55; }
.notice { display: grid; gap: 6px; margin-bottom: 20px; padding: 15px 17px; border-left: 3px solid currentColor; font-size: .76rem; }
.notice.success { color: var(--color-success); background: var(--color-success-soft); }
.notice.danger { color: var(--color-danger); background: var(--color-danger-soft); }

/* About */
.legacy-story { padding-block: var(--section-space); background: var(--color-ivory-50); }
.legacy-story__grid { display: grid; grid-template-columns: minmax(220px, .5fr) minmax(0, 1.1fr); align-items: start; gap: clamp(50px, 10vw, 150px); }
.legacy-story__number { color: var(--color-gold-300); font-family: var(--font-display); font-size: clamp(11rem, 25vw, 22rem); line-height: .72; }
.legacy-story article > p:last-of-type { max-width: 720px; margin-top: 26px; color: var(--color-muted); font-size: var(--text-lead); }
.organization-section { padding-block: var(--section-space); background: var(--color-cream-100); }
.organization-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid rgba(23,33,29,.18); }
.organization-list article { display: grid; grid-template-columns: 62px 1fr; gap: 18px; padding: 27px 24px 27px 0; border-bottom: 1px solid rgba(23,33,29,.18); }
.organization-list article:nth-child(odd) { padding-right: 42px; border-right: 1px solid rgba(23,33,29,.18); }
.organization-list article:nth-child(even) { padding-left: 42px; }
.organization-list article > span { color: var(--color-gold-600); font-family: var(--font-display); font-size: 1.8rem; }
.organization-list p { color: var(--color-emerald-700); font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.organization-list h3 { margin-top: 4px; }
.organization-list small { color: var(--color-muted); }
.timeline-section { padding-block: var(--section-space); color: var(--color-white); background: var(--color-emerald-900); }
.timeline-section .section-kicker { color: var(--color-gold-300); }
.legacy-timeline { position: relative; margin-top: 60px; }
.legacy-timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 31px; width: 1px; background: rgba(255,255,255,.16); }
.legacy-timeline article { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 32px; padding-bottom: 48px; }
.legacy-timeline__marker { position: relative; z-index: 1; width: 64px; height: 64px; display: grid; place-items: center; color: var(--color-gold-300); border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: var(--color-emerald-900); font-family: var(--font-display); font-size: 1.3rem; }
.legacy-timeline time { color: var(--color-gold-300); font-size: .64rem; letter-spacing: .12em; }
.legacy-timeline h3 { margin-top: 7px; }
.legacy-timeline p { max-width: 720px; margin-top: 10px; color: rgba(255,255,255,.58); }

/* Modal and lightbox */
.modal { position: fixed; z-index: var(--z-modal); inset: 0; visibility: hidden; display: grid; place-items: center; padding: 22px; opacity: 0; transition: visibility var(--transition), opacity var(--transition); }
.modal.open { visibility: visible; opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3,18,14,.82); }
.modal-panel { position: relative; z-index: 1; width: min(1020px, 100%); max-height: min(88vh, 920px); overflow: auto; padding: clamp(28px, 5vw, 54px); border-radius: var(--radius-md); background: var(--color-ivory-50); box-shadow: var(--shadow-lg); transform: translateY(18px) scale(.985); transition: transform var(--transition); }
.modal.open .modal-panel { transform: translateY(0) scale(1); }
.modal-close { position: sticky; z-index: 3; top: 0; float: right; margin: -10px -10px 12px 18px; color: var(--color-emerald-900); border-color: var(--border-soft); background: var(--color-white); }
.modal-content { clear: both; }
.modal-panel > [data-lb-content] > img { width: 100%; max-height: 65vh; object-fit: contain; border-radius: var(--radius-xs); background: var(--color-emerald-950); }
.lightbox-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .55fr); align-items: start; gap: 28px; }
.lightbox-media { min-width: 0; margin: 0; padding: 12px; background: var(--color-emerald-950); }
.lightbox-media img { display: block; width: 100%; max-height: 72vh; object-fit: contain; }
.lightbox-copy { min-width: 0; padding-top: 10px; }
.lightbox-copy h2 { margin-top: 16px; }
.lightbox-copy > p { margin-top: 12px; color: var(--color-muted); }
.lightbox-comments { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border-soft); }

/* Authentication */
.auth-page .site-header { color: var(--color-emerald-950); border-color: var(--border-soft); background: rgba(251,248,241,.96); }
.auth-layout { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(480px, .95fr); }
.auth-visual { position: relative; min-height: 760px; background-image: var(--auth-bg); background-position: center; background-size: cover; }
.auth-visual__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,25,20,.26), rgba(5,25,20,.9)); }
.auth-visual__content { position: absolute; right: clamp(36px, 7vw, 100px); bottom: clamp(50px, 8vw, 100px); left: clamp(36px, 7vw, 100px); color: var(--color-white); }
.auth-monogram { width: 86px; height: 86px; display: grid; place-items: center; margin-bottom: 30px; color: var(--color-gold-300); border: 1px solid rgba(255,255,255,.28); border-radius: 50%; font-family: var(--font-display); font-size: 4.2rem; line-height: 1; }
.auth-visual .section-kicker { color: var(--color-gold-300); }
.auth-visual h1 { max-width: 700px; font-size: clamp(3rem, 5vw, 5.3rem); }
.auth-visual__content > p:last-child { margin-top: 22px; color: rgba(255,255,255,.62); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.auth-form-wrap { display: grid; place-items: center; padding: calc(var(--header-height) + 50px) clamp(32px, 7vw, 100px) 60px; background: var(--color-ivory-50); }
.auth-form { width: min(470px, 100%); }
.auth-form .back-link { margin-bottom: 60px; }
.auth-form h2 { font-size: 3.2rem; }
.auth-form__lead { margin: 15px 0 30px; color: var(--color-muted); }
.auth-form__note { margin-top: 22px; color: var(--color-muted); font-size: .68rem; text-align: center; }

/* Error and installer */
.error-page { min-height: 82vh; display: grid; place-items: center; padding: calc(var(--header-height) + 60px) 0 70px; background: var(--color-cream-100); }
.error-page__inner { max-width: 760px; text-align: center; }
.error-page__number { display: block; color: rgba(185,151,85,.35); font-family: var(--font-display); font-size: 10rem; line-height: .7; }
.error-page .section-kicker { justify-content: center; margin-top: 32px; }
.error-page p:not(.section-kicker) { max-width: 570px; margin: 24px auto 30px; color: var(--color-muted); }
.install-body { min-height: 100vh; background: var(--color-emerald-900); }
.install-shell { min-height: 100vh; display: grid; place-items: center; padding: 42px 20px; }
.install-card { width: min(920px, 100%); padding: clamp(28px, 5vw, 58px); border-radius: var(--radius-md); background: var(--color-ivory-50); box-shadow: var(--shadow-lg); }
.install-card h1 { margin-bottom: 14px; }
.install-card > p { color: var(--color-muted); }
.install-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 28px 0; }
.check { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--border-soft); background: var(--color-white); }
.check span { width: 30px; height: 30px; display: grid; place-items: center; grid-row: span 2; border-radius: 50%; }
.check.ok span { color: var(--color-success); background: var(--color-success-soft); }
.check.bad span { color: var(--color-danger); background: var(--color-danger-soft); }
.check strong { font-size: .76rem; }
.check em { color: var(--color-muted); font-size: .64rem; font-style: normal; }
.install-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* Footer */
.site-footer { position: relative; padding: 78px 0 24px; color: var(--color-white); background: var(--color-emerald-950); }
.site-footer::before { content: "V"; position: absolute; top: -18px; left: 3vw; color: rgba(255,255,255,.025); font-family: var(--font-display); font-size: 15rem; line-height: 1; }
.site-footer__top { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 80px; padding-bottom: 58px; }
.site-footer__identity { display: grid; grid-template-columns: 100px 1fr; align-items: start; gap: 32px; }
.footer-monogram { width: 100px; height: 100px; display: grid; place-items: center; color: var(--color-gold-300); border: 1px solid rgba(255,255,255,.17); border-radius: 50%; font-family: var(--font-display); font-size: 5rem; line-height: 1; }
.site-footer .section-kicker { color: var(--color-gold-300); }
.site-footer__identity h2 { font-size: clamp(2.4rem, 4vw, 4.3rem); }
.site-footer__identity p:last-child { max-width: 560px; margin-top: 15px; color: rgba(255,255,255,.55); }
.site-footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; }
.site-footer__links h3 { margin-bottom: 18px; color: var(--color-gold-300); font-family: var(--font-body); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }
.site-footer__links a { display: block; width: fit-content; margin-top: 9px; color: rgba(255,255,255,.65); font-size: .78rem; }
.site-footer__links a:hover { color: var(--color-white); }
.site-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.43); font-size: .62rem; }
.image-credit { margin-top: 14px; color: rgba(255,255,255,.28); font-size: .55rem; }

/* Legacy class compatibility */
.section { padding-block: var(--section-space); }
.section.sand, .sand { background: var(--color-cream-100); }
.section.sage-soft, .sage-soft { background: var(--color-emerald-100); }
.section-head { margin-bottom: 42px; }
.section-head.split { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { padding: 22px; border: 1px solid var(--border-soft); background: var(--color-white); }
.stat-card strong { display: block; color: var(--color-emerald-900); font-family: var(--font-display); font-size: 2.35rem; }
.stat-card span { color: var(--color-muted); font-size: .68rem; }
.card-grid { display: grid; gap: 16px; }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 60px; }
.message-list { display: grid; gap: 14px; }
.message-card { padding: 25px; border: 1px solid var(--border-soft); background: var(--color-white); }
.message-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.masonry-grid { columns: 3 280px; column-gap: 15px; }
.gallery-tile { position: relative; break-inside: avoid; margin: 0 0 15px; overflow: hidden; border-radius: var(--radius-sm); background: var(--color-emerald-900); }
.gallery-tile img { width: 100%; min-height: 230px; object-fit: cover; }
.gallery-tile figcaption { padding: 17px; color: var(--color-white); }
.gallery-tile figcaption span { display: block; margin-top: 5px; font-size: .68rem; opacity: .65; }
.prayer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prayer-card { padding: 18px; text-align: center; border: 1px solid var(--border-soft); background: var(--color-white); }
.progress-ring { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 10px; border-radius: 50%; background: conic-gradient(var(--color-gold-500) calc(var(--value) * 1%), var(--color-stone-100) 0); }
.progress-ring::before { content: ""; grid-area: 1 / 1; width: 60px; height: 60px; border-radius: 50%; background: var(--color-white); }
.progress-ring span { z-index: 1; grid-area: 1 / 1; font-size: .72rem; font-weight: 700; }

/* Tablet */
@media (max-width: 1100px) {
  :root { --header-height: 74px; }
  .desktop-nav { display: none; }
  .nav-trigger { display: block; }
  .yearbook-hero__layout { grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr); gap: 44px; }
  .yearbook-hero__identity { padding-left: 24px; }
  .legacy-stats { grid-template-columns: repeat(4, 1fr); }
  .legacy-stat:nth-child(5) { border-left: 0; }
  .legacy-stat:nth-child(n+5) { border-top: 1px solid rgba(23,33,29,.14); }
  .greeting-editorial { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .greeting-story--featured { grid-column: span 2; grid-row: auto; }
  .portrait-collection { grid-template-columns: repeat(3, 1fr); }
  .student-portrait--lead { grid-column: span 1; }
  .gallery-editorial { grid-auto-rows: 76px; }
  .content-toolbar { grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(140px, .7fr)); }
  .content-toolbar .btn, .content-toolbar .toolbar-reset { grid-column: auto; }
  .portrait-directory { grid-template-columns: repeat(3, 1fr); }
  .messages-layout { grid-template-columns: minmax(0, 1.1fr) minmax(300px, .7fr); gap: 42px; }
  .auth-layout { grid-template-columns: .9fr 1.1fr; }
}

/* Mobile and narrow tablets */
@media (max-width: 820px) {
  .container { width: min(var(--container-width), calc(100% - 36px)); }
  .site-header { padding-inline: 18px; }
  .brand__copy small { max-width: 220px; }
  .yearbook-hero { min-height: 820px; }
  .yearbook-hero__line { inset: var(--header-height) 14px 24px; }
  .yearbook-hero__layout { grid-template-columns: 1fr; align-items: end; padding-top: calc(var(--header-height) + 96px); padding-bottom: 110px; }
  .yearbook-hero__identity { position: absolute; top: calc(var(--header-height) + 50px); right: 18px; max-width: 150px; padding: 0; border: 0; }
  .yearbook-hero__monogram { width: 118px; margin-left: auto; }
  .yearbook-hero__identity-copy { display: none; }
  .yearbook-hero__content { padding-right: 90px; }
  .yearbook-hero h1 { max-width: 620px; }
  .yearbook-hero__lead { max-width: 560px; }
  .yearbook-hero__foot { bottom: 50px; }
  .editorial-section__header--split, .interior-hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .editorial-section__header--split > .text-link { justify-self: start; }
  .legacy-stats { grid-template-columns: repeat(2, 1fr); }
  .legacy-stat:nth-child(n) { border-top: 1px solid rgba(23,33,29,.14); }
  .legacy-stat:nth-child(-n+2) { border-top: 0; }
  .legacy-stat:nth-child(odd) { border-left: 0; }
  .greeting-editorial { grid-template-columns: 1fr; }
  .greeting-story--featured { grid-column: auto; grid-template-columns: 1fr; }
  .greeting-story:not(.greeting-story--featured) { grid-template-columns: 140px 1fr; }
  .portrait-collection { grid-template-columns: repeat(2, 1fr); }
  .mentor-layout { grid-template-columns: 1fr; gap: 45px; }
  .mentor-layout__intro { position: static; }
  .gallery-editorial { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .gallery-feature[class*="gallery-feature--"] { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 5; }
  .gallery-feature--1, .gallery-feature--7 { grid-column: span 2 !important; aspect-ratio: 16 / 10 !important; }
  .gallery-placeholder { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 220px; min-height: 0; }
  .gallery-placeholder__frame--wide { grid-column: span 2; grid-row: auto; }
  .gallery-placeholder__copy { grid-column: span 2; grid-row: auto; }
  .memory-prayer-layout { grid-template-columns: 1fr; }
  .prayer-ledger { position: static; }
  .content-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-toolbar__search { grid-column: span 2; }
  .portrait-directory { grid-template-columns: repeat(2, 1fr); }
  .directory-portrait { min-height: 430px; }
  .mentor-directory { grid-template-columns: 1fr; }
  .profile-overview__grid { grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr); gap: 38px; }
  .profile-overview__intro { padding-bottom: 60px; }
  .profile-overview__quick { grid-template-columns: 1fr; }
  .profile-overview__quick div + div { padding-left: 0; border-top: 1px solid rgba(255,255,255,.17); border-left: 0; }
  .profile-editorial__grid, .member-profile-grid { grid-template-columns: 1fr; gap: 54px; }
  .speech-story, .speech-detail__body { grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); gap: 44px; }
  .messages-layout { grid-template-columns: 1fr; }
  .message-compose { position: static; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { min-height: 500px; }
  .auth-form-wrap { padding-top: 70px; }
  .legacy-story__grid { grid-template-columns: .45fr 1fr; gap: 38px; }
  .organization-list { grid-template-columns: 1fr; }
  .organization-list article:nth-child(n) { padding-inline: 0; border-right: 0; }
  .site-footer__top { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 560px) {
  :root { --section-space: 4.6rem; --header-height: 68px; }
  body { font-size: .92rem; }
  .container { width: min(var(--container-width), calc(100% - 28px)); }
  .brand__seal { width: 40px; height: 40px; }
  .brand__copy strong { max-width: 175px; }
  .brand__copy small { display: none; }
  .nav-trigger { width: 42px; height: 42px; }
  .yearbook-hero { min-height: 720px; }
  .yearbook-hero__media { background-position: 57% 50%; }
  .yearbook-hero__shade { background: linear-gradient(180deg, rgba(5,25,20,.4), rgba(5,25,20,.7) 38%, rgba(5,25,20,.95) 100%); }
  .yearbook-hero__line { display: none; }
  .yearbook-hero__layout { min-height: 720px; padding-top: 150px; padding-bottom: 106px; }
  .yearbook-hero__content { align-self: end; padding-right: 0; }
  .yearbook-hero__identity { top: 105px; right: auto; left: 14px; }
  .yearbook-hero__monogram { width: 82px; background: rgba(5,25,20,.28); }
  .yearbook-hero__monogram span { font-size: 4.6rem; }
  .yearbook-hero__eyebrow { margin-bottom: 14px; font-size: .62rem; }
  .yearbook-hero__eyebrow::before { width: 26px; }
  .yearbook-hero h1 { max-width: 430px; font-size: clamp(3.1rem, 15vw, 4.55rem); line-height: .91; }
  .yearbook-hero__lead { margin-top: 18px; font-size: 1.08rem; }
  .yearbook-hero__meta { margin-top: 20px; gap: 7px 22px; font-size: .58rem; }
  .yearbook-hero__actions { align-items: flex-start; flex-direction: column; gap: 18px; margin-top: 28px; }
  .yearbook-hero__actions .btn { width: 100%; }
  .yearbook-hero__foot { bottom: 34px; font-size: .55rem; }
  .yearbook-hero__foot > span { display: none; }
  .yearbook-hero__foot { justify-content: flex-end; }
  .editorial-section__header { margin-bottom: 36px; }
  .editorial-section__intro { font-size: .95rem; }
  .legacy-stat { padding: 22px 8px; }
  .legacy-stat strong { font-size: 2.55rem; }
  .greeting-story:not(.greeting-story--featured) { grid-template-columns: 105px 1fr; }
  .greeting-story__copy, .greeting-story:not(.greeting-story--featured) .greeting-story__copy { padding: 20px; }
  .greeting-story__copy blockquote { margin: 18px 0; font-size: 1.12rem; }
  .portrait-collection { gap: 9px; }
  .student-portrait { min-height: 340px; }
  .student-portrait__content { padding: 18px 14px; }
  .student-portrait__content h3 { font-size: 1.28rem; }
  .student-portrait__content > span { display: none; }
  .student-portrait .portrait-action { margin-top: 11px; font-size: .65rem; }
  .teacher-portrait, .directory-mentor { grid-template-columns: 92px 1fr; gap: 18px; padding-block: 22px; }
  .teacher-portrait img, .directory-mentor img { width: 92px; }
  .teacher-portrait div > p:not(.role) { -webkit-line-clamp: 1; }
  .gallery-feature figcaption { padding: 14px; }
  .gallery-feature figcaption strong { font-size: 1rem; }
  .gallery-feature figcaption > span, .gallery-feature__actions > span { display: none; }
  .gallery-placeholder { grid-template-rows: 190px 190px; }
  .memory-notes, .memory-notes--page { grid-template-columns: 1fr; }
  .memory-quote--featured, .memory-notes--page .memory-quote--featured { grid-column: auto; }
  .memory-quote, .memory-quote--featured { padding: 25px; }
  .memory-quote--featured > p { font-size: 1.5rem; }
  .prayer-ledger { padding: 26px; }
  .interior-hero { padding: calc(var(--header-height) + 76px) 0 60px; }
  .interior-hero h1 { font-size: clamp(2.8rem, 13vw, 4rem); }
  .interior-hero__grid > p { font-size: .92rem; }
  .content-toolbar { grid-template-columns: 1fr; padding: 11px; }
  .content-toolbar__search { grid-column: auto; }
  .content-toolbar .btn { width: 100%; }
  .directory-meta { align-items: flex-start; flex-direction: column; gap: 5px; margin-bottom: 26px; }
  .portrait-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .directory-portrait { min-height: 330px; }
  .pagination { margin-top: 38px; }
  .profile-overview { padding-top: calc(var(--header-height) + 46px); }
  .profile-overview__grid { grid-template-columns: 1fr; }
  .profile-overview__portrait { width: min(100%, 360px); }
  .profile-overview__portrait .back-link { position: static; margin-bottom: 22px; }
  .profile-overview__portrait img { max-height: 510px; border-radius: var(--radius-sm); }
  .profile-overview__intro { padding: 8px 0 58px; }
  .profile-overview__intro h1 { font-size: clamp(3rem, 14vw, 4.4rem); }
  .profile-overview__quick { margin-top: 30px; }
  .profile-story { grid-template-columns: 1fr; gap: 12px; }
  .profile-story--quote p { font-size: 1.25rem; }
  .profile-detail { grid-template-columns: 1fr; }
  .profile-detail > img { max-height: 430px; }
  .lightbox-layout { grid-template-columns: 1fr; gap: 22px; }
  .lightbox-media { margin-inline: -2px; padding: 8px; }
  .lightbox-media img { max-height: 54svh; }
  .lightbox-copy { padding-top: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .speech-story, .speech-detail__body { grid-template-columns: 1fr; }
  .speech-story--reverse .speech-story__portrait, .speech-story--reverse .speech-story__copy { order: initial; }
  .speech-story__portrait img { max-height: 500px; }
  .speech-story__meta { align-items: flex-start; flex-direction: column; }
  .speech-detail__masthead .back-link { margin-bottom: 38px; }
  .speech-detail__body { margin-top: 48px; padding-top: 40px; }
  .speech-detail__body aside { width: 62%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .message-compose { padding: 25px 18px; }
  .legacy-story__grid { grid-template-columns: 1fr; }
  .legacy-story__number { font-size: 10rem; }
  .legacy-stats--compact { grid-template-columns: repeat(3, 1fr); }
  .organization-list article { grid-template-columns: 48px 1fr; }
  .legacy-timeline article { grid-template-columns: 52px 1fr; gap: 20px; }
  .legacy-timeline::before { left: 25px; }
  .legacy-timeline__marker { width: 52px; height: 52px; }
  .modal { align-items: end; padding: 0; }
  .modal-panel { width: 100%; max-height: 92svh; padding: 24px 18px max(24px, env(safe-area-inset-bottom)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; transform: translateY(100%); }
  .modal.open .modal-panel { transform: translateY(0); }
  .auth-visual { min-height: 390px; }
  .auth-visual__content { right: 24px; bottom: 36px; left: 24px; }
  .auth-monogram { width: 64px; height: 64px; margin-bottom: 20px; font-size: 3.2rem; }
  .auth-visual h1 { font-size: 2.25rem; line-height: 1; }
  .auth-form-wrap { padding: 54px 18px 66px; }
  .auth-form .back-link { margin-bottom: 40px; }
  .auth-form h2 { font-size: 2.7rem; }
  .site-footer { padding-top: 60px; }
  .site-footer__identity { grid-template-columns: 72px 1fr; gap: 20px; }
  .footer-monogram { width: 72px; height: 72px; font-size: 3.8rem; }
  .site-footer__links { gap: 26px; }
  .site-footer__bottom { align-items: flex-start; flex-direction: column; gap: 8px; }
  .install-card { padding: 26px 18px; }
  .install-checks { grid-template-columns: 1fr; }
  .section-head.split, .two-col { grid-template-columns: 1fr; display: grid; }
  .card-grid.three, .card-grid.four { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 360px) {
  .container { width: calc(100% - 22px); }
  .site-header { padding-inline: 12px; }
  .brand__copy strong { max-width: 142px; font-size: .75rem; }
  .yearbook-hero h1 { font-size: 3.05rem; }
  .portrait-directory { grid-template-columns: 1fr; }
  .directory-portrait { min-height: 430px; }
  .student-portrait__content > span { display: -webkit-box; }
  .speech-detail__body aside { width: 76%; }
  .site-footer__links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
