/* cgit in the Dissociation rice: ink band, slate islands, pastel rose. */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700;800&display=swap");

:root {
  color-scheme: dark;
  --ink: #121722; --island: #1e2533; --edge: #2d3647;
  --text: #e6e3ee; --muted: #8e97ad;
  --rose: #f2b8c6; --lilac: #d3b1ea; --blue: #8fb4f2; --cyan: #8fd5e3;
  --green: #a6dcb4; --peach: #f2d8a7; --red: #f28fa6; --frame: #c9b2dc;
  --mono: "JetBrains Mono", "JetBrainsMono Nerd Font", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { background: var(--ink); color: var(--text); }
body {
  margin: 0; font: 14px/1.6 var(--mono);
  background:
    radial-gradient(50rem 22rem at 15% -8%, rgba(242,184,198,.22), transparent 70%),
    radial-gradient(50rem 30rem at 85% 0%, rgba(64,98,196,.22), transparent 70%),
    var(--ink);
  background-attachment: fixed;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--rose); }
::selection { background: rgba(242,184,198,.3); }

div#cgit { max-width: 1100px; margin: 0 auto; padding: 28px 16px 40px; }

/* link back to the main site */
nav.site-nav { margin-bottom: 14px; }
nav.site-nav a {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  background: var(--island); color: var(--muted);
}
nav.site-nav a:hover { color: var(--rose); background: var(--edge); }

/* header: title in a rose pill, description muted */
table#header { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
table#header td.logo { display: none; }
table#header td.main { font-size: 1.15rem; font-weight: 800; padding: 0; }
table#header td.main a { color: var(--ink); background: var(--rose); padding: 3px 12px; border-radius: 999px; }
table#header td.main a:hover { color: var(--ink); background: var(--frame); }
table#header td.sub { color: var(--muted); padding: 8px 0 0; border: 0; }
table#header td.form { text-align: right; vertical-align: top; }
table#header td.form select, table#header td.form input {
  background: var(--island); color: var(--text); border: 1px solid var(--edge);
  border-radius: 8px; font: inherit; padding: 3px 8px;
}

/* tabs as an island */
table.tabs {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--island); border-radius: 999px; padding: 4px; margin: 6px 0 18px;
}
table.tabs td { padding: 0; }
table.tabs td a {
  display: inline-block; padding: 3px 12px; border-radius: 999px; color: var(--muted);
}
table.tabs td a:hover { color: var(--rose); background: var(--edge); }
table.tabs td a.active { background: var(--rose); color: var(--ink); font-weight: 700; }
table.tabs td.form { text-align: right; padding-right: 4px; }
table.tabs td.form input, table.tabs td.form select {
  background: var(--ink); color: var(--text); border: 1px solid var(--edge);
  border-radius: 999px; font: inherit; padding: 2px 10px;
}

/* content sits in a framed window */
div.content {
  background: rgba(18,23,34,.82); border: 1.5px solid var(--frame); border-radius: 16px;
  padding: 18px 20px; overflow-x: auto;
}
div.path { color: var(--muted); margin-bottom: 10px; }

table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; color: var(--rose); font-weight: 700; padding: 6px 10px;
  border-bottom: 1px solid var(--edge);
}
table.list th a { color: var(--rose); }
table.list td { padding: 6px 10px; border-bottom: 1px solid rgba(45,54,71,.55); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: rgba(30,37,51,.7); }
table.list tr.nohover:hover td, table.list tr.nohover-highlight:hover td { background: transparent; }
table.list td.reposection { color: var(--lilac); font-weight: 700; padding-top: 16px; }
table.list td.toplevel-repo a, table.list td.sublevel-repo a { color: var(--text); font-weight: 700; }
table.list td a.button {
  color: var(--muted); padding: 0 6px; border-radius: 999px; background: var(--island);
  margin-right: 4px; font-size: .85em;
}
table.list td a.button:hover { color: var(--ink); background: var(--rose); }
table.list td.commitgraph { color: var(--lilac); }
table.list td.logsubject, table.list td.logmsg { color: var(--text); }
table.list td.ls-size { text-align: right; color: var(--muted); }
table.list td.ls-mode { color: var(--muted); }
a.ls-dir { color: var(--blue); font-weight: 700; }
a.ls-blob, a.ls-mod { color: var(--text); }
span.age-mins, span.age-hours { color: var(--green); font-weight: 700; }
span.age-days { color: var(--peach); }
span.age-weeks, span.age-months, span.age-years { color: var(--muted); }

