/*
 * CMP Site-Wide Theme — Navy/Gold
 * Applies to all non-homepage pages (legal, diagnostic intake, contact, etc.)
 * Version: 3.3.0 — Cross-brand coherence: tokenize CMH family gold to canonical #d4af37 (was #d4af37 base + #b89a2a dim); align scrollbar gold thumb; navy already canonical #0e1d35. Per Cross-Brand-Visual-Design-System-Coherence-Audit-2026-06-13.
 *   Previous: 3.2.0 — Mobile optimization: 480px/375px breakpoints for lite shell, engine pages, touch targets, iOS zoom fix, landscape, reduced motion.
 *   Previous: 3.1.0 — Engine page nav fix (flex-wrap:nowrap) + CTA button text color fix + hero CTA styles.
 *   Previous: 3.0.0 — Level 3 payment flow: success page, intake gate, bundle handoff styles.
 *   Previous: 2.5.1 — Kadence header/footer hiding (requires body_class filter in functions.php 2.4.0+)
 */

:root {
    --cmp-navy: #0e1d35;
    --cmp-navy-mid: #162b4a;
    --cmp-gold: #d4af37;
    --cmp-gold-dim: #b89a2a;
    --cmp-text: #c8ccd4;
    --cmp-text-bright: #e8e6e1;
    --cmp-text-dim: #7a7e87;
    --cmp-line: rgba(184,148,42,0.15);
}

/* ===== BODY & BACKGROUND ===== */
body, html {
    background-color: var(--cmp-navy) !important;
    color: var(--cmp-text) !important;
}

/* ===== KADENCE HEADER / NAV OVERRIDE ===== */
.site-header, header.site-header,
.site-header-wrap, .site-header-inner-wrap,
#masthead, .kadence-header {
    background-color: var(--cmp-navy) !important;
    border-bottom: 1px solid var(--cmp-line) !important;
}

/* Site title */
.site-branding .site-title a,
.site-branding .site-title,
.custom-logo-link,
header .site-title a {
    color: var(--cmp-text-bright) !important;
    font-family: 'Cormorant Garamond', serif !important;
}

/* Nav links */
.header-navigation .menu > li > a,
.header-menu-container .menu > li > a,
.primary-menu > li > a,
.main-navigation a,
#primary-navigation a,
nav a {
    color: var(--cmp-text) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    transition: color 0.2s !important;
}

.header-navigation .menu > li > a:hover,
.header-menu-container .menu > li > a:hover,
.primary-menu > li > a:hover,
.main-navigation a:hover,
#primary-navigation a:hover,
nav a:hover {
    color: var(--cmp-gold) !important;
}

/* ===== PAGE TITLE / HERO AREA ===== */
.entry-hero, .page-hero,
.wp-site-blocks .entry-hero,
.kadence-page-title,
.entry-hero-layout-normal {
    background-color: var(--cmp-navy) !important;
}

.entry-hero .entry-title,
.page-title, .entry-title,
.kadence-page-title .entry-title {
    color: var(--cmp-text-bright) !important;
    font-family: 'Cormorant Garamond', serif !important;
}

/* ===== MAIN CONTENT AREA ===== */
.site-main, .content-area, .site-content,
.entry-content-wrap, .entry-content,
.site, #wrapper, #page, #content,
.wp-site-blocks {
    background-color: var(--cmp-navy) !important;
    color: var(--cmp-text) !important;
}

/* Content typography */
.entry-content p,
.entry-content li,
.entry-content td,
.entry-content span {
    color: var(--cmp-text) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    line-height: 1.9 !important;
}

.entry-content h1, .entry-content h2,
.entry-content h3, .entry-content h4 {
    color: var(--cmp-text-bright) !important;
    font-family: 'Cormorant Garamond', serif !important;
}

.entry-content h2 {
    font-size: 22px !important;
    margin-top: 40px !important;
    margin-bottom: 12px !important;
}

