/* Table of Contents Styles */

.mn-toc {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.mn-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
}

.mn-toc-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

.mn-toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #7f8c8d;
    transition: color 0.3s, transform 0.3s;
}

.mn-toc-toggle:hover {
    color: #3498db;
}

.mn-toc.collapsed .mn-toc-toggle {
    transform: rotate(180deg);
}

.mn-toc.collapsed .mn-toc-list {
    display: none;
}

.mn-toc-list {
    list-style: none;
    counter-reset: toc-counter;
    margin: 0;
    padding: 0;
}

.mn-toc-list ol {
    list-style: none;
    counter-reset: toc-counter;
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.mn-toc-item {
    margin: 0.5rem 0;
    counter-increment: toc-counter;
}

.mn-toc-item::before {
    content: counters(toc-counter, ".") ". ";
    color: #3498db;
    font-weight: 600;
    margin-right: 0.5rem;
}

.mn-toc-item a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
    line-height: 1.6;
}

.mn-toc-item a:hover {
    color: #3498db;
}

.mn-toc-item.active a {
    color: #3498db;
    font-weight: 600;
}

.mn-toc-level-2 {
    font-size: 1rem;
}

.mn-toc-level-3 {
    font-size: 0.95rem;
}

.mn-toc-level-4 {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Sticky TOC */
@media (min-width: 1200px) {
    .mn-toc.sticky {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mn-toc {
        padding: 1rem;
    }

    .mn-toc-title {
        font-size: 1.1rem;
    }

    .mn-toc-list ol {
        margin-left: 1rem;
    }
}