:root{
    --cm-blue:#2563eb;
    --cm-violet:#7c3aed;
    --cm-sky:#0ea5e9;
    --cm-ink:#0f172a;
    --cm-muted:#64748b;
    --cm-soft:#f8fafc;
    --cm-border:#e5e7eb;
    --cm-good:#16a34a;
    --cm-warn:#f59e0b;
    --cm-bad:#ef4444;
    --cm-card:#ffffff;
    --cm-shadow:0 22px 70px rgba(15,23,42,.18);
}

*{box-sizing:border-box}

body{
    margin:0;
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    color:var(--cm-ink);
    background:
        radial-gradient(circle at top left,rgba(37,99,235,.14),transparent 34%),
        radial-gradient(circle at 80% 12%,rgba(124,58,237,.14),transparent 32%),
        linear-gradient(180deg,#f8fafc,#eef2ff);
    min-height:100vh;
}

.cm-demo-shell{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:34px;
}

.cm-demo-launch-card{
    width:min(980px,100%);
    background:rgba(255,255,255,.88);
    border:1px solid rgba(226,232,240,.9);
    border-radius:30px;
    padding:38px;
    box-shadow:var(--cm-shadow);
    position:relative;
    overflow:hidden;
}

.cm-demo-launch-card:before{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:6px;
    background:linear-gradient(90deg,var(--cm-blue),var(--cm-violet),var(--cm-sky));
}

.cm-demo-kicker{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 12px;
    border-radius:999px;
    background:#eff6ff;
    color:#1d4ed8;
    font-size:13px;
    font-weight:900;
    letter-spacing:.04em;
    text-transform:uppercase;
    margin-bottom:18px;
}

.cm-demo-launch-card h1{
    font-size:clamp(34px,5vw,58px);
    line-height:1;
    letter-spacing:-.055em;
    margin:0 0 14px;
}

.cm-demo-launch-card p{
    max-width:710px;
    color:#475569;
    font-size:18px;
    line-height:1.65;
    margin:0 0 26px;
}

.cm-demo-button{
    appearance:none;
    border:0;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-height:48px;
    padding:13px 19px;
    border-radius:999px;
    color:#fff;
    font-weight:900;
    font-size:15px;
    background:linear-gradient(135deg,var(--cm-blue),var(--cm-violet));
    box-shadow:0 16px 32px rgba(37,99,235,.26);
    text-decoration:none;
}

.cm-demo-button.secondary{
    background:#fff;
    color:#1e293b;
    border:1px solid var(--cm-border);
    box-shadow:0 10px 24px rgba(15,23,42,.08);
}

.cm-demo-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:24px;
}

