:root{
    --bg1: rgb(15, 20, 20);
    --bg15: rgb(20, 25, 25);
    --bg2: rgb(30, 40, 45);
    --bg3: rgb(50, 60, 65);
    --color1: rgb(210, 210, 220);
    --color2: rgb(140, 150, 150);
    --border-color: rgb(70, 70, 70);
    --link1: rgb(150, 255, 150);
    --blue: rgb(0, 200, 240);
    --red: indianred;
    --selection: rgb(50, 60, 200);
    --color-block: rgb(60, 30, 30);
    --emoji: contents;
    --emoji-head: flex;
    --text-small: 14px;
    --text-medium: 22px;
    --border-curve: 50px;
    --glass-inner-shadow: 0px -2px 12px 0px rgb(110, 110, 130) inset;
    --glass-border: 2px solid rgba(200, 200, 220, 0.3);
    
    --authorhover: rgb(25, 35, 40);
    --tags: rgb(190, 200, 200);
    --input: rgb(0, 50, 120);

    --side-gradient: linear-gradient(to right, rgba(30, 40, 45, 0.6), transparent 90%);
    --side-gradient2: linear-gradient(to right, rgba(0, 40, 60, 0.5), transparent 90%);
    --side-gradient3: linear-gradient(to right, rgba(40, 20, 40, 0.5), transparent 90%);
    --side-gradient4: linear-gradient(to right, rgba(0, 40, 40, 0.6), transparent 90%);

    --progress-bg: linear-gradient(90deg, var(--bg2) 0%, var(--bg3) 100%);
    --progress-bg-bm: linear-gradient(90deg, var(--bg2) 0%, var(--blue) 100%);

    --classical-authors: flex;
    --church-authors: flex;
    --modern-authors: flex;
    --work-favourite: flex;


    --w: 45vw;
}
:root.light{
    --bg1: rgb(220, 220, 220);
    --bg15: rgb(210, 215, 215);
    --bg2: rgb(200, 200, 200);
    --bg3: rgb(180, 180, 180);
    --bg-glass: 200, 200, 200;
    --color1: rgb(20, 20, 20);
    --color2: rgb(50, 50, 50);
    --border-color: rgb(240, 240, 240);
    --blue: rgb(0, 40, 255);
    --selection: rgb(160, 210, 250);
    --color-block: rgb(255, 140, 140);
    --glass-inner-shadow: 0px -2px 12px 0px rgb(230, 240, 255) inset;
    --glass-border: 1px solid rgba(250, 250, 255, 0.9);
    --tags: rgb(230, 230, 230);
    --input: rgb(0, 140, 230);
    --side-gradient: linear-gradient(to right, rgb(200, 240, 255), transparent 90%);
    --side-gradient2: linear-gradient(to right, rgba(0, 140, 260, 0.5), transparent 90%);
    --authorhover: rgb(200, 200, 200);
}

html{
    overflow: clip;
}

body{
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    background-color: var(--bg1);
    color: var(--color1);
    font-family: 'Roboto', sans-serif !important;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    touch-action: none;
    scrollbar-width: thin;
    scrollbar-color: #888 transparent;
}

input, button, textarea, select{
    font-family: 'Roboto', sans-serif;
}

::selection{
    background-color: var(--selection);
}


p {
    font-size: var(--text-medium);
}
h1 {
    font-size: 38px;
    font-weight: 500;
    line-height: 3rem;
    text-align: center;
    margin: 0;
    margin-bottom: 30px;
}
h2 {
    display: flex;
    font-size: 28px;
    font-weight: 500;
    line-height: 2.5rem;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}
h3 {
    display: flex;
    flex-direction: column;
    margin: 0px 0px 5px 0px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5rem;
    pointer-events: none;
}

.hidden {
    display: none !important;
}
.active {
    display: flex !important;
}
svg {
    display: flex;
    flex-shrink: 0;
    fill: var(--color1);
    padding: 0;
    margin: 0;
    cursor: pointer;
    overflow: visible;
}
svg.active {
    fill: var(--color1);
}

svg.button{
    height: 22px;
    width: 24px;
    padding: 8px;
}

.highlight {
    background: var(--selection);
    transition: background .4s;
}

.glass{
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(13px) saturate(3);
    -webkit-backdrop-filter: blur(15px) saturate(2);
    box-shadow: -2px -6px 14px -10px rgba(250, 250, 250, 0.6) inset;
    border: 1px solid rgba(200, 200, 220, 0.4);
    border-radius: var(--border-curve);
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(200, 200, 220, 0.3);
}
.glass:hover{
    background-color: rgba(80, 100, 120, 0.3);
}
.glass.nohover:hover{
    background: rgba(255, 255, 255, 0.03);
}


/* ●─────────────────────────────────────────────────────────────────────────────────────●
   Main
●────────────────────────────────────────────────────────────────────────────────────────● */

main{
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    max-height: 100vh;
    height: 100%;
    overflow: hidden;
    transition: filter .4s;
}

#sidebar-toggle{
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 9999999;
}


/* ●─────────────────────────────────────────────────────────────────────────────────────●
   Right Panel
●────────────────────────────────────────────────────────────────────────────────────────● */

#right-panel{
    position: relative;
    display: none;
    flex: 0 0 300px;
    flex-direction: column;
    background-color: var(--bg15);
    padding-top: 80px;
    padding-bottom: 20px;
    z-index: 2;
    overflow-y: scroll;

    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.5);
    margin: 6px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
}
#right-panel-toggle{
    position: absolute;
    display: none;
    top: 20px;
    right: 20px;
    border-radius: var(--border-curve);
    z-index: 999;
}

#right-panel #nav{
    position: fixed;
    display: inline-flex;
    height: fit-content;
    top: 20px;
    width: fit-content;
    gap: 8px;
    align-self: center;
    padding: 5px;
    z-index: 4;
}
#right-panel #nav svg{
    display: block;
    height: 22px;
    width: 25px;
    padding: 4px;
    border-radius: var(--border-curve);
}
#right-panel #nav svg:hover{
    background-color: var(--bg3);
    -webkit-transform: scale(1);
}

#right-panel #map-panel{
    display: flex;
    flex-direction: column;
    padding-inline: 20px;
}
#right-panel #original-language, #quiz-button{
    margin: 0;
    margin-bottom: 20px;
    padding: 8px 18px;
}
#right-panel #attribution{
    font-size: 14px;
    width: fit-content;
    font-weight: 400;
    align-self: center;
    padding-block: 20px;
    cursor: pointer;
}
#right-panel #attribution summary{
    position: relative;
    display: flex;
    font-size: 16px;
    justify-content: center;
    margin-bottom: 10px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}
#right-panel #attribution summary::after{
    content: "";
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background: var(--color1);
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M480-361q-8 0-15-2.5t-13-8.5L268-556q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-372q-6 6-13 8.5t-15 2.5Z"/></svg>') no-repeat center / contain;
    cursor: pointer;
}

#progress{
    align-self: center;
    margin-bottom: 20px;
}
#gotoBM{
    width: fit-content;
    font-weight: 500;
    background-color: var(--bg2);
    padding: 8px 14px;
    margin-block: 20px;
    border-radius: 10px;
    cursor: pointer;
}

#addBM{
    width: fit-content;
    font-weight: 500;
    background-color: var(--bg2);
    padding: 8px 14px;
    margin-block: 20px;
    border-radius: 10px;
    cursor: pointer;
}
#addBM:hover{
    background-color: var(--bg3);
}

