* {
  box-sizing: border-box;
}

body {
  margin: 8px;
  font-family: monospace;
  line-height: 1.2;
  background: #383838;
  color: #dadada;
}

a {
  text-decoration: none;
  color: #7eafe9;
}

a:hover,
a:focus,
a:active {
  text-decoration: underline;
  color: #d1c5e9;
}

a:active {
  color: #e6bdbc;
}

svg.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
}

.nav,
.main {
  max-width: 900px;
  margin: 8px auto;
  border: 1px solid #292929;
  overflow: auto;
}

.nav {
  padding: 6px 12px;
  background: #404040;
}

.nav > * {
  display: inline-block;
  margin-right: 3px;
}

table {
  width: 100%;
  border-spacing: 0;
}

tr > * {
  background: #404040;
  border: 1px #292929;
  border-bottom-style: solid;
}

table > :last-child > tr:last-child > * {
  border-bottom-style: none;
}

thead > tr > * {
  background: #353535;
  border-right-style: solid;
}

table > * > tr > :last-child {
  border-right-style: none;
}

tfoot > tr > * {
  background: #383838;
}

tbody > tr:hover > *,
tbody > tr:focus-within > * {
  background: #4c4c4c;
}

tr > * {
  white-space: nowrap;
  text-align: left;
}

th {
  font-weight: bold;
}

tr > *,
th.sort > a {
  padding: 4px 12px;
}

th.sort {
  padding: 0;
}

th.sort > a {
  display: block;
  cursor: pointer;
  text-decoration: unset;
  color: unset;
}

th.sort > a:hover,
th.sort > a:focus,
th.sort > a:active {
  background: #3d3d3d;
}

th > svg.icon {
  width: 0.75em;
  height: 0.75em;
}

tr > [data-col='icon'] {
  width: 1em;
  padding-right: 0;
}

tr > [data-col='icon'] + * {
  padding-left: 6px;
}

tr > [data-col='name'] {
  width: 100%;
}

td[data-col='name'],
.nav {
  white-space: pre;
}

td[data-col='size'] {
  text-align: right;
}

@media (prefers-color-scheme: light) {
  body {
    background: #f5f5f5;
    color: #303030;
  }

  a {
    color: #5294e2;
  }

  a:hover,
  a:focus,
  a:active {
    color: #8c6ec9;
  }

  a:active {
    color: #c15b58;
  }

  .nav {
    border-color: #bababa;
  }

  .main,
  tr > * {
    border-color: #c7c7c7;
  }

  .nav,
  tr > * {
    background: #ffffff;
  }

  thead > tr > *,
  tfoot > tr > * {
    background: #f5f5f5;
  }

  tbody > tr:hover > *,
  tbody > tr:focus-within > * {
    background: #f5f5f5;
  }

  th.sort > a:hover,
  th.sort > a:focus,
  th.sort > a:active {
    background: #fafafa;
  }
}
