/*
 * cgit.css — a cgit theme modelled on the Hugo theme "hugo-blog-awesome"
 * (https://github.com/hugo-sid/hugo-blog-awesome).
 *
 * Colours, fonts and spacing are taken from that theme's SCSS; code panels
 * and syntax highlighting use GitHub's light and dark palettes. Light/dark
 * follows the browser's prefers-color-scheme.
 *
 * The theme uses Roboto, loaded here from Google Fonts. The import must stay
 * the first rule in this file. To self-host instead, replace it with an
 * @font-face rule.
 */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;600;700&display=swap");

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
	color-scheme: light dark;

	--bg: #fff;
	--text: #434648;
	--heading: #0d122b;
	--muted: #6b7886;
	--line: #ececec;
	--underline: #d2c7c7;
	/* links and focus ring (GitHub accent) */
	--link: #0969da;
	--link-active: #0550ae;
	--focus: #0969da;
	--panel: #edecec;
	--hover: #f6f6f7;
	--quote-border: #c4c8cc;
	--quote-text: #525b66;
	--inline-code: #333638;
	--inline-code-bg: #d8dbe2;
	/* insertions / deletions (GitHub success / danger) */
	--add: #1a7f37;
	--del: #d1242f;
	--add-bar: #1f883d;
	--del-bar: #cf222e;

	/* Code panels and syntax colours: GitHub light */
	--code-bg: #f6f8fa;
	--code-gutter: #eff2f5;
	--code-alt: rgba(0, 0, 0, .025);
	--code-text: #1f2328;
	--code-muted: #6e7781;
	--code-line: #d0d7de;
	--code-keyword: #cf222e;
	--code-string: #0a3069;
	--code-constant: #0550ae;
	--code-entity: #8250df;
	--code-tag: #116329;
	--code-variable: #953800;
	--code-attention: #9a6700;
	--code-error: #82071e;

	--diff-add-bg: #dafbe1;
	--diff-add-word: #abf2bc;
	--diff-add-text: #116329;
	--diff-del-bg: #ffebe9;
	--diff-del-word: rgba(255, 129, 130, .4);
	--diff-del-text: #82071e;
	--diff-change-bg: #fff8c5;
	--diff-change-word: rgba(212, 167, 44, .4);
	--diff-hunk-bg: #ddf4ff;

	--sans: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--mono: Consolas, "SFMono-Regular", Menlo, "DejaVu Sans Mono", monospace;
	--small: 14px;
	--radius: .3rem;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #131418;
		--text: #babdc4;
		--heading: #eaeaea;
		--muted: #767f87;
		--line: #1b1d25;
		--underline: #4a4d56;
		--link: #58a6ff;
		--link-active: #79c0ff;
		--focus: #1f6feb;
		--panel: #323232;
		--hover: #1b1d25;
		--quote-border: #4a4d56;
		--quote-text: #9b9ba3;
		--inline-code: #c2c4ca;
		--inline-code-bg: #2d2d2d;
		--add: #3fb950;
		--del: #f85149;
		--add-bar: #238636;
		--del-bar: #da3633;

		/* GitHub dark */
		--code-bg: #161b22;
		--code-gutter: #0d1117;
		--code-alt: rgba(255, 255, 255, .03);
		--code-text: #e6edf3;
		--code-muted: #8b949e;
		--code-line: #30363d;
		--code-keyword: #ff7b72;
		--code-string: #a5d6ff;
		--code-constant: #79c0ff;
		--code-entity: #d2a8ff;
		--code-tag: #7ee787;
		--code-variable: #ffa657;
		--code-attention: #d29922;
		--code-error: #ffa198;

		--diff-add-bg: rgba(46, 160, 67, .15);
		--diff-add-word: rgba(46, 160, 67, .4);
		--diff-add-text: #7ee787;
		--diff-del-bg: rgba(248, 81, 73, .1);
		--diff-del-word: rgba(248, 81, 73, .4);
		--diff-del-text: #ffa198;
		--diff-change-bg: rgba(187, 128, 9, .15);
		--diff-change-word: rgba(187, 128, 9, .4);
		--diff-hunk-bg: rgba(56, 139, 253, .15);
	}
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

html {
	background: var(--bg);
	overflow-x: hidden;
}

body {
	margin: 0;
	background: var(--bg);
}

div#cgit {
	box-sizing: border-box;
	max-width: 890px;
	margin: 0 auto;
	padding: 0 30px;
	color: var(--text);
	background: var(--bg);
	font: 400 16px/1.85 var(--sans);
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	font-kerning: normal;
}

div#cgit * {
	transition: background-color 75ms ease-in, border-color 75ms ease-in;
}

