/* mirror.ziesel.network — ngx-fancyindex theme in the ziesel.network house
   style (brand/BRAND-GUIDE.md). Colours and type come from tokens.css; this
   file only lays out the listing (tokens.css is linked before it). */

html, body { background: var(--paper); color: var(--ink); }
body {
  margin: 0;
  font: 400 16px/26px var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--violet); }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.zm-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

/* Header: lockup left, location right */
.zm-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-8) 0 var(--space-4);
  border-bottom: 1px solid var(--line);
}
.zm-logo { display: inline-flex; padding: var(--space-2) 0; }
.zm-logo img { display: block; height: 36px; width: auto; }
.zm-where {
  font: 400 13px/22px var(--font-mono);
  font-variation-settings: "wdth" 87.5;
  color: var(--fawn-deep);
}

main { display: flex; flex-direction: column; gap: var(--space-6); }

/* Path, filled in by fancyindex after the header */
h1.zm-path {
  margin: 0;
  font: 400 26px/32px var(--font-display);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* The listing */
#list {
  width: 100%;
  border: 0;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 15px;
  line-height: 22px;
}
#list th, #list td { width: auto !important; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); }
#list tr, #list tr:nth-child(even) { background: transparent; }
#list tbody tr:hover { background: var(--lilac-wash); }
#list thead th {
  background: transparent;
  border-bottom: 1px solid var(--line-strong);
  font: 700 12px/16px var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
#list thead th a { color: var(--ink-muted); text-decoration: none; }
#list thead th a:hover { color: var(--violet); text-decoration: underline; }
#list thead th { text-align: left; }
/* The name column takes the room; size and date stay compact on the right */
#list th:first-child, #list td.link { width: 100% !important; padding-left: 0; }
#list th:last-child, #list td.date { padding-right: 0; }

#list td.link { white-space: normal; overflow-wrap: anywhere; }
#list td.link a {
  font: 400 14px/22px var(--font-mono);
  font-variation-settings: "wdth" 87.5;
  text-decoration: none;
  color: var(--ink);
}
#list td.link a:hover { color: var(--violet); text-decoration: underline; }
/* Directories (their links end in a slash) */
#list td.link a[href$="/"] { font-weight: 700; color: var(--violet); }
#list td.size, #list td.date, #list th:nth-child(2), #list th:nth-child(3) { text-align: right; }
#list td.size, #list td.date {
  font: 400 13px/22px var(--font-mono);
  font-variation-settings: "wdth" 87.5;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* Footer */
.zm-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-4);
  padding: var(--space-6) 0 var(--space-12);
  border-top: 1px solid var(--line);
  font: 400 14px/22px var(--font-sans);
  color: var(--ink-muted);
}
/* bwbar: live bandwidth bar (ubar.png) and its reading (ubar.txt, via SSI) */
.zm-bwbar { display: flex; flex-direction: column; gap: var(--space-2); }
.zm-bwbar p { margin: 0; font: 400 13px/22px var(--font-mono); font-variation-settings: "wdth" 87.5; font-variant-numeric: tabular-nums; color: var(--ink); }
.zm-bwbar img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }

/* Status page: the standard vnStat images */
.zm-status { gap: var(--space-8); }
.zm-status > p { margin: 0; max-width: 65ch; }
.zm-status__grid { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-12); align-items: flex-start; }
.zm-status__fig { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); max-width: 100%; }
.zm-status__fig figcaption { font: 700 12px/16px var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.zm-status__fig img { display: block; max-width: 100%; height: auto; }

.zm-mono { font-family: var(--font-mono); font-variation-settings: "wdth" 87.5; font-size: 0.875em; }

.zm-stats { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; }
.zm-stats div { display: flex; gap: var(--space-2); align-items: baseline; }
.zm-stats dt { font: 700 12px/16px var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; }
.zm-stats dd {
  margin: 0;
  font: 400 13px/22px var(--font-mono);
  font-variation-settings: "wdth" 87.5;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.zm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.zm-meta img { width: 20px; height: 20px; display: block; }

@media (max-width: 560px) {
  .zm-header { padding-top: var(--space-6); }
  #list th:nth-child(3), #list td.date { display: none; }
}
