/*
 * Based on this: https://gist.github.com/killercup/5917178
 */

html {
    font-size: 100%;
    overflow-y: scroll;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    background: #c0c0c0;
}

body {
    color: black;
    font-family: Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif;
    /* font-size: 12px; */
    line-height: 1.6;
    padding: 2em;
    margin: auto;
    max-width: 42em;
    background: #fefefe;
}

a {
    color: #0645ad;
    text-decoration: none;
}

a:visited {
    color: #0645ad;
}

a:hover {
    color: #06e;
}

a:active {
    color: #faa700;
}

p {
    margin: 1em 0;
    text-align: justify;
}

/* TOC over two columns */
nav {
    max-width: 42em;
    margin: 0 auto;
    column-width: 14em;
    column-gap: 2em;
    column-rule: 1px solid #ccc;
}
/* remove padding from top level list */
nav ul {
    list-style-type: none;
    padding: 0;
}
/* but we want lower levels to indent */
nav ul ul {
    padding: 0 0 0 1em;
}
/* This stops top level toc sections breaking,
   but I think it looks worse */
/* nav ul li       { break-inside: avoid; } */
/* nav ul li ul li { break-inside: auto;  } */


img {
    max-width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

h1.title {
    text-align: center;
}

h1, h2, h3, h4, h5, h6 {
    color: #111;
    line-height: 125%;
    margin-top: 1.5em;
    font-weight: normal;
}

h4, h5, h6 {
    font-weight: bold;
}

h1 {
    font-size: 2em;
    margin-top: 2em;
}

h2 {
    font-size: 1.7em;
}

h3 {
    font-size: 1.5em;
}

h4 {
    font-size: 1.2em;
}

h5 {
    font-size: 1em;
}

h6 {
    font-size: 0.9em;
}

blockquote {
    margin: 0 1em 0 1em;
    padding: 0 1em 0 1em;
    border: 1px solid black;
    border-radius: 1em;
    background-color: #c0c0c0;
}

/* emphaisis is used for things we want monospaced */
em {
    font-family: monospace, monospace; /* hack to stop firefox reducing size! */
    font-style: normal;
}

ul, ol {
    margin: 1em 0;
    padding: 0 0 0 2em;
}

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

ul ul, ol ol {
    margin: .3em 0;
}

table {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2em;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    border-spacing: 0;
    border-collapse: collapse;
}

table th {
    padding: .2em 1em;
    background-color: #ddd;
    border-top: 1px solid #ddd;
    border-left: 1px solid #ddd;
}

table td {
    padding: .2em 1em;
    border-top: 1px solid #ddd;
    border-left: 1px solid #ddd;
    vertical-align: top;
}