div#cgit a {
	color: inherit;
	text-decoration: none;
}

div#cgit a:hover {
	color: var(--link);
}

div#cgit a:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

div#cgit b,
div#cgit strong {
	color: var(--heading);
}

div#cgit table {
	border-collapse: collapse;
}

div#cgit img {
	border: none;
	max-width: 100%;
}

div#cgit .oid,
div#cgit .sha1 {
	font-family: var(--mono);
	font-size: 90%;
}

div#cgit .left { text-align: left; }
div#cgit .right { text-align: right; }

div#cgit input,
div#cgit select,
div#cgit button {
	font: inherit;
	font-size: var(--small);
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 2px 8px;
	line-height: 1.6;
}

div#cgit input:focus,
div#cgit select:focus {
	outline: 2px solid var(--focus);
	outline-offset: 0;
}

div#cgit input[type="submit"],
div#cgit button {
	color: var(--heading);
	background: var(--panel);
	cursor: pointer;
}

div#cgit input[type="submit"]:hover,
div#cgit button:hover {
	border-color: var(--quote-border);
}

/* ------------------------------------------------------------------ */
/* Header (logo, repo name, description) — the theme's navbar          */
/* ------------------------------------------------------------------ */

div#cgit table#header {
	width: 100%;
	margin: 2.5em 0 0;
}

div#cgit table#header td.logo {
	width: 72px;
	vertical-align: middle;
	padding-right: 12px;
}

/* Round avatar, as on the theme's home page */
div#cgit table#header td.logo img {
	display: block;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 50%;
}

div#cgit table#header td.main {
	font-size: 2em;
	font-weight: 700;
	line-height: 1.2;
	color: var(--muted);
	white-space: nowrap;
}

div#cgit table#header td.main a {
	color: var(--heading);
}

div#cgit table#header td.main a:hover {
	color: var(--link);
}

div#cgit table#header td.form {
	text-align: right;
	vertical-align: bottom;
	white-space: nowrap;
}

div#cgit table#header td.sub {
	color: var(--muted);
	padding-top: 2px;
	font-size: .95em;
}

/* ------------------------------------------------------------------ */
/* Tabs — styled like the theme's menu links                           */
/* ------------------------------------------------------------------ */

div#cgit table.tabs {
	width: 100%;
	margin: 1.5em 0 0;
	border-bottom: 1px solid var(--line);
}

div#cgit table.tabs td {
	padding: .4rem 0;
	vertical-align: middle;
}

div#cgit table.tabs td a {
	display: inline-block;
	padding: .3rem .5rem;
	margin-right: 5px;
	color: var(--heading);
	opacity: .7;
	letter-spacing: .015rem;
	transition: opacity 75ms ease-in;
}

div#cgit table.tabs td:first-child a:first-child {
	padding-left: 0;
}

div#cgit table.tabs td a:hover {
	color: var(--heading);
	opacity: 1;
}

div#cgit table.tabs td a.active {
	opacity: 1;
	font-weight: 600;
}

/* External links get the theme's arrow instead of cgit's PNG */
div#cgit table.tabs a[href^="http://"]:after,
div#cgit table.tabs a[href^="https://"]:after {
	content: " \2197";
	font-size: var(--small);
	margin: 0;
	opacity: 1;
}

div#cgit table.tabs td.form {
	text-align: right;
	white-space: nowrap;
}

div#cgit table.tabs td.form input.txt {
	width: 12em;
}

/* ------------------------------------------------------------------ */
/* Breadcrumb path & content area                                      */
/* ------------------------------------------------------------------ */

div#cgit div.path {
	margin: 0;
	padding: .8em 0 0;
	font-size: var(--small);
	color: var(--muted);
	background: none;
}

div#cgit div.path a {
	color: var(--heading);
	text-decoration: underline;
	text-decoration-color: var(--underline);
}

div#cgit div.path a:hover {
	color: var(--link);
}

div#cgit div.content {
	margin: 0;
	padding: 1.5em 0 0;
	border: none;
	overflow-x: auto;
}

div#cgit div.error {
	color: var(--del);
	font-weight: 700;
	margin: 1em 0;
}

/* ------------------------------------------------------------------ */
/* Lists (repo index, log, refs, tree)                                 */
/* ------------------------------------------------------------------ */

div#cgit table.list {
	width: 100%;
	border: none;
	font-size: var(--small);
}

div#cgit table.list tr,
div#cgit table.list tr:nth-child(even),
div#cgit table.list tr:nth-child(odd),
div#cgit table.list tr.logheader,
div#cgit table.list tr.nohover,
div#cgit table.list tr.nohover:hover,
div#cgit table.list tr.nohover-highlight:hover:nth-child(even),
div#cgit table.list tr.nohover-highlight:hover:nth-child(odd) {
	background: transparent;
}

