@import url("/cgit.css");
/* deltegui · tema oscuro sobrio con toque retro para cgit 1.2
   Se carga DESPUÉS de cgit.css: solo sobrescribe lo necesario. */

:root {
        --bg:        #0e1013;   /* fondo general */
        --bg-alt:    #15181d;   /* filas pares, cabeceras de tabla, paneles */
        --bg-hover:  #1d2128;   /* fila al pasar el ratón */
        --border:    #2a2f38;   /* líneas finas */
        --text:      #d6d6d0;   /* texto normal (no blanco puro) */
        --muted:     #8b919b;   /* texto secundario */
        --accent:    #e6a23c;   /* ámbar fósforo: enlaces, activo */
        --add:       #8fbf6a;   /* líneas añadidas */
        --del:       #e0725f;   /* líneas borradas */
        --hunk:      #6fa8c9;   /* cabeceras @@ de los diffs */
        --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", "Liberation Mono", monospace;
}

html, body { background: var(--bg); }
body { margin: 0; }

div#cgit {
        max-width: 1200px;
        margin: 0 auto;
        padding: 1.5rem 1rem;
        background: var(--bg);
        color: var(--text);
        font-family: var(--mono);
        font-size: 14px;
        line-height: 1.5;
}

/* ---------- enlaces ---------- */
div#cgit a { color: var(--accent); }
div#cgit a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- cabecera ---------- */
div#cgit table#header { margin-bottom: .5rem; }
div#cgit table#header td.logo { width: 1%; padding-right: 1rem; }
div#cgit table#header td.logo img { display: block; max-height: 56px; width: auto; }
div#cgit table#header td.main { font-size: 200%; font-weight: 700; letter-spacing: -.01em; }
div#cgit table#header td.main a { color: var(--text); }
div#cgit table#header td.sub {
        color: var(--muted);
        border-top: 2px solid var(--accent);
        padding-top: .35rem;
}

/* buscador y selector de rama */
div#cgit input, div#cgit select {
        background: var(--bg-alt);
        color: var(--text);
        border: 1px solid var(--border);
        border-radius: 0;
        padding: .25rem .4rem;
        font-family: var(--mono);
        font-size: 13px;
}
div#cgit input:focus, div#cgit select:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
div#cgit input[type="submit"] { cursor: pointer; }
div#cgit input[type="submit"]:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- pestañas ---------- */
div#cgit table.tabs { border-bottom: 1px solid var(--border); margin-top: 1rem; }
div#cgit table.tabs td { padding: 0; }
div#cgit table.tabs td a {
        display: inline-block;
        padding: .35rem .9rem;
        color: var(--muted);
        font-size: 100%;
        border-bottom: 2px solid transparent;
        text-transform: lowercase;
}
div#cgit table.tabs td a:hover { color: var(--text); text-decoration: none; }
div#cgit table.tabs td a.active {
        color: var(--accent);
        background: none;
        border-bottom-color: var(--accent);
}

/* ---------- contenido ---------- */
div#cgit div.content {
        padding: 1.5rem 0;
        border-bottom: 1px solid var(--border);
}
div#cgit div.path {
        background: var(--bg-alt);
        color: var(--muted);
        border: 1px solid var(--border);
        padding: .4rem .8rem;
        margin-bottom: 1rem;
}

/* ---------- listas (índice, log, árbol, refs) ---------- */
div#cgit table.list { border-collapse: collapse; width: 100%; }
div#cgit table.list tr { background: var(--bg); }
div#cgit table.list tr:nth-child(even) { background: var(--bg-alt); }
div#cgit table.list tr:nth-child(odd)  { background: var(--bg); }
div#cgit table.list tr:hover { background: var(--bg-hover); }
div#cgit table.list tr.nohover,
div#cgit table.list tr.nohover:hover { background: var(--bg); }
div#cgit table.list tr.logheader { background: var(--bg-alt); }
div#cgit table.list th {
        color: var(--muted);
        font-weight: 400;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: .08em;
        border-bottom: 1px solid var(--border);
        padding: .4rem .5rem;
}
div#cgit table.list td { padding: .3rem .5rem; }
div#cgit table.list td a { color: var(--text); }
div#cgit table.list td a:hover { color: var(--accent); }
div#cgit table.list td.reposection {
        color: var(--accent);
        font-style: normal;
        text-transform: uppercase;
        letter-spacing: .08em;
        padding-top: 1rem;
}
div#cgit table.list td a.ls-dir { color: var(--accent); font-weight: 700; }
div#cgit table.list td.commitgraph { font-family: var(--mono); }

