:root {
  --paper: #f6f4ef;
  --paper-2: #eee9de;
  --ink: #16233b;
  --ink-2: #25324c;
  --ink-soft: #4a5670;
  --line: #e3dccd;
  --line-strong: #d3cab6;
  --accent: #8a6a22;
  --accent-deep: #6f551a;
  --accent-soft: rgba(138, 106, 34, 0.10);
  --gold: #c49a45;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "Space Grotesk", var(--font-sans);

  --container: 1200px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Clip horizontal overflow at the root so decorative wide elements (the
     founder watermark marquee, hero montage, testimonial carousel) can never
     push/shift the page sideways. `clip` is the right tool here: it leaves
     overflow-y VISIBLE, so it does NOT create a scroll container — sticky
     navbars and normal vertical/touch scrolling all keep working. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Respect reduced-motion: drop smooth-scroll hijack and heavy animation */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  display: block;
}

/* Reset UA default margins (figure/blockquote get 40px side margins by
   default, which overflow grid/flex tracks on narrow screens) */
figure,
blockquote {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.05;
}

p {
  margin: 0;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.crx-hidden {
  display: none !important;
}

.crx-page-leaving {
  opacity: 0 !important;
}

.crx-error {
  border-color: #c0392b !important;
}

.crx-valid {
  border-color: #2e7d32 !important;
}

.ed-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.ed-section {
  padding: clamp(3.5rem, 8vw, 7rem) 0;
}

.ed-eyebrow {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.ed-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.ed-kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.ed-kicker-num {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.ed-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.04;
}

.ed-title .accent {
  font-style: italic;
}

.ed-lead {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.7;
  max-width: 60ch;
}

.ed-rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.crx-btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.8rem;
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.crx-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.crx-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.crx-btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.crx-btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.crx-btn-block {
  width: 100%;
}

.crx-btn-large {
  padding: 1.1rem 2.4rem;
}

.is-dark .crx-btn {
  --btn-bg: var(--gold);
  --btn-fg: #1a1206;
  border-color: var(--gold);
}

.is-dark .crx-btn:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.is-dark .crx-btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.is-dark .crx-btn-outline:hover {
  background: #fff;
  color: var(--ink);
}

.ed-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ed-link:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.ed-link i {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ed-link:hover i {
  transform: translateX(4px);
}


.ed-bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.ed-bento-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.ed-bento-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 40px rgba(20, 17, 14, 0.07);
}

.ed-bento-icon {
  font-size: 2.8rem;
  color: var(--accent);
  margin-bottom: auto;
}

.ed-bento-card h3 {
  font-size: 1.8rem;
  color: var(--ink);
}

.ed-bento-card p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}


.crx-topbar {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.crx-topbar-container {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.crx-topbar-left {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.crx-topbar-left i {
  color: var(--gold);
  margin-right: 0.35rem;
}

.crx-topbar-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.crx-topbar-right a {
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.crx-topbar-right a:hover {
  color: #fff;
}

.crx-topbar-right a i {
  color: var(--gold);
}


.crx-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.crx-navbar.crx-scrolled {
  box-shadow: 0 6px 24px rgba(20, 17, 14, 0.07);
}

.crx-nav-container {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.crx-nav-logo {
  display: inline-flex;
  align-items: center;
}

.crx-logo-img {
  height: 45px;
  width: auto;
  display: block;
}

.crx-logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: 0.02em;
  color: var(--ink) !important;
  position: relative;
}

.crx-logo-text::after {
  content: ".";
  color: var(--accent);
}

.crx-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.crx-nav-link {
  font-family: var(--font-label);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.2s ease;
}

.crx-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.crx-nav-link:hover {
  color: var(--ink);
}

.crx-nav-link:hover::after,
.crx-nav-link.crx-active::after {
  transform: scaleX(1);
}

.crx-nav-link.crx-active {
  color: var(--ink);
}

.crx-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px;
}

.crx-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}


.ed-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}

.ed-hero-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3rem);
}

.ed-hero-text {
  max-width: 38rem;
  position: relative;
  z-index: 2;
}

.ed-hero-main-logo {
  max-width: 230px;
  height: auto;
  display: block;
  margin-bottom: 0;
  margin-top: -3rem;
  margin-left: -2rem; /* Pull aggressive left to align UK text inside image with header */
}



.ed-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 1.5rem 0 0;
}

.ed-hero-title em {
  font-style: italic;
}

.ed-hero-sub {
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  line-height: 1.7;
  max-width: 46ch;
}

.ed-hero-cta {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.ed-hero-meta {
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
}

.ed-hero-meta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 75%;
  height: 1px;
  background: var(--line);
}

@media (max-width: 899px) {
  .ed-hero-main-logo {
    margin-inline: auto;
    margin-left: auto; /* Override negative left margin */
    margin-top: -1.5rem;
  }

  .ed-hero-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-inline: auto;
  }

  .ed-hero-sub {
    margin-inline: auto;
  }

  .ed-hero-cta {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 0.9rem;
  }

  #newStudentBtn {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .ed-hero-meta {
    justify-content: center;
  }

  .ed-hero-meta::before {
    width: 100%;
    left: 0;
  }
}

