:root {
    --color-primary: #663399;
    --color-secondary: #9370db;
    --color-accent: #ff1493;
    --color-bg: #faf8fd;
    --color-text: #2a2038;
    --color-text-light: #5c4d72;
    --color-border: #e4d8f2;
    --msm-header-h: 88px;
    --msm-page-w: 1120px;
    --space-lg: 24px;
    --font-heading: "Lexend", sans-serif;
    --font-body: "IBM Plex Sans", sans-serif;
}

@media (max-width: 768px) {
    :root { --msm-header-h: 72px; }
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

html { scroll-padding-top: var(--msm-header-h); }

body {
    padding-top: var(--msm-header-h);
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(102, 51, 153, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 51, 153, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
}

main { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; }

h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--color-primary);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0 0 16px; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin: 0 0 14px; }
h3 { font-size: 1.15rem; margin: 0 0 8px; }

a { color: var(--color-primary); }
a:hover { color: var(--color-accent); }

p { margin: 0 0 14px; }

.msm-container {
    max-width: var(--msm-page-w);
    margin: 0 auto;
    padding: 0 20px;
}

.msm-measure {
    max-width: 760px;
}

.msm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .msm-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .msm-grid { grid-template-columns: 1fr; }
}

.msm-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: var(--msm-header-h);
    background: #faf8fd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.msm-header a,
.msm-header a:visited { color: #663399; }

.msm-header__row {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--msm-header-h);
}

.msm-header__logo { flex: 0 0 auto; line-height: 0; }

.msm-header__logo img {
    width: 180px;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .msm-header__logo img { width: 120px; }
}

.msm-nav {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.msm-nav a {
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
}

.msm-nav a.is-active { color: #ff1493; }

.msm-header__cta { flex: 0 0 auto; }

.msm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #663399;
    background: transparent;
    color: #663399;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
}

.msm-btn:hover { color: #ff1493; border-color: #ff1493; }

[data-msm-btn="primary"],
.msm-btn--primary {
    border-color: #ff1493;
    color: #4a1468;
    font-weight: 600;
}

.msm-burger,
.msm-overlay,
.msm-drawer { display: none; }

.msm-burger {
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid #663399;
    background: #faf8fd;
    border-radius: 8px;
    padding: 10px;
}

.msm-burger span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #663399;
}

@media (max-width: 1100px) {
    .msm-nav { display: none; }
    .msm-header__cta { display: none; }
    .msm-burger { display: block; }

    .msm-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s, visibility .25s;
    }

    .msm-drawer {
        display: block;
        position: fixed;
        z-index: 210;
        background: #faf8fd;
        overflow-y: auto;
        visibility: hidden;
        transition: transform .3s ease, opacity .3s ease, visibility .3s;
    }

    .msm-drawer a {
        display: block;
        padding: 14px 20px;
        color: #663399;
        text-decoration: none;
    }

    .msm-drawer__close {
        position: absolute;
        top: 12px;
        right: 16px;
        width: 44px;
        height: 44px;
        border: 1px solid #663399;
        background: #faf8fd;
        color: #663399;
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
    }

    .msm-drawer--wide {
        top: 0;
        right: 0;
        height: 100vh;
        height: 100dvh;
        width: min(85vw, 400px);
        padding: 72px 0 24px;
        transform: translateX(100%);
    }

    body.nav-open { overflow: hidden; }
    body.nav-open .msm-overlay { opacity: 1; visibility: visible; }
    body.nav-open .msm-drawer { visibility: visible; }
    body.nav-open .msm-drawer--wide { transform: translateX(0); }
}

