/*
Theme Name: MMNSS Heritage
Theme URI: https://mmnsscollege.ac.in/
Author: Mannam Memorial N.S.S. College
Author URI: https://mmnsscollege.ac.in/
Description: A warm, dignified heritage-academic theme for Mannam Memorial N.S.S. College, Kottiyam (est. 1981; University of Kerala; NAAC B++). Faculty can edit and publish content instantly from the WordPress dashboard. Brick-and-brass palette, Fraunces + Inter typography, sticky crest header, brick page-header bands, elegant hover-lift cards and a deep-brick footer.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mmnss-heritage
Tags: education, college, custom-menu, custom-logo, featured-images, translation-ready, threaded-comments
*/

/* =========================================================================
   MMNSS Heritage — Design system
   Ported faithfully from the college's existing Astro site.
   Colors are stored as SPACE-SEPARATED RGB CHANNELS so we can compose
   opacity with rgb(var(--token) / <alpha>) anywhere in the stylesheet.
   ========================================================================= */

:root {
  /* Heritage palette (brick + brass) */
  --color-primary: 140 21 21;         /* #8C1515 Stanford-inspired cardinal red */
  --color-primary-dark: 107 15 15;    /* #6b0f0f deeper cardinal (footer/hovers) */
  --color-accent: 176 141 87;         /* #b08d57 warm brass / gold */
  --color-accent-bright: 216 180 120; /* #d8b478 lighter brass on dark */
  --color-eyebrow: 138 107 63;        /* #8a6b3f AA-legible label brass */
  --color-cream: 250 247 240;         /* #faf7f0 warm paper */
  --color-ink: 28 25 23;              /* #1c1917 warm near-black */
  --color-muted: 107 98 87;           /* #6b6257 muted warm grey */
  --color-line: 231 224 211;          /* #e7e0d3 hairline border */
  --color-line-strong: 161 138 99;    /* #a08a63 stronger warm border */
  --color-surface: 255 255 255;       /* #ffffff raised surface */

  /* Type */
  --font-serif: 'Fraunces', Georgia, Cambria, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Layout */
  --content-max: 72rem;

  /* Shadows */
  --shadow-card: 0 1px 2px rgb(28 25 23 / 0.04), 0 8px 24px rgb(28 25 23 / 0.06);
  --shadow-card-hover: 0 4px 12px rgb(28 25 23 / 0.08), 0 16px 40px rgb(28 25 23 / 0.12);

  color-scheme: light;
}

/* -------------------------------------------------------------------------
   Base reset + typography
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: rgb(var(--color-cream));
  color: rgb(var(--color-ink));
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  font-feature-settings: 'kern';
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: rgb(var(--color-ink));
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin: 0; }

a {
  color: rgb(var(--color-primary));
  text-decoration-color: color-mix(in srgb, rgb(var(--color-primary)) 35%, transparent);
  text-underline-offset: 0.2em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a:hover { color: rgb(var(--color-primary-dark)); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

::selection {
  background: color-mix(in srgb, rgb(var(--color-accent)) 30%, transparent);
  color: rgb(var(--color-ink));
}

/* -------------------------------------------------------------------------
   Accessibility
   ------------------------------------------------------------------------- */
/* Focus ring: cardinal (8.8:1 on cream) clears WCAG 1.4.11 on light surfaces
   where brass (2.9:1) fails. On dark/cardinal surfaces we switch to bright brass
   below. */
:focus-visible {
  outline: 2px solid rgb(var(--color-primary));
  outline-offset: 2px;
  border-radius: 2px;
}
/* On dark grounds (utility bar, footer, hero, statement, page-header) cardinal
   would vanish — use bright brass, which clears 3:1 on those dark fields. */
.site-utilbar :focus-visible,
.site-footer :focus-visible,
.mmnss-hero :focus-visible,
.mmnss-statement :focus-visible,
.mmnss-principal :focus-visible,
.page-header :focus-visible,
.mmnss-lightbox :focus-visible {
  outline-color: rgb(var(--color-accent-bright));
}

.screen-reader-text,
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: static !important;
  width: auto; height: auto;
  clip: auto;
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: rgb(var(--color-primary));
  color: #fff;
  border-radius: 0 0 0.5rem 0.5rem;
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* Also suppress the translate-on-hover lifts so nothing moves at all
     (zeroing only the duration would still snap them instantly). */
  .card:hover, .about-card:hover, .btn:hover, .btn--primary:hover, .btn--ghost:hover,
  .nav-cta:hover, .about-card:hover .about-card__cta svg {
    transform: none !important;
  }
}

/* -------------------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 1024px) {
  .container { padding-inline: 2rem; }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(var(--color-eyebrow));
}
.eyebrow--bright { color: rgb(var(--color-accent-bright)); }

/* Utility spacing (small, mobile-first set the templates lean on). */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 2.5rem; }
.mt-6 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.max-w-prose { max-width: 65ch; }
.flow > * + * { margin-top: 1.25rem; }
.is-hidden { display: none !important; }
.container--narrow { max-width: 48rem; }

.rule-gold {
  height: 1px;
  width: 3rem;
  border: 0;
  background: rgb(var(--color-accent));
  opacity: 0.9;
  margin: 0;
}
.rule-gold--center { margin-inline: auto; }

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn--sm { padding: 0.5rem 1rem; font-size: 0.75rem; }
.btn--primary {
  background: rgb(var(--color-primary));
  color: rgb(var(--color-cream));
  box-shadow: 0 1px 2px rgb(28 25 23 / 0.08);
}
.btn--primary:hover {
  background: rgb(var(--color-primary-dark));
  color: rgb(var(--color-cream));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgb(28 25 23 / 0.14);
}
.btn--ghost {
  background: transparent;
  color: rgb(var(--color-primary));
  border-color: rgb(var(--color-accent) / 0.6);
}
.btn--ghost:hover {
  border-color: rgb(var(--color-accent));
  background: rgb(var(--color-accent) / 0.1);
  color: rgb(var(--color-primary));
}

/* =========================================================================
   SITE HEADER — two-tier (utility bar + sticky main bar)
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(var(--color-cream) / 0.97);
  box-shadow: 0 1px 0 rgb(var(--color-line));
  backdrop-filter: blur(8px);
}
/* Once scrolled, deepen the shadow so the sticky bar reads as lifted. */
.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgb(var(--color-line)), 0 6px 20px rgb(28 25 23 / 0.06);
}

/* ---- Tier 1: utility bar (deep cardinal) ---- */
.site-utilbar {
  background: rgb(var(--color-primary-dark));
  color: rgb(var(--color-cream) / 0.85);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}