#toc-list{
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    user-select: none;
}
.toc-item{
    display: inline-flex;
    position: relative;
    margin-bottom: 4px;
}
.toc-link{
    position: relative;
    display: block;
    color: var(--color2);
    width: 100%;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 10px;
    cursor: pointer;
}
.toc-link:hover{
    background-color: var(--bg2);
    color: var(--color1);
}
.toc-link.active{
    color: var(--color1);
    font-weight: 500;
}
.toc-progress{
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--progress-bg);
    border-radius: 10px;
    z-index: 0;
}
.toc-text{
    position: relative;
    display: flex;
    font-size: 14px;
    font-weight: 400;
    align-items: center;
    gap: 6px;
    z-index: 1;
}
.toc-item[data-level="3"]{
    padding-left: 15px;
}
.toc-item[data-level="4"]{
    padding-left: 30px;
}
.toc-item[data-level="5"]{
    padding-left: 45px;
}
.toc-item[data-level="6"]{
    padding-left: 60px;
}

/* #toc-list.bookmarkTest .toc-link.active .toc-progress{
    border: 2px solid blue;
} */



#right-panel .none{
    font-size: 14px;
    padding-inline: 20px;
    margin: 0;
}
#right-panel .chapterButton{
    display: flex;
    width: fit-content;
    font-size: 14px;
    font-weight: 500;
    color: var(--blue);
    line-height: 1rem;
    padding: 5px 15px 5px 15px;
    margin-block: 4px;
    gap: 10px;
    border-radius: var(--border-curve);
    cursor: pointer;
}
#right-panel .chapterButton:hover{
    font-size: 14.5px;
    font-weight: 800;
}
#right-panel .chapterButton.h4{
    margin-left: 20px;
}
#right-panel .chapterButton.h5{
    font-size: 13.5px;
    margin-left: 40px;
    margin-block: 0;
}
#right-panel .chapterButton.h6{
    font-size: 13.5px;
    margin-left: 60px;
    margin-block: 0;
}
#right-panel .chapterButton.h7{
    font-size: 13px;
    margin-left: 90px;
    margin-block: 0;
}
#right-panel .chapterButton.h8{
    font-size: 13px;
    margin-left: 100px;
    margin-block: 0;
}
#right-panel .chapterButton.dull{
    color: var(--color2);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}
#right-panel .chapterButton em{
    display: contents;
}
.chapnum{
    display: flex;
    height: fit-content;
    background: var(--bg3);
    border-radius: var(--border-curve);
    padding: 0px 6px;
}

#right-panel #extra-buttons{
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#right-panel #extra-buttons div{
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    align-items: center;
    padding-inline: 20px;
    border-radius: 20px;
    gap: 15px;
    cursor: pointer;
}
#right-panel #extra-buttons div p{
    display: flex;
    flex-direction: column;
    font-size: 14px;
    margin-block: 10px;
}
#right-panel #extra-buttons div p span{
    font-size: 14px;
    color: var(--color2);
}
#right-panel #extra-buttons div svg{
    height: 24px;
    width: 24px;
}
#right-panel #extra-buttons div:hover{
    background-color: var(--bg2);
}


/* ●────────────────● Folder Share ●───────────────────● */

#folderShare-panel{
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-weight: 600;
    padding-inline: 20px;
}


/* ●────────────────● Styles ●───────────────────● */

#styles-panel{
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-weight: 600;
    padding-inline: 20px;
}
.styles-panel span{
    color: var(--color2);
    font-weight: 400;
    align-self: center;
    margin-block: 10px;
}
.styles-panel svg{
    height: 18px;
    width: 18px;
}
.styles-panel .big{
    display: inline-flex;
    justify-content: center;
    width: 100%;
    gap: 5px;
    margin-bottom: 10px;
}
.styles-panel .big div, .color div{
    display: inline-flex;
    width: 100%;
    background-color: var(--bg2);
    color: var(--blue);
    font-size: 14px;
    font-weight: 600;
    align-items: center;
    padding: 10px 20px;
    border-radius: var(--border-curve);
    gap: 8px;
    cursor: pointer;
}
.styles-panel .active{
    border: 3px solid var(--bg3);
}
.styles-panel .color{
    display: inline-flex;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}
.styles-panel input{
    width: 40px;
    border: 1.5px solid var(--blue);
    border-radius: var(--border-curve);
    padding: 0;
    margin-left: auto;
    cursor: pointer;
}
.styles-panel input[type="color"]::-webkit-color-swatch-wrapper{
    padding: 0;
}
.styles-panel .font{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}
.styles-panel .font div{
    display: flex;
    flex: 0 0 25%;
    width: fit-content;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background-color: var(--bg2);
    padding: 13px;
    border-radius: 20px;
    cursor: pointer;
}
.styles-panel .font div.sys{
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.styles-panel .font div.hel{
    font-family: 'Helvetica';
}
.styles-panel .font div.tim{
    font-family: 'Times New Roman', Times, serif;
}
.styles-panel .font div.geor{
    font-family: Georgia, serif;
}
.styles-panel .font div.pal{
    font-family: "Palatino Linotype", Palatino, serif;
}

.styles-panel .font .size{
    flex: 0 0 20%;
    font-size: 14px;
    font-weight: 500;
    color: var(--blue);
    align-items: center;
    padding: 10px;
}
.styles-panel .align{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
    gap: 5px;
}
.styles-panel .align svg{
    flex: 0 0 18%;
    background-color: var(--bg2);
    padding: 10px;
    border-radius: var(--border-curve);
}
.styles-panel p#reset{
    position: relative;
    display: inline-flex;
    width: fit-content;
    background-color: var(--bg2);
    color: var(--red);
    color: rgb(250, 50, 50);
    font-size: 14px;
    font-weight: 600;
    align-self: center;
    align-items: center;
    padding: 10px 20px;
    border-radius: var(--border-curve);
    gap: 8px;
    cursor: pointer;
    margin-top: auto;
}
.styles-panel p#reset svg{
    height: 16px;
    width: 16px;
    fill: rgb(250, 50, 50);
}

/* #bookmark{
    position: absolute;
    display: none;
    top: 20px;
    right: 70px;
    font-size: 18px;
    font-weight: 500;
    gap: 5px;
    align-items: center;
    cursor: pointer;
}
#goto-pin{
    display: none;
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--selection);
    gap: 5px;
    font-weight: 500;
    border: 0;
    border-radius: var(--border-curve);
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
}
#goto-pin svg{
    height: 14px;
    width: 16px;
}

#bookmark-symbol{
    position: absolute;
    right: -10px;
    top: -60px;
    font-size: 42px;
}
.anchor-bookmark{
    position: relative;
}
.bookmark-animation{
    color: darkcyan;
    transition: color .3s;
} */


/* .anchor-bookmark::before{
    content: "";
    position: absolute;
    left: -40px;
    top: 0;
    rotate: -20deg;
    height: 28px;
    width: 28px;
    background: var(--blue);
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M674-773v258l62 62q9 9 13.5 20t4.5 24v38q0 26-18.5 44.5T691-308H543v226q0 26-18.5 44.5T480-19q-26 0-44.5-18.5T417-82v-226H269q-26 0-44.5-18.5T206-371v-38q0-13 4.5-24t13.5-20l62-62v-258q-17-7-28.5-23T246-832q0-26 18.5-44.5T309-895h342q26 0 44.5 18.5T714-832q0 20-11.5 36T674-773Z"/></svg>') no-repeat center / contain;
    cursor: pointer;
} */



/* ●─────────────────────────────────────────────────────────────────────────────────────●
   Sidebar
●────────────────────────────────────────────────────────────────────────────────────────● */

