/* Math Academy redesign (Pilot A2): site-wide header, footer and floating WhatsApp button.
   Loaded on every front-end page, including pages that keep their older body styling, so every
   rule is scoped by id (#ma-rd-header, #ma-rd-footer, #ma-fab-root) to win over the old theme CSS
   without !important and without touching anything else on the page. */
#ma-rd-header, #ma-rd-footer, #ma-fab-root {
  --rd-ink: #1A2B48; --rd-line: #e3e7ef; --rd-ground: #f6f9fc; --rd-r: 12px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; box-sizing: border-box;
}
#ma-rd-header *, #ma-rd-footer *, #ma-fab-root * { box-sizing: border-box; }
#ma-rd-header::before, #ma-rd-header::after, #ma-rd-footer::before, #ma-rd-footer::after { content: none; display: none; }

/* Anchor jumps land below the fixed header. */
html { scroll-padding-top: 88px; }

/* ---------- Header ---------- */
#ma-rd-header { position: fixed; inset: 0 0 auto 0; z-index: 1000; height: 72px; margin: 0; padding: 0; max-width: none; min-height: 0;
  background: transparent; color: var(--rd-ink); text-align: left; font-size: 16px; line-height: 1.6;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease; }
#ma-rd-header.solid { background: rgba(255,255,255,.94); box-shadow: 0 1px 0 var(--rd-line); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
body.ma-rd-chrome:not(.ma-rd-page) #ma-rd-header { background: rgba(255,255,255,.94); box-shadow: 0 1px 0 var(--rd-line); }
body.admin-bar #ma-rd-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar #ma-rd-header { top: 46px; } }
#ma-rd-header .rdh-wrap { max-width: 1180px; height: 100%; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 24px; }
#ma-rd-header a { text-decoration: none; box-shadow: none; border: 0; }
#ma-rd-header .rdh-brand { display: flex; align-items: center; color: inherit; flex: none; }
#ma-rd-header .rdh-brand svg { display: block; height: 42px; width: auto; }
#ma-rd-header .rdh-nav { display: flex; gap: 4px; margin: 0 0 0 auto; padding: 0; align-items: center; background: none; }
#ma-rd-header .rdh-nav > a, #ma-rd-header .rdh-dd > a { display: block; color: inherit; font-size: 14px; font-weight: 550; line-height: 1.6; letter-spacing: 0; text-transform: none; padding: 8px 12px; border-radius: var(--rd-r); background: transparent; }
#ma-rd-header .rdh-nav > a:hover, #ma-rd-header .rdh-dd > a:hover, #ma-rd-header .rdh-dd:focus-within > a { background: rgba(26,43,72,.06); }
#ma-rd-header.solid .rdh-nav > a:hover, #ma-rd-header.solid .rdh-dd > a:hover, #ma-rd-header.solid .rdh-dd:focus-within > a { background: var(--rd-ground); }
#ma-rd-header .rdh-nav a[aria-current="page"] { background: rgba(26,43,72,.06); }
#ma-rd-header .rdh-dd { position: relative; }
#ma-rd-header .rdh-dd > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); opacity: .7; }
#ma-rd-header .rdh-sheet { position: absolute; left: 0; top: 100%; min-width: 240px; padding: 8px; background: #fff; border-radius: var(--rd-r);
  box-shadow: 0 24px 48px -16px rgba(26,43,72,.35), 0 0 0 1px rgba(26,43,72,.06);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
#ma-rd-header .rdh-dd:hover .rdh-sheet, #ma-rd-header .rdh-dd:focus-within .rdh-sheet { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .18s ease; }
#ma-rd-header .rdh-sheet a { display: block; padding: 9px 12px; color: var(--rd-ink); font-size: 14px; font-weight: 500; line-height: 1.5; border-radius: var(--rd-r); white-space: nowrap; background: transparent; }
#ma-rd-header .rdh-sheet a:hover, #ma-rd-header .rdh-sheet a[aria-current="page"] { background: var(--rd-ground); }
#ma-rd-header .rdh-pill { flex: none; position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--rd-r);
  /* the previous site's red and purple brand gradient, drifting slowly (founder, 5 Nov 2026) */
  background: linear-gradient(110deg, #4c8dff 0%, #7c6cff 28%, #a75cff 52%, #ff5e8e 76%, #a75cff 100%) 0% 50% / 240% 100%; color: #fff; font-size: 14px; font-weight: 600; line-height: 1;
  box-shadow: 0 8px 24px -8px rgba(167,92,255,.7), inset 0 0 0 1px rgba(255,255,255,.18); animation: ma-rd-pill-drift 6s ease-in-out infinite alternate; }