.site-utilbar__inner {
  display: none; /* hidden on small screens; surfaced in the mobile menu instead */
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 2.375rem;
}
@media (min-width: 900px) { .site-utilbar__inner { display: flex; } }
.site-utilbar__accred {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: 500;
  min-width: 0;
}
.site-utilbar__accred b { font-weight: inherit; }
.site-utilbar__naac {
  color: rgb(var(--color-accent-bright));
  font-weight: 700;
  letter-spacing: 0.03em;
}
.site-utilbar__managed { color: rgb(var(--color-cream) / 0.7); }
.site-utilbar__dot {
  display: inline-block;
  height: 5px; width: 5px;
  flex: none;
  border-radius: 9999px;
  background: rgb(var(--color-accent));
}
.site-utilbar__sep { color: rgb(var(--color-cream) / 0.35); }
.site-utilbar__links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: none;
}
.site-utilbar__links a {
  color: rgb(var(--color-cream) / 0.82);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.site-utilbar__links a:hover { color: #fff; }
.site-utilbar__pipe { color: rgb(var(--color-cream) / 0.28); }

/* ---- Tier 2: main bar ---- */
.site-header__bar {
  display: flex;
  min-height: 5.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
}

/* Brand / crest lockup + wordmark */
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0; /* allow the wordmark to shrink/wrap rather than push actions off-screen */
  flex-shrink: 0; /* keep the crest + wordmark intact; the nav flexes instead */
}
@media (min-width: 640px) { .site-brand { gap: 1rem; } }
.site-brand__crest {
  position: relative;
  display: flex;
  height: 3rem;
  width: 3rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgb(var(--color-primary));
  color: rgb(var(--color-cream));
  box-shadow: 0 2px 6px rgb(28 25 23 / 0.12);
  overflow: hidden;
}
/* Brass inner rule that turns the mark into an emblem. Suppressed when a real
   logo/seal image is used (it sits edge-to-edge instead). */
.site-brand__crest::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgb(var(--color-accent-bright) / 0.55);
  border-radius: 6px;
  pointer-events: none;
}
.site-brand__crest:has(img)::before,
.site-brand__crest:has(.custom-logo)::before { display: none; }
.site-brand__crest:has(img),
.site-brand__crest:has(.custom-logo) {
  background: rgb(var(--color-cream));
  border: 1px solid rgb(var(--color-accent) / 0.5);
  padding: 0.25rem;
}
@media (min-width: 640px) { .site-brand__crest { height: 3.5rem; width: 3.5rem; } }
.site-brand__crest img { height: 100%; width: 100%; object-fit: contain; }
.site-brand__crest .custom-logo { border-radius: 8px; }

/* Typographic lockup (rendered when no logo image is set) */
.crest-mono {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.crest-mono__m {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 0.9;
}
@media (min-width: 640px) { .crest-mono__m { font-size: 1.85rem; } }
.crest-mono__nss {
  font-style: normal;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgb(var(--color-accent-bright));
  margin-top: 1px;
}
.crest-mono__est {
  font-style: normal;
  font-size: 0.36rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(var(--color-cream) / 0.65);
  margin-top: 2px;
}

/* Wordmark shows on all sizes so the crest is never a lonely icon; it scales up
   on wider screens. On very narrow phones it wraps to two tidy lines. */
.site-brand__text { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.site-brand__name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: rgb(var(--color-ink));
  /* Below the desktop nav breakpoint, cap the wordmark so a long name wraps to
     two tidy lines instead of pushing the search/menu buttons off-screen. */
  max-width: 14rem;
}
@media (min-width: 640px) { .site-brand__name { font-size: 1.2rem; max-width: 20rem; } }
/* On the desktop nav the wordmark is a fixed-width two-line lockup: the column
   is wide enough that "Mannam Memorial" fits on line one and "N.S.S. College"
   flows to line two — a tidy two-line mark that never overflows the bar height
   nor collides with the nav. Sizes are tuned per breakpoint. */
@media (min-width: 1240px) { .site-brand__name { font-size: 0.95rem; width: 12rem; max-width: none; } }
@media (min-width: 1200px) { .site-brand__name { font-size: 1.02rem; width: 13rem; max-width: none; } }
@media (min-width: 1440px) { .site-brand__name { font-size: 1.1rem; width: 14rem; max-width: none; } }
.site-brand__sub {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(var(--color-muted));
  margin-top: 3px;
}
/* The location sub-line is a nicety on wider screens; hide it on the smallest
   phones where vertical room in the bar is tight. */
@media (max-width: 479px) { .site-brand__sub { display: none; } }

/* =========================================================================
   PRIMARY NAV (desktop): intent-based items with dropdown panels.
   ========================================================================= */
.primary-nav { display: none; align-items: center; gap: 0.1rem; }
@media (min-width: 1240px) { .primary-nav { display: flex; } }
/* Between the desktop-nav breakpoint and ~1240px the full 7-item nav + long
   "IQAC & Accreditation" label + Admissions button is tight — trim link padding
   and font a touch so everything (button + search) stays on-screen. Above that
   the normal sizing (below) applies. */
@media (min-width: 1240px) and (max-width: 1339px) {
  .nav-item__link { padding: 0.6rem 0.45rem; font-size: 0.85rem; }
  .nav-cta { margin-left: 0.35rem; padding: 0.5rem 0.9rem; font-size: 0.85rem; }
  .site-brand__name { font-size: 0.9rem; width: 11rem; }
}

.nav-item { position: relative; }

/* Top-level link/toggle */
.nav-item__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgb(var(--color-ink) / 0.82);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.25s ease;
  white-space: nowrap; /* keep multi-word labels (e.g. "IQAC & Accreditation") on one line */
}
/* Animated gold underline (grows from the left on hover / when the panel is open). */
.nav-item__link::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: rgb(var(--color-accent));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-item:hover > .nav-item__link,
.nav-item__link:hover,
.nav-item__link:focus-visible,
.nav-item__toggle[aria-expanded="true"] { color: rgb(var(--color-primary)); }
.nav-item:hover > .nav-item__link::after,
.nav-item__link:focus-visible::after,
.nav-item__toggle[aria-expanded="true"]::after { transform: scaleX(1); }
/* Current page marker */
.nav-item__link[aria-current="page"] { color: rgb(var(--color-primary)); }
.nav-item__link[aria-current="page"]::after { transform: scaleX(1); }

.nav-item__chev { width: 13px; height: 13px; transition: transform 0.25s ease; }
.nav-item:hover .nav-item__chev,
.nav-item__toggle[aria-expanded="true"] .nav-item__chev { transform: rotate(180deg); }

