/*
 * Copyright (c) 2019 Jerome Kasper <neon.king.fr@gmail.com>
 * Copyright (c) 2019, 2020 Tracey Emery <tracey@traceyemery.net>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

*, *::after, *::before {
	box-sizing: border-box;
}

a {
	color: #444444;
	text-decoration: none;
}
a:hover {
	color: Gold;
	text-decoration: none;
}
body {
	background-color: #ffffff;
	color: #000000;
	margin: 0;
	padding: 0;
	font-family: sans-serif;
	font-size: 16px;
}

pre {
	font-family: monospace;
	margin: 0;
}

.diff_minus, .diff_submodule {
	color: magenta;
}
.diff_plus, .diff_symlink, .diff_author {
	color: darkcyan;
}
.diff_chunk_header, .diff_date {
	background-color: LightSlateGray;
	color: yellow;
}
.diff_meta, .diff_executable, .diff_commit {
	color: green;
}
.diff_directory {
	color: blue;
}

.refs_str {
	background-color: #243647;
	color: #ffffff;
	font-style: italic;
	white-space: pre;
}
hr {
	margin: 0;
	height: 0;
	border: 0px;
	border-top: 1px dotted #444444;
}
#header {
	background-image: linear-gradient(to right, White, LightSlateGray);
}
#header a {
	color: #ffffff;
	text-decoration: none;
}
#header a:hover {
	color: Gold;
	text-decoration: none;
}
#site_path {
	overflow: auto;
	width: 100%;
	background-color: #243647;
}
#site_link {
	padding-left: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	color: #ffffff;
	overflow: hidden;
}
#site_link a {
	color: #ffffff;
	text-decoration: none;
}
#got_link {
	padding-bottom: 10px;
	padding-top: 10px;
}
#login_status {
	color: lightgrey;
	text-align: right;
	padding-right: 10px;
	padding-left: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	font-weight: monospace;
}
#np_wrapper {
	width: 100%;
	border-bottom: 1px dotted #444444;
	background-color: #f5fcfb;
	overflow: hidden;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}
#nav_more, #nav_prev, #nav_next {
	padding: 5px 10px;
}
#nav_more {
	text-align: center;
	flex-grow: 2;
}
.navs_wrapper {
	width: 100%;
	background-color: #ced7e0;
}
.navs {
	padding-left: 10px;
	padding-top: 2px;
	padding-bottom: 2px;
}
@media (min-width: 680px) {
	.navs {
		font-size: .8em;
	}
}
#site_owner_wrapper {
	width: 100%;
	background-color: LightSlateGray;
	color: #ffffff;
}
#site_owner {
	padding-left: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	margin: 0;
}

#err_content {
	padding-left: 20px;
	padding-top: 20px;
	padding-bottom: 20px;
}

header.subtitle {
	background-color: LightSlateGray;
}
header.subtitle h2 {
	margin: 0;
	padding: 5px 10px;
	font-size: 1rem;
	font-weight: normal;
	color: #ffffff;
}

.brief {
	display: flex;
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
}
.brief p {
	margin: 0;
}
.brief_meta {
	flex-grow: 0;
	flex-shrink: 0;
}
.briefs_age, .briefs_author, .briefs_id {
	display: inline-block;
	vertical-align: middle;
}
.briefs_age {
	padding-left: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	width: 140px;
}
.briefs_author {
	padding-top: 5px;
	padding-bottom: 5px;
	width: 8.5em;
	font-style: italic;
}
.briefs_id {
	padding-top: 5px;
	padding-bottom: 5px;
	width: 8.5em;
	font-family: monospace;
	font-size: 14px;
}
.briefs_log {
	padding-left: 10px;
	padding-right: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	width: 100%;
}

@media (min-width: 680px) {
	.brief {
		flex-wrap: nowrap;
	}
	.briefs_log {
		width: auto;
	}
}

.briefs_log summary {
	cursor: pointer;
}

.briefs_toggle {
	display: inline-block;
	padding: 3px 4px;
	padding: 0px 4px;
	border: 1px solid #222;
	border-radius: 3px;
	user-select: none;
}

/* work around .commits being unusable here */
.briefs_log > p {
	white-space: pre-wrap;
}

.tag_age, .tag_name, .tag_log {
	display: inline-block;
	vertical-align: middle;
}
.tag_age {
	padding-left: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	width: 140px;
}
.tag_name {
	width: 8.5em;
	font-style: italic;
	padding-top: 5px;
	padding-bottom: 5px;
}
.tag_log {
	padding-left: 10px;
	padding-right: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	width: 65%;
}

#tag_commit {
	padding-top: 20px;
	padding-left: 20px;
	padding-bottom: 20px;
	overflow: auto;
}

