:root {
    color-scheme: light;
    --mt-primary: #4f46e5;
    --mt-primary-hover: #4338ca;
    --mt-bg: #f8fafc;
    --mt-surface: #ffffff;
    --mt-soft: #eef2ff;
    --mt-text: #0f172a;
    --mt-muted: #64748b;
    --mt-border: #e2e8f0;
    --mt-shadow: 0 4px 20px rgba(15,23,42,.06);
}

[data-theme="dark"] {
    color-scheme: dark;
    --mt-primary: #a5b4fc;
    --mt-primary-hover: #c7d2fe;
    --mt-bg: #0f172a;
    --mt-surface: #1e293b;
    --mt-soft: #253354;
    --mt-text: #f1f5f9;
    --mt-muted: #94a3b8;
    --mt-border: #334155;
    --mt-shadow: 0 4px 20px rgba(0,0,0,.2);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    background: var(--mt-bg);
    color: var(--mt-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--mt-primary);
    text-decoration: none;
}

button, input, textarea, select {
    font: inherit;
}

button {
    cursor: pointer;
}

.mt-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.mt-header {
    background: var(--mt-surface);
    border-bottom: 1px solid var(--mt-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mt-header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.mt-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 700;
    color: var(--mt-text);
    white-space: nowrap;
}

.mt-brand strong {
    color: var(--mt-primary);
}

.mt-brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: #4f46e5;
    color: #fff;
    border-radius: 12px;
    font-size: 25px;
}

.mt-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.mt-nav a {
    color: var(--mt-muted);
    font-size: 14px;
    font-weight: 600;
}

.mt-nav a:hover {
    color: var(--mt-primary);
}

.mt-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mt-icon-button,
.mt-language-button,
.mt-menu-button {
    border: 1px solid var(--mt-border);
    background: var(--mt-surface);
    color: var(--mt-text);
    border-radius: 10px;
    padding: 8px 12px;
}

.mt-icon-button {
    font-size: 20px;
    min-width: 42px;
}

.mt-menu-button {
    display: none;
}

.mt-main {
    flex: 1;
    min-width: 0;
}

.mt-hero {
    padding: 64px 0;
    text-align: center;
    background: var(--mt-soft);
}

.mt-hero h1 {
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.2;
    margin: 0 0 16px;
}

.mt-hero p {
    color: var(--mt-muted);
    font-size: 17px;
    max-width: 720px;
    margin: auto;
}

.mt-section {
    padding: 40px 0;
}

.mt-section-title {
    font-size: 26px;
    margin: 0 0 20px;
}

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

.mt-card {
    display: block;
    background: var(--mt-surface);
    border: 1px solid var(--mt-border);
    border-radius: 16px;
    padding: 24px;
    color: var(--mt-text);
    box-shadow: var(--mt-shadow);
    transition: transform .2s, border-color .2s;
}

.mt-card:hover {
    transform: translateY(-3px);
    border-color: var(--mt-primary);
}

.mt-card h3 {
    margin: 12px 0 8px;
}

.mt-card p {
    color: var(--mt-muted);
    font-size: 14px;
    margin: 0;
}

.mt-tool-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--mt-soft);
    font-size: 24px;
}

.mt-footer {
    background: var(--mt-surface);
    border-top: 1px solid var(--mt-border);
    padding: 48px 0 20px;
}

.mt-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
}

.mt-footer h3 {
    font-size: 15px;
    margin: 0 0 16px;
}

.mt-footer p,
.mt-footer-grid > div > a:not(.mt-brand) {
    color: var(--mt-muted);
    font-size: 14px;
}

.mt-footer-grid > div > a:not(.mt-brand) {
    display: block;
    margin-bottom: 9px;
}

.mt-footer-grid a:hover {
    color: var(--mt-primary);
}

.mt-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--mt-border);
    color: var(--mt-muted);
    font-size: 13px;
}

@media (max-width: 1024px) {
    .mt-menu-button {
        display: inline-block;
    }

    .mt-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--mt-surface);
        padding: 20px;
        border-bottom: 1px solid var(--mt-border);
        flex-direction: column;
        align-items: stretch;
    }

    .mt-nav.is-open {
        display: flex;
    }

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

    .mt-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .mt-container {
        width: calc(100% - 28px);
    }

    .mt-header-inner {
        min-height: 66px;
        gap: 8px;
        flex-wrap: wrap;
        padding: 8px 0;
    }

    .mt-brand {
        font-size: 16px;
        gap: 7px;
    }

    .mt-brand-icon {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    .mt-header-actions {
        gap: 5px;
    }

    .mt-language-button {
        font-size: 12px;
        padding: 7px;
    }

    .mt-hero {
        padding: 40px 0;
    }

    .mt-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .mt-card {
        padding: 18px;
    }

    .mt-footer-about {
        grid-column: 1 / -1;
    }

    .mt-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
