/* TABLE OF CONTENTS */
:root {
    padding-top: var(--text-size)
}

#letterform-through-lexicon {
    background: linear-gradient(
        0deg,
        var(--backgroundtrans) 0%,
        var(--backgroundcol) 16%,
        var(--backgroundcol) 95%,
        var(--backgroundtrans) 100%
    );
}

#letterform-through-lexicon h2 {
    /* font-variant-caps: unset;*/
    font-feature-settings: "smcp" 0; 
    font-style: italic;
    letter-spacing: 0rem;
}

#letterform-through-lexicon h2::first-letter {
    font-feature-settings: "swsh" 1;
}

#letterform-through-lexicon p {
    transition: all 400ms cubic-bezier(0.56, 0.01, 0.31, 0.99);
    color: #c8c8c6;
    cursor: pointer;

    width: 85%;
    margin: 0;
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
    text-indent: 2rem;
    /* background: var(--backgroundcol); */
    outline: var(--backgroundtrans) 1px solid;
}

#letterform-through-lexicon h2 {
    background: var(--backgroundcol);
}

.sidenote {
    transition: all 160ms cubic-bezier(0.56, 0.01, 0.31, 0.99);
    /* transform: translate(0, 0.2rem); */
}

#letterform-through-lexicon {
    display: block;
    float: right;
    position: sticky;
    top: 1rem;
    position: -webkit-sticky;
    left: 1rem;
    clear: both;
    margin-top: 0;
    width: 42.3%;
    z-index: 2;
}

#letterform-through-lexicon .current-section {
    text-indent: 0rem;
    opacity: 100%;
    color: black;

    /* outline: 1px solid black; */
}

/* make these invisible while not scrolled on them */
#letterform-through-lexicon p:nth-child(8) ~ p {
    display:none !important;
}

/* works but only somewhat  */
@media (min-width: 1000px) {
    #letterform-through-lexicon {
        padding-bottom: 6rem;
    }

    .current-section {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .current-section:nth-of-type(1) {
        padding-top: 0rem !important;
    }

    .current-section + .current-section {
        margin-top: -0.9rem !important;
        padding-top: 0.1rem !important;
        padding-bottom: 0.9rem !important;
    }

    #letterform-through-lexicon p:hover {
        color: green;
        opacity: 100%;
    }
}

@media (max-width: 999px) and (min-width: 761px) {
    #letterform-through-lexicon p {
        width: 55%;
    }

    #letterform-through-lexicon h2 {
        width: 55%;
    }
}

@media (max-width: 760px) {
    #letterform-through-lexicon p {
        width: 100%;
    }
}

@media (max-width: 1000px) {
    #letterform-through-lexicon {
        margin-top: 0;
        padding-top: 0;
        background: none;
        display:block;
        float: unset;
        position: sticky;
        top: 1rem;
        width: unset;
    }

    /* stop JS TOC behaviour in mobile view */
    .current-section {
        text-indent: 0rem;
        opacity: 100%;
        color: var(--backgroundcol) !important;
        background: black !important;
    }

    #letterform-through-lexicon p {
        outline: 1px solid black;
        padding-top: 2vh;
        padding-bottom: 2vh;
        text-indent: 0rem;
        color: black;
    }

    #letterform-through-lexicon h2 {
        margin-top: 0;
        margin-bottom: 0;
        padding: 1rem 0 1rem 0;
        text-align: center;
        outline: 1px solid black;
        cursor: pointer;
    }

    #letterform-through-lexicon p {
        background: var(--backgroundcol);
        text-align: center;
        display:none;
    }

    .showTOC {
        display:block !important;
        position:relative;
    }

    .addOpacity {
        opacity: 100% !important;
    }
}

/* BIBLIOGRAPHY */
#bibliography > p {
    text-indent: 2rem hanging;
}

/* Break links to avoid messing up page width on mobile */
#bibliography a {
        word-break: break-all;
        overflow-wrap: break-word;
}

#bibliography h3 {
    font-feature-settings: "swsh" 0 !important;
}



.key-indicator {
    font-feature-settings: "sups" 1;
}
@media (max-width: 760px) {
    .key-indicator {
        display:none;
    }
}