.ms-magnt-body {
    --ms-bg: #f7f5f8;
    --ms-surface: #ffffff;
    --ms-text: #21242b;
    --ms-muted: #667085;
    --ms-border: #d7dbe4;
    --ms-accent: #7b2cff;
    --ms-accent-soft: #eadbff;
    --ms-accent-2: #ff0f7b;
    --ms-green: #16c469;
    background: var(--ms-bg);
    color: var(--ms-text);
}

.ms-magnt-body,
.ms-magnt-body .editor-styles-wrapper,
.ms-magnt-body .block-editor-block-list__layout {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ms-site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(33,36,43,.08);
}

.ms-site-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 30px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
}

.ms-site-header__brand a {
    font-weight: 800;
    letter-spacing: -.03em;
    font-size: 32px;
    text-decoration: none;
    background: linear-gradient(90deg, #8b4dff 0%, #ff0f7b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ms-site-header__menu,
.ms-site-header__actions {
    display: flex;
    align-items: center;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ms-site-header__menu a,
.ms-site-header__actions a {
    color: #444d5d;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
}

.ms-site-header__actions .ms-header-cta,
.ms-primary-button .wp-block-button__link,
.ms-inline-cta .wp-block-button__link {
    border-radius: 999px;
    padding: 13px 22px;
    background: #1f2330;
    color: #fff;
    font-weight: 700;
    border: 0;
}

.ms-site-header__actions .ms-header-cta:hover,
.ms-primary-button .wp-block-button__link:hover,
.ms-inline-cta .wp-block-button__link:hover {
    opacity: .92;
}

.ms-magnt-page {
    min-height: 100vh;
}

.ms-magnt-hero {
    padding: 72px 20px 34px;
}

.ms-magnt-hero__inner,
.ms-magnt-content {
    max-width: 1080px;
    margin: 0 auto;
}

.ms-magnt-badge-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.ms-magnt-badge,
.ms-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(123,44,255,.11);
    color: var(--ms-accent);
    font-size: 15px;
    font-weight: 600;
}

.ms-magnt-title {
    margin: 0 auto 26px;
    max-width: 980px;
    text-align: center;
    font-size: clamp(44px, 7vw, 84px);
    line-height: .98;
    letter-spacing: -.05em;
    font-weight: 800;
    background: linear-gradient(90deg, #8b35ff 0%, #ff0f7b 45%, #8c2cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ms-magnt-subtitle {
    margin: 0 auto 16px;
    max-width: 930px;
    text-align: center;
    color: #5b6880;
    font-size: clamp(22px, 2.5vw, 28px);
    line-height: 1.35;
}

.ms-magnt-description {
    margin: 0 auto 30px;
    max-width: 840px;
    text-align: center;
    color: var(--ms-muted);
    font-size: 19px;
    line-height: 1.65;
}

.ms-magnt-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    color: #626d80;
    font-size: 16px;
}

.ms-magnt-meta__author {
    color: var(--ms-accent);
}

.ms-magnt-content-wrap {
    padding: 8px 20px 80px;
}

.ms-magnt-content {
    font-size: 20px;
    line-height: 1.8;
}

.ms-magnt-content > * {
    margin-top: 0;
    margin-bottom: 26px;
}

.ms-magnt-content p,
.ms-magnt-content li {
    color: #3c475c;
}

.ms-magnt-content h2,
.ms-magnt-content h3,
.ms-magnt-content h4 {
    color: #1f2430;
    letter-spacing: -.04em;
    line-height: 1.1;
}

.ms-magnt-content h2,
.ms-section-heading {
    font-size: clamp(34px, 4vw, 52px);
    margin-bottom: 24px;
}

.ms-magnt-content h3 {
    font-size: clamp(28px, 3vw, 38px);
}

.ms-magnt-content h4 {
    font-size: clamp(24px, 2.3vw, 30px);
}

.ms-editorial-intro {
    font-size: 22px;
    line-height: 1.9;
    color: #3d4658;
}

.ms-icon-heading {
    position: relative;
    padding-left: 46px;
}

.ms-icon-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: .18em;
    width: 28px;
    height: 28px;
    background: linear-gradient(180deg, #8c35ff 0%, #c32cff 100%);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.ms-three-cards-section {
    margin: 54px 0;
}

.ms-three-cards-grid {
    gap: 20px;
}

.ms-story-card {
    height: 100%;
    min-height: 230px;
    padding: 30px 22px;
    background: rgba(255,255,255,.76);
    border: 1px solid #d6dbe5;
    border-left: 4px solid #8c35ff;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(31,35,48,.05);
}

.ms-story-card h3 {
    margin-bottom: 12px;
}

.ms-story-card p {
    margin: 0;
    color: var(--ms-muted);
    font-size: 19px;
    line-height: 1.6;
}

.ms-brand-card {
    margin: 38px 0;
    padding: 26px 26px 28px;
    background: rgba(255,255,255,.7);
    border: 1px solid #d7dbe4;
    border-radius: 20px;
    box-shadow: 0 6px 24px rgba(31,35,48,.04);
}

.ms-brand-card__top {
    gap: 20px;
    align-items: flex-start;
}

.ms-brand-card__identity {
    gap: 16px;
}

.ms-brand-card__logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 12px;
    background: #efe6ff;
    padding: 6px;
}

.ms-brand-card__title {
    margin: 0 0 4px;
    font-size: 40px;
}

.ms-brand-card__subtitle {
    margin: 0;
    font-size: 18px;
    color: #5f6a80;
}

.ms-brand-card__actions {
    align-items: flex-end;
    gap: 14px;
}

.ms-brand-card__divider {
    margin: 26px -26px 26px;
    border-color: #d7dbe4;
}

.ms-brand-card__section-title {
    position: relative;
    margin-top: 0;
    padding-left: 28px;
}

.ms-brand-card__section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .3em;
    width: 18px;
    height: 18px;
    border-radius: 99px;
    background: linear-gradient(180deg, #8c35ff 0%, #c32cff 100%);
}

.ms-works-title::before {
    background: #16c469;
}

.ms-check-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ms-check-list li {
    position: relative;
    padding-left: 30px;
    margin: 0 0 10px;
}

.ms-check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 99px;
    color: var(--ms-green);
    font-weight: 800;
}

