/* Mam Academy — brand layer on top of theme.json tokens */

/* ---------- Base ---------- */
body {
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--wp--preset--color--gold);
  color: var(--wp--preset--color--wine-deep);
}
:focus-visible {
  outline: 2px solid #8a6a20;
  outline-offset: 2px;
}

/* WordPress resolves the rem entries in theme.json against the 18px body size,
   so the "medium" preset ships as 20px where the rebuild's text-lg is 18px.
   Re-declaring the custom properties in rem puts them back on the 16px root. */
:root {
  --wp--preset--font-size--small: 0.875rem;
  --wp--preset--font-size--medium: 1.125rem;
}

/* Eyebrow label */
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: var(--wp--preset--font-family--body);
}

/* ---------- Fixed nav ----------
   Solid by default: the bar carries white type over whatever scrolls beneath
   it, so an unreadable nav is the failure mode if no script runs. The
   transparent-over-hero state is opt-in, added by mam.js. */
header.mam-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgb(37 0 16 / 0.92);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
header.mam-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgb(37 0 16 / 0.55), rgb(37 0 16 / 0));
  opacity: 0;
  transition: opacity 0.3s ease;
}
header.mam-nav.is-js {
  background: transparent;
}
header.mam-nav.is-js:not(.is-scrolled)::before {
  opacity: 1;
}
header.mam-nav.is-js.is-scrolled {
  background: rgb(37 0 16 / 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgb(0 0 0 / 0.25);
}
header.mam-nav.is-scrolled::before {
  opacity: 0;
}
.mam-nav__inner {
  position: relative;
  max-width: var(--wp--style--global--wide-size);
  margin-inline: auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .mam-nav__inner { padding-inline: 2rem; }
}
/* Centered on the viewport below the desktop breakpoint, where the logo is the
   first flex item again. Absolute so the hamburger never shifts it off axis. */
@media (max-width: 1023px) {
  .mam-nav__inner { justify-content: flex-end; }
  .mam-nav__logo {
    position: absolute;
    inset: 0 auto 0 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
  }
}
.mam-nav__logo img {
  height: 3.5rem;
  width: auto;
  display: block;
}
@media (min-width: 768px) {
  .mam-nav__logo img { height: 4rem; }
}
.mam-nav .mam-nav-links {
  display: none;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 1280px) {
  .mam-nav .mam-nav-links { gap: 2.5rem; }
}
@media (min-width: 1024px) {
  .mam-nav .mam-nav-links { display: flex; }
}
.mam-nav .mam-nav-links a {
  color: rgb(255 255 255 / 0.85);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s ease;
}
.mam-nav .mam-nav-links a:hover { color: #fff; }
.mam-nav .mam-nav-links a.current { color: var(--wp--preset--color--gold); }
.mam-nav__cta { display: none; }
@media (min-width: 1024px) {
  .mam-nav__cta { display: inline-flex; }
}
/* The CTA lives in the link list, so it would otherwise take the uppercase,
   letterspaced nav-link treatment and its white-on-gold colour. */
.mam-nav .mam-nav-links a.mam-nav__cta {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--wp--preset--color--wine-deep);
}
.mam-nav__burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  position: relative;
}
/* The inline SVG the port carried was stripped by kses, which left the mobile
   menu trigger blank. The three bars are drawn here instead, and the open state
   (the JS already writes aria-expanded) turns them into the close cross that the
   static build swaps to. */
.mam-nav__burger::before,
.mam-nav__burger::after {
  content: "";
  position: absolute;
  left: 9px;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: top 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}