#ma-rd-header .rdh-pill:hover { filter: brightness(1.06); color: #fff; }
/* the star: drawn at the size the U+2726 glyph had in Chrome, so Safari matches */
#ma-rd-header .rdh-pill .rdh-star { flex: none; display: block; width: .794em; height: .794em; fill: currentColor; }
@keyframes ma-rd-pill-drift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
#ma-rd-header .rdh-pill::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.55), rgba(255,255,255,0)); transform: skewX(-20deg); animation: ma-rd-shine 7s ease-in-out 1.5s infinite; }
@keyframes ma-rd-shine { 0% { left: -60%; } 14% { left: 130%; } 100% { left: 130%; } }
/* Phone menu button: a real button (was a details summary), drawn as before */
#ma-rd-header .rdh-menu { display: none; position: relative; flex: none; margin: 0; cursor: pointer; height: 40px; width: auto; min-width: 0; padding: 0 14px; border: 0; border-radius: var(--rd-r);
  align-items: center; justify-content: center; gap: 10px; -webkit-appearance: none; appearance: none; font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1; letter-spacing: 0; text-transform: none;
  color: inherit; background: transparent; box-shadow: inset 0 0 0 1px currentColor; transition: none; -webkit-tap-highlight-color: transparent; }
#ma-rd-header .rdh-menu:hover, #ma-rd-header .rdh-menu:focus { background: transparent; color: inherit; }
#ma-rd-header .rdh-bars { width: 16px; height: 10px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; position: relative; }
#ma-rd-header .rdh-bars::after { content: ""; position: absolute; left: 0; right: 0; top: 3.5px; border-top: 1.5px solid currentColor; }
@media (max-width: 1100px) { #ma-rd-header .rdh-nav { display: none; } #ma-rd-header .rdh-menu { display: flex; } #ma-rd-header .rdh-pill { margin-left: auto; } }
@media (max-width: 760px) { #ma-rd-header .rdh-wrap { padding: 0 20px; } }
@media (max-width: 480px) {
  #ma-rd-header .rdh-wrap { padding: 0 14px; gap: 8px; }
  #ma-rd-header .rdh-brand { min-width: 0; flex: 0 1 auto; }
  #ma-rd-header .rdh-brand svg { height: 31px; max-width: 100%; }
  #ma-rd-header .rdh-pill { height: 36px; padding: 0 11px; font-size: 13px; gap: 6px; }
  #ma-rd-header .rdh-menu-word { display: none; }
  #ma-rd-header .rdh-menu { height: 36px; width: 40px; padding: 0; }
}
/* Phone menu (founder 5 Nov 2026): concept A's layout, revealed by a circle that grows out of the
   Menu button (chrome.js measures the button and sets --x, --y, --r and --top). The dialog sits in
   the top layer, so the header's backdrop filter does not trap it. Without JS (Invoker Commands
   open it) everything shows at once with no circle; .rdm-js turns the motion on. */
html.ma-rd-menu-lock { overflow: hidden; }
#ma-rd-header .rdm { --rdm-out: 400ms; --x: calc(100% - 34px); --y: 36px; --r: 150vmax; --top: 72px;
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: var(--top) 0 0; border: 0;
  color: var(--rd-ink); font-size: 16px; line-height: 1.5; text-align: left; letter-spacing: 0; overflow: hidden; overscroll-behavior: contain;
  background: radial-gradient(70% 40% at 100% 0, #efe8ff 0, transparent 70%), radial-gradient(70% 40% at 0 100%, #ffeef4 0, transparent 70%), #fbfbfe; }
#ma-rd-header .rdm[open] { display: flex; flex-direction: column; }
#ma-rd-header .rdm:focus { outline: none; }
#ma-rd-header .rdm::backdrop { background: rgba(16,26,44,.28); }
#ma-rd-header .rdm.rdm-js { clip-path: circle(20px at var(--x) var(--y)); transition: clip-path .6s cubic-bezier(.65,0,.15,1); }
#ma-rd-header .rdm.rdm-js[data-state="open"] { clip-path: circle(var(--r) at var(--x) var(--y)); }
#ma-rd-header .rdm.rdm-js[data-state="closing"] { clip-path: circle(20px at var(--x) var(--y)); transition: clip-path .4s cubic-bezier(.55,0,.75,.2); }
#ma-rd-header .rdm.rdm-js::backdrop { opacity: 0; transition: opacity .4s ease; }
#ma-rd-header .rdm.rdm-js[data-state="open"]::backdrop { opacity: 1; }
#ma-rd-header .rdm *, #ma-rd-header .rdm *::before, #ma-rd-header .rdm *::after { box-sizing: border-box; }
#ma-rd-header .rdm :focus-visible { outline: 3px solid #4c8dff; outline-offset: 2px; }
#ma-rd-header .rdm-bg { position: absolute; inset: 0 0 auto; height: 320px; overflow: hidden; pointer-events: none; }
#ma-rd-header .rdm-bg svg { position: absolute; left: -20%; top: -20%; width: 140%; height: 140%; opacity: .28; animation: ma-rd-menu-float 16s ease-in-out infinite alternate; }
@keyframes ma-rd-menu-float { to { transform: translate(-26px, 14px); } }
#ma-rd-header .rdm-logo { position: absolute; z-index: 2; display: block; left: 14px; top: 20px; height: 31px; color: var(--rd-ink); pointer-events: none; }
#ma-rd-header .rdm-logo svg { display: block; width: 100%; height: 100%; }
/* the cross sits exactly on the Menu button (chrome.js copies its box) and is drawn the same way */
#ma-rd-header .rdm-x { position: absolute; z-index: 3; top: 18px; right: 14px; width: 40px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: var(--rd-r);
  -webkit-appearance: none; appearance: none; background: transparent; color: var(--rd-ink); box-shadow: inset 0 0 0 1px currentColor; cursor: pointer; font: inherit;
  transition: box-shadow .3s ease, background-color .3s ease; }
#ma-rd-header .rdm-x::before { content: ""; position: absolute; inset: -4px -2px; }
#ma-rd-header .rdm-x span { position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; margin: -.75px 0 0 -8px; border-radius: 2px; background: currentColor;
  transition: transform .38s cubic-bezier(.65,0,.15,1) .12s, opacity .2s ease .12s; }
#ma-rd-header .rdm-x span:nth-child(1) { transform: translateY(-4.25px); }
#ma-rd-header .rdm-x span:nth-child(3) { transform: translateY(4.25px); }
#ma-rd-header .rdm:not(.rdm-js) .rdm-x, #ma-rd-header .rdm[data-state="open"] .rdm-x { box-shadow: inset 0 0 0 1px transparent; background: rgba(26,43,72,.07); }
#ma-rd-header .rdm:not(.rdm-js) .rdm-x span:nth-child(1), #ma-rd-header .rdm[data-state="open"] .rdm-x span:nth-child(1) { transform: rotate(45deg) scaleX(1.15); }
#ma-rd-header .rdm:not(.rdm-js) .rdm-x span:nth-child(2), #ma-rd-header .rdm[data-state="open"] .rdm-x span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
#ma-rd-header .rdm:not(.rdm-js) .rdm-x span:nth-child(3), #ma-rd-header .rdm[data-state="open"] .rdm-x span:nth-child(3) { transform: rotate(-45deg) scaleX(1.15); }
#ma-rd-header .rdm-in { max-width: 560px; margin: 0 auto; }
#ma-rd-header .rdm-scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; margin: 0; padding: 4px 16px 18px; background: none; }
#ma-rd-header .rdm-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#ma-rd-header .rdm-q { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 68px; padding: 6px 2px; border-radius: 16px; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(26,43,72,.08); font-size: 13px; font-weight: 600; line-height: 1.2; text-align: center; }
#ma-rd-header .rdm-q .rdm-ic { width: 22px; height: 22px; color: #41507a; }
#ma-rd-header .rdm-q[aria-current] { background: var(--rd-ink); box-shadow: none; }
#ma-rd-header .rdm-q[aria-current] .rdm-ic { color: #fff; }
#ma-rd-header .rdm-lbl { margin: 20px 4px 10px; padding: 0; font-size: 12px; font-weight: 650; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; color: #5a6482; }
#ma-rd-header .rdm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#ma-rd-header .rdm-lv-jc { --lv: #5B3FD0; --lv-t: #F1EDFF; --lv-2: #8C6CFF; }
#ma-rd-header .rdm-lv-am { --lv: #1F5BD6; --lv-t: #EAF1FE; --lv-2: #4C8DFF; }
#ma-rd-header .rdm-lv-em { --lv: #B8325F; --lv-t: #FCEEF3; --lv-2: #EF5F8E; }
#ma-rd-header .rdm-lv-s1 { --lv: #0E7C88; --lv-t: #E5F5F6; --lv-2: #2DB3C2; }
#ma-rd-header .rdm-lv-s2 { --lv: #237F55; --lv-t: #E7F5EE; --lv-2: #38B27A; }
#ma-rd-header .rdm-lv-cc { --lv: #7A35C8; --lv-t: #F5ECFF; --lv-2: #FF5E8E; }
#ma-rd-header .rdm-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 100px; padding: 12px 14px 14px;
  border-radius: 18px; background: var(--lv-t); font-size: 14.5px; font-weight: 650; line-height: 1.25; box-shadow: inset 0 0 0 1px rgba(26,43,72,.08); }