@media (max-width: 480px) {
  .ed-hero-cta {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }
  .ed-hero-cta .crx-btn {
    padding: 0.7rem 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    justify-content: center;
  }
  #newStudentBtn {
    padding: 0.8rem;
    font-size: 0.8rem;
  }
}

.ed-hero-meta .num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
}

.ed-hero-meta .num span {
  color: var(--accent);
}

.ed-hero-meta .lbl {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ed-hero-figure {
  position: relative;
  isolation: isolate;
}

.ed-hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  filter: saturate(0.96);
}

.ed-hero-figure::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  z-index: -1;
}

.ed-hero-tag {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  border-radius: 2px;
}


.ed-hero-montage {
  position: relative;
  height: clamp(380px, 72vw, 500px);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
}

.ed-hero-track {
  display: flex;
  height: 100%;
  width: max-content;
  animation: edHeroScroll 38s linear infinite;
  will-change: transform;
}

.ed-hero-strip {
  flex: 0 0 auto;
  width: clamp(200px, 26vw, 340px);
  height: 100%;
  margin-right: 7px;
  overflow: hidden;
  transform: skewX(-9deg);
}

.ed-hero-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: skewX(9deg) scale(1.45);
  filter: saturate(1.02);
}

@keyframes edHeroScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ed-hero-track {
    /* Decorative hero banner: keep gently scrolling even with reduced motion */
    animation: edHeroScroll 38s linear infinite !important;
  }
}


.ed-founder {
  background: var(--ink);
  color: #efeae1;
  position: relative;
  overflow: hidden;
}



.ed-founder .ed-eyebrow {
  color: var(--gold);
}

.ed-founder .ed-eyebrow::before {
  background: var(--gold);
}

.ed-founder-watermark {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(5rem, 20vw, 18rem);
  color: rgba(255, 255, 255, 0.035);
  letter-spacing: -0.04em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  line-height: 1;
}

.ed-marquee-track {
  display: flex;
  width: max-content;
  animation: ed-marquee 60s linear infinite;
}

@keyframes ed-marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.ed-founder-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.ed-founder-media {
  position: relative;
  min-width: 0;
  align-self: stretch;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(217, 154, 43, 0.18), transparent 60%);
  border-radius: var(--radius);
  padding-top: 1.5rem;
}

@keyframes founderColorReveal {
  0% {
    filter: grayscale(100%) brightness(0.95);
  }
  30% {
    filter: grayscale(100%) brightness(0.95);
  }
  100% {
    filter: grayscale(0) brightness(1);
  }
}

/* Base = mobile/tablet (<900px). Keep the portrait fully CONTAINED within
   its column (max-width:100%, no scale overflow, no negative margin) so it
   never overflows the section's overflow:hidden box — an overflowing scaled
   image there can trap touch scrolling on real phones. */
.ed-founder-portrait {
  width: auto;
  max-width: 100%;
  height: clamp(340px, 64vw, 480px);
  object-fit: contain;
  object-position: bottom center;
  filter: grayscale(100%) brightness(0.95);
  transform-origin: bottom center;
  transition: transform 0.5s var(--ease);
  pointer-events: none;
}

.ed-founder-media.is-visible .ed-founder-portrait {
  animation: founderColorReveal 1.0s ease forwards;
}

.ed-founder-media:hover .ed-founder-portrait {
  /* Hover instantly cancels animation and forces color (mobile keeps the
     portrait contained — no scale that would overflow on tap). */
  animation: none;
  filter: grayscale(0) brightness(1);
  transition: filter 0.5s var(--ease), transform 0.5s var(--ease);
}

/* ---- Mobile / tablet (<900px) founder: bigger figure, seated on the
   base line of its block (same height-anchored technique as desktop). The
   media is a defined box; the portrait is absolute, bottom-anchored, and
   translateY(13.8%) drops the PNG's transparent strip below the box edge so
   the figure's feet sit on the block's bottom line. ---- */
@media (max-width: 899px) {
  #founder .ed-founder-media {
    position: relative;
    width: 100%;
    height: clamp(400px, 92vw, 600px);
    overflow: hidden;
    align-items: flex-end;
    padding-top: 0;
    border-radius: var(--radius);
  }
  #founder .ed-founder-portrait {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: auto;
    height: clamp(480px, 118vw, 780px);
    max-width: none;
    object-fit: contain;
    object-position: bottom center;
    /* -43% (vs -50%) nudges the off-centre figure to the visual centre */
    transform: translate(-43%, 13.8%);
    margin: 0;
  }
}