#index_header {
	background-color: Khaki;
}
.index_project, .index_project_description, .index_project_owner,
.index_project_age {
	display: inline-block;
	padding: 10px;
	overflow: hidden;
	vertical-align: middle;
}
.index_wrapper .index_project {
	font-weight: bold;
	text-decoration: underline;
}
.index_project {
	width: 20%;
}
.index_project_description {
	width: 30%;
}
.index_project_owner {
	width: 25%;
}
.index_project_age {
	width: 25%;
	opacity: 0.7;
}
.index_project a {
	color: #444444;
	text-decoration: none;
}
.index_project a:hover {
	color: SteelBlue;
	text-decoration: none;
}
#index_next a {
	color: #444444;
	text-decoration: none;
}
#index_next a:hover {
	color: SteelBlue;
	text-decoration: none;
}
#index_prev a {
	color: #444444;
	text-decoration: none;
}
#index_prev a:hover {
	color: SteelBlue;
	text-decoration: none;
}

.page_header_wrapper {
	background-color: #f5fcfb;
	padding-left: 10px;
	padding-top: 5px;
	padding-bottom: 2px;
}

.commits_content {
	width: 100%;
}
.commit {
	padding-left: 20px;
	padding-bottom: 20px;
	white-space: pre-wrap;
}

#blame, #blob {
	margin-top: 20px;
	margin-left: 20px;
	margin-bottom: 20px;
	overflow: auto;
}
.blob_line > a {
	display: inline-block;
	text-align: right;
	width: 60px;
	padding-right: 20px;
	user-select: none;
}
.blame_code, .blob_code {
	/* fixes the width of the first tab */
	display: inline-block;
}
.blame_line:target, .blob_line:target {
	background-color: Khaki;
}
.blame_number, .blob_number {
	width: 6em;
	overflow: hidden;
}
.blame_hash {
	width: 6em;
	overflow: auto;
}
.blame_date {
	width: 7em;
	overflow: auto;
}
.blame_author {
	width: 6em;
	overflow: hidden;
}

#tree {
	margin-left: 20px;
	margin-top: 20px;
	margin-bottom: 20px;
	border-collapse: collapse;
}
.tree_wrapper:nth-child(odd) {
	background-color: #d8f3ef;
}
.tree_line {
	font-family: monospace;
	width: 20em;
	padding: 5px;
}
.tree_line_blank {
	padding: 1px;
	width: 9.5em;
}
#tree_content h2 {
	margin-top: 40px;
	padding: 0 20px 0;
}
#tree_content pre {
	padding: 0 20px 20px;
	white-space: pre-wrap;
}

#diff {
	margin-top: 20px;
	margin-left: 20px;
	margin-bottom: 20px;
	overflow: auto;
}

#summary_wrapper {
	background-color: Khaki;
}

dl {
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
}
dt {
	padding: 3px 7px;
	width: 120px;
}
dd {
	padding: 3px 7px;
	margin-left: auto;
	width: calc(100% - 130px);
	flex-grow: 2;
}

.clone-url {
	white-space: pre-wrap;
	overflow-wrap: break-word;
}

.commit-msg {
	white-space: pre-wrap;
}

.commit-id {
	width: 100%;
	display: inline-block;
	overflow: hidden;
	text-overflow: ellipsis;
}

.branches_age, .branches_space, .branch {
	display: inline-block;
	vertical-align: middle;
}
.branches_age {
	padding-left: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	width: calc(140px + 8.5em);
}
.branch {
	padding-right: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	padding-left: 10px;
}

/* mobile (<=680px) */
@media(max-width:680px) {
	#index_header {
		display: none;
	}
	.index_wrapper {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
	}
	.index_wrapper .index_project,
	.index_wrapper .index_project_description {
		padding-bottom: 0;
		width: 100%;
	}
	.index_wrapper .index_project_owner,
	.index_wrapper .index_project_age {
		width: 50%;
	}
	.index_wrapper .index_project_age {
		text-align: right;
	}

	#summary_wrapper {
		padding: 4px 0;
	}
	#summary_wrapper dt,
	#summary_wrapper dd {
		width: 100%;
	}
	#summary_wrapper dt {
		font-weight: bold;
		padding-bottom: 0;
	}
	#summary_wrapper dd {
		padding-bottom: 8px;
	}
}

/*
 * ---------------------------------------------------------------------------
 * Tema de nezzontli.xyz (Gruvbox oscuro, fork de Duckquill) para gotwebd.
 * Todo lo de arriba es el gotweb.css original de got 0.123 (maquetación de
 * cada vista); a partir de aquí solo hay colores, tipografía y tarjetas.
 * ---------------------------------------------------------------------------
 */

