body {
    background: rgba(250, 255, 250, 1);
    display: grid;
    grid-template-columns: 836px 300px;
    column-gap: 20px;
    margin: 8px;
}

#ubc {
    margin-top: 0;
    color: #008f00;
    text-align: center;
    font-family: "Courier New", monospace;
    font-size: 40pt;
    text-shadow: 3px 2px #a5a5a5;
    font-weight: bold;
}

#ubc-subtitle {
    margin-top: 0;
    color: #000000;
    text-align: center;
    font-family: "Times New Roman", serif;
    font-size: 25pt;
    text-shadow: 1px 1px #a5a5a5;
    font-style: italic;
}

#header {
    grid-column: 1 / -1;
    min-height: 0;
    height: auto;
    overflow: auto;
    text-align: center;
}

#logo,
#caricature {
    float: none;
    display: inline-block;
    max-width: 160px;
    max-height: 160px;
    height: auto;
    margin: 0 8px 8px 8px;
    vertical-align: top;
}

div#tabs {
    grid-column: 1 / -1;
    min-height: 70pt;
    background-color: rgba(230, 255, 230, 1);
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    column-gap: 20px;
    row-gap: 8px;
    white-space: nowrap;
}

.tab-break {
    flex-basis: 100%;
    height: 0;
}

a.tab {
    font-family: "Arial", sans-serif;
    font-weight: bold;
    font-size: 14pt;
    color: darkgreen;
    margin-right: 0;
}

.tab {
    font-family: "Arial", sans-serif;
    font-weight: bold;
    font-size: 14pt;
    color: darkgreen;
}

div#content-area {
    grid-column: 1;
    min-width: 0;
}

#book-palette {
    display: grid;
    grid-template-columns: repeat(4, 160px);
    justify-content: start;
    column-gap: 52px;
    row-gap: 42px;
    margin: 20px;
}

@media (max-width: 760px) {
    #book-palette {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

a.book-palette-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: darkgreen;
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-decoration: none;
}

a.book-palette-link:hover .book-cover {
    border-color: darkgreen;
}

.book-cover {
    display: block;
    width: 160px;
    min-height: 208px;
    border: 5px double black;
    background: white;
}

#products {
    width: 97%;
}

div.product-category {
    margin-top: 10px;
}

div.product-category-scroll {
    margin-top: 10px;
    margin-left: 20px;
    border: 5px double black;
    background: rgba(255, 255, 255, 1)
}

p.product-category {
    font-family: Arial, sans-serif;
    font-size: 20pt;
    margin-left: 5px;
    margin-top: 50px;
    margin-bottom: 2px;
}

div.product {
    margin: 5px;
}

p.product-name {
    font-family: "Times New Roman", serif;
    font-style: italic;
    font-size: 18pt;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 2px;
}

div.product-description {
    margin-top: 2px;
    margin-left: 20px;
    margin-bottom: 1px;
    font-size: 12pt;
    font-family: "Times New Roman", serif
}

#sidebar {
    grid-column: 2;
    min-width: 0;
    margin-top: 20px;
}

.sidebar-title {
    font-family: Arial, sans-serif;
    font-size: 20pt;
    margin-left: 5px;
    margin-top: 0;
    margin-bottom: 2px;
}

.morning-bathrobe-rant-image {
    display: block;
    width: 300px;
    max-width: calc(100% - 10px);
    height: auto;
    margin-left: 5px;
    margin-top: 8px;
}

.morning-bathrobe-rant-links {
    margin: 12px 5px 0 5px;
    padding-left: 0;
    line-height: 1.25;
    list-style: none;
}

.morning-bathrobe-rant-links li {
    margin-bottom: 7px;
    text-align: left;
}

.morning-bathrobe-rant-links a {
    font-family: "Arial", sans-serif;
    font-weight: bold;
    font-size: 12pt;
    color: darkgreen;
}

div.event {
    margin-bottom: 1px;
    margin-top: 5px;
    border: 1px solid black;
    background: rgba(255, 255, 255, 1)
}

p.event {
    font-family: Arial, sans-serif;
    font-size: 14pt;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 2px;
}

div.event-description {
    margin-top: 2px;
    margin-left: 10px;
    margin-bottom: 1px;
    font-size: 12pt;
    font-family: "Times New Roman", serif
}

div.book {
    margin-bottom: 20px;
    margin-top: 5px;
    border: 1px solid black;
    background: rgba(255, 255, 255, 1);
}

div.book-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    column-gap: 12px;
    min-height: 7.5em;
}

p.book-title {
    font-family: "Times New Roman", serif;
    font-size: 18pt;
    font-style: italic;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 5px;
    flex: 1;
    min-width: 0;
    align-self: center;
}

