.playground-page {
  max-width: 92rem;
  min-height: calc(100vh - 3.25rem);
  padding-bottom: 4rem;
}

.panel-label,
.runtime-status {
  color: var(--ink-dim);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.runtime-status {
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

.runtime-status::before {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.55rem;
  background: oklch(82% 0.18 80);
  content: "";
}

.runtime-status[data-ready="true"]::before {
  background: var(--accent);
}

.playground-runner {
  display: grid;
  grid-template-columns: 13rem minmax(28rem, 1fr) 20rem;
  min-width: 0;
  min-height: 34rem;
  margin: 3rem 0 0;
  border: 1px solid var(--color-tin-1);
}

.playground-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.8rem;
  padding: 0 1rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--color-tin-1);
}

.playground-panel-title strong {
  font-size: 0.78rem;
}

.example-library,
.playground-editor,
.playground-output {
  min-width: 0;
}

.example-library,
.playground-editor {
  border-right: 1px solid var(--color-tin-1);
}

.example-library {
  overflow-y: auto;
  background: #090a0b;
}

.example-list {
  display: flex;
  flex-direction: column;
}

.example-button {
  appearance: none;
  padding: 0.9rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--color-tin-1);
  color: var(--ink-dim);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}

.example-button:hover,
.example-button:focus-visible,
.example-button[aria-current="true"] {
  color: #fff;
  background: var(--color-tin-1);
  outline: none;
}

.example-button[aria-current="true"] {
  box-shadow: inset 2px 0 var(--accent);
}

.playground-editor .code-block,
.playground-editor .code-highlight,
.playground-editor .code-editable {
  min-height: 18rem;
}

.playground-editor .code-highlight,
.playground-editor .code-editable {
  padding: 1.25rem;
}

.playground-output {
  position: relative;
  min-height: 100%;
  background: #040505;
}

.playground-output .result:not(:empty) {
  min-height: 27rem;
  margin: 0;
  padding: 1.25rem;
  background: transparent;
}

.output-empty {
  padding: 1.25rem;
  color: var(--ink-dim);
  font-size: 0.78rem;
  line-height: 1.6;
}

.result:not(:empty) + .output-empty {
  display: none;
}

.playground-runner .actions {
  min-height: 2.8rem;
  border-top: 1px solid var(--color-tin-1);
}

.playground-runner .actions::after {
  align-self: center;
  margin-left: auto;
  padding-right: 1rem;
  color: var(--ink-dim);
  content: "ctrl/command + enter to run";
  font-size: 0.65rem;
}

@media (max-width: 1000px) {
  .playground-runner {
    grid-template-columns: 11rem minmax(0, 1fr);
  }

  .playground-output {
    grid-column: 1 / -1;
    min-height: 10rem;
    border-top: 1px solid var(--color-tin-1);
  }

  .playground-output .result:not(:empty) {
    min-height: 0;
  }

  .playground-editor {
    border-right: 0;
  }
}

@media (max-width: 700px) {
  .playground-page {
    padding-inline: 1rem;
  }

  .playground-runner {
    grid-template-columns: 1fr;
  }

  .example-library,
  .playground-editor {
    border-right: 0;
    border-bottom: 1px solid var(--color-tin-1);
  }

  .example-library {
    max-height: none;
  }

  .example-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playground-runner .actions::after {
    display: none;
  }
}