div#cgit table.list tr {
	border-bottom: 1px solid var(--line);
}

div#cgit table.list tr.nohover {
	border-bottom: none;
}

div#cgit table.list tr:hover {
	background: var(--hover);
}

div#cgit table.list th {
	font-weight: 700;
	color: var(--heading);
	text-align: left;
	padding: .3em .5em;
	vertical-align: baseline;
	border-bottom: 1px solid var(--line);
}

div#cgit table.list td {
	border: none;
	padding: .35em .5em;
	vertical-align: baseline;
}

div#cgit table.list th:first-child,
div#cgit table.list td:first-child {
	padding-left: 0;
}

div#cgit table.list th:last-child,
div#cgit table.list td:last-child {
	padding-right: 0;
}

div#cgit table.list td a {
	color: var(--heading);
}

div#cgit table.list td a:hover {
	color: var(--link);
}

div#cgit table.list td a.ls-dir {
	font-weight: 700;
	color: var(--link);
}

div#cgit table.list td a.ls-dir:hover {
	color: var(--link-active);
}

/* Section headings on the repo index, like the theme's year headers */
div#cgit table.list td.reposection {
	font-style: normal;
	font-weight: 700;
	font-size: 1.15em;
	color: var(--heading);
	padding-top: 1.4em;
	padding-bottom: .3em;
}

div#cgit table.list td.sublevel-repo {
	padding-left: 1.5em;
}

div#cgit table.list td.logsubject {
	font-family: inherit;
	font-weight: 700;
	color: var(--heading);
}

div#cgit table.list td.logmsg {
	font-family: var(--mono);
	white-space: pre;
	padding: 0 .5em 1em 0;
	color: var(--text);
}

div#cgit table.list td.commitgraph {
	font-family: var(--mono);
	white-space: pre;
	line-height: 1.5;
}

/* Lanes reuse the GitHub syntax colours, so they follow light/dark */
div#cgit table.list td.commitgraph .column1 { color: var(--code-keyword); }
div#cgit table.list td.commitgraph .column2 { color: var(--code-tag); }
div#cgit table.list td.commitgraph .column3 { color: var(--code-attention); }
div#cgit table.list td.commitgraph .column4 { color: var(--code-constant); }
div#cgit table.list td.commitgraph .column5 { color: var(--code-entity); }
div#cgit table.list td.commitgraph .column6 { color: var(--code-variable); }

div#cgit a.ls-blob,
div#cgit a.ls-dir,
div#cgit .ls-mod {
	font-family: var(--mono);
}

div#cgit td.ls-size {
	text-align: right;
	font-family: var(--mono);
	width: 10em;
	color: var(--muted);
}

div#cgit td.ls-mode {
	font-family: var(--mono);
	width: 10em;
	color: var(--muted);
}

div#cgit table.nowrap td {
	white-space: nowrap;
}

/* Small action links (log / plain / blame in the tree, log / tree next
 * to refs). Qualified with table.list td so they outrank the list's own
 * link colour. */
div#cgit a.button,
div#cgit table.list td a.button {
	display: inline-block;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.6;
	padding: 0 7px;
	margin: 0;
	color: var(--muted);
	border: 1px solid var(--underline);
	border-radius: 2px;
}

/* cgit emits the buttons with no whitespace between them */
div#cgit a.button + a.button,
div#cgit table.list td a.button + a.button {
	margin-left: 8px;
}

div#cgit a.button:hover,
div#cgit table.list td a.button:hover {
	color: var(--link);
	border-color: var(--link);
}

/* Keep a row's buttons together on one line, aligned right */
div#cgit table.list td:has(> a.button) {
	white-space: nowrap;
	text-align: right;
}

div#cgit a.primary { font-size: 100%; }
div#cgit a.secondary { font-size: 90%; }

/* Ages — GitHub palette, fading from green (fresh) to grey (old) */
div#cgit span.age-mins   { font-weight: 700; color: var(--code-tag); }
div#cgit span.age-hours  { color: var(--code-tag); }
div#cgit span.age-days   { color: var(--code-constant); }
div#cgit span.age-weeks  { color: var(--code-text); }
div#cgit span.age-months { color: var(--code-muted); }
div#cgit span.age-years  { color: var(--code-muted); opacity: .75; }

div#cgit span.insertions { color: var(--add); }
div#cgit span.deletions  { color: var(--del); }

/* ------------------------------------------------------------------ */
/* Ref decorations                                                     */
/* ------------------------------------------------------------------ */

