/* Default css file for jemdoc. */

:root {
	--bg-page: #e9eff7;
	--bg-panel: #ffffff;
	--bg-menu: #e1e9f5;
	--text-main: #111827;
	--text-muted: #3f4a5f;
	--border-soft: #b7c4da;
	--accent: #0f3f8a;
	--accent-strong: #0a2d64;
}

table#tlayout {
    border: none;
    border-collapse: separate;
    background: transparent;
	width: 100%;
	max-width: 1160px;
	margin: 26px auto 34px auto;
	box-sizing: border-box;
}

body {
	background: var(--bg-page);
	font-family: Georgia, serif;
	/*font-family: Palatino, serif;*/
	padding-bottom: 8px;
	margin: 0 auto;
	width: 100%;
	max-width: 1320px;
	color: var(--text-main);
	font-size: 17px;
	line-height: 1.56;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

#layout-menu {
	background: var(--bg-menu);
	border: 1px solid var(--border-soft);
	border-radius: 12px;
	padding-top: 14px;
	padding-left: 12px;
	padding-right: 12px;
	font-size: 0.95em;
	width: 220px;
	min-width: 220px;
	white-space: nowrap;
    text-align: left;
    vertical-align: top;
	box-shadow: 0 1px 2px rgba(20, 39, 77, 0.05);
	color: var(--text-main);
}

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

#layout-content {
	padding-top: 0.6em;
	padding-left: 1.8em;
	padding-right: 1.9em;
	padding-bottom: 1.25em;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--bg-panel);
    text-align: left;
    vertical-align: top;
	box-shadow: 0 3px 10px rgba(20, 39, 77, 0.06);
	color: var(--text-main);
}

#layout-menu, #layout-content {
	border-left-width: 1px;
	text-align: left;
}

#layout-menu a {
	display: block;
	line-height: 1.45em;
	margin-left: 0;
	padding: 3px 8px;
	border-radius: 7px;
}

tt {
    background: #ffffdd;
}

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

a, a > tt {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: rgba(15, 63, 138, 0.58);
	text-underline-offset: 2px;
	transition: color 140ms ease, text-decoration-color 140ms ease;
}

a:hover {
	color: var(--accent-strong);
	text-decoration-color: rgba(10, 45, 100, 0.88);
	border-bottom: none;
}

#layout-menu a.current:link, #layout-menu a.current:visited {
	color: #ffffff;
	background: var(--accent);
	border-bottom: none;
	text-decoration: none;
}
#layout-menu a:link, #layout-menu a:visited, #layout-menu a:hover {
	color: #1d3f76;
	text-decoration: none;
}
#layout-menu a:hover {
	background: rgba(15, 63, 138, 0.18);
}

div.menu-category {
	border-bottom: 1px solid #afbdd6;
	margin-top: 0.35em;
	margin-bottom: 0.3em;
	padding-top: 0.1em;
	padding-bottom: 0.35em;
	padding-left: 8px;
	font-weight: bold;
	letter-spacing: 0.02em;
	color: #182947;
}

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

div#toptitle {
	padding-bottom: 0.1em;
	margin-bottom: 1.2em;
	border-bottom: 2px solid #bccae0;
}

/* Reduce space if we begin the page with a title. */
div#toptitle + h2, div#toptitle + h3 {
	margin-top: -0.7em;
}

div#subtitle {
	margin-top: 0.0em;
	margin-bottom: 0.0em;
	padding-top: 0em;
	padding-bottom: 0.1em;
}

em {
	font-style: italic;
}

strong {
	font-weight: bold;
}


h1, h2, h3 {
	color: #1c335d;
	margin-top: 0.9em;
	margin-bottom: 0.45em;
	padding-bottom: 0.12em;
	line-height: 1.2;
	padding-top: 0.42em;
	border-bottom: 1px solid #bccae0;
}

h1 {
	font-size: 2.02em;
	font-weight: 600;
}

h2 {
	padding-top: 0.72em;
	font-size: 1.34em;
	font-weight: 600;
}

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

h3 {
	font-size: 1.13em;
	font-weight: 600;
	border-bottom: none;
}

p {
	margin-top: 0.0em;
	margin-bottom: 0.95em;
	padding: 0;
	line-height: 1.62;
}

pre {
	padding: 0;
	margin: 0;
}

div#footer {
	font-size: 0.84em;
	border-top: 1px solid #bfcbe0;
	padding-top: 0.42em;
	margin-top: 2.8em;
	color: var(--text-muted);
}

div#footer a {
	color: #214779;
}

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

ul, ol, dl {
	margin-top: 0.35em;
	padding-top: 0;
	margin-bottom: 0.95em;
}

dt {
	margin-top: 0.5em;
	margin-bottom: 0;
}

dl {
	margin-left: 20px;
}

dd {
	color: var(--text-main);
}

dd > *:first-child {
	margin-top: 0;
}

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

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

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

ol {
	list-style-position: outside;
	list-style-type: decimal;
}

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


ol ol {
	list-style-type: lower-alpha;
}

ol ol ol {
	list-style-type: lower-roman;
}

p + div.codeblock {
	margin-top: -0.6em;
}

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.blockcontent p + ul, div.blockcontent p + ol {
	margin-top: 0.4em;
}