:root {
	color-scheme: dark;
	--bg-color: #282828;
	--fg-color: #ebdbb2;
	--fg-muted: rgb(235 219 178 / 0.6);
	--fg-faint: rgb(235 219 178 / 0.1);
	--surface: #3c3836;
	--accent: #b8bb26;
	--accent-bg: rgb(184 187 38 / 0.1);
	--blue: #83a598;
	--red: #fb4934;
	--yellow: #fabd2f;
	--orange: #fe8019;
	--radius: 0.75rem;
	--radius-small: 0.5rem;
	--shadow: 0 0.25rem 1rem rgb(0 0 0 / 0.25);
	--edge: inset 0 0 0 0.0625rem rgb(255 255 255 / 0.05);
	--font-sans: system-ui, sans-serif;
	--font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
	--font-antique: Superclarendon, "Bookman Old Style", "URW Bookman", "URW Bookman L", "Georgia Pro", Georgia, serif;
}

body {
	background-color: var(--bg-color);
	color: var(--fg-color);
	font-family: var(--font-sans);
	line-height: 1.5;
	max-width: 60rem;
	margin: 0 auto;
	padding: 1rem 1rem 3rem;
}

a, .index_project a, #index_next a, #index_prev a {
	color: var(--accent);
	text-decoration: none;
}
a:hover, .index_project a:hover, #index_next a:hover, #index_prev a:hover {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

pre, code, .briefs_id, .tree_line, .commit-id, .clone-url {
	font-family: var(--font-mono);
	font-size: 0.875rem;
}

/* gotwebd pone <hr> al final de cada bloque; aquí ya se separan con bordes */
hr {
	display: none;
}

/* Cabecera: la "píldora" de navegación de la web */
#header {
	background: none;
	display: flex;
	justify-content: center;
}
#got_link {
	padding: 0;
}
#got_link a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1.5rem;
	border-radius: 999px;
	background-color: var(--surface);
	box-shadow: var(--edge), var(--shadow);
	color: var(--fg-muted);
	font-weight: bold;
}
#got_link a:hover {
	color: var(--accent);
	text-decoration: none;
}
/* El logo de got (got.png, con transparencia) como máscara: toma el color del tema */
#got_link img {
	display: none;
}
#got_link a::after {
	content: "";
	display: block;
	width: 10rem;
	height: 3rem;
	background-color: var(--fg-color);
	-webkit-mask: url("/got.png") center / contain no-repeat;
	mask: url("/got.png") center / contain no-repeat;
}
#got_link a:hover::after {
	background-color: var(--accent);
}

/* Texto de presentación antes del título, solo en la portada (índice) */
body:has(main.action-index) #site_path::before {
	content: "My personal projects, mirrored from my own Forgejo and served with Game of Trees (got). Browse the code here, or clone any repository over HTTPS.";
	display: block;
	margin-bottom: 1rem;
	color: var(--fg-muted);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.5;
}

/* Ruta (Repositorios / repo / vista): como el título de las páginas */
#site_path {
	background: none;
	overflow: visible;
	margin: 3rem 0 1.5rem;
}
#site_link {
	padding: 0;
	color: var(--fg-muted);
	font-family: var(--font-antique);
	font-size: 2rem;
	letter-spacing: -0.03em;
	line-height: 1.2;
}
#site_link a {
	color: var(--fg-color);
}
#site_link a:hover {
	color: var(--accent);
	text-decoration: none;
}

/* Índice: cada repo como las tarjetas de la lista del blog */
#index_header {
	display: none;
}
.index_wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 1rem;
	margin-bottom: 1rem;
	padding: 1rem 1rem 0.75rem;
	border-radius: var(--radius);
	background-color: var(--accent-bg);
	box-shadow: var(--edge), var(--shadow);
}
.index_wrapper .index_project,
.index_wrapper .index_project_description,
.index_wrapper .index_project_age {
	padding: 0;
	width: auto;
	text-decoration: none;
}
.index_wrapper .index_project {
	flex: 1 1 auto;
	font-size: 1.25rem;
}
.index_wrapper .index_project_age {
	flex: 0 0 auto;
	opacity: 1;
	color: var(--fg-muted);
	font-size: 0.875rem;
}
.index_wrapper .index_project_description {
	order: 3;
	flex: 1 1 100%;
}
.index_wrapper .navs_wrapper {
	order: 4;
	flex: 1 1 100%;
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 0.0625rem solid var(--fg-faint);
	background: none;
}

/* Enlaces summary | briefs | commits… como las etiquetas de la web */
.navs_wrapper {
	background: none;
}
.navs {
	padding: 0;
	color: transparent;
	font-size: 0.875rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}
.navs a {
	display: inline-block;
	padding: 0.1rem 0.6rem;
	border-radius: 999px;
	background-color: var(--accent-bg);
	color: var(--accent);
	font-weight: bold;
}
.navs a:hover {
	background-color: var(--accent);
	color: var(--bg-color);
	text-decoration: none;
}

