/* ==========================================================================
   Miss Pepper AI — Article / universal template layer (redesign spec v2)
   Loads globally after chrome.css. Components: reading column, kicker,
   article H1, featured-image treatment, takeaways card, TOC rail, sticky CTA
   rail, inline CTA, callouts, pull quote, stat cards, related grid, trust
   block, positioning band, flywheel, nav CTA button.
   Tokens only — no ad-hoc hex (Art Bible rule).
   ========================================================================== */

/* --- Reading column ---------------------------------------------------- */
/* The wall-of-text fix: body copy measures ~68ch, centered when no rail.   */
.mp-content {
  max-width: 45rem;
  margin-inline: auto;
  font-size: 1.125rem;
  line-height: 1.7;
}
.mp-content > p { margin-block: 0 1.5rem; }
.mp-content h2 { scroll-margin-top: calc(var(--mp-topbar-h) + 1.25rem); }

/* --- Kicker + article title -------------------------------------------- */
.mp-kicker {
  margin: 0;
  font-family: var(--mp-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mp-orange);
}
.mp-kicker a { color: inherit; }
.mp-kicker a:hover { color: var(--mp-orange-hot); }

.mp-arttitle {
  margin: 0.6rem 0 0;
  font-family: var(--mp-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: none;
}

/* --- Featured image (16:9, soft bottom fade into the page) ------------- */
.mp-pagefeat { max-width: 45rem; }
.mp-pagefeat__fig {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--mp-radius-panel);
  border: 1px solid var(--mp-border-subtle);
}
.mp-pagefeat__img { width: 100%; height: 100%; object-fit: cover; }
.mp-pagefeat__fig::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 28%;
  background: linear-gradient(180deg, rgba(5, 17, 27, 0), rgba(5, 17, 27, 0.55));
  pointer-events: none;
}

/* --- Key takeaways card (only renders when supplied via meta) ----------- */
.mp-content .mp-takeaways {
  margin: 0 0 2.25rem;
  padding: 1.4rem 1.6rem;
  background: var(--mp-card);
  border: 1px solid var(--mp-border-subtle);
  border-left: 3px solid var(--mp-orange);
  border-radius: var(--mp-radius-panel);
}
.mp-content .mp-takeaways__head {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mp-orange);
}
.mp-content .mp-takeaways__list { margin: 0; padding-left: 1.1rem; }
.mp-content .mp-takeaways__list li { margin-bottom: 0.5rem; font-size: 1rem; }
.mp-content .mp-takeaways__list li:last-child { margin-bottom: 0; }

/* --- Article grid: TOC left rail (posts + spoke pages) ------------------ */
/* DOM order is content-first; the rail is placed by explicit grid column.  */
.mp-artgrid .mp-toc { display: none; }
@media (min-width: 64rem) {
  .mp-artgrid--toc {
    display: grid;
    grid-template-columns: 14rem minmax(0, 45rem);
    justify-content: center;
    column-gap: 3.25rem;
  }
  .mp-artgrid--toc > .mp-content { grid-column: 2; grid-row: 1; margin-inline: 0; }
  .mp-artgrid--toc > .mp-toc {
    display: block;
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: calc(var(--mp-topbar-h) + 1.5rem);
    align-self: start;
    max-height: calc(100vh - var(--mp-topbar-h) - 3rem);
    overflow-y: auto;
  }
}
.mp-toc__head {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mp-muted);
}
.mp-toc__list { margin: 0; padding: 0; list-style: none; }
.mp-toc__list li { margin: 0 0 0.55rem; }
.mp-toc__list a {
  display: block;
  padding-left: 0.85rem;
  border-left: 2px solid var(--mp-border-subtle);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--mp-muted);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.mp-toc__list a:hover,
.mp-toc__list a:focus-visible {
  color: var(--mp-ink);
  border-left-color: var(--mp-orange);
}

