/* ============================================================
   Master MARBLE — Design System
   Brand: deep navy #11466D + teal #148E7A primary
   Type:  Baloo 2 (brandbook)
   ============================================================ */

/* ============================================================
   Master MARBLE — Design System
   Brand: deep navy #11466D + teal #148E7A primary
   Type:  Fredoka (headings) + Baloo 2 (body, brandbook)

   ──────────────────────────────────────────────────────────────
   COLOR RULE — THEME-AWARE IS THE DEFAULT
   ──────────────────────────────────────────────────────────────
   Every color reference SHOULD use a semantic token that adapts
   with theme — `--ink`, `--ink-soft`, `--ink-mute`, `--bg`,
   `--bg-elev`, `--bg-panel`, `--bg-flip`, `--on-flip*`, `--accent`,
   `--accent-deep`, `--rule`, `--highlight-deep`.

   The few exceptions where a RAW brand color is used directly
   ARE intentional and explained inline. They fall into three
   categories:
     (a) **Brand badge surfaces** — colored chips/dots/badges
         whose entire point is to signal a categorical brand
         identity (semester step circles, partner category dots,
         filter chip active states, fee-card .gold/.teal/.deep
         variants). These don't flip; the color IS the meaning.
     (b) **Hero / footer / always-dark surfaces** — fixed-dark
         decorative backgrounds (the underwater hero gradient,
         the navy footer). Text inside uses --on-dark*.
     (c) **--highlight** — the brand-yellow accent. Per brandbook,
         it stays the same hue across themes; only --highlight-deep
         shifts (dark amber on light, bright on dark) for tone.

   Any new use of `var(--brand-*)` outside these three buckets is
   a bug — replace it with `--ink`, `--accent`, or `--on-flip*`.
   ============================================================ */

:root {
  /* ─── Raw brand palette (brandbook page 28–30, do not use directly
         except in the three categories listed above) ─── */
  --brand-teal:    #148E7A;
  --brand-orange:  #F1A725;
  --brand-blue:    #1866D4;
  --brand-navy:    #141B2D;
  --brand-deep:    #11466D;
  --brand-sky:     #80C3E1;
  --brand-pale:    #DBE9F5;
  --grey-700:      #7C8A91;
  --grey-400:      #C1C8CE;
  --grey-200:      #E1E6EB;
  --white:         #FFFFFF;
  --black:         #000000;

  /* ============================================================
     Theme A — Deep (default): navy + teal
     ============================================================ */
  --bg:            #F6F9FC;
  --bg-elev:       #FFFFFF;
  --bg-panel:      #DBE9F5;
  --bg-deep:       #11466D;
  --bg-deeper:     #0C3656;
  --ink:           #141B2D;
  --ink-soft:      #2C3A52;
  --ink-mute:      #57647A;  /* darkened from #6B7A8C: needed for WCAG AA 4.5:1 on white */
  --rule:          rgba(20, 27, 45, 0.10);
  --rule-strong:   rgba(20, 27, 45, 0.20);
  --accent:        #0E6D5E;  /* darkened from brand-teal #148E7A: AA 4.5+ on white for body links */
  --accent-deep:   #0A574B;
  --accent-on:     #FFFFFF;
  --highlight:     #F1A725;
  --highlight-deep:#7A4700;  /* AA-compliant amber on near-white AND on highlight-tint surface */

  /* ============================================================
     Semantic tokens — stable across themes
     (used wherever an element sits on a TRUE-DARK surface that
      never flips: hero, footer, fact-strip, primary CTA, badges)
     ============================================================ */
  --on-dark:           #FFFFFF;
  --on-dark-soft:      rgba(255,255,255,.85);
  --on-dark-mute:      rgba(255,255,255,.70);
  --on-dark-faint:     rgba(255,255,255,.55);
  --on-dark-dim:       rgba(255,255,255,.45);
  --rule-on-dark:      rgba(255,255,255,.15);
  --rule-on-dark-strong: rgba(255,255,255,.25);
  --surface-on-dark:   rgba(255,255,255,.05);
  --surface-on-dark-strong: rgba(255,255,255,.08);
  --surface-on-dark-card:  rgba(255,255,255,.06);

  /* ============================================================
     "Flip" surface — feature sections that INVERT vs page bg.
     Light themes: dark-on-light page, so flip = navy with white ink.
     Dark themes:  light-on-dark page, so flip = pale with dark ink.
     ============================================================ */
  --bg-flip:               #11466D;  /* navy in light themes */
  --on-flip:               #FFFFFF;
  --on-flip-soft:          rgba(255,255,255,.85);
  --on-flip-mute:          rgba(255,255,255,.75);  /* bumped from .70 for AA on flip-card translucent surface */
  --on-flip-faint:         rgba(255,255,255,.55);
  --rule-on-flip:          rgba(255,255,255,.15);
  --rule-on-flip-strong:   rgba(255,255,255,.25);
  --surface-on-flip-card:  rgba(255,255,255,.06);
  --highlight-on-flip:     var(--highlight);

  /* On brand-orange surfaces, ink is dark navy */
  --on-gold:           #141B2D;
  --on-gold-soft:      rgba(20,27,45,.72);
  --on-gold-mute:      rgba(20,27,45,.55);

  /* Tinted surfaces derived from brand colors */
  --highlight-tint:        color-mix(in srgb, var(--brand-orange) 12%, transparent);
  --highlight-tint-strong: color-mix(in srgb, var(--brand-orange) 26%, transparent);

  /* Course tag semantics: pinned to brand colors, not --accent */
  --joint-tint:        color-mix(in srgb, var(--brand-teal) 8%, transparent);
  --joint-tint-strong: color-mix(in srgb, var(--brand-teal) 22%, transparent);
  --joint-ink:         #0B5C50;

  --elective-tint:        color-mix(in srgb, var(--brand-orange) 10%, transparent);
  --elective-tint-strong: color-mix(in srgb, var(--brand-orange) 26%, transparent);
  --elective-ink:         var(--highlight-deep);

  /* Type scale */
  --f-display: clamp(48px, 7vw, 96px);
  --f-h1:      clamp(36px, 5vw, 64px);
  --f-h2:      clamp(28px, 3.6vw, 44px);
  --f-h3:      clamp(22px, 2.2vw, 28px);
  --f-h4:      20px;
  --f-body:    17px;
  --f-small:   14px;
  --f-tag:     12px;

  /* Spacing */
  --gap-1: 8px;
  --gap-2: 16px;
  --gap-3: 24px;
  --gap-4: 32px;
  --gap-6: 48px;
  --gap-8: 64px;
  --gap-10: 96px;
  --gap-12: 128px;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --radius-xl: 32px;

  --container: 1240px;
  --container-wide: 1440px;

  --header-h: 76px;

  --shadow-1: 0 1px 2px rgba(20,27,45,.06), 0 1px 1px rgba(20,27,45,.04);
  --shadow-2: 0 12px 32px -12px rgba(17, 70, 109, .18), 0 2px 6px rgba(20,27,45,.06);
  --shadow-hero: 0 40px 80px -30px rgba(17, 70, 109, .45);
}

