*[id] {
    /* for the anchor links */
    position: relative;
}

html {
    height: 100%;
}
body {
    color: #331;
    background-color: #999;
    max-width: 74em;

    font-family: Georgia, serif;

    margin-left: auto;
    margin-right: auto;
    margin-top: 0px;
    margin-bottom: 0px;

    padding: 0px;
    padding-top: 1px;
    padding-bottom: 1px;
}

body.index pre {
    border: none;
    background-color: inherit;
    padding: 0em;
}
body.index h2 {
    margin: 1em 0em;
}

div.frame {
    max-width: 45em;
    padding: 1em;
    margin: 0.5em auto;

    background-color: white;

    border-radius: 1em;
    -moz-border-radius: 1em;
}

div.sidebar {
    /*color: #AAA;*/
    opacity: 0.3;
}
div.sidebar:hover {
    color: inherit;
    opacity: inherit;
}

div.sidebar {
    background-color: white;
    float: right;
    width: 12em;

    padding: 0em 1em 0em 0.5em;
    margin: 6em 0em 1em;

    border-bottom-right-radius: 1em;
    border-top-right-radius: 1em;
    -moz-border-radius-bottomright: 1em;
    -moz-border-radius-topright: 1em;

    -moz-transition-property: opacity;
    -moz-transition-duration: 0.2s;
    -webkit-transition: opacity 0.2s linear;
    transition-property: opacity;
    transition-duration: 0.2s;
}
div.sidebar > ul {
    list-style-type: none;
    padding-left: 0px;
    margin-top: 0.5em;
}
div.sidebar ul ul {
    list-style-type: none;
    padding-left: 0em;
    font-weight: normal;
}
div.sidebar > ul.tags > li {
    padding-bottom: 1em;
    list-style: none;
    font-weight: bold;
}
div.sidebar ul.tags ul li,
div.sidebar ul.prevnext li {
    padding-left: 1.5em;
    padding-top: 0.5em;
}
div.sidebar ul.tags ul li:before,
div.sidebar ul.prevnext li:before {
    content: '\25C4';
    float: left;
    width: 1.5em;
    margin-left: -1.5em;
}
div.sidebar ul.tags ul li.next:before,
div.sidebar ul.prevnext li.next:before {
    content: '\25BA';
}

div.sidebar ul.prevnext li.up:before {
    content: '\25B2';
}
a.up:before {
    padding-right: 0.5em;
    content: '\25B2';
}

div.sidebar h3 {
    text-align: right;
    margin-bottom: 0em;
}

@media (max-width: 74em) {
    div.frame {
        margin: 0.5em;
    }
    body {
        max-width: 61em;
    }
}
@media (max-width: 61em) {
    div.sidebar {
        float: none;
        width: auto;
        max-width: 45em;
        margin: 1em 1em 0em 1em;
        padding: 0.5em;

        border-bottom-right-radius: 0em;
        border-top-left-radius: 1em;
        border-top-right-radius: 1em;
        -moz-border-radius-bottomright: 0em;
        -moz-border-radius-topright: 1em;
        -moz-border-radius-topleft: 1em;
    }
    div.sidebar li {
        float: left;
        margin-right: 2em;
    }
    div.sidebar ul {
        padding-left: auto;
        padding-right: auto;
    }
    div.sidebar ul:after {
        clear: both;
        content: "";
        display: block;
    }
    div.frame {
        margin-top: 0px;
    }
    div.sidebar h3 {
        text-align: center;
    }
}



h1 {
    text-align: center;
    width: 100%;
    background-color: white;

    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0px;
    margin-top: 0.5em;

    text-shadow: #AAA 0.1em 0.1em 0.2em;
}

#content {
    padding: 1em;
}

.comments {
    margin: 0em 1em;
    padding-top: 1em;
    border-top: 1px solid grey;
    text-align: center;
}
.comments p {
    margin: 0px;
}



