/* ============================================================
   Custom Algos Marketing Page
   Namespace: .mk- / .custom-algos-marketing-page
   Includes base layout + responsive (media) rules
   ============================================================ */

.custom-algos-marketing-page {
    --mk-ink: var(--color-primary, #001F3E);
    --mk-purple: #5739ad;
    --mk-purple-soft: #705bb2;
    --mk-lav: #f4f3fa;
    --mk-line: #e7eaf8;
    --mk-muted: #6c7483;
    --mk-green: #35a36f;
    --mk-orange: #e79a3b;
    --mk-blue: #3f78ae;
    --mk-dark: #061326;
}

/* ---- Hero ---- */
.custom-algos-marketing-page .mkHero .newsletterSection {
    padding-top: 40px;
    padding-bottom: 70px;
}

/* .custom-algos-marketing-page .mk-hero-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 48px;
    align-items: center;
} */

.custom-algos-marketing-page .mk-hero-grid .txtArea small {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c8c3db;
    font-weight: 700;
    margin-bottom: 12px;
}

.custom-algos-marketing-page .mk-hero-grid .txtArea h1 {
    font-family: var(--font-heading);
    font-size: clamp(42px, 5vw, 62px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 500;
    color: #fff;
    margin: 0 0 18px;
}

.custom-algos-marketing-page .mk-hero-grid .txtArea h4,
.custom-algos-marketing-page .mk-hero-grid .txtArea p {
    font-family: var(--font-para);
    font-size: var(--font-size-p);
    line-height: 1.55;
    color: #e4e8f0;
    max-width: 610px;
    margin: 0;
    font-weight: 400;
}

.custom-algos-marketing-page .mk-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.custom-algos-marketing-page .mk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 999px;
    font-family: var(--font-para);
    font-size: 14px;
    font-weight: 650;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.custom-algos-marketing-page .mk-btn:hover {
    transform: translateY(-2px);
}

.custom-algos-marketing-page .mk-btn-primary {
    padding: 12px 24px;
    font-size: var(--font-size-p);
}

.custom-algos-marketing-page .mk-btn-secondary {
    padding: 12px 20px;
}

.custom-algos-marketing-page .mk-hero-note {
    margin-top: 24px;
    font-size: 12px;
    color: #bdc6d3;
    line-height: 1.5;
}

.custom-algos-marketing-page .mk-hero-cards {
    position: relative;
    min-height: clamp(280px, 42vw, 420px);
    
}

.custom-algos-marketing-page .mk-glass {
    position: absolute;
    width: 57%;
    min-height: clamp(220px, 28vw, 300px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 20px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035));
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.22);
    color: #fff;
    will-change: opacity, top;
    visibility: hidden;
    opacity: 0;
}

.custom-algos-marketing-page .mk-glass.is-visible {
    visibility: visible;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .custom-algos-marketing-page .mk-glass {
        visibility: visible;
        opacity: 1;
    }
}

.custom-algos-marketing-page .mk-glass h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    margin: 0 0 4px;
    font-weight: 600;
}

.custom-algos-marketing-page .mk-glass small {
    color: #cbd3df;
    font-size: 12px;
}

.custom-algos-marketing-page .mk-glass-1 {
    left: 0;
    top: 82px;
    transform: rotateY(9deg) rotateZ(-4deg);
}

.custom-algos-marketing-page .mk-glass-2 {
    left: 22%;
    top: 30px;
    z-index: 2;
}

.custom-algos-marketing-page .mk-glass-3 {
    right: 0;
    top: 92px;
    transform: rotateY(-9deg) rotateZ(4deg);
}

.custom-algos-marketing-page .mk-mini-chart {
    height: 150px;
    margin-top: 24px;
}

.custom-algos-marketing-page .mk-mini-chart svg {
    width: 100%;
    height: 100%;
}