.ms-key-takeaway {
    margin-top: 24px;
    padding: 22px 22px 12px;
    border: 1px solid #d9ccfb;
    border-radius: 16px;
    background: #f6f2fb;
}

.ms-key-takeaway h4 {
    margin: 0 0 10px;
    color: #302e52;
}

.ms-cta-banner {
    margin: 48px 0;
    padding: 28px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(123,44,255,.08) 0%, rgba(255,15,123,.08) 100%);
    border: 1px solid #d8d7ee;
}

.ms-cta-banner h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.ms-faq-section {
    margin: 48px 0;
}

.ms-faq-item {
    margin-bottom: 14px;
    padding: 18px 20px;
    background: rgba(255,255,255,.72);
    border: 1px solid #d7dbe4;
    border-radius: 16px;
}

.ms-faq-item summary {
    cursor: pointer;
    font-size: 22px;
    font-weight: 700;
    color: #1f2430;
}

.ms-author-box {
    margin: 48px 0;
    padding: 22px;
    background: rgba(255,255,255,.78);
    border: 1px solid #d7dbe4;
    border-radius: 18px;
}

.ms-author-avatar img {
    border-radius: 999px;
    border: 2px solid #e2d7ff;
}

@media (max-width: 1100px) {
    .ms-site-header__inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 14px;
    }

    .ms-site-header__menu,
    .ms-site-header__actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 782px) {
    .ms-magnt-hero {
        padding-top: 42px;
    }

    .ms-magnt-title {
        max-width: 100%;
        font-size: clamp(40px, 14vw, 62px);
    }

    .ms-magnt-subtitle {
        font-size: 22px;
    }

    .ms-magnt-description,
    .ms-magnt-content,
    .ms-story-card p,
    .ms-editorial-intro {
        font-size: 18px;
        line-height: 1.7;
    }

    .ms-brand-card {
        padding: 20px;
    }

    .ms-brand-card__divider {
        margin-left: -20px;
        margin-right: -20px;
    }

    .ms-brand-card__title {
        font-size: 32px;
    }

    .ms-brand-card__actions {
        width: 100%;
        align-items: flex-start;
    }

    .ms-cta-banner,
    .ms-author-box,
    .ms-key-takeaway,
    .ms-story-card,
    .ms-faq-item {
        border-radius: 16px;
    }

    .ms-site-header__inner {
        padding: 18px 16px;
    }

    .ms-site-header__nav--primary {
        display: none;
    }

    .ms-site-header__actions {
        width: 100%;
        justify-content: space-between;
    }
}

