body {
    line-height: 1.6;
}
#blog_name {
    font-family: 'Libre Baskerville', serif;
    color: darkblue;
    text-align: center;
}
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-family: 'Lato', sans-serif;
    color: darkblue;
}
h1:first-of-type {
    margin-top: 0;
    padding-top: 0;
}
code {
    font-family: 'Source Code Pro', monospace;
}
pre {
    background-color: #F0F0F0;
    padding: 1em;
    /* Undo agressive setting for body */
    overflow-wrap: normal;
    overflow-x: auto;
}

/* Used by index pages, archive page and post pages */
.date-and-tags {
    margin-top: -1em;
    margin-bottom: 1.5em;
    color: gray;
}
hr {
    border: none;
    height: 1px;
    background-color: gray;
}

/* ----- Links ----- */

a {
    color: darkgreen;    
}
a:link {
    text-decoration: none;
    color: darkgreen;
}
a:visited {
    text-decoration: none;
    color: darkgreen;    
}
a:hover {
    text-decoration:underline;
    color: darkgreen;    
}

.no-link a {
    color: inherit;
}
.no-link a:link, h1 a:link, h2 a:link {
    color: inherit;
}
.no-link a:visited, h1 a:visited, h2 a:visited {
    color: inherit;
}
.no-link a:hover, h1 a:hover, h2 a:hover {
    color: inherit;
}


/* Highlight what the current hash points to */
*:target {
    background-color: #FFFF66;
}

/* ----------------------------------- */

.number-headings h1 {
    counter-reset: section;
}
.number-headings h2:before {
    content: counter(section) ".\0000a0\0000a0";
    counter-increment: section;
    counter-reset: subsection;
}
.number-headings h3:before {
    content: counter(section) "." counter(subsection) ".\0000a0\0000a0";
    counter-increment: subsection;
}

/* ----------------------------------- */

a.header-anchor {
    visibility: hidden;
    color: #BFBFBF !important;
    text-decoration: none;
}
a.header-anchor:hover {
    text-decoration: none;
}
h1:hover .header-anchor,
h2:hover .header-anchor,
h3:hover .header-anchor,
h4:hover .header-anchor,
h5:hover .header-anchor,
h6:hover .header-anchor
{
    visibility: visible;
}

/* =============== Carbon ad =============== */

/* Whole ad box */

#adbox {
    width: 280px;
    font-size: 10pt;
    line-height: 1.4;
    border: solid thin gray;
    padding: 2px 5px 2px 5px;
}

#adbox-explain {
    font-size: 9pt;
    color: gray;
    margin-bottom: 3px;
}

/* Image and the text */

.carbon-wrap {
    display: flex;
    flex-flow: row;
    justify-content: space-between;
}

a.carbon-text {
    display: block;
    width: 130px;
    /*margin-top: 3px;
    margin-bottom: 4px;*/
}

a.carbon-text:link,
a.carbon-text:active,
a.carbon-text:visited {
    color: black;
    text-decoration: none;
}

a.carbon-text:hover {
    color: black;
    text-decoration: underline;
}

/* “ads via Carbon” follows the .carbon-wrap, vertically */

a.carbon-poweredby {
    display: block;
    font-size: 9pt;
    text-align: left;
}

a.carbon-poweredby:link,
a.carbon-poweredby:active,
a.carbon-poweredby:visited {
    color: gray;
    text-decoration: none;
}

a.carbon-poweredby:hover {
    color: gray;
    text-decoration: underline;
}

/* =============== Page frame =============== */

body {
    overflow-wrap: break-word;
    box-sizing: border-box;
    margin: 0 0 0 0;
    padding: 0 0 0 0;

    background-color: #D9ECFF;
    font-family: 'Open Sans', sans-serif;

    /* flexbox */
    display: flex;
    flex-flow: column;
    align-items: stretch;
}
#reactHtml {
    height: 100%;
    width: 100%;
}

#lower-link-bar {
    width: 100%;
    text-align: center;
    margin-top: 0.9em;
    border-top: gray 1px solid;
    padding-top: 0.4em;
}

.separator {
    color: gray;
    margin-left: 0.3em;
    margin-right: 0.3em;
}

#right_column {
    width: 200px;
    padding: 20px 20px 20px 20px;
}
#right_column > div {
    margin-bottom: 2em;
}

/* ----- Single-row layout ----- */

#lower-link-bar {
    margin-bottom: 1em;
}

#top_row {
    display: flex;
    flex-flow: column;
    align-items: stretch;
}

#bottom_row {
    display: flex;
    flex-flow: column;
    align-items: center;
}

#right_column {
    margin-top: 3em;
}

#adbox {
    margin: 6px 0 6px 0;
}

/* ----- Small cell phone, e.g. width = 320px (single row) ----- */

body {
    font-size: 90%;
}
#blog_name {
    font-size: 2.2em;
}
#page-core {
    min-width: 300px;
    max-width: calc(100% - 10px); /* minus padding */
    background-color: white;
    padding: 10px 5px 7.5px 5px;
}

/* ----- (1/2) Cell phone landscape, width=568px (single row) ----- */

@media all and (min-width: 480px) {
    /* Next width: 570px
       Minus padding: maxwidth of 600px at 90%
       Thus: upper constraint for width is screen
    */
    body {
        font-size: 90%;
    }
    #blog_name {
        font-size: 2.2em;
    }
    #page-core {
        min-width: 450px;
        max-width: calc(100% - 30px); /* minus padding */
        padding: 15px 10px 15px 10px;
    }
}

/* ----- (2/2) Cell phone landscape, width=568px (single row) ----- */

@media all and (min-width: 570px) { /* max-width + padding */
    body {
        font-size: 90%;
    }
    #blog_name {
        font-size: 2.2em;
    }
    #page-core {
        min-width: 500px;
        max-width: 540px; /* 600 * 90% */
        padding: 15px 10px 15px 10px;
    }
    /* There is enough space for the vertical version */
    #adbox {
        float: right;
        margin: 0 0 6px 6px;
        width: 130px;
    }
    #adbox-explain {
        margin-bottom: 5px;
    }
    .carbon-wrap {
        display: block;
    }
    a.carbon-poweredby {
        margin-top: 5px;
        text-align: right;
    }
}

/* ----- Tablets and desktops (two rows) ----- */

@media all and (min-width: 760px) {
    body {
        font-size: 100%;
    }
    #blog_name {
        font-size: 2.5em;
    }
    #lower-link-bar {
        margin-bottom: 2em;
    }
    #top_row {
        display: flex;
        flex-flow: column;
        align-items: center;
    }
    #bottom_row {
        display: flex;
        flex-flow: row;
        align-items: stretch;
        justify-content: center;
    }
    #page-core { /* 540 */
        order: 1;
        min-width: 500px;
        max-width: 600px;
        padding: 20px 20px 20px 20px;
    }
    #right_column { /* 240 */
        margin-top: 0;
        order: 2;
    }

    #adbox {
        float: right;
        margin: 0 0 6px 6px;
        width: 130px;
    }
    #adbox-explain {
        margin-bottom: 5px;
    }
    .carbon-wrap {
        display: block;
    }
    a.carbon-poweredby {
        margin-top: 5px;
        text-align: right;
    }
}

/* ----------------------------------- */

.index-date {
    font-family: 'Lato', sans-serif;
    font-size: 1.1em;
    border-bottom: thin solid lightgray;
    margin-top: 0;
    padding-top: 0;
}