.custom-algos-marketing-page .mk-tags {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.custom-algos-marketing-page .mk-tag {
    font-size: 10px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    padding: 6px 8px;
    border-radius: 999px;
    color: #dce2ea;
}

/* ---- Section shared ---- */
.custom-algos-marketing-page .mk-section {
    padding: 90px 0;
}

.custom-algos-marketing-page .mk-section{
    background: linear-gradient(45deg, var(--color-scnd) 70%, #9eb2fc);
}

.custom-algos-marketing-page .mk-section-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 40px;
}

.custom-algos-marketing-page .mk-eyebrow {
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 10px;
}
.custom-algos-marketing-page .mk-platform .mk-eyebrow {
    color: #fff;
}

.custom-algos-marketing-page .mk-section-head h2,
.custom-algos-marketing-page .mk-platform-copy h2,
.custom-algos-marketing-page .mk-process-head h2 {
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 500;
    color: var(--color-primary);
    margin: 0;
}

.custom-algos-marketing-page .mk-section-head p,
.custom-algos-marketing-page .mk-platform-copy p {
    font-family: var(--font-para);
    font-size: var(--font-size-p);
    font-weight: 400;
    color: var(--color-darker);
    line-height: 150%;
}

.custom-algos-marketing-page .mk-platform-copy h2{
    margin-bottom: 15px;
}
.custom-algos-marketing-page .mk-platform-copy h2,
.custom-algos-marketing-page .mk-platform-copy p{
    color: #fff;
}

.custom-algos-marketing-page .mk-section-head p:last-child,
.custom-algos-marketing-page .mk-platform-copy p:last-child {
    margin-bottom: 0;
}

/* ---- Strategy grid (algo-card style) ---- */
.custom-algos-marketing-page .mk-strategy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.custom-algos-marketing-page .mk-strategy {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: none;
    border-radius: 28px;
    padding: 28px 32px 48px;
    min-height: auto;
    box-shadow: 0 14px 40px rgba(0, 31, 62, 0.1);
    overflow: hidden;
    transition:
        background 0.45s ease,
        box-shadow 0.45s ease,
        color 0.35s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.custom-algos-marketing-page .mk-strategy:hover {
    background: var(--color-highlight);
    box-shadow: 0 20px 30px var(--color-highlight), 0 10px 24px rgba(0, 31, 62, 0.1);
    transform: translateY(-6px);
}

.custom-algos-marketing-page .mk-strategy .num {
    font-family: var(--font-para);
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-highlight);
    margin: 0 0 4px;
    transition: color 0.35s ease;
}

.custom-algos-marketing-page .mk-strategy h3 {
    font-family: var(--font-heading);
    font-size: var(--font-size-h4);
    font-weight: 600;
    line-height: 150%;
    color: var(--color-highlight);
    margin: 0;
}
.custom-algos-marketing-page .mk-strategy p {
    color: var(--color-darker);
    margin: 0 0 20px;
}

.custom-algos-marketing-page .mk-strategy:hover .num,
.custom-algos-marketing-page .mk-strategy:hover h3,
.custom-algos-marketing-page .mk-strategy:hover p{
    color: #ffffff;
}

.custom-algos-marketing-page .mk-strategy:hover h3 {
    border-bottom-color: rgba(255, 255, 255, 0.25);
}

.custom-algos-marketing-page .mk-strategy > p {
    font-family: var(--font-para);
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 1.58;
    color: var(--color-darker);
    margin: 0 0 20px;
    max-width: none;
    transition: color 0.35s ease;
}

.custom-algos-marketing-page .mk-strategy:hover > p {
    color: #ffffff;
}

.custom-algos-marketing-page .mk-strategy-mini {
    height: 118px;
    margin: 0 0 20px;
    border: 1px solid var(--color-scnd);
    border-radius: 16px;
    background: #fff;
    padding: 10px;
    transition: border-color 0.35s ease, background 0.35s ease;
    min-height: 200px;
}

.custom-algos-marketing-page .mk-strategy-mini svg {
    width: 100%;
    height: 100%;
}

.custom-algos-marketing-page .mk-strategy:hover .mk-strategy-mini {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 1);
}

.custom-algos-marketing-page .mk-pills {
    display: grid;
    gap: 4px;
    margin-top: auto;
    grid-auto-columns: auto;
    grid-template-columns: 1fr 1fr;
}
.mk-strategy-grid .cardContent{
    position: relative;
    z-index: 10;
}
.custom-algos-marketing-page .mk-strategy .num,
.mk-process .algo-card .num{
    position: absolute;
    bottom: 0;
    right: 20px;
    z-index: 0;
    font-family: var(--font-heading);
    font-size: var(--font-size-h1);
    font-weight: 700;
    color: var(--color-highlight);
    opacity: 0.1;
    letter-spacing: 0;
    line-height: normal;
}
.algo-card:hover .num{
    color: #ffffff;
}
.mk-process .algo-card{
    padding-bottom: 60px;
}

.mk-process .mk-eyebrow{
    color: var(--color-highlight);
}
.mk-process .algosLists{
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 50px;
}
.mk-process .algo-card-inner .cardTop{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}
.mk-process .algo-title{
    font-size: var(--font-size-h5);
}

.custom-algos-marketing-page .mk-pill {
    position: relative;
    font-family: var(--font-para);
    font-size: var(--font-size-p);
    font-weight: 400;
    line-height: 160%;
    color: var(--color-darker);
    background: transparent;
    padding: 0 0 0 20px;
    border-radius: 0;
    transition: color 0.35s ease;
}

.custom-algos-marketing-page .mk-pill::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 100px;
    background: var(--color-highlight);
    transition: background 0.35s ease;
}

.custom-algos-marketing-page .mk-strategy:hover .mk-pill {
    color: #ffffff;
}

.custom-algos-marketing-page .mk-strategy:hover .mk-pill::before {
    background: #ffffff;
}

/* Strategy grid mobile rail */
.custom-algos-marketing-page .mkStrategyRailWrap .mk-strategy-grid.is-execution-rail .mk-strategy {
    flex: 0 0 var(--erc-slide-width, 320px);
    width: var(--erc-slide-width, 320px);
    min-width: var(--erc-slide-width, 320px);
    max-width: var(--erc-slide-width, 320px);
    margin: 0 var(--erc-slide-margin, 20px) 0 0;
    height: auto;
    pointer-events: auto;
}

.custom-algos-marketing-page .mkStrategyRailWrap .mk-strategy-grid.is-execution-rail .mk-strategy.is-erc-active {
    box-shadow: 0 20px 48px rgba(4, 55, 242, 0.12), 0 8px 22px rgba(0, 31, 62, 0.08);
}

