/**
 * Pico's Default Theme
 *
 * Pico's default theme is a bit bare - but that's intentional! The default
 * theme isn't meant for production use, it's actually a template for you to
 * design your own theme around.
 *
 * Pico is a stupidly simple, blazing fast, flat file CMS.
 *
 * @author  Gilbert Pellegrom
 * @author  Daniel Rudolf
 * @link    http://picocms.org
 * @license http://opensource.org/licenses/MIT The MIT License
 * @version 2.0
 */

* {
    box-sizing: border-box;
    border: 0 none;
    margin: 0;
    padding: 0;
}

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0 none;
}

.slide {
    overflow-y: hidden !important;
    -webkit-transition: height .5s ease-in !important;
            transition: height .5s ease-in !important;
}

/*** BASIC LAYOUT ***/

html, body { height: 100%; }

body { 
    display: flex; 
    flex-direction: column;
}

#header, #footer { flex: 0 0 auto; }

#main {
    /*padding: 1em 0 4em;*/
    flex: 1 0 auto;
   /* border: 5px solid red; */
}

.container {
    max-width: 48em;
    padding: 0 1rem 0 1rem;
    margin: 0 auto;
}
.widescreen .container { max-width: 72em; }
/* very ugly overflow fix, avoid this whenever possible! */
/*#main .container { 
    overflow-x: auto;
    font-size: 1rem;
}*/

main.container {
    display: flex;
    max-width: 48em;
    /*padding: 0 1em 0 1em;*/
    margin: 0 auto;
    flex-flow: row wrap;
}

main { flex: 1 0 auto; }

article, aside {
    flex: 1;
    /*border: thin solid black;*/
    padding: 1rem;
}

article {
    /*width: 100%;*/
    min-width: 40em;
    flex-grow: 1;
    word-break: break-word;
    hyphens: auto;
}

aside {
    width: 30%;
    flex-grow: 1;
}

#main .page_header {
    /* max-width: 48em; */
    padding: 0 0 1em 0;
    margin: 0 1.5;
}
#main .page_content {
    width: 100%;
}

/*** BASIC LAYOUT: HEADER ***/

#header h1 {
    float: left;
    font-size: 1.7rem;
    margin: 0;
    padding: 1rem;
}

#header h1 a, #header h1 a:hover { color: #eee; }

#nav {
    text-align: right;
    padding: 0.7em 0;
}
#nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
#nav ul li {
    display: inline-block;
    margin-left: 1em;
    padding: 0;
    font-weight: bold;
}

#nav-toggle { display: none; }

/* IE8 + IE9 clearfix */
#header > .container:after {
    content: '';
    display: block;
    clear: both;
}

/*** BASIC LAYOUT: FOOTER ***/

#footer {
    max-height: 2em;
}

#footer img {
    max-height: 49px;
    border: 0;
    padding: 0;
}

#footer .social {
    float: right;
    padding: 1.5em 0 1.5em 1em;
    font-size: 2rem;
}

/*** TYPOGRAPHY ***/

html { font-size: 16px; }

body {
    font-family: 'Droid Sans', 'Helvetica', 'Arial', sans-serif;
    font-size: 1rem;
    /*line-height: 1.6;*/
    font-variant-ligatures: common-ligatures;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
}

