.nav-links { flex-wrap: nowrap; }
.nav-links > a,
.nav-cta { flex: 0 0 auto; white-space: nowrap; }
.nav-links > a,
.nav-tools-parent-link,
.nav-tools-toggle {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}
@media (min-width: 1081px) {
  .nav-links > a,
  .nav-tools-parent-link,
  .nav-tools-toggle {
    font-size: 14px !important;
    font-weight: 800 !important;
  }
}
.nav-tools {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}
.nav-tools-parent-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
}
.nav-tools-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  color: var(--nav-link, var(--ink));
  background: transparent;
  white-space: nowrap;
}
.nav-tools-toggle span { color: var(--gold-strong, var(--gold-dark)); font-size: 12px; transition: transform .2s; }
.nav-tools-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.nav-current > .nav-tools-toggle { color: #f4d66d !important; }
.nav-current > .nav-tools-parent-link { color: #f4d66d !important; }
.nav-tools-caret { min-width: 23px; justify-content: center; padding-left: 5px; }
.nav-tools-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 15px);
  left: 50%;
  width: min(560px, calc(100vw - 36px));
  padding: 23px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white, var(--surface));
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 9px);
  transition: opacity .18s, transform .18s;
}
.nav-tools-menu::before { content: ""; position: absolute; right: 0; bottom: 100%; left: 0; height: 16px; }
.nav-tools:hover .nav-tools-menu,
.nav-tools:focus-within .nav-tools-menu,
.nav-tools.is-open .nav-tools-menu { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.nav-tools-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.nav-study .nav-tools-menu { width: min(430px, calc(100vw - 36px)); }
.nav-immigration .nav-tools-menu { width: min(620px, calc(100vw - 36px)); }
.nav-languages .nav-tools-menu { width: min(580px, calc(100vw - 36px)); }
.nav-more .nav-tools-menu { right: 0; left: auto; width: 290px; transform: translateY(9px); }
.nav-more:hover .nav-tools-menu,
.nav-more:focus-within .nav-tools-menu,
.nav-more.is-open .nav-tools-menu { transform: translateY(0); }
.nav-tools-group > span { display: block; margin-bottom: 9px; color: var(--gold-strong, var(--gold-dark)); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.nav-tools-menu a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}
.nav-tools-menu a strong,
.nav-tools-menu a small { display: block; }
.nav-tools-menu a strong { color: var(--ink); font-size: 14px; }
.nav-tools-menu a small { margin-top: 3px; color: var(--ink-soft); font-size: 12px; font-weight: 600; line-height: 1.45; white-space: normal; }
.nav-links .nav-tools-group a { color: var(--ink); }
.nav-links .nav-tools-menu a::after { display: none; }
.nav-links .nav-tools-group a:hover,
.nav-links .nav-tools-group a:focus-visible { color: var(--gold-strong, var(--gold-dark)); }
.nav-tools-menu .nav-tools-all { margin-top: 17px; padding: 12px 14px; border: 0; color: var(--navy); background: var(--gold); text-align: center; font-weight: 800; }

@media (max-width: 1450px) and (min-width: 1081px) {
  .nav { gap: 10px !important; }
  .brand img { width: auto !important; height: 80px !important; max-width: 256px !important; max-height: none !important; }
  .nav-links { gap: 11px !important; }
  .nav-links > a, .nav-tools-parent-link, .nav-tools-toggle { font-size: 14px !important; }
  .theme-toggle { width: 44px !important; min-width: 44px !important; padding: 0 !important; }
  .theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-cta { padding-inline: 14px !important; font-size: 13px !important; }
}

@media (max-width: 1080px) {
  .nav-links.open .nav-tools { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); }
  .nav-links.open .nav-tools-toggle { width: 100%; min-height: 52px; justify-content: space-between; padding: 0 14px; color: var(--ink); font-size: 15px; text-align: left; }
  .nav-links.open .nav-tools-parent-link { min-height: 52px; align-items: center; padding: 0 14px; border-bottom: 0; color: var(--ink); font-size: 15px; }
  .nav-links.open .nav-tools-caret { width: 52px; min-width: 52px; justify-content: center; padding: 0; }
  .nav-links.open .nav-tools-menu {
    position: static;
    grid-column: 1 / -1;
    width: auto;
    max-height: 0;
    overflow: hidden;
    padding: 0 14px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition: max-height .25s, padding .25s;
  }
  .nav-links.open .nav-tools.is-open .nav-tools-menu { max-height: 680px; padding: 7px 14px 17px; }
  .nav-links.open .nav-tools-columns { grid-template-columns: 1fr; gap: 18px; }
  .nav-links.open .nav-more .nav-tools-menu { width: auto; }
  .nav-links.open .nav-tools-menu a { padding: 10px 0; font-size: 14px; }
}

