/* ==========================================================================
   Public site design system — midnight navy, academic gold, tropical teal
   ========================================================================== */
:root {
  --ink: #050916;
  --navy-950: #070C1F;
  --navy-900: #0A1230;
  --navy-850: #0D1739;
  --navy-800: #111D47;
  --navy-700: #1A2A66;
  --royal: #3A5BFF;
  --sky: #8FB0FF;
  --gold: #E8B24A;
  --gold-2: #F7D892;
  --gold-deep: #A9771F;
  --teal: #22C8A9;
  --rose: #FF7A7A;
  --ivory: #F6F1E6;
  --paper: #FBF8F1;
  --paper-2: #F3EEE2;
  --text: #EDF0FA;
  --muted: #98A2C3;
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .16);
  --ink-text: #0B1430;
  --ink-muted: #5A6283;
  --ink-line: #E5DFD1;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 20px 60px -24px rgba(6, 12, 40, .45);
  --shadow-soft: 0 10px 30px -18px rgba(6, 12, 40, .35);
  --font-display: "Schibsted Grotesk", "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --nav-h: 72px;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--ink-text);
  background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-dark { background: var(--ink); color: var(--text); }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), calc(100% - 32px)); margin-inline: auto; }
.wrap-narrow { width: min(820px, calc(100% - 32px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
.display, h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.03em; line-height: 1.06; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.8rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.15; }
.display em, h1 em, h2 em, h3 em { font-style: normal; color: var(--gold); font-weight: inherit; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.28rem); color: var(--ink-muted); max-width: 60ch; }
.is-dark .lead, .dark .lead { color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; font-size: .74rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-deep);
}
.dark .eyebrow, .is-dark .eyebrow { color: var(--gold); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.muted { color: var(--ink-muted); }
.dark .muted, .is-dark .muted { color: var(--muted); }
.tiny { font-size: .8rem; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  --h: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; height: var(--h);
  padding: 0 1.35rem; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: .95rem;
  letter-spacing: .005em; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s, border-color .3s;
  white-space: nowrap; background: none; color: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-gold {
  color: #1B1405; background: linear-gradient(180deg, #F8DB97 0%, #E8B24A 55%, #D49A2E 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 12px 30px -12px rgba(232, 178, 74, .6);
}
.btn-gold:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 18px 40px -12px rgba(232, 178, 74, .8); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255, 255, 255, .04); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); }
.btn-navy { background: var(--navy-900); color: #fff; box-shadow: var(--shadow-soft); }
.btn-navy:hover { background: var(--navy-800); }
.btn-line { border-color: var(--ink-line); color: var(--ink-text); background: #fff; }
.btn-line:hover { border-color: var(--ink-text); }
.btn-sm { --h: 38px; padding: 0 1rem; font-size: .86rem; }
.btn-lg { --h: 56px; padding: 0 1.7rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center;
  transition: background .4s, backdrop-filter .4s, border-color .4s, transform .5s var(--ease); border-bottom: 1px solid transparent;
  color: var(--ink-text);
}
.nav.on-dark { color: var(--text); }
.nav.scrolled { background: rgba(251, 248, 241, .82); backdrop-filter: saturate(1.4) blur(18px); border-color: var(--ink-line); color: var(--ink-text); }
.nav.on-dark.scrolled { background: rgba(7, 12, 31, .62); border-color: var(--line); color: var(--text); }
.nav.hidden { transform: translateY(-100%); }
.nav .wrap { display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -.01em; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.nav-links { display: flex; gap: .25rem; margin-left: 1.5rem; }
.nav-links a { padding: .5rem .8rem; border-radius: 999px; font-size: .92rem; font-weight: 500; opacity: .82; transition: opacity .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { opacity: 1; background: rgba(127, 127, 127, .1); }
.nav-cta { margin-left: auto; display: flex; gap: .6rem; align-items: center; }
.nav-cta .login { font-size: .9rem; font-weight: 500; opacity: .85; padding: .5rem .6rem; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: inherit; }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; margin: 4px auto; transition: transform .3s; }
.mobile-menu {
  position: fixed; inset: 0; z-index: 49; background: var(--navy-950); color: var(--text); padding: calc(var(--nav-h) + 24px) 24px 32px;
  display: flex; flex-direction: column; gap: .4rem; transform: translateY(-100%); transition: transform .55s var(--ease);
}
.mobile-menu.open { transform: none; }
.mobile-menu a { font-family: var(--font-display); font-size: 2rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 1rem; font-family: var(--font-body); font-size: 1rem; border: 0; }
@media (max-width: 960px) {
  .nav-links, .nav-cta .login, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .nav-cta { margin-left: auto; }
  .nav-cta .btn { display: none; }
}

/* ---------- search ---------- */
.search {
  position: relative; display: flex; align-items: center; gap: .6rem; height: 62px; padding: 0 .5rem 0 1.25rem; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line-2); backdrop-filter: blur(16px); max-width: 620px;
}
.search.light { background: #fff; border-color: var(--ink-line); box-shadow: var(--shadow-soft); }
.search svg { width: 20px; height: 20px; opacity: .7; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 1rem; outline: none; height: 100%; }
.search input::placeholder { color: currentColor; opacity: .55; }
.search .btn { --h: 48px; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; color: var(--ink-text); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden; z-index: 20; display: none; text-align: left;
}
.search-results.open { display: block; }
.search-results a { display: flex; gap: .8rem; align-items: baseline; padding: .75rem 1.1rem; border-bottom: 1px solid #f0ece3; }
.search-results a:hover, .search-results a.focus { background: var(--paper); }
.search-results .t { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-deep); font-weight: 600; min-width: 84px; }
.search-results .s { margin-left: auto; color: var(--ink-muted); font-size: .85rem; white-space: nowrap; }

/* ---------- chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 600;
  background: var(--paper-2); color: var(--ink-text); border: 1px solid var(--ink-line); white-space: nowrap; max-width: 100%;
}
.dark .chip, .is-dark .chip { background: rgba(255, 255, 255, .06); border-color: var(--line); color: var(--text); }
.chip.gold { background: rgba(232, 178, 74, .14); border-color: rgba(232, 178, 74, .35); color: #8A5E0F; }
.dark .chip.gold, .is-dark .chip.gold { color: var(--gold-2); }
.chip.teal { background: rgba(34, 200, 169, .12); border-color: rgba(34, 200, 169, .35); color: #0B7B66; }
.dark .chip.teal { color: #7FF0DA; }
.chip.solid-gold { background: var(--gold); border-color: var(--gold); color: #1B1405; }
.chip svg { width: 13px; height: 13px; }

/* ---------- crest (university monogram) ---------- */
.crest {
  --h1: 222; --h2: 250; width: 58px; height: 58px; border-radius: 16px; flex: none; display: grid; place-items: center; position: relative;
  background: radial-gradient(120% 120% at 20% 10%, hsl(var(--h1) 70% 36%), hsl(var(--h2) 65% 14%));
  color: var(--gold-2); font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(247, 216, 146, .35), 0 10px 24px -12px rgba(6, 12, 40, .7);
  overflow: hidden;
}
.crest img { position: absolute; inset: 11%; width: 78%; height: 78%; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; opacity: 0; transition: opacity .4s; }
.crest img.ok { opacity: 1; }
.uni-card .hl { font-size: .86rem; color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dark .uni-card .hl { color: var(--muted); }
.crest.lg { width: 92px; height: 92px; border-radius: 24px; font-size: 1.8rem; }
.crest.sm { width: 26px; height: 26px; border-radius: 8px; font-size: .62rem; box-shadow: inset 0 0 0 1px rgba(247, 216, 146, .35); }
.crest.sm img { inset: 8%; width: 84%; height: 84%; padding: 1px; border-radius: 5px; }
/* A loaded logo turns the crest into a white chip sized to the mark, so wide wordmarks (INTI, Southampton, UCSI)
   stay legible instead of shrinking into a square. */
.crest:has(img.ok) { width: auto; min-width: 58px; padding: 7px 10px; background: #fff; box-shadow: 0 0 0 1px rgba(10, 20, 50, .08), 0 10px 24px -12px rgba(6, 12, 40, .5); }
.crest:has(img.ok) .mono { display: none; }
.crest img.ok { position: static; width: auto; height: 44px; max-width: 128px; padding: 0; border-radius: 0; background: none; }
.crest.lg:has(img.ok) { min-width: 92px; padding: 12px 16px; }
.crest.lg img.ok { height: 68px; max-width: 210px; }
.crest.sm:has(img.ok) { min-width: 26px; padding: 3px 5px; border-radius: 7px; }
.crest.sm img.ok { height: 20px; max-width: 72px; }
/* chips sitting on dark hero bands */
.page-hero .chip, .uni-card .badges .chip { background: rgba(255, 255, 255, .07); border-color: var(--line-2); color: var(--text); }
.page-hero .chip.gold, .uni-card .badges .chip.gold { background: rgba(232, 178, 74, .16); border-color: rgba(232, 178, 74, .45); color: var(--gold-2); }
.page-hero .chip.teal { background: rgba(34, 200, 169, .12); border-color: rgba(34, 200, 169, .4); color: #8FF3DF; }
.uni-card .badges .chip.solid-gold, .page-hero .chip.solid-gold { background: var(--gold); border-color: var(--gold); color: #1B1405; }
.uni-card .badges .chip { backdrop-filter: blur(8px); }

/* ---------- university card ---------- */
.uni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 22px; }
.uni-card .stats .chip { white-space: normal; } /* long ranking notes wrap instead of widening the card */
.uni-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--ink-line);
  overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s; transform-style: preserve-3d;
}
.uni-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.uni-card .cover {
  --h1: 222; --h2: 250; height: 128px; position: relative; overflow: hidden;
  background: radial-gradient(140% 120% at 0% 0%, hsl(var(--h1) 60% 30%), hsl(var(--h2) 70% 10%));
}
.uni-card .cover img.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; mix-blend-mode: luminosity; transition: transform 1.2s var(--ease), opacity .6s; }
.uni-card:hover .cover img.photo { transform: scale(1.06); opacity: .7; }
.uni-card .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(5, 9, 22, .55)); }
.uni-card .cover .pattern { position: absolute; inset: 0; opacity: .25; background-image: radial-gradient(rgba(247, 216, 146, .5) 1px, transparent 1px); background-size: 14px 14px; mask-image: linear-gradient(120deg, #000, transparent 70%); }
.uni-card .badges { position: absolute; z-index: 2; top: 14px; left: 14px; right: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.uni-card > .crest { position: absolute; z-index: 3; left: 18px; top: 96px; } /* overlaps the 128px photo band by half */
.uni-card .body { padding: 38px 20px 18px; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.uni-card h3 { font-size: 1.22rem; line-height: 1.2; }
.uni-card .meta { font-size: .86rem; color: var(--ink-muted); }
.uni-card .stats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: .2rem; }
.uni-card .foot { margin-top: auto; padding-top: .9rem; display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed var(--ink-line); font-size: .86rem; }
.uni-card .foot .from b { font-size: 1.02rem; }
.uni-card .arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); transition: background .3s, transform .4s var(--ease); }
.uni-card:hover .arrow { background: var(--gold); transform: rotate(-45deg); }
.uni-card .glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .25), transparent 40%); opacity: 0; transition: opacity .3s; z-index: 3; }
.uni-card:hover .glare { opacity: 1; }