.ms-mobile-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
}
.ms-mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 3px;
    background: #2b2f38;
}
.ms-mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 120;
    pointer-events: none;
}
.ms-mobile-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(31,35,48,.16);
    opacity: 0;
    transition: opacity .24s ease;
}
.ms-mobile-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(92vw, 420px);
    height: 100%;
    background: #fff;
    box-shadow: -20px 0 50px rgba(31,35,48,.12);
    transform: translateX(100%);
    transition: transform .28s ease;
    padding: 22px 30px 28px;
    overflow-y: auto;
}
.ms-mobile-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(33,36,43,.08);
    margin-bottom: 24px;
}
.ms-mobile-drawer__close {
    border: 0;
    background: transparent;
    color: #2b2f38;
    width: 42px;
    height: 42px;
    font-size: 36px;
    line-height: 1;
    padding: 0;
}
.ms-mobile-drawer__menu,
.ms-mobile-drawer__actions {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ms-mobile-drawer__menu > li,
.ms-mobile-drawer__actions > li {
    border-bottom: 1px solid rgba(33,36,43,.08);
}
.ms-mobile-drawer__menu a,
.ms-mobile-drawer__actions a {
    display: block;
    padding: 24px 0;
    color: #3a3f49;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
}
.ms-mobile-drawer__actions {
    margin-top: 10px;
}
.ms-mobile-drawer__actions .ms-header-cta {
    display: inline-flex;
    margin-top: 18px;
}
.ms-has-toggle {
    position: relative;
}
.ms-submenu-toggle {
    position: absolute;
    right: 0;
    top: 13px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    padding: 0;
}
.ms-submenu-toggle span,
.ms-submenu-toggle span::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 2px;
    background: #2f3440;
    transform: translate(-50%,-50%);
}
.ms-submenu-toggle span::before {
    transform: translate(-50%,-50%) rotate(90deg);
}
.ms-has-toggle.is-open .ms-submenu-toggle span::before {
    opacity: 0;
}
.ms-mobile-drawer .sub-menu {
    list-style: none;
    margin: 0 0 12px;
    padding: 0 0 0 16px;
    display: none;
}
.ms-mobile-drawer .sub-menu a {
    padding: 0 0 18px;
    font-size: 16px;
    font-weight: 500;
    color: #5a6476;
}
.ms-has-toggle.is-open > .sub-menu {
    display: block;
}
.ms-menu-open {
    overflow: hidden;
}
.ms-menu-open .ms-mobile-drawer {
    pointer-events: auto;
}
.ms-menu-open .ms-mobile-drawer__overlay {
    opacity: 1;
}
.ms-menu-open .ms-mobile-drawer__panel {
    transform: translateX(0);
}