/* --- Article grid: sticky CTA rail (the 4 money pillars only) ----------- */
.mp-ctarail { display: none; }
@media (min-width: 64rem) {
  .mp-artgrid--rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 17rem;
    column-gap: 3.25rem;
  }
  .mp-artgrid--rail > .mp-content { grid-column: 1; grid-row: 1; }
  .mp-artgrid--rail > .mp-ctarail { display: block; grid-column: 2; grid-row: 1; }
  .mp-ctarail__card {
    position: sticky;
    top: calc(var(--mp-topbar-h) + 1.5rem);
    padding: 1.5rem;
    background: var(--mp-card);
    border: 1px solid rgba(255, 107, 0, 0.5);
    border-radius: var(--mp-radius-panel);
  }
}
.mp-ctarail__head {
  margin: 0 0 0.5rem;
  font-family: var(--mp-display);
  font-size: 1.15rem;
  font-weight: 700;
}
.mp-ctarail__line { margin: 0 0 1.15rem; font-size: 0.92rem; color: var(--mp-muted); }
.mp-cta.mp-ctarail__btn {
  min-width: 0;
  width: 100%;
  height: 3.3rem;
  padding: 0 1.2rem;
  gap: 0.7rem;
  font-size: 0.88rem;
}

/* --- Inline CTA (one per money page, mid-article) ----------------------- */
.mp-content .mp-inlinecta {
  margin: 2.75rem 0;
  padding: 2rem 1.75rem;
  text-align: center;
  background: var(--mp-card);
  border: 1px solid rgba(255, 107, 0, 0.5);
  border-radius: var(--mp-radius-panel);
}
.mp-content .mp-inlinecta__head {
  margin: 0 0 0.5rem;
  font-family: var(--mp-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}
.mp-content .mp-inlinecta__line {
  margin: 0 auto 1.35rem;
  max-width: 34rem;
  font-size: 0.98rem;
  color: var(--mp-muted);
}
.mp-cta.mp-inlinecta__btn {
  min-width: 0;
  height: 3.4rem;
  padding: 0 1.8rem;
  gap: 0.8rem;
  font-size: 0.92rem;
}

/* --- Callouts: do this / watch out / Miss Pepper take ------------------- */
.mp-content .mp-callout {
  margin: 2.25rem 0;
  padding: 1.35rem 1.6rem;
  background: var(--mp-card);
  border: 1px solid var(--mp-border-subtle);
  border-left-width: 3px;
  border-radius: var(--mp-radius-panel);
}
.mp-content .mp-callout__head {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.mp-content .mp-callout > :last-child { margin-bottom: 0; }
.mp-content .mp-callout--do    { border-left-color: var(--mp-green); }
.mp-content .mp-callout--do    .mp-callout__head { color: var(--mp-green); }
.mp-content .mp-callout--watch { border-left-color: var(--mp-warn); }
.mp-content .mp-callout--watch .mp-callout__head { color: var(--mp-warn); }
.mp-content .mp-callout--take  { border-left-color: var(--mp-blue-active); }
.mp-content .mp-callout--take  .mp-callout__head { color: var(--mp-blue-active); }

/* --- Pull quote --------------------------------------------------------- */
.mp-content .mp-pullquote {
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 4px solid var(--mp-orange);
  font-family: var(--mp-display);
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  font-weight: 500;
  line-height: 1.4;
}

/* --- Stat cards (real case-study numbers ONLY — no invented figures) ---- */
.mp-content .mp-statrow,
.mp-statrow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin: 2.25rem 0;
  padding: 0;
  list-style: none;
}
.mp-stat {
  padding: 1.4rem 1.5rem;
  background: var(--mp-card);
  border: 1px solid var(--mp-border-subtle);
  border-radius: var(--mp-radius-panel);
}
.mp-stat__num {
  display: block;
  font-family: var(--mp-display);
  font-size: clamp(2.2rem, 3.4vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--mp-orange);
}
.mp-stat__delta { display: inline-block; margin-left: 0.4rem; font-size: 1rem; font-weight: 700; color: var(--mp-green); }
.mp-stat__label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mp-muted);
}
.mp-stat__src { display: block; margin-top: 0.4rem; font-size: 0.75rem; font-style: italic; color: var(--mp-muted); }

