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

body {
  background-color: #fafafa;
  font-family: "Inter", "Open Sans", Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.5em;
  color: #333;
  position: relative;
}

.container {
  max-width: 960px;
  margin: 150px auto;
}

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

.container > label {
  position: relative;
  display: inline-block;
  padding: 15px 15px 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;
}

.tab-content section.tab-panel {
  padding: 30px 0;
}

/* 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) {
  display: block;
}
