@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300&family=Roboto:wght@300&display=swap');

/* Light mode colors */
:root {
	--color-text: #000;
	--color-background: #ededed;
	--color-border: #d6d6d6;
	--color-highlight: #efefef;
	--color-link: #000;
	--color-link-hover: #1364d8;
	--color-parent-hover: #aaa;
	--color-box-command-unstable: crimson;
	--color-box-command-prerelease: #a95608;
	--color-top-line-unstable: #cf0e0e;
	--color-top-line-prerelease: #ffb800;
	--color-top-outline-invert-unstable: #00f2e6;
	--color-top-outline-invert-prerelease: #0072f2;
	--color-comment: #777;
	--select-bg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23141414'><polygon points='0,0 100,0 50,50'/></svg>");
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
	:root {
		--color-text: #f2f2f2;
		--color-background: #1d1e20;
		--color-border: #3f3f3f;
		--color-highlight: #333;
		--color-link-hover: #4488e9;
		--color-parent-hover: #bbb;
		--color-box-command-unstable: #ff5978;
		--color-box-command-prerelease: #ff9b59;
		--color-top-line-unstable: #d00c3e;
		--color-top-line-prerelease: #e88700;
		--color-comment: #999;
	}

	.github-link {
		filter: invert(1);
	}
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	min-height: 100%;
	color: var(--color-text);
	background: var(--color-background);
	font-weight: 300;
	font-size: 1em;
	font-family: Roboto;
	line-height: 2.111em;
}

body {
	display: grid;
	padding: 20px;
}

.top-line {
	border-top: 3px solid var(--color-top-line-unstable);
    margin-left: -20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.top-line:has(+.wrapper>.slog.rc) {
	border-top-color: var(--color-top-line-prerelease);
}

a {
	color: var(--color-link);
	text-decoration: none;
}

.wrapper {
	display: grid;
	place-self: center;
	place-items: center;
	min-height: 100vh;
	padding: 20px;
	width: 100%;
	max-width: 768px;
	max-width: clamp(768px, 70%, 920px);
	margin: 0;
	box-sizing: border-box;
	text-align: center;
	align-content: start;
}

.table-wrapper {
	min-width: 75%;
}

@media (max-width: 768px) {
	.wrapper {
		max-width: 100%;
		padding: 10px;
	}

	.table-wrapper {
		width: 100%;
		overflow-x: auto;
		margin: 0 auto;
		box-sizing: border-box;

	}

	table {
		width: 100%;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		overflow-x: auto;
		table-layout: auto;
		border-collapse: collapse;
	}

	table::-webkit-scrollbar {
		height: 8px;
	}

	table::-webkit-scrollbar-track {
		background: var(--color-background);
	}

	table::-webkit-scrollbar-thumb {
		background: var(--color-border);
		border-radius: 4px;
	}
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1em;
	margin-top: 2.333em;
}

tr {
	outline: 0;
	border: 0;
}

tr.parent a[href^="/"]:hover {
	color: var(--color-parent-hover);
}

tr a:hover {
	color: var(--color-link-hover);
}

th {
	text-align: left;
	font-size: 1.033em;
	padding-right: 20px;
	font-weight: 100;
	letter-spacing: .4px;
	padding-bottom: 5px;
	text-wrap-mode: nowrap;
	height: 40px;
}

th a {
	color: var(--color-text);

}

th[data-sort="desc"]::after,
th[data-sort="asc"]::after {
	content: "▲";
	font-size: 0.6em;
	color: #666;
	margin-left: 8px;
	position: absolute;
    margin-top: 0.5px;
}

th[data-sort="desc"]::after {
	content: "▼";
	margin-top: 1.5px;
}

th:has(a:hover)::after {
    color: var(--color-link-hover);
	filter: grayscale(0.25);
}

th.indexcollastmod {
	min-width: 140px;
}

th.indexcolname,
th.indexcolsize {
	min-width: 70px;
}

td.indexcolname {
	padding-right: 20px;
}

td:nth-child(3) {
	font-size: 88%;
}

td:nth-child(4) {
	font-size: 82%;
}

tr td:first-of-type {
	padding-left: 10px;
}

td {
	padding: 5px 0;
	outline: 0;
	border: 0;
	border-bottom: 1px solid var(--color-border);
	vertical-align: middle;
	text-align: left;
	transition: background 300ms ease;
	white-space: nowrap;
	padding-right: 6px;
}

td a {
	display: block;
	font-weight: 300;
	color: var(--color-text);
	font-size: 93%;
}

.parent a[href^="/"]:hover {
	color: var(--color-parent-hover);
}

img {
	border: none;
}

.active {
	background: var(--color-highlight);
}

.footer {
	display: none;
	text-align: center;
	font-size: .75em;
}

.indexcolicon {
	width: 40px;
}

.logo {
	width: 100px;
	height: 100px;
	filter: contrast(1.25) saturate(1.25);
	margin-top: -5px;
	margin-bottom: 25px;
	outline: none;
}

a:has(.logo) {
	position: relative;
    z-index: 2;
	outline: none;
}

a:has(.logo):has(+.release-select:focus-within) {
    z-index: 1;
}

.release-select {
    font-size: 13px;
    background-image: var(--select-bg);
    background-size: 13px;
    background-position: calc(100% - 10px) calc(100% - 3px);
    background-repeat: no-repeat;
    background-color: transparent;
    border-radius: 4px;
    padding: 0.55em 1.699em 0.5em 0.699em;
    display: inline-block;
    text-align-last: center;
    text-align: center;
    border: none;
    line-height: 1;
    vertical-align: middle;
    color: transparent;
    margin-top: -84px;
    margin-left: 24px;
    width: 140px;
    cursor: context-menu;
    z-index: 1;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.release-select:focus-within {
	box-shadow: inset 0 0 0 2px var(--color-top-line-unstable);
	outline: none;
}

body:has(.slog.rc) .release-select:focus-within {
	box-shadow: inset 0 0 0 2px var(--color-top-line-prerelease)
}

@media (prefers-color-scheme: dark) {
	.release-select {
		filter: invert(1);
	}

	.release-select:focus-within {
		box-shadow: inset 0 0 0 2px var(--color-top-outline-invert-unstable);
		outline: none;
	}
	
	body:has(.slog.rc) .release-select:focus-within {
		box-shadow: inset 0 0 0 2px var(--color-top-outline-invert-prerelease);
	}	
}

.github-link {
	margin-top: 2em;
	display: block;
}

.github {
	width: 32px;
	height: 32px;
}

.slog {
	font-weight: 300;
	font-size: 125%;
	font-family: 'Roboto Condensed';
	margin-top: 0.333em;
}

details.repos {
	margin-top: 2.666em
}

details.repos summary>span {
	padding-left: 4px;
}

details.repos>summary {
	cursor: pointer;
}

details.repos>div {
	text-align: left;
	white-space: nowrap;
	text-align: left;
	font-family: monospace;
	font-size: 90%;
	border: 1px solid var(--color-border);
	overflow: auto;
	line-height: 1.222em;
	padding: 4px 6px;
}

@media (max-width: 768px) {
	details.repos>div {
		text-wrap: auto;
	}
}

.comment {
	color: var(--color-comment)
}

.command {
	color: var(--color-box-command-unstable)
}

body:has(.slog.rc) .command {
	color: var(--color-box-command-prerelease)
}
