/* ==========================================================================
   Miss Pepper AI — Editorial design system
   Styles the component classes the page editor writes inside body copy:
   hero image, CTA blocks, proof grids, compare columns, callouts, section
   breaks, founder line. Before this sheet existed these rendered as bare divs.
   Everything draws from tokens.css — no ad-hoc hex.
   ========================================================================== */

/* --- Rhythm ----------------------------------------------------------- */
.mp-content .mp-section-break {
  height: 1px;
  margin-block: clamp(2.25rem, 5vw, 3.5rem);
  background: linear-gradient(90deg, transparent, var(--mp-line) 22%, var(--mp-line) 78%, transparent);
}

.mp-content .mp-eyebrow {
  margin-bottom: 0.5rem;
  color: var(--mp-orange);
  font-family: var(--mp-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: var(--mp-tracking-copy);
  text-transform: uppercase;
}
.mp-content .mp-eyebrow strong { font-weight: 700; }

.mp-content .mp-lead {
  color: var(--mp-ink);
  font-size: 1.24rem;
  line-height: 1.55;
}

/* --- In-body hero image ------------------------------------------------ */
/* Only shows on pages whose hero design has no image slot; the parameterized
   silo hero lifts this image out and uses it as the hero background instead. */
.mp-content .mp-hero-img { margin-block: 0 1.75rem; }
.mp-content .mp-hero-img img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--mp-border-subtle);
  border-radius: var(--mp-radius-panel);
}

/* --- Section media ----------------------------------------------------- */
/* A section illustration that the following copy wraps around, alternating
   sides down the page. Floated rather than gridded so it needs no wrapper
   element — the editor just drops a figure after the heading. Stacks to a
   full-width banner below the wide breakpoint. */