/* content BEGIN */
ul.toc:before {
    content: 'Table of contents';
    display:block;
    text-align: center;
    padding-bottom: 1ex;
    border-bottom: 1px solid #BBB;
    color: #555;
}
ul.toc {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
    list-style-type: none;
    padding-left: 0em;
    padding-top: 0.5em;
    padding-bottom: 1em;

    background-color: #EEE;
    border: 1px solid #BBB;
    border-radius: 0.5em;
    -moz-border-radius: 0.5em;
}
ul.toc > li {
    padding-top: 1ex;
    padding-left: 2em;
}
ul.toc li ul {
    list-style-type: none;
}

dd + dt {
    padding-top: 1ex;
}

p.images {
    text-align: center;
}
img.right {
    float: right;
    margin-left: 1ex;
    margin-bottom: 1ex;
}
img.border {
    border: 1px solid #BBB;
    border-radius: 3px;
    padding: 1px;
}

/* show IDs for anchors */
*[id]:hover > a.anchorlink:before {
    content: "\00B6";/* pilcrow */
    color: #888;
    font-size: smaller;
}
a.anchorlink {
    text-decoration: none;
    margin-left: 0.5em;
    font-size: smaller;
    position: absolute;
    top: 0px;
    left: -3ex;
    padding-right: 3ex;
    height: 100%;
}
li > a.anchorlink {
    left: -5ex;
    padding-right: 5ex;
}


h3 {
    margin-left: 1em;
}

pre {
    padding: 1em;
    background-color: #EEE;
    border: 1px solid #BBB;
    width: auto;
    border-radius: 0.5em;
    -moz-border-radius: 0.5em;
    overflow: auto;
}
pre .deact {
    color: #CCC;
}

tt, code {
    background-color: #DDD;
    padding: 0.3ex 0.5ex;

    border-radius: 0.5ex;
    -moz-border-radius: 0.5ex;
}
pre code {
    background-color: inherit;
    padding: 0px;

    border-radius: 0px;
    -moz-border-radius: 0px;
}
abbr[title], acronym[title], span[title] {
    border-bottom: 1px dotted #331;
}

kbd {
    background-color: #EEE;
    border: 1px outset #BBB;
    padding: 1px 2px;
}

table.numbers tbody td {
    text-align: right;
}
table.numbers tbody th {
    text-align: left;
}
table.border {
    border: 1px solid black;
    border-collapse: collapse;
}
table.border td, table.border th {
    border: 1px solid black;
    padding: 0.5ex 1ex;
}

a[href^="http://"]:after,
a[href^="https://"]:after {
    content: '\279A';
}
a[href^="mailto:"]:before {
    content: "✉ ";
}
a[href^="tel:"]:before {
    content: "☎ ";
}
a.silent {
    text-decoration: none;
    color: inherit;
}
a.silent:after {
    content: "";
}
#webaction-reply:before {
    content: "↩ ";
}
#webaction-like:before {
    content: "☆ ";
}

.warning {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4ex;

    background-color: #FFD;
    border: 1px solid #BBB;
    border-radius: 0.5em;
    -moz-border-radius: 0.5em;
    padding: 1ex 2ex;
}
.note {
    margin-left: auto;
    margin-right: auto;

    border-left: 3px double #BBB;
    padding: 0.1ex 2ex;
}
.grey {
    color: #BBB;
}
.reply-intro {
    padding: 1ex;
    background-color: #EEE;
    border-bottom: 1px solid #AAA;
    border-radius: 1ex 1ex 0ex 0ex;
}

blockquote {
    margin-left: 1em;
    border-left: 2px solid #AAA;
    padding: 0.2em;
    padding-left: 1em;
    background-color: #EEE;
}
blockquote blockquote {
    background-color: #FFF;
}
blockquote cite:before {
    content: '-';
}

.attribution {
    font-size: 80%;
}
blockquote .attribution {
    text-align: right;
}
blockquote .attribution:before {
    content: "－";
}
