/* Margin Notes - A Free Design by Bryant Smith (bryantsmith.com)
   A reading journal: a wide article column with a narrow right margin
   for page numbers, quotes and side comments.
   Look for the section headings below to find what you want to change. */


/* ---- BODY: the warm desk behind the sheet of paper ---- */

body {
    background: #eae4d8;
    color: #2a2722;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    line-height: 1.75;
    padding: 40px 16px;
}

* {
    margin: 0;
    padding: 0;
}


/* ---- PAGE: the sheet itself, held to a comfortable width ---- */

#page {
    background: #fffdf7;
    border-top: 5px solid #a8452a;
    box-shadow: 0 1px 2px rgba(42, 39, 34, 0.06), 0 16px 38px rgba(42, 39, 34, 0.10);
    margin: 0 auto;
    max-width: 940px;
    padding: 56px 64px 40px 64px;
}


/* ---- MASTHEAD: title on the left, links on the right ---- */

#masthead {
    align-items: flex-end;
    border-bottom: 3px double #ded6c5;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 32px;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 22px;
}

#masthead h1 {
    color: #1d1b17;
    font-size: 42px;
    font-weight: normal;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

#masthead .tagline {
    color: #9a9284;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    margin-top: 10px;
    text-transform: uppercase;
}


/* ---- MENU: the row of text links ---- */

#menu {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 1.5px;
    padding-bottom: 4px;
    text-transform: uppercase;
}

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: #6f6a5f;
    margin-left: 20px;
    padding-bottom: 3px;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#menu a:hover,
#menu a:focus {
    border-bottom: 2px solid #a8452a;
    color: #a8452a;
}


/* ---- THE TWO COLUMNS: a wide article + a narrow right margin ----
   CSS grid makes the sidebar simple. The first column takes all the
   space that is left; the second is a fixed 210px rail on the right.
   Change 210px to make the margin wider or narrower. */

#layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
}

#article {
    border-right: 1px solid #e6dfd0;
    padding-right: 44px;
}

#margin {
    padding-left: 32px;
}


/* ---- ARTICLE TEXT: the reading column ---- */

#article p {
    margin-bottom: 20px;
}

#article a,
#article a:visited {
    border-bottom: 1px solid #e0b7a8;
    color: #a8452a;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#article a:hover,
#article a:focus {
    border-bottom: 1px solid #6f2a18;
    color: #6f2a18;
}

.lead {
    color: #4a453d;
    font-size: 21px;
    line-height: 1.65;
}

.lead::first-letter {
    color: #a8452a;
    float: left;
    font-size: 3.3em;
    line-height: 0.82;
    padding: 5px 10px 0 0;
}


/* ---- HEADINGS: small sans labels with a short accent rule ---- */

h2 {
    border-bottom: 1px solid #ece5d7;
    color: #1d1b17;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2.2px;
    margin: 44px 0 18px 0;
    padding-bottom: 10px;
    text-transform: uppercase;
}

h2::before {
    background: #a8452a;
    content: "";
    display: inline-block;
    height: 3px;
    margin-right: 10px;
    vertical-align: middle;
    width: 22px;
}


/* ---- QUOTE: a pull quote with a coloured bar ---- */

blockquote {
    border-left: 3px solid #a8452a;
    color: #55504a;
    font-size: 20px;
    font-style: italic;
    line-height: 1.6;
    margin: 32px 0;
    padding: 4px 0 4px 24px;
}

blockquote p {
    margin: 0;
}


/* ---- HOWTO BOX: a bordered note for template users ---- */

.howto {
    background: #faf5ec;
    border: 1px solid #e6dfd0;
    border-left: 4px solid #a8452a;
    border-radius: 3px;
    padding: 20px 24px;
}

.howto p {
    margin: 0;
    color: #4a453d;
    font-size: 16px;
}


/* ---- SHELF: the bordered list of books ---- */

.shelf {
    border-top: 1px solid #ece5d7;
    list-style: none;
}

.shelf li {
    border-bottom: 1px solid #ece5d7;
    padding: 14px 0;
}

.shelf .book {
    color: #1d1b17;
    font-size: 19px;
    font-style: italic;
}

.shelf .author {
    color: #9a9284;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    margin-left: 10px;
    text-transform: uppercase;
}

.shelf .mark {
    color: #a8452a;
    display: block;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 0.5px;
    margin-top: 4px;
}


/* ---- MARGIN RAIL: the side notes and page numbers ---- */

.note {
    border-top: 2px solid #a8452a;
    padding-top: 10px;
    margin-bottom: 34px;
}

.note p {
    color: #55504a;
    font-size: 15px;
    line-height: 1.6;
}

.note .pagenum {
    color: #a8452a;
    display: block;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.note .source {
    color: #9a9284;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    margin-top: 6px;
    text-transform: uppercase;
}

.note-tip {
    border-top-color: #ded6c5;
}

.note-tip p {
    color: #6f6a5f;
    font-size: 14px;
}


/* ---- FOOTER: the required credit link ---- */

#footer {
    border-top: 3px double #ded6c5;
    color: #9a9284;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    margin-top: 56px;
    padding-top: 22px;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    border-bottom: none;
    color: #7a7468;
    text-decoration: none;
}

#footer a:hover,
#footer a:focus {
    color: #a8452a;
}


/* ---- SMALL SCREENS: the margin drops below the article ---- */

@media (max-width: 820px) {
    #layout {
        grid-template-columns: 1fr;
    }

    #article {
        border-right: none;
        padding-right: 0;
    }

    #margin {
        border-top: 1px solid #ece5d7;
        display: grid;
        gap: 0 32px;
        grid-template-columns: 1fr 1fr;
        margin-top: 40px;
        padding-left: 0;
        padding-top: 32px;
    }
}


/* ---- PHONES: tighter padding and smaller type ---- */

@media (max-width: 640px) {
    body {
        padding: 20px 10px;
    }

    #page {
        padding: 36px 24px 28px 24px;
    }

    #masthead h1 {
        font-size: 31px;
    }

    #menu a {
        margin: 0 16px 0 0;
    }

    #margin {
        grid-template-columns: 1fr;
    }

    .lead {
        font-size: 18px;
    }

    h2 {
        font-size: 12px;
    }
}


/* ---- PRINT: a clean sheet with no desk or shadows ---- */

@media print {
    body {
        background: #ffffff;
        padding: 0;
    }

    #page {
        border-top: none;
        box-shadow: none;
        max-width: 100%;
        padding: 0;
    }

    #menu {
        display: none;
    }
}