.mp-content .mp-section-media {
  margin: 0 0 1.5rem;
  border-radius: var(--mp-radius-panel);
  overflow: hidden;
}
.mp-content .mp-section-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--mp-border-subtle);
  border-radius: var(--mp-radius-panel);
}
.mp-content .mp-section-media figcaption {
  margin-top: 0.55rem;
  color: var(--mp-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
@media (min-width: 64rem) {
  .mp-content .mp-section-media--right {
    float: right;
    width: 40%;
    margin: 0.35rem 0 1.5rem 2.25rem;
  }
  .mp-content .mp-section-media--left {
    float: left;
    width: 40%;
    margin: 0.35rem 2.25rem 1.5rem 0;
  }
  /* A floated image must not bleed past its own section into the next one. */
  .mp-content--wide > h2 { clear: both; }
}

/* --- CTA blocks -------------------------------------------------------- */
.mp-content .mp-cta-block { margin-block: 1.75rem; }
.mp-content .mp-cta-block--center { text-align: center; }

.mp-content .mp-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  color: #fff;
  font-family: var(--mp-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: var(--mp-cta-grad);
  border: 1px solid var(--mp-cta-border);
  border-radius: var(--mp-radius-cta);
  box-shadow: var(--mp-cta-glow);
  transition: transform .22s var(--mp-ease), box-shadow .22s var(--mp-ease), filter .22s var(--mp-ease);
}
.mp-content .mp-cta-btn:hover,
.mp-content .mp-cta-btn:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.mp-content .mp-cta-btn--big { padding: 1.05rem 2rem; font-size: 1.02rem; }
.mp-content .mp-cta-btn::after { content: "\2192"; font-size: 1.15em; line-height: 1; }

.mp-content .mp-cta-sub {
  margin: 0.7rem 0 0;
  color: var(--mp-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* --- Proof / feature card grids ---------------------------------------- */
.mp-content .mp-proof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-block: 1.75rem;
}
.mp-content .mp-proof-card {
  padding: 1.35rem 1.4rem;
  background: linear-gradient(180deg, var(--mp-panel-fill-1), var(--mp-panel-fill-2));
  border: 1px solid var(--mp-panel-border);
  border-radius: var(--mp-radius-panel);
  box-shadow: var(--mp-shadow-panel);
}
.mp-content .mp-proof-card > h3,
.mp-content .mp-proof-card > h4 {
  margin: 0 0 0.5rem;
  color: var(--mp-ink);
  font-family: var(--mp-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}
.mp-content .mp-proof-card > p {
  margin: 0;
  color: var(--mp-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.mp-content .mp-proof-card > :last-child { margin-bottom: 0; }

/* Numbered discipline cards ("01 · Technical SEO"). The number becomes a badge
   so the card heading carries the name alone. */
.mp-content .mp-proof-card--numbered { position: relative; padding-top: 1.4rem; }
.mp-content .mp-proof-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  margin-bottom: 0.75rem;
  color: var(--mp-orange);
  font-family: var(--mp-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 107, 0, 0.12);
  border: 1px solid rgba(255, 138, 35, 0.38);
  border-radius: 0.5rem;
}

/* --- Compare columns (do nothing / book the call) ----------------------- */
.mp-content .mp-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-block: 1.75rem;
}
.mp-content .mp-compare__col {
  padding: 1.5rem;
  background: linear-gradient(180deg, var(--mp-panel-fill-1), var(--mp-panel-fill-2));
  border: 1px solid var(--mp-panel-border);
  border-radius: var(--mp-radius-panel);
}
.mp-content .mp-compare__col > h3 {
  margin: 0 0 0.85rem;
  font-family: var(--mp-display);
  font-size: 1.12rem;
  font-weight: 600;
}
.mp-content .mp-compare__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.mp-content .mp-compare__col li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--mp-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.mp-content .mp-compare__col li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}
/* The status quo reads as cost; the offer reads as movement. */
.mp-content .mp-compare__col--old { border-color: rgba(232, 238, 245, 0.14); opacity: 0.92; }
.mp-content .mp-compare__col--old > h3 { color: var(--mp-muted); }
.mp-content .mp-compare__col--old li::before { content: "\00d7"; color: var(--mp-muted); }
.mp-content .mp-compare__col--new {
  border-color: rgba(255, 138, 35, 0.45);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(255, 107, 0, 0.12), transparent 60%),
    linear-gradient(180deg, var(--mp-panel-fill-1), var(--mp-panel-fill-2));
}
.mp-content .mp-compare__col--new > h3 { color: var(--mp-ink); }
.mp-content .mp-compare__col--new li::before { content: "\2713"; color: var(--mp-orange); }

/* --- Callout icon/body (the base .mp-callout lives in article.css) ------ */
.mp-content .mp-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.mp-content .mp-callout__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--mp-green);
  font-size: 0.95rem;
  font-weight: 700;
  background: rgba(38, 208, 145, 0.14);
  border-radius: 50%;
}
.mp-content .mp-callout--watch .mp-callout__icon { color: var(--mp-warn); background: rgba(255, 181, 71, 0.14); }
.mp-content .mp-callout--take  .mp-callout__icon { color: var(--mp-blue-active); background: rgba(22, 143, 214, 0.16); }
.mp-content .mp-callout__body { margin: 0; color: var(--mp-muted); line-height: 1.6; }
.mp-content .mp-callout__body strong { color: var(--mp-ink); }

/* --- Founder line ------------------------------------------------------ */
.mp-content .mp-founder-line {
  margin-block: 1.5rem 0;
  color: var(--mp-muted);
  font-size: 0.92rem;
  font-style: italic;
  text-align: center;
}

/* --- FAQ wrapper ------------------------------------------------------- */
/* inc/faq.php converts these Q&A pairs into the <details> accordion; the
   leftover wrapper must not add a second box around it. */
.mp-content .mp-faq-accordion { display: contents; }

/* --- Wider bleed for grids, once there is room ------------------------- */
/* .mp-content is a 45rem measure — right for prose, cramped for a 3-up grid.
   Capped at 58rem so it always fits inside the 84rem shell. */
@media (min-width: 64rem) {
  .mp-content .mp-proof-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mp-content .mp-proof-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-content .mp-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-content .mp-proof-grid,
  .mp-content .mp-compare {
    position: relative;
    left: 50%;
    width: 58rem;
    transform: translateX(-50%);
  }
  /* Money pages put a sticky CTA rail beside the copy, so the column is already
     off-centre — bleeding there just leaves the grids hanging left of their own
     heading. Keep them aligned to the text column instead. */
  .mp-artgrid--rail .mp-content .mp-proof-grid,
  .mp-artgrid--rail .mp-content .mp-compare {
    position: static;
    left: auto;
    width: auto;
    transform: none;
  }
}
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .mp-content .mp-proof-grid--3,
  .mp-content .mp-proof-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-content .mp-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Composed-page chrome — the theme slots that now carry page-supplied copy
   ========================================================================== */

