:root {
  --orange: #ff6a38;
  --orange-hover: #ff541c;
  --orange-dark: #d84b1f;
  --navy: #0e1f38;
  --navy-hover: #172d50;
  --navy-dark: #07101e;
  --body: #475569;
  --muted: #64748b;
  --bg: #fffdf9;
  --white: #ffffff;
  --line: #eee8df;
  --yellow: #ffd54a;
  --blue: #3b82f6;
  --green: #10b981;
  --display: 'Baloo 2', system-ui, sans-serif;
  --text: 'Nunito Sans', system-ui, sans-serif;
  --radius: 18px;
  --shadow: 0 18px 48px rgba(14, 31, 56, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.wrap, .edu-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
  z-index: 999;
}
.skip-link:focus { left: 10px; }

/* 3D Tactile Buttons & General CTA Buttons */
.btn,
.orange-btn,
.cm-primary-cta {
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 12px 26px;
  font-family: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  gap: 8px;
  text-decoration: none !important;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
  user-select: none;
  box-sizing: border-box;
  margin: 6px 12px 14px 0;
}
.btn-orange,
.orange-btn,
.cm-primary-cta {
  background: var(--orange) !important;
  color: #fff !important;
  box-shadow: 0 7px 0 var(--orange-dark);
}
.btn-orange:hover,
.orange-btn:hover,
.cm-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 var(--orange-dark);
  background: var(--orange-hover) !important;
  color: #fff !important;
}
.btn-orange:active,
.orange-btn:active,
.cm-primary-cta:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 var(--orange-dark);
}

.btn-navy {
  background: var(--navy) !important;
  color: #fff !important;
  box-shadow: 0 7px 0 var(--navy-dark);
}
.btn-navy:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 var(--navy-dark);
  background: var(--navy-hover) !important;
  color: #fff !important;
}
.btn-navy:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 var(--navy-dark);
}

.btn-light {
  background: #fff !important;
  color: var(--navy) !important;
  box-shadow: inset 0 0 0 2px #e8e1d8, 0 6px 0 #ded7ce;
}
.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 2px #e8e1d8, 0 8px 0 #ded7ce;
}
.btn-light:active {
  transform: translateY(4px);
  box-shadow: inset 0 0 0 2px #e8e1d8, 0 2px 0 #ded7ce;
}
.btn-full { width: 100%; }

/* Prevent buttons from overlapping when authored in paragraphs with <br> */
.cm-cta-paragraph,
p:has(> .orange-btn),
p:has(> .btn),
p:has(> .cm-primary-cta) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 14px 14px !important;
  margin: 22px 0 20px !important;
  line-height: 1.6 !important;
}

.cm-cta-paragraph > br,
p:has(> .orange-btn) > br,
p:has(> .btn) > br,
p:has(> .cm-primary-cta) > br {
  display: none !important;
}

.cm-cta-paragraph > .orange-btn,
.cm-cta-paragraph > .btn,
.cm-cta-paragraph > .cm-primary-cta,
p:has(> .orange-btn) > .orange-btn,
p:has(> .btn) > .btn,
p:has(> .cm-primary-cta) > .cm-primary-cta {
  margin: 0 !important;
}

.cm-cta-paragraph > strong,
.cm-cta-paragraph > em,
.cm-cta-paragraph > small,
.cm-cta-paragraph > span:not(.orange-btn):not(.btn),
p:has(> .orange-btn) > strong,
p:has(> .orange-btn) > em,
p:has(> .orange-btn) > small,
p:has(> .btn) > strong,
p:has(> .btn) > em {
  flex-basis: 100% !important;
  width: 100% !important;
  display: block !important;
  margin-top: 6px !important;
}

/* Header & Nav */
.site-header {
  position: relative;
  z-index: 50;
  padding: 16px 0;
  background: var(--bg);
  border-bottom: 1px solid rgba(238, 232, 223, .6);
}
.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img, .site-logo-img {
  height: 44px;
  width: auto;
  display: block;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-menu-list {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu-list a {
  font-family: var(--text);
  font-weight: 800;
  font-size: 15px;
  color: #3b4859;
  transition: color .15s ease;
}
.nav-menu-list a:hover {
  color: var(--orange);
}
.nav-ctas {
  display: flex;
  align-items: center;
  gap: 12px;
}
.call-link {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  color: var(--navy);
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color .15s ease, color .15s ease;
}
.call-link:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.nav-toggle {
  display: none;
  border: 0;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 40px 0 68px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 48px;
  align-items: center;
}
.kicker {
  font-family: var(--text);
  font-weight: 900;
  color: var(--orange);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
  margin: 0 0 10px;
}
.kicker.white { color: #ffd54a; }
.title {
  font-family: var(--display);
  font-size: clamp(48px, 6.2vw, 86px);
  line-height: .90;
  letter-spacing: -.035em;
  margin: 8px 0 18px;
  color: var(--navy);
}
.title .highlight {
  color: var(--orange);
}
.sub {
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 520px;
  margin: 0 0 26px;
  font-weight: 600;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.lead-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-weight: 800;
  font-size: 14px;
  color: var(--navy);
}
.avatars {
  display: flex;
}
.avatars img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  margin-left: -10px;
}
.avatars img:first-child { margin-left: 0; }

/* Photo Collage */
.collage {
  position: relative;
  min-height: 520px;
}
.photo {
  position: absolute;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(14, 31, 56, .14);
  background: #eee;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.p1 { left: 0; top: 30px; width: 44%; height: 240px; }
.p2 { right: 0; top: 0; width: 52%; height: 300px; }
.p3 { left: 16%; bottom: 0; width: 50%; height: 260px; }

.scribble {
  position: absolute;
  right: 60px;
  top: 310px;
  width: 82px;
  height: 82px;
  border: 12px dotted var(--orange);
  border-radius: 50%;
  pointer-events: none;
}
.mini-card {
  position: absolute;
  right: 18px;
  bottom: 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px 22px;
  box-shadow: 0 24px 80px rgba(14, 31, 56, .16);
  width: 250px;
}
.mini-card b {
  font-family: var(--display);
  font-size: 26px;
  line-height: .95;
  color: var(--navy);
}
.badge {
  display: inline-flex;
  background: var(--yellow);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 13px;
  margin-top: 10px;
  color: var(--navy);
}

/* Parcours Cards Section */
.cards-section {
  background: #fdfbf7;
  padding: 76px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  text-align: center;
  margin-bottom: 38px;
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 58px);
  line-height: .95;
  margin: 0 0 10px;
  color: var(--navy);
}
.section-head p {
  color: var(--muted);
  font-weight: 800;
  font-size: 18px;
  margin: 0;
}
.path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.path {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 16px;
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
  display: block;
}
.path:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(255, 106, 56, .14);
}
.path-img {
  height: 155px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 14px;
}
.path-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.path:hover .path-img img {
  transform: scale(1.04);
}
.path h3 {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  margin: 6px 0 4px;
  color: var(--navy);
}
.path p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 800;
  font-size: 12px;
}
.tag-orange {
  background: rgba(255, 106, 56, .12);
  color: var(--orange);
}
.tag-navy {
  background: rgba(14, 31, 56, .08);
  color: var(--navy);
}