/* GitHub-style labels: coloured text on a tint of the same colour. Each
 * type sets --deco; the table.list selectors outrank the list's own link
 * colour so the labels keep their colour inside the log table. */
div#cgit a.branch-deco         { --deco: var(--code-tag); }
div#cgit a.tag-deco            { --deco: var(--code-attention); }
div#cgit a.tag-annotated-deco  { --deco: var(--code-variable); }
div#cgit a.remote-deco         { --deco: var(--code-constant); }
div#cgit a.deco                { --deco: var(--code-keyword); }

div#cgit a.branch-deco,
div#cgit a.tag-deco,
div#cgit a.tag-annotated-deco,
div#cgit a.remote-deco,
div#cgit a.deco,
div#cgit table.list td a.branch-deco,
div#cgit table.list td a.tag-deco,
div#cgit table.list td a.tag-annotated-deco,
div#cgit table.list td a.remote-deco,
div#cgit table.list td a.deco {
	display: inline-block;
	margin: 0 0 0 .5em;
	padding: 0 7px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	color: var(--deco);
	background: color-mix(in srgb, var(--deco) 12%, transparent);
	border: 1px solid color-mix(in srgb, var(--deco) 35%, transparent);
	border-radius: 2em;
}

div#cgit a.branch-deco:hover,
div#cgit a.tag-deco:hover,
div#cgit a.tag-annotated-deco:hover,
div#cgit a.remote-deco:hover,
div#cgit a.deco:hover,
div#cgit table.list td a.branch-deco:hover,
div#cgit table.list td a.tag-deco:hover,
div#cgit table.list td a.tag-annotated-deco:hover,
div#cgit table.list td a.remote-deco:hover,
div#cgit table.list td a.deco:hover {
	color: var(--deco);
	background: color-mix(in srgb, var(--deco) 22%, transparent);
	border-color: var(--deco);
}

div#cgit div.commit-subject a.branch-deco,
div#cgit div.commit-subject a.tag-deco,
div#cgit div.commit-subject a.tag-annotated-deco,
div#cgit div.commit-subject a.remote-deco,
div#cgit div.commit-subject a.deco {
	margin-left: 1em;
	font-size: 12px;
	vertical-align: middle;
}

/* ------------------------------------------------------------------ */
/* Commit view                                                         */
/* ------------------------------------------------------------------ */

div#cgit table.commit-info {
	margin-top: .5em;
	font-size: var(--small);
}

div#cgit table.commit-info th {
	text-align: left;
	font-weight: 400;
	color: var(--muted);
	padding: .1em 1.5em .1em 0;
	vertical-align: top;
}

div#cgit table.commit-info td {
	font-weight: 400;
	padding: .1em 1em .1em 0;
}

div#cgit table.commit-info td a {
	color: var(--link);
}

div#cgit div.commit-subject {
	font-size: 1.5em;
	font-weight: 700;
	line-height: 1.3;
	color: var(--heading);
	letter-spacing: .03rem;
	margin: 1.4em 0 .6em;
	padding: 0;
}

div#cgit div.commit-msg {
	white-space: pre-wrap;
	font-family: var(--mono);
	font-size: var(--small);
	line-height: 1.6;
}

div#cgit div.notes-header {
	font-weight: 700;
	color: var(--heading);
	padding-top: 1.5em;
}

div#cgit div.notes {
	white-space: pre;
	font-family: var(--mono);
	font-size: var(--small);
	color: var(--quote-text);
	background: none;
	border: none;
	border-left: 5px solid var(--quote-border);
	padding: 0 0 0 1rem;
	margin: .5em .3rem;
	float: left;
}

div#cgit div.notes-footer {
	clear: left;
}

/* Diff options panel */
div#cgit div.cgit-panel {
	float: right;
	margin: .5em 0 1em 1em;
	font-size: var(--small);
}

div#cgit div.cgit-panel table {
	border: none;
	border-radius: var(--radius);
	background: var(--panel);
	border-collapse: separate;
}

div#cgit div.cgit-panel th {
	text-align: center;
	color: var(--heading);
	padding: .4em .8em 0;
}

div#cgit div.cgit-panel td {
	padding: .25em .6em;
}

div#cgit div.cgit-panel td.label { padding-right: .5em; color: var(--muted); }
div#cgit div.cgit-panel td.ctrl { padding-left: .5em; }

/* Diffstat */
div#cgit div.diffstat-header {
	font-weight: 700;
	color: var(--heading);
	padding-top: 1.5em;
	margin-bottom: .4em;
}

div#cgit div.diffstat-header a {
	color: var(--link);
}

div#cgit table.diffstat {
	border: 1px solid var(--line);
	background: none;
	font-size: var(--small);
	font-family: var(--mono);
}

