
    html:has(#coursePurchasePreview[aria-modal="true"]) {
        overflow: hidden;
    }
    #coursePurchasePreview {
        --purchase-ink: #263f36;
        --purchase-muted: #67786c;
        --purchase-border: #e1e4d9;
        color: var(--purchase-ink);
        text-align: left;
        overscroll-behavior: contain;
    }
    #coursePurchasePreview .modal-content {
        background: #fffefa;
        overflow: hidden;
    }
    #coursePurchasePreview .modal-body {
        padding: 0;
        overscroll-behavior: contain;
    }
    #coursePurchasePreview .course-purchase__close {
        position: absolute;
        z-index: 2;
        top: 12px;
        right: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 1px solid var(--purchase-border);
        border-radius: 50%;
        background: #fffefa;
        color: var(--purchase-ink);
        font-size: 20px;
    }
    #coursePurchasePreview .course-purchase__close:hover {
        background: #edf0e7;
    }
    #coursePurchasePreview .course-purchase__close:focus-visible {
        outline: 3px solid #567563;
        outline-offset: 3px;
    }
    #coursePurchasePreview .course-purchase__hero {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 160px;
        background: #f5f2eb;
    }
    #coursePurchasePreview .course-purchase__cover {
        display: block;
        width: 100%;
        max-height: 288px;
        object-fit: contain;
    }
    #coursePurchasePreview .course-purchase__placeholder {
        font-size: 76px;
        color: #71816f;
    }
    #coursePurchasePreview .course-purchase__details {
        padding: 24px;
    }
    #coursePurchasePreview .course-purchase__eyebrow {
        margin: 0 0 10px;
        color: var(--purchase-muted);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .16em;
        text-transform: uppercase;
    }
    #coursePurchasePreview .course-purchase__title {
        margin: 0;
        color: var(--purchase-ink);
        font-size: clamp(28px, 5vw, 34px);
        font-weight: 600;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }
    #coursePurchasePreview .course-purchase__subtitle {
        margin: 10px 0 0;
        color: var(--purchase-muted);
        font-size: 17px;
        line-height: 1.45;
    }
    #coursePurchasePreview .course-purchase__author {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 16px;
        color: var(--purchase-muted);
        font-size: 14px;
    }
    #coursePurchasePreview .course-purchase__avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
    }
    #coursePurchasePreview .course-purchase__facts,
    #coursePurchasePreview .course-purchase__tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 16px;
        margin: 16px 0 0;
        padding: 0;
        list-style: none;
        color: var(--purchase-muted);
        font-size: 13px;
    }
    #coursePurchasePreview .course-purchase__facts li {
        display: flex;
        align-items: baseline;
        gap: 8px;
    }
    #coursePurchasePreview .course-purchase__tags {
        gap: 8px;
    }
    #coursePurchasePreview .course-purchase__tags li {
        padding: 6px 12px;
        border-radius: 6px;
        background: #edf0e6;
        color: #53684e;
        font-size: 13px;
    }
    #coursePurchasePreview .course-purchase__checkout {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--purchase-border);
    }
    #coursePurchasePreview .course-purchase__price-label {
        display: block;
        margin-bottom: 5px;
        color: var(--purchase-muted);
        font-size: 12px;
    }
    #coursePurchasePreview .course-purchase__price {
        font-size: 32px;
        font-weight: 500;
        line-height: 1.2;
        white-space: nowrap;
    }
    #coursePurchasePreview .course-purchase__notice {
        margin: 16px 0 0;
        color: var(--purchase-muted);
        font-size: 12px;
        line-height: 1.5;
    }
    #coursePurchasePreview [hidden] {
        display: none !important;
    }
    #coursePurchasePreview .course-purchase__order {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin: 24px 0;
        padding: 16px 0;
        border-top: 1px solid var(--purchase-border);
        border-bottom: 1px solid var(--purchase-border);
        font-size: 15px;
    }
    #courseOrderForm .form-control:focus-visible {
        outline: 2px solid #567563;
        outline-offset: 2px;
    }
    #coursePurchasePreview .purchase-order-type {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        width: 100%;
        max-width: 420px;
        padding: 4px;
        border-radius: 999px;
        background: #f2f3f7;
    }
    #coursePurchasePreview .purchase-order-type__option {
        min-width: 0;
        min-height: 44px;
        margin: 0;
        padding: 10px 14px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: #4e5664;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.3;
        white-space: normal;
        box-shadow: none;
        transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
    }
    #coursePurchasePreview .purchase-order-type__option[aria-pressed="false"]:hover:not(:disabled) {
        background: #e7eaf3;
        color: #344b91;
    }
    #coursePurchasePreview .purchase-order-type__option[aria-pressed="true"] {
        background: #667ec3;
        color: #fff;
        box-shadow: 0 1px 3px rgba(41, 59, 109, .16);
    }
    #coursePurchasePreview .purchase-order-type__option:focus-visible {
        outline: 2px solid #344b91;
        outline-offset: 2px;
    }
    @media (prefers-reduced-motion: reduce) {
        #coursePurchasePreview .purchase-order-type__option { transition: none; }
    }
    #courseBlikForm [data-blik-digit]::selection {
        background: transparent;
        color: var(--bs-body-color, #212529);
    }
    @media (min-width: 768px) {
        #coursePurchasePreview .modal-dialog:not(.modal-fullscreen) {
            width: calc(100% - 20px);
            max-width: 480px;
            margin: 16px auto;
            height: calc(100% - 32px);
        }
        #coursePurchasePreview .modal-dialog:not(.modal-fullscreen) .modal-content {
            border: 1px solid var(--purchase-border);
            border-radius: 20px;
            box-shadow: 0 24px 90px rgba(23, 45, 36, .22);
        }
    }
    #coursePurchasePreview:has(> .modal-dialog.modal-fullscreen) {
        padding: 0 !important;
    }
    #coursePurchasePreview .modal-dialog.modal-fullscreen {
        width: 100%;
        max-width: none;
    }
    #coursePurchasePreview .modal-fullscreen .modal-content {
        background: #fff;
    }
    #coursePurchasePreview .modal-footer {
        padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    }
    @media (max-width: 480px) {
        #coursePurchasePreview .course-purchase__details {
            padding: 20px;
        }
    }

