/* Graph Paper - A Free Design by Bryant Smith (bryantsmith.com)

   The whole look is built from a few colours at the top of this file.
   Scroll to a section heading to find the part you want to change. */


/* ---- COLOURS: the ink, the paper and the grid ---- */

:root {
    --desk:    #dde5e6;  /* the table the pad rests on   */
    --paper:   #fdfefb;  /* the sheet of paper itself    */
    --grid-sm: #e9f1f3;  /* fine 8px grid lines          */
    --grid-lg: #d3e3e9;  /* bold 40px grid lines         */
    --margin:  #f0b6ae;  /* the red notebook margin line */
    --ink:     #17333e;  /* headings                     */
    --text:    #3a4b52;  /* body text                    */
    --muted:   #7d9098;  /* captions and labels          */
    --accent:  #2f6f9f;  /* blue accent                  */
    --accent2: #c05c4c;  /* warm accent for small marks  */
}


/* ---- RESET ---- */

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


/* ---- BODY: the "desk" behind the paper ---- */

body {
    background: var(--desk);
    color: var(--text);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    padding: 48px 16px;
    text-align: center;
}


/* ---- PAGE: the sheet, its layered grid background, its margin line ---- */

#page {
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid-lg) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-lg) 1px, transparent 1px),
        linear-gradient(var(--grid-sm) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-sm) 1px, transparent 1px);
    background-position: -1px -1px;
    background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
    border: 1px solid #c9d7db;
    border-top: 4px solid var(--ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 18px 40px rgba(23, 51, 62, 0.12);
    margin: 0 auto;
    max-width: 860px;
    padding: 56px 64px 40px 92px;
    position: relative;
    text-align: left;
}

/* the red margin, drawn as a pseudo-element at the left of the page */
#page::before {
    background: var(--margin);
    bottom: 0;
    content: "";
    left: 64px;
    position: absolute;
    top: 0;
    width: 1px;
}


/* ---- BADGE: the file number, absolutely positioned in the corner ---- */

#badge {
    background: var(--ink);
    color: #ffffff;
    font-size: 10px;
    letter-spacing: 2px;
    padding: 5px 12px;
    position: absolute;
    right: 28px;
    text-transform: uppercase;
    top: 24px;
}


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

#masthead {
    border-bottom: 2px solid var(--ink);
    margin-bottom: 36px;
    padding-bottom: 20px;
}

#masthead h1 {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 42px;
    font-weight: normal;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

#masthead .tagline {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 2.5px;
    margin-top: 10px;
    text-transform: uppercase;
}


/* ---- MENU: the row of links, sticky at the top of the sheet ---- */

#menu {
    background: var(--paper);
    border-bottom: 1px solid var(--grid-lg);
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: 22px;
    padding: 12px 0 10px 0;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 5;
}

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: #55666d;
    display: inline-block;
    margin-right: 20px;
    padding-bottom: 2px;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

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


/* ---- TEXT: paragraphs, links and compact headings ---- */

#content p {
    margin-bottom: 18px;
    max-width: 68ch;
}

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

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

.lead {
    color: #2f434b;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 19px;
    line-height: 1.65;
}

/* compact headings: a small number, a rule, a short label */
#content h2 {
    align-items: center;
    border-bottom: 1px solid var(--grid-lg);
    color: var(--ink);
    display: flex;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2.5px;
    margin: 42px 0 18px 0;
    padding-bottom: 10px;
    text-transform: uppercase;
}

#content h2 span {
    background: var(--accent2);
    color: #ffffff;
    font-size: 10px;
    letter-spacing: 1px;
    margin-right: 12px;
    padding: 3px 7px;
}


/* ---- NOTES: the boxed cards for ideas ---- */

.notes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.note {
    background: #ffffff;
    border: 1px solid #c9d7db;
    border-left: 3px solid var(--accent);
    box-shadow: 0 2px 0 rgba(23, 51, 62, 0.04);
    flex: 1 1 220px;
    padding: 16px 18px;
    position: relative;
}

.note h3 {
    color: var(--ink);
    font-size: 13px;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.note p {
    color: var(--text);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 0;
}

.note.wide {
    border-left-color: var(--accent2);
    flex-basis: 100%;
    margin-top: 4px;
}

.note.wide p {
    max-width: 68ch;
}

.note .aside {
    color: var(--muted);
    font-size: 13px;
    margin-top: 10px;
}


/* ---- TASKS: checkboxes drawn by hand in CSS ---- */

.tasks {
    list-style: none;
    margin-top: 4px;
}

.tasks li {
    border-bottom: 1px dashed var(--grid-lg);
    padding: 9px 0;
}

.tasks label {
    cursor: pointer;
    display: block;
}

/* hide the browser's own box, then draw our own beside the text */
.tasks input {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid #a9bcc3;
    height: 15px;
    margin-right: 12px;
    position: relative;
    top: 2px;
    vertical-align: middle;
    width: 15px;
}

.tasks input:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.tasks input:checked::after {
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    content: "";
    height: 8px;
    left: 3px;
    position: absolute;
    top: 0;
    transform: rotate(45deg);
    width: 4px;
}

.tasks input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.tasks input:checked + span {
    color: var(--muted);
    text-decoration: line-through;
}


/* ---- REFERENCES: a small bordered table ---- */

.references {
    border-collapse: collapse;
    font-size: 14px;
    max-width: 640px;
    width: 100%;
}

.references th {
    border-bottom: 2px solid var(--ink);
    color: var(--ink);
    font-size: 10px;
    letter-spacing: 2px;
    padding: 8px 12px;
    text-align: left;
    text-transform: uppercase;
}

.references td {
    border-bottom: 1px solid var(--grid-lg);
    padding: 10px 12px;
    vertical-align: top;
}

.references .filed {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.references tr:hover td {
    background: #f2f8fa;
}


/* ---- QUOTE: a margin note in the classic notebook red ---- */

blockquote {
    border-left: 3px solid var(--accent2);
    color: #55666d;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 18px;
    font-style: italic;
    margin: 34px 0;
    padding: 2px 0 2px 22px;
}

blockquote p {
    margin: 0;
}


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

#footer {
    border-top: 3px double #c9d7db;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-top: 56px;
    padding-top: 20px;
    text-align: center;
    text-transform: uppercase;
}

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

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


/* ---- SMALL SCREENS: pull in padding and stack the columns ---- */

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

    #page {
        padding: 40px 22px 30px 46px;
    }

    /* move the margin line in with the padding */
    #page::before {
        left: 30px;
    }

    #badge {
        right: 18px;
        top: 16px;
    }

    #masthead h1 {
        font-size: 30px;
        padding-top: 22px;
    }

    #menu a {
        margin-right: 14px;
    }

    .note {
        flex-basis: 100%;
    }

    #content h2 {
        font-size: 12px;
        letter-spacing: 1.5px;
    }
}


/* ---- PRINT: plain paper, no desk and no shadows ---- */

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

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

    #page::before,
    #badge,
    #menu {
        display: none;
    }
}
