/* KGames stylesheet for the stagit-generated code browser.
   Based on stagit's default style.css, recoloured to the site palette:
   #E63946 red · #1D7CF2 blue · #FFD23F yellow · #2EC4B6 teal */

/* @import must come before any rule. stagit's header has no <link> of its own,
   so the site font is pulled in from here. */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&display=swap');

body {
	color: #2b2b2b;
	background-color: #FFF5F5;
	font-family: 'Fredoka', system-ui, sans-serif;
	margin: 1.2em;
}

pre, td.num, #blob, .code, pre a {
	font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

a {
	color: #1D7CF2;
}

a:hover {
	color: #E63946;
}

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

h1 {
	font-size: 1.4em;
	font-weight: 600;
}

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

img {
	border: 0;
}

a:target {
	background-color: #FFD23F;
}

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

#blob a {
	color: #9a9a9a;
}

#blob a:hover {
	color: #1D7CF2;
	text-decoration: none;
}

table thead td {
	font-weight: 600;
}

table td {
	padding: 0.1em 0.5em;
}

#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: #FFE8E8;
}

#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: #6b6b6b;
}

hr {
	border: 0;
	border-top: 2px solid #2EC4B6;
	height: 2px;
}

pre a.h {
	color: #1D7CF2;
}

.A,
span.i,
pre a.i {
	color: #17836f;
}

.D,
span.d,
pre a.d {
	color: #E63946;
}

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

@media (prefers-color-scheme: dark) {
	body {
		background-color: #141418;
		color: #d8d8d8;
	}
	hr {
		border-color: #2EC4B6;
	}
	a {
		color: #5FA8FF;
	}
	a:hover {
		color: #FF6B76;
	}
	a:target {
		background-color: #5c4a00;
	}
	.desc {
		color: #a0a0a0;
	}
	#blob a {
		color: #5a5a5a;
	}
	#blob a:target {
		color: #eee;
	}
	#blob a:hover {
		color: #5FA8FF;
	}
	pre a.h {
		color: #2EC4B6;
	}
	.A,
	span.i,
	pre a.i {
		color: #4fd6a0;
	}
	.D,
	span.d,
	pre a.d {
		color: #FF6B76;
	}
	#branches tr:hover td,
	#tags tr:hover td,
	#index tr:hover td,
	#log tr:hover td,
	#files tr:hover td {
		background-color: #22222a;
	}
}

/* --- rendered README landing page (index.html) ------------------------- */

#readme {
	max-width: 44em;
	line-height: 1.6;
}

/* stagit's #content rules assume monospace tables; undo them for prose. */
#readme table td,
#readme table th {
	white-space: normal;
	vertical-align: top;
	border-bottom: 1px solid rgba(46, 196, 182, 0.35);
}

#readme h1 { font-size: 1.8em; font-weight: 600; margin: 0.8em 0 0.3em; }
#readme h2 { font-size: 1.3em; font-weight: 600; margin: 1.4em 0 0.3em; color: #1D7CF2; }
#readme h3 { font-size: 1.1em; font-weight: 600; margin: 1.1em 0 0.2em; }

#readme p, #readme li { margin: 0.4em 0; }
#readme ul, #readme ol { padding-left: 1.4em; }

#readme code {
	background: rgba(46, 196, 182, 0.14);
	border-radius: 4px;
	padding: 0.1em 0.35em;
	font-size: 0.92em;
}

#readme pre {
	background: rgba(46, 196, 182, 0.10);
	border-left: 3px solid #2EC4B6;
	border-radius: 6px;
	padding: 0.7em 0.9em;
	overflow-x: auto;
}

#readme pre code {
	background: none;
	padding: 0;
}

#readme blockquote {
	margin: 0.6em 0;
	padding-left: 0.9em;
	border-left: 3px solid #FFD23F;
	color: #6b6b6b;
}

#readme img { max-width: 100%; }

#browse {
	font-weight: 600;
	margin: 0.8em 0;
}

@media (prefers-color-scheme: dark) {
	#readme h2 { color: #5FA8FF; }
	#readme blockquote { color: #a0a0a0; }
	#readme code, #readme pre { background: rgba(46, 196, 182, 0.13); }
}