.entry-content a {
    color: var(--cmp-gold) !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.entry-content a:hover {
    color: var(--cmp-text-bright) !important;
}

/* ===== FLUENT FORMS STYLING ===== */
.fluentform, .ff-el-group,
.frm-fluent-form, .ff_conv_app {
    background-color: transparent !important;
    color: var(--cmp-text) !important;
}

.ff-el-input--label label,
.ff-el-input--label .ff-el-input--label {
    color: var(--cmp-text-bright) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
}

.ff-el-form-control,
.ff-el-input--content input,
.ff-el-input--content textarea,
.ff-el-input--content select,
.ff-el-form-control:focus {
    background-color: var(--cmp-navy-mid) !important;
    color: var(--cmp-text-bright) !important;
    border: 1px solid var(--cmp-line) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    border-radius: 0 !important;
    padding: 12px 16px !important;
}

.ff-el-form-control:focus {
    border-color: var(--cmp-gold-dim) !important;
    outline: none !important;
    box-shadow: 0 0 8px rgba(212,175,55,0.15) !important;
}

/* Radio/Checkbox labels */
.ff-el-form-check-label,
.ff-el-form-check label,
.ff_list_inline label,
.ff-el-ratings label {
    color: var(--cmp-text) !important;
    font-family: 'Inter', sans-serif !important;
}

/* Submit button */
.ff-btn-submit, .ff-btn-md,
.fluentform .ff-btn-submit {
    background-color: var(--cmp-gold) !important;
    color: var(--cmp-navy) !important;
    border: none !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    padding: 16px 38px !important;
    cursor: pointer !important;
    transition: all 0.25s !important;
    border-radius: 0 !important;
}

.ff-btn-submit:hover, .ff-btn-md:hover,
.fluentform .ff-btn-submit:hover {
    background-color: #f0d45a !important;
    box-shadow: 0 0 18px rgba(212,175,55,0.45) !important;
    transform: translateY(-1px) !important;
}

/* Step progress bar (multi-step forms) */
.ff-step-header, .ff-el-progress {
    background-color: var(--cmp-navy-mid) !important;
}

.ff-el-progress-bar, .ff-step-header .ff-step-titles {
    background-color: var(--cmp-gold) !important;
    color: var(--cmp-navy) !important;
}

/* Select dropdown styling */
.ff-el-form-control option {
    background-color: var(--cmp-navy-mid) !important;
    color: var(--cmp-text-bright) !important;
}

/* Placeholder text */
.ff-el-form-control::placeholder {
    color: var(--cmp-text-dim) !important;
}

/* ===== FORM INPUTS MOBILE OPTIMIZATION ===== */
@media(max-width:768px){
  .ff-el-form-control,.ff-el-input--content input,.ff-el-input--content textarea,.ff-el-input--content select{min-height:48px!important;padding:14px 16px!important;font-size:16px!important;}
  .ff-btn-submit,.ff-btn-md{min-height:48px!important;padding:14px 32px!important;}
}
@media(max-width:480px){
  .ff-el-form-control,.ff-el-input--content input,.ff-el-input--content textarea,.ff-el-input--content select{min-height:50px!important;padding:16px 12px!important;}
  .ff-btn-submit,.ff-btn-md{min-height:50px!important;padding:16px 24px!important;width:100%!important;}
}

/* ===== KADENCE FOOTER OVERRIDE ===== */
.site-footer, footer.site-footer,
.site-footer-wrap, .footer-widget-area,
.site-bottom-footer-wrap {
    background-color: var(--cmp-navy) !important;
    border-top: 1px solid var(--cmp-line) !important;
    color: var(--cmp-text-dim) !important;
}

.site-footer a, footer a {
    color: var(--cmp-text-dim) !important;
}

.site-footer a:hover, footer a:hover {
    color: var(--cmp-gold) !important;
}

/* ===== BREADCRUMBS (if enabled) ===== */
.kadence-breadcrumbs, .breadcrumb {
    color: var(--cmp-text-dim) !important;
}

.kadence-breadcrumbs a {
    color: var(--cmp-gold-dim) !important;
}

/* ===== LITE SHELL — LEGAL/CONTACT PAGE LAYOUT ===== */
.entry-content > div {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .entry-content > div[style*="grid-template-columns:2fr 1fr 1fr"] {
        display: block !important;
    }
}

/* ===== HIDE KADENCE HEADER/FOOTER ON LITE SHELL PAGES =====
 * Pages with custom CMP header/footer: contact, privacy-policy, terms-of-service, disclosures,
 * plus 6 engine diagnostic pages: operate-, atlas-, aurora-, strata-, nexus-, slate-diagnostic.
 * Requires: functions.php body_class filter (v2.4.0+) that adds .page-slug-{slug} to <body>.
 * WordPress/Kadence does NOT add slug-based body classes by default — the PHP filter is essential.
 * We hide the Kadence header, footer, and page title hero so only the custom CMP ones show.
 * v2.5.1 — body_class filter fix (v2.5.0 CSS was correct but selectors never matched without PHP).
 */
body.page-slug-contact .site-header,
body.page-slug-contact #masthead,
body.page-slug-contact header.site-header,
body.page-slug-contact .kadence-header,
body.page-slug-contact .site-footer,
body.page-slug-contact footer.site-footer,
body.page-slug-contact #colophon,
body.page-slug-contact .entry-hero,
body.page-slug-contact .kadence-page-title,
body.page-slug-privacy-policy .site-header,
body.page-slug-privacy-policy #masthead,
body.page-slug-privacy-policy header.site-header,
body.page-slug-privacy-policy .kadence-header,
body.page-slug-privacy-policy .site-footer,
body.page-slug-privacy-policy footer.site-footer,
body.page-slug-privacy-policy #colophon,
body.page-slug-privacy-policy .entry-hero,
body.page-slug-privacy-policy .kadence-page-title,
body.page-slug-terms-of-service .site-header,
body.page-slug-terms-of-service #masthead,
body.page-slug-terms-of-service header.site-header,
body.page-slug-terms-of-service .kadence-header,
body.page-slug-terms-of-service .site-footer,
body.page-slug-terms-of-service footer.site-footer,
body.page-slug-terms-of-service #colophon,
body.page-slug-terms-of-service .entry-hero,
body.page-slug-terms-of-service .kadence-page-title,
body.page-slug-disclosures .site-header,
body.page-slug-disclosures #masthead,
body.page-slug-disclosures header.site-header,
body.page-slug-disclosures .kadence-header,
body.page-slug-disclosures .site-footer,
body.page-slug-disclosures footer.site-footer,
body.page-slug-disclosures #colophon,
body.page-slug-disclosures .entry-hero,
body.page-slug-disclosures .kadence-page-title,
body.page-slug-operate-diagnostic .site-header,
body.page-slug-operate-diagnostic #masthead,
body.page-slug-operate-diagnostic header.site-header,
body.page-slug-operate-diagnostic .kadence-header,
body.page-slug-operate-diagnostic .site-footer,
body.page-slug-operate-diagnostic footer.site-footer,
body.page-slug-operate-diagnostic #colophon,
body.page-slug-operate-diagnostic .entry-hero,
body.page-slug-operate-diagnostic .kadence-page-title,
body.page-slug-atlas-diagnostic .site-header,
body.page-slug-atlas-diagnostic #masthead,
body.page-slug-atlas-diagnostic header.site-header,
body.page-slug-atlas-diagnostic .kadence-header,
body.page-slug-atlas-diagnostic .site-footer,
body.page-slug-atlas-diagnostic footer.site-footer,
body.page-slug-atlas-diagnostic #colophon,
body.page-slug-atlas-diagnostic .entry-hero,
body.page-slug-atlas-diagnostic .kadence-page-title,
body.page-slug-aurora-diagnostic .site-header,
body.page-slug-aurora-diagnostic #masthead,
body.page-slug-aurora-diagnostic header.site-header,
body.page-slug-aurora-diagnostic .kadence-header,
body.page-slug-aurora-diagnostic .site-footer,
body.page-slug-aurora-diagnostic footer.site-footer,
body.page-slug-aurora-diagnostic #colophon,
body.page-slug-aurora-diagnostic .entry-hero,
body.page-slug-aurora-diagnostic .kadence-page-title,
body.page-slug-strata-diagnostic .site-header,
body.page-slug-strata-diagnostic #masthead,
body.page-slug-strata-diagnostic header.site-header,
body.page-slug-strata-diagnostic .kadence-header,
body.page-slug-strata-diagnostic .site-footer,
body.page-slug-strata-diagnostic footer.site-footer,
body.page-slug-strata-diagnostic #colophon,
body.page-slug-strata-diagnostic .entry-hero,
body.page-slug-strata-diagnostic .kadence-page-title,
body.page-slug-nexus-diagnostic .site-header,
body.page-slug-nexus-diagnostic #masthead,
body.page-slug-nexus-diagnostic header.site-header,
body.page-slug-nexus-diagnostic .kadence-header,
body.page-slug-nexus-diagnostic .site-footer,
body.page-slug-nexus-diagnostic footer.site-footer,
body.page-slug-nexus-diagnostic #colophon,
body.page-slug-nexus-diagnostic .entry-hero,
body.page-slug-nexus-diagnostic .kadence-page-title,
body.page-slug-slate-diagnostic .site-header,
body.page-slug-slate-diagnostic #masthead,
body.page-slug-slate-diagnostic header.site-header,
body.page-slug-slate-diagnostic .kadence-header,
body.page-slug-slate-diagnostic .site-footer,
body.page-slug-slate-diagnostic footer.site-footer,
body.page-slug-slate-diagnostic #colophon,
body.page-slug-slate-diagnostic .entry-hero,
body.page-slug-slate-diagnostic .kadence-page-title {
    display: none !important;
}

/* ===== LITE SHELL — CONTENT WRAPPER RESET =====
 * Kadence adds default padding/margin to .entry-content-wrap and .content-wrap.
 * On Lite Shell pages we remove it so the custom header sits flush at the top.
 */
body.page-slug-contact .entry-content-wrap,
body.page-slug-privacy-policy .entry-content-wrap,
body.page-slug-terms-of-service .entry-content-wrap,
body.page-slug-disclosures .entry-content-wrap,
body.page-slug-operate-diagnostic .entry-content-wrap,
body.page-slug-atlas-diagnostic .entry-content-wrap,
body.page-slug-aurora-diagnostic .entry-content-wrap,
body.page-slug-strata-diagnostic .entry-content-wrap,
body.page-slug-nexus-diagnostic .entry-content-wrap,
body.page-slug-slate-diagnostic .entry-content-wrap,
body.page-slug-contact .content-wrap,
body.page-slug-privacy-policy .content-wrap,
body.page-slug-terms-of-service .content-wrap,
body.page-slug-disclosures .content-wrap,
body.page-slug-operate-diagnostic .content-wrap,
body.page-slug-atlas-diagnostic .content-wrap,
body.page-slug-aurora-diagnostic .content-wrap,
body.page-slug-strata-diagnostic .content-wrap,
body.page-slug-nexus-diagnostic .content-wrap,
body.page-slug-slate-diagnostic .content-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.page-slug-contact .site-main,
body.page-slug-privacy-policy .site-main,
body.page-slug-terms-of-service .site-main,
body.page-slug-disclosures .site-main,
body.page-slug-operate-diagnostic .site-main,
body.page-slug-atlas-diagnostic .site-main,
body.page-slug-aurora-diagnostic .site-main,
body.page-slug-strata-diagnostic .site-main,
body.page-slug-nexus-diagnostic .site-main,
body.page-slug-slate-diagnostic .site-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ===== LITE SHELL — FOOTER STYLE RESET =====
 * The sitewide .entry-content a { color: gold !important } and
 * .entry-content p/span { line-height: 1.9 !important } override inline footer styles.
 * These rules restore the correct footer appearance.
 */
#cmp-lite-footer a {
    color: #7a7e87 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    display: block !important;
    margin-bottom: 2px !important;
    padding: 0 !important;
}