/* Programmes Rail */
.cm-programme-rail {
  background: var(--navy);
  color: #fff;
  padding: 50px 0;
}
.cm-programme-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr auto;
  gap: 28px;
  align-items: center;
}
.cm-programme-grid h2 {
  font-family: var(--display);
  color: #fff;
  font-size: 32px;
  line-height: 1.05;
  margin: 6px 0 0;
}
.cm-programme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cm-programme-tags span {
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-radius: 999px;
  padding: 9px 15px;
  font-weight: 800;
  font-size: 13px;
}

/* Educational Resources Section */
.cm-resources {
  background: #fbf9f4;
  padding: 76px 0;
}
.cm-resource-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.cm-resource-copy h2 {
  font-family: var(--display);
  color: var(--navy);
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.05;
  margin: 8px 0 14px;
}
.resource-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}
.res-pill {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  transition: border-color .15s ease, color .15s ease;
}
.res-pill:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.cm-resource-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cm-resource-cards article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(14, 31, 56, .05);
}
.badge-mini {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--orange);
}
.cm-resource-cards strong {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  color: var(--navy);
  margin: 6px 0 10px;
}
.cm-resource-cards code {
  display: block;
  background: #fff5f0;
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--navy);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Method Section */
.cm-method {
  padding: 76px 0;
}
.cm-step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cm-step-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 14px 35px rgba(14, 31, 56, .05);
}
.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--orange);
  color: #fff;
  border-radius: 14px;
  font-weight: 900;
  margin-bottom: 16px;
}
.cm-step-grid h3 {
  font-family: var(--display);
  font-size: 24px;
  color: var(--navy);
  margin: 0 0 10px;
}
.cm-step-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

/* Trust Section */
.trust {
  padding: 68px 0;
  background: #fdfbf7;
  border-top: 1px solid var(--line);
}
.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.trust-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 14px 35px rgba(14, 31, 56, .04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  box-sizing: border-box;
}
.trust-card .icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 26px;
}
.icon-orange { background: #fff0eb; }
.icon-navy { background: #eef3f9; }
.icon-yellow { background: #fff9e6; }
.trust-card h3 {
  font-family: var(--display);
  font-size: 26px;
  color: var(--navy);
  margin: 0 0 8px;
}
.trust-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.trust-card .btn,
.trust-card a.btn,
.trust-card button.btn {
  width: 240px !important;
  max-width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  margin: 0 auto !important;
  font-size: 15px !important;
  white-space: nowrap !important;
}
.trust-card-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  width: 100%;
}
.trust-card-actions .btn {
  margin: 0 auto !important;
}

/* Lead Band */
.lead-band {
  background: var(--orange);
  color: #fff;
  padding: 76px 0;
  position: relative;
  overflow: hidden;
}
.lead-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  align-items: center;
}
.lead-band h2 {
  font-family: var(--display);
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: .92;
  margin: 8px 0 14px;
  color: #fff;
}
.white-sub {
  color: rgba(255, 255, 255, .92);
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.direct-contact-hints {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, .95);
}
.quick-form {
  background: #fff;
  color: var(--navy);
  border-radius: 32px;
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .16);
}
.field {
  border: 1px solid #e4deef;
  border-radius: 16px;
  padding: 14px 16px;
  font-family: var(--text);
  font-weight: 700;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease;
  width: 100%;
}
.field:focus {
  border-color: var(--orange);
}
.quick-form textarea, .quick-form button {
  grid-column: 1 / -1;
}

/* Footer */
.footer-dark {
  background: var(--navy);
  color: #fff;
  padding: 68px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr 1.15fr 1fr;
  gap: 48px;
}
.footer-logo img {
  height: 44px;
  width: auto;
  display: block;
}
.footer-dark p, .footer-dark a, .footer-links {
  font-size: 14px;
  color: rgba(255, 255, 255, .82);
}
.footer-dark h2 {
  font-family: var(--display);
  font-size: 22px;
  margin: 0 0 20px;
  color: #fff;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin: 10px 0;
}
.footer-links a:hover {
  color: var(--orange);
}
.social-dots {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}
.social-dots a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all .2s ease;
}
.social-dots a:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-2px);
  color: #fff;
}
.footer-whatsapp {
  display: inline-flex;
  background: #10b981;
  color: #fff !important;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 13px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .15);
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  margin-top: 48px;
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
}
.footer-legal a {
  margin-left: 18px;
}