div#cgit table.diffstat th {
	font-weight: 400;
	text-align: left;
	text-decoration: none;
	padding: .1em 1em .1em .1em;
}

div#cgit table.diffstat td {
	padding: .2em .5em;
	border: none;
	border-bottom: 1px solid var(--line);
}

div#cgit table.diffstat td.mode {
	white-space: nowrap;
	color: var(--muted);
}

div#cgit table.diffstat td span.modechange {
	padding-left: 1em;
	color: var(--del);
}

div#cgit table.diffstat td.add a { color: var(--add); }
div#cgit table.diffstat td.del a { color: var(--del); }
div#cgit table.diffstat td.upd a { color: var(--heading); }
div#cgit table.diffstat td a:hover { color: var(--link); }

div#cgit table.diffstat td.graph {
	width: 400px;
	vertical-align: middle;
}

div#cgit table.diffstat td.graph table {
	border: none;
}

div#cgit table.diffstat td.graph td {
	padding: 0;
	border: 0;
	height: 7pt;
}

div#cgit table.diffstat td.graph td.add { background-color: var(--add-bar); }
div#cgit table.diffstat td.graph td.rem { background-color: var(--del-bar); }

div#cgit div.diffstat-summary {
	color: var(--muted);
	font-size: var(--small);
	padding: .5em 0 1em;
}

/* ------------------------------------------------------------------ */
/* Code panels: unified diff, blob, blame                              */
/* ------------------------------------------------------------------ */

div#cgit table.diff,
div#cgit table.blob,
div#cgit table.ssdiff {
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--code-line);
	border-radius: var(--radius);
	background: var(--code-bg);
	color: var(--code-text);
	font-family: var(--mono);
	font-size: var(--small);
	line-height: 1.5;
}

div#cgit table.diff {
	width: 100%;
	margin-top: 1em;
}

div#cgit table.diff td {
	font-family: var(--mono);
	white-space: pre;
	padding: .5rem 1rem;
}

div#cgit table.diff td div.head {
	font-weight: 700;
	color: var(--code-text);
	margin-top: 1em;
	padding-top: .5em;
	border-top: 1px solid var(--code-line);
}

div#cgit table.diff td div.head:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

div#cgit table.diff td div.head a {
	color: var(--code-constant);
}

div#cgit table.diff td div.hunk { color: var(--code-muted); background: var(--diff-hunk-bg); }
div#cgit table.diff td div.add  { color: var(--code-text); background: var(--diff-add-bg); }
div#cgit table.diff td div.del  { color: var(--code-text); background: var(--diff-del-bg); }
div#cgit table.diff td div.ctx  { color: var(--code-text); }

/* Blob */
div#cgit table.blob {
	margin-top: .5em;
	width: 100%;
}

div#cgit table.blob td.hashes,
div#cgit table.blob td.lines {
	margin: 0;
	padding: .5rem 1rem;
	vertical-align: top;
	color: var(--code-text);
}

div#cgit table.blob td.lines {
	width: 100%;
}

div#cgit table.blob td.linenumbers {
	margin: 0;
	padding: .5rem .6rem .5rem .8rem;
	vertical-align: top;
	text-align: right;
	background: var(--code-gutter);
	border-right: 1px solid var(--code-line);
	border-radius: var(--radius) 0 0 var(--radius);
	user-select: none;
}

div#cgit table.blob pre,
div#cgit table.blob code {
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	background: none;
	color: inherit;
}

div#cgit table.blob td.linenumbers a,
div#cgit table.ssdiff td.lineno a {
	color: var(--code-muted);
	text-align: right;
	text-decoration: none;
}

div#cgit table.blob td.linenumbers a:hover,
div#cgit table.ssdiff td.lineno a:hover {
	color: var(--code-text);
}

div#cgit table.blob td.linenumbers a:target {
	color: var(--code-attention);
}

div#cgit table.blob td.linenumbers a:target:before {
	color: var(--code-attention);
	content: "\25B8 ";
}

div#cgit div#blob {
	border: none;
}

/* Blame */
div#cgit table.blame td.hashes,
div#cgit table.blame td.lines,
div#cgit table.blame td.linenumbers {
	padding: .5rem 0;
}

div#cgit table.blame td.hashes {
	background: var(--code-gutter);
	border-right: 1px solid var(--code-line);
	border-radius: var(--radius) 0 0 var(--radius);
}

div#cgit table.blame td.linenumbers {
	border-radius: 0;
}

div#cgit table.blame td.hashes a {
	color: var(--code-constant);
}

div#cgit table.blame td.hashes a:hover {
	color: var(--code-text);
}

