@keyframes openSearch {
    from {width: 2.5em}
    to {width: calc(100% - 1.5em)}
}

@keyframes closeSearch {
    from {width: calc(100% - 1.5em)}
    to {width: 2.5em}
}

@keyframes stretchSearch {
    from {opacity: 0; transform: scale(0,1)}
    to {opacity: 1; transform: scale(1,1)}
}

@keyframes squeezeSearch {
    from {opacity: 1; transform: scale(1,1)}
    to {opacity: 0; transform: scale(0,1)}
}

@keyframes stretchSearchX {
    from {opacity: 0; margin: 0; transform: scale(0,1)}
    to {opacity: 1; margin: var(--border-width); transform: scale(1,1)}
}

@keyframes squeezeSearchX {
    from {opacity: 1; margin: var(--border-width); transform: scale(1,1)}
    to {opacity: 0; margin: 0; transform: scale(0,1)}
}

@keyframes fadeSearch {
    from {opacity: 1}
    to {opacity: 0}
}

@keyframes unFadeSearch {
    from {opacity: 0}
    to {opacity: 1}
}

@keyframes openMenu {
    from {
        width: 2.5em;
        height: 2.5em;
        padding: 0;
        margin: 0.75em;
    }

    to {
        width: calc(100% - 1.5em);
        height: calc(100% - 1.5em);
        padding: 1.5em 5em 1.5em 2.5em;
        margin: 0.75em;
    }
}

@keyframes closeMenu {
    from {
        width: calc(100% - 1.5em);
        height: calc(100% - 1.5em);
        padding: 1.5em 5em 1.5em 2.5em;
        margin: 0.75em;
    }

    to {
        width: 2.5em;
        height: 2.5em;
        padding: 0;
        margin: 0.75em 0.75em 0 0;
    }
}

@keyframes fadeinMenu {
    from {opacity: 0}
    to {opacity: 1}
}

@keyframes fadeoutMenu {
    from {opacity: 1}
    to {opacity: 0}
}

@keyframes stretchMenu {
    from {opacity: 0; transform:scale(0,0)}
    to {opacity: 1; transform:scale(1,1)}
}

@keyframes squeezeMenu {
    from {opacity: 1; transform:scale(1,1)}
    to {opacity: 0; transform:scale(0,0)}
}

html {
    font-size: 20px;
    background-color: var(--background);
    --box-shadow: 0 0 0.75em var(--level-one);

    --border-width: 2px;
    --border-radius: 5px;
    --border-radius-menu: 1.25em;
    --fade-time: .1s;
    --animation-time: .3s;

    --font: #000000;
    --accent: #ff627c;
    --accent2: #ffbac6;
    --background: #faf7f4;
    --background-rgba: #faf7f480;
    --level-one: #cccccc;
    --level-two: #a0a0a0;
    --level-three: #888888;
}

html.theme-dark {
    --font: #dddddd;
    --accent: #a70a25;
    --accent2: #744049;
    --background: #060400;
    --background-rgba: #06040080;
    --level-one: #333333;
    --level-two: #555555;
    --level-three: #888888;
}

body {
    background-color: var(--background);
    transition: background-color var(--fade-time) ease-in-out;
    margin: 0;
    container: body / inline-size;
    position: relative
}

@container header (width <= 50em) {
    #body.open {overflow: hidden}
}

@font-face {
    font-family: Afacad;
    src: url(fonts/Afacad.ttf);
}

h1, h2, h3, p,  a, li, blockquote {
    color: var(--font);
    transition: color var(--fade-time) ease-in-out;
}

h1,h2 {
    font-family: "Afacad";
    margin: 0;
    font-weight: 700;
}

h1 {
    text-align: center;
    padding: 1rem 1rem 0;
    font-size: 2rem;
}

h2 {
    padding: 1rem 0.5rem 0;
    font-size: 1.4rem;
}

p, li, a, h3, div {
    font-size: 1rem;
    font-family: "Afacad";
}

p, ul, li {margin: 0.75em 0}

ul {padding-left: 1.5em}

a {text-decoration: none}
a:hover {text-decoration: underline;}

a:active {
    color: var(--accent);
    transition: none;
}

button, .btn {
    background-color: var(--background);
    border-radius: var(--border-radius);
    color: var(--font);
    border: solid var(--border-width) var(--level-one);
    font-size: .9rem;
    font-family: "Afacad";
    padding: 0.25em 0.75em;
    transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out, color var(--fade-time) ease-in-out, fill var(--fade-time) ease-in-out;
}

button:hover, .btn:hover {
    background-color: var(--level-one);
    cursor: pointer;
}

