/* Global Whitespace */
* {
margin: 0;
padding: 0;
}

/* Hide stuff */
aside, header p, #page-selector, #comments.comments0, #reply, footer {
display: none;
}

/* Page */
@page {
size: A4;
font-family: "Adobe Garamond Pro", Garamond, serif;
counter-increment: page;
font-variant: small-caps;
margin: 90pt 72pt;
@top-left {
content: "Geoffrey Sneddon";
vertical-align: bottom;
padding-bottom: 18pt;
text-align: left;
}
@top-right {
content: string(title, first);
vertical-align: bottom;
padding-bottom: 18pt;
text-align: right;
}
@bottom-center {
content: counter(page);
vertical-align: top;
padding-top: 18pt;
text-align: center;
}
}

/* Body styles */
body {
font-family: "Adobe Garamond Pro", Garamond, serif;
font-size: 12pt;
background-color: #fff;
color: #000;
counter-reset: page 1
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
page-break-inside: avoid;
page-break-after: avoid;
font-weight: bold;
}
h1 {
font-size: 4em;
text-align: center;
margin-bottom: 2ex;
}
h2 {
font-size: 1.5em;
}
h3 {
font-size: 1.25em;
}
h4 {
font-size: 1em;
}
h5 {
font-size: 0.75em;
}
h6 {
font-size: 0.5em;
}

/* Tables */
table {
width: 100%;
border-bottom: 1px solid;
border-right: 1px solid;
border-collapse: collapse;
}
th, td {
text-align: left;
border-top: 1px solid;
border-left: 1px solid;
padding: .5ex .5em;
margin: 0;
}

/* Quotations */
blockquote {
margin: 2ex 10%;
}
blockquote:only-child {
margin: 0;
}
blockquote:only-child > *:first-child::before {
content: "“";
}
blockquote:only-child > *:last-child::after {
content: "”";
}
blockquote[cite]::after {
content: "(<" attr(cite) ">)";
display: block;
text-align: right;
font-style: italic;
}
cite {
font-style: italic;
}
p.cite {
text-align: right;
page-break-before: avoid;
}

/* Links */
a[href] {
text-decoration: none;
color: #000;
}
a[href]::after { 
content: " (<" attr(href) ">)";
page-break-before: avoid;
font-style: italic;
font-size: 12pt;
}
.meta a[href]::after, a[href^="#"]::after {
display: none;
}
h1 a[href]::after {
display: block;
}

/* Code */
code, pre {
font-family: Courier, "Courier New", monospace;
font-size: 0.9em;
}
pre {
padding: 1ex 1em;
white-space: pre-wrap;
}

/* Forms */
input {
width: 33%;
}
textarea {
width: 99%;
height: 33%;
}

/* Misc */
abbr, acronym {
border-bottom: inherit;
font-style: inherit;
text-decoration: none;
}
address {
font-style: italic;
}
:not(:lang(en)) {
font-style: italic;
}
.meta {
margin-top: 0 !important;
font-size: 0.8em !important;
}
.draft {
color: #555;
}

/* Body styles */
#body > .hentry + .hentry {
page-break-before: always;
}
#body h2 {
margin: .5ex 1em 0 0;
string-set: title content();
}
#body h3 {
margin: 1.5ex 0% 1ex 0;
border-bottom: solid 1px;
}
#body h4, #body h5, #body h6, #body dt {
margin: 1.5em 0 1ex 0;
font-weight: bold;
display: run-in;
}
#body h4::after, #body h5::after, #body h6::after, #body dt::after {
content: ": ";
}
#body dl {
page-break-before: avoid;
}
#body dd, #body p {
margin: 2ex 0;
text-align: justify;
}
#body li {
margin: 1ex 0 1ex 1.5em;
text-align: justify;
}
#body label {
font-weight: bold;
}
#body label, #body input {
display: block;
}
#body address {
display: inline;
}

/* Reply styles */
#comments .hentry > p.meta {
page-break-inside: avoid;
page-break-after: avoid;
}