/* =====================================================================
   Clip PDF — /tool/<id> page stylesheet
   ---------------------------------------------------------------------
   Visual system:
     - Hero with gradient-mesh background + animated glow
     - Glassmorphism tool card with conic-gradient border
     - Soft-shadow neumorphism on lists
     - Refined type scale + tighter tracking
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: #0F172A;
    background: #FCFCFD;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: rgba(37,99,235,.18); color: #0B1733; }

:root {
    --primary:        #2563EB;
    --primary-dark:   #1D4ED8;
    --primary-light:  #3B82F6;
    --accent:         #06B6D4;
    --accent-2:       #8B5CF6;
    --pink:           #EC4899;
    --success:        #22C55E;
    --warning:        #F59E0B;
    --bg:             #FCFCFD;
    --bg-soft:        #F4F6FB;
    --bg-cool:        #EEF3FF;
    --bg-dark:        #0B0D14;
    --border:         #E5E9F2;
    --border-strong:  #CFD6E4;
    --text:           #0B1733;
    --text-soft:      #475569;
    --text-muted:     #6B7488;
    --radius:         16px;
    --radius-lg:      24px;
    --radius-xl:      32px;
    --radius-pill:    9999px;
    --shadow-sm:      0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow:         0 10px 30px -10px rgba(15,23,42,.15), 0 4px 12px -4px rgba(15,23,42,.06);
    --shadow-lg:      0 30px 80px -20px rgba(15,23,42,.25), 0 12px 30px -8px rgba(15,23,42,.1);
    --shadow-glow:    0 20px 60px -15px rgba(37,99,235,.45);
    --grad-primary:   linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
    --grad-vivid:     linear-gradient(135deg, #8B5CF6 0%, #2563EB 50%, #06B6D4 100%);
    --grad-soft:      linear-gradient(160deg, #EEF3FF 0%, #FBF7FF 50%, #EFFBFF 100%);
}

/* =====================================================================
   NAV
   ===================================================================== */
.cp-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(252,252,253,.78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(229,233,242,.7);
}
.cp-nav { width: 100%; }
.cp-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.cp-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--text);
}
.cp-nav-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(37,99,235,.25);
}
.cp-nav-brand-icon img { width: 100%; height: 100%; object-fit: cover; }
.cp-nav-brand-mark {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.cp-nav-right { display: flex; align-items: center; gap: 28px; }
.cp-nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-soft);
    transition: color .2s;
    position: relative;
}
.cp-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--grad-primary);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform .25s ease;
}
.cp-nav-link:hover { color: var(--text); }
.cp-nav-link:hover::after { transform: scaleX(1); }
.cp-nav-cta {
    background: var(--grad-primary);
    color: #fff !important;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 20px -6px rgba(37,99,235,.55);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.cp-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -6px rgba(37,99,235,.65); filter: brightness(1.04); }
@media (max-width: 640px) {
    .cp-nav-link:not(.cp-nav-cta) { display: none; }
}

/* =====================================================================
   SMART BANNER
   ===================================================================== */
.cp-smart-banner {
    position: sticky;
    top: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px -8px rgba(15,23,42,.15);
}
.cp-smart-banner[hidden] { display: none; }
.cp-smart-banner-close {
    width: 28px; height: 28px; flex-shrink: 0;
    border: none; background: transparent;
    font-size: 20px; color: var(--text-muted);
    border-radius: 50%; transition: background .2s;
}
.cp-smart-banner-close:hover { background: var(--bg-soft); }
.cp-smart-banner-icon { flex-shrink: 0; border-radius: 10px; box-shadow: 0 2px 8px rgba(37,99,235,.2); }
.cp-smart-banner-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cp-smart-banner-text strong { font-size: 14px; font-weight: 700; color: var(--text); }
.cp-smart-banner-text small { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-smart-banner-cta {
    background: var(--grad-primary);
    color: #fff;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px -4px rgba(37,99,235,.5);
}
@media (min-width: 769px) { .cp-smart-banner { display: none !important; } }

/* =====================================================================
   MAIN LAYOUT + AMBIENT BACKGROUND
   ===================================================================== */
.cp-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 40px;
    position: relative;
}
.cp-main::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 720px;
    background:
        radial-gradient(circle at 18% 12%, rgba(37,99,235,.16), transparent 45%),
        radial-gradient(circle at 82% 8%, rgba(139,92,246,.14), transparent 45%),
        radial-gradient(circle at 50% 38%, rgba(6,182,212,.10), transparent 55%);
    pointer-events: none;
    z-index: -1;
    filter: blur(6px);
}
.cp-article { position: relative; }

