pre code.hljs {
  display: block;
  overflow-x: auto;
  padding: 1em
}

code.hljs {
  padding: 3px 5px
}

/* Darcula — палитра из GoLand/IntelliJ IDEA */
.hljs {
  color: #a9b7c6;
  background: #2b2b2b
}

/* TipTap: CodeBlockLowlight подсвечивает через decorations и не ставит класс hljs на pre */
.ProseMirror pre,
.ProseMirror pre code {
  background: #2b2b2b;
  color: #a9b7c6;
}

/* TipTap: таблицы в редакторе и превью */
.tiptap table,
.ProseMirror table {
  border-collapse: collapse;
  margin: 0.5rem 0;
  width: auto;
  max-width: 100%;
  table-layout: auto;
}
.tiptap table th,
.tiptap table td,
.ProseMirror table th,
.ProseMirror table td {
  border: 1px solid #cdd5df;
  padding: 0.4rem 0.6rem;
  vertical-align: top;
  word-break: break-word;
}
.tiptap table td p,
.tiptap table th p,
.ProseMirror table td p,
.ProseMirror table th p {
  margin: 0;
  padding: 0;
}
.tiptap table th,
.ProseMirror table th {
  background: #f3f4f6;
  font-weight: 600;
}
.tiptap table .selectedCell::after,
.ProseMirror table .selectedCell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(200, 220, 255, 0.4);
  pointer-events: none;
}
.tiptap table .column-resize-handle,
.ProseMirror table .column-resize-handle {
  position: absolute;
  top: 0;
  bottom: -2px;
  width: 4px;
  background: #0066cc;
  pointer-events: none;
}
.tiptap .tableWrapper,
.ProseMirror .tableWrapper {
  overflow-x: auto;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-type,
.hljs-literal,
.hljs-doctag,
.hljs-template-tag,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-built_in,
.hljs-section,
.hljs-meta,
.hljs-bullet {
  color: #cc7832;
  font-weight: bold
}

.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-quote,
.hljs-meta .hljs-string {
  color: #a5c261
}

.hljs-comment,
.hljs-quote,
.hljs-formula {
  color: #808080;
  font-style: italic
}

.hljs-number,
.hljs-symbol,
.hljs-subst,
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-title.function_ {
  color: #6897bb
}

.hljs-section,
.hljs-title.class_,
.hljs-title.class_.inherited__ {
  color: #ffc66d
}

.hljs-emphasis {
  font-style: italic
}

.hljs-strong {
  font-weight: bold
}

.hljs-deletion {
  background: #8a3b3b
}

.hljs-addition {
  background: #3b6d3b
}