@font-face {
	font-family: "srcg";
	src: url("./font/IBMPlexMono-Medium.ttf");
}

* {
	font-family: "srcg", monospace;
}
body {
	color: #ffffff;
	background: #888888;
	font-size: 12px;
	font-weight: normal;
	padding: 0 32px;
	margin: 0;
}

p {
	margin: 0;
	padding: 0;
}

#main {
	padding: 16px;
	margin-bottom: 8px;
	background: #3a3a3a;
	clip-path: polygon(
		0 0,
		100% 0,
		100% calc(100% - 16px),
		calc(100% - 16px) 100%,
		0 100%,
		0 16px
	);
}

.content {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.flexh {
	display: flex;
	gap: 8px;
}

.flexv {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

body:has(.warning) #main {
	background: #d9a337;
}

body:has(.warning) nav > li.active > a {
	color: #ffffff;
	background: #d9a337;
}

.icon {
	width: 24px;
	height: 24px;
	vertical-align: middle;
}

h1 {
	font-size: 24px;
	margin: 8px 0 0 0;
}

h2 {
	font-size: 18px;
	margin: 0;
}

nav {
	display: flex;
	gap: 0px;
	margin: 8px 0 0 0;
	padding: 0;
}

nav > li {
	list-style: none;
	margin: 0;
	padding: 0;
}

nav > li.active > a {
	background: #3a3a3a;
}

nav > li > a:active, nav > li > a:focus {
	background: #555555;
}

nav > li > a {
	display: inline-block;
	padding: 0px 4px 8px 24px;
	text-transform: uppercase;
	color: #ffffff;
	font-size: 10px;
	text-decoration: none;
	background: #666666;
	clip-path: polygon(
		16px 0,
		100% 0,
		100% calc(100% - 0px),
		calc(100% - 16px) 100%,
		0 100%,
		0 16px
	);
}

table {
	width: 100%;
	border-spacing: 0;
	margin-top 8px;
	clip-path: polygon(
		10px 0,
		100% 0,
		100% calc(100% - 10px),
		calc(100% - 10px) 100%,
		0 100%,
		0 10px
	);
}

table tr {
}

table th {
	color: #ffffff;
	background: #888888;
	font-weight: normal;
	font-size: 10px;
	padding: 2px 8px;
	text-transform: uppercase;
	text-align: left;
}

table td {
	background: #888888;
	position: relative;
	border: none;
	padding: 8px;
	margin: 0;
	color: #ffffff;
	background: #1a1a1a;
}

table td > a {
	display: block;
	color: #FFE66A;
	text-decoration: none;
	padding: 8px;
	margin: -8px;
	font-weight: normal;
	transition: background-color 150ms ease-out;
}

table td > a::after {
	content: "";
	position: absolute;
	inset: 0;
}

table tr:hover td {
	background: #2a2a2a;
}

table td > a:active, table td > a:focus {
	background: #FFE66A !important;
	color: #000000bb !important;
}

table td.dir > a, tr.dir td > a {
}

table td.file > a, tr.file td > a {
}

label {
	color: #ffffff;
	background: #2a2a2a;
	text-transform: uppercase;
	padding: 4px 8px 4px 8px;
}

label:active {
	filter: brightness(85%);
}

input[type="text"] {
	box-sizing: border-box;
	width: 300px;
	padding: 4px 16px;
	font: inherit;
	color: #000000;
	background: #ffffff;
	border: none;
}

input[type="text"]:focus-visible {
	outline: none;
}

input[type="text"]::selection {
	color: #ffffff;
	background: #00aaaa;
}

#repo-tree #controls {
	display: flex;
	align-items: center;
	gap: 0;
}

#repo-tree #controls #ref,
#repo-blob #controls #ref
{
	background: #888888;
	color: #ffffff;
	padding: 4px 8px 4px 8px;
	display: inline-block;
}

#repo-tree #controls #path input[type=text] {
	padding-left: 8px;
}

.repo-log .hash {
	width: 1px;
}

.repo-log .browse {
	width: 1px;
}

#repo-blob #code {
	clip-path: polygon(
		10px 0,
		100% 0,
		100% calc(100% - 10px),
		calc(100% - 10px) 100%,
		0 100%,
		0 10px
	);
}

pre.code {
	background: #1a1a1a;
	white-space: pre-wrap;
	margin: 0;
	padding: 0;
	min-width: 0;
	width: 100%;
	line-height: 1.5;
}

pre.code .line {
	display: flex;
	vertical-align: top;
	width: 100%;
}

pre.code .line a.line-number {
	color: #FFE66A;
	background: #1a1a1a;
	text-decoration: none;
	min-width: 32px;
	display: inline-block;
	text-align: right;
	user-select: none;
	padding-right: 4px;
}

pre.code .line a.line-number:active {
	background: #FFE66A !important;
	color: #000000bb !important;
}

pre.code .line:target a.line-number {
	background: #FFE66A;
	color: #000000bb;
}

pre.code .line:target {
	background: #FFE66A;
	color: #000000bb;
}

pre.code .line code {
	flex: 1;
	margin: 0;
	padding: 0;
	padding-left: 16px;
	min-width: 0;
}

pre.code .line.add {
	background: #b0ff6a;
	color: #000000bb;
}

pre.code .line.delete {
	background: #ff908a;
	color: #000000bb;
}

pre.code .line.add .line-number {
	color: #000000bb;
	background: #b0ff6a;
}
pre.code .line.delete .line-number {
	color: #000000bb;
	background: #ff908a;
}

.warning {
	text-transform: uppercase;
	padding: 4px 8px 4px 16px;
	background: #ff0000;
	color: #ffffffbb;
	display: inline-block;
}

header {
	background: #888888;
	color: #ffffff;
	font-weight: normal;
	font-size: 10px;
	padding: 2px 8px;
	text-align: left;
}

.diff-file {
	clip-path: polygon(
		10px 0,
		100% 0,
		100% calc(100% - 10px),
		calc(100% - 10px) 100%,
		0 100%,
		0 10px
	);
}

.diff-file-header:has(.diff-file-renamed) {
	background: #c88b25;
}

.diff-file-header:has(.diff-file-deleted) {
	color: #ffffff;
	background: color-mix(in srgb, #ff908a 60%, black);
}

.diff-file-header:has(.diff-file-created) {
	color: #ffffff;
	background: color-mix(in srgb, #b0ff6a 60%, black);
}

#version {
	font-size: 10px;
}
