/**
 * CP · Prose Section — self-contained styles (token-driven, brand-agnostic).
 * Scoped under .cp-prose-section. Ported from the shared `.head` / `.prose` /
 * `.warranty__list` rules used across the approved service pages.
 */
.cp-prose-section {
  --ps-fg: var(--wp--preset--color--text);
  --ps-primary: var(--wp--preset--color--primary);
  --ps-white: var(--wp--preset--color--white);
  --ps-display: var(--wp--preset--font-family--barlow-condensed);
  --ps-body: var(--wp--preset--font-family--roboto);
  --ps-cream: #FFF9F0;
  --ps-check-fg: #1C1C1C;
  --ps-body-fg: #444444;
  --ps-max: 1100px;
  padding: var(--cp-section-py, 80px) clamp(24px, 5vw, 80px);
}
.cp-prose-section.is-surface-white { background: var(--ps-white); }
.cp-prose-section.is-surface-cream { background: var(--ps-cream); }
.cp-prose-section.is-surface-grey { background: var(--wp--preset--color--on-surface); }

.cp-prose-section .head { max-width: var(--ps-max); margin: 0 auto; }
.cp-prose-section .eyebrow {
  font-family: var(--ps-body); font-weight: 600; font-size: 11px; line-height: 24px;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--ps-fg); margin: 0;
}
.cp-prose-section .head h2 {
  font-family: var(--ps-display); font-weight: 700; font-size: var(--cp-h2, clamp(28px, 4vw, 44px));
  line-height: var(--cp-h2-line, 1.1); letter-spacing: -0.005em; color: var(--ps-fg); margin: 11px 0 0;
}
.cp-prose-section .head h2 em { font-style: normal; color: var(--cp-em, var(--ps-primary)); }
.cp-prose-section .head__lead {
  font-family: var(--ps-body); font-size: 17px; line-height: 27.2px;
  /* The full content width, as the Playbook sets it on every hub's outage section
     and on the Services, Products, Installation, Maintenance and Repair leads. It
     was capped at 760px, which wrapped the lead at half the width of the paragraphs
     under it (client review 2026-09-22). Centred sections keep their own 720px. */
  color: var(--ps-fg); margin: 12px 0 0; max-width: none;
}

.cp-prose-section .prose { max-width: var(--ps-max); margin: 20px auto 0; }
.cp-prose-section .prose p {
  font-family: var(--ps-body); font-size: 16px; line-height: 27.2px; color: var(--ps-fg); margin: 0;
}
.cp-prose-section .prose p + p { margin-top: 16px; }
.cp-prose-section .prose a:not(.btn) { color: var(--cp-ink-accent, var(--ps-primary)); text-decoration: underline; }
/* The Playbook's uppercase rule link (client audit W6). */
.cp-prose-section .prose a.link-rule { color: var(--ps-fg); text-decoration: none; }

.cp-prose-section .warranty__list { margin-top: 18px; display: flex; flex-direction: column; }
.cp-prose-section .warranty__item {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  font-family: var(--ps-body); font-weight: 500; font-size: 16px; color: var(--ps-check-fg);
}
.cp-prose-section .warranty__check {
  width: 18px; height: 18px; flex-shrink: 0; background: var(--cp-fill, var(--ps-primary)); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ps-white); font-size: 11px; font-weight: 700; line-height: 1;
}

/* is-cols-2: the checklist in two columns, the Playbook's .warranty__list grid
   (the Maintenance membership checklist, the Repair warning signs; client audit
   SV2); one column below 640px. */
.cp-prose-section.is-cols-2 .warranty__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin-top: 20px; }
.cp-prose-section.is-cols-2 .warranty__item { align-items: flex-start; }
@media (max-width: 640px) { .cp-prose-section.is-cols-2 .warranty__list { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 980px) { .cp-prose-section.is-cols-2.is-stack-980 .warranty__list { grid-template-columns: 1fr; gap: 0; } }

/* Optional outlined button under the section header. */
.cp-prose-section .btn--secondary {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 24px;
  font-family: var(--ps-body); font-weight: 600; font-size: 15px; line-height: 1;
  padding: 13px 22px; border-radius: 4px; text-decoration: none;
  background: var(--ps-white); color: var(--wp--custom--color--secondary-fg); border: 1px solid var(--cp-fill, var(--ps-primary));
}
.cp-prose-section .btn--secondary:hover { background: var(--ps-cream); }

/* Centred variant with an optional icon — the landing page's install band. */
.cp-prose-section.is-centred .head,
.cp-prose-section.is-centred .prose { text-align: center; }
.cp-prose-section.is-centred .head__lead,
.cp-prose-section.is-centred .prose p { margin-left: auto; margin-right: auto; max-width: 720px; }
.cp-prose-section .section__icon { width: 52px; height: 52px; color: var(--ps-primary); margin: 0 0 14px; }
.cp-prose-section.is-centred .section__icon { margin-left: auto; margin-right: auto; }
.cp-prose-section .section__icon svg { width: 100%; height: 100%; display: block; }

/* Copy-first CTA (is-cta-after): the primary button under the checklist. */
.cp-prose-section .prose__ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.cp-prose-section .prose__ctas .btn--secondary { margin-top: 0; }
.cp-prose-section .btn--primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ps-body); font-weight: 600; font-size: 15px; line-height: 1;
  padding: 13px 22px; border: 0; border-radius: 4px; text-decoration: none; white-space: nowrap;
  background: var(--ps-primary); color: var(--wp--custom--color--on-primary);
}
.cp-prose-section .btn--primary:hover { background: var(--wp--custom--color--primary-hover); color: var(--cp-on-primary-hover, var(--wp--custom--color--on-primary)); }
/* A pull quote in the body copy (p.prose__quote). */
.cp-prose-section .prose .prose__quote { font-style: italic; color: var(--ps-body-fg); border-left: 3px solid var(--ps-primary); padding-left: 16px; }


