:root {
    --color-primary: #8e44ad;
    --color-secondary: #9b59b6;
    --color-accent: #e91e63;
    --color-bg: #faf8fd;
    --color-text: #2a1038;
    --color-text-light: #5c4a68;
    --color-border: #e4d7ef;
    --mky-header-h: 84px;
    --mky-page-w: 1120px;
    --space-lg: 24px;
    --mky-font-h: "Rubik", "Arial Black", sans-serif;
    --mky-font-b: "Mulish", "Segoe UI", sans-serif;
}

@media (max-width: 1100px) {
    :root { --mky-header-h: 64px; }
}

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

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

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

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

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle at 12px 12px, rgba(142, 68, 173, 0.07) 2px, transparent 2.5px);
    background-size: 28px 28px;
}

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

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

h1, h2, h3 {
    font-family: var(--mky-font-h);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0 0 0.8rem; }

[hidden] { display: none !important; }

.mky-container {
    width: min(var(--mky-page-w), 100%);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.mky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: var(--mky-header-h);
    background: #faf8fd;
    box-shadow: 0 2px 8px rgba(42, 16, 56, 0.12);
    border-bottom: 4px solid #2a1038;
}

.mky-header a,
.mky-header a:visited { color: #8e44ad; }

.mky-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--mky-header-h);
    position: relative;
    gap: 12px;
}

.mky-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    line-height: 0;
}

.mky-logo img {
    width: 180px;
    height: auto;
    display: block;
}

.mky-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    font-family: var(--mky-font-h);
    font-weight: 700;
    font-size: 0.92rem;
}

.mky-nav-left { justify-content: flex-start; padding-right: 110px; }
.mky-nav-right { justify-content: flex-end; padding-left: 110px; }

.mky-nav a {
    text-decoration: none;
    padding: 6px 2px;
    border-bottom: 3px solid transparent;
}

.mky-nav a.is-active { border-bottom-color: var(--color-accent); color: var(--color-accent); }

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

.mky-burger {
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 3px solid #2a1038;
    border-radius: 12px;
    background: #fff;
    padding: 10px 8px;
    cursor: pointer;
}

.mky-burger span {
    display: block;
    height: 3px;
    margin: 4px 0;
    background: #2a1038;
    border-radius: 2px;
}

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

.mky-bleed {
    background: linear-gradient(180deg, #efe4f8 0%, #faf8fd 100%);
    border-bottom: 4px solid #2a1038;
}

.mky-hero { padding: 48px 0 36px; }

.mky-hero-inner { text-align: center; }

.mky-kicker {
    font-family: var(--mky-font-h);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin: 0 0 8px;
}

.mky-lead { color: var(--color-text-light); max-width: 46rem; }
.mky-hero-inner .mky-lead { margin: 0 auto 1.2rem; }

.mky-hero-actions, .mky-rank-actions, .mky-cta p { display: flex; flex-wrap: wrap; gap: 12px; }
.mky-hero-actions { justify-content: center; }

.mky-hero-still { margin: 28px auto 0; }
.mky-hero-still figcaption { color: var(--color-text-light); font-size: 0.9rem; }

.mky-section { padding: 56px 0; }

.mky-prose { max-width: 760px; }
.mky-hero .mky-prose, .mky-cta .mky-prose { max-width: none; }
.mky-section .mky-prose { margin: 0 auto; }

.mky-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: rgba(155, 89, 182, 0.22);
    color: #4a1468;
    font-family: var(--mky-font-h);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 0 rgba(42, 16, 56, 0.12);
}

.mky-btn-primary {
    background: rgba(233, 30, 99, 0.82);
    color: #fff;
    border-color: #2a1038;
}

.mky-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 18px rgba(142, 68, 173, 0.28);
}

.mky-rank-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "pos icon name"
        "pos icon dev"
        "pos icon desc"
        "pos icon facts"
        "pos icon actions"
        "still still still";
    gap: 8px 16px;
    align-items: start;
    background: #fff;
    border: 4px solid #2a1038;
    border-radius: 12px;
    padding: 20px;
    margin: 0 0 22px;
    box-shadow: 0 10px 0 rgba(142, 68, 173, 0.18);
    animation: mky-rise 0.45s ease both;
}

.mky-rank-item:nth-child(3) { animation-delay: 0.08s; }
.mky-rank-item:nth-child(4) { animation-delay: 0.16s; }

.mky-rank-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 28px rgba(142, 68, 173, 0.28);
}

.mky-rank-pos { grid-area: pos; font-family: var(--mky-font-h); font-weight: 800; color: var(--color-accent); margin: 8px 0 0; }
.mky-rank-name { grid-area: name; margin: 0; }
.mky-rank-dev { grid-area: dev; margin: 0; color: var(--color-text-light); }
.mky-rank-desc { grid-area: desc; margin: 0; }
.mky-rank-facts { grid-area: facts; margin: 0; font-size: 0.95rem; }
.mky-rank-actions { grid-area: actions; }
.mky-rank-item .mky-app-icon { grid-area: icon; }
.mky-rank-item .mky-app-preview { grid-area: still; justify-self: end; }