/* refs/decorations as small pills */
span.decoration a, a.branch-deco, a.tag-deco, a.tag-annotated-deco, a.remote-deco, a.deco {
  display: inline-block; padding: 0 8px; margin: 0 2px; border-radius: 999px;
  font-size: .8em; font-weight: 700; color: var(--ink);
}
a.branch-deco { background: var(--green); }
a.tag-deco, a.tag-annotated-deco { background: var(--peach); }
a.remote-deco { background: var(--lilac); }
a.deco { background: var(--blue); }

/* commit view */
table.commit-info { border-collapse: collapse; margin-bottom: 12px; }
table.commit-info th { text-align: left; color: var(--rose); padding: 2px 16px 2px 0; font-weight: 700; }
table.commit-info td { color: var(--text); padding: 2px 0; }
div.commit-subject { font-weight: 800; font-size: 1.05rem; margin: 10px 0 6px; }
div.commit-msg { white-space: pre-wrap; color: var(--muted); }
div.notes-header { color: var(--lilac); font-weight: 700; }

/* diffs */
table.diffstat { border-collapse: collapse; margin: 10px 0; }
table.diffstat td { padding: 2px 8px; }
table.diffstat td.graph table { border: 0; }
td.add, table.diffstat td.add, .add { background: var(--green); }
td.rem, table.diffstat td.rem, .rem { background: var(--red); }
div.diffstat-summary { color: var(--muted); }
table.diff { width: 100%; border-collapse: collapse; }
table.diff td div.head { color: var(--rose); font-weight: 700; margin-top: 14px; }
table.diff td div.hunk { color: var(--lilac); }
table.diff td div.add { background: rgba(166,220,180,.12); color: var(--green); }
table.diff td div.del { background: rgba(242,143,166,.12); color: var(--red); }
table.diff td div.ctx { color: var(--text); }

/* file view */
table.blob { width: 100%; border-collapse: collapse; font-size: 13px; }
table.blob td.linenumbers, table.blob td.lines { padding: 0 10px; vertical-align: top; }
table.blob td.linenumbers { text-align: right; border-right: 1px solid var(--edge); }
table.blob td.linenumbers a { color: var(--muted); }
table.blob td.lines pre, table.blob td.linenumbers pre { margin: 0; font: inherit; }
pre { font-family: var(--mono); }
div.cgit-panel { float: right; margin: 0 0 10px 16px; background: var(--island); border-radius: 12px; padding: 8px 12px; }
div.cgit-panel b { color: var(--rose); }
div.cgit-panel td { padding: 1px 4px; }

/* README (about tab) */
div#summary, div#cgit div.content .markdown-body { max-width: 72ch; }
div.content h1, div.content h2, div.content h3 { color: var(--rose); line-height: 1.3; }
div.content code { background: var(--island); border-radius: 6px; padding: 1px 6px; }
div.content pre code { padding: 0; background: none; }
div.content pre { background: var(--ink); border: 1px solid var(--edge); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
div.content blockquote { border-left: 3px solid var(--frame); margin: 0; padding-left: 14px; color: var(--muted); }
div.content img { max-width: 100%; }

/* pygments (source-filter) */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs { color: #5a6479; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kc { color: var(--lilac); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sh { color: var(--green); }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh { color: var(--peach); }
.highlight .nf, .highlight .fm { color: var(--blue); }
.highlight .nc, .highlight .nn, .highlight .kt { color: var(--cyan); }
.highlight .na, .highlight .nt { color: var(--rose); }
.highlight .o, .highlight .ow { color: var(--cyan); }

div.footer { margin-top: 18px; text-align: center; color: var(--muted); font-size: .8rem; }
div.footer a { color: var(--muted); }
div.error { color: var(--red); }

@media (max-width: 640px) {
  table.tabs td.form { display: none; }
  div.content { padding: 14px 12px; }
}