div#cgit table.blame td.hashes div.alt,
div#cgit table.blame td.lines div.alt {
	padding: 0 .8em;
}

div#cgit table.blame td.linenumbers div.alt {
	padding: 0 .6em 0 0;
}

div#cgit table.blame div.alt:nth-child(even) { background: var(--code-alt); }
div#cgit table.blame div.alt:nth-child(odd)  { background: transparent; }

div#cgit table.blame td.lines > div {
	position: relative;
}

div#cgit table.blame td.lines > div > pre {
	padding: 0 0 0 .8em;
	position: absolute;
	top: 0;
}

div#cgit table.blame .oid {
	font-size: 100%;
}

/* Binary blob */
div#cgit table.bin-blob {
	margin-top: .5em;
	border: 1px solid var(--line);
	font-size: var(--small);
}

div#cgit table.bin-blob th {
	font-family: var(--mono);
	white-space: pre;
	color: var(--heading);
	border: 1px solid var(--line);
	padding: .5em 1em;
}

div#cgit table.bin-blob td {
	font-family: var(--mono);
	white-space: pre;
	border-left: 1px solid var(--line);
	padding: 0 1em;
}

/* Side-by-side diff */
div#cgit table.ssdiff {
	width: 100%;
	margin-top: 1em;
	overflow: hidden;
}

div#cgit table.ssdiff td {
	font-size: 13px;
	font-family: var(--mono);
	white-space: pre;
	padding: 1px 6px;
	color: var(--code-text);
	border-left: 1px solid var(--code-line);
	border-right: 1px solid var(--code-line);
}

div#cgit table.ssdiff td.add          { background: var(--diff-add-bg);     min-width: 50%; }
div#cgit table.ssdiff td.add_dark     { background: var(--diff-add-word);   min-width: 50%; }
div#cgit table.ssdiff span.add        { background: var(--diff-add-word); }
div#cgit table.ssdiff td.del          { background: var(--diff-del-bg);     min-width: 50%; }
div#cgit table.ssdiff td.del_dark     { background: var(--diff-del-word);   min-width: 50%; }
div#cgit table.ssdiff span.del        { background: var(--diff-del-word); }
div#cgit table.ssdiff td.changed      { background: var(--diff-change-bg);  min-width: 50%; }
div#cgit table.ssdiff td.changed_dark { background: var(--diff-change-word); min-width: 50%; }

div#cgit table.ssdiff td.lineno {
	color: var(--code-muted);
	background: var(--code-gutter);
	text-align: right;
	width: 3em;
	min-width: 3em;
	user-select: none;
}

div#cgit table.ssdiff td.hunk {
	color: var(--code-muted);
	background: var(--diff-hunk-bg);
	border-top: 1px solid var(--code-line);
	border-bottom: 1px solid var(--code-line);
}

div#cgit table.ssdiff td.head {
	padding: .5rem 1rem;
	border-top: 1px solid var(--code-line);
	border-bottom: 1px solid var(--code-line);
}

div#cgit table.ssdiff td.head div.head {
	font-weight: 700;
	color: var(--code-text);
}

div#cgit table.ssdiff td.head div.head a {
	color: var(--code-constant);
}

div#cgit table.ssdiff td.foot {
	border-top: 1px solid var(--code-line);
	border-left: none;
	border-right: none;
	border-bottom: none;
}

div#cgit table.ssdiff td.space {
	border: none;
}

div#cgit table.ssdiff td.space div {
	min-height: 3em;
}

/* ------------------------------------------------------------------ */
/* Syntax highlighting (GitHub light / dark)                           */
/*                                                                     */
/* cgit's syntax-highlighting filter injects pygments' own palette;    */
/* the #cgit prefix here outranks it. Tokens not listed below fall     */
/* back to the plain code colour instead of the pygments one.          */
/* ------------------------------------------------------------------ */

div#cgit .highlight,
div#cgit .highlight pre {
	background: none;
	color: var(--code-text);
	margin: 0;
	padding: 0;
}

div#cgit .highlight span {
	color: inherit;
	background: none;
	font-weight: inherit;
	font-style: inherit;
	border: none;
}

div#cgit .highlight .w { color: var(--code-text); }
div#cgit .highlight .err { color: var(--code-error); }

/* comments */
div#cgit .highlight .c,
div#cgit .highlight .ch,
div#cgit .highlight .cd,
div#cgit .highlight .cm,
div#cgit .highlight .c1,
div#cgit .highlight .cs,
div#cgit .highlight .cpf { color: var(--code-muted); }
div#cgit .highlight .cp { color: var(--code-keyword); }

