body {
	background-color: white;
	font-family: cantarell, sans-serif;
	text-align: justify;
	margin-top: 2.8em;
}

h1, h2, h3, h4 {
	color: #005a9c;
	margin: 1.5em 0 0 0;
}

h3 { border-top: solid 0.5em #eee; }

h4 { border-top: solid 0.2em #eee; }

p { margin: 0 0 1em 0; }

a:link, a:visited, a:hover, a:active {
	color: #005a9c;
	text-decoration: none;
}

.toc {
	font-weight: bold;
	font-size: 120%;
	line-height: 1.8;
	max-width: 19em;
}

.toc li {
	list-style-type: none;
}

.toc li li {
	font-size: 80%;
}

.toc a {
	display:block;
	border-radius: 0.4em;
	padding-left: 0.4em;
}

.toc a:hover, .toc a:focus {
	background-color: #ddd;
}

.page_toc {
	list-style: none;
}

.page_toc a {
	width: 18em;
	display: block;
	border-radius: 0.4em;
	padding-left: 0.4em;
}

.page_toc a:hover, .page_toc a:focus {
	background: #ddd;
}

h3 {
	/* ensure anchors don't vanish below the fixed header */
	padding-top: 1.4em;
}

.o-fixedtop {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	overflow: hidden;
}

.o-inlinewidth-4 {
	display: inline-block;
	width: 4em;
}

.o-navbar {
	padding: .35em;
	height: 1.4em;
	max-width: 35em;
}

.c-navbar {
	background-color: #005a9c;
	color: white;
	font-weight: bold;
	text-align: center;
}

.c-pageturner a {
	color: white;
	border-radius: 0.4em;
	padding: 0 0.5em;
}

.c-pageturner a:hover {
	color: #005a9c;
	background-color: white;
}

div.note {
	border: 3px solid #005a9c;
	padding: 1em;
	margin: 0 2em 1em 2em;
}

div.note p, div.note h4 {
	margin: 0;
}

pre {
	background-color: #eee;
	border: 1px solid black;
	border-radius: 4px;
	padding: .5em 1em;
	margin: 0 0 1em 0;
}

.o-box { padding: 1.2em;
	margin: 0 0 1em 0;
	line-height: 1.5;
}
.c-program { background-color: #f5f5f5;
	border: 2px solid #ca8;
	border-radius: 4px;
	font-family: monospace;
	white-space: pre-wrap;
}
.c-program-type { color: #533; }
.c-program-token { color: #000;
	font-weight: bold;
}
.c-program-methodname { color: #520;
	font-style: italic;
}
.c-program-phrase { color: #161; }

.c-informaltable { border: solid 2px #ccc;
	border-radius: 4px;
}
.c-informaltable td { border-bottom: solid 1px #ccc;
	border-right: solid 1px #ccc;
}
.c-informaltable td:last-child { border-right: none; }
.c-informaltable tr:last-child td { border-bottom: none; }
.c-informaltable tr:nth-child(even) { background-color: #f5f5f5; }

.c-rules { border: solid 2px #729fcf;
	border-radius: 4px;
	background-color: #f5f5f5;
	white-space: pre-wrap;
}

.c-document_version { border: solid 2px #ccc;
	border-radius: 4px;
	width: 100%;
}
.c-document_version tr td:first-child { text-align: right; }
.c-document_version tr:nth-child(odd) { background-color: #f0f0f0; }

blockquote span.literal {
	font-family: monospace;
	font-weight: bold;
	font-size: 110%;
	padding-right: 0.5em;
}

.u-float-left {
	float: left;
	overflow: hidden;
}
.u-float-right {
	float: right;
	overflow: hidden;
}
.u-center {
	margin-left: auto;
	margin-right: auto;
}

@media screen {
	body { max-width: 35em; }
}

@media print {
	* { background: none !important; }
	h1 {
		text-align: center;
		padding: 2em 0 4em 0;
	}
	h1+p, h1+p+p, h1+p+p+p { max-width: 28em;
	margin: 0 auto 1em;
	}
	.c-document_version { position: absolute; bottom: 0; }
	h2, .toc { page-break-before: always; }
	h1, h2, h3, h4 { page-break-after: avoid; }
	h2, h3, h4 {
		border: none;
		padding: 0;
		}
}

@page {
	counter-increment: page;
	@top-center { content: "Vala Reference Manual"; }
	@bottom-center {
		content: counter(page);
	}
	font-family: cantarell, sans-serif;
}