#ma-rd-header .rdm-tile::after { content: ""; position: absolute; right: -26px; top: -26px; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, var(--lv-2), transparent 70%); opacity: .22; }
#ma-rd-header .rdm-tile[aria-current] { box-shadow: inset 0 0 0 2px var(--lv); }
#ma-rd-header .rdm-tile span { text-wrap: balance; }
#ma-rd-header .rdm-motif { display: block; width: 34px; height: 34px; margin-left: -4px; }
#ma-rd-header .rdm-cover { fill: var(--lv); }
#ma-rd-header .rdm-group { border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(26,43,72,.08); overflow: hidden; }
#ma-rd-header .rdm-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; font-size: 16px; font-weight: 550; line-height: 1.3; border-top: 1px solid #e9ecf3; }
#ma-rd-header .rdm-row:first-child { border-top: 0; }
#ma-rd-header .rdm-row[aria-current] { background: var(--rd-ground); font-weight: 700; }
#ma-rd-header .rdm-chev { flex: none; width: 16px; height: 16px; margin-left: auto; color: #8a93ab; }
#ma-rd-header .rdm-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #c3c9d8; }
#ma-rd-header .rdm-dot[class*="rdm-lv-"] { background: var(--lv); }
#ma-rd-header .rdm-acc { margin: 10px 0 0; padding: 0; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(26,43,72,.08); }
#ma-rd-header .rdm-acc > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 16px; cursor: pointer; font-size: 16px; font-weight: 650; color: var(--rd-ink); }
#ma-rd-header .rdm-acc > summary::-webkit-details-marker { display: none; }
#ma-rd-header .rdm-acc > summary::marker { content: ""; }
#ma-rd-header .rdm-n { font-size: 12px; font-weight: 650; line-height: 1.5; color: #5a6482; background: #eef1f7; border-radius: 999px; padding: 1px 8px; }
#ma-rd-header .rdm-acc > summary .rdm-chev { color: #5a6482; transform: rotate(90deg); transition: transform .25s ease; }
#ma-rd-header .rdm-acc[open] > summary .rdm-chev { transform: rotate(-90deg); }
#ma-rd-header .rdm-acc .rdm-group { box-shadow: none; background: transparent; border-top: 1px solid #e9ecf3; border-radius: 0 0 16px 16px; }
@supports (interpolate-size: allow-keywords) {
  #ma-rd-header .rdm-acc { interpolate-size: allow-keywords; }
  #ma-rd-header .rdm-acc::details-content { height: 0; overflow: clip; transition: height .35s cubic-bezier(.22,1,.36,1), content-visibility .35s allow-discrete; }
  #ma-rd-header .rdm-acc[open]::details-content { height: auto; }
}
#ma-rd-header .rdm-mai { display: flex; align-items: center; gap: 10px; min-height: 56px; margin-top: 12px; padding: 0 16px; border-radius: 16px; font-size: 16px; font-weight: 650;
  background: linear-gradient(110deg, #4c8dff 0%, #7c6cff 28%, #a75cff 52%, #ff5e8e 76%, #a75cff 100%) 0% 50% / 240% 100%; animation: ma-rd-pill-drift 6s ease-in-out infinite alternate;
  box-shadow: 0 10px 24px -12px rgba(167,92,255,.8); }