/* keywords */
div#cgit .highlight .k,
div#cgit .highlight .kd,
div#cgit .highlight .kn,
div#cgit .highlight .kp,
div#cgit .highlight .kr,
div#cgit .highlight .kt,
div#cgit .highlight .kv,
div#cgit .highlight .ow { color: var(--code-keyword); }
div#cgit .highlight .kc { color: var(--code-constant); }

div#cgit .highlight .o,
div#cgit .highlight .p,
div#cgit .highlight .pi,
div#cgit .highlight .nn { color: var(--code-text); }

/* strings */
div#cgit .highlight .s,
div#cgit .highlight .sa,
div#cgit .highlight .sb,
div#cgit .highlight .sc,
div#cgit .highlight .sd,
div#cgit .highlight .s1,
div#cgit .highlight .s2,
div#cgit .highlight .sh,
div#cgit .highlight .si,
div#cgit .highlight .sx,
div#cgit .highlight .dl { color: var(--code-string); }
div#cgit .highlight .sr { color: var(--code-tag); }
div#cgit .highlight .se,
div#cgit .highlight .ss { color: var(--code-constant); }

/* numbers and constants */
div#cgit .highlight .m,
div#cgit .highlight .mb,
div#cgit .highlight .mf,
div#cgit .highlight .mh,
div#cgit .highlight .mi,
div#cgit .highlight .il,
div#cgit .highlight .mo,
div#cgit .highlight .mx,
div#cgit .highlight .no,
div#cgit .highlight .na,
div#cgit .highlight .nb,
div#cgit .highlight .bp,
div#cgit .highlight .nl { color: var(--code-constant); }

/* names */
div#cgit .highlight .nc,
div#cgit .highlight .nd,
div#cgit .highlight .ne,
div#cgit .highlight .nf,
div#cgit .highlight .fm { color: var(--code-entity); }
div#cgit .highlight .nt { color: var(--code-tag); }
div#cgit .highlight .nv,
div#cgit .highlight .vc,
div#cgit .highlight .vg,
div#cgit .highlight .vi,
div#cgit .highlight .vm { color: var(--code-variable); }

/* generic (diff, markup) */
div#cgit .highlight .gd { color: var(--diff-del-text); background: var(--diff-del-bg); }
div#cgit .highlight .gi { color: var(--diff-add-text); background: var(--diff-add-bg); }
div#cgit .highlight .gh,
div#cgit .highlight .gu { color: var(--code-constant); font-weight: 700; }
div#cgit .highlight .ge { font-style: italic; }
div#cgit .highlight .gs { font-weight: 700; }

/* ------------------------------------------------------------------ */
/* About / README (rendered by an about-filter) — the theme's post body */
/* ------------------------------------------------------------------ */

div#cgit div#summary {
	vertical-align: top;
	margin-bottom: 1em;
}

div#cgit div#summary h1,
div#cgit div#summary h2,
div#cgit div#summary h3,
div#cgit div#summary h4,
div#cgit div#summary h5,
div#cgit div#summary h6 {
	color: var(--heading);
	font-weight: 700;
	letter-spacing: .03rem;
	line-height: 1.3;
	margin: 30px 0 0;
}

div#cgit div#summary > :first-child { margin-top: 0; }

div#cgit div#summary h1 { font-size: 24px; }
div#cgit div#summary h2 { font-size: 22px; }
div#cgit div#summary h3,
div#cgit div#summary h4 { font-size: 20px; }
div#cgit div#summary h5 { font-size: 16px; }
div#cgit div#summary h6 { font-size: 14px; }

div#cgit div#summary p {
	margin: 0;
	padding: 15px 0;
}

div#cgit div#summary a {
	color: var(--link);
}

div#cgit div#summary a:hover {
	color: var(--link-active);
}

div#cgit div#summary ul,
div#cgit div#summary ol {
	margin: 10px 0 10px 30px;
	padding: 0;
}

div#cgit div#summary li {
	padding: 1px 0;
}

div#cgit div#summary blockquote {
	color: var(--quote-text);
	opacity: .9;
	border-left: 5px solid var(--quote-border);
	padding: 0 0 0 1rem;
	margin: 10px .3rem;
}

div#cgit div#summary hr {
	border: 0;
	border-bottom: 1px solid var(--line);
	margin: 1.5em 0;
}

div#cgit div#summary code {
	font-family: var(--mono);
	font-size: .9em;
	padding: 1px 3px;
	color: var(--inline-code);
	background: var(--inline-code-bg);
	border: 1px solid rgba(128, 128, 128, .1);
	border-radius: 2px;
}

