/**
 * CanterPower Blocks — enhancement CSS.
 *
 * Only what theme.json cannot express lives here: responsive layout fixes,
 * the review-slider carousel, hero heights, navigation hover, footer chrome,
 * the squeeze-template modal, and card read-more clamping. Design tokens
 * (colors, fonts, spacing, radii) belong in theme.json, not here.
 */

/* One vertical rhythm for every cp-* section: 80px, 56px on phones, as both
   Playbooks run it (--section-py). Blocks read it with an 80px fallback. */
:root { --cp-section-py: 80px; }
@media (max-width: 640px) { :root { --cp-section-py: 56px; } }

/* An uppercase link on a brand-colour rule: the Playbook's `.link-rule`, used for
   inline links in body copy and FAQ answers and for card foot links. */
.link-rule,
a.link-rule {
  font-family: var(--wp--preset--font-family--roboto); font-weight: 700; font-size: 12px; line-height: 1.6;
  letter-spacing: 0.5px; text-transform: uppercase; text-decoration: none;
  color: var(--wp--preset--color--text); border-bottom: 2px solid var(--cp-accent, var(--wp--preset--color--primary)); padding-bottom: 3px;
}
a.link-rule:hover { color: var(--wp--custom--color--link-hover); }
/* A brand whose Playbook sets no `.link-rule` (Midwest) reads a link inside
   running copy as part of the sentence: a card body, a prose paragraph, an FAQ
   answer or a list item keeps the paragraph's face, size, weight and colour,
   underlined so it still reads as a link (WCAG 1.4.1). Card foot links and
   the funnel labels sit outside a paragraph and are untouched. The body class
   comes from brand.php `inline_links` => 'plain' (cp_blocks_phone_band_body_class();
   staging audit W13); the element selector outranks the blocks' own
   `.cp-x .y a.link-rule` colour rules. */
body.cp-inline-links-plain p a.link-rule,
body.cp-inline-links-plain li a.link-rule {
  font: inherit; letter-spacing: inherit; text-transform: none; color: inherit;
  border-bottom: 0; padding-bottom: 0; text-decoration: underline; text-underline-offset: 2px;
}
body.cp-inline-links-plain p a.link-rule:hover,
body.cp-inline-links-plain li a.link-rule:hover { color: var(--wp--preset--color--primary); }

/* A brand whose Playbook sets a link inside running copy in the brand colour at
   600, without an underline (Generator One's `.prose p a`; brand.php
   `inline_links` => 'bold', staging audit W8). The weight is the cue that it
   is a link, so it is kept on hover, where the underline returns. */
body.cp-inline-links-bold .cp-prose-section .prose p a:not(.btn),
body.cp-inline-links-bold .cp-feature-cards .different-card__body a,
body.cp-inline-links-bold .cp-faqs .faq__answer a {
  font-size: inherit; line-height: inherit; letter-spacing: inherit; text-transform: none;
  color: var(--wp--preset--color--primary); font-weight: 600; text-decoration: none; border-bottom: 0; padding-bottom: 0;
}
body.cp-inline-links-bold .cp-prose-section .prose p a:not(.btn):hover,
body.cp-inline-links-bold .cp-feature-cards .different-card__body a:hover,
body.cp-inline-links-bold .cp-faqs .faq__answer a:hover { text-decoration: underline; }
/* A brand whose Playbook sets a link inside running copy at 600 and underlined,
   in its link ink (Optimize's `.faq__item a, .prose a:not(.btn)`; brand.php
   `inline_links` => 'semibold', staging re-audit N1). The colour is the blocks'
   own rule, through `colour_roles` ink-accent. */
body.cp-inline-links-semibold .cp-prose-section .prose a:not(.btn),
body.cp-inline-links-semibold .cp-faqs .faq__answer a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
/* The same link inside a feature card's copy or a section lead, where the seed
   marks it `.link-rule`: the Playbook's `.different-card__body a, .head__lead a`
   is the sentence-case link above, not the uppercase link on a rule (staging
   re-audit W13). Only under `inline_links` => 'semibold'. */
