.table-of-contents:empty {
    display: none;
}

.table-of-contents {
    gap: 6rem;
    flex: 0 0 auto;
    width: 23rem;
    position: sticky;
    top: 10rem;
    font-weight: 600;
}

.table-of-contents__anchors {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.table-of-contents__anchors a {
    display: block;
    padding-block: 1rem;
    color: var(--color-gray-light);
}

.table-of-contents__anchors a.active {
    color: var(--color-default);
}

@media screen and (max-width: 767.9px) {
    .table-of-contents {
        width: 100%;
        position: static;
    }
}