/**
 * CP · Warranty Band — self-contained styles (token-driven, brand-agnostic).
 * Scoped under the block root .cp-warranty-band so the block is reusable on any
 * page, independent of the homepage's .cp-home scope. Ported from the .warranty*
 * rules in assets/css/homepage.css.
 */
.cp-warranty-band {
  --wb-fg: var(--wp--preset--color--text);
  --wb-ink: #1C1C1C;
  --wb-primary: var(--wp--preset--color--primary);
  --wb-white: var(--wp--preset--color--white);
  --wb-display: var(--wp--preset--font-family--barlow-condensed);
  --wb-body: var(--wp--preset--font-family--roboto);
  --wb-border: #E5E3DF;
  --wb-radius: 4px;
  background: var(--wb-white);
  border-top: 1px solid var(--wb-border);
  border-bottom: 1px solid var(--wb-border);
  padding: 73px clamp(24px, 8vw, 286px);
}
.cp-warranty-band .warranty__inner {
  max-width: 940px; margin: 0 auto; display: grid;
  grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: center;
}
.cp-warranty-band .warranty__badge { width: 220px; height: 202px; display: block; }
.cp-warranty-band .warranty__badge img { width: 100%; height: 100%; object-fit: contain; }
.cp-warranty-band .warranty__copy h2 {
  font-family: var(--wb-display); font-weight: 700; font-size: 36px; line-height: 37.8px;
  text-transform: uppercase; color: var(--wb-fg); margin: 0;
}
.cp-warranty-band .warranty__copy h2 .red { color: var(--wb-primary); display: block; }
.cp-warranty-band .warranty__lead {
  font-family: var(--wb-body); font-size: 15px; line-height: 24.75px; color: var(--wb-fg); margin-top: 13px;
}
.cp-warranty-band .warranty__finance { font-family: var(--wb-body); font-size: 15px; line-height: 24px; color: var(--wb-fg); margin-top: 18px; }
.cp-warranty-band .warranty__finance a { color: var(--wb-fg); text-decoration: underline; }
.cp-warranty-band .warranty__list { margin-top: 13px; display: flex; flex-direction: column; gap: 0; }
.cp-warranty-band .warranty__item {
  display: flex; align-items: center; gap: 10px; padding: 5px 0;
  font-family: var(--wb-body); font-weight: 500; font-size: 15px; color: var(--wb-ink);
}
.cp-warranty-band .warranty__check {
  width: 18px; height: 18px; flex-shrink: 0; background: var(--cp-fill, var(--wb-primary)); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--wb-white);
  font-size: 11px; font-weight: 700; line-height: 1;
}
.cp-warranty-band .warranty__cta {
  margin-top: 16px; align-self: flex-start; background: var(--wb-primary); color: var(--wp--custom--color--on-primary);
  font-family: var(--wb-body); font-weight: 600; font-size: 15px; line-height: 1; border: 0;
  border-radius: var(--wb-radius); padding: 12px 20px; display: inline-flex; text-decoration: none;
}
/* The hover a brand names (brand.php `colour_roles` hover): unset, the button
   keeps its fill and ink, as before. */
.cp-warranty-band .warranty__cta:hover { background: var(--cp-hover, var(--wb-primary)); color: var(--cp-on-hover, var(--wp--custom--color--on-primary)); }
@media (max-width: 900px) {
  .cp-warranty-band .warranty__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  /* The badge centres; the copy under it reads left-aligned, as in both
     Playbooks (`.warranty__copy { text-align: left }`, staging review 29 Oct 2026). */
  .cp-warranty-band .warranty__copy { text-align: left; justify-self: stretch; }
  /* The band centres on mobile, but the check list must stay left-justified:
     centring ragged rows leaves every wrapped item hanging off its own check. */
  .cp-warranty-band .warranty__list { text-align: left; align-self: start; }
  /* Specificity beats homepage.css's `.cp-home .warranty__item { align-items: center }`,
     which is equal-weight and would otherwise win on load order alone. */
  .cp-warranty-band .warranty__list .warranty__item { text-align: left; align-items: flex-start; }
  /* Keep the check aligned to the first line, not the middle of a wrapped item. */
  .cp-warranty-band .warranty__list .warranty__check { margin-top: 2px; }
}
@media (max-width: 600px) {
  .cp-warranty-band .warranty__copy h2 { font-size: 28px; line-height: 1.15; }
}

/* is-dark: the band on the brand's dark surface, as Midwest's Playbook draws it
   (.section.warranty: Firefly, a white 40px title in title case, the list in two
   columns with ticks). The colours come from brand.php `band_css`, so a brand
   that sets none keeps the white band. Audit W6, 3 Nov 2026. */
.cp-warranty-band.is-dark {
  --wb-fg: var(--wb-white);
  --wb-ink: var(--wb-white);
  background: var(--cp-band-dark, var(--wp--preset--color--accent));
  border-top: 0; border-bottom: 0;
}
.cp-warranty-band.is-dark .warranty__inner { max-width: 1100px; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
.cp-warranty-band.is-dark .warranty__badge { width: 240px; height: auto; }
.cp-warranty-band.is-dark .warranty__copy h2 { font-size: 40px; line-height: 44px; text-transform: none; color: var(--wb-white); }
.cp-warranty-band.is-dark .warranty__copy h2 .red { color: inherit; display: inline; }
.cp-warranty-band.is-dark .warranty__lead { font-size: 17px; line-height: 27.2px; margin-top: 14px; max-width: 680px; color: var(--cp-band-dark-lead, var(--wp--preset--color--contrast-3)); }
.cp-warranty-band.is-dark .warranty__finance,
.cp-warranty-band.is-dark .warranty__finance a { color: var(--cp-band-dark-lead, var(--wp--preset--color--contrast-3)); }
.cp-warranty-band.is-dark .warranty__list { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.cp-warranty-band.is-dark .warranty__item { padding: 0; align-items: flex-start; font-weight: 600; line-height: 24px; }
.cp-warranty-band.is-dark .warranty__check { width: auto; height: auto; background: none; border-radius: 0; font-size: 15px; line-height: 24px; color: var(--wp--preset--color--secondary); }
.cp-warranty-band.is-dark .warranty__cta { margin-top: 26px; }
@media (max-width: 900px) {
  .cp-warranty-band.is-dark .warranty__inner { grid-template-columns: 1fr; gap: 28px; }
  .cp-warranty-band.is-dark .warranty__copy h2 { font-size: 28px; line-height: 1.15; }
}
@media (max-width: 600px) {
  .cp-warranty-band.is-dark .warranty__list { grid-template-columns: 1fr; }
}

/* brand.php `layout` => 'warranty-flush' (body.cp-lo-warranty-flush): the lead
   and the financing line carry no margin below them, as the Optimize Playbook's
   reset leaves them; the browser's own 1em otherwise adds 17px to the band
   (staging audit K, 18 Nov 2026). */
body.cp-lo-warranty-flush .cp-warranty-band .warranty__lead,
body.cp-lo-warranty-flush .cp-warranty-band .warranty__finance { margin-bottom: 0; }