button:active, .btn:active {
    background-color: var(--accent);
    transition: none;
    border: solid var(--border-width) var(--accent);
}

.subtitle {
    padding: 0 0.75em;
    margin: 0 auto 2em;
    text-align: center
}

#header {
    box-sizing: border-box;
    background-color: var(--background);
    transition: background-color var(--fade-time) ease-in-out;
    display: flex;
    flex-wrap: wrap;
    container: header / inline-size;

    #header-top {
        box-sizing: border-box;
        width: 100%;
        height: 4em;
        display: flex;
        justify-content: space-between;
        border-bottom: solid var(--border-width) var(--level-one);
        transition: background-color var(--fade-time) ease-in-out, border var(--fade-time) ease-in-out;;
        background-color: var(--background);

        #header-left {
            display: flex;

            @container header (width > 35em) {
                box-sizing: border-box;
                flex-direction: row-reverse;
                justify-content: left;
                padding-left: 1.25em;
            }

            @container header (width <= 50em) and (width > 35em) {width: calc(100% - 2.75em)}
            @container header (width > 50em) {width: calc(100% - 10em)}

            #logo-div {
                display: flex;
                align-items: center;
                box-sizing: border-box;

                h3 {
                    margin: 0;
                    white-space: nowrap;
                }

                h3:hover {text-decoration: none}

                h3:active {color: var(--accent)}

                @container header (width <= 35em) {
                    width: 100%;
                    height: 4em;
                    padding: 0.75em 4em;
                    margin: auto;
                    position: absolute;
                    top: 0;
                    left: 0;
                    justify-content: center;
                }
            }

            #logo-div.search {
                @container header (width <= 35em) {
                    opacity: 0;
                    animation-name: fadeSearch;
                    animation-duration: var(--animation-time);
                }
            }

            #logo-div.unsearch {
                @container header (width <= 35em) {
                    opacity: 1;
                    animation-name: unFadeSearch;
                    animation-duration: var(--animation-time);
                }
            }

            #logo-div.searching {@container header (width <= 35em) {display: none}}

            #search-submit {
                display: none;
                width: calc(2.5em - var(--border-width) - var(--border-width));
                height: calc(2.5em - var(--border-width) - var(--border-width));
                z-index: 100;
                border: none;
                padding: 0;
                border-radius: 50%;
            }

            #search-submit.open {
                display: grid!important;

                svg {
                    width: 1.5em;
                    height: 1.5em;
                    fill: var(--font);
                    place-self: center;
                }
            }

            #search-submit:hover {cursor: pointer}

            #search-div {
                margin: 0.75em 0.75em 0;
                align-self: flex-start;
                display: flex;
                align-items: center;
                flex-direction: column;
                container: search-div / inline-size;
                z-index: 50;
                border: solid var(--border-width) var(--level-one);
                border-radius: var(--border-radius-menu);
                background-color: var(--background);
                transition: background-color var(--fade-time) ease-in-out, border var(--fade-time) ease-in-out;
                
                @container header (width <= 50em) {margin-right: 0.75em}

                @container header (width > 35em) {
                    width: 100%;
                    max-width: 40em;
                }

                @container header (width <= 35em) {
                    width: 2.5em;
                    margin: 0;
                    position: absolute;
                    top: 0;
                    left: 0;
                    margin: 0.75em;
                }

                mark {
                    color: var(--font);
                    background-color: var(--accent)
                }

                mark.mark-excerpt {background-color: var(--accent2)}

                #search-button {
                    box-sizing: border-box;
                    width: 100%;
                    height: 2.5em;
                    display: flex;
                    align-items: center;
                    padding: 0 var(--border-width);
                    transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out;
                    z-index: 101;

                    .search-svg-div {
                        background-color: var(--background);
                        border-radius: 50%;
                        width: calc(2.25em - var(--border-width) - var(--border-width));
                        height: calc(2.25em - var(--border-width) - var(--border-width));
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        transition: background-color var(--fade-time) ease-in-out;
                        margin: 0;
                        flex-shrink: 0;

                        .search-svg {
                            fill: var(--font) !important;
                            display: block;
                            width: 0.75em;
                            height: 0.75em;
                            transition: fill var(--fade-time) ease-in-out;
                        }

                        @container header (width <= 35em) {
                            transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out;
                        }
                    }

                    .search-svg-div:hover {cursor: pointer}

                    #search-x-svg-div:hover {background: var(--level-one)}

                    #search-x-svg-div:active {
                        background: var(--accent);
                        transition: none;
                    }

                    @container header (width <= 35em) {
                        #search-x-svg-div {
                            width: 0;
                            margin: 0;
                            transform: scale(0,1);
                        }

                        #search-x-svg-div.open {
                            transform: scale(1,1);
                            transform-origin: right;
                            width: calc(2.25em - var(--border-width) - var(--border-width));
                            animation-name: stretchSearchX;
                            animation-duration: var(--animation-time);
                        }

                        #search-x-svg-div.is-open {
                            transform: scale(1, 1);
                            transform-origin: right;
                            width: calc(2.25em - var(--border-width) - var(--border-width));
                            margin: var(--border-width);
                        }

                        #search-x-svg-div.close {
                            transform: scale(0,1);
                            transform-origin: right;
                            margin: 0;
                            animation-name: squeezeSearchX;
                            animation-duration: var(--animation-time);
                        }
                    }

                    .searching-row {
                        flex-grow: 1;

                        .search-bar {
                            box-sizing: border-box;
                            background: none;
                            border: none;
                            font-size: 1rem;
                            font-family: "Afacad";
                            color: var(--font);
                            outline: none !important;
                            height: 2.5em;
                            padding: 0 5px;
                            width: 100%;

                            @container header (width <= 35em) {
                                width: 0;
                                margin: 0;
                                transform: scale(0,1);
                            }
                        }

                        .search-bar.open {
                            @container header (width <= 35em) {
                                transform: scale(1,1);
                                transform-origin: left;
                                width: 100%;
                                animation-name: stretchSearch;
                                animation-duration: var(--animation-time);
                            }
                        }

                        .search-bar.is-open {
                            transform: scale(1, 1);
                            transform-origin: left;
                            width: 100%;
                        }

                        .search-bar.close {
                            @container header (width <= 35em) {
                                transform: scale(0,1);
                                animation-name: squeezeSearch;
                                animation-duration: var(--animation-time);
                            }
                        }

                        .search-bar::placeholder {
                            color: var(--level-two);
                            transition: color var(--fade-time) ease-in-out;
                            opacity: 1; /* Firefox */
                        }

                        .search-bar.results {
                            border-bottom-left-radius: 0;
                            border-bottom-right-radius: 0;
                            border-bottom: none;
                        }
                    }
                }

                #search-button.none {border-radius: var(--border-radius-menu)}

                #search-button.results {
                    border-bottom-color: var(--background);
                    border-bottom-left-radius: 0;
                    border-bottom-right-radius: 0;
                }

                #search-button.default, #search-button.close {
                    @container header (width <= 35em) {border-radius: var(--border-radius-menu)}
                }

                #livesearch {
                    display: none;
                    box-sizing: border-box;
                    border-bottom-left-radius: var(--border-radius-menu);
                    border-bottom-right-radius: var(--border-radius-menu);
                    color: var(--font);
                    font-family: "Afacad";
                    max-height: calc(100vh - 4em);
                    overflow-y: scroll;
                    overscroll-behavior: contain;

                    .status {
                        margin: 0 2.25em 1em;
                        font-size: 0.8em;
                        color: var(--level-three)
                    }

                    .status.no-results {
                        margin: 0 2.25em;
                        font-size: 0.8em;
                        color: var(--level-three)
                    }

                    .result {
                        display: flex;
                        padding: 0.5em 0.25em;
                        border-radius: var(--border-radius);
                        transition: background-color var(--fade-time) ease-in-out;
                        overflow: hidden;

                        svg {
                            fill: var(--font);
                            width: 1.25em;
                            height: 1.25em;
                            transition: fill var(--fade-time) ease-in-out;
                            grid-column: 1 / 2;
                            flex-shrink: 0;
                        }

                        .result-path {
                            font-size: 0.8em;
                            color: var(--level-three);
                            display: flex;
                            align-items: center;

                            svg {
                                font-size: 0.9em;
                                fill: var(--level-two);
                                margin-right: 0.25em
                            }
                        }

                        .result-text {
                            display: flex;
                            flex-direction: column;
                            margin-left: 0.5em;
                            overflow: hidden;

                            p {margin: 0}

                            .result-excerpt {
                                font-size: 0.8em;
                                color: var(--level-three);
                                white-space: nowrap;
                                overflow: hidden;
                                text-overflow: ellipsis;
                            }
                        }
                    }

                    .result:last-child {
                        border-bottom-left-radius: .85em;
                        border-bottom-right-radius: .85em;
                    }

                    .result:hover, .result:active {
                        color: var(--font);
                        text-decoration: none;
                        background-color: var(--level-one);
                        transition: background-color var(--fade-time);
                    }

                    .result-separator {
                        height: var(--border-width);
                        width: calc(100% - 4.25em);
                        background-color: var(--level-one);
                        margin: 0.75em auto
                    }
                }

                #livesearch.results {
                    display: block;
                    padding: var(--border-width) calc(0.5em - var(--border-width)) calc(0.5em - var(--border-width));
                    

                    @container search-div (width > 0) {width: 100cqi}
                }
            }

            #search-div.default {
                @container header (width <= 35em) {#livesearch {display: none}}
            }

            #search-div.open {
                @container header (width <= 35em) {
                    width: calc(100% - 1.5em);
                    animation-name: openSearch;
                    animation-duration: var(--animation-time);

                    #livesearch { width: 100%; }
                }
            }

            #search-div.is-open {
                @container header (width <= 35em) {
                    width: calc(100% - 1.5em);

                    #livesearch {width: 100%}
                }
            }

            #search-div.close {
                @container header (width <= 35em) {
                    width: 2.5em;
                    animation-name: closeSearch;
                    animation-duration: var(--animation-time);

                    #livesearch {display: none}
                }
            }

            #search-div:focus-within {box-shadow: var(--box-shadow);}
        }

        #header-right {
            display: flex;
            align-items: center;

            .header-menu {
                display: flex;
                align-items: center;
                margin-left: 1em;

                a {margin-right: 1.25em}
            }

            @container header (width <= 50em) {.header-menu {display: none}}
        }

        #header-right.search {
            @container header (width <= 50em) {display: none;}
        }
    }

    #header-top.results {
        position: fixed;
        top: 0;
        left: 0;
        right: 0
    }

    #header-bottom.results {
        margin-top: 4em
    }

    #header-bottom {
        box-sizing: border-box;
        width: 100%;
        min-height: 2.8em;
        display: flex;
        padding: .5em 0.75em;
        border-bottom: solid var(--border-width) var(--level-one);
        transition: border-color var(--fade-time) ease-in-out;

        .breadcrumbs {
            display: flex;
            gap: 0.5em;
            flex-wrap: wrap;
            font-size: 1rem;
            align-items: center;
            color: var(--font);
            transition: color var(--fade-time) ease-in-out;

            .crumb {
                display: flex;
                align-items: center;
            }

            p {
                margin: 0;
                font-size: 0.9rem;
            }

            .crumb-arrow {
                font-size: 1rem;
                font-family: "Afacad";
                user-select: none;
            }
        }
    }
}