#cmp-lite-footer a:hover {
    color: var(--cmp-gold) !important;
}

#cmp-lite-footer h5 {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: var(--cmp-gold-dim) !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

#cmp-lite-footer p,
#cmp-lite-footer span,
#cmp-lite-footer div {
    line-height: 1.7 !important;
}

/* ===== CMH HOLDING-COMPANY SIGNATURE (cross-brand lockup, lite shell) ===== */
#cmp-lite-footer .cmh-signature {
    text-align: center !important;
    padding: 22px 0 4px !important;
}
#cmp-lite-footer .cmh-signature a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    opacity: 0.75 !important;
    transition: opacity 0.25s ease !important;
    margin-bottom: 0 !important;
}
#cmp-lite-footer .cmh-signature a:hover {
    opacity: 1 !important;
    color: var(--cmp-gold) !important;
}
#cmp-lite-footer .cmh-signature-mark {
    height: 18px !important;
    width: auto !important;
    display: block !important;
    margin: 0 !important;
}
#cmp-lite-footer .cmh-signature span {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    letter-spacing: 2.5px !important;
    text-transform: uppercase !important;
    color: var(--cmp-gold) !important;
    display: inline !important;
    line-height: 1.3 !important;
}

/* ===== LITE SHELL — HEADER RESET ===== */
#cmp-lite-header a {
    text-decoration: none !important;
}