/* Modal Dialog */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 31, 56, .65);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal.show {
  display: flex;
}
.modal-card {
  background: #fff;
  border-radius: 32px;
  padding: 34px;
  width: min(520px, 100%);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .3);
  position: relative;
}
.modal-card h2 {
  font-family: var(--display);
  font-size: 38px;
  line-height: .95;
  margin: 4px 0 10px;
  color: var(--navy);
}
.modal-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
}
.modal-form {
  display: grid;
  gap: 12px;
}
.close {
  position: absolute;
  right: 20px;
  top: 20px;
  border: 0;
  background: #f5f3f0;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--navy);
}

/* Toast */
.toast {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 15px);
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 800;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Mobile Floating Bottom Bar */
.floating-mobile-bar {
  display: none;
  position: fixed;
  z-index: 90;
  left: 16px;
  right: 16px;
  bottom: 16px;
  gap: 10px;
  background: rgba(255, 255, 255, .95);
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(14, 31, 56, .2);
  backdrop-filter: blur(8px);
}
.floating-mobile-bar .btn {
  flex: 1;
  padding: 11px 16px;
  font-size: 14px;
}

/* Responsive Rules */
@media (max-width: 980px) {
  .hero-grid, .cm-resource-layout, .cm-programme-grid, .lead-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .path-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .primary-nav {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 76px;
    background: #fff;
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(14, 31, 56, .15);
    display: none;
    flex-direction: column;
    align-items: flex-start;
  }
  .primary-nav.is-open { display: flex; }
  .nav-menu-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
  }
  .nav-ctas {
    width: 100%;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .nav-toggle { display: block; }
  .collage { min-height: 440px; }
}

@media (max-width: 640px) {
  .floating-mobile-bar { display: flex; }
  .path-grid, .quick-form, .cm-step-grid, .trust-row, .cm-resource-cards {
    grid-template-columns: 1fr;
  }
  .title { font-size: 52px; }
  .sub { font-size: 17px; }
  .p1 { width: 55%; height: 190px; }
  .p2 { width: 58%; height: 230px; }
  .p3 { left: 8%; width: 62%; height: 210px; }
  .mini-card { right: 0; width: 220px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

/* Typst-authored mathematics, compiled server-side to semantic MathML. */
.cm-typst-math { font-family: "STIX Two Math", "Cambria Math", "Times New Roman", serif; color: var(--navy); font-size: 1.08em; line-height: 1.25; }
.cm-typst-inline { vertical-align: -.14em; margin: 0 .08em; white-space: nowrap; }
.cm-typst-figure { display: block; max-width: 100%; overflow-x: auto; margin: 1rem 0; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: #f8fbff; text-align: center; }
.cm-typst-display { min-width: max-content; margin: 0 auto; }
.cm-typst-math mtable.cases { margin-left: .15em; }
@media (max-width: 640px) { .cm-typst-math { font-size: 1em; } .cm-typst-figure { padding: .65rem .75rem; text-align: left; } }

/* CoursMission Inner Page System (.cm-template) updated to Baloo 2 & Logo Palette */
.cm-template { width: min(1160px, calc(100% - 36px)); max-width: none; margin: 44px auto 82px; padding: 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; color: #344158; }
.cm-template > .entry-header:not(.screen-reader-text) { margin: 0 0 22px; padding: 0 4px; }
.cm-template > .entry-header .entry-title { font-family: var(--display); font-size: clamp(38px, 5vw, 58px); line-height: 1.04; letter-spacing: -.045em; color: var(--navy); margin: 0; }
.cm-template .entry-content { font-size: 16px; line-height: 1.72; }
.cm-template .entry-content > div[class*="cm-"] { max-width: none; margin-left: 0; margin-right: 0; }
.cm-template .cm-landing-page { max-width: none; }

.cm-template .cm-page-hero, .cm-template .cm-math-hub-hero, .cm-template .cm-service-hero, .cm-template .cm-lesson-hero, .cm-template .cm-resource-hero, .cm-template .cm-hero-panel {
  position: relative;
  overflow: hidden;
  margin: 0 0 28px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: radial-gradient(circle at 92% 10%, rgba(255, 106, 56, .12), transparent 26%), linear-gradient(118deg, #fffdf9, #fbf7f2 64%, #fff5f0);
  box-shadow: 0 18px 46px rgba(14, 31, 56, .06);
}
.cm-template .cm-page-hero h2, .cm-template .cm-math-hub-hero h2, .cm-template .cm-page-heading, .cm-template .cm-service-hero h2, .cm-template .cm-lesson-hero h2, .cm-template .cm-resource-hero h2 {
  max-width: 880px;
  margin: 8px 0 16px;
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.045em;
  color: var(--navy);
}
.cm-template .cm-eyebrow, .cm-template .tiny-label, .cm-template-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.cm-template .cm-cta-row, .cm-template .cm-home-actions, .cm-template .cm-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 24px 0 10px;
}
.cm-template .orange-btn, .cm-template .cm-primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  margin: 6px 12px 14px 0;
  vertical-align: middle;
  border: 0;
  border-radius: 999px;
  background: var(--orange) !important;
  color: #fff !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  box-shadow: 0 7px 0 var(--orange-dark);
  transition: transform .16s ease, box-shadow .16s ease;
}
.cm-template .orange-btn:hover, .cm-template .cm-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 var(--orange-dark);
  background: var(--orange-hover) !important;
}
.cm-template .orange-btn:active, .cm-template .cm-primary-cta:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 var(--orange-dark);
}
.cm-template .cm-cta-paragraph .orange-btn,
.cm-template .cm-cta-paragraph .cm-primary-cta,
.cm-template p:has(> .orange-btn) > .orange-btn,
.cm-template p:has(> .cm-primary-cta) > .cm-primary-cta {
  margin: 0 !important;
}
.cm-template .cm-secondary-link {
  font-weight: 800;
  color: var(--navy) !important;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 3px;
}

.cm-template .entry-content section > h2, .cm-template .entry-content > div > h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -.035em;
  color: var(--navy);
  margin: 0 0 15px;
}
.cm-template .entry-content h3 {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 10px;
}

