/* The contents drawer uses the same serif hierarchy as the reading column. */
nav#toc {
    font-family: var(--text-font-family);
    color: var(--text-color);
}

nav#toc h1 {
    margin: 0 0 0.8em;
    padding-bottom: 0.45em;
    border-bottom: 1px solid var(--rule-color);
    font-size: 1.15em;
    font-weight: 600;
}

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

nav#toc .block {
    width: fit-content;
    padding: 0;
    border: 0;
}

/* More specific than the .block reset: every nested list owns its indent,
 * including deeper headings. Do not override Typsite's display:none for
 * embeds that intentionally expose only their title.
 */
nav#toc li > ul.block:has(> li) {
    margin: 0.3em 0 0.6em 0.35em;
    padding-inline-start: 1.2em;
    border-inline-start: 1px solid var(--rule-color);
}

nav#toc .item-summary {
    margin: 0.3em 0;
}

nav#toc .item-summary:has(> ul > li) > .link > a {
    font-weight: 600;
}

nav#toc .bullet {
    margin-right: 0.35em;
    color: var(--slug-color);
}

nav#toc .heading-numbering {
    color: var(--slug-color);
    font-weight: 400;
}

nav#toc .toc-taxon {
    color: var(--span-taxon-color);
    font-weight: 600;
}

nav#toc .toc-taxon:not(:has(~ .heading-numbering:not(:empty)))::after {
    content: ".";
}

nav#toc .link > a {
    text-decoration: none;
}

nav#toc .link > a:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
}
