/* Daily Ledger - A Free Design by Bryant Smith (bryantsmith.com)
   A diary laid out like a clean account book: a narrow date rail on the
   left, a wider entries column on the right, and ruled lines throughout.

   Every colour is gathered in the palette below, so you can recolour the
   whole page from one place. Section headings point you to the rest. */


/* ---- PALETTE: change these hex values to recolour the page ---- */

:root {
    --canvas:    #e3e6e8;  /* the desk the ledger rests on          */
    --paper:     #fdfefd;  /* the page itself                       */
    --rail:      #eef3f6;  /* the tinted date rail on the left      */
    --rail-soft: #f7fafb;  /* faint fill used on hover              */
    --wash:      #eef3f6;  /* quote and callout fills               */
    --ink:       #26313a;  /* body text                             */
    --ink-soft:  #5d6b76;  /* secondary text and fine print         */
    --navy:      #24506e;  /* primary accent: rules and links       */
    --navy-deep: #173346;  /* headings and numerals                 */
    --red:       #b24632;  /* the red ledger ink: ticks and marks   */
    --line:      #dbe2e7;  /* hairline borders                      */
}


/* ---- RESET & BASE: shared settings for the whole page ---- */

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

body {
    background: var(--canvas);
    color: var(--ink);
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    line-height: 1.7;
    padding: 48px 16px;
    -webkit-font-smoothing: antialiased;
}

a:focus {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
}


/* ---- PAGE: the bound book, centred on the desk ---- */

#page {
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 6px solid var(--navy);
    border-radius: 8px;
    max-width: 940px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(36, 80, 110, 0.06),
                0 20px 46px rgba(36, 80, 110, 0.13);
}


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

#masthead {
    background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
    border-bottom: 1px solid var(--line);
    padding: 52px 56px 26px 56px;
}

.kicker {
    color: var(--red);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.kicker::before {
    background: var(--red);
    content: "";
    display: inline-block;
    height: 2px;
    margin-right: 10px;
    vertical-align: middle;
    width: 26px;
}

#masthead h1 {
    color: var(--navy-deep);
    font-size: 56px;
    font-weight: normal;
    letter-spacing: -1px;
    line-height: 1.05;
    margin: 16px 0 10px 0;
}

.tagline {
    color: var(--ink-soft);
    font-size: 18px;
    font-style: italic;
}

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

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: var(--ink-soft);
    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(--navy);
    color: var(--navy);
}


/* ---- INTRO: the short preface before the ledger begins ---- */

.intro {
    border-bottom: 1px solid var(--line);
    padding: 32px 56px;
}

.lead {
    color: var(--ink);
    font-size: 21px;
    line-height: 1.6;
}

.lead::first-letter {
    color: var(--red);
    float: left;
    font-size: 3.2em;
    line-height: 0.82;
    padding: 6px 12px 0 0;
}


/* ---- LEDGER: a narrow date rail beside a wider entries column ----
   This is the core of the page. The grid makes a fixed-width left
   column (the dates) and a flexible right column (the entries), so
   the date cells line up into one continuous rail. */

#ledger {
    display: grid;
    grid-template-columns: 150px 1fr;
}

.rail-head,
.date {
    background: var(--rail);
    border-right: 1px solid var(--line);
    text-align: right;
}

.rail-head,
.col-head {
    border-bottom: 2px solid var(--navy);
    color: var(--ink-soft);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 14px 20px;
    text-transform: uppercase;
}

.col-head {
    padding-left: 40px;
    padding-right: 40px;
}

.date,
.entry {
    border-bottom: 1px solid var(--line);
}

.date {
    padding: 28px 20px;
}