.custom-algos-marketing-page .mkStrategyRailWrap .mk-strategy-grid.is-execution-rail .mk-strategy:last-child {
    margin-right: 0;
}

.custom-algos-marketing-page .mkStrategyRailWrap .executionSectionRailViewport.is-dragging
.custom-algos-marketing-page .mkStrategyRailWrap .mk-strategy-grid.is-execution-rail .mk-strategy {
    pointer-events: none;
}

@media (min-width: 768px) {
    .custom-algos-marketing-page .mkStrategyRailFluid {
        width: 100%;
        max-width: 1320px;
        margin-left: auto;
        margin-right: auto;
        padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
        padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    }

    .custom-algos-marketing-page .mkStrategyRailWrap .executionSectionRailViewport {
        overflow: visible;
        cursor: default;
        touch-action: auto;
    }

    .custom-algos-marketing-page .mkStrategyRailWrap .executionSectionRailEdge,
    .custom-algos-marketing-page .mkStrategyRailWrap .executionSectionRailNav,
    .custom-algos-marketing-page .mkStrategyRailWrap .executionSectionRailProgressWrap {
        display: none;
    }

    .custom-algos-marketing-page .mkStrategyRailWrap .mk-strategy-grid.is-execution-rail {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        width: 100%;
        min-width: 0;
        max-width: none;
        padding: 0;
        margin: 0;
        transform: none !important;
        will-change: auto;
    }

    .custom-algos-marketing-page .mkStrategyRailWrap .mk-strategy-grid.is-execution-rail .mk-strategy {
        flex: none;
        width: auto;
        min-width: 0;
        max-width: none;
        margin: 0;
    }
}

/* Strategy cards inside execution rail — match algo-card slide layout */
.custom-algos-marketing-page .executionSection .executionSectionGrid.is-execution-rail .mk-strategy {
    flex: 0 0 var(--erc-slide-width, 320px);
    width: var(--erc-slide-width, 320px);
    min-width: var(--erc-slide-width, 320px);
    max-width: var(--erc-slide-width, 320px);
    margin: 0 var(--erc-slide-margin, 20px) 0 0;
    height: auto;
    pointer-events: auto;
}

.custom-algos-marketing-page .executionSection .executionSectionGrid.is-execution-rail .mk-strategy.is-erc-active {
    box-shadow: 0 20px 48px rgba(4, 55, 242, 0.12), 0 8px 22px rgba(0, 31, 62, 0.08);
}

.custom-algos-marketing-page .executionSection .executionSectionGrid.is-execution-rail .mk-strategy:last-child {
    margin-right: 0;
}

.custom-algos-marketing-page .executionSectionRailViewport.is-dragging
.custom-algos-marketing-page .executionSection .executionSectionGrid.is-execution-rail .mk-strategy {
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .custom-algos-marketing-page .mk-strategy,
    .custom-algos-marketing-page .executionSection .executionSectionGrid.is-execution-rail .mk-strategy {
        transition: none;
    }

    .custom-algos-marketing-page .mk-strategy:hover,
    .custom-algos-marketing-page .executionSection .executionSectionGrid.is-execution-rail .mk-strategy:hover {
        transform: none;
    }
}

/* ---- Custom builder (light) ---- */
.custom-algos-marketing-page .mk-custom {
    background: #ffffff;
    color: var(--color-primary);
    padding: 90px 0;
    position: relative;
}

.custom-algos-marketing-page .mk-composer {
    display: grid;
    grid-template-columns: 0.5fr 1fr;
    gap: 24px;
    margin-top: 48px;
    align-items: start;
}

.custom-algos-marketing-page .mk-strategy-library,
.custom-algos-marketing-page .mk-composer-canvas {
    border: 1px solid var(--mk-line);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 14px 40px rgba(0, 31, 62, 0.08);
    transition:
        box-shadow 0.45s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.custom-algos-marketing-page .mk-strategy-library {
    padding: 28px;
    position: sticky;
    top: 96px;
}

.custom-algos-marketing-page .mk-strategy-library h3,
.custom-algos-marketing-page .mk-composer-canvas h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--font-size-h5);
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-primary);
}

.custom-algos-marketing-page .mk-introcopy {
    font-family: var(--font-para);
    font-size: var(--font-size-xs);
    line-height: 1.5;
    color: #58585a;
    margin: 10px 0 15px;
    font-weight: 500;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--mk-line);
}

.custom-algos-marketing-page .mk-library-grid {
    display: grid;
    gap: 4px;
}

.custom-algos-marketing-page .mk-library-card {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    text-align: left;
    border: 1px solid var(--mk-line);
    background: #ffffff;
    color: var(--color-primary);
    border-radius: 16px;
    padding: 6px;
    cursor: pointer;
    transition: border-color 0.35s ease, box-shadow 0.45s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease;
}

.custom-algos-marketing-page .mk-library-card:hover {
    border-color: var(--color-highlight);
    box-shadow: 0 10px 28px rgba(4, 55, 242, 0.1);
    transform: translateY(-2px);
}

.custom-algos-marketing-page .mk-library-card.in-use {
    opacity: 1;
    background: var(--color-darker);
    color: #ffffff;
}

