.ns-toc {
        background: var(--paper, #F4F9F6);
        border: 1px solid var(--rule-md, rgba(1,26,11,.16));
        border-radius: 12px;
        padding: 0;
        margin: 24px 0;
        overflow: hidden;
        font-size: .9rem;
    }
    .ns-toc__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: var(--g-800, #013D22);
        cursor: pointer;
    }
    .ns-toc__title {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-family: var(--font-head, sans-serif);
        font-size: .88rem;
        font-weight: 700;
        color: #fff;
    }
    .ns-toc__toggle {
        background: rgba(255,255,255,.2);
        border: none;
        border-radius: 50%;
        width: 26px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #fff;
        transition: transform .25s ease, background .2s;
        flex-shrink: 0;
    }
    .ns-toc__toggle:hover { background: rgba(255,255,255,.3); }
    .ns-toc__toggle.collapsed { transform: rotate(-90deg); }
    .ns-toc__list {
        list-style: none;
        padding: 12px 16px 14px;
        margin: 0;
        counter-reset: none;
        display: flex;
        flex-direction: column;
        gap: 2px;
        transition: max-height .3s ease, opacity .25s ease;
        max-height: 600px;
        opacity: 1;
        overflow: hidden;
    }
    .ns-toc__list.hidden {
        max-height: 0;
        opacity: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    .ns-toc__item { margin: 0; }
    .ns-toc__item--sub { padding-left: 20px; }
    .ns-toc__link {
        display: flex;
        align-items: baseline;
        gap: 8px;
        padding: 5px 6px;
        border-radius: 6px;
        color: #065F46;
        font-size: .87rem;
        line-height: 1.45;
        text-decoration: none;
        transition: background .15s, color .15s;
    }
    .ns-toc__link:hover { background: rgba(0,122,61,.1); color: #007A3D; text-decoration: none; }
    .ns-toc__link.active { background: rgba(0,122,61,.15); color: #007A3D; font-weight: 700; }
    .ns-toc__num {
        background: var(--g-600, #007A3D);
        color: #fff;
        font-size: .7rem;
        font-weight: 800;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-family: var(--font-head, sans-serif);
        font-variant-numeric: tabular-nums;
    }
    .ns-toc__dash { color: var(--muted, #4B6458); font-size: .8rem; flex-shrink: 0; }
    [data-theme="dark"] .ns-toc { background: var(--paper, #0E2416); border-color: var(--rule-md, rgba(232,245,238,.16)); }
    [data-theme="dark"] .ns-toc__header { background: var(--g-800, #013D22); border-bottom: 1px solid var(--rule, rgba(232,245,238,.12)); }
    [data-theme="dark"] .ns-toc__link { color: var(--body-c, #C8E6D4); }
    [data-theme="dark"] .ns-toc__link:hover,
    [data-theme="dark"] .ns-toc__link.active { background: rgba(74,222,128,.12); color: var(--g-300, #4ADE80); }
    [data-theme="dark"] .ns-toc__num { background: var(--g-600, #007A3D); }
    @media (max-width: 480px) {
        .ns-toc__list { max-height: 300px; overflow-y: auto; }
    }
    /* Reading highlight: heading in viewport */
    .article-body h2:target, .article-body h3:target {
        color: var(--g-600, #007A3D);
        scroll-margin-top: 130px;
    }
