:root {
  --playground-shell: 1440px;
}

html {
  color-scheme: dark;
  scroll-padding-top: 86px;
}

body.playground-page {
  min-width: 320px;
  color: #e9f1ed;
  background:
    radial-gradient(circle at 12% 4%, rgba(65, 139, 111, 0.2), transparent 24rem),
    radial-gradient(circle at 92% 62%, rgba(215, 146, 56, 0.1), transparent 28rem),
    #09120f;
}

.playground-page-shell {
  width: min(calc(100% - 64px), var(--playground-shell));
  margin-inline: auto;
}

.playground-page-header {
  position: sticky;
  z-index: 60;
  top: 0;
  border-bottom: 1px solid rgba(65, 88, 78, 0.86);
  background: rgba(10, 20, 16, 0.9);
  backdrop-filter: blur(18px);
}

.playground-page-header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.playground-page-brand {
  display: inline-flex;
  align-items: center;
  color: #f0f6f3;
  text-decoration: none;
  gap: 11px;
}

.playground-page-brand > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #0b1511;
  background: #74c9ad;
  border-radius: 9px 9px 3px 9px;
  font-family: Georgia, serif;
  font-size: 1.08rem;
  font-weight: 800;
}

.playground-page-brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.playground-page-brand strong {
  letter-spacing: 0.08em;
}

.playground-page-brand small {
  margin-top: 5px;
  color: #7f958b;
  font-size: 0.64rem;
}

.playground-page-actions,
.playground-mode-toggle {
  display: flex;
  align-items: center;
}

.playground-page-actions {
  gap: 10px;
}

.playground-mode-toggle {
  padding: 4px;
  background: #101d18;
  border: 1px solid #30483d;
  border-radius: 10px;
  gap: 3px;
}

.playground-mode-toggle button {
  min-height: 32px;
  padding: 5px 10px;
  color: #7f948b;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 750;
}

.playground-mode-toggle button.active {
  color: #0c1713;
  background: #74c9ad;
}

.playground-guide-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 13px;
  color: #b8cac2;
  background: #14231d;
  border: 1px solid #354f43;
  border-radius: 10px;
  text-decoration: none;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 750;
}

.playground-guide-link:hover {
  color: #eff7f3;
  border-color: #57927b;
}

.playground-page-main {
  position: relative;
  overflow: hidden;
  padding-bottom: 72px;
}

.playground-page-main::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.08;
  pointer-events: none;
  background-image: radial-gradient(#8db4a4 0.8px, transparent 0.8px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.playground-page-main > * {
  position: relative;
  z-index: 1;
}

.playground-page-hero {
  padding: 72px 0 44px;
}

.playground-page-hero-grid {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
}

.playground-page-kicker {
  margin-bottom: 14px;
  color: #79cbae;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.playground-page-hero h1 {
  max-width: 880px;
  margin-bottom: 17px;
  color: #f5faf7;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.playground-page-hero p:last-child {
  max-width: 690px;
  margin: 0;
  color: #8fa39a;
  font-size: clamp(0.92rem, 1.4vw, 1.08rem);
}

.playground-page-summary {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 8px;
}

.playground-page-summary div {
  display: flex;
  min-height: 88px;
  justify-content: flex-end;
  padding: 13px;
  background: rgba(17, 30, 25, 0.78);
  border: 1px solid #2f463c;
  border-radius: 12px;
  flex-direction: column;
}

.playground-page-summary dt {
  color: #c8e6da;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 800;
}

.playground-page-summary dd {
  margin: 4px 0 0;
  color: #70867c;
  font-size: 0.61rem;
}

.playground-page .playground-app {
  border-radius: 26px;
}

.playground-page .playground-panel {
  min-height: 630px;
  padding: 30px;
}

.playground-page .playground-workbench-head {
  padding: 27px 30px 22px;
}

.playground-page .playground-workbench-head h2 {
  margin: 0 0 7px;
  color: #f4f8f6;
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
}

.playground-page .playground-controls {
  padding: 16px 30px;
}

.playground-page .playground-truth-grid {
  margin-top: 24px;
}

.playground-page-footer {
  border-top: 1px solid #283c33;
  background: #07100d;
}

.playground-page-footer > div {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.playground-page-footer p,
.playground-page-footer a {
  margin: 0;
  color: #6f847b;
  font-size: 0.68rem;
}

.playground-page-footer a {
  color: #9ccab8;
  text-decoration: none;
}

@media (max-width: 980px) {
  .playground-page-shell {
    width: min(calc(100% - 40px), var(--playground-shell));
  }

  .playground-page-hero-grid {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .playground-page-summary {
    max-width: 460px;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 76px;
  }

  .playground-page-shell {
    width: min(calc(100% - 24px), var(--playground-shell));
  }

  .playground-page-header-inner {
    min-height: 66px;
    gap: 10px;
  }

  .playground-page-brand > span:last-child small {
    display: none;
  }

  .playground-page-actions {
    gap: 6px;
  }

  .playground-mode-toggle {
    padding: 3px;
  }

  .playground-mode-toggle button {
    min-height: 30px;
    padding-inline: 8px;
    font-size: 0.61rem;
  }

  .playground-guide-link {
    min-height: 38px;
    padding-inline: 9px;
    font-size: 0.63rem;
  }

  .playground-guide-link span {
    display: none;
  }

  .playground-page-hero {
    padding: 48px 0 30px;
  }

  .playground-page-hero h1 {
    font-size: clamp(2.7rem, 13vw, 4.2rem);
  }

  .playground-page-summary {
    max-width: none;
  }

  .playground-page-summary div {
    min-height: 72px;
    padding: 10px;
  }

  .playground-page .playground-panel {
    padding: 16px;
  }

  .playground-page .playground-workbench-head {
    padding: 20px 18px 16px;
  }

  .playground-page .playground-controls {
    padding: 12px 14px;
  }

  .playground-page-footer > div {
    min-height: 110px;
    align-items: flex-start;
    justify-content: center;
    padding-block: 28px;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 440px) {
  .playground-page-brand > span:first-child {
    width: 34px;
    height: 34px;
  }

  .playground-page-brand > span:last-child {
    display: none;
  }

  .playground-mode-toggle button {
    padding-inline: 7px;
    font-size: 0.57rem;
  }

  .playground-guide-link {
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .playground-page-summary {
    gap: 5px;
  }

  .playground-page-summary div {
    min-width: 0;
  }

  .playground-page-summary dt {
    font-size: 1rem;
  }

  .playground-page-summary dd {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