.cm-template .cm-exercise-grid, .cm-template .cm-resource-list, .cm-template .cm-method-cards, .cm-template .cm-formula-grid, .cm-template .cm-question-grid, .cm-template .cm-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.cm-template .cm-exercise-grid > article, .cm-template .cm-resource-list > article, .cm-template .cm-method-cards > article, .cm-template .cm-formula-grid > article, .cm-template .cm-question-grid > article, .cm-template .cm-card-grid > article {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(14, 31, 56, .04);
}
.cm-template .cm-exercise-grid > article, .cm-template .cm-resource-list > article {
  border-top: 4px solid var(--orange);
}

.cm-template .cm-final-cta, .cm-standard-final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: 48px 0 0;
  padding: 34px 38px;
  border: 0;
  border-radius: 28px;
  background: var(--navy);
  color: #fff;
  text-align: left;
}
.cm-template .cm-final-cta h2, .cm-standard-final-cta h2 {
  margin: 0 0 7px !important;
  color: #fff !important;
  font-family: var(--display);
  font-size: 30px !important;
}
.cm-template .cm-final-cta p, .cm-standard-final-cta p {
  max-width: 720px;
  margin: 0 0 15px;
  color: #dfe8f5;
}

/* ==========================================================================
   KaTeX Responsive Auto-Wrapping (Zero Mobile Horizontal Scroll)
   ========================================================================== */
.katex-display {
  display: block !important;
  margin: 1.35em 0 !important;
  text-align: center !important;
  overflow-x: visible !important;
  width: 100% !important;
}
.katex-display > .katex {
  display: block !important;
  text-align: center !important;
  white-space: normal !important;
  max-width: 100% !important;
}
.katex-display > .katex > .katex-html {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: baseline !important;
  column-gap: 4px !important;
  row-gap: 8px !important;
  white-space: normal !important;
}
.katex-display .base {
  white-space: nowrap;
}
.cm-math-inline, .katex:not(.katex-display .katex) {
  white-space: nowrap;
}

/* ==========================================================================
   Homepage: Educational Resources Card Views by Grade
   ========================================================================== */
.cm-grade-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
@media (max-width: 980px) {
  .cm-grade-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cm-grade-cards { grid-template-columns: 1fr; }
}
.grade-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(14, 31, 56, .04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-decoration: none !important;
  color: inherit !important;
}
.grade-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(14, 31, 56, .09);
  border-color: var(--orange);
}
.grade-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.grade-card-badge.orange { background: #fff1eb; color: var(--orange); }
.grade-card-badge.navy { background: #eef3f9; color: var(--navy); }
.grade-card-badge.green { background: #eafaf1; color: #1e824c; }
.grade-card h3 {
  font-family: var(--display);
  font-size: 22px;
  color: var(--navy);
  margin: 14px 0 8px;
  line-height: 1.2;
}
.grade-card p {
  font-size: 14px;
  color: #55627a;
  margin: 0 0 18px;
  line-height: 1.5;
  flex-grow: 1;
}
.grade-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  color: var(--orange);
}
.grade-card-footer .arrow {
  font-size: 18px;
  transition: transform .18s ease;
}
.grade-card:hover .grade-card-footer .arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   Online Tutoring Landing Page (.cm-tutoring-page)
   ========================================================================== */
.cm-page-hero {
  padding: 56px 0 42px;
  text-align: center;
}
.cm-page-hero .title {
  font-size: clamp(36px, 5.5vw, 58px);
  margin: 12px auto 16px;
  max-width: 820px;
}
.cm-page-hero .sub {
  max-width: 680px;
  margin: 0 auto 28px;
  font-size: 18px;
  color: #4a576d;
}
.currency-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 32px auto 40px;
  flex-wrap: wrap;
}
.currency-label {
  font-weight: 800;
  font-size: 14px;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.currency-toggle {
  display: inline-flex;
  background: #ede6dc;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.currency-btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--text);
  font-size: 14px;
  font-weight: 800;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.currency-btn.is-active {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 106, 56, .3);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 36px 0 60px;
  align-items: stretch;
}
@media (max-width: 920px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px 30px;
  background: #fff;
  border-radius: 28px;
  border: 2px solid var(--line);
  box-shadow: 0 10px 30px rgba(14, 31, 56, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pricing-card.is-popular {
  border-color: var(--orange);
  box-shadow: 0 18px 46px rgba(255, 106, 56, .12);
  transform: scale(1.02);
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: #fff;
  padding: 5px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  box-shadow: 0 4px 12px rgba(255, 106, 56, .35);
}
.pricing-title {
  font-family: var(--display);
  font-size: 26px;
  color: var(--navy);
  margin: 0 0 8px;
}
.pricing-desc {
  font-size: 14px;
  color: #5d6d84;
  margin: 0 0 24px;
  min-height: 42px;
}
.pricing-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.pricing-amount {
  font-family: var(--display);
  font-size: 52px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
}
.pricing-currency {
  font-size: 26px;
  font-weight: 800;
  color: var(--orange);
}
.pricing-period {
  font-size: 14px;
  font-weight: 700;
  color: #6a788e;
}
.pricing-savings {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eafaf1;
  color: #1e824c;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 24px;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #3b485d;
  line-height: 1.45;
}
.pricing-features li::before {
  content: "✓";
  color: var(--orange);
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}

/* Tools & Methodology */
.cm-features-panel {
  padding: 56px 42px;
  border-radius: 32px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(14, 31, 56, .04);
  margin: 48px 0;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
@media (max-width: 820px) {
  .tools-grid { grid-template-columns: 1fr; }
}
.tool-card {
  padding: 26px;
  border-radius: 20px;
  background: #fbf9f5;
  border: 1px solid #f0eae1;
}
.tool-icon {
  font-size: 34px;
  margin-bottom: 12px;
  display: block;
}
.tool-card h4 {
  font-family: var(--display);
  font-size: 20px;
  color: var(--navy);
  margin: 0 0 8px;
}
.tool-card p {
  font-size: 14px;
  color: #4b586e;
  line-height: 1.5;
  margin: 0;
}

/* WhatsApp continuous support card */
.whatsapp-highlight-card {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px 36px;
  background: linear-gradient(135deg, #0e1f38, #183359);
  color: #fff;
  border-radius: 26px;
  margin: 36px 0;
  box-shadow: 0 16px 40px rgba(14, 31, 56, .2);
}
@media (max-width: 720px) {
  .whatsapp-highlight-card { flex-direction: column; text-align: center; }
}
.wa-icon-large {
  font-size: 52px;
  flex-shrink: 0;
}
.wa-content h3 {
  font-family: var(--display);
  font-size: 24px;
  color: #fff;
  margin: 0 0 8px;
}
.wa-content p {
  font-size: 15px;
  color: #dbe5f3;
  margin: 0;
  line-height: 1.55;
}

/* Testimonials / Student Reviews */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin: 32px 0 54px;
}
@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}
.review-card {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 26px rgba(14, 31, 56, .04);
}
.review-stars {
  color: #f59e0b;
  font-size: 17px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.review-quote {
  font-size: 15px;
  color: #2c394e;
  line-height: 1.6;
  margin: 0 0 16px;
  font-style: italic;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff1eb;
  color: var(--orange);
  font-weight: 900;
  font-size: 16px;
  display: grid;
  place-items: center;
}
.author-name {
  font-weight: 800;
  color: var(--navy);
  font-size: 15px;
}
.author-loc {
  font-size: 12px;
  color: #6a778c;
}

/* ==========================================================================
   Resources Directory Page (.cm-resources-page)
   ========================================================================== */
.res-toolbar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 26px;
  margin: 28px 0 36px;
  box-shadow: 0 8px 24px rgba(14, 31, 56, .04);
}
.res-search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 22px;
  font-family: var(--text);
  font-size: 15px;
  outline: none;
  margin-bottom: 18px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.res-search-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 56, .15);
}
.res-filters-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-row-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  min-width: 75px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  border: 1px solid #e1e7f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #4a576e;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .16s ease;
  user-select: none;
}
.filter-chip:hover {
  background: #edf2f7;
  color: var(--navy);
}
.filter-chip.is-active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 4px 10px rgba(255, 106, 56, .25);
}
.lessons-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 60px;
}
@media (max-width: 768px) {
  .lessons-catalog-grid { grid-template-columns: 1fr; }
}
.lesson-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(14, 31, 56, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  text-decoration: none !important;
  color: inherit !important;
}
.lesson-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(14, 31, 56, .08);
  border-color: var(--orange);
}
.lesson-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.lesson-card h3 {
  font-family: var(--display);
  font-size: 20px;
  color: var(--navy);
  margin: 0 0 10px;
  line-height: 1.25;
}
.lesson-card p {
  font-size: 14px;
  color: #55637a;
  line-height: 1.55;
  margin: 0 0 16px;
  flex-grow: 1;
}
.lesson-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  color: var(--orange);
}
.no-lessons-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  background: #fff;
  border-radius: 22px;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  font-size: 16px;
}

