.cpeg-box {
    margin: 34px 0;
    text-align: center;
}
.cpeg-open-button,
.cpeg-download-button,
.cpeg-secondary-button,
.cpeg-form button {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    background: #e84b75;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    padding: 18px 34px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(232, 75, 117, 0.25);
    text-decoration: none;
}
.cpeg-open-button:hover,
.cpeg-download-button:hover,
.cpeg-secondary-button:hover,
.cpeg-form button:hover {
    filter: brightness(0.96);
}

.cpeg-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}
.cpeg-download-button {
    text-align: center;
}
.cpeg-secondary-button {
    background: #fff;
    color: #e84b75;
    border: 2px solid #e84b75;
    box-shadow: none;
    font-size: 16px;
    padding: 14px 22px;
}
.cpeg-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999999;
    padding: 18px;
}
.cpeg-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}
.cpeg-modal-card {
    position: relative;
    width: min(94vw, 440px);
    border-radius: 22px;
    background: #fff;
    padding: 30px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,.25);
}
.cpeg-modal-card h3 {
    margin: 0 0 10px;
    font-size: 26px;
}
.cpeg-modal-card p {
    margin: 0 0 18px;
}
.cpeg-close {
    position: absolute;
    top: 10px;
    right: 16px;
    border: 0;
    background: transparent;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}
.cpeg-form input[type="email"] {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px 16px;
    font-size: 17px;
    margin-bottom: 12px;
}
.cpeg-form button {
    width: 100%;
    font-size: 18px;
    padding: 15px 20px;
}
.cpeg-download-button:disabled,
.cpeg-secondary-button:disabled,
.cpeg-form button:disabled {
    opacity: 0.65;
    cursor: wait;
}
.cpeg-message {
    margin-top: 13px !important;
    min-height: 20px;
    font-weight: 700;
}
.cpeg-message.is-error {
    color: #b00020;
}
.cpeg-download-body {
    background: #f7f3f0;
}
.cpeg-download-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 26px 16px 60px;
}
.cpeg-download-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.cpeg-back-link {
    color: #333;
    font-weight: 700;
}
.cpeg-pdf-content {
    background: #fff;
    color: #222;
    padding: 42px;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.65;
}
.cpeg-pdf-content h1 {
    font-size: 34px;
    margin: 0 0 24px;
    line-height: 1.15;
}
.cpeg-pdf-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    page-break-inside: avoid;
}
.cpeg-source {
    margin-top: 34px;
    font-size: 12px;
    color: #777;
}
@media (max-width: 600px) {
    .cpeg-pdf-content {
        padding: 22px;
    }
    .cpeg-open-button,
    .cpeg-download-button,
    .cpeg-secondary-button,
    .cpeg-action-buttons {
        width: 100%;
    }
}