.cm-demo-modal{
    position:fixed;
    inset:0;
    z-index:99999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.cm-demo-modal.is-open{
    display:flex;
}

.cm-demo-backdrop{
    position:absolute;
    inset:0;
    background:rgba(15,23,42,.72);
    backdrop-filter:blur(10px);
}

.cm-demo-window{
    position:relative;
    width:min(1240px,100%);
    height:min(760px,calc(100vh - 36px));
    background:#fff;
    border-radius:28px;
    box-shadow:0 36px 110px rgba(0,0,0,.38);
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

.cm-demo-topbar{
    min-height:70px;
    display:flex;
    align-items:center;
    gap:16px;
    padding:14px 18px 12px 22px;
    border-bottom:1px solid #e5e7eb;
    background:linear-gradient(180deg,#fff,#fbfdff);
    flex-shrink:0;
}

.cm-demo-brand{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:950;
    letter-spacing:-.02em;
    white-space:nowrap;
}

.cm-demo-logo{
    width:36px;
    height:36px;
    border-radius:12px;
    background:linear-gradient(135deg,var(--cm-blue),var(--cm-sky));
    display:grid;
    place-items:center;
    color:#fff;
    font-weight:950;
    box-shadow:0 12px 22px rgba(37,99,235,.22);
}

.cm-demo-progress-wrap{
    flex:1;
    min-width:120px;
}

.cm-demo-progress-label{
    font-size:12px;
    color:#64748b;
    font-weight:800;
    margin-bottom:6px;
}

.cm-demo-progress{
    height:8px;
    border-radius:999px;
    background:#e2e8f0;
    overflow:hidden;
}

.cm-demo-progress span{
    display:block;
    height:100%;
    width:0;
    background:linear-gradient(90deg,var(--cm-blue),var(--cm-violet));
    border-radius:999px;
    transition:width .25s ease;
}

.cm-demo-close{
    border:0;
    background:#f1f5f9;
    color:#0f172a;
    border-radius:999px;
    width:40px;
    height:40px;
    cursor:pointer;
    font-size:22px;
    font-weight:900;
    flex-shrink:0;
}

.cm-demo-stage{
    flex:1;
    min-height:0;
    position:relative;
    overflow:hidden;
    background:linear-gradient(135deg,#f8fafc,#eef2ff);
}

.cm-demo-slide{
    position:absolute;
    inset:0;
    display:none;
    padding:24px;
}

.cm-demo-slide.is-active{
    display:block;
    animation:cmFade .25s ease;
}

@keyframes cmFade{
    from{opacity:.25;transform:translateY(8px)}
    to{opacity:1;transform:none}
}

.cm-demo-slide-grid{
    height:100%;
    display:grid;
    grid-template-columns:minmax(310px,.48fr) minmax(0,1fr);
    gap:22px;
}

.cm-demo-caption{
    background:#fff;
    border:1px solid rgba(226,232,240,.9);
    border-radius:26px;
    padding:26px;
    box-shadow:0 14px 42px rgba(15,23,42,.09);
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    position:relative;
    overflow:hidden;
}

.cm-demo-caption:before{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:5px;
    background:linear-gradient(90deg,var(--cm-blue),var(--cm-violet));
}

.cm-demo-step{
    display:inline-flex;
    align-items:center;
    gap:8px;
    width:max-content;
    max-width:100%;
    color:#1d4ed8;
    background:#eff6ff;
    border:1px solid #bfdbfe;
    padding:8px 12px;
    border-radius:999px;
    font-weight:950;
    font-size:13px;
    margin-bottom:16px;
}

.cm-demo-caption h2{
    font-size:clamp(30px,3.2vw,46px);
    line-height:1;
    letter-spacing:-.05em;
    margin:0 0 16px;
}

.cm-demo-caption p{
    font-size:18px;
    line-height:1.55;
    color:#475569;
    margin:0 0 18px;
}

.cm-demo-caption ul{
    padding-left:20px;
    margin:16px 0 0;
    color:#475569;
    font-size:16px;
    line-height:1.65;
}

.cm-demo-caption li{
    margin:5px 0;
}

.cm-demo-mini-note{
    margin-top:20px;
    padding:14px 15px;
    border-radius:18px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    color:#334155;
    font-size:14px;
    line-height:1.45;
}

.cm-demo-visual{
    position:relative;
    min-height:0;
    border-radius:28px;
    background:rgba(255,255,255,.65);
    border:1px solid rgba(226,232,240,.85);
    box-shadow:0 18px 55px rgba(15,23,42,.12);
    overflow:hidden;
    padding:16px;
}

.mock-browser{
    height:100%;
    background:#fff;
    border-radius:22px;
    overflow:hidden;
    border:1px solid #e2e8f0;
    box-shadow:0 12px 34px rgba(15,23,42,.08);
    position:relative;
}

.mock-bar{
    height:42px;
    background:#f8fafc;
    border-bottom:1px solid #e2e8f0;
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 14px;
}

.mock-dot{
    width:10px;
    height:10px;
    border-radius:999px;
    background:#cbd5e1;
    flex-shrink:0;
}

.mock-url{
    margin-left:8px;
    flex:1;
    height:22px;
    border-radius:999px;
    background:#e2e8f0;
    color:#64748b;
    font-size:11px;
    display:flex;
    align-items:center;
    padding:0 12px;
    font-weight:800;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.mock-app{
    height:calc(100% - 42px);
    display:grid;
    grid-template-columns:190px 1fr;
    background:#f8fafc;
}

.mock-sidebar{
    background:#0f172a;
    color:#cbd5e1;
    padding:18px 12px;
    display:flex;
    flex-direction:column;
    gap:8px;
}

.mock-side-brand{
    color:#fff;
    font-size:16px;
    font-weight:950;
    margin:0 0 14px;
    display:flex;
    align-items:center;
    gap:8px;
}

.mock-nav{
    padding:10px 12px;
    border-radius:12px;
    font-size:13px;
    font-weight:800;
    color:#cbd5e1;
}

.mock-nav.active{
    background:linear-gradient(135deg,#2563eb,#7c3aed);
    color:#fff;
    box-shadow:0 10px 18px rgba(37,99,235,.22);
}

.mock-main{
    padding:18px;
    overflow:hidden;
    position:relative;
}

.mock-main h3{
    font-size:26px;
    letter-spacing:-.04em;
    margin:0 0 7px;
}

.mock-sub{
    font-size:13px;
    color:#64748b;
    margin-bottom:16px;
}

.mock-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    margin-bottom:14px;
}

.mock-card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:14px;
    box-shadow:0 8px 20px rgba(15,23,42,.05);
}

.mock-card-label{
    font-size:11px;
    color:#64748b;
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:900;
    margin-bottom:8px;
}

.mock-card-value{
    font-size:28px;
    font-weight:950;
    letter-spacing:-.04em;
}

.mock-card small{
    display:block;
    color:#64748b;
    margin-top:6px;
    font-weight:700;
}

.mock-panel{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:20px;
    padding:16px;
    box-shadow:0 8px 20px rgba(15,23,42,.05);
    margin-bottom:12px;
}

.mock-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:11px 0;
    border-bottom:1px solid #eef2f7;
}

.mock-row:last-child{
    border-bottom:0;
}

.mock-avatar{
    width:38px;
    height:38px;
    border-radius:50%;
    background:linear-gradient(135deg,#dbeafe,#ede9fe);
    display:grid;
    place-items:center;
    font-weight:950;
    color:#1d4ed8;
    flex:0 0 auto;
}

.mock-person{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}

.mock-person strong{
    display:block;
    font-size:14px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.mock-person span{
    display:block;
    color:#64748b;
    font-size:12px;
    margin-top:2px;
}

.pill{
    display:inline-flex;
    align-items:center;
    gap:5px;
    border-radius:999px;
    padding:6px 9px;
    font-size:11px;
    font-weight:900;
    white-space:nowrap;
}

.pill.blue{background:#dbeafe;color:#1d4ed8}
.pill.green{background:#dcfce7;color:#166534}
.pill.amber{background:#fef3c7;color:#92400e}
.pill.red{background:#fee2e2;color:#991b1b}
.pill.gray{background:#f1f5f9;color:#475569}
.pill.purple{background:#ede9fe;color:#5b21b6}

.mock-login-wrap{
    height:100%;
    display:grid;
    place-items:center;
    background:radial-gradient(circle at top left,rgba(37,99,235,.16),transparent 35%),linear-gradient(135deg,#f8fafc,#eff6ff);
}

.mock-login{
    width:min(390px,90%);
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:24px;
    padding:24px;
    box-shadow:0 20px 60px rgba(15,23,42,.18);
    position:relative;
}

.mock-login h3{
    font-size:30px;
    margin:4px 0 6px;
    letter-spacing:-.05em;
}

.mock-field{
    height:48px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    margin:12px 0;
    background:#f8fafc;
    padding:0 14px;
    display:flex;
    align-items:center;
    color:#64748b;
    font-weight:800;
    font-size:13px;
}

.mock-submit{
    height:48px;
    border-radius:999px;
    background:linear-gradient(135deg,#2563eb,#7c3aed);
    color:#fff;
    font-weight:950;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-top:14px;
    box-shadow:0 12px 24px rgba(37,99,235,.22);
}

.profile-head{
    display:grid;
    grid-template-columns:auto 1fr auto;
    gap:14px;
    align-items:center;
    margin-bottom:12px;
}

.big-avatar{
    width:66px;
    height:66px;
    border-radius:20px;
    background:linear-gradient(135deg,#dbeafe,#ede9fe);
    display:grid;
    place-items:center;
    font-size:24px;
    font-weight:950;
    color:#1d4ed8;
}

.score-ring{
    width:72px;
    height:72px;
    border-radius:999px;
    background:conic-gradient(#16a34a 0 88%,#e2e8f0 88%);
    display:grid;
    place-items:center;
}

.score-ring span{
    width:52px;
    height:52px;
    background:#fff;
    border-radius:999px;
    display:grid;
    place-items:center;
    font-weight:950;
    color:#166534;
}

.job-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:12px;
    background:#fff;
    margin-top:8px;
}

.job-card strong{
    font-size:13px;
}

.job-actions{
    display:flex;
    gap:6px;
}

.mini-btn{
    height:28px;
    border-radius:999px;
    padding:0 10px;
    display:flex;
    align-items:center;
    font-size:11px;
    font-weight:950;
    background:#eff6ff;
    color:#1d4ed8;
    border:1px solid #bfdbfe;
}

.mini-btn.red{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.mini-btn.green{background:#dcfce7;color:#166534;border-color:#bbf7d0}

.workflow{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

.workflow-step{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:13px;
}

.workflow-step b{
    display:block;
    font-size:13px;
    margin-bottom:6px;
}

.workflow-step span{
    font-size:12px;
    color:#64748b;
    line-height:1.35;
}

.hotspot{
    position:absolute;
    z-index:8;
    pointer-events:none;
}

.callout{
    max-width:300px;
    background:linear-gradient(135deg,#0f172a,#1e293b);
    color:#fff;
    border-radius:18px;
    padding:15px 16px;
    font-weight:900;
    font-size:18px;
    line-height:1.18;
    box-shadow:0 18px 42px rgba(15,23,42,.36);
    position:relative;
}

.callout small{
    display:block;
    margin-top:6px;
    font-size:12px;
    line-height:1.35;
    color:#cbd5e1;
    font-weight:750;
}

.callout.light{
    background:#fff;
    color:#0f172a;
    border:2px solid #2563eb;
}

.callout.light small{
    color:#475569;
}

.arrow{
    position:absolute;
    display:block;
    width:110px;
    height:4px;
    background:#ef4444;
    border-radius:999px;
    transform-origin:left center;
    box-shadow:0 4px 10px rgba(239,68,68,.25);
}

.arrow:after{
    content:"";
    position:absolute;
    right:-2px;
    top:50%;
    transform:translateY(-50%);
    border-left:14px solid #ef4444;
    border-top:9px solid transparent;
    border-bottom:9px solid transparent;
}

.arrow.blue{background:#2563eb}
.arrow.blue:after{border-left-color:#2563eb}
.arrow.green{background:#16a34a}
.arrow.green:after{border-left-color:#16a34a}
.arrow.purple{background:#7c3aed}
.arrow.purple:after{border-left-color:#7c3aed}

.cm-demo-footer{
    min-height:72px;
    border-top:1px solid #e5e7eb;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:14px 18px;
    flex-shrink:0;
}

.cm-demo-nav-actions{
    display:flex;
    gap:10px;
}

.cm-demo-dots{
    display:flex;
    gap:7px;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
}

.cm-demo-dot{
    width:9px;
    height:9px;
    border-radius:999px;
    border:0;
    background:#cbd5e1;
    cursor:pointer;
    padding:0;
}

.cm-demo-dot.is-active{
    width:28px;
    background:linear-gradient(90deg,#2563eb,#7c3aed);
}

.cm-demo-hint{
    font-size:13px;
    color:#64748b;
    font-weight:800;
}

.cm-hidden{
    display:none!important;
}

/* Tablet */
@media(max-width:940px){
    .cm-demo-window{
        width:96vw;
        height:88vh;
        border-radius:22px;
    }

    .cm-demo-slide{
        padding:16px;
    }

    .cm-demo-slide-grid{
        grid-template-columns:1fr;
        grid-template-rows:auto 1fr;
    }

    .cm-demo-caption{
        padding:20px;
    }

    .cm-demo-caption h2{
        font-size:30px;
    }

    .cm-demo-caption p{
        font-size:15px;
    }

    .cm-demo-caption ul,
    .cm-demo-mini-note{
        display:none;
    }

    .mock-app{
        grid-template-columns:1fr;
    }

    .mock-sidebar{
        display:none;
    }

    .mock-grid{
        grid-template-columns:1fr 1fr;
    }

    .hotspot{
        transform:scale(.78);
        transform-origin:top left;
    }

    .cm-demo-hint{
        display:none;
    }
}

/* Mobile */
@media(max-width:760px){

    body{
        overflow:auto;
    }

    .cm-demo-shell{
        padding:16px;
    }

    .cm-demo-launch-card{
        padding:26px;
        border-radius:22px;
    }

    .cm-demo-modal{
        align-items:center;
        justify-content:center;
        padding:10px;
    }

    .cm-demo-window{
        width:96vw;
        height:82dvh;
        max-height:82dvh;
        border-radius:22px;
        display:flex;
        flex-direction:column;
        overflow:hidden;
        background:#fff;
        position:relative;
    }

    .cm-demo-topbar{
        min-height:56px;
        display:flex;
        padding:9px 10px;
        flex-shrink:0;
    }

    .cm-demo-brand{
        font-size:13px;
    }

    .cm-demo-brand span:last-child{
        display:none;
    }

    .cm-demo-logo{
        width:34px;
        height:34px;
        border-radius:11px;
    }

    .cm-demo-progress-wrap{
        display:none;
    }

    .cm-demo-close{
        margin-left:auto;
        width:40px;
        height:40px;
        min-width:40px;
        border-radius:999px;
        background:#111827;
        color:#fff;
        font-size:26px;
        line-height:1;
        display:flex;
        align-items:center;
        justify-content:center;
        z-index:20;
    }

    .cm-demo-stage{
        flex:1 1 auto;
        min-height:0;
        overflow-y:auto;
        overflow-x:hidden;
        padding:10px;
        -webkit-overflow-scrolling:touch;
        position:relative;
    }

    .cm-demo-slide{
        position:relative;
        inset:auto;
        display:none;
        padding:0;
        min-height:0;
    }

    .cm-demo-slide.is-active{
        display:block;
        animation:cmFade .2s ease;
    }

    .cm-demo-slide-grid{
        height:auto;
        min-height:0;
        display:flex;
        flex-direction:column;
        gap:12px;
    }

    .cm-demo-caption{
        padding:18px;
        border-radius:20px;
        display:block;
        overflow:visible;
    }

    .cm-demo-step{
        font-size:12px;
        padding:8px 11px;
        margin-bottom:12px;
        white-space:normal;
    }

    .cm-demo-caption h2{
        font-size:25px;
        line-height:1.08;
        margin:10px 0 12px;
        letter-spacing:-.04em;
    }

    .cm-demo-caption p{
        font-size:15px;
        line-height:1.45;
        margin:0;
    }

    .cm-demo-caption ul,
    .cm-demo-mini-note,
    .hotspot{
        display:none;
    }

    .cm-demo-visual{
        min-height:280px;
        padding:8px;
        border-radius:20px;
        overflow:visible;
    }

    .mock-browser{
        height:auto;
        min-height:270px;
        border-radius:18px;
        overflow:hidden;
    }

    .mock-bar{
        height:38px;
        padding:0 10px;
    }

    .mock-url{
        font-size:10px;
    }

    .mock-main{
        padding:14px;
        overflow:visible;
    }

    .mock-main h3{
        font-size:24px !important;
        line-height:1.08;
        letter-spacing:-.04em;
    }

    .mock-sub{
        font-size:13px;
        line-height:1.4;
    }

    .mock-panel{
        padding:13px;
        border-radius:16px;
    }

    .mock-row{
        gap:8px;
        font-size:13px;
        align-items:flex-start;
    }

    .mock-grid{
        grid-template-columns:1fr;
        gap:10px;
    }

    .mock-card{
        padding:13px;
    }

    .mock-card-value{
        font-size:24px;
    }

    .workflow,
    .billing-grid{
        grid-template-columns:1fr !important;
    }

    .workflow-step{
        padding:12px;
    }

    .job-card{
        flex-direction:column;
        align-items:flex-start;
        gap:10px;
    }

    .job-actions{
        width:100%;
    }

    .job-actions .mini-btn{
        flex:1;
        justify-content:center;
    }

    .mock-login{
        width:100%;
        padding:18px;
    }

    .mock-login h3{
        font-size:24px;
    }

    .mock-field{
        height:44px;
    }

    .mock-submit{
        height:46px;
    }

    .pill{
        font-size:10px;
        padding:5px 8px;
    }

    .mini-btn{
        min-height:34px;
        height:auto;
        padding:8px 10px;
    }

    .cm-demo-footer{
        position:relative;
        flex-shrink:0;
        min-height:auto;
        background:#fff;
        border-top:1px solid #e5e7eb;
        padding:10px 12px calc(10px + env(safe-area-inset-bottom));
        z-index:10;
        display:block;
    }

    .cm-demo-hint{
        display:none;
    }

    .cm-demo-dots{
        display:flex;
        justify-content:center;
        gap:6px;
        margin-bottom:9px;
        flex-wrap:wrap;
    }

    .cm-demo-dot{
        width:8px;
        height:8px;
    }

    .cm-demo-dot.is-active{
        width:22px;
    }

    .cm-demo-nav-actions{
        width:100%;
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .cm-demo-button,
    .cm-demo-button.secondary{
        width:100%;
        min-height:48px;
        border-radius:14px;
        font-size:15px;
        font-weight:900;
    }

    .cm-demo-button.secondary{
        background:#111827;
        color:#fff;
        border-color:#111827;
    }
}