/* Локальная тема подсветки кода для вопросов type=code. */
.code-question-panel {
  margin: 10px 0 16px;
  overflow: hidden;
  border: 1px solid #26334d;
  border-radius: 14px;
  background: #111827;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
}
.code-question-toolbar {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px 0 13px;
  border-bottom: 1px solid rgba(148, 163, 184, .2);
  background: #182235;
  color: #cbd5e1;
}
.code-window-dots { display: inline-flex; gap: 5px; flex: 0 0 auto; }
.code-window-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.code-window-dots i:nth-child(1) { background: #fb7185; }
.code-window-dots i:nth-child(2) { background: #fbbf24; }
.code-window-dots i:nth-child(3) { background: #4ade80; }
.code-question-language { font: 700 11px/1.2 var(--mono, ui-monospace, monospace); letter-spacing: .04em; }
.code-question-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #94a3b8; }
.code-copy-button {
  appearance: none; border: 1px solid rgba(148,163,184,.28); border-radius: 8px;
  background: rgba(255,255,255,.04); color: #dbeafe; padding: 5px 9px;
  font: 650 10px/1.2 inherit; cursor: pointer;
}
.code-copy-button:hover { background: rgba(255,255,255,.1); }
.code-question-panel pre[class*="language-"] {
  margin: 0 !important;
  border-radius: 0;
  background: #111827 !important;
  padding-top: 15px !important;
  padding-bottom: 15px !important;
  font-size: 13px;
  line-height: 1.62;
  overflow: auto;
  max-height: 520px;
  tab-size: 4;
}
.code-question-panel code[class*="language-"] { font-family: var(--mono, "SFMono-Regular", Consolas, "Liberation Mono", monospace); text-shadow: none; }
.code-option-source {
  display: block;
  margin: 2px 0;
  padding: 8px 10px;
  overflow-x: auto;
  border: 1px solid #26334d;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
  font: 12.5px/1.55 var(--mono, "SFMono-Regular", Consolas, monospace);
  white-space: pre;
  tab-size: 4;
}
.code-option-source code[class*="language-"] { font: inherit; text-shadow: none; white-space: pre; }
.opt-label:has(.code-option-source) { align-items: flex-start; }
.opt-label:has(.code-option-source) input { margin-top: 13px; }
@media (max-width: 560px) {
  .code-question-panel { margin-left: -4px; margin-right: -4px; border-radius: 11px; }
  .code-question-panel pre[class*="language-"] { font-size: 12px; line-height: 1.58; }
  .code-question-title { display: none; }
  .code-copy-button { padding: 5px 7px; }
}

/* Токены: контрастная тёмная палитра в духе современных IDE. */
code[class*="language-"], pre[class*="language-"] { color: #e5e7eb; background: none; text-shadow: none; }
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #7f8ea3; font-style: italic; }
.token.punctuation { color: #cbd5e1; }
.token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: #fb7185; }
.token.boolean, .token.number { color: #c4b5fd; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #86efac; }
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string { color: #67e8f9; }
.token.atrule, .token.attr-value, .token.keyword { color: #93c5fd; }
.token.function, .token.class-name { color: #fde68a; }
.token.regex, .token.important, .token.variable { color: #fdba74; }
.token.important, .token.bold { font-weight: 700; }
.token.italic { font-style: italic; }
.token.entity { cursor: help; }
