:root {
  color-scheme: dark;
  background: #000;
  color: #f2f2f2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #000;
}

body {
  padding: clamp(16px, 4vw, 64px);
}

main {
  width: min(100%, 1120px);
  margin: 0 auto;
  border-top: 1px solid #242424;
}

.directory-bar,
.tmp-tools {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.directory-bar {
  padding: 12px 0 22px;
  color: #8e8e8e;
  font-size: 15px;
}

.directory-bar a {
  color: #f2f2f2;
  text-decoration: none;
}

.directory-bar a:hover,
.directory-bar a:focus-visible {
  text-decoration: underline;
}

.space-switch {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 5vw, 56px);
  width: min(100%, 1120px);
  margin: 0 auto 28px;
  border-bottom: 1px solid #242424;
}

.space-switch a {
  padding: 10px 4px 14px;
  border-bottom: 2px solid transparent;
  color: #8e8e8e;
  text-decoration: none;
}

.space-switch a:hover,
.space-switch a:focus-visible,
.space-switch a[aria-current="page"] {
  color: #fff;
}

.space-switch a[aria-current="page"] { border-color: #fff; }

.tmp-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 6px 0 24px;
  color: #b5b5b5;
  font-size: 13px;
}

.tmp-tools p { margin: 0; }
.tmp-tools form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.drop-zone {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  place-content: center;
  border: 1px dashed #555;
  color: #bbb;
  text-align: center;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.drop-zone strong { color: #f2f2f2; font-size: 15px; font-weight: 500; }
.drop-zone:hover,
.drop-zone:focus-within,
.drop-zone.drag-over { border-color: #aaa; background: #111; }
.drop-zone.drag-over { border-style: solid; }
.tmp-tools input { max-width: min(100%, 320px); }
.tmp-tools button {
  padding: 8px 12px;
  border: 1px solid #444;
  background: #111;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.tmp-tools button:disabled { opacity: .5; cursor: wait; }
#upload-status { width: 100%; }

@media (max-width: 640px) {
  .tmp-tools form { grid-template-columns: 1fr; }
  .drop-zone { grid-column: 1; }
}

.file {
  border-bottom: 1px solid #242424;
}

.row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: clamp(10px, 2.4vw, 32px);
  min-height: 64px;
}

.triangle {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aaa;
  cursor: pointer;
}

.triangle::before {
  display: inline-block;
  content: "";
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
  transition: transform 120ms ease;
}

.triangle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}

.triangle:hover,
.triangle:focus-visible {
  color: #fff;
}

.name {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name:hover,
.name:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.size,
.uploaded,
.count,
.event {
  color: #8e8e8e;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.more {
  margin-top: 12px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #8e8e8e;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.more:hover,
.more:focus-visible {
  color: #fff;
}

.audit {
  padding: 0 0 18px 34px;
}

.count {
  margin: 0 0 10px;
  color: #d0d0d0;
}

.events {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) max-content;
  gap: 20px;
}

.ip {
  overflow-wrap: anywhere;
}

.empty,
.error {
  margin: 0;
  padding: 24px 0;
  color: #777;
  font-size: 13px;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr;
  justify-items: center;
}

.auth-shell {
  width: min(100%, 320px);
  border: 0;
  place-self: center;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  color: #b5b5b5;
  font-size: 13px;
}

.auth-form input,
.auth-form button {
  min-height: 44px;
  border: 1px solid #343434;
  border-radius: 0;
  background: #000;
  color: #fff;
  font: inherit;
}

.auth-form input {
  padding: 0 12px;
  outline: none;
}

.auth-form input:focus {
  border-color: #888;
}

.auth-form button {
  cursor: pointer;
}

.auth-form button:hover,
.auth-form button:focus-visible {
  border-color: #888;
}

.auth-error {
  margin: 0;
  color: #c87575;
  font-size: 12px;
}

@media (max-width: 640px) {
  body {
    padding: 12px 16px;
  }

  .row {
    grid-template-columns: 22px minmax(0, 1fr) max-content;
    gap: 10px;
    padding: 12px 0;
  }

  .uploaded {
    grid-column: 2 / 4;
  }

  .audit {
    padding-left: 32px;
  }

  .event {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
