/*  This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program. If not, see <https://www.gnu.org/licenses/>. */

@import url("/chivo.css");

:root {
  --lighter-background: #1a2533;
  --light-background: #101322;
  --dark-background: #070d15;
  --foreground: #dfdfdf;
  --accent: #ff6ac1;
}

body {
  margin: 0;
  padding: 1em;

  color: var(--foreground);
  background: var(--light-background);

  font-size: 14pt;
  text-align: left;
  font-family: "Chivo", sans-serif;
}

@media (min-width: 800px) {
  body {
    padding: 1em 20vw;
  }
}

main {
  padding: 2em 0;
}

p {
  margin-top: 1em;
}

a {
  color: var(--foreground);
  text-decoration: underline dotted;
  text-decoration-thickness: calc(1em/9);
  transition: color 0.15s;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
  margin: 1rem 0;

  color: var(--accent);
  text-align: left;
  font-size: 20pt;
}

ul, ol {
  padding: 0;
  margin: .5em 0 .5em 1em;
}

ul {
  list-style-type: square;
}

ol {
  list-style-type: decimal;
}

ul li::marker, ol li::marker {
  font-weight: bold;
  font-style: normal;
  color: var(--accent);
}

dt {
  font-weight: bold;
}

dd {
  margin-left: 1em;
}

hr {
  height: 2px;
  background-color: var(--accent);
  border: none;
}

footer {
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td, th {
  line-height: 1.75em;
  padding: 0 .5em;
}

thead td {
  font-weight: bold;
}

tbody td {
  font-family: monospace;
}

thead tr, tbody tr:nth-child(2n) {
  background: var(--lighter-background);
}

::selection {
  background: var(--accent);
  color: var(--light-background);
}

main > *:first-child, #readme > *:first-child {
  margin-top: 0;
}

main > *:last-child, #readme > *:last-child {
  margin-bottom: 0;
}

header nav {
  display: grid;
  grid-gap: 0.75rem;
  grid-template-columns: 20px auto;
}

header nav a, header nav a:hover {
  color: var(--foreground);
}

header nav img {
  margin-top: 2px;
}

header nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  flex-wrap: wrap;
}

header nav ul li {
  margin-right: 1em;
}

header nav ul li:last-child {
  margin: 0;
}

header nav ul li a {
  text-decoration: none;
}

header nav ul li a:hover {
  color: var(--foreground);
  text-decoration: underline dotted;
  text-decoration-thickness: calc(1em/9);
}

header nav ul li:last-child {
  margin: 0;
}

header nav ul li:has(a:hover)::marker {
  content: "";
}

main nav {
  margin: 1em 0;
}

main nav * {
  margin: 0;
}

main nav ul {
  list-style: none;
}

main nav ul li {
  display: inline;
  font-weight: bold;
  padding-right: .5em;
}

main nav ul li a {
  text-decoration: none;
}

main nav li.nav-selected a {
  color: var(--accent);
}

.article-list article, #readme, #license {
  background: var(--dark-background);
  padding: 1em;
  margin: .5em 0;
}

#license pre {
  white-space: pre-wrap;
}

.article-list article h4 {
  margin: 0;
  margin-bottom: .5em;
  font-size: 1rem;
}

.article-list article > p:last-child {
  margin-bottom: 0;
}

.article-list article h4 a {
  color: var(--accent);
  font-weight: bold;
  text-decoration: none;
}

.article-list article h4 {
  text-decoration: none;
}

.article-list article h4 {
  border-bottom: 2px solid var(--accent);
  font-size: 1em;
}

.article-list article time {
  display: inline-block;
  float: right;
  color: var(--dark-background);
  background: var(--foreground);
  padding: 0 10px;
  maring-top: 10px;
}

.table-container {
  max-width: 100%;
  overflow-x: scroll;
  scrollbar-width: none;
}

.table-container::-webkit-scrollbar {
  display: none;
}

.code-block {
  background: var(--dark-background);
  border-left: 5px solid var(--accent);

  overflow-x: scroll;
  scrollbar-width: none;

  margin: 1em 0;
}

.code-block::-webkit-scrollbar {
  display: none;
}

#readme .code-block {
  background: var(--light-background);
}

#readme img {
  max-width: 100%;
}

.code-block pre {
  margin: 1em;
  width: min-content;
}

.code-block.blob {
  display: grid;
  grid-template-columns: min-content auto;
}

.code-block.blob #line-numbers {
  margin-right: 0;
}

.code-block.blob #line-numbers a {
  color: var(--accent);
  font-weight: bold;
}

.line {
  color: var(--accent);
  font-weight: bold;
  text-decoration: none;
}

.line:hover {
  text-decoration: underline dotted;
  text-decoration-thickness: calc(1em/9);
}

.commit-heading a {
  color: var(--accent);
  font-weight: bold;
}

.subtree {
  font-weight: bold;
}

.commit {
  margin-top: 1em;
  padding: 1em;
  background: var(--dark-background);
  overflow-wrap: break-word;
}

.commit > :first-child {
  margin-top: 0;
}

.commit > :last-child {
  margin-bottom: 0;
}

.d {
  color: #ff0a38;
  text-decoration: none;
}

.i {
  color: #00e639;
  text-decoration: none;
}

.h {
  color: var(--accent);
  font-weight: bold;
}
