/* International High School of Canada: site styles */

@font-face {
  font-family: "Source Serif";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(../fonts/source-serif-4-latin-opsz-normal.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Source Serif";
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url(../fonts/source-serif-4-latin-opsz-italic.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(../fonts/instrument-sans-latin-wght-normal.woff2) format("woff2-variations");
}

:root {
  --navy: #0A2142;
  --navy-deep: #061631;
  --navy-line: rgba(204, 168, 101, 0.28);
  --maple: #AE0212;
  --maple-deep: #9C0811;
  --gold: #CCA865;
  --gold-text: #A68545;
  --cream: #F2E7D3;
  --ivory: #F9F6F1;
  --slate: #526270;
  --mist: #F0F4F7;
  --pale: #DDE5EC;
  --white: #FFFFFF;
  --rule: #E3DCCF;

  --serif: "Source Serif", "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.375rem;
  --step-2: clamp(1.6rem, 1.3rem + 1.1vw, 2.1rem);
  --step-3: clamp(2rem, 1.5rem + 2vw, 3rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.6rem);
  --step-5: clamp(3rem, 1.8rem + 5.4vw, 6.6rem);

  --gutter: clamp(1rem, 0.4rem + 2.8vw, 3rem);
  --max: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.64, 0, 0.78, 0);
  --hdr-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--maple);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-navy :focus-visible, .on-navy:focus-visible { outline-color: var(--gold); }

.skip {
  position: fixed; left: 1rem; top: 1rem; z-index: 200;
  background: var(--white); color: var(--navy);
  padding: 0.6rem 1rem; border-radius: 6px;
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease);
}
.skip:focus { transform: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); font-weight: 560; letter-spacing: -0.022em; line-height: 1.0; }
h2 { font-size: var(--step-4); font-weight: 560; letter-spacing: -0.02em; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1em; text-wrap: pretty; }
[data-lines] .line, [data-sh] .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
[data-lines] .line > span, [data-sh] .line > span { display: block; }

.lede {
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.5;
  font-weight: 400;
  max-width: 38ch;
}
.muted { color: var(--slate); }
.on-navy .muted { color: var(--pale); }

/* Section rhythm */
.sec { position: relative; padding: clamp(5rem, 3rem + 7vw, 10rem) 0; }
.sec--tight { padding: clamp(3.5rem, 2rem + 5vw, 6rem) 0; }
.sec--ivory { background: var(--ivory); }
.sec--navy { background: var(--navy); color: var(--white); }
.sec--deep { background: var(--navy-deep); color: var(--white); }

.sec-head { display: grid; gap: 1.4rem; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); max-width: 54rem; }
.sec-head p { max-width: 46ch; color: var(--slate); font-size: 1.125rem; margin: 0; }
.on-navy .sec-head p, .sec--navy .sec-head p, .sec--deep .sec-head p { color: var(--pale); }

/* Gold hairline with a maple diamond, from the flyer's section titles */
.ornament { display: flex; align-items: center; gap: 0.75rem; width: 7.5rem; color: var(--gold); }
.ornament::before, .ornament::after { content: ""; height: 1px; flex: 1; background: currentColor; }
.ornament i { width: 7px; height: 7px; background: var(--maple); transform: rotate(45deg); flex: none; }
.on-navy .ornament i, .sec--navy .ornament i, .sec--deep .ornament i { background: var(--gold); }

/* Buttons */
.btn {
  --bg: var(--maple); --fg: var(--white);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 0.7rem;
  min-height: 52px; padding: 0 1.6rem;
  border: 0; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-weight: 600; font-size: 1rem; letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer;
  transition: color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--navy);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn .btn-arrow { width: 18px; height: 18px; transition: transform 0.45s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn--ghost { --bg: transparent; --fg: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn--ghost::before { background: var(--navy); }
.btn--ghost:hover, .btn--ghost:focus-visible { --fg: var(--white); }

.on-navy .btn::before, .sec--navy .btn::before, .sec--deep .btn::before, .band .btn::before { background: var(--gold); }
.on-navy .btn:hover, .sec--navy .btn:hover, .sec--deep .btn:hover, .band .btn:hover { color: var(--navy); }
.on-navy .btn--ghost, .sec--navy .btn--ghost, .sec--deep .btn--ghost { --fg: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.55); }
.band .btn { --bg: var(--white); --fg: var(--maple-deep); }

.link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.5s var(--ease);
}
.link:hover, .link:focus-visible { background-size: 100% 1.5px; }