#ma-rd-header .rdm-mai[aria-current] { box-shadow: inset 0 0 0 2px rgba(255,255,255,.75), 0 10px 24px -12px rgba(167,92,255,.8); }
#ma-rd-header .rdm-star { flex: none; width: 15px; height: 15px; fill: currentColor; }
#ma-rd-header .rdm-mai .rdm-chev { color: currentColor; }
#ma-rd-header .rdm-acts { position: relative; flex: none; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #edf0f5;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#ma-rd-header .rdm-acts .rdm-in { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 8px; }
#ma-rd-header .rdm-act { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; border-radius: 14px; background: #f1f3f8; font-size: 14.5px; font-weight: 650; line-height: 1.2; }
#ma-rd-header .rdm-act .rdm-ic { flex: none; width: 19px; height: 19px; fill: currentColor; }
#ma-rd-header .rdm-act.rdm-wa { background: #128045; }
@media (max-width: 370px) {
  #ma-rd-header .rdm-act { font-size: 13.5px; gap: 5px; }
  #ma-rd-header .rdm-q { font-size: 12px; }
  #ma-rd-header .rdm-tile { font-size: 14px; }
}
/* staggered entrance once the circle has grown (only when chrome.js runs the motion) */
#ma-rd-header .rdm-js :is(.rdm-q, .rdm-tile, .rdm-lbl, .rdm-scroll .rdm-in > .rdm-group, .rdm-acc, .rdm-mai), #ma-rd-header .rdm-js .rdm-acts {
  opacity: 0; transform: translateY(14px); transition: opacity .35s ease, transform .55s cubic-bezier(.22,1,.36,1); }
#ma-rd-header .rdm-js[data-state="open"] :is(.rdm-q, .rdm-tile, .rdm-lbl, .rdm-scroll .rdm-in > .rdm-group, .rdm-acc, .rdm-mai) { opacity: 1; transform: none; transition-delay: calc(150ms + var(--i, 0) * 35ms); }
#ma-rd-header .rdm-js[data-state="open"] .rdm-acts { opacity: 1; transform: none; transition-delay: .3s; }
/* The chrome's link colours must say !important against the old theme's "a" rules. */
#ma-rd-header .rdm a, #ma-rd-header .rdm a:hover { color: #1A2B48 !important; text-decoration: none; }
#ma-rd-header .rdm a.rdm-mai, #ma-rd-header .rdm a.rdm-mai:hover, #ma-rd-header .rdm a.rdm-wa, #ma-rd-header .rdm a.rdm-wa:hover,
#ma-rd-header .rdm a.rdm-q[aria-current], #ma-rd-header .rdm a.rdm-q[aria-current]:hover { color: #fff !important; }
@media (prefers-reduced-motion: reduce) {
  #ma-rd-header .rdm { --rdm-out: 160ms; }
  #ma-rd-header .rdm.rdm-js, #ma-rd-header .rdm.rdm-js[data-state="open"], #ma-rd-header .rdm.rdm-js[data-state="closing"] { clip-path: none; opacity: 0; transition: opacity .16s ease; }
  #ma-rd-header .rdm.rdm-js[data-state="open"] { opacity: 1; }
  #ma-rd-header .rdm-bg svg, #ma-rd-header .rdm-mai { animation: none; }
  #ma-rd-header .rdm-js :is(.rdm-q, .rdm-tile, .rdm-lbl, .rdm-scroll .rdm-in > .rdm-group, .rdm-acc, .rdm-mai), #ma-rd-header .rdm-js .rdm-acts { opacity: 1; transform: none; transition: none; }
  #ma-rd-header .rdm-x, #ma-rd-header .rdm-x span { transition: none; }
  #ma-rd-header .rdm-acc::details-content { transition: none; }
}