/* Highlighted CTA button (Admissions) — a distinct cardinal pill at the right. */
.nav-cta {
  display: inline-flex;
  align-items: center;
  margin-left: 0.6rem;
  padding: 0.55rem 1.15rem;
  background: rgb(var(--color-primary));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.nav-cta:hover {
  color: #fff;
  background: rgb(var(--color-primary-dark));
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px rgb(var(--color-primary) / 0.7);
}
.nav-cta:focus-visible { outline: 2px solid rgb(var(--color-primary)); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .nav-cta, .nav-cta:hover { transition: none; transform: none; } }

/* Dropdown panel — opens on hover AND on click/focus (JS toggles .is-open). */
.nav-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 15rem;
  padding: 0.5rem;
  border-radius: 0.85rem;
  border: 1px solid rgb(var(--color-line));
  background: rgb(var(--color-surface));
  box-shadow: 0 12px 34px rgb(28 25 23 / 0.16);
  /* The Campus (26 items) and IQAC (27 items) panels are tall; cap them to the
     viewport and let them scroll so the bottom links are always reachable on
     short laptop screens (e.g. 1366×768). */
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 60;
}
/* Keep the last panel(s) from overflowing the viewport's right edge. */
.nav-item:last-of-type .nav-panel,
.nav-item:nth-last-of-type(2) .nav-panel { left: auto; right: 0; }
.nav-item:hover > .nav-panel,
.nav-item:focus-within > .nav-panel,
.nav-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-panel a {
  display: block;
  border-radius: 0.5rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.875rem;
  color: rgb(var(--color-ink) / 0.82);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-panel a:hover { background: rgb(var(--color-cream)); color: rgb(var(--color-primary)); }
.nav-panel__lead {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: rgb(var(--color-primary)) !important;
}
.nav-panel__lead svg { width: 12px; height: 12px; }
.nav-panel__sep { height: 1px; background: rgb(var(--color-line)); margin: 0.4rem 0.3rem; }
.nav-panel__eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--color-muted));
  padding: 0.35rem 0.8rem 0.3rem;
  margin: 0;
}
/* Departments panel: wider, two-column grid. */
.nav-panel--depts { min-width: 27rem; }
.nav-panel__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.05rem 0.4rem; }
/* Stream sub-headings inside the departments panel get a little more breathing
   room above so Arts/Science/Commerce groups read as distinct clusters. */
.nav-panel__eyebrow--stream { padding-top: 0.7rem; color: rgb(var(--color-primary) / 0.8); }
.nav-panel__grid + .nav-panel__eyebrow--stream { margin-top: 0.2rem; }

@media (prefers-reduced-motion: reduce) {
  .nav-item__link::after, .nav-item__chev, .nav-panel { transition: none; }
}

/* --- Custom-menu fallback (college builds its own menu in Appearance → Menus).
   Style wp_nav_menu output with the same look. --- */
.primary-nav .menu {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav .menu > li { position: relative; }
.primary-nav .menu a {
  position: relative;
  display: inline-block;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgb(var(--color-ink) / 0.82);
  text-decoration: none;
  transition: color 0.25s ease;
}
.primary-nav .menu a:hover,
.primary-nav .menu .current-menu-item > a,
.primary-nav .menu [aria-current="page"] { color: rgb(var(--color-primary)); }
.primary-nav .menu .sub-menu {
  display: block;
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  min-width: 14rem;
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  border-radius: 0.85rem;
  border: 1px solid rgb(var(--color-line));
  background: rgb(var(--color-surface));
  box-shadow: 0 12px 34px rgb(28 25 23 / 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 60;
}
.primary-nav .menu li:hover > .sub-menu,
.primary-nav .menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.primary-nav .menu .sub-menu a { border-radius: 0.5rem; }
.primary-nav .menu .sub-menu a:hover { background: rgb(var(--color-cream)); }

/* Search icon sits at the end of the desktop nav; hidden on mobile (the mobile
   right-cluster carries its own search). */
.primary-nav__search { margin-left: 0.25rem; }

/* Icon buttons (search, hamburger) */
.header-icon {
  display: inline-flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: rgb(var(--color-ink));
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.header-icon:hover {
  color: rgb(var(--color-primary));
  background: rgb(var(--color-line) / 0.5);
}
.header-icon svg { height: 1.25rem; width: 1.25rem; }

/* Right cluster is mobile-only (search + hamburger). On desktop the nav + its
   inline search take over. flex:none so it always keeps its space and the
   wordmark shrinks/wraps instead of pushing these off-screen. */
.header-actions { display: flex; align-items: center; gap: 0.25rem; flex: none; }
@media (min-width: 1240px) { .header-actions { display: none; } }

.naac-badge__dot {
  display: inline-block;
  height: 0.375rem;
  width: 0.375rem;
  flex: none;
  border-radius: 9999px;
  background: rgb(var(--color-accent));
}

.menu-toggle { display: inline-flex; }
.menu-toggle svg { height: 1.5rem; width: 1.5rem; }

/* Mobile menu panel */
.mobile-menu {
  display: none;
  border-top: 1px solid rgb(var(--color-line));
  background: rgb(var(--color-cream));
}
.mobile-menu.is-open { display: block; }
@media (min-width: 1240px) { .mobile-menu { display: none !important; } }
.mobile-menu nav { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 0; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem; /* >=44px touch target */
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgb(var(--color-ink) / 0.8);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.mobile-menu a:hover,
.mobile-menu .current-menu-item > a,
.mobile-menu .current_page_item > a {
  background: rgb(var(--color-primary) / 0.06);
  color: rgb(var(--color-primary));
}
.mobile-menu .sub-menu { padding-left: 0.75rem; }

/* --- Mobile accordion nav (intent-based groups collapse/expand) --- */
.mobile-nav { list-style: none; margin: 0; padding: 0; }
.mobile-nav__item { border-bottom: 1px solid rgb(var(--color-line) / 0.7); }
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 0.5rem;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 600;
  color: rgb(var(--color-ink) / 0.9);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.mobile-nav__link:hover { color: rgb(var(--color-primary)); }
.mobile-nav__chev { width: 16px; height: 16px; flex: none; color: rgb(var(--color-muted)); transition: transform 0.25s ease; }
.mobile-nav__toggle[aria-expanded="true"] { color: rgb(var(--color-primary)); }
.mobile-nav__toggle[aria-expanded="true"] .mobile-nav__chev { transform: rotate(180deg); }

/* Collapsible sub-list: animate max-height for a smooth reveal. */
.mobile-nav__sub {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-nav__sub.is-open { max-height: 40rem; }
.mobile-nav__sub li { margin: 0; }
.mobile-nav__sub a {
  display: block;
  min-height: 2.75rem;
  padding: 0.6rem 0.75rem 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: rgb(var(--color-ink) / 0.75);
  text-decoration: none;
}
.mobile-nav__sub a:hover { color: rgb(var(--color-primary)); background: rgb(var(--color-primary) / 0.05); border-radius: 0.4rem; }
.mobile-nav__sub li:last-child a { padding-bottom: 0.85rem; }
/* Subsection heading inside a mobile submenu (e.g. "NAAC Accreditation"). */
.mobile-nav__subhead {
  padding: 0.9rem 0.75rem 0.35rem 1.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--color-primary) / 0.85);
}
/* Mobile Admissions CTA — a full-width cardinal button. */
.mobile-nav__item--cta { margin: 0.75rem 0.5rem 0.25rem; }
.mobile-nav__cta {
  display: block;
  padding: 0.85rem 1rem;
  background: rgb(var(--color-primary));
  color: #fff;
  font-weight: 600;
  text-align: center;
  border-radius: 0.6rem;
  text-decoration: none;
}
.mobile-nav__cta:hover { color: #fff; background: rgb(var(--color-primary-dark)); }
@media (prefers-reduced-motion: reduce) { .mobile-nav__sub { transition: none; } }

/* Utility block at the foot of the mobile menu (NAAC line + quick links). */
.mobile-menu__util {
  margin-top: 0.75rem;
  padding: 1rem 0.75rem 0;
  border-top: 1px solid rgb(var(--color-line));
}
.mobile-menu__naac {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgb(var(--color-primary));
}
.mobile-menu__utillinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-top: 0.5rem;
}
.mobile-menu__utillinks a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  color: rgb(var(--color-muted));
  text-decoration: none;
}
.mobile-menu__utillinks a:hover { color: rgb(var(--color-primary)); }

/* =========================================================================
   PAGE-HEADER BAND (brick)
   ========================================================================= */
.page-header {
  position: relative;
  overflow: hidden;
  background: rgb(var(--color-primary));
  color: rgb(var(--color-cream));
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgb(var(--color-primary-dark) / 0.5), rgb(var(--color-primary)) 55%);
}
.page-header::after {
  content: '';
  position: absolute;
  right: -6rem;
  top: -6rem;
  height: 18rem;
  width: 18rem;
  border-radius: 9999px;
  background: rgb(var(--color-accent) / 0.12);
  filter: blur(64px);
  pointer-events: none;
}
/* Photo variant: a campus image behind the band, cardinal-scrimmed for legible
   text. The base ::before gradient is suppressed so the scrim controls contrast. */
.page-header--photo::before { display: none; }
.page-header__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: 0;
}
.page-header__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgb(var(--color-primary-dark) / 0.94) 0%, rgb(var(--color-primary-dark) / 0.82) 42%, rgb(var(--color-primary) / 0.55) 100%),
    linear-gradient(to top, rgb(var(--color-primary-dark) / 0.6), transparent 60%);
}
.page-header--photo .page-header__inner { z-index: 2; }
.page-header__inner {
  position: relative;
  z-index: 2;
  padding-block: 4rem;
  max-width: 48rem;
}
@media (min-width: 768px) { .page-header--photo .page-header__inner { padding-block: 6rem; } }
@media (min-width: 768px) { .page-header__inner { padding-block: 5rem; } }
.page-header .eyebrow { color: rgb(var(--color-accent-bright)); }
.page-header .rule-gold { margin-top: 1rem; background: rgb(var(--color-accent)); }
.page-header__title { margin-top: 1.25rem; color: rgb(var(--color-cream)); }
.page-header__intro {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgb(var(--color-cream) / 0.85);
}
.page-header__meta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: rgb(var(--color-cream) / 0.85);
}
.page-header__meta .tag {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgb(var(--color-accent) / 0.5);
  background: rgb(var(--color-accent) / 0.12);
  padding: 0.2rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(var(--color-cream));
  text-decoration: none;
}