p, td, th, li, dd {
    text-align: left;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

p, hr, table, .table-responsive, ol, ul, dl, pre, blockquote, fieldset {
    margin-bottom: 1em;
}

a {
    text-decoration: none;
    -webkit-transition: color .1s ease-in;
            transition: color .1s ease-in;
}

.sub {
    font-size: 70%;
}

.sup {
    font-size: 70%;
    vertical-align: top;
}

h1, h2, h3, h4, h5, h6 {
    /*margin-bottom: 0.6em;*/
    font-weight: bold;
    /* color: #333; */
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 1rem; font-weight: normal; font-style: italic; }

aside h5 { padding: 0 0 0 1rem; }
aside>section>ol, aside>section>ul {
    list-style: none;
}
aside ul>li {
    border-bottom: 1px solid #555;
}
aside ul>li:last-child {
    border-bottom: 0px;
}
img { max-width: 100%; }

hr {
    border: 0.15em solid #f5f5f5;
    border-radius: 0.3em;
    background: #f5f5f5;
}

abbr { text-decoration: underline dotted; }

/*** COLORS ***/
@media (prefers-color-scheme: dark) {
    html {
        --fg-title: #fff;
        --fg-article: #ddd;
        --bg-article: #32383c;
        --fg-body: #444;
        --bg: #32383c;
        --fg-link: #afe1da;
        --fg-link-hover: #55ebe6;
    }
    
    img {
        opacity: .75;
        transition: opacity .5s ease-in-out;
    }
    img:hover {
        opacity: 1;
    }
}

@media (prefers-color-scheme: light) {
    html {
        --fg-title: #444;
        --fg-article: #666;
        --bg-article: #fff;
        --fg-body: #777;
        --bg: #ddd;
        --fg-link: #3ca7a3;
        --fg-link-hover: #607c78;
    }
}

/*
 * Use like:   color: var(--blue);
 */


body { 
    background-color: var(--bg);
    color: var(--fg-body);
}

#main {
    background-color: var(--bg);
}

article {
    background-color: var(--bg-article);
    color: var(--fg-article);
}

#main, article h1, h2, h3 {
    color: var(--fg-title);
}

#header { background: #003751; }

#footer {
    background: #1D1F20;
    color: #C0C0C0;
}

#nav a, #nav-toggle { color: var(--fg-link); }
#nav .active a, #nav a:hover, #nav-toggle:hover { color: #fff; }

a { color: var(--fg-link); }
a:hover { color: var(--fg-link-hover); }
a:visited { color: var(--fg-link); }

/*** UTILITIES ***/

.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.align-justify { text-align: justify; }

.image { display: block; margin: 0 auto; }
.image.xsmall { width: 20%; }
.image.small { width: 40%; }
.image.large { width: 60%; }
.image.xlarge { width: 80%; }
.image.float-left { float: left; margin: 1em 2em 1em 0; }
.image.float-right { float: right; margin: 1em 0 1em 2em; }
.image img { display: block; width: 100%; }

@media (max-width: 767px) {
    .image.xsmall { width: 60%; }
    .image.small { width: 80%; }
    .image.large, .image.xlarge { width: 100%; }
    .image.float-left, .image.float-right { float: none; margin: 0 auto; }
}


/*** TABLES ***/

table { border-spacing: 0; }

td, th {
    padding: 0.4em 1em;
    vertical-align: top;
}
th {
    font-weight: bold;
    text-align: center;
    background: #f5f5f5;
    color: #333;
}

