*,
::before,
::after {
  box-sizing: border-box;
}

::-moz-focus-inner {
  border-style: none;
  padding: 0;
}
:-moz-focusring {
  outline: 1px dotted ButtonText;
}
:-moz-ui-invalid {
  box-shadow: none;
}

:root {
  --line-height: 1.3rem;
  --grid-height: 0.65rem;
}

html {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 16px;
  line-height: var(--line-height);
  font-family:
    "Iowan Old Style",
    "Palatino Linotype",
    "Book Antiqua",
    Palatino,
    "URW Palladio L",
    "Times New Roman",
    Times,
    serif;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
}

body {
  margin: 0 auto;
  padding: 0 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

b,
strong {
  font-weight: bold;
}

code,
kbd,
samp,
pre {
  font-family: monospace;
}

code,
kbd,
samp {
  border: 2px solid var(--code);
}

pre > code {
  background-color: inherit;
  padding: 0;
  border: none;
}

code {
  font-size: 90%;
  padding: 0.025rem 0.3rem;
  border: 1px solid var(--border);
}

pre {
  border: 1px solid var(--border);
  padding: var(--grid-height);
  overflow-x: auto;
}

h1,
h2,
h3,
h4 {
  font-style: italic;
  font-size: 1rem;
  font-weight: bold;
  line-height: var(--line-height);
  margin: 0 0 var(--grid-height) 0;
  padding: 0;
  border: 0;
}

path {
  fill: var(--text-color);
}

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

a:hover,
a:visited:hover {
  color: var(--visited);
  text-decoration: underline;
}

a:visited {
  color: var(--text-color);
}

header {
  margin: 1rem auto;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  font-weight: 700;
}

.brand-logo {
  width: min(100%, 480px);
  height: auto;
  max-width: 100%;
  border-radius: 0;
  display: block;
}

p {
  margin-top: var(--line-height);
  margin-bottom: var(--line-height);
}

footer {
  text-align: center;
}

.font-bold {
  font-weight: bold;
}

.mono {
  font-family: monospace;
  font-style: normal;
}

.text-sm {
  font-size: 0.8rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.m-0 {
  margin: 0;
}

.mb {
  margin-bottom: var(--grid-height);
}

.mb-0 {
  margin-bottom: 0;
}

.my {
  margin-top: var(--grid-height);
  margin-bottom: var(--grid-height);
}

.px {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.py {
  padding-top: var(--grid-height);
  padding-bottom: var(--grid-height);
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap {
  gap: var(--grid-height);
}

.gap-2 {
  gap: var(--line-height);
}

.group {
  display: flex;
  flex-direction: column;
  gap: var(--grid-height);
}

.group-2 {
  display: flex;
  flex-direction: column;
  gap: var(--line-height);
}

.flex-1 {
  flex: 1;
}

.box {
  border: 2px solid var(--grey-light);
  padding: var(--grid-height);
}

.border-b {
  border-bottom: 1px solid var(--border);
}

.border-b:last-child {
  border-bottom: 0;
}

.box {
  margin: 1rem 0;
  padding: var(--grid-height);
  border: 1px solid var(--border);
}

.border-visited {
  border-color: var(--visited);
}

.tree-size {
  width: 60px;
  text-align: right;
}

.tree-path {
  text-wrap: wrap;
}

.sticky {
  position: sticky;
  top: 0;
  left: 0;
  background-color: var(--bg-color);
}

.white-space-bs {
  white-space: break-spaces;
}

.chroma .ln {
  padding-left: 0 !important;
  padding-right: 0.3em !important;
  margin-right: 0.2em !important;
}

.summary-commit-box {
  margin: 0;
  padding: 0;
}

.summary-commit-row {
  padding: 0.45rem 0.55rem;
}

.summary-commit-row .mb {
  margin-bottom: 0.2rem;
}

.summary-commit-msg {
  font-size: 0.95rem;
  line-height: 1.25;
}

.summary-meta-box {
  margin-top: 0;
  padding: 0;
}

.summary-meta-row {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  align-items: start;
}

.summary-meta-key {
  font-style: italic;
}

.summary-meta-val {
  word-break: break-word;
}

.summary-meta-clone {
  border: 0;
  padding: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.home-card,
.user-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
  margin: 0;
  padding: 0.55rem 0.7rem;
}

.repo-name {
  font-size: 1.22rem;
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 0.2rem 0;
}

.repo-desc {
  font-size: 0.88rem;
  line-height: 1.25;
  opacity: 0.92;
}

.repo-links {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.88rem;
  min-width: 6.4rem;
}

.repo-links a {
  text-align: right;
}

.user-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 1.2rem;
  align-items: start;
}

.user-panel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.user-profile-box,
.home-card-single {
  margin: 0;
}

.user-profile-box {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.65rem 0.75rem;
}

.user-profile-head {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.user-avatar-square {
  width: 5.75rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.user-profile-copy {
  min-width: 0;
}

.user-profile-copy .repo-name {
  margin-bottom: 0.18rem;
}

.user-profile-copy .repo-desc {
  margin-bottom: 0.32rem;
}

.user-repos-column {
  width: 100%;
}

.home-card-single {
  margin-bottom: 0.9rem;
}

.home-card-single:last-child {
  margin-bottom: 0;
}


#site_path,
.navs,
.text-sm {
  font-style: italic;
}

.navs a,
code,
pre,
.mono,
.tree-size,
.tree-path a {
  font-style: normal;
}

.btn-nav {
  padding: 6px 10px;
  border: 1px solid var(--border);
}

.btn-nav:hover, .btn-active {
  border-color: var(--visited);
  text-decoration: none;
  color: var(--text-color);
}

@media only screen and (max-width: 900px) {
  body {
    padding: 0 0.5rem;
  }

  header {
    margin: 0;
  }

  .flex-collapse {
    flex-direction: column;
  }

  .tree-commit {
    display: none;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .user-layout {
    grid-template-columns: 1fr;
  }

  .user-profile-head {
    grid-template-columns: 4.75rem minmax(0, 1fr);
  }

  .user-avatar-square {
    width: 4.75rem;
  }
}

/* index tables — flat index, user index, user repo list */
.index-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--grid-height);
}

.index-table thead th {
  text-align: left;
  font-weight: normal;
  font-style: italic;
  padding: var(--grid-height) 0.5rem var(--grid-height) 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.index-table tbody tr {
  border-bottom: 1px solid var(--border);
}

.index-table tbody tr:last-child {
  border-bottom: 0;
}

.index-table td {
  padding: var(--grid-height) 0.5rem var(--grid-height) 0;
  vertical-align: baseline;
}

.index-col-name {
  font-weight: bold;
  white-space: nowrap;
  min-width: 8rem;
}

.index-col-desc {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}

.index-col-when {
  white-space: nowrap;
  text-align: right;
  padding-left: 1rem;
}

.index-col-msg {
  white-space: nowrap;
  text-align: right;
  padding-left: 0.5rem;
  font-size: 0.8rem;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.muted {
  opacity: 0.55;
}

/* user blocks in the root index */
.index-user-block {
  margin-bottom: calc(var(--grid-height) * 3);
}

.index-user-block:last-child {
  margin-bottom: 0;
}

.index-user-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: var(--grid-height) 0;
  border-bottom: 1px solid var(--border);
}

.index-user-name {
  font-weight: bold;
  font-size: 1rem;
}

.index-table-repos {
  margin-top: 0;
}

.index-table-repos td:first-child {
  padding-left: 1rem;
}

.index-user-empty {
  padding-left: 1rem;
  margin: var(--grid-height) 0;
}


.user-meta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
  font-size: 0.88rem;
  opacity: 0.88;
}
