/* =====================================================================
   NBSS — Royal Heritage design system (2026-10)
   Navy + heritage blue + antique gold on ivory. Serif display, clean body.
   Mobile first. Motion is light and switched off for reduced-motion users.
   ===================================================================== */

:root {
  --navy: #072B60;
  --navy-900: #04193A;
  --navy-700: #0B3A7A;
  --blue: #0759A7;
  --blue-50: #EAF1FA;
  --gold: #C59B52;
  --gold-600: #A87F3A;
  --gold-100: #F3E7CF;
  --ivory: #FAF6EF;
  --ivory-2: #F4EDE1;
  --paper: #FFFFFF;
  --ink: #1A2433;
  --muted: #4A5468;
  --line: #E7DCC7;
  --line-soft: rgba(var(--gold-rgb), .28);
  --ok: #1F7A4D;
  --ok-50: #E5F4EC;
  --bad: #B3261E;
  --bad-50: #FBEAE8;
  --warn: #8A5A00;
  --warn-50: #FFF4DC;
  --on-dark: #DCE6F5;        /* text on dark (navy) areas */
  --on-dark-2: #CFDAEC;
  --on-dark-3: #B9C8E0;
  /* the same colours as "r, g, b" for see-through shades; a theme (lib/themes.php) changes them together */
  --navy-rgb: 7, 43, 96;
  --navy-900-rgb: 4, 25, 58;
  --blue-rgb: 7, 89, 167;
  --gold-rgb: 197, 155, 82;
  --ivory-rgb: 250, 246, 239;

  --f-display: "Lora", Georgia, "Times New Roman", serif;   /* clear, sturdy serif for headings */
  --f-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(var(--navy-rgb), .06);
  --shadow: 0 10px 30px rgba(var(--navy-rgb), .10);
  --shadow-lg: 0 24px 60px rgba(var(--navy-rgb), .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 72px;
  --wrap: 1200px;

  --mandala: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3Cpath id='p' d='M100 20c11 17 11 39 0 58c-11-19-11-41 0-58z'/%3E%3Cpath id='q' d='M100 60c6 9 6 20 0 30c-6-10-6-21 0-30z'/%3E%3C/defs%3E%3Cg fill='none' stroke='%23C59B52' stroke-width='.7'%3E%3Ccircle cx='100' cy='100' r='97'/%3E%3Ccircle cx='100' cy='100' r='92' stroke-dasharray='1 4'/%3E%3Ccircle cx='100' cy='100' r='80'/%3E%3Ccircle cx='100' cy='100' r='42'/%3E%3Ccircle cx='100' cy='100' r='12'/%3E%3Cuse href='%23p'/%3E%3Cuse href='%23p' transform='rotate(30 100 100)'/%3E%3Cuse href='%23p' transform='rotate(60 100 100)'/%3E%3Cuse href='%23p' transform='rotate(90 100 100)'/%3E%3Cuse href='%23p' transform='rotate(120 100 100)'/%3E%3Cuse href='%23p' transform='rotate(150 100 100)'/%3E%3Cuse href='%23p' transform='rotate(180 100 100)'/%3E%3Cuse href='%23p' transform='rotate(210 100 100)'/%3E%3Cuse href='%23p' transform='rotate(240 100 100)'/%3E%3Cuse href='%23p' transform='rotate(270 100 100)'/%3E%3Cuse href='%23p' transform='rotate(300 100 100)'/%3E%3Cuse href='%23p' transform='rotate(330 100 100)'/%3E%3Cuse href='%23q' transform='rotate(15 100 100)'/%3E%3Cuse href='%23q' transform='rotate(75 100 100)'/%3E%3Cuse href='%23q' transform='rotate(135 100 100)'/%3E%3Cuse href='%23q' transform='rotate(195 100 100)'/%3E%3Cuse href='%23q' transform='rotate(255 100 100)'/%3E%3Cuse href='%23q' transform='rotate(315 100 100)'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  overflow-wrap: anywhere;   /* a word too long for its box (e-mail, number, big text setting) wraps instead of spilling out */
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--ivory);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--navy); line-height: 1.18; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; letter-spacing: -.005em; }
h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h4 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.ic { width: 1.2em; height: 1.2em; flex: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--gold-100); color: var(--navy); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.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; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--f-body); font-weight: 700; font-size: .78rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold-600);
  margin: 0 0 .9rem;
}
.eyebrow { flex-wrap: wrap; row-gap: .2em; }
.eyebrow .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); display: inline-block; }
.ornament { display: flex; align-items: center; gap: 12px; width: 200px; max-width: 70%; margin: .2rem 0 1.4rem; color: var(--gold); }
.ornament::before, .ornament::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament::after { background: linear-gradient(90deg, var(--gold), transparent); }
.ornament svg { width: 16px; height: 16px; }
.center .ornament, .ornament.center { margin-inline: auto; }
.lead { font-size: 1.15rem; color: var(--muted); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--navy); --fg: #fff; --bd: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .75em 1.5em; border-radius: 999px;
  border: 1.5px solid var(--bd); background: var(--bg); color: var(--fg);
  font: 700 .98rem/1 var(--f-body); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn .ic { transition: transform .25s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(var(--navy-rgb), .22); color: var(--fg); }