#sidebar {
    position: relative;
    display: none;
    flex-direction: column;
    min-width: fit-content;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow-y: visible;
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3) inset;
    overflow: clip;
}

#home{
    position: absolute;
    display: inline-flex;
    width: fit-content;
    top: 20px;
    right: 20px;
    min-width: 41px;
    min-height: 41px;
    max-width: 41px;
    max-height: 41px;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    color: var(--color1);
    cursor: pointer;
    outline: none;
    z-index: 999999999;
}

.main-nav-container{
    position: absolute;
    display: inline-flex;
    width: fit-content;
    top: 20px;
    left: 70px;
    height: 41px;
    pointer-events: none;
}
.main-nav-container::after{
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 24px;
    background: var(--color1);
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M480-361q-8 0-15-2.5t-13-8.5L268-556q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-372q-6 6-13 8.5t-15 2.5Z"/></svg>') no-repeat center / contain;
    cursor: pointer;
    z-index: 999999999999;
}
select#main-nav{
    color: var(--color1);
    font-size: 18px;
    font-weight: 500;
    padding-inline: 20px 30px;
    cursor: pointer;
    outline: none;
    z-index: 999999999;
    pointer-events: all;
    appearance: none;
}
select#main-nav option{
    background-color: var(--bg2);
}


.searchbar{
    position: absolute;
    bottom: 20px;
    left: 20px;
    max-height: 40px;
    width: calc(100% - 90px);
    min-width: fit-content;
    box-sizing: border-box;
    z-index: 99999;
}
.searchbar input{
    position: relative;
    display: flex;
    height: 40px;
    width: 100%;
    box-sizing: border-box;
    font-size: 18px;
    padding-left: 14px;
    padding-right: 50px;
    color: var(--color1);
    outline: 0;
}
.searchbar #search-input::placeholder{
    color: var(--color2);
}
.searchbar #search-clear, #search-send-ai{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 15px;
    height: 22px;
    fill: var(--color2);
    width: auto;
    pointer-events: none;
}
#search-normal #search-clear{
    pointer-events: auto;
}
#search-normal #search-clear:hover{
    background-color: var(--bg3);
    border-radius: var(--border-curve);
}

.searchbar .filter{
    position: absolute;
    top: 0;
    right: -50px;
    cursor: pointer;
}
.searchbar .filter svg{
    fill: var(--color1);
    margin-left: auto;
    cursor: pointer;
    pointer-events: all;
    top: unset;
    transform: unset;
}

.filter .filter-dropdown{
    position: absolute;
    flex-direction: column;
    bottom: calc(100% + 10px);
    right: 0;
    max-height: 80svh;
    width: max-content;
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 99999;
    cursor: pointer;
}
.filter .filter-dropdown:not([hidden]){
    display: flex;
}
.filter .filter-dropdown label{
    display: flex;
    font-size: 20px;
    font-weight: 500;
    padding-block: 15px;
    gap: 20px;
    cursor: pointer;
}
.filter .filter-dropdown input{
    width: 16px;
    height: 16px;
    pointer-events: none;
}
.filter #author-filter-dropdown{
    max-height: 80vh;
    overflow-y: scroll;
}
.filter #author-filter-dropdown label{
    font-size: 16px;
    padding-block: 10px;
}
#author-filter-dropdown #filter{
    display: inline-flex;
    width: 100%;
    justify-content: space-between;
    padding-inline: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
}
#author-filter-dropdown #filter #filterAll, #filterNone{
    font-weight: 500;
    color: var(--color2);
    padding: 8px 10px;
    border-radius: 10px;
}
#author-filter-dropdown #filter #filterAll:hover, #filterNone:hover{
    color: var(--color1);
}

#search-ai input{
    background: var(--input);
}
#search-ai #author-filter svg{
    background: var(--input);
}
#search-ai #search-send-ai{
    right: 10px;
    height: 28px;
    background-color: var(--bg15);
    padding: 2px;
    border-radius: var(--border-curve);
    z-index: 99999;
    pointer-events: all;
    overflow: visible;
    cursor: pointer;
    transition: background-color 0.2s ease-out;
}
#search-ai.loading::before{
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    -webkit-transform: translateY(-50%) translateZ(0);
    height: 36px;
    background: dodgerblue;
    filter: blur(10px);
    -webkit-filter: blur(10px);
    transition: opacity 0.3s;
    pointer-events: none;
    opacity: 1;
    animation: glowPulse 1.4s ease-in-out infinite;
    -webkit-animation: glowPulse 1.4s ease-in-out infinite;
    will-change: width;
}
    @keyframes glowPulse {
        0% {width: 0px;}
        100% {width: 100%;}
    }
    @-webkit-keyframes glowPulse {
        0% {width: 0px;}
        100% {width: 100%;}
    }


/* ●────────────────● Search Tab ●───────────────────● */

#sidebar #searchTab {
    display: none;
    flex-direction: column;
    height: 100vh;
    width: 600px;
    background: var(--side-gradient2);
    overflow-y: scroll;
    overflow-x: clip;
    padding-top: 100px;
    padding-bottom: 100px;
    gap: 8px;
}

#sidebar #searchTab .author{
    flex-direction: column;
    padding: 0px 30px 40px 30px;
    gap: 10px;
    cursor: auto;
}
#sidebar #searchTab .author:hover{
    background-color: transparent;
}
#sidebar #searchTab .author .profile{
    display: inline-flex;
    margin-left: 20px;
    align-self: center;
    align-items: center;
    margin-bottom: 10px;
}
#sidebar #searchTab .author .profile p{
    color: var(--color2);
    font-weight: 500;
    font-size: 14px;
    margin: 0;
}
#sidebar #searchTab .author .summary{
    position: relative;
    display: flex;
    font-size: 14px;
    color: var(--color2);
    padding: 14px 8px;
    padding-inline: 20px;
    border-radius: 20px;
}
#sidebar #searchTab .author .summary.full{
    background: rgba(255, 255, 255, 0.03);
}
#sidebar #searchTab .author .summary .summaryEmoji{
    position: absolute;
    left: -5px;
    top: -5px;
    font-size: 18px;
    pointer-events: none;
}
#sidebar #searchTab .author .summary p{
    color: var(--color1);
    font-weight: 500;
    font-size: 18px;
    margin: 0;
}
#sidebar #searchTab .author .summary .placeholder{
    background-color: var(--bg2);
    color: var(--bg2);
    font-size: 14px;
    line-height: 0.8rem;
    overflow-wrap: anywhere;
}
#sidebar #searchTab .author .works{
    display: flex;
}
#sidebar #searchTab .author img{
    height: 34px;
    width: 34px;
    margin-top: 0;
    margin-right: 10px;
    border-radius: 10px;
}
#sidebar #searchTab .author button{
    background: 0;
}
#sidebar #searchTab .author .snippet p{
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.2rem;
    background-color: var(--bg2);
    padding: 16px 20px;
    margin: 0px 20px 0px 20px;
    border-radius: 14px;
}
#sidebar #searchTab .author .snippet p:hover{
    background-color: var(--bg3);
    cursor: pointer;
}
#sidebar #searchTab .author .snippet p span{
    margin-top: 10px;
    font-weight: 600;
    color: var(--blue);
}

#sidebar #searchTab #searchTabPlaceholder{
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: end;
    gap: 10px;
}
#sidebar #searchTab .example-query{
    background-color: var(--bg2);
    width: fit-content;
    color: var(--color2);
    font-size: 14px;
    font-weight: 400;
    padding: 8px 14px;
    margin: 0;
    margin-inline: 30px;
    border-radius: var(--border-curve);
    cursor: pointer;
}
#sidebar #searchTab .example-query:hover{
    background-color: var(--bg3);
}


