/* Light by default; dark, in jtobin.io's colours, when the viewer prefers
   it. */
:root {
	color-scheme: light dark;
	--fg: #000;
	--bg: #fff;
	--muted: #777;
	--row: #eee;
	--rule: #777;
	--accent: blue;
	--hunk: #00a;
	--add: #070;
	--del: #e00;
}

@media (prefers-color-scheme: dark) {
	:root {
		--fg: #c5c5c5;
		--bg: #1d1d1d;
		--muted: #808080;
		--row: #262626;
		--rule: #333;
		--accent: #4fa3e0;
		--hunk: #4fa3e0;
		--add: #b8bb26;
		--del: #fb4934;
	}

	a {
		color: #4fa3e0;
	}

	h1, h2, h3, h4, h5, h6 {
		color: #e2e2e2;
	}
}

body {
	color: var(--fg);
	background-color: var(--bg);
	font-family: monospace;
	font-size: 18px;
}

h1, h2, h3, h4, h5, h6 {
	font-size: 1em;
	margin: 0;
}

img, h1, h2 {
	vertical-align: middle;
}

img {
	border: 0;
}

a.d,
a.h,
a.i,
a.line {
	text-decoration: none;
}

#blob a {
	color: var(--muted);
}

#blob a:hover {
	color: var(--accent);
	text-decoration: none;
}

table thead td {
	font-weight: bold;
}

table td {
	padding: 0 0.4em;
}

#content table td {
	vertical-align: top;
	white-space: nowrap;
}

#branches tr:hover td,
#tags tr:hover td,
#index tr:hover td,
#log tr:hover td,
#files tr:hover td {
	background-color: var(--row);
}

#index tr td:nth-child(2),
#tags tr td:nth-child(3),
#branches tr td:nth-child(3),
#log tr td:nth-child(2) {
	white-space: normal;
}

td.num {
	text-align: right;
}

.desc {
	color: var(--muted);
}

/* soften secondary columns in repo log */
#log tr td:nth-child(1),
#log tr td:nth-child(3),
#log tr td:nth-child(4),
#log tr td:nth-child(5),
#log tr td:nth-child(6) {
	color: var(--muted);
}

/* soften secondary columns in index */
#index tr td:nth-child(1),
#index tr td:nth-child(3),
#index tr td:nth-child(4) {
	color: var(--muted);
}

#index tr td:nth-child(1) a {
	color: var(--muted);
}

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	height: 1px;
}

pre {
	font-family: monospace;
}

pre a.h {
	color: var(--hunk);
}

.A,
span.i,
pre a.i {
	color: var(--add);
}

.D,
span.d,
pre a.d {
	color: var(--del);
}

pre a.h:hover,
pre a.i:hover,
pre a.d:hover {
	text-decoration: none;
}
