/* ============================================================
   StudyAbroad Directory — one design system, applied everywhere
   Academic + trustworthy: serif display headings, clean sans UI,
   deep-blue primary, emerald accent, calm slate neutrals.
   ============================================================ */

/* Self-hosted fonts (latin) — no external requests, reliable offline. */
@font-face { font-family:'Bricolage Grotesque'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/BricolageGrotesque-500.woff2') format('woff2'); }
@font-face { font-family:'Bricolage Grotesque'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/BricolageGrotesque-600.woff2') format('woff2'); }
@font-face { font-family:'Bricolage Grotesque'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/BricolageGrotesque-700.woff2') format('woff2'); }
@font-face { font-family:'Hanken Grotesk'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/HankenGrotesk-400.woff2') format('woff2'); }
@font-face { font-family:'Hanken Grotesk'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/HankenGrotesk-500.woff2') format('woff2'); }
@font-face { font-family:'Hanken Grotesk'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/HankenGrotesk-600.woff2') format('woff2'); }
@font-face { font-family:'Hanken Grotesk'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/HankenGrotesk-700.woff2') format('woff2'); }

:root {
  /* Edmission.ist brand palette: #08244d navy · #3871c1 blue · #ffffff */
  --primary: #08244d;         /* brand navy */
  --primary-600: #0e3468;
  --primary-500: #3871c1;     /* brand blue */
  --on-primary: #ffffff;
  --accent: #3871c1;          /* brand blue — CTAs & highlights */
  --accent-600: #2d5da3;
  --accent-soft: #e7f0fb;
  --gold: #2d5da3;            /* rankings badge (kept on-brand blue) */
  --gold-soft: #e7f0fb;

  --bg: #f6f8fb;
  --surface: #ffffff;
  --fg: #0a1a30;
  --muted-fg: #55677e;
  /* 4.83:1 on #fff and 4.54:1 on the #f6f8fb panel. Was #8090a4 (3.26 / 3.06),
     which failed 1.4.3 on every KPI label on the site. */
  --faint-fg: #667383;
  --border: #e3e8f0;
  --border-strong: #cfd8e6;
  --danger: #c0392b;

  --shadow-sm: 0 1px 2px rgba(8,36,77,.06), 0 1px 3px rgba(8,36,77,.05);
  --shadow-md: 0 4px 16px rgba(8,36,77,.09), 0 2px 6px rgba(8,36,77,.06);
  --shadow-lg: 0 16px 48px rgba(8,36,77,.16);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --maxw: 1200px;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-8: 48px; --space-10: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  color: var(--fg);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 600;
  line-height: 1.2; color: var(--primary); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-weight: 600; }
a { color: var(--primary-500); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }
p { margin: 0 0 1em; }
.tnum { font-variant-numeric: tabular-nums; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-5); }
.section { padding: var(--space-8) 0; }
.muted { color: var(--muted-fg); }
.faint { color: var(--faint-fg); }
.center { text-align: center; }

/* ---------- skip link + focus ---------- */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary);
  color: #fff; padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--primary-500); outline-offset: 2px; border-radius: 4px; }

/* ---------- header / nav ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40; }
.nav { display: flex; align-items: center; gap: var(--space-5);
  height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 700; font-size: 1.3rem; color: var(--primary); }
.brand .mark { width: 38px; height: 38px; flex: none; }
.brand .wordmark { letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }
.brand .wordmark .wm-b { color: var(--accent); }
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.05; }
.brand-caption { font-family: 'Hanken Grotesk', sans-serif; font-size: .55rem; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; color: #fff; margin-top: 3px; line-height: 1.1; white-space: nowrap; display: none; }
.footer-caption { display: block; color: #fff; font-size: .52rem; margin-top: 4px; }
.footer-brand .wordmark { text-transform: uppercase; letter-spacing: .04em; }
.footer-wm .wm-b { color: #7fb0e8; }
.reg { font-size: .42em; vertical-align: super; font-weight: 500; margin-left: 1px;
  font-family: 'Hanken Grotesk', sans-serif; line-height: 0; }
.footer-mark { display: inline-flex; background: #fff; border-radius: 8px; padding: 4px;
  line-height: 0; margin-right: 4px; }
.nav-links { display: flex; gap: var(--space-2); margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted-fg); font-weight: 500; font-size: .95rem;
  padding: 8px 14px; border-radius: var(--radius-sm); }
.nav-links a:hover { color: var(--primary); background: #e7f0fb; }
/* :not(.btn) because the header CTA is an <a class="btn btn-accent"> and the
   nav marks it .active on its own page. This rule then painted the button's
   background light grey while the button's own rule still forced white text:
   white on #e7f0fb is 1.06:1, an invisible CTA on /contact. */
.nav-links a.active:not(.btn) { color: var(--primary); background: #e7f0fb; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 8px; cursor: pointer; margin-left: auto; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600;
  font-size: .95rem; padding: 11px 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: all .18s ease;
  min-height: 44px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--surface); color: var(--primary); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary-500); color: var(--primary); }
.btn-sm { padding: 7px 14px; min-height: 36px; font-size: .875rem; }

/* ---------- badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem;
  font-weight: 600; padding: 4px 10px; border-radius: 999px; line-height: 1.4;
  background: #e7f0fb; color: var(--muted-fg); white-space: nowrap; }
/* accent on accent-soft is 4.25:1; accent-600 on the same tint is 5.69:1. */
.badge-accent { background: var(--accent-soft); color: var(--accent-600); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }
.badge-primary { background: #e3e8f0; color: var(--primary-600); }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--muted-fg); }
.badge-danger { background: #fbe9e7; color: var(--danger); }
/* Commission disclosure. Deliberately a quiet neutral, not a warning colour:
   it is a fact about us, not a problem with the university. 5.8:1 on its own
   tint, so it clears AA at the badge's 12.5px semibold. */
.badge-disclose { background: #f2eee6; color: #6b5a2e; }

/* inline notice / callout */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px;
  border-radius: var(--radius); margin-bottom: var(--space-5); font-size: .93rem; line-height: 1.55; }
.notice .ico { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.notice-warn { background: #fdf6e7; border: 1px solid #f0e0b6; color: #7a5a12; }
.notice-warn .ico { stroke: #b7791f; }
.notice-info { background: var(--accent-soft); border: 1px solid #cfdcec; color: #1f3f6b; }
.notice-info .ico { stroke: var(--accent); }
.notice-info a { color: var(--accent-600); font-weight: 600; text-decoration: underline; }
.v.expired { color: var(--danger); }
.v.expired::after { content: " · closed"; font-family: 'Hanken Grotesk'; font-size: .7rem; font-weight: 500; color: var(--danger); }

/* ---------- hero ---------- */
.hero { background: linear-gradient(155deg, #08244d 0%, #0e3468 48%, #3871c1 128%);
  color: #fff; padding: var(--space-10) 0 var(--space-8); position: relative; overflow: hidden; }
.cta-band, .card.cta-band, .panel.cta-band {
  background: linear-gradient(120deg, #08244d 0%, #2d5da3 100%); color: #fff; border: none; }
.cta-band h2, .cta-band h3 { color: #fff; }
.cta-band p { color: #cfdcec; }
.hero::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(1200px 400px at 80% -10%, rgba(255,255,255,.10), transparent 60%);
  pointer-events: none; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero p.lead { color: #cfdcec; font-size: 1.2rem; max-width: 54ch; margin-bottom: var(--space-6); }
.hero .container { position: relative; z-index: 1; }

/* search box */
.searchbar { display: flex; gap: 8px; background: #fff; padding: 8px;
  border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: 640px; }
.searchbar input { flex: 1; border: none; font-size: 1rem; padding: 10px 14px;
  color: var(--fg); background: transparent; }
.searchbar input:focus { outline: none; }
.search-tags { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search-tags span { color: #b9c9d9; font-size: .85rem; }
.search-tags a { color: #fff; background: rgba(255,255,255,.12); padding: 5px 12px;
  border-radius: 999px; font-size: .85rem; font-weight: 500; }
.search-tags a:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- stat strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4);
  margin-top: var(--space-6); }
.stat { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); padding: 18px 20px; }
.stat .n { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 1.9rem; font-weight: 700; color: #fff; line-height: 1; }
.stat .l { color: #cfd8e6; font-size: .85rem; margin-top: 6px; }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); }

.card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex; flex-direction: column; overflow: hidden; }
a.card:hover, .card.hoverable:hover { transform: translateY(-3px);
  box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card-body { padding: var(--space-5); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 1.15rem; font-weight: 600;
  color: var(--primary); line-height: 1.25; }
.card-sub { color: var(--muted-fg); font-size: .9rem; }
.card-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* country card */
.country-card { align-items: flex-start; }
.country-card .flag { font-size: 2.2rem; line-height: 1; }
.country-card .count { color: var(--muted-fg); font-size: .9rem; }

/* metric list inside cards */
.metrics { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; }
.metric { display: flex; flex-direction: column; }
.metric .k { color: var(--faint-fg); font-size: .74rem; text-transform: uppercase;
  letter-spacing: .04em; font-weight: 600; }
.metric .v { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- layout with sidebar (list pages) ---------- */
.layout { display: grid; grid-template-columns: 264px 1fr; gap: var(--space-6); align-items: start; }
.filters { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-5); position: sticky; top: 82px; }
.filters h3 { font-size: 1.05rem; }
.filter-group { margin-bottom: var(--space-5); }
.filter-group label { display: block; font-size: .8rem; font-weight: 600;
  color: var(--muted-fg); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.field { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit;
  color: var(--fg); background: #fff; }
.field:focus { outline: none; border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(47,96,152,.15); }
select.field { appearance: none; background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6b7d' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.results-head { display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-4); flex-wrap: wrap; }
.results-head .count { color: var(--muted-fg); font-size: .95rem; }

/* ---------- data table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
table.data th { text-align: left; font-size: .76rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted-fg); font-weight: 600;
  padding: 14px 16px; border-bottom: 1px solid var(--border); background: #f6f8fb; }
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums; vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #f6f8fb; }
table.data td.num { text-align: right; }

/* ---------- university/course profile ---------- */
.profile-hero { background: var(--surface); border-bottom: 1px solid var(--border);
  padding: var(--space-6) 0; }
.breadcrumb { font-size: .85rem; color: var(--faint-fg); margin-bottom: var(--space-3); }
.breadcrumb a { color: var(--muted-fg); }
.profile-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: var(--space-3); margin-top: var(--space-5); }
.kpi { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; }
.kpi .k { color: var(--faint-fg); font-size: .76rem; text-transform: uppercase;
  letter-spacing: .04em; font-weight: 600; margin-bottom: 4px; }
.kpi .v { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 1.5rem; font-weight: 600;
  color: var(--primary); font-variant-numeric: tabular-nums; }
.kpi .v.accent { color: var(--accent); }
.kpi .v small { font-size: .8rem; color: var(--muted-fg); font-family: 'Hanken Grotesk'; font-weight: 500; }

.panel { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-6); margin-bottom: var(--space-5); }
.panel h2 { font-size: 1.4rem; margin-bottom: var(--space-4); }
.panel h3 { margin-top: var(--space-5); }
.prose { color: #263646; line-height: 1.75; }
.prose :is(h2,h3,h4) { color: var(--primary); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .9rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose ul { padding-left: 1.2em; }

.two-col { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-6); align-items: start; }
.side-panel { position: sticky; top: 82px; }

/* FAQ */
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 10px; overflow: hidden; background: #fff; }
.faq summary { padding: 14px 18px; font-weight: 600; cursor: pointer; color: var(--primary);
  list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .answer { padding: 14px 18px; color: #33475b; }

/* cost-of-living list */
.col-list { display: grid; grid-template-columns: 1fr auto; gap: 0; }
.col-list .row { display: contents; }
.col-list .row > div { padding: 12px 4px; border-bottom: 1px solid var(--border); }
.col-list .row .amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--primary); }

/* ---------- pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center;
  margin-top: var(--space-6); flex-wrap: wrap; }
.pagination a, .pagination span { padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff; color: var(--muted-fg);
  font-size: .9rem; font-weight: 500; min-width: 42px; text-align: center; }
.pagination a:hover { border-color: var(--primary-500); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ---------- section headings ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: var(--space-5); flex-wrap: wrap; }
.sec-head .eyebrow { color: var(--accent); font-weight: 600; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .08em; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: var(--space-10) var(--space-5); color: var(--muted-fg); }
.empty svg { color: var(--border-strong); margin-bottom: 16px; }

/* ---------- footer ---------- */
.site-footer { background: var(--primary); color: #cfd8e6; margin-top: var(--space-10);
  padding: var(--space-8) 0 var(--space-6); }
.site-footer a { color: #e3e8f0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr; gap: var(--space-6); }
.footer-grid h4, .footer-grid .foot-h { color: #fff; font-family: 'Hanken Grotesk'; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: .92rem; }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--space-6);
  padding-top: var(--space-5); font-size: .88rem; line-height: 1.6; color: #b6c5d5; max-width: 90ch; }
.footer-disclaimer strong { color: #fff; }
.footer-disclaimer a { color: #7fd3bf; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--space-5);
  padding-top: var(--space-4); font-size: .85rem; color: #9fb2c4;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* indicative-figures inline note on detail pages */
.indicative-note { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem;
  color: var(--muted-fg); background: #e7f0fb;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-top: var(--space-4); line-height: 1.5; }
.indicative-note .ico { width: 18px; height: 18px; flex: none; margin-top: 1px; stroke: var(--primary-500); }
/* accent on the note's #e7f0fb panel is 4.34:1; accent-600 is 5.82:1 */
.indicative-note a { font-weight: 600; color: var(--accent-600); }

/* contact page */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-6); align-items: start; }
.contact-methods { display: flex; flex-direction: column; gap: var(--space-4); }
.contact-method { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.contact-method .ico { width: 26px; height: 26px; flex: none; stroke: var(--accent); margin-top: 2px; }
.contact-method .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--faint-fg); font-weight: 600; }
.contact-method .v { font-weight: 600; color: var(--primary); font-size: 1.05rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* partner page step number */
.step-num { width: 38px; height: 38px; border-radius: 999px; display: flex;
  align-items: center; justify-content: center; font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 700; font-size: 1.15rem; color: #fff; background: var(--accent); }
.footer-brand { color: #fff; font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 1.2rem; font-weight: 700;
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

/* ---------- icons ---------- */
.ico { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.15em; stroke: currentColor;
  fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- responsive ---------- */

/* A grid/flex child defaults to min-width:auto, which refuses to shrink below its
   own content. So collapsing .layout and .two-col to a single 1fr column was not
   enough: a wide <table> inside .table-wrap inflated the track to 622px on a 375px
   phone and the whole page scrolled sideways, instead of the table scrolling
   inside its wrapper as intended. min-width:0 lets the track shrink so
   .table-wrap's own overflow-x:auto finally does its job.
   Measured before: /courses 271px, /university/<id> 276px, /rankings 210px of
   horizontal overflow at 375px. */
.layout > *, .two-col > *, .filters, .side-panel, .table-wrap { min-width: 0; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .two-col { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
/* The nav collapses on its own breakpoint, not the grid's. The desktop row needs
   ~985px once the brand caption and every link is laid out; collapsing only at
   760px left it overflowing the viewport between ~761px and ~985px (tablets and
   half-width laptop windows). Re-measure this if links are added to the nav. */
@media (max-width: 1000px) {
  .nav-links { display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 12px; gap: 4px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 760px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Landing page — graphical hero map + scroll flight journey
   ============================================================ */

/* --- hero split with world map --- */
.hero-split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr);
  gap: var(--space-8); align-items: center; }
.hero-copy { max-width: 40ch; }
.hero-map-wrap { position: relative; }
.worldmap { width: 100%; height: auto; display: block; overflow: visible; }
.worldmap .cc { fill: rgba(255,255,255,.09); stroke: rgba(255,255,255,.14); stroke-width: .4; }
.worldmap .cc.dest { fill: rgba(86,150,220,.42); }
.worldmap .cc.origin { fill: var(--accent); stroke: rgba(255,255,255,.5); stroke-width: .6; }
.worldmap .arc { fill: none; stroke: rgba(150,195,245,.6); stroke-width: 1; stroke-dasharray: 4 5;
  animation: arcflow 1.4s linear infinite; }
@keyframes arcflow { to { stroke-dashoffset: -18; } }
.worldmap .arc-dot { fill: #fff; filter: drop-shadow(0 0 3px rgba(150,195,245,.9)); }
.worldmap .pin circle.badge { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.worldmap .pin.star circle.badge { stroke: #fff; }
.worldmap .pin .pulse { fill: none; stroke: rgba(150,195,245,.75); stroke-width: 2; transform-origin: center;
  animation: pinpulse 2.4s ease-out infinite; }
@keyframes pinpulse { 0% { r: 11px; opacity: .8; } 100% { r: 26px; opacity: 0; } }
.worldmap .pin.origin circle.badge { fill: var(--accent); stroke: #fff; }

/* dark hero variant for the map */
.hero.hero-graphical { padding-bottom: var(--space-8); }
.hero .searchbar { max-width: 560px; }

/* --- how it works: numbered journey step cards --- */
.flow { padding: var(--space-10) 0; }
.flow-head { text-align: center; max-width: 52ch; margin: 0 auto var(--space-8); }
.jcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.jcard { position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 28px 26px; overflow: hidden;
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s, border-color .25s; }
.jcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #b9cdea; }
.jcard::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary)); transform: scaleX(0);
  transform-origin: left; transition: transform .3s ease; }
.jcard:hover::after { transform: scaleX(1); }
.jcard > * { position: relative; z-index: 1; }
.jhead { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.jnum { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700; font-size: 3.1rem; line-height: 1;
  /* was var(--accent-soft) = 1.15:1 on white. Large text needs 3:1. */
  color: #7a96b8; letter-spacing: -.02em; }
.jicon { width: 54px; height: 54px; border-radius: 14px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; flex: none; }
.jicon svg { width: 27px; height: 27px; }
.jstep { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px; }
.jcard h3 { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 1.3rem; color: var(--primary); margin: 0 0 10px; }
.jcard p { color: var(--muted-fg); font-size: .94rem; line-height: 1.62; margin: 0; }
.jcard .jlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600;
  font-size: .88rem; color: var(--accent); }
.jcard:hover .jlink { gap: 10px; }
.jcard .jlink::after { content: "→"; transition: inherit; }

@media (max-width: 940px) { .jcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .jcards { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero-map-wrap { order: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .worldmap .arc, .worldmap .pin .pulse { animation: none; }
  .worldmap .arc-plane { display: none; }
}

/* ============================================================
   v6.1 — map pin clarity, flight direction, magic bento board
   ============================================================ */

/* --- map pins v2: legible badges + small satellite dots --- */
.worldmap .pin circle.badge { r: 16px; }
.worldmap .pin image { filter: none; }
.worldmap .pin.origin circle.badge { r: 19px; fill: #fff; stroke: var(--accent); stroke-width: 2.5; }
.worldmap .pin.sm circle.badge { r: 4px; fill: #fff; stroke: rgba(150,195,245,.9); stroke-width: 1.5; }
.worldmap .pin .pulse { animation-duration: 3s; }
@keyframes pinpulse { 0% { r: 18px; opacity: .7; } 100% { r: 36px; opacity: 0; } }
.worldmap .pin.sm .pulse { display: none; }
.worldmap .origin-label { font: 700 11px 'Hanken Grotesk', sans-serif; fill: #fff; letter-spacing: .06em; }
.worldmap .origin-label-bg { fill: rgba(8,36,77,.72); rx: 9px; }
.worldmap .arc-plane { fill: #fff; filter: drop-shadow(0 0 3px rgba(150,195,245,.9)); }

/* --- magic bento board --- */
.bento-sec { padding: var(--space-10) 0; }
.bento-head { max-width: 52ch; margin-bottom: var(--space-6); }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(min(160px, 100%), auto); gap: 16px; }
.tile { position: relative; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); padding: 26px; overflow: hidden; display: flex;
  flex-direction: column; color: inherit;
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease, border-color .25s ease; }
a.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #b9cdea; color: inherit; }
.tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(56,113,193,.14), transparent 65%);
  transition: opacity .3s ease; pointer-events: none; }
.tile:hover::before { opacity: 1; }
.tile-title { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 600; font-size: 1.25rem;
  color: var(--primary); line-height: 1.2; margin: 0 0 6px; }
.tile-sub { color: var(--muted-fg); font-size: .92rem; margin: 0; }
.tile-link { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: .9rem; color: var(--accent-600);
  display: inline-flex; align-items: center; gap: 6px; }
a.tile:hover .tile-link { gap: 10px; }
.tile-link::after { content: "→"; transition: inherit; }

.t-hero { grid-column: span 4; grid-row: span 2;
  background: linear-gradient(150deg, #08244d 0%, #16406e 55%, #2d5da3 130%); border: none; color: #fff; }
.t-hero .tile-title { margin-top: 6px; }
.t-hero::before { background: radial-gradient(320px circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.10), transparent 65%); }
.t-hero .tile-title { color: #fff; font-size: 1.7rem; max-width: 18ch; }
.t-hero .tile-sub { color: #cfd8e6; max-width: 44ch; }
.t-hero .tile-link { color: #fff; }
.mock-search { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px; padding: 11px 16px; color: #e3e8f0; font-size: .95rem; display: flex;
  align-items: center; gap: 10px; max-width: 420px; margin-bottom: 14px; }
.mock-search .ico { stroke: #9fc0e8; }
.mock-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.mock-chips span { background: rgba(255,255,255,.13); border-radius: 999px; padding: 4px 12px;
  font-size: .78rem; font-weight: 600; color: #e7f0fb; }

.t-tall { grid-column: span 2; grid-row: span 2; }
.rank-list { list-style: none; margin: 6px 0 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--border); font-size: .92rem; }
.rank-list li:last-child { border-bottom: none; }
.rank-list .rk { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700; color: var(--accent);
  font-size: 1rem; min-width: 34px; font-variant-numeric: tabular-nums; }
.rank-list .nm { color: var(--fg); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.t-sm { grid-column: span 2; }
.t-wide { grid-column: span 3; flex-direction: row; align-items: center; gap: 22px; }
.t-wide .tile-body { display: flex; flex-direction: column; height: 100%; }
.big-n { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700; font-size: 2.1rem; color: var(--primary);
  line-height: 1; font-variant-numeric: tabular-nums; }
.flag-row { display: flex; flex-wrap: wrap; gap: 6px; font-size: 1.35rem; line-height: 1.3; margin-top: 4px; }
.col-bars { display: grid; gap: 8px; margin-top: 10px; }
.col-bars .row { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: center; font-size: .8rem; }
.col-bars .bar { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--primary)); }
.col-bars .amt { color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.t-cta { background: var(--accent-soft); border-color: #cfdcec; }
.avatar-ring { width: 52px; height: 52px; border-radius: 50%; flex: none; background: #fff;
  border: 2px solid var(--accent); display: grid; place-items: center; color: var(--accent); }
.avatar-ring svg { width: 26px; height: 26px; }

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .t-hero { grid-column: span 2; grid-row: auto; min-height: 240px; }
  .t-tall { grid-column: span 2; grid-row: auto; }
  .t-sm { grid-column: span 1; }
  .t-wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .t-sm { grid-column: span 2; }
  .t-wide { flex-direction: column; align-items: flex-start; }
}

/* real flag images (emoji flags don't render on Windows) — em-sized to scale in context */
.flag-ic { width: 1.34em; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px;
  vertical-align: -.18em; box-shadow: 0 0 0 1px rgba(8,36,77,.08); display: inline-block; }
.flag-row .flag-ic { width: 1.5em; margin: 1px; }
.country-card .flag .flag-ic, .profile-title .flag-ic { width: 1em; }

/* ============================================================
   Tools, Partners/Services, Refer & Earn, Blog
   ============================================================ */

/* calculators */
.calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.calc { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; }
.calc h3 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; margin: 0 0 4px; }
.calc .ci { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; flex: none; }
.calc .ci svg { width: 22px; height: 22px; }
.calc .csub { color: var(--muted-fg); font-size: .9rem; margin: 0 0 18px; }
.calc .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.calc label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted-fg); margin-bottom: 6px; }
.calc .field { width: 100%; }
.calc .result { margin-top: 16px; background: linear-gradient(120deg, #08244d, #2d5da3); color: #fff;
  border-radius: 12px; padding: 16px 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.calc .result .rlabel { font-size: .82rem; color: #cfd8e6; }
.calc .result .rval { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700; font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.calc .rnote { font-size: .78rem; color: var(--faint-fg); margin: 10px 0 0; }

/* service / partner categories */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.svc { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px;
  transition: transform .22s cubic-bezier(.22,1,.36,1), box-shadow .22s, border-color .22s; display: flex; flex-direction: column; }
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #b9cdea; }
.svc .si { width: 48px; height: 48px; border-radius: 13px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 14px; }
.svc .si svg { width: 25px; height: 25px; }
.svc h3 { font-size: 1.15rem; margin: 0 0 8px; }
.svc p { color: var(--muted-fg); font-size: .9rem; margin: 0 0 14px; line-height: 1.55; }
.svc .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.svc .tags span { font-size: .72rem; font-weight: 600; color: var(--primary-600); background: #e7f0fb;
  border-radius: 6px; padding: 3px 8px; }
.svc .svc-cta { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); font-size: .84rem; color: var(--muted-fg); }
.svc .svc-cta a { font-weight: 600; }

/* steps (refer / how it works) */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step3 { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; position: relative; }
.step3 .num { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff;
  font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700; display: grid; place-items: center; margin-bottom: 14px; }
.step3 h3 { font-size: 1.1rem; margin: 0 0 6px; }
.step3 p { color: var(--muted-fg); font-size: .9rem; margin: 0; }
.reward-band { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: var(--space-5); }
.reward { background: linear-gradient(150deg, #08244d, #2d5da3); color: #fff; border-radius: 16px; padding: 28px; }
.reward .amt { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700; font-size: 2.4rem; line-height: 1; }
/* on the accent-blue panel; #cfd8e6 measured 3.37:1, this is 4.50:1 */
.reward .who { color: #f6f8fb; margin-top: 6px; }

/* blog */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .22s cubic-bezier(.22,1,.36,1), box-shadow .22s, border-color .22s; }
a.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #b9cdea; color: inherit; }
.post-card .pc-top { height: 8px; background: linear-gradient(90deg, var(--accent), var(--primary)); }
.post-card .pc-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .pc-meta { font-size: .76rem; color: var(--faint-fg); display: flex; gap: 10px; align-items: center; }
.post-card .pc-title { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 1.25rem; color: var(--primary); line-height: 1.25; }
.post-card .pc-ex { color: var(--muted-fg); font-size: .92rem; flex: 1; }
.post-card .pc-more { font-weight: 600; color: var(--accent); font-size: .88rem; }
.article { max-width: 720px; margin: 0 auto; }
.article .prose { font-size: 1.05rem; line-height: 1.75; color: #26374a; }
.article .prose h3 { margin: 1.6em 0 .5em; font-size: 1.35rem; }
.article .prose ul, .article .prose ol { padding-left: 1.3em; }
.article .prose li { margin: .4em 0; }

@media (max-width: 820px) {
  .calc-grid, .reward-band { grid-template-columns: 1fr; }
  .steps3 { grid-template-columns: 1fr; }
}

/* nav dropdown ("More") */
.nav-more { position: relative; }
.nav-more-btn { background: none; border: none; font: inherit; color: var(--muted-fg); font-weight: 500;
  font-size: .95rem; padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; }
.nav-more-btn:hover, .nav-more.open .nav-more-btn { color: var(--primary); background: #e7f0fb; }
.nav-dropdown { position: absolute; top: calc(100% + 6px); right: 0; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); padding: 8px;
  min-width: 210px; display: none; flex-direction: column; z-index: 50; }
.nav-more:hover .nav-dropdown, .nav-more:focus-within .nav-dropdown, .nav-more.open .nav-dropdown { display: flex; }
.nav-dropdown a { padding: 9px 12px !important; border-radius: 8px; white-space: nowrap; }
@media (max-width: 760px) {
  .nav-more { width: 100%; }
  .nav-more-btn { width: 100%; justify-content: space-between; }
  .nav-dropdown { position: static; display: flex; box-shadow: none; border: none; padding: 2px 0 2px 12px; min-width: 0; }
}

/* journey cards: equal height, link pinned to bottom for a clean baseline */
.jcard { display: flex; flex-direction: column; }
.jcard p { flex: 1; }
.jcard .jlink { margin-top: 16px; }

/* ============================================================ modals & popups
   Shared by the download-gate (lead capture + OTP) and the newsletter popup. */
.ovl { position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(8,36,77,.55); backdrop-filter: blur(3px); }
.ovl.open { display: flex; animation: ovl-in .18s ease; }
@keyframes ovl-in { from { opacity: 0; } to { opacity: 1; } }
.modal { position: relative; width: 100%; max-width: 460px; background: var(--surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
  animation: modal-in .22s cubic-bezier(.2,.8,.25,1); }
.modal.wide { max-width: 520px; }
@keyframes modal-in { from { transform: translateY(14px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; } }
.modal-head { padding: 26px 26px 0; }
.modal-head .eyebrow { color: var(--accent); font-weight: 700; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; }
.modal-head h2 { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; margin: 8px 0 6px; font-size: 1.4rem; line-height: 1.2; }
.modal-head p { color: var(--muted-fg); margin: 0; font-size: .95rem; }
.modal-body { padding: 18px 26px 26px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  border: none; background: #e7f0fb; color: var(--muted-fg); border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.modal-x:hover { background: #e3e8f0; color: var(--fg); }
.mfield { margin-bottom: 13px; }
.mfield label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 5px; }
.mrow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .mrow2 { grid-template-columns: 1fr; } }
.chan-pills { display: flex; gap: 8px; margin-bottom: 13px; }
.chan-pills label { flex: 1; text-align: center; padding: 9px 6px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--muted-fg); }
.chan-pills input { position: absolute; opacity: 0; pointer-events: none; }
.chan-pills input:checked + span { color: var(--accent); }
.chan-pills label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.otp-input { letter-spacing: .5em; text-align: center; font-size: 1.4rem; font-weight: 700; }
.modal .btn.block { width: 100%; justify-content: center; }
.modal-note { font-size: .78rem; color: var(--muted-fg); margin: 12px 0 0; text-align: center; }
.mfield label .req { color: var(--accent); font-weight: 700; margin-left: 1px; }
.modal-err { display: none; background: #fbe9e7; color: var(--danger); font-size: .85rem;
  padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.modal-err.show { display: block; }
.dev-hint { display: none; background: #fdf6e7; color: #8a6d1a; border: 1px dashed #e6c66b;
  font-size: .8rem; padding: 8px 11px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.dev-hint.show { display: block; }
.modal-ok { text-align: center; padding: 8px 0 6px; }
.modal-ok .tick { width: 58px; height: 58px; border-radius: 50%; background: #e7f6ec; color: #1e8e4b;
  display: grid; place-items: center; margin: 0 auto 14px; }
.modal-back { background: none; border: none; color: var(--muted-fg); font-size: .85rem;
  cursor: pointer; padding: 0; margin-top: 12px; }
.modal-back:hover { color: var(--fg); }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* floating consultation button — present on every page */
.fab-consult { position: fixed; right: 20px; bottom: 20px; z-index: 900;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px;
  background: var(--accent); color: #fff; border: none; border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: .92rem; cursor: pointer;
  box-shadow: 0 8px 24px rgba(56,113,193,.4); transition: transform .18s ease, box-shadow .18s ease; }
.fab-consult:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(56,113,193,.5); }
.fab-consult svg { flex: none; }
@media (max-width: 520px) { .fab-consult span { display: none; } .fab-consult { padding: 14px; } }

/* ============================================================
   PREMIUM ELEVATION LAYER (2026-07) — global depth, type, motion.
   Appended last so it refines the base system via the cascade.
   On-brand: navy #08244d / blue #3871c1 / Bricolage Grotesque + Hanken Grotesk.
   ============================================================ */
:root {
  /* layered, brand-tinted shadows — softer + more dimensional */
  --shadow-sm: 0 1px 2px rgba(8,36,77,.05), 0 2px 6px rgba(8,36,77,.05);
  --shadow-md: 0 6px 14px -4px rgba(8,36,77,.10), 0 12px 28px -8px rgba(8,36,77,.12);
  --shadow-lg: 0 18px 40px -12px rgba(8,36,77,.22), 0 8px 16px -8px rgba(8,36,77,.14);
  --shadow-accent: 0 8px 22px -6px rgba(56,113,193,.45);
  /* one expressive easing, used everywhere for a consistent feel */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  /* semantic z-index scale */
  --z-sticky: 40; --z-fab: 900; --z-backdrop: 1000; --z-modal: 1001; --z-skip: 1100;
}

/* ---- typography polish: even line-breaks, calmer tracking, readable prose ---- */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
h1 { font-size: clamp(2.15rem, 3.2vw + 1rem, 3.6rem); letter-spacing: -.02em; }
h2 { letter-spacing: -.015em; }
.lead { text-wrap: pretty; }

/* ---- hero: atmospheric navy field with soft drifting light ---- */
.hero {
  background:
    radial-gradient(1100px 560px at 12% -15%, rgba(56,113,193,.42), transparent 56%),
    radial-gradient(900px 520px at 108% 8%, rgba(45,93,163,.38), transparent 52%),
    linear-gradient(158deg, #0a1a30 0%, #08244d 52%, #0e3468 100%);
}
/* two blurred brand orbs give the hero real depth (decorative; content unaffected) */
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 0; filter: blur(36px); }
.hero::before { width: 460px; height: 460px; top: -150px; right: -60px;
  background: radial-gradient(circle, rgba(74,140,224,.55), transparent 66%);
  opacity: .75; animation: heroDrift 16s var(--ease-out) infinite alternate; }
.hero::after { inset: auto auto -180px -100px; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(45,93,163,.5), transparent 68%);
  opacity: .6; animation: heroDrift2 20s var(--ease-out) infinite alternate; }
@keyframes heroDrift  { to { transform: translate(-46px, 40px) scale(1.12); } }
@keyframes heroDrift2 { to { transform: translate(60px, -34px) scale(1.1); } }
.hero > .container { position: relative; z-index: 1; }
.hero h1 { letter-spacing: -.025em; }

/* ---- inner-page hero: navy banner, consistent with the main hero across every page ---- */
.profile-hero { position: relative; overflow: hidden; border-bottom: none; color: #e7f0fb;
  background:
    radial-gradient(760px 320px at 12% -40%, rgba(56,113,193,.42), transparent 60%),
    radial-gradient(680px 320px at 104% -10%, rgba(45,93,163,.34), transparent 55%),
    linear-gradient(158deg, #0a1a30 0%, #08244d 60%, #0e3468 100%); }
.profile-hero::after { content: ""; position: absolute; top: -150px; right: -70px;
  width: 420px; height: 420px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(74,140,224,.45), transparent 66%); filter: blur(34px); }
.profile-hero .container { position: relative; z-index: 1; }
/* light-theme content inside the navy banner */
.profile-hero h1 { color: #fff; }
.profile-hero .breadcrumb { color: #9fb6d3; }
.profile-hero .breadcrumb a { color: #cfd8e6; }
.profile-hero .breadcrumb a:hover { color: #fff; }
.profile-hero .muted { color: #c1d1e4; }
.profile-hero .muted a { color: #fff; text-decoration: underline; }
.profile-hero .kpi { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.16); }
.profile-hero .kpi .k { color: #a9bdd6; }
.profile-hero .kpi .v { color: #fff; }
.profile-hero .kpi .v.accent { color: #9cc0ec; }
.profile-hero .kpi .v small { color: #b9c9dc; }
.profile-hero .badge-outline { border-color: rgba(255,255,255,.32); color: #e3e8f0; }
.profile-hero .badge-primary { background: rgba(255,255,255,.16); color: #e7f0fb; }
.profile-hero .profile-title a { color: #cfdcec; }

/* ---- buttons: subtle vertical gradient, brand-colored shadow, springy press ---- */
.btn { transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out),
  background-color .2s var(--ease-out), border-color .2s var(--ease-out); }
.btn-primary { background: linear-gradient(180deg, #0e3468, #08244d); box-shadow: 0 4px 12px -4px rgba(8,36,77,.4); }
.btn-primary:hover { background: linear-gradient(180deg, #1a4a86, #0e3468); transform: translateY(-2px); box-shadow: 0 10px 24px -6px rgba(8,36,77,.5); }
.btn-accent { background: linear-gradient(180deg, #3871c1, #2d5da3); box-shadow: var(--shadow-accent); }
.btn-accent:hover { background: linear-gradient(180deg, #5290da, #2d5da3); transform: translateY(-2px); box-shadow: 0 12px 28px -6px rgba(56,113,193,.55); }
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

/* ---- cards: cleaner rest shadow, confident ease-out lift ---- */
.card, .svc, .post-card, .step3 { transition: transform .28s var(--ease-out),
  box-shadow .28s var(--ease-out), border-color .28s var(--ease-out); }
a.card:hover, .card.hoverable:hover, .svc:hover, a.post-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-lg); }
/* feature-service cards: a quiet gradient crown that warms on hover (not a stripe) */
.svc { position: relative; }
.svc::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  border-radius: 16px 16px 0 0; background: linear-gradient(90deg, var(--accent), var(--primary));
  opacity: 0; transition: opacity .28s var(--ease-out); }
.svc:hover::before { opacity: 1; }

/* ---- section heads: a short brand rule adds structure without an eyebrow ---- */
.sec-head > div > h2 { position: relative; padding-bottom: 12px; }
.sec-head > div > h2::after { content: ""; position: absolute; left: 0; bottom: 0;
  width: 46px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary-600)); }

/* ---- stat strip: refined glass tiles with a top highlight + hover ---- */
.stat { background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
  backdrop-filter: blur(6px); transition: transform .24s var(--ease-out), background .24s var(--ease-out);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.stat:hover { transform: translateY(-3px); background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.1)); }

/* ---- search box: premium focus ring ---- */
.searchbar { transition: box-shadow .25s var(--ease-out); }
.searchbar:focus-within { box-shadow: 0 0 0 4px rgba(56,113,193,.28), var(--shadow-lg); }

/* ---- sticky header gains a subtle shadow once scrolled (class from site.js) ---- */
.site-header { transition: box-shadow .25s var(--ease-out), background .25s var(--ease-out); }
.site-header.scrolled { box-shadow: 0 4px 20px -8px rgba(8,36,77,.18); }
/* animated underline for active/hover nav items */
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px;
  height: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out); }
.nav-links a.active::after, .nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-links a.btn::after { display: none; }

/* ---- in-content links: animated underline for a crafted feel ---- */
.prose a, .article a { background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .25s var(--ease-out); padding-bottom: 1px; }
.prose a:hover, .article a:hover { background-size: 100% 1.5px; }

/* ---- respect reduced-motion: kill drift + transforms, keep instant states ---- */
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after { animation: none; }
  .btn, .card, .svc, .post-card, .step3, .stat, .nav-links a::after,
  .prose a, .article a, .searchbar { transition: none; }
  *:hover { transform: none !important; }
}

/* ---- admin dashboard ---- */
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.admin-tab { padding: 12px 18px; font-weight: 600; font-size: .95rem; color: var(--muted-fg);
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tab span { display: inline-block; margin-left: 4px; font-size: .78rem; background: #e7f0fb;
  color: var(--muted-fg); padding: 1px 8px; border-radius: 999px; }
.admin-tab:hover { color: var(--primary); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--accent); }
.admin-tab.active span { background: var(--accent-soft); color: var(--accent); }
.admin-tab-out { margin-left: auto; color: var(--faint-fg); }
.stat-grid-admin { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 16px; margin-bottom: 32px; }
.admin-metric { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.admin-metric .n { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 2.1rem; font-weight: 700;
  color: var(--primary); line-height: 1; }
.admin-metric .l { color: var(--muted-fg); font-size: .88rem; margin-top: 8px; }
.admin-sec { margin-bottom: 36px; }
.admin-sec-head { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 14px; }
.admin-empty { color: var(--muted-fg); background: var(--bg); border: 1px dashed var(--border-strong);
  border-radius: var(--radius); padding: 20px; text-align: center; }
table.data td code, .admin-sec code { font-size: .85em; background: #e7f0fb; padding: 1px 5px; border-radius: 4px; }

/* ---- resources: featured guide + categories ---- */
.guide-featured { display: flex; align-items: center; gap: 22px; padding: 26px 28px;
  border-radius: var(--radius-lg); margin-bottom: 32px; box-shadow: var(--shadow-md);
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out); }
.guide-featured:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: #fff; }
.guide-featured .gf-icon { width: 60px; height: 60px; flex: none; border-radius: 15px;
  background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
@media (max-width: 640px) { .guide-featured { flex-direction: column; align-items: flex-start; text-align: left; } }
.guide-cat { margin-bottom: 34px; }
.guide-cat:last-child { margin-bottom: 0; }
.guide-cat-head { margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.guide-cat-head h3 { font-size: 1.15rem; }

/* ---- about: differentiators ---- */
.diff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-top: 6px; }
.diff { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.diff h3 { font-size: 1.02rem; margin: 0 0 6px; }
.diff p { color: var(--muted-fg); font-size: .9rem; margin: 0; line-height: 1.55; }

/* ---- premium 'Select' nav item (gold) ---- */
.nav-links a.nav-select { display: inline-flex; align-items: center; gap: 6px; color: #9a7b30;
  background: linear-gradient(180deg, rgba(203,164,106,.18), rgba(203,164,106,.10));
  border: 1px solid rgba(203,164,106,.5); font-weight: 700; }
.nav-links a.nav-select svg { color: #c8a45c; }
.nav-links a.nav-select:hover { color: #7c6220; background: rgba(203,164,106,.22); }
.nav-links a.nav-select.active { color: #7c6220; background: rgba(203,164,106,.24); }
.nav-links a.nav-select::after { display: none; }

/* form label used on auth + dashboard forms */
.auth-l { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 5px; }

/* legal pages */
.legal-nav { display: flex; gap: 6px; margin-bottom: 26px; border-bottom: 1px solid var(--border); }
.legal-nav a { padding: 9px 15px; font-weight: 600; font-size: .9rem; color: var(--muted-fg);
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.legal-nav a:hover { color: var(--primary); }
.legal-nav a.active { color: var(--primary); border-bottom-color: var(--accent); }
.legal-body h2 { font-size: 1.15rem; margin: 30px 0 8px; }
.legal-body ul { padding-left: 20px; margin: 0 0 1em; }
.legal-body li { margin-bottom: 7px; }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a { color: inherit; opacity: .85; }
.footer-legal a:hover { opacity: 1; color: #fff; }

/* Footer social icons */
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  color: #cfd8e6; background: rgba(255,255,255,.08); transition: background .15s, color .15s; }
.footer-social a:hover { background: var(--sel-gold, #c69749); color: #08244d; }

/* ---------- account gate (deep detail is account-only) ----------
   The peek bars are decorative placeholders; gated content is withheld
   server-side, so it is never present in the DOM to be un-blurred. */
.gate { position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--accent-soft) 0, var(--surface) 58%);
  padding: var(--space-5) var(--space-5) var(--space-6); }
.gate-peek { display: flex; flex-direction: column; align-items: center; gap: 9px;
  margin-bottom: var(--space-5); filter: blur(4px); opacity: .55;
  -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent);
  mask-image: linear-gradient(180deg, #000 10%, transparent); }
.gate-peek span { display: block; height: 11px; border-radius: 999px;
  background: var(--border-strong); }
.gate-lock { display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; background: var(--accent); color: var(--on-primary);
  margin-bottom: var(--space-3); box-shadow: var(--shadow-accent); }
.gate h3 { margin: 0 0 6px; font-size: 1.15rem; }
.gate p { margin: 0 auto; max-width: 42ch; color: var(--muted-fg); font-size: .94rem; }
.gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin: var(--space-5) 0 var(--space-3); }
.gate .gate-note { font-size: .8rem; color: var(--muted-fg); }

/* compact variant for the narrow sidebar */
.gate-sm { padding: var(--space-4) var(--space-4) var(--space-5); }
.gate-sm h3 { font-size: 1.02rem; }
.gate-sm p { font-size: .88rem; }
.gate-sm .gate-actions { flex-direction: column; margin: var(--space-4) 0 var(--space-2); }
.gate-sm .gate-actions .btn { width: 100%; justify-content: center; }

/* ---------- "why we ask for an account" explainer (signup) ---------- */
.why-account { margin-top: var(--space-6); }
.why-account h2 { font-size: 1.12rem; margin: 0 0 var(--space-4); text-align: center; }
.why-account dl { margin: 0; display: grid; gap: var(--space-4); }
.why-account dt { font-weight: 650; color: var(--fg); margin-bottom: 3px; }
.why-account dd { margin: 0; color: var(--muted-fg); font-size: .9rem; line-height: 1.65; }
.why-account > dl > div { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-4) var(--space-5); }

/* Former inline conditional: gap above every FAQ category heading but the first. */
.sec-head-gap { margin-top: 34px; }

/* Build credit — quiet, sits under the legal row. */
.footer-credit { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.10);
  text-align: center; font-size: .82rem; color: rgba(255,255,255,.62); }
.footer-credit a { color: rgba(255,255,255,.88); text-decoration: underline;
  text-underline-offset: 2px; }
.footer-credit a:hover { color: #fff; }

/* ---------- register-interest page (while online payment is off) ---------- */
.int-wrap { max-width: 620px; }
.int-body { padding: 32px; gap: 16px; }
.int-h1 { margin: 0 0 6px; font-size: 1.6rem; }
.int-lead { margin: 0; max-width: 58ch; }
.int-flash { width: 100%; justify-content: flex-start; }
.int-form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.int-grid { gap: 13px; }
.int-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.int-alt { margin: 4px 0 0; font-size: .9rem; }
.int-done { padding: 40px 32px; text-align: center; gap: 14px; align-items: center; }
.int-tick { display: inline-grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50%; background: var(--accent); color: var(--on-primary);
  box-shadow: var(--shadow-accent); }
.int-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }

/* Fee honesty note — fees move, and a blank figure is deliberate. */
.fee-note { margin: 14px 0 0; font-size: .85rem; line-height: 1.6; color: var(--muted-fg);
  background: var(--accent-soft); border-radius: var(--radius-sm);
  padding: 10px 14px; max-width: 78ch; }
.fee-note strong { color: var(--fg); }

/* Asterisk tying a published figure to that page's figures note. */
.fig-ast { color: var(--accent); text-decoration: none; font-weight: 700;
  font-size: .62em; vertical-align: super; line-height: 0; margin-left: 1px;
  padding: 0 2px; border-radius: 3px; }
.fig-ast:hover, .fig-ast:focus-visible { background: var(--accent-soft); text-decoration: none; }
.fee-note:target { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Tool-card headings are h2 for a correct outline (they are peers of the page h1),
   but must keep the h3 size they were designed at - the global h2 rule is nearly
   twice as large. Colour is inherited from the h1-h4 rule and is correct here,
   unlike the footer, which needed an explicit override. */
.tool-h { font-size: 1.3rem; }

/* ---------- phone overflow guards ----------------------------------------
   extract_inline_styles.py emits .s-xxxx rules at TRIPLE specificity so they can
   replace an inline style="" attribute. That beats every single-class responsive
   rule in this file, so three generated grids stayed multi-column on a phone and
   pushed the page sideways. Overriding them needs the same specificity.
   Measured at 375px before this: /select 86px, /campus-ambassadors 192px. */
@media (max-width: 760px) {
  html .s-301379f.s-301379f.s-301379f,     /* Select pricing tiers (3 col) */
  html .s-155a493.s-155a493.s-155a493,     /* Select feature grid  (3 col) */
  html .s-355b188.s-355b188.s-355b188 {    /* ambassador perks     (4 col) */
    grid-template-columns: 1fr;
  }
}
@media (min-width: 761px) and (max-width: 1000px) {
  html .s-301379f.s-301379f.s-301379f,
  html .s-155a493.s-155a493.s-155a493,
  html .s-355b188.s-355b188.s-355b188 { grid-template-columns: repeat(2, 1fr); }
}

/* Cards whose own padding plus content exceeded a narrow screen. The min-width:0
   is the same grid-child rule as above: .loan-card sat at 360px inside a 312px
   .loan-grid track because a grid item will not shrink below its content. */
.loan-grid > *, .loan-card > *, .loan-specs > * { min-width: 0; }
@media (max-width: 480px) {
  .loan-card, .step3 { padding: 18px; }
  /* The rate sits beside the lender name in a nowrap flex row; below ~380px
     the two no longer fit and the rate pushed 5px past the viewport. */
  .loan-head, .loan-foot { flex-wrap: wrap; }
  .loan-rate { text-align: left; }
}
