@charset "utf-8";

:root {
    color-scheme: light;
    --ink: #555;
    --heading: #4c5e72;
    --line: #d8d5cc;
    --paper: rgba(255, 255, 255, .82);
    --topbar: rgba(56, 58, 60, .94);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    color: var(--ink);
    /* The legacy stylesheet set only `background: url(bg.png)` with no colour,
       so the effective backdrop was white. bg.png is an almost fully
       transparent grain layer; on a mid-grey base (#888378, 1.98:1 against
       --ink) body text was unreadable. White keeps the legacy look and the
       contrast at 7.46:1 (WCAG AA). */
    background: #ffffff url('/img/bg.png') repeat;
    font-family: "Tibetan Machine Uni", Georgia, "Times New Roman", serif;
    font-size: 14px;
    line-height: 1.45;
}

h1,
h2 {
    color: var(--heading);
    text-shadow: 1px 1px 2px #aaa;
}

h1 {
    font-size: 26px;
}

h2 {
    font-size: 20px;
}

a:link,
a:visited,
a:active {
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #91b7d2;
    outline-offset: 2px;
}

.clear {
    clear: both;
}

#topBlock {
    position: fixed;
    z-index: 100;
    top: 0;
    width: 100%;
    height: 40px;
    border: 0;
    background: var(--topbar);
    box-shadow: 0 1px 5px rgba(0, 0, 0, .3);
}

#topNavigation {
    position: relative;
    max-width: 1270px;
    height: 40px;
    margin: auto;
}

#topNavigation ul {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 40px;
    margin: 0 0 0 160px;
    padding: 0;
}

#topNavigation li {
    list-style: none;
    font-weight: bold;
}

#topNavigation a {
    color: #fff;
    font-size: 18px;
    text-shadow: 1px 1px 2px #333;
    transition: text-shadow .25s ease, opacity .25s ease;
}

#topNavigation nav a:hover {
    opacity: .88;
    text-decoration: none;
    text-shadow: 1px 1px 5px #111;
}

#logo {
    position: absolute;
    z-index: 2;
    top: -4px;
    left: 0;
    width: 150px;
    height: 120px;
    background: url('/img/ribbon.png') no-repeat;
    text-align: center;
}

#logo a {
    display: block;
    color: #fff;
    font-family: Palatino, Georgia, serif;
    font-size: 42px;
    font-style: italic;
    font-weight: bold;
    letter-spacing: 4px;
    line-height: 46px;
    text-shadow: 3px 3px 8px #333;
}

#logo a:hover {
    text-decoration: none;
    text-shadow: 3px 3px 12px #222;
}

#mainBlock {
    width: min(960px, calc(100% - 32px));
    min-height: 400px;
    margin: auto;
    padding-top: 50px;
}

#content {
    margin: 0 0 20px;
    padding: 0 4px 12px;
}

#sectionMenu {
    float: left;
    width: 33%;
}

#sectionMenu ul {
    margin: 0;
    padding: 0 14px 0 10px;
}

#sectionMenu li {
    list-style: none;
    border-radius: 3px;
    transition: padding-left .35s ease, background-color .35s ease;
}

#sectionMenu li:hover {
    padding-left: 10px;
    background: rgba(255, 255, 255, .22);
}

#sectionMenu a {
    display: block;
    padding: 2px 0;
    font-weight: bold;
    line-height: 24px;
}

#newBooks {
    float: left;
    width: 66%;
}

.bookTmb {
    float: left;
    width: calc(50% - 5px);
    height: 88px;
    margin: 10px 0 0 5px;
    overflow: hidden;
    border: 1px solid #eeeae2;
    border-radius: 3px;
    background: rgba(255, 255, 255, .9);
    transition: box-shadow .3s ease, border-color .3s ease, transform .3s ease;
}

.bookTmb:hover {
    border-color: #d0cbc1;
    box-shadow: 0 2px 8px rgba(65, 61, 52, .35);
    transform: translateY(-1px);
}

.bookTmbImg {
    float: left;
    width: 62px;
    height: 86px;
    margin: 1px 7px 1px 2px;
    text-align: center;
}

.bookTmbImg img {
    max-width: 60px;
    height: 80px;
    margin-top: 2px;
    padding: 1px;
    border: 1px solid #f2f2f2;
    object-fit: contain;
}

.bookTmbName {
    margin: 11px 6px 0 0;
    overflow: hidden;
    color: #4c5157;
    font-size: 12px;
    font-style: italic;
    font-weight: bold;
    line-height: 1.25;
}

.bookTmbAutor {
    margin: 4px 6px 0 0;
    overflow: hidden;
    color: #6d6d6d;
    font-size: 10px;
    line-height: 1.25;
}

