/* Page Themes */
.light {
    color: black;
    background-color: white;
}

.dark {
    color: white;
    background-color: black;
}

.dusk {
    color:rgb(236, 213, 177);
    background-color: rgb(0, 0, 100)
}

.coffee {
    color:rgb(235, 169, 81);
    background-color:rgb(44, 23, 6);
}

.christmas {
    color: rgb(199, 158, 102);
    background-color: rgb(87, 10, 10);

}

/* Font Types*/
.times {
    font-family: 'Times New Roman', Times, serif;
}

.cambria {
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

.arial {
    font-family: Arial, Helvetica, sans-serif;
}

.georgia {
    font-family: Georgia, 'Times New Roman', Times, serif;
}

.monospace {
    font-family: monospace;
}

.system {
    font-family: system-ui, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.cursive {
    font-family: cursive;
}

/* Font Sizes */
.xs {
    font-size: x-small;
}
.sm {
    font-size: small;
}

.md {
    font-size: medium;
}

.lg {
    font-size: large;
}

.xl {
    font-size: x-large;
}

a {
    color: inherit;
    background-color: inherit;
}

body {
    padding-inline: 7%;
    margin: 1rem auto;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

header {
    grid-row: 1;
}

h1 {
    text-align: center;
    padding-top: 2rem;
    @media (min-width: 601px) {
        padding-top: 3rem;
    }
}

.topnav {
    display: grid;
    grid-template-columns: 1fr;
    line-height: 2;
    justify-items: left center;
    align-items: center;
    word-spacing: 0.5rem;
    @media (min-width: 601px) {
        grid-template-columns: 1fr auto;
        line-height: 1;
        padding-top: 1rem;
    }
}

nav {
    opacity: 80%;
    font-size: 1rem;
}

select {
    opacity: 80%;
    color: inherit;
    background-color: inherit;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: inherit;
}

option {
    font-family: inherit;
}

.bookTitle {
    h2 {
        opacity: 80%;
        margin-top: 0rem;
        margin-bottom: 0rem;
        text-align: center;
    }
    h3 {
        padding-bottom: 0rem;
        text-align: center;
        padding-inline: 5%;
        @media (min-width: 601px) {
            padding-inline: 10%;
        }
    }
    h4 {
        opacity: 60%;
        padding-bottom: 0rem;
        text-align: center;
        padding-inline: 5%;
        @media (min-width: 601px) {
            padding-inline: 10%;
        }
    }
    
}

.bookGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    justify-items: center;
    row-gap: 1rem;
}

.bookGridCoverTitle {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;

    align-items: center;
    @media (max-width: 768px) {
        justify-items: center;
    }    
    @media (min-width: 768px) {
        padding-inline: 5%;
    }
    @media (min-width: 768px) {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto;
    }

    padding-top: 2rem;
    row-gap: 2rem;
    column-gap: 1rem;;
    line-height: 1.5;

    ul, ol {
        list-style-type: none;
        justify-self: center;
        padding-inline-start: 10%;
        @media (max-width: 768px) {
            padding-inline-start: 0px;
        }
    }

    li::before {
        font-weight: bold;
        padding-right: 0.5rem;
        content: attr(data-label);
    }    
}

.bookGridTableOfContents {
    display: grid;
    grid-template-columns: 1fr;

    padding-top: 2rem;
    padding-bottom: 2rem;
    line-height: 1.5;
    align-items: left;

    ul, ol {
        align-items: left;
        align-self: left;
        justify-self: center;
        list-style-type: none;
        padding-inline-start: 0px;
    }

    li {
        display: grid;
        grid-template-columns: auto auto;
        justify-content: left;
    }

    li::before {
        font-weight: bold;
        padding-right: 1rem;
        @media (min-width: 601px) {
            padding-right: 3rem;
        }
        content: attr(data-label);
    }

    
}

.bookGridProblemSet {
    display: grid;
    grid-template-columns: 1fr;

    padding-top: 2rem;
    padding-bottom: 2rem;
    line-height: 1.75;

    word-break: break-word;
    overflow-wrap: break-word;
    overflow-x: hidden;
    max-width: 100%;

    .MathJax_Display {
        padding-inline: 10%;
        max-width: 80% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }

    h2 {
        line-height: 1.25;
    }

    li {
        margin-bottom: 1.5rem;
    }

    ul, ol {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;

        list-style-type: none;
        justify-self: center;
        justify-content: left;
        padding-inline-start: 0px;
        
    }

    .exerciseProblemDescription {
        a {
            text-decoration: none;
        }
    }

    li::before {
        font-weight: bold;
        padding-right: 0.5rem;
        @media (min-width: 601px) {
            padding-right: 1rem;
        }
        content: attr(data-label);
    }
    
    .bookCover {
        height: 200px;
        margin: auto;
        justify-items: center;
        align-items: center;
    }
}

.bookCover {
    height: 200px;
    @media (min-width: 601px) {
        height: 300px;
    }
    margin: auto;
}

.bookGridCoverTitle .bookCover {
    height: 200px;
    margin: auto;
    align-items: center;

}

.bookCover img {
    object-fit: contain;
}

.affiliate {
    font-size: 80%;
}

.books {
    h2 {
        opacity: 80%;
        margin-top: 0rem;
        margin-bottom: 3rem;
        text-align: center;
        padding-inline: 5%;
        @media (min-width: 601px) {
            padding-inline: 10%;
        }   
    }

    h3 {
        opacity: 80%;
        padding-bottom: 0rem;
        margin-top: 0rem;
        text-align: center;
    }

    @media (min-width: 1280px) {
        body {
            padding-inline: 20%;
            max-width: none;
        }
    }
}


@media (min-width: 600px) {
    body {
        padding-inline: 10%;
    }
}

@media (min-width: 768px) {
    body {
        max-width: 768px;
    }
}

@media (min-width: 1280px) {
    body {
        max-width: 900px;
    }
}

.home {
    word-break: break-word;
    overflow-wrap: break-word;

    h1 {
        margin-bottom: 1rem;
    }

    h2 {
        opacity: 80%;
        margin-top: 1rem;
    }

    h3 {
        padding-top: 0rem;
        margin-top: 0rem;
        text-align: center;
        opacity: 80%;
    }

    main {
        max-width: 100%;
        word-wrap: break-word;
        overflow-x: hidden;
    }

    ul, ol {
        width: 100%;
        list-style-type: none;
        padding-inline-start: 0px;
    }

    li {
        margin-bottom: 1rem;
    }
    
    li::before {
        font-weight: bold;
        padding-right: 0.5rem;
        content: attr(data-label);
    }
}

main {
    grid-row: 2;
    line-height: 1.25;
}

.contact {
    a {
        text-decoration: none;
    }
    svg {
        fill: currentColor;
    }
    word-spacing: 1rem;
}

footer {
    grid-row: 3;
    text-align: center;
    padding-top: 1rem;
}