/*
==========================================================================
    Component: Table of Contents
    Note: Font styles are now applied via utility classes in the JS.
==========================================================================
*/

.table-of-contents {
    font-family: inherit;
}

.table-of-contents .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents .toc-link {
    text-decoration: none;
    color: #666;
    display: block;
    padding: 0;
    margin-top: -0.4em;
    transition: all 0.2s ease;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.table-of-contents .toc-link:focus,
.table-of-contents .toc-link:active,
.table-of-contents .toc-link:hover,
.table-of-contents .toc-link:visited {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.table-of-contents .toc-link.active {
    font-weight: 415; /* Strong/semibold weight */
    color: #000;
    text-decoration: underline;
}

/* Sub-list styles for H3 headings */
.toc-sublist {
    margin-top: 18px;
    padding-left: 35px;
    color: #666;
}

.toc-sublist li {
    margin-bottom: 14px;
    line-height: 20px;
}

/* Remove tap highlight on mobile */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
}

/* --- Responsive Styles --- */

@media (min-width: 768px) and (max-width: 1141px) {
    .custom-toc {
        line-height: 1.4em;
    }
    .custom-toc .toc-link {
        margin-top: -0.4em;
    }
    .toc-sublist li {
        margin-bottom: 16px;
        line-height: 16px;
    }
}

@media (min-width: 1142px) and (max-width: 1600px) {
    .custom-toc .toc-link {
        margin-top: -0.4em;
    }
}