/* breadcrumbs */
.cp-breadcrumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.cp-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-breadcrumbs li + li::before { content: '›'; margin-right: 6px; color: var(--border-strong); }
.cp-breadcrumbs a { color: var(--text-soft); transition: color .2s; }
.cp-breadcrumbs a:hover { color: var(--primary); }
.cp-breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 600; }

/* =====================================================================
   HERO
   ===================================================================== */
.cp-tool-head {
    text-align: center;
    padding: 36px 0 48px;
    position: relative;
}
.cp-tool-icon {
    position: relative;
    width: 84px;
    height: 84px;
    margin: 0 auto 24px;
    background: var(--grad-vivid);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255,255,255,.35);
    animation: cp-float 6s ease-in-out infinite;
}
.cp-tool-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: var(--grad-vivid);
    filter: blur(20px);
    opacity: .55;
    z-index: -1;
}
.cp-tool-icon::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.22), transparent 50%);
    pointer-events: none;
}
.cp-tool-icon svg { width: 40px; height: 40px; fill: #fff; position: relative; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }

@keyframes cp-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.cp-tool-head h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.05;
    margin-bottom: 16px;
    background: linear-gradient(180deg, #0B1733 0%, #1E2A48 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.cp-tool-lead {
    font-size: clamp(17px, 1.6vw, 20px);
    color: var(--text-soft);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.55;
}
.cp-tool-privacy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 9px 18px;
    background: rgba(34,197,94,.1);
    color: #15803D;
    border: 1px solid rgba(34,197,94,.25);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(6px);
}
.cp-tool-privacy svg { width: 16px; height: 16px; fill: #22C55E; }

/* =====================================================================
   GRID: MAIN + STICKY SIDEBAR
   ===================================================================== */
.cp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px;
    align-items: start;
}
.cp-layout-main { min-width: 0; }
.cp-layout-side { position: sticky; top: 96px; }

@media (max-width: 1024px) {
    .cp-layout { grid-template-columns: 1fr; gap: 0; }
    .cp-layout-side { display: none; }
}

/* =====================================================================
   TOOL WIDGET CARD — glass + animated border
   ===================================================================== */
.cp-widget {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFE 100%);
    border-radius: var(--radius-xl);
    min-height: 420px;
    padding: 56px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 48px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    isolation: isolate;
    transition: transform .25s ease, box-shadow .25s ease;
}
.cp-widget::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from 0deg, #2563EB, #06B6D4, #8B5CF6, #EC4899, #2563EB);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: .35;
    pointer-events: none;
    animation: cp-rotate 12s linear infinite;
}
.cp-widget::after {
    content: '';
    position: absolute;
    width: 480px; height: 480px;
    top: -160px; right: -120px;
    background: radial-gradient(circle, rgba(37,99,235,.12), transparent 70%);
    z-index: -1;
    pointer-events: none;
}
.cp-widget[data-cp-dragover="1"] {
    transform: scale(1.005);
    box-shadow: 0 30px 80px -10px rgba(37,99,235,.4);
}
.cp-widget[data-cp-dragover="1"]::before { opacity: 1; }
@keyframes cp-rotate { to { transform: rotate(360deg); } }

.cp-widget-loading { text-align: center; color: var(--text-muted); }
.cp-spinner {
    width: 44px; height: 44px;
    margin: 0 auto 14px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-right-color: var(--accent);
    border-radius: 50%;
    animation: cp-spin .9s cubic-bezier(.5,.1,.5,.9) infinite;
}
@keyframes cp-spin { to { transform: rotate(360deg); } }

/* Dropzone */
.cp-dropzone { width: 100%; text-align: center; padding: 16px; }
.cp-dropzone-icon {
    width: 88px; height: 88px;
    margin: 0 auto 24px;
    color: #fff;
    background: var(--grad-primary);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    position: relative;
}
.cp-dropzone-icon::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,.2), transparent 50%);
}
.cp-dropzone-icon svg { width: 44px; height: 44px; fill: currentColor; position: relative; z-index: 1; }
.cp-dropzone-text {
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -.01em;
}
.cp-dropzone-or {
    color: var(--text-muted);
    font-size: 12px;
    margin: 18px 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}
