div.toc {

    &.main-toc {
        page: toc;
        break-after: page;
    }

    &:not(:has(ul li)) {
        page: unset;
        display: none;
    }

    & > ul {
        padding-left: 0;

        li {
            list-style: none;
            font-family: 'Lato', sans-serif;
            font-size: 16pt;

            a::before {
                color: var(--highlight-accent-color);
                content: target-text(attr(href), before) ' ';
            }

            a::after {
                color: black;
                content: ' ' leader(dotted) ' ' target-counter(attr(href), page);
            }
        }

        & > li {
            font-family: 'Lato Black', sans-serif;
            font-size: 18pt;
            margin-top: .5em;

            & > a {
                color: black;

                &::after {
                    content: leader(' ') target-counter(attr(href), page);
                    font-family: inherit;
                }
            }

            & > ul {
                padding-left: 0;
            }
        }
    }
}