/* ---------- Header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 90;
  height: var(--hdr-h);
  color: var(--white);
  transition: color 0.4s var(--ease), transform 0.5s var(--ease);
}
.hdr::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--rule);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.hdr.is-scrolled::before { opacity: 1; background: rgba(6, 22, 49, 0.8); box-shadow: 0 1px 0 rgba(204, 168, 101, 0.18); }
.hdr.is-solid { color: var(--navy); }
.hdr.is-solid::before { opacity: 1; background: rgba(255, 255, 255, 0.86); box-shadow: 0 1px 0 var(--rule); }
.hdr.is-hidden { transform: translateY(-100%); }
.hdr-in {
  position: relative; height: 100%;
  display: flex; align-items: center; gap: 2rem;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; margin-right: auto; }
.brand svg { width: 54px; height: auto; flex: none; }
.brand-word {
  display: grid; font-family: var(--serif); font-weight: 650;
  font-variant-caps: small-caps; font-feature-settings: "smcp", "c2sc" 0;
  letter-spacing: 0.03em; line-height: 1.05; font-size: 1.02rem;
}
.brand-word span:last-child { font-size: 0.9em; opacity: 0.88; }
.hdr { --mk-lower: #FFFFFF; }
.hdr.is-solid { --mk-lower: var(--navy); }

.nav { display: flex; gap: 0.25rem; }
.nav a {
  position: relative; padding: 0.5rem 0.9rem; text-decoration: none;
  font-weight: 550; font-size: 0.98rem; border-radius: 999px;
  transition: background-color 0.3s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.3rem; height: 1.5px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.hdr.is-solid .nav a::after { background: var(--maple); }
.hdr .btn { min-height: 44px; padding: 0 1.25rem; font-size: 0.95rem; }

.menu-btn {
  display: none; position: relative; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid currentColor; background: transparent; cursor: pointer;
}
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; transition: transform 0.45s var(--ease), top 0.45s var(--ease); }
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 26px; }
.menu-open .menu-btn span:first-child { top: 22px; transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { top: 22px; transform: rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 85;
  background: var(--navy-deep); color: var(--white);
  padding: calc(var(--hdr-h) + 2rem) var(--gutter) 2rem;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease);
  visibility: hidden;
}
.menu-open .drawer { clip-path: inset(0 0 0 0); visibility: visible; }
.menu-open .hdr { color: var(--white); --mk-lower: #fff; }
.menu-open .hdr::before { opacity: 0; }
.drawer nav { display: grid; gap: 0.2rem; }
.drawer nav a {
  font-family: var(--serif); font-size: clamp(2.4rem, 9vw, 3.4rem); font-weight: 550;
  text-decoration: none; line-height: 1.15; overflow: hidden; display: block;
}
.drawer nav a span { display: inline-block; transform: translateY(105%); transition: transform 0.8s var(--ease); }
.menu-open .drawer nav a span { transform: none; }
.drawer nav a:nth-child(2) span { transition-delay: 0.05s; }
.drawer nav a:nth-child(3) span { transition-delay: 0.1s; }
.drawer nav a:nth-child(4) span { transition-delay: 0.15s; }
.drawer nav a:nth-child(5) span { transition-delay: 0.2s; }
.drawer-foot { color: var(--pale); font-size: 0.95rem; }

/* ---------- Curtain (page transitions) ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 150;
  background: var(--navy-deep);
  display: grid; place-items: center;
  pointer-events: none;
  visibility: hidden;
}
html.js .curtain { visibility: visible; }
html.js.is-ready .curtain { visibility: hidden; }
html.js.is-leaving .curtain { visibility: visible; pointer-events: all; }
.curtain-mark { width: min(220px, 42vw); --mk-lower: #fff; }
.curtain-word {
  margin-top: 1.4rem; text-align: center; color: var(--white);
  font-family: var(--serif); font-variant-caps: small-caps; font-weight: 650;
  letter-spacing: 0.06em; font-size: 1.15rem; line-height: 1.3;
}
.curtain-word small { display: block; font-variant-caps: normal; font-weight: 500; letter-spacing: 0; color: var(--gold); font-size: 0.95rem; font-style: italic; margin-top: 0.3rem; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 140; pointer-events: none;
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  mix-blend-mode: normal;
  opacity: 0; transition: opacity 0.3s, width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease), background-color 0.4s var(--ease), border-color 0.4s;
}
.cursor.is-on { opacity: 1; }
.cursor.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(204, 168, 101, 0.16); }
.cursor.is-drag { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: rgba(174, 2, 18, 0.88); border-color: transparent; }
.cursor-label {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--white); font-size: 0.8rem; font-weight: 600; opacity: 0; transition: opacity 0.3s;
}
.cursor.is-drag .cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; min-height: 100svh;
  background:
    radial-gradient(90% 70% at 78% 40%, rgba(32, 66, 118, 0.55), transparent 62%),
    radial-gradient(60% 50% at 10% 100%, rgba(174, 2, 18, 0.16), transparent 70%),
    var(--navy-deep);
  color: var(--white);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.hero-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero-in {
  position: relative; z-index: 2; flex: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 2rem;
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: calc(var(--hdr-h) + 1.5rem) var(--gutter) 1rem;
}
.hero-copy { position: relative; z-index: 3; }
.hero h1 { font-size: clamp(2.7rem, 1.4rem + 3.9vw, 5.3rem); max-width: 12ch; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero h1 .line > span { display: block; }
.hero .lede { color: var(--pale); margin: 1.6rem 0 2.2rem; max-width: 36ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.globe-wrap {
  position: relative; aspect-ratio: 1; width: 124%; margin: -4% -22% -8% -2%;
  touch-action: pan-y; cursor: grab;
}
.globe-wrap:active { cursor: grabbing; }
.globe-wrap canvas { width: 100%; height: 100%; }
.globe-hint {
  position: absolute; right: 22%; bottom: 8%; color: var(--pale);
  font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; opacity: 0.8;
}
.globe-hint svg { width: 30px; }

.clocks {
  position: relative; z-index: 2;
  border-top: 1px solid var(--navy-line);
}
.clocks-in {
  max-width: var(--max); margin: 0 auto; padding: 1.1rem var(--gutter) 1.3rem;
  display: grid; grid-template-columns: auto repeat(5, minmax(0, 1fr)); gap: 1.5rem; align-items: end;
}
.clocks-title { font-size: 0.9rem; color: var(--pale); max-width: 14ch; line-height: 1.35; }
.clock { display: grid; gap: 0.1rem; }
.clock-city { font-size: 0.85rem; color: var(--pale); display: flex; gap: 0.4rem; align-items: center; }
.clock-time { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.01em; }
.clock-time small { font-size: 0.6em; margin-left: 0.25rem; color: var(--gold); font-family: var(--sans); font-weight: 600; }
.clock--home .clock-city::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--maple); box-shadow: 0 0 0 4px rgba(174,2,18,0.25); }
.clock-you { color: var(--navy); background: var(--gold); border-radius: 999px; padding: 0 0.45rem; font-size: 0.72rem; font-weight: 700; line-height: 1.5; }

/* ---------- Scroll-lit statement ---------- */
.statement { font-family: var(--serif); font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.4rem); font-weight: 450; line-height: 1.22; letter-spacing: -0.012em; max-width: 26ch; }
.statement .w { color: rgba(10, 33, 66, 0.16); transition: color 0.2s linear; }
.statement .w.is-lit { color: var(--navy); }
.statement .w.mark.is-lit { color: var(--maple); }
.statement-foot { margin-top: 3rem; display: flex; gap: 3rem; flex-wrap: wrap; }
.statement-fact { display: grid; gap: 0.2rem; max-width: 18rem; }
.statement-fact b { font-family: var(--serif); font-size: 2.6rem; font-weight: 600; color: var(--maple); line-height: 1; font-variant-numeric: lining-nums; }
.statement-fact > span { color: var(--slate); font-size: 0.98rem; }

