/* Math Academy content pages on the Pilot A2 design (study guides, practice, questions, blog).
   Applied to the existing WordPress markup: every rule is scoped by body.ma-cp (added by
   content-port.php on these page types only) and never reaches the site header, footer or
   floating button (#ma-rd-header, #ma-rd-footer, #ma-fab-root live outside .site-inner).
   One family (Inter), one radius (12px), the A2 palette; a level colour marks the page's level. */

body.ma-cp {
  --cp-navy: #1A2B48; --cp-ink: #1A2B48; --cp-body: #3c4763; --cp-muted: #5a6482; --cp-soft: #7a83a8;
  --cp-indigo: #2E368F; --cp-violet: #7C65F1; --cp-pink: #EC76B0; --cp-sky: #55A0F4; --cp-peach: #FFA36B;
  --cp-accent: #5b4fd6; --cp-t-sky: #eaf3ff; --cp-t-violet: #f1eeff; --cp-t-pink: #fdeef5;
  --cp-line: #e3e7ef; --cp-ground: #f6f9fc; --cp-r: 12px;
  --cp-f3: 22px; --cp-f4: 18px; --cp-f5: 16px; --cp-f6: 14px;
  --cp-s1: 8px; --cp-s2: 16px; --cp-s3: 24px; --cp-s4: 32px; --cp-s5: 48px; --cp-s6: 64px; --cp-s7: 96px;
  --cp-cut: 21.26vw; --cp-ease: cubic-bezier(.23, 1, .32, 1);
  --cp-lv: var(--cp-accent); --cp-lv-t: var(--cp-t-violet);
  --cp-grad: linear-gradient(120deg, var(--cp-navy), var(--cp-indigo) 60%, #4b46b8);
  --cp-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #fff;
}
body.ma-cp-lv-jc { --cp-lv: #6D5BD0; --cp-lv-t: #EEEBFC; }
body.ma-cp-lv-am { --cp-lv: #2F6FEB; --cp-lv-t: #E8F0FE; }
body.ma-cp-lv-em { --cp-lv: #D9467A; --cp-lv-t: #FCE9F0; }
body.ma-cp-lv-s1 { --cp-lv: #1597A6; --cp-lv-t: #E3F5F6; }
body.ma-cp-lv-s2 { --cp-lv: #2E9E6B; --cp-lv-t: #E5F5EC; }
@media (max-width: 760px) { body.ma-cp { --cp-f3: 20px; --cp-f4: 17px; --cp-s7: 64px; } }

/* ---------- Page frame: one 1180px column, white ground ---------- */
body.ma-cp.ma-cp { background: #fff !important; }
body.ma-cp.ma-cp .site-container { background: transparent !important; }
body.ma-cp.ma-cp .site-container { position: relative; max-width: none; width: auto; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
/* clip, not hidden: no scroll container, so the sticky rails keep working */
body.ma-cp.ma-cp :is(.site-container, .site-inner) { overflow: visible; overflow-x: clip; }
body.ma-cp.ma-cp .site-inner { position: relative; z-index: 1; max-width: none; width: auto; margin: 0; padding: 0; background: transparent none !important; }
body.ma-cp .site-inner > .wrap, body.ma-cp .content-sidebar-wrap { float: none; width: auto; max-width: 1180px; margin: 0 auto; padding: 0 32px; }
body.ma-cp .site-inner > .wrap .content-sidebar-wrap { padding: 0; }
body.ma-cp.ma-cp .content { float: none; width: auto; max-width: none; margin: 0; padding: 0 0 var(--cp-s7); background: none; }
body.ma-cp .content .entry { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; }
body.ma-cp .content .entry-content { margin: 0; }
body.ma-cp .site-inner :is(.content, .ma-practice-shell, .ma-guides, .ma-blog, .entry-content) {
  font-family: var(--cp-font); color: var(--cp-body); -webkit-font-smoothing: antialiased; }
body.ma-cp .site-inner :is(h1, h2, h3, h4) { font-family: var(--cp-font); color: var(--cp-ink); text-transform: none; }
body.ma-cp .sidebar { display: none; }
/* the older course-illustration pilot is not loaded on these pages; hide its art if a cached script still adds it */
body.ma-cp .site-inner .ma-course-art { display: none; }
@media (max-width: 760px) {
  body.ma-cp .site-inner > .wrap, body.ma-cp .content-sidebar-wrap { padding: 0 20px; }
}

/* ---------- Reading hero: the A2 band (inserted by content-port.js) behind crumbs, kicker, H1, lede ---------- */
.ma-cp-band { position: absolute; left: 0; right: 0; top: 0; height: var(--cp-band-h, 0px); z-index: 0; overflow: hidden; pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cp-cut)), 0 100%);
  background:
    radial-gradient(40% 55% at 82% 40%, rgba(236,118,176,.22), rgba(236,118,176,0) 70%),
    radial-gradient(45% 60% at 66% 8%, rgba(124,101,241,.18), rgba(124,101,241,0) 70%),
    radial-gradient(40% 50% at 30% 0%, rgba(85,160,244,.16), rgba(85,160,244,0) 70%),
    linear-gradient(170deg, #f6f9fc, #eef0fb 60%, #f6f9fc);
  opacity: 0; transition: opacity .6s ease; }
.ma-cp-band.on { opacity: 1; }
.ma-cp-band canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease; }
.ma-cp-band.is-live canvas { opacity: 1; }

/* Crumbs */
body.ma-cp.ma-cp .content > .breadcrumb,
body.ma-cp.ma-cp .site-inner .ma-practice-breadcrumbs {
  display: block; margin: 40px 0 var(--cp-s3) !important; padding: 0 !important; border: 0; background: none; font-family: var(--cp-font);
  font-size: var(--cp-f6) !important; line-height: 1.6 !important; color: var(--cp-muted); }
body.ma-cp.ma-cp .site-inner :is(.content > .breadcrumb, .ma-practice-breadcrumbs) a { color: var(--cp-muted) !important; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 400; }
body.ma-cp.ma-cp .site-inner :is(.content > .breadcrumb, .ma-practice-breadcrumbs) a:hover { color: var(--cp-ink) !important; }
body.ma-cp.ma-cp .site-inner :is(.content > .breadcrumb, .ma-practice-breadcrumbs) > span { display: inline; }

/* Kicker (eyebrows keep their own mixed-case text) */
body.ma-cp.ma-cp .site-inner :is(.ma-practice-eyebrow, .ma-guides .eyebrow) {
  margin: 0 0 var(--cp-s2); font-size: var(--cp-f6); font-weight: 650; line-height: 1.5; letter-spacing: 0; text-transform: none; color: var(--cp-lv); }

/* H1 and lede */
body.ma-cp.ma-cp .site-inner h1 {
  margin: 0; max-width: 820px; font-size: 48px; line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-header .lede, .ma-guides .hero-copy .lede, .ma-blog .bhero p, .ma-directory-intro > p) {
  margin: var(--cp-s3) 0 0; max-width: 640px; font-size: var(--cp-f4); line-height: 1.6; color: #2c3a5c; }
@media (max-width: 760px) {
  body.ma-cp.ma-cp .content > .breadcrumb, body.ma-cp.ma-cp .site-inner .ma-practice-breadcrumbs { margin: 24px 0 var(--cp-s2) !important; }
  body.ma-cp.ma-cp .site-inner h1 { font-size: 34px; line-height: 1.12; }
  body.ma-cp.ma-cp .site-inner :is(.ma-practice-header .lede, .ma-guides .hero-copy .lede, .ma-blog .bhero p, .ma-directory-intro > p) { font-size: 17px; }
}
/* the hero's last element reserves the band's slanted foot, so nothing moves when the band arrives
   (content-port.js measures the same elements to size the band) */
body.ma-cp.ma-cp .site-inner :is(.ma-practice-header, .ma-directory-intro, .ma-blog .bhero, .content > .archive-description) { margin-bottom: var(--cp-foot) !important; }
body.ma-cp-post.ma-cp .site-inner :is(.entry > .entry-header:has(h1), .entry-content > h1:first-of-type:not(:has(+ p > em:only-child)):not(:has(+ style + p > em:only-child)), .entry-content > :is(h1:first-of-type + p, h1:first-of-type + style + p):has(> em:only-child)) { margin-bottom: var(--cp-foot) !important; }
body.ma-cp-guide.ma-cp .ma-guides .reading-layout { margin-top: var(--cp-foot) !important; }
body.ma-cp { --cp-foot: calc(var(--cp-cut) * 0.26 + 40px); }
@media (max-width: 760px) { body.ma-cp { --cp-foot: calc(var(--cp-cut) + 32px); } }

/* Hero chips (practice stats, guide directory stats) */
body.ma-cp.ma-cp .site-inner :is(.ma-practice-stats, .ma-directory-stats) { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--cp-s3) 0 0; padding: 0; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-stats, .ma-directory-stats) > span {
  display: inline-block; font-size: var(--cp-f6); font-weight: 600; line-height: 1.5; color: var(--cp-ink); padding: 8px 12px; border-radius: var(--cp-r);
  background: rgba(255,255,255,.75); box-shadow: inset 0 0 0 1px rgba(26,43,72,.12); }

/* ---------- Reading progress ---------- */
.ma-cp-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 1003; pointer-events: none;
  background: linear-gradient(90deg, #55A0F4, #7C65F1 45%, #EC76B0 80%, #FFA36B); transform-origin: 0 50%; transform: scaleX(0); }
body.admin-bar .ma-cp-progress { top: 32px; }
@media (max-width: 782px) { body.admin-bar .ma-cp-progress { top: 46px; } }

/* ---------- Shared: maths, figures, soft details ---------- */
body.ma-cp .site-inner .katex { font-size: 1.12em; }
body.ma-cp .site-inner .katex-display { margin: 14px 0; padding: 6px 2px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; max-width: 100%; }
body.ma-cp .site-inner .katex-display > .katex { white-space: nowrap; }
body.ma-cp .site-inner .katex-display.cp-scrolls { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
body.ma-cp .site-inner .katex-display.cp-scrolls.cp-at-end { -webkit-mask-image: none; mask-image: none; }
body.ma-cp .site-inner :is(p, li) .katex-display:only-child { margin: 0; }
body.ma-cp .site-inner .katex.cp-wide-inline { display: inline-block; max-width: 100%; overflow-x: auto; overflow-y: hidden; vertical-align: bottom; scrollbar-width: thin; }
@media (max-width: 760px) { body.ma-cp .site-inner .katex { font-size: 1.06em; } }
/* phones: display maths a little smaller, and a firmer fade at the right edge while there is more to scroll */
@media (max-width: 480px) {
  body.ma-cp .site-inner .katex-display > .katex { font-size: .98em; }
  body.ma-cp .site-inner .katex-display.cp-scrolls { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), rgba(0,0,0,.12)); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), rgba(0,0,0,.12)); }
  body.ma-cp .site-inner .katex-display.cp-scrolls.cp-at-end { -webkit-mask-image: none; mask-image: none; }
}

/* Tables: post tables sit in a .cp-tscroll box (content-port.js); guide tables in .table-wrap.
   Below 480 px a table of three or more columns keeps a readable width and scrolls sideways in
   its box, with a fade at the right edge until the end. */
body.ma-cp .site-inner .cp-tscroll { max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 1px; }
body.ma-cp-post.ma-cp .entry-content .cp-tscroll > table { display: table; }
@media (max-width: 480px) {
  body.ma-cp .site-inner :is(.cp-tscroll, .ma-guides .table-wrap) > table.cp-cols3 { min-width: 520px; }
  body.ma-cp .site-inner :is(.cp-tscroll, .ma-guides .table-wrap).cp-scrolls { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), rgba(0,0,0,.15)); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), rgba(0,0,0,.15)); }
  body.ma-cp .site-inner :is(.cp-tscroll, .ma-guides .table-wrap).cp-scrolls.cp-at-end { -webkit-mask-image: none; mask-image: none; }
}
body.ma-cp .site-inner img.cp-fade { opacity: 0; transition: opacity .8s ease; }
body.ma-cp .site-inner img.cp-fade.cp-shown { opacity: 1; }

/* ======================================================================
   PRACTICE (hubs, topics, single questions): .ma-practice-shell
   ====================================================================== */