.mam-nav__burger::before {
  top: 16px;
  box-shadow: 0 6px 0 currentColor;
}
.mam-nav__burger::after {
  top: 26px;
}
.mam-nav__burger[aria-expanded="true"]::before {
  top: 21px;
  transform: translateY(-50%) rotate(45deg);
  box-shadow: none;
}
.mam-nav__burger[aria-expanded="true"]::after {
  top: 21px;
  transform: translateY(-50%) rotate(-45deg);
}
@media (min-width: 1024px) {
  .mam-nav__burger { display: none; }
}
.mam-mobile-menu {
  display: none;
  background: rgb(37 0 16 / 0.98);
  border-top: 1px solid rgb(255 255 255 / 0.1);
}
.mam-mobile-menu.is-open { display: block; }
.mam-mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 1.25rem 1.25rem 2rem;
}
.mam-mobile-menu li { border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.mam-mobile-menu a {
  display: block;
  padding: 0.85rem 0;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
}
.mam-mobile-menu a.current { color: var(--wp--preset--color--gold); }
.mam-mobile-menu .mam-btn-gold { margin-top: 1.25rem; }

/* Page content starts under the fixed nav */
.mam-hero { padding-top: 9rem; }
@media (min-width: 782px) {
  .mam-hero { padding-top: 13rem; }
}

/* ---------- Buttons (pill language) ---------- */
.mam-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  padding: 0.875rem 2rem;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.mam-btn:active { transform: translateY(1px); }
.mam-btn-wine { background: var(--wp--preset--color--wine); color: #fff; }
.mam-btn-wine:hover { background: var(--wp--preset--color--wine-deep); color: #fff; }
.mam-btn-gold { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--wine-deep); }
.mam-btn-gold:hover { background: var(--wp--preset--color--gold-bright); color: var(--wp--preset--color--wine-deep); }
.mam-btn-outline { border-color: var(--wp--preset--color--wine); color: var(--wp--preset--color--wine); background: transparent; }
.mam-btn-outline:hover { background: var(--wp--preset--color--wine); color: #fff; }
.mam-btn-outline-light { border-color: rgb(255 255 255 / 0.45); color: #fff; background: transparent; }
.mam-btn-outline-light:hover { border-color: #fff; background: rgb(255 255 255 / 0.08); color: #fff; }
.mam-btn-sm { padding: 0.625rem 1.5rem; font-size: 0.95rem; }

/* Core buttons styled as pills to match */
.wp-block-button__link {
  border-radius: 9999px !important;
  padding: 0.875rem 2rem !important;
  font-weight: 500;
}

/* ---------- Hero (cover with dual scrim) ---------- */
.mam-hero-cover {
  position: relative;
  overflow: hidden;
}
/* The static build stacks two directional washes over the photograph; the cover
   block only offers a flat dim, so the gradients replace its background span. */
.mam-hero-cover > .wp-block-cover__background {
  background: linear-gradient(to right, rgb(37 0 16 / 0.85), rgb(37 0 16 / 0.35) 50%, transparent),
    linear-gradient(to top, #250010, rgb(37 0 16 / 0.45) 50%, rgb(37 0 16 / 0.15)) !important;
  opacity: 1 !important;
}
/* Tailwind keeps the `bg-wine/80` colour under the `md:` gradient, so the scrim
   is a flat wash plus a directional one — the shorthand's colour is that base. */
.mam-pagehero > .wp-block-cover__background,
.mam-coursehero > .wp-block-cover__background {
  background: linear-gradient(to right, rgb(59 0 26 / 0.95), rgb(59 0 26 / 0.8) 50%, rgb(59 0 26 / 0.35))
    rgb(59 0 26 / 0.8) !important;
  opacity: 1 !important;
}
.mam-pagehero > .wp-block-cover__image-background { opacity: 0.9; }
/* The static hero fades its photograph against a wine ground, not the page. */
.mam-pagehero, .mam-coursehero { background-color: var(--wp--preset--color--wine) !important; }
@media (max-width: 767px) {
  /* The horizontal scrim resolves to almost nothing at the right edge, where the
     paragraph wraps, so phones fall back to a flat tint that keeps 4.5:1. */
  .mam-pagehero > .wp-block-cover__background,
  .mam-coursehero > .wp-block-cover__background { background: rgb(59 0 26 / 0.8) !important; }
  .mam-hero-cover > .wp-block-cover__background {
    background: linear-gradient(rgb(37 0 16 / 0.3), rgb(37 0 16 / 0.3)),
      linear-gradient(to right, rgb(37 0 16 / 0.85), rgb(37 0 16 / 0.35) 50%, transparent),
      linear-gradient(to top, #250010, rgb(37 0 16 / 0.45) 50%, rgb(37 0 16 / 0.15)) !important;
  }
}
.mam-hero-cover > .wp-block-cover__inner-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wp--style--global--wide-size);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------- Cards, rows, panels ---------- */
.mam-card {
  background: var(--wp--preset--color--cream);
  border: 1px solid rgb(216 216 213 / 0.6);
  border-radius: var(--wp--custom--radius--card);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.3s ease;
}
.mam-card:hover {
  border-color: var(--wp--preset--color--gold-ink);
  box-shadow: 0 18px 44px -26px rgb(34 0 22 / 0.5);
}
.mam-card--paper { background: var(--wp--preset--color--paper); border-color: rgb(216 216 213 / 0.7); }
.mam-card--wine {
  background: var(--wp--preset--color--wine);
  color: #fff;
  border: 0;
  border-radius: var(--wp--custom--radius--card);
}
.mam-card--cream-box {
  background: var(--wp--preset--color--cream);
  border: 1px solid rgb(216 216 213 / 0.6);
  border-radius: var(--wp--custom--radius--card);
}
.mam-img {
  border-radius: var(--wp--custom--radius--card);
  display: block;
  width: 100%;
  height: auto;
}
.mam-row {
  border-top: 1px solid var(--wp--preset--color--line);
  padding-block: 1.5rem;
  display: grid;
  gap: 0.5rem;
}
.mam-row:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.mam-row--dark { border-top-color: rgb(255 255 255 / 0.15); }
.mam-row--dark:last-child { border-bottom-color: rgb(255 255 255 / 0.15); }
.mam-hairline-b { border-bottom: 1px solid var(--wp--preset--color--line); }
.mam-hairline-t { border-top: 1px solid var(--wp--preset--color--line); }
.mam-hairline { border-top: 1px solid var(--wp--preset--color--line); padding-top: 2rem; }

/* ---------- Reveal on scroll ---------- */
.mam-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--mam-delay, 0s);
}
.mam-reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .mam-reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Stats strip ---------- */
.mam-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.mam-stats .num {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.875rem, 1.2rem + 2vw, 3rem);
  line-height: 1;
  color: #fff;
}
.mam-stats .lbl { font-size: 0.875rem; color: rgb(255 255 255 / 0.6); margin-top: 0.5rem; }
@media (max-width: 600px) {
  .mam-stats .num { font-size: 1.75rem; }
  .mam-stats .lbl { font-size: 0.75rem; }
}

/* ---------- Footer ---------- */
footer.mam-footer { background: var(--wp--preset--color--wine-deep); color: rgb(255 255 255 / 0.7); }
footer.mam-footer a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
footer.mam-footer a:hover { color: var(--wp--preset--color--gold); }
/* The footer's link columns are hand-written lists, so they never get the
   navigation block's own marker reset. */
footer.mam-footer ul { list-style: none; margin-left: 0; }
/* Core's typography leaves 14px under every paragraph; the static footer spaces
   its blocks with explicit margins instead. */
footer.mam-footer p { margin-block-start: 0; margin-block-end: 0; }
.mam-footer__logo { height: 3rem; width: auto; display: block; }
@media (min-width: 768px) {
  .mam-footer__logo { height: 3.5rem; }
}
.mam-footer__grid {
  /* Astro's footer uses the same .wrap as every band: 71.25rem below 1280, then
     min(1400px, 40rem + 41.6667vw). A flat 1240px box measured 1136 wide at 1200
     where the sections above it measured 1076, and 1176 at 1600 where they
     measured 1243. */
  max-width: 71.25rem;
  box-sizing: border-box;
  margin-inline: auto;
  padding: 4rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
/* Astro's footer grid is 3/2/3/4 of twelve at md with a 2rem gutter; the port
   had 4/2/4/2 at 900px, which widened the brand column and kept the address
   column too narrow. */
@media (min-width: 768px) {
  .mam-footer__grid {
    grid-template-columns: 3fr 2fr 3fr 4fr;
    gap: 2rem;
    padding: 5rem 2rem;
  }
}
.mam-footer__classes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
/* Astro switches this list to two columns at lg, not at 600px. */
@media (min-width: 1024px) {
  .mam-footer__classes { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
}
/* text-sm in the static build is 14px/20px; the inherited theme body leading is
   1.65, which added 3px to every footer link row. */
.mam-footer nav ul,
.mam-footer nav ul li,
.mam-footer__grid > div > p:last-child { line-height: 1.25rem; }
.mam-footer p.eyebrow { margin-top: 0; }
.mam-footer__grid > div > p:first-of-type { line-height: 1.625; }
.mam-footer__grid span[style] { line-height: 1.75rem; }
.mam-footer__bottom {
  border-top: 1px solid rgb(255 255 255 / 0.1);
}
.mam-footer__bottom-inner {
  max-width: 71.25rem;
  box-sizing: border-box;
  margin-inline: auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: rgb(255 255 255 / 0.5);
}
.mam-footer__bottom-inner .links { display: flex; gap: 1.25rem; }

/* ---------- Forms (CF7) ---------- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #767676;
  background: #fff;
  font-family: inherit;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--wp--preset--color--body);
  border-radius: 0;
}
.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--wp--preset--color--wine);
  box-shadow: 0 0 0 3px rgb(198 161 91 / 0.25);
}
.wpcf7 label { display: block; }
.wpcf7 .wpcf7-spinner { display: none; }
.wpcf7 .wpcf7-response-output { border: 0 !important; margin: 1rem 0 0 !important; padding: 0 !important; font-size: 0.9rem; }
.wpcf7 .wpcf7-list-item { margin: 0; }

/* ---------- Utility ---------- */
.mam-wide {
  max-width: var(--wp--style--global--wide-size);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 782px) {
  .mam-wide { padding-inline: 2rem; }
}

/* ---------- Page content utilities ---------- */
.mam-narrow { max-width: 46rem; }
.mam-center { text-align: center; }
.mam-center .wp-block-buttons { justify-content: center; }
.mam-pad { padding: 1.75rem; }
.mam-mt-lg { margin-top: 2.5rem; }
.mam-stars { letter-spacing: 0.3em; color: var(--wp--preset--color--gold-ink); font-size: 0.9rem; }
.mam-gold { color: var(--wp--preset--color--gold); }
.mam-light { color: #fff; }
.mam-gold-big { font-size: 1.5rem; color: var(--wp--preset--color--gold); letter-spacing: 0.35em; }
.mam-cite { font-size: 0.9rem; color: var(--wp--preset--color--muted); border-top: 1px solid var(--wp--preset--color--line); padding-top: 1rem; margin-top: 1.25rem; }
.mam-cite strong { color: var(--wp--preset--color--wine-ink); font-weight: 500; }
.mam-list-dash { list-style: none; padding-left: 0; margin-left: 0; display: grid; gap: 0.75rem 2.5rem; }
.mam-list-dash li { display: flex; gap: 1rem; align-items: flex-start; font-size: 0.875rem; line-height: 1.25rem; }
/* Astro marks these rows with a 16x1px gold rule offset from the cap height,
   not a typed dash; the glyph sat on the baseline and read as body copy. */
.mam-list-dash li::before { content: ""; flex: none; width: 1rem; height: 1px; margin-top: 0.72rem; background: var(--wp--preset--color--gold-ink); }
.mam-list-dash.mam-cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
p.mam-arrowlink a, a.mam-arrowlink { color: var(--wp--preset--color--wine); font-weight: 500; text-decoration: none; }
p.mam-arrowlink a:hover, a.mam-arrowlink:hover { color: var(--wp--preset--color--gold-ink); }
.mam-arrowlink.mam-light a, a.mam-arrowlink.mam-light { color: #fff; }
.mam-bigquote { font-family: var(--wp--preset--font-family--body); font-weight: 500; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.4; }
.mam-only-mobile { display: none; margin-top: 2rem; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--wp--preset--color--wine); }

/* Hero */
/* Astro pins the home title to the frame edge at 56rem; the constrained layout
   would otherwise centre a 60rem title 108px inside the wrap. */
.mam-hero-title { max-width: 56rem; }
.wp-block-cover.alignfull.mam-hero > .wp-block-cover__inner-container > .mam-hero-title {
  margin-left: 0 !important;
  margin-right: auto !important;
}
.wp-block-cover.alignfull.mam-hero > .wp-block-cover__inner-container > h1.mam-narrow {
  max-width: 48rem;
}
.mam-hero .wp-block-buttons { margin-top: 2rem; }

/* Cards */
.mam-card { position: relative; container-type: inline-size; }
.mam-card-link { position: absolute; inset: 0; z-index: 1; }
.mam-card-media { position: relative; }
.mam-card-media .wp-block-image { margin: 0; }
.mam-card-media img { border-radius: 0; }
/* Astro rounds every band photograph with the card radius; the ruled course cards
   are the exception because the card itself clips the corner. */
.wp-block-post-content .wp-block-image > img { border-radius: var(--wp--custom--radius--card); }
.mam-card-media .wp-block-image > img { border-radius: 0; }
.mam-pill { position: absolute; top: 1rem; left: 1rem; background: rgb(37 0 16 / 0.85); color: #fff; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; padding: 0.375rem 0.75rem; border-radius: 9999px; margin: 0; z-index: 2; }
/* Title and price stack while the card is narrow and sit on one baseline once it
   has room. The card's own inline size is the test, so a three-up grid and a
   single-column mobile stack each get the right arrangement. */
.mam-card-top { display: grid; gap: 0; }
@container (min-width: 25rem) {
  .mam-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
}
.mam-card-name { font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; margin: 0; line-height: 1.35; font-weight: 700; min-height: 2lh; }
@container (min-width: 25rem) {
  .mam-card-name { min-height: 0; }
}
.mam-card-price { font-weight: 700;  font-family: var(--wp--preset--font-family--display); font-size: 1.25rem; line-height: 1.75rem; color: var(--wp--preset--color--gold-ink); white-space: nowrap; margin: 0.25rem 0 0; }
@container (min-width: 25rem) {
  .mam-card-price { margin-top: 0; }
}
/* The static build trims the card intro to three lines, which is what keeps a
   row of cards the same height. */
.mam-card-intro { font-size: 0.875rem; line-height: 1.625; margin-top: 0.75rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.mam-card-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--wp--preset--color--line); margin-top: 1.25rem; padding-top: 1rem; font-size: 0.75rem; line-height: 1rem; color: var(--wp--preset--color--muted); }
.mam-card-days { color: var(--wp--preset--color--wine); font-weight: 500; }
.mam-card > .mam-pad { padding: 1.5rem; }
@media (min-width: 768px) {
  .mam-card > .mam-pad { padding: 1.75rem; }
}
.mam-card-name-sm { font-family: var(--wp--preset--font-family--display); font-size: 1.25rem; margin: 0.5rem 0 0; font-weight: 700; }
.mam-card-note { border-top: 1px solid var(--wp--preset--color--line); padding-top: 0.75rem; margin-top: 1rem; }
.mam-card-img-top { margin-bottom: 1.25rem; }
.mam-photo-slot { aspect-ratio: 4 / 3; background: #e9e9e6; display: flex; align-items: center; justify-content: center; font-family: var(--wp--preset--font-family--display); font-size: 2rem; color: var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--card); margin-bottom: 1.25rem; }

/* Ledger rows */
.mam-row .wp-block-columns, .mam-row-cols { margin: 0; gap: 1rem 2rem; }
.mam-row-cols .wp-block-column, .mam-row .wp-block-column { padding: 0; }
.mam-row-num { font-family: var(--wp--preset--font-family--numeral); color: var(--wp--preset--color--gold-ink); font-size: 1.125rem; margin: 0; }
.mam-row-title { font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; margin: 0; line-height: 1.3333; font-weight: 700; }
.mam-row-title a { color: inherit; text-decoration: none; }
.mam-row-title a:hover { color: var(--wp--preset--color--wine-soft); }
.mam-row-intro { font-size: 0.875rem; line-height: 1.625; max-width: 42rem; margin: 0.375rem 0 0; }
/* Only the home signature ledge steps up: the rebuild keeps its title at
   md:text-3xl with a 1.2 leading and its standfirst at 1.05rem on mt-2, while the
   contact and schedule ledgers stay on text-2xl / text-sm. The old clamp ran
   27.8px at 1440 on every one of them, half a step too large and a line short. */
.mam-row--loose .mam-row-intro { margin-top: 0.5rem; }
@media (min-width: 768px) {
  .mam-row--loose .mam-row-title { font-size: 1.875rem; line-height: 1.2; }
  .mam-row--loose .mam-row-intro { font-size: 1.05rem; }
}
.mam-row-meta { font-size: 0.875rem; line-height: 1.25rem; color: var(--wp--preset--color--muted); margin: 0; }
.mam-row-meta-sub { display: block; margin-top: 0.25rem; font-size: 0.75rem; line-height: 1rem; }
.mam-row-meta br { display: none; }
.mam-row-price { font-weight: 700;  font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; line-height: 2rem; text-align: right; margin: 0; white-space: nowrap; }
@media (max-width: 781px) {
  .mam-row-price { text-align: left; }
}

/* Section head with right link */
.mam-sechead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.mam-sechead .eyebrow { color: var(--wp--preset--color--muted); margin: 0 0 0.75rem; }
.mam-sechead h2 { margin: 0; }
.mam-sechead-link { color: var(--wp--preset--color--wine); font-weight: 500; font-size: 0.9rem; text-decoration: none; white-space: nowrap; }

/* Proof grid + dark bits */
.mam-proofgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); column-gap: 3.5rem; }
.mam-proofgrid .mam-row { display: block; }
.mam-proofitem { color: rgb(255 255 255 / 0.8); margin: 0.5rem 0 0; }

/* Course pages */
.mam-mod-title { font-family: var(--wp--preset--font-family--display); font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); margin: 0; line-height: 1.25; font-weight: 700; }
.mam-mod-cols .wp-block-column { padding: 0; }
.mam-kv { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: baseline; padding-block: 1rem; }
@media (max-width: 600px) { .mam-kv { grid-template-columns: 1fr; gap: 0.25rem; } }
.mam-kv-k { color: rgb(255 255 255 / 0.7); margin: 0; padding-top: 0.25rem; }
.mam-kv-v { font-size: 1.125rem; color: rgb(255 255 255 / 0.9); margin: 0; }
.mam-crumb { font-size: 0.75rem; line-height: 1rem; color: rgb(255 255 255 / 0.5); }
.mam-crumb a { color: inherit; text-decoration: none; }
.mam-crumb a:hover { color: var(--wp--preset--color--gold); }
.mam-price-lg { font-family: var(--wp--preset--font-family--display); font-size: 2.5rem; color: var(--wp--preset--color--wine); margin: 0; font-weight: 700; }
.mam-rel-title { font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; margin: 0.5rem 0; font-weight: 700; }
.mam-uppercase { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.7rem; }

/* Contact page */
.mam-channel { display: flex; flex-direction: column; gap: 0.25rem; padding: 2rem 1.5rem; text-decoration: none; color: inherit; }
.mam-channel .eyebrow { color: var(--wp--preset--color--muted); }
.mam-channel-value { font-weight: 700;  font-family: var(--wp--preset--font-family--display); font-size: 1.6rem; color: var(--wp--preset--color--wine); overflow-wrap: anywhere; }
.mam-channel-note { font-size: 0.85rem; color: var(--wp--preset--color--muted); }
a.mam-channel:hover { background: #fff; }
.mam-step-title { font-family: var(--wp--preset--font-family--display); font-size: 1.25rem; margin: 0; font-weight: 700; }
.mam-address { color: rgb(255 255 255 / 0.85); font-size: 0.9rem; margin: 0.5rem 0 0; }
.mam-founder-name { font-family: var(--wp--preset--font-family--display); font-size: 1.25rem; margin: 0.25rem 0 0; font-weight: 700; }
.mam-form-note { font-size: 0.85rem; color: var(--wp--preset--color--muted); margin: 0 0 1rem; }

/* Highlight / thrive items */
.mam-hl-title { font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; margin: 0.25rem 0 0.5rem; font-weight: 700; }
.mam-thrive-title { font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; margin: 0.25rem 0 0.5rem; font-weight: 700; }
.mam-callout { border-left: 2px solid var(--wp--preset--color--gold); padding-left: 1.25rem; color: var(--wp--preset--color--muted); font-size: 0.9rem; max-width: 40rem; margin-top: 2rem; }

/* Legal */
.mam-toc .eyebrow { margin-bottom: 1rem; color: var(--wp--preset--color--muted); }
.mam-toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; font-size: 0.9rem; }
.mam-toc a { color: var(--wp--preset--color--muted); text-decoration: none; }
.mam-toc a:hover { color: var(--wp--preset--color--wine); }
.mam-legal-block { margin-bottom: 3rem; }
/* Legal bands: the rebuild sits the policy ledger in 6rem of air; the ported
   blocks carry 4rem / 5rem inline, which the stylesheet cannot beat without a
   hand on the cascade. */
section:has(.mam-legal-block) { padding-block: 6rem !important; }
/* Each heading is text-2xl / md:text-3xl on a 1.2 leading with a 16px drop, and
   the body runs relaxed from there, so the clamp and the flow margin were both
   adding a line's worth of height to every one of the seven blocks. */
.mam-legal-block h2 { font-size: 1.5rem; line-height: 1.3333; margin-bottom: 1rem; }
@media (min-width: 768px) {
  .mam-legal-block h2 { font-size: 1.875rem; line-height: 1.2; }
}
.mam-legal-block p { line-height: 1.625; }
.mam-legal-block h2 + p { margin-top: 0; }

/* CF7 layout. CF7 prints the form itself with the .wpcf7-form class, so the four
   rules below used to name a wrapper element the plugin never outputs and none of
   them applied: the fields stacked in a single column, the submit button fell
   through to the gold preset instead of the wine primary button, and every field
   pair carried the theme's 18px paragraph margins on top. */
form.wpcf7-form .mam-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
form.wpcf7-form .mam-form-grid > p { margin-block: 0; }
form.wpcf7-form .mam-form-grid .mam-form-full { grid-column: 1 / -1; }
@media (max-width: 639px) { form.wpcf7-form .mam-form-grid { grid-template-columns: 1fr; } }
form.wpcf7-form label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--wp--preset--color--wine-ink); }
form.wpcf7-form .wpcf7-submit { display: inline-flex; align-items: center; justify-content: center; margin-top: 0; width: auto; cursor: pointer; background: var(--wp--preset--color--wine); color: #fff; border: 0; border-radius: 9999px; padding: 0.875rem 2rem; font-size: 1rem; line-height: 1.2; font-weight: 500; transition: background-color 0.2s ease, transform 0.2s ease; }
form.wpcf7-form .wpcf7-submit:hover { background: var(--wp--preset--color--wine-deep); }
form.wpcf7-form .wpcf7-submit:active { transform: translateY(1px); }

/* Channel strip: keep long emails on two clean lines */
.mam-channel-value { font-weight: 700;  font-size: clamp(1.05rem, 1.4vw, 1.35rem); overflow-wrap: break-word; word-break: normal; }
.mam-channel { padding: 1.75rem 1.25rem; }
.mam-card-top > .mam-card-name { flex: 1 1 auto; min-width: 0; }
.mam-card-top > .mam-card-price { flex: 0 0 auto; }
.mam-card > .mam-card-media, .mam-card > .mam-pad { margin-top: 0; }
.mam-channel-value { font-weight: 700;  font-size: clamp(0.98rem, 1.15vw, 1.15rem); }

/* ---------- Container widths: match the 1140px wrap of the original ----------
   Astro has one frame rule (.wrap) for every band *and* the footer: 1.25rem
   gutters below 768, 2rem above. The port gave its sections Core's 1.25rem root
   padding and gave the footer 2rem, so at 1024 the sections measured 984px
   while the footer under them measured 960px. Declared on the wrapper because
   WordPress prints its own :root values later in the document. */
.wp-site-blocks { --mam-gutter: 1.25rem; }
@media (min-width: 768px) { .wp-site-blocks { --mam-gutter: 2rem; } }
main .alignfull.is-layout-constrained {
  padding-left: max(var(--mam-gutter), calc(50% - var(--wp--style--global--wide-size) / 2 + var(--mam-gutter)));
  padding-right: max(var(--mam-gutter), calc(50% - var(--wp--style--global--wide-size) / 2 + var(--mam-gutter)));
}
main .alignfull.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull):not(.mam-center):not(.mam-narrow):not(.mam-hero-title)) {
  max-width: none;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
main .alignfull.is-layout-constrained > .mam-narrow {
  max-width: 46rem;
  margin-left: auto !important;
  margin-right: auto !important;
}
main .alignfull.is-layout-constrained > .mam-center {
  max-width: 46rem;
  margin-left: auto !important;
  margin-right: auto !important;
}
main .alignfull.is-layout-constrained > p:not(.mam-narrow):not(.mam-callout) { max-width: 42rem; }
.wp-block-cover.alignfull.mam-hero > .wp-block-cover__inner-container {
  /* The cover centres its children on the cross axis, which lets the inner
     container shrink to fit its own text. Astro's hero wrap is always full
     width, so the lead-in breaks at 350px, not 238. */
  align-self: stretch;
  padding-left: max(var(--mam-gutter), calc(50% - var(--wp--style--global--wide-size) / 2 + var(--mam-gutter)));
  padding-right: max(var(--mam-gutter), calc(50% - var(--wp--style--global--wide-size) / 2 + var(--mam-gutter)));
}
.wp-block-cover.alignfull.mam-hero > .wp-block-cover__inner-container > :where(:not(.alignleft):not(.alignright):not(.mam-hero-title):not(.mam-narrow)) {
  max-width: none;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.wp-block-cover.alignfull.mam-hero > .wp-block-cover__inner-container > p:not(.mam-narrow) { max-width: 42rem; }
.wp-block-cover.alignfull.mam-hero .mam-narrow {
  margin-left: 0 !important;
  margin-right: auto !important;
}
/* Top gap above hero + cover double horizontal padding */
.wp-site-blocks > main { margin-top: 0; }
.wp-block-cover.alignfull.mam-hero { padding-left: 0; padding-right: 0; }

/* ==========================================================================
   Ported from the Astro rebuild
   ========================================================================== */

/* ---------- Wide frame ----------
   71.25rem came from the original Elementor kit, which never saw a display wider
   than 1440. Above 1280 the frame grows with the viewport and stops at 1400, so
   the gutters widen instead of the reading measure. It is set on the wrapper, not
   :root, because WordPress prints its own :root value later in the document. */
@media (min-width: 1280px) {
  .wp-site-blocks {
    --wp--style--global--wide-size: min(87.5rem, calc(40rem + 41.6667vw));
  }
}

/* ---------- Figures ----------
   Newsreader ships text (old-style) figures by default, so in a price column the
   3, 5 and 7 drop below the baseline of the 0s. Money and stats read as columns. */
:where(h1, h2, h3, h4, h5, h6),
.mam-card-name,
.mam-card-price,
.mam-row-title,
.mam-row-price,
.mam-price-lg,
.mam-channel-value,
.mam-stats .num {
  font-variant-numeric: lining-nums;
}

/* Cinzel Decorative is caps-only and wide: a plate face for numerals and short
   marks, never a headline face. */
.mam-numeral {
  font-family: var(--wp--preset--font-family--numeral);
  font-weight: 400;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.04em;
}

/* ---------- The ledger signature ----------
   The site's one authored moment: ruled lists fill in row by row, in strict
   document order. A gold rule rides the leading edge of each row and the whole
   ledger settles to its neutral hairline once the last line lands. mam.js applies
   the row clips and the is-ruling / is-settled classes; with JS off, or motion
   reduced, nothing here hides or paints. Clip only, never a transform — a row
   keeps its exact hit target while it arrives. */
.mam-ledger > * {
  position: relative;
}
.mam-ledger > *::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px; /* sits on the row's own 1px border, inside the clip box */
  height: 1px;
  background: var(--wp--preset--color--gold);
  opacity: 0;
  transition: opacity 0.5s ease-out;
}
.mam-ledger--bottom > *::after {
  top: auto;
  bottom: -1px;
}
.mam-ledger.is-ruling > *::after {
  opacity: 1;
}
.mam-ledger.is-settled > *::after {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .mam-ledger > *::after {
    display: none;
  }
}

/* ---------- Display-face weight ----------
   Weight discipline for Newsreader: high-contrast serifs lose their hairlines
   below roughly 30px, so Regular is reserved for the two display scales and
   anything that carries information is set Bold. Rows, card titles and prices are
   information; hero and section headlines are display. */
.mam-card-name,
.mam-card-name-sm,
.mam-card-price,
.mam-row-title,
.mam-rel-title,
.mam-mod-title,
.mam-step-title,
.mam-hl-title,
.mam-thrive-title,
.mam-founder-name { font-weight: 700; }
/* The two display scales and the numeral column are the sanctioned Regular. */
.mam-hero-title,
.mam-bigquote,
.mam-legal-block h2,
.mam-row-num {
  font-weight: 400;
}

/* ---------- Admissions ledger ----------
   The assurances on the inquiry band read as a ruled list, not three boxes: the
   label sits in a fixed measure and the answer in the column beside it. */
.mam-assure {
  border-bottom: 1px solid rgb(255 255 255 / 0.15);
  margin: 0;
}
.mam-assure .mam-row { grid-template-columns: 1fr; }
.mam-assure dt { color: rgb(255 255 255 / 0.55); }
.mam-assure dd { margin: 0; color: rgb(255 255 255 / 0.9); }
@media (min-width: 600px) {
  .mam-assure .mam-row {
    grid-template-columns: 10rem 1fr;
    gap: 1.5rem;
    align-items: baseline;
  }
}

/* Wine bands carry their own body colour: WordPress strips rgba() from inline
   styles when saving, so the band copy would fall back to near-black on wine. */
main .has-wine-background-color p,
main .has-wine-dark-background-color p,
main .has-wine-deep-background-color p { color: rgb(255 255 255 / 0.75); }
main .has-wine-background-color a:not(.wp-block-button__link):not(.mam-btn),
main .has-wine-dark-background-color a:not(.wp-block-button__link):not(.mam-btn) { color: var(--wp--preset--color--gold); }

/* ---------- Form fields ----------
   Fields sit one tier below the card radius so they read as inputs, not cards. */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
  border-radius: var(--wp--custom--radius--field);
  border-color: var(--wp--preset--color--line-strong);
  background: var(--wp--preset--color--cream);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.wpcf7 input[type="text"]:hover,
.wpcf7 input[type="email"]:hover,
.wpcf7 input[type="tel"]:hover,
.wpcf7 select:hover,
.wpcf7 textarea:hover { border-color: var(--wp--preset--color--wine); }
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus { background: var(--wp--preset--color--paper); }

/* ---------- Review wall ----------
   Reviews are reading matter: they set in columns with a hairline between
   entries, not as a grid of identical cards. */
.mam-wall { columns: 1; column-gap: 2.5rem; }
@media (min-width: 768px) { .mam-wall { columns: 2; } }
@media (min-width: 1024px) { .mam-wall { columns: 3; } }
.mam-wall figure {
  break-inside: avoid;
  margin: 0 0 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.mam-wall blockquote {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.62;
}
.mam-wall figcaption { margin-top: 1rem; font-size: 0.875rem; color: var(--wp--preset--color--muted); }
.mam-wall figcaption strong { color: var(--wp--preset--color--wine-ink); font-weight: 500; }

/* The one highlighted quote on a page carries the display face; everything
   else on the page is body copy. */
.mam-quote-feature {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  line-height: 1.3;
  margin: 0;
  color: #fff;
}
.mam-attrib { margin: 0; }
.mam-attrib strong {
  display: block;
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--wp--preset--color--gold);
}
.mam-attrib span { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: rgb(255 255 255 / 0.6); }
.mam-attrib::before {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  margin-bottom: 1.25rem;
  background: rgb(255 255 255 / 0.3);
}
.mam-lead-line {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.25rem;
  color: var(--wp--preset--color--wine-ink);
  font-weight: 700;
  margin-top: 2rem;
}
.mam-imgcap { font-size: 0.75rem; color: var(--wp--preset--color--muted); margin-top: 0.75rem; }

/* Level groups (/classes) */
.mam-level + .mam-level { margin-top: 6rem; }
.mam-level-head {
  align-items: baseline;
  gap: 0.75rem;
  border-bottom: 1px solid var(--wp--preset--color--line);
  padding-bottom: 1.5rem;
}
.mam-level-head h2 { margin: 0; }
.mam-level-head p {
  max-width: 28rem;
  margin-left: auto;
  font-size: 0.875rem;
  line-height: 1.625;
}
.mam-course-row { margin-top: 2.25rem; }
.mam-course-row + .mam-course-row { margin-top: 2rem; }
.mam-includes { gap: 0; margin-top: 1.75rem; }
.mam-includes li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--wp--preset--color--line);
  font-size: 1.125rem;
  line-height: 1.75rem;
  gap: 1.25rem;
  align-items: baseline;
}
.mam-includes li:first-child { border-top: 1px solid var(--wp--preset--color--line); }
/* The static build marks these rows with a gold dot rather than the dash the
   shared list style paints, so this one list opts out of it. */
