/* Magic Soft Recovery: components for program, catalog, help and
   how-it-works pages. Builds on the .ms-* kit in extra.css (hero,
   sections, rule, body text). Every selector here starts with .cp-
   so loading this file cannot change any other page. */

/* ── hero additions ─────────────────────────── */
.cp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

.cp-actions .btn-custom { margin-right: 0; }
.cp-actions--start { justify-content: flex-start; }

/* ── section heading block ──────────────────── */
.cp-head { max-width: 780px; margin-bottom: 34px; }
.cp-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.cp-head--center .ms-rule { margin-left: auto; margin-right: auto; }
.cp-head .ms-rule { margin-bottom: 18px; }

.cp-lead {
    font-size: 16px;
    color: var(--slate, #334155);
    line-height: 1.8;
    margin: 0;
}

.cp-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--blue, #0D5EA6);
    margin-bottom: 8px;
}

/* ── grids and cards ────────────────────────── */
.cp-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
    gap: 20px;
}

.cp-card {
    background: #fff;
    border: 1px solid var(--border, #CBD5E1);
    border-radius: var(--r, 14px);
    padding: 26px 24px;
    position: relative;
    overflow: hidden;
    transition: transform .22s, box-shadow .22s;
}

.ms-section--alt .cp-card { background: var(--bg, #F0F4F8); }

.cp-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--blue, #0D5EA6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s;
}

.cp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow, 0 4px 24px rgba(10, 25, 41, .09)); }
.cp-card:hover::after { transform: scaleX(1); }

.cp-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink, #0F172A);
    line-height: 1.35;
    margin: 0 0 8px;
}

