/* Ambrose: the rules its Playbook sets differently from the shared blocks
   (cp-website-playbook demos/ambrose-electric). Each closes a finding of the
   staging audit of 17 Nov 2026 (docs/audits/ambrose-instawp-2026-11-17.docx).
   Loaded only when CP_BLOCKS_CONTENT_BRAND is 'ambrose'. */

/* W1: the warranty band's second line is Ink on a 4px orange rule, never orange type. */
body.cp-brand-ambrose .cp-warranty-band .warranty__copy h2 .red,
body.cp-brand-ambrose .cp-home .warranty__copy h2 .red { color: var(--wp--preset--color--text); display: block; width: fit-content; border-bottom: 4px solid var(--wp--preset--color--primary); padding-bottom: 2px; margin-top: 4px; }

/* W4: a link in running copy keeps the sentence's size and case: Ink 600 on a 2px orange underline. */
body.cp-brand-ambrose p a.link-rule, body.cp-brand-ambrose li a.link-rule, body.cp-brand-ambrose .faq__answer a.link-rule, body.cp-brand-ambrose .different-card__body a, body.cp-brand-ambrose .prose p a:not(.btn) {
  font-family: inherit; font-size: inherit; line-height: inherit; letter-spacing: 0; text-transform: none; font-weight: 600;
  color: var(--wp--preset--color--text); border-bottom: 0; padding-bottom: 0;
  text-decoration: underline; text-decoration-color: var(--wp--preset--color--primary); text-decoration-thickness: 2px; text-underline-offset: 2px;
}

/* W5: coverage cards keep the Playbook's column width (four across; three on the area bands) when there are fewer. */
body.cp-brand-ambrose .cp-state-cards .coverage__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* !important: the block sets its column count inline. */
body.cp-brand-ambrose .cp-geo-cards:not(.is-variant-split) .geo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 980px) { body.cp-brand-ambrose .cp-state-cards .coverage__grid, body.cp-brand-ambrose .cp-geo-cards:not(.is-variant-split) .geo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { body.cp-brand-ambrose .cp-state-cards .coverage__grid, body.cp-brand-ambrose .cp-geo-cards:not(.is-variant-split) .geo-grid { grid-template-columns: 1fr !important; } }

/* W9: the footer's column template, row gap and logo height. */
@media (min-width: 1101px) { body.cp-brand-ambrose .footer__main { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.8fr); gap: 64px; } }
@media (min-width: 981px) and (max-width: 1100px) { body.cp-brand-ambrose .footer__main { grid-template-columns: 1fr 1fr; gap: 48px; } }
body.cp-brand-ambrose .footer__col ul { gap: 18px; }
body.cp-brand-ambrose .footer .footer__brand img { height: 80px; width: auto; }

/* W10: the reviews head on the content column, its count line left. */
body.cp-brand-ambrose .cp-reviews .head { max-width: 1100px; }
body.cp-brand-ambrose .cp-reviews .reviews__count { text-align: left; }

/* FAQ toggles in Ink (orange on white is under the 3:1 a control needs). */
body.cp-brand-ambrose .cp-faqs .faq__item summary::after, body.cp-brand-ambrose .cp-city-list .spoke-list__item summary::after { color: var(--wp--preset--color--text); }

