html {
    background: #ececec; /* soft neutral gray */
    font-size: 100%;
    overflow-y: scroll;
    padding-bottom: 3em;
    padding-top: 0.5em;
    scroll-behavior: smooth;
}

body {
    background: #ffffff; /* clean white content area */
    color: #2b2b2b;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;

    padding: 0.75em 0.75em;
    margin: 0.5em auto;

    max-width: 750px;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* 
css_settings = {
    'body_width':750,
    'body_width_units':'px',
    'body_pad':2,
    'body_pad_units':'em'
}
 */

/* ------------------------------------------------------------
   MEDIA + RESPONSIVENESS
------------------------------------------------------------ */
img, video {
    max-width: 100%;
    height: auto;
}

@media only screen and (max-width: 750px) {
    img, video { max-height: 100vw; }
}

/* ------------------------------------------------------------
   TYPOGRAPHY
------------------------------------------------------------ */
a {
    color: #3457b2;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

p { margin: 0.75em 0; }

h1, h2, h3, h4, h5, h6 {
    color: #1f1f1f;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: normal;
    margin-top: 0.5em;
    line-height: 1.1;
    letter-spacing: -0.5px;
}
h1 { margin-top: 0.5em; font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.2em; }
h5 { font-size: 1em; }
h6 { font-size: 0.9em; }

b, strong { font-weight: bold; }
dfn { font-style: italic; }

ins {
    background: #ffec99;
    color: #000;
    text-decoration: none;
}
mark {
    background: #ffe566;
    color: #000;
    font-style: italic;
    font-weight: bold;
}

/* Superscripts / subscripts */
sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
}
sup { top: -0.5em; }
sub { bottom: -0.25em; }

/* ------------------------------------------------------------
   STRUCTURAL ELEMENTS
------------------------------------------------------------ */
div.toc:before {
    content: "Table of Contents:";
    font-family: Georgia, serif;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5em;
}

div.toc {
    border: 1px solid #d3d3d3;
    background: #fafafa;
    padding: 0.75em 1em;
    margin: 10px 10px;
    border-radius: 4px;
    width: fit-content;
}

blockquote {
    border-left: 3px solid #c8c8c8;
    background: #f7f7f7;
    margin: 1.5em 0;
    padding: 0.75em 1.25em;
/*     font-style: italic; */
}

hr {
    border: none;
    border-top: 1px solid #d7d7d7;
    margin: 1.5em 0;
}

/* ------------------------------------------------------------
   CODE BLOCKS
------------------------------------------------------------ */
pre {
    background: #f4f4f4;
    border: 1px solid #d4d4d4;
    font-size: 0.9em;
    line-height: 1.45;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 10px 5px;
}

pre code, pre tt, samp, code {
    background: transparent;
    font-family: 'Courier New', monospace;
    border: none;
}

/* ------------------------------------------------------------
   LISTS
------------------------------------------------------------ */
ul, ol {
    margin: 0;
    padding-left: 1em;
}
li p:last-child { margin: 0; }

ol > li:not(:last-child) {
    margin-bottom: 0.5em;
}

dd { margin-left: 2em; }

/* ------------------------------------------------------------
   TABLES
------------------------------------------------------------ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 23px;
    border: 1px solid rgba(0,0,0,0.15);
}

table th {
    background: #f4f4f4;
    font-weight: 600;
}

table th, table td {
    padding: 0.5em 1em;
    border: 1px solid rgba(0,0,0,0.15);
    text-align: left;
    vertical-align: top;
}

/* removed table hover */



/* ------------------------------------------------------------
   OLED TRUE BLACK DARK MODE
------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {

    html {
        background: #000000;
    }

    body {
        background: #121212;
        color: #e6e6e6;
        box-shadow: none;
    }

    a {
        color: #8aa7ff;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #ffffff;
    }

    div.toc {
        background: #1a1a1a;
        border-color: #2a2a2a;
    }
    div.toc:before {
        color: #ffffff;
    }

    blockquote {
        background: #1a1a1a;
        border-left: 3px solid #333333;
    }

    hr {
        border-top: 1px solid #2a2a2a;
    }

    pre {
        background: #1a1a1a;
        border: 1px solid #333333;
        color: #e6e6e6;
    }

    table {
        background: #121212;
        border: 1px solid #2a2a2a;
    }

    table th {
        background: #1a1a1a;
        color: #e6e6e6;
    }

    table th, table td {
        border: 1px solid #2a2a2a;
        color: #e6e6e6;
    }

    table tr:nth-child(2n) {
        background: #1a1a1a;
    }
}