/* ---------- Course code anatomy ---------- */
.anatomy { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.code-big {
  display: flex; font-family: var(--serif); font-weight: 650;
  font-size: clamp(4.2rem, 2rem + 10vw, 11.5rem); line-height: 0.9; letter-spacing: 0.01em;
  user-select: none; font-variant-numeric: lining-nums;
}
.code-seg {
  position: relative; display: flex; cursor: pointer; border: 0; background: none; padding: 0 0.02em 0.25em;
  font: inherit; color: rgba(10, 33, 66, 0.2);
  transition: color 0.5s var(--ease);
}
.code-seg::after {
  content: ""; position: absolute; left: 0.06em; right: 0.06em; bottom: 0.08em; height: 4px; border-radius: 2px;
  background: var(--gold); transform: scaleX(0.25); transform-origin: left; opacity: 0.5;
  transition: transform 0.6s var(--ease), opacity 0.4s, background-color 0.4s;
}
.code-seg.is-active { color: var(--navy); }
.code-seg.is-active::after { transform: scaleX(1); opacity: 1; background: var(--maple); }
.code-seg[data-seg="grade"].is-active, .code-seg[data-seg="type"].is-active { color: var(--maple); }
.code-switch { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.chip {
  border: 1.5px solid var(--rule); background: var(--white); border-radius: 999px;
  padding: 0.4rem 0.95rem; font-weight: 600; font-size: 0.92rem; cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.on-navy .chip, .sec--navy .chip { background: transparent; border-color: rgba(255,255,255,0.25); color: var(--white); }
.on-navy .chip[aria-pressed="true"], .sec--navy .chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.anatomy-panel { position: relative; min-height: 16rem; }
.anatomy-card { border-top: 2px solid var(--navy); padding-top: 1.4rem; }
.anatomy-card .k { display: block; font-size: 0.95rem; color: var(--slate); margin-bottom: 0.5rem; }
.anatomy-card h3 { font-size: var(--step-3); margin-bottom: 0.9rem; }
.anatomy-card p { color: var(--slate); max-width: 40ch; }
.anatomy-steps { display: flex; gap: 0.35rem; margin-top: 1.6rem; }
.anatomy-steps button { width: 34px; height: 4px; border: 0; padding: 0; border-radius: 2px; background: var(--rule); cursor: pointer; transition: background-color 0.3s; }
.anatomy-steps button[aria-current="true"] { background: var(--maple); }
.anatomy-course { margin-top: 2rem; font-size: 1rem; color: var(--slate); }
.anatomy-course b { color: var(--navy); }

/* ---------- Credit ledger ---------- */
.ledger-pin { min-height: 100svh; display: flex; align-items: center; padding: calc(var(--hdr-h) + 1rem) 0 2rem; }
.ledger { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; width: 100%; }
.ledger-count { display: flex; align-items: baseline; gap: 0.8rem; margin: 1.4rem 0 0.2rem; }
.ledger-count b { font-family: var(--serif); font-size: clamp(3.6rem, 2rem + 4vw, 5.6rem); font-weight: 600; line-height: 0.9; color: var(--maple); font-variant-numeric: tabular-nums lining-nums; }
.ledger-count span { font-family: var(--serif); font-size: var(--step-2); color: var(--slate); }
.ledger-note { color: var(--slate); max-width: 36ch; }
.ledger h2 { font-size: var(--step-3); }
.ledger-reqs { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.ledger-reqs li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.8rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.ledger-reqs .tick { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1.5px solid var(--gold); display: grid; place-items: center; margin-top: 0.1rem; transition: background-color 0.4s, border-color 0.4s; }
.ledger-reqs .tick svg { width: 12px; opacity: 0; transition: opacity 0.3s; }
.ledger-reqs li.is-done .tick { background: var(--maple); border-color: var(--maple); }
.ledger-reqs li.is-done .tick svg { opacity: 1; }
.ledger-reqs b { display: block; font-weight: 600; }
.ledger-reqs span { color: var(--slate); font-size: 0.95rem; }

.sheet {
  background: var(--white); border-radius: 18px; padding: clamp(1.1rem, 2.4vw, 2rem);
  box-shadow: 0 1px 0 var(--rule), 0 30px 60px -30px rgba(10, 33, 66, 0.28);
  border: 1px solid var(--rule);
}
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); margin-bottom: 1rem; gap: 1rem; }
.sheet-head b { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.sheet-head span { font-size: 0.88rem; color: var(--slate); }
.sheet-row { display: grid; grid-template-columns: 4.6rem 1fr; gap: 0.8rem; align-items: center; padding: 0.55rem 0; }
.sheet-row + .sheet-row { border-top: 1px dashed var(--rule); }
.sheet-grade { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.sheet-grade small { display: block; font-family: var(--sans); font-weight: 500; color: var(--slate); font-size: 0.78rem; }
.sheet-cells { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.35rem; }
.cell {
  position: relative; aspect-ratio: 1.45; border-radius: 7px;
  background: var(--mist); overflow: hidden;
  display: grid; place-items: center;
  font-size: clamp(0.5rem, 0.3rem + 0.55vw, 0.78rem); font-weight: 700; letter-spacing: 0.02em; color: var(--white);
}
.cell::before { content: ""; position: absolute; inset: 0; background: var(--navy); transform: scaleY(0); transform-origin: bottom; transition: transform 0.45s var(--ease); }
.cell span { position: relative; opacity: 0; transform: translateY(6px); transition: opacity 0.3s 0.1s, transform 0.45s 0.1s var(--ease); }
.cell.is-on::before { transform: none; }
.cell.is-on span { opacity: 1; transform: none; }
.cell.is-on.is-u::before { background: var(--maple); }
.cell.is-empty { background: transparent; border: 1px dashed var(--rule); }
.sheet-legend { display: flex; gap: 1.2rem; margin-top: 1rem; font-size: 0.85rem; color: var(--slate); flex-wrap: wrap; }
.sheet-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 0.4rem; vertical-align: -1px; }

/* ---------- Fee calculator ---------- */
.fees { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.fees-intro p { color: var(--pale); }
.fee-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.2rem; max-width: 30rem; }
.fee-rate { border-top: 1px solid var(--navy-line); padding-top: 1rem; }
.fee-rate span { display: block; color: var(--pale); font-size: 0.92rem; }
.fee-rate b { font-family: var(--serif); font-size: 2.6rem; font-weight: 600; color: var(--white); line-height: 1.1; font-variant-numeric: lining-nums; }
.fee-rate small { color: var(--gold); font-size: 0.85rem; margin-left: 0.35rem; }

.calc {
  position: relative; border-radius: 22px; padding: clamp(1.3rem, 3vw, 2.4rem);
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid var(--navy-line);
}
.calc fieldset { border: 0; margin: 0 0 1.8rem; padding: 0; }
.calc legend { font-weight: 600; margin-bottom: 0.8rem; padding: 0; }
.seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.07);
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { position: relative; z-index: 1; text-align: center; padding: 0.7rem 0.5rem; cursor: pointer; font-weight: 600; font-size: 0.95rem; border-radius: 999px; transition: color 0.4s var(--ease); }
.seg input:checked + label { color: var(--navy); }
.seg input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--gold); transition: transform 0.55s var(--ease); }
.seg[data-pos="1"] .seg-thumb { transform: translateX(100%); }