/* ==========================================================================
   Contact Page (.cm-contact-page)
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  margin: 36px 0 60px;
  align-items: start;
}
@media (max-width: 880px) {
  .contact-layout { grid-template-columns: 1fr; }
}
.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-channel-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(14, 31, 56, .04);
  text-decoration: none !important;
  color: inherit !important;
  transition: transform .16s ease, border-color .16s ease;
}
.contact-channel-card:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
}
.contact-channel-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.contact-channel-icon.wa { background: #e8f8ef; color: #25d366; }
.contact-channel-icon.phone { background: #fff1eb; color: var(--orange); }
.contact-channel-icon.mail { background: #eef3f9; color: var(--navy); }
.contact-channel-details strong {
  display: block;
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 2px;
}
.contact-channel-details span {
  font-size: 13px;
  color: #59677e;
}
.response-commitment-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  background: #fdfbf7;
  border: 1px solid #ebdccc;
  font-size: 13px;
  color: var(--navy);
  font-weight: 700;
}
.response-commitment-badge .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .2);
}
.contact-form-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 38px;
  box-shadow: 0 12px 36px rgba(14, 31, 56, .05);
}
@media (max-width: 640px) {
  .contact-form-panel,
  .tutoring-form-panel {
    padding: 24px 18px !important;
    border-radius: 20px !important;
  }
}
.contact-form-panel h3 {
  font-family: var(--display);
  font-size: 28px;
  color: var(--navy);
  margin: 0 0 8px;
}
.contact-form-panel > p {
  color: #5c6c84;
  margin: 0 0 24px;
  font-size: 15px;
}

/* Lead & Contact Forms Styling */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
}
@media (max-width: 640px) {
  .lead-form-grid {
    grid-template-columns: 1fr;
  }
}

.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form input[type="tel"],
.lead-form select,
.lead-form textarea,
.contact-form-panel input,
.contact-form-panel select,
.contact-form-panel textarea,
.tutoring-form-panel input,
.tutoring-form-panel select,
.tutoring-form-panel textarea,
.field {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  font-family: var(--text);
  font-size: 15px;
  color: var(--navy);
  font-weight: 600;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  box-shadow: 0 1px 3px rgba(14, 31, 56, .03);
}

.lead-form input[type="text"]:focus,
.lead-form input[type="email"]:focus,
.lead-form input[type="tel"]:focus,
.lead-form select:focus,
.lead-form textarea:focus,
.contact-form-panel input:focus,
.contact-form-panel select:focus,
.contact-form-panel textarea:focus,
.tutoring-form-panel input:focus,
.tutoring-form-panel select:focus,
.tutoring-form-panel textarea:focus,
.field:focus {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(255, 106, 56, .15), 0 2px 6px rgba(14, 31, 56, .04);
}