/* Force nav to single horizontal row — prevents Pricing/Client Program/Connect stacking */
#cmp-lite-header nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 24px !important;
}

/* Force all direct children of nav (including dropdown div) to stay inline as flex items */
#cmp-lite-header nav > * {
    flex-shrink: 0 !important;
    display: inline-block !important;
}

#cmp-lite-header nav > a {
    display: inline-block !important;
    white-space: nowrap !important;
}

#cmp-lite-header .eng-dropdown-wrap {
    display: inline-block !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

#cmp-lite-header nav a {
    color: #7a7e87 !important;
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

#cmp-lite-header nav a:hover {
    color: var(--cmp-gold) !important;
}

#cmp-lite-header nav a {
    position: relative !important;
    padding-bottom: 4px !important;
}

#cmp-lite-header nav a.cmp-nav-active {
    color: var(--cmp-gold) !important;
}

#cmp-lite-header nav a.cmp-nav-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--cmp-gold);
    box-shadow: 0 0 6px rgba(212,175,55,0.5);
}

/* Gold C and M in "Crown Mosaic" logo text —
 * override .entry-content span { color: var(--cmp-text) !important } */
#cmp-lite-header .cmp-gold-initial {
    color: #d4af37 !important;
    font-weight: 700 !important;
}

#cmp-lite-header .cmp-logo-text {
    color: #e8e6e1 !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
}

/* ===== LITE SHELL — CONTACT PAGE ENGINE GRID =====
 * Force 2-column grid for engine diagnostic links on /contact/.
 * Kadence or .entry-content > div rules can override inline display:grid.
 */
#cmp-engine-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
}

/* ===== LITE SHELL — MOBILE RESPONSIVE =====
 * Header: stack logo above nav, reduce nav gap.
 * Footer: collapse 3-column grid to single column.
 * Engine grid: collapse to single column.
 */