/* ●────────────────● Courses Tab ●───────────────────● */

#sidebar #coursesTab{
    display: none;
    flex-direction: column;
    height: 100vh;
    width: 450px;
    background: var(--side-gradient3);
    overflow-y: scroll;
    overflow-x: clip;
    padding-top: 100px;
    padding-bottom: 100px;
}
#sidebar #coursesTab .author{
    flex-direction: column;
    font-size: 28px;
    padding: 18px 40px;
    cursor: unset;
}
#sidebar #coursesTab .author .profile{
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    gap: 4px;
}
#sidebar #coursesTab .author .profile h3{
    font-size: 24px;
    margin: 0;
    line-height: unset;
}
#sidebar #coursesTab .author .profile span{
    font-size: 14px;
    margin-left: auto;
    color: var(--color2);
    white-space: wrap;
}
#sidebar #coursesTab .author .school{
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    gap: 8px;
}
#sidebar #coursesTab .author .school div{
    display: flex;
    font-size: 16px;
    background-color: rgb(30, 30, 35);
    padding: 8px;
    align-items: center;
    border-radius: 20px;
    border: 1px solid var(--bg3);
    opacity: 0.6;
    pointer-events: none;
    
}
#sidebar #coursesTab .author .school div:hover{
    background-color: var(--bg3);
}
#sidebar #coursesTab .author:first-of-type .school div:first-of-type{
    opacity: 1;
    pointer-events: all;
    cursor: pointer;
}
#sidebar #coursesTab .author .school div span{
    border: 1px solid var(--bg3);
    border-radius: 14px;
    padding: 6px 8px;
    margin-right: 20px;
    background-color: var(--bg2);
    font-size: 24px;
}



/* ●────────────────● Games Tab ●───────────────────● */

#sidebar #gamesTab{
    display: none;
    flex-direction: column;
    height: 100vh;
    width: 450px;
    background: var(--side-gradient4);
    overflow-y: scroll;
    overflow-x: clip;
    padding-top: 100px;
    padding-bottom: 100px;
    gap: 8px;
}
#sidebar #gamesTab .author{
    padding: 8px 20px;
    cursor: not-allowed;
}
#sidebar #gamesTab .author img{
    height: 40px;
    width: 40px;
}
#sidebar #gamesTab .author .content span{
    font-size: 14px;
    color: var(--color2);
    white-space: wrap;
}


/* ●────────────────● Author Tab ●───────────────────● */

#sidebar .authorTab {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 460px;
    background: var(--side-gradient);
    overflow-y: scroll;
    overflow-x: clip;
    padding-top: 80px;
    padding-bottom: 100px;
    gap: 8px;
}
#sidebar .authorTab::-webkit-scrollbar {
    display: none;
}
#sidebar .author {
    position: relative;
    display: flex;
    flex-direction: row;
    min-width: 200px;
    padding: 8px 40px 8px 30px;
    position: relative;
    cursor: pointer;
}

body.fav #sidebar .author.favourite{
    display: flex;
}
body.fav #sidebar .work.favourite{
    display: flex;
}
#sidebar .author.Classical{
    display: var(--classical-authors);
}
#sidebar .author.Church{
    display: var(--church-authors);
}
#sidebar .author.Modern{
    display: var(--modern-authors);
}

#sidebar .author:hover {
    background-color: var(--authorhover);
}
#sidebar .author.no-hover:hover{
    background-color: transparent;
}
#sidebar .author img{
    display: flex;
    width: 50px;
    height: 50px;
    border-radius: 40%;
    margin-right: 15px;
    margin-top: 8px;
    box-sizing: border-box;
    cursor: alias;
}
#sidebar .author img:hover{
    outline: 4px solid var(--bg3);
}

#sidebar .author button {
    font-size: 14px;
    font-weight: 400;
    color: var(--color1);
    background-color: var(--bg2);
    border: 0;
    border-radius: var(--border-curve);
    padding: 8px 15px;
    text-align: left;
    margin-bottom: 5px;
    cursor: pointer;
}
#sidebar .author button:hover {
    background-color: var(--bg3);
}
#sidebar .author button.active {
    background-color: var(--bg3);
}

#sidebar .author .content {
    display: flex;
    flex-direction: column;
    width: 100%;
}
#sidebar .author .info {
    display: flex;
}
#sidebar .author .info span {
    display: inline-flex;
    color: var(--bg3);
    font-size: 14px;
    font-weight: 500;
    align-self: start;
    margin-left: auto;
    white-space: nowrap;
    pointer-events: none;
}
#sidebar .author .info h3{
    font-size: 18px;
    font-weight: 500;
    gap: 8px;
}

#sidebar .author .info h3 .tags{
    gap: 4px;
    margin-left: 0;
    align-self: flex-start;
}
#sidebar .author .info h3 .tags span{
    color: var(--tags);
    border-radius: var(--border-curve);
    padding: 2px 8px;
    margin-left: 0;
}
#sidebar .author .info h3 .tags span.Pre-Socratic {
    background-color: rgb(50, 50, 50);
}
#sidebar .author .info h3 .tags span.Platonism {
    background-color: rgb(0, 40, 120);
}
#sidebar .author .info h3 .tags span.Aristotelianism {
    background-color: rgb(150, 20, 90);
}
#sidebar .author .info h3 .tags span.Epicureanism {
    background-color: rgb(120, 120, 0);
}
#sidebar .author .info h3 .tags span.Stoicism {
    background-color: rgb(20, 100, 60);
}
#sidebar .author .info h3 .tags span.Christian {
    background-color: rgb(20, 80, 140);
}
#sidebar .author .info h3 .tags span.Apostolic {
    background-color: rgba(90, 90, 90, 0.5);
}
#sidebar .author .info h3 .tags span.Neoplatonism {
    background-color: rgb(80, 30, 130);
}
#sidebar .author .info h3 .tags span.Rationalism {
    background-color: rgb(100, 20, 60);
}
#sidebar .author .info h3 .tags span.Empiricism {
    background-color: rgb(160, 90, 40);
}
#sidebar .author .info h3 .tags span.Existentialism {
    background-color: rgb(15, 15, 15);
}
#sidebar .author .info h3 .tags span.Idealism {
    background-color: rgb(40, 90, 90);
}
#sidebar .author .works {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
    margin-left: -40px;
}
body.fav #sidebar .author .work.favourite{
    display: flex;
}
#sidebar .author .work {
    display: var(--work-favourite);
    flex-direction: row;
    align-items: center;
}
#sidebar .author .work svg {
    height: 22px;
    width: auto;
    margin-left: 5px;
    fill: var(--bg3);
}
#sidebar .author .work #favourite:hover {
    fill: var(--bg3);
}
#sidebar .author .work #favourite.active {
    fill: var(--color2);
}
#sidebar .author .subworks {
    display: none;
    flex-direction: column;
    margin-left: 30px;
    width: 75%;
}
#sidebar .author .subworks h6 {
    font-size: 14px;
    font-weight: 400;
    color: var(--color2);
    margin: 10px 0px;
    padding: 0;
}


/* ●─────────────────────────────────────────────────────────────────────────────────────●
   Reader Container
●────────────────────────────────────────────────────────────────────────────────────────● */

#reader-container{
    position: relative;
    display: grid;
    grid-template-columns: 1fr 0fr;
    flex-direction: row;
    width: 100%;
}

