/* ============================================================================
   CNP-CTAFIX.CSS  ·  26 Jul 2026  ·  Praxis / Instrument  ·  Never blue
   Cascade repair for three live CTA defects. Additive and reversible:
   delete this file + mu-plugins/cnp-ctafix-enqueue.php and every rule below
   goes inert, nothing else changes.

   WHY A SEPARATE FILE
   Each block below loses a cascade fight it was written to win. The winners
   are high-specificity !important rules that belong to other, still-correct
   systems (the content-rail contract, the prose route-line underline, the
   .pf-cta 2-col grid). Rather than weaken those, this file re-asserts the
   losing intent one notch above them, using the site's own specificity
   ladder: body:not(.home):not(#cnp):not(#cnp2) (2 ids), the same convention
   cnp-elevate.css CTSFIX10 already uses.

   SPECIFICITY LEDGER (what each block has to beat)
     1  .endcta panel   -> cnp-elevate.css CTSFIX2 "band containers"
                           body:not(.home):not(#cnp) main section:not([class*=hero]) > .wrap
                           (1,3,3) !important  padding-left/right:0, max-width:none
                        -> cnp-critical-tail.css / cnp-ritmo-hero.css
                           .endcta (0,1,0) !important padding-top:var(--sec-y)
                        -> cnp-elevate.css band-filler
                           ...:is(.wrap,...) > :is(p,...) (1,3,1) !important max-width:none
                        -> cnp-instrument-apply.css body .btn-primary:not(...) (0,2,1)
     2  .pf-cta button  -> cnp-deferred.css #34 route-line
                           .pf-sec .pf-narrow a:not([class]) (0,3,0)
     3  .ctsx-hid       -> cnp-elevate.css CTSFIX8
                           body:not(.home):not(#cnp) main .pf-cta (1,2,2) !important display:grid

   All rules are scoped away from the six homes (body.home), exactly like the
   blocks they are correcting.
   ========================================================================== */


/* ══ 1 · THE endCTA PANEL ═══════════════════════════════════════════════════
   cnp-endcta.css designs a premium centred panel: cream ground, hairline,
   18px radius, faint orange radial, clamp(28px,5vw,68px) side padding and a
   940px measure. The ground, border, radius and shadow survive; the PADDING
   and the MEASURE do not, so 549 fragments render as an unpadded full-rail
   strip with 96px above the copy and 24px below it.

   The rail contract stays untouched. The band keeps the one left edge and
   one right edge every other band has (no margin and no max-width is
   re-declared on the box here); the designed 940px measure is restored on the
   panel's CONTENTS instead, so the composition tightens to 940px while the
   box itself still starts and ends exactly on the rail, like every sibling
   band. (Padding cannot carry the measure: a % padding resolves against the
   containing block, not the panel, which on a 1351px viewport reads 205px
   instead of the intended 82px.)
   ------------------------------------------------------------------------ */