/* ============================================================
   Theme B — Light2: same light shell, royal-blue accent.
   ============================================================ */
:root[data-theme="light2"] {
  --accent:        #1866D4;
  --accent-deep:   #0F4FAA;
  --accent-on:     #FFFFFF;
}

/* ============================================================
   Theme C — Dark1: dark page bg, teal accent.
   Feature/inverted sections (section.deep, .thesis-block,
   .fee-card default, .form-card) flip to a LIGHT panel.
   Always-dark surfaces (hero, footer, badges) stay dark.
   ============================================================ */
:root[data-theme="dark1"] {
  --bg:            #0B1422;
  --bg-elev:       #142436;
  --bg-panel:      #1B2D44;
  --bg-deep:       #0C3656;
  --bg-deeper:     #06223C;
  --ink:           rgba(255,255,255,.92);
  --ink-soft:      rgba(255,255,255,.78);
  --ink-mute:      rgba(255,255,255,.55);
  --rule:          rgba(255,255,255,.10);
  --rule-strong:   rgba(255,255,255,.22);
  --accent:        #2BAA94;
  --accent-deep:   #148E7A;
  --accent-on:     #04231E;
  --highlight:     #F1A725;
  --highlight-deep:#FFB838;

  /* Inverted feature surface in dark themes: marine navy.
     Clearly elevated above body (#0B1422); reads as "feature"
     without bleaching to a bright pale panel. */
  --bg-flip:               #1F3656;
  --on-flip:               rgba(255,255,255,.96);
  --on-flip-soft:          rgba(255,255,255,.85);
  --on-flip-mute:          rgba(255,255,255,.75);
  --on-flip-faint:         rgba(255,255,255,.55);
  --rule-on-flip:          rgba(255,255,255,.16);
  --rule-on-flip-strong:   rgba(255,255,255,.30);
  --surface-on-flip-card:  rgba(255,255,255,.08);
  --highlight-on-flip:     var(--highlight);

  --shadow-1: 0 1px 2px rgba(0,0,0,.30), 0 1px 1px rgba(0,0,0,.20);
  --shadow-2: 0 12px 32px -12px rgba(0,0,0,.50), 0 2px 6px rgba(0,0,0,.30);
}

/* ============================================================
   Theme D — Dark2: dark page bg, royal-blue accent.
   ============================================================ */