.mam-includes li::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--wp--preset--color--gold);
  position: relative;
  top: -2px;
}
.mam-includes + p { font-size: 0.875rem; line-height: 1.625; }

@media (max-width: 781px) {
  .mam-level + .mam-level { margin-top: 5rem; }
  .mam-level-head .has-text-align-right { text-align: left; }
  .mam-level-head p { max-width: none; margin-left: 0; }
}

/* Home: three-photo gallery */
.mam-gallery { align-items: flex-start; }
.mam-gallery figure { margin: 0; }
.mam-gallery img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  border-radius: var(--wp--custom--radius--card);
}
.mam-gcap { font-size: 0.75rem; color: var(--wp--preset--color--muted); margin: 0.75rem 0 0; }
@media (min-width: 782px) {
  .mam-g-wide img { aspect-ratio: 16 / 10; }
  .mam-g-square img { aspect-ratio: 4 / 3; }
}
@media (min-width: 1024px) {
  .mam-gallery > .wp-block-column:first-child { position: sticky; top: 6.5rem; }
}

/* Home: student quotes, no star rows */
.mam-homequote { max-width: 56rem; }
/* The constrained-layout rule above clears every child width, so the featured
   quote ran full-bleed (1176px) and broke into two lines where the rebuild
   holds 56rem and wraps three. */
