.article-page-toc {
        opacity: 0;
        position: fixed;
        left: 0;
        top: 96px;
        z-index: 40;
        width: 248px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        padding: 18px 12px 18px 0;
        border: 1px solid #dbeafe;
        border-left: 0;
        border-radius: 0 8px 8px 0;
        background: #f1f5f9;
        box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
        transition: opacity .24s ease, transform .24s ease;
        pointer-events: none;
        transform: translateX(-10px);
    }

    .article-page-toc.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
    }

    .article-page-toc.is-visible.is-collapsed {
        transform: translateX(-248px);
    }

    .article-toc-desktop-toggle {
        opacity: 0;
        position: fixed;
        left: 248px;
        top: 112px;
        z-index: 41;
        width: 36px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #dbeafe;
        border-left: 0;
        border-radius: 0 8px 8px 0;
        color: #2563eb;
        background: #fff;
        box-shadow: 8px 12px 28px rgba(15, 23, 42, .14);
        cursor: pointer;
        pointer-events: none;
        transition: opacity .24s ease, left .24s ease, color .18s ease, background-color .18s ease;
    }

    .article-page-toc.is-visible + .article-toc-desktop-toggle {
        opacity: 1;
        pointer-events: auto;
    }

    .article-page-toc.is-visible.is-collapsed + .article-toc-desktop-toggle {
        left: 0;
    }

    .article-toc-desktop-toggle:hover,
    .article-toc-desktop-toggle:focus-visible {
        color: #fff;
        background: #2563eb;
        outline: none;
    }

    .article-toc-desktop-toggle:focus-visible {
        box-shadow: 0 0 0 3px rgba(147, 197, 253, .55), 8px 12px 28px rgba(15, 23, 42, .14);
    }

    .article-toc-desktop-toggle__icon {
        width: 18px;
        height: 18px;
        transition: transform .2s ease;
    }

    .article-toc-desktop-toggle[aria-expanded="false"] .article-toc-desktop-toggle__icon {
        transform: rotate(180deg);
    }

    .article-page-toc::-webkit-scrollbar {
        width: 4px;
    }

    .article-page-toc::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 999px;
    }

    .article-toc-title {
        margin: 0 0 12px 18px;
        font-size: 14px;
        line-height: 1.4;
        font-weight: 700;
        color: #0f172a;
    }

    .article-toc-list {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .article-toc-link {
        display: block;
        width: 100%;
        margin: 0;
        padding: 8px 10px 8px 18px;
        border: 0;
        border-left: 3px solid transparent;
        background: transparent;
        color: #475569;
        cursor: pointer;
        font-size: 12px;
        line-height: 1.42;
        font-weight: 400;
        text-align: left;
        overflow-wrap: anywhere;
        transition: color .18s ease, background-color .18s ease, border-color .18s ease;
    }

    .article-toc-link:hover,
    .article-toc-link:focus-visible {
        color: #1d4ed8;
        background: #f8fafc;
        outline: none;
    }

    .article-toc-link.is-active {
        color: #2563eb;
        border-left-color: #2563eb;
        background: #dbeafe;
        font-weight: 600;
    }

    .article-mobile-toc-trigger {
        position: fixed;
        left: 0;
        top: 50%;
        z-index: 45;
        width: 42px;
        min-height: 92px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 0;
        border: 1px solid #bfdbfe;
        border-left: 0;
        border-radius: 0 8px 8px 0;
        color: #fff;
        background: #2563eb;
        box-shadow: 0 16px 36px rgba(15, 23, 42, .18);
        font-size: 13px;
        font-weight: 600;
        line-height: 1.15;
        transform: translateY(-50%);
        transition: background-color .2s ease, box-shadow .2s ease;
    }

    .article-mobile-toc-trigger:focus-visible {
        outline: 2px solid #93c5fd;
        outline-offset: 2px;
    }

    .article-mobile-toc-trigger svg {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
    }

    .article-mobile-toc-trigger span {
        writing-mode: vertical-rl;
        letter-spacing: 0;
    }

    .article-mobile-toc-backdrop {
        position: fixed;
        inset: 0;
        z-index: 58;
        background: rgba(15, 23, 42, .42);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .article-mobile-toc-trigger[hidden],
    .article-mobile-toc-backdrop[hidden],
    .article-mobile-toc-panel[hidden] {
        display: none !important;
    }

    .article-mobile-toc-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .article-mobile-toc-panel {
        position: fixed;
        left: 0;
        top: 72px;
        bottom: 56px;
        z-index: 59;
        width: min(82vw, 320px);
        display: flex;
        flex-direction: column;
        border-radius: 0 12px 12px 0;
        background: #f8fafc;
        box-shadow: 18px 0 48px rgba(15, 23, 42, .22);
        transform: translateX(-105%);
        transition: transform .24s ease;
    }

    .article-mobile-toc-panel.is-open {
        transform: translateX(0);
    }

    .article-mobile-toc-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 18px 12px;
        border-bottom: 1px solid #e2e8f0;
    }

    .article-mobile-toc-title {
        margin: 0;
        color: #0f172a;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.35;
    }

    .article-mobile-toc-close {
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        color: #334155;
        background: #fff;
    }

    .article-mobile-toc-close:focus-visible {
        outline: 2px solid #93c5fd;
        outline-offset: 2px;
    }

    .article-mobile-toc-close svg {
        width: 18px;
        height: 18px;
    }

    .article-mobile-toc-list {
        padding: 10px 12px max(18px, env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .article-mobile-toc-link {
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
        margin: 0;
        padding: 10px 12px;
        border: 0;
        border-left: 3px solid transparent;
        border-radius: 8px;
        background: transparent;
        color: #334155;
        font-size: 14px;
        line-height: 1.42;
        text-align: left;
        overflow-wrap: anywhere;
    }

    .article-mobile-toc-link.is-active {
        color: #1d4ed8;
        border-left-color: #2563eb;
        background: #dbeafe;
        font-weight: 600;
    }

    @media (min-width: 1024px) {
        .article-mobile-toc-trigger,
        .article-mobile-toc-backdrop,
        .article-mobile-toc-panel {
            display: none !important;
        }
    }

    @media (max-width: 1023px) {
        .article-page-toc,
        .article-toc-desktop-toggle {
            display: none !important;
        }
    }
