body {
	margin: 0; padding: 0;
	font-family: sans-serif;
}
* {
	box-sizing: border-box;
}
:root{
	--main-color: #4CAF50;
	--side-bar: #333;
	--body-color: #eee;
	--text-color: #000;
}

a[target="_blank"]{
	cursor: alias;
}

.wrapper{
	display: flex;
	height: 100vh;
}
.sidebar .wrapper{
	background: var(--side-bar);
	color: white;
	min-width: fit-content;
	width: 250px;
	height: 100%;
	user-select: none;
	display: flex;
	flex-direction: column;
}
.sidebar nav {
	overflow-y: auto;
}
.sidebar nav hr{
	margin: 0;
}
.content{
	width: 100%;
	height: 100%;
	overflow-y: auto;
	background: var(--body-color);
	color: var(--text-color);
	padding: 0 2rem;
}
.content .header{
	overflow: hidden;
}
.content .header h2{
	text-align: center;
}

#menuToggle{
	position: fixed;
	top: 0;
	right: 0;
	font-size: 1.75rem;
	padding: 0.75rem;
	z-index: 3;
	display: none;
}
#menuToggle:before{
	content: "\f0c9";
	font-family: "Font Awesome 6 Free";
	font-weight: 800;
}
.sidebar.open #menuToggle:before{
	content: "\f057";
	color: red;
	background: white;
	border-radius: 50%;
}

.breadcrumbs{
	list-style: none;
	display: flex;
	user-select: none;
	padding: 0;
}
.breadcrumbs a{
	text-decoration: none;
	color: inherit;
	padding: 0.25rem 0.5rem;
	border-radius: 5px;
	background: #ddd;
}
.breadcrumbs a[href]:hover{
	background: #ccc;
}
.breadcrumbs li:not(:first-child)::before {
	content: "»";
	padding: 0.5rem;
}

.chapters{
	display: flex;
	user-select: none;
	font-size: 1.1rem;
	justify-content: center;
	gap: 1rem;
	padding: 0;
	margin: 0;
}
.chapters li{
	list-style-type: none;
}
.chapters li a{
	text-decoration: none;
	color: inherit;
}
.chapters li a:hover{
	text-decoration: underline;
}
.chapters li:not(:first-child)::before{
	content: "|";
	padding-right: 1rem;
}


.sidebar .header {
	text-align: center;
	background: var(--main-color);
}
.sidebar .header .icon {
	height: 1.5rem;
	vertical-align: top;
}
.sidebar .header a{
	color: inherit;
	text-decoration: none;
	padding: 5px;
	border-radius: 5px;
}
.sidebar .header a:hover{
	background: rgb(255, 255, 255, 0.25);
}
.sidebar .header h2{
	border-bottom: 2px solid white;
	padding: 5px 0;
	color: white;
	margin: 0.75rem 1rem;
}


.sidebar ul{
	list-style-type: none;
	padding: 0;
	margin: 0;
}
.sidebar ul li a{
	display: block;
	padding: 0.85rem 2rem;
	color: inherit;
	text-decoration: none;
}
.sidebar ul li a.selected{
	background: color-mix(in srgb, var(--side-bar) 75%, white);
}
.sidebar ul li a:hover{
	background: color-mix(in srgb, var(--side-bar) 70%, white);
}


.sidebar details[open]{
	background: color-mix(in srgb, var(--side-bar) 90%, white);
}

.sidebar details summary{
	display: block;
	position: relative;
}
.sidebar details[open] summary{
	background: color-mix(in srgb, var(--side-bar) 82%, white);
}
.sidebar details summary:hover{
	background: color-mix(in srgb, var(--side-bar) 70%, white);
}

.sidebar details > summary::before{
	font-family: "Font Awesome 6 Free";
	font-weight: 400;
	content: "\f0fe";
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	padding: 0.5rem;
	pointer-events: none;
}
.sidebar details[open] > summary::before{
	content: "\f146";
}
.sidebar ul li ul li a{
	padding-left: 3rem;
}


.main-content h2 {
	color: var(--main-color);
	border-bottom: 2px solid var(--main-color);
	display: flex;
	align-items: center;
}
.main-content h2,
.main-content h3{
	position: sticky;
	top: 0;
	background: var(--body-color);
	z-index: 1;
	padding: 0.5rem 0;
	margin: 0;
	margin-top: 0.5rem;
}
.main-content h4 code{
	font-size: 0.9rem;
}
.main-content .linker{
	color: black;
	text-decoration: none;
	font-size: 1rem;
	visibility: hidden;
	margin-left: 0.35rem;
	font-size: 0.85rem;
	line-height: 0.85rem;
}
.main-content *:hover > .linker{
	visibility: visible;
}
.main-content .linker::before{
	content: "\f0c1";
	font-family: "Font Awesome 6 Free";
}
.main-content ul {
	list-style-type: none;
}
.main-content ul li{
	margin: 0.5rem 0;
}
.main-content p {
	text-wrap: balance;
}
.main-content pre {
	background: color-mix(in srgb, var(--main-color) 20%, transparent);
	padding: 15px;
	border-left: 5px solid var(--main-color);
	overflow-x: auto;
	border-radius: 5px 10px 10px 5px;
	display: flex;
	align-items: center;
}
.main-content div:has(pre){
	position: relative;
}
.main-content code {
	font-family: monospace;
	tab-size: 2rem;
}
.main-content pre .copy-code{
	position: absolute;
	top: 50%;
	right: 10px;
	padding: 5px;
	border-radius: 8px;
	transform: translateY(-50%);
	background: color-mix(in srgb, var(--main-color) 50%, white);
	color: #444;
	cursor: pointer;
	border: none;
	display: none;
}
.main-content pre .copy-code.pined{
	top: 10px;
	transform: translateY(0);
}
.main-content pre .copy-code::after{
	content: "\f24d";
	font-family: "Font Awesome 6 Free";
}
.main-content pre:hover .copy-code{
	display: block;
}
.main-content pre .copy-code:active{
	background: color-mix(in srgb, var(--main-color) 60%, white);
}
.main-content .type{
	background: color-mix(in srgb, var(--main-color) 50%, transparent);
	color: white;
	padding: 2px 4px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 0.85rem;
	user-select: none;
	font-weight: bold;
	font-family: monospace;
}
.main-content * ~ .type{
	margin-left: 0.35rem;
}