@media print {
    body.cpeg-download-body { background: #fff !important; }
    .cpeg-download-actions, #wpadminbar { display: none !important; }
    .cpeg-download-wrap { max-width: none; padding: 0; margin: 0; }
    .cpeg-pdf-content { box-shadow: none; border-radius: 0; padding: 0; }
}

.cpeg-filter-form,
.cpeg-export-box {
    background: #fff;
    border: 1px solid #dcdcde;
    padding: 14px;
    margin: 16px 0;
}
.cpeg-filter-form input,
.cpeg-filter-form select {
    margin: 0 6px 8px 0;
}
.cpeg-export-box h2 {
    margin-top: 0;
}
.cpeg-admin-table td,
.cpeg-admin-table th {
    vertical-align: top;
}

.cpeg-analytics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.cpeg-analytics-cards div {
    background: #fff;
    border: 1px solid #dcdcde;
    padding: 12px;
    border-radius: 8px;
}
.cpeg-analytics-cards strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
}
.cpeg-analytics-cards span {
    display: block;
    color: #646970;
    margin-top: 4px;
}
.cpeg-analytics-details {
    background: #fff;
    border: 1px solid #dcdcde;
    padding: 10px 14px;
    margin: 12px 0 18px;
}
.cpeg-analytics-details summary {
    cursor: pointer;
    font-weight: 700;
}
.cpeg-compact-table-wrap {
    max-height: 360px;
    overflow: auto;
    margin-top: 12px;
}
.cpeg-compact-table th,
.cpeg-compact-table td {
    padding: 6px 8px;
    font-size: 12px;
}
.cpeg-settings-box textarea {
    max-width: 620px;
}
.cpeg-admin-wrap .tablenav-pages {
    margin: 14px 0;
}
.cpeg-admin-wrap .page-numbers {
    display: inline-block;
    padding: 5px 9px;
    margin-right: 4px;
    background: #fff;
    border: 1px solid #c3c4c7;
    text-decoration: none;
}
.cpeg-admin-wrap .page-numbers.current {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

/* Premium clean PDF layout */
.cpeg-premium-pdf {
    width: 820px;
    max-width: 100%;
    margin: 0 auto;
    background: #fffdfb;
    color: #2d2623;
    padding: 0;
    overflow: visible;
    font-family: Georgia, 'Times New Roman', serif;
}
.cpeg-pdf-cover {
    padding: 46px 48px 30px;
    border-bottom: 1px solid #eaded6;
    background: linear-gradient(180deg, #fff8f4 0%, #ffffff 80%);
    page-break-after: avoid;
}
.cpeg-brand-line {
    display: inline-block;
    border: 1px solid #e8c4b4;
    border-radius: 999px;
    color: #9b5d4b;
    background: #fff;
    padding: 8px 14px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.cpeg-premium-pdf h1 {
    color: #342b28;
    font-size: 40px;
    line-height: 1.12;
    margin: 0 0 24px;
    letter-spacing: -.02em;
}
.cpeg-cover-image {
    margin: 0 0 22px;
    page-break-inside: avoid;
}
.cpeg-cover-image img,
.cpeg-premium-pdf .cpeg-pdf-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: none;
    page-break-inside: avoid;
    break-inside: avoid;
}
.cpeg-pdf-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-family: Arial, sans-serif;
    margin-top: 12px;
}
.cpeg-pdf-meta span {
    background: #fff;
    border: 1px solid #eaded6;
    border-radius: 12px;
    padding: 11px 12px;
    color: #5c514d;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.cpeg-pdf-body {
    padding: 34px 48px 30px;
}
.cpeg-premium-pdf h2 {
    color: #352b28;
    font-size: 27px;
    line-height: 1.25;
    margin: 30px 0 12px;
    padding-bottom: 9px;
    border-bottom: 2px solid #f0d7cc;
    page-break-after: avoid;
    break-after: avoid;
}
.cpeg-premium-pdf h3 {
    color: #624337;
    font-size: 21px;
    margin: 24px 0 10px;
    page-break-after: avoid;
    break-after: avoid;
}
.cpeg-premium-pdf p,
.cpeg-premium-pdf li {
    font-size: 16px;
    line-height: 1.72;
}
.cpeg-premium-pdf ul,
.cpeg-premium-pdf ol {
    margin: 12px 0 20px 24px;
    padding: 0;
}
.cpeg-premium-pdf li {
    margin: 6px 0;
}
.cpeg-premium-pdf figure {
    margin: 20px 0;
    page-break-inside: avoid;
    break-inside: avoid;
}
.cpeg-premium-pdf figcaption {
    color: #7a6b65;
    font-family: Arial, sans-serif;
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
}
.cpeg-premium-pdf table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-family: Arial, sans-serif;
    font-size: 13px;
    page-break-inside: avoid;
}
.cpeg-premium-pdf th,
.cpeg-premium-pdf td {
    border: 1px solid #eaded6;
    padding: 9px 10px;
    vertical-align: top;
}
.cpeg-premium-pdf th {
    background: #fff4ef;
}
.cpeg-premium-pdf a {
    color: #9b4d62;
    text-decoration: none;
}
.cpeg-premium-pdf .cpeg-source {
    margin: 0;
    padding: 22px 48px 34px;
    border-top: 1px solid #eaded6;
    background: #fff8f4;
    color: #76665f;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.6;
}
.cpeg-premium-pdf .wp-caption,
.cpeg-premium-pdf .wp-block-image {
    max-width: 100% !important;
}
.cpeg-premium-pdf .alignleft,
.cpeg-premium-pdf .alignright,
.cpeg-premium-pdf .aligncenter {
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.cpeg-premium-pdf .adsbygoogle,
.cpeg-premium-pdf [class*="ad-"] {
    display: none !important;
}
@media (max-width: 700px) {
    .cpeg-pdf-cover,
    .cpeg-pdf-body,
    .cpeg-premium-pdf .cpeg-source {
        padding-left: 22px;
        padding-right: 22px;
    }
    .cpeg-premium-pdf h1 {
        font-size: 30px;
    }
    .cpeg-pdf-meta {
        grid-template-columns: 1fr;
    }
}
@media print {
    .cpeg-premium-pdf { width: 100%; box-shadow: none !important; }
    .cpeg-pdf-cover,
    .cpeg-pdf-body,
    .cpeg-premium-pdf .cpeg-source { padding-left: 24px; padding-right: 24px; }
    .cpeg-cover-image img,
    .cpeg-premium-pdf .cpeg-pdf-image { max-height: 8.8in; object-fit: contain; }
}

/* v1.4.1 PDF rendering fixes: fixed export width, bigger readable text, no blank export */
.cpeg-download-body {
    margin: 0 !important;
    overflow-x: auto;
}
.cpeg-download-body * {
    box-sizing: border-box;
}
.cpeg-download-wrap {
    width: 820px;
    max-width: 100%;
}
.cpeg-pdf-content.cpeg-premium-pdf {
    width: 760px !important;
    max-width: 760px !important;
    min-width: 760px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}
.cpeg-premium-pdf * {
    box-sizing: border-box !important;
    max-width: 100%;
}
.cpeg-premium-pdf h1,
.cpeg-premium-pdf h2,
.cpeg-premium-pdf h3,
.cpeg-premium-pdf p,
.cpeg-premium-pdf li,
.cpeg-premium-pdf td,
.cpeg-premium-pdf th {
    overflow-wrap: anywhere;
    word-break: normal;
}
.cpeg-premium-pdf h1 {
    font-size: 36px;
    line-height: 1.16;
}
.cpeg-premium-pdf h2 {
    font-size: 26px;
    line-height: 1.26;
}
.cpeg-premium-pdf h3 {
    font-size: 22px;
    line-height: 1.32;
}
.cpeg-premium-pdf p,
.cpeg-premium-pdf li {
    font-size: 18px;
    line-height: 1.78;
}
.cpeg-premium-pdf table {
    font-size: 14px;
    table-layout: fixed;
}
.cpeg-cover-image img,
.cpeg-premium-pdf .cpeg-pdf-image {
    max-width: 100% !important;
    width: auto !important;
    max-height: 7.9in;
    margin-left: auto !important;
    margin-right: auto !important;
    object-fit: contain !important;
}
.cpeg-cover-image img {
    width: 100% !important;
}
.cpeg-premium-pdf .size-full,
.cpeg-premium-pdf .size-large,
.cpeg-premium-pdf .wp-post-image {
    width: auto !important;
    height: auto !important;
}
.cpeg-pdf-export-clone {
    transform: none !important;
    zoom: 1 !important;
}
@media (max-width: 820px) {
    .cpeg-download-wrap {
        width: 820px;
        max-width: none;
        padding-left: 20px;
        padding-right: 20px;
    }
    .cpeg-download-actions {
        width: 760px;
    }
    .cpeg-pdf-content.cpeg-premium-pdf {
        width: 760px !important;
        max-width: 760px !important;
        min-width: 760px !important;
    }
}
@media print {
    .cpeg-pdf-content.cpeg-premium-pdf,
    .cpeg-premium-pdf {
        width: 760px !important;
        max-width: 760px !important;
        min-width: 760px !important;
    }
    .cpeg-premium-pdf p,
    .cpeg-premium-pdf li {
        font-size: 18px !important;
    }
}


/* v1.4.1: while generating, keep export clone renderable but remove preview clutter */
body.cpeg-is-generating-pdf {
    overflow: hidden !important;
}
body.cpeg-is-generating-pdf .cpeg-download-wrap > :not(#cpeg-pdf-export-clone),
body.cpeg-is-generating-pdf #wpadminbar {
    opacity: 0.08;
}
#cpeg-pdf-export-clone {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #fffdfb !important;
}
#cpeg-pdf-export-clone,
#cpeg-pdf-export-clone * {
    animation: none !important;
    transition: none !important;
}

