.bac-index-tabs {
    margin-top: 22px;
}

.bac-tab-switcher {
    width: min(620px, 100%);
    margin: 0 auto 22px;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    border: 1px solid #d9e8e1;
    border-radius: 16px;
    background: #f3f8f6;
}

.bac-tab-switcher button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #62756c;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.bac-tab-switcher button.is-active {
    background: #fff;
    color: var(--bac-dark);
    box-shadow: 0 5px 15px rgba(15, 23, 42, .08);
}

.bac-tab-switcher button i {
    font-size: 1.05rem;
}

.bac-tab-panel[hidden] {
    display: none;
}

.bac-tab-panel.is-active {
    animation: bacTabIn .2s ease;
}

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

.bac-year-grid-modern .bac-year-card {
    min-height: 92px;
    padding: 14px;
    box-shadow: none;
}

.bac-year-grid-modern .bac-year-card span {
    width: 58px;
    height: 58px;
    border-radius: 16px;
}

.bac-year-grid-modern .bac-year-card strong {
    min-width: 0;
    font-size: .93rem;
    line-height: 1.65;
}

.bac-legacy-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0 16px;
    color: #60776d;
    font-weight: 800;
}

.bac-legacy-divider::before,
.bac-legacy-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d7e7df;
}

.bac-legacy-divider span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid #d7e7df;
    border-radius: 999px;
    background: #f6fbf8;
    font-size: .86rem;
}

.bac-legacy-year-card {
    border-style: dashed !important;
}

.bac-legacy-year-card span {
    background: #f0f5f2 !important;
    color: #527064 !important;
}

html[data-theme="dark"] .bac-legacy-divider {
    color: #a8bbb2;
}

html[data-theme="dark"] .bac-legacy-divider::before,
html[data-theme="dark"] .bac-legacy-divider::after {
    background: #354941;
}

html[data-theme="dark"] .bac-legacy-divider span {
    background: #19251f;
    border-color: #365548;
}

.bac-stream-grid-modern {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.bac-stream-grid-modern .bac-stream-card {
    min-height: 84px;
    padding: 13px 15px;
    flex-wrap: nowrap;
    box-shadow: none;
}

.bac-stream-grid-modern .bac-stream-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: var(--bac);
    color: #fff;
}

.bac-stream-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bac-stream-copy strong {
    font-size: 1rem;
}

.bac-stream-grid-modern .bac-stream-copy small {
    width: auto;
    padding: 0;
    color: #7a8983;
}

.bac-stream-grid-modern .bac-stream-card > i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #f1f8f5;
    color: var(--bac);
}

.bac-index-tabs .bac-subject-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bac-stream-years-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.bac-stream-year-card {
    min-height: 84px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid #dbe7e1;
    border-radius: 18px;
    background: #fff;
    color: #1f3029;
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.bac-stream-year-card:hover {
    transform: translateY(-2px);
    border-color: #83cfad;
    color: var(--bac-dark);
    box-shadow: 0 12px 26px rgba(7, 148, 100, .08);
}

.bac-stream-year-card > span:first-child {
    width: 54px;
    height: 54px;
    min-width: 54px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--bac-soft);
    color: var(--bac);
    font-weight: 900;
}

.bac-stream-year-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bac-stream-year-copy small {
    color: #7a8983;
}

.bac-stream-year-card > i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #f1f8f5;
    color: var(--bac);
}

html[data-theme="dark"] .bac-tab-switcher {
    border-color: #384941;
    background: #19221e;
}

html[data-theme="dark"] .bac-tab-switcher button {
    color: #9baba4;
}

html[data-theme="dark"] .bac-tab-switcher button.is-active {
    background: #29322e;
    color: #72d8ac;
}

html[data-theme="dark"] .bac-stream-grid-modern .bac-stream-card > i {
    background: #143a2c;
    color: #54d9a2;
}

html[data-theme="dark"] .bac-stream-year-card {
    border-color: #3d4b45;
    background: #20242b;
    color: #e7edea;
}

html[data-theme="dark"] .bac-stream-year-card > span:first-child,
html[data-theme="dark"] .bac-stream-year-card > i {
    background: #143a2c;
    color: #54d9a2;
}

@keyframes bacTabIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: none; }
}

@media (min-width: 701px) {
    .bac-smart-subjects .bac-smart-subject[open] {
        grid-column: auto;
    }

    .bac-smart-subjects .bac-smart-subject[open] .bac-smart-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 800px) {
    .bac-year-grid-modern,
    .bac-stream-grid-modern,
    .bac-stream-years-grid,
    .bac-index-tabs .bac-subject-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .bac-year-grid-modern,
    .bac-stream-grid-modern,
    .bac-stream-years-grid,
    .bac-index-tabs .bac-subject-hub-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .bac-index-tabs {
        margin-top: 14px;
    }

    .bac-tab-switcher {
        margin-bottom: 14px;
        border-radius: 14px;
    }

    .bac-tab-switcher button {
        min-height: 44px;
        font-size: .9rem;
    }

    .bac-year-grid-modern,
    .bac-stream-grid-modern,
    .bac-stream-years-grid,
    .bac-index-tabs .bac-subject-hub-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .bac-year-grid-modern .bac-year-card {
        min-height: 76px;
        padding: 10px;
        gap: 9px;
    }

    .bac-year-grid-modern .bac-year-card span {
        width: 48px;
        height: 48px;
        border-radius: 13px;
        font-size: .87rem;
    }

    .bac-year-grid-modern .bac-year-card strong {
        font-size: .8rem;
        line-height: 1.45;
    }

    .bac-stream-grid-modern .bac-stream-card {
        min-height: 72px;
        padding: 10px 11px;
    }

    .bac-stream-grid-modern .bac-stream-icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
    }

    .bac-stream-year-card {
        min-height: 72px;
        padding: 10px 11px;
        border-radius: 15px;
    }

    .bac-stream-year-card > span:first-child {
        width: 48px;
        height: 48px;
        min-width: 48px;
        border-radius: 13px;
        font-size: .87rem;
    }
}