.custom-algos-marketing-page .mk-library-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--color-scnd);
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--color-highlight);
    flex-shrink: 0;
    transition: background 0.35s ease, color 0.35s ease;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.custom-algos-marketing-page .mk-library-card:hover .mk-library-icon {
    background: var(--color-highlight);
    color: #ffffff;
}
.custom-algos-marketing-page .mk-library-card.in-use span,
.custom-algos-marketing-page .mk-library-card.in-use b{
    color: #ffffff;
}

.custom-algos-marketing-page .mk-library-card b {
    font-family: var(--font-heading);
    font-size: var(--font-size-p);
    font-weight: 600;
    color: var(--color-primary);
}

.custom-algos-marketing-page .mk-library-card span {
    display: block;
    font-family: var(--font-para);
    color: var(--color-darker);
    font-size: var(--font-size-xs);
    line-height: 1.5;
    margin-top: 0;
    font-weight: 500;
}

.custom-algos-marketing-page .mk-addplus {
    margin-left: auto;
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 300;
    color: var(--color-highlight);
    line-height: 1;
    width: 40px;
    text-align: center;
}

.custom-algos-marketing-page .mk-library-note {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--mk-line);
    font-family: var(--font-para);
    font-size: var(--font-size-xs);
    line-height: 1.5;
    color: #58585a;
    font-weight: 500;
}

.custom-algos-marketing-page .mk-composer-canvas {
    padding: 28px;
    min-height: 620px;
}

.custom-algos-marketing-page .mk-composer-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.custom-algos-marketing-page .mk-composer-sub {
    margin-top: 10px;
    max-width: 500px;
    font-family: var(--font-para);
    font-size: var(--font-size-xs);
    line-height: 1.5;
    color: #58585a;
    font-weight: 500;
}

.custom-algos-marketing-page .mk-mode-switch {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--mk-line);
    border-radius: 12px;
    background: var(--color-scnd);
    flex-shrink: 0;
}

.custom-algos-marketing-page .mk-mode-btn {
    border: 0;
    background: transparent;
    color: var(--color-darker);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: var(--font-para);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.custom-algos-marketing-page .mk-mode-btn.active {
    background: var(--color-highlight);
    color: #ffffff;
    box-shadow: 0 6px 8px var(--color-highlight);
}

.custom-algos-marketing-page .mk-active-strategies {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--mk-line);
}

.custom-algos-marketing-page .mk-active-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.custom-algos-marketing-page .mk-active-label span:first-child {
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--color-highlight);
    font-weight: 600;
}

.custom-algos-marketing-page .mk-active-label span:last-child {
    font-family: var(--font-para);
    font-size: var(--font-size-xs);
    color: var(--mk-muted);
}

.custom-algos-marketing-page .mk-strategy-stack {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 60px;
    padding: 6px;
    border: 1px dashed var(--mk-line);
    border-radius: 16px;
    background: var(--color-scnd);
}

.custom-algos-marketing-page .mk-active-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 9px 9px 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--mk-line);
    color: var(--color-primary);
    cursor: grab;
    user-select: none;
    box-shadow: 0 4px 14px rgba(0, 31, 62, 0.06);
    transition:
        box-shadow 0.35s ease,
        transform 0.35s ease,
        border-color 0.35s ease;
}

.custom-algos-marketing-page .mk-active-chip:hover {
    border-color: var(--color-highlight);
    box-shadow: 0 8px 22px rgba(4, 55, 242, 0.1);
}

.custom-algos-marketing-page .mk-active-chip.dragging {
    opacity: 0.45;
    transform: scale(0.98);
}

.custom-algos-marketing-page .mk-active-chip b {
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-primary);
}

.custom-algos-marketing-page .mk-chip-actions {
    display: flex;
    gap: 3px;
}

.custom-algos-marketing-page .mk-chip-actions button {
    border: 0;
    background: var(--color-scnd);
    color: var(--color-darker);
    border-radius: 6px;
    width: 23px;
    height: 23px;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    transition: background 0.25s ease, color 0.25s ease;
}

.custom-algos-marketing-page .mk-chip-actions button:hover {
    background: var(--color-highlight);
    color: #ffffff;
}

.custom-algos-marketing-page .mk-compose-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.custom-algos-marketing-page .mk-controlbox {
    border: 1px solid var(--mk-line);
    border-radius: 16px;
    padding: 14px;
    background: #ffffff;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.custom-algos-marketing-page .mk-controlbox:focus-within {
    border-color: var(--color-highlight);
    box-shadow: 0 6px 20px rgba(4, 55, 242, 0.08);
}

.custom-algos-marketing-page .mk-controlbox label {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-highlight);
    font-weight: 600;
    margin-bottom: 8px;
}

.custom-algos-marketing-page .mk-controlbox select,
.custom-algos-marketing-page .mk-controlbox input[type="range"] {
    width: 100%;
}

.custom-algos-marketing-page .mk-controlbox select {
    font-family: var(--font-para);
    background: #ffffff;
    color: var(--color-primary);
    border: 1px solid var(--mk-line);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: var(--font-size-sm);
    transition: border-color 0.25s ease;
}