.btn:hover .ic-arrow { transform: translateX(4px); }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 45%, transparent 60%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn-gold { --bg: var(--gold); --bd: var(--gold); --fg: var(--navy-900); }
.btn-outline { --bg: transparent; --fg: var(--navy); --bd: var(--navy); }
.btn-outline:hover { --bg: var(--navy); --fg: #fff; }
.btn-ghost-light { --bg: transparent; --fg: #fff; --bd: rgba(255, 255, 255, .7); }
.btn-ghost-light:hover { --bg: #fff; --fg: var(--navy); }
.btn-sm { min-height: 40px; padding: .55em 1.1em; font-size: .9rem; }
.link-arrow { display: inline-flex; align-items: center; gap: .45em; font-weight: 700; color: var(--blue); text-decoration: none; }
.link-arrow .ic { transition: transform .25s var(--ease); }
.link-arrow:hover .ic { transform: translateX(4px); }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy-900); color: var(--on-dark); font-size: .88rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; min-height: 38px; }   /* wraps onto two lines on tiny phones with large text */
.topbar a { color: var(--on-dark); text-decoration: none; display: inline-flex; align-items: center; gap: .45em; white-space: nowrap; }
.topbar .only-sm { display: inline; }
.topbar a:hover { color: var(--gold-100); }
.topbar .ic { width: 15px; height: 15px; color: var(--gold); }
.topbar-list { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.topbar .hide-sm { display: none; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(var(--ivory-rgb), .92); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .3s, background .3s;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(var(--navy-rgb), .08); background: rgba(255, 255, 255, .96); }
@media (max-width: 1023px) {   /* no glass blur on phones: it is the costliest thing while scrolling */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(var(--ivory-rgb), .98); }
}
.nav { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand img { width: auto; height: 46px; transition: height .3s var(--ease); }
.site-header.is-scrolled .brand img { height: 40px; }
.brand-text { display: block; line-height: 1.05; min-width: 0; }
.brand-text strong { display: block; font-family: var(--f-display); color: var(--navy); font-size: .95rem; letter-spacing: .02em; text-transform: uppercase; }
.brand-text small { display: block; margin-top: 4px; color: var(--gold-600); font-weight: 700; font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; }

.menu { display: none; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu > ul { display: flex; align-items: center; gap: 2px; }
.menu a, .menu .sub-toggle {
  display: inline-flex; align-items: center; gap: .3em;
  padding: .55em .62em; border-radius: 8px;
  font: 600 .93rem/1.2 var(--f-body); color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer;
  position: relative; white-space: nowrap;
}
.menu > ul > li > a::after, .menu > ul > li > .sub-toggle::after {
  content: ""; position: absolute; left: .8em; right: .8em; bottom: .25em; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.menu > ul > li > a:hover::after, .menu > ul > li > .sub-toggle:hover::after,
.menu > ul > li > [aria-current="page"]::after, .menu > ul > li.is-active > .sub-toggle::after { transform: scaleX(1); }
.menu [aria-current="page"], .menu li.is-active > .sub-toggle { color: var(--navy); }
.menu .ic-chev-down { width: 15px; height: 15px; transition: transform .25s; }
.has-sub { position: relative; }
.submenu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 230px; padding: 8px;   /* z-index: above the festival strip under the menu bar */
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}
.submenu::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.submenu a { display: flex; width: 100%; padding: .6em .8em; font-weight: 600; }
.submenu a:hover, .submenu a:focus-visible { background: var(--ivory); color: var(--navy); }
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu, .has-sub.open > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.has-sub:hover .ic-chev-down, .has-sub.open .ic-chev-down { transform: rotate(180deg); }
.submenu.cols-2 { display: grid; grid-template-columns: 1fr 1fr; min-width: 440px; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.icon-btn .ic { width: 20px; height: 20px; }
.header-actions .btn-result { display: none; }
.menu-toggle { display: inline-grid; }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(var(--navy-900-rgb), .5); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; z-index: 140; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 360px); z-index: 150;
  background: var(--ivory); box-shadow: var(--shadow-lg); padding: 18px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(100%); transition: transform .35s var(--ease); overflow-y: auto; visibility: hidden;
}
body.drawer-open { overflow: hidden; }
body.drawer-open .drawer { transform: translateX(0); visibility: visible; }
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-head img { height: 40px; width: auto; }
.drawer nav ul { list-style: none; margin: 0; padding: 0; }
.drawer nav > ul > li { border-bottom: 1px solid var(--line); }
.drawer nav a, .drawer nav .sub-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 14px 4px; font: 600 1.05rem/1.2 var(--f-body); color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left;
}
.drawer nav [aria-current="page"] { color: var(--blue); }
.drawer nav .submenu-m { display: none; padding: 0 0 10px 12px; }
.drawer nav .open > .submenu-m { display: block; }
.drawer nav .submenu-m a { padding: 10px 4px; font-weight: 500; color: var(--muted); }
.drawer nav .open .ic-chev-down { transform: rotate(180deg); }
.drawer-actions { display: grid; gap: 10px; margin-top: 20px; }
.drawer-contact { margin-top: 20px; font-size: .95rem; color: var(--muted); display: grid; gap: 8px; }
.drawer-contact a { color: var(--ink); text-decoration: none; display: inline-flex; gap: .5em; align-items: center; }
.drawer-contact .ic { color: var(--gold-600); }

/* Quick result finder (header search) */
.finder-pop {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.finder-pop.open { opacity: 1; visibility: visible; transform: none; }
.finder-pop .wrap { padding-block: 22px; }
.finder-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.finder-pop-head h2 { font-size: 1.6rem; margin: 0; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(40px, 5vw, 68px); position: relative; }   /* kept tight: little empty space between sections */
.section-tight { padding-block: clamp(34px, 4.5vw, 58px); }
.section-head { margin-bottom: clamp(20px, 3vw, 32px); }
.section-head.center { max-width: 720px; margin-inline: auto; }
.section-head.split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.section-head.split > div { min-width: 0; }
.section-head p { color: var(--muted); margin: 0; }
.bg-paper { background: var(--paper); }
.bg-ivory-2 { background: var(--ivory-2); }
.has-mandala { overflow: hidden; }
.has-mandala::before {
  content: ""; position: absolute; width: 520px; aspect-ratio: 1; right: -200px; top: -120px;
  background: var(--gold); -webkit-mask: var(--mandala) center/contain no-repeat; mask: var(--mandala) center/contain no-repeat; opacity: .14; pointer-events: none;
}
.has-mandala.left::before { right: auto; left: -220px; top: auto; bottom: -160px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(90px, 11vw, 150px); background:
  radial-gradient(ellipse at 85% 10%, rgba(var(--blue-rgb), .08), transparent 55%),
  radial-gradient(ellipse at 0% 100%, rgba(var(--gold-rgb), .12), transparent 50%), var(--ivory); }
.hero::before {
  content: ""; position: absolute; width: min(760px, 120vw); aspect-ratio: 1; right: -18%; top: -22%;
  background: var(--gold); -webkit-mask: var(--mandala) center/contain no-repeat; mask: var(--mandala) center/contain no-repeat; opacity: .16; pointer-events: none;
  animation: spin 140s linear infinite;
}
.hero-grid { position: relative; display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-grid > * { min-width: 0; }   /* long words never push the column wider than a phone */
.hero-copy h1 { margin-bottom: .35em; }
.hero-copy h1 .since { display: block; color: var(--blue); font-size: 1.12em; }
.hero-copy .lead { max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-script { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 28px; font-family: var(--f-body); font-weight: 700; font-size: .82rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-600); }
.hero-script::before { content: ""; width: 36px; height: 2px; background: var(--gold); }
.hero-art { position: relative; justify-self: center; width: min(100%, 520px); }
.arch {
  position: relative; aspect-ratio: 4 / 4.6; border-radius: 999px 999px 26px 26px; overflow: hidden;
  border: 6px solid #fff; outline: 1.5px solid var(--gold); outline-offset: 6px;
  box-shadow: var(--shadow-lg); background: var(--navy);
}
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.hero-slide.is-active img { animation: kenburns 9s ease-out both; }
.arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(var(--navy-900-rgb), .55)); pointer-events: none; }
.hero-badge {
  position: absolute; left: -10px; bottom: 34px; z-index: 2;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.hero-badge .seal { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--gold); }
.hero-badge strong { display: block; font-family: var(--f-display); font-size: 1.35rem; color: var(--navy); line-height: 1; }
.hero-badge span { font-size: .82rem; color: var(--muted); }
.hero-dots { position: absolute; right: 18px; bottom: 18px; z-index: 2; display: flex; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; background: transparent; padding: 0; cursor: pointer; }
.hero-dots button[aria-current="true"] { background: var(--gold); border-color: var(--gold); }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(60px, 9vw, 120px); pointer-events: none; }
.hero-wave svg { width: 100%; height: 100%; display: block; }
.hero-wave .wave-a { fill: var(--blue); }
.hero-wave .wave-b { fill: var(--navy); }
.hero-wave .wave-c { stroke: var(--gold); }