main .alignfull.is-layout-constrained > .mam-homequote { max-width: 56rem; }
.mam-homequote blockquote {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
  line-height: 1.4;
  color: var(--wp--preset--color--wine-ink);
  margin: 0;
  padding: 0;
  border: none;
}
.mam-revcards { margin-top: 3.5rem; max-width: 64rem; }
.mam-revcard {
  border-bottom: 1px solid var(--wp--preset--color--line);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}
.mam-revcard blockquote {
  font-size: 1.075rem;
  line-height: 1.62;
  color: var(--wp--preset--color--body);
  margin: 0;
  padding: 0;
  border: none;
}
.mam-revcard .mam-cite { border-top: 0; padding-top: 0; margin-top: 1rem; }
/* Both home captions are the rebuild's text-sm (14/20) with no rule above them;
   the shared .mam-cite carries a hairline, 16px of padding and the body's 1.65
   leading, which pushed the featured group a line taller and every card with it. */
.mam-homequote .mam-cite,
.mam-revcard .mam-cite { border-top: 0; padding-top: 0; font-size: 0.875rem; line-height: 1.25rem; font-style: normal; }
.mam-homequote .mam-cite { margin-top: 1.25rem; }

/* Astro parity: display-scale headings */
h1.has-h2-font-size,
h2.has-h2-font-size {
  font-size: clamp(2.1rem, 1.4rem + 2.4vw, 3.25rem);
  font-weight: 400;
  line-height: 1.08;
}
.mam-hero-title { line-height: 1.04; }

/* Astro parity: section rhythm is responsive, not a fixed 80px */
.mam-sec { padding-block: 5rem; }
.mam-sec-md { padding-block: 5rem; }
.mam-sec-lg { padding-block: 6rem; }
.mam-sec-xl { padding-block: 6rem; }
@media (min-width: 782px) {
  .mam-sec { padding-block: 7rem; }
  .mam-sec-md { padding-block: 6rem; }
  .mam-sec-lg { padding-block: 9rem; }
  .mam-sec-xl { padding-block: 8rem; }
}

/* Astro parity: heading scales. The theme default is the 30->36 step, so only the
   off-ramps need a class: flat 30, the 24->30 legal step, and the 30->37.6 band
   title. Sizes are explicit because theme.json element styles outrank the preset
   utility classes in the cascade layers. */
.mam-h2-flat { font-size: 1.875rem; }
.mam-h2-step { font-size: 1.5rem; }
.mam-h2-step-lg { font-size: 1.875rem; }
@media (min-width: 48rem) {
  .mam-h2-step { font-size: 1.875rem; }
  .mam-h2-step-lg { font-size: 2.35rem; line-height: 1.35; }
}

/* Astro parity: course hero meta line. The values are separated by literal "·"
   text runs, so flex turns each run into an anonymous item and the gap does the
   spacing — same rhythm as Astro's flex-wrap/gap-x-3 markup. */
.mam-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1.75rem;
  margin-bottom: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}
.mam-hero-meta-lvl { color: var(--wp--preset--color--gold); font-weight: 500; }
.mam-hero-meta + .wp-block-buttons { margin-top: 2.25rem; }

/* ==========================================================================
   Astro parity, round 2
   ========================================================================== */

/* Hero: the cover only reserved room for the fixed nav, so the headline sat on
   the bottom edge. Astro's wrap carries both the nav clearance and the bottom
   breathing room, and page heroes use a shorter step than the home hero. */
.mam-hero { padding-top: 11rem; padding-bottom: 6rem; }
@media (min-width: 782px) {
  .mam-hero { padding-top: 15rem; padding-bottom: 8rem; }
}
.mam-pagehero { padding-top: 9rem; padding-bottom: 4rem; }
/* The hero intro tint cannot ride inline (kses drops rgba() from post content),
   so it lives here with Astro's measure and step. */
.mam-hero-sub {
  margin-top: 1.5rem;
  margin-bottom: 0;
  max-width: 42rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.8);
}
@media (min-width: 782px) {
  .mam-pagehero { padding-top: 12rem; padding-bottom: 6rem; }
}

/* Proof band: Astro is a 2-up ledger. auto-fit collapsed to 3 columns at 1440. */
.mam-proofgrid { grid-template-columns: 1fr; }
@media (min-width: 40rem) {
  .mam-proofgrid { grid-template-columns: 1fr 1fr; }
}

/* Signature ledger: the numeral hangs to the left of the title on its baseline
   and the meta / price columns hang off that same line. */
.mam-row-cols { align-items: baseline; }
.mam-row-cols > .wp-block-column:first-child {
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 2.5rem;
  align-items: baseline;
}
.mam-row-cols > .wp-block-column:first-child > .mam-row-num { grid-column: 1; grid-row: 1; }
.mam-row-cols > .wp-block-column:first-child > .mam-row-title { grid-column: 2; grid-row: 1; }
.mam-row-cols > .wp-block-column:first-child > .mam-row-intro { grid-column: 2; grid-row: 2; }

/* Industry highlight: the organisation is the headline, the role the standfirst. */
.mam-hl-role {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wp--preset--color--wine-ink);
}

/* Who thrives here: ruled rows, not a four-up card grid. */
.mam-thrive {
  border-top: 1px solid var(--wp--preset--color--line);
  padding-block: 1.5rem;
}
.mam-thrive + .mam-thrive { border-top: 0; }
.mam-thrive:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.mam-thrive h3 {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.mam-thrive p { margin: 0.375rem 0 0; color: var(--wp--preset--color--muted); line-height: 1.65; }
@media (min-width: 48rem) {
  .mam-thrive { display: grid; grid-template-columns: 15rem 1fr; column-gap: 3rem; align-items: baseline; }
  .mam-thrive p { margin-top: 0; }
}

/* Credentials ledger: two ruled columns under the founder bio, full measure. */
.mam-cred-title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}
.mam-cred { margin-top: 4rem; }
@media (min-width: 48rem) { .mam-cred { margin-top: 5rem; } }

