.debug {
  display: grid;
  gap: var(--space-x-large);
  padding-inline: var(--space-medium);
  position: relative;
}

.debug section {
  display: grid;
  gap: var(--space-medium);
  margin-inline: auto;
  width: min(100%, 30em);
}

.debug section h2 {
  font-weight: 700;
  line-height: 1.3em;
  margin-bottom: -0.2625em;
  margin-top: -0.4875em;
}

.debug section h2 a {
  font-weight: inherit;
}

.debug section dl,
.debug section ul {
  background: rgba(var(--rgb-black), 0.02);
  border-radius: 0.25em;
  box-shadow:
    0 0 0 1px rgba(var(--rgb-black), 0.1),
    0 0 0.1em 0.02em rgba(var(--rgb-black), 0.05)
  ;
  display: grid;
  gap: 0.5em;
  overflow-x: auto;
  padding: var(--space-medium);
  white-space: nowrap;
}

.debug section dl dd,
.debug section dl li,
.debug section ul dd,
.debug section ul li {
  font-family: var(--font-family-monaspace);
  font-size: var(--font-size-xx-small);
  letter-spacing: normal;
  margin-bottom: -0.3625em;
  margin-top: -0.2875em;
}

.debug section dl {
  counter-reset: counter;
}

.debug section dl dt {
  font-size: var(--font-size-small);
  font-weight: 700;
  letter-spacing: var(--letter-spacing);
  margin-top: -0.3625em;
}

.debug section dl dd {
  counter-increment: counter;
}

.debug section dl dd:before {
  content: counter(counter) '.';
  display: inline-block;
  width: 3ch;
}

.debug section .output {
  position: relative;
}

.debug section .output button {
  background: var(--color-white);
  border-radius: 0.125em;
  box-shadow:
    0 0 0 1px rgba(var(--rgb-black), 0.1),
    0 0 0.1em 0.02em rgba(var(--rgb-black), 0.05)
  ;
  color: var(--color-black);
  cursor: pointer;
  display: flex;
  position: absolute;
  right: 0.2em;
  top: 0.2em;
}

.debug section .output button span {
  font-size: var(--font-size-xxx-small);
  letter-spacing: var(--letter-spacing-loose);
  line-height: 2.2em;
  padding-inline: 0.7625em;
  white-space: nowrap;
}



@media(hover: hover) {

  .debug section .output button {
    transition:
      box-shadow var(--transition),
      transform var(--transition)
    ;
    will-change: transform;
  }

  .debug section .output button:active {
    transform: scale(0.99) translateY(0.02375em);
  }

  .debug section .output button:focus,
  .debug section .output button:hover {
    box-shadow:
      0 0 0 1px rgba(var(--rgb-black), 0.85),
      0 0 0.1em 0.02em rgba(var(--rgb-black), 0.05)
    ;
  }

}



@media(min-width: 64em) {

  .debug {
    padding-inline: var(--space-neutral);
  }

}