.range-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.6rem; }
.range-row output { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; }
.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; cursor: pointer;
  --pct: 26%;
}
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--gold) var(--pct), rgba(255,255,255,0.18) var(--pct)); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.18); }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--gold); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--white); border: 6px solid var(--maple); box-shadow: 0 4px 14px rgba(0,0,0,0.35); transition: transform 0.3s var(--ease); }
.range:active::-webkit-slider-thumb { transform: scale(1.15); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 6px solid var(--maple); }
.presets { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.7rem; }

.toggle { display: flex; align-items: center; gap: 0.9rem; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle-ui { position: relative; width: 52px; height: 30px; border-radius: 999px; background: rgba(255,255,255,0.18); flex: none; transition: background-color 0.4s; }
.toggle-ui::after { content: ""; position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); transition: transform 0.45s var(--ease); }
.toggle input:checked + .toggle-ui { background: var(--maple); }
.toggle input:checked + .toggle-ui::after { transform: translateX(22px); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--gold); outline-offset: 3px; }
.toggle-text b { display: block; font-weight: 600; }
.toggle-text span { font-size: 0.9rem; color: var(--pale); }

.total { border-top: 1px solid var(--navy-line); padding-top: 1.4rem; display: grid; gap: 0.3rem; }
.total-label { color: var(--pale); font-size: 0.95rem; }
.total-num { font-family: var(--serif); font-size: clamp(3rem, 2rem + 4vw, 5rem); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.02em; }
.total-num sup { font-size: 0.35em; vertical-align: 1.35em; margin-right: 0.15em; font-weight: 500; color: var(--gold); letter-spacing: 0; }
.total-sub { color: var(--pale); font-size: 0.95rem; min-height: 1.6em; }
.total-sub b { color: var(--gold); font-weight: 600; }

/* ---------- Search preview / catalogue ---------- */
.finder { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.grade-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 2.4rem; border-top: 1px solid var(--rule); }
.grade-counts a { display: grid; gap: 0.2rem; padding: 1.1rem 0.8rem 1.1rem 0; text-decoration: none; border-right: 1px solid var(--rule); transition: color 0.3s; }
.grade-counts a:last-child { border-right: 0; }
.grade-counts a + a { padding-left: 1rem; }
.grade-counts b { font-family: var(--serif); font-size: 2.6rem; font-weight: 600; line-height: 1; color: var(--maple); font-variant-numeric: lining-nums; }
.grade-counts span { font-size: 0.92rem; color: var(--slate); }
.grade-counts a:hover span { color: var(--navy); }

.search {
  position: relative; display: flex; align-items: center;
  border-bottom: 2px solid var(--navy); padding-bottom: 0.4rem;
}
.search svg { width: 26px; flex: none; color: var(--slate); }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0.6rem 0.8rem;
  font-family: var(--serif); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); color: var(--navy);
}
.search input::placeholder { color: rgba(10,33,66,0.32); }
.search:focus-within { border-color: var(--maple); }
.search kbd { font-family: var(--sans); font-size: 0.8rem; border: 1px solid var(--rule); border-radius: 6px; padding: 0.15rem 0.45rem; color: var(--slate); }
.on-navy .search { border-color: rgba(255,255,255,0.7); }
.on-navy .search input { color: var(--white); }
.on-navy .search input::placeholder { color: rgba(255,255,255,0.4); }
.on-navy .search svg { color: var(--pale); }
.on-navy .search:focus-within { border-color: var(--gold); }

.results { list-style: none; margin: 1rem 0 0; padding: 0; }
.result a {
  display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 1rem; align-items: center;
  padding: 0.95rem 0.4rem; border-bottom: 1px solid var(--rule); text-decoration: none;
  transition: background-color 0.3s, padding 0.45s var(--ease);
}
.result a:hover, .result a:focus-visible { background: var(--ivory); padding-left: 1rem; }
.result .code { font-weight: 700; color: var(--maple); letter-spacing: 0.03em; }
.result .name { font-weight: 550; }
.result .meta { font-size: 0.88rem; color: var(--slate); white-space: nowrap; }
.results-empty { padding: 1.4rem 0.4rem; color: var(--slate); }

/* ---------- Steps ---------- */
.steps-wrap { position: relative; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); counter-reset: step; }
.steps-line { position: absolute; left: 0; right: 0; top: 1.4rem; height: 2px; background: var(--rule); }
.steps-line i { position: absolute; inset: 0; background: var(--maple); transform: scaleX(0); transform-origin: left; }
.step { position: relative; padding-top: 4rem; }
.step-num {
  position: absolute; top: 0; left: 0; width: 2.9rem; height: 2.9rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--ivory); border: 2px solid var(--maple);
  font-family: var(--serif); font-weight: 650; color: var(--maple); font-size: 1.1rem; font-variant-numeric: lining-nums;
}
.sec--ivory .step-num { background: var(--ivory); }
.step h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.step p { color: var(--slate); font-size: 1rem; margin: 0; }

/* ---------- Destinations ---------- */
.dest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: end; }
.dest-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--navy-line); }
.dest-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--navy-line);
  font-family: var(--serif); font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.6rem); font-weight: 500; line-height: 1.1;
}
.dest-list li span { font-family: var(--sans); font-size: 0.9rem; color: var(--pale); font-weight: 500; text-align: right; }

