/** BASE **/
body {
	margin:0;
	font-family:var(--font);
	font-size:var(--font-size);
}

/* Links */

a, a:visited {
	background-color: var(--link-bg, transparent);
	color: var(--link-fg);
	text-decoration: var(--link-decoration);
	-webkit-text-decoration-color: var(--link-decoration-color, var(--link-fg));
	text-decoration-color: var(--link-decoration-color, var(--link-fg));
}
a:hover {
	background-color: var(--link-bg-hover, var(--link-bg, transparent));
	color: var(--link-fg-hover);
	text-decoration: var(--link-decoration-hover);
	-webkit-text-decoration-color: var(--link-decoration-color-hover, var(--link-decoration-color, var(--link-fg)));
	text-decoration-color: var(--link-decoration-color-hover, var(--link-decoration-color, var(--link-fg)));
}
a:active {
	color: var(--link-fg-active);
	background-color: var(--link-bg-active, var(--link-bg, transparent));
}

/* Headings */
h1, h2, h3, h4, h5 {
	margin-top: 0.5em;
	margin-bottom: 0.5em;
}

h1 {
	font-family:var(--font-headers);
	font-weight: 700;
	font-size: 44px;
}
h2 {
	font-family:var(--font-headers);
	font-weight: 700;
	font-size: 36px;
}
h3 {
	font-family:var(--font-headers);
	font-weight: 700;
	font-size: 28px;
}
h4 {
	font-family:var(--font-headers);
	font-weight: 700;
	font-size: 22px;
}
h5 {
	font-family:var(--font-headers);
	font-weight: 700;
	font-size: 18px;
}

/* Blocks */
p {
	font-weight:var(--fw);
	line-height:24px;
	margin-bottom:0.5em;
}

li {
	line-height: 24px;
	margin-bottom: 6px;
}

p, ol, ul, dl {
	max-width: 768px;
	font-size:var(--font-size);
}

ul {
	list-style-type: disc;
	padding-left: var(--list-indent);
}

ol {
	padding-left: var(--list-indent);
}

dt {
	font-weight: 600;
	line-height: 24px;
	margin-bottom: 6px;
}
dd {
	font-weight: 400;
	line-height: 24px;
	margin-bottom: 6px;
	margin-left: var(--list-indent);
}

hr {
	margin: 24px 0;
	height: 3px;
	border: 0;
	background-color: var(--bg);
}

blockquote {
	border-left: 5px solid var(--border-color);
	margin-left: 0;
	padding: 5px;
	background-color: var(--bg);
}
blockquote p {
	margin: 0;
}

/* Inline */

pre, code, tt {
	font-family:var(--font-mono);
	background-color:var(--bg);
	color:var(--fg);
	border-radius:5px;
}
pre {
	padding: 4px 8px;
	tab-size: 4;
	-moz-tab-size: 4;
}

code, kbd, tt, kbd {
	padding-left: 4px;
	padding-right: 4px;
}

kbd {
	font-family: sans-serif;
	color:var(--fg);
	background-color:var(--bg);
	font-weight: 500;
	border-radius: 5px;
	border-top: 1px solid var(--border-color);
	border-left: 1px solid var(--border-color);
	border-right: 2px solid var(--border-color);
	border-bottom: 2px solid var(--border-color);
	display: inline-block;
	vertical-align: top;
}

/* Tables */

table {
	border-left: 1px solid var(--border-color);
	border-right: 1px solid var(--border-color);
	border-top: 1px solid var(--border-color);
	border-spacing: 0;
}

th:not([align]) {
	text-align: left;
}
th, td {
	padding: 8px 16px;
}
th {
	border-bottom: 2px solid var(--fg);
}
td {
	border-bottom: 1px solid var(--border-color);
}

/* Layout */

#burger {
	display:none;
	margin-right: 16px;
}
#burger > line {
	display:none;
}
#burger.closed > line.for-closed {
	display: unset;
}
#burger.closed > line.for-open {
	display: none;
}
#burger.open > line.for-closed {
	display: none;
}
#burger.open > line.for-open {
	display: unset;
}

