:root {
    --ccf-container-max: 1200px;
    --ccf-container-wide: 1280px;
    --ccf-container-narrow: 960px;
    --ccf-reading-max: 52rem;
    --ccf-page-gutter: clamp(1rem, 3vw, 2rem);
    --ccf-section-y: clamp(3rem, 6vw, 6rem);
    --ccf-card-gap: clamp(1rem, 2vw, 1.5rem);
}

html {
    scrollbar-gutter: stable;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

pre {
    max-width: 100%;
    overflow-x: auto;
}

code {
    overflow-wrap: anywhere;
}

.table-responsive {
    max-width: 100%;
}

.ccf-container {
    width: min(calc(100% - (var(--ccf-page-gutter) * 2)), var(--ccf-container-max));
    margin-inline: auto;
}

.ccf-container-wide { max-width: var(--ccf-container-wide); }

.ccf-reading-column {
    width: min(calc(100% - (var(--ccf-page-gutter) * 2)), var(--ccf-reading-max));
    margin-inline: auto;
}

.ccf-section { padding-block: var(--ccf-section-y); }

.ccf-grid {
    display: grid;
    gap: var(--ccf-card-gap);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.ccf-hero,
.section,
main > section {
    overflow-x: clip;
}

.ccf-card,
.panel,
.case-note,
.story-dark,
.plan-card-lite {
    overflow-wrap: anywhere;
}

.ccf-card p,
.story-dark p,
.case-note p,
.casefile-step p,
.casefile-step li,
.video-context p,
.ccf-lead,
.max-copy {
    max-width: var(--ccf-reading-max);
}

.casefile-progressive-shell,
.casefile-title-bar > .container,
.casefile-cover-page__inner {
    width: min(calc(100% - (var(--ccf-page-gutter) * 2)), var(--ccf-container-max));
    margin-inline: auto;
}

.casefile-cover-page__image img,
.book-zero-poster img,
.hero-image-card img,
.video-frame,
.watch-video-frame {
    contain: layout paint;
}

.dashboard-shell,
.member-dashboard-shell,
.proof-ledger-shell {
    width: min(calc(100% - (var(--ccf-page-gutter) * 2)), var(--ccf-container-wide));
    margin-inline: auto;
}

@media (min-width: 1200px) {
    .ccf-nav > .container,
    .ccf-hero > .container,
    .ccf-footer > .container,
    main > section > .container {
        max-width: var(--ccf-container-max);
    }
}

@media (max-width: 575.98px) {
    .hero .row,
    .section .row,
    main .row {
        margin-inline: 0;
    }

    .ccf-hero h1 {
        font-size: clamp(2.25rem, 12vw, 3.25rem);
        line-height: 1;
        overflow-wrap: anywhere;
    }

    .btn {
        max-width: 100%;
        min-height: 2.75rem;
        white-space: normal;
    }

    .ccf-card,
    .panel,
    .case-note,
    .story-dark {
        padding-inline: max(1rem, env(safe-area-inset-left));
    }

    .casefile-title-bar h4,
    .casefile-cover-title,
    .display-6,
    h1 {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 767.98px) {
    .casefile-briefing-toolbar,
    .casefile-progress-actions,
    .ccf-error-actions,
    .casefile-error-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .casefile-briefing-toolbar .btn,
    .casefile-progress-actions .btn {
        width: 100%;
    }

    .casefile-step .row {
        row-gap: 1rem;
    }
}

@media (max-width: 991.98px) {
    .ccf-card,
    .panel,
    .case-note {
        max-width: 100%;
    }
}

@media (max-width: 991.98px) {
    .book-wrap .definition::after {
        position: fixed;
        inset: auto 1rem 1rem;
        width: auto;
        max-width: none;
        transform: none;
    }
}
body:has(.ccf-fixed-offers) { padding-bottom: 5.25rem; }

.ccf-fixed-offers {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    border-top: 1px solid rgba(255,255,255,.28);
    background: #000;
    box-shadow: 0 -10px 30px rgba(0,0,0,.35);
    color: #fff;
}

.ccf-fixed-offers__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
    padding: .65rem 0;
}

.ccf-fixed-offers__label {
    flex: 0 0 auto;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ccf-fixed-offers__actions { display: flex; justify-content: flex-end; gap: .65rem; width: 100%; }

.ccf-offer-btn,
.ccf-offer-checkout-btn {
    border: 1px solid #fff;
    border-radius: 999px;
    background: #8f1d1d;
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
}

.ccf-offer-btn,
.ccf-offer-checkout-btn {
    flex: 0 0 7.5rem;
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ccf-offer-btn--preview {
    background: #198754;
    border-color: #fff;
    color: #fff;
}

.ccf-offer-checkout-btn {
    align-self: center;
    background: #198754;
    border-color: #fff;
    color: #fff;
    height: 42px;
    min-height: 42px;
    padding: .55rem 1.15rem;
    width: 100%;
    max-width: 245px;
}

.ccf-offer-btn:hover,
.ccf-offer-btn:focus {
    border-color: #fff;
    background: #fff;
    color: #8f1d1d;
}

.ccf-offer-btn--preview:hover,
.ccf-offer-btn--preview:focus {
    border-color: #fff;
    background: #fff;
    color: #198754;
}

.ccf-offer-checkout-btn:hover,
.ccf-offer-checkout-btn:focus {
    border-color: #fff;
    background: #fff;
    color: #198754;
}

.ccf-offer-modal {
    position: relative;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 1.25rem;
    background: #121212;
    color: #fff;
}

.ccf-offer-modal .access-checkout-plan-name {
    color: #fff;
    display: block;
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.15;
}

.ccf-offer-modal .access-checkout-brand {
    color: #C8A75D;
    display: block;
    font-size: .9rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    margin-bottom: .35rem;
    text-align: left;
    text-transform: uppercase;
}

.ccf-offer-modal .access-checkout-heading {
    text-align: left;
}

.ccf-offer-modal .access-checkout-price {
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    margin-top: .75rem;
    text-align: center;
    width: 100%;
}

.ccf-offer-modal .access-checkout-price-amount {
    color: #C8A75D;
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
    display: inline-block;
    margin-bottom: 20px;
}


.ccf-offer-modal .access-checkout-price-term-year-or-month {
    color: #fff;
    display: inline-block;
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.35;
    margin-bottom: 10px;
}


.ccf-offer-modal .access-checkout-price-term {
    color: #fff;
    display: block;
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.35;
    margin-bottom: 10px;
}

.ccf-offer-modal .access-checkout-price.is-one-time .access-checkout-price-term {
    display: block;
}

.ccf-offer-modal .access-checkout-price-note {
    color: #fff;
    display: block;
    font-size: .9rem;
    font-weight: normal;
    line-height: 1.35;
}

.ccf-offer-modal .access-checkout-terms {
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.ccf-offer-modal > .btn-close { align-self: flex-end; margin: .85rem .85rem 0 auto; }

.ccf-offer-modal .modal-footer {
    display: block;
    text-align: center;
}

.ccf-offer-modal .modal-billing-toggle .billing-toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(200, 167, 93, .55);
    border-radius: 999px;
    background: rgba(12, 18, 32, .72);
    color: #fff;
    font-weight: 900;
    padding: 5px;
    line-height: 1;
    box-shadow: 0 14px 35px rgba(0, 0, 0, .22);
    margin: .65rem 0;
}

.ccf-offer-modal .modal-billing-toggle .billing-toggle-choice {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 9px 16px;
    line-height: 1;
    transition: background-color .18s ease, color .18s ease;
}

.ccf-offer-modal .modal-billing-toggle .billing-toggle-choice.active {
    background: #C8A75D;
    color: #17110e;
}

.ccf-offer-modal .ccf-offer-checkout-btn {
    align-self: center;
    background: #198754;
    border-color: #fff;
    color: #fff;
    flex: 0 0 auto;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: .55rem 1.15rem;
    width: 100%;
    max-width: 245px;
}

@media (max-width: 991.98px) {
    body:has(.ccf-fixed-offers) { padding-bottom: 8.5rem; }
    .ccf-fixed-offers__inner { align-items: stretch; flex-direction: column; gap: .4rem; }
    .ccf-fixed-offers__label { text-align: center; }
    .ccf-fixed-offers__actions { justify-content: center; }
}

@media (max-width: 575.98px) {
    body:has(.ccf-fixed-offers) { padding-bottom: 7.25rem; }
    .ccf-fixed-offers { padding-inline: .45rem; }
    .ccf-fixed-offers__inner { gap: .35rem; min-height: auto; padding: .45rem 0; }
    .ccf-fixed-offers__label { font-size: .82rem; letter-spacing: .06em; line-height: 1; }
    .ccf-fixed-offers__actions { align-items: center; flex-direction: row; gap: .35rem; justify-content: center; }
    .ccf-offer-btn { flex: 1 1 0; min-width: 0; min-height: 1.9rem; padding: .25rem .35rem; font-size: .68rem; line-height: 1; }
}