.custom-algos-marketing-page .mk-controlbox select:focus {
    outline: none;
    border-color: var(--color-highlight);
}

.custom-algos-marketing-page .mk-controlbox input[type="range"] {
    accent-color: var(--color-highlight);
    cursor: pointer;
}

.custom-algos-marketing-page .mk-controlbox .mk-val {
    font-family: var(--font-para);
    font-size: var(--font-size-sm);
    color: var(--color-darker);
    margin-top: 8px;
}

.custom-algos-marketing-page .mk-visual-stage {
    margin-top: 22px;
    border: 1px solid var(--mk-line);
    border-radius: 20px;
    padding: 20px;
    background: linear-gradient(180deg, var(--color-scnd), transparent);
}

.custom-algos-marketing-page .mk-stage-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 13px;
}

.custom-algos-marketing-page .mk-stage-top b {
    font-family: var(--font-heading);
    font-size: var(--font-size-p);
    font-weight: 600;
    color: var(--color-primary);
}

.custom-algos-marketing-page .mk-stage-top span {
    font-family: var(--font-para);
    font-size: var(--font-size-sm);
    color: var(--mk-muted);
}

.custom-algos-marketing-page .mk-timeline-scale {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-para);
    font-size: var(--font-size-xs);
    color: var(--mk-muted);
    margin: 0 2px 8px;
}

.custom-algos-marketing-page .mk-lifecycle {
    position: relative;
    display: flex;
    min-height: 200px;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--mk-line);
    box-shadow: inset 0 1px 3px rgba(0, 31, 62, 0.04);
}

.custom-algos-marketing-page .mk-phase {
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 13px 11px;
    min-width: 70px;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    border-right: 1px solid var(--mk-line);
}

.custom-algos-marketing-page .mk-phase:last-child {
    border-right: 0;
}

.custom-algos-marketing-page .mk-phase .mk-phase-content {
    position: relative;
    z-index: 2;
}

.custom-algos-marketing-page .mk-phase small {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--font-size-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-highlight);
    font-weight: 600;
    margin-bottom: 0px;
}

.custom-algos-marketing-page .mk-phase b {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-primary);
}

.custom-algos-marketing-page .mk-phase span {
    display: block;
    font-family: var(--font-para);
    font-size: var(--font-size-xs);
    color: var(--color-darker);
    line-height: 1.4;
    margin-top: 4px;
}

.custom-algos-marketing-page .mk-phase-vwap {
    background: linear-gradient(180deg, rgba(4, 55, 242, 0.14), rgba(4, 55, 242, 0.04));
}

.custom-algos-marketing-page .mk-phase-twap {
    background: linear-gradient(180deg, rgba(63, 120, 174, 0.16), rgba(63, 120, 174, 0.04));
}

.custom-algos-marketing-page .mk-phase-pov {
    background: linear-gradient(180deg, rgba(53, 163, 111, 0.16), rgba(53, 163, 111, 0.04));
}

.custom-algos-marketing-page .mk-phase-explorer {
    background: linear-gradient(180deg, rgba(87, 57, 173, 0.14), rgba(87, 57, 173, 0.04));
}

.custom-algos-marketing-page .mk-phase-inline {
    background: linear-gradient(180deg, rgba(231, 154, 59, 0.16), rgba(231, 154, 59, 0.04));
}

.custom-algos-marketing-page .mk-layer-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.custom-algos-marketing-page .mk-layer-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0.9;
}