.msm-hero {
    background: linear-gradient(180deg, #f3e9ff 0%, #faf8fd 100%);
    padding: 36px 0 28px;
}

.msm-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.msm-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.msm-facts li {
    border: 1px solid #9370db;
    border-radius: 20px;
    padding: 8px 12px;
    background: #fff;
}

.msm-section { padding: 36px 0; }

.msm-section--bleed {
    background: #f3e9ff;
}

.msm-grid [data-msm-card] {
    animation: msm-scale-in .45s ease both, msm-glow 2.8s ease-in-out 0.45s infinite;
}

@keyframes msm-scale-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

[data-msm-card] {
    background: #fff;
    border-radius: 20px;
    padding: 18px;
    border: 1px solid transparent;
    animation: msm-glow 2.8s ease-in-out infinite;
}

@keyframes msm-glow {
    0%, 100% { box-shadow: 0 0 0 1px #9370db, 0 0 12px rgba(255, 20, 147, 0.28); }
    50% { box-shadow: 0 0 0 1px #ff1493, 0 0 20px rgba(102, 51, 153, 0.35); }
}

.msm-spec {
    list-style: none;
    margin: 0 0 20px;
    padding: 8px 28px;
}

.msm-spec li {
    display: grid;
    grid-template-columns: minmax(9rem, 14rem) 1fr;
    gap: 20px;
    align-items: center;
    padding: 16px 4px;
    border-bottom: 1px solid var(--color-border);
}

.msm-spec li:last-child {
    border-bottom: 0;
}

.msm-spec span { font-weight: 600; color: var(--color-primary); }

@media (max-width: 640px) {
    .msm-spec li { grid-template-columns: 1fr; gap: 2px; }
}

.msm-app__badges {
    letter-spacing: 0.04em;
    font-size: 0.78rem;
    color: var(--color-text-light);
}

.msm-app__head {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.msm-app__icon {
    width: 96px;
    height: 96px;
    border-radius: 22%;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
}

.msm-app__name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: 0;
    color: var(--color-primary);
}

.msm-app__facts { padding-left: 18px; }
.msm-app__checked { font-weight: 600; }

.msm-still {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 12px 0 18px;
    border-radius: 20px;
}

.msm-cta {
    padding: 28px 0 48px;
    background: linear-gradient(180deg, #faf8fd 0%, #f3e9ff 100%);
}

.msm-footer {
    position: relative;
    z-index: 1;
    background: #f3e9ff;
    padding: 32px 0 24px;
    border-top: 1px solid var(--color-border);
}

.msm-footer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.msm-footer__label {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: 8px;
}

.msm-footer ul { list-style: none; padding: 0; margin: 0; }
.msm-footer li { margin: 0 0 6px; }
.msm-footer a:not(.msm-btn) { text-decoration: none; }

.msm-footer__link {
    background: none;
    border: 0;
    padding: 0;
    color: #663399;
    font: inherit;
    cursor: pointer;
    min-height: 44px;
}

.msm-footer__legal {
    margin-top: 20px;
    color: var(--color-text-light);
    font-size: 0.92rem;
}

@media (max-width: 768px) {
    .msm-footer__grid { grid-template-columns: 1fr; }
    .msm-app__icon { width: 72px; height: 72px; }
}

.msm-cookie { display: none; }

.msm-cookie:not([hidden]) {
    display: flex;
    position: fixed;
    z-index: 110;
    gap: 12px;
    align-items: center;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    border-radius: 999px;
    background: #fff;
    border: 1px solid #9370db;
    padding: 10px 14px 10px 18px;
    box-shadow: 0 8px 24px rgba(102, 51, 153, 0.16);
}

.msm-cookie p { margin: 0; }

.msm-cookie__actions { display: flex; gap: 8px; }

@media (max-width: 768px) {
    .msm-cookie:not([hidden]) {
        left: 12px;
        right: 12px;
        transform: none;
        max-width: none;
        border-radius: 20px;
        flex-wrap: wrap;
    }
    .msm-cookie .msm-btn { min-height: 44px; }
}

.msm-steps { padding-left: 18px; }
.msm-steps li { margin: 0 0 10px; }

.msm-crumbs { font-size: 0.9rem; color: var(--color-text-light); }

.msm-note__band {
    margin: -18px -18px 12px;
    padding: 10px 18px;
    border-radius: 20px 20px 0 0;
    color: #fff;
    font-family: var(--font-heading);
}

[data-msm-band="a"] { background: #663399; }
[data-msm-band="b"] { background: #9370db; }
[data-msm-band="c"] { background: #ff1493; }

[data-msm-faq-q] {
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #9370db;
    border-radius: 20px;
    padding: 12px 16px;
    min-height: 44px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: #663399;
    cursor: pointer;
}

[data-msm-faq] h2 { margin: 0 0 8px; }
[data-msm-faq-a] { padding: 0 8px 12px; }

[data-msm-form="contact"] label {
    display: block;
    margin: 12px 0 4px;
    font-weight: 600;
}

[data-msm-form="contact"] input,
[data-msm-form="contact"] textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid #9370db;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
    color: var(--color-text);
}

[data-msm-form="contact"] button { margin-top: 14px; }

code {
    font-family: ui-monospace, monospace;
    font-size: 0.92em;
}