body:not(.home):not(#cnp):not(#cnp2) .endcta{
  box-sizing:border-box;
  /* the panel's own designed side padding, lost to the rail contract's
     padding-left/right:0 */
  padding-left : clamp(28px,5vw,68px) !important;
  padding-right: clamp(28px,5vw,68px) !important;
  /* vertical: a panel, not a band. The section around it already carries the
     --sec-y rhythm, so the 96px that cnp-ritmo-hero pushed INSIDE the panel
     is returned to the designed 46-72 / 40-60 pair. */
  padding-top   : clamp(46px,6vw,72px) !important;
  padding-bottom: clamp(40px,5vw,60px) !important;
  border:1px solid var(--line,#DCD3C2);
  border-radius:18px;
  overflow:visible;
}

/* THE MEASURE. cnp-endcta.css asks for a 940px panel; cnp-elevate.css's
   band-filler rule blows every direct child out to max-width:none so prose
   fills the rail, which on a centred CTA leaves a 42px heading running the
   full 1102px. 940px is wide enough to keep the house's single-line-heading
   rule and narrow enough to compose.

   min(940px,100%) rather than a flat 940px: a couple of PT/ES comparison
   pages carry a cnp-diagram-fig inside the endCTA, and cnp-critical-tail.css
   full-bleeds those figures on phones with width:100vw + a negative margin.
   That maths assumes a parent flush with the viewport; inside a panel that is
   now inset 16px and padded 24px it pushed scrollWidth to 431px on a 390px
   screen. Capping at 100% keeps the figure inside its panel - which is where
   a figure inside a bordered card belongs - and holds scrollWidth at 390. */
body:not(.home):not(#cnp):not(#cnp2) .endcta > *{
  max-width:min(940px,100%) !important;
  margin-left:auto  !important;
  margin-right:auto !important;
}
/* the lead paragraph keeps a reading measure inside that column */
body:not(.home):not(#cnp):not(#cnp2) .endcta > p{
  max-width:58ch !important;
}

/* buttons: the panel's own 15/30 sizing, defeated by the global btn-primary
   compaction. Ghost and primary end up the same height again. */
body:not(.home):not(#cnp):not(#cnp2) .endcta .btn{
  padding:15px 30px;
  font-size:15.5px;
}

/* mobile: below 741px the rail contract is off and .wrap is edge-to-edge, so
   the panel would bleed its rounded corners off-screen. Inset the box and
   keep the copy on the page's own 40px gutter (16 outside + 24 inside). */
@media (max-width:740px){
  body:not(.home):not(#cnp):not(#cnp2) .endcta{
    margin-left:16px;
    margin-right:16px;
    padding-left :24px !important;
    padding-right:24px !important;
    padding-top   :clamp(34px,7vw,46px) !important;
    padding-bottom:clamp(30px,6vw,40px) !important;
    border-radius:14px;
  }
}


/* ══ 2 · THE .pf-cta BUTTON ═════════════════════════════════════════════════
   The regional / methods-profile CTA button is orange with white type in both
   theme/regional/profile.css and cnp-method-instrument.css. cnp-deferred.css
   #34 (prose route-line underlines) matches it as an unclassed in-prose anchor
   and repaints it to inherited ink: #2A211B on #C75B22 = 3.64:1, below WCAG AA
   for any text size. It also strips the button's bottom padding to 2px and
   paints two gradients over its ground.

   This restores the button and leaves rule #34 owning every real prose link.
   ------------------------------------------------------------------------ */
body:not(.home):not(#cnp):not(#cnp2) .pf-cta a,
body:not(.home):not(#cnp):not(#cnp2) .pf-cta a:hover,
body:not(.home):not(#cnp):not(#cnp2) .pf-cta a:focus-visible{
  color:#fff;
  text-decoration:none;
  background-image:none;
  padding-bottom:14px;
}

/* NOTE: a ghost demotion for the genuine second ask that survives on a handful
   of BR/LatAm pages ("comece aqui" / "comienza aqui") was tried and dropped -
   on the pages where the dark skin (cnp-elevate CTSFIX10) owns the .pf-cta the
   ghost lands as burnt orange on #1A1714. Two orange buttons on ~8 pages is a
   copy decision, not a cascade defect; left as shipped. */


/* ══ 3 · THE INDEX / PROFIT CHECK SUPPRESSION ═══════════════════════════════
   mu-plugins/cnp-ctsindex-cta.php marks the Profit Check anchor .ctsx-hid and
   ships .ctsx-hid{display:none!important} inline. On regional pages
   cnp-elevate.css CTSFIX8 makes .pf-cta a 2-col grid with
   body:not(.home):not(#cnp) main .pf-cta{display:grid!important} (1,2,2),
   which outranks it, so BR/LatAm pages show the free Index band AND the
   Profit Check together - the one thing that file exists to prevent.
   Hidden means hidden, whatever the family.
   ------------------------------------------------------------------------ */
body:not(.home):not(#cnp):not(#cnp2) .ctsx-hid,
body:not(.home):not(#cnp):not(#cnp2) main .ctsx-hid,
body:not(.home):not(#cnp):not(#cnp2) main .pf-cta.ctsx-hid{
  display:none !important;
}

/* ════════════════════════════════════════════════════════════ END CTAFIX ══ */