:root[data-theme="dark2"] {
  --bg:            #0B1422;
  --bg-elev:       #142436;
  --bg-panel:      #1B2D44;
  --bg-deep:       #0C3656;
  --bg-deeper:     #06223C;
  --ink:           rgba(255,255,255,.92);
  --ink-soft:      rgba(255,255,255,.78);
  --ink-mute:      rgba(255,255,255,.55);
  --rule:          rgba(255,255,255,.10);
  --rule-strong:   rgba(255,255,255,.22);
  --accent:        #4D8DE8;
  --accent-deep:   #1866D4;
  --accent-on:     #07203E;
  --highlight:     #F1A725;
  --highlight-deep:#FFB838;

  --bg-flip:               #1F3656;
  --on-flip:               rgba(255,255,255,.96);
  --on-flip-soft:          rgba(255,255,255,.85);
  --on-flip-mute:          rgba(255,255,255,.75);
  --on-flip-faint:         rgba(255,255,255,.55);
  --rule-on-flip:          rgba(255,255,255,.16);
  --rule-on-flip-strong:   rgba(255,255,255,.30);
  --surface-on-flip-card:  rgba(255,255,255,.08);
  --highlight-on-flip:     var(--highlight);

  --shadow-1: 0 1px 2px rgba(0,0,0,.30), 0 1px 1px rgba(0,0,0,.20);
  --shadow-2: 0 12px 32px -12px rgba(0,0,0,.50), 0 2px 6px rgba(0,0,0,.30);
}

/* Dark themes: a few component tweaks for legibility */
:root[data-theme="dark1"] body,
:root[data-theme="dark2"] body { background: var(--bg); }
:root[data-theme="dark1"] .news-thumb,
:root[data-theme="dark2"] .news-thumb {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 8px, rgba(255,255,255,.08) 8px 16px),
    var(--bg-elev);
  color: var(--ink-mute);
}
:root[data-theme="dark1"] .page-hero,
:root[data-theme="dark2"] .page-hero { background: var(--bg-panel); }
:root[data-theme="dark1"] .news-meta .tag,
:root[data-theme="dark2"] .news-meta .tag,
:root[data-theme="dark1"] .news-card .read-more,
:root[data-theme="dark2"] .news-card .read-more,
:root[data-theme="dark1"] .link-arrow,
:root[data-theme="dark2"] .link-arrow,
:root[data-theme="dark1"] .contact-card a,
:root[data-theme="dark2"] .contact-card a { color: var(--accent); }

/* Light-mode component touch-ups (apply to all light themes) */
:root[data-theme="light2"] .partner-tile,
:root[data-theme="light2"] .news-card,
:root[data-theme="light2"] .card,
:root[data-theme="light2"] .stop,
:root[data-theme="light2"] .semester,
:root[data-theme="light2"] .contact-card,
:root[data-theme="light2"] .crit-list li,
:root[data-theme="light2"] .partner-list li,
:root[data-theme="light2"] .objective-list li,
:root[data-theme="light2"] .proc-step,
:root[data-theme="light2"] .adm-sidebar { border-color: rgba(17, 70, 109, 0.18); }
:root[data-theme="light2"] .page-hero { background: var(--bg-panel); }

/* Reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Baloo 2', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: var(--f-body);
  line-height: 1.55;
  font-weight: 500;
  text-rendering: optimizeLegibility;
}

/* Brandbook wordmark — Fredoka */
.brand-wordmark {
  font-family: 'Fredoka', 'Baloo 2', sans-serif;
  font-weight: 600;
  letter-spacing: -0.005em;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

::selection { background: var(--highlight); color: var(--on-gold); }
::-moz-selection { background: var(--highlight); color: var(--on-gold); }

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container.wide { max-width: var(--container-wide); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header.on-hero {
  background: transparent;
  border-bottom-color: transparent;
  color: var(--on-dark);
}
.site-header.on-hero .nav a { color: var(--on-dark-soft); }
.site-header.on-hero .nav a:hover,
.site-header.on-hero .nav a.active { color: var(--on-dark); }
.site-header.on-hero .header-cta { background: var(--on-dark); color: var(--brand-deep); }

.header-row {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
/* ============================================================
   .logo — Master MARBLE brand lockup
   ------------------------------------------------------------
   Uses the official brand-book SVG lockups as-is. Two variants:
     header (.logo)            → short-horizontal lockup
     footer (.logo--vertical)  → full-vertical lockup
   Each carries both positive + negative SVG variants; CSS picks
   based on the surface (light page vs. fixed-dark hero/footer
   vs. dark themes). Hover gives a subtle whole-lockup lift —
   targeting just the wordmark would require breaking the asset,
   which the brand book disallows.
   ============================================================ */
.logo {
  display: inline-flex;
  align-items: center;
  height: 54px;
  text-decoration: none;
  transition: filter .2s ease;
}
.logo:hover {
  /* Pure-CSS yellow highlight: a soft drop-shadow halo in the brand
     highlight colour. Stacks two passes so the glow reads at any scale. */
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--highlight) 75%, transparent))
    drop-shadow(0 0 1px color-mix(in srgb, var(--highlight) 85%, transparent));
}
.logo__mark { height: 100%; width: auto; display: block; }
.logo__mark--neg { display: none; }

/* Footer uses the same horizontal lockup, just larger so the descriptor
   line stays legible at the page bottom. */
.logo--footer { height: 96px; }