/* =========================================================================
   BREADCRUMBS
   ========================================================================= */
.breadcrumbs { padding-block: 1rem 0; }
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.375rem; }
.breadcrumbs svg { height: 0.75rem; width: 0.75rem; color: rgb(var(--color-line-strong)); flex-shrink: 0; }
.breadcrumbs a {
  font-weight: 500;
  color: rgb(var(--color-muted));
  text-decoration: none;
}
.breadcrumbs a:hover { color: rgb(var(--color-primary)); }
.breadcrumbs [aria-current="page"] { font-weight: 500; color: rgb(var(--color-ink)); }

/* =========================================================================
   PROSE — faculty-edited content
   ========================================================================= */
.prose-wrap { padding-block: 3.5rem; }
.prose {
  max-width: 46rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: rgb(var(--color-ink));
}
.prose > * + * { margin-top: 1.25rem; }
.prose h2 { margin-top: 2.5rem; font-size: clamp(1.6rem, 3vw, 2rem); }
.prose h3 { margin-top: 2rem; }
.prose h4 { margin-top: 1.75rem; }
.prose p { color: rgb(var(--color-ink) / 0.9); }
.prose a { text-decoration: underline; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin-top: 0.5rem; }
.prose li::marker { color: rgb(var(--color-accent)); }
.prose blockquote {
  border-left: 3px solid rgb(var(--color-accent));
  padding-left: 1.25rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: rgb(var(--color-primary-dark));
}
.prose img { border-radius: 0.75rem; box-shadow: var(--shadow-card); }
.prose figure { margin: 2rem 0; }
.prose figure img { width: 100%; }
.prose figcaption { margin-top: 0.65rem; font-size: 0.85rem; color: rgb(var(--color-muted)); text-align: center; font-style: italic; }

/* Split figure: image beside text (image floats to one side on wider screens,
   full-width stacked on mobile). Used for in-body section imagery. */
.prose .mmnss-figure { margin: 2rem 0; }
.prose .mmnss-figure img { width: 100%; border-radius: 0.85rem; box-shadow: var(--shadow-card); }
@media (min-width: 720px) {
  .prose .mmnss-figure--right { float: right; width: 46%; margin: 0.25rem 0 1.5rem 2rem; }
  .prose .mmnss-figure--left  { float: left;  width: 46%; margin: 0.25rem 2rem 1.5rem 0; }
}
/* A framed, brass-cornered banner image for a section lead. */
.prose .mmnss-banner { position: relative; margin: 1.5rem 0 2rem; border-radius: 0.85rem; overflow: hidden; box-shadow: var(--shadow-card); }
.prose .mmnss-banner img { width: 100%; display: block; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 0; box-shadow: none; }
.prose .mmnss-banner figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 1.5rem 1.25rem 0.85rem;
  background: linear-gradient(to top, rgb(28 25 23 / 0.72), transparent);
  color: #fff; text-align: left; font-style: normal; font-size: 0.85rem;
}
.prose hr { border: 0; height: 1px; background: rgb(var(--color-line)); margin: 2.5rem 0; }
/* Wide prose tables (e.g. Academics "Our programmes") are wrapped in
   `.table-scroll` by theme.js so they scroll inside their box on narrow
   screens instead of clipping off the right edge. The min-width keeps columns
   legible and makes the horizontal scroll engage rather than crushing cells. */
/* Scrollable wide table: a right-edge fade + a swipe hint cue so users know
   there's more to the right. The fade is a sticky pseudo pinned inside the
   scroll box. */
