.tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto 10px;
}

.radiotab {
  position: absolute;
  opacity: 0;
}

.label {
  padding: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14pt;
  color: #7f7f7f;
  text-align: center;
  width: 33.33%;
  border: 1px solid transparent;
  border-bottom: none;
}

.label:hover {
  background: #d8d8d8;
  border: 1px solid #ccc;
  border-bottom: none;
}

.radiotab:checked + .label {
  background: #f0f0f0;
  color: black;
  border: 1px solid #ccc;
  border-bottom: none;
}

.panel {
  display: none;
  width: 100%;
  border-top: 1px solid #ccc;
  order: 99;
}

.radiotab:checked + .label + .panel {
  display: block;
}

@media (max-width: 599px) {

  .label[for="words"] {
    width: 30%;
  }

  .label[for="vocabs"] {
    width: 40%;
  }

  .label[for="articles"] {
    width: 30%;
  }
}

@media (prefers-color-scheme: dark) {

  .panel {
    border-top: 1px solid #666;
  }

  .label {
    color: #bdc1c6;
  }

  .label:hover {
    background: #373e48;
    border: 1px solid #666;
    border-bottom: none;
  }

  .radiotab:checked + .label {
    background: #373e48;
    color: white;
    border: 1px solid #666;
    border-bottom: none;
  }
}