/* ●────────────────● Home ●───────────────────● */

#homePage{
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(
        circle, 
        var(--bg1) 70%,
        rgba(0, 30, 40, 1) 100%
    );
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

#homePage #discord{
    position: fixed;
    display: inline-flex;
    top: 20px;
    right: 150px;
    padding: 8px 14px;
    align-items: center;
    gap: 10px;
    z-index: 10;
    cursor: pointer;
}
#homePage #discord svg{
    height: 24px;
    width: 26px;
    fill: #5865f2;
}
#homePage #donate{
    position: fixed;
    display: inline-flex;
    top: 20px;
    right: 20px;
    max-height: 42px;
    box-sizing: border-box;
    padding: 8px 14px;
    align-items: center;
    gap: 10px;
    z-index: 10;
    cursor: pointer;
}
#homePage #donate span{
    font-size: 26px;
}
#homePage h1, .head-one{
    position: relative;
    font-size: 48px;
    font-weight: 400;
    letter-spacing: -1px;
    align-self: center;
    line-height: 3rem;
    z-index: 2;
    margin-top: 140px;
    margin-bottom: 0;
    gap: 10px;
    text-wrap-style: pretty;
}
#homePage h1 span.symbol, .head-one span.symbol{
    color: var(--blue);
}
#homePage #new{
    position: absolute;
    top: -30px;
    right: -30px;
    color: var(--blue);
    font-size: 22px;
    font-weight: 500;
    rotate: 10deg;
    letter-spacing: 0px;
}
#homePage .subheading{
    align-self: center;
    color: var(--color2);
    margin-block: 10px;
}

#homePage .open-library{
    display: flex;
    width: fit-content;
    font-size: 20px;
    font-weight: 300;
    background-color: var(--input);
    box-shadow: 0px 0px 20px var(--bg2);
    padding: 8px 24px;
    align-self: center;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}
#homePage .open-library:hover{
    scale: 1.05;
}

#homePage .author-list{
    display: flex;
    height: 360px;
    width: 80%;
    align-self: center;
    margin-block: 80px;
    border-radius: 40px;
    overflow: clip;
}
#homePage .author-list img{
    flex: 1 1 0;
    min-width: 0;
    object-fit: cover;
    object-position: center;
    transition: flex .5s ease;
    will-change: flex;
}
#homePage .author-list img:hover {
    flex: 3 1 0;
}


#homePage .input{
    position: relative;
    margin-top: auto;
    align-self: center;
    margin-top: 60px;
}
#homePage .input input{
    background-color: var(--input);
    font-size: 28px;
    min-width: 400px;
    color: var(--color1);
    padding: 8px 14px 8px 18px;
    box-sizing: border-box;
    outline: 0;
    box-shadow: 0px 0px 20px var(--bg2);
}
#homePage .input svg{
    position: absolute;
    right: 10px;
    bottom: 50%;
    transform: translateY(50%);
    height: 32px;
    background-color: var(--bg1);
    fill: var(--color1);
    padding: 2px;
    border-radius: var(--border-curve);
}

#homePage .feature{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 80px;
    width: 100%;
    gap: 20px;
}

#homePage .feature .author{
    height: fit-content;
    max-width: 280px;
    background-color: var(--bg15);
    padding: 20px;
    border: 1px solid var(--bg2);
    border-radius: 20px;
    transition: all 0.2s ease-in;
}
#homePage .feature .author:first-of-type{
    transform: skew(2deg, 2deg);
}
#homePage .feature .author:nth-of-type(2){
    transform: skew(1deg, 1deg);
}
#homePage .feature .author:nth-of-type(3){
    transform: skew(-1deg, -1deg);
}
#homePage .feature .author:last-of-type{
    transform: skew(-2deg, -2deg);
}
#homePage .feature .author:hover{
    background-color: var(--bg2);
    transform: translate(6px);
    cursor: pointer;
}

#homePage .feature .author .profile{
    display: inline-flex;
    margin-left: 20px;
    align-self: center;
    align-items: center;
    margin-bottom: 10px;
}
#homePage .feature .profile p{
    color: var(--color2);
    font-weight: 400;
    font-size: 18px;
    margin: 0;
}
#homePage .feature .profile p span{
    font-style: italic;
    font-weight: 400;
}
#homePage .feature img{
    height: 40px;
    width: 40px;
    margin-top: 0;
    margin-right: 10px;
    border-radius: 10px;
}
#homePage .feature .snippet{
    position: relative;
}
#homePage .feature .snippet p{
    display: flex;
    flex-direction: column;
    font-size: 16px;
    line-height: 1.4rem;
    padding: 10px;
    margin: 0;
}
#homePage .feature .snippet p span{
    color: var(--blue);
    font-weight: 500;
    margin-top: 20px;
}
#homePage .feature .snippet span.summaryEmoji{
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 20px;
    font-weight: 600;
}

#homePage .logo{
    font-size: 150px;
    font-weight: 500;
    color: var(--bg2);
    align-self: center;
    margin-top: 100px;
    margin-bottom: 40px;
}


/* ●────────────────● Readers ●───────────────────● */

#reader-container #reader, #reader2 {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 100%;
    text-align: left;
    padding-block: 60px;
    line-height: 1.5;
    overflow-y: scroll;
    overflow-x: hidden;
    box-sizing: border-box;
    outline: 0;
    padding-inline: max(20px, (100% - var(--w)) / 2);
}
#reader-container #reader2 {
    display: none;
}
#close-reader2{
    position: sticky;
    top: 0px;
    height: 18px;
    width: 20px;
    background-color: rgb(120, 20, 40);
    padding: 10px;
    z-index: 100;
}

#reader-container .hero{
    position: relative;
    display: flex;
    flex-direction: column;
    padding-block: 80px;
}
#reader-container .hero h1{
    margin: 0;
}

#reader .hero img{
    position: absolute;
    inset: 0;
    width: 100%;
    border-radius: var(--border-curve);
    filter: invert(1) opacity(0.1);
    z-index: 1;
    object-fit: cover;
    height: 100%;
}
#reader .apple1{
    border-radius: var(--border-curve);
    margin-block: 20px;
    object-fit: contain;
}

main #reader-container #reader .yapping{
    position: relative;
    width: fit-content;
    max-width: 90%;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0px -2px 25px 0px rgb(60, 60, 80) inset;
    font-size: 18px;
    text-align: center;
    align-self: center;
    padding: 30px 40px;
    margin-top: 20px;
    border-radius: 20px;
    box-sizing: border-box;
}

main #reader-container p {
    position: relative;
    font-size: var(--text-medium);
    margin-block-start: 1em;
    margin-block-end: 1em;
}

main #reader-container q{
    display: block;
    font-size: var(--text-medium);
    padding-left: 20px;
    margin-block-end: 20px;
    border-left: 3px solid var(--bg2);
}
main #reader-container .re{
    width: fit-content;
    background-color: var(--bg2);
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    padding: 10px 20px;
    border-left: 3px solid var(--bg3);
}

main .ref{    
    position: relative;
    background-color: darkcyan;
    background-color: rgba(0, 140, 140, 0.3);
    border-left: 10px solid lightseagreen;
    border-right: 10px solid lightseagreen;
    border-radius: var(--border-curve);
    padding-inline: 8px;
}
main .ref-link, .quiz-link, #answer-quote-go{
    display: inline-flex;
    color: var(--blue);
    font-size: 14px;
    font-weight: 800;
    align-items: center;
    gap: 5px;

    width: max-content;
    background-color: var(--bg2);
    padding: 4px 12px;
    margin-inline: 15px;
    border: 1px solid var(--bg3);
    border-radius: var(--border-curve);
    vertical-align: middle;
    cursor: pointer;
}
main #quiz .ref-link{
    padding: 8px 18px;
}
main .ref-link svg, main .quiz-link svg, #answer-quote-go svg{
    fill: var(--blue);
    height: 20px;
    width: 20px;
}
main .ref-link:hover, .quiz-link:hover, #answer-quote-go:hover{
    background-color: var(--bg3);
}


