/* af1 audit-fix (stage 2026-11-26). Layout-only; no copy/offer/phone changes. Does not touch cs46-phone-center.css. */

/* 4a BBB pill clipping at narrow phones: let the rating pair wrap instead of running off-screen */
@media (max-width:379px){
  html body .hero .tpair:not(#_):not(#_){flex-wrap:wrap!important;row-gap:8px!important}
}

/* 4b mid-word breaks: hero eyebrow words (RESOURCES, HELP CENTER, REBATES) and trust-tile values (Workmanship) */
@media (max-width:699px){
  html body .hero .brandline b:not(#_):not(#_):not(#_){overflow-wrap:normal!important;word-break:normal!important;min-width:auto!important}
  html body .hero .brandline > span:not(#_):not(#_):not(#_){min-width:0!important;white-space:normal!important;overflow-wrap:break-word!important}
}
@media (max-width:480px){
  html body .glance .t1-w b:not(#_):not(#_):not(#_){overflow-wrap:normal!important;word-break:normal!important;hyphens:manual!important;min-width:min-content!important}
}

/* 4d /service-area/ "See services" link overlapping the Electrical card at >=1181px: let the card stack size to its content */
html body .lyr-hv .sx > .sxtrk:not(#_):not(#_){height:auto!important;align-self:start!important}
html body .lyr-hv .sx .sx-cards:not(#_):not(#_){height:auto!important}

/* S02 booking form When? control: show only the short ASAP label where the ::after "ASAP" is used */
@media (max-width:360px){
  html body form.cb .seg-opt:first-child > span:not(#_):not(#_):not(#_){font-size:0!important;line-height:0!important;letter-spacing:0!important}
  html body form.cb .seg-opt:first-child > span:not(#_):not(#_):not(#_)::after{font-size:12px!important;line-height:1.1!important}
}

/* S03 footer email: never break mid-word; where the column is too narrow it breaks only after the @ (<wbr> in the footer markup) */
@media (min-width:700px) and (max-width:1023px){
  html body footer.fx a.fx-mail:not(#_):not(#_){word-break:normal!important;overflow-wrap:normal!important}
}

/* K2 /our-work/ gallery (CM spec, fixpack r2): equal row heights in the .jobs-gn grid. :not(#_) lifts specificity over the later inline #work-j6-shoot1 380px rule */
section#work .jobs-gn{align-items:stretch}
section#work .jobs-gn > .job:not(#_){aspect-ratio:371/280;height:auto;min-height:0}

/* N01 GFCI post (fixpack r3, CM 3:30 PM PT): contained 4:3 hero on paper, centered, photo max-height 560px (CM r4), never wider than 1215px (1.5x of the 810 master).
   Scoped to this one post via .contained-4x3. DOM order kept (photo, then title block, mascot + facts card as before; facts-feet-ff2.js plants the card at the mascot feet). Mascot CSS/JS untouched. */
html body main section.hero.ab-hero.post-hero.contained-4x3:not(#_):not(#_):not(#_):not(#_):not(#_){background:var(--paper,#F4F6FA)!important;color:var(--txt,#14183a)!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;height:auto!important;min-height:0!important;max-height:none!important;padding-bottom:56px!important}
html body main section.hero.ab-hero.post-hero.contained-4x3:not(#_):not(#_):not(#_):not(#_):not(#_)::before,html body main section.hero.ab-hero.post-hero.contained-4x3:not(#_):not(#_):not(#_):not(#_):not(#_)::after{display:none!important}
html body main section.hero.ab-hero.post-hero.contained-4x3:not(#_):not(#_):not(#_):not(#_):not(#_) > .hbg{position:relative!important;inset:auto!important;display:flex!important;justify-content:center;width:calc(100% - 48px)!important;max-width:1215px!important;height:auto!important;margin:24px auto 0!important;aspect-ratio:auto!important;background:var(--paper,#F4F6FA);border-radius:16px;overflow:hidden}
html body main section.hero.ab-hero.post-hero.contained-4x3:not(#_):not(#_):not(#_):not(#_):not(#_) > .hbg img{position:static!important;inset:auto!important;display:block!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:560px!important;aspect-ratio:810/608;object-fit:contain!important;object-position:50% 50%!important;transform:none!important;margin:0 auto;border-radius:16px}
html body main section.hero.ab-hero.post-hero.contained-4x3:not(#_):not(#_):not(#_):not(#_):not(#_) :is(h1,.bc,.bc a,.bc span,.brandline,.brandline b,.brandline span,.trust li){color:var(--ink,#00053E)!important;text-shadow:none!important}
html body main section.hero.ab-hero.post-hero.contained-4x3:not(#_):not(#_):not(#_):not(#_):not(#_) .lead{color:#3a4060!important;text-shadow:none!important}
html body main section.hero.ab-hero.post-hero.contained-4x3:not(#_):not(#_):not(#_):not(#_):not(#_) .ctas .btn.book{border-color:var(--ink,#00053E)!important;color:var(--ink,#00053E)!important;background:transparent!important}

/* Recent jobs rows on the 12 city trade pages (Boss via CM, 7:58 PM ET): centre lone/2 cards now; 3 cards lay out 3-up when Creative's photos arrive. Flex instead of the fixed-track auto-fill grid so empty tracks never push a lone card left. Gap/margins/card styles unchanged. */
html body .b1-jobgrid:not(#_){display:flex!important;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:20px}
html body .b1-jobgrid:not(#_) > .b1-job{flex:1 1 300px;max-width:380px;min-width:0}

/* P3 V-10: the 88px sticky-bar spacer under the footer showed the pale page colour on hub pages (navy on /contact/). Paint it footer navy at <=699 (no layout change). */
@media (max-width:699px){html body footer.fx:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_){box-shadow:0 88px 0 0 #00053E!important}}

/* P3 V-3: /plumbing/ older-homes compare slider. The captions ("Late 1970s to mid-1990s", "Written repipe price") sat under the first chip and the heading touched it. Same copy, same chips: caption moves to its own row at the bottom of the photo and the chip rows drop 24px so the heading has clear space. Spacing only. */
html body figure.gp2 .gp2-head:not(#_):not(#_):not(#_){bottom:2.5%}
html body figure.gp2 .gp2-head p:not(#_):not(#_):not(#_){position:absolute;left:0;right:0;bottom:0;margin:0;white-space:nowrap!important;font-size:max(10px,min(14px,3.6cqw))}
html body figure.gp2 .gp2-tags li:not(#_):not(#_):not(#_){margin-bottom:-24px}
@container (min-width:521px){html body figure.gp2 .gp2-tags li:not(#_):not(#_):not(#_){margin-bottom:-14px}}

/* APR-1114 AI placeholders: new file names keep the crop focus the old job1 rules (cs45-pos.css) gave the slots. */
html body img[src*="assets/af1/fp/ai-ev-job1"]:not(#_):not(#_):not(#_){object-position:58% 20%!important}
html body img[src*="assets/af1/fp/ai-gen-job1"]:not(#_):not(#_):not(#_){object-position:65% 20%!important}

/* P3 V-30: /specials/ "How offers work" step 2 at <=699 used a different layout (number and icon on their own top row). Same row layout as steps 1/3/4/5: number | dashed divider | heading + text | icon, with the two buttons below across the card. Same markup, same copy, same buttons. */
@media (max-width:699px){
html body .hw-sec .hw-c2:not(#_):not(#_){--stub:0px;--ax1:80px;--ay1:0px;--ax2:80px;--ay2:100%;--ctah:128px;padding:16px 16px 20px 96px;min-height:96px;display:block}
html body .hw-sec .hw-c2:not(#_):not(#_) .hw-b2{display:block}
html body .hw-sec .hw-c2:not(#_):not(#_)::after{left:80px;right:auto;top:14px;bottom:calc(20px + var(--ctah));border-top:0;border-left:2px dashed var(--tear)}
html body .hw-sec .hw-c2:not(#_):not(#_) .hw-n{left:0;width:80px;top:0;bottom:calc(20px + var(--ctah));height:auto;justify-content:center;font-size:50px}
html body .hw-sec .hw-c2:not(#_):not(#_) .hw-ico{top:16px;right:12px;left:auto;transform:none;width:46px;height:46px}
html body .hw-sec .hw-c2:not(#_):not(#_) .hw-ico svg{width:32px;height:32px}
html body .hw-sec .hw-c2:not(#_):not(#_) .hw-b2>h3,html body .hw-sec .hw-c2:not(#_):not(#_) .hw-b2>p{margin-right:52px}
html body .hw-sec .hw-c2:not(#_):not(#_) .hw-b2 p{margin-bottom:0}
html body .hw-sec .hw-c2:not(#_):not(#_) .ctas{margin:14px 0 0 -80px}
}

/* APR-1113 Recent jobs: cards in a row are equal height (captions fill the card). Rows that mix landscape and 3:4 portrait photos (b1-mix) give every photo the same 3:4 box, so card heights match. */
html body .b1-jobgrid:not(#_) > .b1-job > figcaption{flex:1 1 auto}
html body .b1-jobgrid.b1-mix:not(#_) > .b1-job > img{width:100%;height:auto;aspect-ratio:3/4;object-fit:cover;max-width:none}
/* APR-1113: focus for the landscape photos that sit in a 3:4 box in mixed rows (b1-mix). Horizontal focus only; the full height shows. */
html body .b1-jobgrid.b1-mix:not(#_) > .b1-job > img[src*="work-16-r5-recent"]{object-position:12% 50%!important}
html body .b1-jobgrid.b1-mix:not(#_) > .b1-job > img[src*="work-r6-wh-palmharbor-b"]{object-position:55% 50%!important}
html body .b1-jobgrid.b1-mix:not(#_) > .b1-job > img[src*="work-02-r5-trade"]{object-position:42% 50%!important}
html body .b1-jobgrid.b1-mix:not(#_) > .b1-job > img[src*="work-06-r5-recent"]{object-position:38% 50%!important}
html body .b1-jobgrid.b1-mix:not(#_) > .b1-job > img[src*="work-13-r5-recent"]{object-position:50% 50%!important}
html body .b1-jobgrid.b1-mix:not(#_) > .b1-job > img[src*="work12-nohw"]{object-position:30% 50%!important}
html body .b1-jobgrid.b1-mix:not(#_) > .b1-job > img[src*="work10-nohw"]{object-position:50% 50%!important}

/* HDR-4 scrim, fold audit 2026-11-30 */
/* round 2, Dec 1 2026: breakpoint 1100px -> 1024px per Boss; otherwise verbatim from changeset-hdr4 hdr4-scrim.css (md5 a0563ef1) */
/* HDR-4 (fold audit 2026-11-30) - desktop mega-menu scrim. PREVIEW ONLY, not deployed.
   Shows a light navy scrim over the page while any desktop mega panel (.nx-panel) is open.
   - Only where the desktop mega menu exists (>=1024px with the fold-audit HDR-1 header; below that .nx-nav is display:none and the
     drawer has its own .nx-scrim), so phone/tablet are untouched.
   - Header .nx is sticky z-index:50 (own stacking context); the panel lives inside it, so a fixed
     scrim at z-index:49 sits under the header + panel and over all page content (max page z-index 4).
   - Pure CSS: nav1.js already toggles the panel's [hidden] attribute on hover/click/keyboard.
   - Clicking the scrim lands on <body>, which nav1.js's document click handler treats as an outside
     click and closes the menu. Closed state = pointer-events:none, so it never blocks the page.
   - No layout change: a pseudo-element with position:fixed takes no space; nothing moves (mascot incl.). */
@media (min-width:1024px){
  body::after{content:"";position:fixed;inset:0;z-index:49;background:rgba(0,5,62,.4);
    opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,visibility 0s linear .18s}
  body:has(.nx .nx-panel:not([hidden]))::after{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .18s ease}
}
@media (min-width:1024px) and (prefers-reduced-motion:reduce){
  body::after,body:has(.nx .nx-panel:not([hidden]))::after{transition:none}
}
/* end HDR-4 */
