body {
    counter-reset: sidenote-counter;
}

.essays {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.essays li {
    margin: 0 0 0.75rem;
}

.essay__title {
    display: block;
    color: inherit;

    text-decoration-line: underline;
    text-decoration-style: wavy;
    text-decoration-color: var(--fg-color-transparent);
    text-decoration-thickness: from-font;
    transition: text-decoration-color 0.1s;
}

.essay__title:hover {
    text-decoration-color: var(--fg-color);
}

.text__ul {
    list-style-type: circle;
}

.text__ul li {
    margin: 0 0 0.25rem;
}

.text__sidenote {
    font-size: 0.75rem;

    position: relative;
    float: right;
    clear: right;

    box-sizing: border-box;
    padding: 0 4rem;

    width: calc((100vw - min(872px, 100vw) + 8rem) / 2);
    max-width: 436px;
    margin: 0.5rem 0 0.5rem calc(-1 * (100vw - min(872px, 100vw) + 8rem) / 2);
    left: min(calc((100vw - min(872px, 100vw) + 8rem) / 2), 436px);
    top: -0.5rem;
}

.text__sidenote::before {
    content: counter(sidenote-counter)". ";
    position: relative;
    vertical-align: baseline;
    font-size: 0.75rem;
    font-variant-numeric: lining-nums;
}

.text__sidenote--num {
    counter-increment: sidenote-counter;
}

.text__sidenote--num::after {
    content: counter(sidenote-counter);
    vertical-align: super;
    font-size: 0.75rem;
    line-height: 1;
}

@media(max-width: 1372px) {
    .text__sidenote {
        display: block;
        left: auto;
        top: auto;
        float: left;
        clear: both;
        width: 100%;
        max-width: none;
        margin: 0.5rem 0;
        padding: 0.75rem;
        box-sizing: border-box;
        background-color: var(--secondary-bg-color);
    }
}