@media (min-width: 900px) {
  .ed-founder-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0 4rem; /* row gap 0 to keep footer close */
  }

  .ed-founder-media {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    align-self: end;
    height: 0; /* prevent media from dictating row height */
    background: none;
  }

  .ed-founder-body {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    position: relative;
  }

  .ed-founder-footer {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    margin-top: 2rem;
  }

  .ed-founder-media::before {
    content: "";
    position: absolute;
    inset: 0 0 -280px 0;
    background: radial-gradient(120% 90% at 50% 100%, rgba(217, 154, 43, 0.25), transparent 60%);
    z-index: -1;
    pointer-events: none;
  }

  .ed-founder-portrait {
    position: absolute;
    bottom: 0;
    left: 50%;
    margin-bottom: 0;
    width: auto;
    height: clamp(620px, 112vh, 1260px);
    max-width: none;
    transform-origin: bottom center;
    /* Size driven by height (scales with the screen). The PNG (2938×2463)
       has the figure occupying 14.4%–86.2% vertically — 13.8% of the image
       is transparent BELOW the figure. translateY pushes that strip (plus a
       little more) below the section edge (clipped by overflow:hidden) so
       the figure's feet sit on the section's bottom line — a constant of the
       image, so it stays seated at every screen height. */
    transform: translate(-50%, 25%);
  }

  .ed-founder-media:hover .ed-founder-portrait {
    transform: translate(-50%, 25%) scale(1.03);
  }

  .ed-founder-watermark {
    left: 0;
    width: 100vw;
    bottom: 0;
    font-size: clamp(5rem, 14vw, 13rem);
  }
}

.ed-founder-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-label);
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.ed-founder-badge b {
  color: var(--gold);
  font-weight: 600;
}

.ed-founder-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 0.92;
  margin: 1.2rem 0 0.8rem;
}

.ed-founder-name span {
  display: block;
}

.ed-founder-name .first {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  color: #fff;
}

.ed-founder-name .last {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  color: #fff;
}

.ed-founder-role {
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #b6ad9f;
}

.ed-founder-role b {
  color: var(--gold);
  font-weight: 400;
}

.ed-founder-quote {
  border-left: 2px solid var(--gold);
  padding-left: 1.4rem;
  margin: 2rem 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.5;
  color: #e9e3d8;
  max-width: 36ch;
}

.ed-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.6rem 0;
  margin-bottom: 2rem;
}

.ed-stat .v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
  color: #fff;
}

.ed-stat .v small {
  color: var(--gold);
  font-size: 0.45em;
  vertical-align: super;
}

.ed-stat .k {
  margin-top: 0.45rem;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #948c7e;
  line-height: 1.4;
}

.ed-founder .ed-link {
  color: #efeae1;
  border-color: rgba(239, 234, 225, 0.3);
}

.ed-founder .ed-link:hover {
  background: #efeae1;
  color: var(--ink);
  border-color: #efeae1;
}

.ed-subjects-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  align-items: end;
  margin-bottom: 2.6rem;
}

#interactive-students {
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.ed-leader-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.ed-subject-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 1024px) {
  .ed-subject-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .ed-debate-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    margin: 0 auto;
  }
}

.ed-subject-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.ed-subject-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 14px 34px rgba(20, 17, 14, 0.07);
  transform: translateY(-4px);
}

.ed-subject-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper);
}

.ed-subject-img-wrap.ed-subject-icon-wrap {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ink) 0%, #1e3352 100%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 2.8rem;
}

.ed-subject-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  transition: transform 0.4s var(--ease);
}

.ed-subject-card:hover .ed-subject-photo {
  transform: scale(1.1);
}

.ed-subject-body {
  flex: 1;
  min-width: 0;
  padding: 1.3rem 1.4rem 1.1rem;
  display: flex;
  flex-direction: column;
}

.ed-subject-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.ed-subject-card p {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.ed-subject-arrow {
  margin-top: auto;
  padding-top: 0.7rem;
  color: var(--accent);
  font-size: 1.05rem;
}

.ed-programs {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.ed-program {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.6rem;
  background: var(--ink);
  color: #f3efe7;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s var(--ease);
}

.ed-program:hover {
  transform: translateY(-3px);
}

.ed-program h4 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #fff;
}

.ed-program span {
  font-size: 0.84rem;
  color: #b6ad9f;
}

.ed-program i {
  color: var(--gold);
  transition: transform 0.25s var(--ease);
}

.ed-program:hover i {
  transform: translateX(5px);
}


.ed-quotes {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0.8rem;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem; /* Space for hidden scrollbar */
}
.ed-quotes::-webkit-scrollbar {
  display: none;
}

.ed-quote {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 0 0 85%;
  scroll-snap-align: start;
}

.ed-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all var(--transition);
  z-index: 10;
}
.ed-slider-btn:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.05);
}
.ed-slider-btn.right {
  right: -22px;
}
@media (max-width: 768px) {
  .ed-slider-btn.right {
    right: 0;
  }
}

.ed-quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 0.4;
  color: var(--accent);
  opacity: 0.25;
  margin-bottom: 0.6rem;
}