/* Proof band split: lede column on the left, 2-up ledger on the right. */
.mam-proof { gap: 2.5rem 3.5rem; }
.mam-proof-lede { color: rgb(255 255 255 / 0.72); line-height: 1.65; }
/* The founder band and instructor band read as one image-plus-prose unit. */
.mam-faye > .wp-block-column:first-child,
.mam-instr > .wp-block-column:first-child { padding: 0; }
.mam-faye figure,
.mam-instr figure { margin: 0; }

/* Inquiry form: Astro marks the optional field in muted type. (Labels and the
   wine submit button are styled by the form.wpcf7-form rules further up; the
   `.mam-inquiry-form` wrapper those rules used to hang off is not in the markup.) */
.mam-form-opt { color: var(--wp--preset--color--muted); font-weight: 400; }
/* Industry rows: the organisation headline no longer inherits the eyebrow gap. */
.mam-hl-title { font-weight: 700;  margin-top: 0; }
.mam-h2-step-lg { max-width: 48rem; }

/* ---------- Round 4: band-level parity with the Astro rebuild ----------
   WordPress ships no Tailwind, so utilities the ported markup already references
   have to be defined here. The rebuild balances every heading in its base layer,
   so the rule is global rather than per-class — a heading the port forgot to tag
   would otherwise break on a different word. */
.text-balance { text-wrap: balance; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }

/* Course heroes are their own step: shorter than the home cover, taller than a
   content band. Inline padding from the port outranks the class, so it is
   stripped from the stored markup instead. */
.mam-coursehero { padding-top: 9rem; padding-bottom: 4rem; }
@media (min-width: 782px) {
  .mam-coursehero { padding-top: 11rem; padding-bottom: 6rem; }
}

/* Inquiry band: Astro pads 80/112, sets the heading to a 42rem measure, and
   tightens each assurance row to py-4. */
.mam-cta { padding-block: 5rem; }
.mam-cta .eyebrow { margin: 0 0 1.5rem; }
/* The rebuilt site breaks the default CTA headline onto two balanced lines; the
   42rem measure it is written with never binds, because the headline balances
   against its grid item, which a columns block does not reproduce. */
.mam-cta-h { max-width: 34rem; }
.mam-cta-body { margin-top: 1.5rem; max-width: 36rem; }
.mam-cta .wp-block-buttons { margin-top: 2.25rem; }
.mam-cta .mam-assure .mam-row { padding-block: 1rem; }
/* The band rule that gives the "Admissions" label its 24px drop also caught the
   ledger's own dt, and the rebuild hangs the label 4px under the rule with a 4px
   gap to the answer, so each assurance row ran 21px tall. */
.mam-cta .mam-assure .eyebrow { margin: 0; padding-top: 0.25rem; }
.mam-assure .mam-row { row-gap: 0.25rem; }
@media (min-width: 782px) {
  .mam-cta { padding-block: 7rem; }
}

/* Manifesto band: Astro splits 7/5 with the heading bottom-aligned and the
   advantages as a ruled list, not a second block of prose. */
.mam-manifesto { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.mam-manifesto-h { align-self: end; margin: 0; }
.mam-manifesto-b > p:first-child { margin-top: 0; line-height: 1.625; }
.mam-manifesto-b > .mam-arrowlink { margin-top: 2rem; margin-bottom: 0; }
.mam-rules { list-style: none; margin: 2rem 0 0; padding: 0; }
.mam-rules li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border-top: 1px solid var(--wp--preset--color--line);
  padding-block: 0.875rem;
  font-size: 0.875rem;
  line-height: 1.4286;
}
.mam-rules li::before {
  content: "";
  margin-top: 0.72rem;
  width: 1rem;
  height: 1px;
  background: var(--wp--preset--color--gold-ink);
  flex: none;
}
@media (min-width: 64rem) {
  .mam-manifesto { grid-template-columns: 7fr 5fr; gap: 4rem; align-items: start; }
}

/* Proof-band image: Astro crops the student-stories photo into a square column. */
.mam-square, .mam-square img { aspect-ratio: 1 / 1; object-fit: cover; }
.mam-square img { width: 100%; border-radius: var(--wp--custom--radius--card); }

/* ==========================================================================
   Round 5: the flow layout's block gap
   ========================================================================== */

/* WordPress separates every pair of sibling blocks in a flow container with 24px.
   Astro renders its ruled row lists edge-to-edge, where the hairline between two
   rows is the only separation, so each ported list gained a gap after every line:
   96px on the industry highlights, 288px down a course syllabus, 168px on the
   course details table. Zeroing the margin between row siblings is the single
   lever behind all three. */
:is(.is-layout-flow, .is-layout-constrained) > [class*="mam-row"] + [class*="mam-row"]:not(.mam-row-intro),
:is(.is-layout-flow, .is-layout-constrained) > .mam-sechead + [class*="mam-row"],
:is(.is-layout-flow, .is-layout-constrained) > .mam-thrive + .mam-thrive {
  margin-block-start: 0;
}

/* Home signature list and industry highlights sit a step looser than the generic
   row, matching Astro's py-8 on those two ledges. */
.mam-row--loose { padding-block: 2rem; }

/* Wine inquiry band: Astro separates the pitch from the assurance ledger by 64px
   horizontally, not the 24px a columns block ships with; stacked, 48px. */
.mam-cta .wp-block-columns { gap: 3rem; }
@media (min-width: 782px) {
  .mam-cta .wp-block-columns { gap: 0 4rem; }
}

/* ---------- Round 6: founder, credentials and story bands ----------
   Three fixes the section sweep kept reporting as +35 to +52:
   - Column gutters. Astro sets gap-12 / gap-14 on these two bands; a block
     columns element ships 24px, so the WP image column came out 22-31px wider
     and every aspect-ratio frame grew by the same amount.
   - The credentials ledger. auto-fit minmax() resolves to four tracks on a
     1176px frame; Astro is a two-column ledger at 14px, so the list printed
     as a dense four-up grid of 18px items.
   - Small text. The WP small preset is 13px/1.65 against Astro's text-xs
     12px/1rem, which put 5px on every caption. */
.mam-faye { column-gap: 3rem; }
.wp-block-columns:has(.mam-lead-line) { column-gap: 4rem; }
:where(.wp-block-columns:has(.mam-lead-line)) p:not(.mam-lead-line):not(.mam-imgcap) { max-width: 36rem; }
.mam-cred-title { line-height: 2rem; margin-bottom: 1.5rem; }
.mam-cred .mam-list-dash { margin-top: 0; grid-template-columns: 1fr; column-gap: 3.5rem; row-gap: 0; border-top: 1px solid var(--wp--preset--color--line); }
.mam-cred .mam-list-dash li { font-size: 0.875rem; line-height: 1.25rem; padding-block: 0.875rem; border-bottom: 1px solid var(--wp--preset--color--line); }
@media (min-width: 782px) {
  .mam-cred .mam-list-dash { grid-template-columns: 1fr 1fr; }
}
.mam-cred .mam-list-dash { margin-bottom: 0; }
/* Small type: Astro reserves text-xs 12px/16px for image captions and text-sm
   14px/1.625 for supporting copy, while the WP small preset is one 13px/1.65
   utility used for both. Split them by role rather than overriding the preset. */
.mam-imgcap { font-size: 0.75rem; line-height: 1rem; }
h3.mam-step-title { line-height: 1.375; }
.mam-row p.has-small-font-size { margin-top: 0.5rem; font-size: 0.875rem !important; line-height: 1.625 !important; }
.mam-faye p.has-small-font-size, .mam-imgcap { margin-top: 0.75rem; font-size: 0.75rem !important; line-height: 1rem !important; }

/* ---------- Round 7: hero intro measure ----------
   The ported hero lead-in carries the WP medium preset (20px) inside a 46rem
   narrow, where Astro sets it as text-lg inside max-w-2xl (18px/1.625, 42rem).
   Same copy, so the extra size only buys wrapped lines: +52px on the about hero
   at 390 and +41px on every course hero at 1440. */
.wp-block-cover.alignfull.mam-hero:not(.mam-hero-cover):not(.mam-coursehero) > .wp-block-cover__inner-container > p.mam-narrow {
  max-width: 42rem;
  font-size: 1.125rem !important;
  line-height: 1.625;
}
/* The course lead-in sits inside a max-w-3xl group but carries its own
   max-w-2xl measure in the static build. */
.wp-block-cover.alignfull.mam-hero.mam-coursehero > .wp-block-cover__inner-container > p.mam-narrow {
  max-width: 42rem;
}

/* ---------- Round 8: hero lead-in scope and mobile CTA stack ----------
   Two things the hero probe caught at 390 and 1440:
   - The course and home lead-ins sit inside a wrapping group, so the round-7
     child selector never reached them; the 20px preset survived and cost a
     wrapped line (+41px at 1440 on every course page).
   - Astro stacks the two home hero buttons full-width under 640px (mt-10,
     flex-col sm:flex-row); the block buttons row kept them side by side,
     which made the WP home hero 71px shorter than Astro's on a phone. */
.wp-block-cover.alignfull.mam-hero p.has-medium-font-size { font-size: 1.125rem !important; line-height: 1.625; }
.mam-coursehero p.has-medium-font-size { max-width: 42rem; }
.wp-block-cover.alignfull.mam-hero.mam-hero-cover > .wp-block-cover__inner-container > p.mam-narrow { max-width: 36rem; }
.mam-hero-cover > .wp-block-cover__inner-container > .wp-block-buttons { margin-top: 2.5rem; }
@media (max-width: 639px) {
  .mam-hero-cover > .wp-block-cover__inner-container > .wp-block-buttons { flex-direction: column; align-items: stretch; gap: 1rem; }
  .mam-hero-cover .wp-block-buttons > .wp-block-button { width: 100%; margin-left: 0 !important; margin-right: 0 !important; }
  .mam-hero-cover .wp-block-buttons .wp-block-button__link { width: 100%; }
}

/* ---------- Round 9: content column gutters and stacking point ----------
   Astro sets its editorial pairs on 48px gutters — 80px for Mission/Vision, 64px
   where a sidebar shares a 12-column row, 56px on the home ledgers — while the
   columns block ships the theme's 24px default, which reads as one slab at 1440.
   They also break to a single column at Astro's 1024px, not the block's 782px. */
