* {
  box-sizing: border-box;
}

:root {
  --fg: #cdd6f4;
  --bg: #11111b;
  --link: #bd93f9;
  --link-active: #8be9fd;
  --overlay: #313244;
}

.skip {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  position: static;
  width: auto;
  height: auto;
}

body {
  max-width: 60rem;
  padding: 2rem;
  margin: 0 auto;
  line-height: 1.8;
  background: var(--bg);
  color: var(--fg);
  font-family: serif;
}

#main-nav {
  line-height: 1.3;

  ul {
    padding: 0;
    margin: 0;
    display: flex;
    list-style: none;
  }

  li {
    margin-inline-end: 0.5em;
  }
}

#site-title {
  font-size: 150%;
  margin: 0;
  line-height: 1.3;
  font-family: sans-serif;
  font-weight: bold;
}

.footer {
  margin: 1.5rem 0 0;
  line-height: 1.8;
}

header {
  margin: 0 0 1.5rem;
}

a,
a:visited {
  color: var(--link);
}

a:active {
  color: var(--link-active);
}

div.content,
div.path {
  line-height: initial;
  font-family: monospace;
  font-size: 11pt;
  padding-inline: 1rem;
}

div.path {
  margin-bottom: 1.5rem;
}

table {
  border-collapse: collapse;
}

table.tabs {
  border-bottom: 3px solid var(--overlay);
  margin: 1.5rem 0 0;
  width: 100%;
  line-height: initial;
}

table.tabs td {
  padding: 0;
  vertical-align: bottom;
}

table.tabs td a,
table.tabs td a:visited {
  padding: 2px 0.25em;
  color: var(--fg);
}

table.tabs td a.active {
  background-color: var(--overlay);
}

div#cgit a.active:hover {
  color: inherit;
}

table.tabs td.form form {
  padding-bottom: 2px;
  font-size: 90%;
  white-space: nowrap;
}

th,
.diffstat-header {
  font-weight: bold;
}

div.error {
  color: red;
  font-weight: bold;
  margin: 1rem 2rem;
}

table.list {
  width: 100%;
  border: none;
  border-collapse: collapse;
}

table.list td,
table.list th {
  border: none;
  padding: 0.1rem 0;
}

div#cgit a {
  text-decoration: none;
}

div#cgit a:hover {
  text-decoration: underline;
}

.left {
  text-align: left;
}

.right,
.ls-size,
table.tabs td.form {
  text-align: right;
}

.ls-size {
  width: 10rem;
}

a.branch-deco,
a.tag-deco,
a.tag-annotated-deco,
a.remote-deco,
a.deco {
  color: #000 !important;
  padding: 0px 0.25em;
}

a.branch-deco {
  background-color: #50fa7b;
  border: solid 1px #05a82e;
}

a.tag-deco {
  background-color: #f1fa8c;
  border: solid 1px #9aa707;
}

a.tag-annotated-deco {
  background-color: #ffb86c;
  border: solid 1px #a75600;
}

a.remote-deco {
  background-color: #8be9fd;
  border: solid 1px #038fad;
}

a.deco {
  background-color: #ff5555;
  border: solid 1px #a30000;
}

table.commit-info th {
  text-align: left;
  padding: 0.1em 1em 0.1em 0.1em;
  vertical-align: top;
}

div.diffstat-header {
  padding-top: 1.5em;
}

table.diffstat {
  border-collapse: collapse;
}

table.diffstat th {
  font-weight: normal;
  text-align: left;
  text-decoration: underline;
  padding: 0.1em 1em 0.1em 0.1em;
  font-size: 100%;
}

table.diffstat td {
  padding: 0.2em 0.2em 0.1em 0.1em;
  font-size: 100%;
  border: none;
  white-space: nowrap;
}

table.diffstat td.mode {
  white-space: nowrap;
}

table.diffstat td span.modechange {
  padding-left: 1em;
  color: red;
}

table.diffstat td.add a {
  color: #50fa7b;
}

table.diffstat td.del a {
  color: #ff5555;
}

table.diffstat td.upd a {
  color: #8be9fd;
}

table.diffstat td.graph {
  width: 100%;
  vertical-align: middle;
}

table.diffstat td.graph table {
  border: none;
}

table.diffstat td.graph td {
  padding: 0px;
  border: 0px;
  height: 7pt;
}

table.diffstat td.graph td.add {
  background-color: #50fa7b;
}

table.diffstat td.graph td.rem {
  background-color: #ff5555;
}

div.diffstat-summary {
  padding-top: 0.5rem;
}

div.commit-subject {
  font-weight: bold;
  margin: 1.5rem 0 0.5rem;
  padding: 0;
}

table.diff td .head {
  font-weight: bold;
}

table.diff td .add {
  color: #50fa7b;
}

table.diff td .del {
  color: #ff5555;
}

div#cgit table.list a {
  color: inherit;
}

div#cgit table.list td a:hover,
div#cgit table.list a.ls-dir {
  color: var(--link);
}

.button {
  margin-right: 1ch;
}

table.blob {
  border-top: 1px solid var(--overlay);
  margin-top: 0.5rem;
}

table.blob td.linenumbers {
  border-right: 1px solid var(--overlay);
  padding: 0 0.5rem;
  text-align: right;
}

.linenumbers a {
  color: var(--fg);
}

table.blob td.lines {
  vertical-align: top;
  padding-left: 0.5rem;
}

table.blob pre {
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

table.blame div.alt:nth-child(even) {
  background: #1e1e2e;
}

table.blame td.lines > div {
  position: relative;
}

table.blame td.lines > div > pre {
  padding: 0 0 0 0.5rem;
  position: absolute;
  top: 0;
}

table.blame td.linenumbers div.alt {
  padding: 0 0.5rem 0 0;
}

table.blame td.hashes div.alt,
table.blame td.lines div.alt {
  padding: 0 0.5rem;
}

table.blame td.hashes,
table.blame td.lines,
table.blame td.linenumbers {
  padding: 0;
}

div.cgit-panel {
  margin: 1rem 0;
}

table.ssdiff td {
  padding: 1px 4px;
  border-inline: 1px solid var(--overlay);
  font-size: 85%;
}

table.ssdiff td.head {
  white-space: pre;
  border: 1px solid var(--overlay);
  font-size: 100%;
}

table.ssdiff td.foot {
  border-top: 1px solid var(--overlay);
}

table.ssdiff td.hunk {
  border: 1px solid var(--overlay);
  background-color: #8be9fd;
  color: #000;
  font-size: 100%;
}

table.ssdiff td.lineno {
  width: 3em;
  min-width: 3em;
  text-align: right;
  vertical-align: top;
}

table.ssdiff .add_dark {
  background-color: #287f3e;
}

table.ssdiff .add {
  background-color: #50fa7b;
  color: #000;
}

table.ssdiff .del_dark {
  background-color: #7f2a2a;
}

table.ssdiff .del {
  background-color: #ff5555;
  color: #000;
}