/* ---------- Highlights strip ---------- */
.highlights { position: relative; z-index: 3; margin-top: clamp(-90px, -8vw, -60px); }
.highlights-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.hl { display: flex; align-items: center; gap: 14px; padding: 20px 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.hl:nth-child(odd) { border-right: 1px solid var(--line); }
.hl:nth-last-child(-n+2) { border-bottom: 0; }
.hl .hl-ic { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 12px; background: var(--blue-50); color: var(--blue); }
.hl .hl-ic .ic { width: 26px; height: 26px; }
.hl > div { min-width: 0; }
.hl strong { display: block; font-family: var(--f-display); font-size: 1.25rem; color: var(--navy); line-height: 1.15; overflow-wrap: anywhere; }
.hl span { display: block; color: var(--muted); font-size: .9rem; line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 559px) {   /* phones (also with large text): the picture above the words, so long words fit */
  .hl { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 14px; }
  .hl strong { font-size: 1.12rem; }
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
.framed { position: relative; margin: 0 14px 30px 0; }
.framed::before { content: ""; position: absolute; inset: 18px -14px -14px 18px; border: 1.5px solid var(--gold); border-radius: 22px; z-index: 0; }
.framed img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow-lg); }
.quote-card {
  position: absolute; z-index: 2; right: -6px; bottom: -26px; width: min(78%, 340px);
  padding: 20px 22px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.quote-card p { font-family: var(--f-display); font-style: italic; font-size: 1.12rem; line-height: 1.45; color: var(--navy); margin: 0 0 .5em; }
.quote-card small { color: var(--gold-600); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .7rem; }
.quote-card .qmark { position: absolute; top: -14px; left: 18px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: #fff; font-family: var(--f-display); font-size: 1.8rem; line-height: 1; padding-top: 8px; }
.prose { color: var(--ink); }
.prose p, .prose li { color: #3A4557; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin-top: 1.1em; }
.prose strong, .prose b { color: var(--navy); }
.prose a { color: var(--blue); }
.prose ul { padding-left: 1.2em; }
.prose img { border-radius: 12px; }
.prose > :first-child { margin-top: 0; }

/* ---------- Cards ---------- */
.grid-4 { display: grid; gap: 18px; }
.comp-card {
  position: relative; padding: 30px 24px 26px; text-align: center; display: flex; flex-direction: column; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  overflow: hidden;
}
.comp-card::before { content: ""; position: absolute; inset: auto -40% -60% auto; width: 200px; aspect-ratio: 1; background: var(--gold); -webkit-mask: var(--mandala) center/contain no-repeat; mask: var(--mandala) center/contain no-repeat; opacity: .10; transition: transform .8s var(--ease); }
.comp-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.comp-card:hover::before { transform: rotate(40deg) scale(1.1); }
.comp-ic { position: relative; display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%; background: var(--navy); color: #fff; box-shadow: 0 0 0 6px var(--blue-50), 0 0 0 7px var(--line-soft); transition: background .35s; }
.comp-card:hover .comp-ic { background: var(--blue); }
.comp-ic .ic { width: 34px; height: 34px; }
.comp-card h3 { font-size: 1.35rem; margin-bottom: .4em; }
.comp-card p { color: var(--muted); font-size: .98rem; margin-bottom: 1.1em; }
.comp-card .link-arrow { margin-top: auto; }

/* ---------- Courses rail ---------- */
.rail-wrap { position: relative; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 72%); gap: 16px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: 10px 2px 18px; scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.rail > * { scroll-snap-align: start; }
.course-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--gold); color: inherit; }
.course-media { position: relative; aspect-ratio: 4 / 3; background: var(--ivory-2); overflow: hidden; }
.course-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.course-media.fit-contain img { object-fit: contain; padding: 14px; }
.course-card:hover .course-media img { transform: scale(1.06); }
.course-media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); background: radial-gradient(circle, #fff 0, var(--ivory-2) 70%); }
.course-media .placeholder::before { content: ""; position: absolute; inset: 12%; background: var(--gold); -webkit-mask: var(--mandala) center/contain no-repeat; mask: var(--mandala) center/contain no-repeat; opacity: .5; }
.course-media .placeholder .ic { position: relative; width: 46px; height: 46px; color: var(--navy); }
.course-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.course-body h3 { font-size: 1.12rem; margin: 0; }
.course-body p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-body .link-arrow { margin-top: auto; padding-top: 6px; font-size: .9rem; }
.rail-btn {
  position: absolute; top: 38%; z-index: 2; display: none; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--navy); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; transition: background .2s, color .2s;
}
.rail-btn:hover { background: var(--navy); color: #fff; }
.rail-btn.prev { left: -14px; }
.rail-btn.next { right: -14px; }
.rail-btn[disabled] { opacity: .35; cursor: default; }
.course-grid { display: grid; gap: 18px; }

/* ---------- Notices / gallery / CTA (home bottom row) ---------- */
.trio { display: grid; gap: 24px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 1.35rem; }
.panel-head h3 .ic { color: var(--blue); width: 26px; height: 26px; }
.pill-link { display: inline-flex; align-items: center; gap: .35em; padding: .4em .85em; border: 1px solid var(--navy); border-radius: 999px; color: var(--navy); font-weight: 700; font-size: .8rem; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.pill-link:hover { background: var(--navy); color: #fff; }
.pill-link .ic { width: 14px; height: 14px; }
.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notice-item a {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; background: var(--ivory);
  transition: border-color .25s, transform .25s var(--ease), background .25s;
}
.notice-item a:hover { border-color: var(--gold); transform: translateX(3px); background: #fff; color: inherit; }
.date-tile { display: grid; place-items: center; width: 58px; height: 62px; border-radius: 10px; background: #fff; border: 1px solid var(--line); text-align: center; line-height: 1; }
.date-tile b { font-family: var(--f-display); font-size: 1.4rem; color: var(--navy); }
.date-tile small { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-600); margin-top: 3px; }
.notice-item h4 { font-family: var(--f-body); font-size: 1rem; font-weight: 700; color: var(--ink); margin: 0 0 2px; line-height: 1.3; }
.notice-item p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.notice-item .ic-chev-right { color: var(--navy); }
.badge-new { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .66rem; font-weight: 700; letter-spacing: .06em; vertical-align: 2px; }
/* Notices: the programme day stands out (lib/nbss.php nbss_notices) */
.date-tile { position: relative; }
.notice-card .date-tile { align-self: start; }   /* stays a small tile next to long notices */
.date-tile.is-event { background: linear-gradient(160deg, var(--navy), var(--navy-700)); border-color: var(--gold); box-shadow: 0 6px 16px rgba(var(--navy-rgb), .22); }
.date-tile.is-event b { color: #fff; }
.date-tile.is-event small { color: var(--gold-100); }
.date-tile em { display: block; margin-bottom: 4px; font-style: normal; font-size: .58rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.is-upcoming .date-tile.is-event::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--gold); animation: tile-ring 2.4s ease-out infinite; pointer-events: none; }
.notice-card.is-upcoming { border-color: rgba(var(--gold-rgb), .75); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .14), var(--shadow-sm); }
.event-when { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 .5em; padding: 7px 8px 7px 12px; border-radius: 14px; background: var(--gold-100); color: var(--navy); font-weight: 700; font-size: .98rem; line-height: 1.3; }
.event-when .ic { color: var(--gold-600); }
.event-when .countdown { padding: 3px 11px; border-radius: 999px; background: var(--navy); color: #fff; font-size: .8rem; letter-spacing: .02em; }
.event-when.is-past { background: var(--ivory-2); color: var(--muted); font-weight: 600; }
.event-when.is-past .countdown { background: #8A92A3; }
.notice-posted { margin: 0 0 .9em; font-size: .85rem; color: var(--muted); }
.notice-item .event-line { color: var(--navy); font-weight: 700; }
.notice-item .event-line b { color: var(--gold-600); }
.notice-item.is-upcoming a { border-color: rgba(var(--gold-rgb), .7); }
/* "New": blinks gently and sends out a soft ring (transform / opacity only — no lag) */
.badge-new { position: relative; isolation: isolate; background: linear-gradient(135deg, #E3262C, #B3121E); box-shadow: 0 2px 8px rgba(179, 18, 30, .35); animation: new-blink 1.4s ease-in-out infinite; }
.badge-new::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #E3262C; animation: new-ring 1.4s ease-out infinite; }
@keyframes new-blink { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: .78; } }
@keyframes new-ring { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.7, 2.1); opacity: 0; } }
@keyframes tile-ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.18); opacity: 0; } }
.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--ivory-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(var(--navy-900-rgb), .45)); opacity: 0; transition: opacity .3s; pointer-events: none; }
.thumb:hover img { transform: scale(1.08); }
.thumb:hover::after { opacity: 1; }
.cta-card {
  position: relative; overflow: hidden; color: var(--on-dark); border-radius: 18px; padding: 30px 26px;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-700) 60%, var(--blue) 120%);
  border: 1px solid rgba(var(--gold-rgb), .5); box-shadow: var(--shadow);
}
.cta-card::before { content: ""; position: absolute; width: 360px; aspect-ratio: 1; right: -140px; bottom: -140px; background: var(--gold); -webkit-mask: var(--mandala) center/contain no-repeat; mask: var(--mandala) center/contain no-repeat; opacity: .35; animation: spin 120s linear infinite; }
.cta-card h3 { color: #fff; font-size: clamp(1.8rem, 2.6vw, 2.2rem); }
.cta-card p { color: var(--on-dark-2); }
.cta-card .btn { width: 100%; margin-top: 10px; }
.cta-card > * { position: relative; }

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative; overflow: hidden; color: #fff; padding-block: clamp(48px, 8vw, 92px);
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy) 55%, var(--navy-700) 100%);
}
.page-hero::before { content: ""; position: absolute; width: 560px; aspect-ratio: 1; right: -160px; top: -200px; background: var(--gold); -webkit-mask: var(--mandala) center/contain no-repeat; mask: var(--mandala) center/contain no-repeat; opacity: .28; animation: spin 160s linear infinite; }
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.page-hero .wrap { position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.6rem); margin-bottom: .2em; }
.page-hero p { color: var(--on-dark-2); max-width: 640px; margin: 0; }
.page-hero .eyebrow { color: var(--gold); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; font-size: .85rem; color: var(--on-dark-3); }
.breadcrumb a { color: var(--on-dark); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-100); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--gold); }