/* --- Related grid ("Keep reading") -------------------------------------- */
.mp-relgrid { padding-block: clamp(2.5rem, 5vw, 4rem); }
.mp-relgrid__title {
  margin: 0 0 1.5rem;
  font-family: var(--mp-display);
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 700;
}
.mp-relgrid__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem;
}
.mp-relcard {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--mp-card);
  border-color: var(--mp-border-subtle);
  transition: transform 0.2s var(--mp-ease), border-color 0.2s var(--mp-ease);
}
.mp-relcard:hover,
.mp-relcard:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 0, 0.55);
}
.mp-relcard__kick {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mp-orange);
}
.mp-relcard__title {
  font-family: var(--mp-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
}
.mp-relcard__desc { font-size: 0.88rem; line-height: 1.55; color: var(--mp-muted); }
.mp-relcard__more { margin-top: auto; font-size: 0.85rem; font-weight: 600; color: var(--mp-blue-active); }
.mp-relcard:hover .mp-relcard__more { color: var(--mp-orange-hot); }

/* --- Trust block: "How this works with your team" ----------------------- */
.mp-trusthow__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem;
  margin-top: clamp(1.75rem, 3vw, 2.75rem);
}
.mp-trusthow__item { display: flex; flex-direction: column; gap: 0.6rem; }
.mp-trusthow__icon { display: inline-flex; width: 2.4rem; height: 2.4rem; color: var(--mp-orange); }
.mp-trusthow__icon svg { width: 100%; height: 100%; }
.mp-trusthow__head {
  margin: 0;
  font-family: var(--mp-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.3;
}
.mp-trusthow__body { margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--mp-muted); }