#coursePurchasePreview[data-purchase-kind="issue"] .course-purchase__intro { grid-template-columns: 100px minmax(0, 1fr); }
#coursePurchasePreview[data-purchase-kind="issue"] .course-purchase__hero { padding: 0; }
#coursePurchasePreview[data-purchase-kind="issue"] .course-purchase__cover { width: auto; max-width: 100%; max-height: 145px; box-shadow: 0 8px 24px #263f3626; }

/* Compact purchase offer; keep the complete cover and all purchase information visible. */
#coursePurchasePreview[data-purchase-compact] .course-purchase__details {
    padding: 20px;
}
#coursePurchasePreview .course-purchase__intro {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding-right: 32px;
}
#coursePurchasePreview .course-purchase__intro .course-purchase__hero {
    min-height: 0;
    border-radius: 10px;
    overflow: hidden;
}
#coursePurchasePreview .course-purchase__intro .course-purchase__cover {
    max-height: 128px;
}
#coursePurchasePreview .course-purchase__intro .course-purchase__placeholder {
    padding: 12px;
    font-size: 48px;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__eyebrow {
    margin-bottom: 5px;
    font-size: 10px;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__title {
    font-size: 28px;
    line-height: 1.15;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__subtitle {
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.35;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__author {
    gap: 8px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.3;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__avatar {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__facts,
#coursePurchasePreview[data-purchase-compact] .course-purchase__tags {
    gap: 6px 16px;
    margin-top: 14px;
    line-height: 1.4;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__tags li {
    padding: 4px 8px;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__checkout {
    margin-top: 14px;
    padding-top: 12px;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__checkout > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__price-label {
    margin: 0;
    font-size: 13px;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__price {
    font-size: 28px;
}
#coursePurchasePreview[data-purchase-compact] .course-purchase__notice {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
}
#coursePurchasePreview .course-purchase__auth {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--purchase-border);
}
#coursePurchasePreview .course-purchase__auth .form-label {
    margin-bottom: 5px;
    font-size: 14px;
}
#coursePurchasePreview .course-purchase__auth .form-control {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.5;
}
#coursePurchasePreview .course-purchase__auth .small {
    font-size: 13px;
    line-height: 1.4;
}
#coursePurchasePreview [data-checkout-code-panel] {
    margin-top: 10px;
}
#coursePurchasePreview[data-purchase-compact]:has([data-purchase-panel="offer"]:not([hidden])) .modal-footer {
    padding: 12px 20px max(12px, env(safe-area-inset-bottom)) !important;
}
#coursePurchasePreview[data-purchase-compact] [data-purchase-next] {
    min-height: 48px;
    height: auto;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.35;
    white-space: normal;
}
@media (min-width: 768px) {
    #coursePurchasePreview[data-purchase-compact] .modal-dialog:not(.modal-fullscreen) {
        max-width: 640px;
    }
}
@media (max-width: 480px) {
    #coursePurchasePreview[data-purchase-compact] .modal-dialog:not(.modal-fullscreen) .modal-content {
        border: 1px solid var(--purchase-border);
        border-radius: 16px;
    }
    #coursePurchasePreview[data-purchase-compact] .course-purchase__details {
        padding: 16px;
    }
    #coursePurchasePreview .course-purchase__intro {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 12px;
        padding-right: 24px;
    }
    #coursePurchasePreview .course-purchase__intro .course-purchase__cover {
        max-height: 88px;
    }
    #coursePurchasePreview[data-purchase-compact] .course-purchase__title {
        font-size: 23px;
    }
    #coursePurchasePreview[data-purchase-compact] .course-purchase__subtitle {
        font-size: 14px;
    }
    #coursePurchasePreview[data-purchase-compact] .course-purchase__close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}
