.ae-home-menu {
    --ae-home-ink: #172433;
    --ae-home-muted: #667085;
    --ae-home-line: #d9e0e8;
    --ae-home-bg: #f5f7fa;
    width: calc(100vw - 32px);
    max-width: 1760px;
    margin-left: 50%;
    transform: translateX(-50%);
    padding: 34px 42px;
    background: var(--ae-home-bg);
    color: var(--ae-home-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow: hidden;
}

.ae-home-menu * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.ae-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px 18px;
    margin-bottom: 26px;
}

.ae-home-hero p {
    grid-column: 1;
    margin: 0 0 6px;
    color: var(--ae-home-muted);
    font-size: 14px;
    font-weight: 850;
    text-transform: uppercase;
}

.ae-home-hero h1 {
    grid-column: 1;
    margin: 0;
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1;
}

.ae-home-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.ae-home-logout,
.ae-home-change-password {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 6px;
    padding: 8px 14px;
    background: #1f2d3d;
    color: #fff;
    font-weight: 850;
    text-decoration: none;
}

.ae-home-change-password {
    background: #2271b1;
}

.ae-home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.ae-home-grid-count-1 {
    grid-template-columns: minmax(280px, .5fr);
}

.ae-home-grid-count-2 {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.ae-home-tile {
    position: relative;
    display: block;
    min-width: 0;
    aspect-ratio: 1.08 / 1;
    overflow: hidden;
    border: 1px solid var(--ae-home-line);
    border-radius: 8px;
    background: #fff;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 16px 35px rgba(23, 36, 51, .12);
}

.ae-home-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}

.ae-home-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 18, 28, .06), rgba(10, 18, 28, .74));
}

.ae-home-tile span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1;
}

.ae-home-tile strong,
.ae-home-tile small {
    display: block;
}

.ae-home-tile strong {
    font-size: clamp(18px, 1.6vw, 24px);
    line-height: 1.08;
}

.ae-home-tile small {
    max-width: 92%;
    margin-top: 7px;
    color: rgba(255,255,255,.88);
    font-size: 14px;
    line-height: 1.35;
}

.ae-home-tile:hover img {
    transform: scale(1.035);
}

.ae-home-student {
    max-width: 1240px;
    padding: 30px 34px;
}

.ae-home-student .ae-home-grid-count-1,
.ae-home-student .ae-home-grid-count-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
    justify-content: start;
}

.ae-home-student .ae-home-tile {
    aspect-ratio: 1.08 / 1;
    max-height: 390px;
}

.ae-home-notice {
    max-width: 760px;
    margin: 30px auto;
    padding: 18px;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    background: #fff;
    color: #172433;
    font-weight: 800;
}

@media (max-width: 720px) {
    .ae-home-menu {
        width: calc(100vw - 20px);
        padding: 18px;
    }

    .ae-home-grid {
        grid-template-columns: 1fr;
    }

    .ae-home-student .ae-home-grid-count-1,
    .ae-home-student .ae-home-grid-count-2 {
        grid-template-columns: 1fr;
    }

    .ae-home-hero {
        grid-template-columns: 1fr;
    }

    .ae-home-actions {
        grid-column: 1;
        grid-row: auto;
        justify-content: flex-start;
    }

    .ae-home-logout,
    .ae-home-change-password {
        width: fit-content;
    }

    .ae-home-tile {
        aspect-ratio: 1.12 / 1;
    }
}

@media (min-width: 721px) and (max-width: 1180px) {
    .ae-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