main #reader-container .w-info{
    position: relative;
    text-decoration: underline;
    text-decoration-color: indianred;
    text-decoration-skip-ink: none;
    text-decoration-thickness: 3px;
}
main #reader-container .w-info-pop{
    position: absolute;
    display: none;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    color: var(--red);
    font-size: 18px;
    font-weight: 500;
    align-items: center;
    gap: 5px;

    width: max-content;
    background-color: var(--bg2);
    padding: 10px 20px;
    border: 2px solid var(--bg3);
    border-radius: var(--border-curve);
    z-index: 10;
    cursor: help;
}
main #reader-container .w-info-pop svg{
    fill: var(--red);
    height: 26px;
    width: 26px;
}
main #reader-container .w-info:hover .w-info-pop {
    display: flex;
}

main #reader-container img.ai{
    float: right;
    height: auto;
    width: 40%;
    padding: 10px;
    border-radius: 20%;
}


main #reader-container strong{
    font-variant: small-caps;
    font-size: x-large;
    font-weight: 500;
    line-height: normal;
}

main #reader-container h2 {
    position: relative;
    cursor: pointer;
    text-align: left;
    background-color: var(--bg2);
    border-radius: var(--border-curve);
    padding: 6px 30px 6px 50px;
    width: fit-content;
    text-wrap-style: balance;
}
main #reader-container h2:hover {
    background-color: var(--bg3);
}
main #reader-container h3 {
    position: relative;
    flex-direction: row;
    font-size: 24px;
    font-weight: 500;
    background-color: var(--bg2);
    border-radius: var(--border-curve);
    padding: 5px 20px;
    padding-left: 50px;
    margin: 100px 0px 40px 0px;
    align-self: center;
    text-align: center;
    line-height: 2.5rem;
    width: fit-content;
    text-wrap-style: balance;
    pointer-events: auto;
    cursor: pointer;
}
main #reader-container h2::before, #reader-container h3::before, #reader-container h4::before{
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 28px;
    width: 28px;
    background: var(--color2);
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M480-338q-12 0-24-5t-21-14L252-540q-18-18-18-44t18-44q18-18 44-18t44 18l140 140 140-140q18-18 44-18t44 18q18 18 18 44t-18 44L525-357q-9 9-21 14t-24 5Z"/></svg>') no-repeat center / contain;
    transition: transform 0.2s;
}
main #reader-container h2.active::before, #reader-container h3.active::before, #reader-container h4.active::before {
    transform: translateY(-50%) rotate(-90deg);
}
main #reader-container h4 {
    position: relative;
    font-size: 24px;
    font-weight: 400;
    align-self: center;
    text-wrap-style: pretty;
    padding-left: 50px;
    margin: 60px 0px 40px 0px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 4px solid var(--bg2);
    pointer-events: auto;
    cursor: pointer;
}
main #reader-container h5 {
    font-size: 20px;
    font-weight: 500;
    align-self: center;
    margin: 80px 0px 40px 0px;
    text-align: center;
}

/* Superordinate heading */
main #reader-container div.super-heading{
    align-self: center;
    font-size: 30px;
    font-weight: 400;
    text-align: center;
    background-color: transparent;
    border-radius: var(--border-curve);
    border-style: solid;
    border-width: 2px;
    border-color: var(--bg2);
    padding: 15px 25px;
    margin: 80px 0px 40px 0px;
    gap: 5px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}
/* Socrates, Crito (Speaker heading) */
main #reader-container div.speaker{
    display: flex;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color2);
    margin: 20px 0 -10px 0;
}

main #reader-container h8 {
    display: flex;
    font-size: 16px;
    font-weight: 600;
    color: var(--color2);
    margin: 10px 0 -15px 0;
}
#reader-container h8{
    margin-top: 40px;
}


main #reader-container h10{
    border-radius: var(--border-curve);
    justify-content: center;
    text-align: center;
    background-color: var(--bg3);
    width: fit-content;
    font-size: 34px;
    font-weight: 500;
    align-self: center;
    line-height: 3rem;
    margin-block: 100px;
    padding: 3px 80px;
}

#reader-container ul{
    list-style-type: disc;
    text-align: left;
    font-size: var(--text-medium);
    margin: 0;
}
#reader-container ol{
    text-align: left;
    font-size: var(--text-medium);
    margin: 0;
}
#reader-container li{
    margin: 15px;
    padding-left: 10px;
}
#reader-container li::marker{
    font-weight: 600;
    color: var(--color2);
}
dl.custom {
    text-align: left;
    font-size: var(--text-medium);
    padding-left: 20px;
    margin: 0;
}
dl.custom dt{
    font-weight: 600;
    color: var(--color2);
    padding: 30px 0px 5px 0px;
}

#reader-container .colorBlock{
    background-color: var(--color-block);
    border-radius: 10px;
    padding: 20px 40px;
    border-left: 4px solid rgb(200, 50, 50);
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
#reader-container .glass.block{
    position: static;
    display: flex;
    padding: 10px 30px;
    margin-bottom: 0;
}
#reader-container svg.diagram {
    height: auto;
    width: 400px;
    align-self: center;
    fill: var(--color1);
    margin: 20px;
}
#reader-container .st0{
    stroke: var(--color1);
    fill: none;
}
#reader-container .proof{
    padding-left: 35px;
    border-left: 3px solid var(--bg2);
}
#reader-container em{
    font-size: smaller;    
    font-style: normal;
    font-weight: 500;
}
#reader-container .spinLink{
    color: var(--blue);
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

main #reader-container .emoji.heading {
    display: var(--emoji-head);
    align-self: center;
    font-size: 4rem;
    margin: 10px;
    line-height: 1;
    letter-spacing: 0;
    user-select: none;
    -moz-user-select: none;
}
main #reader-container .emoji {
    display: var(--emoji);
    letter-spacing: 8px;
}

main #reader-container .parnum {
    display: inline;
    text-align: center;
    color: var(--color2);
    font-weight: 400;
    margin: 0;
}
main #reader-container .mini-title{
    display: inline;
    text-align: center;
    color: var(--color2);
    font-weight: 300;
    margin-block: 30px;
}
main #reader-container span.p2{
    color: var(--color2);
    font-weight: 500;
    margin-inline: 10px;
}
main #reader-container span.p3{
    color: var(--color2);
    font-weight: 500;
    margin-inline: 20px;
}

main #reader-container .share-link{
    display: inline-flex;
    margin-bottom: -10px;
    font-size: 16px;
    font-weight: 500;
    align-items: center;
    width: fit-content;
    color: var(--color2);
    gap: 4px;
    cursor: pointer;
    text-wrap-mode: nowrap;
}
main #reader-container .share-link svg{
    height: 24px;
    width: 24px;
    fill: var(--color2);
}
main #reader-container .share-link:hover{
    color: var(--blue);
}
main #reader-container .share-link:hover svg{
    fill: var(--blue);
}