/* Touch targets of at least 44 px on touch-size screens, without changing what is drawn:
   the menu button grows an invisible hit area; the pill keeps its painted height inside a
   transparent border (background and the inset ring stay in the padding box). */
@media (max-width: 1100px) {
  #ma-rd-header .rdh-menu::before { content: ""; position: absolute; inset: -4px -2px; }
  #ma-rd-header .rdh-pill { height: 44px; border: 2px solid transparent; background-clip: padding-box; border-radius: 14px;
    /* the glow follows the painted pill (a box shadow would start below the transparent border) */
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); filter: drop-shadow(0 6px 10px rgba(167,92,255,.42)); }
  #ma-rd-header .rdh-pill:hover { filter: drop-shadow(0 6px 10px rgba(167,92,255,.42)) brightness(1.06); }
}
@media (max-width: 480px) {
  #ma-rd-header .rdh-pill { border-width: 4px 0; border-radius: 12px / 16px; }
}

/* Pages that keep their older body: start the content below the fixed header. */
body.ma-rd-chrome:not(.ma-rd-page) .site-container { padding-top: 96px; }
@media (max-width: 1099px) { body.ma-rd-chrome:not(.ma-rd-page) .site-container { padding-top: 80px; } }

/* ---------- Footer ---------- */
#ma-rd-footer { display: block; margin: 0; background: #1A2B48; color: rgba(255,255,255,.78); padding: 96px 0 48px; font-size: 14px; line-height: 1.6; text-align: left; text-transform: none; letter-spacing: 0; clear: both; }
#ma-rd-footer .rdf-wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
#ma-rd-footer a { color: #fff; text-decoration: none; box-shadow: none; border: 0; background: none; }
#ma-rd-footer a:hover { text-decoration: underline; color: #fff; }
#ma-rd-footer p { margin: 0; color: inherit; font-size: inherit; line-height: inherit; }
#ma-rd-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
#ma-rd-footer li { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.5; }
#ma-rd-footer li::before { content: none; }
#ma-rd-footer h2 { font-family: inherit; font-size: 16px; line-height: 1.3; color: #fff; letter-spacing: 0; margin: 0 0 16px; font-weight: 600; text-transform: none; }
#ma-rd-footer .rdf-cta { position: static; max-width: none; margin: 0; padding: 0 0 64px; display: flex; justify-content: space-between; align-items: center; gap: 32px; border-bottom: 1px solid rgba(255,255,255,.14); flex-wrap: wrap; background: none; }
#ma-rd-footer .rdf-cta p { color: #fff; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
#ma-rd-footer .rdf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: var(--rd-r);
  background: #fff; color: #1A2B48; font-size: 16px; font-weight: 600; white-space: nowrap; transition: background-color .2s ease; }