/* SA4: three outage tiles sit three across. */
body.cp-brand-ambrose .cp-stat-tiles.is-variant-glance .stat-tiles--glance:has(> .stat-tile:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { body.cp-brand-ambrose .cp-stat-tiles.is-variant-glance .stat-tiles--glance:has(> .stat-tile:nth-child(3):last-child) { grid-template-columns: 1fr; } }

/* SA6: the town pages' closing band is the Playbook's dark band, white type and buttons. */
body.cp-brand-ambrose .cp-cta-band.is-variant-spoke { background: #1E2C44; background-image: none; }
body.cp-brand-ambrose .cp-cta-band.is-variant-spoke h2, body.cp-brand-ambrose .cp-cta-band.is-variant-spoke .eyebrow, body.cp-brand-ambrose .cp-cta-band.is-variant-spoke p { color: var(--wp--preset--color--white); }
body.cp-brand-ambrose .cp-cta-band.is-variant-spoke .btn--primary { background: var(--wp--preset--color--white); color: #1E2C44; }
body.cp-brand-ambrose .cp-cta-band.is-variant-spoke .btn--ghost { border-color: var(--wp--preset--color--white); color: var(--wp--preset--color--white); }
body.cp-brand-ambrose .cp-cta-band.is-variant-spoke .btn--ghost .number { color: inherit; }

/* PR3: accessory chips carry the orange left rule; a band's intro above its card sits left. */
body.cp-brand-ambrose .cp-chip-grid.is-pills .acc-card { border-left: 3px solid var(--wp--preset--color--primary); }
body.cp-brand-ambrose .cp-partner-band.is-section:not(.is-body-after) .recognition__body { text-align: left; margin-left: 0; max-width: none; }

/* FI1: a closing band's second button is the Charcoal Navy button. */
body.cp-brand-ambrose .cp-cta-band:not(.is-variant-spoke) .btn--ghost { background: var(--wp--preset--color--secondary); color: var(--wp--preset--color--white); border-color: var(--wp--preset--color--secondary); }
body.cp-brand-ambrose .cp-cta-band:not(.is-variant-spoke) .btn--ghost:hover { background: var(--wp--preset--color--black); }

/* CB1: icon cards keep the small uppercase title. */
body.cp-brand-ambrose .cp-feature-cards.is-variant-icons .different-card__title { font-size: 14px; line-height: 18.2px; letter-spacing: 0.8px; text-transform: uppercase; }

/* AB1: the About hero's three stats in one row; the story photo at its own shape. */
@media (min-width: 641px) {
  body.cp-brand-ambrose .cp-hero.is-trust-stack .hero__trust { flex-direction: row; align-items: center; gap: 0; flex-wrap: wrap; }
  body.cp-brand-ambrose .cp-hero.is-trust-stack .hero__trust-item::after { display: block; }
}
body.cp-brand-ambrose .cp-media-callout .media-grid__img--square { aspect-ratio: 3 / 2; height: auto; object-fit: cover; }
@media (min-width: 981px) { body.cp-brand-ambrose .cp-hero.is-height-tall.is-trust-stack { min-height: 520px; } }

/* SV4: a brand note under its card is centred body copy. */
body.cp-brand-ambrose .cp-partner-band .recognition__grid + .recognition__body { text-align: center; font-size: 16px; line-height: 27.2px; max-width: 1100px; margin: 24px auto 0; }

/* PR2: a two-card product grid is the Playbook's 760px, centred. */
body.cp-brand-ambrose .cp-service-grid .services__grid--two { max-width: 760px; margin-left: auto; margin-right: auto; }

/* Second re-audit, 18 Nov 2026. */
/* R2: a single brand card is centred. */
body.cp-brand-ambrose .cp-partner-band .recognition__grid:has(> :only-child) { grid-template-columns: minmax(0, 300px); justify-content: center; }
/* R4: accessory chips follow their cards in the same band. */
body.cp-brand-ambrose .cp-service-grid:has(+ .cp-chip-grid.is-pills) { padding-bottom: 0; }
body.cp-brand-ambrose .cp-service-grid + .cp-chip-grid.is-pills { padding-top: 0; }
/* R6: a hero's second button is the Charcoal Navy button. */
body.cp-brand-ambrose .cp-hero .btn--ghost { background: var(--wp--preset--color--secondary); border-color: var(--wp--preset--color--secondary); color: var(--wp--preset--color--white); }
/* R7: an interior hero with the scheduler is 480px, not the homepage's 620px; the homepage H1 at 1.02. */
body.cp-brand-ambrose .entry-content > .cp-hero:not(.is-copy-only):not(.is-variant-spoke):not(.is-height-compact):not(.is-height-city):not(.is-height-tall) { min-height: 480px; }
body.cp-brand-ambrose .cp-home .cp-hero h1 { line-height: 1.02; }
/* R8: two-column card grids on the Playbook's 64px gap. */
@media (min-width: 1101px) { body.cp-brand-ambrose .cp-feature-cards.is-cols-2 .different__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: normal; gap: 64px; } }
/* R9: outage tiles two thirds, the storm map one third. */
@media (min-width: 981px) { body.cp-brand-ambrose .cp-stat-tiles:not(.is-variant-glance) .stats__grid:has(.stats__aside) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; } }
/* The price rows' size column is the Playbook's fixed 150px, its figure 26px. */
body.cp-brand-ambrose .cp-pricing-table .psize-row { grid-template-columns: 150px minmax(0, 1fr); }
body.cp-brand-ambrose .cp-pricing-table .psize-row__kw { font-size: 26px; }

/* Tablet and phone audit, 18 Nov 2026. */
/* P1: price rows keep their note at every width and stack on phones, as the Playbook's .psize-row. */
@media (max-width: 980px) {
  body.cp-brand-ambrose .cp-pricing-table .psize-row { grid-template-columns: minmax(150px, auto) minmax(0, 1fr); gap: 6px 28px; padding: 20px 22px; }
  body.cp-brand-ambrose .cp-pricing-table .psize-row__qual { display: block; }
}
@media (max-width: 640px) {
  body.cp-brand-ambrose .cp-pricing-table .psize-row { grid-template-columns: 1fr; grid-template-areas: "size" "price" "fit"; }
  body.cp-brand-ambrose .cp-pricing-table .psize-row__unit { display: block; }
}
/* P4: the town name runs on in the H1, and the stacked hero's copy takes the full width. */
body.cp-brand-ambrose .cp-hero.is-variant-spoke h1 em { display: inline; }
@media (max-width: 980px) { body.cp-brand-ambrose .cp-hero.is-variant-spoke .hero__copy { max-width: none; } }
/* P5: the photo leads when these sections stack. */
@media (max-width: 980px) {
  body.cp-brand-ambrose .cp-media-callout .media-grid--compact > .media-grid__img { order: -1; }
  body.cp-brand-ambrose .cp-split-media.is-model .split__media { order: -1; }
}
/* P6: the spec table keeps its two columns on phones. */
@media (max-width: 640px) {
  body.cp-brand-ambrose .cp-pricing-table .spec-table th, body.cp-brand-ambrose .cp-pricing-table .spec-table td { display: table-cell; width: auto; padding: 14px 20px; border-bottom: 1px solid #E1E8ED; }
  body.cp-brand-ambrose .cp-pricing-table .spec-table th { width: 42%; }
  body.cp-brand-ambrose .cp-pricing-table .spec-table tr:last-child th, body.cp-brand-ambrose .cp-pricing-table .spec-table tr:last-child td { border-bottom: 0; }
}
/* P7: the warranty chart keeps its desktop rows on phones (the Playbook has no phone rule for it). */
@media (max-width: 640px) {
  body.cp-brand-ambrose .cp-warranty-compare .wchart { padding: 24px 24px 18px; }
  body.cp-brand-ambrose .cp-warranty-compare .wchart__title { font-size: 30px; }
  body.cp-brand-ambrose .cp-warranty-compare .wchart__badge { width: 88px; height: 88px; }
  body.cp-brand-ambrose .cp-warranty-compare .wchart__cost { display: inline-block; white-space: nowrap; margin-top: 0; }
  body.cp-brand-ambrose .cp-warranty-compare .wchart__track { flex-wrap: nowrap; }
  body.cp-brand-ambrose .cp-warranty-compare .wchart__track .wchart__label { flex-basis: auto; }
}
/* Second pass at tablet and phone. */
@media (max-width: 980px) {
  /* A stacked warranty band centres its underlined line. */
  body.cp-brand-ambrose .cp-warranty-band .warranty__copy h2 .red, body.cp-brand-ambrose .cp-home .warranty__copy h2 .red { margin-left: auto; margin-right: auto; }
  /* Four-card model grids go to one column, as the Playbook's. */
  body.cp-brand-ambrose .cp-service-grid .services__grid--four { grid-template-columns: 1fr; }
  /* The About hero takes its content's height once it stacks. */
  body.cp-brand-ambrose .cp-hero.is-copy-only.is-height-tall.is-trust-stack { min-height: 0; }
}
/* The service chooser keeps three cards a row down to 800px. */
@media (min-width: 801px) { body.cp-brand-ambrose .cp-value-cards.is-variant-funnel .value-cards__grid, body.cp-brand-ambrose .cp-value-cards.is-variant-funnel [class*="grid"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* On phones the estimate button stays under the financing button, as on the Playbook. */
@media (max-width: 640px) { body.cp-brand-ambrose .cp-pricing-table .financing__cta--estimate { order: 0; margin-top: 10px; } }
/* An interior hero's H1 scales at 5vw, as the Playbook's; no gap under an H1 that ends the hero. */
body.cp-brand-ambrose .cp-hero.is-copy-only.is-h1-54 h1 { font-size: clamp(36px, 5vw, 54px); }
@media (max-width: 640px) { body.cp-brand-ambrose .cp-hero.is-copy-only.is-h1-54 h1 { font-size: 36px; } }
body.cp-brand-ambrose .cp-hero .hero__copy > h1:last-child { margin-bottom: 0; }
/* The state hub's hero: 18px under the H1 and no gap under the lead that ends it. */
body.cp-brand-ambrose.single-service_area .cp-hero.is-copy-only h1 { margin-bottom: 18px; }
body.cp-brand-ambrose.single-service_area .cp-hero.is-copy-only .hero__desc:last-child { margin-bottom: 0; }
@media (min-width: 801px) and (max-width: 980px) { body.cp-brand-ambrose .cp-value-cards.is-variant-funnel .value-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
body.cp-brand-ambrose.single-service_area .cp-hero.is-copy-only .hero__desc { font-size: 18px; line-height: 28px; max-width: 680px; }
/* The price card: a grey hairline with the orange rule on top only, as the Playbook's .price-card. */
body.cp-brand-ambrose .cp-pricing-table .price-card { border-color: #E5E3DF; border-top-color: var(--wp--preset--color--primary); }
/* The standard warranty's bars in the Playbook's Geyser. */
body.cp-brand-ambrose .cp-warranty-compare .wchart__track:not(.wchart__track--extended):not(.wchart__track--featured) .wchart__bar { background: #CBD5E1; }

/* Liquid-Cooled page: the commercial card has no render in the Playbook, so it keeps no photo-height box beside the QuietSource render. */
body.cp-brand-ambrose .cp-service-grid .service-card:has(img[src*="quietsource-series"]) ~ .service-card .product-card__img--none { display: none; }
