/* COREWEST site-wide layer (site v2, 14 Oct 2026). Loaded last in <head> on every page, so it wins
   over the inline page styles. Header/footer markup comes from tools/cwpartials.py (see PLAN.md log).
   Colour system: teal = action / good, amber = worth a look, red = problems only, blue = info only.
   Primary button: teal #00B09B with dark text #04121F (about 7:1, WCAG AA). Muted text #8FA3BF (about 6:1 on navy). */
:root{--text-mu:#8FA3BF;--cw-teal:#00B09B;--cw-teal-h:#2CC4B0;--cw-ink:#04121F}

/* ---- Icons (Lucide, ISC licence): <svg class="cw-i"> sized 1em, teal ---- */
.cw-i{display:inline-block;width:1em;height:1em;color:var(--cw-teal);vertical-align:-0.14em;flex-shrink:0}
.cw-inh .cw-i,.cw-i.cw-inh{color:inherit}
.cw-blue .cw-i,.cw-i.cw-blue{color:#64B5F6}

/* ---- Header (tools/cwpartials.py) ---- */
.cw-navlink{font-size:13.5px;color:#94A8C4;text-decoration:none;transition:color .2s;white-space:nowrap}
.cw-navlink:hover,.cw-navlink[aria-current="page"]{color:#fff}
.cw-navcta{padding:9px 18px;background:var(--cw-teal);color:var(--cw-ink)!important;border-radius:8px;font-size:13px;font-weight:600;font-family:'Sora',sans-serif;text-decoration:none;white-space:nowrap;transition:background .2s}
.cw-navcta:hover{background:var(--cw-teal-h)}
@media (max-width:1100px) and (min-width:769px){#nav ul{gap:18px!important}.cw-navlink{font-size:13px}#nav .nav-right>div:first-child{display:none!important}}

/* ---- One primary button style (A8) ---- */
.btn-g,.btn-p,.f-submit,.nav-cyber-btn,
a[style*="background:#00B09B"],button[style*="background:#00B09B"],
a[style*="background:var(--green)"],button[style*="background:var(--green)"],
a[style*="background:var(--blue)"],button[style*="background:var(--blue)"],
a[style*="background:#1459B3"],button[style*="background:#1459B3"]{
  background:var(--cw-teal)!important;color:var(--cw-ink)!important;font-weight:600}
.btn-g:hover,.btn-p:hover,.f-submit:hover,.nav-cyber-btn:hover,
a[style*="background:#00B09B"]:hover,button[style*="background:#00B09B"]:hover,
a[style*="background:var(--green)"]:hover,button[style*="background:var(--green)"]:hover,
a[style*="background:var(--blue)"]:hover,button[style*="background:var(--blue)"]:hover{
  background:var(--cw-teal-h)!important;color:var(--cw-ink)!important;box-shadow:0 8px 28px rgba(0,176,155,0.35)!important}
#mobile-nav a:last-child{background:var(--cw-teal)!important;color:var(--cw-ink)!important}
.btn-o{border-width:1px!important}

/* ---- Hero buttons: Book + Call (A5) and the line under them (A6) ---- */
.cw-hero-btns{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:8px 0 0}
.cw-hero-btns.cw-center{justify-content:center}
.cw-call{display:inline-flex;align-items:center;gap:8px;font-family:'Sora',sans-serif;font-size:15px;font-weight:600;padding:14px 28px;border-radius:10px;background:transparent;color:#E8EFF8;border:1px solid rgba(255,255,255,0.22);text-decoration:none;white-space:nowrap}
.cw-call:hover{background:rgba(255,255,255,0.06);color:#fff}
.cw-reassure{font-size:13px!important;color:#C9D6E6!important;margin:12px 0 0!important;line-height:1.6;max-width:none!important}
.cw-center+.cw-reassure,.cta-band .cw-reassure{text-align:center}
.cw-alt{font-size:13px!important;color:#8FA3BF!important;margin:6px 0 0!important}
.cw-alt a,.cw-links a{color:var(--cw-teal)!important;text-decoration:none}
.cw-alt a:hover,.cw-links a:hover{text-decoration:underline}
@media (max-width:480px){.cw-hero-btns>a{width:100%;justify-content:center}}

/* ---- Eyebrows, ticks, links: teal, not blue ---- */
.label{color:var(--cw-teal)!important}
.label::before{background:var(--cw-teal)!important}
.ichk{background:rgba(0,176,155,0.14)!important;color:var(--cw-teal)!important}
.faq-q:hover{color:var(--cw-teal)!important}
a[style*="color:#64B5F6"],a[style*="color:var(--blue-l)"]{color:var(--cw-teal)!important}

/* ---- Contrast: small grey text (A9) ---- */
.ft-bot p,.ft-perth,.ct,.f-note,.dc-note,.bc,.bc a,.bc span,.stat-l,.faq-chev,.faq-chevron{color:#8FA3BF!important}

/* ---- Footer (tools/cwpartials.py, A10) ---- */
.cw-fgrid{display:grid;grid-template-columns:1.25fr repeat(4,1fr);gap:32px;margin-bottom:36px}
.cw-fh{font-family:'Sora',sans-serif;font-size:10.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:#fff;margin-bottom:14px}
.cw-fl{display:flex;flex-direction:column;gap:8px}
.cw-fl a,.cw-fl span{font-size:12.5px;color:#8FA3BF;text-decoration:none;line-height:1.5}
.cw-fl a:hover{color:#fff}
.cw-fbot{border-top:0.5px solid rgba(255,255,255,0.06);padding-top:20px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
.cw-fbot p{font-size:11.5px;color:#8FA3BF;margin:0}
.trust-signals{font-size:12.5px;color:#8FA3BF;border:none!important;padding:0;margin:0}
.cw-ftag{display:flex;align-items:center;gap:6px;font-size:11px;color:#8FA3BF}
.cw-ftag span{width:8px;height:8px;border-radius:2px;background:#0078d4}
@media (max-width:1023px){footer .cw-fgrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.cw-fgrid>div:first-child{grid-column:1/-1}}
@media (max-width:480px){footer .cw-fgrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:24px 16px}}

/* ---- Body copy width ---- */
.cw-prose{max-width:680px}
.cw-prose p{font-size:16px;line-height:1.75;color:var(--text-bd,#94A8C4);margin-bottom:14px}

/* ---- Full card grids on desktop (no orphan slots) ----
   Picks the column count from the number of items: 2 -> 2, 3/6/9 -> 3, 4/8 -> 4,
   5 -> 3 + 2 wide, 7 -> 4 + 3 wide. */
@media (min-width:1024px){
  :is(.card-grid-2,.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(2)){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :is(.card-grid-2,.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(3n)){grid-template-columns:repeat(3,minmax(0,1fr))!important}
  :is(.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(4)),
  :is(.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(8)){grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .card-grid-2:has(> :last-child:nth-child(4)),.card-grid-2:has(> :last-child:nth-child(8)){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :is(.card-grid-2,.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(5)){grid-template-columns:repeat(6,minmax(0,1fr))!important}
  :is(.card-grid-2,.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(5)) > :nth-child(-n+3){grid-column:span 2}
  :is(.card-grid-2,.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(5)) > :nth-child(n+4){grid-column:span 3}
  :is(.card-grid-2,.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(7)){grid-template-columns:repeat(12,minmax(0,1fr))!important}
  :is(.card-grid-2,.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(7)) > :nth-child(-n+4){grid-column:span 3}
  :is(.card-grid-2,.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(7)) > :nth-child(n+5){grid-column:span 4}
}
@media (min-width:769px) and (max-width:1023px){
  :is(.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(2n)){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :is(.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(3)),
  :is(.card-grid-3,.issues-grid,.rep-meta,.cw-grid,[style*="grid-template-columns:repeat(auto-fit"]):has(> :last-child:nth-child(9)){grid-template-columns:repeat(3,minmax(0,1fr))!important}
}

/* ---- Scroll fade-in: off on phones and for reduced motion; never leave cards blank ---- */
@media (max-width:768px),(prefers-reduced-motion:reduce){
  .card,.stat-card,.ideal-item,.pain-card,.industry-card,.issue-row,.out-item,.ins-card,.proof-card{opacity:1!important;transform:none!important;transition:none!important}
}
@media print{
  .card,.stat-card,.ideal-item,.pain-card,.industry-card,.issue-row,.out-item,.ins-card,.proof-card{opacity:1!important;transform:none!important}
  .cw-sticky{display:none!important}
}

/* ---- Mobile sticky bar: Book | Call (A7) ---- */
.cw-sticky{display:none}
@media (max-width:768px){
  .cw-sticky{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:250;height:56px;background:rgba(8,15,30,0.97);border-top:1px solid rgba(255,255,255,0.1);padding:6px 8px calc(6px + env(safe-area-inset-bottom));gap:8px;box-sizing:content-box}
  .cw-sticky a{flex:1;display:flex;align-items:center;justify-content:center;border-radius:10px;font-family:'Sora',sans-serif;font-size:15px;font-weight:600;text-decoration:none}
  .cw-sticky .cw-sticky-book{background:var(--cw-teal);color:var(--cw-ink)}
  .cw-sticky .cw-sticky-call{flex:0 0 38%;background:transparent;color:#E8EFF8;border:1px solid rgba(255,255,255,0.28)}
  body{padding-bottom:calc(68px + env(safe-area-inset-bottom))!important}
}
/* FIX1 (14 Oct 2026) */
/* QA P2-2: visible breadcrumb sits below the fixed header */
.bc{margin-top:68px;position:relative;z-index:2}
.bc+.page-hero{padding-top:clamp(24px,3.5vw,44px)!important}
@media (max-width:768px){.bc{margin-top:60px}.bc+.page-hero{padding-top:18px!important}}
/* QA P2-1: Book + Call side by side on desktop */
@media (min-width:1024px){.cw-hero-btns{flex-wrap:nowrap}.cw-hero-btns>.btn-lg{white-space:nowrap;padding-left:22px;padding-right:22px}}
/* QA P2-6: tap targets */
#nav-hamburger{min-width:44px;min-height:44px;align-items:center;justify-content:center}
@media (max-width:768px){.cw-fl{gap:0}.cw-fl a{display:block;padding:11px 0;min-height:42px;box-sizing:border-box}.cw-fl span{display:block;padding:8px 0}}
/* QA P3: sticky bar fully opaque */
@media (max-width:768px){.cw-sticky{background:#080F1E!important;border-top:1px solid rgba(255,255,255,0.12)!important}.cw-sticky .cw-sticky-call{background:#0E1E38!important}}
/* QA P3: even rows on /locations/ */
.loc-grid-3.loc-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.loc-grid-3.loc-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.loc-grid-3.loc-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:1000px){.loc-grid-3.loc-cols-4,.loc-grid-3.loc-cols-3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.loc-grid-3.loc-cols-4,.loc-grid-3.loc-cols-3,.loc-grid-3.loc-cols-2{grid-template-columns:1fr}}
/* QA P2-4: 4-step rows */
.cw-steps4.cw-steps4.cw-steps4.cw-steps4.cw-steps4{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.cw-steps4.cw-steps4.cw-steps4.cw-steps4.cw-steps4>*{grid-column:auto!important}
@media (max-width:768px){.cw-steps4.cw-steps4.cw-steps4.cw-steps4.cw-steps4{grid-template-columns:1fr 1fr!important;row-gap:28px!important}.cw-steps4>div:first-child[style*="position:absolute"]{display:none}}
/* Home on phones: shorter page, nothing removed */
@media (max-width:768px){
  .cw-hero~section.section{padding-top:36px!important;padding-bottom:36px!important}
  .cw-pains{grid-template-columns:1fr 1fr!important;gap:8px!important;margin-top:20px!important}
  .cw-pains .pain-card{padding:14px 12px!important}
  .cw-pains .pain-card>div:first-child{width:32px!important;height:32px!important;font-size:16px!important;margin-bottom:8px!important}
  .cw-pains .pain-card p{font-size:13px!important;line-height:1.5!important}
}
.cw-li-link:hover{color:#E8EFF8!important}
a.cw-mfa-card:hover{border-color:rgba(0,176,155,0.55)!important}
/* /FIX1 */
/* FIX2 (14 Oct 2026, night) */
/* QA P2-1: no orphan card in 2-column phone grids (home pain cards: 9 items) */
@media (max-width:768px){.cw-pains .pain-card:last-child:nth-child(odd){grid-column:1/-1}}
/* QA P2-2: form failure + email hint */
.cw-form-err{color:#EF9A9A;font-size:14px;line-height:1.55;margin:12px 0 0;text-align:center}
.cw-form-err a{color:#EF9A9A;text-decoration:underline}
.cw-field-err{color:#EF9A9A;font-size:12.5px;margin:6px 0 0}
/* Panel 10 / QA P3-1: phone tap targets and small footer text */
@media (max-width:768px){
  .bc{font-size:12.5px!important}
  .bc a{display:inline-block;padding:13px 6px;margin:-13px -6px}
  .cw-fh{font-size:12px!important}
  .cw-fbot p,.cw-ftag,.trust-signals{font-size:12.5px!important}
}
/* /FIX2 */
