/*
	Where we have h1 + logo(s) + h2, apply the same reduced top margin that we would have if it were just h1 + h2.
	In theory this could be resolved by moving the logo above the h1, but that may cause more pain relating to the way that the top-right menus are handled
*/
#logos + h2,
.logo + h2,
.page-overview-image + h2 { margin-top: 1em; }

caption {
	font-weight: 600;
	padding: 0.3em;
/*	border-top: 1px solid rgba(0, 0, 0, 0.125);	*/
}

blockquote {
	text-align: justify;
}

p.schema, p.schema2 {
	font-size: 150%;
	margin: 0.25em 0.75em;
}

p.schema {
	font-weight: 600;
}

p.schema var, p.schema2 var {
	font-weight: normal;
	font-style: italic;
}

img.logo,
.current-logo {
	max-width: 320px;
	max-height: 150px;
}

#logos {
	box-sizing: border-box;
	max-width: calc(320px + 105px);
}

#logos,
img.logo {
	clear: right;
	float: right;
	padding-left: 48px;
	padding-bottom: 16px;
}

#flags {
	padding-top: 8px;
	padding-bottom: 8px;
	margin-top: 4px;
	margin-bottom: 16px;
	text-align: center;
	background: white;
	clear: right;
}

#flags img {
	height: 24px;
	border: 1px solid rgb(0, 0, 0, 0.1);
}

img.logo + img.logo {
	clear: right;
}

#older-logos {
	padding-top: 0.45em;
}

#older-logos img {
	max-width: 170px;
	max-height: 80px;
	padding: 5px 6px 5px 0;
	vertical-align: middle;
}

#older-logos,
img.logo,
img.current-logo {
    background: white;
    padding: 4px;
}

@media screen and (max-width: 960px) {
	img.logo {
		max-width: 35%;
	}
	
	.current-logo {
		max-width: 170px;
		max-height: 80px;
	}

	#logos {
		max-width: 225px;
		text-align: center;
	}
}

img.illustration {
	display: inline-block;
	margin: 1.5em 2.5em;
	
	/*
		max-width ruins the aspect ratio and CSS has no solution, so, set width and height in HTML instead of CSS (to give the browser a
		means to render the page in advance, and then use automatic height to restore the aspect ratio.
		Did I say that CSS sucks?
	*/
	max-width: calc(100% - 5em);
	height: auto;
}

@media (prefers-color-scheme: dark) {
	img.illustration {
		background-color: #EEE;
		padding: 10px;
		border-radius: 10px;
	}
}

dd p:first-child, table.datatable td p:first-child {
	margin-top: 0;
}

dd p:last-child, table.datatable td p:last-child {
	margin-bottom: 0;
}

.datatable.compact {
	font-stretch: condensed;
	/*
		Work around browser sans-serif default not having a condensed option
		Start with the typefaces most likely to have a condensed option, i.e. not Arial as only Microsoft Office installs Arial Narrow in Windows
	*/
	font-family: "Liberation Sans", "Helvetica Neue", Arial, sans-serif;
}

.colour {
	height: 1.1em;
	width: 1.1em;
	border: 0.75px solid black;
	border-radius: 0.6em;
	float: right;
	margin-left: 0.75em;
	display: block;
	box-sizing: border-box;
}

a.page-overview-image,
img.page-overview-image {
	float: right;
	margin-left: 2em;
	margin-bottom: 2em;
	border: none;
	text-align: right;
	max-width: 50%;
}

a.page-overview-image {
	text-align: right;
}

a.page-overview-image img,
img.page-overview-image {
	width: 720px;
}

a.page-overview-image-mini img,
img.page-overview-image-mini {
	width: 320px;
}

a.page-overview-image img {
	max-width: 100%;
}

.supsub {
	display: inline-block;
	vertical-align: middle;
	margin-top: -0.25em;
	margin-bottom: -0.25em;
}
.supsub sub,
.supsub sup {
	display:block;
	font-size: 72.5%;
	line-height: 1.125em;
	
	/* Override better supsub implementation! */
	font-variant-position: normal;
}

.indented-paragraphs p {
	text-indent: 1.5em;
	margin: 0;
}

#docs, #docs + ul, #docs + p + ul {
	max-width: none;
}

figure.page-overview,
figure.side {
	clear: right;
	float: right;
	margin: 0 0 4em 4em;
	width: -webkit-min-content;
	width: -moz-min-content;
	width: min-content;
}

figure.side a {
	display: block;
}

figure.page-overview figcaption,
figure.side figcaption {
	font-style: italic;
	text-align: center;
}