/* antigüedad ("hace 3 días") */
div#cgit span.age-mins,
div#cgit span.age-hours  { color: var(--accent); font-weight: 400; }
div#cgit span.age-days   { color: var(--text); }
div#cgit span.age-weeks,
div#cgit span.age-months,
div#cgit span.age-years  { color: var(--muted); }

/* etiquetas de ramas y tags en el log */
div#cgit a.branch-deco,
div#cgit a.tag-deco,
div#cgit a.tag-annotated-deco,
div#cgit a.remote-deco,
div#cgit a.deco {
        background: none;
        border: 1px solid currentColor;
        border-radius: 0;
        padding: 0 .35em;
        margin-left: .4em;
        font-size: 11px;
}
div#cgit a.branch-deco { color: var(--add); }
div#cgit a.tag-deco,
div#cgit a.tag-annotated-deco { color: var(--accent); }
div#cgit a.remote-deco { color: var(--hunk); }
div#cgit a.deco { color: var(--del); }

/* ---------- panel lateral y paginador ---------- */
div#cgit div.cgit-panel table {
        background: var(--bg-alt);
        border: 1px solid var(--border);
}
div#cgit div.cgit-panel td.label { color: var(--muted); }
div#cgit ul.pager a { color: var(--muted); }
div#cgit ul.pager a:hover { color: var(--accent); }

/* ---------- ver fichero ---------- */
div#cgit table.blob { border-top: 1px solid var(--border); }
div#cgit table.blob td.linenumbers,
div#cgit table.blob td.hashes {
        border-right: 1px solid var(--border);
        color: var(--muted);
}
div#cgit table.blob td.linenumbers a { color: var(--muted); }
div#cgit table.blob td.linenumbers a:hover { color: var(--accent); text-decoration: none; }
div#cgit table.blob td.lines pre,
div#cgit table.blob pre { color: var(--text); background: none; }
div#cgit table.bin-blob { background: var(--bg-alt); border: 1px solid var(--border); }

/* ---------- commit ---------- */
div#cgit table.commit-info th { color: var(--muted); font-weight: 400; }
div#cgit div.commit-subject { color: var(--text); font-size: 115%; }
div#cgit div.commit-msg { color: var(--text); }
div#cgit div.notes { background: var(--bg-alt); border: 1px solid var(--border); }
div#cgit div.notes-header { color: var(--muted); }

/* ---------- diffs ---------- */
div#cgit table.diffstat { border: 1px solid var(--border); background: var(--bg-alt); }
div#cgit table.diffstat td span.modechange { color: var(--muted); }
div#cgit table.diffstat td.add a,
div#cgit table.diffstat td.upd a { color: var(--text); }
div#cgit table.diffstat td.graph table { border: none; }
div#cgit table.diffstat td.graph td { padding: 0; border: none; }
div#cgit table.diffstat td.graph span.add { background: var(--add); }
div#cgit table.diffstat td.graph span.rem { background: var(--del); }
div#cgit div.diffstat-summary { color: var(--muted); }

div#cgit table.diff td div.head {
        color: var(--text);
        font-weight: 700;
        border-top: 1px solid var(--border);
        padding-top: .5rem;
        margin-top: 1.25rem;
}
div#cgit table.diff td div.hunk { color: var(--hunk); }
div#cgit table.diff td div.add  { color: var(--add); background: rgba(143, 191, 106, .08); }
div#cgit table.diff td div.del  { color: var(--del); background: rgba(224, 114, 95, .08); }