/* Editorial headlines are whole sentences, not the two or three words the hero
   prototypes were drawn around. Size them down so they still fit the frame.
   Specificity deliberately matches hero-scale.css's `.mp-hero.mp-hero--silo`
   rule, which would otherwise win and print a four-line headline at 6rem. */
.mp-hero.mp-hero--silo.mp-hero--composed .mp-hero__headline {
  font-size: clamp(1.6rem, 2.85vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
}
.mp-hero.mp-hero--composed .mp-hero__content { width: min(38rem, 55vw); }
.mp-hero.mp-hero--composed .mp-hero__subcopy { max-width: 33rem; }

@media (max-width: 60rem) {
  .mp-hero.mp-hero--composed .mp-hero__content { width: auto; }
  .mp-hero.mp-hero--silo.mp-hero--composed .mp-hero__headline { font-size: clamp(1.5rem, 6.6vw, 2.15rem); }
}

/* ==========================================================================
   Full-width pillar body
   The 45rem measure plus a sticky rail left too much dead space on desktop, so
   composed pillars use the whole shell. Prose still gets a readable measure
   inside that column; grids, cards and images take all of it.
   ========================================================================== */
.mp-artgrid--full { display: block; }
.mp-content--wide { max-width: none; }
.mp-content--wide > p,
.mp-content--wide > ul,
.mp-content--wide > ol,
.mp-content--wide > blockquote,
.mp-content--wide > h2,
.mp-content--wide > h3,
.mp-content--wide > h4 {
  max-width: 58rem;
}
/* Prose that wraps a floated section image drops the measure cap. The cap is
   resolved against the container's LEFT edge, so a left-floated figure would
   otherwise squeeze the wrapped lines into a narrow ribbon and strand a dead
   gutter on the right. Without the cap the line box is bounded by the float on
   one side and the column edge on the other, which lands ~48rem either way.
   inc/page-compose.php tags the run between a figure and the next h2. */
@media (min-width: 64rem) {
  .mp-content--wide > .mp-wrap { max-width: none; }
}
/* Section headings anchor the full-width blocks beneath them. */
.mp-content--wide > h2 {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
}
/* The bleed trick is for the narrow measure only — nothing to escape here. */
.mp-content--wide .mp-proof-grid,
.mp-content--wide .mp-compare {
  position: static;
  left: auto;
  width: auto;
  transform: none;
}
@media (min-width: 64rem) {
  .mp-content--wide .mp-proof-grid,
  .mp-content--wide .mp-compare { width: auto; }
}

/* ==========================================================================
   FAQ — three across
   inc/faq.php renders the Q&A as <details> items; a single tall column of 60+
   questions was the worst of the dead space. Masonry-ish columns keep an open
   answer from pushing its neighbours around.
   ========================================================================== */
/* base.css sets `.mp-content .mp-faq__list` to flex-column — match that
   specificity (this sheet loads later, so it wins the tie) or `display: grid`
   is ignored and only the alignment lands, shrink-wrapping every item. */
.mp-content .mp-faq__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}
@media (min-width: 48rem) {
  .mp-content .mp-faq__list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (min-width: 64rem) {
  .mp-content .mp-faq__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.mp-content .mp-faq__item { height: fit-content; }
.mp-content .mp-faq__q { font-size: 0.94rem; line-height: 1.35; }
.mp-content .mp-faq__a { font-size: 0.9rem; line-height: 1.6; }
.mp-hero__ctanote {
  margin: 0.85rem 0 0;
  max-width: 34rem;
  color: var(--mp-muted);
  font-family: var(--mp-body);
  font-size: 0.86rem;
  line-height: 1.5;
}

/* Bespoke prototype heroes. Their own sheets size the headline at
   `.mp-silo--{slug} .hero__headline` (0,2,0) and several cap it at a very
   narrow max-width — both drawn around two- or three-word headlines. Matching
   through `.mp-silo` puts these at (0,3,0) so they win on specificity rather
   than on stylesheet order. */
.mp-silo .hero__headline.is-composed,
.mp-silo .hero-copy__headline.is-composed,
.mp-silo .copy-stack h1.is-composed {
  max-width: 26rem;
  font-size: clamp(1.5rem, 2.35vw, 2.2rem);
  line-height: 1.14;
  letter-spacing: -0.005em;
}
.mp-silo .hero__headline.is-composed span,
.mp-silo .hero-copy__headline.is-composed span,
.mp-silo .copy-stack h1.is-composed span { display: block; }

@media (max-width: 60rem) {
  .mp-silo .hero__headline.is-composed,
  .mp-silo .hero-copy__headline.is-composed,
  .mp-silo .copy-stack h1.is-composed {
    max-width: none;
    font-size: clamp(1.45rem, 6.2vw, 2rem);
  }
}

/* Trust block + choice cards, when fed from the page's own copy. */
.mp-trusthow__note {
  margin: 1.6rem auto 0;
  max-width: 46rem;
  color: var(--mp-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}
.mp-choice__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.mp-choice__list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--mp-muted);
  font-size: 0.97rem;
  line-height: 1.55;
}
.mp-choice__list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--mp-orange);
  font-weight: 700;
}
.mp-choice--keep .mp-choice__list li::before { content: "\00d7"; color: var(--mp-muted); }
.mp-choice__note {
  margin: 0.9rem 0 0;
  color: var(--mp-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* ---------------------------------------------------------------------------
 * Spoke hub — the pillar's index of its own silo children, plus the related
 * grid's up/down bands. Both draw from the dark panel tokens: this is a dark
 * theme, so --mp-ink is near-WHITE. An invented light surface here rendered the
 * links almost invisible.
 * ------------------------------------------------------------------------- */
.mp-hubsec { padding-top: 0; }
.mp-hub__title {
  margin: 0 0 1.2rem;
  color: var(--mp-ink);
  font-family: var(--mp-display);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.2;
}
.mp-hub {
  margin: 0 0 2.6rem;
  padding: clamp(1.35rem, 2vw, 2rem);
  color: var(--mp-ink);
  background: linear-gradient(180deg, var(--mp-panel-fill-1), var(--mp-panel-fill-2));
  border: 1px solid var(--mp-panel-border);
  border-radius: var(--mp-radius-panel);
}
.mp-content .mp-hub { color: var(--mp-ink); }
.mp-hub__intro {
  margin: 0 0 1.6rem;
  color: var(--mp-muted);
  font-size: 1rem;
  line-height: 1.55;
}
.mp-hub__group { margin: 0 0 1.5rem; }
.mp-hub__group:last-child { margin-bottom: 0.2rem; }
.mp-hub__label {
  margin: 0 0 0.7rem;
  font-family: var(--mp-display);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mp-orange);
  font-weight: 700;
}
.mp-hub__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 2rem;
}
.mp-hub__list li { margin: 0; padding: 0; }
.mp-hub__list li::before { content: none; }
.mp-hub__list a,
.mp-content .mp-hub__list a {
  display: block;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--mp-border-subtle);
  color: var(--mp-ink);
  text-decoration: none;
  font-size: 0.97rem;
  line-height: 1.45;
}
.mp-hub__list a:hover,
.mp-hub__list a:focus,
.mp-content .mp-hub__list a:hover,
.mp-content .mp-hub__list a:focus {
  color: var(--mp-orange-hot);
  text-decoration: underline;
}
@media (min-width: 48rem) { .mp-hub__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .mp-hub__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Topic rung renders as pills, so it reads as a different kind of link. */
.mp-hub__list--topics { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mp-hub__list--topics a,
.mp-content .mp-hub__list--topics a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--mp-line);
  border-radius: 999px;
  font-size: 0.9rem;
}
.mp-hub__list--topics a:hover,
.mp-hub__list--topics a:focus,
.mp-content .mp-hub__list--topics a:hover,
.mp-content .mp-hub__list--topics a:focus {
  border-color: var(--mp-orange);
  color: var(--mp-orange-hot);
  text-decoration: none;
}
.mp-hub__count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mp-muted);
  background: rgba(162, 207, 231, 0.13);
  border-radius: 999px;
  padding: 0.05rem 0.42rem;
}

/* --- Related grid: up / across / down bands ------------------------------ */
.mp-relgrid__band { margin: 0 0 2rem; }
.mp-relgrid__band:last-child { margin-bottom: 0; }
.mp-relgrid__band-label {
  margin: 0 0 0.85rem;
  font-family: var(--mp-display);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mp-orange);
  font-weight: 700;
}