body.cp-inline-links-semibold .cp-feature-cards .different-card__body a,
body.cp-inline-links-semibold .cp-feature-cards .different__intro a,
body.cp-inline-links-semibold [class*="cp-"] .head__lead a {
  font-family: inherit; font-size: inherit; line-height: inherit; letter-spacing: inherit; text-transform: none;
  color: var(--cp-ink-accent, var(--wp--preset--color--primary)); font-weight: 600;
  border-bottom: 0; padding-bottom: 0; text-decoration: underline; text-underline-offset: 2px;
}
body.cp-inline-links-semibold .cp-feature-cards .different-card__body a:hover,
body.cp-inline-links-semibold .cp-feature-cards .different__intro a:hover,
body.cp-inline-links-semibold [class*="cp-"] .head__lead a:hover { color: var(--cp-hover, var(--wp--custom--color--link-hover)); }
/* A brand whose primary colour is a fill and never a letter (Ambrose: Orange is
   2.86:1 on white; brand.php `primary_fill_only`). Every rule below otherwise
   sets text in the primary on a light surface: those letters take the Ink
   (`text`) and a link keeps an orange rule under it, as the Playbook's
   `.link-rule` and `.head h2 em` draw it. Icons, stars, toggles and numerals on
   dark keep the orange (graphics, 3:1 on dark). */