@media (max-width: 700px) {
  .nav-tools-menu { width: auto; }
}

.immigration-ai-popup {
  position: fixed;
  z-index: 180;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(460px, calc(100vw - 48px));
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 17px;
  padding: 25px 25px 21px;
  overflow: hidden;
  border: 1px solid rgba(222, 178, 76, .55);
  border-radius: 18px;
  color: #f7f3e9;
  background: #0b1728;
  box-shadow: 0 24px 70px rgba(0, 9, 24, .38);
  opacity: 0;
  transform: translateY(22px) scale(.98);
  transition: opacity .28s ease, transform .28s ease;
  isolation: isolate;
}
.immigration-ai-popup[hidden] { display: none; }
.immigration-ai-popup::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 170px;
  height: 170px;
  top: -100px;
  left: -80px;
  border: 1px solid rgba(222, 178, 76, .25);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(222, 178, 76, .035), 0 0 0 56px rgba(222, 178, 76, .025);
}
.immigration-ai-popup.is-visible { opacity: 1; transform: none; }
.immigration-ai-popup.is-leaving { opacity: 0; transform: translateY(15px) scale(.98); }
.immigration-ai-popup-close {
  position: absolute;
  top: 11px;
  right: 11px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .06);
  font-size: 24px;
  line-height: 1;
}
.immigration-ai-popup-close:hover,
.immigration-ai-popup-close:focus-visible { border-color: #dfb34d; background: rgba(223, 179, 77, .12); }
.immigration-ai-popup-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-top: 3px;
  place-items: center;
  border-radius: 17px;
  color: #0b1728;
  background: linear-gradient(145deg, #f5d675, #c8942f);
  box-shadow: 0 12px 30px rgba(213, 166, 62, .22);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.03em;
}
.immigration-ai-popup-content { min-width: 0; padding-right: 18px; }
.immigration-ai-popup-label {
  margin: 0 0 7px;
  color: #e4bb59;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.immigration-ai-popup h2 {
  margin: 0;
  color: #fff;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -.015em;
}
.immigration-ai-popup-content > p:not(.immigration-ai-popup-label) {
  margin: 12px 0 17px;
  color: #c5cfda;
  font-size: 14px;
  line-height: 1.65;
}
.immigration-ai-popup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.immigration-ai-popup-start {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 17px;
  border-radius: 6px;
  color: #102038;
  background: #e4b94f;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.immigration-ai-popup-start:hover,
.immigration-ai-popup-start:focus-visible { background: #f0cb69; transform: translateY(-1px); }
.immigration-ai-popup-later {
  min-height: 42px;
  padding: 0;
  border: 0;
  color: #d4dce5;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.immigration-ai-popup small {
  display: block;
  margin-top: 15px;
  color: #8fa0b2;
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .immigration-ai-popup {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 13px;
    padding: 20px 17px 17px;
    border-radius: 15px;
  }
  .immigration-ai-popup-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 14px; }
  .immigration-ai-popup-content { padding-right: 13px; }
  .immigration-ai-popup h2 { font-size: 23px; }
  .immigration-ai-popup-content > p:not(.immigration-ai-popup-label) { margin: 9px 0 14px; font-size: 13px; }
  .immigration-ai-popup-start { width: 100%; }
  .immigration-ai-popup-actions { align-items: stretch; }
  .immigration-ai-popup-later { min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .immigration-ai-popup,
  .immigration-ai-popup-start { transition: none; }
}

/* Persistent public assistant access, independent of welcome-message storage. */
.highbrow-chat-launcher {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 179;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 58px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid #f5d675;
  border-radius: 999px;
  color: #0b1728;
  background: linear-gradient(145deg, #f5d675, #d8a63f);
  box-shadow: 0 6px 24px rgba(0, 9, 24, .25);
  font: 800 14px/1.2 Manrope, sans-serif;
  text-decoration: none;
  touch-action: manipulation;
}
.highbrow-chat-launcher:hover { color: #0b1728; background: #f5d675; }
.highbrow-chat-launcher:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px #0b1728; }
.highbrow-chat-launcher svg { flex: 0 0 auto; }
.immigration-ai-popup { bottom: calc(96px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 120px); overflow-y: auto; }
@media (max-width: 620px) {
  .highbrow-chat-launcher { right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); width: 56px; min-width: 56px; min-height: 56px; padding: 0; }
  .highbrow-chat-label { display: none; }
  .immigration-ai-popup { bottom: calc(80px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 104px); }
}
@media print { .highbrow-chat-launcher, .immigration-ai-popup { display: none !important; } }

.highbrow-chat-launcher { cursor: pointer; }
.highbrow-chat-panel {
  position: fixed; z-index: 181;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(96px + env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 120px - env(safe-area-inset-bottom)));
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #d8a63f; border-radius: 18px;
  background: #0b1728; box-shadow: 0 16px 60px #0005;
}
.highbrow-chat-panel[hidden] { display: none; }
.highbrow-chat-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 8px 18px; color: #f5d675; font: 700 14px/1.3 Manrope, sans-serif; }
.highbrow-chat-panel-head button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 28px; cursor: pointer; }
.highbrow-chat-panel-head button:focus-visible { outline: 2px solid #f5d675; }
.highbrow-chat-panel iframe { display: block; flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; }
html.highbrow-chat-embedded, .highbrow-chat-embedded body.ai-page { height: 100%; overflow: hidden; }
.highbrow-chat-embedded .announcement, .highbrow-chat-embedded .site-header, .highbrow-chat-embedded .ai-rail, .highbrow-chat-embedded .ai-context { display: none; }
.highbrow-chat-embedded .ai-stage { height: 100dvh; min-height: 0; padding: 0; overflow: hidden; }
.highbrow-chat-embedded .ai-workspace { display: block; height: 100%; min-height: 0; width: 100%; border: 0; border-radius: 0; }
.highbrow-chat-embedded .ai-conversation { height: 100%; min-height: 0; }
.highbrow-chat-embedded .ai-chat { flex: 1; height: auto; min-height: 0; padding: 18px 14px; }
.highbrow-chat-embedded .ai-conversation-head { min-height: 58px; padding: 10px 12px; }
.highbrow-chat-embedded .ai-welcome h1 { font-size: 29px; }
.highbrow-chat-embedded .ai-orb-wrap { display: none; }
@media (max-width: 620px) {
  .highbrow-chat-panel { right: 8px; width: calc(100vw - 16px); bottom: calc(80px + env(safe-area-inset-bottom)); height: calc(100dvh - 96px - env(safe-area-inset-bottom)); border-radius: 14px; }
}
@media print { .highbrow-chat-panel { display: none !important; } }

.highbrow-chat-panel-head strong { margin-right: auto; }
.highbrow-chat-panel-head .highbrow-chat-expand { width: auto; padding: 0 12px; border: 1px solid #f5d67566; border-radius: 8px; font: 700 12px/1.2 Manrope, sans-serif; }
.highbrow-chat-panel.is-expanded {
  top: max(16px, env(safe-area-inset-top));
  bottom: auto;
  width: min(1000px, calc(100vw - 48px));
  height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
@media (max-width: 620px) {
  .highbrow-chat-panel.is-expanded {
    top: env(safe-area-inset-top); right: 0; width: 100%;
    height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 0;
  }
}

/* Immigration mega menu: countries left, programs right */
.nav-tools-menu.nav-mega { width: min(900px, calc(100vw - 36px)); padding: 0; overflow: visible; border-radius: 14px; }
.nav-tools-menu.nav-mega::before { height: 30px; }
.nav-mega-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 340px; }
.nav-mega-side { display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; border-right: 1px solid var(--line); border-radius: 14px 0 0 14px; background: color-mix(in srgb, var(--gold, #d1a45e) 6%, transparent); }
.nav-mega-eyebrow { display: block; margin: 0 10px 10px; color: var(--gold-strong, var(--gold-dark)); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.nav-links .nav-mega a.nav-mega-tab { display: grid; grid-template-columns: 22px minmax(0, 1fr) 26px; align-items: center; column-gap: 10px; min-height: 42px; padding: 0 10px; border: 0; border-radius: 10px; color: var(--ink); font-size: 14px; }
.nav-mega-flag { font-size: 18px; line-height: 1; text-align: center; }
.nav-mega-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nav-links .nav-mega a.nav-mega-tab small { display: grid; text-align: center; justify-self: end; place-items: center; width: 26px; height: 22px; margin: 0 !important; border-radius: 999px; background: color-mix(in srgb, var(--ink, #10203a) 8%, transparent); color: var(--ink-soft); font-size: 11px; font-weight: 800; line-height: 1; }
.nav-links .nav-mega a.nav-mega-tab:hover { background: color-mix(in srgb, var(--ink, #10203a) 5%, transparent); }
.nav-links .nav-mega a.nav-mega-tab[aria-selected="true"] { background: var(--navy, #10203a); color: #fff; }
.nav-links .nav-mega a.nav-mega-tab[aria-selected="true"] small { background: var(--gold, #d1a45e); color: #111; }
.nav-links .nav-mega a.nav-mega-all { margin-top: auto; padding: 10px 10px 0; border: 0; color: var(--gold-strong, var(--gold-dark)); font-size: 13px; }
.nav-mega-body { min-width: 0; padding: 22px 24px 18px; }
.nav-mega-panel { display: flex; flex-direction: column; height: 100%; }
.nav-mega-panel[hidden] { display: none; }
.nav-mega-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.nav-mega-head h3 { margin: 0 0 4px; color: var(--ink); font-size: 19px; line-height: 1.25; }
.nav-mega-head p { margin: 0; color: var(--ink-soft); font-size: 13px; font-weight: 600; line-height: 1.5; }
.nav-mega-programs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.nav-links .nav-mega .nav-mega-programs a { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); transition: border-color .15s, background .15s; }
.nav-links .nav-mega .nav-mega-programs a:hover { border-color: var(--gold, #d1a45e); background: color-mix(in srgb, var(--gold, #d1a45e) 6%, transparent); }
.nav-mega-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--gold, #d1a45e) 14%, transparent); color: var(--gold-strong, var(--gold-dark, #8a6a2f)); }
.nav-mega-icon svg { width: 20px; height: 20px; }
.nav-mega-programs strong { font-size: 14px; line-height: 1.3; }
.nav-mega-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.nav-mega-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.nav-mega-next > span { margin-right: 4px; color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-links .nav-mega .nav-mega-next a { padding: 7px 11px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--ink, #10203a) 6%, transparent); color: var(--ink); font-size: 12.5px; white-space: nowrap; }
.nav-links .nav-mega .nav-mega-next a.nav-mega-call { background: var(--gold, #d1a45e); color: #111; }
.nav-links .nav-mega a.nav-mega-cta { flex: none; padding: 8px 14px; border: 1px solid var(--navy, #10203a); border-radius: 999px; background: var(--navy, #10203a); color: #fff; font-size: 12.5px; font-weight: 750; white-space: nowrap; }
.nav-links .nav-mega a.nav-mega-cta:hover { background: transparent; color: var(--navy, #10203a); }
@media (max-width: 1080px) {
  .nav-links.open .nav-tools-menu.nav-mega { padding: 0 14px; border-radius: 0; }
  .nav-links.open .nav-tools.is-open .nav-tools-menu.nav-mega { padding: 7px 14px 17px; }
  .nav-mega-layout { display: block; min-height: 0; }
  .nav-mega-side { padding: 0; border: 0; border-radius: 0; background: none; }
  .nav-mega-eyebrow, .nav-mega-body { display: none; }
  .nav-links .nav-mega a.nav-mega-tab { min-height: 46px; padding: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links .nav-mega a.nav-mega-tab[aria-selected="true"] { background: none; color: var(--ink); }
  .nav-links .nav-mega a.nav-mega-tab[aria-selected="true"] small { background: color-mix(in srgb, var(--ink, #10203a) 8%, transparent); color: var(--ink-soft); }
  .nav-links .nav-mega a.nav-mega-all { margin-top: 12px; padding: 12px 14px; background: var(--gold); color: var(--navy); text-align: center; }
}
/* Mega menu: room for long program names */
.nav-tools-menu.nav-mega { width: min(960px, calc(100vw - 32px)); }
.nav-links .nav-mega .nav-mega-programs a { align-items: start; min-height: 64px; }
.nav-links .nav-mega .nav-mega-programs strong,
.nav-links .nav-mega .nav-mega-programs small { display: block; white-space: normal; overflow-wrap: anywhere; }
.nav-links .nav-mega .nav-mega-programs small { margin-top: 3px; }
.nav-links .nav-mega .nav-mega-head h3, .nav-links .nav-mega .nav-mega-head p { white-space: normal; }

.nav-mega-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.nav-links .nav-mega .nav-mega-actions a.nav-mega-call { padding: 8px 14px; border-radius: 999px; background: var(--gold, #d1a45e); color: #111; font-size: 12.5px; font-weight: 750; white-space: nowrap; }
/* Mega menu footer: "Plan next" as a small heading, pills on one row, actions aligned to the pills */
.nav-mega-foot { align-items: flex-end; }
.nav-mega-next { row-gap: 6px; }
.nav-mega-next > span { flex-basis: 100%; margin: 0; }
/* All country panels share one height so the footer sits in the same place */
.nav-mega-body { display: grid; }
.nav-mega-panel { grid-area: 1 / 1; }
.nav-mega-panel[hidden] { display: flex; visibility: hidden; pointer-events: none; }

/* One line everywhere: country summary, program name and program description */
.nav-links .nav-mega .nav-mega-head p,
.nav-links .nav-mega .nav-mega-programs strong,
.nav-links .nav-mega .nav-mega-programs small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.nav-links .nav-mega .nav-mega-programs a { align-items: center; min-height: 0; }
.nav-links .nav-mega .nav-mega-programs a > span { min-width: 0; }
/* Only one dropdown at a time, and the hover bridge never covers the nav row */
.nav-tools-menu.nav-mega::before { height: 22px; }
@media (min-width: 1081px) {
  .nav-links:has(.nav-tools:hover) .nav-tools:not(:hover) .nav-tools-menu { opacity: 0; pointer-events: none; }
}

/* All mega menus open from the same anchor so they line up */
@media (min-width: 1081px) {
  .nav-links { position: relative; }
  .nav-links .nav-tools:has(> .nav-mega) { position: static; }
  .nav-tools-menu.nav-mega { left: 50%; top: calc(100% + 14px); }
  .nav-mega-layout { min-height: 420px; }
}
/* Bridge exactly fills the 14px gap under the nav row */
.nav-tools-menu.nav-mega::before { height: 14px; }
/* Phone/tablet: mega menus are a simple list, never the detail panels */
@media (max-width: 1080px) {
  .nav-mega-body, .nav-mega-eyebrow { display: none !important; }
}

/* Dropdown arrows: drawn chevron instead of the text glyph, so it sits centred on every device */
.nav-tools-toggle span { display: inline-grid; place-items: center; width: 16px; height: 16px; font-size: 0 !important; line-height: 0; color: var(--gold-strong, var(--gold-dark)); }
.nav-tools-toggle span::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; border-radius: 1px; transform: translateY(-2px) rotate(45deg); }
@media (max-width: 1080px) {
  .nav-links.open .nav-tools-caret { border-left: 1px solid var(--line); }
  .nav-links.open .nav-tools-toggle span { width: 32px; height: 32px; border-radius: 50%; background: rgba(209, 164, 94, .14); }
  .nav-links.open .nav-tools-toggle span::before { width: 7px; height: 7px; }
  .nav-links.open .nav-tools-toggle[aria-expanded="true"] span { background: rgba(209, 164, 94, .26); }
}

/* Menu button: drawn lines instead of the text glyph, round to match the theme button */
.menu-toggle { position: relative; padding: 0 !important; border-radius: 50% !important; font-size: 0 !important; line-height: 0; transition: background .2s, border-color .2s; }
.menu-toggle::before,
.menu-toggle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px; border-radius: 2px; background: currentColor; transition: transform .2s, box-shadow .2s; }
.menu-toggle::before { box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
.menu-toggle::after { opacity: 0; }
.menu-toggle[aria-expanded="true"] { border-color: rgba(209, 164, 94, .7); }
.menu-toggle[aria-expanded="true"]::before { box-shadow: none; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"]::after { opacity: 1; transform: rotate(-45deg); }
/* Open mobile menu: plain links use the same ink colour as the dropdown rows (homepage set them to near white) */
@media (max-width: 1080px) {
  .nav-links.open > a:not([aria-current]):not(.nav-cta) { color: var(--ink) !important; }
}
@media (max-width: 1080px) {
  .nav-links.open > a[aria-current], .nav-links.open .nav-current > .nav-tools-parent-link, .nav-links.open .nav-current > .nav-tools-toggle:not(.nav-tools-caret) { color: var(--gold-strong, var(--gold-dark, #9c741f)) !important; }
}
/* Arrow alignment: flex keeps the hidden glyph from pushing the chevron off centre; every arrow sits in the same right column */
.nav-tools-toggle span { display: inline-flex !important; align-items: center; justify-content: center; }
@media (max-width: 1080px) {
  .nav-links.open .nav-tools-caret { border-left: 0 !important; }
  .nav-links.open .nav-tools-toggle:not(.nav-tools-caret) { padding-right: 10px !important; }
}

/* Theme switch: a round floating button in the bottom left corner (moved out of the header) */
.theme-toggle.theme-float { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 9985; display: grid; place-items: center; width: 46px !important; min-width: 46px !important; height: 46px; min-height: 46px; margin: 0 !important; padding: 0 !important; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; background: rgba(10, 14, 24, .88); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); backdrop-filter: blur(8px); cursor: pointer; }
.theme-toggle.theme-float:hover { border-color: #c79b3b; }
.theme-float .theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 900px) { .theme-toggle.theme-float { bottom: calc(84px + env(safe-area-inset-bottom)); } }
@media (max-width: 1080px) { .site-header .brand { margin-right: auto; } }
/* Header call to action removed: the phone button and the on page Book an assessment buttons do this job.
   Kept in the markup (hidden) because call-bar.js places the header phone button next to it. */
.site-header .nav-cta { display: none !important; }

/* Main nav: Poppins, even spacing, one baseline for links and dropdown items */
.site-header .nav-links > a, .site-header .nav-tools-toggle, .site-header .nav-tools-parent-link, .site-header .nav-tools-menu a { font-family: "Poppins", "Manrope", sans-serif; letter-spacing: 0; }
@media (min-width: 1081px) {
  .site-header .nav-links { gap: 2px; align-items: center; }
  .site-header .nav-links > .nav-tools { display: inline-flex; align-items: center; height: 42px; }
  .site-header .nav-links > a, .site-header .nav-links > .nav-tools > .nav-tools-parent-link, .site-header .nav-links > .nav-tools > .nav-tools-toggle:not(.nav-tools-caret) { display: inline-flex; align-items: center; height: 42px; padding: 0 8px; font-size: 14.5px; font-weight: 500 !important; line-height: 1; }
  .site-header .nav-links > .nav-tools > .nav-tools-parent-link { padding-right: 2px; }
  .site-header .nav-links > .nav-tools > .nav-tools-caret { display: inline-flex; align-items: center; height: 42px; padding: 0 6px 0 1px; }
}
.site-header .nav-tools-menu a strong { font-weight: 600; }

/* Mega menus open from the centre of the header row, so they never run off the right edge on 1366px screens */
@media (min-width: 1081px) {
  .site-header .nav { position: relative; }
  .site-header .nav-links { position: static; }
  .site-header .nav-tools-menu.nav-mega { top: calc(50% + 35px); }
}

/* Mega menus line up with the right edge of the header row, so every top link (Study, Immigration, Languages) sits above its own menu on every page */
@media (min-width: 1081px) {
  .site-header .nav-tools-menu.nav-mega { left: auto; right: 0; transform: translateY(9px); }
  .site-header .nav-tools:hover .nav-tools-menu.nav-mega,
  .site-header .nav-tools:focus-within .nav-tools-menu.nav-mega,
  .site-header .nav-tools.is-open .nav-tools-menu.nav-mega { transform: translateY(0); }
}
