@import url(sh_print.css);

/* Light colors */
:root {
	/* light */
	--text-color: #000;
	--back-color: #fff;
	--ext-link-color: #00f;
	--int-link-color: #808;
	--var-color: #080;
	--del-color: #ccc;
	--code-color: #666;
	--border-color: #000;
}

/* Dark colors */
@media (prefers-color-scheme: dark) {
	:root {
		--text-color: #888;
		--back-color: #111;
		--ext-link-color: #448;
		--int-link-color: #844;
		--var-color: #484;
		--del-color: #ccc;
		--code-color: #666;
		--border-color: #888;
	}
	object {
		filter: invert(0.75);
	}
}

/* Display */
@media screen {
	body {
		margin: 6em auto 12em auto;
		max-width: 50em;
		font-family: serif;
		line-height: 1.5em;
		color: var(--text-color);
		background-color: var(--back-color);
	}
	nav {
		position: fixed;
		top: 0;
		left: 0;
	}
}

/* Smartphone */
@media only screen and (max-width: 70em) {
	body {
		margin: 1ex;
		font-size: 4vw;
	}
	nav {
		position: relative;
	}
}

/* Paged Media */
@media print {
	body {
		margin: 0;
		padding: 0;
		font-size: 9pt;
	}
	nav {
		visibility: hidden;
	}
}
@page {
	size: A4;
	margin: 4em 4em 8em 6em;
}
@page:left {
	@top-left {
		content: string(doctitle);
		font-style: italic;
	}
	@top-right {
		content: string(sectitle);
		font-style: italic;
	}
	@bottom-left {
		content: counter(page);
	}
}
@page:right {
	@top-right {
		content: string(doctitle);
		font-style: italic;
	}
	@top-left {
		content: string(sectitle);
		font-style: italic;
	}
	@bottom-right {
		content: counter(page);
	}
}

/* Navigation */

nav ol {
	list-style-type: none;
	padding-left: 1em;
}
nav a.current {
	font-weight: bold;
}

/* Headings */

h1 {
	string-set: doctitle content();
}
h2 {
	string-set: sectitle content();
	font-size: 100%;
	margin-top: 2em;
}
h3 {
	font-size: 100%;
	font-weight: normal;
}

/* Text */

:lang(de) q { quotes: "„" "“" "‚" "‘"; }
:lang(en) q { quotes: "“" "”" "‘" "’"; }

p {
	--text-align: justify;
	hyphens: auto;
}
a {
	text-decoration: none;
	color: var(--ext-link-color);
}
a:visited {
	text-decoration: none;
	color: var(--ext-link-color);
}
a:hover {
	text-decoration: underline;
}
a[href^="#"] {
	color: var(--int-link-color);
}
a[href^="http:"] {
	text-decoration: underline wavy;
}
a[href^="https:"] {
	text-decoration: underline;
}
var {
	color: var(--var-color);
}
var.pass {
	text-decoration: line-through;
}
del {
	text-decoration: none;
	color: var(--del-color);
}
code {
	font-family: serif;
	font-style: italic;
}
dt {
	margin-top: 1em;
}

/* Keyboard */

p kbd,
dd kbd,
table kbd {
	border: 1px solid var(--code-color);
	border-radius: 4px;
	padding: 1px;
}

/* Examples */

pre {
	font-family: monospace;
	color: var(--code-color);
	margin: 1em 2em;
	line-height: 1.25;
}
pre div {
	border-bottom: 1px solid var(--code-color); /* filename */
}
pre kbd {
	font-style: italic; /* command */
}
pre kbd:before {
	content: "> "; /* generic prompt */
}
.root kbd:before {
	content: "# "; /* superuser prompt */
}
.user kbd:before {
	content: "$ "; /* unpriviledged prompt */
}
kbd.chroot:before {
	content: "* "; /* changeroot prompt */
}

/* Images */

figure {
	text-align: center;
	margin: 1em 0;
}
figcaption {
	margin-bottom: 1em;
	text-align: center;
}

/* Tables */

table {
	border-collapse: collapse;
	empty-cells: show;
	min-width: 100%;
	font-variant-numeric: tabular-nums;
}
caption {
	margin-bottom: 1em;
}
thead {
	border-bottom: 1px solid var(--border-color);
}
th {
	text-align: left;
	font-weight: normal;
	padding-top: 1em;
	border-bottom: 1px dotted var(--border-color);
}
td {
	vertical-align: top;
	padding-right: 1ex;
}