#section .bookTmb {
    width: calc(25% - 5px);
}

#sections .sectionHeader {
    display: inline-block;
    margin-top: 15px;
    color: var(--heading);
    font-size: 22px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #aaa;
}

#sections ul {
    margin: 12px 30px 22px;
    padding: 8px;
    border-left: 1px solid #ccc;
}

#sections li {
    margin-top: 10px;
    list-style: none;
}

#sections li a {
    font-size: 15px;
    line-height: 24px;
}

#sections li span {
    font-weight: bold;
}

.bookTop {
    width: 100%;
    border: 0;
    border-collapse: separate;
}

.bookImageCell {
    width: 210px;
    text-align: center;
    vertical-align: top;
}

.bookMetaCell {
    vertical-align: top;
}

#bookImg {
    max-width: 200px;
    height: auto;
    padding: 6px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .3);
    box-shadow: 2px 2px 6px 1px #aaa;
    transition: box-shadow .25s ease;
}

#bookImg:hover {
    box-shadow: 2px 2px 8px 1px #999;
}

#bookAutor,
#bookName,
#bookInfo {
    text-align: center;
}

#bookAutor,
#bookInfo {
    font-size: 12px;
}

#bookName {
    font-style: italic;
}

#bookName h1 {
    margin: 12px 0;
}

#bookAnotation {
    margin-top: 16px;
    font-size: 13px;
    font-style: italic;
    line-height: 18px;
    text-indent: 30px;
}

#bookContent {
    width: 100%;
    border-collapse: collapse;
    color: #383838;
    font-size: 16px;
    font-style: italic;
}

#bookContent td {
    padding: 3px 0;
    vertical-align: top;
}

#bookContent a {
    font-size: 16px;
    font-style: italic;
}

#bookContent .bookPage {
    width: 45px;
    padding-left: 8px;
    text-align: right;
    white-space: nowrap;
}

.link1 {
    font-weight: bold;
}

.link2 {
    display: inline-block;
    margin-left: 30px;
}

.link3 {
    display: inline-block;
    margin-left: 60px;
}

#contentPageTop h1 {
    margin-bottom: 4px;
}

#contentPageTop h1 a {
    color: var(--heading);
    font-family: Palatino, Georgia, serif;
    font-size: 26px;
    font-style: italic;
    font-weight: normal;
}

#contentPageTop h2 {
    margin-top: 0;
    padding-left: 40px;
    font-style: italic;
}

#contentText,
#copyright {
    padding: 6px;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 16px;
    line-height: 22px;
    text-align: justify;
    text-indent: 30px;
}

.legacy-content {
    overflow-wrap: anywhere;
}

.legacy-content img,
.legacy-content table {
    max-width: 100%;
    height: auto;
}

#feedback {
    padding: 4px 8px;
}

#footer {
    max-width: 960px;
    min-height: 20px;
    margin: 20px auto;
    padding: 10px;
    border-top: 1px solid rgba(85, 85, 85, .35);
    font-size: 14px;
}

#year {
    text-align: center;
}

@media (max-width: 760px) {
    #topBlock {
        height: auto;
        min-height: 52px;
    }

    #topNavigation {
        min-height: 52px;
        padding-left: 96px;
    }

    #topNavigation ul {
        align-content: center;
        flex-wrap: wrap;
        gap: 2px 16px;
        min-height: 52px;
        height: auto;
        margin: 0;
        padding: 5px 8px;
    }

    #topNavigation a {
        font-size: 14px;
    }

    #logo {
        left: 8px;
        width: 80px;
        height: 76px;
        background-size: 95px auto;
        background-position: center top;
    }

    #logo a {
        font-size: 25px;
        letter-spacing: 2px;
        line-height: 27px;
    }

    #mainBlock {
        width: min(100% - 20px, 960px);
        padding-top: 76px;
    }

    #sectionMenu,
    #newBooks {
        float: none;
        width: 100%;
    }

    #sectionMenu {
        margin-bottom: 22px;
    }

    .bookTmb,
    #section .bookTmb {
        width: calc(50% - 5px);
    }

    .bookTop,
    .bookTop tbody,
    .bookTop tr,
    .bookTop td {
        display: block;
        width: 100%;
    }

    .bookImageCell {
        margin-bottom: 14px;
    }

    #sections ul {
        margin-right: 8px;
        margin-left: 8px;
    }
}

@media (max-width: 460px) {
    .bookTmb,
    #section .bookTmb {
        float: none;
        width: 100%;
        margin-left: 0;
    }

    #contentPageTop h2 {
        padding-left: 12px;
    }

    .link2 {
        margin-left: 16px;
    }

    .link3 {
        margin-left: 32px;
    }
}
