.mf-page,
.mf-game {
    color: var(--mf-body-text);
    font-family: inherit;
}

.mf-header {
    color: var(--mf-header-text);
    font-family: inherit;
}

.mf-footer {
    color: var(--mf-footer-text);
    font-family: inherit;
}

.mf-container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.mf-section {
    padding: 72px 0;
    background: var(--mf-bg);
}

.mf-section-heading {
    max-width: 720px;
    margin: 0 0 28px;
}

.mf-section-heading h1,
.mf-section-heading h2,
.mf-hero h1,
.mf-about h1,
.mf-courses h1,
.mf-news h1,
.mf-contacts h1 {
    margin: 0 0 14px;
    color: var(--mf-dark);
    line-height: 1.08;
    letter-spacing: 0;
}

.mf-hero h1 {
    font-size: clamp(40px, 7vw, 76px);
}

.mf-section-heading h1,
.mf-about h1,
.mf-courses h1,
.mf-news h1,
.mf-contacts h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.mf-section-heading h2,
.mf-game h2,
.mf-cta h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.mf-section-heading p,
.mf-muted,
.mf-hero-subtitle,
.mf-contact-info p {
    color: var(--mf-muted);
}

.mf-rich-text,
.mf-card p {
    color: var(--mf-body-text);
}

.mf-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--mf-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mf-eyebrow::before {
    content: "";
    width: 24px;
    height: 3px;
    border-radius: 8px;
    background: var(--mf-secondary);
}

.mf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--mf-button);
    color: var(--mf-card);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.mf-btn:hover,
.mf-btn:focus {
    background: var(--mf-button-hover);
    color: var(--mf-card);
    transform: translateY(-1px);
}

.mf-btn-secondary {
    background: color-mix(in srgb, var(--mf-primary) 10%, var(--mf-card));
    color: var(--mf-primary);
    box-shadow: none;
}

.mf-btn-secondary:hover,
.mf-btn-secondary:focus {
    background: color-mix(in srgb, var(--mf-primary) 16%, var(--mf-card));
    color: var(--mf-primary);
}

.mf-btn-small {
    min-height: 38px;
    padding: 9px 14px;
    font-size: 14px;
}

.mf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.mf-header {
    position: relative;
    z-index: 50;
    background: var(--mf-header-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mf-header-sticky {
    position: sticky;
    top: 0;
}

.mf-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    min-height: 74px;
    margin: 0 auto;
}

.mf-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--mf-header-text);
    text-decoration: none;
}

.mf-brand-logo {
    width: var(--mf-header-logo-size, 48px);
    height: var(--mf-header-logo-size, 48px);
    object-fit: contain;
}

.mf-footer-logo {
    width: var(--mf-footer-logo-size, 56px);
    height: var(--mf-footer-logo-size, 56px);
    object-fit: contain;
}

.mf-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--mf-header-logo-size, 48px);
    height: var(--mf-header-logo-size, 48px);
    border-radius: 8px;
    background: var(--mf-primary);
    color: var(--mf-card);
    font-weight: 800;
}

.mf-brand-text {
    display: grid;
    line-height: 1.15;
}

.mf-brand-text strong {
    font-size: 18px;
}

.mf-brand-text small {
    color: color-mix(in srgb, var(--mf-header-text) 72%, transparent);
    font-size: 12px;
}

.mf-nav {
    display: flex;
    justify-content: center;
    gap: 18px;
}

.mf-nav a,
.mf-footer a,
.mf-link,
.mf-contact-list a {
    color: inherit;
    text-decoration: none;
}

.mf-nav a {
    color: var(--mf-header-text);
    font-weight: 650;
}

.mf-nav a:hover,
.mf-footer a:hover,
.mf-link:hover {
    color: var(--mf-primary);
}

.mf-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: var(--mf-card);
    cursor: pointer;
}

.mf-menu-toggle > span:not(.mf-sr-only) {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--mf-header-text);
}

.mf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mf-hero {
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--mf-accent) 24%, transparent), transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--mf-primary) 8%, var(--mf-bg)), var(--mf-bg));
}

.mf-hero-grid,
.mf-about-grid,
.mf-contact-layout,
.mf-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 48px;
    align-items: center;
}

.mf-hero-copy {
    max-width: 720px;
}

.mf-hero-subtitle {
    margin: 0 0 18px;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 800;
    color: var(--mf-primary);
}

.mf-rich-text p {
    margin: 0 0 14px;
}

.mf-hero-media {
    position: relative;
}

.mf-hero-media img,
.mf-about-photo img,
.mf-card-image {
    width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.mf-hero-media img {
    aspect-ratio: 4 / 3;
    background: var(--mf-card);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.mf-hero-note {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: grid;
    gap: 4px;
    max-width: 220px;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--mf-card);
    color: var(--mf-body-text);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}

.mf-hero-note span {
    color: var(--mf-muted);
    font-size: 13px;
}

.mf-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.mf-card {
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: var(--mf-card);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.08);
}

