/* trashwave hub, in the crush look of 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;
  --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;
  --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; }
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 { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.dim { color: var(--dim); }
: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; }
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 36px 22px; }
.intro h1 { font-size: 16px; font-weight: 700; }
.sect { font-size: 12px; font-weight: 700; margin: 0 0 6px 22px; }

/* services, one row each */
.rows { list-style: none; border-top: 1px solid var(--faint); }
.row {
  display: grid;
  grid-template-columns: 22px 110px 190px minmax(0, 1fr) auto;
  align-items: baseline;
  min-height: 30px;
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--faint);
}
.row .m { text-align: center; visibility: hidden; }
.row .name { font-weight: 700; }
.row .host, .row .what, .row .stats { color: var(--dim); }
.row .what { padding-right: 14px; }
.row .stats { white-space: nowrap; }
.row:hover { background: var(--hover); }
.row:hover .m { visibility: visible; }
.row:focus-visible { outline: none; background: var(--ink); color: var(--canvas); }
.row:focus-visible .m { visibility: visible; }
.row:focus-visible .host, .row:focus-visible .what, .row:focus-visible .stats { color: inherit; opacity: 0.75; }
.later { 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: 32px 14px 24px; }
  .intro { margin-left: 8px; }
  .sect, .later { margin-left: 8px; }
  .row {
    grid-template-columns: 8px minmax(0, 1fr) auto;
    grid-template-areas: "m name stats" "m host host" "m what what";
    padding: 12px 12px 12px 0;
  }
  .row .m { grid-area: m; visibility: hidden !important; }
  .row .name { grid-area: name; font-size: 15px; }
  .row .stats { grid-area: stats; }
  .row .host { grid-area: host; }
  .row .what { grid-area: what; padding: 2px 0 0; }
  .statusbar { height: calc(28px + env(safe-area-inset-bottom)); padding: 0 12px env(safe-area-inset-bottom); }
  .statusbar .keys { display: none; }
}