div#cgit div#summary pre {
	background: var(--code-bg);
	color: var(--code-text);
	border: 1px solid var(--code-line);
	border-radius: var(--radius);
	padding: .5rem 1rem;
	margin: 10px 0;
	overflow-x: auto;
	line-height: 1.5;
	font-size: var(--small);
}

div#cgit div#summary pre code {
	padding: 0;
	font-size: inherit;
	color: inherit;
	background: none;
	border: none;
}

div#cgit div#summary table {
	width: 100%;
	margin-top: 15px;
	font-size: var(--small);
}

div#cgit div#summary th,
div#cgit div#summary td {
	border: 1px solid var(--line);
	padding: 2px 7px;
}

div#cgit div#summary th {
	color: var(--heading);
}

div#cgit div#summary img {
	border-radius: 2px;
}

div#cgit table#downloads {
	float: right;
	border: 1px solid var(--line);
	margin: 0 0 .5em .5em;
	font-size: var(--small);
}

div#cgit table#downloads th {
	background: var(--panel);
	color: var(--heading);
	padding: .2em .6em;
}

div#cgit table#downloads td {
	padding: .2em .6em;
}

/* ------------------------------------------------------------------ */
/* Stats                                                               */
/* ------------------------------------------------------------------ */

div#cgit table.stats {
	border: 1px solid var(--line);
	font-size: var(--small);
}

div#cgit table.stats th {
	text-align: left;
	padding: 2px .6em;
	color: var(--heading);
	background: var(--panel);
	border: 1px solid var(--line);
}

div#cgit table.stats td {
	text-align: right;
	padding: 2px .6em;
	border: 1px solid var(--line);
}

div#cgit table.stats td.total { font-weight: 700; text-align: left; color: var(--heading); }
div#cgit table.stats td.sum   { font-weight: 700; color: var(--link); }
div#cgit table.stats td.left  { text-align: left; }

div#cgit table.vgraph {
	border-collapse: separate;
	border: 1px solid var(--line);
	height: 200px;
}

div#cgit table.vgraph th {
	background: var(--panel);
	font-weight: 700;
	border: 1px solid var(--bg);
	padding: 1px .5em;
}

div#cgit table.vgraph td {
	vertical-align: bottom;
	padding: 0 10px;
}

div#cgit table.vgraph div.bar,
div#cgit table.hgraph div.bar {
	background: var(--link);
	opacity: .6;
}

div#cgit table.hgraph {
	border: 1px solid var(--line);
	width: 100%;
}

div#cgit table.hgraph th {
	background: var(--panel);
	font-weight: 700;
	border: 1px solid var(--line);
	padding: 1px .5em;
}

div#cgit table.hgraph td {
	vertical-align: middle;
	padding: 2px;
}

div#cgit table.hgraph div.bar {
	height: 1em;
}

/* ------------------------------------------------------------------ */
/* Pager & footer                                                      */
/* ------------------------------------------------------------------ */

div#cgit ul.pager {
	list-style: none;
	text-align: center;
	margin: 1.5em 0 0;
	padding: 0;
	font-size: var(--small);
}

div#cgit ul.pager li {
	display: inline-block;
	margin: .25em .3em;
}

div#cgit ul.pager a {
	color: var(--heading);
	opacity: .7;
	padding: .2em .5em;
}

div#cgit ul.pager a:hover {
	opacity: 1;
	color: var(--heading);
}

div#cgit ul.pager .current {
	font-weight: 700;
	opacity: 1;
}

div#cgit div.footer {
	margin: 5em 0 2em;
	text-align: center;
	font-size: var(--small);
	color: var(--muted);
	opacity: .8;
}

div#cgit div.footer a {
	color: inherit;
	text-decoration: none;
}

div#cgit div.footer a:hover {
	color: var(--link);
}

/* ------------------------------------------------------------------ */
/* Mobile                                                              */
/* ------------------------------------------------------------------ */

@media screen and (max-width: 768px) {
	div#cgit {
		padding: 0 16px;
	}

	div#cgit table#header {
		margin-top: 1.2em;
	}

	div#cgit table#header td.logo {
		width: 52px;
	}

	div#cgit table#header td.logo img {
		width: 48px;
		height: 48px;
	}

	div#cgit table#header td.main {
		font-size: 1.5em;
		white-space: normal;
	}

	div#cgit table.tabs td.form input.txt {
		width: 7em;
	}

	div#cgit table.tabs td a {
		padding: .2rem .4rem;
		margin-right: 0;
	}

	div#cgit div.cgit-panel {
		float: none;
		margin: .5em 0 1em;
	}

	div#cgit div.commit-subject {
		font-size: 1.3em;
	}

	div#cgit table.diffstat td.graph {
		width: auto;
		min-width: 80px;
	}
}