.home #header-bottom {display: none!important}

.home #logo-div h3, .philosophy .u-philosophy, .race .u-race, .society .u-society, .theory .u-theory, .war .u-war {
    text-decoration: underline;
}

.home #logo-div h3:hover, .home #logo-div a, .philosophy .u-philosophy:hover, .race .u-race:hover, .society .u-society:hover, .theory .u-theory:hover, .war .u-war:hover {
    text-decoration: none!important;
    text-decoration-color: var(--accent);
}

@container header (width > 50em) {
    #mm, #mm-default {
        display: none;
    }
}

#mm {
    z-index: 103;

    #mm-button {
        box-sizing: border-box;
        width: 2.5em;
        height: 2.5em;
        background-color: var(--background);
        border: solid var(--border-width) var(--level-one);
        border-radius: var(--border-radius-menu);
        margin: 0 0.75em 0 0;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out;

        .mm-svg {
            fill: var(--font) !important;
            transition: fill var(--fade-time) ease-in-out
        }

        @container header (width <= 50em) {
            #mm-open-svg.open, #mm-x-svg.close, #mm-x-svg.default {display: none!important}

            #mm-open-svg {
                cursor: pointer;
                width: 1em
            }

            #mm-open-svg.default {display: block}

            #mm-open-svg.close {
                display: block !important;
                position: fixed !important;
                top: 0;
                right: 0;
                padding: 0.75em;
                margin: 0.75em 0.75em 0 0;
            }

            #mm-x-svg.open {
                display: block;
                position: fixed !important;
                top: 0;
                right: 0;
                margin: 0.875em 0.875em 0 0;
                width: 0.75em;
                height: 0.75em;
                padding: 0.75em;
                cursor: pointer
            }
        }

        #mm-menu {
            .mm-menu-header {
                display: flex;
                align-items: center;

                svg {
                    fill: var(--font);
                    width: 1em;
                    margin: 0.15em 0.5em 0 0
                }

                h2 {
                    margin: 0.25em 0;
                    padding: 0.5em 0;
                }
            }

            h3.final {margin-bottom: 2.5em}
            
            a {margin: 0}

            p {margin: 0.5em 0}
        }

        #mm-menu.open {
            @container header (width <= 50em) {
                display: flex;
                flex-direction: column;
                width: 100%;
                height: 100%;
                transform: scale(1,1);
                transform-origin: top right;
                animation-name: stretchMenu;
                animation-duration: var(--animation-time);
            }
        }

        #mm-menu.close {
            transform: scale(0,0);
            animation-name: squeezeMenu;
            animation-duration: var(--animation-time);
        }

        #mm-menu.default {display: none;}
    }

    #mm-button.default {cursor: pointer}

    @container header (width <= 50em) {
        #mm-button.open {
            display: block;
            position: fixed;
            top: 0;
            right: 0;
            z-index: 103;
            width: calc(100% - 1.5em);
            height: calc(100% - 1.5em);
            margin: 0.75em;
            padding: 1.5em 2.5em;
            background: var(--background);
            border: solid var(--border-width) var(--level-one);
            border-radius: var(--border-radius-menu);
            overflow: scroll;
            animation-name: openMenu;
            animation-duration: var(--animation-time);
            box-shadow: var(--box-shadow);
        }

        #mm-placeholder.open {
            display: block;
            width: 2.5em;
            height: 2.5em;
            margin-right: 0.75em;
        }

        #mm-placeholder.default {display: none;}

        #mm-background.open {
            display: block;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: var(--background-rgba);
            z-index: 102;
            animation-name: fadeinMenu;
            animation-duration: var(--animation-time);
        }

        #mm-background.close {
            animation-name: fadeoutMenu;
            animation-duration: var(--animation-time);
        }

        #mm-background.default {display: none}
    }

    #mm-button.close {
        animation-name: closeMenu;
        animation-duration: var(--animation-time);
        width: 2.5em;
        height: 2.5em;
        padding: 0;
        margin-right: 0.75em;
    }
}