@media (max-width: 768px) {
    /* Header: stack vertically */
    #cmp-lite-header > div {
        flex-direction: column !important;
        height: auto !important;
        padding: 16px 0 !important;
        gap: 12px !important;
    }

    #cmp-lite-header nav {
        gap: 16px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    /* Footer: single column */
    #cmp-lite-footer > div:first-child {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }

    /* Footer bottom bar: stack */
    #cmp-lite-footer > div:last-child {
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
    }

    /* Engine grid: single column on mobile */
    #cmp-engine-grid {
        grid-template-columns: 1fr !important;
    }

    /* Content padding adjustment */
    #cmp-lite-header {
        padding: 0 20px !important;
    }

    /* Diagnostic details grid: collapse 2x2 to single column */
    .cmp-diagnostic-details {
        grid-template-columns: 1fr !important;
    }

    /* Engine page CTA: full width on mobile */
    .cmp-cta-btn,
    .eng-cta-btn,
    .eng-hero-cta-btn {
        display: block !important;
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    #cmp-lite-header nav {
        gap: 10px !important;
    }

    #cmp-lite-header nav a {
        font-size: 10px !important;
        letter-spacing: 1px !important;
    }

    /* Logo text sizing */
    #cmp-lite-header .cmp-logo-text {
        font-size: 16px !important;
        letter-spacing: 1.5px !important;
    }

    /* Logo icon sizing */
    #cmp-lite-header img {
        height: 24px !important;
    }

    /* Footer text sizing */
    #cmp-lite-footer a {
        font-size: 12px !important;
    }

    #cmp-lite-footer h5 {
        font-size: 10px !important;
    }

    /* CTA buttons: full width with proper touch targets */
    .eng-hero-cta-btn,
    .entry-content a.eng-hero-cta-btn {
        padding: 16px 32px !important;
        font-size: 12px !important;
        letter-spacing: 2px !important;
        width: 100% !important;
        max-width: 320px !important;
        box-sizing: border-box !important;
    }

    .eng-cta-btn,
    .entry-content a.eng-cta-btn,
    .cmp-cta-btn,
    .entry-content a.cmp-cta-btn {
        padding: 14px 28px !important;
        font-size: 11px !important;
        width: 100% !important;
        max-width: 320px !important;
        box-sizing: border-box !important;
    }
}

/* ===== LITE SHELL — 375px EXTRA-SMALL PHONES ===== */
@media (max-width: 375px) {
    #cmp-lite-header {
        padding: 0 12px !important;
    }

    #cmp-lite-header > div {
        padding: 12px 0 !important;
        gap: 8px !important;
    }

    #cmp-lite-header nav {
        gap: 8px !important;
    }

    #cmp-lite-header nav a {
        font-size: 9px !important;
        letter-spacing: 0.8px !important;
    }

    #cmp-lite-header .cmp-logo-text {
        font-size: 15px !important;
        letter-spacing: 1px !important;
    }

    /* Footer — tighter spacing */
    #cmp-lite-footer {
        padding: 24px 12px !important;
    }

    #cmp-lite-footer > div:first-child {
        gap: 20px !important;
    }
}

/* ===== LITE SHELL — MOBILE TOUCH UX ===== */
@media (max-width: 768px) {
    /* Ensure all interactive elements have proper touch targets */
    #cmp-lite-header nav a {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    /* iOS input zoom prevention — 16px minimum */
    .entry-content input[type="text"],
    .entry-content input[type="email"],
    .entry-content input[type="tel"],
    .entry-content textarea,
    .entry-content select {
        font-size: 16px !important;
    }

    /* Prevent horizontal scroll from oversized elements */
    .entry-content,
    .entry-content > div {
        overflow-x: hidden !important;
    }

    /* Engine page hero adjustments */
    .eng-hero {
        padding: 72px 20px 40px !important;
    }

    .eng-title {
        font-size: clamp(28px, 5vw, 40px) !important;
    }

    .eng-core-q {
        font-size: 17px !important;
    }

    .eng-sub {
        font-size: 14px !important;
    }

    /* Engine page sections */
    .eng-section {
        padding: 0 20px 40px !important;
    }

    .eng-section-title {
        font-size: 24px !important;
    }

    /* Pattern grid single column */
    .eng-pattern-grid {
        grid-template-columns: 1fr !important;
    }

    /* Detail box padding */
    .detail-box {
        padding: 24px 20px !important;
    }

    .detail-grid {
        grid-template-columns: 1fr !important;
    }

    /* Detail price sizing */
    .detail-val.price {
        font-size: 24px !important;
    }

    /* Engine CTA section */
    .eng-cta {
        padding: 36px 0 48px !important;
    }

    /* Other engines grid */
    .eng-other-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Dropdown panel repositioning on mobile */
    .eng-dropdown-panel {
        left: auto !important;
        right: 0 !important;
        transform: none !important;
        min-width: 180px !important;
    }
}

