:root {
  --playground-code-background: rgb(12, 16, 33);
  --playground-code-default-color: rgb(248, 248, 248);
  --playground-code-cursor-color: rgb(167, 167, 167);
  --playground-code-selection-background: rgb(37, 59, 118);
  --playground-code-gutter-background: rgb(12, 16, 33);
  --playground-code-gutter-border-right: 0px;
  --playground-code-linenumber-color: rgb(136, 136, 136);
  --playground-code-atom-color: rgb(216, 250, 60);
  --playground-code-attribute-color: rgb(141, 166, 206);
  --playground-code-builtin-color: rgb(141, 166, 206);
  --playground-code-comment-color: rgb(174, 174, 174);
  --playground-code-def-color: rgb(141, 166, 206);
  --playground-code-keyword-color: rgb(251, 222, 45);
  --playground-code-meta-color: rgb(216, 250, 60);
  --playground-code-number-color: rgb(216, 250, 60);
  --playground-code-operator-color: rgb(251, 222, 45);
  --playground-code-qualifier-color: rgb(248, 248, 248);
  --playground-code-string-color: rgb(97, 206, 60);
  --playground-code-string-2-color: rgb(97, 206, 60);
  --playground-code-tag-color: rgb(141, 166, 206);
  --playground-code-type-color: rgb(248, 248, 248);
  --playground-code-variable-color: rgb(255, 100, 0);
  --playground-code-variable-2-color: rgb(248, 248, 248);
  --playground-code-variable-3-color: rgb(248, 248, 248);
  --playground-code-callee-color: rgb(248, 248, 248);
  --playground-code-property-color: rgb(248, 248, 248);

  --playground-preview-toolbar-background: var(--playground-code-background);
  --playground-border: 5px solid var(--playground-code-tag-color);
  --playground-preview-toolbar-foreground-color: #fff;
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: var(--playground-code-background);
  color: var(--playground-code-default-color);
  line-height: 1.5;
  font-size: 18px;
}

a {
  color: var(--playground-code-attribute-color);
}

blockquote {
  margin: 2em 0;
  padding: 0;
  font-weight: 400;
  border: 4px solid var(--playground-code-attribute-color);
  border-top: none;
  border-radius: 4px;
  padding: 0 0.5em;
  background: var(--playground-code-selection-background);
}

blockquote::before {
  display: block;
  content: "👋 Try in the editor...";
  font-size: 1em;
  font-weight: 600;
  background: var(--playground-code-attribute-color);
  color: var(--playground-code-background);
  border-bottom: 2px solid var(--playground-code-attribute-color);
  margin: -0.25em -0.5em -0.25em -0.5em;
  padding: 0.25em 0.5em;
  padding-bottom: 0;
}

.view {
  display: grid;
  grid-template-columns: 600px 1fr;
}

.tutorial,
.editorAndPreview {
  height: 100vh;
  display: inline-block;
}

.tutorial {
  background-color: var(--playground-code-background);
  color: var(--playground-code-default-color);
  border-right: 3px solid var(--playground-code-tag-color);
  overflow: auto;
}

.tutorial header,
.tutorial footer {
  background-color: var(--playground-code-gutter-background);
  color: #fff;
  position: sticky;
  padding: 0.75em;
}

.tutorial header {
  top: 0;
  border-bottom: 3px solid var(--playground-code-tag-color);
}

.tutorial footer {
  bottom: 0;
  border-top: 3px solid var(--playground-code-tag-color);
  display: flex;
  justify-content: space-between;
}

.tutorial footer a {
  color: #fff;
}

.tutorial header h1 {
  margin: 0;
  font-size: 1.25em;
}

.tutorial article {
  padding: 1em;
}

playground-file-editor {
  height: 40vh;
}

playground-preview {
  border-top: 3px solid var(--playground-code-tag-color);
  height: calc(60vh - 3px);
}

pre::after {
  content: "ⓘ Copy and paste this code in the interactive editor";
  height: auto;
  padding:0.5em;
  font-size: 14px;
  background: #ddac4f;
  color: #421;
  display: block;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  font-weight: 600;
}

.hint {
  border: 4px solid #ffec8c;
  border-radius: 4px;
  padding: 0.5em;
  margin: 1em 0em;
}

.hint summary::before {
  content: "Feeling stuck?";
  margin-right: 0.5em;
}

.hint summary {
  font-weight: 600;
  background: #ffec8c;
  color: #421;
  padding: 0.25em 0.5em;
  margin: -0.5em;
  cursor: pointer;
}

/* Added by Ben on 21 Apr 2023: target only hints that follow a tuutorial to make closer, but leave standalone hints out of this style. */
blockquote + details.hint {
  margin: -1.5em 0em 1em;
}

/* Added by Ben on 21 Apr 2023: slightly highlight inline code text */
em > code {
  color: lightgrey;
}