@container header (width <= 35em) {
    #mm.search {
        opacity: 0;
        animation-name: fadeSearch;
        animation-duration: var(--animation-time);
    }

    #mm.unsearch {
        opacity: 1;
        animation-name: unFadeSearch;
        animation-duration: var(--animation-time);
    }

    #mm.searching {display: none}
}

.home #header-top.results {position: relative!important}

#content {
    box-sizing: border-box;
    background: var(--background);
    transition: background-color var(--fade-time) ease-in-out;
    padding-bottom: 2em;
    container: content / inline-size;

    @container body (width > 50em) {
        min-height: calc(100vh - 10.95em) !important;
    }

    @container body (width > 30em) and (width <= 50em) {
        min-height: calc(100vh - 13.95em) !important;
    }

    @container body (width <= 30em) {
        min-height: calc(100vh - 15.45em) !important;
    }
}

.home #content {
    @container body (width > 50em) {
        min-height: calc(100vh - 8em) !important;
    }

    @container body (width > 30em) and (width <= 50em) {
        min-height: calc(100vh - 11em) !important;
    }

    @container body (width <= 30em) {
        min-height: calc(100vh - 12.5em) !important;
    }
}

#footer {
    box-sizing: border-box;
    position: relative;
    background-color: var(--background);
    transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out;
    display: flex;
    border-top: solid var(--border-width) var(--level-one);
    container: footer / inline-size;

    @container body (width > 50em) {
        height: 4em;
        justify-content: space-between;
        align-items: center;
    }

    @container body (width > 30em) and (width <= 50em) {
        height: 7em;
        justify-content: center;
    }

    @container body (width <= 30em) {
        flex-direction: column-reverse;
        justify-content: flex-end;
        height: 8.5em;
    }

    #footer-left {
        display: flex;
        align-items: center;

        @container footer (width > 50em) {z-index: 21}

        .copyright {
            font-size: 0.8em;
            margin: 0 0 0 1.25em;
            cursor: default;
            color: var(--level-three);
        }

        #theme-button {
            font-size: 1rem;
            display: flex;
            align-items: center;
            margin-left: 1em;

            svg {
                fill: var(--font);
                transition: fill var(--fade-time) ease-in-out
            }

            svg.dark {
                display: inline;
                width: 1.25em;
            }

            svg.light {
                display: none;
                margin: 0.125em;
                width: 1em;
            }
        }

        #theme-button.dark {
            svg.dark {display: none}
            svg.light {display: inline}
        }

        @container footer (width > 30em) and (width <= 50em) {
            box-sizing: border-box;
            height: 3em;
            padding-top: 0.5em;

            .copyright {
                margin: 0
            }
        }

        @container body (width <= 30em) {
            justify-content: center;
            padding: 0.75em 1.25em 0;

            .copyright {margin: 0}
        }
    }

    #footer-center {
        display: flex;
        justify-content: center;
        align-items: center;
        height: calc(4em - var(--border-width));
        position: absolute;
        bottom: 0;
        margin: auto;
        width: 100%;
        z-index: 20;

        @container footer (width <= 30em) {
            box-sizing: border-box;
            padding: 0 4.375em 0 1.25em
        }

        .min {
            display: flex;
            align-items: center;
            user-select: none;

            span {
                color: var(--level-three);
                font-size: 0.7rem;
                margin-bottom: 0.25em
            }
        }

        .max {
            display: flex;
            align-items: center;
            user-select: none;

            span {
                color: var(--level-three);
                font-size: 1.2rem;
                margin-bottom: 0.125em
            }
        }

        #font-slider {
            display: flex;
            align-items: center;
            width: 300px;
            gap: 0.5em;
            position: relative;
            margin: 0 0.75em;

            #bubble {
                display: none;
                position: absolute;
                margin-left: -1em;
                bottom: calc(100% + 0.5em);
                width: 2em;
                height: 1.5em;
                background: var(--level-one);
                display: flex;
                justify-content: center;
                align-items: center;
                border-radius: var(--border-radius);
            }
            
            #bubble span {
                text-align: center;
                color: var(--font);
                font-size: 0.9rem;
                position: absolute;
                top: 0.1rem;
                left: 50%;
                transform: translate(-50%, 0);
            }

            input[type=range] {
                appearance: none;
                -webkit-appearance: none;
                width: 100%; /* Firefox. */
                background: transparent;
                transition: var(--fade-time) ease-in-out;
            }
            
            input[type=range]::-webkit-slider-thumb {
                -webkit-appearance: none;
            }
            
            input[type=range]:focus {
                outline: none;
            }

            /* WebKit/Blink */
            input[type=range]::-webkit-slider-thumb {
                border: none;
                height: 1.25em;
                width: 1.25em;
                background: var(--font);
                border: solid var(--border-width) var(--font);
                border-radius: var(--border-radius);
                transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out;
                cursor: pointer;
                margin-top: -8px; /* Chrome */
            }

            /* Firefox */
            input[type=range]::-moz-range-thumb {
                border: none;
                height: 1.25em;
                width: 1.25em;
                background: var(--font);
                border: solid var(--border-width) var(--font);
                border-radius: var(--border-radius);
                transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out;
                cursor: pointer;
            }

            input[type=range]::-webkit-slider-runnable-track {
                width: 100%;
                height: 0.25em;
                cursor: pointer;
                background-color: var(--background);
                border: solid var(--border-width) var(--level-one);
                transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out;
                border-radius: 0.25em
            }

            input[type=range]::-moz-range-track {
                width: calc(100% - 2px);
                height: 0.25em;
                cursor: pointer;
                background-color: var(--background);
                border: solid var(--border-width) var(--level-one);
                transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out;
                border-radius: 0.25em;
            }
        }

        #valueBox {
            width: 70px;
            padding: 8px;
            color: var(--font);
            background: var(--background);
            border: solid var(--border-width) var(--level-one);
            border-radius: var(--border-radius);
            text-align: center;
            font-size: 1rem;
            appearance: textfield
        }

        #valueBox::-webkit-inner-spin-button,#valueBox::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        p {
            color: var(--level-three);
            font-size: 0.9rem;
            margin: 0
        }

        #listen {
            display: flex;
            justify-content: center;

            input {
                width: calc(100% - 175px);
                height: 2.25em;
                margin: 0;
            }
        }
    }

    #footer-right {
        display: flex;
        align-items: center;

        @container footer (width > 50em) {
            z-index: 21;
            margin-right: 4.5em;
        }

        @container footer (width > 30em) and (width <= 50em) {
            box-sizing: border-box;
            height: 3em;
            padding-top: 0.5em;
            margin-left: 1em
        }

        @container body (width <= 30em) {
            justify-content: center;
            margin: 0;
            padding: 0.75em 1.25em 0;

            a:first-child {margin: 0!important}
        }

        .footer-menu {
            display: flex;
            align-items: center;

            a {margin-left: 1.25em}
        }
    }

    #up-btn {
        position: fixed;
        bottom: 1.0625em;
        right: 1.25em;
        z-index: 22;

        button {
            box-sizing: border-box;
            width: 2em;
            height: 2em;
            display: flex;
            padding: 0.6em;

            svg {
                fill: var(--font);
                transition: fill var(--fade-time) ease-in-out;
            }
        }
    }
}