/* Dark-surface treatment: flip to the negative SVG */
.site-footer .logo .logo__mark,
.site-header.on-hero .logo .logo__mark,
:root[data-theme="dark1"] .site-header:not(.on-hero) .logo .logo__mark,
:root[data-theme="dark2"] .site-header:not(.on-hero) .logo .logo__mark { display: none; }
.site-footer .logo .logo__mark--neg,
.site-header.on-hero .logo .logo__mark--neg,
:root[data-theme="dark1"] .site-header:not(.on-hero) .logo .logo__mark--neg,
:root[data-theme="dark2"] .site-header:not(.on-hero) .logo .logo__mark--neg { display: block; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  align-items: center;
}
.nav a {
  position: relative;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color .15s;
}
.nav a:hover { color: var(--highlight-deep); }
.nav a:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--highlight);
  border-radius: 2px;
}
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.site-header.on-hero .nav a:hover { color: var(--highlight); }
.site-header.on-hero .nav a.active::after { background: var(--highlight); }

.header-cta {
  background: var(--brand-deep);
  color: var(--on-dark);
  padding: 10px 18px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, transform .15s, color .15s;
}
.header-cta:hover { background: var(--highlight); color: var(--brand-navy); transform: translateY(-1px); }
.site-header.on-hero .header-cta:hover { background: var(--highlight); color: var(--brand-navy); }

.menu-toggle { display: none; }
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }

@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
    width: 40px; height: 40px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rule);
    cursor: pointer;
  }
  .site-header:has(.nav-toggle-input:checked) .nav {
    display: flex;
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-elev);
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--rule);
  }
}

/* ============================================================
   Hero (home)
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: var(--on-dark);
  overflow: hidden;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
}
/* .hero-bg block removed for WP/Elementor build — effects moved to compat block below */
.hero-placeholder-label {
  position: absolute;
  top: 24px; right: 24px;
  font-family: ui-monospace, SF Mono, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
  padding: 6px 10px;
  border: 1px dashed var(--rule-on-dark-strong);
  border-radius: 4px;
}
.hero-content {
  position: relative;
  width: 100%;
  padding: 0 24px var(--gap-10);
  max-width: var(--container);
  margin: 0 auto;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  margin-bottom: 18px;
  padding: 6px 14px;
  border: 1px solid var(--rule-on-dark-strong);
  border-radius: 100px;
  background: var(--surface-on-dark);
  white-space: nowrap;
}
.hero-kicker .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--highlight) 22%, transparent);
}
.hero h1 {
  font-family: 'Fredoka', 'Baloo 2', sans-serif;
  font-size: var(--f-display);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
  max-width: 14ch;
  text-wrap: balance;
}
.hero h1 em {
  color: var(--brand-sky);
  font-style: normal;
}
.hero-sub {
  font-size: clamp(18px, 1.6vw, 22px);
  max-width: 56ch;
  color: var(--on-dark-soft);
  line-height: 1.45;
  font-weight: 500;
  margin: 0 0 36px;
}
.hero-cta-row {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-bottom: var(--gap-6);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s, background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-on); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
/* Hero primary button sits on a fixed-dark surface; use brand-teal directly
   (the darker --accent #0E6D5E is for AA-on-white in light themes and looks
   washed on the navy hero). */
.hero .btn-primary { background: var(--brand-teal); color: var(--on-dark); }
.hero .btn-primary:hover { background: #0E6D5E; }
.btn-light { background: var(--on-dark); color: var(--brand-deep); }
.btn-light:hover { background: var(--brand-pale); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: inherit;
  border: 1.5px solid currentColor;
}
.btn-ghost:hover { background: var(--surface-on-dark-strong); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Fact strip overlaid on hero */
.fact-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule-on-dark);
  border-bottom: 1px solid var(--rule-on-dark);
  padding: 28px 0;
}
.fact-strip .fact {
  padding: 0 28px;
  border-right: 1px solid var(--rule-on-dark);
}
.fact-strip .fact:last-child { border-right: 0; }
.fact-strip .fact-num {
  font-family: 'Fredoka', 'Baloo 2', sans-serif;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--on-dark);
}
.fact-strip .fact-num sup { font-size: 0.5em; vertical-align: super; color: var(--brand-sky); font-weight: 600; }
.fact-strip .fact-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-mute);
  margin-top: 10px;
  font-weight: 600;
}
@media (max-width: 800px) {
  .fact-strip { grid-template-columns: repeat(2, 1fr); }
  .fact-strip .fact { border-bottom: 1px solid var(--rule-on-dark); padding: 12px; }
}

/* ============================================================
   Sections
   ============================================================ */
section { padding: var(--gap-10) 0; }
section.tight { padding: var(--gap-8) 0; }
section.deep {
  background: var(--bg-flip);
  color: var(--on-flip);
  position: relative;
}
/* Accent stripe at top — gives feature sections hierarchy without glare */
section.deep::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--highlight-on-flip);
  opacity: 0.85;
}
section.deep .eyebrow { color: var(--highlight-on-flip); }
section.deep .eyebrow .pip { background: var(--highlight-on-flip); }
section.deep .rule { border-color: var(--rule-on-flip); }
section.deep .lead { color: var(--on-flip-soft); }
section.deep .card {
  background: var(--surface-on-flip-card);
  border-color: var(--rule-on-flip);
  color: var(--on-flip);
}
section.deep .card h3 { color: var(--on-flip); }
section.deep .card p { color: var(--on-flip-mute); }
section.deep .card .num { color: var(--highlight-on-flip); }