main #reader .yap1{
    position: relative;
    margin: 0;
    font-size: 18px;
    text-align: center;
    align-self: center;
    background-color: rgb(15, 15, 15);
    border: 1px solid var(--bg15);
    border-radius: 20px;
    font-weight: 400;
    padding: 20px 50px;
    margin-bottom: 60px;
}
main #reader .yap, .yapp{
    position: absolute;
    left: -10px;
    top: -10px;
    font-size: 32px;
    pointer-events: none;
}
main #reader .yapp{
    top: unset;
    left: unset;
    right: -10px;
    bottom: -10px;
}

main #reader .rating{
    display: inline-flex;
    background-color: var(--bg2);
    align-self: center;
    justify-self: center;
    border-radius: var(--border-curve);
    cursor: pointer;
}
main #reader .rating p{
    font-size: var(--text-medium);
    font-weight: 400;
    border-radius: var(--border-curve);
    padding: 0px 25px;
}
main #reader .rating #goated:hover, #insightful:hover, #confusing:hover, #trash:hover{
    background-color: var(--bg3);
    border-radius: var(--border-curve);
    padding: 0px 2px;
}
main #reader .rating #goated:active, #insightful:active, #confusing:active, #trash:active{
    background-color: var(--bg3);
    border-radius: var(--border-curve);
    padding: 0px 2px;
}
main #reader .rating span{
    font-weight: 800;
    margin-left: 3px;
}

.fn {
    position: relative;
    background-color: var(--bg3);
    padding: 4px 10px 0px 10px;
    border-radius: var(--border-curve);
    cursor: pointer;
}
.fn[data-go] {
    font-weight: 600;
    color: var(--blue);
    padding: 0px 10px;
}
.fn-pop{
    position: absolute;
    display: none;
    flex-direction: column;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    max-width: max-content;
    font-size: 16px;
    color: var(--color1);
    background-color: var(--bg1);
    border: 1.5px solid var(--border-color);
    border-radius: 40px;
    padding: 20px 30px;
    line-height: 1.5;
    text-align: left;
    pointer-events: auto;
    cursor: text;
}
.fn:hover .fn-pop {
    display: block;
}


.fn-pop .head{
    display: flex;
    color: var(--color2);
    margin-bottom: 10px;
    cursor: pointer;
}
.fn-pop .head svg{
    height: 18px;
    width: 18px;
    fill: var(--blue);
    margin-left: auto;
}

main #reader-container .stephanus {
    display: inline-flex;
    color: var(--color2);
    font-weight: 300;
    padding-inline: 5px;
}

main #reader table.aristotle, tr, td {
    width: fit-content;
    border: 1px solid var(--bg3);
    border-collapse: collapse;
    padding: 10px;
}

main #reader .glossaryTables{
    display: flex;
    flex-direction: row;
    gap: 10px;
}
main #reader table.glossary{
    display: flex;
    flex-direction: column;
    margin: 20px;
    padding: 20px;
    align-self: flex-start;
    text-align: left;
    max-width: 500px;
}
main #reader table.glossary, th {
    width: fit-content;
    border: 1px solid var(--bg3);
    border-collapse: collapse;
    padding: 20px;
}
main #reader table.glossary, tr, td {
    width: fit-content;
    border: 1px solid var(--bg3);
    border-collapse: collapse;
    padding: 10px;
}

/* ●────────────────● Quiz ●───────────────────● */

#reader-container #quiz{
    position: relative;
    display: none;
    flex-direction: column;
    background-color: rgb(10, 15, 18);
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    outline: 0;
}

#reader-container #quiz #quiz-header{
    position: absolute;
    top: 20px;
    left: auto;
    height: 40px;
    display: inline-flex;
    flex-direction: row;
    align-self: center;
    align-items: center;
    padding-inline: 20px;
    gap: 30px;
    pointer-events: none;
    z-index: 99999;
}
#reader-container #quiz #quiz-work-name{
    font-size: 14px;
    font-weight: 500;
}
#reader-container #quiz #quiz-header #progress-bar{
    width: 400px;
    background-color: var(--bg3);
    height: 8px;
    border-radius: var(--border-curve);
}
#reader-container #quiz #quiz-header #progress-bar #fill{
    height: 100%;
    width: 10%;
    background-color: var(--blue);
    border-radius: var(--border-curve);
    transition: width 0.2s ease-out;
}
#reader-container #quiz #quiz-header #progress-num{
    font-size: 14px;
    font-weight: 600;
}
#reader-container #quiz #close-quiz{
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 99999;
}
#reader-container #quiz #next-question{
    position: absolute;
    bottom: 20px;
    right: 20px;
    height: 80px;
    width: 80px;
    fill: var(--bg3);
    z-index: 99999999999;
    pointer-events: none;
}

#reader-container #quiz .question{
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100vw;
    overflow-y: scroll;
}
#reader-container #quiz .question .heading{
    color: var(--color1);
    width: 80%;
    font-size: 38px;
    font-weight: 400;
    align-self: center;
    text-align: center;
    margin-block: 40px;
    line-height: 2.5rem;
    text-wrap-style: pretty;
}
#reader-container #quiz .question img{
    height: auto;
    width: 10%;
    align-self: center;
    margin-top: 100px;
}
#reader-container #quiz .question .options{
    display: grid;
    height: 50%;
    width: 80%;
    align-self: center;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    align-self: center;
    gap: 20px;
    transition: all 1s ease-in-out;
}
#reader-container #quiz .question .options div{
    display: flex;
    background: radial-gradient(circle at bottom, transparent, var(--bg2) 100%);
    border: 1px solid var(--bg3);
    border-bottom: 8px solid var(--bg3);
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 24px;
    font-weight: 300;
    padding: 40px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s ease-out;
}
#reader-container #quiz .question .options div:hover{
    border: 1px solid var(--blue);
    transform: translateY(4px);
}

#reader-container #quiz .question .options div.correct{
    background: none;
    background-color: var(--bg2);
    border: 2px solid rgb(0, 180, 100);
    transform: translateY(-2px);
}
#reader-container #quiz .question .options div.wrong{
    background: none;
    color: var(--color2);
    border: 2px solid rgb(180, 40, 40);
}

#reader-container #quiz .question #answer-quote{
    height: 0;
    width: 40%;
    font-weight: 300;
    line-height: 1.5;
    margin-right: auto;
    margin-left: auto;
    opacity: 0;
    overflow: clip;
    transition: all 1s ease-in-out;
}
#reader-container #quiz .question #answer-quote b{
    font-weight: 600;
}
#reader-container #quiz .question #answer-quote-go{
    opacity: 0;
    height: 0;
    padding: 8px 18px;
    align-self: center;
    transition: all 1s ease-in-out;
}

#reader-container #quiz .question.reveal .options{
    opacity: 0;
    height: 0;
}
#reader-container #quiz .question.reveal #answer-quote,
#reader-container #quiz .question.reveal #answer-quote-go {
    opacity: 1;
    height: fit-content;
    overflow: unset;
}

#reader-container #quiz .question span.answer-blank{
    color: var(--blue);
    font-weight: 500;
}


/* ●─────────────────────────────────────────────────────────────────────────────────────●
   Modals
●────────────────────────────────────────────────────────────────────────────────────────● */