.main-content .pages {
	list-style-type: "\f02d";
	font-family: "Font Awesome 6 Free";
	font-weight: bold;
	display: table;
	margin: 0 auto;
	padding-left: 0;
}
.main-content .pages li {
	margin: 0.75rem 0;
}
.main-content .pages a {
	color: inherit;
	text-decoration: none;
	font-size: 1.25rem;
	font-family: sans-serif;
	font-weight: normal;
	margin-left: 0.5rem;
	vertical-align: middle;
}
.main-content .pages a:hover{
	text-decoration: underline;
}

.main-content ol{
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding-left: 1.2rem;
}
.main-content ol pre{
	transform: translateX(-1.2rem);
	width: calc(100% + 1.2rem);
}

pre.art code{
	margin: auto;
	user-select: none;
}

.main-content .execute{
	margin: 1rem 0;
}
.main-content .execute summary{
	display: inline-flex;
	cursor: pointer;
	font-size: 1rem;
	gap: 0.25rem;
	padding: 6px 10px;
	border-radius: 8px;
	border: none;
	color: #fff;
	background: var(--main-color);
	user-select: none;
	border-bottom: 2px solid color-mix(in srgb, var(--main-color) 75%, black);
}
.main-content .execute summary:active{
	border-bottom: 0;
	margin-top: 2px;
}
.main-content .execute summary::before{
	content: "\f144";
	font-family: "Font Awesome 6 Free";
	font-weight: bold;
}
.main-content .execute summary::after{
	content: "Execute";
}
.main-content .execute pre{
	background: #bebebe;
	border-color: #367fff;
}

.main-content table{
	border-collapse: collapse;
	border-radius: 5px;
	overflow: hidden;
	filter: drop-shadow(0 2px 3px lightgrey);
	--alt-color: color-mix(in srgb, var(--body-color) 95%, black);
}
.main-content table tr:nth-child(odd){
	background: var(--alt-color);
}
.main-content table tr:nth-child(even){
	background: var(--body-color);
}
.main-content table tr td{
	padding: 10px;
}
.main-content table tr td:first-child,
.main-content table tr td:nth-child(2)
{
	text-align: center;
}
.main-content table tr td:empty{
	padding: 0 !important;
}


[theme="dark"]:root{
	color-scheme: dark;
	--main-color: #358a39;
	--side-bar: #202025;
	--body-color: #282930;
	--text-color: #e3e3e3;
}
[theme="dark"]{
	.breadcrumbs a{
		background: #445;
	}
	.breadcrumbs a[href]:hover{
		background: #556;
	}
	.main-content .linker {
		color: lightgrey;
	}
	.main-content .execute pre{
		background: #080716;
		border-color: #005dff;
	}
	.main-content table{
		filter: drop-shadow(0 2px 3px #111);
		--alt-color: color-mix(in srgb, var(--body-color) 95%, white);
	}
}


@media only screen and (max-width: 600px) {
	.content {
		padding: 0 1rem;
	}
	pre.art code{
		font-size: 0.5rem;
	}
	.sidebar .wrapper{
		min-width: 100dvw;
		position: fixed;
		z-index: 2;
		transition: 0.5s;
		transform: translateX(-100%);
	}
	.sidebar.open .wrapper{
		transform: translateX(0);
	}
	#menuToggle{
		display: block;
	}
	.chapters{
		flex-direction: column;
		font-size: 1rem;
		gap: 0.5rem;
		margin-bottom: 0.5rem;
	}
	.chapters li::before{
		content: ">" !important;
		padding-right: 0.5rem !important;
	}
	.main-content .linker{
		visibility: visible;
	}
	.main-content ul {
		padding-left: 1.2rem;
	}
	.main-content ul:has(table) {
		padding-left: 0;
	}
	.main-content table{
		width: 100%;
	}
	.main-content table tr td{
		padding: 5px;
	}
}

@media print {
	:root{
		color-scheme: light !important;
		--body-color: #fff !important;
		--text-color: #000 !important;
	}
	* {
		filter: none !important;
	}
	.sidebar, .breadcrumbs, .chapters,
	.main-content .execute,
	.main-content .execute summary {
		display: none;
	}
	.content {
		overflow-y: unset;
	}
	pre {
		white-space: break-spaces;
		page-break-inside: avoid;
		page-break-after: auto;
	}
	.main-content .execute pre {
		background: #ccc !important;
	}
	.main-content .execute[open] {
		display: block;
	}
	h1, h2, h3, h4, h5{
		position: unset !important;
		page-break-after: avoid;
	}
	table {
		border-collapse: separate !important;
		border: 1px solid grey;
	}
	table {
		page-break-inside: avoid;
		page-break-after: auto;
	}
	table tr {
		page-break-inside: avoid;
		page-break-after: auto;
	}
	table tfoot thead {
		break-inside: auto;
		overflow: hidden;
	}
}