/* Eyebrow uses brand orange as the standard accent now (yellow accent per brandbook) */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--highlight-deep);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.eyebrow .pip {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--highlight);
  border: 0;
}

h1, h2, h3, h4 {
  font-family: 'Fredoka', 'Baloo 2', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: var(--f-h2); font-weight: 600; }
h3 { font-size: var(--f-h3); font-weight: 600; }
h4 { font-size: var(--f-h4); font-weight: 600; }

p { margin: 0 0 1em; text-wrap: pretty; }
p.lead {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 64ch;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-6);
  align-items: end;
  margin-bottom: var(--gap-6);
}
@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; }
}

/* Intro split */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-8);
  align-items: start;
}
@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: var(--gap-4); }
}
.intro h2 { font-size: var(--f-h1); }

/* ============================================================
   Journey / map preview
   ============================================================ */
.journey {
  position: relative;
}
.journey-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--gap-8);
  align-items: center;
}
@media (max-width: 900px) {
  .journey-grid { grid-template-columns: 1fr; }
}
.journey-map-wrap {
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--bg-panel);
  position: relative;
  box-shadow: var(--shadow-2);
}
.journey-stops { display: flex; flex-direction: column; gap: 18px; }
.stop {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.stop:hover { transform: translateX(4px); box-shadow: var(--shadow-2); border-color: var(--accent); }
.stop-sem {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg-deep);
  color: var(--on-dark);
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
}
.stop-sem small { display: block; font-size: 9px; letter-spacing: .12em; font-weight: 600; opacity: .7; }
.stop-city { font-weight: 800; font-size: 19px; line-height: 1.1; }
.stop-meta { font-size: 14px; color: var(--ink-mute); }
.stop-ects {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  background: var(--bg-panel);
  border-radius: 100px;
  color: var(--ink);
}

/* ============================================================
   Objectives / cards
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-3);
}
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: 1fr; }
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--accent); }
.card .num {
  font-family: 'Baloo 2';
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.04em;
}
section.deep .card .num { color: var(--highlight); }
.card h3 { font-size: 22px; }
.card p { color: var(--ink-soft); margin: 0; font-size: 16px; }

/* ============================================================
   Partner logos strip
   ============================================================ */
.partners-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  align-items: center;
}
@media (max-width: 900px) {
  .partners-strip { grid-template-columns: repeat(2, 1fr); }
}
.partner-tile {
  min-height: 180px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.partner-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.partner-tile .abbr {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}
.partner-tile .full {
  font-size: 12px;
  margin-top: 8px;
  color: var(--ink-mute);
  line-height: 1.3;
  font-weight: 500;
}
.partner-tile .country {
  position: absolute;
  top: 10px;
  left: 14px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-mute);
  letter-spacing: .08em;
}
.partner-tile .flag {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 16px;
}

/* ============================================================
   News preview
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }
.news-card {
  background: var(--bg-elev);
  border-radius: var(--radius-m);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.news-thumb {
  aspect-ratio: 16/10;
  background:
    repeating-linear-gradient(135deg, var(--rule) 0 8px, var(--rule-strong) 8px 16px),
    var(--brand-pale);
  position: relative;
  display: grid;
  place-items: center;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}
.news-thumb.t-teal { background:
  repeating-linear-gradient(135deg, var(--joint-tint) 0 8px, var(--joint-tint-strong) 8px 16px),
  color-mix(in srgb, var(--brand-teal) 14%, var(--bg-elev)); }
.news-thumb.t-orange { background:
  repeating-linear-gradient(135deg, var(--elective-tint) 0 8px, var(--elective-tint-strong) 8px 16px),
  color-mix(in srgb, var(--brand-orange) 16%, var(--bg-elev)); }
.news-thumb.t-blue { background:
  repeating-linear-gradient(135deg, color-mix(in srgb, var(--brand-blue) 10%, transparent) 0 8px, color-mix(in srgb, var(--brand-blue) 22%, transparent) 8px 16px),
  color-mix(in srgb, var(--brand-blue) 14%, var(--bg-elev)); }
.news-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-meta { display: flex; gap: 14px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }
.news-meta .tag { color: var(--accent); }
.news-title { font-size: 20px; font-weight: 700; line-height: 1.2; margin: 4px 0 6px; }
.news-excerpt { font-size: 15px; color: var(--ink-soft); margin: 0; }
.news-card .read-more {
  margin-top: auto;
  padding-top: 14px;
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
  display: inline-flex; gap: 6px; align-items: center;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--brand-navy);
  color: var(--on-dark);
  padding: var(--gap-8) 0 var(--gap-4);
}
.site-footer .logo { color: var(--on-dark); }
.site-footer .logo small { color: var(--on-dark-faint); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap-6);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 {
  font-family: 'Baloo 2';
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
  margin: 0 0 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--on-dark-soft); font-weight: 500; }
.footer-grid a:hover { color: var(--highlight); }  /* match header-cta hover yellow */
.footer-about p { color: var(--on-dark-mute); max-width: 38ch; font-size: 15px; }
.footer-funded {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px dashed var(--rule-on-dark);
  border-radius: 8px;
  font-size: 12px;
  color: var(--on-dark-mute);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
}
.footer-bottom {
  margin-top: var(--gap-6);
  padding-top: 24px;
  border-top: 1px solid var(--rule-on-dark);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--on-dark-faint);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   Page hero (non-home)
   ============================================================ */