.about-div {
    box-sizing: border-box;
    max-width: 55em;
    padding: 1em 0.75em 0;
    margin: auto;

    .about-text {
        padding: 0.25em 1em;
        border: solid var(--border-width) var(--level-one);
        transition: border var(--fade-time) ease-in-out;

        h3 {margin-top: 0.5em}
        a {text-decoration: underline}
        a:hover {text-decoration: none;}
    }
}

.folders-title, .files-title {
    display: flex;
    flex-wrap: wrap;
    padding: 0 0.75em;
    gap: 0.5em;

    h2 {padding: 0 0 0 0.25em}

    button {
        font-size: 1rem;
        display: flex;
        padding: 0.25em 0.75em;

        svg {
            fill: var(--font);
            width: 1.25em;
            height: 1.25em;
            transition: fill var(--fade-time) ease-in-out;
        }
    }
}

.folders, .files {
    display: grid;
    gap: 0.75em;
    padding: 0.75em;

    .folder, .file {
        box-sizing: border-box;
        width: 100%;
        padding: 0.75em;
        overflow: hidden;
        border: solid var(--border-width) var(--level-one);
        border-radius: var(--border-radius);
        transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out, color var(--fade-time) ease-in-out;
        display: flex;
        text-decoration: none;

        img {
            width: 100%;
            display: block;
            margin-bottom: 0.5em;
            border-radius: var(--border-radius);
        }

        svg {
            fill: var(--font);
            width: 1.25em;
            height: 1.25em;
            flex-shrink: 0;
            transition: fill var(--fade-time) ease-in-out
        }

        span {
            margin: 0 0 0 0.5em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        p {margin: 0 0 0 0.5em}
    }

    .tooltip {
        position: absolute;
        opacity: 0;
        transition: opacity var(--fade-time) ease-in;
        pointer-events: none;
        margin: 1em 0.75em 0 -0.85em;
        color: var(--font);
        background: var(--level-one);
        border: solid var(--border-width) var(--level-one);
        border-radius: var(--border-radius);
        padding: 0.25em 0.5em;
    }

    .folder:hover, .file:hover {
        background-color: var(--level-one);
        cursor: pointer;
        transition: background-color var(--fade-time) ease-in-out;

        .tooltip {
            opacity: 1;
            transition-delay: 0.5s;
        }
    }

    .folder:active, .file:active {
        background-color: var(--accent);
        transition: none;
        border: solid var(--border-width) var(--accent);
        color: var(--font);
    }

    .no-items {color: var(--level-three)}

    @container content (width > 120em) {
        grid-template-columns: repeat(6, 1fr);
    }

    @container content (width > 90em) and (width <= 120em) {
        grid-template-columns: repeat(5, 1fr);
    }

    @container content (width > 65em) and (width <= 90em) {
        grid-template-columns: repeat(4, 1fr);
    }

    @container content (width > 45em) and (width <= 65em) {
        grid-template-columns: repeat(3, 1fr);
    }

    @container content (width > 30em) and (width <= 45em) {
        grid-template-columns: repeat(2, 1fr);
    }

    @container content (width <= 30em) {
        grid-template-columns: repeat(1, 1fr);
    }
}

.no-content p {
    text-align: center!important;
    margin: 1em
}







/* FOLDERS TITLE */

.folders-title {
    margin: 2.5em 0 0.5em;

    #folderForm {
        width: 0;
        display: flex;

        #folderName {
            width: 100%;
            border: none;
            outline: none;
            color: var(--font);
            background: inherit;
            padding: 0;
            margin-left: 0.4em;
            font-size: 1rem;
            font-family: "Afacad";
            transition: color var(--fade-time) ease-in-out;
        }
    }

    #folderForm.active {
        width: 100%;
        gap: 0.5em;
    }

    #addFolderButton {
        box-sizing: border-box;
        font-size: 1rem;
        display: inline-flex;
        align-items: center;
        transition: background-color var(--fade-time) ease-in-out, border var(--fade-time) ease-in-out;

        svg {
            fill: var(--font);
            width: 1.25em;
            height: 1.25em;
            transition: fill var(--fade-time) ease-in-out;
            flex-shrink: 0;
        }
    }

    #addFolderButton.active {
        border: solid var(--border-width) var(--level-one);
        border-radius: var(--border-radius);
        padding: 0.25em 0.75em;
    }

    #createFolderBtn, #cancelFolderBtn {display: none}

    #createFolderBtn.active, #cancelFolderBtn.active {display: block}

    #folderResultDiv {
        display: none;
        min-width: 10em;

        span {
            font-size: 1rem;
            color: var(--font)
        }
    }
}

