body {
	font-family: 'Noto Serif';
	hyphens: auto;
	line-height: 1.5;
	margin-left: 20mm;
	margin-right: 16mm;
	margin-top: 12mm;
	margin-bottom: 12mm;
	font-size: 10pt;
}

div {
	background: inherit;
}

div.wrapper {
	max-width: 20cm;
	margin: auto;
}

div.texpara {
	margin-top: 3pt;
	margin-bottom: 3pt;
}

table div.texpara {
	margin-top: 0;
	margin-bottom: 0;
}

table.enumerate div.texpara {
	margin-top: 3pt;
	margin-bottom: 3pt;
}

ul {
	list-style-type: none;
	padding-left: 9mm;
	margin-top: 0;
	margin-bottom: 0;
}

ol {
	margin-top: 0;
	margin-bottom: 0;
}

a { text-decoration: none; }

a.hidden_link {
	text-decoration: none;
	color: inherit;
}

li {
	margin-top: 3pt;
	margin-bottom: 3pt;
}

h1 {
	line-height: 1;
	margin-top: 10pt;
	margin-bottom: 10pt;
}

h2 {
	line-height: 1;
	font-size: 14pt;
	margin-top: 10pt;
	margin-bottom: 10pt;
}

h2::after {
    content: "";
    clear: both;
    display: table;
}

h3 {
	line-height: 1;
	margin-top: 10pt;
	margin-bottom: 10pt;
}

h3::after {
    content: "";
    clear: both;
    display: table;
}

h4 {
	line-height: 1;
	margin-top: 10pt;
	margin-bottom: 10pt;
}

h4::after {
    content: "";
    clear: both;
    display: table;
}

ul > li:before {
	content: "\2014";
	position: absolute;
	margin-left: -1.5em; 
}

.shy:before {
	content: "\00ad";
	/* This is U+00AD SOFT HYPHEN, same as &shy, but we put it in :before
	to stop it from being included when the text is copied to the clipboard
	with Firefox, which is especially annoying when copying to a terminal,
	where the hyphen characters will show up. */
}