.page-hero {
  padding: calc(var(--gap-10) + 24px) 0 var(--gap-8);
  background: var(--bg-panel);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(17,70,109,.045) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(17,70,109,.045) 0 1px, transparent 1px 64px);
  pointer-events: none;
}
.page-hero .breadcrumbs {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}
.page-hero .breadcrumbs a { color: var(--ink-soft); opacity: .65; }
.page-hero .breadcrumbs .sep { margin: 0 8px; opacity: .4; }
.page-hero h1 {
  font-size: var(--f-h1);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 20ch;
}
.page-hero .page-sub {
  font-size: clamp(17px, 1.3vw, 20px);
  color: var(--ink-soft);
  max-width: 60ch;
  margin-top: 18px;
}

/* ============================================================
   Curriculum timeline
   ============================================================ */
.semesters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
}
@media (max-width: 1000px) {
  .semesters { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .semesters { grid-template-columns: 1fr; }
}
.semester {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.semester .sem-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.semester .sem-num {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand-deep);
  color: var(--on-dark);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 16px;
}
.semester:nth-child(2) .sem-num { background: var(--brand-teal); }
.semester:nth-child(3) .sem-num { background: var(--brand-blue); }
.semester:nth-child(4) .sem-num { background: var(--brand-orange); color: var(--on-gold); }
.semester h3 { font-size: 18px; margin: 0; }
.semester .sem-city {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}
.semester .sem-city .flag {
  font-size: 20px;
  letter-spacing: 0;
  vertical-align: -3px;
  text-transform: none;
  display: inline-block;
  margin-left: 4px;
  filter: saturate(1.6) brightness(1.1);
}
.course-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.course {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  align-items: center;
}
.course.joint { background: var(--joint-tint); }
.course.elective { background: var(--elective-tint); }
.course .ects {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--bg-panel);
  border-radius: 100px;
  color: var(--ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
  align-self: center;
}
.course.elective {
  background: var(--elective-tint);
}
.course.elective .ects {
  background: var(--highlight);
  color: var(--on-gold);
}
.course.joint {
  background: var(--joint-tint);
}
.course.joint .ects {
  background: #0A574B;
  color: var(--on-dark);
}
.course .opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 4px;
}
.course .opts em {
  font-style: italic;
  font-weight: 600;
  color: var(--ink-mute);
  font-size: 12px;
  padding: 0 2px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

/* ============================================================
   Theme toggle (always-on, in header) — sun/moon, no text
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 52px;
  height: 28px;
  border-radius: 100px;
  background: var(--bg-panel);
  border: 1px solid var(--rule);
  padding: 2px;
  position: relative;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  flex-shrink: 0;
  overflow: hidden;
}
.theme-toggle:hover { border-color: var(--rule-strong); }
.theme-toggle .knob {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--brand-deep);
  color: var(--on-dark);
  transition: transform .25s cubic-bezier(.6,.05,.2,1), background .2s;
  position: absolute;
  top: 2px; left: 2px;
  display: grid; place-items: center;
  pointer-events: none;
  z-index: 2;
}
.theme-toggle .knob svg { width: 14px; height: 14px; }
.theme-toggle .knob .sun { display: none; }
:root[data-theme="light2"] .theme-toggle .knob { background: var(--brand-blue); }
/* Dark themes: knob goes right + shows sun */
:root[data-theme="dark1"] .theme-toggle .knob,
:root[data-theme="dark2"] .theme-toggle .knob {
  transform: translateX(24px);
  background: var(--brand-orange);
  color: var(--brand-navy);
}
:root[data-theme="dark1"] .theme-toggle .knob .moon,
:root[data-theme="dark2"] .theme-toggle .knob .moon { display: none; }
:root[data-theme="dark1"] .theme-toggle .knob .sun,
:root[data-theme="dark2"] .theme-toggle .knob .sun { display: block; }
.theme-toggle .track-icon {
  width: 14px; height: 14px;
  color: var(--ink-mute);
  z-index: 1;
  flex-shrink: 0;
}
.theme-toggle .track-icon.left { margin-left: 5px; opacity: 0; }
.theme-toggle .track-icon.right { margin-right: 5px; opacity: 1; }
:root[data-theme="dark1"] .theme-toggle .track-icon.left,
:root[data-theme="dark2"] .theme-toggle .track-icon.left  { opacity: 1; }
:root[data-theme="dark1"] .theme-toggle .track-icon.right,
:root[data-theme="dark2"] .theme-toggle .track-icon.right { opacity: 0; }
.theme-toggle .track-icon svg { width: 100%; height: 100%; }
.site-header.on-hero .theme-toggle {
  background: var(--surface-on-dark-strong);
  border-color: var(--rule-on-dark-strong);
}
.site-header.on-hero .theme-toggle .track-icon { color: var(--on-dark-faint); }

/* ============================================================
   Tweaks panel (lives in same surface family)
   ============================================================ */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 24px 48px -12px rgba(20,27,45,.25);
  padding: 18px;
  width: 240px;
  display: none;
}
.tweaks.open { display: block; }
.tweaks h4 { margin: 0 0 4px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }
.tweaks .row { margin: 12px 0 0; }
.tweaks .row-label { font-size: 12px; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }

