/*
- frontmatter
  - title
    - h1
      - a
        - span
  - menu
    - ul
      - li
- mainmatter
  - h2
  - content
- backmatter
  - footer
    - recent
      - ul
        - li
    - elsewhere
      - ul
        - li
    - colophon
      - p
        - a
*/

html {
    margin: 0;
    padding: 0;
}

body {
    font: 16px normal Baskerville, Cambria, Times, Georgia, serif;
    line-height: 22px;
    background: #e1e1e1 url(images/mainmatter-bg.png) repeat;
    color: #000;
    margin: 0 auto 2em auto;
    padding: 0;
}

a {
    text-decoration: none;
}

/* Frontmatter */

#frontmatter {
    width: 60%;
    max-width: 40em;
    background: #555 url(images/frontmatter-bg.png) repeat;
    padding: 0;
    margin: 0 auto 2em auto;
    min-height: 10em;
    min-width: 35em;
    max-width: 35em;
    -webkit-box-shadow: 0 0 20px #000;
    -moz-box-shadow: 0 0 20px #000;
    box-shadow: 0 0 20px #000;
    position: relative;
    font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;
}

#title {
    float: left;
    width: 40%;
    clear: left;
    padding: 0;
    margin: 0;
    position: absolute;
    left: 0.5em;
    bottom: 0.5em;
}

h1 {
    font-size: 3em;
    font-weight: bold;
    line-height: 0.8em;
    letter-spacing: 0em;
    padding: 0;
    color: #ccc;
    margin: 0;
	/* -moz-text-shadow: 0 1px 0 #ccc; */
	/* -webkit-text-shadow: 0 1px 0 #ccc; */
	/* text-shadow: 0 1px 0 #ccc; */
	/* -webkit-text-size-adjust: none; */
}

h1 span {
    color: #6f0014;/* #b5001a; */
    display: block;
}

#title a {
    color: #000;
    padding: 8em 0 0 0;
    height: 10em;
    margin: 0;
    text-transform: uppercase;
}

#menu {
    width: 20%;
    margin: 0;
    padding: 0;
    position: absolute;
    right: 0;
    bottom: 0.3em;
}

#menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

#menu li {
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
}

#menu a {
    color: #ccc;
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

#menu a:hover {
    color: #6f0014;/* #b5001a; */
}

/* Mainmatter */

#mainmatter {
    padding: 0;
    margin: 0 auto;
    background: #e1e1e1 url(images/mainmatter-bg.png) repeat;
    border-bottom: 1px solid #000;
}

#content {
    font-size: 1.2em;
    position: relative;
    margin: 0 auto;
    padding: 0;
    width: 35em;
    min-width: 35em;
    max-width: 35em;

}

/* 'White paper' background */
#content {
    margin: 2em auto;
    padding: 0.5em 1em;
    background: #f1f1f1; /* url(images/paper-bg.png) repeat; */
    -webkit-box-shadow: 5px 5px 0 #c1c1c1;
    -moz-box-shadow: 5px 5px 0 #c1c1c1;
    box-shadow: 5px 5px 0 #c1c1c1;
}

#content h2 {
    text-align: center;
    font-size: 1.4em;
    line-height: 1.4em;
	-moz-text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
	-webkit-text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    font-variant: small-caps;
    /* font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; */
}

#content h3 {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0.8em 0;
    padding: 0;
}

#content h4 {
    font-size: 1.1em;
    font-weight: normal;
    font-style: italic;
    margin: 0.8em 0 0.6em 0;
    padding: 0;
}

#content h3+p, #content h4+p {
    margin-top: 0;
    padding-top: 0;
}

#content p.warning {
    padding: 0.8em;
    margin: 0 0 1em 0;
    background: rgba(251,255,204,.6);
}

#content img {
    background: #fff;
    margin: 0 auto 2em auto;
    padding: 10px;
    display: block;
    /* border: 1px solid #000; */
    -webkit-box-shadow: 5px 5px 5px rgba(0,0,0,.4);
    -moz-box-shadow: 5px 5px 5px rgba(0,0,0,.4);
    box-shadow: 5px 5px 5px rgba(0,0,0,.4);
}

#content img.photo {
    width: 80%;
    margin: 0 auto 2em auto;
    background: #000;
}

#content dt {
    padding: 0;
    margin: 1em 0 0.2em 0;
}

#content a {
    color: #dc143c;/* #6f0014; #b5001a; */
}

#content a:hover {
    background: #fbffcc;
}

#content code {
    /* white-space: pre; */
    font: 0.8em normal Menlo, Monaco, Courier, Inconsolata, 'DejaVu Sans Mono', monospace;
    width: 100%;
    overflow: scroll;
    /* overflow-Y: hidden; */
    margin: 0 0 1em 0;
    padding: 0;
    /* display: block; */
}

#content pre {
    font-size: 0.8em;
    padding: 0.5em 1em;
    background: #e1e1e1;
}

#content .footnotes {
    border-top: 1px solid #000;
}

.footnotes ol {
    margin: 0 0 0 1.2em;
    padding: 0;
}

/* Backmatter */

#backmatter {
    background: #c2bfb3 url(images/backmatter-bg.png) repeat;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #000;
    padding: 0;
    margin: 0;
    min-height: 18em;
}

#footer {
    margin: 0 auto;
    padding: 1em 0;
    width: 42em;                /* = 1.2em * 35em = same as #content */
    min-width: 42em;
    max-width: 42em;
}

#backmatter dl {
    margin: 0;
    padding: 0;
}

#backmatter dt {
	-moz-text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
	-webkit-text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    font-variant: small-caps;
    padding: 0;
    margin: 0 0 0.5em 0;
    font-size: 1.3em;
}

#backmatter dd {
    padding: 0;
    margin: 0;
}

#recent, #elsewhere, #colophon {
    float: left;
    width: 32%;
    padding: 0;
    margin: 0;
}

#recent {
    clear: left;
}

#elsewhere {
    margin: 0 2%;
}

#colophon {
    clear: right;
}

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

#backmatter li {
    padding: 0;
    margin: 0;
    display: block;
}

#backmatter p {
    padding: 0;
    margin: 0.3em 0;
}

#backmatter a {
    color: #6f0014;/* #b5001a; */
}

#backmatter a:hover {
    text-decoration: underline;
}

/*
* Pygments
*/

.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #408080; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #808080 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0040D0 } /* Generic.Traceback */
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #B00040 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #7D9029 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.highlight .no { color: #880000 } /* Name.Constant */
.highlight .nd { color: #AA22FF } /* Name.Decorator */
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0000FF } /* Name.Function */
.highlight .nl { color: #A0A000 } /* Name.Label */
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #666666 } /* Literal.Number.Float */
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.highlight .sx { color: #008000 } /* Literal.String.Other */
.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
