/* Basic layout */

:root {
    --item-img-height: 150px;
}

html {
    text-align: left;
    padding: 0 5%;
}

body {
    max-width: 800px;
    margin: 2rem auto 5rem auto;
    background: #ffffff;
    color: #333333;
    font-family: "Georgia", "DejaVu Serif", serif;
    line-height: 170%;
}

header {
    margin-bottom: 3rem;
}

article {
    margin-bottom: 3rem;
}

/* Links */

a {
    color: #645E9D
}

a.tag-anchor {
    text-decoration: none;
}

a.tag::before {
    content: "🏷️";
    text-decoration: none;
}

a.hlink {
    text-decoration: none;
    font-size: smaller;
    display: none;
    line-height: 100%;
}

h2:hover a.hlink {
    display: inline;
}

/* Headers */

h1, h2, h3, h4, h5, h6, nav, th, .m, .archive li {
    /*font-family: "alegreya_sansbold", sans-serif;*/
    font-family: "Helvetica Neue", "Helvetica", sans-serif;
    font-weight: bold;
    color: #000000;
    text-transform: lowercase;
}

nav, th, .m {
    font-weight: 700;
    font-size: 100%;
}

h2, h3 {
    margin: 2rem 0;
}

h1 {
    font-size: 200%;
    line-height: 100%;
    margin: 3rem 0 1rem 0;
    clear: both;
}

/* Navigation */

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

nav.taglist {
    justify-content: start;
    column-gap: 1rem;
}

.flexnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav.noflex {
    display: block;
}

nav, .m {
    line-height: 130%;
}

.home-index h2 {
    margin: 0 0 0.5rem 0;
}

.home-index p {
    margin: 0;
}

.home-index-item {
    clear: both;
    position: relative;
    margin-bottom: 3rem;
}

.home-index-item img {
    float: right;
    height: auto;
    margin-left: 1rem;
    max-width: 50%;
}

.home-index-item time {
    font-style: italic;
}

.home-index-item.item-has-image {
    min-height: var(--item-img-height);
}

img.l {
    float: left;
    margin: 0 1rem 0 0;
}

img.r {
    float: right;
    margin: 0 0 1rem 0;
}

.c {
    text-align: center;
}

.note {
    font-size: smaller;
    font-style: italic;
}

blockquote {
    padding: 0 1rem;
    margin: 1em 0;
    line-height: 150%;
    font-style: italic;
    border-left: #6c969d 5px solid;
}

.box {
    padding: 0.5rem 1rem;
    border: #666666 2px dotted;
    background-color: #eeeeee;
    color: #000000;
    font-family: monospace;
}

pre {
    padding: 0.5em 1em;
    overflow: scroll;
}

code {
    padding: 0 0.2em;
}

pre, code {
    color: #ffffff;
    background: #666666;
}

pre code {
    padding: 0;
}

hr {
    border: none;
    height: 1px;
    background-color: #666666;
}

ul {
    list-style-type: disc;
}

.archive ul {
    list-style-type: none;
    padding: 0;
    margin: 0 0 3em 0;
}

.archive li {
    padding: 0;
    margin: 0.5em 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: start;
    gap: 0.5rem;
}

.archive a.plink {
    font-weight: bold;
}

img {
    max-width: 100%;
}

.searchbox {
    float: right;
}

div.comments {
    margin-top: 2rem;
}

table {
    border-spacing: 0;
    border: 2px #ccc solid;
}

td, th {
    padding: 0 0.5em 0 0.5em;
}

tr:nth-child(even) {
    background: #eee;
}

th {
    border-bottom: 2px #ccc solid;
    background: #eee;
}

@media screen and (max-device-width: 450px) and (orientation: portrait) {
    body {
        font-size: medium;
    }

    .searchbox {
        float: none;
        text-align: left;
    }
}