.files-title {
    margin: 2.5em 0 0.5em;

    #upload-div {
        font-size: 1rem;
        font-family: "Afacad";
        display: inline-flex;
        padding: 0.25em 0.75em;
        background-color: var(--background);
        border: solid var(--border-width) var(--level-one);
        border-radius: var(--border-radius);
        transition: background-color var(--fade-time) ease-in-out, border-color var(--fade-time) ease-in-out, color var(--fade-time) ease-in-out;
        cursor: pointer;
                
        #uploadForm {
            display: flex;
            justify-content: center;
            align-items: center;

            label {
                cursor: pointer;
                width: 1.25em;
                height: 1.25em;

                svg {
                    fill: var(--font);
                    width: 1.25em;
                    height: 1.25em;
                    transition: fill var(--fade-time) ease-in-out;
                }
            }

            #fileToUpload {
                width: 0;
                font-size: 1rem;
                font-family: "Afacad";
                color: var(--level-three);
                cursor: pointer
            }

            #fileToUpload.upload {
                width: 100%;
                margin-left: 0.4em;
            }

            #fileToUpload::file-selector-button {
                display: none;
            }
        }
    }

    #upload-div:hover {background: var(--level-one)}

    #upload-div:active {
        background: var(--accent);
        border-color: var(--accent);
        transition: none;
    }

    #upload {
        font-size: 1rem;
        display: none;
        padding: 0.25em 0.75em;

        svg {
            display: none;
            fill: var(--color);
            width: 1.25em;
        }
    }

    #upload.upload {display: flex}

    #upload:hover {background: var(--level-one)}

    #upload:active {
        background: var(--accent);
        border-color: var(--accent);
        transition: none;
    }

    #cancelUpload {display: none}

    #cancelUpload.upload {display: block}

    #uploadResult {
        display: none;
        min-width: 10em;

        span {
            font-size: 1rem;
            color: var(--font)
        }
    }
}