/* A hub's outage intro carries on into its stat tiles: in both Playbooks one
   section, the tiles 40px under the last paragraph. The tiles block opens with
   no top padding of its own, so the prose closes on 40px (re-audit SA9). */
.cp-prose-section:has(+ .cp-stat-tiles:not(.has-head)) { padding-bottom: 40px; }

/* A city page's outage record is the Playbooks' .stats__lead, 19px on 30.4px
   in both brands (re-audit SA8). The city builder anchors it `outages`. */
.cp-prose-section#outages .head__lead { font-size: 19px; line-height: 30.4px; }

/* An optional photo beside the copy (the Playbook's .media-grid; Generator One's
   A Canter Brand intro). Ported from cp-media-callout's media-grid rules. */
.cp-prose-section .media-grid {
  max-width: var(--ps-max); margin: 24px auto 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 48px; align-items: center;
}
.cp-prose-section .media-grid .prose { margin-top: 0; }
.cp-prose-section .media-grid__img { width: 100%; height: auto; border-radius: 8px; border: 1px solid #E5E3DF; }
@media (max-width: 900px) { .cp-prose-section .media-grid { grid-template-columns: 1fr; gap: 28px; } }

/* is-cta-link: the head's link as a text link under the lead (Optimize staging
   re-audit SV6). */
.cp-prose-section .head__more { font-family: var(--ps-body, var(--wp--preset--font-family--roboto)); font-size: 16px; line-height: 27.2px; margin: 16px 0 0; }
.cp-prose-section .head__more a { color: var(--cp-ink-accent, var(--ps-primary)); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cp-prose-section .head__more a:hover { color: var(--cp-hover, var(--wp--custom--color--link-hover)); }

/* brand.php `layout` => 'media-stack-480' (body.cp-lo-media-stack-480): the
   stacked photo held to 480px (Optimize's Commercial & Industrial; staging
   audit R3; blocks/cp-media-callout carries the same rule). */
@media (max-width: 900px) { body.cp-lo-media-stack-480 .cp-prose-section .media-grid__img { max-width: 480px; } }

/* brand.php `layout` => 'prose-btn-flush' (body.cp-lo-prose-btn-flush): outlined
   buttons set inside a paragraph of the copy sit on that paragraph's own
   spacing, as the Optimize Playbook's `.prose p > .btn`; the block's 24px above
   each is for the button under a section header (Repair, Warranty,
   Maintenance; staging audit K, 18 Nov 2026). */
body.cp-lo-prose-btn-flush .cp-prose-section .prose p > .btn--secondary { margin-top: 0; }

/* brand.php `layout` => 'checks-compact' (body.cp-lo-checks-compact): the
   checklist as the Optimize Playbook's `.warranty__list`: 13px under the copy,
   each line 15px on 22.5px with 5px above and below (the block's is 16px on
   24px with 6px, 3.5px a line more; staging audit K, 18 Nov 2026). */
body.cp-lo-checks-compact .cp-prose-section .warranty__list { margin-top: 13px; }
body.cp-lo-checks-compact .cp-prose-section .warranty__item { font-size: 15px; line-height: 22.5px; padding: 5px 0; }

/* is-lead-body: the lead as body copy, 16px, 16px under the heading (20px when
   a text link follows it, the Playbook's `.prose`); is-cta-primary: the head's
   button is the primary button, 28px under the copy (Optimize's Products
   guidance band and Commercial page; staging audit K, 18 Nov 2026). */
.cp-prose-section.is-lead-body .head__lead { font-size: 16px; margin-top: 16px; }
.cp-prose-section.is-lead-body .head__more { margin-top: 16px; }
.cp-prose-section.is-lead-body:has(.head__more) .head__lead { margin-top: 20px; }
.cp-prose-section.is-cta-primary .head > .btn--primary { margin-top: 28px; }

/* brand.php `layout` => 'hub-outage' (body.cp-lo-hub-outage): a hub's outage
   intro over its stat tiles as the Optimize Playbook's `.stats__intro`: the
   lead 19px on 30.4px and each paragraph after it 15px on 25.5px, 8px apart
   (hubs; staging audit K, 18 Nov 2026). */
body.cp-lo-hub-outage .cp-prose-section:has(+ .cp-stat-tiles.has-aside) .head__lead { font-size: 19px; line-height: 30.4px; }
body.cp-lo-hub-outage .cp-prose-section:has(+ .cp-stat-tiles.has-aside) .prose { margin-top: 8px; }
body.cp-lo-hub-outage .cp-prose-section:has(+ .cp-stat-tiles.has-aside) .prose p { font-size: 15px; line-height: 25.5px; }
body.cp-lo-hub-outage .cp-prose-section:has(+ .cp-stat-tiles.has-aside) .prose p + p { margin-top: 8px; }

/* A second, dark button beside the after-button, and is-note-after: the body
   as fine print under the buttons (Ambrose's service plans). */
.cp-prose-section .prose__ctas .btn--dark {
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--ps-body); font-weight: 600;
  font-size: 15px; line-height: 1; padding: 13px 22px; border: 0; border-radius: 4px; text-decoration: none; white-space: nowrap;
  background: var(--wp--preset--color--secondary); color: var(--wp--preset--color--white);
}
.cp-prose-section .prose__ctas .btn--dark:hover { background: var(--wp--preset--color--black); }
.cp-prose-section.is-note-after .prose__ctas { margin-top: 0; }
.cp-prose-section.is-note-after .prose__ctas + p { margin-top: 16px; font-size: 13px; line-height: 20px; font-style: italic; }
