/* 参考稿的共享导航与首页尺寸 */
:root {
    --knv-container: 1264px;
    --knv-header-height: 76px;
    --knv-utility-height: 28px;
    --knv-navigation-height: 48px;
    --knv-font-family-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

.site-header {
    background: linear-gradient(110deg, #f8fcff, #fff 55%, #f0faff);
    border-bottom: 0;
}

.site-header__main {
    grid-template-columns: 240px minmax(0, 1fr) 220px;
    gap: 32px;
}

.site-brand__fallback {
    gap: 12px;
}

.site-brand__fallback .site-brand__symbol {
    width: 52px;
    height: 50px;
    flex: 0 0 auto;
    object-fit: contain;
}

.site-brand__wordmark {
    display: grid;
    gap: 4px;
    white-space: nowrap;
}

.site-brand__wordmark strong {
    color: #081c3b;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
}

.site-brand__wordmark small {
    color: #8295b4;
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: 5px;
}

.site-search .search-field {
    min-height: 44px;
    padding-left: 38px;
    border-radius: 24px 0 0 24px;
    font-size: 15px;
}

.site-search .search-submit {
    min-height: 44px;
    min-width: 120px;
    border-radius: 0 24px 24px 0;
    font-size: 15px;
}

.site-search .search-form__icon {
    left: 16px;
}

.site-search .knv-icon {
    width: 18px;
    height: 18px;
}

.account-nav {
    justify-content: space-between;
}

.account-nav__item {
    min-height: 54px;
    gap: 4px;
}

.primary-navigation {
    border-top: 0;
}

.primary-menu {
    gap: 50px;
}

.primary-menu a {
    gap: 5px;
    font-size: 16px;
}

.primary-menu .knv-icon {
    width: 19px;
    height: 19px;
    fill: currentcolor;
}

.home-page {
    padding-bottom: 0;
    background: radial-gradient(ellipse at 50% 50%, #fff 0%, #f2faff 80%);
}

.home-hero {
    width: 100%;
    height: min(17.6796vw, 256px);
    min-height: 0;
    aspect-ratio: auto;
    background: linear-gradient(#bde7fa, #d7f3f8 60%, #a6e7d6);
}

.home-hero::before,
.home-stage-grid--mobile {
    display: none;
}

.home-hero__reference,
.home-hero__reference img {
    display: block;
    width: 100%;
    height: 100%;
}

.home-hero__reference img {
    object-fit: contain;
}

.home-hero__reference {
    max-width: 1448px;
    margin-inline: auto;
}

.home-hero__hitarea {
    position: absolute;
    z-index: 2;
    top: 66%;
    left: calc((100% - min(100%, 1448px)) / 2 + min(9.8vw, 142px));
    width: min(15.5vw, 224px);
    height: 18%;
    border-radius: 28px;
}

.home-hero__hitarea:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* 超宽屏只延展背景，主体与下方内容保持同一比例 */
@media (width > 1448px) {
    .home-hero__reference {
        mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
    }
}

.home-page__content {
    padding-bottom: 48px;
}

.home:has(.home-page) .primary-navigation {
    display: none;
}

.school-stage-navigation,
.school-filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-block: 16px;
}

.school-stage-navigation {
    border-bottom: 1px solid #dceaf5;
}

.school-stage-navigation a[aria-current] {
    color: #087cff;
    font-weight: 700;
}

.school-page .basic-section__heading h2 {
    margin: 0;
}

.home-stage-grid--desktop {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: -16px;
}

.home-stage-card {
    min-height: 100px;
    gap: 12px;
    padding: 18px 12px;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
}

.home-stage-card > img {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: contain;
}

.home-stage-card strong {
    font-size: 17px;
    line-height: 1.4;
}

.home-stage-card small {
    margin-top: 6px;
    font-size: 12px;
    white-space: normal;
}

.home-type-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    min-height: 116px;
    margin-top: 24px;
    border: 0;
    border-radius: 10px;
}

.home-type-card {
    position: relative;
    min-height: 116px;
    gap: 10px;
    padding: 18px 8px;
    font-size: 16px;
}

.home-type-card + .home-type-card {
    border-left: 0;
}

.home-type-card + .home-type-card::before {
    position: absolute;
    bottom: 18px;
    left: 0;
    width: 1px;
    height: 28px;
    background: #f1f6fa;
    content: "";
}

.home-type-card > img {
    width: 43px;
    height: 43px;
    object-fit: contain;
}

.home-spotlights {
    gap: 20px;
    margin-top: 24px;
}

.home-spotlight {
    display: flex;
    min-width: 0;
    min-height: 92px;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    background: linear-gradient(105deg, #fff6f1, #fff0f0);
    border: 1px solid #fff;
    border-radius: 10px;
}

.home-spotlight--course {
    background: linear-gradient(105deg, #eaf8ff, #eaf0ff);
}

.home-spotlight--exam {
    background: linear-gradient(105deg, #edf7ff, #ecefff);
}

.home-spotlight--topic {
    background: linear-gradient(105deg, #edfcf9, #e7f9f5);
}

.home-spotlight > img {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    object-fit: contain;
}

.home-spotlight strong {
    font-size: 18px;
    line-height: 1.4;
}

.home-spotlight small {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.5;
}

.home-page .home-resource-section {
    padding-top: 36px;
}

.home-page .home-section-heading {
    min-height: 34px;
    margin-bottom: 18px;
}

.home-page .home-section-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 24px;
    line-height: 34px;
}

.home-page .home-section-heading h2::before {
    width: 6px;
    height: 20px;
    background: var(--knv-color-primary);
    border-radius: 3px;
    content: "";
}

.home-page .home-section-heading > a {
    min-height: 26px;
    font-size: 14px;
}

.home-page .home-section-heading > a span {
    font-size: 23px;
    line-height: 1;
}

.home-page .home-resource-section + .home-resource-section {
    padding: 0;
    margin-top: 36px;
    background: none;
}

.home-page .home-resource-section + .home-resource-section h2::before {
    display: none;
}

.home-page .home-section-heading .knv-icon {
    color: #ffae2f;
    fill: currentcolor;
}

.home-page .home-resource-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.home-page .home-resource-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    min-height: 166px;
    padding: 18px 14px;
    border: 0;
    border-radius: 10px;
}

.home-page .home-resource-card__media {
    min-height: 0;
    height: 106px;
    background: none;
    border-radius: 4px;
}

.home-page .home-resource-card__media img {
    display: block;
    object-fit: fill;
}

.home-page .home-resource-card__body {
    padding: 0;
}

.home-page .home-resource-card h3 {
    min-height: 48px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
}

.home-page .home-resource-card__tags {
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.home-page .home-resource-card__tags span {
    padding: 2px 5px;
    color: #4778af;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
}

.home-page .home-resource-card__meta {
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    color: #627b9b;
    font-size: 12px;
    line-height: 19px;
    white-space: nowrap;
}

.home-page .home-resource-card__meta strong {
    padding: 2px 8px;
    margin-left: auto;
    color: #fff;
    background: #00c59b;
    border-radius: 4px;
    font-size: 12px;
    line-height: 21px;
}

.home-page .home-resource-card__meta strong[data-access="VIP"] {
    background: #ffab27;
}

.home-page .home-resource-card__meta strong[data-access="广告解锁"] {
    padding-inline: 5px;
    color: #8a9ab1;
    background: #f1f5fa;
    box-shadow: inset 0 0 0 1px #d3deef;
}

.site-footer {
    background: linear-gradient(110deg, #fff, #f5fbff);
    border-top: 0;
}

.site-footer__inner {
    grid-template-columns: 300px repeat(3, 1fr) 160px 180px;
    align-items: center;
    gap: 24px;
    padding-block: 36px 24px;
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 70px;
    padding-right: 24px;
    border-right: 1px solid #e2edf8;
}

.site-footer__brand .site-brand__fallback {
    gap: 8px;
}

.site-footer__brand .site-brand__symbol {
    width: 42px;
    height: 40px;
}

.site-footer__brand .site-brand__wordmark strong {
    font-size: 17px;
}

.site-footer__brand .site-brand__wordmark small {
    font-size: 8px;
    letter-spacing: 3px;
}

.site-footer__brand p {
    padding-left: 14px;
    margin: 0;
    border-left: 1px solid #e2edf8;
    font-size: 12px;
    line-height: 1.5;
}

.site-footer__group h2,
.site-footer__social h2 {
    margin: 0 0 10px;
    color: #4f6885;
    font-size: 14px;
    line-height: 20px;
}

.site-footer__group li + li {
    margin-top: 0;
}

.site-footer__group a {
    display: block;
    color: #627b9b;
    font-size: 13px;
    line-height: 26px;
}

.site-footer__social {
    padding-left: 24px;
    border-left: 1px solid #e2edf8;
}

.site-footer__social img {
    display: block;
    width: 150px;
    height: 42px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.site-footer__access {
    gap: 8px;
    padding-left: 20px;
}

.site-footer__app-preview {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    object-fit: contain;
}

.site-footer__access strong,
.site-footer__access span,
.site-footer__access small {
    display: block;
    margin: 0;
    color: #8092ac;
    font-size: 11px;
    line-height: 18px;
}

.site-footer__legal {
    border-top: 0;
}

.site-footer__legal-inner {
    min-height: 48px;
    justify-content: center;
    gap: 20px;
    font-size: 12px;
}

.site-footer__legal a {
    font-size: 12px;
}

@media (width >= 768px) and (width <= 1100px) {
    .site-header__main {
        grid-template-columns: 180px minmax(0, 1fr) 180px;
        gap: 18px;
    }

    .site-brand__wordmark strong {
        font-size: 19px;
    }

    .site-search .search-submit {
        min-width: 76px;
        padding-inline: 14px;
    }

    .home-stage-card {
        flex-direction: column;
        gap: 4px;
        padding: 10px 4px;
        text-align: center;
    }

    .home-stage-card small {
        display: none;
    }

    .home-spotlight {
        gap: 10px;
        padding: 10px;
    }

    .home-spotlight strong {
        font-size: 14px;
    }

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

    .site-footer__inner {
        grid-template-columns: 2fr repeat(3, 1fr);
    }

    .site-footer__brand {
        display: block;
    }

    .site-footer__brand p {
        padding: 8px 0 0;
        border: 0;
    }

    .site-footer__social,
    .site-footer__access {
        display: none;
    }
}

@media (width <= 767px) {
    :root {
        --knv-gutter: 16px;
        --knv-header-height: 56px;
        --knv-mobile-navigation-height: 48px;
    }

    body {
        padding-bottom: calc(48px + env(safe-area-inset-bottom));
    }

    .site-header {
        background: #edf7ff;
    }

    .site-header__main {
        grid-template-columns: 92px minmax(0, 1fr) 60px;
        gap: 8px;
    }

    .site-brand__fallback {
        gap: 5px;
    }

    .site-brand__fallback .site-brand__symbol {
        width: 26px;
        height: 27px;
    }

    .site-brand__wordmark {
        gap: 2px;
    }

    .site-brand__wordmark strong {
        font-size: 11px;
    }

    .site-brand__wordmark small {
        font-size: 5px;
        letter-spacing: 2.2px;
    }

    .site-search .search-field {
        min-height: 30px;
        padding-left: 28px;
        padding-right: 10px;
        border: 0;
        border-radius: 18px;
        font-size: 11px;
    }

    .site-search .search-form__icon {
        left: 10px;
    }

    .site-search .knv-icon {
        width: 15px;
        height: 15px;
    }

    .account-nav {
        gap: 6px;
    }

    .account-nav__item {
        min-width: 26px;
        min-height: 36px;
    }

    .account-nav__item .knv-icon {
        width: 22px;
        height: 22px;
    }

    .home-stage-grid--desktop {
        display: none;
    }

    .home-stage-grid--mobile {
        display: grid;
        width: calc(100% - 32px);
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0;
        padding: 12px 2px;
        margin: 6px auto 14px;
        overflow: visible;
        background: #fff;
        border-radius: 9px;
        box-shadow: none;
    }

    .home-stage-grid--mobile .home-stage-card {
        min-width: 0;
        min-height: 56px;
        flex-direction: column;
        gap: 6px;
        padding: 0;
        border-radius: 0;
    }

    .home-stage-grid--mobile .home-stage-card + .home-stage-card {
        border-left: 1px solid #f1f6fb;
    }

    .home-stage-grid--mobile .home-stage-card img {
        width: 27px;
        height: 27px;
    }

    .home-stage-grid--mobile .home-stage-card strong {
        font-size: 12px;
        font-weight: 500;
        line-height: 18px;
        white-space: nowrap;
    }

    .home-hero {
        width: calc(100% - 32px);
        height: auto;
        min-height: 0;
        aspect-ratio: 894 / 307;
        margin-inline: auto;
        overflow: hidden;
        border-radius: 9px;
    }

    .home-hero__hitarea {
        top: 69%;
        left: 5.7%;
        width: 31.6%;
        height: 20%;
    }

    .home-page__content {
        padding-bottom: 28px;
    }

    .home-type-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-height: 116px;
        padding: 10px 0;
        margin-top: 16px;
        border-radius: 9px;
    }

    .home-type-card {
        min-height: 76px;
        gap: 7px;
        padding: 10px 0;
        font-size: 12px;
    }

    .home-type-card strong {
        font-weight: 500;
        line-height: 16px;
    }

    .home-type-card + .home-type-card::before {
        display: none;
    }

    .home-type-card > img {
        width: 34px;
        height: 34px;
    }

    .home-spotlights {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        gap: 12px;
        padding: 0;
        margin-top: 16px;
        overflow: visible;
    }

    .home-spotlight {
        min-height: 76px;
        flex-direction: row-reverse;
        justify-content: space-between;
        gap: 8px;
        padding: 12px;
        border-radius: 8px;
    }

    .home-spotlight > img {
        width: 34px;
        height: 36px;
    }

    .home-spotlight strong {
        font-size: 14px;
        line-height: 22px;
        white-space: nowrap;
    }

    .home-spotlight small {
        font-size: 11px;
        line-height: 18px;
        white-space: nowrap;
    }

    .home-page .home-resource-section {
        padding-top: 28px;
    }

    .home-page .home-section-heading {
        min-height: 28px;
        margin-bottom: 14px;
    }

    .home-page .home-section-heading h2 {
        gap: 7px;
        font-size: 20px;
        line-height: 28px;
    }

    .home-page .home-section-heading h2::before {
        width: 3px;
        height: 13px;
    }

    .home-page .home-section-heading > a {
        min-height: 20px;
        gap: 5px;
        font-size: 12px;
    }

    .home-page .home-section-heading > a span {
        font-size: 18px;
    }

    .home-page .home-resource-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        grid-auto-flow: row;
        gap: 12px;
        padding: 0;
        overflow: visible;
    }

    .home-page .home-resource-card {
        position: relative;
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 16px;
        min-height: 140px;
        padding: 16px;
        border-radius: 8px;
    }

    .home-page .home-resource-card__media {
        height: 108px;
        border-radius: 2px;
    }

    .home-page .home-resource-card h3 {
        min-height: 44px;
        font-size: 14px;
        font-weight: 600;
        line-height: 22px;
    }

    .home-page .home-resource-card__tags {
        gap: 4px;
        margin-top: 8px;
    }

    .home-page .home-resource-card__tags span {
        padding: 1px 4px;
        font-size: 11px;
        line-height: 18px;
    }

    .home-page .home-resource-card__meta {
        flex-wrap: wrap;
        gap: 6px;
        padding-top: 10px;
        font-size: 11px;
        line-height: 18px;
    }

    .home-page .home-resource-card__meta strong {
        padding: 1px 6px;
        font-size: 11px;
        line-height: 20px;
    }

    .home-page .home-resource-card:nth-child(n + 4) {
        display: grid;
    }

    .home-page .home-resource-section + .home-resource-section {
        padding: 0;
        margin-top: 28px;
        background: none;
        border-radius: 10px;
    }

    .home-page .home-resource-section + .home-resource-section .home-resource-card__meta strong {
        display: block;
    }

    .home-page .home-section-heading .knv-icon {
        width: 17px;
        height: 17px;
    }

    .mobile-bottom-nav {
        box-shadow: 0 -3px 12px rgb(39 97 153 / 4%);
    }

    .mobile-bottom-nav__item {
        gap: 1px;
        font-size: 10px;
    }

    .mobile-bottom-nav .knv-icon {
        width: 22px;
        height: 22px;
    }

    .mobile-bottom-nav__item.is-current .knv-icon {
        fill: currentcolor;
    }
}