.swatch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.swatch {
  aspect-ratio: 2 / 1;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  display: grid; place-items: center;
  color: var(--on-dark);
  padding: 0;
}
.swatch span {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--accent);
}
.swatch.light1 { background: linear-gradient(135deg, var(--brand-pale) 50%, var(--brand-teal) 50%); }
.swatch.light1 span { color: var(--brand-deep); text-shadow: none; }
.swatch.light2 { background: linear-gradient(135deg, var(--brand-pale) 50%, var(--brand-blue) 50%); }
.swatch.light2 span { color: var(--brand-deep); text-shadow: none; }
.swatch.dark1  { background: linear-gradient(135deg, #0B1422 50%, var(--brand-teal) 50%); }
.swatch.dark2  { background: linear-gradient(135deg, #0B1422 50%, var(--brand-blue) 50%); }
.tweaks .close {
  position: absolute;
  top: 10px; right: 10px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 18px;
  color: var(--ink-mute);
}
.tweaks .close:hover { background: var(--bg-panel); }
/* Floating launcher — always available; opens the tweaks panel */
.tweaks-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-on);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-2);
  cursor: pointer;
  border: 0;
  transition: transform .15s, background .15s;
}
/* Hide when panel is open OR when host is managing (JS sets data-host=1) */
.tweaks.open ~ .tweaks-launcher,
:root[data-host-managed] .tweaks-launcher { display: none; }
.tweaks-launcher:hover { transform: translateY(-2px); background: var(--accent-deep); }
.tweaks-launcher svg { width: 20px; height: 20px; }
/* When the panel is open, hide the launcher */
.tweaks.open ~ .tweaks-launcher { display: none; }

/* tiny helpers */
.eyebrow-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.link-arrow:hover { text-decoration: underline; }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }


/* ============================================================
   WordPress / Elementor compatibility overrides
   --------------------------------------------------------------
   The static site's home hero used a .hero-bg child div for the
   gradient + grid + sonar overlays. Elementor doesn't produce
   that child, so the overlays move to ::before/::after on the
   first top-level Elementor section itself, targeted by the
   stable WP body class .page-id-<post_id>.

   Page IDs (stable WP DB primary keys):
     273 Home  278 About  276 Program  263 Admission
     280 Partners  267 News  269 Contact
   ============================================================ */

/* ── Home hero (page-id-273) ── */
body.page-id-273 section.elementor-element.elementor-top-section.elementor-section:first-of-type {
  /* Width override defeats Elementor per-post CSS that pins this
     section to width: 700px (the mobile breakage root cause). */
  width: 100% !important;
  max-width: 100% !important;

  background:
    radial-gradient(60% 70% at 20% 30%, rgba(20,142,122,.35), transparent 60%),
    radial-gradient(50% 50% at 85% 80%, rgba(128,195,225,.30), transparent 65%),
    linear-gradient(180deg, #0E3556 0%, #11466D 35%, #082A45 100%);
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: var(--on-dark);
}
body.page-id-273 section.elementor-element.elementor-top-section.elementor-section:first-of-type::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg,  rgba(255,255,255,.04) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 80px);
  mix-blend-mode: overlay;
  pointer-events: none; z-index: 1;
}
body.page-id-273 section.elementor-element.elementor-top-section.elementor-section:first-of-type::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'><g fill='none' stroke='%23FFFFFF' stroke-opacity='0.08' stroke-width='1'><circle cx='200' cy='600' r='80'/><circle cx='200' cy='600' r='160'/><circle cx='200' cy='600' r='240'/><circle cx='200' cy='600' r='320'/><circle cx='200' cy='600' r='400'/><circle cx='200' cy='600' r='480'/><circle cx='200' cy='600' r='560'/></g><g fill='none' stroke='%2380C3E1' stroke-opacity='0.18' stroke-width='1' stroke-dasharray='2 6'><path d='M0,400 Q300,360 600,420 T1200,380'/><path d='M0,500 Q300,460 600,520 T1200,480'/><path d='M0,600 Q300,560 600,620 T1200,580'/></g></svg>");
  background-size: cover; background-position: center;
  pointer-events: none; z-index: 1;
}
body.page-id-273 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container {
  position: relative;
  z-index: 2;
}
/* Heading inside home hero: fluid scale via --f-display clamp() */
body.page-id-273 section.elementor-element.elementor-top-section.elementor-section:first-of-type h1.elementor-heading-title,
body.page-id-273 section.elementor-element.elementor-top-section.elementor-section:first-of-type .elementor-widget-heading h1 {
  font-family: 'Fredoka', 'Baloo 2', sans-serif !important;
  font-size: var(--f-display) !important;
  line-height: 0.95 !important;
  font-weight: 800 !important;
  color: var(--on-dark) !important;
}

