.markets-page {
    --cn-primary: #0045f8;
    --cn-primary-hover: #0038ca;
    --cn-primary-soft: rgba(0, 69, 248, 0.12);
    --cn-primary-border: rgba(0, 69, 248, 0.28);
    --cn-blue: #2563eb;
    --cn-blue-dim: rgba(37, 99, 235, 0.14);
}

.markets-page .cn-hero {
    background: linear-gradient(180deg, #ffffff 0%, #e8f0ff 100%);
}

.markets-page .cn-cta {
    background: linear-gradient(180deg, rgba(0, 69, 248, 0.12) 0%, rgba(0, 69, 248, 0.3) 100%);
}

.mk-personas,
.mk-overview,
.mk-system,
.mk-story {
    position: relative;
    overflow: hidden;
}

.mk-personas::before,
.mk-overview::before,
.mk-system::before,
.mk-story::before {
    content: "";
    position: absolute;
    inset: -120px auto auto -120px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(0, 69, 248, 0.08) 0%, rgba(0, 69, 248, 0) 74%);
    pointer-events: none;
}

.mk-personas {
    padding: 2.6rem 0 3rem;
    background: #f8fbff;
    border-top: 1px solid #dbe7ff;
    border-bottom: 1px solid #dbe7ff;
}

.mk-overview,
.mk-system,
.mk-story {
    padding: 5rem 0;
}

.mk-overview { background: #ffffff; }
.mk-system { background: linear-gradient(180deg, #f6f9ff 0%, #eef4ff 100%); border-top: 1px solid #e3ecff; border-bottom: 1px solid #e3ecff; }
.mk-story { background: #f8fbff; border-top: 1px solid #e3ecff; }

.mk-head {
    max-width: 780px;
    margin: 0 auto 2.2rem;
    text-align: center;
}

.mk-head--compact {
    margin-bottom: 1.7rem;
}

.mk-eyebrow {
    margin: 0 0 0.7rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #4f6db5;
    font-weight: 700;
}

.mk-title {
    margin: 0;
    color: #0b1739;
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.mk-copy {
    margin: 0 0 1rem;
    color: #546881;
    font-size: 0.98rem;
    line-height: 1.75;
    max-width: 640px;
}

.mk-selector-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1.35rem;
    align-items: stretch;
}

.mk-personas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.mk-selector-nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.mk-persona {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #dce8ff;
    border-radius: 18px;
    padding: 1rem 1rem 1rem 0.95rem;
    text-decoration: none;
    color: inherit;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    box-shadow: 0 12px 34px rgba(13, 46, 130, 0.05);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.mk-persona:hover,
.mk-persona.is-active {
    transform: translateY(-3px);
    border-color: #9ebcff;
    box-shadow: 0 18px 40px rgba(13, 46, 130, 0.1);
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

.mk-persona-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(180deg, #edf3ff 0%, #dce8ff 100%);
    color: #1745bf;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mk-persona-copy {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.mk-persona strong {
    color: #112552;
    font-size: 1rem;
    line-height: 1.2;
}

.mk-persona small {
    margin: 0;
    color: #5a6f95;
    font-size: 0.8rem;
    line-height: 1.5;
}

.mk-selector-stage {
    position: relative;
    min-height: 620px;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dce8ff;
    box-shadow: 0 24px 64px rgba(13, 46, 130, 0.08);
    overflow: hidden;
    padding: 1.6rem;
}

.mk-selector-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 69, 248, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 69, 248, 0.06) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.08));
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.08));
}

.mk-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 1.5rem;
    align-items: start;
}

.mk-overview-panel,
.mk-story-card,
.mk-team-card {
    background: #f8fbff;
    border: 1px solid #dfebff;
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: 0 10px 36px rgba(18, 52, 130, 0.05);
}

.mk-panel-label {
    margin: 0 0 1rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #5d79bc;
    font-weight: 700;
}

.mk-offer-stack {
    display: grid;
    gap: 0.85rem;
}

.mk-offer-item {
    padding: 1rem 1rem 1rem 1.05rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e4edff;
}

.mk-offer-item h3 {
    margin: 0 0 0.35rem;
    color: #122a5c;
    font-size: 1rem;
}

.mk-offer-item p {
    margin: 0;
    color: #5b7097;
    font-size: 0.85rem;
    line-height: 1.6;
}