.body {
	display: grid;
	grid-template-columns: 25vw auto;
	grid-template-rows: 50px auto auto;
	grid-template-areas:
	"header header"
	"toc text"
	"footer footer";
	position: relative;
}
.header {
	grid-area:header;

	background-color: var(--bg);
	color: var(--fg);
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-left: var(--gap);
	padding-right: var(--gap);
	height: 50px;
}
.header-left {
	display: flex;
	justify-content: flex-start;
	align-items:center;
}

.footer {
	grid-area:footer;

	background-color: var(--bg);
	color: var(--fg);
	padding: var(--gap);
	font-size: 12px;
}

.aside {
	grid-area:toc;

	background-color:var(--bg);
	color:var(--fg);
	border-right: 1px solid var(--border-color);
	min-width: 256px;
	max-width: 25vw;

	font-size: 14px;
}

.main {
	background-color: var(--bg);
	color: var(--fg);
	grid-area:text;

	padding-left:4vw;
	padding-right:4vw;
	padding-bottom: 44px;
}

@media (max-width: 1023px) {
	#burger {
		display: inline-block;
	}
	.body {
		grid-template-areas:
				"header header"
				"text text"
				"footer footer";
	}
	.aside {
		display:none;
		position: absolute;
		top: 50px;
		left: 0;
		bottom: 0;
		min-width: 256px;
		max-width: 319px;
		width: 90vw;
		grid-area: unset;
	}
}

.version {
	font-size: 24px;
	font-weight: 200;
	margin-left: 8px;
}

.content {
	display:flex;
	align-items:stretch;
}
.breadcrumbs {
	display: flex;
	flex-direction:row;
}



/* Left menus */

.toc { /* UL with all menus on the left */
	font-size: 14px;
	list-style-type: none;
	padding:0;
}
.toc li {
	line-height: 22px;
	margin:0;
	padding: 0 8px 0 16px;
	background-image: url(../i/terminal.svg);
	background-repeat: no-repeat;
	background-origin: padding-box;
	background-position-x: 3px;
	background-position-y: 7px;
}

.on-path {
	--link-decoration:underline;
}

.selected {
	font-weight: bold;
}

.level-0 {
}
.level-1 {
	margin-bottom:8px;
}
.toc li.has-children {
	background-image: url(../i/open.svg);
}
.toc li.has-children:hover {
	background-image: url(../i/open-h.svg);
}
.toc li.has-children.closed {
	background-image: url(../i/close.svg);
}
.toc li.has-children.closed:hover {
	background-image: url(../i/close-h.svg);
}

.toc li.has-children.closed > ul {
	display: none;
}

/* Breadcrumbs */

.breadcrumbs {
	display: flex;
	flex-direction: row;
	font-size: 14px;
	margin-top: 15px;
	margin-bottom: -16px;
}
.bc-separ {
	color:var(--fg);
	margin-left: 4px;
	margin-right: 4px;
}
.breadcrumbs-link {
	white-space: nowrap;
}

.icn {
	width: 18px;
	height: 18px;
	vertical-align: middle;
}
.icn-max {
	width: 36px;
	height: 36px;
	vertical-align: middle;
}

/* Search */

.search-container {
	position:relative;
}
.search-input {
	font-size: var(--font-size);
	line-height: var(--font-size);
	background-color:var(--bg);
	color:var(--fg);
	width: 45vw;
	max-width: 300px;
	border: none;
	padding: 4px 8px 4px 26px;
}

/** SEARCH SUGGESTIONS **/
.suggestions {
	position: absolute;
	z-index: 32766;
	background-color: var(--bg);
	color: var(--fg);
	display: none;
	font-size: 14px;
	box-shadow: 0px 0px 3px rgba(0,0,0,.3);
	overflow: hidden;
}
.sg-row {
	clear: both;
	cursor: pointer;
	line-height: 22px;
	padding: 2px 8px;
	background-color: var(--bg);
	color: var(--fg);

}