/* diff lado a lado */
div#cgit table.ssdiff td { border-color: var(--border); }
div#cgit table.ssdiff td.lineno { color: var(--muted); background: var(--bg-alt); }
div#cgit table.ssdiff td.add,
div#cgit table.ssdiff td.add_dark  { color: var(--add); background: rgba(143, 191, 106, .10); }
div#cgit table.ssdiff td.del,
div#cgit table.ssdiff td.del_dark  { color: var(--del); background: rgba(224, 114, 95, .10); }
div#cgit table.ssdiff td.changed,
div#cgit table.ssdiff td.changed_dark { background: rgba(230, 162, 60, .08); }
div#cgit table.ssdiff span.add { color: var(--add); background: rgba(143, 191, 106, .25); }
div#cgit table.ssdiff span.del { color: var(--del); background: rgba(224, 114, 95, .25); }
div#cgit table.ssdiff td.head,
div#cgit table.ssdiff td.foot { border-color: var(--border); }
div#cgit table.ssdiff td.hunk { color: var(--hunk); background: var(--bg-alt); }

/* ---------- README renderizado (pestaña about) ---------- */
/* md2html mete su propio <style> claro; con #cgit delante ganamos en especificidad */
div#cgit .markdown-body { color: var(--text); font-family: var(--mono); font-size: 14px; }
div#cgit .markdown-body h1,
div#cgit .markdown-body h2,
div#cgit .markdown-body h3,
div#cgit .markdown-body h4 { color: var(--text); border-bottom-color: var(--border); }
div#cgit .markdown-body h1 a.anchor,
div#cgit .markdown-body h2 a.anchor { color: var(--muted); }
div#cgit .markdown-body a { color: var(--accent); }
div#cgit .markdown-body code,
div#cgit .markdown-body tt {
        background: var(--bg-alt);
        border: 1px solid var(--border);
        color: var(--text);
        border-radius: 0;
}
div#cgit .markdown-body pre {
        background: var(--bg-alt);
        border: 1px solid var(--border);
        border-radius: 0;
        color: var(--text);
}
div#cgit .markdown-body pre code { border: none; background: none; }
div#cgit .markdown-body blockquote { color: var(--muted); border-left-color: var(--accent); }
div#cgit .markdown-body hr { background: var(--border); border: none; height: 1px; }
div#cgit .markdown-body table th,
div#cgit .markdown-body table td { border-color: var(--border); }
div#cgit .markdown-body table tr { background: var(--bg); border-color: var(--border); }
div#cgit .markdown-body table tr:nth-child(2n) { background: var(--bg-alt); }

/* los títulos son enlaces a.toclink; md2html los pone negros con "div#cgit .markdown-body hN a.toclink",
   así que aquí hace falta un selector más fuerte (div.markdown-body en vez de .markdown-body) */
div#cgit div.markdown-body h1 a.toclink,
div#cgit div.markdown-body h2 a.toclink,
div#cgit div.markdown-body h3 a.toclink,
div#cgit div.markdown-body h4 a.toclink,
div#cgit div.markdown-body h5 a.toclink,
div#cgit div.markdown-body h6 a.toclink { color: var(--text); }
div#cgit div.markdown-body h1 a.toclink:hover,
div#cgit div.markdown-body h2 a.toclink:hover,
div#cgit div.markdown-body h3 a.toclink:hover { color: var(--accent); text-decoration: none; }
div#cgit .markdown-body h1 { border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
div#cgit .markdown-body h2 { border-bottom: 1px solid var(--border); padding-bottom: .2rem; }
/* el contenedor de los bloques de código: sin esto queda un marco con el fondo del esquema de pygments */
div#cgit .markdown-body div.highlight { background: none; }

/* ---------- errores ---------- */
div#cgit div.error { color: var(--del); }

/* ---------- pie ---------- */
div#cgit div.footer {
        margin-top: 1.5rem;
        text-align: center;
        color: var(--muted);
        font-size: 12px;
}
div#cgit div.footer a { color: var(--muted); }
div#cgit div.footer a:hover { color: var(--accent); }

/* ---------- selección de texto ---------- */
::selection { background: var(--accent); color: var(--bg); }