body.cp-primary-fill-only .cp-feature-cards .different-card__link,
body.cp-primary-fill-only .cp-feature-cards .different__more a,
body.cp-primary-fill-only .cp-find-us .findus__eyebrow,
body.cp-primary-fill-only .cp-find-us .findus__phone,
body.cp-primary-fill-only .cp-find-us .findus__info a.findus__phone.cps-phone-number,
body.cp-primary-fill-only .cp-form-slot .formslot__badge,
body.cp-primary-fill-only .cp-legal .legal__placeholder-badge,
body.cp-primary-fill-only .cp-offer-cards .offer__statement .red,
body.cp-primary-fill-only .cp-offer-cards .offer-card__tag,
body.cp-primary-fill-only .cp-partner-band .recognition__eyebrow,
body.cp-primary-fill-only .cp-partner-split .eyebrow--red,
body.cp-primary-fill-only .cp-split-media .eyebrow--red,
body.cp-primary-fill-only .cp-pricing-table .psize-row__amount,
body.cp-primary-fill-only .cp-pricing-table .psize-row--featured .psize-row__kw span,
body.cp-primary-fill-only .cp-pricing-table .psize-row--featured .psize-row__class,
body.cp-primary-fill-only .cp-pricing-table .price-card .price-card__label,
body.cp-primary-fill-only .cp-service-grid .service-card__num,
body.cp-primary-fill-only .cp-service-grid .service-card__spec,
body.cp-primary-fill-only .cp-service-grid.is-spec-lines .head__lead,
body.cp-primary-fill-only .cp-model-grids .cp-service-grid:not(.is-spec-lines) .service-card__spec,
body.cp-primary-fill-only .cp-stat-tiles .stats-band__num,
body.cp-primary-fill-only .cp-stat-tiles .stats__aside-note strong,
body.cp-primary-fill-only .cp-team .eyebrow,
body.cp-primary-fill-only .cp-warranty-compare .wchart__row--featured .wchart__cost,
body.cp-primary-fill-only .cp-home .eyebrow--red,
body.cp-primary-fill-only .site-header .nav__links a.is-current,
body.cp-primary-fill-only .footer__endorse { color: var(--wp--preset--color--text); }
body.cp-primary-fill-only .cp-faqs .faq__answer a,
body.cp-primary-fill-only .cp-prose-section .prose a:not(.btn),
body.cp-primary-fill-only .cp-chip-grid .acc-more a,
body.cp-primary-fill-only .cp-geo-cards .geo-note a,
body.cp-primary-fill-only .cp-partner-band .recognition__links a,
body.cp-primary-fill-only .cp-partner-band .recognition__card-link,
body.cp-primary-fill-only .cp-geo-cards .geo-card__link,
body.cp-primary-fill-only .cp-state-cards .state-card__link,
body.cp-primary-fill-only .cp-home .state-card__link,
body.cp-primary-fill-only .cp-service-grid .service-card__link,
body.cp-primary-fill-only .cp-value-cards.is-variant-funnel .value-card__go.link-rule {
  color: var(--wp--preset--color--text); text-decoration: underline;
  text-decoration-color: var(--wp--preset--color--primary); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
/* The emphasis word in a section heading on a light surface: Ink on a 4px
   orange rule (the Playbook's `.head h2 em`; brand.php `emphasis_rule`). The
   colour itself comes from --cp-em (brand.php `emphasis`). */
body.cp-em-rule :is(.head, .service-blk__intro, .split__copy, .partner__copy, .stats__intro, .who__body, .prose) h2 em,
body.cp-em-rule .cp-warranty-compare .wchart__title em,
body.cp-em-rule .cp-pricing-table .pricing__title em,
body.cp-em-rule .cp-geo-cards .geo-subheading em,
body.cp-em-rule .cp-outage-tracker h2 em,
body.cp-em-rule .cp-find-us h2 em,
body.cp-em-rule .cp-partner-band h2 em {
  border-bottom: 4px solid var(--cp-em-rule, var(--wp--preset--color--primary));
}
/* A second header and footer button (brand.php `header_cta2`; Ambrose's Annual
   Maintenance, owner, 4 Nov 2026): the Playbook's .btn--dark, Charcoal Navy
   with white type. */
body .site-header a.nav__cta.nav__cta--dark,
body .footer a.footer__cta.footer__cta--dark,
body .site-header .nav__links.is-open a.nav__mfoot-cta.nav__mfoot-cta--dark {
  background: var(--wp--preset--color--secondary); color: var(--wp--preset--color--white);
}
body .site-header a.nav__cta.nav__cta--dark:hover,
body .footer a.footer__cta.footer__cta--dark:hover,
body .site-header .nav__links.is-open a.nav__mfoot-cta.nav__mfoot-cta--dark:hover {
  background: var(--wp--preset--color--black); color: var(--wp--preset--color--white);
}
.site-header .nav__cta + .nav__cta--dark { margin-left: 10px; }
.footer .footer__cta + .footer__cta--dark { margin-left: 10px; }
@media (max-width: 980px) { body .site-header a.nav__cta.nav__cta--dark { display: none; } }
/* The topbar on a fill-only primary (Ambrose's orange band): Ink labels, numbers
   and rule, as the Playbook's .topbar, since white on the orange is 2.86:1. */
body.cp-primary-fill-only .site-header .topbar,
body.cp-primary-fill-only .site-header .topbar a { color: var(--wp--custom--color--on-primary); }
body.cp-primary-fill-only .site-header .topbar__item + .topbar__item { border-left-color: var(--wp--custom--color--on-primary); }
body.cp-primary-fill-only .footer__bottom,
body.cp-primary-fill-only .footer__bottom a { color: var(--wp--custom--color--on-primary); }
body.cp-primary-fill-only .footer .wp-block-social-links .wp-social-link { color: var(--wp--custom--color--on-primary); }
/* Card foot links on the uppercase rule (Generator One's Playbook `.link-rule`
   on the funnel, coverage and brand cards; brand.php `card_links` => 'rule',
   staging audit W7). */
body.cp-card-links-rule .cp-value-cards.is-variant-funnel .value-card__go,
body.cp-card-links-rule .cp-value-cards.is-variant-funnel .value-card__go.link-rule,
body.cp-card-links-rule .cp-geo-cards .geo-card__link,
body.cp-card-links-rule .cp-partner-band .recognition__card-link,
body.cp-card-links-rule .cp-service-grid .service-card__link {
  align-self: flex-start; font-family: var(--wp--preset--font-family--roboto); font-weight: 700; font-size: 12px; line-height: 1.6;
  letter-spacing: 0.5px; text-transform: uppercase; color: var(--wp--preset--color--text);
  border-bottom: 2px solid var(--cp-accent, var(--wp--preset--color--primary)); padding-bottom: 3px;
}
body.cp-card-links-rule .cp-partner-band .recognition__card-link { align-self: center; }
/* The service and product cards carry the same rule (full-site re-audit W10);
   their link sits 4px under the body, as the Playbook's .service-card__link. */
body.cp-card-links-rule .cp-service-grid .service-card__link { margin-top: 4px; }
body.cp-card-links-rule .cp-service-grid .service-card__link:hover { color: var(--wp--preset--color--primary); }
/* brand.php `layout` => 'card-link-rules' (body.cp-lo-card-link-rules): the
   coverage, state and service card links sit on a 2px rule in the brand colour,
   as the Optimize Playbook's `.geo-card__link`, `.state-card__link` and
   `.service-card__link`; the label keeps the block's own size and its ink
   (`colour_roles` ink-strong), and the recognition card link stays plain, as
   the Playbook's (staging re-audit W7). */
body.cp-lo-card-link-rules .cp-geo-cards:is(.is-variant-split, .is-variant-region) .geo-card__link,
body.cp-lo-card-link-rules .cp-state-cards .state-card__link,
body.cp-lo-card-link-rules .cp-service-grid .service-card__link {
  align-self: flex-start; width: fit-content; border-bottom: 2px solid var(--cp-accent, var(--wp--preset--color--primary)); padding-bottom: 3px;
}
/* Only the map split's and the region band's cards carry the rule, as the
   Playbook's `.link-rule` cards; a plain coverage grid (Services and Products
   pages) keeps the block's own link (staging audit K, 18 Nov 2026). */
body.cp-lo-card-link-rules .cp-geo-cards:is(.is-variant-split, .is-variant-region) .geo-card:not(.geo-card--soon) .geo-card__link { color: var(--cp-ink-strong, var(--cp-ink-accent, var(--wp--preset--color--primary))); }

/* iOS Safari inflates text in landscape unless told not to (client audit WK1). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* --- WordPress overrides --- */
.wp-block-cover .wp-block-embed {
  min-height: 220px;
}

/* Button hover color choice from the editor (button-hover.js). */
.wp-block-button[style*="--wp--button-hover-bg"]:hover .wp-block-button__link {
  background-color: var(--wp--button-hover-bg) !important;
}
.wp-block-button[style*="--wp--button-hover-text"]:hover .wp-block-button__link {
  color: var(--wp--button-hover-text) !important;
}

/* Remove odd block spacing above footer. */
.wp-site-blocks > footer {
  margin-top: 0;
}

iframe {
  max-width: 100%;
}

.wp-block-cover {
  margin-block-start: 0;
  margin-block-end: 0;
}

.wp-block-separator {
  width: 100%;
  max-width: 100%;
}

/* --- Utility classes --- */
.home-gen-img {
  position: relative;
  top: 64px;
}

.no-padding-group {
  padding: 0;
  margin-block-start: 0;
}

/* Full-bleed CanterPower sections butt directly against each other.
 *
 * Each cp-* block root carries its own vertical padding, so the layout's
 * default block gap between them renders as a 24px seam of page background.
 * Between two light sections that is invisible; either side of a dark one —
 * the hero, the CTA band — it reads as a white stripe.
 *
 * Core sets the gap with `:root :where(.is-layout-flow|constrained) > *`,
 * specificity (0,1,0), so a class + element rule wins without !important.
 * This relies on every theme block rendering a `<section class="cp-…">` root;
 * keep that convention when adding blocks. Editors dropping ordinary core
 * blocks into the page keep their normal spacing.
 */
.wp-block-post-content > section[class*="cp-"],
.no-padding-group > section[class*="cp-"] {
  margin-block-start: 0;
}

@media (min-width: 767px) {
  .hide-desktop {
    display: none;
  }
  .cp-breadcrumbs .has-legal-font-size {
    font-size: 16px !important;
  }
}

@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* --- Reverse-on-mobile columns (block style) --- */
@media (max-width: 768px) {
  .wp-block-columns.is-style-reverse-mobile {
    display: flex;
    flex-direction: column-reverse;
  }
}
@media (min-width: 769px) {
  .wp-block-columns.is-style-reverse-mobile {
    display: flex;
    flex-direction: row;
  }
}

/* --- Mobile-full-width button (block style) --- */
@media (max-width: 768px) {
  .is-style-mobile-full-width {
    width: 100% !important;
  }
}

/* --- Aligned-content columns (equal-height cards) --- */
.wp-block-column.is-style-align-content {
  display: flex;
  flex-direction: column;
}

.wp-block-column.is-vertically-aligned-stretch > .wp-block-group {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.wp-block-column.is-style-align-content h3 {
  margin-left: 0 !important;
  margin-right: 0 !important;
  min-height: 68px;
  font-size: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.wp-block-column.is-style-align-content p {
  line-height: 1.5rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 1rem;
  flex-grow: 0;
}

.wp-block-column.is-style-align-content .wp-block-buttons {
  margin-top: auto;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-top: 1rem;
  min-height: 34px;
  display: flex;
}

@media (max-width: 781px) {
  .wp-block-column.is-style-align-content .wp-block-button {
    width: 100% !important;
  }
}

.wp-block-column.is-style-align-content .wp-block-button__link {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card "read more" toggle (aligned-column-read-more.js). */
.card-read-more-container {
  font-size: 0.9rem;
  margin-top: -12px !important;
  margin-left: 0 !important;
}
.card-read-more-container.open::before {
  content: "...";
  font-size: 1rem;
  margin-right: 0.5rem;
  text-decoration: none !important;
  color: #000 !important;
  border-bottom: none !important;
}

/* --- Hero patterns --- */
.cp-page-hero {
  min-height: 840px !important;
}

@media (max-width: 768px) {
  .cp-page-hero {
    height: auto !important;
    padding-top: var(--wp--preset--spacing--cover-padding) !important;
    padding-bottom: var(--wp--preset--spacing--cover-padding) !important;
  }
  .cp-page-hero .wp-block-columns {
    gap: 24px !important;
  }

  .wp-block-buttons.cta,
  .wp-block-buttons.cta .wp-block-button {
    width: 100% !important;
  }

  .hero-pattern {
    min-height: 200px !important;
  }
  .hero-pattern h1,
  .hero-pattern p {
    text-align: center;
  }
}

.what-to-expect .wp-block-column {
  max-width: 220px;
  margin: auto;
}

.home-generator {
  position: relative;
  bottom: 100px;
  z-index: 2;
}

.logo-column {
  position: relative;
  bottom: 32px;
}

/* --- Navigation hover (front end only; footer bottom excluded) --- */
.wp-block-navigation-item a:hover:not(.footer-bottom .wp-block-navigation-item a),
.wp-block-navigation-item__content:hover:not(.footer-bottom .wp-block-navigation-item__content),
.wp-block-navigation-link__content:hover:not(.footer-bottom .wp-block-navigation-link__content),
.wp-block-navigation a:hover:not(.footer-bottom .wp-block-navigation a),
.wp-block-navigation-block-extended-desktop-block a:hover,
.wp-block-navigation-block-extended-mobile-block a:hover {
  background-color: var(--wp--preset--color--on-surface);
  transition: background-color 0.3s ease;
}

.footer-bottom .wp-block-navigation-item a:hover,
.footer-bottom .wp-block-navigation-item__content:hover,
.footer-bottom .wp-block-navigation-link__content:hover,
.footer-bottom .wp-block-navigation a:hover {
  background-color: transparent;
}

.wp-block-navigation__submenu-container a:hover,
.wp-block-navigation-submenu a:hover {
  background-color: var(--wp--preset--color--on-surface);
}

.wp-block-button__link:hover {
  background: var(--wp--preset--color--primary) !important;
  transform: scale(1.05);
  transition: background 0.3s ease, transform 0.3s ease;
}

/* --- Footer --- */
.footer-top {
  border-top: 1px solid var(--wp--preset--color--contrast-3);
  border-bottom: 2px solid var(--wp--preset--color--contrast-3);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}
.footer-top .service-number {
  font-size: 16px;
}
.footer-top .service-number a {
  text-decoration: none;
}
.footer-top .service-number a:hover {
  text-decoration: underline;
}
.footer-top .wp-block-navigation-item__content:hover {
  color: var(--wp--preset--color--primary) !important;
}
.footer-top .cps-phone-number {
  justify-content: start;
}

.footer-bottom {
  background-color: var(--wp--preset--color--contrast-3);
}
.footer-bottom a:hover {
  color: var(--wp--preset--color--background);
}
.footer-bottom span.wp-block-navigation-item__label {
  color: #fff;
}
.footer-bottom span.wp-block-navigation-item__label:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  .wp-block-columns {
    gap: 24px;
  }

  .footer-top {
    text-align: center;
  }
  .footer-top .cps-phone-number {
    justify-content: center !important;
  }
  .footer-top .wp-block-columns {
    flex-direction: column;
    gap: 40px;
  }
  .footer-top .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
    max-width: 100%;
    position: relative;
  }
  .footer-top .wp-block-column:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background-color: rgb(from var(--wp--preset--color--primary) r g b / 0.4);
  }
  .footer-top .wp-block-site-logo,
  .footer-top .wp-block-paragraph,
  .footer-top .wp-block-buttons {
    text-align: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
  .footer-top .wp-block-site-logo img {
    margin: 0 auto;
    display: block;
  }
  .footer-top .wp-block-buttons {
    display: flex;
    justify-content: center;
  }
  .footer-top .wp-block-navigation__container {
    width: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }
  .footer-top .wp-block-navigation__container li {
    line-height: 3rem;
    text-align: center;
  }
  .footer-top .wp-block-heading {
    text-align: center;
  }
  .footer-top .wp-block-column:last-child .wp-block-spacer {
    display: none;
  }

  .footer-bottom {
    text-align: center;
  }
  .footer-bottom .wp-block-group {
    flex-direction: column;
    gap: 20px;
  }
  .footer-bottom .wp-block-social-links {
    justify-content: center;
  }
  .footer-bottom .wp-block-navigation {
    justify-content: center;
  }
  .footer-bottom .wp-block-navigation__container {
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
  }

  .footer-logo {
    align-items: center !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .footer-top .wp-block-columns {
    gap: 32px;
  }
  .footer-top .cps-phone-number {
    justify-content: center !important;
  }
  .footer-top .wp-block-column:first-of-type {
    text-align: center !important;
  }
  .footer-top .wp-block-site-logo,
  .footer-top .wp-block-paragraph,
  .footer-top .wp-block-buttons {
    text-align: center !important;
  }
  .footer-top .footer-logo {
    align-items: center !important;
  }
  .footer-top .wp-block-navigation__container {
    justify-content: center;
  }
  .footer-top .wp-block-buttons {
    justify-content: center;
  }
  .footer-bottom .wp-block-group {
    gap: 24px;
  }
}

/* --- Phone number --- */
.brand-phone-number {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--wp--preset--color--contrast-2);
  justify-content: center;
}
.brand-phone-number:hover {
  color: var(--wp--preset--color--tertiary);
}
.number {
  font-size: 16px;
  font-weight: bold;
}

/* --- Squeeze / landing template --- */
.squeeze-menu.has-global-padding,
.squeeze-menu {
  position: sticky;
  top: 0;
  z-index: 999;
}

body:has(.squeeze-menu) dialog.cps-portal-modal {
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (max-width: 767px) {
  .wp-block-group.squeeze-menu .wp-block-group.alignwide.small-screen-padding {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
  }
  .wp-block-group.squeeze-menu .wp-block-group.alignwide.small-screen-padding > .wp-block-group:first-child {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .wp-block-group.squeeze-menu .wp-block-site-logo img {
    max-width: 120px;
    height: auto;
  }
  .wp-block-group.squeeze-menu .wp-block-group.squeeze-phone-button {
    order: 2;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: center;
    width: auto;
  }
}

/* --- Review slider / carousel (carousel.js) --- */
.wp-block-group.review-slider [class*="slide-"] {
  display: none;
  transition: opacity 0.5s ease-in-out;
}
.wp-block-group.review-slider .slide-visible {
  display: flex !important;
}
.wp-block-group.review-slider .wp-block-columns {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}
.wp-block-group.review-slider [class*="to-slide-"] {
  cursor: pointer;
  transition: transform 0.3s ease;
  display: none;
}
.wp-block-group.review-slider .slide-1[style*="display: flex"] .to-slide-2,
.wp-block-group.review-slider .slide-1[style*="display: flex"] .to-slide-3,
.wp-block-group.review-slider .slide-2[style*="display: flex"] .to-slide-1,
.wp-block-group.review-slider .slide-2[style*="display: flex"] .to-slide-3,
.wp-block-group.review-slider .slide-3[style*="display: flex"] .to-slide-1,
.wp-block-group.review-slider .slide-3[style*="display: flex"] .to-slide-2 {
  display: inline-flex;
}
.wp-block-group.review-slider [class*="to-slide-"]:hover {
  transform: scale(1.05);
}
@media (max-width: 768px) {
  .wp-block-group.review-slider br {
    display: none;
  }
  .wp-block-group.review-slider .wp-block-columns {
    flex-direction: column;
  }
  .wp-block-group.review-slider .wp-block-column {
    flex-basis: 100% !important;
  }
}

/* --- Promo / portal page --- */
.promo-portal .dynamic-phone-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--wp--preset--color--primary);
}

/* --- Box model: the Playbook's border-box, for everything the theme renders --
   The Playbook opens with `*, *::before, *::after { box-sizing: border-box }`
   and every cp-* block's CSS was written under it. Without it, padding adds to
   a min-height or width instead of sitting inside it: every hero rendered
   160px taller than the Playbook (620px + 2 x 80px padding = 780px) and the
   sections under it shifted down. Scoped to the theme's own block roots (every
   cp-* block renders a <section class="cp-...">) and the footer -- the header
   has its own -- rather than global, so core blocks and third-party markup
   outside them keep the box model they were written for. :where() keeps it at
   zero specificity, so a rule that sets box-sizing itself still wins. */
:where(section[class^="cp-"], section[class*=" cp-"], .footer),
:where(section[class^="cp-"], section[class*=" cp-"], .footer) *,
:where(section[class^="cp-"], section[class*=" cp-"], .footer) *::before,
:where(section[class^="cp-"], section[class*=" cp-"], .footer) *::after {
  box-sizing: border-box;
}

/* --- Blog: archive grid + single post ------------------------------------
   templates/home.html, archive.html, index.html (grid) and single.html.

   The Playbook's global `box-sizing: border-box` was never ported to this
   theme, so any `width: 100%` + padding rule overflows its track. Both blocks
   below scope their own reset rather than relying on a global one. */
.cp-blog, .cp-blog *, .cp-blog *::before, .cp-blog *::after,
.cp-post, .cp-post *, .cp-post *::before, .cp-post *::after {
  box-sizing: border-box;
}

/* Masthead — shared by the archive and the single post. */
.cp-blog__masthead,
.cp-post__masthead {
  padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50);
  text-align: center;
}
.cp-blog__eyebrow,
.cp-post__cats {
  margin: 0 0 var(--wp--preset--spacing--20);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.cp-post__cats a {
  color: var(--cp-ink-accent, var(--wp--preset--color--primary));
  text-decoration: none;
}
.cp-blog__heading,
.cp-post__title {
  margin: 0 auto;
  max-width: 20ch;
  line-height: 1.05;
}
.cp-post__title {
  max-width: 24ch;
}
.cp-blog__lead {
  margin: var(--wp--preset--spacing--30) auto 0;
  max-width: 60ch;
  line-height: 1.7;
}
.cp-post__meta {
  margin-top: var(--wp--preset--spacing--30);
  gap: var(--wp--preset--spacing--30);
  justify-content: center;
  color: var(--wp--preset--color--contrast-3);
}

/* Card grid. `columnCount` gives core's grid layout a fixed track count, which
   does not collapse on its own — the media queries below do that. */
.cp-blog__query {
  padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50);
  max-width: var(--wp--style--global--wide-size, 1200px);
  margin-inline: auto;
}
.cp-blog__grid {
  gap: var(--wp--preset--spacing--50);
}
.cp-blog__grid > li {
  display: flex;
  flex-direction: column;
  background: var(--wp--preset--color--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cp-blog__grid > li:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}
.cp-blog__thumb {
  margin: 0;
}
.cp-blog__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cp-blog__date {
  margin: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cp-blog__card-title {
  margin: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30) 0;
  line-height: 1.15;
}
.cp-blog__card-title a {
  color: var(--wp--preset--color--text);
  text-decoration: none;
}
.cp-blog__card-title a:hover {
  color: var(--cp-ink-accent, var(--wp--preset--color--primary));
}
/* Pushes "Read More" to the card foot so every card in a row ends level. */
.cp-blog__excerpt {
  margin: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30)
    var(--wp--preset--spacing--30);
  line-height: 1.7;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.cp-blog__excerpt .wp-block-post-excerpt__more-text {
  margin: auto 0 0;
  padding-top: var(--wp--preset--spacing--20);
}
.cp-blog__excerpt a {
  color: var(--cp-ink-accent, var(--wp--preset--color--primary));
  font-weight: 700;
  text-decoration: none;
}
.cp-blog__excerpt a:hover {
  text-decoration: underline;
}
.cp-blog__empty {
  padding: var(--wp--preset--spacing--60) 0;
  color: var(--wp--preset--color--contrast-2);
}
.cp-blog__pagination {
  margin-top: var(--wp--preset--spacing--60);
  gap: var(--wp--preset--spacing--30);
}
.cp-blog__pagination a {
  color: var(--wp--preset--color--text);
  text-decoration: none;
  font-weight: 700;
}
.cp-blog__pagination a:hover {
  color: var(--cp-ink-accent, var(--wp--preset--color--primary));
}

/* Single post. */
.cp-post__body {
  padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50);
}
.cp-post__hero-image {
  margin: 0 0 var(--wp--preset--spacing--50);
}
.cp-post__hero-image img {
  width: 100%;
  border-radius: 10px;
  display: block;
}
.cp-post__body :where(p, li) {
  line-height: 1.8;
}
.cp-post__body :where(h2, h3, h4) {
  font-family: var(--wp--preset--font-family--barlow-condensed);
  margin-top: var(--wp--preset--spacing--50);
}
.cp-post__tags {
  margin-top: var(--wp--preset--spacing--50);
  padding-top: var(--wp--preset--spacing--30);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.cp-post__more {
  padding-top: var(--wp--preset--spacing--60);
}
.cp-post__more-heading {
  text-align: center;
  margin: 0;
}
.cp-post__more .cp-blog__query {
  padding-top: var(--wp--preset--spacing--40);
}

@media (max-width: 900px) {
  .cp-blog__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .cp-blog__grid {
    grid-template-columns: 1fr;
  }
  .cp-blog__masthead,
  .cp-post__masthead,
  .cp-blog__query,
  .cp-post__body {
    padding-left: var(--wp--preset--spacing--30);
    padding-right: var(--wp--preset--spacing--30);
  }
}

/* ServiceTitan service funnel (cps-st-wordpress-plugin, cps/service-funnel).
   On Maintenance it sits in a core Cover, whose default 430px min-height centres
   the funnel and adds ~33px above and below it; with the next section's own top
   padding that left a 139px gap under the cards. The client wants the section
   after the funnel to read as part of it: the gap under the cards now matches
   the one under "Please Click an Option Below" (24px). */
.wp-block-cover:has(.cps-funnel) {
  min-height: 0;
  /* What the centring gave it on desktop, and no more than before on a phone. */
  padding-top: clamp(var(--wp--preset--spacing--40), 4vw, var(--wp--preset--spacing--70));
  padding-bottom: 0;
}
.wp-block-cover:has(.cps-funnel) .cps-funnel,
.entry-content > .cps-funnel { padding-bottom: 0; }
.wp-block-cover:has(.cps-funnel) + *,
.entry-content > .cps-funnel + * { padding-top: var(--wp--preset--spacing--50); }

/*
 * Image optimisers wrap <img> in <picture> (ShortPixel on WP Engine). The cp-*
 * block CSS was written for the Playbook's markup, where the <img> is the child
 * that gets sized, positioned and ordered; an inline <picture> in between made
 * percentage heights resolve against nothing. State card photos shrank to their
 * aspect ratio and showed the gradient above and below, and the home page's
 * "How Whole Home Generators Work" photo rendered at 294px tall instead of 554.
 * display:contents takes the wrapper out of layout, so the <img> is laid out
 * exactly as it is in the Playbook. Zero specificity: a block that styles its
 * own <picture> (cp-media-callout) keeps that rule.
 */
:where([class^="cp-"], [class*=" cp-"]) picture { display: contents; }

/* A tracked sales number in block copy (cp_blocks_track_sales_phone(), inc/portal.php).
   cp-portal styles .cps-phone-number for its own Phone Number block: a centred flex box,
   #333 text, a blue hover and 16px bold digits. In a heading or a sentence that broke the
   line and dropped the number onto its own centred row (staging, 29 Oct 2026), so inside a
   cp-* section the number reads as the words around it, as in the Playbook. Buttons keep
   their own box and colours; only their hover is pinned against the plugin's blue. */
section[class*="cp-"] a.cps-phone-number:not([class*="btn"]) {
	display: inline;
	justify-content: normal;
	color: inherit;
	text-decoration: none;
}
section[class*="cp-"] a.cps-phone-number:not([class*="btn"]):hover { color: inherit; text-decoration: underline; }
section[class*="cp-"] .cps-phone-number .number { font-size: inherit; font-weight: inherit; }
.cp-cta-band a.cps-phone-number.btn--ghost:hover { color: var(--cta-white); }
.cp-cta-band.is-variant-spoke a.cps-phone-number.btn--ghost:hover { color: var(--cta-on); }

/* Apply Online as Synchrony's eApply form (cp_blocks_eapply_forms(), re-audit R1):
   the form sits where the link would, and its button takes the .btn styles. The
   reset is zero-specificity, so every block's .btn rule still wins. */
:where(.apply-form) { display: inline-block; margin: 0; }
:where(.apply-form input[type="submit"]) { font: inherit; border: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }

/* The Playbook's base heading rule, h1 to h4 at -0.005em (brand.php
   `heading_tracking`; Generator One, re-audit R2). Zero specificity, so a block
   that tracks its own headings (uppercase card titles, eyebrows) keeps them. */
:where(body.cp-heading-tracking) :where(h1, h2, h3, h4) { letter-spacing: -0.005em; }