.prose .table-scroll { position: relative; margin-block: 1.5rem; }
.prose .table-scroll::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 2.5rem;
  pointer-events: none;
  background: linear-gradient(to right, transparent, rgb(var(--color-cream)));
}
.prose .table-scroll::before {
  content: "Scroll →";
  position: absolute;
  top: -1.4rem; right: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgb(var(--color-muted));
}
@media (min-width: 900px) {
  /* On wide screens most tables fit; hide the cue unless the table truly overflows. */
  .prose .table-scroll::before { display: none; }
}
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose .table-scroll table { min-width: 34rem; }
.prose th, .prose td { border: 1px solid rgb(var(--color-line)); padding: 0.6rem 0.85rem; text-align: left; }
.prose th { background: rgb(var(--color-cream)); font-family: var(--font-serif); }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgb(var(--color-line) / 0.5);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}
.prose pre {
  background: rgb(var(--color-ink));
  color: rgb(var(--color-cream));
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
}
.prose pre code { background: transparent; padding: 0; color: inherit; }
.prose .wp-caption { max-width: 100%; }
.prose .alignleft { float: left; margin: 0.25rem 1.5rem 1rem 0; }
.prose .alignright { float: right; margin: 0.25rem 0 1rem 1.5rem; }
.prose .aligncenter { margin-inline: auto; }

.entry-featured { margin-bottom: 2.5rem; }
.entry-featured img { border-radius: 1rem; box-shadow: var(--shadow-card); width: 100%; }

/* =========================================================================
   CARDS + GRID (archive / news)
   ========================================================================= */
.section { padding-block: 3.5rem; }
.card-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  background: rgb(var(--color-surface));
  border: 1px solid rgb(var(--color-line));
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgb(var(--color-accent) / 0.4);
}
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: rgb(var(--color-line)); }
.card__media img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
/* Faculty portraits crop to the face (upper frame), not the centre. */
.card--faculty .card__media img { object-position: center 22%; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { display: flex; flex: 1; flex-direction: column; gap: 0.75rem; padding: 1.5rem; }
.card__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: rgb(var(--color-ink));
  transition: color 0.2s ease;
}
.card:hover .card__title { color: rgb(var(--color-primary)); }
.card__excerpt { color: rgb(var(--color-muted)); line-height: 1.6; font-size: 0.95rem; }
.card__more {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(var(--color-primary));
}

/* Download cards: no media band; a subtle document accent on the left edge. */
.card--download { border-left: 3px solid rgb(var(--color-accent)); }
.card--download .card__body { padding-block: 1.75rem; }

/* Short-notice single: excerpt lede + a muted note, when the body is a stub. */
.notice-lede { font-family: var(--font-serif); font-size: 1.2rem; color: rgb(var(--color-ink)); }
.notice-note { color: rgb(var(--color-muted)); font-size: 0.95rem; }

/* Category filter chips */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgb(var(--color-line));
  background: rgb(var(--color-surface));
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgb(var(--color-ink) / 0.75);
  text-decoration: none;
  transition: all 0.2s ease;
}
.filter-chip:hover {
  border-color: rgb(var(--color-accent) / 0.5);
  color: rgb(var(--color-primary));
}
.filter-chip.is-active {
  background: rgb(var(--color-primary));
  border-color: rgb(var(--color-primary));
  color: rgb(var(--color-cream));
}

/* Pagination */
.pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.pagination .page-numbers {
  display: inline-flex;
  min-width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgb(var(--color-line));
  background: rgb(var(--color-surface));
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(var(--color-ink) / 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
}
.pagination .page-numbers:hover {
  border-color: rgb(var(--color-accent) / 0.5);
  color: rgb(var(--color-primary));
}
.pagination .page-numbers.current {
  background: rgb(var(--color-primary));
  border-color: rgb(var(--color-primary));
  color: rgb(var(--color-cream));
}
.pagination .page-numbers.dots { border-color: transparent; background: transparent; }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgb(var(--color-primary));
  text-decoration: none;
}
.back-link:hover { color: rgb(var(--color-primary-dark)); gap: 0.6rem; }
.back-link svg { height: 1rem; width: 1rem; }

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: rgb(var(--color-muted));
}

/* =========================================================================
   404
   ========================================================================= */
.error-404 {
  display: flex;
  min-height: 70vh;
  align-items: center;
  background: rgb(var(--color-cream));
}
.error-404__inner { padding-block: 6rem; text-align: center; }
.error-404 h1 { margin-top: 1rem; }
.error-404__lead {
  margin-inline: auto;
  margin-top: 1.25rem;
  max-width: 32rem;
  font-size: 1.125rem;
  color: rgb(var(--color-muted));
}
.search-pill {
  margin-inline: auto;
  margin-top: 2.25rem;
  display: flex;
  max-width: 28rem;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgb(var(--color-line));
  background: rgb(var(--color-surface));
  padding: 0.5rem 1rem;
  box-shadow: var(--shadow-card);
}
.search-pill:focus-within { border-color: rgb(var(--color-accent)); box-shadow: 0 0 0 3px rgb(var(--color-accent) / 0.35); }
.search-pill svg { height: 1.25rem; width: 1.25rem; color: rgb(var(--color-muted)); flex-shrink: 0; }
.search-pill input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
  font-size: 1rem;
  color: rgb(var(--color-ink));
  outline: none;
}
.quick-links {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.quick-links a {
  border-radius: 9999px;
  border: 1px solid rgb(var(--color-line));
  background: rgb(var(--color-surface));
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(var(--color-ink) / 0.8);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: all 0.2s ease;
}
.quick-links a:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--color-accent) / 0.5);
  color: rgb(var(--color-primary));
}

/* =========================================================================
   TABLES + FORMS (shared component styles, usable outside .prose)
   ========================================================================= */

/* Wrap wide tables in .table-wrap so they scroll instead of breaking layout. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: rgb(var(--color-surface));
  border: 1px solid rgb(var(--color-line));
  border-radius: 0.75rem;
  overflow: hidden;
}
.table caption {
  caption-side: bottom;
  padding-top: 0.75rem;
  font-size: 0.85rem;
  color: rgb(var(--color-muted));
  text-align: left;
}
.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgb(var(--color-line));
}
.table thead th {
  background: rgb(var(--color-primary));
  color: rgb(var(--color-cream));
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom-color: rgb(var(--color-primary-dark));
}
.table tbody tr:nth-child(even) { background: rgb(var(--color-cream)); }
.table tbody tr:last-child td { border-bottom: 0; }

/* Form controls. */
.form-row { margin-bottom: 1.25rem; }
.form-label {
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: rgb(var(--color-ink));
}
.field,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: rgb(var(--color-ink));
  background: rgb(var(--color-surface));
  border: 1px solid rgb(var(--color-line-strong));
  border-radius: 0.6rem;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgb(var(--color-accent) / 0.25);
}
textarea { min-height: 8rem; resize: vertical; }
::placeholder { color: rgb(var(--color-muted) / 0.8); }

/* Search form (widget + generic). */
.search-form { display: flex; gap: 0.5rem; }
.search-form .search-field { flex: 1 1 auto; }
.search-form .search-submit { flex: 0 0 auto; border-radius: 9999px; padding-inline: 1.25rem; }

/* Comments. */
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .comment { margin-top: 1.5rem; }
.comment-body {
  background: rgb(var(--color-surface));
  border: 1px solid rgb(var(--color-line));
  border-radius: 0.85rem;
  padding: 1.25rem;
}
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-meta { font-size: 0.8rem; color: rgb(var(--color-muted)); }