/* ===== LITE SHELL — ENGINE PAGE 480px ===== */
@media (max-width: 480px) {
    .eng-hero {
        padding: 64px 16px 32px !important;
    }

    .eng-title {
        font-size: 26px !important;
    }

    .eng-core-q {
        font-size: 16px !important;
    }

    .eng-sub {
        font-size: 13px !important;
        line-height: 1.7 !important;
    }

    .eng-section {
        padding: 0 16px 32px !important;
    }

    .eng-section-title {
        font-size: 22px !important;
    }

    .eng-body {
        font-size: 13px !important;
    }

    /* Dimension grid tighter */
    .dim-content {
        padding: 14px 16px !important;
    }

    .dim-name {
        font-size: 14px !important;
    }

    .dim-desc {
        font-size: 13px !important;
    }

    .dim-key {
        width: 44px !important;
        font-size: 20px !important;
    }

    /* Pattern cards */
    .eng-pattern-card {
        padding: 16px !important;
    }

    .eng-pattern-name {
        font-size: 14px !important;
    }

    .eng-pattern-desc {
        font-size: 13px !important;
    }

    /* Other engines — single column */
    .eng-other-grid {
        grid-template-columns: 1fr !important;
    }

    .eng-other-link {
        font-size: 12px !important;
        padding: 12px 16px !important;
        min-height: 44px !important;
    }

    /* Detail box */
    .detail-box {
        padding: 20px 16px !important;
    }

    .detail-val.price {
        font-size: 22px !important;
    }

    /* Text overflow safety */
    .eng-body p,
    .eng-pattern-desc,
    .dim-desc,
    .eng-sub,
    .eng-core-q {
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
}

/* ===== LITE SHELL — ENGINE PAGE 375px ===== */
@media (max-width: 375px) {
    .eng-hero {
        padding: 56px 12px 28px !important;
    }

    .eng-title {
        font-size: 24px !important;
    }

    .eng-section {
        padding: 0 12px 28px !important;
    }

    .eng-section-title {
        font-size: 20px !important;
    }

    .eng-other {
        padding: 0 12px 36px !important;
    }
}

/* ===== LITE SHELL — LANDSCAPE ===== */
@media (max-width: 900px) and (orientation: landscape) {
    .eng-hero {
        padding: 56px 24px 32px !important;
        min-height: auto !important;
    }

    #cmp-lite-header > div {
        flex-direction: row !important;
        height: 48px !important;
        padding: 0 !important;
    }

    #cmp-lite-header nav {
        flex-wrap: nowrap !important;
    }
}

/* ===== LITE SHELL — REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .eng-hero-cta-btn:hover,
    .eng-cta-btn:hover,
    .cmp-cta-btn:hover,
    .eng-pattern-card:hover,
    .eng-other-link:hover {
        transform: none !important;
    }
}

/* ===== LITE SHELL — TOUCH DEVICE ===== */
@media (hover: none) and (pointer: coarse) {
    .eng-pattern-card:hover,
    .eng-other-link:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .eng-hero-cta-btn,
    .eng-cta-btn,
    .cmp-cta-btn {
        min-height: 48px !important;
    }

    #cmp-lite-header nav a {
        min-height: 44px !important;
    }

    #cmp-engine-grid a {
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* ===== LITE SHELL — CTA BUTTON OVERRIDES =====
 * Gold button hover: lighten + subtle glow + lift.
 * Also handles engine grid link hover on /contact/.
 * v3.1: Fix .entry-content a overriding button text color (gold-on-gold).
 * v3.2: Fix .btn-gold on homepage — same .entry-content a override issue.
 */

/* Homepage .btn-gold — override sitewide .entry-content a gold color */
.entry-content a.btn-gold,
.entry-content .btn-gold {
    color: #0e1d35 !important;
    background: #d4af37 !important;
    text-decoration: none !important;
}
.entry-content a.btn-gold:hover,
.entry-content .btn-gold:hover {
    color: #0e1d35 !important;
    background: #e8c44a !important;
    box-shadow: 0 0 12px rgba(232,196,74,0.5), 0 0 28px rgba(232,196,74,0.25) !important;
}
.cmp-cta-btn,
.entry-content .cmp-cta-btn,
.eng-cta-btn,
.entry-content .eng-cta-btn,
.entry-content a.eng-cta-btn,
.entry-content a.cmp-cta-btn {
    color: #0e1d35 !important;
    background: #d4af37 !important;
    transition: all 0.25s !important;
}

.cmp-cta-btn:hover,
.eng-cta-btn:hover,
.entry-content a.eng-cta-btn:hover,
.entry-content a.cmp-cta-btn:hover {
    color: #0e1d35 !important;
    background: #f0d45a !important;
    box-shadow: 0 0 18px rgba(212,175,55,0.35) !important;
    transform: translateY(-1px) !important;
}

/* Top hero CTA — primary (larger, more prominent) */
.eng-hero-cta-btn,
.entry-content a.eng-hero-cta-btn {
    display: inline-block !important;
    padding: 18px 52px !important;
    background: #d4af37 !important;
    color: #0e1d35 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 2.5px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    transition: all 0.25s !important;
}

