:where(.learning-experience, .class-world, .learner-main, .lesson-shell, .play-game-screen, .launch-schedule) {
  --kid-joy-surface: #9267ea;
  --kid-joy-on-surface: #fff8e8;
}

:where([data-course-theme="sciences"], .science-world, .science-course) {
  --kid-joy-surface: #0f9f51;
  --kid-joy-on-surface: #fff;
}

:where([data-course-theme="francais"], .french-world, .french-course) { --kid-joy-surface: #ff7468; }
:where([data-course-theme="geographie"], .geography-world, .geography-course) { --kid-joy-surface: #2f73d9; }
:where([data-course-theme="english"], .english-world, .english-course) { --kid-joy-surface: #f35aa5; --kid-joy-on-surface: #29272d; }
:where([data-course-theme="ai"], .ai-world, .ai-course) { --kid-joy-surface: #fdc8e9; --kid-joy-on-surface: #29272d; }
:where(.maths-world, .maths-course, [data-course-theme="maths"]) { --kid-joy-surface: #9267ea; }

.division-course-header[data-course-theme="english"] {
  --course-banner: #f35aa5;
  --course-banner-accent: #ffe5f2;
}

.division-course-header[data-course-theme="english"] .division-module-bar,
.division-course-header[data-course-theme="english"] .division-module-bar strong,
.division-course-header[data-course-theme="english"] .division-module-bar span {
  color: #29272d !important;
}

.division-course-header[data-course-theme="english"] .division-module-bar time {
  background: #ffe5f2;
  color: #29272d;
}

.kid-joy-surface {
  background: var(--kid-joy-surface, #9267ea) !important;
  background-image: none !important;
  border-color: color-mix(in srgb, var(--kid-joy-surface, #9267ea) 72%, white) !important;
  color: var(--kid-joy-on-surface, #fff) !important;
  box-shadow: none !important;
  filter: none !important;
}

button.kid-joy-surface:hover { filter: saturate(1.08) brightness(1.04) !important; }

/* Shared accessibility protections for learner courses. */
.learning-experience {
  --kid-visual-stage: color-mix(in srgb, var(--kid-joy-surface, #9267ea) 8%, #fffefa);
  --kid-visual-line: color-mix(in srgb, var(--kid-joy-surface, #9267ea) 68%, #fff);
  --kid-visual-card: #fffefa;
}

.learning-experience :where(
  .learning-proof,
  .clock-proof,
  .geo-proof,
  .light-illustration,
  .french-visual,
  .ai-lesson-visual
) {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--kid-joy-surface, #9267ea) 12%, transparent) !important;
  border-radius: 34px 46px 31px 42px !important;
  background: var(--kid-visual-stage) !important;
  color: #29272d !important;
  box-shadow: none !important;
}

/* A focused lesson card already supplies the visual stage. Keep the proof
   open on its organic colour field instead of placing another box inside it. */
.learning-experience.teacher-kid-step-page .kid-step-visual .learning-proof {
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.learning-experience :where(
  .learning-proof,
  .clock-proof,
  .geo-proof,
  .light-illustration,
  .french-visual,
  .ai-lesson-visual
) :where(svg, img) {
  filter: none !important;
}

.learning-experience :where(
  .learning-proof,
  .clock-proof,
  .geo-proof,
  .light-illustration,
  .french-visual,
  .ai-lesson-visual
) svg :where([style*="stroke:#29272d"], [stroke="#29272d"]) {
  stroke: var(--kid-visual-line) !important;
  stroke-width: 3px !important;
}

.learning-experience :where(.learning-proof, .clock-proof, .geo-proof) figcaption,
.learning-experience .maths-brand-figure figcaption {
  border: 1px solid color-mix(in srgb, var(--kid-joy-surface, #9267ea) 12%, transparent) !important;
  background: var(--kid-visual-card) !important;
  color: var(--kid-joy-surface, #9267ea) !important;
  box-shadow: none !important;
}

.learning-experience .division-summary-sheet > header,
.learning-experience .approved-summary-sheet > header {
  display: none !important;
}

/* Product navigation is never part of a lesson palette. */
.topbar.kid-joy-surface {
  background: rgba(255, 253, 250, .9) !important;
  border-color: rgba(38, 38, 43, .07) !important;
  color: inherit !important;
  box-shadow: 0 14px 50px rgba(38, 38, 43, .09) !important;
  filter: none !important;
}

.topbar__home-link {
  display: grid;
  width: 122px;
  min-height: 62px;
  padding: 0;
  border: 0;
  justify-items: start;
  align-items: center;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* Shared lesson chrome only: product logo beside one subject-colour lesson pill. */
.division-course-header {
  --course-banner: var(--violet, #9267ea);
  --course-banner-accent: var(--acid, #b0ee0b);
  --course-banner-soft: #eee7ff;
  position: relative;
  display: grid;
  grid-template-columns: clamp(160px, 16vw, 230px) minmax(0, 1fr);
  width: 100%;
  min-height: 126px;
  padding: 18px max(clamp(18px, 4vw, 72px), env(safe-area-inset-left));
  box-sizing: border-box;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  background: #fff8e8;
  color: #29272d;
}

.division-course-header[data-course-theme="sciences"] {
  --course-banner: #0f9f51;
  --course-banner-accent: #b0ee0b;
  --course-banner-soft: #e3f7dc;
}

.division-course-header[data-course-theme="education-civique"] {
  --course-banner: #00a98f;
  --course-banner-accent: #dff8f2;
  --course-banner-soft: #dff8f2;
}

.division-course-header.is-flashcards { background: var(--course-banner-soft); color: #29272d; }
.division-course-header::before,
.division-course-header::after { display: none; }

.division-course-header > .immersive-nav { display: contents; }

.division-course-header .immersive-nav__logo {
  position: relative;
  z-index: 1;
  grid-row: 1;
  grid-column: 1;
  display: grid;
  width: 100%;
  height: auto;
  min-height: 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #29272d;
  box-sizing: border-box;
  box-shadow: none;
  place-items: center start;
}

.division-course-header .immersive-nav__logo .good-ones-logo {
  width: 100%;
  font-size: clamp(28px, 3vw, 38px);
}

.division-course-header .division-module-bar {
  position: static;
  grid-row: 1;
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 88px;
  margin: 0;
  padding: 12px clamp(190px, 18vw, 270px) 12px clamp(22px, 2.4vw, 38px);
  align-items: center;
  gap: 18px;
  border-radius: 999px;
  background: var(--course-banner) !important;
  box-sizing: border-box;
}

.division-course-header .division-module-bar::after { display: none; }

.division-course-header .division-module-bar div {
  position: static;
  min-width: 0;
  justify-items: start;
  text-align: left;
  transform: none;
}

.division-course-header .division-module-bar div > strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #fff;
  font-size: clamp(20px, 2.1vw, 32px);
  line-height: 1;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.division-course-header .division-module-bar span {
  color: var(--course-banner-accent) !important;
  font-size: clamp(12px, 1vw, 15px);
  letter-spacing: .14em;
}
.division-course-header.is-flashcards .division-module-bar div > strong { color: #fff; }
.division-course-header.is-flashcards .division-module-bar span { color: var(--course-banner-accent) !important; }

.division-course-header .division-module-bar time {
  position: relative;
  z-index: 1;
  width: max-content;
  min-width: auto;
  min-height: 0;
  padding: 8px 12px;
  justify-self: end;
  border: 2px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  background: transparent;
  color: #fff;
}

.division-course-header.is-flashcards .division-module-bar time {
  border-color: color-mix(in srgb, var(--course-banner-accent) 66%, white);
  color: #fff;
}

.division-course-header .immersive-nav__back {
  position: relative;
  z-index: 6;
  grid-row: 1;
  grid-column: 2;
  min-height: 58px;
  margin-right: 14px;
  padding: 10px 20px;
  justify-self: end;
  border: 0;
  border-radius: 999px;
  background: var(--course-banner-accent);
  color: #29272d;
  box-shadow: none;
  font-weight: 900;
}

.division-course-header .immersive-nav__back:hover {
  border: 0;
  filter: saturate(1.08) brightness(1.02);
  transform: translateX(-3px);
}

.division-course-header + .division-module-page,
.division-course-header + .division-course { padding-top: 0; }

.division-course-header:not(.is-flashcards) + .division-course { background: #fff8e8 !important; }

body:has(.division-course-header),
#app:has(.division-course-header),
.division-module-page { background: #fff8e8 !important; }

body:has(.division-course-header.is-flashcards),
#app:has(.division-course-header.is-flashcards) { background: #eee7ff !important; }

body:has(.division-course-header.is-flashcards[data-course-theme="sciences"]),
#app:has(.division-course-header.is-flashcards[data-course-theme="sciences"]),
body:has(.division-course-header.is-flashcards[data-course-theme="sciences"]) .division-module-page.division-flashcards-page { background: #e3f7dc !important; }

body:has(.division-course-header.is-flashcards[data-course-theme="education-civique"]),
#app:has(.division-course-header.is-flashcards[data-course-theme="education-civique"]),
body:has(.division-course-header.is-flashcards[data-course-theme="education-civique"]) .division-module-page.division-flashcards-page { background: #dff8f2 !important; }

.division-module-page.division-flashcards-page {
  --course-banner-soft: #eee7ff;
  background: var(--course-banner-soft) !important;
  color: #29272d !important;
}

.division-module-page.division-flashcards-page[data-course-theme="sciences"],
.division-module-page.division-flashcards-page.science-light-course { --course-banner-soft: #e3f7dc; }

.division-module-page.division-flashcards-page[data-course-theme="education-civique"] { --course-banner-soft: #dff8f2; }

.division-flashcards-page .division-flashcards-stage .division-module-kicker,
.division-flashcards-page .division-flashcards-stage h1 i { color: var(--course-banner, #9267ea) !important; }

.division-flashcards-page .division-flashcards-progress > div { background: rgba(41, 39, 45, .1) !important; }
.division-flashcards-page .division-flashcard-controls > span { color: rgba(41, 39, 45, .68) !important; }

body:has(.division-course-header.is-flashcards) .division-module-nav button.is-current {
  background: var(--coral, #ff776d) !important;
  color: #29272d !important;
}

body:has(.division-course-header.is-flashcards) .division-module-nav button.is-current i {
  background: #fff8e8 !important;
  color: var(--course-banner, #9267ea) !important;
}

body:has(.division-course-header.is-flashcards[data-course-theme="education-civique"]) .division-module-nav button.is-current {
  background: #00a98f !important;
  color: #fff !important;
}

body:has(.division-course-header.is-flashcards[data-course-theme="education-civique"]) .division-module-nav button.is-current i {
  background: #dff8f2 !important;
  color: #29272d !important;
}

@media (max-width: 760px) {
  .division-course-header {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 94px;
    padding: 10px 12px;
    gap: 10px;
  }
  .division-course-header .immersive-nav__logo { min-height: 54px; }
  .division-course-header .immersive-nav__logo .good-ones-logo { font-size: 18px; }
  .division-course-header .division-module-bar { min-height: 72px; padding: 10px 58px 10px 16px; gap: 8px; }
  .division-course-header .division-module-bar span { font-size: 8px; letter-spacing: .08em; }
  .division-course-header .division-module-bar div > strong { display: block; font-size: 15px; }
  .division-course-header .division-module-bar time { display: none; }
  .division-course-header .immersive-nav__back { width: 44px; min-height: 44px; margin-right: 8px; padding: 6px; justify-content: center; }
  .division-course-header .immersive-nav__back i { display: none; }
}

/* Strict lesson opening: one title and one teacher, with no decorative or explanatory extras. */
.strict-lesson-hero {
  --strict-hero-accent: #9267ea;
  --strict-hero-shape: #f5b6e3;
  position: relative !important;
  display: flex !important;
  width: min(calc(100% - 34px), 1540px) !important;
  min-height: clamp(470px, 50vw, 650px) !important;
  margin: 0 auto 36px !important;
  padding: clamp(42px, 5.5vw, 88px) !important;
  align-items: center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.strict-lesson-hero[data-course-theme="sciences"] {
  --strict-hero-accent: #0f9f51;
  --strict-hero-shape: #b0ee0b;
}

.strict-lesson-hero[data-course-theme="francais"] {
  --strict-hero-accent: #fd7666;
  --strict-hero-shape: #fd7666;
}

.strict-lesson-hero[data-course-theme="geographie"] {
  --strict-hero-accent: #2f73d9;
  --strict-hero-shape: #fd8ce9;
}

.strict-lesson-hero[data-course-theme="ai"] {
  --strict-hero-accent: #fdc8e9;
  --strict-hero-shape: #b0ee0b;
}

.strict-lesson-hero::before,
.strict-lesson-hero::after { display: none !important; content: none !important; }

.strict-lesson-hero__title {
  position: relative;
  z-index: 2;
  width: min(62%, 900px);
  min-width: 0;
}

.strict-lesson-hero__eyebrow,
.strict-lab-eyebrow {
  display: block !important;
  margin-bottom: 22px !important;
  color: var(--strict-hero-accent, var(--course-banner, #9267ea)) !important;
  font: 950 clamp(12px, 1.15vw, 17px) / 1 var(--font-display) !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}

.global-lab-mission-progress {
  box-sizing: border-box;
  width: min(calc(100% - 64px), 1540px);
  margin: 30px auto 38px;
  padding-inline: 14px;
}

@media (max-width: 760px) {
  .global-lab-mission-progress {
    width: calc(100% - 28px);
    margin-block: 22px 28px;
  }
}

.strict-lesson-hero__title h1 {
  max-width: 900px !important;
  margin: 0 !important;
  font-size: clamp(66px, 7.4vw, 122px) !important;
  line-height: .86 !important;
  letter-spacing: -.065em !important;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.strict-lesson-hero__title h1 > span {
  display: block;
  color: #29272d;
}

.strict-lesson-hero__title h1 > .strict-lesson-hero__title-accent {
  color: var(--strict-hero-accent);
}

.strict-lesson-hero__teacher-shape {
  position: absolute;
  z-index: 1;
  right: -4%;
  bottom: -8%;
  width: clamp(320px, 37%, 530px);
  height: 82%;
  overflow: visible;
}

.strict-lesson-hero__teacher-shape::before {
  position: absolute;
  inset: 18% -4% 0 8%;
  border-radius: 67% 33% 48% 52% / 57% 44% 56% 43%;
  background: var(--strict-hero-shape);
  content: '';
  transform: rotate(-5deg);
}

.strict-lesson-hero__teacher {
  position: absolute !important;
  z-index: 2 !important;
  top: auto !important;
  right: 5% !important;
  bottom: 3% !important;
  left: auto !important;
  display: block !important;
  width: 142% !important;
  height: 112% !important;
  margin: 0 !important;
  align-self: end !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  filter: none !important;
  transform: none !important;
  animation: none !important;
}

@media (max-width: 760px) {
  .strict-lesson-hero {
    width: 100% !important;
    min-height: 390px !important;
    padding: 32px 18px 0 !important;
  }
  .strict-lesson-hero__title { width: 62%; padding-bottom: 30px; }
  .strict-lesson-hero__eyebrow { margin-bottom: 14px !important; font-size: 9px !important; }
  .strict-lesson-hero__title h1 { font-size: clamp(43px, 12.5vw, 66px) !important; }
  .strict-lesson-hero__teacher-shape { right: -18%; bottom: -7%; width: 56%; height: 72%; }
  .strict-lesson-hero__teacher { right: 7% !important; bottom: 2% !important; width: 148% !important; height: 116% !important; }
}

.strict-reader-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  width: min(calc(100% - 42px), 1180px) !important;
  gap: 18px !important;
}

.lesson-contents-disclosure {
  display: grid;
  width: 100%;
  margin: 0;
  align-items: start;
  gap: 12px;
}

.lesson-contents-disclosure > summary {
  display: inline-grid;
  grid-template-columns: auto auto 34px;
  width: max-content;
  min-height: 48px;
  padding: 7px 8px 7px 18px;
  border: 1px solid rgba(41, 39, 45, .1);
  border-radius: 999px;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: #29272d;
  cursor: pointer;
  list-style: none;
}

.lesson-contents-disclosure > summary::-webkit-details-marker { display: none; }
.lesson-contents-disclosure > summary::marker { content: ''; }
.lesson-contents-disclosure > summary:focus-visible {
  outline: 3px solid var(--course-banner-accent, #b0ee0b);
  outline-offset: 3px;
}
.lesson-contents-disclosure > summary span { color: var(--course-banner, #9267ea); font: 900 12px/1 var(--font-display); letter-spacing: .08em; }
.lesson-contents-disclosure > summary strong { color: #777080; font-size: 12px; }
.lesson-contents-disclosure > summary i {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--course-banner, #9267ea);
  color: #fff;
  font-style: normal;
  place-items: center;
  transition: transform .2s ease;
}
.lesson-contents-disclosure[open] > summary i { transform: rotate(45deg); }

.lesson-contents-disclosure > nav {
  position: static !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100% !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid rgba(41, 39, 45, .08) !important;
  border-radius: 24px 32px 22px 29px !important;
  background: #fffefa !important;
  box-shadow: none !important;
  gap: 8px 14px !important;
}

.lesson-contents-disclosure > nav a {
  position: relative;
  display: flex !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 9px 12px 9px 28px !important;
  border: 0 !important;
  border-radius: 14px 18px 13px 17px;
  align-items: center;
  background: color-mix(in srgb, var(--course-banner, #9267ea) 7%, #fff) !important;
  color: #29272d !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-decoration: none;
}

.lesson-contents-disclosure > nav a::before {
  position: absolute;
  left: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--course-banner-accent, #b0ee0b);
  content: '';
}

.strict-reader-rail {
  position: sticky !important;
  top: 24px;
  display: grid !important;
  align-self: start !important;
  align-content: start !important;
  gap: 30px !important;
}

.strict-reader-rail > nav {
  position: relative !important;
  top: auto !important;
  padding: 25px 24px 28px !important;
  border: 1px solid color-mix(in srgb, var(--course-banner, #9267ea) 18%, transparent);
  border-radius: 28px 42px 26px 38px !important;
  background: #fffefa !important;
}

.strict-reader-rail > nav > span {
  margin-bottom: 18px !important;
  color: var(--course-banner, #9267ea) !important;
  font-size: 11px !important;
}

.strict-reader-rail > nav a {
  position: relative;
  min-height: 48px !important;
  padding: 12px 4px 12px 18px !important;
  border-color: rgba(41, 39, 45, .1) !important;
  line-height: 1.25;
}

.strict-reader-rail > nav a::before {
  position: absolute;
  left: 1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--course-banner-accent, #b0ee0b);
  content: '';
}

.strict-reader-rail > .division-reader-rail__rhythm {
  padding: 4px 10px 4px 20px !important;
  border-left: 5px solid var(--course-banner, #9267ea);
  border-radius: 0 !important;
  background: transparent !important;
  color: #29272d !important;
}

.strict-reader-rail > .division-reader-rail__rhythm > span {
  max-width: 220px;
  margin-bottom: 17px !important;
  color: var(--course-banner, #9267ea) !important;
  font-size: 11px !important;
  line-height: 1.35;
}

.strict-reader-rail .division-reader-rail__rhythm ol {
  gap: 13px !important;
}

.strict-reader-rail .division-reader-rail__rhythm li {
  position: relative;
  display: block !important;
  padding-left: 19px;
  font-size: 14px !important;
  font-weight: 760 !important;
  line-height: 1.35;
}

.strict-reader-rail .division-reader-rail__rhythm li::before {
  position: absolute;
  top: .45em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--course-banner-accent, #b0ee0b);
  content: '';
}

.strict-reader-article {
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid rgba(41, 39, 45, .06);
  border-radius: 48px 68px 44px 62px !important;
  background: #fffefa !important;
}

.strict-reader-section {
  position: relative;
  padding: clamp(58px, 6vw, 88px) clamp(34px, 5.5vw, 78px) !important;
  overflow: hidden;
  border-top: 1px solid rgba(41, 39, 45, .1) !important;
  isolation: isolate;
}

.strict-reader-section:nth-child(even) {
  background: color-mix(in srgb, var(--course-banner, #9267ea) 4%, #fffefa);
}

.strict-reader-section::before {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(180deg, var(--course-banner, #9267ea), var(--course-banner-accent, #b0ee0b));
  content: '';
}

.strict-reader-section::after {
  position: absolute;
  z-index: -1;
  top: 24px;
  right: 30px;
  color: color-mix(in srgb, var(--course-banner, #9267ea) 9%, transparent);
  content: attr(data-reader-chapter);
  font: 950 clamp(86px, 10vw, 150px) / .8 var(--font-display);
  letter-spacing: -.08em;
}

.strict-reader-section h2 {
  position: relative;
  z-index: 1;
  max-width: 760px !important;
}

.strict-reader-article .division-reader-finale {
  margin: 0 !important;
  border-radius: 0 0 44px 62px !important;
}

@media (max-width: 920px) {
  .strict-reader-layout { grid-template-columns: 1fr !important; }
  .strict-reader-rail { position: static !important; grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 620px) {
  .strict-reader-rail { grid-template-columns: 1fr !important; }
  .lesson-contents-disclosure > summary { grid-template-columns: auto 34px; }
  .lesson-contents-disclosure > summary strong { display: none; }
  .lesson-contents-disclosure > nav { grid-template-columns: 1fr; }
  .strict-reader-section { padding-inline: 24px !important; }
}

.division-module-page {
  --course-banner: var(--violet, #9267ea);
  --course-banner-accent: var(--acid, #b0ee0b);
}

.division-module-page[data-course-theme="sciences"],
.division-module-page.science-light-course {
  --course-banner: #0f9f51;
  --course-banner-accent: #b0ee0b;
}

.division-module-page[data-course-theme="education-civique"] {
  --course-banner: #00a98f;
  --course-banner-accent: #dff8f2;
  --acid: #00a98f;
  --coral: #00a98f;
}

.division-module-bar {
  width: 100vw;
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  padding-inline: max(clamp(18px, 4vw, 72px), env(safe-area-inset-left));
  box-sizing: border-box;
  background: var(--course-banner) !important;
  color: #fff;
}

.division-module-bar::after { background: var(--course-banner-accent) !important; }
.division-module-bar span { color: var(--course-banner-accent) !important; }
.division-module-bar strong { color: #fff; }
.division-module-bar time { background: var(--course-banner-accent); color: #29272d; }

.division-module-bar span,
.division-module-bar strong,
.division-module-bar time,
.division-module-nav i,
.division-module-nav strong,
.division-module-nav small,
.division-module-kicker,
.division-reader-chapter,
.division-flashcard-controls button,
.division-flashcards-summary,
.division-summary-actions button,
.division-guide-assessment > footer button,
.division-course-action { font-family: var(--font-display); }

.division-module-nav button,
.division-flashcard-controls button,
.division-flashcards-summary,
.division-summary-actions button,
.division-guide-assessment > footer button { box-shadow: none; }

.division-course-action {
  min-height: 64px;
  padding: 10px 12px 10px 22px;
  border: 0;
  border-radius: 27px 39px 24px 35px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #0f9f51;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: none;
}

.division-course-action b {
  display: grid;
  width: 46px;
  height: 46px;
  border-radius: 16px 21px 14px 19px;
  background: #b0ee0b;
  color: #29272d;
  place-items: center;
}

/* Permanent collision guard for every Maths-founded lesson cover. */
.division-reader-cover {
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
}

.division-reader-cover__copy,
.division-reader-cover__visual { min-width: 0; }

.division-guide-cover > div,
.division-guide-cover > aside { min-width: 0; }

.division-guide-cover h1 {
  max-inline-size: 100%;
  overflow-wrap: normal;
  text-wrap: balance;
}

.division-reader-cover__copy .course-hero-title,
.division-reader-cover__copy > h1 {
  max-inline-size: 9.2ch;
  font-size: clamp(54px, 6.4vw, 104px);
  line-height: .84;
  overflow-wrap: normal;
  text-wrap: balance;
}

.division-reader-cover__copy .course-hero-title i,
.division-reader-cover__copy > h1 i {
  display: block;
  max-inline-size: 100%;
  white-space: normal;
}

@media (max-width: 900px) {
  .division-reader-cover { grid-template-columns: 1fr; }
  .division-reader-cover__copy .course-hero-title,
  .division-reader-cover__copy > h1 { max-inline-size: 10ch; font-size: clamp(50px, 13vw, 82px); }
}

/* Approved Maths reference interface. */
body:has(.maths-pilot-sidebar),
#app:has(.maths-pilot-sidebar) {
  background: #fffefa !important;
}

.maths-pilot-sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: grid;
  width: 176px;
  height: 100vh;
  padding: 20px 14px;
  box-sizing: border-box;
  align-content: start;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #6f49df 0%, #8b68ec 58%, #7352df 100%);
  color: #fff;
}

.maths-pilot-sidebar.is-musique {
  background: linear-gradient(180deg, #4c4cc6 0%, #6666dc 58%, #5b5bd6 100%);
}

.maths-pilot-sidebar::after {
  position: absolute;
  right: -90px;
  bottom: 14%;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  content: '';
}

.maths-pilot-sidebar__profile {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 54px 1fr;
  width: 144px;
  min-height: 72px;
  margin: 0 auto;
  padding: 8px 10px 8px 8px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .13);
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.maths-pilot-sidebar__profile img {
  width: 54px;
  height: 54px;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
}

.maths-pilot-sidebar__profile span { display: grid; min-width: 0; gap: 4px; }
.maths-pilot-sidebar__profile strong { overflow: hidden; font: 850 12px/1 var(--font-display); text-overflow: ellipsis; }
.maths-pilot-sidebar__profile small { color: rgba(255, 255, 255, .7); font-size: 10px; }

.maths-pilot-sidebar nav {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 8px;
}

.maths-pilot-sidebar nav a,
.maths-pilot-sidebar nav button {
  display: grid;
  grid-template-columns: 38px 1fr;
  min-height: 58px;
  padding: 8px 12px;
  border: 0;
  border-radius: 18px 25px 17px 22px;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #fff;
  font: 850 14px/1 var(--font-display);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.maths-pilot-sidebar nav i {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  font-style: normal;
  place-items: center;
}

.maths-pilot-sidebar nav i svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.maths-pilot-sidebar nav .is-active {
  border: 1px solid rgba(255, 238, 89, .68);
  background: rgba(255, 255, 255, .13);
  color: #fff15d;
}

.maths-pilot-sidebar .maths-pilot-language {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 112px;
  min-height: 44px;
  margin: 12px auto 0;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  gap: 3px;
  background: rgba(255, 255, 255, .12);
}

.maths-pilot-sidebar .maths-pilot-language span {
  display: grid;
  min-height: 34px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .72);
  place-items: center;
}

.maths-pilot-sidebar .maths-pilot-language span.is-active {
  background: #fff;
  color: #714de0;
}

.maths-pilot-sidebar__buddy {
  position: relative;
  z-index: 1;
  display: block;
  width: 118px;
  height: 118px;
  margin: auto auto 0;
  object-fit: contain;
  animation: maths-pilot-buddy-float 2.4s ease-in-out infinite;
  filter: drop-shadow(0 12px 16px rgba(61, 36, 120, .18));
}

@keyframes maths-pilot-buddy-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-11px) rotate(2deg); }
}

.maths-pilot-header,
.maths-pilot-course {
  width: calc(100% - 176px) !important;
  margin-left: 176px !important;
  box-sizing: border-box;
}

.maths-pilot-header {
  display: block !important;
  min-height: 154px !important;
  padding: 0 !important;
  background: #fffefa !important;
}

.maths-pilot-header > .immersive-nav,
.maths-pilot-header > .division-module-bar {
  display: none !important;
}

.maths-pilot-topbar {
  display: flex;
  min-height: 154px;
  padding: 26px clamp(24px, 4vw, 64px);
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.maths-pilot-topbar > div {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.maths-pilot-topbar > div > span {
  color: #714de0;
  font: 850 14px/1 var(--font-display);
}

.maths-pilot-topbar > div > span i {
  padding-inline: 8px;
  color: #b0ee0b;
  font-style: normal;
}

.maths-pilot-header[data-course-theme="maths"] .maths-pilot-subject-chip {
  display: flex;
  width: max-content;
  min-height: 32px;
  padding: 0 14px 0 11px;
  box-sizing: border-box;
  border-left: 6px solid #9267ea;
  border-radius: 9px 18px 15px 10px;
  align-items: center;
  background: #f2ebff;
  color: #29272d;
  font-weight: 900;
}

.maths-pilot-header[data-course-theme="maths"] .maths-pilot-subject-chip i {
  color: #9267ea;
}

.maths-pilot-topbar > div > strong {
  max-width: min(54vw, 760px);
  color: #29272d;
  font: 950 clamp(27px, 2.75vw, 44px)/.94 var(--font-display);
  text-wrap: balance;
  white-space: normal;
}

.maths-pilot-topbar > aside {
  display: flex;
  align-items: center;
  gap: 16px;
}

.maths-pilot-points,
.maths-pilot-brand {
  border: 1px solid rgba(41, 39, 45, .08);
  background: #fffefa;
  color: #29272d;
  box-shadow: 0 12px 28px rgba(90, 70, 130, .08);
}

.maths-pilot-points {
  display: grid;
  grid-template-columns: 28px auto 88px;
  min-height: 50px;
  padding: 7px 15px;
  border-radius: 999px;
  align-items: center;
  gap: 9px;
}

.maths-pilot-points > i {
  color: #ffc928;
  font-style: normal;
}

.maths-pilot-points > strong { font: 850 13px/1 var(--font-display); }
.maths-pilot-points > span { height: 7px; overflow: hidden; border-radius: 999px; background: #eee9f8; }
.maths-pilot-points > span b { display: block; width: 66%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #704ce0, #ffc928); }

.maths-pilot-brand {
  display: grid;
  width: 104px;
  height: 72px;
  padding: 5px;
  border-radius: 26px 34px 24px 30px;
  overflow: hidden;
  cursor: pointer;
  place-items: center;
}
.maths-pilot-brand img { width: 100%; height: 100%; object-fit: contain; }

.maths-pilot-course {
  padding: 0 var(--authenticated-shell-gutter, clamp(22px, 3vw, 50px)) 80px !important;
}

.maths-pilot-course:not(.division-flashcards-page) { background: #fffefa !important; }
.maths-pilot-header + .maths-pilot-course:not(.division-flashcards-page) { background: #fffefa !important; }

body:has(.maths-pilot-sidebar):has(.division-flashcards-page),
#app:has(.maths-pilot-sidebar):has(.division-flashcards-page),
.maths-pilot-course.division-flashcards-page {
  background: var(--foundation-support, #f2ebff) !important;
}

.maths-pilot-header:has(+ .division-flashcards-page) { background: #f2ebff !important; }
.maths-pilot-header:has(+ .division-flashcards-page) .maths-pilot-topbar > div > span,
.maths-pilot-header:has(+ .division-flashcards-page) .maths-pilot-topbar > div > strong { color: #29272d; }

.maths-pilot-course > .division-module-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  margin: 0 auto 32px;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid rgba(41, 39, 45, .07);
  border-radius: 28px 38px 26px 35px;
  gap: 4px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(80, 59, 126, .08);
}

.maths-pilot-course > .division-module-nav::before { display: none; }
.maths-pilot-course > .division-module-nav button { min-height: 72px; border-radius: 22px 30px 20px 27px; background: transparent; }
.maths-pilot-course > .division-module-nav i { background: var(--foundation-accent, #9267ea) !important; color: #fff !important; }
.maths-pilot-course > .division-module-nav button.is-current { background: var(--foundation-support, #f2ebff) !important; color: #29272d !important; transform: none; }
.maths-pilot-course > .division-module-nav button.is-current i { background: var(--foundation-accent, #9267ea) !important; color: #fff !important; }
body:has(.maths-pilot-sidebar) .maths-pilot-course.division-flashcards-page > .division-module-nav button.is-current {
  background: var(--foundation-support, #f2ebff) !important;
}

body:has(.maths-pilot-sidebar.is-maths) .maths-pilot-course[data-course-theme="maths"].division-flashcards-page > .division-module-nav button.is-current i {
  background: #9267ea !important;
  color: #fff !important;
}

.maths-pilot-course[data-course-theme="maths"] .kid-lesson-welcome__hero {
  background-color: #f2ebff;
}

.maths-pilot-course[data-course-theme="maths"] .kid-lesson-welcome__copy > span,
.maths-pilot-course[data-course-theme="maths"] .kid-lesson-welcome__copy h1 em {
  color: #9267ea;
}

.maths-pilot-course[data-course-theme="maths"] .kid-lesson-welcome__copy button {
  background: #9267ea;
}

.maths-pilot-course[data-course-theme="maths"] .kid-lesson-welcome__copy button b {
  color: #9267ea;
}

/* English keeps the canonical Maths shell geometry and changes only subject skin tokens. */
.maths-pilot-sidebar.is-english {
  background: linear-gradient(180deg, #e64396 0%, #f35aa5 55%, #d83c88 100%);
}

.maths-pilot-sidebar.is-english::after { background: rgba(255, 255, 255, .1); }
.maths-pilot-sidebar.is-english nav .is-active {
  border-color: rgba(255, 232, 88, .82);
  color: #fff15d;
}

.maths-pilot-sidebar.is-english .maths-pilot-language span.is-active {
  color: #d83c88;
}

.maths-pilot-sidebar.is-english + .maths-pilot-header .maths-pilot-topbar > div > span {
  width: max-content;
  padding: 8px 12px 8px 16px;
  border-left: 6px solid #f35aa5;
  border-radius: 9px 16px 16px 9px;
  color: #29272d;
  background: #ffe5f2;
}

.maths-pilot-sidebar.is-english + .maths-pilot-header .maths-pilot-topbar > div > span i {
  color: #f35aa5;
}

.maths-pilot-sidebar.is-english + .maths-pilot-header .maths-pilot-points > span b {
  background: linear-gradient(90deg, #f35aa5, #ffd43a);
}

.maths-pilot-course[data-course-theme="english"] > .division-module-nav button i {
  background: #f35aa5 !important;
  color: #fff !important;
}

.maths-pilot-course[data-course-theme="english"] > .division-module-nav button.is-current {
  background: #ffe5f2 !important;
  color: #29272d !important;
}

.maths-pilot-course[data-course-theme="english"] .kid-lesson-welcome__hero {
  background-color: #ffe5f2;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .68) 0, rgba(255, 255, 255, .68) 4px, transparent 5px);
  background-size: 34px 34px;
}

.maths-pilot-course[data-course-theme="english"] .kid-lesson-welcome__teacher > span {
  background: #f7a7ce;
}

.maths-pilot-course[data-course-theme="english"] .kid-lesson-welcome__copy > span,
.maths-pilot-course[data-course-theme="english"] .kid-lesson-welcome__copy h1 em,
.maths-pilot-course[data-course-theme="english"] .kid-lesson-welcome__goals > span,
.maths-pilot-course[data-course-theme="english"] .kid-lesson-welcome__progress header span,
.maths-pilot-course[data-course-theme="english"] .kid-lesson-welcome__progress header > strong {
  color: #d83c88;
}

.maths-pilot-course[data-course-theme="english"] .kid-lesson-welcome__copy button {
  background: #f35aa5;
}

.maths-pilot-course[data-course-theme="english"] [tabindex="-1"]:focus {
  outline: none;
}

body:has(.maths-pilot-sidebar.is-english) .maths-pilot-course[data-course-theme="english"].division-flashcards-page > .division-module-nav button.is-current {
  background: #f35aa5 !important;
  color: #fff !important;
}

body:has(.maths-pilot-sidebar.is-english) .maths-pilot-course[data-course-theme="english"].division-flashcards-page > .division-module-nav button.is-current i {
  background: #fff !important;
  color: #d83c88 !important;
}

body:has(.maths-pilot-sidebar.is-english):has(.division-flashcards-page),
#app:has(.maths-pilot-sidebar.is-english):has(.division-flashcards-page),
.maths-pilot-course[data-course-theme="english"].division-flashcards-page,
.maths-pilot-sidebar.is-english + .maths-pilot-header:has(+ .division-flashcards-page) {
  background: #ffe5f2 !important;
}

/* Arts keeps the exact approved pilot shell while using its locked subject pair. */
.maths-pilot-sidebar.is-arts {
  background: #f29c45;
  color: #29272d;
}

.maths-pilot-sidebar.is-arts::after { background: rgba(255, 240, 220, .42); }
.maths-pilot-sidebar.is-arts nav :where(a, button) { color: #29272d; }
.maths-pilot-sidebar.is-arts nav i { background: rgba(255, 240, 220, .68); }
.maths-pilot-sidebar.is-arts nav .is-active {
  border-color: #29272d;
  background: #fff0dc;
  color: #29272d;
}
.maths-pilot-sidebar.is-arts .maths-pilot-language { border-color: rgba(41, 39, 45, .3); background: rgba(255, 240, 220, .5); }
.maths-pilot-sidebar.is-arts .maths-pilot-language span { color: rgba(41, 39, 45, .68); }
.maths-pilot-sidebar.is-arts .maths-pilot-language span.is-active { background: #fff0dc; color: #29272d; }
.maths-pilot-header[data-course-theme='arts'] .maths-pilot-topbar > div > span {
  display: block;
  width: max-content;
  padding: 8px 12px 8px 16px;
  border-left: 6px solid #f29c45;
  border-radius: 9px 16px 16px 9px;
  background: #fff0dc;
  color: #29272d;
  font: 850 14px/1 var(--font-display);
}
.maths-pilot-header[data-course-theme='arts'] .maths-pilot-topbar > div > span i {
  color: #f29c45;
}
.maths-pilot-header[data-course-theme='arts'] .maths-pilot-points > span { background: #fff0dc; }
.maths-pilot-header[data-course-theme='arts'] .maths-pilot-points > span b { background: #f29c45; }
.maths-pilot-course[data-course-theme='arts'] > .division-module-nav button.is-current {
  background: #fff0dc !important;
  color: #29272d !important;
}
.maths-pilot-course[data-course-theme='arts'] > .division-module-nav button.is-current i {
  background: #f29c45 !important;
  color: #29272d !important;
}
body:has(.maths-pilot-sidebar.is-arts) .maths-pilot-course[data-course-theme='arts'].division-flashcards-page > .division-module-nav button.is-current {
  background: #fff0dc !important;
  color: #29272d !important;
}
body:has(.maths-pilot-sidebar.is-arts) .maths-pilot-course[data-course-theme='arts'].division-flashcards-page > .division-module-nav button.is-current i {
  background: #f29c45 !important;
  color: #29272d !important;
}
body:has(.maths-pilot-sidebar.is-arts):has(.division-flashcards-page),
#app:has(.maths-pilot-sidebar.is-arts):has(.division-flashcards-page),
.maths-pilot-course[data-course-theme='arts'].division-flashcards-page,
.maths-pilot-header[data-course-theme='arts']:has(+ .division-flashcards-page) {
  background: #fff0dc !important;
}

.maths-pilot-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
  width: 100%;
  align-items: stretch;
  gap: 24px;
}

.maths-pilot-course > .kid-lesson-welcome {
  width: 100%;
  max-width: none;
}

.maths-pilot-dashboard > .strict-lesson-hero {
  width: 100% !important;
  min-height: 560px !important;
  margin: 0 !important;
  padding: clamp(38px, 5vw, 68px) clamp(32px, 4.5vw, 64px) !important;
  border-radius: 34px 48px 31px 44px !important;
  background: radial-gradient(circle at 20% 18%, rgba(255,255,255,.25) 0 2px, transparent 3px) 0 0 / 20px 20px, linear-gradient(135deg, #ffd644, #ffc928) !important;
}

[data-course-foundation="maths-cm2-five-space"][data-course-theme="maths"] .strict-lesson-hero {
  background: radial-gradient(circle at 20% 18%, rgba(255,255,255,.72) 0 2px, transparent 3px) 0 0 / 20px 20px, #f2ebff !important;
}

.maths-pilot-dashboard .strict-lesson-hero__title { width: min(58%, 680px); }
.maths-pilot-dashboard .strict-lesson-hero__title h1 { font-size: clamp(58px, 6vw, 96px) !important; }
.maths-pilot-dashboard .strict-lesson-hero__title h1 > span {
  overflow-wrap: normal;
  word-break: normal;
}
.maths-pilot-dashboard .strict-lesson-hero__teacher-shape { right: -2%; bottom: -8%; width: 39%; height: 78%; }
.maths-pilot-dashboard .strict-lesson-hero__teacher-shape::before { inset: 22% -3% 0 10%; background: #cbb8ff; }
.maths-pilot-dashboard .strict-lesson-hero__teacher { right: -4% !important; bottom: 2% !important; width: 146% !important; height: 114% !important; }

.maths-pilot-dashboard__right {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.maths-pilot-outcomes,
.maths-pilot-progress {
  border: 1px solid rgba(41, 39, 45, .07);
  border-radius: 27px 36px 25px 33px;
  background: #fffefa;
  box-shadow: 0 16px 34px rgba(80, 59, 126, .07);
}

.maths-pilot-outcomes { padding: 26px 20px; }
.maths-pilot-outcomes h2 { margin: 0 0 18px; color: #29272d; font: 950 20px/1.15 var(--font-display); }
.maths-pilot-outcomes h2 {
  font-family: var(--font-body) !important;
  font-weight: 900 !important;
  letter-spacing: -.02em;
  text-transform: none;
}
.maths-pilot-outcomes ol { display: grid; margin: 0; padding: 0; list-style: none; gap: 10px; }
.maths-pilot-outcomes li { display: grid; grid-template-columns: 42px 1fr 16px; min-height: 62px; padding: 8px 10px 8px 8px; border: 1px solid rgba(41,39,45,.07); border-radius: 18px 24px 17px 22px; align-items: center; gap: 10px; background: #fff; }
.maths-pilot-outcomes li > i { display: grid; width: 42px; height: 42px; border-radius: 13px 17px 12px 16px; background: #714de0; color: #fff; font-style: normal; place-items: center; }
.maths-pilot-outcomes li:nth-child(2) > i { background: #ffc928; color: #29272d; }
.maths-pilot-outcomes li:nth-child(3) > i { background: #b0ee0b; color: #29272d; }
.maths-pilot-outcomes li:nth-child(4) > i { background: #ff79b9; color: #29272d; }
.maths-pilot-outcomes li > span { display: grid; grid-template-columns: 25px 1fr; align-items: start; gap: 5px; }
.maths-pilot-outcomes li small { color: #714de0; font-weight: 900; }
.maths-pilot-outcomes li strong { font-size: 12px; line-height: 1.3; }
.maths-pilot-outcomes li > b { color: #91899b; font-size: 20px; }

.maths-pilot-progress { padding: 22px; }
.maths-pilot-progress > div { display: flex; align-items: baseline; justify-content: space-between; }
.maths-pilot-progress > div span { font: 900 16px/1 var(--font-display); }
.maths-pilot-progress > div strong { color: #714de0; font: 950 34px/1 var(--font-display); }
.maths-pilot-progress svg { width: 100%; height: 62px; margin-top: 8px; overflow: visible; }
.maths-pilot-progress path { fill: none; stroke: #714de0; stroke-width: 3; stroke-linecap: round; }
.maths-pilot-progress circle { fill: #ffd02f; stroke: #fff; stroke-width: 2; }
.maths-pilot-progress p { margin: 6px 0 0; color: #777080; font-size: 11px; }
.maths-pilot-progress p i { color: #ffc928; font-style: normal; }

.maths-pilot-next {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 22px 0 42px;
  gap: 18px;
}

.maths-pilot-next article {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 110px;
  min-height: 176px;
  padding: 25px;
  overflow: hidden;
  border: 1px solid rgba(41,39,45,.07);
  border-radius: 25px 36px 23px 32px;
  align-items: center;
  background: #eee7ff;
}

.maths-pilot-next article.is-cards { background: #f2f6d7; }
.maths-pilot-next article.is-summary,
.maths-pilot-next article.is-guide { background: #ffe8f3; }
.maths-pilot-next h2 { margin: 0; font: 950 24px/1 var(--font-display); }
.maths-pilot-next p { margin: 7px 0 22px; font-size: 14px; }
.maths-pilot-next button { min-height: 43px; padding: 9px 14px; border: 0; border-radius: 999px; background: #fff; color: #29272d; font-weight: 850; cursor: pointer; }
.maths-pilot-next article > span { position: relative; z-index: 1; display: grid; width: 92px; height: 92px; border-radius: 31% 69% 54% 46% / 55% 40% 60% 45%; background: #714de0; color: #fff; font: 950 44px/1 var(--font-display); place-items: center; transform: rotate(-8deg); }
.maths-pilot-next article > span svg { width: 52px; height: 52px; fill: currentColor; transform: rotate(8deg); }
.maths-pilot-next .is-cards > span { background: #b0ee0b; color: #714de0; }
.maths-pilot-next .is-summary > span,
.maths-pilot-next .is-guide > span { background: #ff79b9; }

.maths-pilot-summary-next {
  width: min(100%, 1180px);
  margin: 28px auto 44px;
}

/* Maths summary journey: checkpoints, gestures, destination. */
.maths-pilot-course .maths-summary-visual-journey,
.maths-pilot-course .maths-summary-journey,
.maths-pilot-course .maths-summary-method-journey,
.maths-pilot-course .maths-summary-destination {
  grid-column: 1 / -1;
}

.maths-pilot-course .maths-summary-visual-journey {
  position: relative;
  min-height: 500px;
  padding: clamp(30px, 4vw, 54px) !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(176, 238, 11, .45) 0 6px, transparent 7px),
    radial-gradient(circle at 88% 24%, rgba(255, 201, 40, .52) 0 8px, transparent 9px),
    radial-gradient(circle at 82% 82%, rgba(255, 121, 185, .38) 0 7px, transparent 8px),
    #f7f3ff !important;
  box-shadow: 0 16px 34px rgba(113, 77, 224, .08) !important;
}

.maths-summary-visual-journey > span {
  position: relative;
  z-index: 2;
  display: block;
  color: #714de0 !important;
  font: 950 13px/1 var(--font-display);
  letter-spacing: .12em;
}

.maths-summary-visual-journey .maths-summary-journey-figure {
  position: relative;
  z-index: 1;
  width: min(100%, 920px) !important;
  margin: 8px auto 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.maths-summary-visual-journey .maths-summary-journey-figure > div {
  min-height: 390px !important;
}

.maths-summary-visual-journey .maths-summary-journey-figure svg {
  max-height: 410px !important;
  filter: none !important;
}

.maths-summary-visual-journey .learning-proof .lp-mat {
  fill: transparent !important;
  stroke: none !important;
}

.maths-summary-visual-journey .learning-proof rect[style*="stroke:#29272d"],
.maths-summary-visual-journey .learning-proof path[style*="stroke:#29272d"] {
  stroke: rgba(113, 77, 224, .34) !important;
  stroke-width: 3px !important;
}

.maths-summary-visual-journey .learning-proof g[style*="stroke:#29272d"] {
  stroke: #8d72e7 !important;
  stroke-width: 4px !important;
}

.maths-summary-visual-journey .learning-proof .lp-chance-checks > g,
.maths-summary-visual-journey .learning-proof .lp-float,
.maths-summary-visual-journey .learning-proof .lp-proof-tag {
  filter: drop-shadow(0 9px 10px rgba(113, 77, 224, .12));
}

.maths-summary-visual-journey .learning-proof .lp-proof-tag rect {
  fill: #714de0 !important;
}

.maths-summary-visual-journey .chance-kid-story .chance-story-card > rect:first-child {
  filter: drop-shadow(0 11px 14px rgba(113, 77, 224, .1));
}

.maths-summary-visual-journey .chance-kid-story .chance-story-arrow {
  fill: none;
  stroke: #8d72e7;
  stroke-width: 7px;
  stroke-linecap: round;
  stroke-dasharray: 7 8;
}

.maths-summary-visual-journey .chance-kid-story .chance-story-reveal {
  filter: drop-shadow(0 9px 12px rgba(255, 121, 185, .2));
}

.maths-summary-visual-journey .chance-kid-story .chance-story-rule {
  filter: drop-shadow(0 10px 14px rgba(113, 77, 224, .15));
}

.maths-summary-visual-journey .maths-summary-journey-figure figcaption {
  position: relative;
  z-index: 2;
  margin: -10px auto 0 !important;
  padding: 11px 18px !important;
  border: 1px solid rgba(113, 77, 224, .1);
  background: #fffefa !important;
  color: #714de0 !important;
  box-shadow: none !important;
}

.maths-pilot-course .maths-summary-journey {
  padding: clamp(30px, 4vw, 54px) !important;
  overflow: hidden;
  background: #fffefa !important;
}

.maths-summary-journey > span,
.maths-summary-method-journey > span,
.maths-summary-destination > span {
  display: block;
  color: #714de0 !important;
  font: 950 13px/1 var(--font-display);
  letter-spacing: .12em;
}

.maths-summary-journey ol {
  position: relative;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 30px 0 0 !important;
  padding: 0 !important;
  gap: 24px 84px !important;
}

.maths-summary-journey li {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 110px;
  padding: 16px 18px !important;
  border: 1px solid rgba(113, 77, 224, .09);
  border-radius: 24px 32px 22px 29px !important;
  align-items: center;
  gap: 14px !important;
  background: #eee7ff !important;
  list-style: none;
}

.maths-summary-journey li:nth-child(2),
.maths-summary-journey li:nth-child(6) { background: #fff1c8 !important; }
.maths-summary-journey li:nth-child(3),
.maths-summary-journey li:nth-child(7) { background: #edf7d7 !important; }
.maths-summary-journey li:nth-child(4),
.maths-summary-journey li:nth-child(8) { background: #ffe8f3 !important; }

.maths-summary-journey li:nth-child(1) { grid-area: 1 / 1; }
.maths-summary-journey li:nth-child(2) { grid-area: 1 / 2; }
.maths-summary-journey li:nth-child(3) { grid-area: 2 / 2; }
.maths-summary-journey li:nth-child(4) { grid-area: 2 / 1; }
.maths-summary-journey li:nth-child(5) { grid-area: 3 / 1; }
.maths-summary-journey li:nth-child(6) { grid-area: 3 / 2; }
.maths-summary-journey li:nth-child(7) { grid-area: 4 / 2; }
.maths-summary-journey li:nth-child(8) { grid-area: 4 / 1; }

.maths-summary-journey li i {
  display: grid !important;
  width: 64px !important;
  height: 64px !important;
  border-radius: 22px 29px 20px 27px !important;
  background: #714de0 !important;
  color: #fff !important;
  font-size: 18px;
  place-items: center;
}

.maths-summary-journey li:nth-child(2n) i { background: #ffc928 !important; color: #29272d !important; }
.maths-summary-journey li:nth-child(3n) i { background: #b0ee0b !important; color: #29272d !important; }
.maths-summary-journey li:nth-child(4n) i { background: #ff79b9 !important; color: #29272d !important; }
.maths-summary-journey li b { color: #29272d; font-size: 15px; line-height: 1.15; }
.maths-summary-journey li small { margin-top: 7px !important; color: #655f6c; font-size: 13px; line-height: 1.35; }

.maths-summary-journey li::after {
  position: absolute;
  z-index: -1;
  content: '';
}

.maths-summary-journey li:is(:nth-child(1), :nth-child(5))::after {
  top: 50%;
  right: -85px;
  width: 86px;
  border-top: 4px dashed #b0ee0b;
}

.maths-summary-journey li:is(:nth-child(3), :nth-child(7))::after {
  top: 50%;
  left: -85px;
  width: 86px;
  border-top: 4px dashed #9267ea;
}

.maths-summary-journey li:is(:nth-child(2), :nth-child(4), :nth-child(6))::after {
  bottom: -25px;
  left: 50%;
  height: 26px;
  border-left: 4px dashed #ffc928;
}

.maths-pilot-course .maths-summary-method-journey {
  padding: clamp(30px, 4vw, 48px) !important;
  overflow: hidden;
  background: #eee7ff !important;
  color: #29272d !important;
}

.maths-summary-method-journey ol {
  position: relative;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  margin: 30px 0 0 !important;
  padding: 10px 0 0 !important;
  gap: 20px !important;
}

.maths-summary-method-journey ol::before {
  position: absolute;
  top: 43px;
  right: 9%;
  left: 9%;
  border-top: 4px dashed rgba(113, 77, 224, .28);
  content: '';
}

.maths-summary-method-journey li {
  position: relative;
  z-index: 1;
  display: grid !important;
  justify-items: center;
  gap: 13px !important;
  text-align: center;
}

.maths-summary-method-journey li i {
  display: grid !important;
  width: 68px !important;
  height: 68px !important;
  border-radius: 23px 30px 21px 28px !important;
  background: #714de0 !important;
  color: #fff !important;
  font-size: 20px;
  place-items: center;
}

.maths-summary-method-journey li:nth-child(2) i { background: #ffc928 !important; color: #29272d !important; }
.maths-summary-method-journey li:nth-child(3) i { background: #b0ee0b !important; color: #29272d !important; }
.maths-summary-method-journey li:nth-child(4) i { background: #ff79b9 !important; color: #29272d !important; }
.maths-summary-method-journey li strong { color: #29272d; font-size: 15px !important; }

.maths-pilot-course .maths-summary-destination {
  position: relative;
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1.6fr) minmax(210px, 270px) !important;
  min-height: 230px;
  padding: clamp(30px, 4vw, 52px) !important;
  overflow: hidden;
  border: 1px solid rgba(113, 77, 224, .08);
  align-items: center;
  gap: 12px 30px !important;
  background: linear-gradient(135deg, #f4fbdf, #e7f7bd) !important;
  color: #29272d !important;
}

.maths-summary-destination::before {
  display: grid;
  grid-row: 1 / 3;
  width: 84px;
  height: 84px;
  border-radius: 28px 38px 26px 35px;
  background: #714de0;
  color: #fff;
  content: '✓';
  font: 950 40px/1 var(--font-display);
  place-items: center;
  transform: rotate(-5deg);
}

.maths-summary-destination > span { grid-column: 2; align-self: end; }
.maths-summary-destination > strong {
  grid-column: 2;
  align-self: start;
  color: #29272d !important;
  font-size: clamp(25px, 2.35vw, 34px) !important;
  line-height: 1.12 !important;
}

.maths-summary-destination > p {
  grid-column: 3;
  grid-row: 1 / 3;
  margin: 0 !important;
  padding: 24px !important;
  border: 1px solid rgba(113, 77, 224, .08);
  border-radius: 23px 31px 21px 28px !important;
  background: #fffefa !important;
  color: #29272d !important;
  font-size: 17px !important;
  line-height: 1.3 !important;
}

.maths-pilot-reading { margin-top: 0 !important; }

.maths-pilot-course .division-summary-actions {
  display: flex !important;
  width: 100%;
  margin: 0;
  padding: 24px 0;
  justify-content: flex-start;
  gap: 10px;
}

.maths-pilot-course .division-summary-actions button {
  display: inline-flex;
  width: auto !important;
  min-height: 43px !important;
  margin: 0 !important;
  padding: 9px 14px !important;
  border: 0 !important;
  border-radius: 999px !important;
  align-items: center;
  gap: 10px !important;
  background: #fff !important;
  color: #29272d !important;
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 850;
}

.maths-pilot-course .division-summary-actions button b {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #714de0 !important;
  font-size: 17px !important;
}

@media (max-width: 1200px) {
  .maths-pilot-sidebar { width: 138px; padding-inline: 10px; }
  .maths-pilot-sidebar__profile { grid-template-columns: 52px; width: 70px; min-height: 70px; padding: 7px; }
  .maths-pilot-sidebar__profile span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .maths-pilot-sidebar__profile img { width: 54px; height: 54px; }
  .maths-pilot-sidebar nav a,
  .maths-pilot-sidebar nav button { grid-template-columns: 32px 1fr; padding-inline: 8px; font-size: 12px; }
  .maths-pilot-header,
  .maths-pilot-course { width: calc(100% - 138px) !important; margin-left: 138px !important; }
  .maths-pilot-dashboard { grid-template-columns: minmax(0, 1fr) minmax(250px, 285px); gap: 18px; }
  .maths-pilot-dashboard .strict-lesson-hero__title { width: 62%; transform: translateY(-42px); }
  .maths-pilot-dashboard .strict-lesson-hero__title h1 { font-size: clamp(39px, 4vw, 60px) !important; }
}

@media (max-width: 1000px) {
  .maths-pilot-dashboard { grid-template-columns: 1fr; }
  .maths-pilot-dashboard__right { grid-template-columns: 1.25fr .75fr; grid-template-rows: 1fr; }
}

@media (max-width: 900px) {
  .maths-pilot-sidebar { display: none; }
  .maths-pilot-header,
  .maths-pilot-course { width: 100% !important; margin-left: 0 !important; }
  .maths-pilot-topbar > aside { display: none; }
  .maths-pilot-course > .division-module-nav { display: flex; overflow-x: auto; }
  .maths-pilot-course > .division-module-nav button { flex: 0 0 170px; }
  .maths-pilot-dashboard__right { grid-template-columns: 1fr; }
  .maths-pilot-next { grid-template-columns: 1fr; }
  .maths-pilot-course .maths-summary-visual-journey { min-height: 410px; }
  .maths-summary-visual-journey .maths-summary-journey-figure > div { min-height: 320px !important; }
  .maths-summary-journey ol { grid-template-columns: 1fr !important; gap: 18px !important; }
  .maths-summary-journey li:nth-child(n) { grid-area: auto; }
  .maths-summary-journey li:nth-child(n)::after {
    top: auto;
    right: auto;
    bottom: -19px;
    left: 32px;
    width: 0;
    height: 20px;
    border-top: 0;
    border-left: 4px dashed #b0ee0b;
  }
  .maths-summary-journey li:last-child::after { display: none; }
  .maths-pilot-course .maths-summary-destination {
    grid-template-columns: 90px minmax(0, 1fr) !important;
  }
  .maths-summary-destination::before { width: 82px; height: 82px; grid-row: 1 / 3; }
  .maths-summary-destination > p { grid-column: 1 / -1; grid-row: auto; margin-top: 10px !important; }
}

@media (max-width: 620px) {
  .maths-pilot-course { padding-inline: var(--authenticated-shell-gutter, 10px) !important; }
  .maths-pilot-dashboard > .strict-lesson-hero { min-height: 460px !important; }
  .maths-pilot-dashboard .strict-lesson-hero__title { width: 66%; }
  .maths-pilot-dashboard .strict-lesson-hero__teacher-shape { width: 48%; }
  .maths-summary-method-journey ol { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; row-gap: 30px !important; }
  .maths-summary-method-journey ol::before { display: none; }
  .maths-pilot-course .maths-summary-destination { grid-template-columns: 1fr !important; text-align: left; }
  .maths-summary-destination::before { grid-row: auto; }
  .maths-summary-destination > span,
  .maths-summary-destination > strong,
  .maths-summary-destination > p { grid-column: 1; }
}

/* The shared authenticated bottom banner owns global navigation. */
.maths-pilot-header,
.maths-pilot-course {
  width: 100% !important;
  margin-left: 0 !important;
}

body.session-authenticated:has(.division-course-header:not(.is-flashcards)),
body.session-authenticated #app:has(.division-course-header:not(.is-flashcards)) {
  background: #fffefa !important;
}

.final-brand .app-shell-navigation > .maths-pilot-topbar {
  width: 100%;
  min-height: 0;
  padding: 0;
  grid-column: 2;
}

.final-brand .app-shell-navigation > .maths-pilot-topbar > div > strong {
  max-width: none;
}

.maths-pilot-header {
  height: 0;
  min-height: 0 !important;
  overflow: hidden;
}

.maths-pilot-brand {
  width: 118px;
  height: 84px;
  min-height: 0;
  padding: 7px;
  overflow: visible;
  border-radius: 28px 38px 26px 34px;
}
.maths-pilot-brand img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

@media (max-width: 900px) {
  .final-brand .app-shell-navigation > .maths-pilot-topbar { gap: 10px; }
  .final-brand .app-shell-navigation > .maths-pilot-topbar > div { gap: 5px; }
  .final-brand .app-shell-navigation > .maths-pilot-topbar > div > span { font-size: 10px; }
  .final-brand .app-shell-navigation > .maths-pilot-topbar > div > strong { font-size: clamp(18px, 4.5vw, 28px); }
  .maths-pilot-topbar > aside { display: none; }
  .maths-pilot-brand { width: 94px; height: 72px; padding: 5px; }
}
