.root {
  @media (width > 900px) {
    display: flex;
    align-items: stretch;
    justify-content: center;
  }
}

.code {
  white-space: pre;
  font-family: var(--font-mono);
  line-height: 1.3;
  margin: 0 0 20px;
  box-shadow: var(--box-shadow);
  border-radius: 5px;
  background: white;
  color: #204588;
  overflow-x: auto;
  overflow-x: hidden;
  font-size: 14px;
  box-sizing: border-box;
  max-width: 100%;
  --padding: 20px;
  padding: var(--padding);
  tab-size: 1;
  letter-spacing: -0.03em;

  &:last-child {
    margin-bottom: 0;
  }

  @media (width > 900px) {
    letter-spacing: 0em;
    font-size: 16px;
    margin: 0 30px;
    width: 40ch;
    tab-size: 2;
    box-sizing: content-box;
    --padding: 30px;
  }
}

.result {
  position: relative;
  animation: appear 1200ms ease-in-out;
  animation-fill-mode: both;

  @media (width > 900px) {
    width: 75ch;
  }

  &:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: rfs(100px);
    bottom: 0px;
    background: linear-gradient(
      to bottom,
      rgba(42, 39, 52, 0%),
      rgba(42, 39, 52, 100%) 80%
    );
    z-index: 2;
  }
}

@keyframes appear {
  0% {
    opacity: 1;
  }
  10% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

.keyword {
  color: var(--extra-light-body-color);
}

.cursor {
  width: 0;
  height: 1em;
  margin: -2px 0px -3px 0;
  position: relative;
  display: inline;

  &:before {
    content: '';
    width: 3px;
    background-color: #d0d0d0;
    animation: cursor-blink 0.5s infinite linear both alternate;
    position: absolute;
    top: 0;
    left: 1px;
    bottom: 0;
  }
}

@keyframes cursor-blink {
  0%,
  30% {
    opacity: 0;
  }
  70%,
  100% {
    opacity: 1;
  }
}