/* Widgets (sidebar / footer widget areas). */
.widget { margin-bottom: 2rem; }
.widget-title { font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: 1rem; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li + li { margin-top: 0.5rem; }

/* =========================================================================
   SITE FOOTER (deep brick)
   ========================================================================= */
.site-footer {
  position: relative;
  background:
    radial-gradient(120% 140% at 15% 0%, rgb(var(--color-primary) / 0.55), transparent 55%),
    rgb(var(--color-primary-dark));
  color: rgb(var(--color-cream));
}
/* Brass gradient hairline across the very top of the footer. */
.site-footer__rule {
  height: 2px;
  width: 100%;
  border: 0;
  background: linear-gradient(90deg,
    rgb(var(--color-accent) / 0),
    rgb(var(--color-accent-bright) / 0.9),
    rgb(var(--color-accent) / 0));
}
.site-footer__inner { padding-block: 4.5rem; }
.site-footer__grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 4rem; } }

.footer-brand { display: inline-flex; align-items: center; gap: 0.85rem; text-decoration: none; }
/* Cardinal crest tile matching the header lockup (not a pale empty circle). */
.footer-brand__crest {
  position: relative;
  display: flex;
  height: 3rem;
  width: 3rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgb(var(--color-primary));
  color: rgb(var(--color-cream));
  box-shadow: inset 0 0 0 1px rgb(var(--color-accent-bright) / 0.4);
  overflow: hidden;
}
.footer-brand__crest::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgb(var(--color-accent-bright) / 0.5);
  border-radius: 6px;
  pointer-events: none;
}
/* When a real logo/seal image is used, drop the tile styling. */
.footer-brand__crest:has(img)::before,
.footer-brand__crest:has(.custom-logo)::before { display: none; }
.footer-brand__crest:has(img),
.footer-brand__crest:has(.custom-logo) {
  background: rgb(var(--color-cream));
  border: 1px solid rgb(var(--color-accent) / 0.5);
  padding: 0.25rem;
}
.footer-brand__crest img { height: 100%; width: 100%; object-fit: contain; }
/* Scale the M-lockup down slightly for the footer crest size. */
.footer-brand__crest .crest-mono__m { font-size: 1.5rem; }
.footer-brand__crest .crest-mono__nss { font-size: 0.42rem; }
.footer-brand__crest .crest-mono__est { font-size: 0.32rem; }
.footer-brand__name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: rgb(var(--color-cream));
  line-height: 1.2;
  transition: color 0.2s ease;
}
.footer-brand:hover .footer-brand__name { color: rgb(var(--color-accent-bright)); }

.footer-tagline {
  margin-top: 1.25rem;
  max-width: 30rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgb(var(--color-cream) / 0.72);
}

.footer-address {
  margin-top: 1.5rem;
  font-style: normal;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgb(var(--color-cream) / 0.82);
}
.footer-address__row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.footer-address__row + .footer-address__row { margin-top: 0.65rem; }
.footer-address__icon {
  height: 1.1rem;
  width: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: rgb(var(--color-accent-bright) / 0.85);
}
.footer-address a { color: rgb(var(--color-cream)); text-decoration: none; }
.footer-address a:hover { color: rgb(var(--color-accent-bright)); text-decoration: underline; }

.footer-col h2 { font-family: var(--font-sans); }
.footer-col ul { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.footer-col li + li { margin-top: 0.7rem; }
.footer-col a {
  position: relative;
  display: inline-block;
  font-size: 0.875rem;
  color: rgb(var(--color-cream) / 0.8);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
/* A brass tick that slides in on hover — a small, tasteful motion cue. */
.footer-col a::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 50%;
  width: 0.35rem;
  height: 1px;
  background: rgb(var(--color-accent-bright));
  opacity: 0;
  transition: opacity 0.2s ease, left 0.2s ease;
}
.footer-col a:hover { color: rgb(var(--color-accent-bright)); padding-left: 0.55rem; }
.footer-col a:hover::before { opacity: 1; left: -0.15rem; }

.footer-social { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; list-style: none; padding: 0; }
.footer-social a {
  display: inline-flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgb(var(--color-cream) / 0.2);
  color: rgb(var(--color-cream) / 0.8);
  transition: all 0.2s ease;
}
.footer-social a:hover {
  border-color: rgb(var(--color-accent));
  background: rgb(var(--color-accent) / 0.1);
  color: rgb(var(--color-accent));
}
.footer-social svg { height: 1.25rem; width: 1.25rem; }

.footer-bottom {
  margin-top: 3.5rem;
  border-top: 1px solid rgb(var(--color-cream) / 0.15);
  padding-top: 2rem;
}
.footer-affiliation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgb(var(--color-cream) / 0.9);
}
.footer-affiliation__sep { color: rgb(var(--color-accent) / 0.6); }
.footer-affiliation__item--naac { color: rgb(var(--color-accent-bright)); font-weight: 700; letter-spacing: 0.03em; }
.footer-legal {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgb(var(--color-cream) / 0.6);
}
@media (min-width: 640px) {
  .footer-legal { flex-direction: row; align-items: center; justify-content: space-between; }
}
/* Back-to-top pill */
.footer-totop {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(var(--color-cream) / 0.8);
  text-decoration: none;
  border: 1px solid rgb(var(--color-cream) / 0.25);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.footer-totop:hover {
  color: rgb(var(--color-accent-bright));
  border-color: rgb(var(--color-accent-bright) / 0.6);
  background: rgb(var(--color-accent) / 0.08);
}
.footer-totop svg { height: 0.95rem; width: 0.95rem; }

/* =========================================================================
 * FACULTY PROFILE (single-faculty.php)
 * A photo / initials monogram beside the member's designation, qualification,
 * department and email — echoing the faculty cards in the department design.
 * ====================================================================== */
.faculty-profile {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-items: flex-start;
  padding: 1.75rem;
  border: 1px solid rgb(var(--color-line));
  border-radius: 1rem;
  background: rgb(var(--color-surface));
  box-shadow: var(--shadow-card);
}
@media (min-width: 640px) {
  .faculty-profile { flex-direction: row; gap: 2rem; align-items: center; }
}
.faculty-profile__photo {
  flex-shrink: 0;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgb(var(--color-line));
  background: rgb(var(--color-line));
}
.faculty-profile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.faculty-profile__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgb(var(--color-primary)), rgb(var(--color-primary-dark)));
  color: rgb(var(--color-cream));
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1;
}
.faculty-profile__body { min-width: 0; }
.faculty-profile__name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: rgb(var(--color-ink));
  margin: 0;
}
.faculty-profile__designation {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgb(var(--color-primary));
}
.faculty-profile__meta {
  margin: 1rem 0 0;
  display: grid;
  gap: 0.5rem;
}
.faculty-profile__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}
.faculty-profile__row dt {
  flex-shrink: 0;
  min-width: 7rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--color-muted));
  padding-top: 0.1rem;
}
.faculty-profile__row dd {
  margin: 0;
  color: rgb(var(--color-ink));
  word-break: break-word;
}