td, th {                                         border: solid 1px #ccc; }
tr:not(:last-child) td, tr:not(:last-child) th { border-bottom: 0 none; }
thead tr:last-child th {                         border-bottom: 0 none; }
td:not(:last-child), th:not(:last-child) {       border-right: 0 none; }

tr:first-child td:first-child, tr:first-child th:first-child { border-top-left-radius: 0.3em; }
tr:first-child td:last-child, tr:first-child th:last-child {   border-top-right-radius: 0.3em; }
tbody tr:last-child td:first-child {                           border-bottom-left-radius: 0.3em; }
tbody tr:last-child td:last-child {                            border-bottom-right-radius: 0.3em; }
table thead + tbody tr:first-child td {                        border-radius: 0 !important; }

.table-responsive { overflow-x: auto; }
.table-responsive > table { margin-bottom: 0; }

/*** LISTS ***/

ol, ul {
    /*list-style: none;*/
    padding-left: 1.5em;
    padding-left: 1.5em;
}
ol { padding-left: 2.5em; }
li { padding-left: 0.5em; }

dt { font-weight: bold; }
dd { margin-left: 2em; }

/*** CODE ***/

code {
    margin: 0 0.1em;
    padding: 0.1em 0.2em;
    border: 1px solid #ccc;
    border-radius: 0.3em;
    /*color: #f5f5f5;
    background-color: #ccc;*/
    font-family: 'Droid Sans Mono', 'Courier New', 'Courier', monospace;
    font-size: 0.9rem;
}

pre {
    padding: 0 1em;
    border: 1px solid #ccc;
    border-radius: 0.3em;
    /*color: #f5f5f5;
    background-color: #ccc;*/
    line-height: 1.4;
}
pre code {
    display: block;
    margin: 0;
    padding: 1.1111em 0;
    border: 0 none;
    /*color: transparent;
    background-color: #ccc;*/
    overflow-x: auto;
}

/*** BLOCKQUOTE ***/
blockquote {
    max-width: 45%;
}

blockquote, blockquote pre, blockquote pre code {
    font-style: italic;
    font-family: serif;
    margin-left: 1em;
    padding-left: 1em;
    float: right;
}

blockquote pre {
    padding: 0;
    border: 0;
}

blockquote p {
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    display: inline-block;
}

blockquote p:first-child::before, blockquote p:last-child::after {
    font-size: 4rem;
    display: inline;
    line-height: .05rem;
}

blockquote p:first-child::before {
    content: "\201C";
    float: left;
    margin-top: 1rem;
    margin-right: .3rem;
    padding: 0;
}

blockquote p:last-child::after {
    content: "\201D";
    vertical-align: bottom;
}

q {
    font-style: italic;
}

/*
 * http://www.witch.westfalen.de/csstest/quotes/quotes-large.html
 */
q::before {
    content: "»";
    display: inline-block;
}

q::after {
    content: "«"
}

/*** FORMS ***/

label, fieldset legend { font-weight: bold; }

input:not([type="checkbox"]):not([type="radio"]), button, select, textarea, fieldset, fieldset legend {
    border: solid 1px #ccc;
    border-radius: 0.3em;
    background: #fff;
    -webkit-transition: none .2s ease-in;
            transition: none .2s ease-in;
    -webkit-transition-property: border-color, background, box-shadow;
            transition-property: border-color, background, box-shadow;
}

input:not([type="checkbox"]):not([type="radio"]), button, select, textarea {
    padding: 0.5em 1em;
    outline: 0 none;
    font-size: 1rem;
}
input:focus:not([type="checkbox"]):not([type="radio"]), button:focus, select:focus, textarea:focus {
    border-color: #2EAE9B;
    box-shadow: 0 0 8px #2EAE9B;
}
input[type="button"]:focus, input[type="submit"]:focus, input[type="reset"]:focus, button:focus,
input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover, button:hover {
    background: #f5f5f5;
    cursor: pointer;
}

textarea, select[multiple] {
    vertical-align: bottom;
    overflow: auto;
}

fieldset {
    padding: 1em;
    background: #f5f5f5;
}
fieldset legend { padding: 0 0.5em; }

fieldset label, fieldset input, fieldset button,
fieldset select, fieldset textarea {
    margin: 0.2em 0.5em;
}
fieldset label:first-child, fieldset input:first-child, fieldset button:first-child,
fieldset select:first-child, fieldset textarea:first-child {
    margin-left: 0;
}
fieldset label:last-child, fieldset input:last-child, fieldset button:last-child,
fieldset select:last-child, fieldset textarea:last-child {
    margin-right: 0;
}

/* Firefox input size fix */
input::-moz-focus-inner, button::-moz-focus-inner {
    border: 0;
    padding: 0;
}

/*** BASIC LAYOUT: EXTRA SMALL DEVICES ***/

@media (max-width: 767px) {
    #main { padding: 2em 0 1em; }
    main.container {
        display: block;
    }
    article, aside {
        width: auto;
    }
    
    #header h1 {
    font-size: 1.3rem;
    float: none;
    padding: 0.4em 0;
    }
    
    #nav {
    clear: right;
    padding: 0;
    }
    #nav ul {
    padding-bottom: 1em;
    }
    #nav ul li {
    display: block;
    margin-left: 0;
    text-align: center;
    }
    #nav ul li a {
    display: block;
    padding: 0.5em 0;
    }
    
    blockquote {
        width: 90%;
        max-width: 90%;
        margin-left:auto;
        margin-right:auto;
        display: block;
        float: none;
    }
    
    .js #nav-toggle {
        display: block;
        float: right;
        width: 2em;
        /*margin: 0.6667em 0 0.6667em 1.3333em;*/
        margin: 0.4em 0 0.4em 1.3333em;
        font-size: 1.5rem;
        line-height: 1em;
        text-align: center;
        cursor: pointer;
    }
    .js #nav-toggle > * { vertical-align: middle;  }
    
    #footer .social { padding: 0.5em 0 0.5em 1em; }
}