.dark .uni-card { background: linear-gradient(180deg, rgba(20, 30, 70, .7), rgba(10, 16, 40, .85)); border-color: var(--line); color: var(--text); backdrop-filter: blur(14px); }
.dark .uni-card .meta { color: var(--muted); }
.dark .uni-card .foot { border-color: var(--line); }
.dark .uni-card .arrow { background: rgba(255, 255, 255, .08); }
.dark .uni-card .glare { background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(247, 216, 146, .14), transparent 40%); }

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  position: relative; color: var(--text); background: var(--ink); padding: calc(var(--nav-h) + 56px) 0 64px; overflow: hidden; isolation: isolate;
}
.page-hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; z-index: -1;
  background: radial-gradient(closest-side, rgba(58, 91, 255, .35), transparent 70%); filter: blur(10px);
}
.page-hero::after {
  content: ""; position: absolute; inset: auto auto -40% -15%; width: 60vw; height: 60vw; z-index: -1;
  background: radial-gradient(closest-side, rgba(232, 178, 74, .22), transparent 70%);
}
.page-hero .grain { position: absolute; inset: 0; z-index: -1; opacity: .08; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); max-width: 18ch; }
.page-hero .lead { margin-top: 1rem; }
.crumbs { display: flex; gap: .5rem; font-size: .82rem; color: var(--muted); margin-bottom: 1.2rem; flex-wrap: wrap; }
.crumbs a:hover { color: var(--gold); }
.crumbs span::before { content: "/"; margin-right: .5rem; opacity: .5; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section.tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.6rem; flex-wrap: wrap; }
.section-head h2 { max-width: 16ch; margin-top: .8rem; }
.dark { background: var(--ink); color: var(--text); }
.panel { background: #fff; border: 1px solid var(--ink-line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); }
.dark .panel { background: rgba(255, 255, 255, .03); border-color: var(--line); }

/* ---------- filters & lists ---------- */
.layout-side { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
@media (max-width: 960px) { .layout-side { grid-template-columns: 1fr; } }
.filters { position: sticky; top: calc(var(--nav-h) + 20px); display: grid; gap: 14px; }
@media (max-width: 960px) { .filters { position: static; } }
.field label, .flabel { display: block; font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .4rem; }
.input, .select, textarea.input {
  width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--ink-line); background: #fff; padding: 0 .9rem; font: inherit; color: var(--ink-text);
  transition: border-color .2s, box-shadow .2s; appearance: none;
}
textarea.input { height: auto; min-height: 110px; padding: .75rem .9rem; resize: vertical; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%235A6283' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.2rem; }
.input:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(232, 178, 74, .18); }
.dark .input, .dark .select, .form-dark .input, .form-dark .select { background: rgba(255, 255, 255, .05); border-color: var(--line-2); color: var(--text); }
.dark .select option, .form-dark .select option { color: #111; }
.dark .field label, .form-dark .field label { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.prog-list { display: grid; gap: 12px; }
.prog-row {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 18px 20px; border-radius: 18px; background: #fff;
  border: 1px solid var(--ink-line); transition: box-shadow .3s, transform .3s var(--ease), border-color .3s;
}
.prog-row:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); border-color: transparent; }
.prog-row .title { font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.prog-row .sub { color: var(--ink-muted); font-size: .86rem; margin-top: .2rem; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.prog-row .fee { text-align: right; }
.prog-row .fee b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; display: block; }
.prog-row .fee small { color: var(--ink-muted); font-size: .76rem; }
@media (max-width: 640px) { .prog-row { grid-template-columns: 1fr; } .prog-row .fee { text-align: left; } }
.unverified { color: #9A6B12; font-size: .72rem; font-weight: 600; }

.pager { display: flex; gap: 8px; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--ink-line); background: #fff; padding: 0 .8rem; font-weight: 600; font-size: .9rem; }
.pager .cur { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

.empty { text-align: center; padding: 64px 24px; border: 1px dashed var(--ink-line); border-radius: var(--radius-lg); color: var(--ink-muted); }

/* ---------- university detail ---------- */
.uni-hero { padding-bottom: 40px; }
.uni-hero .top { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.uni-hero .cover-photo { position: absolute; inset: 0; z-index: -2; }
.uni-hero .cover-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: saturate(.7); }
.uni-hero .cover-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 9, 22, .6), var(--ink)); }
.keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; margin-top: 36px; }
.keyfacts > div { background: rgba(10, 18, 48, .82); padding: 18px 20px; backdrop-filter: blur(8px); }
.keyfacts .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.keyfacts .v { font-family: var(--font-display); font-size: 1.45rem; margin-top: .25rem; color: #fff; }
@media (max-width: 520px) { .keyfacts > div:last-child:nth-child(odd) { grid-column: 1 / -1; } } /* no empty cell in the two-column grid */
.tabs-nav { position: sticky; top: var(--nav-h); z-index: 20; background: rgba(251, 248, 241, .9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--ink-line); }
.tabs-nav .wrap { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; }
.tabs-nav a { padding: 1rem .9rem; font-weight: 600; font-size: .9rem; color: var(--ink-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs-nav a.active, .tabs-nav a:hover { color: var(--ink-text); border-color: var(--gold); }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.sticky-card { position: sticky; top: calc(var(--nav-h) + 76px); }
.hl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.hl-list li { display: flex; gap: .7rem; align-items: flex-start; }
.hl-list li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%; background: rgba(232, 178, 74, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' fill='none'%3E%3Cpath d='M1 4l2.6 2.6L9 1' stroke='%23A9771F' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center no-repeat; }
.fee-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.fee-table th, .fee-table td { padding: .7rem .4rem; border-bottom: 1px solid var(--ink-line); text-align: left; vertical-align: top; }
.fee-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); font-weight: 600; }
.fee-table td.r, .fee-table th.r { text-align: right; white-space: nowrap; }
.level-block + .level-block { margin-top: 2.2rem; }
.level-block h3 { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.level-block h3 .count { font-family: var(--font-body); font-size: .8rem; color: var(--ink-muted); }
details.faq { border-bottom: 1px solid var(--ink-line); padding: 1rem 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--gold-deep); transition: transform .3s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin: .7rem 0 0; color: var(--ink-muted); }
.promo-banner {
  position: relative; overflow: hidden; border-radius: 22px; padding: 22px 24px; color: #1B1405;
  background: linear-gradient(120deg, #F8DB97, #E8B24A 60%, #D9A13A); box-shadow: 0 20px 50px -24px rgba(232, 178, 74, .8);
}
.promo-banner b { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; display: block; line-height: 1.1; }
.promo-banner::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 24px solid rgba(255, 255, 255, .25); }

/* ---------- guides ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 20px; }
/* grid items default to their content's min width; long tokens ("FSc/ICS/I.Com/FA") pushed cards past phone width */
.guide-grid > *, .uni-grid > * { min-width: 0; }
.guide-card h3, .guide-card p, .uni-card h3 { overflow-wrap: break-word; }
.guide-card {
  position: relative; display: flex; flex-direction: column; gap: .8rem; padding: 24px; border-radius: var(--radius-lg); background: #fff;
  border: 1px solid var(--ink-line); min-height: 240px; transition: transform .45s var(--ease), box-shadow .45s var(--ease); overflow: hidden;
}
.guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.guide-card .cat { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }
.guide-card h3 { font-size: 1.35rem; }
.guide-card p { margin: 0; color: var(--ink-muted); font-size: .93rem; }
.guide-card .foot { margin-top: auto; display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-muted); }
.guide-card .n { display: none; } /* the oversized numerals collided with long titles */
.dark .guide-card { background: rgba(255, 255, 255, .035); border-color: var(--line); color: var(--text); }
.dark .guide-card p, .dark .guide-card .foot { color: var(--muted); }

.article { font-size: 1.07rem; line-height: 1.78; color: #1F2747; }
.article h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 2.4rem 0 .8rem; }
.article h3 { font-size: 1.3rem; margin: 1.8rem 0 .5rem; }
.article p { margin: 0 0 1.1rem; }
.article ul, .article ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.article li { margin: .3rem 0; }
.article li::marker { color: var(--gold-deep); }
.article a { color: var(--royal); text-decoration: underline; text-underline-offset: 3px; }
.article strong { color: var(--ink-text); }
.article table { width: 100%; border-collapse: collapse; margin: 1.2rem 0 1.6rem; font-size: .94rem; display: block; overflow-x: auto; }
.article th, .article td { padding: .6rem .7rem; border-bottom: 1px solid var(--ink-line); text-align: left; }
.article th { background: var(--paper-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.article blockquote { margin: 1.4rem 0; padding: 1rem 1.3rem; border-left: 3px solid var(--gold); background: var(--paper-2); border-radius: 0 12px 12px 0; }
.fact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 2rem; }
.fact-cards > div { padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--ink-line); }
.fact-cards .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); }
.fact-cards .v { font-family: var(--font-display); font-size: 1.08rem; margin-top: .2rem; line-height: 1.2; }
.sources { font-size: .82rem; color: var(--ink-muted); word-break: break-word; }
.sources a { color: var(--ink-muted); text-decoration: underline; }