.ed-quote-stars {
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.ed-quote-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-2);
  flex: 1;
}

#quotesSlider .ed-quote-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ed-quote-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.ed-quote-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.ed-quote-author .ed-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ed-quote-author .nm {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ed-quote-author .loc {
  font-size: 0.74rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}

@media (max-width: 768px) {
  .ed-quote {
    padding: 0.75rem;
  }
  .ed-quote-mark {
    font-size: 2rem;
    margin-bottom: 0.4rem;
  }
  .ed-quote-stars {
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
  }
  .ed-quote-text {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  .ed-quote-author {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    gap: 0.5rem;
  }
  .ed-quote-author img, 
  .ed-quote-author .ed-avatar {
    width: 34px;
    height: 34px;
  }
  .ed-quote-author .ed-avatar {
    font-size: 0.75rem;
  }
  .ed-quote-author .nm {
    font-size: 0.7rem;
  }
  .ed-quote-author .loc {
    font-size: 0.65rem;
  }
}

.ed-faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.crx-faq-item {
  border-bottom: 1px solid var(--line);
}

.crx-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.3rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
}

.crx-faq-item summary::-webkit-details-marker {
  display: none;
}

.crx-faq-item summary i {
  color: var(--accent);
  font-size: 0.8rem;
  transition: transform 0.3s var(--ease);
}

.crx-faq-item[open] summary i {
  transform: rotate(180deg);
}

.crx-faq-item p {
  padding: 0 0 1.4rem;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 0.98rem;
  max-width: 60ch;
}


.ed-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

.ed-contact-form-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin-bottom: 0.4rem;
}

.ed-contact-form-sub {
  color: var(--ink-soft);
  margin-bottom: 1.8rem;
}

.crx-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.crx-form-group {
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
}

.crx-form-group.crx-full-width {
  grid-column: 1 / -1;
}

.crx-form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  color: var(--ink-2);
}

.crx-form-group input,
.crx-form-group textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.98rem;
  padding: 0.95rem 1rem;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.crx-form-group input::placeholder,
.crx-form-group textarea::placeholder {
  color: #a39b8d;
}

.crx-form-group input:focus,
.crx-form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.crx-error-msg {
  color: #c0392b;
  font-size: 0.78rem;
  margin-top: 0.35rem;
  min-height: 1em;
}

.crx-form-success {
  text-align: center;
  padding: 2.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.crx-form-success i {
  color: #2e7d32;
  font-size: 2.4rem;
}

.crx-form-success h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0.8rem 0 0.4rem;
}

.crx-form-success p {
  color: var(--ink-soft);
}

.ed-map {
  min-height: 320px;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.ed-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  min-height: 320px;
}


.ed-cta {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.ed-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.ed-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  max-width: 22ch;
}

.ed-cta h2 em {
  font-style: italic;
  color: var(--gold);
}

.ed-cta p {
  color: #b6ad9f;
  margin-top: 0.6rem;
}


.crx-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
}

.crx-footer-container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.crx-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4rem;
}

.crx-footer-brand p {
  color: var(--ink-soft);
  margin-top: 0.8rem;
  max-width: 30ch;
  font-size: 0.95rem;
}

.crx-footer-brand .crx-logo-text {
  font-size: 1.9rem;
}

.crx-social-links {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.crx-social-links a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-2);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.crx-social-links a:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.crx-footer-col h2 {
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1rem;
}

.crx-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.crx-footer-col a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.crx-footer-col a:hover {
  color: var(--accent);
}

.crx-footer-bottom {
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
}


.crx-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 17, 14, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: edFade 0.25s ease;
}

.crx-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border-radius: 8px;
  padding: 2.4rem 2rem 2rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
  animation: edPop 0.3s var(--ease);
}

.crx-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.crx-modal-close:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.crx-modal-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.8rem;
  text-align: center;
}

.crx-modal-logo span::after {
  content: ".";
  color: var(--accent);
}

.crx-modal h2 {
  font-family: var(--font-display);
  text-align: center;
  font-size: 1.7rem;
  margin: 0.6rem 0 0.3rem;
}

.crx-modal-subtitle {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 1.6rem;
}

.crx-password-wrapper {
  position: relative;
  display: flex;
}

.crx-password-wrapper input {
  padding-right: 3rem;
}

.crx-toggle-password {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.crx-modal-footer-text {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.crx-form-link {
  color: var(--accent);
  font-weight: 600;
}

@keyframes edFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes edPop {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.ed-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.ed-reveal.is-visible {
  opacity: 1;
  transform: none;
}


.ed-history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-top: 2.6rem;
}

.ed-history-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 0;
}

.ed-history-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.ed-history-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 17, 14, 0.72), rgba(20, 17, 14, 0) 55%);
  pointer-events: none;
}

.ed-history-item:hover img {
  transform: scale(1.05);
}

.ed-history-year {
  position: absolute;
  left: 1.1rem;
  bottom: 0.85rem;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  color: #fff;
  letter-spacing: 0.01em;
}