/* v1.5.0: Reliable print-to-PDF mode. This avoids blank PDFs from html2canvas/html2pdf. */
@page {
    size: Letter;
    margin: 0.45in;
}
@media print {
    html, body {
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    body * {
        visibility: hidden !important;
    }
    #cpeg-pdf-content,
    #cpeg-pdf-content * {
        visibility: visible !important;
    }
    #cpeg-pdf-content {
        position: static !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: #fff !important;
        color: #222 !important;
        overflow: visible !important;
        font-size: 13.5pt !important;
        line-height: 1.5 !important;
    }
    .cpeg-pdf-cover {
        padding: 0 0 18pt !important;
        background: #fff !important;
        border-bottom: 1px solid #eaded6 !important;
    }
    .cpeg-pdf-body {
        padding: 16pt 0 0 !important;
    }
    .cpeg-pdf-content h1,
    .cpeg-premium-pdf h1 {
        font-size: 26pt !important;
        line-height: 1.12 !important;
        margin: 10pt 0 16pt !important;
    }
    .cpeg-pdf-content h2,
    .cpeg-premium-pdf h2 {
        font-size: 19pt !important;
        margin: 18pt 0 8pt !important;
        page-break-after: avoid !important;
    }
    .cpeg-pdf-content h3,
    .cpeg-premium-pdf h3 {
        font-size: 16pt !important;
        margin: 14pt 0 7pt !important;
        page-break-after: avoid !important;
    }
    .cpeg-pdf-content p,
    .cpeg-pdf-content li {
        font-size: 13.5pt !important;
        line-height: 1.5 !important;
    }
    .cpeg-pdf-content img,
    .cpeg-premium-pdf img {
        display: block !important;
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
        max-height: 7.4in !important;
        margin: 12pt auto !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        object-fit: contain !important;
    }
    .cpeg-cover-image,
    .cpeg-cover-image img {
        max-height: 6.5in !important;
    }
    figure, table, blockquote, ul, ol {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    a[href]:after {
        content: none !important;
    }
    .cpeg-source {
        margin-top: 20pt !important;
        font-size: 10pt !important;
        color: #555 !important;
        page-break-inside: avoid !important;
    }
}

