/* Case Notes - A Free Design by Bryant Smith (bryantsmith.com)
   All of the colours, type and spacing used on the page are gathered here.
   Look for the section headings below to find what you want to change. */


/* ---- COLOUR + SIZE VARIABLES: change these first ---- */

:root {
    --paper: #f1ece2;
    --sheet: #fffdf9;
    --ink: #23262b;
    --muted: #6f6b62;
    --line: #e4ddcf;
    --accent: #9c3a2c;
    --accent-dark: #79291e;
    --tint: #f7ece8;
}


/* ---- RESET: remove the browser's default spacing ---- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* ---- BODY: the "desk" the sheet rests on ---- */

body {
    background: var(--paper);
    color: var(--ink);
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    line-height: 1.75;
    padding: 48px 20px;
    text-align: center;
}


/* ---- PAGE: the sheet of paper itself ---- */

#page {
    background: var(--sheet);
    border-top: 6px solid var(--accent);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 26px 50px -24px rgba(50, 34, 24, 0.45);
    margin: 0 auto;
    max-width: 900px;
    padding: 56px 60px 40px 60px;
    text-align: left;
}


/* ---- MASTHEAD: the title block at the top ---- */

#masthead {
    border-bottom: 1px solid var(--line);
    margin-bottom: 44px;
    padding-bottom: 30px;
}

.kicker {
    color: var(--accent);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 0.22em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

#masthead h1 {
    color: var(--ink);
    font-size: 52px;
    font-weight: normal;
    letter-spacing: -1px;
    line-height: 1;
}

.tagline {
    color: var(--muted);
    font-size: 17px;
    font-style: italic;
    margin-top: 12px;
}


/* ---- MENU: the row of links under the title ---- */

#menu {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 0.12em;
    margin-top: 26px;
    text-transform: uppercase;
}

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: var(--muted);
    margin-right: 22px;
    padding-bottom: 4px;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#menu a:hover,
#menu a:focus {
    border-bottom-color: var(--accent);
    color: var(--accent);
}


/* ---- CONTENT GRID: article on the left, facts on the right ---- */

#content {
    align-items: start;
    display: grid;
    gap: 56px;
    grid-template-columns: minmax(0, 1fr) 232px;
}


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

#article {
    max-width: 66ch; /* keeps the measure comfortable */
    overflow-wrap: break-word;
}

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

#article a,
#article a:visited {
    border-bottom: 1px solid #d8b3aa;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#article a:hover {
    border-bottom-color: var(--accent-dark);
    color: var(--accent-dark);
}

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

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


/* ---- HEADINGS: the numbered section titles ---- */

h2 {
    border-bottom: 2px solid var(--line);
    color: var(--ink);
    font-size: 27px;
    font-weight: normal;
    line-height: 1.2;
    margin: 48px 0 18px 0;
    padding-bottom: 12px;
}

h2 .num {
    border: 1px solid var(--accent);
    border-radius: 3px;
    color: var(--accent);
    display: inline-block;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    margin-right: 12px;
    padding: 3px 8px;
    vertical-align: middle;
}


/* ---- QUOTE: the indented passage with a coloured bar ---- */

blockquote {
    background: var(--tint);
    border-left: 4px solid var(--accent);
    border-radius: 0 4px 4px 0;
    color: #4e4a44;
    font-size: 20px;
    font-style: italic;
    line-height: 1.6;
    margin: 32px 0;
    padding: 18px 24px;
}

blockquote p {
    margin: 0;
}


/* ---- STEPS: the numbered list in the process section ---- */

.steps {
    counter-reset: step;
    list-style: none;
    margin: 26px 0 8px 0;
}

.steps li {
    border-bottom: 1px solid var(--line);
    counter-increment: step;
    padding: 12px 0 12px 42px;
    position: relative;
}

.steps li:last-child {
    border-bottom: none;
}

.steps li::before {
    color: var(--accent);
    content: counter(step);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    left: 0;
    position: absolute;
    top: 15px;
    width: 28px;
}


/* ---- STATS: the small results table ---- */

.stats {
    border-collapse: collapse;
    margin: 26px 0 8px 0;
    width: 100%;
}

.stats th {
    border-bottom: 2px solid var(--accent);
    color: var(--accent);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    padding: 0 12px 10px 0;
    text-align: left;
    text-transform: uppercase;
}

.stats td {
    border-bottom: 1px solid var(--line);
    padding: 12px 12px 12px 0;
}

.stats td:not(:first-child) {
    color: var(--accent-dark);
    font-weight: bold;
}


/* ---- LESSONS: the short tick list ---- */

.lessons {
    list-style: none;
    margin-top: 6px;
}

.lessons li {
    border-bottom: 1px solid var(--line);
    padding: 14px 0 14px 32px;
    position: relative;
}

.lessons li:last-child {
    border-bottom: none;
}

.lessons li::before {
    color: var(--accent);
    content: "\2014";
    font-weight: bold;
    left: 0;
    position: absolute;
}


/* ---- NOTE: the "how to use this template" callout ---- */

.note {
    background: var(--tint);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    margin-top: 48px;
    padding: 22px 26px 8px 26px;
}

.note h3 {
    color: var(--accent-dark);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 13px;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.note p {
    font-size: 16px;
}


/* ---- FACTS: the sidebar of quick facts on the right ---- */

#facts {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 13px;
    position: sticky;
    top: 32px;
}

.facts-title {
    border-bottom: 2px solid var(--accent);
    color: var(--ink);
    font-size: 12px;
    letter-spacing: 0.16em;
    line-height: 1.4;
    margin: 0 0 4px 0;
    padding-bottom: 10px;
    text-transform: uppercase;
}

#facts dt {
    color: var(--accent);
    font-size: 10px;
    letter-spacing: 0.14em;
    margin-top: 18px;
    text-transform: uppercase;
}

#facts dd {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 3px;
}

.facts-note {
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    margin-top: 24px;
    padding-top: 16px;
}


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

#footer {
    border-top: 2px solid var(--line);
    color: var(--muted);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 0.1em;
    margin-top: 56px;
    padding-top: 22px;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    color: var(--muted);
    text-decoration: none;
}

#footer a:hover {
    color: var(--accent);
}


/* ---- TABLET: drop the sidebar beneath the article ---- */

@media (max-width: 860px) {
    #content {
        gap: 40px;
        grid-template-columns: minmax(0, 1fr);
    }

    #article,
    #facts {
        min-width: 0;
    }

    #facts {
        border-top: 1px solid var(--line);
        padding-top: 28px;
        position: static;
    }
}


/* ---- PHONES: pull in the padding and shrink the type ---- */

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

    #page {
        box-shadow: none;
        padding: 36px 22px 28px 22px;
    }

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

    .lead {
        font-size: 18px;
    }

    h2 {
        font-size: 22px;
    }

    #menu a {
        display: inline-block;
        margin-bottom: 6px;
        margin-right: 14px;
    }

    .stats th,
    .stats td {
        font-size: 14px;
        padding-right: 8px;
    }
}


/* ---- PRINT: a clean sheet for a printed report ---- */

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

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

    #menu {
        display: none;
    }
}