/* --- Service pillar: pains + proof (Sonic Boom sections 2-3) -------------- */
.mp-svcpains__list { max-width: 46rem; margin-top: clamp(1.5rem, 2.5vw, 2.25rem); }
.mp-svcpains__contrast {
  margin: 1.9rem 0 0;
  max-width: 46rem;
  font-family: var(--mp-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.mp-svcproof .mp-statrow { margin-top: clamp(1.5rem, 2.5vw, 2.25rem); }
.mp-svcproof__foot { margin: 1.6rem 0 0; font-size: 0.95rem; font-weight: 600; }
.mp-svcproof__foot a { color: var(--mp-blue-active); transition: color 0.18s ease; }
.mp-svcproof__foot a:hover { color: var(--mp-orange-hot); }

/* --- Positioning band ---------------------------------------------------- */
.mp-posband {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(180deg, var(--mp-surface), var(--mp-navy));
  border-top: 1px solid var(--mp-border-subtle);
  border-bottom: 1px solid var(--mp-border-subtle);
}
.mp-posband__inner { text-align: center; }
.mp-posband__line {
  margin: 0;
  font-family: var(--mp-display);
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.mp-posband__sub { margin: 0.6rem 0 0; font-size: 1rem; color: var(--mp-muted); }
.mp-posband__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.mp-posband__chip {
  padding: 0.35rem 0.95rem;
  border: 1px solid var(--mp-panel-border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mp-muted);
}

/* --- Flywheel ------------------------------------------------------------ */
.mp-flywheel__flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.9rem;
  margin: clamp(1.75rem, 3vw, 2.75rem) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
@media (min-width: 64rem) {
  .mp-flywheel__flow { grid-template-columns: repeat(4, 1fr); gap: 2.1rem; }
}
.mp-flywheel__step { position: relative; display: flex; flex-direction: column; gap: 0.55rem; }
/* Connector arrows: down on mobile, right on desktop. */
.mp-flywheel__step:not(:last-child)::after {
  content: "\2193";
  position: absolute;
  left: 50%;
  bottom: -1.65rem;
  transform: translateX(-50%);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--mp-orange);
}
@media (min-width: 64rem) {
  .mp-flywheel__step:not(:last-child)::after {
    content: "\2192";
    left: auto;
    right: -1.75rem;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}
.mp-flywheel__num {
  font-family: var(--mp-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--mp-orange);
}
.mp-flywheel__label {
  margin: 0;
  font-family: var(--mp-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}
.mp-flywheel__desc { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--mp-muted); }
.mp-flywheel__exit {
  margin: clamp(1.75rem, 3vw, 2.5rem) auto 0;
  max-width: 42rem;
  text-align: center;
  font-size: 0.98rem;
  color: var(--mp-muted);
}

/* --- Offer card link (homepage services) --------------------------------- */
.mp-cap .mp-kicker { margin-bottom: 0.15rem; }
.mp-cap__link {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--mp-blue-active);
  transition: color 0.18s ease;
}
.mp-cap__link:hover,
.mp-cap__link:focus-visible { color: var(--mp-orange-hot); }

/* --- Offers pricing line (homepage services) ----------------------------- */
.mp-offers__pricing {
  margin: 1.9rem 0 0;
  text-align: center;
  font-size: 0.98rem;
  color: var(--mp-muted);
}
.mp-offers__pricing strong { color: var(--mp-ink); }

/* --- Nav CTA button ------------------------------------------------------ */
.mp-menu .mp-menu-cta > a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.15rem;
  background: var(--mp-cta-grad);
  border: 1px solid var(--mp-cta-border);
  border-radius: var(--mp-radius-cta);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: filter 0.18s var(--mp-ease), transform 0.18s var(--mp-ease);
}
.mp-menu .mp-menu-cta > a:hover,
.mp-menu .mp-menu-cta > a:focus-visible {
  filter: saturate(1.05) brightness(1.08);
  transform: translateY(-1px);
}

/* --- In-content typography (the solid-pillar fix, 2026-08-02) ------------ */
/* The body HTML of service pillars is plain h2/h3/p/ul from the editor —
   this layer gives it the design system's rhythm without touching content. */

.mp-content > p:first-of-type {
  font-size: 1.28rem;
  line-height: 1.6;
  color: var(--mp-muted);
}

.mp-content h2:not(.mp-faq__title) {
  margin: 3.4rem 0 1.1rem;
  font-family: var(--mp-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
}
/* Orange tick above each section heading — the designed section anchor. */
.mp-content h2:not(.mp-faq__title)::before {
  content: "";
  display: block;
  width: 2.6rem;
  height: 3px;
  margin-bottom: 0.9rem;
  border-radius: 2px;
  background: var(--mp-orange);
}
.mp-content > h2:first-child { margin-top: 0; }

.mp-content h3 {
  margin: 2.3rem 0 0.8rem;
  font-family: var(--mp-display);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.3;
}
.mp-content h4 {
  margin: 1.9rem 0 0.6rem;
  font-family: var(--mp-display);
  font-weight: 600;
  font-size: 1.02rem;
}

.mp-content ul:not([class]),
.mp-content ol:not([class]) {
  margin: 0 0 1.6rem;
  padding-left: 1.4rem;
}
.mp-content ul:not([class]) li,
.mp-content ol:not([class]) li { margin-bottom: 0.6rem; }
.mp-content ul:not([class]) li::marker,
.mp-content ol:not([class]) li::marker { color: var(--mp-orange); font-weight: 700; }
/* The silo editor wraps li content in <p> — collapse the double spacing. */
.mp-content li > p { margin: 0; }

.mp-content blockquote {
  margin: 2.5rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 4px solid var(--mp-orange);
  font-family: var(--mp-display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.45;
}
.mp-content blockquote p { margin: 0 0 0.75rem; font-size: inherit; }
.mp-content blockquote p:last-child { margin-bottom: 0; }

.mp-content table {
  width: 100%;
  margin: 2.25rem 0;
  border-collapse: collapse;
  background: var(--mp-card);
  border: 1px solid var(--mp-border-subtle);
  font-size: 0.95rem;
}
.mp-content th {
  padding: 0.8rem 1rem;
  text-align: left;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mp-muted);
  border-bottom: 1px solid var(--mp-panel-border);
}
.mp-content td {
  padding: 0.8rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--mp-border-subtle);
}

.mp-content img {
  margin: 2rem auto;
  border-radius: var(--mp-radius-panel);
  border: 1px solid var(--mp-border-subtle);
}
.mp-content hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--mp-border-subtle);
}
.mp-content p:empty { display: none; }

/* --- Motion safety ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .mp-toc__list a,
  .mp-relcard,
  .mp-menu .mp-menu-cta > a { transition: none; }
  .mp-relcard:hover { transform: none; }
}
