html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-weight: inherit;
    font-style: inherit;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-size: 1.3em;
    line-height: 1.5;
    background-color: #f8f8f8;
    font-weight: normal;
    font-style: normal;
    font-variant: normal;
}

h1.vilain {
    color: #333;
    text-align: center;
    font-size: 1.5em;
    line-height: 1.5;
    margin: 1em auto 0.5em auto;
    max-width: 13em;
}

.vilain img {
    display: block;
    margin: 0 auto;
}

h1 span {
    color: #C02702;
    font-weight: bold;
}

nav {
    margin: 0 auto 2.5em auto;
    text-align: center;
    font-variant: small-caps;
    font-size: 1.2em;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

nav li {
    display: inline;
    margin: 0;
    padding: 0;
}

nav li:after {
    content: "|";
    font-size: 0.5em;
}

nav li:last-of-type:after {
    content: "";
}


nav a {
    padding: 0 0.3em 0 0.1em;
    text-decoration: underline;
    color: #666;
    font-weight: bold;
    font-size: 1em;
}

nav a:hover {
    text-decoration: underline;
    color: #334;
}

article {
    overflow: hidden;
}

article header {
    padding-top: 0.5em;
}

.date {
    margin: 0 0 0.5em 0;
    text-align: center;
    display: block;
    font-variant: small-caps;
    color: #666;
}


header h1 {
    font-style: italic;
    text-align: center;
    margin: 0 0 1.25em;
    line-height: 1.5;
    font-size: 2.5em;
    font-weight: bold;
    color: #334;
}

article h2 {
    font-size: 2.2em;
    line-height: 1.5;
    margin: 2em 0 1em 0;
    font-weight: bold;
    text-align: center;
}

article h3 {
    font-size: 1.8em;
    line-height: 1.5;
    margin: 1.5em 0 1em 0;
    font-weight: bold;
    text-align: center;
}

article h4 {
    font-size: 1.5em;
    line-height: 1.5;
    margin: 1.5em 0 0.8em 0;
    font-weight: bold;
    font-style: italic;
}

article h5 {
    font-size: 1.2em;
    line-height: 1.5;
    margin: 1.5em 0 0.8em 0;
    font-weight: bold;
    font-style: italic;
}

@media(max-width: 640px) {
    header h1 {
        margin: 0 0 1.25em;
        font-size: 1.8em;
    }

    article h2 {
        font-size: 1.6em;
        margin: 1.2em 0 0.6em 0;
    }

    article h3 {
        font-size: 1.4em;
        margin: 0.75em 0 0.5em 0;
    }

    article h4 {
        font-size: 1.3em;
        margin: 0.75em 0 0.4em 0;
    }

    article h5 {
        font-size: 1.1em;
        margin: 0.75em 0 0.4em 0;
    }
}


h1 + h2 {
    margin-top: -0.7619em;
}

h2 + h3 {
    margin-top: -0.7619em;
}

p {
    margin: 0 0 1.5em 0;
    /*overflow: auto;*/
}

p.translations {
    text-align: center;
    font-size: 1em;
    color: #666;
    font-variant: small-caps;
}

p img {
    display: block;
    margin: 0 auto;
    box-shadow: #ddd 2px 2px 10px;
    max-width: 100%;
    
}

strong {
    font-weight: bolder;
}

em {
    font-style: italic;
}

article sup {
    vertical-align: super;
    font-size: smaller;
}

hr {
    border: none;
    height: 1px;
    margin: 1em 0;
}

a {
    color: #C02702;
}

strong a {
    text-decoration: none;
}

img.right {
    float: right;
}

p code, ul code, ol code, table code {
    background: #ddd;
    padding: 0 0.4em;
    font-size: 0.8em;
    font-weight: bold;
    white-space: nowrap;
    border-radius: 0.6em;
    font-family: monospace;
}

.codehilite {
    margin: 0 0 1.5em 0;
    margin-bottom: 22px;
    padding: 1em 0.5em;
    overflow: hidden;
    text-shadow: none;

    font-family: monospace;
    font-size: 1em;
    line-height: 1.5;
}

@media(max-width: 360px) {
    .codehilite {
        font-size: 0.8em;
    }
}

.codehilite code {
    float: left;
}

.codehilite:hover {
    overflow: auto;
}

.codehilite pre {
    margin: 0;
}

.codehilite .err {
    background-color: transparent;
}

ul, ol {
    margin: 0 0 1.5em 53px;
    padding: 0;
}

li {
    margin: 0;
}

ul {
    list-style: circle;
}

ol {
    list-style: decimal-leading-zero;
}

ul ul,
ol ol {
    margin: 0 0 0 60px;
}

@media(max-width: 360px) {
    ol {
        list-style-type: decimal;
    }
    ul, ol {
        margin: 0 0 1.5em 30px;
    }
    ul ul,
    ol ol {
        margin: 0 0 0 20px;
    }    
}

sup {
    line-height: 0;
}

sup a {
    text-decoration: none;
}

footer {
    margin: 3em 0 1em 0;
    padding: 1em 0 0 0;
    border-top: 1px dotted #999;
    text-align: center;
    font-size: 1em;
    line-height: 1.2;
    color: #666;
    /* font-style: italic; */
    font-variant: small-caps;
    /* font-family: monospace; */
}

footer ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

footer li {
    margin: 0 0 0.5em 0;
}

footer a {
    font-weight: bold;
}


blockquote {
    font-style: italic;
    padding: 5px 15px;
    color: #666;
    margin: 0;
    border: 1px solid #DEDEDE;
    border-left: 5px solid #BBB;
    background-color: #FAFAFA;
}

blockquote p:last-child {
    margin-bottom: 0;
}

blockquote + p {
    margin-top: 24px;
}

.content {
    margin: auto;
    /*width: 80%;*/
    max-width: 800px;
}

.footnote {
    margin: 2em 0;
    color: #888;
    font-size: 0.8em;
}

.footnote hr {
    background: #aaa;
}

.footnote ol {
    list-style-position: outside;
    margin: 0;
}

.footnote p {
    margin: 0;
}

@media(max-width: 800px) {
    .footnote ol {
        margin: 0 0 0 20px;
    }
}

/* HOME */

.posts {
    list-style-type: none;
    margin: 0 0 2em 0;
    padding: 0;
    overflow: hidden;
}

.posts li {
    line-height: 1.75em;
    margin: 0 0 3em 0;
    padding: 1em 0 0 0;
    overflow: hidden;
    /* border-top: 1px dotted #999; */
}

.posts .lang {
    color: #C02702;
}

.posts h2 {
    font-size: 1.5em;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

@media(max-width: 800px) {
    .posts h2 {
        font-size: 1.1em;
    }
}

.posts a {
    display: block;
    padding: 0 0.5em;
    color: #334;
    text-decoration: underline;
    font-weight: bold;
}

.posts a:hover {
    text-decoration: underline;
}

.bookmarks {
    list-style-type: none;
    margin: 0 0 2em 0;
    padding: 0;
}

.bookmarks li {
    margin: 0 0 3em 0;
    padding: 1em 0 0 0;
    text-align: center;
}

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

a.anchor {
    text-decoration: none;
}

a.anchor:hover {
    text-decoration: underline;
}

.bookmarks .domain {
    display: block;
    text-align: center;
    color: #C02702;
    font-weight: normal;
    font-family: monospace;
    margin: 0 0 1em 0;
}

.bookmarks h2 {
    font-size: 1.5em;
    margin: 0;
    font-weight: normal;
    text-align: center;
}

.bookmarks h2 a {
    color: #334
}

.bookmarks h2 a:hover {
    color: #C02702;
}

.bookmarks p {
    text-align: center;
    font-size: 1em;
    font-style: italic;
}

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

/* POSTS */

@media(max-width: 800px) {
    #post {
        margin: 0 1em;
    }
}

#post div.footnotes {
    font-size: smaller;
    margin-left: 4px;
}

#post div.footnotes a {
    text-decoration: none;
}

@media(min-width: 600px) {
    .half {
        padding: 0;
        margin: 0;
        width: 50%;
        float: left;
    }

    .half a.first {
        display: block;
        padding: 0 10px 0 0;
    }
}

table {
    width: 100%;
    border-spacing: 0;
    margin: 0 0 1.5em 0;
    background: #fff;
}

th {
    text-align: center;
    /* background: #ffffff; */
    font-weight: bold;
    color: #333;
    font-variant: small-caps;
}

td, th {
    padding: 4px;
    border-left: 1px solid #999;
    border-top: 1px solid #999;
    vertical-align: top;
}

table tr:last-child td {
    border-bottom: 1px solid #999;
}

table tr td:last-child, table tr th:last-child {
    border-right: 1px solid #999;
}

table .wide {
    max-width: 300px;
    overflow: auto;
}

@media(max-width: 360px) {
    table .wide {
        max-width: 100px;
    }

    table .wide img {
        max-width: 200px;
    }
}
