.ml-learn-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 14px;
}

.ml-term-card,
.ml-quiz-card {
    padding: 22px;
}

.ml-term-card h3,
.ml-quiz-card h3 {
    margin: 0;
    font-size: 28px;
}

.ml-term-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.ml-term-example {
    margin-top: 18px;
    padding: 14px;
    border-left: 3px solid var(--coin-green);
    border-radius: 0 8px 8px 0;
    background: var(--surface-green);
    color: var(--text);
    font-weight: 800;
    line-height: 1.45;
}

.ml-quiz-head span:last-child {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.ml-quiz-options {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.ml-quiz-options button {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    text-align: left;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.ml-quiz-options button:hover,
.ml-quiz-options button:focus-visible {
    border-color: var(--coin-green);
    background: var(--surface-green);
    outline: none;
}

.ml-quiz-options button.correct {
    border-color: var(--coin-green);
    background: var(--surface-green);
    color: var(--coin-green);
}

.ml-quiz-options button.wrong {
    border-color: var(--red);
    background: #fff0f2;
    color: var(--red);
}

.ml-quiz-feedback {
    min-height: 42px;
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.ml-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    padding: 22px 28px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

@keyframes avatarFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@keyframes avatarBlink {
    0%,
    92%,
    100% {
        transform: scaleY(1);
    }
    95% {
        transform: scaleY(0.1);
    }
}

@keyframes avatarPulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(217, 75, 92, 0);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(217, 75, 92, 0.10);
    }
}

@media (max-width: 1040px) {
    .ml-topbar {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .ml-nav {
        width: 100%;
        overflow-x: auto;
    }

    .ml-freshness {
        justify-self: start;
    }

    .ml-hero,
    .ml-layer-board,
    .ml-professor-section,
    .ml-learn-grid,
    .ml-flow-board {
        grid-template-columns: 1fr;
    }

    .ml-hero {
        min-height: auto;
    }

    .ml-asset-grid,
    .ml-intel-grid,
    .ml-flow-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ml-flow-node:nth-child(3)::after {
        display: block;
    }

    .ml-flow-node:nth-child(2)::after,
    .ml-flow-node:nth-child(4)::after {
        display: none;
    }

    .ml-dictionary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    main {
        width: min(100% - 28px, var(--max));
    }

    .ml-topbar {
        padding: 12px 14px;
    }

    .ml-brand {
        gap: 9px;
    }

    .ml-logo {
        width: 132px;
    }

    .ml-brand-divider,
    .ml-brand-copy small {
        display: none;
    }

    .ml-hero {
        padding-top: 28px;
    }

    .ml-hero h1 {
        font-size: 40px;
    }

    .ml-lead {
        font-size: 17px;
    }

    .ml-section-head {
        display: block;
    }

    .ml-section-head > p {
        margin-top: 10px;
    }

    .ml-strip,
    .ml-asset-grid,
    .ml-intel-grid,
    .ml-flow-track,
    .ml-dictionary-grid {
        grid-template-columns: 1fr;
    }

    .ml-flow-node::after {
        display: none;
    }

    .ml-mini-grid {
        grid-template-columns: 1fr;
    }

    .ml-layer-row {
        grid-template-columns: 86px minmax(0, 1fr) 68px;
        gap: 8px;
    }

    .ml-section h2,
    .ml-professor-card h2 {
        font-size: 28px;
    }

    .ml-footer {
        display: block;
        padding: 20px 14px;
    }

    .ml-footer span {
        display: block;
    }

    .ml-footer span + span {
        margin-top: 8px;
    }
}
