html,
body {
	height: 100%;
}

body {
	font-family: sans-serif;
	margin: 0;
	background-color: #ffffff;
	color: #000000;
	/*display: flex;
	flex-direction: column;*/
}

.cards {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 1rem;
}

.cards > article {
	border: 1px solid #ddd;
}

.cards > article > .header > .title {
	--card-title-pad-left: 0.5rem;
	padding: 0.25rem 0.5rem;
}

.cards > article > table {
	padding: 0;
}

a {
	color: #0000cc;
}

a:hover, a:visited, a:active {
	color: #880000;
}

span.cntrl {
	border: dashed #aaaaaa;
	border-width: 1px;
	padding: 0px 2px 0px 2px;
	margin:  0px 2px 0px 2px;
}

img.logo {
	float: right;
	border-width: 0px;
}

img.avatar {
	vertical-align: middle;
}

img.blob {
	max-height: 100%;
	max-width: 100%;
}

a.list img.avatar {
	border-style: none;
}

.page_header {
	/* Subtracting the border-top, because otherwise the underlines on/below links start to unbalance it. */
	padding: 0.75rem 1rem 1rem;
	font-size: 150%;
	border-top: 0.25rem solid #f71;
	background-color: #f716;
}

.page_header a {
	font-weight: bold;
}

.page_header a:visited, a.header {
	color: #0000cc;
}

.page_header a:hover {
	color: #880000;
}

/* .page_header + nav.page_subhead now wraps .page_nav and the search form, which is reduced from <form><div class=search> to <form role=search>; and both it and .page_nav are optional; and page_nav comes first rather than last. */
.page_subhead {
	display: flex;
	background: #eee;
	margin-bottom: 1em;
}

div.page_nav {
	padding: 0.5rem 1em;
}

div.page_nav a:visited {
	color: #0000cc;
}

.page_nav .current {
	font-weight: bold;
}

div.page_path {
	padding: 0.5rem 1rem;
	font-weight: bold;
	border: solid #ddd;
	border-width: 0px 0px 1px;
}

.page_footer {
	margin-top: auto;
	margin-top: 2rem;
	display: flex;
	padding: 0.5rem 1rem;
	background-color: #ddd;
	justify-content: flex-end;
}

div.page_footer_text {
	margin-right: auto;
	float: left;
	color: #555555;
	font-style: italic;
}

div#generating_info {
	margin: 0.5rem 1rem;
	font-size: smaller;
	text-align: center;
	color: #505050;
}

div.page_body {
	padding: 0.5rem 1rem;
	font-family: monospace;
}

div.title, a.title {
	display: block;
	padding: 0.5rem 1rem;
	font-weight: bold;
	background-color: #ddd;
	text-decoration: none;
	color: #000000;
}

div.readme {
	padding: 8px;
}

a.title:hover {
	background-color: #ccc;
}

div.title_text {
	padding: 0;
	border: solid #ccc;
	border-width: 0px 0px 1px;
}

:root {
	/* FIXME: not good, too tied to the font, restructure */
	--log-sidebar-width: 10rem;
}

div.log_body {
	padding: 8px 8px 8px var(--log-sidebar-width);
}

time {
	font-style: italic;
}

time.age {
	float: left;
	/* From .cards > article > .header > .title padding-left; eww, TODO tidy all this up */
	width: calc(var(--log-sidebar-width) - var(--card-title-pad-left));
}

span.signoff {
	color: #888888;
}

div.log_link {
	padding: 0 0.5rem;
	font-size: 80%;
	font-family: sans-serif;
	font-style: normal;
	position: relative;
	float: left;
	width: calc(var(--log-sidebar-width) - 0.5rem - 0.5rem);
}

div.list_head {
	padding: 6px 8px 4px;
	border: solid #ddd;
	border-width: 1px 0px 0px;
	font-style: italic;
}

.author_date, .author {
	font-style: italic;
}

div.author_date {
	padding: 8px;
	border: solid #ddd;
	border-width: 0px 0px 1px 0px;
}

a.list {
	text-decoration: none;
	color: #000000;
}

a.subject, a.name {
	font-weight: bold;
}

table.tags a.subject {
	font-weight: normal;
}

a.list:hover {
	text-decoration: underline;
	color: #880000;
}

a.text {
	text-decoration: none;
	color: #0000cc;
}

a.text:visited {
	text-decoration: none;
	color: #880000;
}

a.text:hover {
	text-decoration: underline;
	color: #880000;
}