/* ── Subpage page-heros (all pages except home) ── */
body.page-id-278 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-276 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-263 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-280 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-267 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-269 section.elementor-element.elementor-top-section.elementor-section:first-of-type {
  width: 100% !important;
  max-width: 100% !important;
  /* Use longhand background-color + background-image to defeat Elementor's
     per-post longhand background-color rules, which would otherwise survive
     a shorthand background override at lower specificity. */
  background-color: var(--bg-panel) !important;
  background-image: none !important;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  padding-top: calc(var(--gap-10) + 24px);
  padding-bottom: var(--gap-8);
}
/* Subpage hero h1: theme ink color on the light page-hero, fluid scale */
body.page-id-278 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-276 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-263 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-280 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-267 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-269 section.elementor-element.elementor-top-section.elementor-section:first-of-type h1.elementor-heading-title,
body.page-id-278 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-276 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-263 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-280 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-267 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-269 section.elementor-element.elementor-top-section.elementor-section:first-of-type .elementor-widget-heading h1 {
  font-family: 'Fredoka', 'Baloo 2', sans-serif !important;
  font-size: var(--f-h1) !important;
  color: var(--ink) !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
}
body.page-id-278 section.elementor-element.elementor-top-section.elementor-section:first-of-type::before,
body.page-id-276 section.elementor-element.elementor-top-section.elementor-section:first-of-type::before,
body.page-id-263 section.elementor-element.elementor-top-section.elementor-section:first-of-type::before,
body.page-id-280 section.elementor-element.elementor-top-section.elementor-section:first-of-type::before,
body.page-id-267 section.elementor-element.elementor-top-section.elementor-section:first-of-type::before,
body.page-id-269 section.elementor-element.elementor-top-section.elementor-section:first-of-type::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg,  rgba(17,70,109,.045) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(17,70,109,.045) 0 1px, transparent 1px 64px);
  pointer-events: none;
}
body.page-id-278 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
body.page-id-276 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
body.page-id-263 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
body.page-id-280 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
body.page-id-267 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
body.page-id-269 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container {
  position: relative;
  z-index: 1;
}

/* Dark themes: keep page-hero bg-panel (already declared above via !important
   on background, but re-asserted here to win over any darker Elementor inline
   styles that may exist under dark-theme nested selectors). */
:root[data-theme="dark1"] body.page-id-278 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark1"] body.page-id-276 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark1"] body.page-id-263 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark1"] body.page-id-280 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark1"] body.page-id-267 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark1"] body.page-id-269 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark2"] body.page-id-278 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark2"] body.page-id-276 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark2"] body.page-id-263 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark2"] body.page-id-280 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark2"] body.page-id-267 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
:root[data-theme="dark2"] body.page-id-269 section.elementor-element.elementor-top-section.elementor-section:first-of-type {
  background-color: var(--bg-panel) !important;
  background-image: none !important;
}

/* ── Mobile padding override ──
   Elementor sets 350px horizontal padding on the home hero (and similar on
   subpages). With box-sizing:border-box, the section's minimum width is
   the padding sum (~700px), which overflows a 390px viewport even with
   width:100%. Override padding for narrow viewports. */
@media (max-width: 900px) {
  body.page-id-273 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
  body.page-id-278 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-276 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-263 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-280 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-267 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-269 section.elementor-element.elementor-top-section.elementor-section:first-of-type {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}
@media (max-width: 600px) {
  body.page-id-273 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
  body.page-id-278 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-276 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-263 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-280 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-267 section.elementor-element.elementor-top-section.elementor-section:first-of-type,
body.page-id-269 section.elementor-element.elementor-top-section.elementor-section:first-of-type {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Mobile: Elementor sets a fixed max-width on .elementor-container per post
   (e.g. 767px). On narrow viewports this overflows. Let the container
   shrink with the section. */
@media (max-width: 900px) {
  body.page-id-273 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
  body.page-id-278 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
body.page-id-276 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
body.page-id-263 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
body.page-id-280 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
body.page-id-267 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container,
body.page-id-269 section.elementor-element.elementor-top-section.elementor-section:first-of-type > .elementor-container {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Mobile safety: legacy <table> widgets (fact-strip, semester cards,
   objective cards) declare `width: 100%` inline but their content
   refuses to wrap → they push wider than their parent. Constrain at
   the table level + allow word breaking in cells. Also clip body
   horizontal scroll as a final safety net. */
@media (max-width: 900px) {
  body { overflow-x: hidden !important; }
  .elementor table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
  }
  .elementor table td,
  .elementor table th {
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  /* Widget containers that override their parent's width with widget-width-initial
     can also overflow; constrain them. */
  .elementor-widget__width-initial {
    max-width: 100% !important;
  }
}