.lead-form input::placeholder,
.lead-form textarea::placeholder,
.contact-form-panel input::placeholder,
.contact-form-panel textarea::placeholder,
.field::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

/* Custom styled Select Dropdowns */
.lead-form select,
.contact-form-panel select,
.tutoring-form-panel select,
select.field,
.cm-select-field {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230e1f38' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
  padding-right: 44px !important;
  cursor: pointer;
  height: 52px;
  line-height: 1.2;
}

.lead-form textarea,
.contact-form-panel textarea,
.tutoring-form-panel textarea,
textarea.field {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
  font-family: var(--text);
}

/* Submit row and trust guarantees */
.lead-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}
.lead-form-footer .btn {
  min-height: 48px;
  padding: 12px 28px;
  font-size: 15px;
}
.lead-form-guarantee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #64748b;
  font-weight: 600;
}


/* Breadcrumbs & Hubs Navigation */
.cm-breadcrumb-bar {
  background: #fbfbfd;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.cm-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  color: #64748b;
}
.cm-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cm-breadcrumbs li:not(:last-child)::after {
  content: "›";
  font-size: 16px;
  color: #94a3b8;
}
.cm-breadcrumbs a {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  transition: color .15s ease;
}
.cm-breadcrumbs a:hover {
  color: var(--orange);
}
.cm-breadcrumbs li[aria-current="page"] span {
  color: var(--navy);
  font-weight: 700;
}

/* Lesson card image zoom effect */
.lesson-card:hover .cm-card-img {
  transform: scale(1.05);
}
.cm-card-img {
  transition: transform .35s ease;
}

/* ==========================================================================
   CoursMission LaTeX Lessons — Core Frontend Component Design System
   ========================================================================== */

/* Lesson Container & Typography */
.cm-template--lesson {
  width: min(940px, calc(100% - 32px)) !important;
  margin: 36px auto 72px !important;
}