.date .day {
    color: var(--navy-deep);
    display: block;
    font-size: 34px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.date .month {
    color: var(--ink-soft);
    display: block;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-top: 7px;
    text-transform: uppercase;
}

.date::before {
    background: var(--red);
    content: "";
    display: block;
    height: 3px;
    margin: 0 0 10px auto;
    width: 26px;
}

.entry {
    padding: 28px 40px 32px 40px;
    transition: background 0.15s ease;
}

.entry:hover {
    background: var(--rail-soft);
}

.entry h2 {
    color: var(--navy-deep);
    font-size: 24px;
    font-weight: normal;
    line-height: 1.25;
    margin-bottom: 8px;
}

.entry-meta {
    color: var(--red);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.entry p {
    margin-bottom: 15px;
}

.entry p:last-child {
    margin-bottom: 0;
}

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

#ledger a:hover,
#content a:hover {
    border-bottom-color: var(--red);
    color: var(--navy-deep);
}

.entry blockquote {
    background: var(--wash);
    border-left: 3px solid var(--red);
    border-radius: 0 6px 6px 0;
    color: var(--ink-soft);
    font-size: 19px;
    font-style: italic;
    line-height: 1.55;
    margin: 18px 0;
    padding: 16px 20px;
}

.entry blockquote p {
    margin: 0;
}

.entry ul {
    list-style: none;
    margin-bottom: 6px;
}

.entry ul li {
    border-bottom: 1px dotted var(--line);
    padding: 9px 0 9px 24px;
    position: relative;
}

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

.entry ul li::before {
    color: var(--red);
    content: "\2014";
    left: 0;
    position: absolute;
}


/* ---- CONTENT: the notes that sit below the ledger ---- */

#content {
    padding: 46px 56px 52px 56px;
}

#content p {
    margin-bottom: 18px;
}

#content h2 {
    color: var(--navy-deep);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2.5px;
    margin: 38px 0 14px 0;
    padding-bottom: 10px;
    position: relative;
    text-transform: uppercase;
}

#content h2:first-of-type {
    margin-top: 0;
}

#content h2::after {
    background: var(--line);
    bottom: 0;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    width: 100%;
}

#content h2::before {
    background: var(--navy);
    content: "";
    display: inline-block;
    height: 3px;
    margin-right: 10px;
    vertical-align: middle;
    width: 20px;
}

.howto {
    background: var(--wash);
    border: 1px dashed var(--navy);
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 24px 26px;
}

.howto p {
    color: var(--ink-soft);
    font-size: 15.5px;
    margin-bottom: 14px;
}

.howto p:last-child {
    margin-bottom: 0;
}

.howto strong {
    color: var(--ink);
}


/* ---- ARCHIVE: a plain row of month links ---- */

.archive {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    list-style: none;
}

.archive a {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.archive a::before {
    color: var(--red);
    content: "\00b7";
    margin-right: 8px;
}


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

#footer {
    border-top: 3px double var(--line);
    color: var(--ink-soft);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    padding: 24px 56px 30px 56px;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.15s ease;
}

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


/* ---- SMALL SCREENS: stack the date above each entry ---- */

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

    #masthead {
        padding: 38px 26px 22px 26px;
    }

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

    .intro {
        padding: 26px 26px;
    }

    .lead {
        font-size: 18px;
    }

    .lead::first-letter {
        font-size: 2.7em;
    }

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

    .col-head {
        display: none;
    }

    .rail-head {
        border-right: none;
        grid-column: 1 / -1;
        text-align: left;
    }

    .date {
        border-right: none;
        padding: 20px 26px 0 26px;
        text-align: left;
    }

    .date::before {
        margin: 0 0 8px 0;
    }

    .date .day {
        display: inline;
        font-size: 30px;
        margin-right: 10px;
    }

    .date .month {
        display: inline;
        margin-top: 0;
    }

    .entry {
        padding: 12px 26px 26px 26px;
    }

    .entry:hover {
        background: transparent;
    }

    #content {
        padding: 34px 26px 40px 26px;
    }

    #footer {
        padding: 20px 26px 24px 26px;
    }
}


/* ---- PRINT: drop the desk, tints and shadows for a clean sheet ---- */

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

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

    #menu {
        display: none;
    }

    .rail-head,
    .date {
        background: transparent;
    }
}
