/* popup-toc — the side TOC. Desktop affordance only (Medium-style): hidden
 * below 1200px. Neutral grays + the theme's own accent via currentColor so
 * it sits quietly on light and dark shells alike. */
.ptoc {
    display: none;
}

@media (min-width: 1200px) {
    .ptoc {
        display: block;
        position: fixed;
        top: 110px;
        right: 18px;
        width: 210px;
        max-height: 70vh;
        overflow-y: auto;
        font: 12px/1.5 system-ui, sans-serif;
        border-left: 2px solid #ddd;
        padding-left: 12px;
        z-index: 50;
    }
    .ptoc ul { list-style: none; margin: 0; padding: 0; }
    .ptoc li { margin: 2px 0; }
    .ptoc-l3 { padding-left: 12px; }
    .ptoc a {
        color: #777;
        text-decoration: none;
        display: block;
        padding: 1px 6px;
        border-left: 2px solid transparent;
        margin-left: -14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .ptoc a:hover { color: #222; }
    .ptoc a.ptoc-active {
        color: #111;
        border-left-color: var(--ptoc-accent, currentColor);
        font-weight: 600;
    }
    .ptoc-heading { scroll-margin-top: 80px; }
}
