:root {
  --tabs--label-text: #8c8c8c;
  --tabs--label-text--active: #368ce2;
  --tabs--label-text--hover: #1d73c9;
  --tabs--label-background--active: transparent;
  --tabs--label-background--hover: #f7f7f7;
  --tabs--border: #e6e6e6;
  --tabs--border--active: var(--tabs--label-text--active);
}
/* Hide radio buttons */
.tab-set > input {
  position: absolute;
  opacity: 0;
}

/* Tab set container */
.tab-set {
  border-radius: 2px;
  display: flex;
  flex-wrap: wrap;
  margin: 0.75em 0;
  position: relative;
}

/* Tab label */
.tab-set > label {
  z-index: 1;

  width: auto;
  border-bottom: 2px solid transparent;
  padding: 1em 1.25em 0.5em;

  color: var(--tabs--label-text);
  transition: color 250ms;

  cursor: pointer;

  font-size: 0.875em;
  font-weight: 700;
}

/* Active tab label */
.tab-set > input:checked + label {
  color: var(--tabs--label-text--active);
  background: var(--tabs--label-background--active);
  border-color: var(--tabs--border--active);
}
.tab-set > input:checked + label:hover {
  border-color: var(--tabs--border--active);
}

/* Focused tab label */
.tab-set > input:focus + label {
  outline-style: auto;
}

.tab-set > input:not(.focus-visible) + label {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Hovered label */
html .tab-set > label:hover {
  color: var(--tabs--label-text--hover);
  background: var(--tabs--label-background--hover);
  border-color: var(--tabs--border);
}

/* Tab content */
.tab-content {
  order: 99;
  display: none;
  width: 100%;
  box-shadow: 0 -2px var(--tabs--border);
}
/* Show content, when input is checked. */
.tab-set > input:checked + label + .tab-content {
  display: block;
}
.tab-content > p:first-child {
  margin-top: 0.75rem;
}
/* Remove the top border on first code block */
.tab-content > [class^="highlight-"]:first-child .highlight {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Remove margins on children */
.tab-content > *:first-child {
  margin-top: 0;
}
.tab-content > *:last-child {
  margin-bottom: 0;
}

/* Remove margins on nested tabs */
.tab-content > .tab-set {
  margin: 0;
}
