.fhmt-toc-placeholder {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 22px 0;
}

.fhmt-toc-placeholder--moved {
    display: none;
}

.fhmt-toc {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #111;
    border-radius: 7px;
}

.fhmt-toc,
.fhmt-toc * {
    box-sizing: border-box;
}

.fhmt-toc__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 11px 14px;
    background: #fff;
    border-bottom: 1px solid #111;
    cursor: pointer;
    list-style: none;
}

.fhmt-toc__summary::-webkit-details-marker {
    display: none;
}

.fhmt-toc__summary::marker {
    content: "";
}

.fhmt-toc__summary::after {
    content: "+";
    display: inline-flex;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #111;
    border-radius: 50%;
}

.fhmt-toc[open] > .fhmt-toc__summary::after {
    content: "−";
}

.fhmt-toc__nav {
    display: block;
    margin: 0;
    padding: 11px;
}

.fhmt-toc:not([open]) > .fhmt-toc__nav {
    display: none;
}

.fhmt-toc__list,
.fhmt-toc__sublist {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fhmt-toc__item {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.fhmt-toc__item:last-child {
    margin-bottom: 0;
}

.fhmt-toc__link {
    display: block;
    margin: 0;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #222;
    border-radius: 5px;
    color: inherit;
    text-decoration: none;
}

.fhmt-toc__sublist {
    margin: 7px 12px 10px 0;
    padding: 0 12px 0 0;
    border-right: 1px solid #444;
}

.fhmt-toc__item--h3 .fhmt-toc__link {
    border-color: #777;
}

.fhmt-toc__link:hover,
.fhmt-toc__link:focus-visible {
    background: #eee;
    text-decoration: underline;
}

.fhmt-toc__summary:focus-visible,
.fhmt-toc__link:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.fhmt-toc--sidebar {
    position: sticky;
    top: 22px;
    margin: 0 0 18px;
}

.fhmt-toc--sidebar .fhmt-toc__summary {
    border-bottom: 1px solid #111;
}

@media (max-width: 1024px) {
    .fhmt-toc-placeholder {
        margin: 18px 0;
    }
}