.cp-dropzone-or::before, .cp-dropzone-or::after {
    content: '';
    height: 1px;
    flex: 0 1 80px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.cp-dropzone-button {
    background: var(--grad-primary);
    color: #fff;
    padding: 16px 40px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 16px;
    border: none;
    letter-spacing: -.005em;
    box-shadow: 0 14px 28px -10px rgba(37,99,235,.55);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.cp-dropzone-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px -10px rgba(37,99,235,.65);
    filter: brightness(1.05);
}
.cp-dropzone-button:active { transform: translateY(0); }
.cp-dropzone-hint {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 18px;
}

/* Recents */
.cp-recents { margin-top: 36px; text-align: left; max-width: 520px; margin-left: auto; margin-right: auto; }
.cp-recents h3 {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-align: center;
}
.cp-recents ul { display: flex; flex-direction: column; gap: 8px; }
.cp-recents li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.cp-recents li:hover {
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}
.cp-recents-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-weight: 600; }
.cp-recents-meta { font-size: 12px; color: var(--text-muted); }
.cp-recents-remove {
    background: none; border: none;
    color: var(--text-muted);
    font-size: 18px; padding: 4px 8px;
    border-radius: 8px;
    transition: background .2s, color .2s;
}
.cp-recents-remove:hover { background: #FEF2F2; color: #DC2626; }

/* =====================================================================
   APP-ONLY NOTE
   ===================================================================== */
.cp-app-only-note {
    padding: 18px 22px;
    background: linear-gradient(135deg, var(--bg-cool) 0%, #FAF5FF 100%);
    border-left: 4px solid var(--primary);
    border-radius: 14px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

/* =====================================================================
   APP PROMO
   ===================================================================== */
.cp-app-promo {
    position: relative;
    background: var(--grad-soft);
    border-radius: var(--radius-xl);
    padding: 56px 32px;
    margin-bottom: 56px;
    text-align: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.cp-app-promo::before {
    content: '';
    position: absolute;
    width: 360px; height: 360px;
    top: -120px; left: 50%; transform: translateX(-50%);
    background: radial-gradient(circle, rgba(37,99,235,.18), transparent 65%);
    pointer-events: none;
}
.cp-app-promo-inner { max-width: 620px; margin: 0 auto; position: relative; }
.cp-app-promo h2 {
    font-size: clamp(24px, 2.8vw, 32px);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 12px;
}
.cp-app-promo-lead { font-size: 16px; color: var(--text-soft); margin-bottom: 28px; line-height: 1.55; }
.cp-app-promo-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cp-store-badge { height: 54px; width: auto; transition: transform .25s ease, filter .25s ease; }
.cp-store-badge:hover { transform: translateY(-2px) scale(1.03); filter: drop-shadow(0 8px 16px rgba(0,0,0,.2)); }
.cp-app-promo-note { margin-top: 20px; font-size: 13px; color: var(--text-muted); }

/* =====================================================================
   SECTIONS (features / long / howto / faq / related)
   ===================================================================== */
.cp-features, .cp-long, .cp-howto, .cp-faq, .cp-related { margin-bottom: 56px; }
.cp-features h2, .cp-long h2, .cp-howto h2, .cp-faq h2, .cp-related h2 {
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 14px;
}
.cp-features h2::after, .cp-long h2::after, .cp-howto h2::after, .cp-faq h2::after, .cp-related h2::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 44px; height: 4px;
    background: var(--grad-primary);
    border-radius: 4px;
}

/* FEATURES — card grid */
.cp-features ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.cp-features li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cp-features li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--border-strong);
}
.cp-features svg {
    width: 22px; height: 22px;
    fill: #fff;
    flex-shrink: 0;
    background: var(--grad-primary);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 10px -4px rgba(37,99,235,.5);
}

/* LONG */
.cp-long p { font-size: 16px; color: var(--text-soft); line-height: 1.8; }

/* HOWTO */
.cp-howto ol { display: flex; flex-direction: column; gap: 14px; counter-reset: cp-step; }
.cp-howto li {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cp-howto li:hover { transform: translateX(4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.cp-howto-step {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 14px;
    background: var(--grad-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 17px;
    box-shadow: 0 8px 18px -6px rgba(37,99,235,.55);
    position: relative;
}
.cp-howto-step::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(255,255,255,.25), transparent 60%);
}
.cp-howto h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.cp-howto p { font-size: 15px; color: var(--text-soft); line-height: 1.65; }

/* FAQ */
.cp-faq details {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.cp-faq details:hover { border-color: var(--border-strong); }
.cp-faq details[open] {
    border-color: rgba(37,99,235,.4);
    box-shadow: var(--shadow);
}
.cp-faq summary {
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--text);
    letter-spacing: -.005em;
}
.cp-faq summary::-webkit-details-marker { display: none; }
.cp-faq summary::after {
    content: '+';
    font-size: 22px;
    font-weight: 300;
    color: var(--primary);
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bg-cool);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s ease, background .2s;
    flex-shrink: 0;
}
.cp-faq details[open] summary::after {
    content: '−';
    background: var(--primary);
    color: #fff;
    transform: rotate(180deg);
}
.cp-faq p {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.7;
}

/* RELATED */
.cp-related ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.cp-related a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cp-related a:hover {
    transform: translateY(-3px);
    border-color: rgba(37,99,235,.5);
    box-shadow: var(--shadow);
}
.cp-related svg {
    width: 36px; height: 36px;
    fill: #fff;
    flex-shrink: 0;
    background: var(--grad-primary);
    border-radius: 10px;
    padding: 7px;
    box-shadow: 0 4px 12px -4px rgba(37,99,235,.45);
}

/* =====================================================================
   ADS
   ===================================================================== */
.cp-ad-slot { margin: 16px 0; text-align: center; min-height: 50px; }
.cp-ad-label { display: block; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 8px; font-weight: 700; }
.cp-ad-slot--sidebar { width: 300px; }
.cp-ad-slot--in-content ins { max-width: 100%; }
.cp-ad-slot--test .cp-ad-label { color: #F59E0B; }
.cp-ad-mobile { margin: 32px 0; }
.cp-ad-mobile--top { margin: 0 0 24px; }
.cp-ad-after-tool { margin: 24px 0 32px; }
@media (min-width: 1025px) { .cp-ad-mobile { display: none; } }

/* =====================================================================
   FOOTER
   ===================================================================== */
.cp-footer {
    background: linear-gradient(180deg, #0B0D14 0%, #060812 100%);
    color: rgba(255,255,255,.7);
    padding: 40px 24px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}
.cp-footer::before {
    content: '';
    position: absolute;
    inset: -1px 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37,99,235,.5), transparent);
}
.cp-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.cp-footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.cp-footer-links a { color: rgba(255,255,255,.7); transition: color .2s; }
.cp-footer-links a:hover { color: #fff; }

/* =====================================================================
   TOASTS
   ===================================================================== */
.cp-toast-container {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.cp-toast {
    background: rgba(11,13,20,.92);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 13px 22px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: cp-toast-in .3s cubic-bezier(.2,.7,.2,1);
    border: 1px solid rgba(255,255,255,.08);
}
.cp-toast--error { background: linear-gradient(135deg, #DC2626, #B91C1C); border-color: rgba(255,255,255,.12); }
.cp-toast--success { background: linear-gradient(135deg, #22C55E, #16A34A); border-color: rgba(255,255,255,.12); }
@keyframes cp-toast-in {
    from { transform: translateY(16px) scale(.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* =====================================================================
   ADBLOCK MODAL — body scroll lock only
   ===================================================================== */
html.cp-adblock-active { overflow: hidden; }

/* =====================================================================
   RTL
   ===================================================================== */
[dir="rtl"] .cp-breadcrumbs li + li::before { content: '‹'; }
[dir="rtl"] .cp-howto li { flex-direction: row-reverse; }
[dir="rtl"] .cp-howto li:hover { transform: translateX(-4px); }
[dir="rtl"] .cp-features h2::after,
[dir="rtl"] .cp-long h2::after,
[dir="rtl"] .cp-howto h2::after,
[dir="rtl"] .cp-faq h2::after,
[dir="rtl"] .cp-related h2::after { left: auto; right: 0; }

/* =====================================================================
   MOBILE TWEAKS
   ===================================================================== */
@media (max-width: 640px) {
    .cp-main { padding: 16px 16px 32px; }
    .cp-tool-head { padding: 24px 0 32px; }
    .cp-tool-icon { width: 72px; height: 72px; border-radius: 20px; }
    .cp-tool-icon svg { width: 34px; height: 34px; }
    .cp-widget { padding: 40px 20px; min-height: 360px; border-radius: 24px; }
    .cp-dropzone-icon { width: 72px; height: 72px; border-radius: 20px; }
    .cp-dropzone-icon svg { width: 36px; height: 36px; }
    .cp-app-promo { padding: 40px 22px; }
    .cp-howto li { padding: 18px 18px; gap: 14px; }
    .cp-howto-step { width: 38px; height: 38px; font-size: 15px; }
}

/* =====================================================================
   PRINT
   ===================================================================== */
@media print {
    .cp-header, .cp-smart-banner, .cp-app-promo, .cp-ad-slot, .cp-ad-mobile,
    .cp-layout-side, .cp-footer, [data-cp-adblock-modal] { display: none !important; }
    .cp-layout { grid-template-columns: 1fr; }
    .cp-main::before { display: none; }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .cp-tool-icon { animation: none; }
    .cp-widget::before { animation: none; }
}

/* ────────────────────────────────────────────────────────────────────────
   Rewarded-ad access gate
   ──────────────────────────────────────────────────────────────────────── */

#cp-gate {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-radius: 20px;
}
.cp-widget--gated {
    position: relative;
    min-height: 460px;
    pointer-events: none;
    user-select: none;
}
.cp-widget--gated > :not(#cp-gate):not(#cp-gate-ad) {
    filter: blur(3px);
    opacity: 0.5;
}
.cp-gate-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    padding: 36px 32px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    pointer-events: auto;
    font-family: 'Montserrat', system-ui, sans-serif;
}
.cp-gate-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #EFF6FF;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cp-gate-card h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.cp-gate-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 22px;
}
.cp-gate-cta {
    background: #2563EB;
    color: #fff;
    border: none;
    padding: 16px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, transform 0.15s;
}
.cp-gate-cta:hover:not(:disabled) {
    background: #1D4ED8;
    transform: translateY(-1px);
}
.cp-gate-cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.cp-gate-app {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #E2E8F0;
}
.cp-gate-app p {
    font-size: 13px;
    color: #64748B;
    margin: 0 0 12px;
}
.cp-gate-app-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.cp-gate-app-badges img {
    height: 40px;
    width: auto;
}

#cp-gate-ad {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(11, 13, 20, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.cp-gate-ad-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    font-family: 'Montserrat', system-ui, sans-serif;
}
.cp-gate-ad-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #64748B;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cp-gate-ad-slot {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    overflow: hidden;
}
.cp-gate-ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #fff;
}
.cp-gate-ad-marker {
    background: #FBBF24;
    color: #0F172A;
    font-weight: 800;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.1em;
}
.cp-gate-ad-stub-note {
    font-size: 12px;
    color: #CBD5E1;
    opacity: 0.8;
}
.cp-gate-ad-progress {
    background: #E2E8F0;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}
.cp-gate-ad-progress-bar {
    background: #2563EB;
    height: 100%;
    width: 0;
    transition: width 0.1s linear;
}
.cp-gate-ad-countdown {
    font-size: 14px;
    color: #475569;
    margin: 0 0 16px;
    font-variant-numeric: tabular-nums;
}
.cp-gate-ad-skip {
    background: transparent;
    border: 1px solid #CBD5E1;
    color: #475569;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.cp-gate-ad-skip:not(:disabled):hover { background: #F1F5F9; }
.cp-gate-ad-skip:disabled { opacity: 0.4; cursor: not-allowed; }

#cp-gate-status {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 40;
    background: #fff;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    padding: 10px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: 'Montserrat', system-ui, sans-serif;
}
#cp-gate-status svg { color: #2563EB; }

.cp-gate-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #0F172A;
    color: #fff;
    padding: 12px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 9999;
    font-family: 'Montserrat', system-ui, sans-serif;
    pointer-events: none;
}
.cp-gate-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
    .cp-gate-card { padding: 28px 22px; }
    .cp-gate-card h2 { font-size: 19px; }
    #cp-gate-status { bottom: 16px; right: 16px; left: 16px; justify-content: center; }
}