.mf-card:not(.mf-course-card):not(.mf-news-card) {
    padding: 24px;
}

.mf-card h3 {
    margin: 0 0 10px;
    color: var(--mf-dark);
    font-size: 22px;
    line-height: 1.2;
}

.mf-card h3 a {
    color: inherit;
    text-decoration: none;
}

.mf-card h3 a:hover {
    color: var(--mf-primary);
}

.mf-card p {
    margin: 0 0 16px;
}

.mf-card-image-link {
    display: block;
}

.mf-card-image {
    height: 190px;
    border-radius: 0;
}

.mf-card-body {
    padding: 20px;
}

.mf-badge,
.mf-date {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--mf-primary);
    font-size: 13px;
    font-weight: 800;
}

.mf-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--mf-muted);
    font-size: 14px;
}

.mf-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mf-empty-state {
    padding: 24px;
    border: 1px dashed rgba(0, 0, 0, 0.18);
    border-radius: 8px;
    background: color-mix(in srgb, var(--mf-primary) 5%, var(--mf-card));
    color: var(--mf-muted);
}

.mf-split {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 42px;
    align-items: start;
}

.mf-why,
.mf-method {
    background: color-mix(in srgb, var(--mf-accent) 7%, var(--mf-bg));
}

.mf-cta {
    background: var(--mf-dark);
    color: var(--mf-card);
}

.mf-cta h2,
.mf-cta p,
.mf-cta .mf-eyebrow {
    color: var(--mf-card);
}

.mf-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.mf-about-photo img {
    aspect-ratio: 3 / 4;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.14);
}

.mf-form,
.mf-contact-info,
.mf-form-panel {
    padding: 28px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: var(--mf-card);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.09);
}

.mf-form-page {
    display: grid;
    gap: 28px;
}

.mf-form-page-heading {
    max-width: 820px;
}

.mf-form-page-heading h1 {
    margin: 0 0 14px;
    color: var(--mf-dark);
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

.mf-form-page-heading p {
    margin: 0;
    color: var(--mf-muted);
    font-size: 18px;
}

.mf-form-panel {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 28px;
    align-items: start;
}

.mf-form-panel .mf-form {
    padding: 0;
    border: 0;
    box-shadow: none;
}

.mf-form-side h2 {
    margin: 0 0 12px;
    color: var(--mf-dark);
}

.mf-form-side p {
    margin: 0 0 18px;
    color: var(--mf-muted);
}

.mf-mini-steps {
    display: grid;
    gap: 10px;
}

.mf-mini-steps span {
    padding: 12px 14px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--mf-primary) 8%, var(--mf-card));
    color: var(--mf-dark);
    font-weight: 800;
}

.mf-form {
    display: grid;
    gap: 16px;
}

.mf-form label {
    display: grid;
    gap: 7px;
    color: var(--mf-body-text);
    font-weight: 700;
}

.mf-form input,
.mf-form select,
.mf-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 8px;
    background: var(--mf-bg);
    color: var(--mf-body-text);
    font: inherit;
}

.mf-form textarea {
    min-height: 130px;
}

.mf-check {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
    font-weight: 500 !important;
}

.mf-check input {
    width: auto;
    min-height: auto;
}

.mf-form-message {
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
}

.mf-form-message-success {
    background: color-mix(in srgb, var(--mf-accent) 16%, var(--mf-card));
    color: var(--mf-dark);
}

.mf-form-message-error {
    background: color-mix(in srgb, var(--mf-secondary) 18%, var(--mf-card));
    color: var(--mf-dark);
}

.mf-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.mf-contact-list {
    display: grid;
    gap: 10px;
    margin: 22px 0;
    padding: 0;
    list-style: none;
}

.mf-contact-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.mf-contact-card {
    display: grid;
    gap: 8px;
}

.mf-contact-card span {
    color: var(--mf-muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.mf-contact-card strong,
.mf-contact-card a {
    color: var(--mf-dark);
    text-decoration: none;
}

.mf-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mf-social-link,
.mf-link {
    font-weight: 800;
    color: var(--mf-primary);
}

.mf-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--mf-primary) 8%, var(--mf-card));
    text-decoration: none;
}

.mf-social-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: 0 0 auto;
}

.mf-social-link:hover,
.mf-social-link:focus {
    background: color-mix(in srgb, var(--mf-primary) 14%, var(--mf-card));
    color: var(--mf-button-hover);
}

.mf-footer .mf-social-link {
    color: var(--mf-footer-text);
    background: rgba(255, 255, 255, 0.1);
}

.mf-footer .mf-social-link:hover,
.mf-footer .mf-social-link:focus {
    color: var(--mf-footer-text);
    background: rgba(255, 255, 255, 0.18);
}

.mf-map {
    margin-top: 22px;
}

.mf-map iframe {
    width: 100%;
    min-height: 260px;
    border: 0;
    border-radius: 8px;
}