.wp-block-columns:has(h2.mam-hairline) { gap: 3rem 5rem; }
.mam-instr, .mam-faye { gap: 3rem; }
.wp-block-columns:has(.mam-price-lg) { gap: 3rem; }
.wp-block-columns:has(.mam-h2-flat):has(.mam-ledger) { gap: 2.5rem; }
.wp-block-columns:has(.mam-h2-flat):not(:has(.mam-hairline)):not(:has(.mam-ledger)) { gap: 3rem; }
.wp-block-columns:has(figure.mam-img):has(.mam-ledger):not(.mam-faye):not(.mam-instr) { gap: 3rem; }
.wp-block-columns:has(figure.mam-img):not(:has(.mam-ledger)):not(.mam-faye):not(.mam-instr) { gap: 2.5rem 4rem; }
.wp-block-columns:has(.wpcf7) { gap: 3rem 4rem; }
.wp-block-columns:has(figure.mam-square) { gap: 3rem 4rem; }
.wp-block-columns:has(.mam-attrib) { gap: 2.5rem 3.5rem; }
.wp-block-columns:has(.mam-toc) { gap: 3rem; }
.mam-gallery, .mam-proof { gap: 2.5rem 3.5rem; }
main .wp-block-columns.mam-revcards { gap: 1.5rem 3.5rem; max-width: 64rem; }
/* Astro hangs the 40px card gutter under each rule, and a nested margin inside a
   flex column does not grow the columns block, so the band lost 40px and the link
   sat 24px under it instead of the rebuild's 88. */
main .wp-block-columns.mam-revcards { row-gap: 0; }
.mam-revcards > .wp-block-column { margin-bottom: 2.5rem; }
.mam-revcard { margin-bottom: 0; }
.mam-revcards + p.mam-arrowlink { margin-top: 3rem; }
.wp-block-column > .wp-block-columns { gap: 1.25rem; }
/* Channels strip: Astro butts the three links together on vertical hairlines, so
   the row carries no gutter at all — the 24px column gap breaks the rules apart. */
.wp-block-columns:has(.mam-channel) { gap: 0; }
@media (min-width: 782px) {
  .wp-block-columns:has(.mam-channel) > .wp-block-column + .wp-block-column { border-left: 1px solid var(--wp--preset--color--line); }
}
@media (max-width: 781px) {
  .wp-block-columns:has(.mam-channel) > .wp-block-column + .wp-block-column { border-top: 1px solid var(--wp--preset--color--line); }
}
@media (min-width: 782px) and (max-width: 1023px) {
  :where(.wp-block-columns:has(h2.mam-hairline), .mam-instr, .mam-faye,
    .wp-block-columns:has(.mam-price-lg), .wp-block-columns:has(.mam-h2-flat),
    .wp-block-columns:has(figure.mam-img), .wp-block-columns:has(.wpcf7),
    .wp-block-columns:has(figure.mam-square), .wp-block-columns:has(.mam-attrib),
    .wp-block-columns:has(.mam-toc), .mam-gallery, .mam-proof) {
    flex-wrap: wrap;
  }
  :where(.wp-block-columns:has(h2.mam-hairline), .mam-instr, .mam-faye,
    .wp-block-columns:has(.mam-price-lg), .wp-block-columns:has(.mam-h2-flat),
    .wp-block-columns:has(figure.mam-img), .wp-block-columns:has(.wpcf7),
    .wp-block-columns:has(figure.mam-square), .wp-block-columns:has(.mam-attrib),
    .wp-block-columns:has(.mam-toc), .mam-gallery, .mam-proof) > .wp-block-column {
    flex-basis: 100% !important;
  }
}

/* ---------- Round 10: course tuition card ----------
   The radius tokens only began emitting once theme.json's custom block moved
   inside settings, so this card is being measured against the static build for
   the first time: its price sat a step large, its note two steps large, and the
   CTA hugged its text instead of spanning the card. */
.mam-price-lg { font-weight: 700;  font-size: 2.25rem; line-height: 1.12; }
.mam-price-lg + p { margin-top: 0.25rem; }
.mam-card--cream-box:has(.mam-price-lg) > p:last-child {
  margin-top: 1rem;
  /* Core's font-size presets are written with !important. */
  font-size: 0.75rem !important;
  line-height: 1.625;
}
/* The "how it works" card is the wide one and carries more air in the static
   build than the tuition card beside it. */
@media (min-width: 768px) {
  .mam-card--cream-box:not(:has(.mam-price-lg)) { padding: 2.5rem; }
}
@media (min-width: 640px) and (max-width: 767px) {
  .mam-card--cream-box:not(:has(.mam-price-lg)) { padding: 2rem; }
}
.mam-card--cream-box .wp-block-buttons { display: block; margin-top: 1.5rem; }
.mam-card--cream-box .wp-block-button { width: 100%; }
.mam-card--cream-box .wp-block-button__link { width: 100%; }

/* ---------- Round 11: band seams ----------
   Core's flow layout gives every block child a 24px top margin, so each
   full-bleed band sat 24px below the last and let the page background show
   through the join. The static build's bands abut and carry their own padding. */
.entry-content > .alignfull,
.entry-content > .alignwide {
  margin-block-start: 0;
}

/* ---------- Round 12: module ledger on phones ----------
   Astro puts the numeral beside the module title and drops the description under
   both (grid-cols-[auto_1fr]). The ported columns block has no such layout: it
   stacks numeral, title and description as three flex columns with 16px gaps,
   which cost about 60px on every row and +545px down each course page at 390. */
.mam-mod-title { font-weight: 700;  line-height: 1.375; }
@media (max-width: 767px) {
  /* Core prints .wp-block-columns { display: flex } after this stylesheet, so a
     bare class selector loses the tie and the row stays stacked. */
  .wp-block-columns.mam-mod-cols {
    display: grid;
    grid-template-columns: 2rem 1fr;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
  }
  .mam-mod-cols > .wp-block-column { flex-basis: auto; min-width: 0; }
  .mam-mod-cols > .wp-block-column:nth-child(1) { grid-column: 1; grid-row: 1; }
  .mam-mod-cols > .wp-block-column:nth-child(2) { grid-column: 2; grid-row: 1; }
  .mam-mod-cols > .wp-block-column:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
  /* The rebuild holds this text at text-sm below md and only steps it up there. */
  .mam-mod-cols > .wp-block-column:nth-child(3) > p { font-size: 0.875rem; line-height: 1.625; }
}

/* The steps ledger on /contact/ is the same numeral-beside-copy row with a looser
   gutter; stacked as two flex columns it cost 46px on each of the three steps. */
@media (max-width: 767px) {
  .mam-row > .wp-block-columns:not(.mam-mod-cols):not(:has(.mam-hl-title)):has(> .wp-block-column:first-child > .mam-row-num:only-child) {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1.25rem;
    align-items: start;
  }
  .mam-row > .wp-block-columns:not(.mam-mod-cols):not(:has(.mam-hl-title)):has(> .wp-block-column:first-child > .mam-row-num:only-child) > .wp-block-column {
    flex-basis: auto;
    min-width: 0;
  }
}

/* Course rows on the home and contact ledgers: the rebuild hides the level / day
   plate below md and keeps the stacked price on a display leading, so the ported
   columns block ran 16px row gaps, a 15.2px intro and a 24px/39.6px price, about
   100px taller per row than the static build at 390. */
@media (max-width: 767px) {
  .mam-row-cols > .wp-block-column:has(.mam-row-meta) { display: none; }
  .wp-block-columns.mam-row-cols { row-gap: 0.5rem; }
  .mam-row-cols .mam-row-intro { font-size: 0.875rem; line-height: 1.625; }
  .mam-row-cols .mam-row-price { line-height: 1.35; }
  /* The numbered ledger (home) butts the price under the copy with no gap and
     keeps it right-aligned, and its numeral column is the rebuild's 2rem + 24px
     gutter, not the 2.5rem the ruled rows use elsewhere. */
  .wp-block-columns.mam-row-cols:has(.mam-row-num) { row-gap: 0; }
  .mam-row-cols:has(.mam-row-num) .mam-row-price { text-align: right; }
  .mam-row-cols > .wp-block-column:first-child {
    grid-template-columns: 2rem 1fr;
    column-gap: 1.5rem;
  }
}

/* The review wall captions are set text-sm in the rebuild, which carries a 20px
   leading; here they inherit the body's 1.65, and nine of them in a column cost
   the band its parity. */
.mam-wall figcaption { line-height: 1.25rem; }

/* ---------- Round 13: proof band and signature ledger @1440 ----------
   The wine proof band ran 27px short of the rebuild on one heading's leading and
   two rhythm steps: Astro sets this h2 at 1.375 (three lines of 49.5), hangs the
   lede 20px under it and the link 32px under that, and splits the columns 355 /
   765 rather than the ported 370 / 750. */
.mam-proof h2 { line-height: 1.375; }
.mam-proof-lede { margin-top: 1.25rem; }
.mam-proof .mam-proof-lede + p { margin-top: 2rem; }
.mam-proofgrid { column-gap: 3rem; }
/* The signature standfirst is the rebuild's md:text-[1.05rem]: 14px on phones,
   16.8 from 768 up, with the same relaxed leading. */
/* The rebuild names each booking in the display face at text-xl / md:text-2xl with
   a gold tint; the port shipped an uppercase eyebrow, which demoted the whole
   ledger and gave each row 25px of stray leading. */
.mam-proofgrid .eyebrow {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.25rem;
  line-height: 1.375;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
  color: var(--wp--preset--color--gold);
}
@media (min-width: 768px) {
  .mam-proofgrid .eyebrow { font-size: 1.5rem; }
}
/* Astro's signature ledge is a 1fr / 170px / auto grid on 2.5rem gutters. The
   ported columns block paid a 1.5rem gutter and gave the meta column 200px, so
   the standfirst had 617px instead of 672 and row two wrapped a line early. */
@media (min-width: 768px) {
  .mam-row--loose > .wp-block-columns.mam-row-cols {
    display: grid;
    grid-template-columns: 1fr 10.625rem auto;
    column-gap: 2.5rem;
  }
  /* The contact / schedule ledge is the same shape on a tighter measure: 1fr,
     a 140px level plate and the price, on 2rem gutters. As flex columns the
     plate held 200px and the copy 689, so every row carried an extra line. */
  .wp-block-columns.mam-row-cols:has(.mam-row-meta):not(:has(.mam-row-num)) {
    display: grid;
    grid-template-columns: 1fr 8.75rem auto;
    column-gap: 2rem;
    align-items: baseline;
  }
}

/* Industry highlight rows: the ported markup splits the numeral 10% / copy 90%,
   which starved the standfirst by 38px and pushed a third line onto the last
   booking; the rebuild hangs a 2rem numeral on a 1.5rem gutter with 2rem of
   vertical air, a snug display title, a 20px role line and a relaxed body. */
.mam-sec .mam-row:has(.mam-hl-title) { padding-block: 2rem; }
@media (min-width: 768px) {
  .mam-row > .wp-block-columns:has(.mam-hl-title) {
    display: grid;
    grid-template-columns: 2rem 1fr;
    column-gap: 1.5rem;
    row-gap: 0;
    align-items: start;
  }
}
.mam-hl-title { font-weight: 700;  line-height: 1.375; margin-bottom: 0; }
.mam-hl-role { line-height: 1.25rem; }
.mam-hl-role + p { margin-top: 0.75rem; line-height: 1.625; }

/* Course module ledger: the rebuild is a three-track grid — a 2rem numeral, a
   220px module name and the description on 2.5rem gutters. The ported columns
   block paid the name 187px, so four of the nine titles wrapped an extra line
   and the syllabus ran 62px past the static build. */
@media (min-width: 768px) {
  .wp-block-columns.mam-mod-cols {
    display: grid;
    grid-template-columns: 2rem 13.75rem 1fr;
    column-gap: 2.5rem;
    row-gap: 0;
    align-items: start;
  }
  .mam-mod-cols > .wp-block-column { flex-basis: auto; min-width: 0; }
}