.custom-algos-marketing-page .mk-line-inline {
    background: linear-gradient(90deg, transparent, #e79a3b 12%, #e79a3b 88%, transparent);
}

.custom-algos-marketing-page .mk-line-explorer {
    background: repeating-linear-gradient(90deg, #8d63c6 0 8px, transparent 8px 14px);
}

.custom-algos-marketing-page .mk-line-pov {
    background: linear-gradient(90deg, transparent, #35a36f 12%, #35a36f 88%, transparent);
}

.custom-algos-marketing-page .mk-line-vwap {
    background: linear-gradient(90deg, transparent, var(--color-highlight) 12%, var(--color-highlight) 88%, transparent);
}

.custom-algos-marketing-page .mk-line-twap {
    background: linear-gradient(90deg, transparent, #3b7fc4 12%, #3b7fc4 88%, transparent);
}

.custom-algos-marketing-page .mk-overlay-label {
    position: absolute;
    right: 9px;
    font-family: var(--font-para);
    font-size: var(--font-size-xs);
    padding: 2px 8px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-primary);
    border: 1px solid var(--mk-line);
    box-shadow: 0 2px 8px rgba(0, 31, 62, 0.06);
}

.custom-algos-marketing-page .mk-logic-map {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.custom-algos-marketing-page .mk-logic-node {
    min-height: 110px;
    border: 1px solid var(--mk-line);
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    transition:
        box-shadow 0.45s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.35s ease;
}

.custom-algos-marketing-page .mk-logic-node:hover {
    border-color: transparent;
    box-shadow: 0 10px 16px #b4bce3;
    transform: translateY(-2px);
}

.custom-algos-marketing-page .mk-logic-node small {
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    color: var(--color-highlight);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

.custom-algos-marketing-page .mk-logic-node b {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--font-size-p);
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 6px;
}

.custom-algos-marketing-page .mk-logic-node span {
    display: block;
    font-family: var(--font-para);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    color: var(--color-darker);
    margin-top: 8px;
}

.custom-algos-marketing-page .mk-composer-summary {
    margin-top: 14px;
    padding: 18px 20px;
    border-radius: 16px;
    background: var(--color-highlight);
    transition: box-shadow 0.45s ease;
}

.custom-algos-marketing-page .mk-composer-summary:hover {
    box-shadow: 0 12px 16px var(--color-highlight);
}

.custom-algos-marketing-page .mk-composer-summary b {
    font-family: var(--font-heading);
    font-size: var(--font-size-p);
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    color: #ffffff;
}

.custom-algos-marketing-page .mk-composer-summary span {
    font-family: var(--font-para);
    font-size: var(--font-size-sm);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

.custom-algos-marketing-page .mk-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 92px;
    width: 100%;
    font-family: var(--font-para);
    color: var(--mk-muted);
    font-size: var(--font-size-sm);
    text-align: center;
    padding: 18px;
    line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
    .custom-algos-marketing-page .mk-library-card,
    .custom-algos-marketing-page .mk-logic-node,
    .custom-algos-marketing-page .mk-active-chip,
    .custom-algos-marketing-page .mk-strategy-library,
    .custom-algos-marketing-page .mk-composer-canvas {
        transition: none;
    }

    .custom-algos-marketing-page .mk-library-card:hover,
    .custom-algos-marketing-page .mk-logic-node:hover,
    .custom-algos-marketing-page .mk-active-chip:hover {
        transform: none;
    }
}

/* ---- Platform ---- */
.custom-algos-marketing-page .mk-platform {
    padding: 100px 0;
    background: linear-gradient(45deg, var(--color-highlight) 40%, var(--color-green-1));
}

.custom-algos-marketing-page .mk-platform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 52px;
    align-items: center;
}

.custom-algos-marketing-page .mk-layers {
    border: 1px solid var(--mk-line);
    border-radius: 22px;
    padding: 20px;
    background: #fbfbfe;
}

.custom-algos-marketing-page .mk-layer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border: 1px solid #e8eaf2;
    border-radius: 14px;
    background: #fff;
    margin: 8px 0;
    box-shadow: 0 0px 0px transparent;
    transition: all 0.3s ease;
    align-items: center;
}

.custom-algos-marketing-page .mk-layer b {
    font-size: 14px;
    color: var(--mk-ink);
    font-weight: 500;
}

.custom-algos-marketing-page .mk-layer span {
    font-size: 12px;
    font-family: var(--font-para);
    color: var(--mk-muted);
    text-align: right;
}

.custom-algos-marketing-page .mk-layer.is-purple,
.custom-algos-marketing-page .mk-layer:hover {
    background: var(--color-highlight);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 12px var(--color-highlight);
    transition: all 0.3s ease;
}

.custom-algos-marketing-page .mk-layer.is-purple b,
.custom-algos-marketing-page .mk-layer.is-purple span,
.custom-algos-marketing-page .mk-layer:hover b,
.custom-algos-marketing-page .mk-layer:hover span {
    color: #fff;
}
.custom-algos-marketing-page .mk-layer b{
    font-family: var(--font-heading);
    font-size: var(--font-size-h6);
    font-weight: 500;
}
.custom-algos-marketing-page .mk-layer span {
    color: var(--color-primary);
    font-family: var(--font-para);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* ---- Process ---- */
.custom-algos-marketing-page .mk-process {
    padding: 86px 0;
    background: var(--mk-lav);
}

.custom-algos-marketing-page .mk-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.custom-algos-marketing-page .mk-step {
    background: #fff;
    border: 1px solid var(--mk-line);
    border-radius: 17px;
    padding: 23px;
    min-height: 205px;
}

.custom-algos-marketing-page .mk-step .n {
    font-size: 12px;
    color: var(--mk-purple);
    font-weight: 700;
}

.custom-algos-marketing-page .mk-step h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin: 34px 0 9px;
    color: var(--mk-ink);
    font-weight: 500;
}

.custom-algos-marketing-page .mk-step p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--mk-muted);
    margin: 0;
}

/* ---- CTA band ---- */
.custom-algos-marketing-page .mk-cta-band {
    padding: 100px 0;
}

