:root {
  color-scheme: light;
  --ink: #14283e;
  --navy: #13263c;
  --muted: #506072;
  --gold: #efcf97;
  --accent: #795722;
  --canvas: #f8f8f5;
  --line: #d9e0e5;
  --paper: #fff;
  --radius: 12px;
  --display: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.05; }
button, select, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .21em; }
:is(a, button, select, input, summary):focus-visible {
  outline: 3px solid #a36922;
  outline-offset: 3px;
}
.wrap { width: min(1190px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; top: .75rem; left: .75rem; transform: translateY(-200%); z-index: 3; background: white; padding: 10px 14px; }
.skip:focus { transform: none; }
.masthead { color: #fff; background: #102135; border-bottom: 1px solid #ffffff20; }
.masthead-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.wordmark { color: var(--gold); text-decoration: none; font-family: var(--display); font-size: 1.24rem; letter-spacing: .13em; white-space: nowrap; line-height: 1; }
.wordmark span { margin-left: .35em; }
.masthead nav { display: flex; gap: clamp(20px, 3.2vw, 42px); font-size: .9rem; }
.masthead nav a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.masthead nav a:hover { text-decoration: underline; }
.hero {
  background: radial-gradient(ellipse at 86% 32%, #283f55, transparent 56%), linear-gradient(110deg, #13263c, #183047);
  color: white; overflow: hidden; position: relative;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-radial-gradient(ellipse 52% 120% at 92% 215%, transparent 0 17px, #d8c49e21 18px 19px, transparent 20px 34px);
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .70fr); gap: clamp(42px, 8vw, 117px); align-items: center; padding-block: 61px; }
h1 { font-size: clamp(3.1rem, 6vw, 5.2rem); letter-spacing: -.035em; text-wrap: balance; }
.intro p { margin-top: 19px; max-width: 470px; color: #e2e8ee; font-size: clamp(1rem, 1.6vw, 1.15rem); }
.primary {
  display: inline-flex; align-items: center; min-height: 47px; margin-top: 27px;
  background: var(--gold); padding: 8px 19px; color: #1c2a38; border-radius: 6px; font-weight: 730; text-decoration: none;
}
.primary:hover { background: #ffe2ad; }
.snapshot { padding: clamp(18px, 3vw, 30px); border: 1px solid #d6bd8b95; background: #102237d9; border-radius: var(--radius); }
.snapshot-head { color: var(--gold); display: flex; justify-content: space-between; gap: 12px; font-size: .875rem; font-weight: 680; letter-spacing: .09em; }
.snapshot h2 { margin-top: 11px; font-size: clamp(1.7rem, 3.15vw, 2.45rem); }
.snapshot-total { display: flex; align-items: center; gap: 13px; margin-top: 13px; color: #e3eaf0; }
.snapshot-total strong { color: var(--gold); font: 3.55rem/.95 var(--display); font-variant-numeric: lining-nums; }
.snapshot-programs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.snapshot-programs button { color: #fff; min-height: 44px; padding: 5px 11px; text-align: left; background: #ffffff10; border: 1px solid #ffffff37; border-radius: 5px; font-size: .875rem; }
.snapshot-programs button strong { color: var(--gold); margin-right: .25em; }
.snapshot-programs button:hover { background: #ffffff24; }
.snapshot-source { display: inline-block; color: #e1d6c3; margin-top: 15px; font-size: .875rem; }
.archive { padding-block: 43px 61px; scroll-margin-top: 15px; }
.archive-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.archive-heading h2, .guide h2 { font-size: clamp(2.05rem, 4vw, 2.8rem); }
.filters-layout { display: grid; grid-template-columns: minmax(205px, 245px) minmax(0, 1fr); align-items: start; gap: 30px; }
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; }
.filter-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.filter-head h3 { font-size: 1rem; }
.text-button { min-height: 44px; border: 0; background: transparent; padding: 0 3px; color: #76501d; text-decoration: underline; text-underline-offset: .2em; font-weight: 660; font-size: .875rem; }
.filter-fields { display: grid; }
.filter-fields label { font-size: .875rem; font-weight: 650; margin-bottom: 5px; }
.filter-fields :is(select, input) { min-width: 0; width: 100%; min-height: 44px; border: 1px solid #aab8c5; border-radius: 6px; color: var(--ink); background: white; padding: 7px 10px; font-size: 1rem; }
.filter-fields select { appearance: none; padding-right: 28px; background: linear-gradient(45deg, transparent 48%, #465a6d 51%) calc(100% - 15px) center / 5px 5px no-repeat, linear-gradient(135deg, #465a6d 49%, transparent 52%) calc(100% - 10px) center / 5px 5px no-repeat, white; }
.filter-fields :is(select, input):not(:last-child) { margin-bottom: 14px; }
.evidence-types { display: flex; flex-wrap: wrap; gap: 8px; }
.type-filter { min-height: 44px; border: 1px solid #aab8c5; background: #fff; border-radius: 7px; color: var(--ink); padding: 6px 13px; font-size: .875rem; font-weight: 650; text-align: left; }
.type-filter:hover { background: #edf2f7; }
.type-filter[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.enrolment-status { margin-block: 0 14px; color: var(--muted); font-size: .9rem; }
.result-count { margin-block: 12px 14px; font-size: .9rem; color: var(--muted); min-height: 1.5em; }
.country-group + .country-group { margin-top: 29px; }
.country-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: 1.1rem; }
.country-heading::before { content: ''; display: inline-block; width: 3px; height: 17px; border-radius: 1px; background: #a97837; }
.country-heading span { font-size: .875rem; margin-left: 1px; font-weight: 450; color: var(--muted); }
.records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.record { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; align-items: flex-start; box-shadow: 0 2px 6px #13263c07; }
.kind { display: inline-flex; align-items: center; border-radius: 4px; padding: 3px 8px; background: #e8eff8; color: #234a6e; font-size: .875rem; line-height: 1.4; font-weight: 670; }
.kind[data-kind="student"], .kind[data-kind="enrolment"] { background: #e6f1ec; color: #235846; }
.kind[data-kind="document"] { background: #f6ecd9; color: #674915; }
.record h4 { margin-top: 8px; font: 1.27rem/1.25 var(--display); overflow-wrap: anywhere; }
.record-meta { color: var(--muted); font-size: .875rem; margin-top: 5px; }
.record-description { color: #374b5e; font-size: .94rem; margin-block: 8px 9px; }
.record-open { margin-top: auto; min-height: 44px; border: 0; color: #234a6e; background: #eef3f8; padding: 6px 12px; border-radius: 6px; font-size: .875rem; font-weight: 720; }
.record-open:hover { background: #e2ebf5; }
.empty { background: white; border: 1px dashed #aab8c5; border-radius: var(--radius); padding: 20px; }
.empty p { margin-top: 5px; color: var(--muted); }
.guide { background: #edf1f3; border-top: 1px solid var(--line); padding-block: 32px 38px; scroll-margin-top: 10px; }
.guide-grid { display: grid; grid-template-columns: repeat(3,minmax(0, 1fr)); gap: 12px; margin-top: 18px; align-items: start; }
.guide details { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px; }
.guide summary { cursor: pointer; min-height: 44px; padding: 9px 0; font-weight: 650; }
.guide p { margin: 0 0 13px; color: #374b5e; }
footer { background: var(--navy); color: #e1e9ed; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; padding-block: 22px; font-size: .875rem; }
dialog { width: min(578px, calc(100% - 32px)); max-height: 88vh; max-height: 88dvh; padding: 0; border: 1px solid #bdc9d4; border-radius: var(--radius); color: var(--ink); box-shadow: 0 16px 75px #1120344d; }
dialog::backdrop { background: #0e1e30ad; }
.dialog-frame { padding: clamp(18px, 5vw, 28px); }
.dialog-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.dismiss { width: 44px; height: 44px; background: #edf2f6; color: var(--ink); border: 0; border-radius: 6px; font-size: 1.65rem; line-height: 1; }
.dismiss:hover { background: #e0e9f1; }
#detail-title { font-size: clamp(1.65rem, 4.5vw, 2.2rem); }
#detail-description { margin-top: 11px; color: #374b5e; }
#detail-facts { margin-block: 16px; border-top: 1px solid var(--line); }
#detail-facts div { display: grid; grid-template-columns: minmax(92px, .38fr) minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
#detail-facts dt { color: var(--muted); }
#detail-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
#detail-source .primary { margin: 0; }
#detail-source img { display: block; width: auto; max-width: 100%; height: auto; max-height: 340px; border-radius: 7px; margin-bottom: 10px; object-fit: contain; }
#detail-source p { margin-top: 8px; color: var(--muted); font-size: .875rem; }
@media (max-width: 900px) {
  .filters-layout { grid-template-columns: minmax(195px, 220px) minmax(0, 1fr); gap: 18px; }
  .records { grid-template-columns: 1fr; }
  .hero-inner { gap: 33px; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 36px); }
  .masthead-inner { min-height: 61px; flex-wrap: wrap; gap: 0 6px; padding-block: 7px 0; }
  .wordmark { font-size: 1rem; }
  .masthead nav { order: 3; width: 100%; gap: 24px; }
  .masthead nav a { min-height: 44px; }
  .hero-inner { grid-template-columns: 1fr; gap: 25px; padding-block: 31px; }
  .headline-break { display: none; }
  .intro p { margin-top: 12px; }
  .intro .primary { margin-top: 17px; }
  .archive { padding-block: 29px 35px; }
  .archive-heading { padding-bottom: 12px; margin-bottom: 14px; }
  .filters-layout { grid-template-columns: 1fr; gap: 15px; }
  .filters { padding: 12px; }
  .filter-head { margin-bottom: 4px; }
  .filter-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'country-label university-label' 'country university' 'program-label year-label' 'program year' 'search-label search-label' 'search search'; gap: 4px 9px; }
  .filter-fields label { margin-bottom: 0; }
  .filter-fields :is(select,input):not(:last-child) { margin-bottom: 7px; }
  label[for="country"] { grid-area: country-label; }
  #country { grid-area: country; }
  label[for="university"] { grid-area: university-label; }
  #university { grid-area: university; }
  label[for="program"] { grid-area: program-label; }
  #program { grid-area: program; }
  label[for="academic-year"] { grid-area: year-label; }
  #academic-year { grid-area: year; }
  label[for="search"] { grid-area: search-label; }
  #search { grid-area: search; align-self: start; }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .wrap { width: calc(100% - 28px); }
  h1 { font-size: 2.66rem; }
  .type-filter { flex: 1 1 43%; font-size: .875rem; }
}