/* =========================================================================
 * COMMITTEE MEMBERS (single-committee.php)
 * A composition table; leadership rows (Chair / Convenor / Co-ordinator) are
 * pulled to the top and highlighted with a gold accent.
 * ====================================================================== */
.committee-members { margin-top: 2.5rem; }
.committee-members .section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: rgb(var(--color-ink));
  margin: 0.25rem 0 0;
}
.table-scroll { overflow-x: auto; margin-top: 1.5rem; }
.members-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 32rem;
}
.members-table th,
.members-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgb(var(--color-line));
  vertical-align: top;
}
.members-table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--color-muted));
  border-bottom: 2px solid rgb(var(--color-line-strong));
}
.members-table__name { font-weight: 600; color: rgb(var(--color-ink)); }
.members-table tr.is-lead {
  background: rgb(var(--color-accent) / 0.08);
}
.members-table tr.is-lead .members-table__name {
  color: rgb(var(--color-primary));
}
.members-table tr.is-lead .members-table__role {
  font-weight: 600;
  color: rgb(var(--color-primary));
}
.members-table .muted { color: rgb(var(--color-muted)); }

/* =========================================================================
 * ABOUT PAGE (page.php → is_page('about'))
 * A compact "at a glance" facts strip, a lead-paragraph treatment on the
 * editor prose, and a dignified founder pull-quote callout. Content stays in
 * the editor; this layer only reflows and emphasises it.
 * ====================================================================== */
.page-about .prose { max-width: 46rem; }

/* At-a-glance facts strip — a tinted band of institutional facts above the
   narrative. Stacks 1-col on phones, 2-col on tablets, 4-col on desktop. */
.about-facts {
  margin-bottom: 3rem;
  padding: 1.75rem;
  border: 1px solid rgb(var(--color-line));
  border-radius: 1rem;
  background: rgb(var(--color-surface));
  box-shadow: var(--shadow-card);
}
.about-facts__eyebrow { margin-bottom: 1rem; }
.about-facts__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 1.5rem;
  margin: 0;
}
@media (min-width: 560px) { .about-facts__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .about-facts__grid { grid-template-columns: repeat(4, 1fr); } }
.about-fact {
  padding-left: 1rem;
  border-left: 2px solid rgb(var(--color-accent) / 0.6);
}
.about-fact__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--color-muted));
}
.about-fact__value {
  margin: 0.3rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.2;
  color: rgb(var(--color-ink));
}

/* Lead-paragraph treatment: the first paragraph of the About prose reads as a
   larger, calmer standfirst. :first-of-type keeps it robust if the editor
   opens with a paragraph (the About content does). */
.page-about .prose > p:first-of-type {
  font-size: 1.2rem;
  line-height: 1.65;
  color: rgb(var(--color-ink));
}
@media (min-width: 768px) {
  .page-about .prose > p:first-of-type { font-size: 1.3rem; }
}

/* Founder callout — tinted, brass-ruled card with the founder's name set as a
   serif pull-quote. The emotional centre of the page. */
.founder-callout {
  margin-top: 3rem;
  max-width: 46rem;
  padding: 2rem 1.75rem;
  border: 1px solid rgb(var(--color-accent) / 0.4);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgb(var(--color-accent) / 0.08), rgb(var(--color-accent) / 0.03));
  box-shadow: var(--shadow-card);
}
@media (min-width: 768px) { .founder-callout { padding: 2.5rem; } }
.founder-callout__eyebrow { color: rgb(var(--color-eyebrow)); }
.founder-callout .rule-gold { margin-top: 0.85rem; }
.founder-callout__name {
  margin-top: 1.1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: rgb(var(--color-primary-dark));
}
.founder-callout__role {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgb(var(--color-primary));
}
.founder-callout__note {
  margin-top: 1.1rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: rgb(var(--color-ink) / 0.9);
}

/* --- About: "Explore MMNSS College" icon nav cards -------------------- */
.about-explore { margin-top: 3.5rem; }
.about-explore__title { margin: 0.5rem 0 1.75rem; }
.about-explore__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 560px) { .about-explore__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .about-explore__grid { grid-template-columns: repeat(4, 1fr); } }
/* Five-card variant (Academics): 5 across on wide screens, 3 on medium. */
@media (min-width: 700px) { .about-explore__grid--5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .about-explore__grid--5 { grid-template-columns: repeat(5, 1fr); } }
/* Three-card variant (IQAC): 3 across on wide screens. */
@media (min-width: 900px) { .about-explore__grid--3 { grid-template-columns: repeat(3, 1fr); } }
/* News variant: 2 across on medium, 3 across on wide. */
@media (min-width: 560px) { .about-explore__grid--news { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .about-explore__grid--news { grid-template-columns: repeat(3, 1fr); } }
.about-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem 1.4rem;
  background: rgb(var(--color-surface));
  border: 1px solid rgb(var(--color-ink) / 0.08);
  border-radius: 0.9rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.about-card:hover {
  border-color: rgb(var(--color-primary) / 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -18px rgb(var(--color-ink) / 0.35);
}
.about-card:focus-visible {
  outline: 2px solid rgb(var(--color-primary));
  outline-offset: 3px;
}
.about-card__icon {
  width: 2rem;
  height: 2rem;
  color: rgb(var(--color-primary));
}
.about-card__title {
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0.15rem 0 0;
}
.about-card__desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgb(var(--color-ink) / 0.72);
  margin: 0;
  flex: 1 1 auto;
}
.about-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgb(var(--color-primary));
}
.about-card__cta svg { width: 0.7rem; height: 0.7rem; transition: transform 0.18s ease; }
.about-card:hover .about-card__cta svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .about-card, .about-card:hover, .about-card__cta svg { transition: none; transform: none; }
}

/* --- About: closing call to action ----------------------------------- */
.about-cta {
  margin-top: 3.5rem;
  padding: 2.5rem 2rem;
  text-align: center;
  background: rgb(var(--color-primary) / 0.04);
  border: 1px solid rgb(var(--color-primary) / 0.12);
  border-radius: 1rem;
}
.about-cta__title { margin: 0 0 0.75rem; }
.about-cta__lead {
  max-width: 40rem;
  margin: 0 auto 1.6rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgb(var(--color-ink) / 0.82);
}
.about-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  align-items: center;
}
.about-cta__link {
  font-weight: 600;
  color: rgb(var(--color-primary));
  text-underline-offset: 0.2em;
}

/* =========================================================================
 * CONTACT PAGE (page.php → is_page('contact'))
 * A two-column layout: contact cards on one side, a campus map + enquiry form
 * on the other. Stacks to a single column on phones and tablets.
 * ====================================================================== */
.contact-intro {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}
.contact-intro--fallback {
  font-size: 1.2rem;
  line-height: 1.7;
  color: rgb(var(--color-ink));
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 960px) {
  .contact-layout { grid-template-columns: 22rem 1fr; gap: 2.5rem; }
}