.ed-history-year::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 0.5rem;
}


.ed-leader-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 2.6rem;
}

.ed-leader-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.ed-leader-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(20, 17, 14, 0.08);
  border-color: var(--line-strong);
}

.ed-leader-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.ed-leader-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-strong);
}

.ed-leader-crown {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold);
  border-radius: 50%;
  font-size: 0.7rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.ed-leader-grade {
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.ed-leader-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0.2rem 0 0.55rem;
  text-transform: capitalize;
}

.ed-leader-stats {
  display: flex;
  gap: 1.2rem;
  font-size: 0.85rem;
}

.ed-leader-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ed-leader-stats .streak {
  color: var(--accent);
  font-weight: 600;
}

.ed-leader-stats .pts {
  color: var(--ink-soft);
}

.ed-leader-stats .pts i {
  color: var(--gold);
}

@media (max-width: 768px) {
  .ed-leader-grid {
    gap: 0.6rem;
  }
  .ed-leader-card {
    padding: 0.8rem 1rem;
    gap: 1rem;
  }
  .ed-leader-avatar {
    width: 52px;
    height: 52px;
  }
  .ed-leader-name {
    font-size: 1.1rem;
    margin: 0.1rem 0 0.3rem;
  }
  .ed-leader-grade {
    font-size: 0.6rem;
  }
  .ed-leader-stats {
    gap: 0.8rem;
    font-size: 0.8rem;
  }
}

.ed-page-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.6rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}

.ed-page-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 1rem 0 0;
}

.ed-page-hero h1 em {
  font-style: italic;
}

.ed-page-hero .ed-lead {
  margin-top: 1.2rem;
}

.ed-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: center;
}

.ed-split-media {
  position: relative;
  isolation: isolate;
}

.ed-split-media img {
  width: 100%;
  height: clamp(280px, 42vw, 460px);
  object-fit: cover;
  border-radius: var(--radius);
}

.ed-split-media.framed::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  z-index: -1;
}

.ed-highlights {
  margin-top: 1.9rem;
  display: grid;
  gap: 1.1rem;
}

.ed-highlight {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.ed-highlight .num {
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 0.15rem;
  min-width: 1.6rem;
}

.ed-highlight span:last-child {
  color: var(--ink-soft);
  line-height: 1.6;
}

.ed-statband {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2rem 0;
}

.ed-statband-item .v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--ink);
  line-height: 1;
}

.ed-statband-item .v small {
  color: var(--accent);
  font-size: 0.5em;
  vertical-align: super;
}

.ed-statband-item .k {
  margin-top: 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.4;
}

.ed-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 2.6rem;
}

.ed-feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.ed-feature-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 14px 34px rgba(22, 35, 59, 0.08);
}

.ed-feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1.1rem;
}

.ed-feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.ed-feature-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.ed-prose {
  max-width: 72ch;
}

.ed-prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: var(--ink);
  margin: 2.4rem 0 0.8rem;
}

.ed-prose h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  margin: 1.7rem 0 0.5rem;
}

.ed-prose p,
.ed-prose li {
  color: var(--ink-soft);
  line-height: 1.8;
}

.ed-prose p {
  margin: 0 0 1rem;
}

.ed-prose ul {
  margin: 0 0 1.3rem;
  padding-left: 1.3rem;
}

.ed-prose li {
  margin-bottom: 0.5rem;
}

.ed-prose a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

.ed-prose strong {
  color: var(--ink);
  font-weight: 600;
}

.ed-prose-meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.ed-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}

.ed-info-item i {
  color: var(--accent);
  font-size: 1.1rem;
  padding-top: 0.2rem;
  width: 1.4rem;
  text-align: center;
}

.ed-info-item .lbl {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ed-info-item .val {
  color: var(--ink);
  font-size: 1.02rem;
}

.ed-info-item .val a {
  color: var(--ink);
}

.ed-info-item .val a:hover {
  color: var(--accent);
}


.ed-form-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  align-items: start;
  margin-top: 2.4rem;
}