/* ---------- CTA band ---------- */
.band { background: var(--maple-deep); color: var(--white); position: relative; overflow: hidden; }
.band-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; padding: clamp(3.5rem, 2rem + 5vw, 6.5rem) var(--gutter); max-width: var(--max); margin: 0 auto; position: relative; z-index: 1; }
.band h2 { font-size: var(--step-4); max-width: 16ch; }
.band p { color: #F6D9D2; margin: 1rem 0 0; max-width: 44ch; }
.band-leaf { position: absolute; right: 18%; top: 50%; width: min(400px, 40vw); transform: translateY(-50%) rotate(-10deg); opacity: 0.1; color: var(--white); }

/* ---------- Footer ---------- */
.ftr { background: var(--navy-deep); color: var(--pale); padding: clamp(4rem, 3rem + 4vw, 7rem) 0 2rem; overflow: hidden; }
.ftr-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem; padding-bottom: 3.5rem; border-bottom: 1px solid var(--navy-line); }
.ftr-brand { --mk-lower: #fff; display: flex; gap: 1rem; align-items: center; color: var(--white); text-decoration: none; }
.ftr-brand svg { width: 70px; }
.ftr-tag { font-family: var(--serif); font-style: italic; color: var(--gold); margin-top: 1.2rem; font-size: 1.1rem; }
.ftr h4 { color: var(--white); font-family: var(--sans); font-size: 0.95rem; font-weight: 600; margin-bottom: 1rem; letter-spacing: 0; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.ftr ul a { text-decoration: none; transition: color 0.3s; }
.ftr ul a:hover { color: var(--white); }
.ftr-word {
  font-family: var(--serif); font-weight: 650; font-variant-caps: small-caps; letter-spacing: 0.01em;
  font-size: min(7.4vw, 7.2rem); line-height: 0.98; color: var(--white);
  margin: 3.5rem 0 2.5rem;
}
.ftr-word .l { display: block; white-space: nowrap; overflow: hidden; padding-bottom: 0.06em; }
.ftr-word .l + .l { color: var(--gold); }
.ftr-word .ch { display: inline-block; }
.ftr-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.88rem; }

/* ---------- Page hero (inner pages) ---------- */
.phero {
  position: relative; background: var(--navy-deep); color: var(--white); overflow: hidden;
  padding: calc(var(--hdr-h) + clamp(4rem, 2rem + 6vw, 8rem)) 0 clamp(3.5rem, 2rem + 4vw, 6rem);
}
.phero::after {
  content: ""; position: absolute; inset: auto -10% -40% auto; width: 70vw; height: 70vw; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(32,66,118,0.6), transparent);
  pointer-events: none;
}
.phero .wrap { position: relative; z-index: 1; }
.phero h1 { font-size: var(--step-5); max-width: 14ch; }
.phero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.phero h1 .line > span { display: block; }
.phero .lede { color: var(--pale); margin-top: 1.6rem; }
.crumbs { display: flex; gap: 0.5rem; font-size: 0.9rem; color: var(--pale); margin-bottom: 1.5rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--white); }

/* ---------- Catalogue page ---------- */
.cat-bar {
  position: sticky; top: var(--hdr-h); z-index: 20; background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: top 0.5s var(--ease);
}
.hdr-hidden .cat-bar { top: 0; }
.cat-bar-in { display: flex; gap: 1rem; align-items: center; padding: 0.9rem var(--gutter); max-width: var(--max); margin: 0 auto; flex-wrap: wrap; }
.cat-bar .chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.cat-bar select {
  appearance: none; -webkit-appearance: none; border: 1.5px solid var(--rule); border-radius: 999px; padding: 0.45rem 2.2rem 0.45rem 1rem;
  background: var(--white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%230A2142' stroke-width='1.6' fill='none'/></svg>") no-repeat right 0.9rem center;
  font: 600 0.92rem var(--sans); color: var(--navy); cursor: pointer;
}
.cat-count { margin-left: auto; color: var(--slate); font-size: 0.92rem; }
.cat-count b { color: var(--navy); }

.cat-group { padding-top: 3.5rem; }
.cat-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid var(--navy); }
.cat-group-head h2 { font-size: var(--step-3); }
.cat-group-head span { color: var(--slate); }
.course { border-bottom: 1px solid var(--rule); }
.course > button {
  width: 100%; display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) auto 2rem; gap: 1rem; align-items: center;
  padding: 1.05rem 0.4rem; background: none; border: 0; text-align: left; cursor: pointer;
  transition: background-color 0.3s, padding 0.45s var(--ease);
}
.course > button:hover { background: var(--ivory); padding-left: 1rem; }
.course .code { font-weight: 700; color: var(--maple); letter-spacing: 0.03em; font-size: 1.02rem; }
.course .name { font-family: var(--serif); font-size: 1.28rem; font-weight: 550; line-height: 1.25; }
.course .tag { font-size: 0.85rem; color: var(--slate); white-space: nowrap; }
.course .plus { width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--rule); position: relative; transition: transform 0.5s var(--ease), background-color 0.3s, border-color 0.3s; }
.course .plus::before, .course .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -0.75px 0 0 -5px; background: var(--navy); }
.course .plus::after { transform: rotate(90deg); transition: transform 0.4s var(--ease); }
.course.is-open .plus { background: var(--navy); border-color: var(--navy); transform: rotate(180deg); }
.course.is-open .plus::before, .course.is-open .plus::after { background: var(--white); }
.course.is-open .plus::after { transform: rotate(0); }
.course-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.55s var(--ease); }
.course.is-open .course-body { grid-template-rows: 1fr; }
.course-body > div { overflow: hidden; }
.course-detail { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) minmax(0, 18rem); gap: 1rem; padding: 0.2rem 0.4rem 1.6rem; }
.course-detail p { color: var(--slate); margin: 0; max-width: 56ch; grid-column: 2; }
.course-facts { grid-column: 3; display: grid; gap: 0.6rem; font-size: 0.92rem; align-content: start; }
.course-facts div { display: grid; gap: 0.05rem; }
.course-facts dt { color: var(--slate); }
.course-facts dd { margin: 0; font-weight: 600; }
.cat-empty { padding: 4rem 0; text-align: center; color: var(--slate); }
.cat-empty b { display: block; font-family: var(--serif); font-size: var(--step-2); color: var(--navy); margin-bottom: 0.5rem; }

