/* Floating ToC - minimal, variable-driven */
.ftoc {
    position: fixed;
    top: var(--ftoc-top, 140px);
    left: var(--ftoc-left, 24px);
    width: var(--ftoc-width, 240px);
    max-height: 75vh;
    overflow-y: auto;
    z-index: 999;
    font-size: var(--ftoc-font-size, 13px);
    line-height: 1.5;
    color: var(--ftoc-color, inherit);
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.ftoc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ftoc-item {
    margin: 0 0 8px 0;
    padding: 0;
}

.ftoc-item a {
    color: inherit;
    text-decoration: none;
    opacity: var(--ftoc-inactive-opacity, 0.5);
    transition: opacity 0.15s ease;
    display: block;
}

.ftoc-item a:hover {
    opacity: 1;
}

.ftoc-item.ftoc-active a {
    opacity: 1;
    font-weight: var(--ftoc-active-weight, inherit);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ftoc-h3 { padding-left: 12px; }
.ftoc-h4 { padding-left: 24px; }
.ftoc-h5 { padding-left: 36px; }
.ftoc-h6 { padding-left: 48px; }