@media (max-width: 782px) {
    .ms-mobile-toggle {
        display: inline-flex;
        justify-self: end;
    }
    .ms-site-header__inner {
        grid-template-columns: 1fr auto;
        justify-items: stretch;
        text-align: left;
        gap: 10px;
    }
    .ms-site-header__nav--secondary,
    .ms-site-header__nav--primary {
        display: none;
    }
    .ms-site-header__brand a {
        font-size: 20px;
    }
}



/* ===== Desktop dropdown menu fix ===== */
.ms-site-header__nav--primary{
    min-width:0;
}

.ms-site-header__menu{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex-wrap:nowrap;
    gap:26px;
    position:relative;
}

.ms-site-header__menu > li{
    position:relative;
    list-style:none;
    margin:0;
    padding:0;
}

.ms-site-header__menu > li > a{
    display:inline-flex;
    align-items:center;
    min-height:44px;
    white-space:nowrap;
}

.ms-site-header__menu > li > .sub-menu{
    position:absolute;
    top:100%;
    left:0;
    display:block;
    min-width:320px;
    max-width:420px;
    margin:10px 0 0;
    padding:14px 0;
    list-style:none;
    background:#fff;
    border:1px solid rgba(33,36,43,.08);
    border-radius:18px;
    box-shadow:0 20px 40px rgba(31,35,48,.12);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(8px);
    transition:opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index:100;
}

.ms-site-header__menu > li:hover > .sub-menu,
.ms-site-header__menu > li:focus-within > .sub-menu{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0);
}

.ms-site-header__menu .sub-menu li{
    display:block;
    margin:0;
    padding:0;
}

.ms-site-header__menu .sub-menu a{
    display:block;
    padding:10px 18px;
    color:#444d5d;
    font-size:15px;
    font-weight:500;
    line-height:1.45;
    text-decoration:none;
    white-space:normal;
}

.ms-site-header__menu .sub-menu a:hover,
.ms-site-header__menu .sub-menu a:focus{
    background:rgba(123,44,255,.06);
    color:var(--ms-accent);
    outline:none;
}

.ms-site-header__menu > li.menu-item-has-children > a::after{
    content:"";
    width:8px;
    height:8px;
    margin-left:8px;
    border-right:1.6px solid currentColor;
    border-bottom:1.6px solid currentColor;
    transform:rotate(45deg) translateY(-1px);
    opacity:.75;
}

@media (max-width: 782px){
    .ms-site-header__menu > li > .sub-menu{
        position:static;
        min-width:0;
        max-width:none;
        margin:0;
        padding:0;
        border:0;
        border-radius:0;
        box-shadow:none;
        opacity:1;
        visibility:visible;
        pointer-events:auto;
        transform:none;
        background:transparent;
    }
}



/* ===== Desktop dropdown hard fix ===== */
@media (min-width: 783px){
    .ms-site-header__nav--primary .ms-site-header__menu,
    .ms-site-header__nav--primary .ms-site-header__menu > li{
        overflow: visible;
    }

    .ms-site-header__nav--primary .ms-site-header__menu > li{
        position: relative;
    }

    .ms-site-header__nav--primary .sub-menu{
        display: none !important;
        position: absolute !important;
        top: calc(100% + 10px) !important;
        left: 0 !important;
        min-width: 320px !important;
        max-width: 420px !important;
        margin: 0 !important;
        padding: 14px 0 !important;
        list-style: none !important;
        background: #fff !important;
        border: 1px solid rgba(33,36,43,.08) !important;
        border-radius: 18px !important;
        box-shadow: 0 20px 40px rgba(31,35,48,.12) !important;
        z-index: 999 !important;
    }

    .ms-site-header__nav--primary .ms-site-header__menu > li:hover > .sub-menu,
    .ms-site-header__nav--primary .ms-site-header__menu > li:focus-within > .sub-menu{
        display: block !important;
    }

    .ms-site-header__nav--primary .sub-menu li{
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .ms-site-header__nav--primary .sub-menu a{
        display: block !important;
        width: 100% !important;
        padding: 10px 18px !important;
        white-space: normal !important;
        text-decoration: none !important;
    }
}
