/*
 * Table of contents
 */

#toc ul, #toc li {
    list-style: none;
    margin: 0;
    padding: 0;
}

#toc a {
    color: black;
    text-decoration: none;
}

#toc .toc-0 {
    font-weight: bold;
    margin-top: 1em;
}

#toc .toc-2 {
}

#toc .toc-3 {
}

#toc .toc-4 {
}


#toc a.toc-0::before {
    font-style: normal;
    content: target-counter(attr(href), c1) ' ';
}

#toc a.toc-1::before {
    font-style: normal;
    content: target-counter(attr(href), c1) '.' target-counter(attr(href),  c2) ' ';
}

#toc a.toc-2::before {
    font-style: normal;
    content: target-counter(attr(href), c1) '.' target-counter(attr(href),  c2) '.' target-counter(attr(href),  c3) ' ';
}

#toc a.toc-3::before {
    font-style: normal;
    content: target-counter(attr(href), c1) '.' target-counter(attr(href),  c2) '.' target-counter(attr(href),  c3) '.' target-counter(attr(href),  c4) ' ';
}

#toc a.toc-4::before {
    font-style: normal;
    content: target-counter(attr(href), c1) '.' target-counter(attr(href),  c2) '.' target-counter(attr(href),  c3) '.' target-counter(attr(href),  c4) '.' target-counter(attr(href), c5) ' ';
}

#toc a.toc-5::before {
    font-style: normal;
    content: target-counter(attr(href), c1) '.' target-counter(attr(href),  c2) '.' target-counter(attr(href),  c3) '.' target-counter(attr(href),  c4) '.' target-counter(attr(href), c5) '.' target-counter(attr(href), c6) ' ';
}


#toc a::after {
    content: leader('.') target-counter(attr(href), page);
    font-style: normal;
}



/* 
 * Page numbers in TOC
 */

#table-of-contents-heading {
    font-size: 2.5em;
    padding-bottom: 1em;
}

@page inhalt {

    @bottom {
        content: counter(page, upper-roman);
    }

    @bottom-right {
        content: " " ;
    }

    @bottom-left {
        content: " " ;
    }
}

#table-of-contents {
    page: inhalt;
    page-break-before: avoid;
}