/* ---------- Content layout ---------- */
.split { display: grid; gap: clamp(28px, 4vw, 56px); align-items: start; }
.split > * { min-width: 0; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-sm); }
.side-card + .side-card { margin-top: 18px; }
.side-card h3 { font-size: 1.45rem; }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-list > li > a, .side-list > li > span { display: flex; align-items: flex-start; gap: .6em; min-width: 0; color: var(--ink); text-decoration: none; }
.side-list a:hover { color: var(--blue); }
.side-list .ic { color: var(--gold-600); margin-top: .2em; }
.portrait { position: relative; max-width: 420px; }
.portrait img { width: 100%; border-radius: 999px 999px 22px 22px; border: 6px solid #fff; outline: 1.5px solid var(--gold); outline-offset: 6px; box-shadow: var(--shadow-lg); }
.portrait figcaption { margin-top: 22px; text-align: center; font-family: var(--f-display); font-size: 1.4rem; color: var(--navy); }
.portrait figcaption small { display: block; font-family: var(--f-body); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-600); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .9rem; color: var(--navy); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: .75em 1em; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 400 1rem/1.4 var(--f-body);
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 140px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(var(--blue-rgb), .14); }
.select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23072B60' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center/18px no-repeat; padding-right: 44px; }
.hint { font-size: .85rem; color: var(--muted); }
.form-grid { display: grid; gap: 16px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid; margin: 0 0 18px; }
.alert .ic { margin-top: .15em; }
.alert-ok { background: var(--ok-50); border-color: #B9DEC9; color: #12482D; }
.alert-bad { background: var(--bad-50); border-color: #F1C4BF; color: #6E1712; }
.alert-warn { background: var(--warn-50); border-color: #F0D9A6; color: #5A3B00; }
.alert-info { background: var(--blue-50); border-color: #C6D8EF; color: #0A3366; }

/* ---------- Result finder ---------- */
.finder-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.finder-card .finder-top { padding: 26px 26px 0; }
.tabs { display: flex; gap: 6px; padding: 5px; background: var(--ivory); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; }
.tab {
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent;
  font: 700 .92rem/1 var(--f-body); color: var(--muted); cursor: pointer; transition: background .25s, color .25s;
}
.tab[aria-selected="true"] { background: var(--navy); color: #fff; }
.finder-note { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 14px 0 0; }
.finder-note .ic { color: var(--gold-600); margin-top: .15em; }
/* one search box: registration number only (lib/finder-form.php) */
.finder { padding: 20px 26px 26px; }
.finder-label { display: block; margin-bottom: 8px; font-weight: 700; font-size: .92rem; color: var(--navy); }
.finder-reg { display: flex; flex-wrap: wrap; gap: 12px; }
.finder-input { position: relative; flex: 1 1 240px; min-width: 0; }
.finder-input .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--gold-600); pointer-events: none; }
.finder-input .input { min-height: 56px; padding-left: 48px; font-size: 1.12rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.finder-input .input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; color: #8A92A3; }
.finder-reg .btn { min-height: 56px; flex: 0 0 auto; padding-inline: 1.6em; }
.finder-pop .finder { padding: 0; }
@media (max-width: 559px) {
  .finder { padding: 16px 18px 20px; }
  .finder-reg .btn { flex: 1 1 100%; }
}
.result-card { margin-top: 26px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; animation: rise .6s var(--ease) both; }
.result-head {
  position: relative; display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between;
  padding: 22px 26px; color: #fff; background: linear-gradient(135deg, var(--navy-900), var(--navy));
}
.result-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--gold), transparent); }
.result-head h2 { color: #fff; margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.result-head .eyebrow { color: var(--gold); margin-bottom: .3rem; }
.status-pill { display: inline-flex; align-items: center; gap: .4em; padding: .45em 1em; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.status-pass { background: var(--ok-50); color: var(--ok); }
.status-fail { background: var(--bad-50); color: var(--bad); }
.status-wait { background: var(--warn-50); color: var(--warn); }
.result-body { padding: 22px 26px 26px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 22px; }
.fact { background: var(--ivory); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.fact dt { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-600); }
.fact dd { margin: 4px 0 0; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.marks { width: 100%; border-collapse: collapse; min-width: 560px; font-variant-numeric: tabular-nums; }
.marks th, .marks td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.marks thead th { background: var(--ivory); color: var(--navy); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.marks tbody tr:last-child td { border-bottom: 0; }
.marks td.num, .marks th.num { text-align: right; }
.marks .total td { font-weight: 700; color: var(--navy); background: var(--blue-50); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------- Gallery / video ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery-grid .thumb { border-radius: 14px; }
.gallery-grid .thumb figcaption { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 2; color: #fff; font-size: .82rem; line-height: 1.3; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.gallery-grid .thumb:hover figcaption { opacity: 1; transform: none; }
.video-grid { display: grid; gap: 22px; }
.video-facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 18px; overflow: hidden; background: var(--navy-900); cursor: pointer; box-shadow: var(--shadow); }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .3s, transform .6s var(--ease); }
.video-facade:hover img { opacity: 1; transform: scale(1.03); }
.video-facade .play { position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--gold-rgb), .95); color: var(--navy-900); box-shadow: 0 0 0 10px rgba(255, 255, 255, .25); transition: transform .3s var(--ease); }
.video-facade:hover .play { transform: scale(1.08); }
.video-facade .play .ic { width: 32px; height: 32px; margin-left: 4px; fill: currentColor; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; box-shadow: var(--shadow); background: #000; }
.empty-state { text-align: center; padding: 48px 24px; background: #fff; border: 1px dashed var(--gold); border-radius: 18px; color: var(--muted); }
.empty-state .ic { width: 42px; height: 42px; color: var(--gold); margin: 0 auto 10px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(var(--navy-900-rgb), .92); padding: 24px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: grid; gap: 10px; }
.lightbox img { max-height: calc(100vh - 140px); width: auto; margin: 0 auto; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox figcaption { text-align: center; color: var(--on-dark); font-size: .95rem; }
.lightbox .lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.lightbox .lb-btn:hover { background: var(--gold); color: var(--navy-900); border-color: var(--gold); }
.lightbox .lb-close { top: 18px; right: 18px; }
.lightbox .lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* Notice page */
.notice-full { display: grid; gap: 18px; }
.notice-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); scroll-margin-top: calc(var(--header-h) + 24px); }
.notice-card:target { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-100), var(--shadow); }
.notice-card h2 { font-size: 1.7rem; margin-bottom: .3em; }
.notice-card .prose { font-size: 1rem; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; color: var(--on-dark); background: linear-gradient(180deg, var(--navy) 0%, var(--navy-900) 100%); }
.site-footer::before { content: ""; position: absolute; width: 620px; aspect-ratio: 1; left: -240px; bottom: -280px; background: var(--gold); -webkit-mask: var(--mandala) center/contain no-repeat; mask: var(--mandala) center/contain no-repeat; opacity: .16; }
.footer-top-line { height: 4px; background: linear-gradient(90deg, var(--gold-600), var(--gold), var(--gold-600)); }
.footer-grid { position: relative; display: grid; gap: 34px; padding-block: 56px 36px; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.footer-brand img { width: 64px; height: 64px; border-radius: 50%; background: #fff; padding: 3px; border: 2px solid var(--gold); }
.footer-brand strong { display: block; font-family: var(--f-display); font-size: 1.15rem; color: #fff; text-transform: uppercase; letter-spacing: .03em; line-height: 1.1; }
.footer-brand small { color: var(--gold); font-weight: 700; font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; }
.site-footer h4 { color: #fff; font-size: 1.2rem; margin-bottom: 14px; position: relative; padding-bottom: 10px; }
.site-footer h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38px; height: 2px; background: var(--gold); }
.site-footer p { color: var(--on-dark-3); font-size: .95rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links.two-col { grid-template-columns: 1fr 1fr; column-gap: 18px; }
.footer-links a { color: var(--on-dark); text-decoration: none; font-size: .95rem; display: inline-flex; gap: .45em; align-items: baseline; transition: color .2s, transform .2s; }
.footer-links a::before { content: "›"; color: var(--gold); }
.footer-links a:hover { color: #fff; transform: translateX(3px); }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: .95rem; }
.footer-contact li { display: flex; gap: .7em; align-items: flex-start; }
.footer-contact .ic { color: var(--gold); margin-top: .2em; }
.footer-contact a { color: var(--on-dark); text-decoration: none; }
.footer-contact a:hover { color: #fff; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(var(--gold-rgb), .6); color: #fff; transition: background .2s, color .2s; }
.socials a:hover { background: var(--gold); color: var(--navy-900); }
.footer-bottom { position: relative; border-top: 1px solid rgba(var(--gold-rgb), .25); }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding-block: 18px; font-size: .86rem; color: var(--on-dark-3); }

/* ---------- Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1.02); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="left"] { transform: translateX(-30px); }
.js [data-reveal="right"] { transform: translateX(30px); }
.js [data-reveal="zoom"] { transform: scale(.94); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.hero-copy > * { animation: rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; }
.hero-copy > :nth-child(3) { animation-delay: .2s; }
.hero-copy > :nth-child(4) { animation-delay: .3s; }
.hero-copy > :nth-child(5) { animation-delay: .4s; }
.hero-art { animation: rise 1.1s .2s var(--ease) both; }

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

/* ---------- Breakpoints ---------- */
@media (min-width: 560px) {
  .rail { grid-auto-columns: minmax(230px, 46%); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid.two { grid-template-columns: 1fr 1fr; }
  .form-grid.two .full { grid-column: 1 / -1; }
}
@media (min-width: 720px) {
  .topbar .hide-sm { display: inline-flex; }
  .topbar .only-sm { display: none; }
  .brand-text strong { font-size: 1.12rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .rail { grid-auto-columns: minmax(230px, 31%); }
  .trio { grid-template-columns: 1fr 1fr; }
  .trio .cta-card { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1.4fr 1fr; }
  .video-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .hero-art { justify-self: end; }
  .highlights-card { grid-template-columns: repeat(4, 1fr); }
  .hl, .hl:nth-child(odd) { border-bottom: 0; border-right: 1px solid var(--line); }
  .hl:last-child { border-right: 0; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1.6fr 1fr; }
  .split.reverse { grid-template-columns: 1fr 1.6fr; }
  .course-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1240px) {
  .menu { display: block; }
  .menu-toggle { display: none; }
  .header-actions .btn-result { display: inline-flex; }
  .site-header .wrap.nav { max-width: 1360px; }
}
@media (min-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .rail { grid-auto-columns: calc((100% - 5 * 16px) / 6); overflow-x: hidden; }
  .rail-btn { display: grid; }
  .trio { grid-template-columns: 1.15fr 1fr .85fr; }
  .trio .cta-card { grid-column: auto; }
  .footer-grid { grid-template-columns: 1.3fr .85fr 1.6fr 1.15fr; }
  .brand-text strong { font-size: 1.15rem; }
}
@media (max-width: 380px) {
  .brand img { height: 40px; }
  .brand-text small { display: none; }
  .hl { padding: 16px 12px; gap: 10px; }
  .hl .hl-ic { width: 42px; height: 42px; }
}

/* ---------- Home: the top fits ONE screen on laptops and computers ----------
   From the top bar down to the "at a glance" card (1982 · ISO · Recognised · All-India) everything
   is visible without scrolling — also on small laptops (browser window about 1280×590 or 1366×625).
   Sizes follow the window HEIGHT (vh): a small laptop gets a tighter hero, a big screen big type.
     --hero-chrome  top bar + menu bar above the hero (a festival strip adds 10px)
     --card-over    how far the at-a-glance card reaches up into the hero
     --card-below   the rest of the card under the hero, plus a little air                    */
@media (min-width: 1024px) and (orientation: landscape) {
  :root { --hero-chrome: 110px; --card-over: clamp(46px, 8.5vh, 90px); --card-below: 42px; }
  body:has(.fest-border) { --hero-chrome: 120px; }
  .hero {
    min-height: calc(100svh - var(--hero-chrome) - var(--card-below));
    display: flex; align-items: center;
    padding-top: clamp(10px, 2.2vh, 40px);
    padding-bottom: calc(var(--card-over) + clamp(10px, 2.4vh, 28px));
  }
  .hero-grid { width: 100%; grid-template-columns: 1.15fr .85fr; }
  .hero-copy .eyebrow { margin-bottom: clamp(.35rem, 1.3vh, .9rem); }
  .hero-copy h1 { font-size: clamp(1.85rem, min(3.6vw, 6.1vh), 3.9rem); margin-bottom: .28em; }
  .hero-copy .lead { max-width: 640px; font-size: clamp(.95rem, 2.4vh, 1.15rem); line-height: 1.6; }
  .hero-cta { margin-top: clamp(12px, 2.6vh, 26px); }
  .hero-cta .btn { min-height: clamp(42px, 7.2vh, 48px); }
  .hero-script { margin-top: clamp(10px, 2.6vh, 28px); }
  /* the arched photo: as tall as the space between the menu bar and the card allows */
  .hero-art { width: min(100%, 520px, calc((100svh - var(--hero-chrome) - var(--card-below) - var(--card-over) - 64px) * .87)); }
  .highlights { margin-top: calc(-1 * var(--card-over)); }
  .hl { padding-block: clamp(10px, 2.1vh, 20px); }
}
@media (min-width: 1024px) and (orientation: landscape) and (max-height: 820px) {
  .hero-script { display: none; }      /* the decorative "Art · Culture · Heritage" line gives way on short screens */
}
@media (min-width: 1024px) and (max-width: 1239px) and (orientation: landscape) {
  /* small laptops: the copy column is narrower, so the type and the card get a little smaller */
  .hero-copy h1 { font-size: clamp(1.75rem, min(3.3vw, 5.7vh), 3.4rem); }
  .hl { gap: 10px; padding-inline: 12px; }
  .hl .hl-ic { width: 40px; height: 40px; }
  .hl .hl-ic .ic { width: 22px; height: 22px; }
  .hl strong { font-size: 1.05rem; }
  .hl span { font-size: .8rem; }
}
@media (min-width: 1024px) and (orientation: landscape) and (max-height: 660px) {
  /* very short windows (small laptop + browser bars) */
  .hero-copy .lead { font-size: .92rem; line-height: 1.55; }
  .hero-badge { transform: scale(.86); transform-origin: left bottom; }
}
/* ---------- Print (result sheet) ---------- */
@media print {
  .topbar, .site-header, .site-footer, .page-hero, .finder-card, .result-actions, .skip-link, .drawer, .drawer-backdrop { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .result-card { box-shadow: none; border: 1px solid #999; animation: none; }
  .result-head { background: none !important; color: #000; border-bottom: 2px solid #000; }
  .result-head h2, .result-head .eyebrow { color: #000; }
  .section { padding: 0; }
}

/* ---------- Inner page components ---------- */
.grid-2 { display: grid; gap: 24px; }
.mv-card { position: relative; padding: 30px 28px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.mv-card::after { content: ""; position: absolute; width: 260px; aspect-ratio: 1; right: -110px; top: -110px; background: var(--gold); -webkit-mask: var(--mandala) center/contain no-repeat; mask: var(--mandala) center/contain no-repeat; opacity: .14; pointer-events: none; }
.mv-card .comp-ic { margin: 0 0 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: step; }
.step { position: relative; padding: 28px 22px 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.step-no { position: absolute; top: 16px; right: 18px; font-family: var(--f-display); font-size: 2.6rem; line-height: 1; color: var(--gold-100); font-weight: 700; }
.step-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--navy); color: var(--gold); margin-bottom: 14px; }
.step-ic .ic { width: 26px; height: 26px; }
.step h3 { font-size: 1.45rem; margin-bottom: .3em; }
.step p { margin: 0; color: var(--muted); font-size: .97rem; }
.cta-side { background: linear-gradient(150deg, var(--navy), var(--navy-700)); border-color: rgba(var(--gold-rgb), .5); color: var(--on-dark); }
.cta-side h3 { color: #fff; }
.cta-side .hint { color: var(--on-dark-2); }
.cta-side .btn { --bg: var(--gold); --bd: var(--gold); --fg: var(--navy-900); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; }
.pager-info { color: var(--muted); font-weight: 600; }
.gallery-grid .thumb figcaption { pointer-events: none; }
.video-grid.single { max-width: 860px; margin-inline: auto; }
.contact-cards { display: grid; gap: 18px; }
.contact-card { padding: 26px 24px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.contact-card .comp-ic { width: 60px; height: 60px; margin-bottom: 14px; }
.contact-card .comp-ic .ic { width: 28px; height: 28px; }
.contact-card h3 { font-size: 1.5rem; margin-bottom: .3em; }
.contact-card p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.contact-card a { color: var(--navy); font-weight: 600; text-decoration: none; }
.contact-card a:hover { color: var(--blue); }
.map-frame { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--ivory-2); aspect-ratio: 4 / 3.4; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.field-error { color: var(--bad); font-size: .86rem; font-weight: 600; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.course-figure.fit-contain img { object-fit: contain; background: var(--ivory-2); padding: 20px; }
.notice-card .date-tile { height: auto; padding: 10px 0; }

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* Students Zone: answer first, search box after it (see student.php) */
.result-stack { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.result-stack #result:empty { display: none; }
.result-stack #result > * { margin-top: 0 !important; }
.result-stack #result > * + * { margin-top: 18px !important; }
.marks { min-width: 0; }
.marks th, .marks td { padding: 11px 12px; }
@media (max-width: 420px) {
  .marks thead th { font-size: .7rem; letter-spacing: .04em; }
  .result-head, .result-body { padding-left: 18px; padding-right: 18px; }
}

/* ---------- Home page: more sections ----------
   In page order: numbers band, President's message, heritage cards (founder / mission / vision),
   examination ladder, affiliation strip, video + common questions. Built like the rest of the site:
   no pictures for decoration (the mandala is the same small inline SVG), and only transform /
   opacity move, so cheap phones scroll smoothly.                                                   */

/* Numbers band — navy strip with five counting numbers */
.stats-band { position: relative; overflow: hidden; padding-block: 34px; color: var(--on-dark); background: linear-gradient(120deg, var(--navy-900), var(--navy) 55%, var(--navy-700)); }
.stats-band::before { content: ""; position: absolute; width: 420px; aspect-ratio: 1; left: -170px; top: -210px; background: var(--gold); -webkit-mask: var(--mandala) center/contain no-repeat; mask: var(--mandala) center/contain no-repeat; opacity: .18; pointer-events: none; }
.stats-grid { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
.stat { display: grid; justify-items: center; align-content: start; text-align: center; gap: 4px; min-width: 0; }
.stat-ic { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 4px; border-radius: 50%; border: 1px solid rgba(var(--gold-rgb), .6); color: var(--gold); }
.stat-ic .ic { width: 22px; height: 22px; }
.stat strong { font-family: var(--f-display); font-size: clamp(1.6rem, 3.2vw, 2.35rem); line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat > span:last-child { font-weight: 700; font-size: .95rem; color: var(--on-dark); }
.stat small { display: block; font-weight: 400; font-size: .8rem; color: var(--on-dark-3); }
.stat:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* President's message — portrait in a gold frame, message with a big quote mark, name under it */
.president-grid { display: grid; gap: 26px; align-items: center; }
.president-photo { margin: 0; justify-self: center; width: min(290px, 70vw); }
.president-frame { aspect-ratio: 4 / 5; padding: 8px; border-radius: 22px; background: linear-gradient(150deg, var(--gold), var(--gold-100) 50%, var(--gold-600)); box-shadow: var(--shadow-lg); }
.president-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 15px; background: #fff; }
.president-frame img.is-logo { object-fit: contain; padding: 16%; }
.president-quote { position: relative; }
.president-quote .qmark { position: absolute; top: -34px; left: -8px; font-family: var(--f-display); font-size: 5.5rem; line-height: 1; color: rgba(var(--gold-rgb), .35); pointer-events: none; }
.president-quote .prose { position: relative; font-size: 1.04rem; }
.president-sign { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); }
.president-sign strong { display: block; font-family: var(--f-display); font-size: 1.2rem; color: var(--navy); }
.president-sign span { font-size: .92rem; color: var(--muted); }

/* Heritage — founder (with his portrait), mission, vision */
.heritage-grid { display: grid; gap: 16px; }
.heritage-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 22px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.heritage-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.heritage-card .eyebrow { margin: 0; }
.heritage-card h3 { font-size: 1.2rem; margin: 0; }
.heritage-card p { margin: 0; font-size: .97rem; color: var(--muted); }
.heritage-card .link-arrow { margin-top: auto; padding-top: 8px; }
.heritage-ic { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 4px; border-radius: 12px; background: var(--gold-100); color: var(--gold-600); }
.heritage-ic .ic { width: 24px; height: 24px; }
.founder-card { flex-direction: row; align-items: flex-start; gap: 16px; }
.founder-card img { flex: none; width: 96px; height: 126px; object-fit: cover; object-position: top; border-radius: 12px; border: 3px solid var(--gold-100); }
.founder-card > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-self: stretch; }

/* Examination ladder — Nursery → Kalaguru */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ladder-step { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.ladder-no { grid-row: span 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-family: var(--f-display); font-weight: 700; color: #fff; background: var(--navy); box-shadow: 0 0 0 4px var(--gold-100); }
.ladder-step:last-child .ladder-no { background: var(--gold-600); }
.ladder-step h3 { font-size: 1.08rem; margin: 0; }
.ladder-step p { margin: 0; font-size: .88rem; color: var(--muted); }
.ladder-deg { justify-self: start; margin-top: 4px; padding: 2px 10px; border-radius: 99px; background: var(--gold-100); color: var(--gold-600); font-weight: 700; font-size: .76rem; }

/* Affiliation strip — four steps + navy card with the fee and the places */
.aff-home { display: grid; gap: 24px; align-items: center; }
.aff-home .lead { margin: 0; }
.mini-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.mini-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.mini-no { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold-100); color: var(--gold-600); font-weight: 700; }
.mini-steps strong { display: block; color: var(--navy); }
.mini-steps small { font-size: .9rem; color: var(--muted); }
.aff-card {
  position: relative; overflow: hidden; display: grid; gap: 10px; padding: 26px 24px; border-radius: 18px; color: var(--on-dark);
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-700) 60%, var(--blue) 120%);
  border: 1px solid rgba(var(--gold-rgb), .5); box-shadow: var(--shadow);
}
.aff-card::before { content: ""; position: absolute; width: 300px; aspect-ratio: 1; right: -120px; top: -120px; background: var(--gold); -webkit-mask: var(--mandala) center/contain no-repeat; mask: var(--mandala) center/contain no-repeat; opacity: .25; pointer-events: none; }
.aff-card > * { position: relative; }
.aff-card > small { font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-3); }
.aff-fee { font-family: var(--f-display); font-size: 2.6rem; line-height: 1; color: #fff; }
.aff-fee.is-text { font-size: 1.6rem; }
.aff-card .btn { width: 100%; }
.aff-places { margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .18); }
.aff-places small { display: block; margin-bottom: 8px; font-size: .8rem; color: var(--on-dark-3); }
.aff-places ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.aff-places li { padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(var(--gold-rgb), .45); font-size: .82rem; color: #fff; }

/* Video (the video page's player, .video-facade) + common questions */
.faq-grid { display: grid; gap: 30px; align-items: start; }
.faq-grid h2 { margin-bottom: 0; }
.home-video, .faq-grid .video-frame { margin-top: 16px; }
.faq-more { margin: 12px 0 0; }
.faq { display: grid; gap: 10px; margin-top: 16px; }
.faq details { padding: 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; list-style: none; cursor: pointer; font-weight: 700; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-100); color: var(--gold-600); font-size: 1.2rem; line-height: 1; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 14px; color: var(--muted); overflow-wrap: anywhere; }   /* long e-mail / phone lists wrap on small phones */

@media (max-width: 559px) {
  .founder-card { flex-direction: column; }   /* portrait above the text on small phones */
}
@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat:last-child:nth-child(odd) { grid-column: auto; }
  .ladder { grid-template-columns: repeat(2, 1fr); }
  .mini-steps { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .president-grid { grid-template-columns: 300px 1fr; gap: 56px; }
  .heritage-grid { grid-template-columns: 1.35fr 1fr 1fr; }
  .aff-home { grid-template-columns: 1.5fr 1fr; gap: 48px; }
  .faq-grid { grid-template-columns: 1fr 1.15fr; gap: 48px; }
  .faq-grid.no-video { grid-template-columns: 1fr; max-width: 860px; margin-inline: auto; }
}
@media (min-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(var(--n, 5), 1fr); }   /* --n: how many boxes are shown (index.php) */
  .stat + .stat { border-left: 1px solid rgba(var(--gold-rgb), .25); }
  /* the ladder becomes one row of steps joined by a line */
  .ladder { position: relative; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
  .ladder::before { content: ""; position: absolute; left: 7%; right: 7%; top: 34px; height: 2px; background: linear-gradient(90deg, var(--navy), var(--gold)); }
  .ladder-step { position: relative; grid-template-columns: 1fr; justify-items: center; align-content: start; text-align: center; padding: 12px 6px 14px; background: transparent; border: 0; }
  .ladder-no { grid-row: auto; margin-bottom: 10px; }
  .ladder-deg { justify-self: center; }
}

/* ---------- Result pop-up (js/nbss.js "Result pop-up") ----------
   The answer to a result search opens over the page the visitor is on. Phones: a sheet that rises
   from the bottom; bigger screens: a centred card. Printing prints only the result.            */
.result-pop { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 16px; visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s; }
.result-pop.open { visibility: visible; opacity: 1; }
.result-pop-backdrop { position: absolute; inset: 0; background: rgba(var(--navy-900-rgb), .72); }
.result-pop-box {
  position: relative; display: flex; flex-direction: column; width: min(880px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow: hidden; background: var(--ivory); border: 1px solid rgba(var(--gold-rgb), .5); border-radius: 22px; box-shadow: var(--shadow-lg);
  transform: translateY(18px) scale(.98); transition: transform .3s var(--ease);
}
.result-pop.open .result-pop-box { transform: none; }
.result-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.result-pop-head .eyebrow { margin: 0 0 .15rem; }
.result-pop-head h2 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.result-pop-body { overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 22px; outline: 0; }
.result-pop-body > * + * { margin-top: 18px; }
.result-pop-body .result-card { margin-top: 0; }
.result-pop-body > .result-card + .result-card { margin-top: 18px; }
.result-loading { display: grid; justify-items: center; gap: 12px; padding: 44px 10px; color: var(--muted); }
.result-loading p { margin: 0; }
.result-loading .spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--gold-100); border-top-color: var(--gold-600); animation: spin .8s linear infinite; }
body.result-open { overflow: hidden; }
@media (max-width: 559px) {
  .result-pop { padding: 0; align-items: end; }
  .result-pop-box { border-radius: 20px 20px 0 0; max-height: 92vh; max-height: 92dvh; transform: translateY(40px); }
  .result-pop-body { padding: 14px 12px 18px; }
  .result-pop-body .result-body { padding: 18px 16px 20px; }
  .result-pop-body .result-head { padding: 18px 16px; }
  .result-pop-body .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }   /* two per row: less scrolling */
  .result-pop-body .fact { padding: 10px 12px; }
  .result-pop-body .fact dt { font-size: .66rem; letter-spacing: .08em; }
  .result-pop-body .fact dd { font-size: .95rem; }
}
@media print {
  body.result-open > :not(.result-pop) { display: none !important; }
  body.result-open .result-pop { position: static; display: block; padding: 0; visibility: visible; opacity: 1; }
  body.result-open .result-pop-backdrop, body.result-open .result-pop-head { display: none !important; }
  body.result-open .result-pop-box { max-height: none; overflow: visible; border: 0; box-shadow: none; transform: none; background: #fff; }
  body.result-open .result-pop-body { overflow: visible; padding: 0; }
}