body.ma-cp.ma-cp .site-inner .ma-practice-shell { max-width: none; width: auto; margin: 0; padding: 0; background: none; font-size: var(--cp-f5); line-height: 1.6; }
body.ma-cp.ma-cp .site-inner .ma-practice-shell > .wrap { max-width: none; margin: 0; padding: 0; }
body.ma-cp.ma-cp .site-inner .ma-practice-header { margin: 0; padding: 0; border: 0; background: none; }
body.ma-cp.ma-cp .site-inner .ma-practice-header h1 { max-width: 760px; }
body.ma-cp.ma-cp .site-inner .ma-practice-shell p:empty { display: none; }
body.ma-cp.ma-cp .site-inner .ma-practice-shell a { text-decoration: none; }

/* Level switch */
body.ma-cp.ma-cp .site-inner .ma-practice-levels {
  display: flex; gap: 4px; margin: 0; padding: 4px; border: 0; border-radius: var(--cp-r); background: var(--cp-ground);
  box-shadow: inset 0 0 0 1px var(--cp-line); overflow-x: auto; scrollbar-width: none; }
body.ma-cp .site-inner .ma-practice-levels::-webkit-scrollbar { display: none; }
body.ma-cp.ma-cp .site-inner .ma-practice-levels a {
  flex: 1 0 auto; display: block; min-height: 0; padding: 10px 16px; border: 0; border-radius: var(--cp-r); background: none; text-align: center;
  font-size: var(--cp-f6); font-weight: 600; line-height: 1.5; color: var(--cp-muted) !important; white-space: nowrap; transition: color .25s ease; }
