table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  border-bottom: 2px solid black;
}

thead {
  border: 0;
  border-radius: none;
  font-family: inherit;
  font-weight: 700;
  font-size: inherit;
  padding: 0.5em;
  margin-bottom: 1px;
}

thead th.ascending::after {
  content: "👇";
  display: inline-block;
  margin-left: 1em;
}

thead th.descending::after {
  content: "☝️";
  display: inline-block;
  margin-left: 1em;
}

tbody td {
  padding: 0.5em;
  border-bottom: 1px solid #ccc;
}
@media screen and (max-width: 600px) {
  table {
    width: 100%;
  }
  thead {
    display: none;
  }
  tr:nth-of-type(2n) {
    background-color: inherit;
  }
  tr td:first-child {
    background: black;
    font-weight: bold;
    font-size: 1.3em;
  }
  tbody td {
    display: block;
    text-align: center;
  }
  tbody td:before {
    content: attr(data-th);
    display: block;
    text-align: center;
  }
}

@media screen and (max-width: 320px) {
  table {
    display: block;
    overflow-x: auto;
  }
}