@media screen and (max-width: 860px) {
	body {
		max-width: none;
		font-size: 16px;
	}

	table#tlayout, table#tlayout > tbody, table#tlayout > tbody > tr,
	table#tlayout > tbody > tr > td {
		display: block;
		width: 100%;
	}

	#layout-menu {
		box-sizing: border-box;
		width: 100%;
		min-width: 0;
		white-space: normal;
		margin-bottom: 0.8em;
		border-radius: 10px;
	}

	#layout-menu a {
		margin-left: 0;
	}

	#layout-content {
		padding-left: 1em;
		padding-right: 1em;
	}
}

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

div.infoblock li p, div.infoblock dd p {
	margin-bottom: 0.5em;
}

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

div.codeblock > div.blockcontent {
	background: #f6f6f6;
}

span.pycommand {
	color: #000070;
}

span.statement {
	color: #008800;
}
span.builtin {
	color: #000088;
}
span.special {
	color: #990000;
}
span.operator {
	color: #880000;
}
span.error {
	color: #aa0000;
}
span.comment, span.comment > *, span.string, span.string > * {
	color: #606060;
}

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

#fwtitle {
	margin: 2px;
}

#fwtitle #toptitle {
	padding-left: 0.5em;
	margin-bottom: 0.5em;
}

#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.0em;
	padding-bottom: 0.1em;
	padding-top: 0;
	margin-top: 0.5em;
	border-bottom: none;
}

img.eq {
	padding: 0;
	padding-left: 0.1em;
	padding-right: 0.1em;
	margin: 0;
}

img.eqwl {
	padding-left: 2em;
	padding-top: 0.6em;
	padding-bottom: 0.2em;
	margin: 0;
}

table {
    border: 1px solid #8ea2c3;
    border-collapse: collapse;
	background: #ffffff;
}

td {
    padding: 5px;
    padding-left: 0.5em;
    padding-right: 0.5em;
    text-align: center;
    border: 1px solid #afbdd4;
}

table + table {
    margin-top: 1em;
}

tr.heading {
    font-weight: bold;
    border-bottom: 2px solid #6f88b4;
}

img {
    border: none;
}

table.imgtable, table.imgtable td {
    border: none;
    text-align: left;
	vertical-align: top;
}

table.imgtable td:first-child {
	padding-right: 1.15em;
}

table.imgtable img {
	border-radius: 10px;
	box-shadow: 0 2px 9px rgba(20, 39, 77, 0.11);
	width: min(350px, 38vw);
	height: auto;
	display: block;
}

/* Publication-page visual refinement (scoped to Papers and Papers by topics). */
body:has(#layout-menu a.current[href="paper.html"]) #layout-content h2,
body:has(#layout-menu a.current[href="paper_topic.html"]) #layout-content h2 {
	margin-top: 1.25em;
	margin-bottom: 0.55em;
	padding-bottom: 0.2em;
	border-bottom: 1px solid #cdd8e9;
	color: #152b53;
}

body:has(#layout-menu a.current[href="paper.html"]) #layout-content ul,
body:has(#layout-menu a.current[href="paper_topic.html"]) #layout-content ul {
	list-style: none;
	margin: 0 0 0.85em 0;
	padding: 0;
}

body:has(#layout-menu a.current[href="paper.html"]) #layout-content ul li,
body:has(#layout-menu a.current[href="paper_topic.html"]) #layout-content ul li {
	margin: 0;
}

body:has(#layout-menu a.current[href="paper.html"]) #layout-content ul li p,
body:has(#layout-menu a.current[href="paper_topic.html"]) #layout-content ul li p {
	margin: 0;
	padding: 0.72em 0.85em 0.74em 0.85em;
	border: 1px solid #bfcee4;
	border-radius: 10px;
	background: #f2f6fc;
	line-height: 1.55;
}

body:has(#layout-menu a.current[href="paper.html"]) #layout-content ul li p:hover,
body:has(#layout-menu a.current[href="paper_topic.html"]) #layout-content ul li p:hover {
	border-color: #9fb7da;
	background: #e9f0fa;
}

body:has(#layout-menu a.current[href="paper.html"]) #layout-content ul li p > a:first-child,
body:has(#layout-menu a.current[href="paper_topic.html"]) #layout-content ul li p > a:first-child {
	font-weight: 600;
	color: #0f3779;
}

body:has(#layout-menu a.current[href="paper.html"]) #layout-content ul li p i,
body:has(#layout-menu a.current[href="paper_topic.html"]) #layout-content ul li p i {
	display: inline-block;
	margin-top: 0.18em;
	color: #1f3558;
}

@media screen and (max-width: 980px) {
	table.imgtable, table.imgtable tbody, table.imgtable tr, table.imgtable td {
		display: block;
		width: 100%;
	}

	table.imgtable td:first-child {
		padding-right: 0;
		padding-bottom: 0.9em;
	}

	table.imgtable img {
		width: min(380px, 100%);
	}
}

/* Homepage profile block: stack image and text to avoid awkward empty space. */
body:has(#layout-menu a.current[href="index.html"]) table.imgtable,
body:has(#layout-menu a.current[href="index.html"]) table.imgtable tbody,
body:has(#layout-menu a.current[href="index.html"]) table.imgtable tr,
body:has(#layout-menu a.current[href="index.html"]) table.imgtable td {
	display: block;
	width: 100%;
}

body:has(#layout-menu a.current[href="index.html"]) table.imgtable td:first-child {
	padding-right: 0;
	padding-bottom: 0.85em;
}

body:has(#layout-menu a.current[href="index.html"]) table.imgtable img {
	width: min(390px, 100%);
	margin: 0 auto;
}
