/* Pages under dittus.dev/git/, written by stagit. Same tokens and font as /style.css. */
:root {
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #78716c;
  --rule: #d6d3d1;
  --link: #1d4ed8;
  --row: #f5f5f4;
  --added: #15803d;
  --removed: #b91c1c;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --fg: #f5f5f4;
    --muted: #a8a29e;
    --rule: #44403c;
    --link: #93c5fd;
    --row: #1c1917;
    --added: #4ade80;
    --removed: #f87171;
  }
}

body {
  margin: 0;
  padding: 1rem;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875rem;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
  font-size: 1em;
  margin: 0;
}

img, h1, h2 { vertical-align: middle; }

img { border: 0; }

a:target { background: var(--row); }

a.d, a.h, a.i, a.line { text-decoration: none; }

table thead td { font-weight: bold; }

table td { padding: 0 0.4em; }

/* Wide logs and diffs scroll sideways inside the page instead of widening it on a phone. */
#content { overflow-x: auto; }

#content table td {
  vertical-align: top;
  white-space: nowrap;
}

#branches tr:hover td,
#tags tr:hover td,
#index tr:hover td,
#log tr:hover td,
#files tr:hover td {
  background: var(--row);
}

#index tr td:nth-child(2),
#tags tr td:nth-child(3),
#branches tr td:nth-child(3),
#log tr td:nth-child(2) {
  white-space: normal;
}

td.num { text-align: right; }

.desc, #blob a { color: var(--muted); }

#blob a:hover, #blob a:target { color: var(--fg); }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  height: 1px;
}

pre { font-family: inherit; }

pre a.h { color: var(--link); }

.A, span.i, pre a.i { color: var(--added); }

.D, span.d, pre a.d { color: var(--removed); }

pre a.h:hover, pre a.i:hover, pre a.d:hover { text-decoration: none; }

/* A README rendered from Markdown, at readme.html. */
#readme {
  max-width: 80ch;
  line-height: 1.5;
}

#readme h1, #readme h2, #readme h3, #readme h4 {
  margin: 1.5em 0 0.5em;
  line-height: 1.25;
}

#readme h1 { font-size: 1.5em; }

#readme h2 {
  font-size: 1.25em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--rule);
}

#readme h3 { font-size: 1.1em; }

#readme code {
  padding: 0.1em 0.3em;
  border-radius: 3px;
  background: var(--row);
}

#readme pre {
  padding: 0.75em 1em;
  overflow-x: auto;
  border-radius: 4px;
  background: var(--row);
}

#readme pre code { padding: 0; }

#readme table {
  margin: 1em 0;
  border-collapse: collapse;
}

#readme th, #readme td {
  padding: 0.3em 0.6em;
  border: 1px solid var(--rule);
  text-align: left;
}

/* Undo the log table rule that keeps every cell on one line. */
#content #readme td {
  vertical-align: top;
  white-space: normal;
}

#readme blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

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