.ed-form-main {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.crx-required {
  color: var(--accent);
}

.crx-field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

.crx-form-group select {
  width: 100%;
  font-family: inherit;
  font-size: 0.98rem;
  padding: 0.95rem 1rem;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.crx-form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.crx-checkbox-group {
  margin-top: 0.5rem;
}

.crx-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.crx-checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.crx-checkbox-custom {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  display: inline-grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.crx-checkbox-custom::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.7rem;
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.crx-checkbox-label input:checked+.crx-checkbox-custom {
  background: var(--ink);
  border-color: var(--ink);
}

.crx-checkbox-label input:checked+.crx-checkbox-custom::after {
  opacity: 1;
  transform: scale(1);
}

.crx-checkbox-label input:focus-visible+.crx-checkbox-custom {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.crx-terms-label {
  align-items: flex-start;
  line-height: 1.5;
}

.crx-terms-label a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

.crx-form-rules {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.crx-form-rules h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.crx-form-rules h2 i {
  color: var(--accent);
  font-size: 0.95rem;
}

.crx-form-rules>p {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
}

.crx-rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.crx-rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.45;
  transition: color 0.2s ease;
}

.crx-rules-list li i {
  color: var(--line-strong);
  font-size: 0.7rem;
  padding-top: 0.28rem;
  width: 0.9rem;
  text-align: center;
  transition: color 0.2s ease;
}

.crx-rule-ok {
  color: var(--ink);
}

.crx-rule-ok i {
  color: #2e7d32;
}

.crx-rule-ok i::before {
  content: "\f00c";
}

#formSuccess {
  text-align: center;
  padding: 2.6rem 1.5rem;
}

#formSuccess i {
  color: #2e7d32;
  font-size: 2.6rem;
}

#formSuccess h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0.8rem 0 0.4rem;
}

#formSuccess p {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.crx-center {
  text-align: center;
}



@media (max-width: 560px) {
  .crx-topbar-container {
    justify-content: center;
    text-align: center;
  }

  .crx-topbar-left {
    justify-content: center;
    gap: 1rem;
    width: 100%;
  }

  .crx-topbar-right {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 860px) {
  .crx-hamburger {
    display: flex;
  }

  .crx-nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(20, 17, 14, 0.1);
    padding: 0.5rem 1.25rem 1rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s var(--ease), opacity 0.25s ease;
  }

  .crx-nav-links.crx-open {
    max-height: 70vh;
    opacity: 1;
    pointer-events: auto;
  }

  .crx-nav-link {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
  }

  .crx-nav-link::after {
    display: none;
  }

  .crx-nav-container {
    position: relative;
  }
}

