body {
  margin: 0;
  font: 14px/1.35 Arial, Helvetica, sans-serif;
  color: #111;
  background: #fff;
}

h1 {
  font-size: 1.25rem;
  margin: 0;
}

header,
#filters,
.tools {
  padding: 8px 12px 0;
}

#updated {
  margin: 2px 0 6px;
  color: #333;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: 8px;
}

#q {
  font: inherit;
  padding: 4px 6px;
  width: min(100%, 16rem);
}

#count { color: #333; }

.group {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  align-items: center;
  margin: 0 0 4px;
}

.group-name {
  font-weight: 700;
  min-width: 5.5rem;
}

label { white-space: nowrap; }

.table-scroll {
  overflow: auto;
  max-height: 72vh;
  margin: 0 12px 16px;
  border-top: 1px solid #ccc;
}

table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
}

th,
td {
  padding: 4px 8px;
  border-bottom: 1px solid #e2e2e2;
  text-align: left;
  white-space: nowrap;
  background: #fff;
}

thead th {
  position: sticky;
  top: 0;
  background: #f3f3f3;
  z-index: 2;
}

th button {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
}

th.num,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

th.num button {
  width: 100%;
  text-align: right;
}

td.product {
  white-space: normal;
  min-width: 12rem;
  max-width: 22rem;
}

td.product,
th.product {
  position: sticky;
  left: 0;
  z-index: 1;
}

th.product { z-index: 3; background: #f3f3f3; }

.tag { color: #555; }

tr.out td { color: #777; }

tbody tr:hover td { background: #f6f8fb; }

a { color: #0645ad; }

.empty {
  text-align: center;
  color: #555;
  padding: 16px;
}

#error {
  color: #900;
  padding: 8px 12px;
}

@media (max-width: 640px) {
  body { font-size: 13px; }
  header, #filters, .tools { padding-left: 8px; padding-right: 8px; }
  .table-scroll { margin: 0 0 12px; max-height: 65vh; }
  th, td { padding: 4px 6px; }
  .group-name { min-width: 4.5rem; }
}