.eng-hero-cta-btn:hover,
.entry-content a.eng-hero-cta-btn:hover {
    color: #0e1d35 !important;
    background: #f0d45a !important;
    box-shadow: 0 0 22px rgba(212,175,55,0.45) !important;
    transform: translateY(-2px) !important;
}

/* Bottom CTA — secondary (slightly smaller) */
.eng-cta-btn,
.entry-content a.eng-cta-btn {
    padding: 16px 44px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
}

#cmp-engine-grid a {
    transition: border-color 0.2s, color 0.2s !important;
}

#cmp-engine-grid a:hover {
    border-color: rgba(212,175,55,0.6) !important;
    color: #e8e6e1 !important;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--cmp-navy);
}
::-webkit-scrollbar-thumb {
    background: var(--cmp-gold);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e8c44a;
}

/* ================================================================
   LEVEL 3 PAYMENT FLOW — Success, Intake, Bundle Pages
   v3.0.0
   ================================================================ */

/* ── Shared Layout ────────────────────────────────────────────── */

.cmp-success-page,
.cmp-intake-page,
.cmp-bundle-page {
    min-height: 100vh;
    background: var(--cmp-navy);
    padding: 60px 20px 80px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.cmp-success-container,
.cmp-intake-container {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* ── Success Page ──────────────────────────────────────────────── */

.cmp-success-icon {
    margin-bottom: 24px;
}

.cmp-success-icon svg {
    display: inline-block;
}

.cmp-success-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 36px;
    color: #e0ecf6;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.cmp-success-product {
    margin-bottom: 20px;
}

.cmp-success-product-label {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cmp-gold);
    border: 1px solid rgba(212,175,55,0.4);
    padding: 8px 20px;
    border-radius: 4px;
}

.cmp-success-message {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #c8ccd4;
    line-height: 1.6;
    margin-bottom: 28px;
}

.cmp-success-next-steps {
    text-align: left;
    background: rgba(22,43,74,0.6);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 28px;
}

.cmp-success-next-steps h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 22px;
    color: #e0ecf6;
    margin-bottom: 12px;
}

.cmp-success-next-steps p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #c8ccd4;
    line-height: 1.6;
    margin-bottom: 8px;
}

.cmp-success-time-est {
    color: var(--cmp-gold) !important;
    font-size: 14px !important;
}

/* ── CTA Button (shared across success, intake, bundle) ──────── */

.cmp-success-cta {
    display: inline-block;
    padding: 16px 44px;
    background: var(--cmp-gold);
    color: var(--cmp-navy) !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none !important;
    border: 2px solid var(--cmp-gold);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

.cmp-success-cta:hover {
    background: transparent;
    color: var(--cmp-gold) !important;
    box-shadow: 0 0 20px rgba(212,175,55,0.3);
}

.cmp-success-cta--secondary {
    background: transparent;
    color: var(--cmp-gold) !important;
}

.cmp-success-cta--secondary:hover {
    background: var(--cmp-gold);
    color: var(--cmp-navy) !important;
}

.cmp-success-cta-wrapper {
    margin-bottom: 28px;
}

.cmp-success-fallback-note {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #c8a24a;
    margin-bottom: 16px;
}

/* ── Recovery / Footer Note ──────────────────────────────────── */

.cmp-success-recovery,
.cmp-intake-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(212,175,55,0.15);
}

.cmp-success-recovery p,
.cmp-intake-footer p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #8a9ab5;
    line-height: 1.5;
}

.cmp-success-recovery a,
.cmp-intake-footer a {
    color: var(--cmp-gold);
    text-decoration: underline;
}

/* ── Error State (success page + intake blocked) ──────────────── */

.cmp-success-container--error .cmp-success-title,
.cmp-intake-container--blocked .cmp-intake-title {
    color: #c8a24a;
}

.cmp-intake-blocked-message {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #c8ccd4;
    line-height: 1.6;
    margin-bottom: 24px;
}

.cmp-intake-blocked-help {
    text-align: left;
    background: rgba(22,43,74,0.6);
    border: 1px solid rgba(200,162,74,0.2);
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 28px;
}

.cmp-intake-blocked-help h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 22px;
    color: #e0ecf6;
    margin-bottom: 12px;
}

.cmp-intake-blocked-help ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cmp-intake-blocked-help li {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #c8ccd4;
    line-height: 1.6;
    padding: 6px 0 6px 20px;
    position: relative;
}

.cmp-intake-blocked-help li::before {
    content: '\2022';
    color: var(--cmp-gold);
    position: absolute;
    left: 0;
}

.cmp-intake-blocked-help a {
    color: var(--cmp-gold);
}

.cmp-intake-blocked-cta {
    margin-bottom: 20px;
}

.cmp-intake-blocked-icon {
    margin-bottom: 24px;
}

/* ── Intake Form Page ─────────────────────────────────────────── */