body.ma-cp.ma-cp .site-inner .ma-practice-levels a:hover { color: var(--cp-ink) !important; background: none; }
body.ma-cp.ma-cp .site-inner .ma-practice-levels a[aria-current] { color: #fff !important; background: var(--cp-grad); border: 0; }
@media (max-width: 760px) { body.ma-cp.ma-cp .site-inner .ma-practice-levels a { flex: 1 1 auto; padding: 10px 6px; } }

/* Study guide link strip */
body.ma-cp.ma-cp .site-inner .ma-seo-study-links {
  display: flex; align-items: center; gap: 8px var(--cp-s2); flex-wrap: wrap; max-width: none; margin: var(--cp-s3) 0 0; padding: var(--cp-s2) var(--cp-s3);
  border: 0; border-radius: var(--cp-r); background: linear-gradient(120deg, var(--cp-t-sky), #f6f3ff); font-size: var(--cp-f5); line-height: 1.6; color: var(--cp-body); }
body.ma-cp.ma-cp .site-inner .ma-seo-study-links p { margin: 0; font-size: inherit; color: inherit; }
body.ma-cp.ma-cp .site-inner .ma-seo-study-links strong { color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner .ma-seo-study-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px var(--cp-s2); }
body.ma-cp.ma-cp .site-inner .ma-seo-study-links li { margin: 0; padding: 0; list-style: none; }
body.ma-cp.ma-cp .site-inner .ma-seo-study-links li::before { content: none; }
body.ma-cp.ma-cp .site-inner .ma-seo-study-links a { font-weight: 650; color: var(--cp-ink) !important; text-decoration: underline; text-decoration-color: rgba(91,79,214,.45); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
body.ma-cp.ma-cp .content > .ma-seo-study-links { margin-top: var(--cp-s5); }

/* About this topic (smooth details) */
body.ma-cp.ma-cp .site-inner details.topicabout {
  max-width: none; width: auto; margin: var(--cp-s3) 0 0; padding: 0 var(--cp-s3); border: 0; border-radius: var(--cp-r); background: #fff; box-shadow: inset 0 0 0 1px var(--cp-line); overflow: hidden; }
body.ma-cp.ma-cp .site-inner details.topicabout > summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--cp-s3);
  padding: 18px 0; margin: 0; border: 0; background: none; font-size: var(--cp-f5); font-weight: 600; line-height: 1.5; color: var(--cp-ink); }
body.ma-cp .site-inner details.topicabout > summary::-webkit-details-marker { display: none; }
body.ma-cp.ma-cp .site-inner details.topicabout > summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--cp-soft); border-bottom: 2px solid var(--cp-soft); transform: translateY(-3px) rotate(45deg); transition: transform .4s var(--cp-ease); background: none; position: static; }
body.ma-cp.ma-cp .site-inner details.topicabout[open] > summary::after { transform: translateY(2px) rotate(225deg); }
body.ma-cp.ma-cp .site-inner .topicabout-inner { margin: 0; padding: 0 0 var(--cp-s2); border: 0; background: none; }
body.ma-cp.ma-cp .site-inner .topicabout-inner > p { margin: 0; padding: 0 0 var(--cp-s2); font-size: var(--cp-f5); line-height: 1.7; color: var(--cp-body); }
body.ma-cp.ma-cp .site-inner .topicabout-inner a { color: var(--cp-ink) !important; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(91,79,214,.45); text-underline-offset: 4px; }
body.ma-cp.ma-cp .site-inner .topicabout-inner h2 { margin: var(--cp-s2) 0 var(--cp-s1); font-size: var(--cp-f4); line-height: 1.4; letter-spacing: -0.01em; font-weight: 650; color: var(--cp-ink); text-transform: none; }
body.ma-cp.ma-cp .site-inner .topicabout-inner ul { list-style: none; margin: 0 0 var(--cp-s2); padding: 0; display: grid; gap: 0; }
body.ma-cp.ma-cp .site-inner .topicabout-inner li { margin: 0; padding: 12px 0; border-top: 1px solid var(--cp-line); font-size: var(--cp-f5); line-height: 1.7; color: var(--cp-body); }
body.ma-cp.ma-cp .site-inner .topicabout-inner li::before { content: none; }
body.ma-cp.ma-cp .site-inner .topicabout-inner b { color: var(--cp-ink); font-weight: 650; }

/* Section headings inside practice */
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > h2,
body.ma-cp.ma-cp .site-inner .ma-practice-section-header h2,
body.ma-cp.ma-cp .site-inner .ma-practice-facets h2,
body.ma-cp.ma-cp .site-inner .ma-practice-howto h2 {
  margin: var(--cp-s6) 0 0; font-size: 30px !important; line-height: 1.2; letter-spacing: -0.024em; font-weight: 650; color: var(--cp-ink); text-transform: none; scroll-margin-top: 96px; }
@media (max-width: 760px) {
  body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > h2,
  body.ma-cp.ma-cp .site-inner .ma-practice-section-header h2,
  body.ma-cp.ma-cp .site-inner .ma-practice-facets h2,
  body.ma-cp.ma-cp .site-inner .ma-practice-howto h2 { font-size: 26px !important; margin-top: var(--cp-s5); }
}
body.ma-cp.ma-cp .site-inner .ma-practice-section-header { display: block; margin: 0; }
body.ma-cp.ma-cp .site-inner .ma-practice-section-header p { margin: var(--cp-s1) 0 0; font-size: var(--cp-f5); color: var(--cp-muted); }

/* --- Topic page: question list with the sticky "Jump to a question" rail --- */
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap):has(> .ma-practice-question-jumps) {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: var(--cp-s6); row-gap: 0; grid-auto-flow: row dense; align-items: start; }
body.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap):has(> .ma-practice-question-jumps) > * { grid-column: 1 / -1; min-width: 0; }
body.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap):has(> .ma-practice-question-jumps) > .wrap { display: contents; }
body.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap):has(> .ma-practice-question-jumps) > :is(h2, p, .qblock, .cta, .foot, .related, .scope-note) { grid-column: 2; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .ma-practice-question-jumps {
  grid-column: 1; grid-row-end: span 200; position: sticky; top: 104px; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: var(--cp-s6) 0 0; padding: 0; border: 0; background: none; box-shadow: none; }
body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps > span {
  grid-column: 1 / -1; margin: 0 0 var(--cp-s1); font-size: var(--cp-f6); font-weight: 650; color: var(--cp-ink); line-height: 1.5; }
body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps a {
  height: 40px; min-width: 0; padding: 0; margin: 0; display: grid; place-items: center; border: 0; border-radius: var(--cp-r); background: #fff;
  box-shadow: inset 0 0 0 1px var(--cp-line); font-size: var(--cp-f6); font-weight: 600; line-height: 1; color: var(--cp-ink) !important; font-variant-numeric: tabular-nums;
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease; }
body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps a:hover { box-shadow: inset 0 0 0 1px var(--cp-navy); }
body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps a.cp-seen:not([aria-current]) { background: var(--cp-t-violet); box-shadow: none; }
body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps a[aria-current] { color: #fff !important; background: var(--cp-grad); box-shadow: none; }
@media (max-width: 1024px) {
  body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap):has(> .ma-practice-question-jumps) { grid-template-columns: minmax(0, 1fr); }
  body.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap):has(> .ma-practice-question-jumps) > * { grid-column: 1; }
  body.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap):has(> .ma-practice-question-jumps) > :is(h2, p, .qblock, .cta, .foot, .related, .scope-note) { grid-column: 1; }
  body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .ma-practice-question-jumps {
    grid-column: 1; grid-row-end: auto; top: 72px; z-index: 20; display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none;
    margin: var(--cp-s2) -32px 0; padding: 10px 32px; background: rgba(255,255,255,.94); box-shadow: 0 1px 0 var(--cp-line);
    -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
  body.ma-cp .site-inner .ma-practice-question-jumps::-webkit-scrollbar { display: none; }
  body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps > span { flex: none; align-self: center; margin: 0 4px 0 0; font-size: 13px; white-space: nowrap; }
  body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps a { flex: 0 0 48px; height: 36px; }
}
@media (max-width: 760px) {
  body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .ma-practice-question-jumps { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
}
/* the strip's label stays put at its start while the question numbers scroll under it */
@media (max-width: 1024px) {
  /* sticky offsets count from inside the strip's padding, so the label's box is pulled back over it */
  body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps > span { position: sticky; left: -32px; z-index: 1; align-self: stretch; display: flex; align-items: center;
    margin: 0 2px 0 -32px; padding: 0 8px 0 32px; background: #fff; box-shadow: 10px 0 10px -4px #fff; }
  /* 44 px touch height for the numbers without changing what is drawn: a transparent border
     outside the painted box, taken back by a negative margin (the strip's padding has the room) */
  body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps a { height: 44px; margin: -4px 0; border: 4px solid transparent; border-width: 4px 0; border-radius: 12px / 16px; }
  body.ma-cp.ma-cp.ma-cp.ma-cp .site-inner .ma-practice-question-jumps a:is(*, [aria-current], .cp-seen) { background-clip: padding-box; }
}
@media (max-width: 760px) {
  body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps > span { left: -20px; margin-left: -20px; padding-left: 20px; }
}
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .scope-note { margin: var(--cp-s2) 0 0; font-size: var(--cp-f6); color: var(--cp-muted); }

/* One question */
body.ma-cp.ma-cp .site-inner .qblock { margin: var(--cp-s5) 0 0; padding: 0; border: 0; background: none; box-shadow: none; scroll-margin-top: 96px; }
@media (max-width: 1024px) { body.ma-cp.ma-cp .site-inner .qblock { scroll-margin-top: 140px; } }
body.ma-cp.ma-cp .site-inner .ma-practice-question-jumps + .qblock { margin-top: var(--cp-s4); }
body.ma-cp.ma-cp .site-inner .badges {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin: 0; padding: 0; font-size: var(--cp-f6); line-height: 1.5; color: var(--cp-muted); }
body.ma-cp.ma-cp .site-inner .badges .qnum {
  flex: none; min-width: 44px; height: 32px; padding: 0 10px; margin: 0 14px 0 0; display: inline-grid; place-items: center; border-radius: var(--cp-r);
  font-size: var(--cp-f6); font-weight: 700; color: #fff; background: var(--cp-grad); font-variant-numeric: tabular-nums; }
body.ma-cp.ma-cp .site-inner .badges .badge { padding: 0; margin: 0; border: 0; border-radius: 0; background: none; font-size: var(--cp-f6); font-weight: 400; color: var(--cp-muted); white-space: nowrap; letter-spacing: 0; }
body.ma-cp.ma-cp .site-inner .badges .badge + .badge::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #c3c9d8; margin: 0 10px; vertical-align: middle; }
body.ma-cp.ma-cp .site-inner .badges .badge.school { color: var(--cp-ink); font-weight: 600; }
body.ma-cp.ma-cp .site-inner .badges .badge.cp-diff { color: var(--cp-accent); font-weight: 600; }
@media (max-width: 760px) {
  body.ma-cp.ma-cp .site-inner .badges { gap: 6px 14px; }
  body.ma-cp.ma-cp .site-inner .badges .qnum { margin-right: 0; }
  body.ma-cp.ma-cp .site-inner .badges .badge + .badge::before { display: none; }
}
body.ma-cp.ma-cp .site-inner .qsubtitle { margin: var(--cp-s2) 0 0; font-size: var(--cp-f3); line-height: 1.3; font-weight: 650; letter-spacing: -0.02em; color: var(--cp-ink); text-transform: none; }
body.ma-cp.ma-cp .site-inner .card.q {
  margin: var(--cp-s3) 0 0; padding: var(--cp-s4); border: 0; border-radius: var(--cp-r); background: #fff;
  box-shadow: 0 0 0 1px var(--cp-line), 0 24px 48px -40px rgba(26,43,72,.4); font-size: 17px; line-height: 1.75; color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner .card.q > * { margin-top: 0; margin-bottom: 0; }
body.ma-cp.ma-cp .site-inner .card.q > * + * { margin-top: 14px; }
body.ma-cp.ma-cp .site-inner .card.q p { font-size: inherit; line-height: inherit; color: inherit; }
body.ma-cp.ma-cp .site-inner .qpart { display: flex; gap: 14px; }
body.ma-cp.ma-cp .site-inner .qsub { display: flex; gap: 12px; margin-left: 40px; }
body.ma-cp.ma-cp .site-inner .plabel { flex: 0 0 26px; font-weight: 650; color: var(--cp-accent); }
body.ma-cp.ma-cp .site-inner .qsub .plabel { flex-basis: 30px; }
body.ma-cp.ma-cp .site-inner .pbody { flex: 1 1 auto; min-width: 0; }
body.ma-cp.ma-cp .site-inner .pbody > p { margin: 0; }
body.ma-cp.ma-cp .site-inner .pbody > p + p { margin-top: 8px; }
body.ma-cp.ma-cp .site-inner ol.qparts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: qp; }
body.ma-cp.ma-cp .site-inner ol.qparts[start="2"] { counter-reset: qp 1; }
body.ma-cp.ma-cp .site-inner ol.qparts[start="3"] { counter-reset: qp 2; }
body.ma-cp.ma-cp .site-inner ol.qparts[start="4"] { counter-reset: qp 3; }
body.ma-cp.ma-cp .site-inner ol.qparts[start="5"] { counter-reset: qp 4; }
body.ma-cp.ma-cp .site-inner ol.qparts > li { position: relative; margin: 0; padding-left: 40px; list-style: none; counter-increment: qp; }
body.ma-cp.ma-cp .site-inner ol.qparts > li::before { content: "(" counter(qp, lower-alpha) ")"; position: absolute; left: 0; top: 0; font-weight: 650; color: var(--cp-accent); background: none; width: auto; height: auto; }
body.ma-cp.ma-cp .site-inner ol.qparts > li > p { margin: 0; }
body.ma-cp.ma-cp .site-inner ol.qparts > li > p + p { margin-top: 8px; }
body.ma-cp.ma-cp .site-inner ol.qparts.qparts-lower-roman > li::before { content: "(" counter(qp, lower-roman) ")"; }
@media (max-width: 760px) {
  body.ma-cp.ma-cp .site-inner .card.q { padding: var(--cp-s3) 18px; font-size: 16px; }
  body.ma-cp.ma-cp .site-inner .qsub { margin-left: 24px; }
  body.ma-cp.ma-cp .site-inner ol.qparts > li { padding-left: 34px; }
}
body.ma-cp.ma-cp .site-inner .ma-practice-shell .fig { margin: var(--cp-s3) 0 0; text-align: center; }
body.ma-cp.ma-cp .site-inner .ma-practice-shell .fig img { display: inline-block; width: auto; max-width: min(100%, 520px); height: auto; border: 0; border-radius: var(--cp-r); background: #fff; box-shadow: 0 0 0 1px var(--cp-line); padding: 8px; }
@media (max-width: 760px) { body.ma-cp.ma-cp .site-inner .ma-practice-shell .fig img { padding: 4px; } }
/* "Enlarge diagram" (added by the practice script): a quiet link-style button under the figure */
body.ma-cp.ma-cp .site-inner .ma-practice-shell .ma-practice-enlarge {
  display: block; margin: 10px auto 0; padding: 6px 12px; border: 0; border-radius: var(--cp-r); background: none; box-shadow: none;
  font-family: var(--cp-font); font-size: var(--cp-f6); font-weight: 600; line-height: 1.4; color: var(--cp-muted); cursor: pointer; text-transform: none; letter-spacing: 0; }
body.ma-cp.ma-cp .site-inner .ma-practice-shell .ma-practice-enlarge:hover { color: var(--cp-ink); background: var(--cp-ground); }
body.ma-cp.ma-cp .site-inner .ma-practice-shell .center { text-align: center; }
body.ma-cp.ma-cp .site-inner .ma-practice-shell .center img { display: inline-block; max-width: 100%; height: auto; }
body.ma-cp.ma-cp .site-inner .table-scroll { padding: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.ma-cp.ma-cp .site-inner table.values { width: auto; border-collapse: separate; border-spacing: 0; margin: 0 auto; min-width: 260px; border: 0; border-radius: var(--cp-r); overflow: hidden; box-shadow: 0 0 0 1px var(--cp-line); }
body.ma-cp.ma-cp .site-inner table.values :is(th, td) { padding: 8px 16px; text-align: center; border: 0; border-left: 1px solid var(--cp-line); border-top: 1px solid var(--cp-line); white-space: nowrap; background: #fff; }
body.ma-cp.ma-cp .site-inner table.values tr:first-child > * { border-top: 0; }
body.ma-cp.ma-cp .site-inner table.values tr > :first-child { border-left: 0; }
body.ma-cp.ma-cp .site-inner table.values th { background: var(--cp-t-violet); color: var(--cp-ink); }
@media (max-width: 760px) { body.ma-cp.ma-cp .site-inner table.values :is(th, td) { padding: 7px 9px; } body.ma-cp.ma-cp .site-inner table.values { min-width: 0; } }

/* Worked solution toggle */
body.ma-cp.ma-cp .site-inner :is(.qblock, .ma-practice-single) > details,
body.ma-cp.ma-cp .site-inner .ma-practice-single > .wrap > details { margin: var(--cp-s2) 0 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
body.ma-cp.ma-cp .site-inner :is(.qblock, .ma-practice-single, .ma-practice-single > .wrap) > details > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 12px; width: auto; height: 48px; margin: 0; padding: 0 var(--cp-s3); border: 0; border-radius: var(--cp-r);
  font-family: var(--cp-font); font-size: var(--cp-f5); font-weight: 600; line-height: 1; color: var(--cp-ink); background: #fff; box-shadow: inset 0 0 0 1px #cfd5e3;
  transition: box-shadow .2s ease, background-color .2s ease; user-select: none; }
body.ma-cp .site-inner :is(.qblock, .ma-practice-single, .ma-practice-single > .wrap) > details > summary::-webkit-details-marker { display: none; }
body.ma-cp .site-inner :is(.qblock, .ma-practice-single, .ma-practice-single > .wrap) > details > summary::before,
body.ma-cp .site-inner :is(.qblock, .ma-practice-single, .ma-practice-single > .wrap) > details > summary::after { content: none; }
body.ma-cp.ma-cp .site-inner :is(.qblock, .ma-practice-single, .ma-practice-single > .wrap) > details > summary:hover { box-shadow: inset 0 0 0 1px var(--cp-navy); }
body.ma-cp.ma-cp .site-inner :is(.qblock, .ma-practice-single, .ma-practice-single > .wrap) > details > summary:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 2px; }
body.ma-cp.ma-cp .site-inner :is(.qblock, .ma-practice-single, .ma-practice-single > .wrap) > details[open] > summary { background: var(--cp-t-violet); box-shadow: none; }
body.ma-cp.ma-cp .site-inner details > summary .chev { display: inline-block; font-size: 0; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .4s var(--cp-ease); }
body.ma-cp.ma-cp .site-inner details[open] > summary .chev { transform: translateY(2px) rotate(225deg); }
@media (max-width: 760px) { body.ma-cp.ma-cp .site-inner :is(.qblock, .ma-practice-single, .ma-practice-single > .wrap) > details > summary { display: flex; width: 100%; justify-content: space-between; } }

/* Worked solution panel and its steps */
body.ma-cp.ma-cp .site-inner .soln {
  margin: var(--cp-s2) 0 0; padding: var(--cp-s4) var(--cp-s4) var(--cp-s3); border: 0; border-radius: var(--cp-r); background: linear-gradient(180deg, #f8f7ff, #fbfcfe 120px);
  box-shadow: inset 0 0 0 1px #e6e3fb; font-size: 17px; line-height: 1.75; color: var(--cp-body); overflow: hidden; counter-reset: cpstep; }
body.ma-cp.ma-cp .site-inner .soln p { font-size: inherit; line-height: inherit; }
body.ma-cp.ma-cp .site-inner .soln > p, body.ma-cp.ma-cp .site-inner .cp-step > p { margin: 10px 0 0; }
body.ma-cp.ma-cp .site-inner .soln > :first-child, body.ma-cp.ma-cp .site-inner .cp-step > :first-child { margin-top: 0; }
body.ma-cp.ma-cp .site-inner .soln .step { font-weight: 650; color: var(--cp-ink); line-height: 1.6; margin-top: 0; }
body.ma-cp.ma-cp .site-inner .soln .lead { color: var(--cp-body); }
body.ma-cp.ma-cp .site-inner .soln strong { color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner .cp-step { position: relative; padding: 0 0 var(--cp-s3) 44px; counter-increment: cpstep; }
body.ma-cp.ma-cp .site-inner .cp-step::after { content: counter(cpstep); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; line-height: 1; color: #fff; background: linear-gradient(135deg, var(--cp-violet), var(--cp-accent)); font-variant-numeric: tabular-nums; }
body.ma-cp.ma-cp .site-inner .cp-step::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 4px; width: 2px; background: linear-gradient(180deg, #d9d3ff, rgba(217,211,255,0)); }
body.ma-cp.ma-cp .site-inner .cp-step.cp-last::before { display: none; }
body.ma-cp.ma-cp .site-inner .cp-step[hidden] { display: none; }
body.ma-cp .site-inner .cp-step.cp-arrive { animation: cpstepin .55s var(--cp-ease) both; }
@keyframes cpstepin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
body.ma-cp .site-inner .cp-step > p:first-of-type > strong:first-child { margin-right: 8px; color: var(--cp-accent); }
.cp-stepbar { height: 3px; margin: 0 0 var(--cp-s3); background: #ebe8fb; position: relative; overflow: hidden; }
.cp-stepbar i { position: absolute; inset: 0; background: linear-gradient(90deg, #7C65F1, #EC76B0); transform-origin: 0 50%; transition: transform .5s cubic-bezier(.23,1,.32,1); }
body.ma-cp .cp-stepctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: var(--cp-s2) 0 0 44px; border-top: 1px solid #e6e3fb; }
body.ma-cp .cp-stepctl[hidden] { display: none; }
body.ma-cp .cp-stepctl button { border: 0; cursor: pointer; height: 44px; padding: 0 18px; border-radius: var(--cp-r); font-family: var(--cp-font); font-weight: 600; font-size: var(--cp-f6); line-height: 1; text-transform: none; letter-spacing: 0; transition: background-color .2s ease, box-shadow .2s ease; }
body.ma-cp .cp-stepctl .cp-next { background: var(--cp-navy); color: #fff; }
body.ma-cp .cp-stepctl .cp-next:hover { background: #2a3d66; }
body.ma-cp .cp-stepctl .cp-all { background: transparent; color: var(--cp-ink); box-shadow: inset 0 0 0 1px #cfd5e3; }
body.ma-cp .cp-stepctl .cp-all:hover { box-shadow: inset 0 0 0 1px var(--cp-navy); }
body.ma-cp .cp-stepctl .cp-count { margin-left: auto; font-size: var(--cp-f6); color: var(--cp-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  body.ma-cp.ma-cp .site-inner .soln { padding: var(--cp-s3) 16px var(--cp-s2); font-size: 16px; }
  body.ma-cp.ma-cp .site-inner .cp-step { padding-left: 38px; }
  body.ma-cp.ma-cp .site-inner .cp-step::before { left: 12px; }
  body.ma-cp.ma-cp .site-inner .cp-step::after { width: 26px; height: 26px; font-size: 12px; }
  body.ma-cp.ma-cp .site-inner .cp-step :is(.fig, .center) { margin-left: -38px; }
  body.ma-cp .cp-stepctl { padding-left: 0; }
  body.ma-cp .cp-stepctl .cp-count { flex-basis: 100%; margin-left: 0; order: -1; }
}
body.ma-cp.ma-cp .site-inner .soln :is(.note, .ans, .answer) { border-radius: var(--cp-r); }

/* Answer line, related questions, CTA, foot links */
body.ma-cp.ma-cp .site-inner .ma-practice-shell .ans { margin: var(--cp-s2) 0 0; padding: 14px var(--cp-s3); border: 0; border-radius: var(--cp-r); background: #eef8f2; box-shadow: inset 0 0 0 1px #cfe9da; color: var(--cp-ink); font-size: var(--cp-f5); }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .related { margin: var(--cp-s2) 0 0; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .related :is(ul, ol) { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .related li { margin: 0; padding: 0; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .related a { font-weight: 600; color: var(--cp-ink) !important; text-decoration: underline; text-decoration-color: rgba(91,79,214,.45); text-underline-offset: 4px; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > :is(.cta, .ma-tuition-cta) {
  margin: var(--cp-s6) 0 0; padding: var(--cp-s4); border: 0; border-radius: var(--cp-r); color: rgba(255,255,255,.88); font-size: var(--cp-f4); line-height: 1.6;
  background: radial-gradient(60% 120% at 100% 0%, rgba(236,118,176,.35), rgba(236,118,176,0) 70%), linear-gradient(140deg, var(--cp-navy), var(--cp-indigo) 70%, #4b46b8); box-shadow: none; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .cta a { color: #fff !important; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; text-decoration-color: rgba(255,255,255,.5); }
body.ma-cp.ma-cp .site-inner .ma-tuition-cta { display: flex; justify-content: space-between; align-items: center; gap: var(--cp-s3); flex-wrap: wrap; }
body.ma-cp.ma-cp .site-inner .ma-tuition-cta .ma-tuition-cta-text { margin: 0; color: #fff; font-size: var(--cp-f3); font-weight: 600; letter-spacing: -0.02em; line-height: 1.35; }
body.ma-cp.ma-cp .site-inner .ma-tuition-cta a {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; height: auto; padding: 12px var(--cp-s3); margin: 0; border: 0; border-radius: var(--cp-r);
  background: #fff; color: var(--cp-navy) !important; font-size: var(--cp-f5); font-weight: 600; line-height: 1.3; text-decoration: none; text-align: center; white-space: normal; box-shadow: none; transition: background-color .2s ease; }
body.ma-cp.ma-cp .site-inner .ma-tuition-cta a:hover { background: #eef1fb; transform: none; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .foot {
  display: flex; justify-content: space-between; gap: var(--cp-s2) var(--cp-s4); flex-wrap: wrap; margin: var(--cp-s4) 0 0; padding: var(--cp-s3) 0 0; border: 0; border-top: 1px solid var(--cp-line); background: none; font-size: var(--cp-f6); }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .foot a { font-weight: 600; color: var(--cp-ink) !important; text-decoration: none; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > .foot br { display: none; }
body.ma-cp.ma-cp .site-inner .ma-practice-backlink { margin: var(--cp-s4) 0 0; font-size: var(--cp-f6); }
body.ma-cp.ma-cp .site-inner .ma-practice-backlink a { font-weight: 600; color: var(--cp-ink) !important; }

/* --- Hubs: topic cards (Sec hubs and JC hubs), question cards (JC topic lists) --- */
body.ma-cp.ma-cp .site-inner :is(.ma-practice-topic-grid, .ma-practice-question-list) {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cp-s3); margin: var(--cp-s4) 0 0; padding: 0; }
body.ma-cp.ma-cp .site-inner :is(a.ma-practice-topic-card, .ma-practice-question-card, .ma-practice-topic-grid > a) {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-height: 0; height: auto; margin: 0;
  padding: var(--cp-s4) var(--cp-s3) var(--cp-s3); border: 0; border-radius: var(--cp-r); background: #fff; box-shadow: 0 0 0 1px var(--cp-line);
  color: var(--cp-body) !important; text-decoration: none; text-align: left; overflow: hidden; transform: none; transition: box-shadow .25s ease; }
body.ma-cp.ma-cp .site-inner :is(a.ma-practice-topic-card, .ma-practice-question-card, .ma-practice-topic-grid > a)::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--cp-sky), var(--cp-violet)); }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-topic-grid, .ma-practice-question-list) > :nth-child(4n+2)::before { background: linear-gradient(90deg, var(--cp-violet), var(--cp-pink)); }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-topic-grid, .ma-practice-question-list) > :nth-child(4n+3)::before { background: linear-gradient(90deg, var(--cp-pink), var(--cp-peach)); }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-topic-grid, .ma-practice-question-list) > :nth-child(4n+4)::before { background: linear-gradient(90deg, #2f6fd0, var(--cp-sky)); }
body.ma-cp.ma-cp .site-inner :is(a.ma-practice-topic-card, .ma-practice-question-card, .ma-practice-topic-grid > a):hover { box-shadow: 0 0 0 1px #c9cfe0, 0 18px 40px -28px rgba(26,43,72,.45); transform: none; border: 0; }
body.ma-cp.ma-cp .site-inner .ma-practice-card-top { display: flex; justify-content: space-between; align-items: baseline; width: 100%; margin: 0; }
body.ma-cp.ma-cp .site-inner .ma-practice-card-kind { font-size: var(--cp-f6); font-weight: 600; color: var(--cp-muted); letter-spacing: 0; text-transform: none; }
body.ma-cp.ma-cp .site-inner .ma-practice-card-number {
  font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; opacity: 1;
  background: linear-gradient(100deg, var(--cp-navy), var(--cp-indigo) 45%, var(--cp-violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.ma-cp.ma-cp .site-inner .ma-practice-topic-grid > :nth-child(4n+2) .ma-practice-card-number { background-image: linear-gradient(100deg, var(--cp-navy), #8a3f8f 60%, #c2508e); }
body.ma-cp.ma-cp .site-inner .ma-practice-topic-grid > :nth-child(4n+3) .ma-practice-card-number { background-image: linear-gradient(100deg, var(--cp-navy), #9a4a6a 60%, #d0663f); }
body.ma-cp.ma-cp .site-inner .ma-practice-topic-grid > :nth-child(4n+4) .ma-practice-card-number { background-image: linear-gradient(100deg, var(--cp-navy), #2f5fb8 70%); }
body.ma-cp.ma-cp .site-inner .ma-practice-topic-name { margin: var(--cp-s2) 0 0; font-size: var(--cp-f4); font-weight: 650; line-height: 1.35; color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner a.ma-practice-topic-card:hover .ma-practice-topic-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.ma-cp.ma-cp .site-inner .ma-practice-topic-meta { font-size: var(--cp-f6); line-height: 1.5; color: var(--cp-muted); }
body.ma-cp.ma-cp .site-inner .ma-practice-card-action { margin: auto 0 0; padding: var(--cp-s2) 0 0; font-size: var(--cp-f6); font-weight: 600; color: var(--cp-accent); border: 0; }
@media (max-width: 980px) { body.ma-cp.ma-cp .site-inner :is(.ma-practice-topic-grid, .ma-practice-question-list) { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { body.ma-cp.ma-cp .site-inner :is(.ma-practice-topic-grid, .ma-practice-question-list) { grid-template-columns: 1fr; gap: var(--cp-s2); } }
body.ma-cp .site-inner .cp-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .7s var(--cp-ease); }
body.ma-cp .site-inner .cp-stagger > .cp-on, body.ma-cp .site-inner .cp-stagger.cp-in > * { opacity: 1; transform: none; }

/* JC question cards (topic, school, year lists): the whole card is the link */
body.ma-cp.ma-cp .site-inner .ma-practice-question-card { padding: 0; }
body.ma-cp.ma-cp .site-inner .ma-practice-question-link { display: flex; flex-direction: column; gap: 6px; height: 100%; margin: 0; padding: var(--cp-s4) var(--cp-s3) var(--cp-s3); border: 0; background: none; box-shadow: none; color: var(--cp-body) !important; text-decoration: none; }
body.ma-cp.ma-cp .site-inner .ma-practice-question-number {
  padding: 0; border-radius: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, var(--cp-navy), var(--cp-indigo) 45%, var(--cp-violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.ma-cp.ma-cp .site-inner .ma-practice-question-list > :nth-child(4n+2) .ma-practice-question-number { background-image: linear-gradient(100deg, var(--cp-navy), #8a3f8f 60%, #c2508e); }
body.ma-cp.ma-cp .site-inner .ma-practice-question-list > :nth-child(4n+3) .ma-practice-question-number { background-image: linear-gradient(100deg, var(--cp-navy), #9a4a6a 60%, #d0663f); }
body.ma-cp.ma-cp .site-inner .ma-practice-question-list > :nth-child(4n+4) .ma-practice-question-number { background-image: linear-gradient(100deg, var(--cp-navy), #2f5fb8 70%); }
body.ma-cp.ma-cp .site-inner .ma-practice-question-title { margin: var(--cp-s2) 0 0; font-size: var(--cp-f4) !important; line-height: 1.35; font-weight: 650; letter-spacing: -0.01em; text-transform: none; color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner .ma-practice-question-link:hover .ma-practice-question-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.ma-cp.ma-cp .site-inner .ma-practice-question-focus { margin: 0; font-size: var(--cp-f6); line-height: 1.6; color: var(--cp-body); }
body.ma-cp.ma-cp .site-inner .ma-practice-question-card .ma-practice-question-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; font-size: var(--cp-f6); color: var(--cp-muted); }
body.ma-cp.ma-cp .site-inner .ma-practice-question-card .ma-practice-question-meta > span { padding: 0; border: 0; border-radius: 0; background: none; font-size: var(--cp-f6); color: var(--cp-muted); }
body.ma-cp.ma-cp .site-inner .ma-practice-question-card .ma-practice-question-meta > span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #c3c9d8; margin: 0 10px; vertical-align: middle; }
body.ma-cp.ma-cp .site-inner .ma-practice-question-card .ma-practice-difficulty { color: var(--cp-accent) !important; }

/* JC hub facets and "how to" */
body.ma-cp.ma-cp .site-inner .ma-practice-facets { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--cp-s5); margin: 0; }
body.ma-cp.ma-cp .site-inner .ma-practice-facets h2 { font-size: var(--cp-f3) !important; }
body.ma-cp.ma-cp .site-inner .ma-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--cp-s2) 0 0; }
body.ma-cp.ma-cp .site-inner .ma-chips a { display: inline-block; padding: 8px 12px; border: 0; border-radius: var(--cp-r); background: #fff; box-shadow: inset 0 0 0 1px var(--cp-line); font-size: var(--cp-f6); font-weight: 600; line-height: 1.4; color: var(--cp-ink) !important; text-decoration: none; transition: box-shadow .2s ease; }
body.ma-cp.ma-cp .site-inner .ma-practice-facet-count { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: var(--cp-r); background: var(--cp-t-violet); color: var(--cp-accent); font-size: 12px; font-weight: 650; }
body.ma-cp.ma-cp .site-inner .ma-chips a:hover { box-shadow: inset 0 0 0 1px var(--cp-navy); }
@media (max-width: 760px) { body.ma-cp.ma-cp .site-inner .ma-practice-facets { grid-template-columns: 1fr; } }
body.ma-cp.ma-cp .site-inner .ma-practice-howto { margin: var(--cp-s6) 0 0; padding: var(--cp-s4); border: 0; border-radius: var(--cp-r); background: linear-gradient(150deg, var(--cp-t-sky), #f6f3ff 55%, var(--cp-t-pink)); position: relative; overflow: hidden; }
body.ma-cp.ma-cp .site-inner .ma-practice-howto::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--cp-sky), var(--cp-violet), var(--cp-pink)); }
body.ma-cp.ma-cp .site-inner .ma-practice-howto h2 { margin-top: 0; font-size: var(--cp-f3) !important; }
body.ma-cp.ma-cp .site-inner .ma-practice-howto p { margin: var(--cp-s2) 0 0; font-size: var(--cp-f5); line-height: 1.7; color: var(--cp-body); }
body.ma-cp.ma-cp .site-inner .ma-practice-shell > section { margin: 0; padding: 0; border: 0; background: none; }

/* --- Single question page --- */
body.ma-cp.ma-cp .site-inner :is(.ma-practice-single, .ma-practice-single > .wrap) > * { max-width: 800px; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-single, .ma-practice-single > .wrap) > :is(.ma-practice-breadcrumbs, .ma-practice-header) { max-width: none; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-single, .ma-practice-single > .wrap) > .ma-practice-levels { max-width: 800px; }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-single, .ma-practice-single > .wrap) > .badges { margin-top: var(--cp-s5); }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-single, .ma-practice-single > .wrap) > h2 { margin-top: var(--cp-s5); }
body.ma-cp.ma-cp .site-inner :is(.ma-practice-single, .ma-practice-single > .wrap) > h2 + * { margin-top: var(--cp-s2); }
body.ma-cp.ma-cp .site-inner .ma-practice-single .tests { margin: 0; padding: 0; border: 0; background: none; font-size: var(--cp-f4); line-height: 1.6; color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner .ma-practice-single > .card.q, body.ma-cp.ma-cp .site-inner .ma-practice-single > .wrap > .card.q { margin-top: var(--cp-s2); }
body.ma-cp .site-inner .single-maq_question .entry-header, body.ma-cp.single-maq_question .content .entry-header { display: none; }

/* ======================================================================
   STUDY GUIDE: hero beside its figure, sticky contents rail, prose column
   ====================================================================== */
body.ma-cp-guide .content > .entry { display: grid; grid-template-columns: minmax(0, 1fr) 440px; grid-template-rows: max-content max-content max-content auto; column-gap: var(--cp-s5); align-items: start; }
body.ma-cp-guide .content > .entry > *, body.ma-cp-guide .content > .entry .entry-content > *,
body.ma-cp-guide .ma-guides > *, body.ma-cp-guide .ma-guides .frame > * { grid-column: 1 / -1; }
body.ma-cp-guide .content > .entry > .entry-content,
body.ma-cp-guide .content > .entry .ma-guides,
body.ma-cp-guide .content > .entry .ma-guides > .frame,
body.ma-cp-guide .content > .entry .ma-guides .frame > .hero,
body.ma-cp-guide .content > .entry .ma-guides .hero > .hero-copy { display: contents; }
/* grid placement only (the DOM keeps H1 first): kicker, H1, lede, meta on the left, the figure on the right */
body.ma-cp-guide.ma-cp .ma-guides .hero-copy > .eyebrow { grid-column: 1; grid-row: 1; margin: 0 0 var(--cp-s2); }
body.ma-cp-guide.ma-cp .content > .entry > .entry-header { grid-column: 1; grid-row: 2; margin: 0; padding: 0; border: 0; background: none; }
body.ma-cp-guide.ma-cp .ma-guides .hero-copy > .lede { grid-column: 1; grid-row: 3; margin: var(--cp-s3) 0 0; max-width: 640px; }
body.ma-cp-guide.ma-cp .ma-guides .hero-copy > .meta-row { grid-column: 1; grid-row: 4; margin: var(--cp-s3) 0 0; display: flex; flex-wrap: wrap; gap: 6px 0; font-size: var(--cp-f6); color: #2c3a5c; }
body.ma-cp-guide.ma-cp .ma-guides .hero-copy > .meta-row span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #9aa3bd; margin: 0 12px; vertical-align: middle; }
body.ma-cp-guide.ma-cp .ma-guides .hero > .ma-guide-art { grid-column: 2; grid-row: 1 / span 4; align-self: center; margin: 0; padding: 10px; border: 0; border-radius: var(--cp-r); background: #fff;
  box-shadow: 0 0 0 1px rgba(26,43,72,.08), 0 30px 60px -30px rgba(26,43,72,.45); }
body.ma-cp-guide.ma-cp .ma-guides .ma-guide-art svg { display: block; width: 100%; height: auto; border-radius: 6px; }
body.ma-cp-guide.ma-cp .ma-guides .reading-layout { grid-column: 1 / -1; grid-row: 5; }
@media (max-width: 1024px) {
  body.ma-cp-guide .content > .entry { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  body.ma-cp-guide.ma-cp .ma-guides .hero > .ma-guide-art { grid-column: 1; grid-row: 5; max-width: 520px; margin-top: var(--cp-s4); }
  body.ma-cp-guide.ma-cp .ma-guides .reading-layout { grid-row: 6; }
}
@media (max-width: 760px) {
  body.ma-cp-guide.ma-cp .ma-guides .hero-copy > .meta-row { gap: 4px 16px; }
  body.ma-cp-guide.ma-cp .ma-guides .hero-copy > .meta-row span + span::before { display: none; }
}

body.ma-cp.ma-cp .site-inner .ma-guides { font-size: 17px; line-height: 1.75; color: var(--cp-body); }
body.ma-cp.ma-cp .site-inner .ma-guides .reading-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--cp-s6); align-items: start; margin: 0; padding: 0; border: 0; }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents {
  position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow: auto; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; font-size: var(--cp-f6); scrollbar-width: thin; }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents details { margin: 0; padding: 0; border: 0; background: none; }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents summary { display: block; list-style: none; cursor: default; margin: 0 0 var(--cp-s2); padding: 0; }
body.ma-cp .site-inner .ma-guides aside.contents summary::-webkit-details-marker { display: none; }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents summary h2 { margin: 0; font-size: var(--cp-f6) !important; line-height: 1.4; letter-spacing: 0; font-weight: 650; color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents ol { list-style: none; margin: 0; padding: 0 0 0 14px; position: relative; display: grid; gap: 2px; }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents ol::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--cp-line); }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents li { margin: 0; padding: 0; }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents li::before { content: none; }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents a { display: block; padding: 6px 0; color: var(--cp-muted) !important; text-decoration: none; line-height: 1.4; font-weight: 400; transition: color .25s ease; border: 0; background: none; }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents a:hover { color: var(--cp-ink) !important; }
body.ma-cp.ma-cp .site-inner .ma-guides aside.contents a[aria-current] { color: var(--cp-ink) !important; font-weight: 600; }
.cp-toc-marker { position: absolute; left: 0; top: 0; width: 2px; height: 24px; background: linear-gradient(180deg, #7C65F1, #EC76B0); transform: translateY(0); opacity: 0;
  transition: transform .45s cubic-bezier(.23,1,.32,1), height .45s cubic-bezier(.23,1,.32,1), opacity .3s ease; }
.cp-toc-marker.on { opacity: 1; }
@media (max-width: 1024px) {
  body.ma-cp.ma-cp .site-inner .ma-guides .reading-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  body.ma-cp.ma-cp .site-inner .ma-guides aside.contents { position: static; max-height: none; overflow: visible; margin: 0 0 var(--cp-s4); padding: 0 var(--cp-s3); border-radius: var(--cp-r); background: var(--cp-ground); box-shadow: inset 0 0 0 1px var(--cp-line); }
  body.ma-cp.ma-cp .site-inner .ma-guides aside.contents summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin: 0; padding: var(--cp-s2) 0; }
  body.ma-cp.ma-cp .site-inner .ma-guides aside.contents summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--cp-soft); border-bottom: 2px solid var(--cp-soft); transform: translateY(-3px) rotate(45deg); transition: transform .4s var(--cp-ease); }
  body.ma-cp.ma-cp .site-inner .ma-guides aside.contents details[open] summary::after { transform: translateY(2px) rotate(225deg); }
  body.ma-cp.ma-cp .site-inner .ma-guides aside.contents ol { padding: 0 0 var(--cp-s2); gap: 0; }
  body.ma-cp.ma-cp .site-inner .ma-guides aside.contents ol::before { display: none; }
  body.ma-cp.ma-cp .site-inner .ma-guides aside.contents a { padding: 9px 0; color: var(--cp-ink) !important; border-top: 1px solid var(--cp-line); }
  .cp-toc-marker { display: none; }
}

/* Guide prose */
body.ma-cp.ma-cp .site-inner .ma-guides .chapter { max-width: 720px; min-width: 0; margin: 0; padding: 0; }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter > * + * { margin-top: var(--cp-s5); }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter > .section + .section,
body.ma-cp.ma-cp .site-inner .ma-guides .chapter > .visual + .section { margin-top: var(--cp-s7); }
body.ma-cp.ma-cp .site-inner .ma-guides .section { margin-bottom: 0; padding: 0; border: 0; scroll-margin-top: 96px; }
body.ma-cp.ma-cp .site-inner .ma-guides .section > * { margin-top: 0; margin-bottom: 0; }
body.ma-cp.ma-cp .site-inner .ma-guides .section > * + * { margin-top: var(--cp-s3); }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter h2 { margin: 0; font-size: 30px !important; line-height: 1.2; letter-spacing: -0.024em; font-weight: 650; color: var(--cp-ink); scroll-margin-top: 96px; }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter h3 { margin: 0; font-size: var(--cp-f4) !important; line-height: 1.4; letter-spacing: -0.01em; font-weight: 650; color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter p { margin: 0; font-size: 17px; line-height: 1.75; color: var(--cp-body); }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter * + :is(p, ul, ol, figure, .table-wrap, .katex-display, details, h3, h4, div, article, aside, section) { margin-top: var(--cp-s3); }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter :is(.worked-example, .concept, .warning, .practice-question, .interactive) * + :is(p, ul, ol, div, h3, h4) { margin-top: 12px; }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter strong { color: var(--cp-ink); font-weight: 650; }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter a { color: var(--cp-ink) !important; font-weight: 550; text-decoration: underline; text-decoration-color: rgba(91,79,214,.45); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: text-decoration-color .2s ease; }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter a:hover { text-decoration-color: var(--cp-accent); }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter :is(ul, ol):not(.cp-plain) { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
body.ma-cp.ma-cp .site-inner :is(.ma-guides .chapter, .entry-content) li { min-width: 0; }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter ul > li { position: relative; margin: 0; padding-left: 26px; font-size: 17px; line-height: 1.75; color: var(--cp-body); }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter ul > li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--cp-sky), var(--cp-violet)); }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter ol { counter-reset: cpn; }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter ol > li { counter-increment: cpn; position: relative; margin: 0; padding-left: 48px; min-height: 32px; font-size: 17px; line-height: 1.75; color: var(--cp-body); }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter ol > li::before { content: counter(cpn); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: var(--cp-r); display: grid; place-items: center;
  font-size: var(--cp-f6); font-weight: 700; color: var(--cp-accent); background: var(--cp-t-violet); font-variant-numeric: tabular-nums; }
body.ma-cp.ma-cp .site-inner .ma-guides .worked-example { margin: 0; padding: var(--cp-s4); border: 0; box-shadow: none; border-radius: var(--cp-r); position: relative; overflow: hidden; background: linear-gradient(160deg, #eaf2ff, #f6f9ff 60%); }
body.ma-cp.ma-cp .site-inner .ma-guides .worked-example:nth-of-type(3n+2) { background: linear-gradient(160deg, #efebff, #f8f6ff 60%); }
body.ma-cp.ma-cp .site-inner .ma-guides .worked-example:nth-of-type(3n+3) { background: linear-gradient(160deg, #fde8f1, #fff6fa 60%); }
body.ma-cp.ma-cp .site-inner .ma-guides .worked-example > * { margin-top: 0; margin-bottom: 0; }
body.ma-cp.ma-cp .site-inner .ma-guides .worked-example > * + * { margin-top: 12px; }
body.ma-cp.ma-cp .site-inner .ma-guides .worked-example :is(h3, h4) { padding: 0; border: 0; box-shadow: none; background: none; }
body.ma-cp.ma-cp .site-inner .ma-guides .practice-question { margin: 0; padding: var(--cp-s3) 0 0; border: 0; border-top: 1px solid var(--cp-line); }
body.ma-cp.ma-cp .site-inner .ma-guides .practice-question > * + * { margin-top: 12px; }
body.ma-cp.ma-cp .site-inner .ma-guides :is(.concept, .warning) { margin: 0; padding: var(--cp-s3); border: 0; border-radius: var(--cp-r); background: linear-gradient(150deg, var(--cp-t-sky), #f6f3ff 60%); position: relative; overflow: hidden; }
body.ma-cp.ma-cp .site-inner .ma-guides :is(.concept, .warning)::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--cp-sky), var(--cp-violet)); }
body.ma-cp.ma-cp .site-inner .ma-guides .warning { background: linear-gradient(150deg, #fff4ea, #fff9f4 60%); }
body.ma-cp.ma-cp .site-inner .ma-guides .warning::before { background: linear-gradient(180deg, var(--cp-peach), var(--cp-pink)); }
body.ma-cp.ma-cp .site-inner .ma-guides :is(.concept, .warning) > * + * { margin-top: 12px; }
body.ma-cp.ma-cp .site-inner .ma-guides details:not(.cp-skip) { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--cp-line); }
body.ma-cp.ma-cp .site-inner .ma-guides .chapter details > summary { padding: var(--cp-s2) 0; font-weight: 600; color: var(--cp-ink); cursor: pointer; }
body.ma-cp.ma-cp .site-inner .ma-guides .visual { margin: var(--cp-s4) 0 0; }
body.ma-cp.ma-cp .site-inner .ma-guides .visual .diagram-scroll { border-radius: var(--cp-r); overflow-x: auto; background: #fff; box-shadow: 0 0 0 1px var(--cp-line); padding: 8px; }
body.ma-cp.ma-cp .site-inner .ma-guides .visual svg { display: block; width: 100%; height: auto; }
body.ma-cp.ma-cp .site-inner .ma-guides .visual figcaption { margin-top: 10px; font-size: var(--cp-f6); color: var(--cp-muted); line-height: 1.55; }
@media (max-width: 760px) { body.ma-cp.ma-cp .site-inner .ma-guides .visual .diagram-scroll { padding: 4px; } body.ma-cp.ma-cp .site-inner .ma-guides .worked-example { padding: var(--cp-s3) 18px; } }
body.ma-cp.ma-cp .site-inner .ma-guides .table-wrap { margin: 0; overflow-x: auto; border: 0; border-radius: var(--cp-r); box-shadow: 0 0 0 1px var(--cp-line); }
body.ma-cp.ma-cp .site-inner .ma-guides .table-wrap table { width: 100%; margin: 0; border-collapse: collapse; border: 0; font-size: var(--cp-f5); line-height: 1.6; }
body.ma-cp.ma-cp .site-inner .ma-guides .table-wrap caption { caption-side: top; text-align: left; margin: 0; padding: 14px 18px; font-weight: 650; color: var(--cp-ink); background: var(--cp-t-violet); }
body.ma-cp.ma-cp .site-inner .ma-guides .table-wrap th { text-align: left; font-size: var(--cp-f6); color: var(--cp-muted); font-weight: 600; padding: 10px 18px; border: 0; border-bottom: 1px solid var(--cp-line); background: #fbfbfe; }
body.ma-cp.ma-cp .site-inner .ma-guides .table-wrap td { padding: 12px 18px; border: 0; border-top: 1px solid var(--cp-line); vertical-align: top; background: none; }
body.ma-cp.ma-cp .site-inner .ma-guides .interactive { margin: 0; padding: var(--cp-s3); border: 0; border-radius: var(--cp-r); background: linear-gradient(150deg, var(--cp-t-sky), #f6f3ff 60%, var(--cp-t-pink)); }
body.ma-cp.ma-cp .site-inner .ma-guides .interactive input[type=range] { width: 100%; accent-color: var(--cp-accent); }
body.ma-cp.ma-cp .site-inner .ma-guides .interactive :is(button, select) { border-radius: var(--cp-r); border: 0; box-shadow: inset 0 0 0 1px #cfd5e3; padding: 8px 14px; font-weight: 600; }
body.ma-cp.ma-cp .site-inner .ma-guides .interactive button[aria-pressed="true"] { background: var(--cp-grad); color: #fff; box-shadow: none; }
body.ma-cp.ma-cp .site-inner .ma-guides .related-guides { padding: var(--cp-s4); border-radius: var(--cp-r); background: var(--cp-ground); box-shadow: inset 0 0 0 1px var(--cp-line); }

/* ======================================================================
   STUDY GUIDE DIRECTORY (/study-guides/)
   ====================================================================== */
body.ma-cp-guides.ma-cp .content > .entry > .entry-header { margin: 0; padding: 0; border: 0; background: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-directory { font-size: var(--cp-f5); line-height: 1.6; color: var(--cp-body); }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-intro { margin: 0; padding: 0; border: 0; background: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-levels { display: flex; gap: 4px; margin: 0; padding: 4px; border: 0; border-radius: var(--cp-r); background: var(--cp-ground); box-shadow: inset 0 0 0 1px var(--cp-line); overflow-x: auto; scrollbar-width: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-levels a { flex: 1 0 auto; padding: 10px 16px; border: 0; border-radius: var(--cp-r); background: none; box-shadow: none; text-align: center; font-size: var(--cp-f6); font-weight: 600; color: var(--cp-ink) !important; text-decoration: none; white-space: nowrap; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-levels a:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--cp-line); transform: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-levels a * { color: inherit; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-search { margin: var(--cp-s4) 0 0; padding: 0; border: 0; background: none; box-shadow: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-search label { display: block; margin: 0 0 var(--cp-s1); font-size: var(--cp-f6); font-weight: 650; color: var(--cp-ink); }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-search-row { display: flex; gap: 8px; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-search input { flex: 1; min-width: 0; height: 48px; padding: 0 var(--cp-s2); border: 0; border-radius: var(--cp-r); background: #fff; box-shadow: inset 0 0 0 1px #cfd5e3; font: inherit; font-size: var(--cp-f5); color: var(--cp-ink); }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-search input:focus { outline: 2px solid var(--cp-accent); outline-offset: 1px; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-search button, body.ma-cp-guides.ma-cp .site-inner .ma-guide-empty button { height: 48px; padding: 0 var(--cp-s3); border: 0; border-radius: var(--cp-r); background: var(--cp-navy); color: #fff; font: inherit; font-size: var(--cp-f6); font-weight: 600; cursor: pointer; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-search-hint, body.ma-cp-guides.ma-cp .site-inner .ma-guide-results { margin: var(--cp-s1) 0 0; font-size: var(--cp-f6); color: var(--cp-muted); }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-collection { margin: var(--cp-s6) 0 0; padding: 0; border: 0; background: none; scroll-margin-top: 96px; }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-section-head { display: flex; justify-content: space-between; align-items: end; gap: var(--cp-s2) var(--cp-s4); flex-wrap: wrap; margin: 0; padding: 0; border: 0; background: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-section-head h2 { margin: 0; font-size: 30px !important; line-height: 1.2; letter-spacing: -0.024em; font-weight: 650; }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-section-head p { margin: var(--cp-s1) 0 0; font-size: var(--cp-f5); color: var(--cp-muted); }
body.ma-cp-guides.ma-cp .site-inner :is(.ma-directory-bank-links, .ma-seo-guide-tuition) a { font-size: var(--cp-f6); font-weight: 600; color: var(--cp-ink) !important; text-decoration: underline; text-decoration-color: rgba(91,79,214,.45); text-underline-offset: 4px; }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-bank-links { display: flex; gap: var(--cp-s2); flex-wrap: wrap; }
body.ma-cp-guides.ma-cp .site-inner .ma-seo-guide-tuition { margin: var(--cp-s2) 0 0; font-size: var(--cp-f6); }
/* level colours per collection (a colour always means a level) */
body.ma-cp-guides .ma-directory-collection { --cp-l1: var(--cp-violet); --cp-l2: var(--cp-pink); }
body.ma-cp-guides .ma-directory-collection:has(#guides-sec1) { --cp-l1: #1597A6; --cp-l2: #3CC1C9; }
body.ma-cp-guides .ma-directory-collection:has(#guides-sec2) { --cp-l1: #2E9E6B; --cp-l2: #5CC596; }
body.ma-cp-guides .ma-directory-collection:has(#guides-amaths) { --cp-l1: #2F6FEB; --cp-l2: #5B9BFF; }
body.ma-cp-guides .ma-directory-collection:has(#guides-jc) { --cp-l1: #6D5BD0; --cp-l2: #8E7CF0; }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-section-head .ma-directory-kicker { margin: 0 0 var(--cp-s1); font-size: var(--cp-f6); font-weight: 650; color: var(--cp-l1); letter-spacing: 0; text-transform: none; }
body.ma-cp-guides.ma-cp .site-inner ul.ma-directory-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cp-s3); margin: var(--cp-s4) 0 0; padding: 0; }
body.ma-cp-guides.ma-cp .site-inner li.ma-directory-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: var(--cp-s4) var(--cp-s3) var(--cp-s3); border: 0; border-radius: var(--cp-r); background: #fff;
  box-shadow: 0 0 0 1px var(--cp-line); color: var(--cp-body); overflow: hidden; transform: none; transition: box-shadow .25s ease; list-style: none; }
body.ma-cp-guides.ma-cp .site-inner li.ma-directory-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--cp-l1), var(--cp-l2)); }
body.ma-cp-guides.ma-cp .site-inner li.ma-directory-card:hover { box-shadow: 0 0 0 1px #c9cfe0, 0 18px 40px -28px rgba(26,43,72,.45); transform: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-card-top { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-card-top::before { content: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-card-top > span:first-child { font-size: var(--cp-f6); font-weight: 600; color: var(--cp-muted); letter-spacing: 0; text-transform: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-card-top > span + span { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, var(--cp-navy), var(--cp-l1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.ma-cp-guides.ma-cp .site-inner li.ma-directory-card h3 { margin: var(--cp-s2) 0 0; font-size: var(--cp-f4) !important; line-height: 1.35; font-weight: 650; letter-spacing: -0.01em; }
body.ma-cp-guides.ma-cp .site-inner li.ma-directory-card h3 a { color: var(--cp-ink) !important; text-decoration: none; }
body.ma-cp-guides.ma-cp .site-inner li.ma-directory-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-summary { margin: 0; font-size: var(--cp-f6); line-height: 1.6; color: var(--cp-body); }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-meta { margin: 0; font-size: var(--cp-f6); color: var(--cp-muted); }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-section-label { margin: var(--cp-s2) 0 0; padding-top: var(--cp-s2); border-top: 1px solid var(--cp-line); font-size: var(--cp-f6); font-weight: 650; color: var(--cp-ink); letter-spacing: 0; text-transform: none; }
body.ma-cp-guides.ma-cp .site-inner ul.ma-directory-subtopics { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
body.ma-cp-guides.ma-cp .site-inner ul.ma-directory-subtopics li { margin: 0; padding: 0; list-style: none; }
body.ma-cp-guides.ma-cp .site-inner ul.ma-directory-subtopics li::before { content: none; }
body.ma-cp-guides.ma-cp .site-inner ul.ma-directory-subtopics a { display: block; padding: 6px 0; font-size: var(--cp-f6); line-height: 1.45; font-weight: 400; color: var(--cp-body) !important; text-decoration: none; border: 0; background: none; }
body.ma-cp-guides.ma-cp .site-inner ul.ma-directory-subtopics a:hover { color: var(--cp-ink) !important; text-decoration: underline; text-underline-offset: 3px; }
body.ma-cp-guides.ma-cp .site-inner details.ma-directory-more { margin: 0; padding: 0; border: 0; background: none; }
body.ma-cp-guides.ma-cp .site-inner details.ma-directory-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; font-size: var(--cp-f6); font-weight: 600; color: var(--cp-ink); }
body.ma-cp-guides.ma-cp .site-inner details.ma-directory-more > summary::-webkit-details-marker { display: none; }
body.ma-cp-guides.ma-cp .site-inner details.ma-directory-more > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--cp-soft); border-bottom: 2px solid var(--cp-soft); transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--cp-ease); }
body.ma-cp-guides.ma-cp .site-inner details.ma-directory-more[open] > summary::after { transform: translateY(1px) rotate(225deg); }
body.ma-cp-guides.ma-cp .site-inner details.ma-directory-more > summary span { color: var(--cp-muted); font-weight: 400; }
body.ma-cp-guides.ma-cp .site-inner a.ma-directory-read {
  display: block; margin: auto 0 0; padding: var(--cp-s2) 0 0; border: 0; border-radius: 0; background: none; box-shadow: none; text-align: left;
  font-size: var(--cp-f6); font-weight: 600; color: var(--cp-accent) !important; text-decoration: none; }
body.ma-cp-guides.ma-cp .site-inner a.ma-directory-read::before { content: none; }
body.ma-cp-guides.ma-cp .site-inner a.ma-directory-read:hover { text-decoration: underline; text-underline-offset: 3px; }
/* level tabs: name over a small count; the current tab fills */
body.ma-cp-guides.ma-cp .site-inner .ma-guide-levels a { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.3; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-levels a strong { font-size: var(--cp-f6); font-weight: 650; color: inherit; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-levels a span { font-size: 12px; font-weight: 500; color: var(--cp-muted); }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-levels a[aria-current] { color: #fff !important; background: var(--cp-grad); box-shadow: none; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-levels a[aria-current] span { color: rgba(255,255,255,.75); }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-empty:not([hidden]) { margin: var(--cp-s4) 0 0; padding: var(--cp-s4); border-radius: var(--cp-r); background: var(--cp-ground); box-shadow: inset 0 0 0 1px var(--cp-line); }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-empty h2 { margin: 0; font-size: var(--cp-f3) !important; }
body.ma-cp-guides.ma-cp .site-inner .ma-guide-empty p { margin: var(--cp-s1) 0 var(--cp-s2); }
body.ma-cp-guides.ma-cp .site-inner .ma-directory-back { display: inline-block; margin: var(--cp-s3) 0 0; font-size: var(--cp-f6); font-weight: 600; color: var(--cp-muted) !important; text-decoration: none; }
@media (max-width: 980px) { body.ma-cp-guides.ma-cp .site-inner ul.ma-directory-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { body.ma-cp-guides.ma-cp .site-inner .ma-guide-levels a { flex: 1 0 auto; padding: 10px 12px; } body.ma-cp-guides.ma-cp .site-inner .ma-directory-section-head h2 { font-size: 26px !important; } }
@media (max-width: 640px) { body.ma-cp-guides.ma-cp .site-inner ul.ma-directory-grid { grid-template-columns: 1fr; gap: var(--cp-s2); } }

/* ======================================================================
   BLOG POST: reading hero, prose column, takeaways, FAQ, related articles
   ====================================================================== */
body.ma-cp-post.ma-cp .content > .entry > .entry-header { margin: 0; padding: 0; border: 0; background: none; }
body.ma-cp-post.ma-cp .content > .entry > .entry-header .entry-meta { margin: 0 0 var(--cp-s2); padding: 0; border: 0; background: none; font-size: var(--cp-f6); line-height: 1.5; color: var(--cp-muted); text-transform: none; letter-spacing: 0; }
body.ma-cp-post.ma-cp .content > .entry > .entry-header .entry-meta a { color: var(--cp-lv) !important; font-weight: 650; text-decoration: none; text-transform: none; }
/* one centred reading column (the hero sits on the same column); related articles widen back out */
body.ma-cp-post.ma-cp .content { max-width: 760px; margin-left: auto; margin-right: auto; }
body.ma-cp-post.ma-cp .site-inner .ma-related { width: min(1116px, calc(100vw - 64px)); left: 50%; transform: translateX(-50%); }
@media (max-width: 760px) { body.ma-cp-post.ma-cp .site-inner .ma-related { width: calc(100vw - 40px); } }
body.ma-cp-post.ma-cp .content > .entry .entry-content { font-size: 17px; line-height: 1.75; color: var(--cp-body); }
body.ma-cp-post.ma-cp .entry-content > * { margin-top: 0; margin-bottom: 0; }
body.ma-cp-post.ma-cp .entry-content > * + * { margin-top: 20px; }
body.ma-cp-post.ma-cp .entry-content p { font-size: 17px; line-height: 1.75; color: var(--cp-body); }
body.ma-cp-post.ma-cp .entry-content > :is(h1:first-of-type + p, h1:first-of-type + style + p):has(> em:only-child) { margin-top: var(--cp-s3) !important; font-size: var(--cp-f6) !important; line-height: 1.6; color: #2c3a5c !important; }
body.ma-cp-post.ma-cp .entry-content > :is(h1:first-of-type + p, h1:first-of-type + style + p):has(> em:only-child) em { font-style: normal; }
body.ma-cp-post.ma-cp .entry-content h2 { margin-top: var(--cp-s6); font-size: 30px !important; line-height: 1.2 !important; letter-spacing: -0.024em; font-weight: 650 !important; scroll-margin-top: 96px; }
body.ma-cp-post.ma-cp .entry-content h2 + * { margin-top: var(--cp-s2); }
body.ma-cp-post.ma-cp .entry-content h3 { margin-top: var(--cp-s5); font-size: var(--cp-f3) !important; line-height: 1.3 !important; font-weight: 650 !important; scroll-margin-top: 96px; }
body.ma-cp-post.ma-cp .entry-content h3 + * { margin-top: 12px; }
body.ma-cp-post.ma-cp .entry-content h4 { margin-top: var(--cp-s4); font-size: var(--cp-f4) !important; font-weight: 650; }
body.ma-cp-post.ma-cp .entry-content a { color: var(--cp-ink) !important; font-weight: 550; text-decoration: underline; text-decoration-color: rgba(91,79,214,.45); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: text-decoration-color .2s ease; }
body.ma-cp-post.ma-cp .entry-content a:hover { text-decoration-color: var(--cp-accent); }
body.ma-cp-post.ma-cp .entry-content strong { color: var(--cp-ink); font-weight: 650; }
body.ma-cp-post.ma-cp .entry-content :is(ul, ol) { margin-left: 0; margin-right: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
body.ma-cp-post.ma-cp .entry-content li { position: relative; margin: 0; list-style: none; font-size: 17px; line-height: 1.75; color: var(--cp-body); }
body.ma-cp-post.ma-cp .entry-content ul > li { padding-left: 26px; }
body.ma-cp-post.ma-cp .entry-content ul > li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--cp-sky), var(--cp-violet)); }
body.ma-cp-post.ma-cp .entry-content ol { counter-reset: cpn; }
body.ma-cp-post.ma-cp .entry-content ol > li { counter-increment: cpn; padding-left: 48px; min-height: 32px; }
body.ma-cp-post.ma-cp .entry-content ol > li::before { content: counter(cpn); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: var(--cp-r); display: grid; place-items: center;
  font-size: var(--cp-f6); font-weight: 700; color: var(--cp-accent); background: var(--cp-t-violet); font-variant-numeric: tabular-nums; }
body.ma-cp-post.ma-cp .entry-content :is(figure, .wp-block-image) { margin-left: 0; margin-right: 0; }
body.ma-cp-post.ma-cp .entry-content img { max-width: 100%; height: auto; border-radius: var(--cp-r); }
body.ma-cp-post.ma-cp .entry-content figcaption { margin-top: 10px; font-size: var(--cp-f6); color: var(--cp-muted); }
body.ma-cp-post.ma-cp .entry-content table { width: 100%; border-collapse: collapse; border: 0; font-size: var(--cp-f5); border-radius: var(--cp-r); overflow: hidden; box-shadow: 0 0 0 1px var(--cp-line); }
body.ma-cp-post.ma-cp .entry-content :is(th, td) { padding: 10px 14px; border: 0; border-top: 1px solid var(--cp-line); text-align: left; vertical-align: top; }
body.ma-cp-post.ma-cp .entry-content th { background: var(--cp-t-violet); color: var(--cp-ink); font-weight: 650; border-top: 0; }
@media (max-width: 760px) { body.ma-cp-post.ma-cp .entry-content table { display: block; overflow-x: auto; } }
/* Key takeaways box (inline-styled div on the live posts) */
body.ma-cp-post.ma-cp .entry-content > div:has(> strong:first-child + ul) {
  position: relative; overflow: hidden; margin: var(--cp-s4) 0 0 !important; padding: var(--cp-s4) !important; border: 0 !important; border-radius: var(--cp-r) !important;
  background: linear-gradient(150deg, var(--cp-t-sky), #f6f3ff 55%, var(--cp-t-pink)) !important; }
body.ma-cp-post.ma-cp .entry-content > div:has(> strong:first-child + ul)::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--cp-sky), var(--cp-violet), var(--cp-pink)); }
body.ma-cp-post.ma-cp .entry-content > div:has(> strong:first-child + ul) > strong:first-child { display: block; font-size: var(--cp-f4); color: var(--cp-ink) !important; }
body.ma-cp-post.ma-cp .entry-content > div:has(> strong:first-child + ul) > ul { margin: var(--cp-s2) 0 0 !important; padding: 0 !important; gap: 10px; }
body.ma-cp-post.ma-cp .entry-content > div:has(> strong:first-child + ul) li { font-size: var(--cp-f5); }
body.ma-cp-post.ma-cp .entry-content > div:has(> strong:first-child + ul) li::before { background: var(--cp-violet); }
/* FAQ: the A2 smooth details */
body.ma-cp-post.ma-cp .entry-content > details { margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--cp-line); border-radius: 0; background: none; box-shadow: none; }
body.ma-cp-post.ma-cp .entry-content > h2 + details, body.ma-cp-post.ma-cp .entry-content > :not(details) + details { margin-top: var(--cp-s2); border-top: 1px solid var(--cp-line); }
body.ma-cp-post.ma-cp .entry-content > details + details { margin-top: 0; }
body.ma-cp-post.ma-cp .entry-content > details > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--cp-s3); margin: 0; padding: var(--cp-s2) 0; border: 0; background: none;
  font-size: var(--cp-f4); font-weight: 600; line-height: 1.45; color: var(--cp-ink) !important; }
body.ma-cp-post.ma-cp .entry-content > details > summary::-webkit-details-marker { display: none; }
body.ma-cp-post.ma-cp .entry-content > details > summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--cp-soft); border-bottom: 2px solid var(--cp-soft); transform: translateY(-3px) rotate(45deg); transition: transform .4s var(--cp-ease); }
body.ma-cp-post.ma-cp .entry-content > details[open] > summary::after { transform: translateY(2px) rotate(225deg); }
body.ma-cp-post.ma-cp .entry-content > details > :not(summary) { padding-bottom: var(--cp-s3); }
body.ma-cp-post.ma-cp .entry-content > details p { margin: 0; font-size: var(--cp-f5); line-height: 1.7; }
body.ma-cp-post.ma-cp .entry-content > details p + p { margin-top: 12px; }
/* Filed under */
body.ma-cp-post.ma-cp .content > .entry > .entry-footer { margin: var(--cp-s5) 0 0; padding: var(--cp-s3) 0 0; border: 0; border-top: 1px solid var(--cp-line); background: none; }
body.ma-cp-post.ma-cp .content > .entry > .entry-footer .entry-meta { margin: 0; padding: 0; border: 0; font-size: var(--cp-f6); color: var(--cp-muted); text-transform: none; letter-spacing: 0; }
body.ma-cp-post.ma-cp .content > .entry > .entry-footer a { font-weight: 600; color: var(--cp-ink) !important; text-decoration: underline; text-decoration-color: rgba(91,79,214,.45); text-underline-offset: 4px; }
/* Related articles */
body.ma-cp.ma-cp .site-inner .ma-related { position: relative; margin: var(--cp-s7) 0 0; padding: 0; border: 0 !important; background: none; max-width: none; }
body.ma-cp.ma-cp .site-inner .ma-related::before { content: ""; position: absolute; z-index: -1; left: 50%; width: 100vw; transform: translateX(-50%); top: calc(-1 * var(--cp-s6)); bottom: calc(-1 * var(--cp-s7)); background: linear-gradient(180deg, #fff, var(--cp-ground) 30%); }
body.ma-cp.ma-cp .site-inner .ma-related .ma-related-h { margin: 0; font-size: 30px !important; line-height: 1.2; letter-spacing: -0.024em; font-weight: 650; text-transform: none; color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner .ma-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cp-s3); margin: var(--cp-s4) 0 0; }
body.ma-cp.ma-cp .site-inner :is(.ma-rcard, .bcard) {
  display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; border-radius: var(--cp-r); overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--cp-line);
  color: inherit !important; text-decoration: none !important; transform: none; transition: box-shadow .25s ease; height: 100%; }
body.ma-cp.ma-cp .site-inner :is(.ma-rcard, .bcard):hover { box-shadow: 0 0 0 1px #c9cfe0, 0 18px 40px -28px rgba(26,43,72,.45); transform: none; }
body.ma-cp.ma-cp .site-inner :is(.ma-rthumb, .bthumb) { position: relative; display: block; aspect-ratio: 16 / 9; margin: 0; background: var(--cp-t-violet); overflow: hidden; border-radius: 0; }
body.ma-cp.ma-cp .site-inner :is(.ma-rthumb, .bthumb) img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; transform: none; }
body.ma-cp.ma-cp .site-inner .ma-rchip { position: absolute; left: 12px; top: 12px; z-index: 1; padding: 4px 10px; border-radius: var(--cp-r); background: rgba(255,255,255,.92) !important; color: var(--cp-accent) !important; font-size: 13px; font-weight: 650; letter-spacing: 0; text-transform: none; }
body.ma-cp.ma-cp .site-inner :is(.ma-rbody, .bcbody) { display: flex; flex-direction: column; gap: var(--cp-s1); flex: 1; padding: var(--cp-s3); }
body.ma-cp.ma-cp .site-inner .ma-rtitle { font-size: var(--cp-f5); font-weight: 650; line-height: 1.4; color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner :is(.ma-rmore, .bmore) { margin-top: auto; padding-top: var(--cp-s1); font-size: var(--cp-f6); font-weight: 600; color: var(--cp-ink); }
body.ma-cp.ma-cp .site-inner :is(.ma-rcard, .bcard):hover :is(.ma-rtitle, h3) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (max-width: 900px) { body.ma-cp.ma-cp .site-inner .ma-related-grid { grid-template-columns: 1fr; gap: var(--cp-s2); } }

/* ======================================================================
   BLOG LISTING (/resources/blog/)
   ====================================================================== */
body.ma-cp-blog.ma-cp .site-inner .ma-blog { padding: 0; font-family: var(--cp-font); color: var(--cp-body); }
body.ma-cp-blog.ma-cp .site-inner .ma-blog .bwrap { max-width: none; margin: 0; padding: 0; }
body.ma-cp-blog.ma-cp .site-inner .ma-blog .bhero { margin: 0; padding: 0; border: 0; background: none; text-align: left; }
body.ma-cp-blog.ma-cp .site-inner .ma-blog .bsection-heading { margin: 0; font-size: 30px !important; line-height: 1.2; letter-spacing: -0.024em; font-weight: 650; text-transform: none; color: var(--cp-ink); }
body.ma-cp-blog.ma-cp .site-inner .ma-blog .blist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cp-s3); margin: var(--cp-s4) 0 0; padding: 0; }
body.ma-cp-blog.ma-cp .site-inner .ma-blog .barticle { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
body.ma-cp-blog.ma-cp .site-inner .ma-blog .bdate { font-size: var(--cp-f6); font-weight: 650; color: var(--cp-accent); letter-spacing: 0; text-transform: none; }
body.ma-cp-blog.ma-cp .site-inner .ma-blog .bcard h3 { margin: 0; font-size: var(--cp-f4) !important; line-height: 1.35; letter-spacing: -0.01em; font-weight: 650; color: var(--cp-ink); }
body.ma-cp-blog.ma-cp .site-inner .ma-blog .bcard p { margin: 0; font-size: var(--cp-f6); line-height: 1.6; color: var(--cp-body); }
body.ma-cp-blog.ma-cp .site-inner .ma-blog .bcard:not(:has(.bthumb))::before { content: ""; display: block; aspect-ratio: 16 / 9;
  background: radial-gradient(60% 90% at 85% 10%, rgba(236,118,176,.45), rgba(236,118,176,0) 70%), radial-gradient(60% 90% at 10% 100%, rgba(85,160,244,.4), rgba(85,160,244,0) 70%), linear-gradient(140deg, #ebe6ff, #f6f9fc); }
@media (max-width: 900px) { body.ma-cp-blog.ma-cp .site-inner .ma-blog .blist { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { body.ma-cp-blog.ma-cp .site-inner .ma-blog .blist { grid-template-columns: 1fr; gap: var(--cp-s2); } }
body.ma-cp.ma-cp .site-inner :is(.bpagination, .archive-pagination) { margin: var(--cp-s6) 0 0; padding: 0; border: 0; background: none; }
body.ma-cp.ma-cp .site-inner :is(.bpagination, .archive-pagination) ul { list-style: none; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 0; padding: 0; }
body.ma-cp.ma-cp .site-inner :is(.bpagination, .archive-pagination) li { margin: 0; padding: 0; display: block; }
body.ma-cp.ma-cp .site-inner :is(.bpagination, .archive-pagination) li::before { content: none; }
body.ma-cp.ma-cp .site-inner :is(.bpagination, .archive-pagination) :is(a, span) {
  min-width: 44px; height: 44px; padding: 0 14px; display: grid; place-items: center; border: 0; border-radius: var(--cp-r); background: #fff; box-shadow: inset 0 0 0 1px var(--cp-line);
  font-size: var(--cp-f6); font-weight: 600; line-height: 1; color: var(--cp-ink) !important; text-decoration: none; }
body.ma-cp.ma-cp .site-inner :is(.bpagination, .archive-pagination) a:hover { box-shadow: inset 0 0 0 1px var(--cp-navy); background: #fff; }
body.ma-cp.ma-cp .site-inner :is(.bpagination, .archive-pagination) :is(.current, .active a) { color: #fff !important; background: var(--cp-grad); box-shadow: none; }
body.ma-cp.ma-cp .site-inner :is(.bpagination, .archive-pagination) .dots { box-shadow: none; background: none; min-width: 24px; padding: 0; }

/* ======================================================================
   POST ARCHIVES (categories, tags, authors, dates): heading band, post cards
   ====================================================================== */
body.ma-cp-archive.ma-cp .content > .archive-description { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; text-align: left; }
body.ma-cp-archive.ma-cp .content > .archive-description h1 { text-align: left; margin-left: 0; }
body.ma-cp-archive.ma-cp .content > .archive-description p { margin: var(--cp-s3) 0 0; max-width: 640px; font-size: var(--cp-f4); line-height: 1.6; color: #2c3a5c; }
body.ma-cp-archive.ma-cp .content > .entry { position: relative; margin: 0 0 var(--cp-s3); padding: var(--cp-s4) var(--cp-s4) var(--cp-s3); border-radius: var(--cp-r); background: #fff; box-shadow: 0 0 0 1px var(--cp-line); overflow: hidden; max-width: 860px; }
body.ma-cp-archive.ma-cp .content > .entry::before { content: "" !important; display: block !important; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--cp-sky), var(--cp-violet)); }
body.ma-cp-archive.ma-cp .content > .entry:nth-of-type(4n+2)::before { background: linear-gradient(90deg, var(--cp-violet), var(--cp-pink)); }
body.ma-cp-archive.ma-cp .content > .entry:nth-of-type(4n+3)::before { background: linear-gradient(90deg, var(--cp-pink), var(--cp-peach)); }
body.ma-cp-archive.ma-cp .content > .entry .entry-header { margin: 0; padding: 0; border: 0; background: none; }
body.ma-cp-archive.ma-cp .content > .entry .entry-meta { margin: 0; padding: 0; border: 0; background: none; font-size: var(--cp-f6); line-height: 1.5; color: var(--cp-muted); text-transform: none; letter-spacing: 0; }
body.ma-cp-archive.ma-cp .content > .entry .entry-meta a { color: var(--cp-accent) !important; font-weight: 600; text-decoration: none; }
body.ma-cp-archive.ma-cp .content > .entry .entry-title { margin: var(--cp-s1) 0 0; font-size: var(--cp-f3) !important; line-height: 1.3 !important; letter-spacing: -0.02em; font-weight: 650 !important; }
body.ma-cp-archive.ma-cp .content > .entry .entry-title a { color: var(--cp-ink) !important; text-decoration: none; }
body.ma-cp-archive.ma-cp .content > .entry .entry-title a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.ma-cp-archive.ma-cp .content > .entry .entry-content { margin: var(--cp-s2) 0 0; font-size: var(--cp-f5); line-height: 1.7; color: var(--cp-body); }
body.ma-cp-archive.ma-cp .content > .entry .entry-content p { margin: 0; font-size: var(--cp-f5); }
body.ma-cp-archive.ma-cp .content > .entry .entry-content a { color: var(--cp-ink) !important; font-weight: 600; }
body.ma-cp-archive.ma-cp .content > .entry .entry-content img { max-width: 100%; height: auto; border-radius: var(--cp-r); }
body.ma-cp-archive.ma-cp .content > .entry .entry-footer { margin: var(--cp-s2) 0 0; padding: var(--cp-s2) 0 0; border: 0; border-top: 1px solid var(--cp-line); background: none; }

/* ---------- Reduced motion: a still page ---------- */
@media (prefers-reduced-motion: reduce) {
  .ma-cp-band, .ma-cp-band canvas, .cp-toc-marker, .cp-stepbar i { transition: none !important; }
  body.ma-cp .site-inner .cp-stagger > *, body.ma-cp .site-inner img.cp-fade { opacity: 1 !important; transform: none !important; transition: none !important; }
  body.ma-cp .site-inner .cp-step.cp-arrive { animation: none; }
  .ma-cp-progress { display: none; }
}

/* MathJax (some JC question pages): wide displays scroll in their own box too */
body.ma-cp .site-inner mjx-container[display="true"] { display: block; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 4px 0; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }

/* ---------- Touch targets of at least 44 px on touch-size screens (look unchanged) ----------
   Inline links take vertical padding, which enlarges the tap area without moving the lines;
   block controls get an invisible hit area or a little more padding. */
@media (max-width: 1024px) {
  body.ma-cp.ma-cp .site-inner :is(.content > .breadcrumb, .ma-practice-breadcrumbs) a { padding: 13px 0; }
  body.ma-cp.ma-cp .site-inner :is(.ma-practice-shell, .ma-practice-shell > .wrap) > :is(.foot, .related) a { padding: 12px 0; }
  body.ma-cp.ma-cp .site-inner .ma-practice-levels a { padding-top: 11.5px; padding-bottom: 11.5px; }
  body.ma-cp.ma-cp .site-inner .ma-chips a { position: relative; }
  body.ma-cp.ma-cp .site-inner .ma-chips a::after { content: ""; position: absolute; inset: -5px -2px; }
  body.ma-cp-guides.ma-cp .site-inner ul.ma-directory-subtopics a { position: relative; }
  body.ma-cp-guides.ma-cp .site-inner ul.ma-directory-subtopics a::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }
  body.ma-cp-guides.ma-cp .site-inner details.ma-directory-more > summary { position: relative; }
  body.ma-cp-guides.ma-cp .site-inner details.ma-directory-more > summary::before { content: ""; position: absolute; inset: -6px -4px; }
  body.ma-cp-guides.ma-cp .site-inner a.ma-directory-read { position: relative; }
  body.ma-cp-guides.ma-cp .site-inner a.ma-directory-read::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; top: 4px; }
  body.ma-cp-post.ma-cp .content > .entry > .entry-footer a { padding: 12px 0; }
}
/* Seven level chips (6 Nov 2026: Sec 3 A, Sec 4 A, Sec 4 E): wrap onto two rows on phones so every chip, including the current one, stays visible. */
@media (max-width: 560px) { body.ma-cp.ma-cp .site-inner .ma-practice-levels { flex-wrap: wrap; overflow-x: visible; } body.ma-cp.ma-cp .site-inner .ma-practice-levels a { flex: 1 1 calc(25% - 4px); padding: 9px 4px; } }
