/* Classic jemdoc styling, following the layout of Jiantao Jiao's homepage. */

table#tlayout {
	border: none;
	border-collapse: separate;
	background: white;
}

body {
	background: white;
	font-family: Georgia, serif;
	padding-bottom: 8px;
	margin: 0;
	font-size: 1em;
}

#layout-menu {
	background: #f6f6f6;
	border: 1px solid #dddddd;
	padding-top: 0.5em;
	padding-left: 8px;
	padding-right: 8px;
	font-size: 1em;
	width: auto;
	white-space: nowrap;
	text-align: left;
	vertical-align: top;
}

#layout-menu td {
	background: #f4f4f4;
	vertical-align: top;
}

#layout-content {
	padding-top: 0;
	padding-left: 1em;
	padding-right: 1em;
	border: none;
	background: white;
	text-align: left;
	vertical-align: top;
}

#layout-menu a {
	line-height: 1.5em;
	margin-left: 0.5em;
}

tt {
	background: #ffffdd;
}

pre,
tt {
	font-size: 90%;
	font-family: monaco, monospace;
}

a,
a > tt {
	color: #224b8d;
	text-decoration: none;
}

a:hover {
	border-bottom: 1px gray dotted;
}

#layout-menu a.current:link,
#layout-menu a.current:visited {
	color: #022b6d;
	border-bottom: 1px gray solid;
}

#layout-menu a:link,
#layout-menu a:visited,
#layout-menu a:hover {
	color: #527bbd;
	text-decoration: none;
}

div.menu-category {
	border-bottom: 1px solid gray;
	margin-top: 0.8em;
	padding-top: 0.2em;
	padding-bottom: 0.1em;
	font-weight: bold;
}

div.menu-item {
	padding-left: 16px;
	text-indent: -16px;
}

div#toptitle {
	padding-bottom: 0.2em;
	margin-bottom: 1.5em;
	border-bottom: 3px double gray;
}

div#toptitle + h2,
div#toptitle + h3 {
	margin-top: -0.7em;
}

em {
	font-style: italic;
}

strong {
	font-weight: bold;
}

h1,
h2,
h3 {
	color: #527bbd;
	margin-top: 0.7em;
	margin-bottom: 0.3em;
	padding-bottom: 0.2em;
	line-height: 1;
	padding-top: 0.5em;
	border-bottom: 1px solid #aaaaaa;
}

h1 {
	font-size: 165%;
}

h2 {
	padding-top: 0.8em;
	font-size: 125%;
}

h2 + h3 {
	padding-top: 0.2em;
}

h3 {
	font-size: 110%;
	border-bottom: none;
}

p {
	margin-top: 0;
	margin-bottom: 0.8em;
	padding: 0;
	line-height: 1.3;
}

div#footer {
	font-size: small;
	border-top: 1px solid #c0c0c0;
	padding-top: 0.1em;
	margin-top: 4em;
	color: #c0c0c0;
}

div#footer a {
	color: #80a0b0;
}

div#footer-text {
	float: left;
	padding-bottom: 8px;
}

ul,
ol,
dl {
	margin-top: 0.2em;
	padding-top: 0;
	margin-bottom: 0.8em;
}

ul {
	list-style-position: outside;
	list-style-type: square;
}

p + ul,
p + ol {
	margin-top: -0.5em;
}

li ul,
li ol {
	margin-top: -0.3em;
}

li p,
dd p {
	margin-bottom: 0.3em;
}

div.codeblock,
div.infoblock {
	margin-right: 0;
	margin-top: 1.2em;
	margin-bottom: 1.3em;
}

div.blocktitle {
	font-weight: bold;
	color: #cd7b62;
	margin-top: 1.2em;
	margin-bottom: 0.1em;
}

div.blockcontent {
	border: 1px solid silver;
	padding: 0.3em 0.5em;
}

div.infoblock > div.blockcontent {
	background: #ffffee;
}

div.infoblock p {
	margin-bottom: 0;
}

div.infoblock p + p {
	margin-top: 0.8em;
}

#layout-content h1:first-child,
#layout-content h2:first-child,
#layout-content h3:first-child {
	margin-top: -0.7em;
}

div#toptitle h1,
#layout-content div#toptitle h1 {
	margin-bottom: 0;
	padding-bottom: 0.1em;
	padding-top: 0;
	margin-top: 0.5em;
	border-bottom: none;
}

table.imgtable {
	border: none;
	border-collapse: separate;
}

table.imgtable td {
	padding: 2px 0.5em;
	text-align: left;
	border: none;
	vertical-align: top;
}

table.imgtable img {
	max-width: 100%;
	height: auto;
}

@media print {
	#layout-menu {
		display: none;
	}
}

@media (max-width: 700px) {
	table#tlayout,
	table#tlayout > tbody,
	table#tlayout > tbody > tr,
	#layout-menu,
	#layout-content {
		display: block;
		width: auto;
	}

	#layout-menu {
		border-right: none;
		white-space: normal;
	}

	.menu-item {
		display: inline-block;
		margin-right: 0.7em;
	}

	#layout-content {
		padding-top: 0.5em;
	}

	table.imgtable,
	table.imgtable tbody,
	table.imgtable tr,
	table.imgtable td {
		display: block;
		width: auto;
	}

	table.imgtable td:first-child {
		padding-bottom: 0.8em;
	}
}