@media (min-width: 640px) {
  .ed-subject-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
  }

  .ed-bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento-wide {
    grid-column: 1 / -1;
  }

  .ed-programs {
    grid-template-columns: repeat(3, 1fr);
  }

  .ed-quotes .ed-quote {
    flex: 0 0 calc(50% - 0.6rem);
  }

  .ed-history-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ed-leader-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ed-feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ed-statband {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 900px) {
  body {
    font-size: 18px;
  }

  .ed-container {
    padding-inline: 2rem;
  }

  .crx-topbar-container,
  .crx-nav-container,
  .crx-footer-container {
    padding-inline: 2rem;
  }

  .ed-hero {
    min-height: clamp(460px, 46vw, 600px);
    display: flex;
    align-items: center;
    padding-top: clamp(2rem, 4vw, 3rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
  }

  .ed-hero-text {
    max-width: min(50%, 600px);
  }

  .ed-hero-montage {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: clamp(380px, 48vw, 980px);
    height: auto;
    border-radius: 0;
    z-index: 1;
    clip-path: polygon(13% 0, 100% 0, 100% 100%, 0 100%);
  }

  .ed-founder-inner {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .ed-subjects-head {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .ed-bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(200px, auto);
  }

  .bento-large {
    grid-column: span 2;
    grid-row: span 2;
  }

  .ed-faq-grid {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .ed-contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ed-quotes .ed-quote {
    flex: 0 0 calc(33.333% - 0.8rem);
  }

  .ed-history-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ed-subject-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ed-leader-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ed-feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ed-split {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .ed-form-layout {
    grid-template-columns: 1.4fr 0.6fr;
  }

  .ed-form-aside .crx-form-rules {
    position: sticky;
    top: 92px;
  }

  .crx-footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }

}

@media (min-width: 1280px) {
  .ed-hero-title {
    font-size: 5.4rem;
  }
}


@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .ed-reveal {
    opacity: 1;
    transform: none;
  }

  /* Keep decorative scrolling banners alive even with reduced motion */
  .ed-hero-track {
    animation: edHeroScroll 38s linear infinite !important;
  }

  .ed-marquee-track {
    animation: ed-marquee 60s linear infinite !important;
  }
}

/* Feature grid in enroll.html */
.ed-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ed-feature-card {
  background: var(--paper);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.ed-feature-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.ed-feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.ed-feature-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .ed-subject-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
  }
  .ed-subject-card p {
    font-size: 0.82rem;
    line-height: 1.4;
  }
  .ed-subject-body {
    padding: 1rem 1.1rem 0.9rem;
  }
  .ed-subject-img-wrap.ed-subject-icon-wrap {
    font-size: 2.2rem;
  }
  .ed-subject-img-wrap {
    aspect-ratio: 16 / 7;
  }

  /* Make features grid smaller on phones */
  .ed-features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .ed-feature-card {
    padding: 1.25rem;
  }
  .ed-feature-icon {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  .ed-feature-card h3 {
    font-size: 1.1rem;
  }
  .ed-feature-card p {
    font-size: 0.85rem;
  }

  /* Make history images smaller on phones and full-bleed */
  .ed-history-grid {
    margin-inline: -1.25rem;
  }
  .ed-history-item {
    border-radius: 0;
  }
  .ed-history-item img {
    height: 160px;
  }
  .ed-history-year {
    font-size: 1.4rem;
    left: 0.8rem;
    bottom: 0.6rem;
  }
}
/* Testimonials Grid Page Specific */

.ed-quotes-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-auto-rows: 1fr;
  gap: 1rem;
  overflow: visible !important;
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  padding-bottom: 0 !important;
  scrollbar-width: auto;
}
.ed-quotes-grid .ed-quote {
  flex: none !important;
  width: 100%;
  height: 100%;
  margin-bottom: 0;
  scroll-snap-align: none !important;
}
@media (min-width: 768px) {
  .ed-quotes-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (min-width: 1024px) {
  .ed-quotes-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* =====================================================================
   FULL-VIEWPORT SECTIONS  —  index.html only (body.ed-vp), desktop ≥900px
   ---------------------------------------------------------------------
   Every major section fills one screen so the whole thing is taken in at
   a glance, no scrolling needed. Content is vertically centred. We use
   min-height (never a fixed height) so a section that is genuinely taller
   than a short laptop screen GROWS and scrolls instead of clipping. Media
   sizes are keyed to vh so dense sections shrink on small screens and
   breathe on large monitors. Mobile (<900px) is intentionally untouched.
   ===================================================================== */
@media (min-width: 900px) {

  /* Hero fills the first screen minus the top bar + sticky nav (~100px),
     so bar + nav + hero are all visible together on load. */
  .ed-vp .ed-hero {
    min-height: calc(100vh - 100px);
  }

  /* Each content section below the hero = exactly one screen, centred. */
  .ed-vp .ed-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: clamp(2.5rem, 4.5vh, 4.5rem);
    scroll-margin-top: 90px;
  }

  /* The container is the centred flex child — let it use the full width. */
  .ed-vp .ed-section > .ed-container {
    width: 100%;
  }

  /* Founder: make the inner grid fill the section's full height so the
     portrait (position:absolute; bottom:0) seats against the SECTION's
     bottom edge on every screen height — no fixed pixel offset that drifts
     from screen to screen. */
  .ed-vp #founder.ed-section { justify-content: stretch; }
  .ed-vp #founder.ed-section > .ed-container {
    flex: 1;
    display: flex;
    align-items: stretch;
  }
  .ed-vp #founder .ed-founder-inner {
    width: 100%;
    align-self: stretch;
    grid-template-rows: 1fr auto;
  }
  .ed-vp #founder .ed-founder-media {
    align-self: stretch;
    height: auto;
  }

  /* --- Per-section compaction (heights keyed to viewport height) --- */

  /* History: 6 photos in two rows — photo height tracks the viewport. */
  .ed-vp #history .ed-history-grid {
    margin-top: clamp(1.4rem, 3vh, 2.6rem);
  }
  .ed-vp #history .ed-history-item img {
    height: clamp(160px, 23vh, 300px);
  }

  /* #subjects is intentionally allowed to exceed one screen so its welcome
     video can stay large — no compaction applied to this section. */

  /* Learning resources: bento rows track the viewport height. */
  .ed-vp #learning-resources .ed-bento-grid {
    grid-auto-rows: minmax(15vh, auto);
    margin-top: clamp(1.4rem, 3vh, 2.4rem);
  }

  /* Hall of fame + leader cards: trim the top gap. */
  .ed-vp #interactive-students .ed-leader-grid {
    margin-top: clamp(1.4rem, 3vh, 2.6rem);
  }

  /* Testimonials: tighten the slider link + guest review form so the
     quotes and the form share one screen. */
  .ed-vp #testimonials .ed-quotes-wrapper ~ div {
    margin-top: clamp(1rem, 2vh, 1.6rem) !important;
  }
  .ed-vp #testimonials .ed-container > div:last-child {
    padding-top: clamp(1rem, 2vh, 1.5rem) !important;
  }
  .ed-vp #testimonials .ed-subjects-head {
    margin-bottom: clamp(1rem, 2vh, 1.8rem);
  }
}

/* ---------------------------------------------------------------------
   SHORT desktop screens (e.g. 1366×768, 1600×900).
   Width-based clamp() fonts stay large on a wide-but-short screen, so the
   text-heavy sections need extra compression to still fit one screen.
   Only applies at >=900px wide AND <=900px tall — the 1080p sizing above
   is untouched. Mobile is untouched.
   --------------------------------------------------------------------- */