.doc {
    box-sizing: border-box;
    max-width: 60em;
    margin: auto;
    padding: 0 0.75em;
    min-height: 3em;

    @media only screen and (min-width: 1050px) {min-width: 1000px}
    @media only screen and (max-width: 1050px) {width: 100%}

    #downloads {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: .5em;
        column-gap: 1.5em;
        padding: 1em 0;

        .download {
            display: flex;
            justify-content: center;
            align-items: center;

            p {
                margin: 0 0.75em 0 0;

                @media only screen and (max-width: 700px) {font-size: 0.8em}
            }

            button {
                font-size: 1rem;
                display: flex;
                padding: 0.3em 0.75em;

                svg {
                    fill: var(--font);
                    width: 1.25em;
                    height: 1.25em
                }
            }
        }
    }

    .no-downloads p {margin-top: 0}

    #output {
        border: solid var(--border-width) var(--level-one);
        transition: border var(--fade-time) ease-in-out;

        ol {padding-left: 1.75em}

        h1,h2,h3 {
            text-align: center;
            padding: 0
        }

        mark {
            color: var(--font);
            background-color: var(--accent2)
        }

        mark.current {background-color: var(--accent)}

        @container content (width > 35em) {padding: 2.25em}
        @container content (width <= 35em) {padding: 0.75em}
    }
}

#highlights {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    padding: 0 1.5em;
    box-sizing: border-box;
    z-index: 35;
    justify-content: flex-end;

    @container body (width > 50em) {bottom: 4.5em}
    @container body (width <= 50em) and (width > 30em) {bottom: 7.5em}
    @container body (width <= 30em) {bottom: 9em}

    #highlight-scanner {
        position: sticky;
        bottom: 1em;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.5em;
        background-color: var(--background);
        border: solid var(--level-one) var(--border-width);
        border-radius: var(--border-radius);
        padding: 0.5em;
        color: var(--font);
        box-shadow: var(--box-shadow);
        transition: var(--fade-time);
        pointer-events: all;
        width: fit-content;

        span {
            font-size: 0.8rem;
            display: block;
            margin: 0 0.5em;
        }

        #highlight-btns {
            display: flex;
            gap: 0.5em;

            button {
                font-size: 1rem;
                padding: 0 0.25em;

                svg {
                    display: block;
                    width: 1.5em;
                    fill: var(--font)
                }
            }

            button.prev {transform: rotate(180deg)}
            button.close svg {
                width: 1.25em;
                padding: 0.125em
            }
        }
    }
}