/* Refined mathematics cover with dimensional type, 2026-09-29. */
.rebuild-nav .rebuild-brand {
  flex: 0 0 auto;
  gap: 0;
  font-size: clamp(17px, 1.55vw, 21px);
  line-height: 1.3;
  letter-spacing: .035em;
  white-space: nowrap;
}
.rebuild-nav .rebuild-brand img,
.rebuild-nav .rebuild-brand br { display: none; }
.rebuild-nav .rebuild-brand span { display: inline; }
.rebuild-nav .rebuild-brand b { margin-left: .4em; }

.brand-hero {
  align-items: center;
  padding-block: 70px;
  min-height: 620px;
  isolation: isolate;
  background-color: #f5f4f0;
  background-image: linear-gradient(120deg, #fbf7ed73 0%, #fcfaf43f 40%, #e2eaf126 75%, #e8e4f24d 100%), url('/assets/ace-math-board-20260929.svg?v=gray-set');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.brand-hero::before { display: none; }
.brand-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, #ececea66 0%, #ececea40 36%, #ececea14 57%, #ececea00 100%);
}
.brand-hero h1 {
  margin: 0 0 30px;
  font-size: clamp(62px, 6.6vw, 94px);
  letter-spacing: -.045em;
  line-height: 1.25;
  white-space: nowrap;
  color: #183b59;
  -webkit-text-stroke: .15px #f1e9d9;
  text-shadow: 0 1px 0 #f7f2e8, 0 3px 0 #aab8bf, 0 5px 0 #536c80, 0 13px 20px #17334a24;
}
.brand-hero-copy { padding-block: 24px; }
.brand-hero-copy::before {
  display: none;
}
.brand-hero-copy .brand-eyebrow { display: none; }
.brand-hero-copy .ace-cover-subtitle {
  margin: 0 0 22px;
  color: #286c72;
  font-family: "Noto Serif TC", "Source Han Serif TC", serif;
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .12em;
  -webkit-text-stroke: .35px #fbf8ef;
  paint-order: stroke fill;
  text-shadow: -1px -1px 0 #fffef7, 1px -1px 0 #fffef7, -1px 1px 0 #fffef7, 1px 1px 0 #fffef7, 2px 3px 0 #1e4b571a;
}
.brand-hero-copy .brand-lead {
  display: table;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 38px;
  padding: 11px 25px 12px;
  border: 1px solid #c2ad817a;
  border-radius: 999px;
  color: #fffaf0;
  background: linear-gradient(105deg, #205c68 0%, #284b67 62%, #354663 100%);
  box-shadow: inset 0 1px 0 #ffffff2e, 0 7px 19px #263e4f20;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .1em;
  text-shadow: none;
}

/* Four distinct learning pathways, drawn as a refined square-step progression. */
.brand-method.ace-program-pathway {
  display: block;
  padding: 100px max(30px, calc(50% - 660px)) 124px;
  color: #17334b;
  background:
    radial-gradient(ellipse at 50% 0%, #ffffffbd 0%, #ffffff00 56%),
    linear-gradient(145deg, #f2f0e9 0%, #f8f7f2 52%, #eeeee8 100%);
}
.ace-programs-header {
  max-width: 950px;
  margin: 0 auto;
  text-align: center;
}
.brand-method.ace-program-pathway .section-kicker {
  margin: 0 0 20px;
  color: #9b7950;
  font: 700 13px/1.5 "DM Sans", sans-serif;
  letter-spacing: .22em;
}
.brand-method.ace-program-pathway .ace-programs-header h2 {
  margin: 0;
  color: #173b5c;
  font-size: clamp(34px, 4.3vw, 58px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.ace-programs-subtitle {
  margin: 17px 0 0;
  color: #536b79;
  font-size: clamp(18px, 1.8vw, 23px);
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: .025em;
}
.ace-programs-caption {
  margin: 12px 0 0;
  color: #8a8171;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .045em;
}
.ace-programs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: clamp(12px, 1.6vw, 22px);
  margin: 50px auto 0;
  max-width: 1320px;
}
.ace-program-card {
  position: relative;
  display: flex;
  aspect-ratio: 1;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  padding: clamp(19px, 2vw, 29px);
  border: 1px solid #d8d2c4;
  border-radius: 3px;
  color: #183b59;
  background: linear-gradient(145deg, #fffefa 0%, #f7f5ee 100%);
  box-shadow: 0 12px 26px #394b5410, inset 0 1px 0 #ffffff;
}
.ace-program-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 54px;
  height: 3px;
  background: #6b9f9c;
  content: "";
}
.ace-program-card:nth-child(2)::before { background: #819d9a; }
.ace-program-card:nth-child(3)::before { background: #ae9365; }
.ace-program-card:nth-child(1) { margin-top: 63px; }
.ace-program-card:nth-child(2) { margin-top: 42px; }
.ace-program-card:nth-child(3) { margin-top: 21px; }
.ace-program-overline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 13px;
  color: #8d795c;
  font: 700 10px/1.4 "DM Sans", sans-serif;
  letter-spacing: .14em;
}
.ace-program-code {
  margin: 0;
  color: #183e5e;
  font: 700 clamp(42px, 4.3vw, 58px)/.98 "Noto Serif TC", Georgia, serif;
  letter-spacing: .025em;
}
.ace-program-card h3 {
  margin: 14px 0 3px;
  color: #1d3d58;
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: .02em;
  text-wrap: balance;
}
.ace-program-english {
  min-height: 2.8em;
  margin: 0;
  color: #71808a;
  font: italic 500 clamp(12px, 1.1vw, 14px)/1.5 Georgia, "Times New Roman", serif;
  letter-spacing: .015em;
}
.ace-program-rule {
  display: block;
  width: 38px;
  height: 1px;
  margin: 14px 0 11px;
  background: #b59a6e;
}
.ace-program-focus {
  margin: 0;
  color: #566b76;
  font-size: clamp(12px, 1.05vw, 14px);
  font-weight: 650;
  line-height: 1.85;
  letter-spacing: .015em;
  text-wrap: balance;
}
.ace-program-focus span { padding: 0 .12em; color: #b09469; font-weight: 400; }
.ace-program-featured {
  border: 1px solid #bba06e;
  color: #f8f4e8;
  background:
    radial-gradient(ellipse at 100% 0%, #51728470 0%, #51728400 54%),
    linear-gradient(145deg, #173a56 0%, #102b42 100%);
  box-shadow: 0 24px 42px #19394b30, inset 0 0 0 4px #ffffff08, inset 0 1px 0 #f3e5c169;
}
.ace-program-featured::before {
  top: 14px;
  left: 14px;
  width: 29px;
  height: 29px;
  border: 1px solid #cdb57f;
  border-radius: 50%;
  background: transparent;
  content: "🏆";
  color: #e4ca8c;
  font-size: 14px;
  line-height: 27px;
  text-align: center;
}
.ace-program-featured .ace-program-overline {
  color: #d7bf88;
  padding-left: 38px;
}
.ace-program-featured .ace-program-overline span { display: none; }
.ace-program-featured .ace-program-code { color: #f0d69a; }
.ace-program-featured h3 {
  margin-top: 13px;
  color: #fff9ed;
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: clamp(17px, 1.55vw, 21px);
  letter-spacing: .005em;
}
.ace-program-featured .ace-program-english {
  min-height: 0;
  color: #d6c18f;
  font: 600 clamp(13px, 1.15vw, 15px)/1.75 "Noto Sans TC", sans-serif;
}
.ace-program-featured .ace-program-rule { width: 52px; height: 2px; background: #c7a86c; }
.ace-program-featured .ace-program-focus { color: #e4e5dd; }
.ace-program-featured .ace-program-focus span { color: #dfc17e; }
.brand-hero .brand-actions .primary-link {
  background: #254b68;
  border: 1px solid #254b68;
  box-shadow: 0 7px 20px #2e4c6421;
}
.brand-hero .brand-actions .primary-link:hover {
  background: #1a3d58;
  box-shadow: 0 9px 23px #2e4c6430;
}
.brand-hero-art {
  min-height: 0;
  width: 100%;
  aspect-ratio: 1;
  margin-block: 0;
}
.brand-hero-art img {
  z-index: 4;
  top: 50%;
  left: 50%;
  width: min(68%, 390px);
  max-width: 390px;
  height: auto;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 1px #ffffff80) drop-shadow(0 19px 24px #29445f26);
}
.brand-hero-art p,
.brand-hero-art > span { display: none; }

.brand-manifesto.ace-learning-manifesto {
  display: block;
  padding-block: 88px 70px;
  background: #153e5d;
  color: #edf5f4;
}
.ace-learning-intro {
  padding-bottom: 32px;
  border-bottom: 1px solid #a8c2c833;
}
.brand-manifesto .ace-learning-intro h2 {
  margin: 0 0 22px;
  font-size: clamp(32px, 3.65vw, 49px);
  line-height: 1.5;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.ace-learning-intro h3 {
  margin: 0;
  color: #a8d9d7;
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: .025em;
}
.ace-learning-body {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 56px;
  margin-top: 32px;
}
.ace-learning-body p {
  margin: 0;
  color: #c7dbe3;
  font-size: 17px;
  font-weight: 400;
  line-height: 2;
}
.ace-learning-body strong { color: #f5f4ed; font-weight: 700; }
.ace-learning-body .ace-learning-core { font-size: 19px; line-height: 1.95; }
.ace-learning-paths {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 34px 0 0;
  padding-top: 28px;
  border-top: 1px solid #b6a47859;
  color: #ddcaa2;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: .04em;
}
.ace-learning-paths > span { white-space: nowrap; }
.ace-learning-paths .ace-path-divider { margin-left: 14px; color: #a2c1c5; font-weight: 400; }

@media (max-width: 800px) {
  .brand-manifesto.ace-learning-manifesto { padding-block: 60px 48px; }
  .ace-learning-body { grid-template-columns: 1fr; gap: 22px; margin-top: 26px; }
  .ace-learning-body .ace-learning-core { font-size: 18px; }
  .ace-learning-paths { gap: 7px 9px; }
  .ace-learning-paths .ace-path-divider { margin-left: 9px; }
  .brand-hero {
    padding-block: 48px 32px;
    min-height: 0;
    background-position: 64% center;
  }
  .brand-hero::after {
    background: linear-gradient(180deg, #ececeac8 0%, #ececeaab 33%, #ececea26 69%, #ececea08 100%);
  }
  .brand-hero h1 { font-size: clamp(36px, 8.8vw, 64px); }
  .brand-hero-copy { padding-block: 12px; }
  .brand-hero-copy::before { margin-bottom: 20px; }
  .brand-hero-art {
    width: min(100%, 600px);
    margin: 16px auto;
  }
}
@media (max-width: 600px) {
  .brand-manifesto .ace-learning-intro h2 { font-size: 29px; line-height: 1.55; }
  .ace-learning-intro h3 { font-size: 18px; line-height: 1.8; }
  .ace-learning-body p,
  .ace-learning-body .ace-learning-core { font-size: 16px; line-height: 1.95; }
  .ace-learning-paths { font-size: 16px; gap: 6px; }
  .ace-learning-paths .ace-path-divider { margin-left: 6px; }
  .rebuild-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    padding-block: 16px 12px;
  }
  .rebuild-nav .rebuild-brand {
    grid-column: 1 / -1;
    justify-self: center;
    font-size: 20px;
  }
  .rebuild-nav .rebuild-links { gap: clamp(14px, 5vw, 28px); }
  .rebuild-nav .rebuild-cta { justify-self: end; }
  .brand-hero { padding-block: 36px 40px; background-position: 65% center; }
  .brand-hero::before { display: none; }
  .brand-hero h1 {
    font-size: clamp(36px, 11.5vw, 52px);
    margin-bottom: 24px;
    -webkit-text-stroke: .25px #c2cfda;
    text-shadow: -.6px -.6px 0 #fff8e9, 1px 1px 0 #99aab9, 2px 2px 0 #526d86, 3px 3px 0 #27425c, 4px 6px 9px #243c5826;
  }
  .brand-hero-copy .ace-cover-subtitle { font-size: clamp(21px, 6vw, 27px); letter-spacing: .09em; margin-bottom: 18px; }
  .brand-hero-copy .brand-lead { font-size: clamp(15px, 4.2vw, 18px); padding: 10px 17px; letter-spacing: .07em; margin-bottom: 30px; }
}

@media (max-width: 1100px) {
  .ace-programs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 760px;
  }
  .ace-program-card:nth-child(n) { margin-top: 0; }
  .ace-program-card { padding: clamp(24px, 4vw, 38px); }
  .ace-program-code { font-size: clamp(48px, 7vw, 66px); }
  .ace-program-card h3 { font-size: clamp(22px, 3vw, 28px); }
  .ace-program-english { font-size: clamp(14px, 1.8vw, 17px); }
  .ace-program-focus { font-size: clamp(14px, 1.7vw, 17px); }
}

@media (max-width: 800px) {
  .brand-hero h1 { font-size: clamp(42px, 9.5vw, 72px); }
  .brand-method.ace-program-pathway { padding: 76px 25px 92px; }
  .ace-programs-grid { margin-top: 38px; }
}

@media (max-width: 600px) {
  .brand-hero h1 {
    font-size: clamp(42px, 12vw, 58px);
    -webkit-text-stroke: .15px #f1e9d9;
    text-shadow: 0 1px 0 #f7f2e8, 0 2px 0 #aab8bf, 0 4px 0 #536c80, 0 10px 15px #17334a22;
  }
  .brand-method.ace-program-pathway { padding: 64px 22px 76px; }
  .brand-method.ace-program-pathway .ace-programs-header h2 { font-size: clamp(30px, 8.5vw, 38px); }
  .ace-programs-subtitle { font-size: 17px; }
  .ace-programs-caption { max-width: 32em; margin-inline: auto; font-size: 13px; }
  .ace-programs-grid {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 420px);
    margin-top: 29px;
    gap: 15px;
  }
  .ace-program-card {
    aspect-ratio: 1;
    width: 100%;
    padding: clamp(25px, 8vw, 37px);
  }
  .ace-program-overline { margin-bottom: 15px; font-size: 11px; }
  .ace-program-code { font-size: clamp(53px, 15vw, 64px); }
  .ace-program-card h3 { margin-top: 15px; font-size: clamp(23px, 7vw, 28px); }
  .ace-program-english { min-height: 0; font-size: 15px; }
  .ace-program-rule { margin: 15px 0 12px; }
  .ace-program-focus { font-size: 14px; }
  .ace-program-featured h3 { font-size: clamp(19px, 5.3vw, 23px); }
  .ace-program-featured .ace-program-english { font-size: 15px; }
}

/* Calm, editorial cover treatment: one restrained relief layer, warm paper and mathematical geometry. */
.brand-hero {
  background-color: #f5f2e9;
  background-image:
    linear-gradient(112deg, #f7f4ece8 0%, #f4f1e8cf 43%, #eef1edbf 100%),
    url('/assets/ace-math-board-20260929.svg?v=chalkboard-cover');
  background-position: center;
  background-size: cover;
}
.brand-hero::after {
  background: linear-gradient(90deg, #f7f3ead1 0%, #f5f2ea9c 37%, #eef0ea20 61%, #eef0ea00 100%);
}
.brand-hero h1 {
  color: #183b58;
  font-weight: 700;
  letter-spacing: -.02em;
  -webkit-text-stroke: 0;
  text-shadow: 0 3px 0 #91a1a4;
  filter: drop-shadow(0 9px 12px #17354b1b);
}
.brand-hero h1::after {
  display: block;
  width: 68px;
  height: 3px;
  margin-top: 13px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ae8d59, #5a9694);
  content: "";
}
.brand-hero-copy .ace-cover-subtitle {
  color: #28636d;
  -webkit-text-stroke: 0;
  text-shadow: none;
  letter-spacing: .105em;
}
.brand-hero-copy .brand-lead {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 54px;
  padding: 11px 22px 12px;
  border: 1px solid #baa577;
  border-left-width: 4px;
  border-radius: 2px;
  color: #284a61;
  background: #f8f5edeb;
  box-shadow: 0 8px 20px #263d4c12, inset 0 1px 0 #ffffff;
  font-size: clamp(16px, 1.55vw, 20px);
  letter-spacing: .075em;
  text-shadow: none;
}
.brand-hero-art::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 126%;
  aspect-ratio: 1;
  border: 1px solid #ac956d68;
  border-radius: 50%;
  background:
    linear-gradient(0deg, transparent calc(50% - .5px), #5c8d8d23 50%, transparent calc(50% + .5px)),
    linear-gradient(90deg, transparent calc(50% - .5px), #5c8d8d23 50%, transparent calc(50% + .5px));
  box-shadow: 0 0 0 16px #fffdf32d, 0 0 0 42px #769c9b12;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.brand-hero-art::after {
  position: absolute;
  z-index: 2;
  top: 6%;
  right: -1%;
  color: #617b85a6;
  content: "x² + y² = r²";
  font: italic 500 clamp(13px, 1.3vw, 18px)/1 Georgia, serif;
  letter-spacing: .04em;
  pointer-events: none;
}
@media (max-width: 800px) {
  .brand-hero {
    background-position: 64% center;
  }
  .brand-hero::after {
    background: linear-gradient(180deg, #f7f4eceb 0%, #f5f2eabf 41%, #f0f0e838 75%, #f0f0e810 100%);
  }
  .brand-hero-art::before { width: 112%; }
  .brand-hero-art::after { top: 0; right: 2%; }
}
@media (max-width: 600px) {
  .brand-hero h1 {
    font-size: clamp(40px, 11.5vw, 54px);
    text-shadow: 0 2px 0 #91a1a4;
  }
  .brand-hero h1::after { width: 52px; height: 2px; margin-top: 10px; }
  .brand-hero-copy .ace-cover-subtitle { letter-spacing: .07em; }
  .brand-hero-copy .brand-lead { min-height: 48px; padding: 9px 15px; font-size: 15px; }
}

/* A measured motion system adds rhythm without turning the mark into a spinning toy. */
.brand-hero-copy .brand-eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 20px;
  color: #526d7e;
  font: 700 12px/1.4 "DM Sans", sans-serif;
  letter-spacing: .2em;
}
.brand-hero-copy .brand-eyebrow i {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin: 0;
  border-radius: 50%;
  background: #b28f58;
  box-shadow: 0 0 0 4px #b28f581c;
}
.brand-hero-copy .brand-eyebrow { animation: ace-copy-arrive .72s cubic-bezier(.2,.75,.25,1) .04s both; }
.brand-hero-copy h1 { animation: ace-copy-arrive .78s cubic-bezier(.2,.75,.25,1) .14s both; }
.brand-hero-copy .ace-cover-subtitle { animation: ace-copy-arrive .72s cubic-bezier(.2,.75,.25,1) .27s both; }
.brand-hero-copy .brand-lead { animation: ace-copy-arrive .72s cubic-bezier(.2,.75,.25,1) .38s both; }
.brand-hero-copy .brand-actions { animation: ace-copy-arrive .72s cubic-bezier(.2,.75,.25,1) .5s both; }
.brand-hero-art { animation: ace-art-drift 9s ease-in-out 1.1s infinite; }
.brand-hero-art img { animation: ace-logo-arrive .95s cubic-bezier(.2,.75,.25,1) .12s both; }
.brand-hero-art::before { animation: ace-ring-breathe 12s ease-in-out infinite; }
.brand-hero .brand-actions .primary-link {
  transition: transform .28s ease, box-shadow .28s ease, background-color .28s ease;
}
.brand-hero .brand-actions .primary-link b { display: inline-block; transition: transform .28s ease; }
.brand-hero .brand-actions .primary-link:hover { transform: translateY(-3px); }
.brand-hero .brand-actions .primary-link:hover b { transform: translateY(3px); }
.brand-hero .brand-actions .quiet-link { transition: color .22s ease; }
.brand-hero .brand-actions .quiet-link:hover { color: #a17e49; }
.ace-program-card {
  transition: transform .32s cubic-bezier(.2,.75,.25,1), box-shadow .32s ease, border-color .32s ease;
}
.ace-program-card:not(.ace-program-featured):hover {
  transform: translateY(-5px);
  border-color: #b9a477;
  box-shadow: 0 19px 34px #263e4c1c, inset 0 1px 0 #ffffff;
}
.ace-program-featured:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 48px #19394b3d, inset 0 0 0 4px #ffffff0b, inset 0 1px 0 #f3e5c180;
}
@keyframes ace-copy-arrive {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ace-logo-arrive {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.955); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes ace-art-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes ace-ring-breathe {
  0%, 100% { opacity: .56; scale: .985; }
  50% { opacity: .95; scale: 1.015; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-hero-copy .brand-eyebrow,
  .brand-hero-copy h1,
  .brand-hero-copy .ace-cover-subtitle,
  .brand-hero-copy .brand-lead,
  .brand-hero-copy .brand-actions,
  .brand-hero-art,
  .brand-hero-art img,
  .brand-hero-art::before {
    animation: none !important;
    opacity: 1;
  }
  .brand-hero .brand-actions .primary-link,
  .brand-hero .brand-actions .primary-link b,
  .brand-hero .brand-actions .quiet-link,
  .ace-program-card { transition: none; }
}

/* ACE core class detail: a dedicated, expanded view opened from the ACE overview tile. */
body.ace-core-detail-open { overflow: hidden; }
.ace-core-detail {
  position: fixed;
  z-index: 10000;
  inset: 0;
  overflow-y: auto;
  color: #173b57;
  background: #f6f5ef;
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .32s ease, transform .38s cubic-bezier(.2,.75,.25,1);
  overscroll-behavior: contain;
}
.ace-core-detail.is-visible { opacity: 1; transform: translateY(0); }
.ace-core-detail a { color: inherit; text-decoration: none; }
.ace-core-nav {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px max(26px, calc(50% - 620px));
  border-bottom: 1px solid #dcd9ce;
  background: #fbfaf5ee;
  backdrop-filter: blur(14px);
}
.ace-core-wordmark { color: #173b57; font: 700 18px/1.3 "Noto Serif TC", serif; letter-spacing: .04em; }
.ace-core-wordmark span { color: #2a7276; }
.ace-core-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid #c7b58e;
  color: #36596c;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s ease, color .2s ease;
}
.ace-core-back:hover { color: #fff; background: #173b57; }
.ace-core-content { width: 100%; margin: 0 auto; }
.ace-core-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  align-items: center;
  gap: clamp(40px, 8vw, 115px);
  max-width: 1360px;
  min-height: 540px;
  margin: auto;
  padding: 72px 38px 76px;
}
.ace-core-hero-copy { max-width: 690px; }
.ace-core-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: #a08354;
  font: 700 12px/1.6 "DM Sans", sans-serif;
  letter-spacing: .16em;
}
.ace-core-kicker > span,
.ace-core-kicker i {
  display: inline-grid;
  place-items: center;
  min-width: 35px;
  min-height: 28px;
  padding: 0 7px;
  border: 1px solid #c7ae7e;
  color: #23445c;
  font: 800 12px/1 "DM Sans", sans-serif;
  font-style: normal;
  letter-spacing: .07em;
}
.ace-core-kicker i { margin-left: 2px; color: #2c7476; }
.ace-core-hero h1 {
  margin: 0;
  color: #173b57;
  font: 700 clamp(40px, 5vw, 68px)/1.3 "Noto Serif TC", "Source Han Serif TC", serif;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.ace-core-hero h2 {
  margin: 21px 0 16px;
  color: #327478;
  font: 700 clamp(20px, 2.1vw, 27px)/1.7 "Noto Serif TC", serif;
  letter-spacing: .04em;
}
.ace-core-hero-copy > p:not(.ace-core-kicker) {
  max-width: 650px;
  margin: 0;
  color: #536b77;
  font-size: 17px;
  font-weight: 500;
  line-height: 2;
}
.ace-core-grade-tag {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-top: 26px;
  padding: 10px 14px;
  border-left: 3px solid #b3945f;
  color: #4d6471;
  background: #ebe8de;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
}
.ace-core-grade-tag b { color: #173b57; font: 700 15px/1 "DM Sans", sans-serif; letter-spacing: .12em; }
.ace-core-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 390px);
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid #a98e5e75;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffffc9 0%, #f4f1e7a1 49%, #e8ece76b 72%, #e8ece700 73%);
  box-shadow: 0 0 0 16px #b4c9c51a, 0 22px 55px #183b5712;
  animation: ace-art-drift 9s ease-in-out infinite;
}
.ace-core-orbit-ring {
  position: absolute;
  inset: 10%;
  border: 1px solid #518b8b4d;
  border-radius: 50%;
  transform: rotate(-25deg) scaleX(.75);
}
.ace-core-orbit-ring-two { inset: 17%; border-color: #b3945f55; transform: rotate(38deg) scaleX(.78); }
.ace-core-orbit-mark {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #d2c5a4;
  border-radius: 50%;
  color: #315d71;
  background: #faf8f0;
  box-shadow: 0 6px 16px #1e425318;
  font: italic 600 15px/1 Georgia, serif;
}
.ace-core-mark-one { top: 11%; right: 16%; }
.ace-core-mark-two { bottom: 14%; left: 10%; color: #9b774b; }
.ace-core-orbit-center {
  display: grid;
  place-items: center;
  align-content: center;
  width: 48%;
  aspect-ratio: 1;
  border: 1px solid #c0ad80;
  border-radius: 50%;
  color: #fff9ed;
  background: linear-gradient(145deg, #285d70, #173b57 70%);
  box-shadow: 0 12px 28px #173b572e, inset 0 1px 0 #ffffff5c;
}
.ace-core-orbit-center b { font: 700 clamp(27px, 3vw, 39px)/1 "Noto Serif TC", Georgia, serif; letter-spacing: .08em; }
.ace-core-orbit-center small { margin-top: 8px; color: #b8d8d2; font: 700 10px/1 "DM Sans", sans-serif; letter-spacing: .25em; }
.ace-core-orbit-center i { margin-top: 14px; color: #e1c895; font: 600 11px/1 "DM Sans", sans-serif; font-style: normal; letter-spacing: .12em; }
.ace-core-foundations {
  padding: 82px max(28px, calc(50% - 620px)) 94px;
  background: #eeece4;
}
.ace-core-section-head { max-width: 740px; margin: 0 auto 38px; text-align: center; }
.ace-core-section-head .ace-core-kicker { justify-content: center; margin-bottom: 12px; }
.ace-core-section-head h2 {
  margin: 0;
  color: #173b57;
  font: 700 clamp(28px, 3.5vw, 42px)/1.45 "Noto Serif TC", serif;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.ace-core-points {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.ace-core-points li {
  min-height: 244px;
  padding: 22px 19px 20px;
  border: 1px solid #d7d2c3;
  background: linear-gradient(155deg, #fffefa, #f7f5ee);
  box-shadow: 0 10px 25px #253e4b0b;
  transition: transform .3s ease, box-shadow .3s ease;
}
.ace-core-points li:hover { transform: translateY(-5px); box-shadow: 0 17px 29px #253e4b18; }
.ace-core-points li > span {
  display: inline-block;
  margin-bottom: 25px;
  color: #aa8955;
  font: 700 13px/1 "DM Sans", sans-serif;
  letter-spacing: .13em;
}
.ace-core-points h3 { margin: 0 0 10px; color: #20445d; font-size: 17px; font-weight: 800; line-height: 1.55; }
.ace-core-points p { margin: 0; color: #657781; font-size: 14px; font-weight: 500; line-height: 1.85; }
.ace-senior-math {
  display: grid;
  grid-template-columns: minmax(245px, .75fr) minmax(0, 1.25fr);
  align-items: center;
  gap: clamp(38px, 7vw, 94px);
  padding: 82px max(28px, calc(50% - 620px)) 86px;
  color: #f5f2e8;
  background: #17394f;
}
.ace-senior-intro .ace-core-kicker { color: #d3bd8e; }
.ace-senior-intro h2 { margin: 0; color: #fffaf0; font: 700 clamp(34px, 4vw, 52px)/1.35 "Noto Serif TC", serif; letter-spacing: -.04em; }
.ace-senior-intro h3 { margin: 13px 0 0; color: #b6d9d3; font: 700 20px/1.6 "Noto Serif TC", serif; letter-spacing: .08em; }
.ace-senior-outcomes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ace-senior-outcomes li {
  min-height: 115px;
  padding: 18px 20px;
  border: 1px solid #d9d5c255;
  background: #ffffff0a;
}
.ace-senior-outcomes b { display: block; margin-bottom: 8px; color: #f0d9a7; font-size: 16px; line-height: 1.6; }
.ace-senior-outcomes span { display: block; color: #d2e0df; font-size: 14px; line-height: 1.8; }
.ace-grade-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 78px 30px 84px;
}
.ace-grade-card {
  position: relative;
  padding: 27px 27px 28px;
  border: 1px solid #d8d4c9;
  background: #fffefa;
  box-shadow: 0 12px 29px #25404e0e;
}
.ace-grade-card::before { position: absolute; top: -1px; left: -1px; width: 52px; height: 3px; background: #639899; content: ""; }
.ace-grade-label { display: flex; align-items: center; gap: 9px; margin: 0 0 15px; color: #8a806e; font: 700 11px/1.3 "DM Sans", sans-serif; letter-spacing: .16em; }
.ace-grade-label b { color: #ae8d58; font-size: 13px; }
.ace-grade-card h3 { margin: 0 0 18px; color: #173b57; font: 700 25px/1.4 "Noto Serif TC", serif; }
.ace-grade-card ul { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.ace-grade-card li { position: relative; padding-left: 17px; color: #566c77; font-size: 14px; font-weight: 550; line-height: 1.85; }
.ace-grade-card li::before { position: absolute; top: .78em; left: 0; width: 5px; height: 5px; border-radius: 50%; background: #a98b59; content: ""; }
.ace-grade-transition { border-color: #c7af7e; background: linear-gradient(145deg, #fbf8ed, #f3eee1); }
.ace-grade-transition::before { background: #b4925b; }
.ace-core-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px max(28px, calc(50% - 620px));
  border-top: 1px solid #dcd8cc;
  color: #60737b;
  background: #f1efe7;
  font-size: 14px;
  font-weight: 600;
}
.ace-core-footer a { color: #256974; font-weight: 800; }
.ace-core-footer a b { display: inline-block; margin-left: 6px; transition: transform .2s ease; }
.ace-core-footer a:hover b { transform: translate(3px, -3px); }
.ace-program-link { text-decoration: none; }
.ace-program-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
  padding-top: 13px;
  color: #347377;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .24s ease, transform .24s ease;
}
.ace-program-link .ace-program-cta span { font-size: 17px; }
.ace-program-link:hover .ace-program-cta,
.ace-program-link:focus-visible .ace-program-cta { opacity: 1; transform: translateY(0); }
.ace-program-link:focus-visible { outline: 3px solid #b4925b; outline-offset: 4px; }
@media (max-width: 1000px) {
  .ace-core-points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ace-senior-math { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .ace-core-nav { min-height: 66px; padding: 10px 20px; }
  .ace-core-wordmark { font-size: 16px; }
  .ace-core-back { padding: 9px 10px; font-size: 12px; }
  .ace-core-hero { grid-template-columns: 1fr; gap: 34px; min-height: 0; padding: 54px 25px 58px; }
  .ace-core-hero-copy { max-width: none; }
  .ace-core-orbit { width: min(78vw, 310px); }
  .ace-core-foundations { padding: 59px 23px 66px; }
  .ace-core-points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .ace-core-points li { min-height: 205px; padding: 18px 16px; }
  .ace-core-points li > span { margin-bottom: 17px; }
  .ace-senior-math { padding: 58px 23px 64px; }
  .ace-grade-levels { grid-template-columns: 1fr; width: min(100%, 560px); gap: 13px; padding: 56px 23px 64px; }
  .ace-grade-card { padding: 23px; }
  .ace-core-footer { align-items: flex-start; flex-direction: column; padding: 23px; }
  .ace-program-cta { opacity: 1; transform: none; }
}

/* Simple four-level square-step pathway, with the original violet restored as an accent. */
:root {
  --ace-violet: #6b61c8;
  --ace-violet-deep: #4d438f;
  --ace-violet-soft: #eeecfb;
  --ace-teal: #4b9998;
  --ace-navy: #183b58;
}
.brand-hero {
  background-color: #f2f3fb;
  background-image:
    radial-gradient(ellipse at 80% 40%, #e6e1fa80 0%, #e6e1fa00 55%),
    linear-gradient(112deg, #e8f6f5 0%, #f3f0fc 48%, #edf3fb 100%);
}
.brand-hero::after {
  z-index: 0;
  background: url('/assets/ace-cover-notes-20260929.svg') center / cover no-repeat;
}
.brand-hero h1 {
  text-shadow: 0 2px 0 #9eadd0, 0 7px 16px #473f8c24;
}
.brand-hero h1::after {
  background: linear-gradient(90deg, var(--ace-violet), #7169cb 48%, var(--ace-teal));
}
.brand-hero-copy .ace-cover-subtitle { color: #514d9b; }
.brand-hero-copy .brand-lead {
  border-color: #796cc1;
  border-left-color: #6459b6;
  background: #f7f5ffed;
}
.brand-hero-art { z-index: 1; }
/* Put the lesson drawings above the colour wash so they remain visible. */
.brand-hero-art::before {
  width: 112%;
  border: 0;
  border-radius: 0;
  background: url('/assets/ace-cover-geometry-20260929.svg') center / contain no-repeat;
  box-shadow: none;
  animation: none;
}
.brand-hero-art::after { display: none; }
.brand-manifesto.ace-learning-manifesto {
  background:
    radial-gradient(ellipse at 87% 12%, #6c61c72e 0%, #6c61c700 37%),
    #153e5d;
}
.ace-learning-paths .ace-path-divider { color: #9f95e0; }
.brand-method.ace-program-pathway {
  background:
    radial-gradient(ellipse at 50% 0%, #ffffffc9 0%, #ffffff00 57%),
    linear-gradient(145deg, #f0f0f7 0%, #f8f7fb 52%, #eeedf7 100%);
}
.brand-method.ace-program-pathway .section-kicker { color: var(--ace-violet); }
.brand-method.ace-program-pathway .ace-programs-header h2 { color: #293f76; }
.ace-programs-subtitle { color: #586b86; }
.ace-pathway-pyramid {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 5px;
  width: min(100%, 610px);
  margin: 45px auto 4px;
  padding: 0;
  list-style: none;
  isolation: isolate;
}
.ace-pathway-pyramid::before {
  position: absolute;
  z-index: -1;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, #8a7bd080, #8a7bd020 86%);
  content: "";
}
.ace-pyramid-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(72px, .36fr) 1fr;
  align-items: center;
  justify-items: center;
  width: var(--pyramid-width);
  min-height: 66px;
  padding: 10px clamp(15px, 3vw, 31px);
  border: 1px solid #ffffff80;
  border-bottom: 4px solid var(--pyramid-edge);
  color: #fff;
  background: var(--pyramid-fill);
  box-shadow: 0 9px 20px #263c5716, inset 0 1px 0 #ffffff5c;
  text-align: center;
  animation: ace-pyramid-enter .7s cubic-bezier(.2,.75,.25,1) both;
}
.ace-pyramid-stage:nth-child(1) { --pyramid-width: 100%; animation-delay: .02s; }
.ace-pyramid-stage:nth-child(2) { --pyramid-width: 85%; animation-delay: .1s; }
.ace-pyramid-stage:nth-child(3) { --pyramid-width: 70%; animation-delay: .19s; }
.ace-pyramid-stage:nth-child(4) { --pyramid-width: 56%; animation-delay: .28s; }
.ace-pyramid-competition {
  --pyramid-fill: linear-gradient(108deg, #514890 0%, #6259ac 58%, #766cce 100%);
  --pyramid-edge: #c3a96f;
  border-color: #c6b47d;
  border-bottom-color: #c3a96f;
  box-shadow: 0 13px 26px #5148902b, inset 0 1px 0 #fff9d7a1;
}
.ace-pyramid-gem { --pyramid-fill: linear-gradient(108deg, #6158a9, #776fd0); --pyramid-edge: #51488f; }
.ace-pyramid-aim { --pyramid-fill: linear-gradient(108deg, #287684, #4d9d9b); --pyramid-edge: #236671; }
.ace-pyramid-ace { --pyramid-fill: linear-gradient(108deg, #254875, #3f69a8); --pyramid-edge: #1c385f; }
.ace-pyramid-code {
  color: #fff6d9;
  font: 800 clamp(18px, 2vw, 23px)/1 "DM Sans", sans-serif;
  letter-spacing: .08em;
}
.ace-pyramid-stage strong {
  justify-self: start;
  color: #fff;
  font-size: clamp(16px, 1.7vw, 20px);
  font-weight: 750;
  line-height: 1.5;
  letter-spacing: .04em;
}
.ace-pyramid-stage small {
  grid-column: 2;
  justify-self: start;
  margin-top: 1px;
  color: #e8e2ff;
  font: 600 10px/1.2 "DM Sans", sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.ace-pyramid-detail-link {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(72px, .36fr) 1fr;
  align-items: center;
  justify-items: center;
  width: 100%;
  min-height: inherit;
  color: inherit;
  text-decoration: none;
}
.ace-pyramid-detail-link strong { justify-self: start; }
.ace-pyramid-detail-link:focus-visible { outline: 2px solid #fff2bd; outline-offset: 3px; }
.ace-pyramid-detail-link:hover .ace-pyramid-code { color: #fff0b9; }
.ace-core-kicker i { color: var(--ace-violet); }
.ace-core-section-head .ace-core-kicker { color: var(--ace-violet); }
.ace-core-orbit-ring-two { border-color: #776acb66; }
.ace-core-footer a { color: var(--ace-violet-deep); }
@keyframes ace-pyramid-enter {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: translateY(0); }
}
.rebuild-nav .rebuild-links a:hover,
.rebuild-nav .rebuild-links a.active { color: var(--ace-violet); }
.rebuild-cta { background: linear-gradient(105deg, #3f69b5 0%, #685fc4 100%); }
.programme-tab.active { color: var(--ace-violet-deep); background: #f0effb; box-shadow: inset 0 -3px 0 var(--ace-violet); }
.programme-tab.active span,
.programme-tab:hover span { color: var(--ace-violet); }
.teacher-number { background: linear-gradient(145deg, #786dce, #5852ac); }
.teacher-join { background: linear-gradient(120deg, #eaf7f6 0%, #f0eefb 100%); }
@media (max-width: 800px) {
  .brand-hero { background-position: 64% center; }
  .brand-hero::after { display: none; }
  .brand-hero-art {
    width: min(100%, 380px);
    min-height: 0;
    aspect-ratio: 1;
    margin: 3px auto 0;
  }
  .brand-hero-art img { width: min(66%, 250px); max-width: 250px; }
  .brand-hero-art::before { width: 104%; }
}
@media (max-width: 600px) {
  .brand-hero { padding-block: 38px 25px; }
  .brand-hero-copy { padding-block: 8px 0; }
  .brand-hero-art { width: min(100%, 320px); margin-top: 0; }
  .brand-hero-art img { width: min(68%, 224px); max-width: 224px; }
  .brand-method.ace-program-pathway { padding: 58px 21px 66px; }
  .ace-pathway-pyramid { gap: 4px; width: 100%; margin-top: 31px; }
  .ace-pyramid-stage { min-height: 61px; grid-template-columns: 62px 1fr; padding: 8px 12px; }
  .ace-pyramid-detail-link { grid-template-columns: 62px 1fr; }
  .ace-pyramid-stage:nth-child(1) { --pyramid-width: 100%; }
  .ace-pyramid-stage:nth-child(2) { --pyramid-width: 92%; }
  .ace-pyramid-stage:nth-child(3) { --pyramid-width: 84%; }
  .ace-pyramid-stage:nth-child(4) { --pyramid-width: 76%; }
  .ace-pyramid-code { font-size: 17px; }
  .ace-pyramid-stage strong { font-size: 15px; }
  .ace-pyramid-stage small { font-size: 9px; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  .ace-pyramid-stage { animation: none; }
}
@media (max-width: 480px) {
  .ace-core-hero { padding-inline: 21px; }
  .ace-core-hero h1 { font-size: clamp(34px, 9vw, 42px); }
  .ace-core-hero h2 { font-size: 20px; }
  .ace-core-hero-copy > p:not(.ace-core-kicker) { font-size: 15px; }
  .ace-core-points { grid-template-columns: 1fr; }
  .ace-core-points li { min-height: 0; }
  .ace-senior-outcomes { grid-template-columns: 1fr; }
  .ace-core-kicker { flex-wrap: wrap; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ace-core-detail,
  .ace-core-orbit,
  .ace-core-points li,
  .ace-core-back,
  .ace-core-footer a b,
  .ace-program-cta { animation: none; transition: none; }
  .ace-core-detail { opacity: 1; transform: none; }
}

/* A single centred introduction using the supplied four-level pyramid artwork. */
.brand-method.ace-pathway-merged { display: none; }
.brand-manifesto.ace-learning-manifesto.ace-learning-with-pyramid {
  padding: clamp(58px, 6vw, 90px) 30px clamp(62px, 6vw, 90px);
  color: var(--ace-navy);
  background: #fff;
  text-align: center;
}
.ace-learning-with-pyramid .ace-learning-intro {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0;
  border: 0;
}
.brand-manifesto.ace-learning-with-pyramid .ace-learning-intro h2 {
  margin-bottom: 16px;
  color: #183b58;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.45;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.ace-learning-with-pyramid .ace-learning-intro h3 {
  color: #62578d;
  font-size: clamp(17px, 1.55vw, 21px);
  font-weight: 500;
  line-height: 1.8;
  text-wrap: balance;
}
.ace-learning-pyramid-figure {
  width: min(100%, 640px);
  margin: 30px auto 26px;
}
.ace-learning-pyramid-image {
  display: block;
  color: #716792;
  text-decoration: none;
}
.ace-learning-pyramid-image img {
  display: block;
  width: 100%;
  height: auto;
}
.ace-learning-image-hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .045em;
}
.ace-learning-pyramid-image:hover .ace-learning-image-hint { color: #51428a; }
.ace-learning-pyramid-image:focus-visible,
.ace-learning-detail-link:focus-visible {
  outline: 2px solid var(--ace-violet);
  outline-offset: 6px;
}
.ace-learning-with-pyramid .ace-learning-body {
  display: block;
  max-width: 1120px;
  margin: 0 auto;
}
.ace-learning-with-pyramid .ace-learning-body p,
.ace-learning-with-pyramid .ace-learning-body .ace-learning-core {
  color: #52637a;
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 400;
  line-height: 1.95;
  text-wrap: pretty;
}
.ace-learning-with-pyramid .ace-learning-body p + p { margin-top: 16px; }
.ace-learning-with-pyramid .ace-learning-body strong { color: #244766; font-weight: 600; }
.ace-learning-with-pyramid .ace-learning-paths {
  justify-content: center;
  gap: 8px 12px;
  max-width: 1000px;
  margin: 28px auto 0;
  padding: 0;
  border: 0;
  color: #6654a4;
  font-size: clamp(16px, 1.45vw, 19px);
}
.ace-learning-with-pyramid .ace-path-divider { color: #c4bbd8; margin-left: 12px; }
.ace-learning-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-bottom: 5px;
  border-bottom: 1px solid #c6c0dc;
  color: #6654a4;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* One page, with the detailed curriculum expanded in place. */
.ace-site-links { display: flex; align-items: center; gap: 22px; }
.ace-home-link { color: #193e61; font-size: 14px; font-weight: 700; white-space: nowrap; padding: 12px 0; }
.ace-home-link:hover { color: #6654a4; text-decoration: underline; text-underline-offset: 5px; }
.ace-footer-links { display: flex; flex-wrap: wrap; gap: 12px 24px; color: #a8e0dc; font-size: 14px; font-weight: 700; }
.ace-footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.ace-site-links a:focus-visible, .ace-footer-links a:focus-visible { outline: 2px solid #8874c6; outline-offset: 5px; }
@media (max-width: 600px) {
  .ace-single-page .rebuild-nav { flex-wrap: wrap; justify-content: center; }
  .ace-site-links { width: 100%; justify-content: center; gap: 24px; }
  .ace-home-link { font-size: 13px; }
}
.ace-single-page .rebuild-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.ace-single-page .rebuild-cta {
  flex: 0 0 auto;
  color: #fff;
  font-size: 14px;
}
.ace-inline-course {
  max-width: 1280px;
  margin: 24px auto 0;
  text-align: left;
  scroll-margin-top: 24px;
}
.ace-inline-course > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  margin: 0 auto;
  padding: 10px 0;
  border-bottom: 1px solid #c6c0dc;
  color: #6654a4;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  list-style: none;
  cursor: pointer;
}
.ace-inline-course > summary::-webkit-details-marker { display: none; }
.ace-inline-course > summary:focus-visible { outline: 2px solid var(--ace-violet); outline-offset: 5px; }
.ace-inline-course-content { margin-top: 28px; border: 1px solid #e3dfed; background: #f8f8fc; }
.ace-inline-course .ace-core-hero { grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr); gap: 36px; min-height: 0; padding: 56px 36px; }
.ace-inline-course .ace-core-hero h2 {
  margin: 0;
  color: #173b57;
  font: 700 clamp(31px, 3.8vw, 48px)/1.4 "Noto Serif TC", serif;
  letter-spacing: -.04em;
}
.ace-inline-course .ace-core-hero h3 { margin: 17px 0; color: #62578d; font-size: 21px; line-height: 1.7; }
.ace-inline-course .ace-core-orbit { width: min(100%, 280px); }
.ace-inline-course .ace-core-foundations,
.ace-inline-course .ace-senior-math { padding: 56px 30px; }
.ace-inline-course .ace-core-foundations { background: #f0eff8; }
.ace-inline-course .ace-core-section-head h2 { font-size: clamp(26px, 3vw, 38px); }
.ace-inline-course .ace-grade-levels { padding: 50px 28px; }
.ace-inline-course .ace-core-footer { padding: 24px 28px; background: #f0eff8; }
@media (max-width: 760px) {
  .ace-inline-course .ace-core-hero { grid-template-columns: 1fr; gap: 36px; padding: 40px 22px; }
  .ace-inline-course .ace-core-orbit { width: 220px; }
  .ace-inline-course .ace-core-foundations,
  .ace-inline-course .ace-senior-math { padding: 40px 20px; }
  .ace-inline-course .ace-grade-levels { padding: 36px 20px; }
  .ace-inline-course .ace-core-footer { padding: 22px 20px; }
}
@media (max-width: 600px) {
  .ace-single-page .rebuild-nav { min-height: 76px; padding: 14px 20px; gap: 10px; }
  .ace-single-page .rebuild-nav .rebuild-brand { font-size: clamp(15px, 4.4vw, 18px); letter-spacing: .01em; }
  .ace-single-page .rebuild-nav .rebuild-brand b { margin-left: .3em; }
  .ace-single-page .rebuild-cta { padding: 10px 11px; font-size: 12px; white-space: nowrap; }
  .ace-inline-course .ace-core-hero h2 { font-size: 28px; }
  .ace-inline-course .ace-core-hero h3 { font-size: 19px; }
}
@media (max-width: 600px) {
  .brand-manifesto.ace-learning-manifesto.ace-learning-with-pyramid { padding: 52px 20px 56px; }
  .ace-learning-pyramid-figure { width: min(100%, 320px); margin: 24px auto; }
  .ace-learning-with-pyramid .ace-learning-body { text-align: left; }
  .ace-learning-with-pyramid .ace-learning-body p + p { margin-top: 18px; }
  .ace-learning-with-pyramid .ace-learning-paths { gap: 7px 9px; margin-top: 24px; }
  .ace-learning-with-pyramid .ace-path-divider { margin-left: 9px; }
}

/* Image-led course introductions; every option expands on the same page. */
.ace-course-catalogue {
  padding: 76px max(26px, calc(50% - 590px)) 100px;
  background: linear-gradient(180deg, #f7f8fc, #fff 300px);
}
.ace-course-catalogue-heading { max-width: 850px; margin: 0 auto 58px; text-align: center; }
.ace-course-catalogue-heading > p:first-child { margin-bottom: 14px; color: #7864b7; font: 700 11px/1.5 "DM Sans", sans-serif; letter-spacing: .2em; }
.ace-course-catalogue-heading h2 { margin: 0 0 22px; color: #183b58; font: 700 clamp(64px, 8vw, 104px)/1.15 "Noto Serif TC", serif; letter-spacing: .04em; }
.ace-course-catalogue-heading > p:last-child { margin: 0; color: #697889; font-size: 17px; line-height: 1.8; text-wrap: balance; }
.ace-course-list { display: grid; gap: 64px; }
.ace-course-option { --course-accent: #123f86; --course-soft: #edf3ff; width: 100%; margin: 0; }
.ace-course-advanced { --course-accent: #0b91d1; --course-soft: #e9f8ff; }
.ace-course-competition { --course-accent: #b97808; --course-soft: #fff7e2; }
.ace-course-list .ace-course-option > .ace-course-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: #193e5e;
  text-align: left;
}
.ace-course-visual {
  position: relative;
  display: block;
  grid-column: 1;
  grid-row: 1;
  width: calc(100% + 28px);
  aspect-ratio: 900 / 560;
  overflow: hidden;
  border-radius: 8px;
  background: #254879;
}
.ace-course-visual > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.ace-course-image-copy {
  position: absolute;
  inset: 0 auto 0 6.5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 45%;
  color: #fff;
  text-shadow: 0 2px 12px #0e24452b;
}
.ace-course-image-code { font: 700 clamp(48px, 5.4vw, 76px)/1.05 "DM Sans", sans-serif; letter-spacing: .035em; }
.ace-course-image-title { margin-top: 12px; font: 700 clamp(19px, 2vw, 27px)/1.5 "Noto Serif TC", serif; letter-spacing: .045em; }
.ace-course-image-english { max-width: 190px; margin-top: 15px; opacity: .78; font: 500 11px/1.6 "DM Sans", sans-serif; letter-spacing: .065em; }
.ace-course-preview {
  position: relative;
  z-index: 1;
  display: flex;
  grid-column: 2;
  grid-row: 1;
  flex-direction: column;
  align-items: flex-start;
  min-height: 334px;
  margin: 44px 0 0 -28px;
  padding: 32px 35px 25px;
  border: 1px solid #e9ecf3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px #263e6710;
  transition: box-shadow .3s ease, transform .3s ease;
}
.ace-course-badge { margin-bottom: 20px; padding: 5px 11px; background: var(--course-soft); color: var(--course-accent); font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .025em; }
.ace-course-preview-title { margin-bottom: 13px; color: #193e5e; font: 700 clamp(22px, 2.1vw, 29px)/1.45 "Noto Serif TC", serif; }
.ace-course-preview-text { display: block; color: #5a6d7d; font-size: 15px; font-weight: 400; line-height: 1.9; }
.ace-course-preview-focus { margin-top: 18px; color: var(--course-accent); font-size: 12px; font-weight: 600; line-height: 1.6; letter-spacing: .035em; }
.ace-course-expand { display: inline-flex; align-items: center; align-self: flex-end; gap: 18px; margin-top: auto; padding-top: 24px; color: var(--course-accent); font-size: 14px; font-weight: 700; line-height: 1.5; }
.ace-course-expand b { display: inline-block; font: 400 25px/1 "DM Sans", sans-serif; transition: transform .25s ease; }
.ace-course-option .ace-course-label-open { display: none; }
.ace-course-option[open] .ace-course-label-closed { display: none; }
.ace-course-option[open] .ace-course-label-open { display: inline; }
.ace-course-option[open] .ace-course-expand b { transform: rotate(45deg); }
.ace-course-advanced .ace-course-visual { grid-column: 2; width: 100%; }
.ace-course-advanced .ace-course-image-copy { inset: 0 6.5% 0 auto; width: 43%; }
.ace-course-advanced .ace-course-preview { grid-column: 1; margin: 44px -28px 0 0; }
.ace-course-option > .ace-course-trigger:hover .ace-course-visual > img { transform: scale(1.025); }
.ace-course-option > .ace-course-trigger:hover .ace-course-preview { box-shadow: 0 16px 44px #263e6720; transform: translateY(-3px); }
.ace-course-option .ace-inline-course-content { margin-top: 26px; border-color: #e4e7f0; border-radius: 8px; overflow: hidden; }
.ace-course-option[open] .ace-inline-course-content { animation: ace-course-reveal .35s ease both; }
.ace-course-focus-content { padding: 44px 35px; background: linear-gradient(145deg, #fff, var(--course-soft)); }
.ace-course-detail-eyebrow { margin-bottom: 12px; color: var(--course-accent); font: 600 12px/1.6 "DM Sans", sans-serif; letter-spacing: .06em; }
.ace-course-focus-content h3 { margin: 0 0 28px; color: #193e5e; font: 700 clamp(24px, 2.6vw, 32px)/1.5 "Noto Serif TC", serif; }
.ace-course-focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.ace-course-focus-grid article { padding-top: 20px; border-top: 2px solid var(--course-accent); }
.ace-course-focus-grid article > span { color: var(--course-accent); font: 700 12px/1 "DM Sans", sans-serif; letter-spacing: .12em; }
.ace-course-focus-grid h4 { margin: 14px 0 10px; color: #264763; font-size: 19px; line-height: 1.5; }
.ace-course-focus-grid p { margin: 0; color: #5a6d7d; font-size: 15px; line-height: 1.9; }
.ace-course-line-link { display: inline-flex; align-items: center; gap: 18px; margin-top: 32px; padding: 10px 0; border-bottom: 1px solid var(--course-accent); color: var(--course-accent); font-size: 14px; font-weight: 700; }
@keyframes ace-course-reveal { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1000px) and (min-width: 761px) {
  .ace-course-preview { padding: 25px; margin-left: -18px; }
  .ace-course-visual { width: calc(100% + 18px); }
  .ace-course-advanced .ace-course-preview { margin-right: -18px; }
  .ace-course-image-title { font-size: 19px; }
  .ace-course-image-english { font-size: 9px; }
}
@media (max-width: 760px) {
  .ace-course-catalogue { padding: 56px 20px 66px; }
  .ace-course-catalogue-heading { margin-bottom: 34px; }
  .ace-course-catalogue-heading h2 { margin-bottom: 18px; font-size: clamp(48px, 15vw, 72px); line-height: 1.18; white-space: nowrap; }
  .ace-course-catalogue-heading > p:last-child { font-size: 15px; }
  .ace-course-list { gap: 40px; }
  .ace-course-list .ace-course-option > .ace-course-trigger { display: flex; flex-direction: column; }
  .ace-course-visual,
  .ace-course-advanced .ace-course-visual { width: 100%; }
  .ace-course-image-code { font-size: clamp(44px, 12vw, 72px); }
  .ace-course-image-title { margin-top: 8px; font-size: clamp(18px, 5vw, 26px); }
  .ace-course-image-english { margin-top: 10px; font-size: clamp(9px, 2.5vw, 11px); }
  .ace-course-preview,
  .ace-course-advanced .ace-course-preview { width: calc(100% - 16px); min-height: 0; margin: -16px 0 0 16px; padding: 25px 23px 23px; }
  .ace-course-preview-title { font-size: 23px; }
  .ace-course-badge { margin-bottom: 15px; }
  .ace-course-preview-text { font-size: 15px; line-height: 1.85; }
  .ace-course-preview-focus { font-size: 11px; }
  .ace-course-expand { padding-top: 20px; }
  .ace-course-focus-content { padding: 30px 22px; }
  .ace-course-focus-grid { grid-template-columns: 1fr; gap: 24px; }
  .ace-course-option .ace-inline-course-content { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ace-course-visual > img,
  .ace-course-preview,
  .ace-course-expand b { transition: none; }
  .ace-course-option[open] .ace-inline-course-content { animation: none; }
}

/* The gold-topped competition programme sits between the introduction and classes. */
.ace-program-entry {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  width: min(100%, 460px);
  margin: 28px auto 0;
  padding: 12px 16px;
  border: 1px solid #c3ac7970;
  border-radius: 7px;
  background: linear-gradient(110deg, #18354e, #343559);
  color: #fff8ea;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 5px 15px #22344d12;
  scroll-margin-top: 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ace-program-entry > img { display: block; width: 54px; height: auto; }
.ace-program-entry-copy { display: block; min-width: 0; }
.ace-program-entry-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #e0c589;
  font: 600 9px/1.5 "DM Sans", sans-serif;
  letter-spacing: .1em;
}
.ace-program-entry-title {
  display: block;
  color: #fff8ea;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}
.ace-program-entry-title > span { display: inline-block; }
.ace-program-entry-arrow { color: #e0c589; font-size: 23px; line-height: 1; }
.ace-program-entry:hover { transform: translateY(-2px); box-shadow: 0 8px 20px #22344d22; }
.ace-program-entry:focus-visible { outline: 3px solid #8e7bc8; outline-offset: 4px; }
@media (max-width: 600px) {
  .ace-program-entry { grid-template-columns: 42px minmax(0, 1fr) 16px; gap: 9px; margin-top: 24px; padding: 12px; }
  .ace-program-entry > img { width: 42px; }
  .ace-program-entry-title { font-size: 15px; }
  .ace-program-entry-eyebrow { font-size: 8px; letter-spacing: .055em; }
}
@media (prefers-reduced-motion: reduce) {
  .ace-program-entry { transition: none; }
}
.ace-competition-program {
  max-width: 1120px;
  margin: 48px auto 0;
  border: 1px solid #ccaf729c;
  border-radius: 9px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 14px 36px #23395415;
  scroll-margin-top: 24px;
}
.ace-competition-program > summary {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) 130px;
  align-items: center;
  gap: 22px;
  min-height: 268px;
  padding: 24px 40px 24px 22px;
  list-style: none;
  cursor: pointer;
  color: #fff;
  background: radial-gradient(ellipse at 16% 35%, #8272512e, transparent 48%), linear-gradient(115deg, #112e4e, #253a60 65%, #403764);
}
.ace-competition-program > summary::-webkit-details-marker { display: none; }
.ace-competition-program > summary:focus-visible { outline: 3px solid #ead092; outline-offset: -7px; }
.ace-competition-art { display: block; }
.ace-competition-art img { display: block; width: 100%; height: auto; transition: transform .4s ease; }
.ace-competition-copy { display: flex; flex-direction: column; align-items: flex-start; }
.ace-competition-eyebrow { color: #e9ce8e; font: 600 11px/1.6 "DM Sans", sans-serif; letter-spacing: .15em; }
.ace-competition-title { display: block; margin: 13px 0 18px; color: #fff8e9; font: 700 clamp(26px, 2.8vw, 38px)/1.5 "Noto Serif TC", serif; letter-spacing: .04em; }
.ace-competition-title > span { display: block; }
.ace-competition-focus { display: flex; flex-wrap: wrap; gap: 9px; color: #cbd8e9; font-size: 13px; line-height: 1.8; }
.ace-competition-focus > span { color: #907f62; }
.ace-competition-action { display: flex; align-items: center; flex-direction: column; gap: 14px; color: #f0d493; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ace-competition-action b { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #e4c88a88; border-radius: 50%; font: 400 30px/1 "DM Sans", sans-serif; transition: transform .25s ease, background .25s ease; }
.ace-competition-program > summary:hover .ace-competition-art img { transform: translateY(-4px); }
.ace-competition-program > summary:hover .ace-competition-action b { background: #efcf8921; }
.ace-competition-program .ace-program-open-label { display: none; }
.ace-competition-program[open] .ace-program-open-label { display: inline; }
.ace-competition-program[open] .ace-program-closed-label { display: none; }
.ace-competition-program[open] .ace-competition-action b { transform: rotate(45deg); }
.ace-competition-content { padding: 40px 44px; border-top: 1px solid #c3ab7859; background: linear-gradient(125deg, #fffdf8, #fff); }
.ace-competition-content > header { max-width: 820px; }
.ace-competition-content .ace-competition-detail-kicker { margin: 0 0 12px; color: #967333; font: 600 11px/1.5 "DM Sans", sans-serif; letter-spacing: .14em; }
.ace-competition-content h3 { margin: 0 0 16px; color: #193d5b; font: 700 clamp(23px, 2.4vw, 31px)/1.6 "Noto Serif TC", serif; }
.ace-competition-content p { margin: 0; color: #596d7e; font-size: 16px; font-weight: 400; line-height: 1.95; }
.ace-competition-approach { margin-top: 30px; padding: 26px 28px; border-left: 3px solid #cfb274; background: #f2f3f8; }
.ace-competition-approach h4 { margin: 0 0 12px; color: #264362; font: 700 22px/1.65 "Noto Serif TC", serif; }
.ace-competition-abilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 23px; }
.ace-competition-abilities strong { display: block; margin-bottom: 7px; color: #61528e; font-size: 16px; }
.ace-competition-abilities span { display: block; color: #647385; font-size: 14px; line-height: 1.8; }
.ace-competition-section-title { margin: 34px 0 0; color: #264362; font: 700 23px/1.5 "Noto Serif TC", serif; }
.ace-competition-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 19px; }
.ace-competition-pillars article { padding-top: 20px; border-top: 2px solid #ccb076; }
.ace-competition-pillars article > span { color: #a88545; font: 600 12px/1 "DM Sans", sans-serif; letter-spacing: .12em; }
.ace-competition-pillars h4 { margin: 14px 0 10px; color: #1c405f; font-size: 20px; line-height: 1.6; }
.ace-competition-pillars p { font-size: 15px; }
.ace-competition-fit { display: grid; grid-template-columns: .85fr 1.15fr; gap: 24px; margin-top: 33px; padding-top: 26px; border-top: 1px solid #dfdacb; }
.ace-competition-fit h4 { margin: 0; color: #264362; font-size: 20px; line-height: 1.7; }
.ace-competition-fit ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: #596d7e; font-size: 15px; line-height: 1.8; }
.ace-competition-fit li::marker { color: #b29152; }
.ace-competition-consult { display: inline-flex; align-items: center; gap: 16px; margin-top: 30px; padding: 11px 0; border-bottom: 1px solid #ac8b50; color: #87642e; font-size: 14px; font-weight: 700; }
.ace-competition-consult:focus-visible { outline: 2px solid #967333; outline-offset: 5px; }
.ace-competition-program[open] .ace-competition-content { animation: ace-course-reveal .35s ease both; }
@media (max-width: 850px) {
  .ace-competition-program > summary { grid-template-columns: 170px minmax(0, 1fr); gap: 15px; padding: 22px; }
  .ace-competition-action { grid-column: 2; align-items: center; flex-direction: row; gap: 12px; margin-top: -2px; }
  .ace-competition-action b { width: 35px; height: 35px; font-size: 25px; }
  .ace-competition-title { font-size: 28px; }
  .ace-competition-content { padding: 30px; }
}
@media (max-width: 600px) {
  .ace-competition-program { margin-top: 34px; }
  .ace-competition-program > summary { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
  .ace-competition-art { width: 150px; margin: -7px auto -6px; }
  .ace-competition-copy { align-items: center; text-align: center; }
  .ace-competition-eyebrow { font-size: 9px; letter-spacing: .11em; }
  .ace-competition-title { margin: 12px 0 14px; font-size: clamp(23px, 6.5vw, 28px); }
  .ace-competition-focus { justify-content: center; gap: 5px; font-size: 11px; }
  .ace-competition-action { grid-column: 1; justify-content: center; margin-top: 4px; flex-direction: row-reverse; }
  .ace-competition-content { padding: 27px 22px; }
  .ace-competition-content h3 { font-size: 23px; }
  .ace-competition-content p { font-size: 15px; }
  .ace-competition-approach { padding: 22px 18px; }
  .ace-competition-approach h4 { font-size: 20px; }
  .ace-competition-abilities { grid-template-columns: 1fr; gap: 18px; }
  .ace-competition-pillars { grid-template-columns: 1fr; gap: 24px; }
  .ace-competition-fit { grid-template-columns: 1fr; gap: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .ace-competition-art img,
  .ace-competition-action b { transition: none; }
  .ace-competition-program[open] .ace-competition-content { animation: none; }
}
