/* junk, in the crush look of the hub and the map: "frost" (light) and "slate" (dark) */

@font-face {
  font-family: "DejaVu Sans Mono";
  src: url("/fonts/DejaVuSansMono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Sans Mono";
  src: url("/fonts/DejaVuSansMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root,
[data-theme="light"] {
  --canvas: #f4f6f9;
  --ink: #141a22;
  --dim: #5d6876;
  --faint: #d6dde6;
  --field: #ffffff;
  --hover: rgba(26, 43, 74, 0.063);
  --bar: #28303b;
  --bar-ink: #edf1f6;
  --bar-dim: #95a1b1;
  --live: #2452c4;
  color-scheme: light;
}
[data-theme="dark"] {
  --canvas: #25282e;
  --ink: #e2e4e8;
  --dim: #979ca5;
  --faint: #3b3f48;
  --field: #1f2126;
  --hover: rgba(255, 255, 255, 0.063);
  --bar: #1b1d22;
  --bar-ink: #e2e4e8;
  --bar-dim: #8d929b;
  --live: #8aa8ff;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* the filter hides rows with the hidden attribute; ".row { display: grid }" would beat the
   browser's own rule for it */
[hidden] { display: none !important; }
html { height: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100dvh;
  font: 12px/1.5 "DejaVu Sans Mono", ui-monospace, monospace;
  background: var(--canvas);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.dim { color: var(--dim); }
.ln { color: var(--live); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 1px; }
::selection { background: var(--ink); color: var(--canvas); }

/* top bar */
.topbar {
  flex: none;
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 4px;
  border-bottom: 1px solid var(--faint);
}
.tab { padding: 0 6px; height: 18px; line-height: 18px; white-space: nowrap; }
a.tab:hover, button.tab:hover { background: var(--hover); }
.tab.sel { background: var(--ink); color: var(--canvas); }
.spacer { flex: 1; }

/* page */
.view { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 56px 16px 32px; }
.intro { margin: 0 0 30px 22px; max-width: 640px; }
.intro h1 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.intro p + p { margin-top: 8px; }
.sect { display: flex; align-items: center; gap: 12px; margin: 0 0 6px 22px; }
.sect h2 { font-size: 12px; font-weight: 700; }
.filter {
  width: 220px;
  height: 22px;
  padding: 0 6px;
  background: var(--field);
  border: 1px solid var(--faint);
  border-radius: 0;
  outline: none;
}
.filter:focus { border-color: var(--ink); }

/* artists, one row each */
.rows { list-style: none; border-top: 1px solid var(--faint); }
.row {
  display: grid;
  /* fixed last column: every row is its own grid, so "auto" would shift the middle column */
  grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.15fr) 170px;
  align-items: baseline;
  gap: 0 12px;
  min-height: 28px;
  padding: 5px 10px 5px 0;
  border-bottom: 1px solid var(--faint);
  outline: none;
}
.row .m { text-align: center; visibility: hidden; }
.row .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .host, .row .count { color: var(--dim); }
.row .host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row a.host:hover { color: var(--ink); text-decoration: underline; }
.row .count { white-space: nowrap; text-align: right; }
.row:hover { background: var(--hover); }
.row:hover .m { visibility: visible; }
.row:focus { background: var(--ink); color: var(--canvas); }
.row:focus .m { visibility: visible; }
.row:focus .host, .row:focus .count { color: inherit; opacity: 0.75; }
.none { margin: 10px 0 0 22px; }

/* status bar */
.statusbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 24px;
  padding: 0 8px;
  background: var(--bar);
  color: var(--bar-ink);
  white-space: nowrap;
}
.statusbar .r { margin-left: auto; display: flex; gap: 14px; color: var(--bar-dim); }

/* phone */
@media (max-width: 700px) {
  body { font-size: 13px; }
  .topbar { height: 40px; }
  .tab { height: 28px; line-height: 28px; padding: 0 8px; }
  .view { padding: 28px 14px 24px; }
  .intro, .sect, .none { margin-left: 8px; }
  .filter { flex: 1; width: auto; min-width: 0; height: 30px; font-size: 16px; }
  .row {
    grid-template-columns: 8px minmax(0, 1fr) auto;
    grid-template-areas: "m name count" "m host host";
    padding: 10px 12px 10px 0;
  }
  .row .m { grid-area: m; visibility: hidden !important; }
  .row .name { grid-area: name; font-size: 14px; }
  .row .count { grid-area: count; }
  .row .host { grid-area: host; }
  .statusbar { height: calc(28px + env(safe-area-inset-bottom)); padding: 0 12px env(safe-area-inset-bottom); }
  .statusbar .keys { display: none; }
}
