body {
	background-image: url(/img/bg.jpg);
	display: flex;
	flex-direction: column;
	align-items: center;
	font-family: sans-serif;
}

h1 {
	font-size: 38px;
	margin: 0.5em 0em;
}

h2 {
	font-size: 24px;
}

h3 {
	font-size: 18px;
}

h4 {
	font-size: 18px;
}

p, li {
	font-size: 16px;
}

.center {
	text-align: center;
}

.hidden {
	display: none;
}

.urgent {
	background-color: red;
	color: white;
}

.accepted {
	background-color: limegreen;
	color: white;
}

.undefined {
	background-color: gray;
	color: white;
}

footer {
	text-align: right;
	padding: 0px 10px;
}

div.container, footer {
	width: 800px;
	max-width: 100%;

	box-sizing: border-box;
}

div.container {
	background-color: #fff;
	border: 4px ridge grey;

	margin: 10px;
	padding: 10px;
}

header {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
}

header div:last-child {
	text-align: center;
	flex-grow: 4;
	border: none;
}

header div h2 {
	margin-bottom: 8px;
}

header div p {
	margin-top: 8px;
}

nav ul, aside ul {
	display: flex;
	list-style-type: none;
	padding: 0px;
	margin: 5px;
}

nav ul li, aside ul li {
	display: block;
	flex-grow: 1;
}

nav ul li a, aside ul li a, .disclaimer {
	display: block;
	text-align: center;
	border: 4px ridge white;
	background-color: #eee;

	margin: 0px 5px;
	padding: 10px;
}

nav ul li a:hover, aside ul li a:hover {
	border-color: cyan;
}

nav ul li a:active, aside ul li a:active {
	border-color: red;
}

article {
	padding: 10px;
}

article > ul li {
	margin: 1em 0px;
}

article img {
	max-width: 100%;
}

figure {
	max-width: 260px;
	margin: 10px;
	clear: both;
}

figure.right {
	float: right;
}

figure.left {
	float: left;
}

figure img {
	display: inline-block;
	border: 4px ridge white;
	box-sizing: border-box;
}

figure p {
	margin-top: 10px;
	margin-bottom: 0px;
	color: #444;
	text-align: center;
}

figure.purple img {
	border-color: purple;
}

figure.pink img {
	border-color: pink;
}

figure.white img {
	border-color: white;
}

figure.black img {
	border-color: #111;
}

figure.cyan img {
	border-color: cyan;
}

figure.yellow img {
	border-color: yellow;
}

figure.orange img {
	border-color: orange;
}

figure.green img {
	border-color: green;
}

figure.lime img {
	border-color: lime;
}

figure.magenta img {
	border-color: magenta;
}

figure.red img {
	border-color: red;
}

figure.blue img {
	border-color: blue;
}

figure.gray img {
	border-color: gray;
}

pre {
	padding-left: 2em;
	white-space: pre-line;
}

section.book figure {
	margin: 10px 20px 10px 10px;
	flex-shrink: 0;
}

section.book p, section.book h3, section.book h4 {
	margin: 10px 0px;
}

section.book h3, section.book h4 {
	font-size: 16px;
	font-weight: inherit;
}

section.book pre {
	overflow-x: auto;
}

section.book {
	margin: 20px 0px;
	padding: 10px 15px;
	border: 1px solid gray;
	border-radius: 5px;
	box-shadow: inset 0px -4px 10px #999;
	background: #f5f5f5;
	display: flex;
	position: relative;
}

section.book:target {
	background: #FFFBD4;
	box-shadow: inset 0px -4px 10px #B96;
}

section.book:last-child {
	margin-bottom: 0px;
}

section.book:after {
	clear: both;
	display: block;
	content: '';
}

img.donated-ribbon {
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
}

img.ico {
	vertical-align: top;
}

@media (min-width: 800px) {
	aside {
		margin-left: 10px;
		width: 30%;
		float: right;
		clear: both;
	}

	aside ul {
		flex-direction: column;
	}

	aside ul li a {
		margin: 5px;
	}
}

@media (max-width: 800px) {
	nav ul, aside ul {
		flex-wrap: wrap;
	}

	nav ul li, aside ul li {
		margin-bottom: 10px;
	}

	header {
		flex-wrap: wrap;
	}

	section.book {
		flex-direction: column;
	}

	figure.right {
		float: none;
		text-align: center;
	}

	figure.left {
		float: none;
		text-align: center;
	}
}

.generic-button-container {
	display: inline-block;
	white-space: nowrap;
	min-width: 160px;
}

a.order-form-help {
	font-size: 14px;
	margin-left: 10px;
}

a.generic-button {
	color: #fff;
	
	display: inline-block;
	min-width: 150px;
	padding: 2px 11px;
	border-radius: 3px;

	overflow-wrap: break-word;
	vertical-align: middle;

	border: 0 none #fff;

	background-color: #364a61;
	box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.2);

	font-size: 14px;
	line-height: 32px;
	text-shadow: 0 1px 1px rgba(34, 34, 34, 0.3);
	text-decoration: none;
	text-align: center;
}

a.generic-button:hover {
	opacity: .85;
}

.well {
	font-family: sans-serif;
	font-size: 17px;
	padding: 10px 20px;
	border: 1px solid black;
	border-radius: 3px;
	text-align: center;
}

.warning.well {
	background: red;
	color: white;
	box-shadow: inset 0px 3px 11px 0px #3a0000;
	background: linear-gradient(to bottom, #a90329 0%,#8f0222 44%,#6d0019 100%);
}

.warning.well a {
	color: white;
}

.warning.well a:hover, .warning.well a:visited, .warning.well a:active {
	color: #eee;
}

.caution.well {
	background: orange;
	color: black;
	box-shadow: inset 0px 3px 11px 0px #D78C05;
	background: linear-gradient(to bottom, #FFE97F 0%,#FFE17F 44%,#FFBB2E 100%);
}

.info.well {
	background: #bbb;
	color: black;
	box-shadow: inset 0px 3px 11px 0px #5f5f5f;
	background: linear-gradient(to bottom, #d2d2d2 0%,#c3c3c3 44%,#949494 100%);
}

a.permalink {
	float: right;
	display: block;
	height: 20px;
	width: 20px;
	text-decoration: none !important;
	background: url(/img/permalink.png);
	margin: 5px 2px 10px 10px
}

section.book div.book-contents {
	flex-grow: 1;
}

form .formgroup {
	display: flex;
	align-items: top;
	flex-wrap: nowrap;
	padding: 15px 5px;
}

form .formgroup label {
	flex-grow: 1;
	text-align: left;
	max-width: 40%;
	margin-right: 15px;
}

form .formgroup input[type=text], form .formgroup textarea {
	flex-grow: 1;
	padding: 4px 8px;
	font-family: sans-serif;
	font-size: 16px;
	border: 1px solid grey;
	border-radius: 2px;
}

form .formgroup textarea {
	min-height: 5em;
}

form {
	font-size: 16px;
}

form .formgroup.checkbox label {
	max-width: initial;
}

@media (max-width: 800px) {
	form .formgroup {
		flex-direction: column;
	}

	form .formgroup label {
		max-width: initial;
		margin-bottom: 15px;
		margin-right: 0px;
	}

	form .formgroup.checkbox {
		flex-direction: row;
	}
}