#feedback-modal{
    position: absolute;
    display: none;
    flex-direction: column;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background-color: var(--bg1);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-curve);
    height: fit-content;
    width: 300px;
    align-items: center;
    padding: 20px 30px;
    z-index: 10;
    box-shadow: 0px 0px 100px 0px var(--bg1);
}
#feedback-modal p{
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 42px;
    font-weight: 400;
    margin: 0;
}
#feedback-modal p span{
    display: flex;
    flex-direction: column;
    font-weight: 500;
    color: var(--color1);
    font-size: 32px;
    gap: 5px;
}
#feedback-modal p span span{
    font-size: 18px;
    font-weight: 400;
    color: var(--color2);
}
#feedback-modal button{
    background-color: rgb(50, 120, 250);
    border: 0;
    margin-top: auto;
    border-radius: var(--border-curve);
    width: fit-content;
    font-size: 18px;
    display: inline-flex;
    font-weight: 500;
    align-self: center;
    align-items: center;
    color: var(--color1);
    padding: 6px 40px;
    cursor: pointer;
}
#feedback-modal form{
    display: flex;
    flex-direction: column;
}
#feedback-modal textarea{
    height: 60px;
    width: 240px;
    color: var(--color1);
    background: transparent;
    border: 2px solid var(--bg2);
    font-size: 18px;
    align-self: center;
    padding: 10px;
    border-radius: 20px;
    margin: 20px;
    outline: 0;
}

/* #quote-button{
    position: absolute;
    display: none;
    flex-direction: row;
    display: none;
    font-size: 18px;
    font-weight: 500;
    align-items: center;
    padding: 10px 20px;
    gap: 5px;
    cursor: pointer;
    pointer-events: auto;
}
#quote-modal{
    position: absolute;
    display: none;
    max-height: 60vh;
    width: 30vw;
    align-self: center;
    align-items: center;
    padding-top: 20px;
    gap: 0px;
    z-index: 4;
}
#quote-modal h2{
    margin: 0;
}
#quote-modal svg{
    fill: var(--blue);
}
#quote-modal #quoteDisplay{
    width: 80%;
    padding: 20px 30px;
    font-weight: 500;
    border-radius: var(--border-curve);
    overflow-y: scroll;
}
#quote-modal input#quoteLink{
    display: flex;
    width: 80%;
    color: var(--color2);
    font-size: 18px;
    background-color: var(--bg2);
    border-radius: var(--border-curve);
    padding: 10px 20px;
    border: 0;
    outline: 0;
} */


/* ●─────────────────────────────────────────────────────────────────────────────────────●
   Mobile
●────────────────────────────────────────────────────────────────────────────────────────● */

@media (max-width: 900px) {
    :root {--text-medium: 16px;}

    body {
        max-height: 100svh;
        min-height: 100svh;
    }

    body main {
        max-height: 100svh;
        min-height: 100svh;
        height: 100svh;
    }

    body main #sidebar{
        max-width: 100vw;
        min-width: 100vw;
        position: relative;
        overflow-x: hidden;
    }

    body main #sidebar #authorTab, body main #sidebar #searchTab, body main #sidebar #coursesTab, body main #sidebar #gamesTab{
        width: 100vw;
    }
    body main #sidebar #authorTab{
        padding-bottom: 80px;
    }

    body main #sidebar .searchbar{
        width: 75%;
    }
    body main #sidebar #searchTab .example-query{
        font-size: 12px;
    }

    body main #sidebar .filter .filter-dropdown{
        right: 10px;
        max-height: 60svh;
    }

    body main #sidebar .filter .filter-dropdown input{
        padding-right: unset;
    }

    body main #reader-container #homePage h1 span{
        right: 30px;
    }
    body main #reader-container #homePage .input{
        margin-top: 40px;
    }
    body main #reader-container #homePage .input input{
        font-size: 22px;
        min-width: 300px;
    }
    body main #reader-container #homePage .feature{
        flex-direction: column;
    }

    body main #homePage .cards div .feature .author{
        min-width: 260px;
        transform: none !important;
    }

    body main #homePage .cards div .feature.authors{
        width: 90%;
        align-self: center;
    }

    body main #homePage .cards div .feature.reference{
        align-self: auto;
        justify-content: start;
        padding-inline: 20px;
        overflow-x: scroll;
    }
    body main #homePage .cards div .feature.quiz .question{
        padding-inline: 20px;
    }

    body main #homePage .cards div .feature.quiz .question .options div{
        width: 100%;
    }

    body main #reader-container #homePage .logo{
        font-size: 40px;
    }

    #sidebar .author .info span {
        padding-right: 20px;
    }
    body #sidebar .author {
        padding: 8px 8px 8px 20px;
    }
    body #feedback-modal{
        width: 90%;
        box-sizing: border-box;
    }
    body main #right-panel{
        position: absolute;
        display: none;
        flex: 1 1 auto;
        width: 98vw;
        height: 70svh;
        bottom: 0;
        justify-self: anchor-center;
        align-items: center;
        padding-top: 0;
        padding-bottom: 100px;
        margin: 0;
        margin-block: 0;
        border-top-left-radius: var(--border-curve);
        border-top-right-radius: var(--border-curve);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        overflow: scroll;
        z-index: 100000;
    }
    body main #right-panel #nav{
        position: sticky;
    }
    body main #right-panel #nav svg{
        height: 24px;
        width: 24px;
    }
    body main #right-panel #styles-panel{
        height: unset;
        margin-top: 40px;
    }
    body main #right-panel #map-panel{
        margin-top: 40px;
    }
    body main #right-panel-toggle{
        display: none;
    }
    body main #right-panel-toggle path{
        transform: rotate(-90deg);
        transform-origin: 50% -50%;
    }
    body main #reader-container {
        padding-inline: 0;
    }
    body main #reader-container #reader{
        padding-inline: 5%;
    }
    body main #reader-container #reader2{
        position: absolute;
        background-color: var(--bg1);
        height: 100%;
        padding-top: 0px;
        padding-bottom: 20px;
        padding-inline: 5% !important;
        z-index: 1;
    }
    body main #reader-container #reader2 #close-reader2{
        top: 20px;
        right: 0px;
        align-self: flex-end;
    }
    body main #reader .emoji.heading {
        margin-bottom: 20px;
    }
    body main #reader h1 {
        font-size: 34px;
        line-height: 1.2;
    }
    body main #reader h2 {
        font-size: 26px;
        padding-right: 20px;
        line-height: 1.2;
    }
    body main #reader h10{
        font-size: 28px;
        padding: 3px 40px;
    }
    body #sidebar .author:hover{
        background-color: inherit
    }
    body #sidebar .author .work svg#favourite{
        height: 28px;
        width: auto;
        color: var(--bg3);
        margin-left: 10px;
    }
    body #sidebar .header svg#favouriteIcon:hover{
        background-color: var(--color2);
    }
    body #sidebar .header svg#favouriteIcon.active{
        background-color: var(--color2);
    }
    body .fn-pop{
        max-width: 50vw;
        left: unset;
        align-self: center;
        transform: unset;
    }
    body main #reader-container #quiz{
        height: 100svh;
    }
    body main #reader-container #quiz #next-question{
        bottom: 0;
    }
    body main #reader-container #quiz #quiz-header{
        top: 22px;
        width: unset;
        gap: 10px;
    }
    body main #reader-container #quiz #quiz-header #progress-bar {
        width: 80px;
    }
    body main #reader-container #quiz .question img{
        width: 15%;
        margin-top: 80px;
    }
    body main #reader-container #quiz .question .heading{
        font-size: 24px;
        line-height: 2rem;
        margin-block: 10px;
        padding-inline: 20px;
    }
    body main #reader-container #quiz .question .options{
        width: 95%;
        font-size: 14px;
        gap: 10px;
    }
    body main #reader-container #quiz .question .options div{
        font-size: 18px;
        padding-inline: 10px;
    }
    body main #reader-container #quiz .question #answer-quote{
        width: 70%;
    }
}