/* Directory listings for the backup website. Served by the listing function
   at /_listing/style.css: the site's Content-Security-Policy allows no inline
   styles. */

:root {
  color-scheme: light dark;
  --fg: #1f2328;
  --muted: #59636e;
  --bg: #ffffff;
  --rule: #d1d9e0;
  --stripe: #f6f8fa;
  --link: #0969da;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #f0f6fc;
    --muted: #9198a1;
    --bg: #0d1117;
    --rule: #3d444d;
    --stripe: #151b23;
    --link: #4493f8;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

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

a:hover {
  text-decoration: underline;
}

header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
}

header a {
  color: var(--fg);
  font-weight: 600;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  margin: 4px 0 16px;
  font-size: 1.2rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

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

th,
td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

tbody tr:nth-child(even) {
  background: var(--stripe);
}

td.name {
  overflow-wrap: anywhere;
}

.size,
.date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.size {
  text-align: right;
}

td.date {
  color: var(--muted);
}

.note,
.more {
  margin-top: 16px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .date {
    display: none;
  }
}
