/* Главная: буквы C++, кому подойдёт школа, форматы */
.gl :where(.mh) #story {
    height: 560vh;
}

.gl :where(.mh) .mark {
    top: calc((560vh - 100vh)*.475);
}

:where(.mh) .hero-title {
    top: max(76px,10vh);
    font-size: min(6.9vw,13.2vh);
    line-height: .96;
    letter-spacing: -.055em;
}

:where(.mh) .hero-copy {
    top: calc(max(76px,10vh) + min(6.9vw,13.2vh)*.2);
    left: calc(var(--pad) + min(6.9vw,13.2vh)*8.95);
    max-width: min(430px,28vw);
}

.gl :where(.mh) .steps>li {
    width: min(46%,780px);
}

:where(.mh) .topics {
    display: grid;
    margin-top: 26px;
    max-width: 33em;
}

:where(.mh) .topics li {
    display: grid;
    grid-template-columns: minmax(0,.8fr) minmax(0,1fr);
    gap: 4px 24px;
    align-items: baseline;
    padding: clamp(9px,1.35vh,16px) 0;
    border-top: 1px solid #2b3142;
    color: #8b95ab;
    transition: color .35s;
}

:where(.mh) .topics b {
    font: 600 clamp(22px,2.1vw,36px)/1.1 var(--display);
    letter-spacing: -.03em;
}

:where(.mh) .topics span {
    font-size: clamp(15px,1.15vw,18px);
    line-height: 1.35;
}

:where(.mh) .topics .done {
    color: #d5dbe8;
}

:where(.mh) .topics .now {
    color: var(--gold);
}

html:not(.gl) :where(.mh) .topics li {
    color: #d5dbe8;
}

:where(.mh) .steps .note {
    font-size: 16px;
    margin-top: 14px;
}

:where(.mh) .fit {
    background: #fff;
    padding: clamp(90px,10vw,170px) var(--pad);
}

:where(.mh) .fit ul {
    margin-top: clamp(36px,4.4vw,72px);
}

:where(.mh) .fit li {
    display: grid;
    grid-template-columns: minmax(0,1.25fr) minmax(0,1fr) minmax(0,.55fr);
    gap: 16px clamp(28px,4vw,72px);
    align-items: center;
    padding: clamp(24px,2.6vw,42px) 0;
    border-top: 1px solid var(--line);
}

:where(.mh) .fit li:last-child {
    border-bottom: 1px solid var(--line);
}

:where(.mh) .fit h3 {
    font-size: clamp(28px,3.1vw,52px);
    line-height: 1.04;
    letter-spacing: -.04em;
}

:where(.mh) .fit .more {
    font-size: clamp(18px,1.4vw,22px);
    color: var(--cobalt);
}

:where(.mh) .fit h3 span {
    white-space: nowrap;
}

:where(.mh) .fit p {
    font-size: clamp(17px,1.3vw,20px);
    color: #414857;
    max-width: 27em;
}

:where(.mh) .cols h3 {
    font-size: clamp(28px,2.7vw,46px);
    line-height: 1.04;
}

:where(.mh) .goods {
    padding-top: 0;
    background: var(--night);
    padding-bottom: 12px;
}

:where(.mh) .free {
    display: grid;
    margin-top: 30px;
}

:where(.mh) .free li {
    display: grid;
    gap: 3px;
    padding: 15px 0;
    border-top: 1px solid #3d7365;
}