table {
	padding: 0.5rem 1rem;
	border-spacing: 0;
}
table.tree {
	padding: 0;
}

table.diff_tree {
	font-family: monospace,m;
}

table.combined.diff_tree th {
	text-align: center;
}

table.combined.diff_tree td {
	padding-right: 24px;
}

table.combined.diff_tree th.link,
table.combined.diff_tree td.link {
	padding: 0px 2px;
}

table.combined.diff_tree td.nochange a {
	color: #6666ff;
}

table.combined.diff_tree td.nochange a:hover,
table.combined.diff_tree td.nochange a:visited {
	color: #d06666;
}

table.blame {
	border-collapse: collapse;
}

table.blame td {
	padding: 0px 5px;
	vertical-align: top;
}

th,
table.project_list th:first-child {
	padding: 0.25rem 0.5rem;
	text-align: left;
}

th:first-child {
	padding-left: 0;
}

/* do not change row style on hover for 'blame' view */
tr.light {
	background-color: #ffffff;
}

tr.dark {
	background-color: #f6f6f6;
}

/* boundary commits in 'blame' view */
/* and commits without "previous" */
tr.boundary td.sha1,
tr.no-previous td.linenr {
	font-weight: bold;
}

/* for 'blame_incremental', during processing */
tr.color1 { background-color: #f6fff6; }
tr.color2 { background-color: #f6f6ff; }
tr.color3 { background-color: #fff6f6; }

td {
	padding: 0.25rem 0.5rem;
}

td.link, td.selflink {
	padding: 2px 5px;
	font-family: sans-serif;
	font-size: 80%;
}

td.selflink {
	padding-right: 0px;
}

td.sha1 {
	font-family: monospace,m;
}

.error {
	color: red;
	background-color: yellow;
}

td.current_head {
	text-decoration: underline;
}

td.category {
	background-color: #ddd;
	border-top: 0.5rem solid #fff;
	box-shadow: inset 0 1px #bbb;
	font-weight: bold;
}

table.project_list tr:nth-child(2) > td.category {
	border-top-width: 0.25rem;
}

table.diff_tree span.file_status.new {
	color: #008000;
}

table.diff_tree span.file_status.deleted {
	color: #c00000;
}

table.diff_tree span.file_status.moved,
table.diff_tree span.file_status.mode_chnge {
	color: #777777;
}

table.diff_tree span.file_status.copied {
  color: #70a070;
}

/* noage: "No commits" */
table.project_list td.noage {
	color: #808080;
	font-style: italic;
}

/* age2: 60*60*24*2 <= age */
table.project_list td.age2, table.blame td.age2 {
	font-style: italic;
}

/* age1: 60*60*2 <= age < 60*60*24*2 */
table.project_list td.age1 {
	color: #009900;
	font-style: italic;
}

table.blame td.age1 {
	color: #009900;
	background: transparent;
}

/* age0: age < 60*60*2 */
table.project_list td.age0 {
	color: #009900;
	font-style: italic;
	font-weight: bold;
}

table.blame td.age0 {
	color: #009900;
	background: transparent;
	font-weight: bold;
}

td.pre, div.pre, div.diff {
	font-family: monospace,m;
	white-space: pre;
}

td.mode {
	font-family: monospace,m;
}

/* progress of blame_interactive */
div#progress_bar {
	height: 2px;
	margin-bottom: -2px;
	background-color: #ddd;
}
div#progress_info {
	float: right;
	text-align: right;
}

/* format of (optional) objects size in 'tree' view */
td.size {
	font-family: monospace,m;
	text-align: right;
}

/* styling of diffs (patchsets): commitdiff and blobdiff views */
div.diff.header,
div.diff.extended_header {
	white-space: normal;
}

div.diff.header {
	font-weight: bold;
	background-color: #eee;
	box-shadow: inset 0 1px #0003;
}

div.diff.header a.path {
	text-decoration: underline;
}

div.diff.extended_header,
div.diff.extended_header a.path,
div.diff.extended_header a.hash {
	color: #333;
}

div.diff.extended_header .info {
	opacity: 0.5;
}

div.diff.extended_header,
div.diff.from_file,
div.diff.to_file {
	background-color: #eee;
}

div.diff a.list,
div.diff a.path,
div.diff a.hash {
	text-decoration: none;
}

div.diff a.list:hover,
div.diff a.path:hover,
div.diff a.hash:hover {
	text-decoration: underline;
}

div.diff.to_file a.path,
div.diff.to_file {
	color: #060;
}

div.diff.add {
	background-color: #dfd;
}

div.diff.add mark {
	background-color: #afa;
}

div.diff.from_file a.path,
div.diff.from_file {
	color: #900;
}

div.diff.rem {
	background-color: #fdd;
}

div.diff.rem mark {
	background-color: #faa;
}

div.diff.chunk_header a,
div.diff.chunk_header {
	color: #990099;
}

div.diff.chunk_header {
}

div.diff.chunk_header span.chunk_info {
	background-color: #ffeeff;
}

div.diff.chunk_header span.section {
	color: #aa22aa;
	font-style: italic;
}

div.diff.incomplete {
	color: #cccccc;
}

div.diff.nodifferences {
	font-weight: bold;
	color: #600000;
}

/* side-by-side diff */
div.chunk_block {
	overflow: hidden;
}

div.chunk_block div.old {
	float: left;
	width: 50%;
	overflow: hidden;
}

div.chunk_block div.new {
	margin-left: 50%;
	width: 50%;
}

div.chunk_block.rem div.old div.diff.rem {
	background-color: #fff5f5;
}
div.chunk_block.add div.new div.diff.add {
	background-color: #f8fff8;
}
div.chunk_block.chg div     div.diff {
	background-color: #fffff0;
}
div.chunk_block.ctx div     div.diff.ctx {
	color: #404040;
}


div.index_include {
	border: solid #d9d8d1;
	border-width: 0px 0px 1px;
	padding: 12px 8px;
}

.page_subhead [role=search] {
	margin: 0.5rem 1rem 0.5rem auto;
}

div.projsearch {
	text-align: center;
	margin: 20px 0px;
}

div.projsearch form {
	margin-bottom: 2px;
}

td.linenr {
	text-align: right;
}

a.linenr {
	color: #999999;
	text-decoration: none;
	user-select: none;
}

a.feed_logo {
	padding: 3px 5px;
	border: 1px solid;
	border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e;
	color: #ffffff;
	background-color: #ff6600;
	font-weight: bold;
	font-family: sans-serif;
	font-size: 80%;
	text-align: center;
	text-decoration: none;
}

a.feed_logo:hover {
	background-color: #ee5500;
}

a.feed_logo.generic {
	background-color: #ff8800;
}

a.feed_logo.generic:hover {
	background-color: #ee7700;
}

span.refs span {
	padding: 0px 4px;
	font-size: 80%;
	font-weight: normal;
	border: 1px solid;
	background-color: #ffaaff;
	border-color: #ffccff #ff00ee #ff00ee #ffccff;
}

span.refs span a {
	text-decoration: none;
	color: inherit;
}

span.refs span a:hover {
	text-decoration: underline;
}

span.refs span.indirect {
	font-style: italic;
}

span.refs span.ref {
	background-color: #aaaaff;
	border-color: #ccccff #0033cc #0033cc #ccccff;
}

span.refs span.tag {
	background-color: #ffffaa;
	border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
}

span.refs span.head {
	background-color: #aaffaa;
	border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
}

div.binary {
	font-style: italic;
}

div.remote {
	margin: .5em;
	border: 1px solid #ddd;
	display: inline-block;
}

/* JavaScript-based timezone manipulation */

.popup { /* timezone selection UI */
	position: absolute;
	/* "top: 0; right: 0;" would be better, if not for bugs in browsers */
	top: 0; left: 0;
	border: 1px solid;
	padding: 2px;
	background-color: #f0f0f0;
	font-style: normal;
	color: #000000;
	cursor: auto;
}

.close-button { /* close timezone selection UI without selecting */
	/* float doesn't work within absolutely positioned container,
	 * if width of container is not set explicitly */
	/* float: right; */
	position: absolute;
	top: 0px; right: 0px;
	border: none;
	font-weight: bold;
	background-color: transparent;
	cursor: pointer;
}


/* Unknown ones included because something like them was in upstream gitweb: str, dstr, dir, sym. */
.num             { color: #00c; }
.esc             { color: #c00; font-weight: bold; font-style: italic; }
.str, .dstr, .sng, .pps { color: #c00; }
.slc, .com       { color: #090; font-style: italic; }
.ppc, .pps { font-style: italic; }
/*.dir             { color: #008200; }*/
/*.sym             { color: #000000; }*/
/*.line            { color: #555555; }*/
.kwa, .kwb, .kwc { color: #000; font-weight: bold; }
/* Problems with the current syntax highligher: (a) macros and functions are highlighted the same (kwd); (b) attributes highlight the rest of the line, not just inside the #[…]. */
