@import url("https://fonts.googleapis.com/css2?family=Overpass:wght@200;300;400;500;600;700&family=Open+Sans:wght@300;400;500;600;700&display=swap");

*, *::before, *::after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.container {
  max-width: 65em;
}

.container > input[type="radio"] {
  position: absolute;
  left: -200vw;
}

.container > label {
  position: relative;
  display: inline-block;
  padding: 0px 10px 25px;
  border: 1px solid transparent;
  border-bottom: 0;
  cursor: pointer;
  font-weight: 600;
}

.container > label::after {
  content: "";
  position: absolute;
  left: 15px;
  bottom: 10px;
  width: 22px;
  height: 4px;
  background: #8d8d8d;
}

.container > label:hover, .container > input:focus + label {
  color: #06c;
}

.container > label:hover::after, .container > input:focus + label::after, .container > input:checked + label::after {
  background: #06c;
}

.container > input:checked + label {
  border-color: #ccc;
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
}

.tab-content {
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}

.tab-content section.tab-panel {
}

/* The magic */
.container section.tab-panel {
  display: none;
}

.container > input:first-child:checked ~ .tab-content > section.tab-panel:first-child,
.container > input:nth-child(3):checked ~ .tab-content > section.tab-panel:nth-child(2),
.container > input:nth-child(5):checked ~ .tab-content > section.tab-panel:nth-child(3),
.container > input:nth-child(7):checked ~ .tab-content > section.tab-panel:nth-child(4),
.container > input:nth-child(9):checked ~ .tab-content > section.tab-panel:nth-child(5),
.container > input:nth-child(11):checked ~ .tab-content > section.tab-panel:nth-child(6),
.container > input:nth-child(13):checked ~ .tab-content > section.tab-panel:nth-child(7),
.container > input:nth-child(15):checked ~ .tab-content > section.tab-panel:nth-child(8) {
  display: block;
}