.sj-questions {
  max-width: 1040px;
  margin: 0 auto;
  padding-bottom: 32px;
}

.sj-questions > .h1-heading {
  display: block;
  margin: 4px 0 14px;
  text-align: center;
}

.sj-question {
  margin: 8px 0;
}

.sj-question-summary {
  cursor: pointer;
  padding: 14px 18px;
  color: var(--text-blue);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}

.sj-question-summary::marker {
  color: var(--pri-yellow);
}

.sj-question-number {
  color: #a06800;
  font-size: 0.875rem;
  font-weight: 700;
}

body.dark-theme .sj-question-number {
  color: var(--pri-yellow);
}

.sj-question-title {
  color: var(--text-blue);
  font-weight: 700;
}

.sj-question-summary:focus-visible {
  outline: 2px solid var(--pri-yellow);
  outline-offset: -2px;
  border-radius: 10px;
}

.sj-question-completed {
  color: #15803d;
  font-size: 0.8rem;
  margin-left: 8px;
}

.sj-question-editor .cr-try-btn[hidden],
.sj-question-editor .cr-textarea[hidden],
.sj-question-completed[hidden],
.sj-question-answer[hidden] {
  display: none !important;
}

.sj-question-expected {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--body-bg);
  color: var(--pro-h1-h-p);
  font-size: 0.875rem;
}

.sj-question-expected strong {
  color: var(--text-blue);
  font-weight: 700;
}

.sj-question-expected code {
  color: var(--text-blue);
  font: 600 0.875rem/1.5 Menlo, Consolas, Monaco, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.sj-question-expected-note {
  font-size: 0.8rem;
}

body.dark-theme .sj-question-expected {
  background: rgba(255, 255, 255, 0.05);
}

.sj-question-code .cm-editor {
  height: 210px;
  background: #1e1e2e;
  color: #cdd6f4;
  font: 14.5px/1.75 Menlo, Consolas, Monaco, "Courier New", monospace;
}

.sj-question-code .cm-scroller {
  overflow: auto;
  font: inherit;
}

.sj-question-code .cm-content {
  padding: 18px 22px;
  caret-color: #fff;
  font-family: inherit;
  letter-spacing: normal;
}

.sj-question-code .cm-line {
  padding: 0;
}

.sj-question-code .cm-editor.cm-focused {
  outline: 1px solid rgba(255, 255, 255, 0.25);
  outline-offset: -1px;
}

.sj-question-code .sj-cm-keyword { color: #ff79c6; }
.sj-question-code .sj-cm-string { color: #f1fa8c; }
.sj-question-code .sj-cm-number { color: #bd93f9; }
.sj-question-code .sj-cm-comment { color: #9aa8c2; }
.sj-question-code .sj-cm-function { color: #50fa7b; }

.code-container--light .sj-question-code .cm-editor {
  background: #f5f5fa;
  color: #383a42;
}
.code-container--light .sj-question-code .cm-editor.cm-focused { outline-color: rgba(37, 38, 95, 0.25); }
.code-container--light .sj-question-code .cm-content { caret-color: #383a42; }
.code-container--light .sj-question-code .sj-cm-keyword { color: #c91b76; }
.code-container--light .sj-question-code .sj-cm-string { color: #986801; }
.code-container--light .sj-question-code .sj-cm-number { color: #6f42c1; }
.code-container--light .sj-question-code .sj-cm-comment { color: #6a737d; }
.code-container--light .sj-question-code .sj-cm-function { color: #1a8b2e; }

.sj-question-editor .cr-results {
  padding: 0;
  background: transparent;
}

.sj-question-editor .cr-output,
.sj-question-editor .cr-error {
  margin: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 0 0 10px 10px;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.sj-question-editor .cr-output {
  background: #0f0f1a;
  color: #cdd6f4;
}

.sj-question-editor .cr-error {
  color: #ff4d4f;
}

.code-container--light.sj-question-editor .cr-output {
  background: #ededf5;
  color: #383a42;
}

.code-container--light.sj-question-editor .cr-error {
  color: #c0392b;
}

.sj-question-answer {
  margin-top: 12px;
}

.sj-question-answer pre {
  overflow-x: auto;
  padding: 12px;
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: 6px;
}

.sj-question-answer pre > code {
  display: block;
  padding: 0;
  line-height: inherit;
}

.sj-question-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--body-bg);
  color: var(--pro-h1-h-p);
  font-size: 0.875rem;
  line-height: 1.5;
}

.sj-question-status:empty {
  display: none;
}

.sj-question-status[data-state]::before {
  flex: 0 0 auto;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.sj-question-status[data-state="success"] {
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
}

.sj-question-status[data-state="success"]::before {
  content: "\f058";
}

.sj-question-status[data-state="failure"],
.sj-question-status[data-state="error"] {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
}

.sj-question-status[data-state="failure"]::before,
.sj-question-status[data-state="error"]::before {
  content: "\f06a";
}

.sj-question-status[data-state="warning"] {
  background: rgba(240, 154, 15, 0.12);
  color: #713f12;
}

.sj-question-status[data-state="warning"]::before {
  content: "\f071";
}

body.dark-theme .sj-question-status[data-state="success"] {
  color: #bbf7d0;
}

body.dark-theme .sj-question-status[data-state="failure"],
body.dark-theme .sj-question-status[data-state="error"] {
  color: #ff9393;
}

body.dark-theme .sj-question-status[data-state="warning"] {
  color: #fde68a;
}

@media (max-width: 600px) {
  .sj-question-summary {
    padding: 10px 12px;
  }

  .sj-question-code .cm-editor {
    font-size: 13px;
  }

  .sj-question-code .cm-content {
    padding: 12px;
  }
}