@media (min-width: 900px) and (max-height: 900px) {
  .ed-vp .ed-section,
  .ed-vp .ed-hero {
    padding-block: clamp(1.4rem, 3vh, 3rem);
  }

  /* Hero */
  .ed-vp .ed-hero-main-logo { max-width: 160px; margin-top: -1.2rem; }
  .ed-vp .ed-hero-title { font-size: clamp(2rem, 3.4vw, 2.9rem); margin-top: 0.6rem; }
  .ed-vp .ed-hero-sub { font-size: 0.98rem; margin-top: 0.85rem; }
  .ed-vp .ed-hero-cta { margin-top: 1.1rem; }
  .ed-vp .ed-hero-meta { margin-top: 1.2rem; padding-top: 1rem; gap: 1.6rem; }
  .ed-vp .ed-hero-meta .num { font-size: 1.5rem; }

  /* Founder */
  .ed-vp .ed-founder-name { margin: 0.5rem 0 0.5rem; }
  .ed-vp .ed-founder-name .first { font-size: 1.35rem; }
  .ed-vp .ed-founder-name .last { font-size: clamp(2.2rem, 5vw, 3.1rem); }
  .ed-vp .ed-founder-quote { font-size: 1.05rem; margin: 1rem 0; }
  .ed-vp .ed-stats { padding: 1rem 0; margin-bottom: 1rem; }
  .ed-vp .ed-stat .v { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }

  /* Section headings a touch tighter */
  .ed-vp .ed-section .ed-title { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
  .ed-vp .ed-section .ed-lead { font-size: 0.98rem; }
  .ed-vp .ed-kicker { margin-bottom: 1rem; }

  /* Learning resources bento */
  .ed-vp #learning-resources .ed-bento-card { padding: 1.4rem; gap: 0.6rem; }
  .ed-vp #learning-resources .ed-bento-card h3 { font-size: 1.4rem; }
  .ed-vp #learning-resources .ed-bento-card p { font-size: 0.9rem; line-height: 1.45; }

  /* Founder portrait on short screens: same height-driven, bottom-seated
     approach. Smaller bottom padding here (3vh) → slightly less translateY. */
  .ed-vp .ed-founder-portrait {
    height: clamp(560px, 112vh, 1120px);
    transform: translate(-50%, 25%);
  }
  .ed-vp .ed-founder-media:hover .ed-founder-portrait {
    transform: translate(-50%, 25%) scale(1.03);
  }

  /* Testimonials */
  .ed-vp #testimonials .ed-quote-text { font-size: 0.9rem; }
  .ed-vp #testimonials .ed-quote { padding: 0.75rem; }
  .ed-vp #testimonials .crx-input { padding: 0.5rem !important; font-size: 0.8rem !important; }
  .ed-vp #testimonials .ed-container > div:last-child h3 { font-size: 1rem; margin-bottom: 0.25rem; }
  .ed-vp #testimonials .ed-container > div:last-child > p { font-size: 0.8rem; margin-bottom: 0.6rem; }

  /* Cap long bento copy to a few lines on short screens; full text lives
     on the linked pages. */
  .ed-vp #learning-resources .ed-bento-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ed-vp #learning-resources .ed-bento-card { padding: 1.2rem; }
  .ed-vp #testimonials .ed-quote-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Final close-the-gap trim for learning-resources at ~768px. */
  .ed-vp #learning-resources .ed-bento-grid { grid-auto-rows: minmax(13.5vh, auto); }

  /* Combined FAQ + Contact — tighten on short screens. */
  .ed-vp .ed-fc-faq-list { margin-top: 1rem; }
  .ed-vp .ed-fc-contact form { margin-top: 0.8rem; }
  .ed-vp .ed-fc-contact .crx-form-group { margin-bottom: 0.7rem; }
  .ed-vp .ed-fc-contact .ed-map-compact { margin-top: 0.8rem; }
}

/* =====================================================================
   Combined FAQ + Contact ("Send us a message") — shown as one viewport.
   FAQ on the left; the message form + a compact map on the right.
   ===================================================================== */
.ed-fc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(4rem, 8vw, 6rem);
  align-items: start;
}

.ed-fc-faq-list {
  margin-top: clamp(1.4rem, 3vw, 2rem);
}

.ed-fc-contact .ed-contact-form-title {
  margin-top: 0.8rem;
}

.ed-fc-contact form {
  margin-top: 1.1rem;
}

/* Compact map under the form */
.ed-map-compact {
  min-height: 0;
  height: auto;
  margin-top: 1.2rem;
}

.ed-fc-contact .ed-map-compact iframe {
  min-height: 0;
  height: clamp(150px, 30vw, 220px);
}

@media (min-width: 900px) {
  .ed-fc-grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(5rem, 8vw, 7rem);
  }

  .ed-fc-contact .ed-map-compact iframe {
    height: clamp(140px, 17vh, 190px);
  }
}

/* Mobile Three-Column Footer overrides */
@media (max-width: 768px) {
  .crx-footer-grid {
    grid-template-columns: 1fr 1fr 1fr !important;
    text-align: left !important;
    gap: 1rem !important;
  }
  .crx-footer-brand {
    grid-column: 1 / -1 !important;
    text-align: left !important;
  }
  .crx-footer-grid > div:nth-child(n+2) {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .crx-footer-col h2 {
    font-size: 0.8rem;
  }
  .crx-footer-col a {
    font-size: 0.75rem;
  }
}
