.article-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    isolation: isolate;
    padding-top: 0.5rem;
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    /* iOS: home indicator + gap above Safari chrome */
    padding-bottom: max(0.65rem, calc(0.5rem + env(safe-area-inset-bottom, 0px)));
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

/* Hidden while an in-page primary CTA / footer is in view — no transition (avoids load flicker). */
.article-sticky-cta.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.article-sticky-cta.hidden .article-sticky-cta__btn {
    pointer-events: none;
}

.article-sticky-cta__btn {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    height: 54px;
    min-height: 54px;
    max-height: 54px;
    padding: 0 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: none;
    text-align: center;
    text-decoration: none;
    color: #222;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 6px 18px rgba(255, 165, 0, 0.3);
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.article-sticky-cta__btn:active {
    transform: scale(0.98);
}

/* Sentence case + same corner radius as .article-sticky-cta__btn (12px). */
a.create-account-btn {
    text-transform: none !important;
    letter-spacing: 0.02em;
    border-radius: 12px !important;
}

a.how-to-earn-cta {
    text-transform: none !important;
    letter-spacing: 0.02em;
    border-radius: 12px;
}

@media (max-width: 767px) {
    /*
     * header.php no longer uses body { contain: layout paint }; sticky CTA uses contain: none on mobile
     * for position:fixed bar. index.php overrides with contain: none for the homepage sticky CTA.
     */
    body {
        contain: none !important;
    }

    .article-sticky-cta {
        display: block;
        background: transparent;
        box-shadow: none;
    }

    /*
     * Body padding-after-footer is white and shows as a line; keep scroll gap inside the footer’s
     * dark strip instead (aligned to shorter sticky bar ~54px + padding).
     */
    body.article-sticky-cta-pad {
        padding-bottom: 0;
    }

    body.article-sticky-cta-pad footer.modern-footer::after {
        content: '';
        display: block;
        width: 100%;
        height: 72px;
        min-height: 72px;
        background: #1a1f2e;
        pointer-events: none;
    }

    /* Homepage-parity hero type (beats page-level 2.2rem overrides) */
    body .hero-section h1.hero-title,
    body section.hero-section .hero-title {
        font-size: clamp(2.1rem, 7.2vw, 4.2rem) !important;
        line-height: 1.1 !important;
        margin-bottom: 1.25rem !important;
        font-weight: 600 !important;
        letter-spacing: -0.025em !important;
    }

    body .hero-section p.hero-subtitle,
    body section.hero-section .hero-subtitle {
        font-size: clamp(1.1rem, 3.6vw, 1.9rem) !important;
        line-height: 1.35 !important;
        margin-bottom: 1.5rem !important;
        font-weight: 400 !important;
    }

    /* Purple CTA band + shared cta-section — large yellow button like homepage */
    .cta-section .create-account-btn,
    .cta-section .cta-calm__btn.create-account-btn,
    section[style*="#4e00d5"] a.btn[style*="FFD700"],
    section[style*="#4e00d5"] a.btn[style*="ffd700"],
    section[style*="#4e00d5"] a.earnne-yellow-cta {
        padding: 1.1rem 1.35rem !important;
        border-radius: 14px !important;
        font-size: 1.28rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.01em !important;
        line-height: 1.25 !important;
        text-transform: none !important;
        min-height: 64px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        box-shadow: none !important;
    }

    /* get-paid (+ similar) hero yellow CTA — same scale as homepage */
    .hero-cta {
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-cta a.btn,
    .hero-cta a.earnne-yellow-cta,
    .hero-cta a[href*="/registration"],
    .hero-section .hero-cta a.btn,
    .hero-section a.btn[style*="FFD700"],
    .hero-section a.btn[style*="ffd700"],
    .hiw-hero .hero-cta a[href*="/registration"],
    .ways-hub-hero .hero-cta a[href*="/registration"] {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 64px !important;
        padding: 1.1rem 1.35rem !important;
        font-size: 1.28rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.01em !important;
        line-height: 1.25 !important;
        border-radius: 14px !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        box-shadow: none !important;
    }

    /*
     * Homepage green CTA: same width as the sticky bar (viewport minus same horizontal insets as .article-sticky-cta).
     */
    #how-to-earn-section a.how-to-earn-cta {
        padding: 1.05rem 1.25rem !important;
        border-radius: 12px !important;
        font-size: 1.125rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.02em !important;
        line-height: 1.25 !important;
        text-transform: none !important;
        min-height: 0 !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: calc(100vw - max(1rem, env(safe-area-inset-left, 0px)) - max(1rem, env(safe-area-inset-right, 0px))) !important;
        max-width: calc(100vw - max(1rem, env(safe-area-inset-left, 0px)) - max(1rem, env(safe-area-inset-right, 0px))) !important;
        margin-left: calc(50% - 50vw + max(1rem, env(safe-area-inset-left, 0px))) !important;
        margin-right: 0 !important;
    }
}

@media (min-width: 768px) {
    .article-sticky-cta {
        display: none !important;
    }

    body.article-sticky-cta-pad {
        padding-bottom: 0;
    }
}