/* ---------- Diploma page ---------- */
.req-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.compulsory { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.compulsory li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.compulsory b { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--maple); line-height: 1; font-variant-numeric: lining-nums; }
.compulsory span { font-weight: 600; }
.compulsory small { display: block; color: var(--slate); font-size: 0.92rem; font-weight: 400; margin-top: 0.15rem; }

.bar { display: flex; height: 64px; border-radius: 12px; overflow: hidden; margin: 2rem 0 0.8rem; }
.bar div { display: grid; place-items: center; color: var(--white); font-weight: 700; font-size: 0.95rem; transform-origin: left; }
.bar .c { background: var(--navy); flex: 17; }
.bar .o { background: var(--gold); color: var(--navy); flex: 13; }
.bar-key { display: flex; justify-content: space-between; color: var(--slate); font-size: 0.92rem; }

.other-reqs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); }
.other-req { border-top: 2px solid var(--gold); padding-top: 1.4rem; }
.other-req b { display: block; font-family: var(--serif); font-size: clamp(3rem, 2rem + 3vw, 4.6rem); font-weight: 600; line-height: 1; color: var(--maple); margin-bottom: 0.9rem; font-variant-numeric: lining-nums; }
.other-req h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.other-req p { color: var(--slate); margin: 0; }

.planner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.goals { display: grid; gap: 0.5rem; margin-top: 2rem; }
.goal {
  display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left;
  padding: 1rem 1.2rem; border-radius: 14px; border: 1.5px solid rgba(255,255,255,0.18); background: transparent; color: var(--white);
  font-family: var(--serif); font-size: 1.35rem; font-weight: 550; cursor: pointer;
  transition: background-color 0.4s var(--ease), border-color 0.4s, color 0.4s;
}
.goal svg { width: 20px; opacity: 0.4; transition: transform 0.45s var(--ease), opacity 0.3s; }
.goal:hover { border-color: rgba(255,255,255,0.5); }
.goal[aria-pressed="true"] { background: var(--white); color: var(--navy); border-color: var(--white); }
.goal[aria-pressed="true"] svg { opacity: 1; transform: translateX(4px); color: var(--maple); }
.plan-out { border-radius: 22px; padding: clamp(1.3rem, 3vw, 2.4rem); background: rgba(255,255,255,0.05); border: 1px solid var(--navy-line); min-height: 26rem; }
.plan-out h3 { font-size: var(--step-2); margin-bottom: 0.5rem; }
.plan-out > p { color: var(--pale); }
.plan-courses { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 0.6rem; }
.plan-courses li { display: grid; grid-template-columns: 5.8rem 1fr; gap: 1rem; align-items: center; padding: 0.85rem 1rem; border-radius: 12px; background: rgba(255,255,255,0.06); }
.plan-courses .code { color: var(--gold); font-weight: 700; letter-spacing: 0.03em; }
.plan-courses .name { font-weight: 550; }
.plan-courses .opt { font-size: 0.85rem; color: var(--pale); display: block; font-weight: 400; }
.plan-note { color: var(--pale); font-size: 0.92rem; margin: 1.4rem 0 0; }

/* ---------- Admissions ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.prose p { color: var(--slate); max-width: 58ch; }
.prose h3 { margin: 2.2rem 0 0.7rem; font-size: 1.6rem; }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; color: var(--slate); }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--maple); }

.tz-table { width: 100%; border-collapse: collapse; margin-top: 1.2rem; font-size: 0.98rem; }
.tz-table th { text-align: left; font-weight: 600; padding: 0.7rem 0.6rem; background: var(--navy); color: var(--white); }
.tz-table th:first-child { border-radius: 10px 0 0 0; }
.tz-table th:last-child { border-radius: 0 10px 0 0; }
.tz-table td { padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.tz-table tr:nth-child(even) td { background: var(--mist); }
.tz-table td:first-child { font-weight: 600; }

.esl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.4rem; margin-top: 1.4rem; }
.esl div { border-radius: 10px; padding: 0.9rem 0.6rem; background: var(--ivory); text-align: center; border: 1px solid var(--rule); }
.esl b { display: block; font-family: var(--serif); font-size: 1.8rem; color: var(--maple); line-height: 1; }
.esl span { font-size: 0.8rem; color: var(--slate); }

.faq { border-top: 2px solid var(--navy); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center;
  padding: 1.3rem 0.2rem; font-family: var(--serif); font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); font-weight: 550;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--rule); position: relative; transition: transform 0.5s var(--ease), background-color 0.3s; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -0.75px 0 0 -5px; background: var(--navy); transition: transform 0.4s var(--ease); }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i { background: var(--navy); border-color: var(--navy); }
.faq details[open] summary i::before, .faq details[open] summary i::after { background: var(--white); }
.faq details[open] summary i::after { transform: rotate(0); }
.faq-a { padding: 0 0.2rem 1.4rem; color: var(--slate); max-width: 62ch; }
.faq-a p:last-child { margin: 0; }

/* ---------- Apply ---------- */
.apply { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.apply-side { position: sticky; top: calc(var(--hdr-h) + 2rem); }
.progress { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0; }
.progress li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.9rem; align-items: center; padding: 0.7rem 0; color: var(--slate); transition: color 0.3s; }
.progress li b { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--rule); font-family: var(--serif); font-weight: 650; font-variant-numeric: lining-nums; transition: background-color 0.4s, border-color 0.4s, color 0.4s; }
.progress li.is-current { color: var(--navy); font-weight: 600; }
.progress li.is-current b { border-color: var(--maple); color: var(--maple); }
.progress li.is-done b { background: var(--maple); border-color: var(--maple); color: var(--white); }