.mky-app-icon {
    width: 96px;
    height: 96px;
    border-radius: 22%;
    object-fit: contain;
    background: #fff;
    border: 3px solid #2a1038;
}

.mky-app-preview {
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 240px;
    object-fit: contain;
    border-radius: 12px;
    border: 3px solid #2a1038;
    background: #fff;
}

.mky-review .mky-app-preview {
    max-width: 280px;
    max-height: 280px;
}

.mky-passed { list-style: none; padding: 0; margin: 0; }
.mky-passed li {
    background: #fff;
    border-radius: 12px;
    border: 3px solid #2a1038;
    padding: 16px 18px;
    margin: 0 0 12px;
    box-shadow: 0 8px 0 rgba(142, 68, 173, 0.14);
}
.mky-passed strong { display: block; font-family: var(--mky-font-h); }

.mky-table-wrap { overflow-x: auto; }
.mky-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 4px solid #2a1038;
    border-radius: 12px;
    min-width: 720px;
}
.mky-table th, .mky-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 2px solid var(--color-border);
}
.mky-table th { font-family: var(--mky-font-h); background: #efe4f8; }
.mky-table caption { caption-side: bottom; padding: 10px; color: var(--color-text-light); text-align: left; }

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

.mky-band {
    background: #fff;
    border: 4px solid #2a1038;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 0 rgba(142, 68, 173, 0.16);
}
.mky-band-top {
    margin: 0;
    padding: 14px 16px;
    background: linear-gradient(90deg, #8e44ad, #e91e63);
    color: #fff;
    font-family: var(--mky-font-h);
    font-weight: 800;
}
.mky-band-alt .mky-band-top { background: linear-gradient(90deg, #9b59b6, #8e44ad); }
.mky-band h2 { font-size: 1.25rem; margin: 14px 16px 8px; }
.mky-band p { margin: 0 16px 16px; }
.mky-band a { color: inherit; }

.mky-form { display: grid; gap: 12px; max-width: 520px; }
.mky-form label { display: grid; gap: 6px; font-weight: 700; }
.mky-form input, .mky-form textarea {
    font: inherit;
    padding: 10px 12px;
    border-radius: 12px;
    border: 3px solid #2a1038;
    background: #fff;
}
.mky-form-note { margin: 0; }

.mky-footer {
    background: #2a1038;
    color: #faf8fd;
    padding: 36px 0;
    position: relative;
    z-index: 1;
}
.mky-footer a, .mky-footer-link { color: #f3c1d6; }
.mky-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
}
.mky-footer ul { list-style: none; padding: 0; margin: 0; }
.mky-footer li { margin: 0 0 8px; }
.mky-footer-label { font-family: var(--mky-font-h); font-weight: 800; margin: 0 0 8px; }
.mky-footer-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}
.mky-fine { font-size: 0.92rem; color: #e7d6f2; }

.mky-cookie { display: none; }
.mky-cookie:not([hidden]) {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 110;
    gap: 12px;
    right: 16px;
    bottom: 16px;
    max-width: 360px;
    padding: 16px;
    background: #fff;
    color: var(--color-text);
    border: 4px solid #2a1038;
    border-radius: 12px;
    box-shadow: 0 12px 0 rgba(142, 68, 173, 0.2);
}
.mky-cookie-actions { display: flex; gap: 8px; }
.mky-cookie-actions .mky-btn { flex: 1; }

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

@keyframes mky-rise {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
    .mky-nav { display: none; }
    .mky-header-row { justify-content: space-between; }
    .mky-logo { position: static; transform: none; }
    .mky-burger { display: block; }

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

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

    .mky-drawer a {
        display: block;
        padding: 14px 20px;
        font-family: var(--mky-font-h);
        font-weight: 700;
        font-size: 1.4rem;
        color: #8e44ad;
        text-decoration: none;
    }

    .mky-drawer-close {
        position: absolute;
        top: 12px;
        right: 16px;
        width: 44px;
        height: 44px;
        border: 3px solid #2a1038;
        border-radius: 12px;
        background: #fff;
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
    }

    .mky-drawer-sheet {
        inset: 0;
        height: 100vh;
        height: 100dvh;
        padding: 72px 24px 32px;
        opacity: 0;
    }

    body.mky-nav-open { overflow: hidden; }
    body.mky-nav-open .mky-drawer-sheet { opacity: 1; visibility: visible; }
    body.mky-nav-open .mky-overlay { display: none; }
}

@media (max-width: 768px) {
    .mky-logo img { width: 120px; }
    .mky-rank-item .mky-app-preview {
        display: block;
        margin: 16px auto 0;
        justify-self: center;
    }
    .mky-rank-item {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "pos pos"
            "icon name"
            "icon dev"
            "desc desc"
            "facts facts"
            "actions actions"
            "still still";
    }
    .mky-footer-grid { grid-template-columns: 1fr; }
    .mky-grid { grid-template-columns: repeat(2, 1fr); }
    .mky-cookie:not([hidden]) { left: 12px; right: 12px; max-width: none; }
}

@media (max-width: 480px) {
    .mky-grid { grid-template-columns: 1fr; }
    .mky-app-icon { width: 72px; height: 72px; }
}