.custom-algos-marketing-page .mk-ctabox {
    border-radius: 28px;
    padding: 58px;
    color: #fff;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 30px;
    align-items: center;
    background:
        radial-gradient(circle at 85% 18%, rgba(203, 136, 213, 0.5), transparent 31%),
        linear-gradient(120deg, #081526, #38256d 68%, #6942a5);
}

.custom-algos-marketing-page .mk-ctabox h2 {
    font-family: var(--font-heading);
    font-size: clamp(28px, 3.5vw, 42px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin: 0 0 14px;
    font-weight: 500;
}

.custom-algos-marketing-page .mk-ctabox p {
    color: #d7dcea;
    line-height: 1.6;
    margin: 0;
    font-size: 16px;
}

.custom-algos-marketing-page .mk-cta-side {
    display: flex;
    justify-content: flex-end;
}

.custom-algos-marketing-page .mk-cta-side .mk-btn-primary {
    font-size: 15px;
}

/* ---- Reveal helpers ---- */
.custom-algos-marketing-page [data-mk-reveal] {
    will-change: transform, opacity;
}

.custom-algos-marketing-page .executionSectionCta{
    width:50%;
    max-width:100%;
}





/* ============================================================
   Responsive / Media
   ============================================================ */
@media (max-width: 1199px) {
    .custom-algos-marketing-page .mk-compose-controls {
        grid-template-columns: 1fr 1fr;
    }

    .custom-algos-marketing-page .mk-logic-map {
        grid-template-columns: 1fr;
    }
    .mk-process .algosLists{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .custom-algos-marketing-page .mk-hero-grid,
    .custom-algos-marketing-page .mk-section-head,
    .custom-algos-marketing-page .mk-composer,
    .custom-algos-marketing-page .mk-platform-grid,
    .custom-algos-marketing-page .mk-ctabox {
        grid-template-columns: 1fr;
    }

    .custom-algos-marketing-page .mk-strategy-library {
        position: static;
    }

    .custom-algos-marketing-page .mk-hero-cards {
        min-height: clamp(300px, 55vw, 360px);
        margin-top: 20px;
    }

    .custom-algos-marketing-page .mk-glass {
        width: 62%;
        min-height: clamp(200px, 32vw, 280px);
        padding: 18px;
    }

    .custom-algos-marketing-page .mk-glass-1 {
        top: 72px;
    }

    .custom-algos-marketing-page .mk-glass-2 {
        left: 20%;
        top: 24px;
    }

    .custom-algos-marketing-page .mk-glass-3 {
        top: 80px;
    }

    .custom-algos-marketing-page .mk-mini-chart {
        height: 130px;
        margin-top: 18px;
    }

    .custom-algos-marketing-page .mk-strategy {
        padding: 24px 24px 40px;
        border-radius: 24px;
    }

    .custom-algos-marketing-page .mk-strategy h3 {
        font-size: var(--font-size-h5);
    }

    .custom-algos-marketing-page .mk-strategy-mini {
        height: 100px;
    }

    .custom-algos-marketing-page .mk-steps {
        grid-template-columns: 1fr 1fr;
    }

    .custom-algos-marketing-page .mk-cta-side {
        justify-content: flex-start;
    }

    .custom-algos-marketing-page .mk-section,
    .custom-algos-marketing-page .mk-platform,
    .custom-algos-marketing-page .mk-custom,
    .custom-algos-marketing-page .mk-cta-band {
        padding: 70px 0;
    }
}

@media (max-width: 767px) {

    .custom-algos-marketing-page .mk-btn-primary{
        justify-content: center;
    }
    .custom-algos-marketing-page .mkHero .newsletterSection {
        padding-bottom: 50px;
    }
    .custom-algos-marketing-page .mk-strategy-grid{
        gap: 0px;
    }
    .custom-algos-marketing-page .mk-strategy-mini{
        min-height: 100px;
    }
    .custom-algos-marketing-page .mk-section-head{
        gap: 20px;
        margin-bottom: 20px;
    }
    .custom-algos-marketing-page .mk-strategy-library,
    .custom-algos-marketing-page .mk-composer-canvas{
        padding: 20px;
    }
    .custom-algos-marketing-page .mk-process-head h2{
        text-align: center;
    }
    .custom-algos-marketing-page .mk-visual-stage,
    .custom-algos-marketing-page .mk-layers{
        padding: 15px;
    }
    .mk-process .algo-icon{
        margin-bottom: 0px;
    }

    .custom-algos-marketing-page .mkStrategyRailWrap:not(.erc-is-ready) .mk-strategy-grid.is-execution-rail {
        opacity: 0;
        visibility: hidden;
    }

    .custom-algos-marketing-page .mkStrategyRailFluid .executionSectionRailViewport {
        padding: 0 10px;
        min-height: 0;
    }

    .custom-algos-marketing-page .mkStrategyRailFluid .executionSectionRailEdge--left {
        background: linear-gradient(90deg, var(--color-scnd) 10%, rgba(231, 234, 248, 0.92) 0%, rgba(231, 234, 248, 0) 50%);
    }

    .custom-algos-marketing-page .mkStrategyRailWrap .mk-strategy-grid.is-execution-rail {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        width: max-content;
        min-width: 100%;
        margin: 0;
        padding: 24px 0 36px;
        will-change: transform;
        transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .custom-algos-marketing-page .mkStrategyRailFluid .executionSectionRailNav {
        width: 42px;
        height: 42px;
    }

    .custom-algos-marketing-page .mkStrategyRailFluid .executionSectionRailEdge {
        width: clamp(52px, 14vw, 88px);
    }

    .custom-algos-marketing-page .mkStrategyRailFluid .executionSectionRailNav--prev {
        left: 6px;
    }

    .custom-algos-marketing-page .mkStrategyRailFluid .executionSectionRailNav--next {
        right: 6px;
    }

    .custom-algos-marketing-page .mkStrategyRailFluid .executionSectionRailProgressWrap {
        margin-top: 6px;
    }

    .custom-algos-marketing-page .mkStrategyRailFluid .executionSectionRailProgress {
        width: min(100%, 320px);
        height: auto;
    }

    .custom-algos-marketing-page .mkStrategyRailWrap .mk-strategy {
        padding: 24px;
        padding-bottom: 46px;
        border-radius: 22px;
        transform: none !important;
    }
    .custom-algos-marketing-page .mk-process{
        padding: 50px 0;
    }

    .mk-process .algosLists{
        grid-template-columns: repeat(1, 1fr);
    }

    .custom-algos-marketing-page .mk-hero-cards {
        min-height: clamp(260px, 70vw, 320px);
    }

    .custom-algos-marketing-page .mk-glass {
        width: 68%;
        min-height: clamp(180px, 38vw, 240px);
        padding: 16px;
    }

    .custom-algos-marketing-page .mk-glass-1 {
        top: 58px;
        transform: rotateY(6deg) rotateZ(-3deg);
    }

    .custom-algos-marketing-page .mk-glass-2 {
        left: 18%;
        top: 16px;
    }

    .custom-algos-marketing-page .mk-glass-3 {
        top: 64px;
        transform: rotateY(-6deg) rotateZ(3deg);
    }

    .custom-algos-marketing-page .mk-mini-chart {
        height: 110px;
        margin-top: 14px;
    }

    .custom-algos-marketing-page .mk-glass h3 {
        font-size: 14px;
    }

    .custom-algos-marketing-page .mk-steps {
        grid-template-columns: 1fr;
    }

    .custom-algos-marketing-page .mk-composer-head {
        display: block;
    }

    .custom-algos-marketing-page .mk-mode-switch {
        margin-top: 12px;
        width: max-content;
    }

    .custom-algos-marketing-page .mk-compose-controls {
        grid-template-columns: 1fr;
    }

    .custom-algos-marketing-page .mk-ctabox {
        padding: 36px 24px;
    }

    .custom-algos-marketing-page .mk-layer {
        flex-direction: column;
        align-items: flex-start;
    }

    .custom-algos-marketing-page .mk-layer span {
        text-align: left;
    }
}

@media (max-width: 575px) {
    .custom-algos-marketing-page .mk-hero-cards {
        min-height: 250px;
    }

    .custom-algos-marketing-page .mk-glass {
        width: 74%;
        min-height: 190px;
        padding: 14px;
        border-radius: 14px;
    }

    .custom-algos-marketing-page .mk-glass-1 {
        top: 48px;
        transform: rotateY(4deg) rotateZ(-2deg);
    }

    .custom-algos-marketing-page .mk-glass-2 {
        left: 14%;
        top: 10px;
    }

    .custom-algos-marketing-page .mk-glass-3 {
        top: 52px;
        transform: rotateY(-4deg) rotateZ(2deg);
    }

    .custom-algos-marketing-page .mk-mini-chart {
        height: 96px;
    }

    .custom-algos-marketing-page .mk-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .custom-algos-marketing-page .mk-btn {
        justify-content: center;
    }

    .custom-algos-marketing-page .mk-strategy {
        padding: 22px 20px 36px;
        border-radius: 22px;
    }

    .custom-algos-marketing-page .mk-strategy-mini {
        height: 92px;
        padding: 8px;
    }

    .custom-algos-marketing-page .mk-pill {
        font-size: var(--font-size-sm);
    }
}

/* ---- CTA Form Modal (scroll fix for Lenis + Bootstrap) ---- */
#modal_CTAForm.ctaFormModal.modal .modal-dialog.modal-dialog-scrollable,
.ctaFormModal.modal .modal-dialog.modal-dialog-scrollable {
    max-height: calc(100vh - (var(--bs-modal-margin, 0.5rem) * 2));
    height: calc(100% - (var(--bs-modal-margin, 0.5rem) * 2));
    margin-top: var(--bs-modal-margin, 0.5rem);
    margin-bottom: var(--bs-modal-margin, 0.5rem);
}

.ctaFormModal.modal .modal-dialog-scrollable .modal-content {
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ctaFormModal .modal-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    padding: 50px;
}

/* Route wheel scroll through the modal layer when Lenis is active */
html.is-lenis-scroll body.modal-open .ctaFormModal.modal.show,
html.lenis body.modal-open .ctaFormModal.modal.show {
    overflow-x: hidden;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

html.is-lenis-scroll body.modal-open .ctaFormModal.modal.show .modal-dialog,
html.lenis body.modal-open .ctaFormModal.modal.show .modal-dialog {
    height: auto;
    max-height: none;
    margin-top: var(--bs-modal-margin, 0.5rem);
    margin-bottom: var(--bs-modal-margin, 0.5rem);
}

html.is-lenis-scroll body.modal-open .ctaFormModal.modal.show .modal-dialog-scrollable .modal-content,
html.lenis body.modal-open .ctaFormModal.modal.show .modal-dialog-scrollable .modal-content {
    max-height: none;
    overflow: visible;
}

html.is-lenis-scroll body.modal-open .ctaFormModal.modal.show .modal-dialog-scrollable .modal-body,
html.lenis body.modal-open .ctaFormModal.modal.show .modal-dialog-scrollable .modal-body {
    overflow: visible;
    flex: none;
}

@media (max-width: 768px) {
    .ctaFormModal .modal-body {
        padding: 36px 24px;
    }
}