.mk-metrics {
    margin-top: 1.35rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.mk-metric {
    padding: 1.15rem 1.2rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #0e1c45 0%, #102656 100%);
    color: #ffffff;
    box-shadow: 0 16px 44px rgba(9, 23, 61, 0.18);
}

.mk-metric-value {
    display: block;
    margin-bottom: 0.25rem;
    font-size: clamp(1.7rem, 2.4vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.mk-metric-label {
    display: block;
    font-size: 0.86rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}

.mk-system-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1rem;
}

.mk-system-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe6ff;
    border-radius: 18px;
    padding: 1.25rem 1.2rem;
    box-shadow: 0 8px 26px rgba(18, 52, 130, 0.05);
}

.mk-system-card--wide {
    grid-row: span 2;
}

.mk-step-no {
    display: inline-flex;
    margin-bottom: 0.7rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: #e7efff;
    color: #1e40af;
    font-size: 0.72rem;
    font-weight: 700;
}

.mk-system-card h3 {
    margin: 0 0 0.45rem;
    color: #142857;
    font-size: 1.04rem;
    line-height: 1.35;
}

.mk-system-card p {
    margin: 0;
    color: #5a6f95;
    font-size: 0.86rem;
    line-height: 1.65;
}

.mk-checks {
    margin: 0.9rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.mk-checks li {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    color: #355188;
    font-size: 0.84rem;
    line-height: 1.55;
}

.mk-checks li i {
    margin-top: 0.15rem;
    color: #1d4ed8;
}

.mk-visual-strip {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.mk-visual-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe6ff;
    border-radius: 16px;
    padding: 0.95rem 1rem;
    min-height: 138px;
}

.mk-vhead {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    color: #27458a;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
}

.mk-bars {
    height: 76px;
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
}

.mk-bars span {
    flex: 1;
    height: var(--h);
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #5b86ff 0%, #0045f8 100%);
}

.mk-gauge {
    height: 78px;
    border-radius: 14px;
    background: linear-gradient(90deg, #d8e4ff 0%, #b7ccff 35%, #7aa0ff 70%, #0045f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d2b75;
}

.mk-gauge b {
    font-size: 1.4rem;
    line-height: 1;
    margin-right: 0.2rem;
}

.mk-gauge small {
    font-size: 0.78rem;
    font-weight: 600;
}

.mk-nodes {
    position: relative;
    height: 78px;
    background: radial-gradient(circle at 30% 50%, rgba(0, 69, 248, 0.06), rgba(0, 69, 248, 0));
}

.mk-nodes i {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2f5dff;
    box-shadow: 0 0 0 3px rgba(47, 93, 255, 0.16);
}

.mk-nodes i:nth-child(1) { left: 8%; top: 42%; }
.mk-nodes i:nth-child(2) { left: 30%; top: 22%; }
.mk-nodes i:nth-child(3) { left: 50%; top: 50%; }
.mk-nodes i:nth-child(4) { left: 68%; top: 28%; }
.mk-nodes i:nth-child(5) { left: 86%; top: 56%; }

.mk-story-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 1rem;
    align-items: stretch;
}

.mk-story-card h2 {
    margin: 0 0 0.8rem;
    color: #101f46;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.mk-story-card p {
    margin: 0;
    color: #5a6f95;
    font-size: 0.94rem;
    line-height: 1.75;
}

.mk-story-meta {
    margin-top: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.mk-story-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: #edf3ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 600;
}

.mk-team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.mk-team-member {
    padding: 1rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e4edff;
}

.mk-team-member h3 {
    margin: 0 0 0.18rem;
    color: #122a5c;
    font-size: 1rem;
}

.mk-team-member p {
    margin: 0 0 0.2rem;
    color: #31508e;
    font-size: 0.83rem;
    font-weight: 600;
}

.mk-team-member span {
    display: block;
    color: #6a7ea2;
    font-size: 0.8rem;
    line-height: 1.5;
}

.mk-sheet-view {
    display: none;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.mk-sheet-view.is-active {
    display: grid;
}

.mk-inline-hero {
    display: grid;
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}

.mk-inline-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mk-illustration {
    width: 100%;
    max-width: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mk-illustration-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 320px;
    object-fit: contain;
}

.mk-inline-copy {
    max-width: 620px;
}

.mk-inline-hello {
    margin: 0 0 0.65rem;
    color: #22375f;
    font-size: 0.98rem;
}

.mk-inline-title {
    margin: 0 0 1rem;
    color: #0f1e48;
    font-size: clamp(1.9rem, 3vw, 2.9rem);
    line-height: 1.22;
    letter-spacing: -0.04em;
}

.mk-inline-title span {
    color: #0045f8;
}

.mk-inline-list {
    margin: 0 0 1.45rem;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.65rem;
    color: #42597e;
    font-size: 0.93rem;
    line-height: 1.6;
}

.mk-inline-flow {
    border-top: 1px solid #e5edff;
    padding-top: 1.4rem;
}

.mk-inline-flow-title {
    margin: 0 0 0.9rem;
    color: #1b355f;
    font-size: 0.96rem;
    font-weight: 600;
}

.mk-inline-steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.7rem;
    align-items: center;
}

.mk-inline-step {
    min-height: 96px;
    border-radius: 18px;
    background: #f3f7ff;
    border: 1px solid #dfe9ff;
    padding: 0.95rem 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.mk-inline-step strong {
    color: #0f2956;
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
}

.mk-inline-step span {
    color: #4f658a;
    font-size: 0.79rem;
    line-height: 1.5;
}

.mk-inline-arrow {
    color: #4f72c7;
    font-size: 1.1rem;
}

@media (max-width: 1200px) {
    .mk-overview-grid,
    .mk-story-grid {
        grid-template-columns: 1fr;
    }

    .mk-selector-shell {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

@media (max-width: 1024px) {
    .mk-system-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mk-system-card--wide {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .mk-visual-strip,
    .mk-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mk-inline-hero,
    .mk-selector-shell {
        grid-template-columns: 1fr;
    }

    .mk-inline-visual {
        justify-content: flex-start;
    }

    .mk-inline-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mk-inline-arrow {
        display: none;
    }
}

@media (max-width: 768px) {
    .mk-personas,
    .mk-overview,
    .mk-system,
    .mk-usecases,
    .mk-story {
        padding: 3.6rem 0;
    }

    .mk-personas-grid,
    .mk-system-grid,
    .mk-visual-strip,
    .mk-metrics,
    .mk-team-grid {
        grid-template-columns: 1fr;
    }

    .mk-overview-panel,
    .mk-story-card,
    .mk-team-card {
        padding: 1.2rem;
    }

    .mk-selector-stage {
        min-height: auto;
        padding: 1rem;
    }

    .mk-inline-title {
        font-size: 1.9rem;
    }

    .mk-inline-steps {
        grid-template-columns: 1fr;
    }

    .mk-illustration {
        max-width: 220px;
    }
}
