/* ============================================================
   cgit Gruvbox dark theme — matches Hugo site palette
   bg #1d2021  fg #d5c4a1  muted #a9a59a  accent #d8a657
   font: IBM Plex Mono
   ============================================================ */

@font-face {
    font-family: "IBM Plex Mono";
    src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("/fonts/IBMPlexMono-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
}

:root {
    --bg:     #1d2021;
    --bg-alt: #282828;
    --bg-hi:  #32302f;
    --fg:     #d5c4a1;
    --muted:  #a9a59a;
    --accent: #d8a657;
    --border: #504945;
    --green:  #a9b665;
    --red:    #ea6962;
    --aqua:   #89b482;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 24px;
    background: var(--bg);
    color: var(--fg);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { border: none; }

div#cgit { max-width: 1100px; margin: 0 auto; }

/* ---- header ---- */
table#header { margin-bottom: 1em; }
table#header td.logo { display: none; }
table#header td.main {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--fg);
}
table#header td.main a { color: var(--fg); }
table#header td.sub {
    color: var(--muted);
    border-top: none;
    padding-top: 2px;
}

/* ---- nav tabs ---- */
table.tabs {
    border-bottom: 1px solid var(--border);
    margin: 1em 0 0;
    background: transparent;
}
table.tabs td a {
    color: var(--accent);
    padding: 4px 10px;
    margin: 0 2px 0 0;
}
table.tabs td a.active {
    background: var(--accent);
    color: var(--bg);
    font-weight: 700;
}
table.tabs td.form input,
table.tabs td.form select {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--accent);
    padding: 4px;
}

/* ---- content frame ---- */
div.content {
    border: none;
    padding: 1em 0;
}

/* ---- repo / log lists ---- */
table.list { width: 100%; border-collapse: collapse; }
table.list tr { background: transparent; }
table.list tr.nohover:hover, table.list tr:hover { background: var(--bg-hi); }
table.list th {
    color: var(--fg);
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    padding: 6px 10px;
    text-align: left;
}
table.list td { border: none; padding: 5px 10px; }
table.list tr.logheader { background: var(--bg-alt); }
td.logsubject { color: var(--fg); }
td.logmsg { color: var(--muted); background: var(--bg-alt); }

/* ---- commit / blob views ---- */
table.blob td.linenumbers a { color: #665c54; }
table.blob td.lines pre { color: var(--fg); }
table.commit-info, table.commit-msg { color: var(--fg); }
div.commit-subject { color: var(--fg); font-weight: 700; }
div.commit-msg { color: var(--muted); }

/* ---- diffs ---- */
table.diff { color: var(--fg); }
table.diff td div.head { color: var(--fg); font-weight: 700; }
table.diff td div.hunk { color: var(--aqua); }
table.diff td div.add { color: var(--green); }
table.diff td div.del { color: var(--red); }

/* ---- panels / sidebars ---- */
div.cgit-panel, table.cgit-panel {
    background: var(--bg-alt);
    border: 1px solid var(--border);
}
td#sidebar div.sidebar { background: var(--bg-alt); }

/* ---- preformatted ---- */
pre { color: var(--fg); }
table.bin-blob { background: var(--bg-alt); }

/* ---- footer ---- */
div.footer {
    color: var(--muted);
    border-top: 1px solid var(--border);
    margin-top: 2em;
    padding-top: 1em;
    font-size: 0.9rem;
}

/* ---- error message ---- */
div.error {
    color: var(--red);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 8px 12px;
}

/* ============================================================
   markdown about-page (.markdown-body) — override the light
   CSS that the md2html filter injects inline
   ============================================================ */
div#cgit .markdown-body { color: var(--fg); }
div#cgit .markdown-body a { color: var(--accent); }
div#cgit .markdown-body a.absent { color: var(--red); }
div#cgit .markdown-body h1,
div#cgit .markdown-body h2,
div#cgit .markdown-body h3,
div#cgit .markdown-body h4,
div#cgit .markdown-body h5 { color: var(--fg); }
div#cgit .markdown-body h6 { color: var(--muted); }
div#cgit .markdown-body h1 { color: var(--fg); }
div#cgit .markdown-body h2 { border-bottom: 1px solid var(--border); color: var(--fg); }
div#cgit .markdown-body hr { border: 1px solid var(--border); }
div#cgit .markdown-body blockquote {
    border-left: 4px solid var(--border);
    color: var(--muted);
}
div#cgit .markdown-body code,
div#cgit .markdown-body tt {
    background: var(--bg-hi);
    border: 1px solid var(--border);
    color: var(--fg);
}
div#cgit .markdown-body .highlight pre,
div#cgit .markdown-body pre {
    background: var(--bg-alt);
    color: var(--fg);
}
div#cgit .markdown-body pre code,
div#cgit .markdown-body pre tt {
    background: transparent;
    border: none;
}
div#cgit .markdown-body table th,
div#cgit .markdown-body table td {
    border: 1px solid var(--border);
}
div#cgit .markdown-body table th { background: var(--bg-alt); font-weight: 700; }
div#cgit .markdown-body table tr {
    background: var(--bg);
    border-top: 1px solid var(--border);
}
div#cgit .markdown-body table tr:nth-child(2n) { background: var(--bg-alt); }
/* ---- spacing for action buttons (summary / log / tree) ---- */
div#cgit a.button {
    display: inline-block;
    margin: 0 0.4em 0 0;
    padding: 1px 0.4em;
}
table.list td a.button {
    margin-right: 0.5em;
}