.form-card { background: var(--white); border: 1px solid var(--rule); border-radius: 22px; padding: clamp(1.3rem, 3.5vw, 3rem); box-shadow: 0 30px 60px -40px rgba(10, 33, 66, 0.35); overflow: hidden; }
.fstep { display: none; }
.fstep.is-current { display: block; }
.fstep h2 { font-size: var(--step-3); margin-bottom: 0.5rem; }
.fstep > p { color: var(--slate); margin-bottom: 2rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.2rem; }
.field { display: grid; gap: 0.4rem; }
.field--full { grid-column: 1 / -1; }
.field label, .field .label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--rule); border-radius: 12px; padding: 0.85rem 1rem; background: var(--white);
  font: 400 1rem var(--sans); color: var(--navy); transition: border-color 0.3s, box-shadow 0.3s;
}
.field select { appearance: none; -webkit-appearance: none; background: var(--white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%230A2142' stroke-width='1.6' fill='none'/></svg>") no-repeat right 1rem center; padding-right: 2.4rem; }
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(10, 33, 66, 0.08); }
.field.has-error input, .field.has-error select { border-color: var(--maple); }
.field-error { color: var(--maple); font-size: 0.88rem; display: none; }
.field.has-error .field-error { display: block; }
.field-hint { color: var(--slate); font-size: 0.88rem; }
.phone { display: grid; grid-template-columns: 7.2rem 1fr; gap: 0.5rem; }

.choices { display: grid; gap: 0.6rem; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice-ui {
  display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.9rem; align-items: start;
  padding: 1.1rem 1.2rem; border: 1.5px solid var(--rule); border-radius: 14px;
  transition: border-color 0.3s, background-color 0.3s;
}
.choice-ui::before { content: ""; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 1.5px solid var(--slate); margin-top: 0.15rem; transition: border-width 0.25s, border-color 0.25s; }
.choice input:checked + .choice-ui { border-color: var(--navy); background: var(--ivory); }
.choice input:checked + .choice-ui::before { border: 6px solid var(--maple); }
.choice input:focus-visible + .choice-ui { outline: 2px solid var(--maple); outline-offset: 2px; }
.choice-ui b { display: block; font-weight: 600; }
.choice-ui span { color: var(--slate); font-size: 0.93rem; }

.form-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.review { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.review div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.review dt { color: var(--slate); }
.review dd { margin: 0; font-weight: 600; }

.done { text-align: center; padding: 2rem 0 1rem; }
.done svg.done-mark { width: 150px; margin: 0 auto 1.6rem; }
.done h2 { margin-bottom: 0.8rem; }
.done p { color: var(--slate); max-width: 40ch; margin: 0 auto 1.6rem; }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; background: var(--navy-deep); color: var(--white); padding: 6rem var(--gutter); }
.nf svg { width: 160px; margin: 0 auto 2rem; --mk-lower: #fff; }
.nf p { color: var(--pale); margin: 1rem auto 2rem; max-width: 36ch; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav, .hdr .btn { display: none; }
  .menu-btn { display: block; }
  .clocks-in { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clocks-title { grid-column: 1 / -1; max-width: none; }
  .ftr-top { grid-template-columns: 1fr 1fr; }
  .ftr-top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  :root { --hdr-h: 68px; }
  .hero-in { grid-template-columns: 1fr; padding-top: calc(var(--hdr-h) + 2.5rem); gap: 0; }
  .globe-wrap { width: 128%; margin: -6% -14% -18%; order: 2; }
  .globe-hint { right: 16%; bottom: 20%; }
  .anatomy, .ledger, .fees, .finder, .dest, .req-grid, .planner, .split, .apply { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .steps-line { display: none; }
  .other-reqs { grid-template-columns: 1fr; }
  .band-in { grid-template-columns: 1fr; }
  .apply-side { position: static; }
  .progress { grid-template-columns: repeat(4, auto); gap: 0.5rem; justify-content: start; }
  .progress li { grid-template-columns: 2.4rem; }
  .progress li span { display: none; }
  .ledger-pin { min-height: 0; padding: 0; }
  .course-detail { grid-template-columns: 1fr; padding-left: 0.4rem; }
  .course-detail p, .course-facts { grid-column: 1; }
  .course-facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .brand-word { font-size: 0.9rem; }
  .brand svg { width: 44px; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 3.4rem); }
  .clocks-in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
  .clock-time { font-size: 1.3rem; }
  .steps { grid-template-columns: 1fr; }
  .grade-counts { grid-template-columns: 1fr 1fr; }
  .grade-counts a:nth-child(2) { border-right: 0; }
  .grade-counts a:nth-child(3) { padding-left: 0; }
  .grade-counts a:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .result a { grid-template-columns: 5.4rem 1fr; }
  .result .meta { display: none; }
  .course > button { grid-template-columns: 5.4rem minmax(0, 1fr) 2rem; }
  .course .tag { display: none; }
  .course .name { font-size: 1.12rem; }
  .fields { grid-template-columns: 1fr; }
  .review div { grid-template-columns: 1fr; gap: 0.1rem; }
  .ftr-top { grid-template-columns: 1fr 1fr; row-gap: 2.2rem; }
  .sheet-cells { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cell { aspect-ratio: 2.1; font-size: 0.72rem; }
  .sheet-head span { display: none; }
  .band-leaf { right: -12%; top: auto; bottom: -20%; transform: rotate(-10deg); width: 70vw; }
  .search kbd { display: none; }
  .esl { grid-template-columns: repeat(3, 1fr); }
  .sheet-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .sheet-grade small { display: inline; margin-left: 0.4rem; }
  .cat-count { margin-left: 0; width: 100%; }
  .fee-rates { grid-template-columns: 1fr 1fr; }
  .dest-list li { flex-direction: column; gap: 0.3rem; }
  .dest-list li span { text-align: left; }
  .tz-table { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html.js .curtain { visibility: hidden; }
  .statement .w { color: var(--navy); }
  .statement .w.mark { color: var(--maple); }
}

/* Pre-reveal states (only when JS runs and motion is allowed) */
html.js:not(.rm) [data-lines],
html.js:not(.rm) [data-sh] { visibility: hidden; }
html.js:not(.rm) [data-follow] { opacity: 0; }
html.rm .curtain { visibility: hidden !important; }
.choice input[type="checkbox"] + .choice-ui::before { border-radius: 6px; }
.nf h1 { font-size: var(--step-4); }

/* ---------- Home: light hero ---------- */
.home-light .hdr { color: var(--navy); --mk-lower: var(--navy); }
.home-light .hdr .nav a::after { background: var(--maple); }
.home-light .hdr.is-scrolled::before { background: rgba(255, 255, 255, 0.86); box-shadow: 0 1px 0 var(--rule); }
.home-light.menu-open .hdr { color: var(--white); --mk-lower: #fff; }
.home-light .hero {
  background:
    radial-gradient(48% 58% at 76% 46%, rgba(140, 205, 255, 0.34), transparent 70%),
    radial-gradient(36% 42% at 94% 14%, rgba(196, 181, 253, 0.26), transparent 72%),
    radial-gradient(40% 40% at 40% 30%, rgba(214, 236, 255, 0.45), transparent 75%),
    linear-gradient(180deg, #FBFCFE 0%, #F7F9FC 100%);
  color: var(--navy);
}
.home-light .hero-grain { display: none; }
.home-light .hero h1 { color: #0B1B33; }
.home-light .hero .lede { color: #4A5868; }
.home-light .hero .btn--ghost { --fg: var(--navy); background: rgba(255, 255, 255, 0.7); box-shadow: inset 0 0 0 1.5px rgba(10, 33, 66, 0.22); }
.home-light .hero .btn--ghost:hover, .home-light .hero .btn--ghost:focus-visible { --fg: var(--white); }
.home-light .globe-hint { color: #4A5868; opacity: 1; }
.home-light .clocks { background: rgba(243, 245, 249, 0.92); border-top: 1px solid #E3E7EE; }
.home-light .clocks-title { color: #3B4A5A; }
.home-light .clock-city { color: #22313F; }
.home-light .clock-time { color: #0B1B33; }
.home-light .clock-time small { color: #0B1B33; font-family: var(--serif); font-weight: 500; font-size: 0.68em; }
.home-light .clock .clock-city::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 3px var(--dot-ring); }
.home-light [data-clock="toronto"] { --dot: #E3283A; --dot-ring: rgba(227, 40, 58, 0.18); }
.home-light [data-clock="dubai"] { --dot: #F5A623; --dot-ring: rgba(245, 166, 35, 0.2); }
.home-light [data-clock="riyadh"] { --dot: #14B8A6; --dot-ring: rgba(20, 184, 166, 0.2); }
.home-light [data-clock="doha"] { --dot: #8B5CF6; --dot-ring: rgba(139, 92, 246, 0.2); }
.home-light [data-clock="india"] { --dot: #2563EB; --dot-ring: rgba(37, 99, 235, 0.18); }
.home-light .clock-you { background: #FBE3B0; color: #5A3E08; }

/* ---------- BSID notice (shown before the site, once per browser session) ---------- */
.notice { display: none; }
html.notice-open.is-ready .notice { /* waits for the logo intro to finish */
  display: grid; position: fixed; inset: 0; z-index: 200;
  padding: clamp(0.9rem, 0.5rem + 2vw, 2rem);
  background: rgba(222, 229, 240, 0.45);
  -webkit-backdrop-filter: blur(9px) saturate(1.05); backdrop-filter: blur(9px) saturate(1.05);
  padding-bottom: max(clamp(0.9rem, 0.5rem + 2vw, 2rem), env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  animation: notice-fade 0.45s var(--ease) both;
}
html.notice-open, html.notice-open body { overflow: hidden; }
html.notice-closing .notice { opacity: 0; transition: opacity 0.28s var(--ease); }
.notice-card {
  margin: auto; width: min(100%, 46rem);
  background: #FFFFFF; color: #0B1B33; border-radius: 22px;
  box-shadow: 0 34px 80px -24px rgba(10, 33, 66, 0.38), 0 0 0 1px rgba(10, 33, 66, 0.06);
  padding: clamp(1.6rem, 1rem + 2.2vw, 2.5rem) clamp(1.25rem, 0.5rem + 3vw, 2.75rem) clamp(1.4rem, 1rem + 1.4vw, 2rem);
  animation: notice-rise 0.6s var(--ease) both;
}
.notice-icon { display: block; width: 46px; height: 46px; margin: 0 auto 0.85rem; color: var(--maple); }
.notice-eyebrow { margin: 0; text-align: center; font-family: var(--sans); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase; color: #0B1B33; }
.notice-eyebrow::after { content: ""; display: block; width: 56px; height: 2px; margin: 0.9rem auto 0; background: var(--maple); }
.notice h2 { margin: 1.25rem 0 1.05rem; font-family: var(--serif); font-weight: 650; font-size: clamp(1.55rem, 1.05rem + 2vw, 2.45rem); line-height: 1.12; letter-spacing: -0.015em; color: #0B1B33; }
.notice-body p { margin: 0 0 0.85rem; font-family: var(--serif); font-size: clamp(1rem, 0.94rem + 0.3vw, 1.16rem); line-height: 1.5; color: #142238; }
.notice-ack { margin: 1.2rem 0 1.15rem; padding-top: 1.1rem; border-top: 1px solid #E3E7EE; text-align: center; font-family: var(--serif); font-size: 0.95rem; line-height: 1.45; color: #26364A; }
.notice-btn { display: flex; justify-content: center; margin: 0 auto; min-height: 56px; padding: 0 3rem; font-size: 1.12rem; }
.notice-btn:focus-visible { outline: 2px solid var(--maple); outline-offset: 3px; }
.notice-btn:focus-visible:not(:hover)::before { transform: translateY(101%); } /* stay red when focused on open */
.notice-sub { margin: 0.75rem 0 0; text-align: center; font-size: 0.9rem; color: #4A5868; }
@keyframes notice-fade { from { opacity: 0; } }
@keyframes notice-rise { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
/* Small or short screens: tighter card so the button fits on most phones without scrolling */
@media (max-width: 640px), (max-height: 760px) {
  html.notice-open.is-ready .notice { padding: 0.75rem; padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
  .notice-card { padding: 1.3rem 1.2rem 1.15rem; border-radius: 18px; }
  .notice-icon { width: 34px; height: 34px; margin-bottom: 0.55rem; }
  .notice-eyebrow { font-size: 0.72rem; letter-spacing: 0.2em; }
  .notice-eyebrow::after { width: 44px; margin-top: 0.6rem; }
  .notice h2 { margin: 0.85rem 0 0.7rem; font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.8rem); }
  .notice-body p { margin-bottom: 0.55rem; font-size: 0.96rem; line-height: 1.42; }
  .notice-ack { margin: 0.8rem 0 0.75rem; padding-top: 0.75rem; font-size: 0.86rem; }
  .notice-btn { min-height: 50px; font-size: 1.04rem; }
  .notice-sub { margin-top: 0.45rem; font-size: 0.82rem; }
}
@media (max-width: 640px) {
  .notice-btn { width: 100%; padding: 0 1.5rem; }
}