a.book-title-link {
    color: inherit;
    text-decoration: none;
}

a.book-title-link:hover {
    color: darkgreen;
    text-decoration: underline;
}

a.book-cover-link {
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
    margin: 0 6px 0 0;
    line-height: 0;
}

img.book-thumbnail {
    display: block;
    height: 7.5em;
    width: auto;
    object-fit: contain;
    border: 1px solid #333;
    background: white;
}

p.book-author {
    font-family: "Times New Roman", serif;
    font-size: 12pt;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 15px;
}

p.book-publication {
    font-family: "Times New Roman", serif;
    font-size: 12pt;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 15px;
}

div.book-description {
    font-family: "Times New Roman", serif;
    font-size: 12pt;
    margin: 0 20px;

}

div.article {
    margin-bottom: 1px;
    margin-top: 5px;
    border: 1px solid black;
    background: rgba(255, 255, 255, 1)
}

a.article-title {
    font-family: "Times New Roman", serif;
    font-size: 14pt;
    font-style: italic;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 5px;
}

p.article-date {
    font-family: "Times New Roman", serif;
    font-size: 12pt;
    margin: 0 0;
}

div.form{
    margin-top: 20px;
    margin-left: 50px;
    padding: 10px;
    width: fit-content;
    border: 2px solid black;
    background: rgba(255, 255, 255, 1);
    font-size: 14pt;
    font-weight: bold;
}

h1.form {
    margin-top: 0;
    font-size: 20pt;
}

input.form {
    margin-top: 5px;
    font-size: 14pt;

}

input.submit {
    border: 2px solid black;
    font-weight: bold;
    font-size: 12pt;
    margin-top: 10px;
}

div#message {
    grid-column: 1 / -1;
    margin-top: 5px;
    margin-left: 10px;
    padding-left: 10px;
    padding-right: 10px;
    width: fit-content;
    border: 2px solid black;
    background: rgba(255, 240, 240, 1);
    font-size: 18pt;
    font-weight: bold;
}

div.page-content {
    font-size: 14pt;
    margin-left: 50px;
}

.markdown-page {
    grid-column: 1 / -1;
    box-sizing: content-box;
    width: min(8.5in, calc(100vw - 48px));
    max-width: none;
    margin: 24px auto;
    padding: 0 24px;
    font-family: "Times New Roman", serif;
    font-size: 16pt;
    line-height: 1.35;
}

.markdown-page h2,
.markdown-page h3 {
    font-family: Arial, sans-serif;
}

.markdown-page h2 {
    margin-bottom: 0;
}

.markdown-page h3 {
    margin-top: 24px;
    margin-bottom: 8px;
}

.markdown-page p {
    margin-top: 8px;
    margin-bottom: 8px;
}

.markdown-page ul {
    margin-top: 6px;
    margin-bottom: 14px;
}

.markdown-page li {
    margin-bottom: 6px;
}

@media (max-width: 900px) {
    body {
        grid-template-columns: 1fr;
        row-gap: 12px;
        margin: 6px;
    }

    #header,
    div#tabs,
    div#content-area,
    #sidebar,
    div#message {
        grid-column: 1;
    }

    #logo,
    #caricature {
        max-width: 36vw;
        max-height: 120px;
    }

    #ubc {
        clear: both;
        font-size: 28pt;
        margin-bottom: 6px;
    }

    #ubc-subtitle {
        font-size: 17pt;
        margin-bottom: 10px;
    }

    div#tabs {
        min-height: 0;
        padding: 8px;
        column-gap: 14px;
        row-gap: 8px;
        white-space: normal;
    }

    a.tab,
    .tab {
        font-size: 12pt;
    }

    #book-palette {
        grid-template-columns: repeat(2, minmax(130px, 160px));
        justify-content: center;
        column-gap: 24px;
        row-gap: 28px;
        margin: 18px 8px;
    }

    .book-cover {
        width: min(160px, 40vw);
        min-height: 0;
    }

    #sidebar {
        margin-top: 8px;
    }

    .sidebar-title {
        font-size: 17pt;
        margin-top: 22px;
    }

    .morning-bathrobe-rant-image {
        width: min(300px, calc(100% - 10px));
    }

    div.page-content {
        margin-left: 12px;
        margin-right: 12px;
    }

    .markdown-page {
        box-sizing: border-box;
        width: 100%;
        margin: 16px auto;
        padding: 0 14px;
        font-size: 15pt;
    }
}

@media (max-width: 380px) {
    #book-palette {
        grid-template-columns: minmax(130px, 160px);
    }

    #ubc {
        font-size: 24pt;
    }
}