#ma-rd-footer .rdf-btn:hover { background: #eef1fb; color: #1A2B48; text-decoration: none; }
#ma-rd-footer .rdf-btn svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
#ma-rd-footer .rdf-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 48px; padding: 64px 0; }
#ma-rd-footer .rdf-brand b { color: #fff; font-size: 16px; display: block; margin-bottom: 8px; }
#ma-rd-footer .rdf-brand p + p { margin-top: 16px; }
#ma-rd-footer .rdf-brand .rdf-phone { font-size: 22px; font-weight: 650; display: inline-block; margin-top: 16px; }
#ma-rd-footer .rdf-brand .rdf-phone-sub { margin-top: 4px; }
#ma-rd-footer .rdf-social { display: flex; gap: 16px; margin-top: 24px; }
#ma-rd-footer .rdf-social a { width: 40px; height: 40px; border-radius: var(--rd-r); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
#ma-rd-footer .rdf-social svg { width: 18px; height: 18px; fill: #fff; }
#ma-rd-footer .rdf-base { padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: rgba(255,255,255,.6); }
#ma-rd-footer .rdf-base a { color: rgba(255,255,255,.78); }
#ma-rd-footer .rdf-creds { margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
@media (max-width: 900px) { #ma-rd-footer .rdf-grid { grid-template-columns: 1fr 1fr; } #ma-rd-footer .rdf-brand, #ma-rd-footer .rdf-blog { grid-column: 1 / -1; } }
@media (max-width: 760px) { #ma-rd-footer { padding-bottom: calc(112px + env(safe-area-inset-bottom)); } #ma-rd-footer .rdf-wrap { padding: 0 20px; } #ma-rd-footer .rdf-btn { width: 100%; } }
/* Footer links: 44 px touch areas from vertical padding on the inline links (inline padding does
   not move the lines, so the lists look the same); the social squares get a slightly larger hit area. */
@media (max-width: 1100px) {
  #ma-rd-footer li a { padding: 12px 0; }
  #ma-rd-footer .rdf-creds a { padding: 11px 0; margin: -11px 0; }
  #ma-rd-footer .rdf-brand .rdf-phone { padding: 5px 0; margin: 11px 0 -5px; }
  #ma-rd-footer .rdf-social a { position: relative; }
  #ma-rd-footer .rdf-social a::before { content: ""; position: absolute; inset: -3px; }
}
/* Pages on the older body: seo-mobile.css pads the body by 88 px on phones for the old floating
   button, which left a light strip under this dark footer. The footer carries that space now. */
@media (max-width: 768px) {
  body.ma-rd-chrome[class] { padding-bottom: 0; }
  #ma-rd-footer { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
}

/* ---------- Floating WhatsApp, every screen size ---------- */
#ma-fab-root { position: static; }
#ma-fab-root .rd-fab { position: fixed; z-index: 1001; right: max(20px, env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px; border-radius: var(--rd-r);
  background: #128045; color: #fff; font-size: 16px; font-weight: 600; line-height: 1; text-decoration: none;
  box-shadow: 0 16px 32px -12px rgba(10,60,35,.6), 0 0 0 1px rgba(255,255,255,.12) inset; }
#ma-fab-root .rd-fab svg { width: 24px; height: 24px; fill: currentColor; }
#ma-fab-root .rd-fab:hover { background: #0f6e3b; color: #fff; }
@media (max-width: 760px) { #ma-fab-root .rd-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); height: 52px; padding: 0 18px 0 14px; } }
@media (max-width: 639px) {
  #ma-fab-root .rd-fab { width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  #ma-fab-root .rd-fab span { display: none; }
  #ma-fab-root .rd-fab svg { width: 24px; height: 24px; }
}
/* The button steps aside while the phone menu is open (it sat on the sheet), and on phones
   while the footer, with its own WhatsApp button, is on screen (chrome.js sets both classes). */
#ma-fab-root .rd-fab { transition: opacity .2s ease, visibility 0s linear 0s; }
body.ma-rd-menu-open #ma-fab-root .rd-fab { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility 0s linear .2s; }
@media (max-width: 760px) {
  body.ma-rd-foot-in #ma-fab-root .rd-fab { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility 0s linear .2s; }
}

/* Skip link for keyboard users */
.ma-rd-skip { position: absolute; left: 12px; top: -60px; z-index: 1002; padding: 10px 16px; border-radius: 12px; background: #1A2B48; color: #fff; font: 600 14px/1.4 Inter, system-ui, sans-serif; text-decoration: none; }
.ma-rd-skip:focus { top: 12px; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  #ma-rd-header .rdh-pill { animation: none; }
  #ma-fab-root .rd-fab { transition: none !important; }
  /* the phone menu keeps its own short fade (its rules above), so it is left out here */
  #ma-rd-header, #ma-rd-header *:not(.rdm):not(.rdm *), #ma-rd-header *:not(.rdm *)::after { transition: none !important; animation: none !important; }
}

/* The old theme sets every link colour with !important (style.css "a" and "a:hover"); on pages
   that keep the old CSS, the chrome's own link colours must say !important too. */
#ma-rd-header .rdh-nav > a, #ma-rd-header .rdh-dd > a, #ma-rd-header .rdh-brand { color: inherit !important; }
#ma-rd-header .rdh-sheet a { color: #1A2B48 !important; }
#ma-rd-header .rdh-pill, #ma-rd-header .rdh-pill:hover { color: #fff !important; }
#ma-rd-footer a, #ma-rd-footer a:hover { color: #fff !important; }
#ma-rd-footer .rdf-base a, #ma-rd-footer .rdf-base a:hover { color: rgba(255,255,255,.78) !important; }
#ma-rd-footer .rdf-btn, #ma-rd-footer .rdf-btn:hover { color: #1A2B48 !important; }
#ma-fab-root .rd-fab, #ma-fab-root .rd-fab:hover { color: #fff !important; }
.ma-rd-skip, .ma-rd-skip:focus { color: #fff !important; }
/* Pages that already end with their own WhatsApp band (body class ma-page-cta) skip the footer's
   CTA strip, so two WhatsApp calls never sit back to back. */
body.ma-page-cta #ma-rd-footer .rdf-cta { display: none; }

/* Resources > Practice group (owner, 18 Nov 2026): a sub-panel beside the dropdown on desktop, an accordion row on the phone. */
#ma-rd-header .rdh-sub { position: static; }
#ma-rd-header .rdh-sub-btn { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; margin: 0; padding: 9px 12px; border: 0; border-radius: var(--rd-r); background: transparent; color: #1A2B48; font: inherit; font-size: 14px; font-weight: 500; line-height: 1.5; text-align: left; cursor: pointer; }
#ma-rd-header .rdh-sub-btn:hover, #ma-rd-header .rdh-sub.is-open > .rdh-sub-btn, #ma-rd-header .rdh-sub-btn[data-current] { background: var(--rd-ground); }
#ma-rd-header .rdh-sub-btn:focus-visible, #ma-rd-header .rdh-sheet a:focus-visible { outline: 2px solid #6D5BD0; outline-offset: -2px; }
#ma-rd-header .rdh-sub-chev { flex: none; color: #5a6482; transition: transform .18s ease; }
#ma-rd-header .rdh-sub.is-open > .rdh-sub-btn .rdh-sub-chev { transform: translateX(2px); }
#ma-rd-header .rdh-subpanel { position: absolute; left: calc(100% + 6px); top: 0; min-width: 232px; padding: 8px; background: #fff; border-radius: var(--rd-r); box-shadow: 0 24px 48px -16px rgba(26,43,72,.35), 0 0 0 1px rgba(26,43,72,.06); opacity: 0; visibility: hidden; transform: translateX(-4px); transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
#ma-rd-header .rdh-subpanel::before { content: ""; position: absolute; top: 0; bottom: 0; left: -14px; width: 14px; }
#ma-rd-header .rdh-sub.is-left .rdh-subpanel { left: auto; right: calc(100% + 6px); transform: translateX(4px); }
#ma-rd-header .rdh-sub.is-left .rdh-subpanel::before { left: auto; right: -14px; }
#ma-rd-header .rdh-sub.is-left .rdh-sub-chev { transform: rotate(180deg); }
#ma-rd-header .rdh-sub.is-open > .rdh-subpanel, #ma-rd-header .rdh-sub:hover > .rdh-subpanel { opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease, transform .16s ease; }
#ma-rd-header .rdh-sub.is-closed:not(:hover) > .rdh-subpanel { opacity: 0; visibility: hidden; }
#ma-rd-header .rdm-sub { border-top: 1px solid #e9ecf3; }
#ma-rd-header .rdm-sub > summary { list-style: none; cursor: pointer; border-top: 0; }
#ma-rd-header .rdm-sub > summary::-webkit-details-marker { display: none; }
#ma-rd-header .rdm-sub > summary::marker { content: ""; }
#ma-rd-header .rdm-sub > summary .rdm-chev { margin-left: auto; color: #5a6482; transform: rotate(90deg); transition: transform .25s ease; }
#ma-rd-header .rdm-sub[open] > summary .rdm-chev { transform: rotate(-90deg); }
#ma-rd-header .rdm-sub > summary > span { flex: 1; }
#ma-rd-header .rdm-subrows { background: #f7f9fc; box-shadow: inset 3px 0 0 #d9ddf3; }
#ma-rd-header .rdm-subrows .rdm-row { padding-left: 28px; min-height: 46px; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { #ma-rd-header .rdh-subpanel, #ma-rd-header .rdh-sub-chev { transition: none; } }
#ma-rd-header .rdh-sep { display: block; height: 1px; margin: 6px 8px; background: rgba(26,43,72,.1); }
#ma-rd-header .rdm-extra { margin-top: 10px; }

/* ---------- Sec 1 lead bar (v82, owner 20 Nov 2026; printed by ma_rd_sec1_bar() until 1 Dec 2026 SGT) ----------
   A slim bar in the page's flow, above the fixed header, so it covers nothing and scrolls away with the page.
   The header sits just under it (--s1-top, kept by chrome.js as the bar scrolls off). Dismissed with the cross
   (remembered on the device). One soft sweep of light after loading, then still. */
#ma-s1-bar { position: relative; z-index: 1001; display: flex; min-height: 40px; margin: 0; padding: 0; background: #1A2B48; color: #fff; font: 550 14px/1.35 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: 0; text-align: left; overflow: hidden; }
#ma-s1-bar *, #ma-s1-bar *::before, #ma-s1-bar *::after { box-sizing: border-box; }
#ma-s1-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, #3CC1C9, #8E7CF0 55%, #EC76B0); }
#ma-s1-bar .s1-bar-link { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 14px; min-width: 0; padding: 9px 52px 11px 16px; color: #fff !important; text-decoration: none !important; border: 0; box-shadow: none; background: none; }
#ma-s1-bar .s1-bar-link span, #ma-s1-bar .s1-bar-link b { color: inherit; }
#ma-s1-bar .s1-bar-link::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 28%; background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.18), rgba(255,255,255,0)); transform: translateX(-110%); animation: s1-sweep 1.5s ease-out 1.1s 1 both; pointer-events: none; }
@keyframes s1-sweep { to { transform: translateX(470%); } }
#ma-s1-bar .s1-bar-dot { flex: none; width: 8px; height: 8px; margin-right: -4px; border-radius: 50%; background: #3CC1C9; }
#ma-s1-bar .s1-bar-cta { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#ma-s1-bar .s1-bar-cta b { font-weight: 650; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
#ma-s1-bar svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
#ma-s1-bar .s1-bar-link:hover .s1-bar-cta svg { transform: translateX(3px); }
#ma-s1-bar .s1-bar-link:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
#ma-s1-bar .s1-bar-x { position: absolute; right: 6px; top: 3px; display: grid; place-items: center; width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; box-shadow: none; color: rgba(255,255,255,.82); cursor: pointer; }
#ma-s1-bar .s1-bar-x:hover { background: rgba(255,255,255,.14); color: #fff; }
#ma-s1-bar .s1-bar-x:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
body.has-s1-bar #ma-rd-header { top: var(--s1-top, 40px); }
body.admin-bar.has-s1-bar #ma-rd-header { top: calc(32px + var(--s1-top, 40px)); }
@media (max-width: 782px) { body.admin-bar.has-s1-bar #ma-rd-header { top: calc(46px + var(--s1-top, 40px)); } }
html.s1-off, html.s1-over { --s1-top: 0px !important; }
html.s1-off #ma-s1-bar, html.s1-over #ma-s1-bar { display: none; }
/* phones: one line, the call shortened to its arrow (the words stay for screen readers) */
@media (max-width: 760px) {
  #ma-s1-bar { font-size: 13px; }
  #ma-s1-bar .s1-bar-link { justify-content: flex-start; flex-wrap: nowrap; gap: 10px; padding-left: 20px; }
  #ma-s1-bar .s1-bar-dot { margin-right: 0; }
  #ma-s1-bar .s1-bar-cta b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { #ma-s1-bar .s1-bar-link::before { animation: none; } #ma-s1-bar svg { transition: none; } }
@media print { #ma-s1-bar { display: none; } }

/* ---------- Sec 1 pinned strip on the phone home page (v87, owner 20 Nov 2026; ma_rd_sec1_pin(), until 1 Dec 2026 SGT) ----------
   Once the hero's Sec 1 line has scrolled away, this compact strip sits just under the header for the rest of the home
   page (chrome.js sets html.s1-pinned). It is the header's lower edge: it never reaches the menu or the WhatsApp button.
   A little louder than the bar: a peach to indigo edge, a peach call, and one moment of attention the first time it
   pins (the dot ripples twice, a band of light and the edge sweep once), then still. Desktop keeps the hero line only. */
#ma-s1-pin { display: none; }
@media (max-width: 760px) {
  #ma-s1-pin { position: fixed; left: 0; right: 0; top: 72px; z-index: 999; display: flex; min-height: 44px; margin: 0; padding: 0; background: #1A2B48; color: #fff; font: 600 12.5px/1.3 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: 0; text-align: left; overflow: hidden; box-shadow: 0 10px 22px -14px rgba(26,43,72,.7); transform: translateY(-110%); visibility: hidden; transition: transform .4s cubic-bezier(.23, 1, .32, 1), visibility 0s linear .4s; }
  body.admin-bar #ma-s1-pin { top: 118px; }
  #ma-s1-pin *, #ma-s1-pin *::before, #ma-s1-pin *::after { box-sizing: border-box; }
  html.s1-pinned:not(.s1-off):not(.s1-over) #ma-s1-pin { transform: none; visibility: visible; transition: transform .4s cubic-bezier(.23, 1, .32, 1), visibility 0s; }
  #ma-s1-pin::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #FFA36B, #EC76B0 50%, #7C65F1, #FFA36B) 0 0 / 200% 100%; }
  #ma-s1-pin .s1-pin-link { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 36px 11px 14px; color: #fff !important; text-decoration: none !important; border: 0; box-shadow: none; background: none; }
  #ma-s1-pin .s1-pin-link span, #ma-s1-pin .s1-pin-link b { color: inherit; }
  #ma-s1-pin .s1-pin-text { flex: 1 1 auto; min-width: 0; }
  #ma-s1-pin .s1-pin-dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #FFA36B; }
  #ma-s1-pin .s1-pin-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #FFA36B; opacity: 0; }
  #ma-s1-pin .s1-pin-cta { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #FFA36B; color: #1A2B48 !important; }
  #ma-s1-pin .s1-pin-cta b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #ma-s1-pin svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #ma-s1-pin .s1-pin-link::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 34%; background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.22), rgba(255,255,255,0)); transform: translateX(-110%); pointer-events: none; }
  #ma-s1-pin .s1-pin-link:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
  #ma-s1-pin .s1-pin-x { position: absolute; right: 2px; top: 5px; display: grid; place-items: center; width: 32px; height: 32px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; box-shadow: none; color: rgba(255,255,255,.82); cursor: pointer; }
  #ma-s1-pin .s1-pin-x:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
  /* the one moment of attention, the first time it pins (html.s1-pin-seen is set once and stays) */
  html.s1-pin-seen #ma-s1-pin .s1-pin-link::before { animation: s1-pin-sweep 1.3s ease-out .45s 1 both; }
  html.s1-pin-seen #ma-s1-pin::after { animation: s1-pin-edge 1.6s ease-out .3s 1 both; }
  html.s1-pin-seen #ma-s1-pin .s1-pin-dot::after { animation: s1-pin-ripple 1.1s ease-out .5s 2; }
  html.s1-pinned:not(.s1-off):not(.s1-over) { scroll-padding-top: 132px; }
}
@keyframes s1-pin-sweep { to { transform: translateX(420%); } }
@keyframes s1-pin-edge { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes s1-pin-ripple { from { opacity: .6; transform: scale(1); } to { opacity: 0; transform: scale(3.6); } }
@media (prefers-reduced-motion: reduce) { #ma-s1-pin, #ma-s1-pin::after, #ma-s1-pin .s1-pin-link::before, #ma-s1-pin .s1-pin-dot::after { transition: none !important; animation: none !important; } }
@media print { #ma-s1-pin { display: none !important; } }