:where(.mh) .free a {
    justify-self: start;
    font: 600 clamp(19px,1.5vw,24px)/1.25 var(--text);
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

:where(.mh) .free a:hover {
    text-decoration-thickness: 2px;
}

:where(.mh) .free span {
    color: #c3ddd5;
}

:where(.mh) .good .small {
    font-size: 16px;
    color: #c3ddd5;
}

:where(.mh) .who {
    margin-top: 0;
}

@media(min-width:761px) {
    :where(.mh) .g-book figure {
        align-self: stretch;
        height: auto;
        min-height: 420px;
        max-height: 820px;
    }
}

@media(max-width:1000px) {
    :where(.mh) .fit li {
        grid-template-columns: minmax(0,1fr);
        gap: 12px;
    }

    :where(.mh) .fit .more {
        justify-self: start;
    }
}

@media(max-width:760px),(max-aspect-ratio:9/10) {
    .gl :where(.mh) #story {
        height: 500vh;
    }

    .gl :where(.mh) .mark {
        top: calc((500vh - 100vh)*.475);
    }

    :where(.mh) .hero-title {
        top: 84px;
        font-size: min(10.2vw,7.4vh);
    }

    :where(.mh) .hero-copy {
        top: calc(84px + min(10.2vw,7.4vh)*2.88 + 18px);
        left: var(--pad);
        right: var(--pad);
        max-width: 520px;
    }

    .gl :where(.mh) .steps>li {
        width: 100%;
    }

    :where(.mh) .topics {
        margin-top: 14px;
    }

    :where(.mh) .topics li {
        grid-template-columns: 8.200em minmax(0,1fr);
        gap: 12px;
        padding: 7px 0;
    }

    :where(.mh) .topics b {
        font-size: 19px;
    }

    :where(.mh) .topics span {
        font-size: 14px;
    }

    :where(.mh) .steps .note {
        margin-top: 8px;
        font-size: 14px;
    }
}

@media(max-width:760px) and (max-height:730px) and (max-aspect-ratio:9/10) {
    :where(.mh) .hero-title {
        top: 70px;
        font-size: min(9.6vw,7vh);
    }

    :where(.mh) .hero-copy {
        top: calc(70px + min(9.6vw,7vh)*2.88 + 10px);
    }

    :where(.mh) .hero-copy p {
        font-size: 15px;
        line-height: 1.38;
    }

    :where(.mh) .topics li {
        padding: 4px 0;
    }

    :where(.mh) .steps .note {
        display: none;
    }
}

@media(max-height:760px) and (min-aspect-ratio:9/10) {
    :where(.mh) .hero-copy p {
        font-size: 17px;
    }

    :where(.mh) .hero-copy .acts {
        margin-top: 14px;
    }
}

@media(max-height:560px) and (min-aspect-ratio:9/10) {
    html:not(.gl) :where(.mh) .hero {
        min-height: 66vw;
    }

    :where(.mh) .hero-title {
        top: 68px;
        font-size: 6.3vw;
    }

    :where(.mh) .hero-copy {
        top: 70px;
        left: calc(var(--pad) + 6.3vw*8.95);
        max-width: 32vw;
    }

    :where(.mh) .hero-copy p {
        font-size: 14px;
        line-height: 1.35;
    }

    :where(.mh) .hero-copy .btn {
        padding: 8px 14px;
    }

    html:not(.gl) :where(.mh) .poster {
        object-fit: cover;
        object-position: 50% 100%;
    }
}

@media(max-width:350px) {
    :where(.mh) .hero-copy .acts {
        flex-wrap: nowrap;
        gap: 14px;
    }

    :where(.mh) .hero-copy .btn,
    :where(.mh) .hero-copy .more {
        font-size: 14px;
        white-space: nowrap;
    }

    :where(.mh) .hero-copy .btn {
        padding: 8px 14px;
    }
}

:where(.mh) .ai {
    display: grid;
    grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
    gap: 16px clamp(32px,5vw,90px);
    align-items: center;
    padding: clamp(30px,3.4vw,58px) clamp(26px,3.6vw,60px);
    border: 0;
    border-radius: 28px;
    background: var(--gold);
}

:where(.mh) .ai h3 {
    font-size: clamp(30px,3.5vw,60px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

:where(.mh) .ai p {
    font-size: clamp(18px,1.5vw,23px);
    line-height: 1.4;
}

@media(max-width:1000px) {
    :where(.mh) .ai {
        grid-template-columns: minmax(0,1fr);
    }
}

@media(max-width:760px) {
    :where(.mh) .ai {
        border-radius: 24px;
        margin-inline: -12px;
    }
}