.cmp-intake-header {
    margin-bottom: 32px;
}

.cmp-intake-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 32px;
    color: #e0ecf6;
    margin-bottom: 12px;
}

.cmp-intake-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #c8ccd4;
    line-height: 1.6;
}

.cmp-intake-form-wrapper {
    text-align: left;
    margin-bottom: 32px;
}

.cmp-intake-form-unavailable {
    background: rgba(22,43,74,0.6);
    border: 1px solid rgba(200,162,74,0.3);
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 32px;
}

.cmp-intake-form-unavailable p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #c8ccd4;
    line-height: 1.6;
}

.cmp-intake-form-unavailable a {
    color: var(--cmp-gold);
}

/* ── Bundle Coordination Form ──────────────────────────────────── */

.cmp-bundle-container {
    max-width: 680px;
}

.cmp-bundle-form {
    text-align: left;
    margin-bottom: 32px;
}

.cmp-bundle-field {
    margin-bottom: 24px;
}

.cmp-bundle-field label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #e0ecf6;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.cmp-bundle-field-hint {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #8a9ab5;
    margin-bottom: 10px;
}

.cmp-bundle-field input[type="text"],
.cmp-bundle-field input[type="email"],
.cmp-bundle-field textarea,
.cmp-bundle-field select {
    width: 100%;
    padding: 12px 16px;
    background: var(--cmp-navy-mid);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 6px;
    color: #e0ecf6;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: border-color 0.2s;
}

.cmp-bundle-field input:focus,
.cmp-bundle-field textarea:focus,
.cmp-bundle-field select:focus {
    outline: none;
    border-color: var(--cmp-gold);
    box-shadow: 0 0 0 2px rgba(212,175,55,0.15);
}

.cmp-bundle-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d4b74a' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.cmp-bundle-field select option {
    background: var(--cmp-navy-mid);
    color: #e0ecf6;
}

.cmp-bundle-note {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--cmp-gold);
    padding: 12px 16px;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 6px;
}

/* ── Engine Picker Grid ──────────────────────────────────────── */

.cmp-bundle-engine-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cmp-bundle-engine-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--cmp-navy-mid);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.cmp-bundle-engine-option:hover {
    border-color: rgba(212,175,55,0.5);
}

.cmp-bundle-engine-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cmp-gold);
    cursor: pointer;
}

.cmp-bundle-engine-option input:checked + .cmp-bundle-engine-label {
    color: var(--cmp-gold);
}

.cmp-bundle-engine-option input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cmp-bundle-engine-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #c8ccd4;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cmp-bundle-submit-wrapper {
    text-align: center;
    margin-top: 32px;
}

.cmp-bundle-submit-wrapper .cmp-success-cta {
    width: 100%;
    max-width: 400px;
}

/* ── Bundle Confirmation ──────────────────────────────────────── */

.cmp-bundle-confirmation .cmp-bundle-summary {
    background: rgba(22,43,74,0.6);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
    text-align: left;
}

.cmp-bundle-summary p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #c8ccd4;
    line-height: 1.6;
    margin-bottom: 4px;
}

.cmp-bundle-summary strong {
    color: #e0ecf6;
}

/* ── Mobile Touch UX ──────────────────────────────────────────── */
a,button,input,select,textarea,.wp-element-button,.wp-block-button__link{touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
.wp-element-button:focus-visible,.wp-block-button__link:focus-visible,.button:focus-visible,
button[type="submit"]:focus-visible,input[type="submit"]:focus-visible,a:focus-visible{outline:2px solid var(--cmp-gold,#d4af37);outline-offset:2px;}
:focus:not(:focus-visible){outline:none;}
.wp-element-button:active,.wp-block-button__link:active,.button:active,
button[type="submit"]:active,input[type="submit"]:active{transform:scale(0.97);opacity:0.9;}
.cmp-success-cta,.cmp-intake-btn,.cmp-bundle-cta{min-height:48px;touch-action:manipulation;}

/* ── Reduced Motion ──────────────────────────────────────────── */
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important;}}

/* ── Mobile Responsive ────────────────────────────────────────── */

@media (max-width: 768px) {
    .cmp-success-page,
    .cmp-intake-page,
    .cmp-bundle-page {
        padding: 40px 16px 60px;
    }

    .cmp-success-title,
    .cmp-intake-title {
        font-size: 28px;
    }

    .cmp-success-cta {
        padding: 14px 32px;
        font-size: 14px;
    }

    .cmp-bundle-engine-grid {
        grid-template-columns: 1fr;
    }

    .cmp-success-next-steps,
    .cmp-intake-blocked-help {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .cmp-success-title,
    .cmp-intake-title {
        font-size: 24px;
    }

    .cmp-success-product-label {
        font-size: 12px;
        padding: 6px 14px;
    }

    .cmp-success-cta {
        padding: 12px 24px;
        font-size: 13px;
        width: 100%;
    }
}