:target { background-color: #C9FBC9; }
:target .codeblock { background-color: #C9FBC9; }
:target ul { background-color: #C9FBC9; }

.abbr_ref { float: right; }

.folded_abbr_ref { float: right; }
:target .folded_abbr_ref { display: none; }

:target .unfolded_abbr_ref { float: right; display: inherit; }
.unfolded_abbr_ref { display: none; }

.secnum { display: inline-block; min-width: 35pt; }
.annexnum { display: block; }

div.sourceLinkParent {
	float: right;
}

a.sourceLink {
	position: absolute;
	opacity: 0;
	margin-left: 10pt;
}

a.sourceLink:hover {
	opacity: 1;
}

a.itemDeclLink {
	position: absolute;
	font-size: 75%;
	text-align: right;
	width: 5em;
	opacity: 0;
}
a.itemDeclLink:hover { opacity: 1; }

div.marginalizedparent {
	position: relative;
	text-align: left;
	left: -18mm;
}

a.marginalized {
	width: 15mm;
	position: absolute;
	font-size: 7pt;
	text-align: right;
}

a.enumerated_item_num {
	display: block;
	margin-top: 3pt;
	margin-bottom: 3pt;
	margin-right: 6pt;
}

div.para {
	margin-bottom: 6pt;
	margin-top: 6pt;
	text-align: justify;
	min-height: 1.2em;
}

div.section { text-align: justify; }
div.sentence { display: inline; }

a.index {
	position: relative;
	float: right;
	right: -1em;
	display: none;
}

a.index:before {
	position: absolute;
	content: "⟵";
	background-color: #C9FBC9;
}

a.index:target {
	display: inline;
}

.indexitems {
	margin-left: 2em;
	text-indent: -2em;
}

div.itemdescr {
	margin-left: 12mm;
}

.bnf {
	font-family: 'Noto Sans';
	font-size: 10pt;
	font-style: italic;
	margin-left: 25pt;
	margin-right: -15mm;
	margin-top: 0.5em;
	margin-bottom: 0.5em;
	text-indent: -3em;
	padding-left: 3em;
	line-height: 1.5;
}

div.bnf span.texttt { font-family: 'Noto Sans Mono'; font-style: normal; }

.rebnf {
	font-family: 'Noto Serif';
	font-style: italic;
	margin-top: 0.5em;
	margin-bottom: 0.5em;
	margin-left: 30pt;
	text-indent: -3em;
	padding-left: 3em;
	line-height: 1.5;
}

.simplebnf {
	font-family: 'Noto Serif';
	font-style: italic;
	font-size: 10pt;
	margin-top: 0.5em;
	margin-bottom: 0.5em;
	margin-left: 30pt;
	line-height: 1.5;
}

span.textnormal {
	font-style: normal;
	font-family: 'Noto Serif';
	font-size: 10pt;
	white-space: normal;
}

.bnf span.textnormal {
	font-style: normal;
	font-family: 'Noto Serif';
	font-size: 10pt;
	white-space: normal;
}

p {
	margin-top: 4pt;
	margin-bottom: 4pt;
}

span.rlap {
    display: inline-block;
    width: 0px;
    text-indent: 0;
}

span.terminal {
	font-family: 'Noto Sans Mono';
	font-style: normal;
	font-size: 9pt;
	white-space: pre-wrap;
}

span.noncxxterminal {
	font-family: 'Noto Sans Mono';
	font-style: normal;
	font-size: 9pt;
}

span.term { font-style: italic; }
span.tcode { font-family: 'Noto Sans Mono'; font-style: normal; }
span.textbf { font-weight: bold; }
span.textsf { font-family: 'Noto Sans'; font-size: 10pt; }
div.footnote span.textsf { font-family: 'Noto Sans'; font-size: 8pt; }
.bnf span.textsf { font-family: 'Noto Sans'; font-size: 10pt; }
.simplebnf span.textsf { font-family: 'Noto Sans'; font-size: 10pt; }
.example span.textsf { font-family: 'Noto Sans'; font-size: 10pt; }
span.textsc { font-variant: small-caps; }
span.nontermdef { font-style: italic; font-family: 'Noto Sans'; font-size: 10pt; }
span.emph { font-style: italic; }
span.techterm { font-style: italic; }
span.mathit { font-style: italic; }
span.mathsf { font-family: 'Noto Sans'; }
span.mathrm { font-family: 'Noto Serif'; font-style: normal; }
span.textrm { font-family: 'Noto Serif'; font-size: 10pt; }
span.textsl { font-style: italic; }
span.mathtt { font-family: 'Noto Sans Mono'; font-style: normal; }
span.mbox { font-family: 'Noto Serif'; font-style: normal; }
span.ungap { display: inline-block; width: 2pt; }
span.texttt { font-family: 'Noto Sans Mono'; }
span.textit { font-style: italic; }
div.footnote span.texttt { font-family: 'Noto Sans Mono'; }
span.tcode_in_codeblock { font-family: 'Noto Sans Mono'; font-style: normal; font-size: 9pt; }

span.phantom { color: white; }
	/* Unfortunately, this way the text is still selectable. Another
	option is display:none, but then we lose the nice layout.
	Todo: find proper solution. */

span.math {
	font-style: normal;
	font-family: 'Noto Serif';
	font-size: 10pt;
}

span.mathblock {
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-top: 1.2em;
	margin-bottom: 1.2em;
	text-align: center;
}

span.mathalpha {
	font-style: italic;
}

span.synopsis {
	font-weight: bold;
	margin-top: 0.5em;
	display: block;
}

span.definition {
	font-weight: bold;
	display: block;
}

.codeblock {
	font-family: 'Noto Sans Mono';
	margin-left: 1.2em;
	line-height: 1.5;
	font-size: 9pt;
	white-space: pre;
	display: block;
	margin-top: 3pt;
	margin-bottom: 3pt;
	overflow: auto;
	margin-right: -15mm;
}

table .codeblock { margin-right: 0; }

.outputblock {
	margin-left: 1.2em;
	line-height: 1.5;
	font-family: 'Noto Sans Mono';
	font-size: 9pt;
}

code {
	font-family: 'Noto Sans Mono';
	font-style: normal;
}

div.itemdecl {
	margin-top: 2ex;
}

code.itemdeclcode {
	white-space: pre;
	font-family: 'Noto Sans Mono';
	font-size: 9pt;
	display: block;
	overflow: auto;
	margin-right: -15mm;
}

.comment { color: green; font-style: italic; font-family: 'Noto Serif'; font-size: 10pt; }
.footnote .comment { color: green; font-style: italic; font-family: 'Noto Serif'; font-size: 8pt; }
.example .comment { color: green; font-style: italic; font-family: 'Noto Serif'; font-size: 9pt; }
.note .comment { color: green; font-style: italic; font-family: 'Noto Serif'; font-size: 9pt; }

span.keyword { color: #00607c; font-style: normal; }
span.parenthesis { color: #af1915; }
span.curlybracket { color: #af1915; }
span.squarebracket { color: #af1915; }
span.literal { color: #9F6807; }
span.literalterminal { color: #9F6807; font-family: 'Noto Sans Mono'; font-style: normal; }
span.operator { color: #570057; }
span.anglebracket { color: #570057; }
span.preprocessordirective { color: #6F4E37; }

span.textsuperscript {
	vertical-align: super;
	font-size: smaller;
	line-height: 0;
}

.footnoteref {
	vertical-align: super;
	font-size: smaller;
	line-height: 0;
}

.footnote {
	font-size: 8pt;
}

.footnote .math {
	font-size: 8pt;
}

.footnotenum {
	display: inline-block;
	text-align: right;
	margin-right: 1mm;
	width: 4ch;
}

.footnoteBacklink {
	display: none;
}

:target .footnoteBacklink {
	display: inline-block;
	text-align: right;
	margin-right: 1mm;
	width: 4ch;
}

:target .footnotenum {
	display: none;
}

.footnoteSeparator {
	background: black;
	margin-top: 5mm;
	height: 1px;
	width: 6cm;
}

div.minipage {
	display: inline-block;
	margin-right: 3em;
}

div.numberedTable {
	text-align: center;
	margin-left: 1em;
	margin-right: 1em;
	margin-bottom: 12pt;
	margin-top: 8pt;
}

div.figure {
	text-align: center;
	margin-left: 2em;
	margin-right: 2em;
	margin-bottom: 12pt;
	margin-top: 3pt;
}

table {
	border: 1px solid black;
	border-collapse: collapse;
	margin-left: auto;
	margin-right: auto;
	margin-top: 7pt;
	text-align: left;
}

td, th {
	padding-left: 8pt;
	padding-right: 8pt;
	vertical-align: top;
}

td.empty {
    padding: 0px;
    padding-left: 1px;
}

td.left {
	text-align: left;
}

td.hidden {
	padding: 0;
	width: 0;
}

td.right {
	text-align: right;
}

td.center {
	text-align: center;
}

td.justify {
	text-align: justify;
}

td.border {
	border-left: 1px solid black;
}

tr.rowsep, td.cline {
	border-top: 1px solid black;
}

tr.capsep {
	border-top: 3px solid black;
	border-top-style: double;
}

th {
	border-bottom: 1px solid black;
}

span.centry {
	font-weight: bold;
}

div.table {
	display: block;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	width: 90%;
}

span.indented {
	background: inherit;
	display: block;
	margin-left: 2em;
	margin-bottom: 1em;
	margin-top: 1em;
}

span.uppercase {
	text-transform: uppercase;
}

span.ucode {
	font-variant: small-caps;
	text-transform: uppercase;
	font-size: 90%;
}

span.uname {
	font-variant: small-caps;
	text-transform: uppercase;
	font-size: 90%;
}

table.enumerate {
	border: 0;
	margin: 0;
}

table.enumerate td {
	padding: 0;
}

table.enumerate td:first-child {
	width: 1cm;
	text-align: right;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #171717;
        color: #d0d0d0;
    }

    span.mjx-mstyle { color: #d0d0d0 !important }

    a:link { color: #64adff; }
    a:visited { color: #a36ae6; }

    a.hidden_link {
        text-decoration: none;
        color: inherit;
    }

    span.phantom { color: #171717; }

    a.index:before { color: #d0d0d0; background-color: #4b6353; }

    .comment { color: #35da00; }
    .footnote .comment { color: #35da00; }
    .example .comment { color: #35da00; }
    .note .comment { color: #35da00; }

    span.keyword { color: #12cabe; }
    span.parenthesis { color: #ff1515; }
    span.curlybracket { color: #ff1515; }
    span.squarebracket { color: #ff1515; }
    span.literal { color: #dfa837; }
    span.literalterminal { color: #dfa837; }
    span.operator { color: #baa6b9; }
    span.anglebracket { color: #baa6b9; }
    span.preprocessordirective { color: #b27c58; }

    table { border-color: #d0d0d0; }
    td.border { border-color: #d0d0d0; }
    td.border { border-left-color: #d0d0d0; }
    tr.rowsep, td.cline { border-top-color: #d0d0d0; }
    tr.capsep { border-top-color: #d0d0d0; }
    th { border-bottom-color: #d0d0d0; }

    .footnoteSeparator { background-color: #d0d0d0; }

    text { fill: #d0d0d0; }
    path { stroke: #d0d0d0; }
    polygon { stroke: #d0d0d0; fill: #d0d0d0; }
    ellipse { stroke: #d0d0d0; }

    :target { background-color: #4b6345; color: #ffffff; }
    :target .codeblock { background-color: #4b6345; }
    :target ul { background-color: #4b6345; }
    :target a:link { color: #9fcdff; }
    :target a:visited { color: #d39aff; }
    :target a.hidden_link { text-decoration: none; color: inherit; }
    :target span.keyword { color: #32eade; }
    :target span.parenthesis { color: #ff4060; font-weight: bold; }
    :target span.curlybracket { color: #ff4060; font-weight: bold; }
    :target span.squarebracket { color: #ff4060; font-weight: bold; }
    :target span.literal { color: #f0d060; }
    :target span.literalterminal { color: #f0d060; }
    :target span.operator { color: #dac6d9; }
    :target span.anglebracket { color: #dac6d9; }
    :target span.preprocessordirective { color: #e0968f; }
    :target .comment { color: #55ff00; }
    :target .footnote .comment { color: #55ff00; }
    :target .example .comment { color: #55ff00; }
    :target .note .comment { color: #55ff00; }
}