/* Admin email list v1.7 compact layout */
.cpeg-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    max-width: 1180px;
}
.cpeg-list-count {
    color: #646970;
    font-weight: 600;
}
.cpeg-email-table-wrap {
    max-width: 1180px;
    overflow-x: auto;
    border: 1px solid #c3c4c7;
    background: #fff;
}
.cpeg-email-table {
    table-layout: fixed;
    min-width: 960px;
}
.cpeg-email-table th,
.cpeg-email-table td {
    padding: 10px 12px;
    vertical-align: middle;
    overflow-wrap: anywhere;
}
.cpeg-email-table .cpeg-check-col { width: 34px; text-align: center; }
.cpeg-email-table .cpeg-email-cell { width: 240px; }
.cpeg-email-table .cpeg-post-cell { width: 320px; }
.cpeg-email-table .cpeg-date-cell { width: 120px; white-space: nowrap; }
.cpeg-email-table .cpeg-downloads-cell { width: 65px; text-align: center; }
.cpeg-email-table .cpeg-status-cell { width: 110px; }
.cpeg-email-table .cpeg-details-cell { width: 150px; }
.cpeg-email-table .cpeg-post-cell a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}
.cpeg-details-cell details {
    position: relative;
}
.cpeg-details-cell summary {
    cursor: pointer;
    color: #2271b1;
    font-weight: 600;
}
.cpeg-details-cell details div {
    margin-top: 6px;
    font-size: 12px;
    color: #50575e;
}
.cpeg-status-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f0f0f1;
    color: #1d2327;
}
.cpeg-status-new { background: #e7f7ed; color: #116329; }
.cpeg-status-exported { background: #e8f0fe; color: #1d4ed8; }
.cpeg-status-archived { background: #f6f7f7; color: #50575e; }
.cpeg-status-cell small {
    display: block;
    margin-top: 4px;
    color: #646970;
}
.cpeg-top-pages {
    margin-top: 0;
}
@media (max-width: 900px) {
    .cpeg-list-toolbar { align-items: flex-start; flex-direction: column; }
    .cpeg-email-table { min-width: 860px; }
}

/* v1.8.0: Mobile preview fix and Facebook in-app browser helper */
.cpeg-inapp-notice {
    background: #fff7e6;
    border: 1px solid #f0c36d;
    color: #3c2f16;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 0 0 18px;
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}
.cpeg-inapp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.cpeg-small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d29a3a;
    border-radius: 999px;
    background: #fff;
    color: #55370a;
    font-size: 14px;
    font-weight: 800;
    padding: 9px 14px;
    cursor: pointer;
    text-decoration: none;
}
@media screen and (max-width: 820px) {
    html,
    body.cpeg-download-body {
        width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }
    .cpeg-download-wrap {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 14px 10px 36px !important;
        margin: 0 auto !important;
    }
    .cpeg-download-actions {
        width: 100% !important;
        gap: 10px;
        margin-bottom: 14px;
    }
    .cpeg-back-link {
        font-size: 14px;
    }
    .cpeg-download-button {
        width: 100% !important;
        font-size: 18px !important;
        padding: 15px 18px !important;
    }
    .cpeg-pdf-content.cpeg-premium-pdf,
    .cpeg-premium-pdf {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        border-radius: 14px !important;
    }
    .cpeg-pdf-cover,
    .cpeg-pdf-body,
    .cpeg-premium-pdf .cpeg-source {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .cpeg-pdf-cover {
        padding-top: 26px !important;
    }
    .cpeg-premium-pdf h1 {
        font-size: 28px !important;
        line-height: 1.16 !important;
    }
    .cpeg-premium-pdf h2 {
        font-size: 22px !important;
    }
    .cpeg-premium-pdf h3 {
        font-size: 19px !important;
    }
    .cpeg-premium-pdf p,
    .cpeg-premium-pdf li {
        font-size: 17px !important;
        line-height: 1.65 !important;
    }
    .cpeg-cover-image img,
    .cpeg-premium-pdf .cpeg-pdf-image,
    .cpeg-premium-pdf img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
    }
    .cpeg-pdf-meta {
        grid-template-columns: 1fr !important;
    }
    .cpeg-inapp-actions .cpeg-small-button {
        width: 100%;
    }
}


/* v1.9.0 premium PDF typography and organization */
.cpeg-premium-pdf {
    counter-reset: cpeg-section;
    color: #332b28;
}
.cpeg-premium-pdf .cpeg-pdf-body > h2,
.cpeg-premium-pdf .cpeg-pdf-body > .wp-block-heading:is(h2),
.cpeg-premium-pdf h2 {
    counter-increment: cpeg-section;
    position: relative;
    display: block;
    color: #2f2522 !important;
    background: linear-gradient(90deg, #fff0e8 0%, #fffaf7 72%, #ffffff 100%) !important;
    border: 1px solid #efd5c7 !important;
    border-left: 7px solid #d78667 !important;
    border-radius: 16px !important;
    padding: 15px 18px 15px 58px !important;
    margin: 38px 0 18px !important;
    font-family: Georgia, 'Times New Roman', serif !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.22 !important;
    box-shadow: 0 8px 22px rgba(97, 58, 43, 0.07) !important;
    page-break-after: avoid;
    break-after: avoid;
}
.cpeg-premium-pdf h2::before {
    content: counter(cpeg-section);
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #d78667;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 900;
    line-height: 28px;
    text-align: center;
}
.cpeg-premium-pdf h3 {
    color: #5c392e !important;
    font-family: Georgia, 'Times New Roman', serif !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.28 !important;
    margin: 28px 0 12px !important;
    padding: 0 0 8px 0 !important;
    border-bottom: 2px solid #f1ded4 !important;
    page-break-after: avoid;
    break-after: avoid;
}
.cpeg-premium-pdf h4,
.cpeg-premium-pdf h5,
.cpeg-premium-pdf h6 {
    color: #6b4438 !important;
    font-family: Arial, sans-serif !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    letter-spacing: .02em;
    text-transform: uppercase;
    margin: 22px 0 9px !important;
}
.cpeg-premium-pdf p {
    margin: 0 0 15px !important;
}
.cpeg-premium-pdf strong,
.cpeg-premium-pdf b {
    color: #2e2421;
    font-weight: 900 !important;
}
.cpeg-premium-pdf ul,
.cpeg-premium-pdf ol {
    background: #fffdfb;
    border: 1px solid #f0e1d9;
    border-radius: 14px;
    padding: 14px 18px 14px 34px !important;
    margin: 14px 0 22px !important;
    page-break-inside: avoid;
    break-inside: avoid;
}
.cpeg-premium-pdf li::marker {
    color: #b9684d;
    font-weight: 900;
}
.cpeg-premium-pdf li {
    padding-left: 4px;
    margin: 8px 0 !important;
}
.cpeg-premium-pdf blockquote {
    margin: 22px 0 !important;
    padding: 18px 20px !important;
    background: #fff7f2 !important;
    border-left: 6px solid #d78667 !important;
    border-radius: 14px !important;
    color: #4c403b !important;
    font-style: normal !important;
}
.cpeg-premium-pdf table {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #eaded6;
}
.cpeg-premium-pdf th {
    background: #fff1e9 !important;
    color: #4b312b !important;
    font-weight: 900 !important;
}
.cpeg-premium-pdf td {
    background: #ffffff !important;
}
.cpeg-premium-pdf .cpeg-pdf-image,
.cpeg-premium-pdf .cpeg-cover-image img {
    border: 1px solid #eaded6 !important;
    border-radius: 18px !important;
    margin-top: 10px !important;
    margin-bottom: 18px !important;
}
.cpeg-pdf-toc {
    background: linear-gradient(135deg, #fff8f4 0%, #ffffff 100%);
    border: 1px solid #eaded6;
    border-radius: 18px;
    padding: 20px 24px;
    margin: 0 0 30px;
    page-break-inside: avoid;
    break-inside: avoid;
}
.cpeg-pdf-toc h2 {
    counter-increment: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 0 10px 0 !important;
    margin: 0 0 12px !important;
    font-size: 22px !important;
}
.cpeg-pdf-toc h2::before {
    display: none !important;
    content: none !important;
}
.cpeg-pdf-toc ol {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 0 0 22px !important;
    columns: 2;
    column-gap: 30px;
}
.cpeg-pdf-toc li {
    font-family: Arial, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 0 8px !important;
    break-inside: avoid;
}
.cpeg-pdf-toc li.cpeg-toc-sub {
    color: #6b625e;
    font-size: 12px !important;
}
@media print {
    .cpeg-premium-pdf h2 {
        background: #fff4ee !important;
        box-shadow: none !important;
        font-size: 24px !important;
        padding: 12px 14px 12px 50px !important;
        margin: 26px 0 14px !important;
    }
    .cpeg-premium-pdf h3 {
        font-size: 19px !important;
        margin: 20px 0 9px !important;
    }
    .cpeg-premium-pdf p,
    .cpeg-premium-pdf li {
        font-size: 14.5pt !important;
        line-height: 1.55 !important;
    }
    .cpeg-premium-pdf ul,
    .cpeg-premium-pdf ol {
        box-shadow: none !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    .cpeg-pdf-toc ol {
        columns: 2;
    }
}
@media (max-width: 640px) {
    .cpeg-premium-pdf h2 {
        font-size: 23px !important;
        padding: 13px 14px 13px 52px !important;
        border-radius: 14px !important;
    }
    .cpeg-premium-pdf h3 {
        font-size: 20px !important;
    }
    .cpeg-pdf-toc ol {
        columns: 1 !important;
    }
}

/* Anti-theft license and watermark additions */
.cpeg-license-box {
    border: 2px solid #7a4f3f;
    background: #fff8f4;
    border-radius: 18px;
    padding: 18px 22px;
    margin: 20px 0 28px;
    page-break-inside: avoid;
    break-inside: avoid;
}
.cpeg-license-box h2 {
    margin: 0 0 10px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #4d2d23 !important;
    font-size: 22px !important;
    line-height: 1.2 !important;
}
.cpeg-license-box h2::before {
    display: none !important;
    content: none !important;
}
.cpeg-license-box p {
    margin: 0 0 14px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    color: #4d2d23 !important;
}
.cpeg-license-box dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    margin: 0;
}
.cpeg-license-box dl div {
    background: #ffffff;
    border: 1px solid #ecd9cf;
    border-radius: 12px;
    padding: 9px 11px;
}
.cpeg-license-box dt {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #8a6a5f;
    margin: 0 0 3px;
    font-weight: 700;
}
.cpeg-license-box dd {
    margin: 0;
    color: #3b2822;
    font-weight: 700;
    word-break: break-word;
}
.cpeg-license-watermark {
    display: none;
}
.cpeg-security-warning {
    color: #8a2b18;
    background: #fff2ee;
    border-left: 3px solid #d94b2b;
    padding: 6px 8px;
    margin-top: 6px;
}
@media print {
    .cpeg-license-box {
        border-color: #6b3d2e !important;
        background: #fff8f4 !important;
        box-shadow: none !important;
    }
    .cpeg-license-box dl {
        grid-template-columns: 1fr 1fr !important;
    }
    .cpeg-license-watermark {
        display: block !important;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 5px 12mm 4px;
        border-top: 1px solid #d8c5bb;
        background: rgba(255,255,255,.94) !important;
        color: #6b5c55 !important;
        font-family: Arial, sans-serif !important;
        font-size: 8.5pt !important;
        line-height: 1.2 !important;
        text-align: center;
        z-index: 999999;
    }
    .cpeg-source {
        margin-bottom: 26px !important;
    }
}
@media (max-width: 640px) {
    .cpeg-license-box dl {
        grid-template-columns: 1fr;
    }
}

/* v2.2.0: Low-opacity anti-resale watermark on every PDF page */
.cpeg-page-watermark {
    display: none;
    pointer-events: none;
    user-select: none;
}
.cpeg-pdf-content.cpeg-premium-pdf {
    position: relative;
}
.cpeg-pdf-cover,
.cpeg-pdf-body,
.cpeg-source,
.cpeg-license-box {
    position: relative;
    z-index: 2;
}
.cpeg-download-body .cpeg-page-watermark {
    display: block;
    position: fixed;
    top: 47%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-32deg);
    width: 125%;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(42px, 8vw, 82px);
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1;
    color: rgba(95, 64, 54, .075);
    text-transform: uppercase;
    z-index: 1;
}
@media print {
    .cpeg-page-watermark {
        display: block !important;
        visibility: visible !important;
        position: fixed !important;
        top: 48% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) rotate(-32deg) !important;
        width: 130% !important;
        text-align: center !important;
        font-family: Arial, Helvetica, sans-serif !important;
        font-size: 42pt !important;
        font-weight: 900 !important;
        letter-spacing: .04em !important;
        line-height: 1 !important;
        color: rgba(95, 64, 54, .08) !important;
        text-transform: uppercase !important;
        z-index: 1 !important;
        pointer-events: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* v2.7.0 neutral PDF heading style - softer, not warning-colored */
.cpeg-premium-pdf h2,
.cpeg-premium-pdf .cpeg-generated-h2 {
    background: #f8f2ea;
    border: 1px solid #d8c6b5;
    border-left: 6px solid #8a6a4d;
    color: #2f2823;
    padding: 12px 16px;
    border-radius: 0;
    box-shadow: none;
}
.cpeg-premium-pdf h3,
.cpeg-premium-pdf .cpeg-generated-h3 {
    background: #fffaf4;
    border: 1px solid #e3d4c3;
    color: #352b26;
    padding: 9px 13px;
    border-radius: 0;
    box-shadow: none;
}
.cpeg-premium-pdf .cpeg-generated-list-item {
    margin-left: 14px;
}
@media print {
    .cpeg-premium-pdf h2,
    .cpeg-premium-pdf .cpeg-generated-h2 {
        background: #f8f2ea !important;
        border: 1px solid #d8c6b5 !important;
        border-left: 6px solid #8a6a4d !important;
        color: #2f2823 !important;
        padding: 10pt 12pt !important;
    }
    .cpeg-premium-pdf h3,
    .cpeg-premium-pdf .cpeg-generated-h3 {
        background: #fffaf4 !important;
        border: 1px solid #e3d4c3 !important;
        color: #352b26 !important;
        padding: 7pt 10pt !important;
    }
}

/* v3.3.0 affiliate banner ads - downloader page only */
.cpeg-affiliate-banner {
    width: 100%;
    max-width: var(--cpeg-ad-desktop-width, 728px);
    margin: 18px auto 22px;
    text-align: center;
    clear: both;
}
.cpeg-affiliate-label {
    margin-bottom: 6px;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8a8178;
    font-family: Arial, Helvetica, sans-serif;
}
.cpeg-affiliate-inner {
    display: block;
    max-width: 100%;
}
.cpeg-affiliate-link {
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    text-decoration: none;
}
.cpeg-affiliate-banner picture,
.cpeg-affiliate-banner img {
    display: block;
    max-width: 100%;
}
.cpeg-affiliate-banner img {
    width: 100%;
    height: auto;
    border-radius: var(--cpeg-ad-radius, 8px);
    box-shadow: 0 8px 22px rgba(42, 30, 22, .08);
}
.cpeg-admin-ad-preview .cpeg-affiliate-banner {
    margin: 12px 0 0;
}
@media (max-width: 640px) {
    .cpeg-affiliate-banner {
        max-width: var(--cpeg-ad-mobile-width, 100%);
        margin: 14px auto 18px;
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }
}
@media print {
    .cpeg-affiliate-banner,
    .cpeg-no-pdf,
    .no-print {
        display: none !important;
        visibility: hidden !important;
    }
}