/* Secciones dentro de un repo */
header.subtitle {
	background: none;
	margin-top: 2rem;
	border-bottom: 0.0625rem solid var(--fg-faint);
}
header.subtitle h2 {
	padding: 0 0 0.25rem;
	color: var(--fg-color);
	font-family: var(--font-antique);
	font-size: 1.5rem;
	letter-spacing: -0.02em;
}

#summary_wrapper, .page_header_wrapper {
	background-color: var(--accent-bg);
	color: var(--fg-color);
	padding: 0.75rem 1rem;
	border-radius: var(--radius);
	box-shadow: var(--edge), var(--shadow);
}
.page_header_wrapper {
	margin-top: 1rem;
}
dt {
	color: var(--fg-muted);
}

.brief, .tag_age, .branches_wrapper {
	border-bottom: 0.0625rem solid var(--fg-faint);
}
.briefs_age, .tag_age, .branches_age {
	color: var(--fg-muted);
}
.briefs_author, .tag_name {
	color: var(--blue);
}
.briefs_toggle {
	border-color: var(--fg-faint);
	border-radius: 999px;
	color: var(--fg-muted);
}

.refs_str {
	background-color: var(--accent-bg);
	color: var(--accent);
	font-style: normal;
	padding: 0 0.4rem;
	border-radius: 999px;
}

#np_wrapper {
	background: none;
	border-bottom: none;
	margin-top: 1rem;
}

/* Árbol de archivos y README */
#tree {
	margin: 1rem 0;
	width: 100%;
}
.tree_wrapper:nth-child(odd) {
	background-color: var(--fg-faint);
}
.tree_wrapper:nth-child(even) {
	background: none;
}
.tree_line {
	padding: 0.3rem 0.75rem;
}
#tree_content h2 {
	padding: 0;
	font-family: var(--font-antique);
}
#tree_content pre,
#blob, #blame, #diff, .commit {
	margin: 1rem 0;
	padding: 1rem;
	border-radius: var(--radius-small);
	background-color: var(--surface);
	box-shadow: var(--edge);
	overflow: auto;
}
.blob_line > a {
	color: var(--fg-muted);
}
.blame_line:target, .blob_line:target {
	background-color: var(--accent-bg);
}
.blame_wrapper {
	color: var(--fg-muted);
}
.blame_author {
	color: var(--blue);
}

/* Diffs con la paleta Gruvbox */
.diff_minus, .diff_submodule {
	color: var(--red);
}
.diff_plus, .diff_symlink, .diff_author {
	color: var(--accent);
}
.diff_chunk_header, .diff_date {
	background: none;
	color: var(--yellow);
}
.diff_meta, .diff_executable, .diff_commit {
	color: var(--blue);
}
.diff_directory {
	color: var(--orange);
}

/* Pie: dueño del sitio */
#site_owner_wrapper {
	background: none;
	color: var(--fg-muted);
	margin-top: 3rem;
	border-top: 0.0625rem solid var(--fg-faint);
	text-align: center;
	font-size: 0.875rem;
}

#err_content {
	padding: 1rem 0;
}

@media (max-width: 680px) {
	#site_link {
		font-size: 1.5rem;
	}
	.index_wrapper .index_project_age {
		width: auto;
		text-align: left;
	}
}

/* ORDEN-INICIO: generado por ~/bin/got-mirror-order, no editar a mano */
main.action-index { display: flex; flex-direction: column; }
.index_wrapper:has(a[href="?action=summary&path=nezzontli-ctl.git"]) { order: 1; }
.index_wrapper:has(a[href="?action=summary&path=nix-dotfiles.git"]) { order: 2; }
.index_wrapper:has(a[href="?action=summary&path=asteroidpipeline.jl.git"]) { order: 3; }
.index_wrapper:has(a[href="?action=summary&path=slides.git"]) { order: 4; }
.index_wrapper:has(a[href="?action=summary&path=gotvcs-intellij.git"]) { order: 5; }
.index_wrapper:has(a[href="?action=summary&path=gpg-keys.git"]) { order: 6; }
.index_wrapper:has(a[href="?action=summary&path=guixdots.git"]) { order: 7; }
.index_wrapper:has(a[href="?action=summary&path=jupyter_notebooks.git"]) { order: 8; }
.index_wrapper:has(a[href="?action=summary&path=guix-channel.git"]) { order: 9; }
.index_wrapper:has(a[href="?action=summary&path=proyecto-fisica-2do.git"]) { order: 10; }
.index_wrapper:has(a[href="?action=summary&path=bareiron.git"]) { order: 11; }
.index_wrapper:has(a[href="?action=summary&path=ia_detector.git"]) { order: 12; }
/* ORDEN-FIN */