/* Contact "How can we help?" cards reuse .about-explore; add top spacing. */
.page-contact .about-explore { margin-top: 3.5rem; }

/* Contact FAQ — native <details> accordions. */
.contact-faq { margin-top: 3.5rem; }
.contact-faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 48rem;
}
.contact-faq__item {
  border: 1px solid rgb(var(--color-ink) / 0.1);
  border-radius: 0.7rem;
  background: rgb(var(--color-surface));
  overflow: hidden;
}
.contact-faq__q {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: rgb(var(--color-ink));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.contact-faq__q::-webkit-details-marker { display: none; }
.contact-faq__q::after {
  content: "";
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid rgb(var(--color-primary));
  border-bottom: 2px solid rgb(var(--color-primary));
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.contact-faq__item[open] .contact-faq__q::after { transform: rotate(-135deg); }
.contact-faq__q:focus-visible { outline: 2px solid rgb(var(--color-primary)); outline-offset: -2px; }
.contact-faq__a {
  padding: 0 1.25rem 1.15rem;
  color: rgb(var(--color-ink) / 0.82);
  line-height: 1.7;
}
.contact-faq__a p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .contact-faq__q::after { transition: none; } }

/* Contact cards column — each detail is a hover-lift card with a brass icon. */
.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 560px) and (max-width: 959px) {
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
}
.contact-card {
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
}
.contact-card__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgb(var(--color-accent) / 0.12);
  color: rgb(var(--color-primary));
}
.contact-card__icon svg { width: 1.35rem; height: 1.35rem; }
.contact-card__body { min-width: 0; }
.contact-card__value {
  margin-top: 0.35rem;
  font-size: 1rem;
  line-height: 1.55;
  color: rgb(var(--color-ink));
  word-break: break-word;
}
.contact-card__value a { text-decoration: none; font-weight: 600; }
.contact-card__value a:hover { text-decoration: underline; }

/* Primary column — map then form. */
.contact-primary {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact-map {
  margin: 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgb(var(--color-line));
  box-shadow: var(--shadow-card);
  background: rgb(var(--color-line));
}
.contact-map iframe {
  display: block;
  width: 100%;
  height: 20rem;
  border: 0;
}
.contact-map__caption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: rgb(var(--color-muted));
  background: rgb(var(--color-surface));
  border-top: 1px solid rgb(var(--color-line));
}

/* Enquiry form — housed in a raised card so it reads as a finished panel. */
.contact-form-wrap {
  padding: 1.75rem;
  border: 1px solid rgb(var(--color-line));
  border-radius: 1rem;
  background: rgb(var(--color-surface));
  box-shadow: var(--shadow-card);
}
@media (min-width: 768px) { .contact-form-wrap { padding: 2.25rem; } }
.contact-form__title {
  margin-top: 0.5rem;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
}
.contact-form-wrap .rule-gold { margin-top: 0.85rem; }
.contact-form { margin-top: 1.75rem; }
.contact-form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1.25rem;
}
@media (min-width: 560px) {
  .contact-form__grid { grid-template-columns: repeat(2, 1fr); }
}
.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}
.contact-form__actions .btn { min-height: 2.75rem; }
.contact-form__mailto {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgb(var(--color-primary));
  text-decoration: none;
}
.contact-form__mailto:hover { text-decoration: underline; }
.contact-form__note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgb(var(--color-muted));
}

/* Contact form submission notices (success / error after admin-post round-trip). */
.contact-notice {
  border-radius: 0.65rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
}
.contact-notice--ok {
  background: rgb(var(--color-accent) / 0.14);
  border: 1px solid rgb(var(--color-accent) / 0.5);
  color: rgb(var(--color-eyebrow));
}
.contact-notice--err {
  background: rgb(var(--color-primary) / 0.07);
  border: 1px solid rgb(var(--color-primary) / 0.35);
  color: rgb(var(--color-primary));
}

/* =========================================================================
   PROSE ELEVATION — composition devices for editor pages
   (Academics / Admissions / Placements / Facilities / Alumni)
   Injected into post_content by enhance-pages.php; all devices degrade to
   plain stacked prose if this block is absent.
   ========================================================================= */

/* Lead paragraph: a larger, calmer opener under the page-header band. */
.prose .prose-lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: rgb(var(--color-ink));
  max-width: 42rem;
}

/* Facts strip: a row of quiet stat tiles. Wraps and stacks on narrow screens. */
.prose .prose-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-block: 2rem;
  padding: 0;
}
@media (min-width: 560px) {
  .prose .prose-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .prose .prose-facts { grid-template-columns: repeat(4, 1fr); }
}
.prose .prose-fact {
  margin-top: 0;
  padding: 1.1rem 1.25rem;
  background: rgb(var(--color-surface));
  border: 1px solid rgb(var(--color-line));
  border-radius: 0.75rem;
  box-shadow: var(--shadow-card);
}
.prose .prose-fact__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.15;
  color: rgb(var(--color-primary));
}
.prose .prose-fact__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgb(var(--color-muted));
}

/* Two-column blocks. Stacks below 720px. The --cards variant renders each
   child as a soft card grid (used for the Facilities campus list). */
.prose .prose-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 2.5rem;
  margin-block: 1.5rem;
}
@media (min-width: 720px) {
  .prose .prose-cols { grid-template-columns: 1fr 1fr; }
}
.prose .prose-cols > * { margin-top: 0; }
.prose .prose-cols > * > :first-child { margin-top: 0; }

.prose .prose-cols--cards {
  gap: 1.25rem;
}
@media (min-width: 560px) {
  .prose .prose-cols--cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .prose .prose-cols--cards { grid-template-columns: repeat(3, 1fr); }
}
.prose .prose-tile {
  padding: 1.25rem 1.35rem;
  background: rgb(var(--color-surface));
  border: 1px solid rgb(var(--color-line));
  border-radius: 0.75rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.prose .prose-tile:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.prose .prose-tile h3 { margin-top: 0; font-size: 1.15rem; }
.prose .prose-tile p { margin-top: 0.5rem; font-size: 0.98rem; }

/* Callout: a soft cream panel for notices and CTA blocks. The --note variant
   is a lighter, brass-ruled aside for "please confirm / to be announced" copy. */
.prose .prose-callout {
  margin-block: 2rem;
  padding: 1.5rem 1.75rem;
  background: rgb(var(--color-cream));
  border: 1px solid rgb(var(--color-line));
  border-radius: 0.75rem;
}
.prose .prose-callout > :first-child { margin-top: 0; }
.prose .prose-callout h2,
.prose .prose-callout h3 { margin-top: 0; }
.prose .prose-callout--note {
  background: rgb(var(--color-accent) / 0.06);
  border: 0;
  border-left: 3px solid rgb(var(--color-accent));
  border-radius: 0 0.5rem 0.5rem 0;
}
.prose .prose-callout--note p { color: rgb(var(--color-muted)); }

/* CTA row: keeps buttons inline and wrapping, with comfortable spacing. */
.prose .prose-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.prose .prose-cta a { text-decoration: none; }