/* ---------- compare ---------- */
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid var(--ink-line); }
@media (max-width: 760px) { .compare-table { display: block; overflow-x: auto; } } /* scrolls inside itself wherever it is used without a .table-scroll wrapper */
.compare-table th, .compare-table td { padding: 1rem 1.1rem; border-bottom: 1px solid var(--ink-line); vertical-align: top; text-align: left; }
.compare-table thead th { background: var(--navy-900); color: #fff; font-weight: 500; }
.compare-table tbody th { width: 200px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); font-weight: 600; background: var(--paper); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 22px; }

/* ---------- enquiry dialog ---------- */
dialog.modal {
  width: min(560px, calc(100% - 24px)); border: 0; border-radius: 26px; padding: 0; background: var(--navy-900); color: var(--text);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .7);
}
dialog.modal::backdrop { background: rgba(4, 7, 18, .62); backdrop-filter: blur(6px); }
dialog.modal[open] { animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-head { padding: 26px 28px 8px; position: relative; }
.modal-head h3 { font-size: 1.8rem; }
.modal-body { padding: 10px 28px 28px; }
.modal-close { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-size: 1.3rem; }

/* ---------- flash ---------- */
.flashes { position: fixed; z-index: 80; top: calc(var(--nav-h) + 12px); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(560px, calc(100% - 24px)); }
.flash { padding: .85rem 1.1rem; border-radius: 14px; background: var(--navy-900); color: #fff; box-shadow: var(--shadow); font-size: .92rem; border-left: 3px solid var(--teal); animation: pop .4s var(--ease); }
.flash.error { border-color: var(--rose); }
.flash.warn { border-color: var(--gold); }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--muted); padding: 80px 0 40px; position: relative; overflow: hidden; }
.footer::before { content: ""; position: absolute; left: 50%; top: 0; width: 90%; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(232, 178, 74, .5), transparent); }
.footer .cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 860px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
.footer h4 { color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1rem; font-weight: 600; }
/* plain footer links only: the brand keeps its flex row and the buttons keep their own padding */
.footer a:not(.btn):not(.brand) { display: block; padding: .25rem 0; font-size: .92rem; }
.footer a:not(.btn):hover { color: var(--gold); }
.footer .brand { color: #fff; margin-bottom: 1rem; }
.footer .legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; }
.footer .big { font-family: var(--font-display); font-size: clamp(3rem, 12vw, 10rem); line-height: .9; color: rgba(255, 255, 255, .04); letter-spacing: -.04em; margin-top: 48px; white-space: nowrap; user-select: none; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- misc ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 1rem; }
.stack > * { min-width: 0; } /* a stacked grid must not grow past its container for one long word */
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; } .mt-4 { margin-top: 2.4rem; }
.hr { height: 1px; background: var(--ink-line); border: 0; margin: 2rem 0; }
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; color: #fff; box-shadow: 0 14px 30px -10px rgba(37, 211, 102, .7); transition: transform .3s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; }
svg.icon { display: inline-block; vertical-align: -0.2em; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn .icon, .chip .icon { width: 1.1em; height: 1.1em; }

/* ---------- content shield ---------- */
.shield { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sk { display: block; height: .82em; margin: .5em 0; border-radius: 6px; background: linear-gradient(90deg, rgba(16, 32, 80, .06), rgba(16, 32, 80, .13), rgba(16, 32, 80, .06)); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; }
.sk.short { width: 58%; }
li > .sk, td > .sk { display: inline-block; width: 82%; margin: 0; vertical-align: middle; }
.sk-lines { margin: 0; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.site-toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 20px); max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 14px; background: var(--navy-900, #0B1A3A); color: #fff; font-size: .9rem; line-height: 1.4; box-shadow: 0 18px 40px -16px rgba(5, 12, 35, .6); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.site-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media print { .shield, .sk { display: none !important; } [data-shield]::before { content: "Full profile available from our counsellors."; display: block; font-style: italic; } }

/* ---------- floating "Ask us" (opens the contact form; WhatsApp is for partners only) ---------- */
.msg-float { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 14px; border-radius: 99px; cursor: pointer;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--navy-900); font-family: inherit; font-size: .92rem; font-weight: 600; line-height: 1;
  border: 0; box-shadow: 0 16px 34px -14px rgba(217, 166, 53, .8), 0 2px 0 rgba(255, 255, 255, .35) inset; transition: transform .3s var(--ease), box-shadow .3s; }
.msg-float:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(217, 166, 53, .9), 0 2px 0 rgba(255, 255, 255, .35) inset; }
.msg-float svg { width: 20px; height: 20px; }
@media (max-width: 560px) { .msg-float { right: 14px; bottom: 14px; width: 48px; height: 48px; padding: 0; justify-content: center; } .msg-float span { display: none; } }
.linklike { border: 0; background: none; padding: 0; font: inherit; color: var(--royal); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   One dark stage for the whole public site (layouts/public.html puts .is-dark on every page): the light tokens take
   dark values and the few surfaces that were hard-coded white become quiet glass, so no page flashes from a dark
   header into a cream body.
   ========================================================================== */
body.is-dark {
  --paper: var(--ink); --paper-2: rgba(255, 255, 255, .06);
  --ink-text: #EDF0FA; --ink-muted: #A3ACC8; --ink-line: rgba(255, 255, 255, .1);
}
/* inner-page heroes: the glows are background layers that fade into the page below (no seam where the hero ends), and
   overflow stays visible so search suggestions can drop over the content underneath */
.is-dark .page-hero { overflow: visible; z-index: 3;
  background:
    linear-gradient(180deg, rgba(5, 9, 22, 0) 45%, var(--ink)),
    radial-gradient(62vw 46vw at 90% 0%, rgba(58, 91, 255, .32), transparent 70%),
    radial-gradient(46vw 34vw at 0% 80%, rgba(232, 178, 74, .16), transparent 70%),
    var(--ink); }
.is-dark .page-hero::before, .is-dark .page-hero::after { content: none; }
.is-dark .page-hero .grain { -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); }
.is-dark .panel, .is-dark .prog-row, .is-dark .guide-card, .is-dark .fact-cards > div, .is-dark .pager a, .is-dark .pager span, .is-dark .compare-table {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .025)); border-color: var(--line); color: var(--text); }
.is-dark .prog-row:hover, .is-dark .guide-card:hover { background: rgba(255, 255, 255, .06); border-color: rgba(232, 178, 74, .35); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .8); }
.is-dark .pager .cur { background: var(--gold); color: #1B1405; border-color: var(--gold); }
.is-dark .uni-card { background: linear-gradient(180deg, rgba(20, 30, 70, .7), rgba(10, 16, 40, .85)); border-color: var(--line); color: var(--text); }
.is-dark .uni-card .meta, .is-dark .uni-card .hl { color: var(--muted); }
.is-dark .uni-card .foot { border-color: var(--line); }
.is-dark .uni-card .arrow { background: rgba(255, 255, 255, .08); }
.is-dark .uni-card .glare { background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(247, 216, 146, .14), transparent 40%); }
.is-dark .input, .is-dark .select, .is-dark textarea.input { background-color: rgba(255, 255, 255, .05); border-color: var(--line-2); color: var(--text); }
.is-dark .select option { color: #111; }
.is-dark .field label, .is-dark .flabel { color: var(--muted); }
.is-dark .search.light { background: rgba(255, 255, 255, .06); border-color: var(--line-2); box-shadow: none; }
.is-dark .search-results { background: #0F1840; color: var(--text); border: 1px solid var(--line-2); }
.is-dark .search-results a { border-color: var(--line); }
.is-dark .search-results a:hover, .is-dark .search-results a.focus { background: rgba(255, 255, 255, .06); }
.is-dark .search-results .t { color: var(--gold); }
.is-dark .tabs-nav { background: rgba(7, 12, 31, .86); border-color: var(--line); }
.is-dark .article { color: #CFD6EA; }
.is-dark .article strong { color: #fff; }
.is-dark .article a, .is-dark .linklike { color: #A9BEFF; }
.is-dark .article li::marker { color: var(--gold); }
.is-dark .compare-table thead th { background: rgba(232, 178, 74, .12); color: #fff; }
.is-dark .chip.teal { color: #7FF0DA; }
.is-dark .unverified { color: var(--gold-2); }
.is-dark details.faq summary::after { color: var(--gold); }
.is-dark .sk { background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .12), rgba(255, 255, 255, .05)); background-size: 200% 100%; }
.is-dark .btn-line { background: transparent; color: var(--text); border-color: var(--line-2); }
.is-dark .btn-line:hover { border-color: rgba(255, 255, 255, .4); }
.is-dark .btn-navy { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: none; border: 1px solid var(--line-2); }
.is-dark .btn-navy:hover { background: rgba(255, 255, 255, .14); }
.is-dark .hr { background: var(--line); }
/* a gold-tinted notice panel (promotions, "online only" warnings) */
.note-gold { border-color: rgba(232, 178, 74, .4) !important; background: rgba(232, 178, 74, .08) !important; }