.mf-oembed {
    margin: 14px 0;
}

.mf-oembed iframe {
    max-width: 100%;
}

.mf-footer {
    background: var(--mf-footer-bg);
    color: var(--mf-footer-text);
}

.mf-footer-inner {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 28px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0 34px;
}

.mf-footer h2,
.mf-footer h3 {
    margin: 0 0 12px;
    color: var(--mf-footer-text);
}

.mf-footer p,
.mf-footer li {
    color: color-mix(in srgb, var(--mf-footer-text) 78%, transparent);
}

.mf-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mf-footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: color-mix(in srgb, var(--mf-footer-text) 72%, transparent);
    font-size: 14px;
}

.mf-game {
    display: grid;
    gap: 22px;
}

.mf-game-panel {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: var(--mf-card);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.09);
}

.mf-game-stats,
.mf-game-actions,
.mf-game-answers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.mf-game-stats {
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mf-game-stage {
    position: relative;
    height: 320px;
    overflow: hidden;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--mf-accent) 10%, var(--mf-bg)), var(--mf-bg));
}

.mf-game-placeholder,
.mf-falling-task {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.mf-game-placeholder {
    top: 50%;
    width: min(360px, calc(100% - 32px));
    color: var(--mf-muted);
    text-align: center;
    transform: translate(-50%, -50%);
}

.mf-falling-task {
    top: 0;
    min-width: 180px;
    padding: 18px 22px;
    border-radius: 8px;
    background: var(--mf-primary);
    color: var(--mf-card);
    font-size: 34px;
    font-weight: 900;
    text-align: center;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
    will-change: transform;
}

.mf-game-answers button {
    min-width: 82px;
    min-height: 46px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: color-mix(in srgb, var(--mf-secondary) 22%, var(--mf-card));
    color: var(--mf-dark);
    font-weight: 900;
    cursor: pointer;
}

.mf-game-answers button:hover,
.mf-game-answers button:focus {
    background: color-mix(in srgb, var(--mf-secondary) 34%, var(--mf-card));
}

.mf-game-message {
    min-height: 26px;
    padding: 0 16px 16px;
    color: var(--mf-primary);
    font-weight: 800;
}

.mf-course-single-grid,
.mf-course-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
    gap: 44px;
    align-items: start;
}

.mf-course-hero {
    background:
        radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--mf-secondary) 20%, transparent), transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--mf-primary) 8%, var(--mf-bg)), var(--mf-bg));
}

.mf-course-single-copy h1 {
    margin: 0 0 16px;
    color: var(--mf-dark);
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.06;
}

.mf-course-content-card,
.mf-course-details-card {
    padding: 28px;
}

.mf-course-content-card h2,
.mf-course-details-card h2 {
    margin: 0 0 18px;
    color: var(--mf-dark);
    line-height: 1.15;
}

.mf-course-details-list {
    display: grid;
    gap: 0;
    margin: 0 0 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.mf-course-details-list > div {
    display: grid;
    grid-template-columns: minmax(142px, 42%) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 54px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mf-course-details-list dt {
    display: flex;
    align-items: center;
    min-height: 30px;
    margin: 0;
    color: var(--mf-muted);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.mf-course-details-list dd {
    display: flex;
    align-items: center;
    min-height: 30px;
    margin: 0;
    color: var(--mf-body-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .mf-header-inner {
        grid-template-columns: auto auto;
    }

    .mf-menu-toggle {
        display: block;
        justify-self: end;
    }

    .mf-nav {
        display: none;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 0 18px;
    }

    .mf-header.is-open .mf-nav {
        display: flex;
    }

    .mf-header-cta {
        grid-column: 1 / -1;
        justify-self: stretch;
        display: none;
    }

    .mf-header.is-open .mf-header-cta {
        display: inline-flex;
    }

    .mf-hero-grid,
    .mf-about-grid,
    .mf-contact-layout,
    .mf-form-layout,
    .mf-split,
    .mf-form-panel,
    .mf-course-single-grid,
    .mf-course-content-grid {
        grid-template-columns: 1fr;
    }

    .mf-card-grid,
    .mf-contact-cards,
    .mf-footer-inner {
        grid-template-columns: 1fr;
    }

    .mf-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .mf-section {
        padding: 52px 0;
    }

    .mf-container,
    .mf-header-inner,
    .mf-footer-inner,
    .mf-footer-bottom {
        width: min(100% - 24px, 1120px);
    }

    .mf-brand-text strong {
        font-size: 16px;
    }

    .mf-hero-note {
        position: static;
        max-width: none;
        margin-top: 12px;
    }

    .mf-form,
    .mf-contact-info {
        padding: 20px;
    }

    .mf-game-stage {
        height: 280px;
    }

    .mf-course-details-list > div {
        grid-template-columns: minmax(132px, 44%) minmax(0, 1fr);
        gap: 12px;
        min-height: 50px;
    }
}