/* ---------- Round 14: thank-you hero padding ----------
   The ported hero carries Gutenberg inline padding (11rem / 4.5rem) on the
   group itself, so only !important can put it back on Astro's steps: 160/80
   under md and 208/112 above. Scoped to the group so the home cover and the
   course hero keep their own measurements. */
section.wp-block-group.mam-hero:not(.mam-pagehero) {
  padding-top: 10rem !important;
  padding-bottom: 5rem !important;
}
section.wp-block-group.mam-hero.mam-pagehero {
  padding-top: 9rem !important;
  padding-bottom: 4rem !important;
}
@media (min-width: 768px) {
  section.wp-block-group.mam-hero:not(.mam-pagehero) {
    padding-top: 13rem !important;
    padding-bottom: 7rem !important;
  }
  section.wp-block-group.mam-hero.mam-pagehero {
    padding-top: 12rem !important;
    padding-bottom: 6rem !important;
  }
}

/* ---------- Round 15: legal pages (privacy, terms) ----------
   Astro's legal band is py-16/md:py-24 around a twelve-column grid whose prose
   column is capped at max-w-3xl (768px). The ported pair kept Gutenberg's
   75% flex basis (846px) and a single 96px padding step, so the desktop text
   ran short and the mobile text ran long. */
section:has(.mam-legal-block) {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}
@media (min-width: 768px) {
  section:has(.mam-legal-block) {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
  }
  main .wp-block-columns:has(.mam-legal-block) {
    display: grid;
    grid-template-columns: 16.125rem minmax(0, 48rem);
    column-gap: 3rem;
    align-items: start;
  }
  main .wp-block-columns:has(.mam-legal-block) > .wp-block-column {
    flex-basis: auto;
    min-width: 0;
  }
}

/* ---------- Round 16: about thrive, thank-you ledger, contact channels,
   course list headers, course detail columns ---------- */

/* Who-thrives band: Astro gives the heading 48px of air, rules every row, and
   sets the display face on a 2rem line. The ported rows lost the rule under the
   last item and the heading's step. */
section:has(.mam-thrive) > h2 { margin-bottom: 3rem; }
.mam-thrive { border-bottom: 1px solid var(--wp--preset--color--line); }
.mam-thrive h3 { line-height: 2rem; }
.mam-thrive p { line-height: 1.625; }

/* Thank-you next steps: Astro caps the band at max-w-3xl (704px of text inside
   the 768 wrap), hangs each row behind a 24px gold rule on a 20px gutter, and
   sets the row title one step smaller than the shared ledger class. */
section:has(> ol.mam-ledger) > ol.mam-ledger,
section:has(> ol.mam-ledger) > p.mam-narrow {
  max-width: 44rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
section:has(> ol.mam-ledger) > ol.mam-ledger > li.mam-row {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  column-gap: 1.25rem;
  align-items: start;
}
section:has(> ol.mam-ledger) > ol.mam-ledger > li.mam-row::before {
  content: "";
  margin-top: 0.85rem;
  height: 1px;
  background: var(--wp--preset--color--gold-ink);
}
section:has(> ol.mam-ledger) > ol.mam-ledger > li.mam-row > :is(h2, p) { grid-column: 2; }
section:has(> ol.mam-ledger) .mam-row-title { font-size: 1.25rem; line-height: 1.375; }
section:has(> ol.mam-ledger) .mam-row-intro { margin-top: 0.5rem; }

/* Channel strip: the clamp added in an earlier round shrank the value to body
   size; Astro runs 24/32 rising to 26.4 on a 1.3333 line, with 2rem of padding
   and no gutter on the outer edges. */
.mam-channel { padding: 2rem 0; }
.mam-channel-value { font-weight: 700;  font-size: 1.5rem; line-height: 2rem; }
.mam-channel-note { font-size: 0.875rem; line-height: 1.25rem; }
@media (min-width: 768px) {
  .mam-channel { padding: 2rem; }
  .mam-channel:first-child { padding-left: 0; }
  .mam-channel:last-child { padding-right: 0; }
  .mam-channel-value { font-size: 1.65rem; line-height: 1.3333; }
}

/* Course levels: Astro baseline-aligns the level name against its blurb, which
   lifts the sticky header by the display face's descender (12px). */

/* Course detail: Astro runs the syllabus on the twelve-column grid (360/768 on
   a 48px gutter) and the details band on a ten-gutter grid (264/872). The
   ported 33/67 and 25/75 flex bases moved twelve and twenty pixels of measure
   onto the wrong side, so both ledgers wrapped short. */
@media (min-width: 1024px) {
  main .mam-coursehero ~ .wp-block-group.mam-sec > .wp-block-columns {
    display: grid;
    grid-template-columns: 22.5rem minmax(0, 48rem);
    column-gap: 3rem;
    align-items: start;
  }
  main .mam-coursehero ~ .wp-block-group.mam-sec > .wp-block-columns > .wp-block-column {
    flex-basis: auto;
    min-width: 0;
  }
  main .mam-anchor-details > .wp-block-columns {
    display: grid;
    grid-template-columns: 16.5rem minmax(0, 54.5rem);
    column-gap: 2.5rem;
    align-items: start;
  }
  main .mam-anchor-details > .wp-block-columns > .wp-block-column {
    flex-basis: auto;
    min-width: 0;
  }
}

/* ---------- Round 17 ----------
   Channel strip: Astro's band is only the strip plus its bottom rule; the
   ported group carries 1rem of inline padding top and bottom. */
section:has(.mam-channel) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* The root flow layout drops 24px between main and the footer part; Astro butts
   them together, so every page ran 24px long. */
.wp-site-blocks > .wp-block-template-part { margin-block-start: 0; }

/* ---------- Round 18 ----------
   1. The thank-you steps are a real <ol>, and the browser's 40px list inset
      survived the port; Astro's reset puts the ledger flush with the frame.
   2. Astro's closing CTA stacks its two buttons full-width below the sm step;
      the ported block wrapped instead, costing 8px on every page.
   3. Only the first level header has a two-line blurb, so baseline alignment
      (which lifts the row by the display face's descender) belongs to it alone. */
ol.mam-ledger { padding-inline-start: 0; }

@media (max-width: 639px) {
  .mam-cta .wp-block-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .mam-cta .wp-block-buttons > .wp-block-button,
  .mam-cta .wp-block-buttons .wp-block-button__link { width: 100%; }
}

main .mam-level:first-of-type .wp-block-columns.mam-level-head { align-items: baseline !important; }

/* ---------- Round 19: course detail type ----------
   The details ledger values and the syllabus copy both sit a step above body
   colour in the rebuild: text-lg (18/28) for the key values and 1rem rising to
   1.05rem on a relaxed line for each module description. The port left them on
   the body default, so every row carried an extra 1.7px. */
.mam-kv-v { line-height: 1.5556; }
.mam-row-num { line-height: 1.5556; }
/* Phones stay on the Round 12 text-sm step; only md and up lifts to 1.05rem. */
@media (min-width: 768px) {
  .mam-mod-cols > .wp-block-column:last-child > p { font-size: 1.05rem; line-height: 1.625; }
}

/* ---------- Round 20 ----------
   1. Industry highlight rows: Astro keeps the numeral beside the copy at every
      width; the ported columns block stacked under its own 782px breakpoint and
      bought the text 32px of measure, losing a line per booking on phones.
   2. The policy contents list is text-sm on a 20px line in the rebuild; the
      port inherited the body's relaxed line and a half-step larger face. */
.mam-row > .wp-block-columns:has(.mam-hl-title) {
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 1.5rem;
  row-gap: 0;
  align-items: start;
}
.mam-row > .wp-block-columns:has(.mam-hl-title) > .wp-block-column { flex-basis: auto; min-width: 0; }

.mam-toc ul { font-size: 0.875rem; line-height: 1.25rem; }

/* ---------- Round 21: course detail curriculum band ----------
   Astro wraps the "what you will receive" list and the "how training works"
   card each in mt-14 (56px). The ported blocks fell back to the theme's 24px
   block gap, so the band ran 60px short at 1440 and 65px short at 390 on every
   one of the nine course pages. Scoped to the course curriculum band so the
   tuition card in the same row keeps its mt-10 (mam-mt-lg). */
main .mam-coursehero ~ .wp-block-group.mam-sec > .wp-block-columns > .wp-block-column > .mam-row + .eyebrow,
main .mam-coursehero ~ .wp-block-group.mam-sec > .wp-block-columns > .wp-block-column > ul.mam-list-dash + .mam-card {
  margin-top: 3.5rem;
}

/* Related-courses eyebrow: Astro sits it on mb-8 (32px); the port kept the
   theme's 24px gap, costing the band 8px at every width on all nine courses. */
main .mam-coursehero ~ .wp-block-group.mam-sec-md > p.eyebrow { margin-bottom: 2rem; }

/* ---------- Round 22: industry highlights band ----------
   1. The Round 12 "numeral beside copy" grid was written for the contact steps,
      which use an auto numeral track and gap-x-5. The industry rows match the
      same DOM shape but sit on Astro's w-8 numeral and gap-x-6, so the looser
      rule was winning on specificity and buying the copy 18px of measure, which
      dropped a line from booking 01 on phones. Now excluded, so Round 20 applies.
   2. Astro hangs the backstage photo under the intro on mt-10; the ported figure
      kept the theme's 24px gap and the column lost 16px. */
main section.mam-sec:has(.mam-hl-title) figure.mam-img { margin-top: 2.5rem; }

/* ---------- Round 23: industry closing pitch band ----------
   Astro sits this heading on leading-[1.35] at every width (the theme only
   reaches it above the mobile step), the intro on mt-5 and the button on mt-9.
   The port fell back to the theme's 24px block gap on both, so the band ran
   19px short at 390 and 8px short at 1440. */
main section.mam-sec-md > h2:has(+ p.mam-narrow) { line-height: 1.35; }
main section.mam-sec-md > h2 + p.mam-narrow { margin-top: 1.25rem; }
main section.mam-sec-md > p.mam-narrow + .wp-block-buttons { margin-top: 2.25rem; }

/* Core gives every .wp-block-cover min-height: 430px, which floors the interior
   page heroes on phones (their content measures 422px at 390) and made the hero
   band 8px taller than Astro on /industry and /contact. */
main .wp-block-cover.mam-pagehero { min-height: 0; }

/* ---------- Round 24: student stories ----------
   1. Astro steps the wall quotes 1.05rem -> 1.1rem at md; the port had put them
      on a vw clamp, which made every line 0.17px taller and ran 24px over the
      band by the ninth testimonial.
   2. The lead line is Tailwind text-xl (20/28) in the rebuild; the theme's 1.65
      body line made it a third of a line taller on both rows.
   3. The intro copy sits in a space-y-5 wrapper on leading-relaxed; the port
      flattened it into sibling blocks on the theme's 24px gap and 1.65 line. */
@media (min-width: 768px) { .mam-wall blockquote { font-size: 1.1rem; } }
.mam-lead-line { line-height: 1.4; }
:where(.wp-block-columns:has(.mam-lead-line)) p:not(.mam-lead-line):not(.mam-imgcap) { line-height: 1.625; }
.wp-block-columns:has(.mam-lead-line) > .wp-block-column > p + p:not(.mam-lead-line) { margin-top: 1.25rem; }

/* Student-stories wall header: Astro wraps the title and its small note in a
   gap-4 baseline row on mb-12. The ported .mam-sechead row kept the theme's
   24px gap on top of the paragraph's own 24px block gap (48px between them) and
   its 2rem bottom margin, so the header measured 17px taller than the rebuild. */
main .mam-sechead:has(+ .mam-wall) { gap: 1rem; margin-bottom: 3rem; }
main .mam-sechead:has(+ .mam-wall) > p { margin-top: 0; line-height: 1.25rem; }

/* ---------- Round 27: home photo gallery ----------
   Astro stacks the gallery on a 20px gutter (gap-5) and sets its captions at
   text-xs with a 16px line box; the port inherited the 24px theme gap and the
   1.65 body leading, which made every caption a 20px row and the whole band
   two lines taller than the static build on phones. */
.mam-gcap { line-height: 1.3333; }
main .mam-gallery > .wp-block-column > .wp-block-columns { gap: 1.25rem; }
main .mam-gallery > .wp-block-column:first-child > p { margin-top: 1.25rem; line-height: 1.625; }

/* ---------- Round 28: gallery column split + inner gutter ----------
   Astro's 12-track grid charges the 56px gutter to every track, so its photo
   column (col-span-8) lands at 765px where a plain 8/12 split gives 750; the
   nine pixels came back as nine pixels of cropped photos. The nested row also
   picked up the theme's 24px gap where Astro's grid uses gap-5. */
main .mam-gallery > .wp-block-column > .wp-block-columns { margin-top: 1.25rem; }
@media (min-width: 1024px) {
  .mam-gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 3.5rem; row-gap: 2.5rem; align-items: start; }
  .mam-gallery > .wp-block-column:first-child { grid-column: span 4; }
  .mam-gallery > .wp-block-column:last-child { grid-column: span 8; }
}