.cp-card p {
    font-size: 15px;
    color: var(--muted, #64748B);
    line-height: 1.7;
    margin: 0 0 10px;
}

.cp-card p:last-child { margin-bottom: 0; }
.cp-card a:not(.btn-custom) { color: var(--blue, #0D5EA6); font-weight: 600; }

.cp-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    background: var(--sky, #EFF6FF);
    color: var(--blue, #0D5EA6);
}

.cp-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--blue, #0D5EA6);
    text-decoration: none;
    margin-top: 6px;
}

.cp-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cp-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px; }

/* ── stat strip ─────────────────────────────── */
.cp-stats {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
    gap: 18px;
}

.cp-stat {
    background: #fff;
    border: 1px solid var(--border, #CBD5E1);
    border-radius: var(--r, 14px);
    padding: 22px 20px;
    text-align: center;
}

.cp-stat strong {
    display: block;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
    color: var(--blue, #0D5EA6);
    margin-bottom: 4px;
}

.cp-stat span { font-size: 14.5px; color: var(--muted, #64748B); line-height: 1.5; }

/* ── text + side panel ──────────────────────── */
.cp-split {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 48px;
    align-items: start;
}

.cp-split > *,
.cp-job-cols > * { min-width: 0; }

.cp-panel {
    background: #fff;
    border: 1px solid var(--border, #CBD5E1);
    border-left: 4px solid var(--blue, #0D5EA6);
    border-radius: var(--r, 14px);
    padding: 24px 26px;
}

.ms-section--alt .cp-panel { background: var(--bg, #F0F4F8); }
.cp-panel h3 { font-size: 17px; font-weight: 700; color: var(--ink, #0F172A); margin: 0 0 12px; }

/* ── check list ─────────────────────────────── */
.cp-check { list-style: none; margin: 0; padding: 0; }

.cp-check li {
    position: relative;
    padding: 7px 0 7px 30px;
    font-size: 15px;
    color: var(--slate, #334155);
    line-height: 1.65;
}

.cp-check li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--greenbg, #E4F4EE);
}

.cp-check li::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 14px;
    width: 7px;
    height: 4px;
    border-left: 2px solid var(--green, #0D7A5F);
    border-bottom: 2px solid var(--green, #0D7A5F);
    transform: rotate(-45deg);
}

.cp-check strong { color: var(--ink, #0F172A); font-weight: 600; }
.cp-check--2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }

/* ── numbered process (vertical) ────────────── */
.cp-process {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: cpstep;
    max-width: 860px;
}

.cp-process > li {
    counter-increment: cpstep;
    position: relative;
    padding: 0 0 28px 64px;
}

.cp-process > li::before {
    content: counter(cpstep, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--blue, #0D5EA6);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-process > li::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 50px;
    bottom: 6px;
    width: 2px;
    background: var(--sky2, #DBEAFE);
}

.cp-process > li:last-child { padding-bottom: 0; }
.cp-process > li:last-child::after { display: none; }
.cp-process h3 { font-size: 18px; font-weight: 700; color: var(--ink, #0F172A); margin: 9px 0 6px; }
.cp-process p { font-size: 15px; color: var(--slate, #334155); line-height: 1.75; margin: 0 0 8px; }
.cp-process p:last-child { margin-bottom: 0; }
.cp-process a { color: var(--blue, #0D5EA6); font-weight: 600; }

/* ── tables ─────────────────────────────────── */
.cp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border, #CBD5E1);
    border-radius: var(--r, 14px);
    background: #fff;
}

.cp-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }

.cp-table th {
    background: #1351d8;
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 14px 18px;
    white-space: nowrap;
}

.cp-table td {
    padding: 14px 18px;
    color: var(--slate, #334155);
    line-height: 1.6;
    vertical-align: top;
    border-top: 1px solid #E5E7EB;
}

.cp-table tbody tr:nth-child(even) { background: #F8FAFF; }
.cp-table td:first-child { font-weight: 600; color: var(--ink, #0F172A); }
.cp-table a { color: var(--blue, #0D5EA6); font-weight: 600; }

/* ── tiers ──────────────────────────────────── */
.cp-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }

.cp-tier {
    background: #fff;
    border: 1px solid var(--border, #CBD5E1);
    border-radius: var(--r, 14px);
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
}

.cp-tier--featured { border: 2px solid var(--blue, #0D5EA6); box-shadow: var(--shadow, 0 4px 24px rgba(10, 25, 41, .09)); }
.cp-tier-name { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue, #0D5EA6); }
.cp-tier h3 { font-size: 20px; font-weight: 700; color: var(--ink, #0F172A); margin: 4px 0 6px; }
.cp-tier > p { font-size: 14.5px; color: var(--muted, #64748B); line-height: 1.6; margin: 0 0 18px; }

.cp-tier-rate {
    font-size: 40px;
    line-height: 1;
    font-weight: 700;
    color: var(--ink, #0F172A);
    padding: 16px 0;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 16px;
}

.cp-tier-rate small { display: block; font-size: 14px; font-weight: 500; color: var(--muted, #64748B); margin-top: 8px; }

.cp-tier dl { margin: 0; display: grid; gap: 12px; }
.cp-tier dt { font-size: 13px; font-weight: 700; color: var(--ink, #0F172A); }
.cp-tier dd { margin: 2px 0 0; font-size: 14.5px; color: var(--slate, #334155); line-height: 1.6; }

/* ── how-it-works walkthrough ───────────────── */
.cp-walk { display: grid; gap: 28px; }

.cp-walk-step {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 36px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border, #CBD5E1);
    border-radius: 18px;
    padding: 30px;
}

.cp-walk-step:nth-child(even) .cp-walk-text { order: 2; }
.cp-walk-step--text { grid-template-columns: minmax(0, 1fr); }

.cp-walk-num {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--blue, #0D5EA6);
    margin-bottom: 10px;
}

.cp-walk-num b {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--blue, #0D5EA6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    letter-spacing: 0;
}

.cp-walk-text h3 { font-size: 22px; font-weight: 700; color: var(--ink, #0F172A); line-height: 1.3; margin: 0 0 10px; }
.cp-walk-text p { font-size: 15.5px; color: var(--slate, #334155); line-height: 1.8; margin: 0 0 10px; }
.cp-walk-text p:last-child { margin-bottom: 0; }

.cp-walk-tip {
    font-size: 14px !important;
    background: var(--sky, #EFF6FF);
    border-left: 3px solid var(--blue, #0D5EA6);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
}

.cp-shot { margin: 0; }

.cp-shot a {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border, #CBD5E1);
    background: var(--bg, #F0F4F8);
    box-shadow: 0 10px 30px rgba(10, 25, 41, .10);
    position: relative;
    cursor: zoom-in;
}

.cp-shot img { display: block; width: 100%; height: auto; }

.cp-shot a::after {
    content: "Click to enlarge";
    position: absolute;
    right: 12px;
    bottom: 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    background: rgba(15, 23, 42, .78);
    padding: 5px 10px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity .2s;
}

.cp-shot a:hover::after,
.cp-shot a:focus-visible::after { opacity: 1; }
.cp-shot figcaption { font-size: 13.5px; color: var(--muted, #64748B); margin-top: 10px; text-align: center; }

/* lightbox */
.cp-lightbox {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: min(1200px, 94vw);
    width: 100%;
    margin: auto;
}

.cp-lightbox::backdrop { background: rgba(10, 25, 41, .82); }
.cp-lightbox img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; }

.cp-lightbox-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: #fff;
    font-size: 14px;
    padding: 0 2px 10px;
}

.cp-lightbox button {
    background: #fff;
    color: var(--ink, #0F172A);
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    cursor: pointer;
}

/* ── faq ────────────────────────────────────── */
.cp-faq { max-width: 900px; border-top: 1px solid var(--border, #CBD5E1); }
.cp-faq--center { margin: 0 auto; }
.cp-faq details { border-bottom: 1px solid var(--border, #CBD5E1); }

.cp-faq summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding: 18px 44px 18px 0;
    font-size: 16.5px;
    font-weight: 600;
    color: var(--ink, #0F172A);
}

.cp-faq summary::-webkit-details-marker { display: none; }

.cp-faq summary::after {
    content: "+";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--sky, #EFF6FF);
    color: var(--blue, #0D5EA6);
    font-size: 20px;
    line-height: 28px;
    text-align: center;
}

.cp-faq details[open] summary::after { content: "\2212"; }
.cp-faq details > div { padding: 0 0 20px; }
.cp-faq details p { font-size: 15px; color: var(--slate, #334155); line-height: 1.8; margin: 0 0 8px; max-width: 75ch; }
.cp-faq details a { color: var(--blue, #0D5EA6); font-weight: 600; }

.cp-faq summary:focus-visible,
.cp-shot a:focus-visible,
.cp-pill:focus-visible {
    outline: 3px solid var(--blue2, #1A73C8);
    outline-offset: 3px;
}

/* ── call to action band ────────────────────── */
.cp-cta {
    background: linear-gradient(90deg, #ffffff, #dff4ff);
    border: 1px solid var(--sky2, #DBEAFE);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cp-cta::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -120px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(13, 94, 166, .14) 0%, transparent 70%);
    pointer-events: none;
}

.cp-cta h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; color: var(--ink, #0F172A); margin: 0 0 12px; position: relative; }
.cp-cta p { font-size: 16px; color: var(--slate, #334155); line-height: 1.75; max-width: 640px; margin: 0 auto; position: relative; }
.cp-cta .cp-actions { position: relative; margin-top: 24px; }
.cp-cta-mail { margin-top: 18px !important; font-size: 15px !important; }
.cp-cta-mail a { color: var(--blue, #0D5EA6); font-weight: 600; }

/* ── pills (format chips, topic links) ──────── */
.cp-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }

.cp-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink, #0F172A);
    background: var(--sky, #EFF6FF);
    border: 1px solid var(--sky2, #DBEAFE);
    border-radius: 8px;
    padding: 5px 12px;
    text-decoration: none;
}

a.cp-pill:hover { background: var(--sky2, #DBEAFE); }
.cp-pill--soon { background: var(--amberbg, #FEF3E2); border-color: rgba(180, 83, 9, .2); color: var(--amber, #B45309); }
.cp-pill--free { background: var(--greenbg, #E4F4EE); border-color: rgba(13, 122, 95, .2); color: var(--green, #0D7A5F); }

/* ── product cards (catalog pages) ──────────── */
.cp-products { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 22px; }

.cp-product {
    background: #fff;
    border: 1px solid var(--border, #CBD5E1);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .22s, box-shadow .22s;
}

.ms-section--alt .cp-product { background: var(--bg, #F0F4F8); }
.cp-product:hover { transform: translateY(-3px); box-shadow: var(--shadow, 0 4px 24px rgba(10, 25, 41, .09)); }

.cp-product-shot {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--bg, #F0F4F8);
    border-bottom: 1px solid var(--border, #CBD5E1);
    overflow: hidden;
}

.cp-product-shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
.cp-product-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.cp-product h3 { font-size: 19px; font-weight: 700; color: var(--ink, #0F172A); margin: 0 0 8px; }
.cp-product h3 a { color: inherit; text-decoration: none; }
.cp-product h3 a:hover { color: var(--blue, #0D5EA6); }
.cp-product p { font-size: 15px; color: var(--muted, #64748B); line-height: 1.7; margin: 0; }
.cp-product .cp-pills { margin-bottom: 18px; }
.cp-product-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.cp-product-foot .btn-custom { margin-right: 0; padding: 11px 18px; font-size: 14px; }

/* ── job cards (careers) ────────────────────── */
.cp-job {
    background: #fff;
    border: 1px solid var(--border, #CBD5E1);
    border-radius: 18px;
    padding: 34px 34px 30px;
    margin-bottom: 26px;
    scroll-margin-top: 110px;
}

.cp-job:last-child { margin-bottom: 0; }
.cp-job-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.cp-job h3 { font-size: 26px; font-weight: 700; color: var(--ink, #0F172A); margin: 4px 0 0; }
.cp-job h4 { font-size: 17px; font-weight: 700; color: var(--ink, #0F172A); margin: 26px 0 8px; }
.cp-job h5 { font-size: 14px; font-weight: 700; color: var(--blue, #0D5EA6); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 4px; }
.cp-job > p,
.cp-job-cols p { font-size: 15px; color: var(--slate, #334155); line-height: 1.8; margin: 0 0 12px; }
.cp-job-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.cp-job .cp-pills { margin-top: 0; }
.cp-job .cp-table-wrap { margin-top: 8px; }

.cp-milestones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.cp-milestones div { background: var(--bg, #F0F4F8); border-radius: 12px; padding: 16px 18px; }
.cp-milestones strong { display: block; font-size: 14px; color: var(--blue, #0D5EA6); margin-bottom: 4px; }
.cp-milestones p { font-size: 14px; color: var(--slate, #334155); line-height: 1.7; margin: 0; }

.cp-apply {
    margin-top: 24px;
    background: var(--sky, #EFF6FF);
    border-radius: 12px;
    padding: 18px 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.cp-apply p { margin: 0; font-size: 15px; color: var(--slate, #334155); line-height: 1.7; }
.cp-apply .btn-custom { margin-right: 0; }

/* ── note box ───────────────────────────────── */
.cp-note {
    background: var(--sky, #EFF6FF);
    border-left: 4px solid var(--blue, #0D5EA6);
    border-radius: 0 12px 12px 0;
    padding: 18px 22px;
    margin-top: 26px;
}

.cp-note--amber { background: var(--amberbg, #FEF3E2); border-left-color: var(--amber, #B45309); }
.cp-note h3 { font-size: 16px; font-weight: 700; color: var(--ink, #0F172A); margin: 0 0 6px; }
.cp-note p { font-size: 15px; color: var(--slate, #334155); line-height: 1.75; margin: 0; }
.cp-note a { color: var(--blue, #0D5EA6); font-weight: 600; }

/* ── video ──────────────────────────────────── */
.cp-video {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #0F172A;
    box-shadow: var(--shadow-lg, 0 16px 48px rgba(10, 25, 41, .14));
}

.cp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── legal text (terms page) ────────────────── */
.cp-legal { max-width: 900px; }
.cp-legal .ms-body { text-align: left; }

/* ── responsive ─────────────────────────────── */
@media (max-width: 1024px) {
    .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-tiers { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
    .cp-walk-step { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
    .cp-walk-step:nth-child(even) .cp-walk-text { order: 0; }
    .cp-split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 768px) {
    .cp-products { grid-template-columns: 1fr; }
    .cp-job-cols,
    .cp-milestones,
    .cp-check--2 { grid-template-columns: 1fr; }
    .cp-job { padding: 26px 22px; }
    .cp-cta { padding: 36px 22px; }
}

@media (max-width: 560px) {
    .cp-grid,
    .cp-stats { grid-template-columns: 1fr; }
    .cp-walk-step { padding: 20px 18px; }
    .cp-walk-text h3 { font-size: 19px; }
    .cp-process > li { padding-left: 56px; }
    .cp-actions .btn-custom { flex: 1 1 100%; justify-content: center; }
}