/* Prevent nested .cm-template from adding extra margin/width restrictions */
.cm-template .cm-template,
.entry-content > .cm-template,
.cm-template--lesson .cm-template--lesson {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.cm-template--lesson .entry-content {
  font-family: var(--body, 'Nunito Sans', sans-serif);
  font-size: 16px;
  line-height: 1.75;
  color: #334155;
}

/* Page Hero Header in Lesson */
.cm-template .cm-page-hero,
.cm-template .cm-math-hub-hero {
  border-radius: 24px;
  padding: 34px 38px;
  margin-bottom: 28px;
  background: radial-gradient(circle at 90% 10%, rgba(255, 106, 56, .14), transparent 30%), linear-gradient(120deg, #fff, #faf6f0);
  border: 1.5px solid #eee8df;
  box-shadow: 0 8px 24px rgba(14, 31, 56, .03);
}

.cm-template .cm-page-hero .kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #ff6a38;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cm-template .cm-page-hero h2 {
  font-family: var(--display, 'Baloo 2', sans-serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  color: #0e1f38;
  margin: 6px 0 12px;
  line-height: 1.15;
}

.cm-template .cm-page-hero .sub {
  font-size: 16px;
  color: #55637a;
  line-height: 1.6;
  margin: 0 0 20px;
}

.cm-template .cm-page-hero .cm-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Interactive Sommaire (Table of Contents) */
.cm-lesson-toc {
  background: #fff;
  border: 1.5px solid #eee8df;
  border-radius: 20px;
  padding: 22px 28px;
  margin: 28px 0 34px;
  box-shadow: 0 6px 20px rgba(14, 31, 56, .04);
}

.cm-toc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #0e1f38;
  border-bottom: 2px solid #fff0eb;
  padding-bottom: 12px;
  margin-bottom: 16px;
  font-family: var(--display, 'Baloo 2', sans-serif);
}

.cm-toc-icon {
  font-size: 20px;
}

.cm-toc-list {
  list-style: none !important;
  margin: 0 !important;
  padding-left: 0 !important;
}

.cm-toc-item {
  margin: 9px 0 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.cm-toc-item a {
  color: #0e1f38 !important;
  text-decoration: none !important;
  transition: color .15s ease;
}

.cm-toc-item a:hover {
  color: #ff6a38 !important;
  text-decoration: underline !important;
}

.cm-toc-sub {
  margin-left: 24px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  color: #64748b !important;
}

.cm-toc-sub a {
  color: #64748b !important;
}

.cm-toc-sub a:hover {
  color: #ff6a38 !important;
}

/* Chapter & Subchapter Headings */
.cm-lesson-chapter {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
}

.cm-chapter-title {
  font-family: var(--display, 'Baloo 2', sans-serif);
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  color: #0e1f38;
  margin: 0 0 16px;
  display: block;
  line-height: 1.35;
  scroll-margin-top: 90px;
}

.cm-chapter-title .cm-anchor-link,
.cm-subchapter-title .cm-anchor-link {
  display: inline-block;
  margin-right: 8px;
}

.cm-chapter-title .katex,
.cm-subchapter-title .katex {
  font-size: 0.92em;
}

.cm-subchapter-title {
  font-family: var(--display, 'Baloo 2', sans-serif);
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  margin: 26px 0 14px;
  display: block;
  line-height: 1.35;
  scroll-margin-top: 90px;
}

.cm-anchor-link {
  color: #ff6a38;
  opacity: .35;
  text-decoration: none;
  font-weight: 700;
  transition: opacity .15s;
}

.cm-anchor-link:hover {
  opacity: 1;
}

/* The Core Lesson Cards (.cm-box) */
.cm-box {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 22px 26px;
  margin: 22px 0;
  box-shadow: 0 6px 20px rgba(14, 31, 56, .04);
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}

.cm-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(14, 31, 56, .06);
}

/* Category Accent Borders */
.cm-box-def {
  border-left: 6px solid #ff6a38 !important;
}

.cm-box-prop {
  border-left: 6px solid #0e1f38 !important;
}

.cm-box-theoreme {
  border-left: 6px solid #d97706 !important;
  background: #fffdfa;
}

.cm-box-formule {
  border-left: 6px solid #f59e0b !important;
  background: #fffefb;
}

.cm-box-methode {
  border-left: 6px solid #3b82f6 !important;
  background: #fafcff;
}

.cm-box-remarque {
  border-left: 6px solid #64748b !important;
  background: #f8fafc;
}

.cm-box-exemple {
  border-left: 6px solid #10b981 !important;
  background: #f0fdf4;
}

/* Tag Pills inside Cards */
.cm-box-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.cm-box-tag.tag-orange {
  background: rgba(255, 106, 56, .12);
  color: #ff6a38;
  border: 1px solid rgba(255, 106, 56, .25);
}

.cm-box-tag.tag-navy {
  background: #0e1f38;
  color: #fff;
}

.cm-box-tag.tag-yellow {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.cm-box-tag.tag-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.cm-box-tag.tag-green {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.cm-box-tag.tag-purple {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

/* Box Headings & Content */
.cm-box h4 {
  font-family: var(--display, 'Baloo 2', sans-serif);
  font-size: 19px;
  font-weight: 800;
  color: #0e1f38;
  margin: 0 0 10px;
  line-height: 1.3;
}

.cm-box-content {
  font-size: 15.5px;
  line-height: 1.72;
  color: #334155;
}

.cm-box-content p {
  margin: 0 0 10px;
}

.cm-box-content p:last-child {
  margin-bottom: 0;
}

/* Callout Warning & Trap Alerts */
.cm-callout-warning {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 16px;
  padding: 18px 24px;
  margin: 22px 0;
  box-shadow: 0 4px 14px rgba(245, 158, 11, .06);
}

.cm-callout-head {
  font-family: var(--display, 'Baloo 2', sans-serif);
  font-size: 16px;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cm-callout-body {
  font-size: 14.5px;
  line-height: 1.65;
  color: #78350f;
}

.cm-callout-body p {
  margin: 0 0 8px;
}

.cm-callout-body p:last-child {
  margin-bottom: 0;
}

/* Exercise Cards & Collapsible Solutions */
.cm-exo-card {
  background: #fff;
  border: 1.5px solid #fed7aa;
  border-radius: 20px;
  padding: 24px 28px;
  margin: 26px 0;
  box-shadow: 0 8px 24px rgba(255, 106, 56, .06);
}

.cm-exo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cm-exo-header h3 {
  font-family: var(--display, 'Baloo 2', sans-serif);
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #0e1f38;
}

.cm-exo-enonce {
  font-size: 15.5px;
  line-height: 1.72;
  color: #334155;
  margin-bottom: 16px;
}

.cm-exo-solution {
  margin-top: 14px;
}

.cm-exo-solution summary {
  cursor: pointer;
  font-weight: 700;
  user-select: none;
  display: inline-block;
  outline: none;
}

.cm-solution-body {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: #1e293b;
}

/* Lists in LaTeX */
.cm-latex-list {
  padding-left: 24px;
  margin: 14px 0;
}

.cm-latex-list li {
  margin: 6px 0;
  line-height: 1.65;
  color: #334155;
}

/* Objectifs Step Grid in Lessons */
.cm-objectifs-section {
  background: #fff;
  border: 1.5px solid #eee8df;
  border-radius: 22px;
  padding: 28px 32px;
  margin: 28px 0;
  box-shadow: 0 6px 20px rgba(14, 31, 56, .03);
}

.cm-objectifs-section .kicker {
  font-size: 11.5px;
  font-weight: 800;
  color: #ff6a38;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.cm-objectifs-section h2 {
  font-family: var(--display, 'Baloo 2', sans-serif);
  font-size: 24px;
  font-weight: 800;
  color: #0e1f38;
  margin: 0 0 20px;
}

.cm-objectifs-section .cm-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.cm-objectifs-section .cm-step-grid article {
  background: #faf6f0;
  border: 1px solid #eee8df;
  border-radius: 16px;
  padding: 18px 20px;
}

.cm-objectifs-section .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff6a38;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.cm-objectifs-section .cm-step-grid h3 {
  font-family: var(--display, 'Baloo 2', sans-serif);
  font-size: 18px;
  font-weight: 800;
  color: #0e1f38;
  margin: 0 0 6px;
}

.cm-objectifs-section .cm-step-grid p {
  font-size: 14px;
  color: #55637a;
  line-height: 1.55;
  margin: 0;
}

/* ==========================================================================
   Mobile Optimization (Reduced Padding & Margins on Mobile Devices)
   ========================================================================== */
@media (max-width: 640px) {
  /* 1. Outer Container fits screen width with clean minimal gutter */
  .cm-template,
  .cm-template--lesson,
  .cm-template--hub,
  .cm-template--service,
  .cm-template--standard {
    width: calc(100% - 16px) !important;
    max-width: 100% !important;
    margin: 14px auto 40px !important;
    padding: 0 !important;
  }

  /* 2. Title & Introduction Hero Box */
  .cm-template .cm-page-hero,
  .cm-template .cm-math-hub-hero,
  .cm-template .cm-service-hero,
  .cm-template .cm-lesson-hero,
  .cm-template .cm-resource-hero,
  .cm-template .cm-hero-panel {
    padding: 20px 14px 18px 14px !important;
    border-radius: 18px !important;
    margin: 0 0 18px !important;
  }

  .cm-template .cm-page-hero .kicker,
  .cm-template .cm-math-hub-hero .kicker,
  .cm-template .cm-eyebrow,
  .cm-template-kicker {
    font-size: 11px !important;
    letter-spacing: .06em !important;
    margin-bottom: 6px !important;
  }

  .cm-template .cm-page-hero h2,
  .cm-template .cm-math-hub-hero h2,
  .cm-template .cm-service-hero h2,
  .cm-template .cm-lesson-hero h2,
  .cm-template .cm-resource-hero h2,
  .cm-template .cm-hero-panel h2 {
    font-size: clamp(22px, 5.8vw, 29px) !important;
    line-height: 1.18 !important;
    margin: 6px 0 10px !important;
  }

  .cm-template .cm-page-hero .sub,
  .cm-template .cm-math-hub-hero .sub {
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    margin: 0 0 16px !important;
  }

  .cm-template .cm-page-hero .cm-home-actions,
  .cm-template .cm-math-hub-hero .cm-home-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 16px 0 4px !important;
  }

  .cm-template .cm-page-hero .cm-home-actions .btn,
  .cm-template .cm-math-hub-hero .cm-home-actions .btn {
    width: 100% !important;
    min-height: 46px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    text-align: center !important;
    justify-content: center !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* 3. Interactive Sommaire / Table of Contents */
  .cm-lesson-toc {
    padding: 15px 12px !important;
    border-radius: 16px !important;
    margin: 16px 0 22px !important;
  }

  .cm-toc-header {
    font-size: 16.5px !important;
    padding-bottom: 9px !important;
    margin-bottom: 11px !important;
  }

  .cm-toc-item {
    font-size: 14px !important;
    margin: 6px 0 !important;
  }

  .cm-toc-sub {
    margin-left: 14px !important;
    font-size: 13px !important;
  }

  /* 4. Objectifs Section ("Ce que l'élève doit maîtriser") */
  .cm-objectifs-section {
    padding: 18px 12px !important;
    border-radius: 16px !important;
    margin: 18px 0 !important;
  }

  .cm-objectifs-section h2 {
    font-size: 20px !important;
    margin: 0 0 12px !important;
  }

  .cm-objectifs-section .cm-step-grid {
    gap: 10px !important;
  }

  .cm-objectifs-section .cm-step-grid article {
    padding: 13px 11px !important;
    border-radius: 12px !important;
  }

  .cm-objectifs-section .cm-step-grid h3 {
    font-size: 16px !important;
  }

  .cm-objectifs-section .cm-step-grid p {
    font-size: 13.5px !important;
  }

  /* 5. Core Lesson Content Boxes (.cm-box) */
  .cm-box {
    padding: 14px 12px 14px 12px !important;
    border-left-width: 4px !important;
    border-radius: 14px !important;
    margin: 15px 0 !important;
  }

  .cm-box h4 {
    font-size: 17px !important;
    margin: 0 0 8px !important;
    line-height: 1.28 !important;
  }

  .cm-box-content {
    font-size: 14.5px !important;
    line-height: 1.62 !important;
  }

  .cm-box-tag {
    font-size: 10.5px !important;
    padding: 3px 8px !important;
    margin-bottom: 8px !important;
  }

  /* 6. Warnings & Callouts */
  .cm-callout-warning {
    padding: 13px 12px !important;
    border-radius: 13px !important;
    margin: 15px 0 !important;
  }

  .cm-callout-head {
    font-size: 14.5px !important;
    margin-bottom: 6px !important;
  }

  .cm-callout-body {
    font-size: 13.5px !important;
    line-height: 1.55 !important;
  }

  /* 7. Exercise Cards & Solution */
  .cm-exo-card {
    padding: 15px 12px !important;
    border-radius: 15px !important;
    margin: 16px 0 !important;
  }

  .cm-exo-header {
    margin-bottom: 10px !important;
    gap: 8px !important;
  }

  .cm-exo-header h3 {
    font-size: 17px !important;
  }

  .cm-exo-enonce {
    font-size: 14.5px !important;
    line-height: 1.6 !important;
    margin-bottom: 12px !important;
  }

  .cm-solution-body {
    padding: 12px 10px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    margin-top: 10px !important;
  }

  /* 8. Headings outside boxes */
  .cm-lesson-chapter {
    margin-top: 22px !important;
    padding-top: 16px !important;
  }

  .cm-chapter-title {
    font-size: 20px !important;
    margin: 0 0 12px !important;
    line-height: 1.28 !important;
  }

  .cm-subchapter-title {
    font-size: 17px !important;
    margin: 18px 0 10px !important;
    line-height: 1.28 !important;
  }

  /* 9. Hub & Portal Cards */
  .grade-card,
  .cm-resource-card,
  .cm-service-card,
  .tutoring-plan-card {
    padding: 16px 14px !important;
    border-radius: 16px !important;
  }

  /* 10. Bottom CTA */
  .cm-template .cm-final-cta,
  .cm-standard-final-cta {
    padding: 20px 14px !important;
    border-radius: 16px !important;
    margin: 24px 0 16px !important;
  }

  .cm-template .cm-final-cta h2,
  .cm-standard-final-cta h2 {
    font-size: 20px !important;
  }
}

/* Extra small mobile screens (<= 380px) */
@media (max-width: 380px) {
  .cm-template,
  .cm-template--lesson {
    width: calc(100% - 12px) !important;
  }

  .cm-template .cm-page-hero,
  .cm-template .cm-math-hub-hero,
  .cm-template .cm-service-hero,
  .cm-template .cm-lesson-hero,
  .cm-template .cm-resource-hero,
  .cm-template .cm-hero-panel {
    padding: 18px 10px 16px 10px !important;
    border-radius: 14px !important;
  }

  .cm-box {
    padding: 12px 10px 12px 10px !important;
    border-left-width: 3.5px !important;
    border-radius: 12px !important;
  }

  .cm-lesson-toc,
  .cm-objectifs-section,
  .cm-exo-card {
    padding: 12px 10px !important;
    border-radius: 12px !important;
  }
}



