:root {
	--bg: #ffffff;
	--surface: #f6f8fa;
	--fg: #1f2328;
	--muted: #59636e;
	--border: #d1d9e0;
	--accent: #0969da;
	--l0: #ebedf0;
	--l1: #9be9a8;
	--l2: #40c463;
	--l3: #30a14e;
	--l4: #216e39;
	--repo1: #0969da;
	--repo2: #bf8700;
	--repo3: #8250df;
	--repo4: #cf222e;
	--repo5: #1a7f37;
	color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0d1117;
		--surface: #151b23;
		--fg: #f0f6fc;
		--muted: #9198a1;
		--border: #3d444d;
		--accent: #4493f8;
		--l0: #212830;
		--l1: #033a16;
		--l2: #196c2e;
		--l3: #2ea043;
		--l4: #56d364;
		--repo1: #4493f8;
		--repo2: #d29922;
		--repo3: #ab7df8;
		--repo4: #f85149;
		--repo5: #3fb950;
	}
}
[hidden] {
	display: none !important;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
main {
	max-width: 1120px;
	margin: 0 auto;
	padding: 28px 20px 48px;
}
h1 {
	font-size: 22px;
	margin: 0 0 4px;
}
h2 {
	font-size: 14px;
	margin: 0 0 12px;
}
.muted {
	color: var(--muted);
	font-weight: normal;
}
.small {
	font-size: 12px;
	margin: 12px 0 0;
}
header {
	margin-bottom: 16px;
}
header p {
	margin: 0;
	font-size: 12px;
}

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	align-items: end;
	margin-bottom: 16px;
}
.filters label {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 11px;
	color: var(--muted);
}
.filters label.check {
	flex-direction: row;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--fg);
	padding-bottom: 6px;
}
select,
input[type="date"],
.button {
	font: inherit;
	color: var(--fg);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 5px 10px;
	height: 32px;
}
.button {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	cursor: pointer;
}
.button:hover {
	background: var(--surface);
}

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}
.card,
.panel {
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 14px 16px;
	background: var(--bg);
}
.card > span {
	display: block;
	font-size: 12px;
}
.card strong {
	font-size: 24px;
}
#t-lines {
	font-size: 18px;
	white-space: nowrap;
}

.activity {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
	gap: 12px;
	margin-bottom: 16px;
}
@media (max-width: 760px) {
	.activity {
		grid-template-columns: 1fr;
	}
}

.heatmap {
	display: grid;
	grid-template-rows: 14px repeat(7, var(--cell, 12px));
	grid-auto-flow: column;
	grid-auto-columns: var(--cell, 12px);
	gap: 3px;
	overflow-x: auto;
	padding-bottom: 4px;
}
.heatmap .m {
	font-size: 10px;
	color: var(--muted);
	white-space: nowrap;
	overflow: visible;
}
.heatmap i,
.legend i {
	display: block;
	width: var(--cell, 12px);
	height: var(--cell, 12px);
	border-radius: 2px;
	background: var(--l0);
}
.heatmap i.out {
	visibility: hidden;
}
.l1 {
	background: var(--l1) !important;
}
.l2 {
	background: var(--l2) !important;
}
.l3 {
	background: var(--l3) !important;
}
.l4 {
	background: var(--l4) !important;
}
.legend {
	display: flex;
	gap: 3px;
	align-items: center;
	justify-content: flex-end;
	font-size: 11px;
	margin-top: 8px;
}
.legend i {
	width: 10px;
	height: 10px;
}

.repo {
	margin-bottom: 12px;
	font-size: 12px;
}
.repo .bar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 3px;
}
.repo .bar span {
	display: block;
	height: 8px;
	border-radius: 4px;
	min-width: 2px;
}
.repo .bar em {
	font-style: normal;
	color: var(--muted);
	font-size: 11px;
}

.table-wrap {
	overflow-x: auto;
}
table {
	width: 100%;
	border-collapse: collapse;
}
th {
	text-align: left;
	font-size: 12px;
	font-weight: 500;
	color: var(--muted);
	padding: 6px 8px;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
}
th.sorted::after {
	content: " ↓";
}
th.sorted.asc::after {
	content: " ↑";
}
td {
	padding: 8px;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}
.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}
tbody tr.person {
	cursor: pointer;
}
tbody tr.person:hover {
	background: var(--surface);
}
.who {
	display: flex;
	align-items: center;
	gap: 10px;
}
.who img,
.who .avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--surface);
	flex: none;
}
.who a {
	color: var(--muted);
	font-size: 12px;
	text-decoration: none;
}
.who a:hover {
	text-decoration: underline;
}
.bot-tag {
	font-size: 10px;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 0 6px;
	color: var(--muted);
}
.add {
	color: #1a7f37;
}
.del {
	color: #cf222e;
}
.spark {
	display: flex;
	gap: 3px;
}
.spark i {
	display: block;
	width: 12px;
	height: 12px;
	border-radius: 2px;
	background: var(--l0);
}
tr.detail td {
	background: var(--surface);
	padding: 12px;
}
tr.detail img {
	max-width: 100%;
}

dialog {
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--bg);
	color: var(--fg);
	max-width: 720px;
	width: calc(100% - 32px);
}
dialog label {
	display: block;
	font-size: 12px;
	color: var(--muted);
	margin: 10px 0;
}
dialog input {
	display: block;
	width: 100%;
	font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
	color: var(--fg);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 6px 8px;
	margin-top: 4px;
}
dialog img {
	display: block;
	max-width: 100%;
	margin: 12px 0;
}
code {
	font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
}