/* ---------- Round 29: about mission / vision blocks ----------
   The port hangs the hairline on the heading itself, so the 2rem pad rides with
   it; Astro's copy sits a relaxed leading above a mt-5. At six lines each the
   body leading alone was worth two pixels per block. */
main h2.mam-hairline { line-height: 1.2; }
main h2.mam-hairline + p { margin-top: 1.25rem; line-height: 1.625; }

/* ---------- Round 31: unnumbered ledger rows on phones ----------
   The 2rem numeral track and its gutter were reserved even in rows that carry no
   numeral, so the course intro wrapped one line early at 294px while the static
   build sets it across the full 334. Astro's rows also sit in px-2, which the
   port had no equivalent of. */
@media (max-width: 767px) {
  .mam-row-cols > .wp-block-column:first-child:not(:has(.mam-row-num)) { display: block; }
  .mam-row > .wp-block-columns.mam-row-cols:not(:has(.mam-row-num)) { padding-inline: 0.5rem; }
}

/* ---------- Round 32: contact inquiry rail ----------
   Astro's heading carries mb-8 into the ruled form group and its space-y-5 keeps
   a step under the submit row, because the plugin's status paragraph is the real
   last child. The port collapsed both: the rule sat 24px under the heading and
   the button ended the band. */
main .mam-hairline:has(.wpcf7-form) { margin-top: 2rem; }
form.wpcf7-form .mam-form-grid > p:has(.wpcf7-submit) { margin-bottom: 1.25rem; }

/* ---------- Round 33: the two "All 11 classes" links ----------
   Astro hides the head link below sm and prints a second copy under the ledger;
   the contact page head link is the one that always shows. The port had a single
   global hide, so phones either lost the link or, once unhidden, carried both. */
@media (max-width: 639px) {
  body.home .mam-sechead-link { display: none; }
  .mam-only-mobile { display: inline-block; }
}
main .mam-sechead { gap: 1rem; }
.mam-h2-flat { line-height: 1.2; }

/* Round 28's grid never landed: core styles the block as
   .wp-block-columns.is-layout-flex (two classes), which outranks a bare
   .mam-gallery selector, so the columns stayed flex-basis 33/67. */
@media (min-width: 1024px) {
  .mam-gallery.is-layout-flex { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 3.5rem; row-gap: 2.5rem; align-items: start; }
  .mam-gallery > .wp-block-column { flex-basis: auto; min-width: 0; }
}

/* ---------- Round 35: legal contents rail ----------
   The eyebrow that opens the contents nav picked up an em of top margin from the
   flow layout, which shifted the rail and everything beside it down twelve pixels
   on phones; the static build pins it to the band. */
main .mam-toc > p.eyebrow:first-child { margin-top: 0; }

/* ---------- Round 36: level headings ----------
   Astro steps these down to text-3xl below md, which carries a 36px line box;
   the theme's 1.15 heading leading clipped two pixels off every level rule. */
@media (max-width: 767px) {
  main .mam-level-head h2 { line-height: 1.2; }
}

/* ---------- Round 37: split card grids ----------
   The intermediate and advanced levels arrived as two columns blocks instead of
   one grid, so the seam between them took the theme's 2rem flow margin where
   Astro's gap-6 pays 1.5rem. */
main .mam-level > .mam-course-row + .mam-course-row { margin-top: 1.5rem; }

/* ---------- Round 38: hero CTAs on phones ----------
   Astro stacks the hero buttons in a column, where the flex default stretches
   each one across the measure; core pins its button wrapper to inline-flex with
   a max-width, so the port's second button hugged its label. */
@media (max-width: 639px) {
  .mam-hero .wp-block-buttons { align-items: stretch; }
  .mam-hero .wp-block-buttons > .wp-block-button { width: 100%; max-width: 100%; }
  .mam-hero .wp-block-button .wp-block-button__link,
  .mam-hero .wp-block-button .mam-btn { box-sizing: border-box; width: 100%; justify-content: center; }
}

/* ---------- Round 39: current-page tint in the header ----------
   Astro paints the active link gold; the ported header is plain markup with no
   menu state, so functions.php now stamps a mam-on-<section> body class and this
   is where it is read. */
body.mam-on-home .mam-nav :is(.mam-nav-links,.mam-mobile-menu) a[href$=".local/"],
body.mam-on-about .mam-nav :is(.mam-nav-links,.mam-mobile-menu) a[href$="/about/"],
body.mam-on-classes .mam-nav :is(.mam-nav-links,.mam-mobile-menu) a[href$="/classes/"],
body.mam-on-student-stories .mam-nav :is(.mam-nav-links,.mam-mobile-menu) a[href$="/student-stories/"],
body.mam-on-industry .mam-nav :is(.mam-nav-links,.mam-mobile-menu) a[href$="/industry/"] { color: var(--wp--preset--color--gold); }
/* ---------- Round 40: ledger closing rule + steps head gap ----------
   Astro's ledgers are a container border-top plus a border-bottom on every row,
   so the group always closes. The port puts the rule on the row's leading edge,
   which loses the closing line whenever the last row is followed by something
   that is not a row (the wine card, the mobile arrow link). The .mam-assure
   block is excluded: there the container carries the closing rule, as in Astro. */
.mam-row:not(:has(+ .mam-row)):not(.mam-assure .mam-row) {
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.mam-row--dark:not(:has(+ .mam-row)):not(.mam-assure .mam-row) {
  border-bottom-color: rgb(255 255 255 / 0.15);
}
/* The steps head is a direct sibling of its rows here, where the theme's flow
   spacing gives 24px; Astro hangs the ledger 32px under the heading. */
main .mam-h2-flat + .mam-row { margin-top: 2rem; }
/* ---------- Round 41: the assurance ledger closed twice ----------
   Astro closes this ledger with the container's own bottom rule and hangs a top
   rule on each row. The port does the same, but the generic last-row rule fired
   as well, so the band ended on two adjacent hairlines. */
.mam-assure .mam-row:last-child { border-bottom: 0; }
/* ---------- Round 42: the channel strip lost every gutter ----------
   Astro's three channels are siblings in one grid, so dropping the padding on
   the outer edges keeps the text off the dividers. Here each anchor is the only
   child of its own column, so :first-child and :last-child matched all three and
   the phone / email / studio values ran straight into the rules. Address the
   edges through the columns instead. */
@media (min-width: 768px) {
  main .wp-block-columns > .wp-block-column > .mam-channel { padding-inline: 2rem; }
  main .wp-block-columns > .wp-block-column:first-child > .mam-channel { padding-left: 0; }
  main .wp-block-columns > .wp-block-column:last-child > .mam-channel { padding-right: 0; }
}
/* ---------- Round 43: the two ledger splits ----------
   Both of these bands are a twelve-track grid in Astro with the ledger on the
   far side of the gutter. The port kept Gutenberg's percentage flex bases, which
   charged the gutter to the wrong column: the industry measure ran 12px wide and
   its intro lost a wrap, and the contact steps column took 24px it should not
   have. Grid also lets the industry panel stick the way Astro's does. */
@media (min-width: 1024px) {
  body.mam-on-industry main .wp-block-columns:has(> .mam-ledger),
  body.mam-on-contact main .wp-block-columns:has(> .mam-ledger) {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: 2.5rem;
  }
  body.mam-on-industry main .wp-block-columns:has(> .mam-ledger) > .wp-block-column,
  body.mam-on-contact main .wp-block-columns:has(> .mam-ledger) > .wp-block-column {
    flex-basis: auto;
    min-width: 0;
  }
  body.mam-on-industry main .wp-block-columns:has(> .mam-ledger) { column-gap: 3rem; }
  body.mam-on-industry main .wp-block-columns:has(> .mam-ledger) > .wp-block-column:first-child {
    grid-column: span 5;
    align-self: start;
    position: sticky;
    top: 6rem;
  }
  body.mam-on-industry main .wp-block-columns:has(> .mam-ledger) > .mam-ledger { grid-column: span 7; }
  body.mam-on-contact main .wp-block-columns:has(> .mam-ledger) { column-gap: 4rem; }
  body.mam-on-contact main .wp-block-columns:has(> .mam-ledger) > .wp-block-column:first-child { grid-column: span 7; }
  body.mam-on-contact main .wp-block-columns:has(> .mam-ledger) > .mam-ledger { grid-column: span 5; }
}
/* ---------- Round 44: the highlight gutter ----------
   Astro hangs the numeral 40px clear of the entry at md and up; the port kept the
   24px mobile gap, which bought the text sixteen pixels of measure and dropped a
   wrap from the third highlight. */
@media (min-width: 768px) {
  main .mam-ledger > .mam-row > .wp-block-columns:has(.mam-hl-title) { column-gap: 2.5rem; }
}

/* ---------- Round 45: footer frame follows the same growth curve ----------
   Below 1280 the footer box is the 71.25rem wrap; above it Astro lets the
   frame grow to 1400px so the gutters widen instead of the measure. */
@media (min-width: 1280px) {
  .mam-footer__grid,
  .mam-footer__bottom-inner { max-width: min(87.5rem, calc(40rem + 41.6667vw)); }
}
