.playground-page {
  min-height: 100vh;
}

.playground-brand {
  color: var(--ink);
  text-decoration: none;
}

.playground-main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 88px;
}

.playground-intro {
  max-width: 760px;
  margin-bottom: 28px;
}

.playground-intro .eyebrow {
  color: var(--gold);
  letter-spacing: .18em;
  font-size: .75rem;
  font-weight: 700;
}

.playground-intro h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.playground-intro p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
}

.playground-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.playground-run {
  min-height: 48px;
}

.playground-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.playground-pane {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.pane-heading {
  min-height: 62px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.pane-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.pane-heading > span {
  color: var(--muted);
  font-size: .8rem;
}

#pg-request,
#pg-response,
#pg-code {
  width: 100%;
  min-height: 470px;
  margin: 0;
  padding: 20px;
  border: 0;
  border-radius: 0;
  background: #090d1c;
  color: #e9e4d5;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow: auto;
  tab-size: 2;
}

#pg-request {
  resize: vertical;
  outline: none;
}

#pg-request:focus {
  box-shadow: inset 0 0 0 1px var(--gold);
}

.response-status.ok {
  color: #77c9aa;
}

.response-status.error {
  color: #ef8c84;
}

.code-card {
  padding: 0;
  overflow: hidden;
  margin-top: 18px;
}

.code-heading {
  flex-wrap: wrap;
}

.code-tabs {
  display: flex;
  gap: 8px;
}

.code-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  cursor: pointer;
}

.code-tab:hover,
.code-tab:focus-visible,
.code-tab.active {
  color: var(--gold);
  border-color: var(--gold);
}

#pg-code {
  min-height: 180px;
}

@media (max-width: 800px) {
  .playground-main {
    width: min(100% - 20px, 1220px);
    padding-top: 36px;
  }

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

  #pg-request,
  #pg-response {
    min-height: 360px;
  }

  .playground-page .site-header {
    align-items: flex-start;
  }

  .playground-page .site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
