pre.tree-sitter {
  background: #f8f8f8;
  border-left: 0.25rem solid #ddd;
  overflow-x: auto;
  padding: 0.75rem 1rem;
}
pre.tree-sitter code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre;
}
.ts-keyword,
.ts-operator {
  color: #204a87;
  font-weight: 700;
}
.ts-string,
.ts-string-special,
.ts-string-special-key,
.ts-string-regexp {
  color: #4e9a06;
}
.ts-string-escape,
.ts-escape {
  color: #ad7fa8;
}
.ts-comment,
.ts-comment-documentation,
.ts-doc {
  color: #8f5902;
  font-style: italic;
}
.ts-function,
.ts-function-builtin,
.ts-function-method,
.ts-function-macro,
.ts-constructor,
.ts-definition-function,
.ts-definition-method,
.ts-definition-macro {
  color: #5c3566;
}

/* Lace policy roles shared by Interlang and Lacegram. */
.ts-predicate-profile {
  color: #005a9c;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}
.ts-predicate-helper {
  color: #7a3e9d;
  font-weight: 650;
}
.ts-coordinate-name {
  color: #7a3e9d;
  font-weight: 600;
}
.ts-type,
.ts-type-builtin,
.ts-definition-class,
.ts-definition-interface,
.ts-definition-module,
.ts-module,
.ts-tag,
.ts-tag-error {
  color: #204a87;
}
.ts-property,
.ts-property-builtin,
.ts-attribute,
.ts-variable-parameter {
  color: #ce5c00;
}
.ts-record-metadata {
  color: #85888c;
}
.ts-record-by {
  color: #2e7d32;
  font-weight: 600;
}
.ts-record-field-required {
  color: #174f78;
  font-weight: 750;
}
.ts-record-field-name {
  color: #bf4b00;
  font-weight: 600;
}
.ts-variable,
.ts-variable-builtin,
.ts-constant,
.ts-constant-builtin,
.ts-label,
.ts-reference-call,
.ts-reference-class,
.ts-reference-implementation {
  color: #000000;
}

/* Record-reference variables are intentionally the strongest variable style. */
.ts-variable-record,
.ts-variable-special {
  background: #fff0f7;
  border: 1px solid #e8a4c8;
  border-radius: 0.18em;
  color: #9c005d;
  font-weight: 800;
  padding: 0 0.12em;
}
.ts-variable-text {
  color: #006b5b;
  font-style: italic;
}
.ts-number,
.ts-boolean {
  color: #0000cf;
}
.ts-punctuation,
.ts-punctuation-bracket,
.ts-punctuation-delimiter,
.ts-punctuation-special {
  color: #555753;
}
.ts-embedded,
.ts-glimmer,
.ts-import,
.ts-keyframes,
.ts-media,
.ts-namespace,
.ts-supports,
.ts-charset {
  color: #3465a4;
}

/* Interlang is the project DSL, so make coordinates and trusted-key strings easy to scan. */
pre.tree-sitter.interlang .ts-string-special,
pre.tree-sitter.lace-record .ts-string-special {
  color: #2e7d32;
  font-weight: 600;
}
pre.tree-sitter.interlang .ts-type,
pre.tree-sitter.lace-record .ts-type {
  color: #1565c0;
  font-weight: 600;
}
pre.tree-sitter.interlang .ts-property {
  color: #bf4b00;
  font-weight: 600;
}
pre.tree-sitter.interlang .ts-punctuation-special {
  color: #777777;
  font-weight: 700;
}
/* Injected Interlang inside JavaScript template strings is nested inside JS string spans. */
pre.tree-sitter.javascript .ts-string .ts-keyword,
pre.tree-sitter.javascript .ts-string .ts-operator {
  color: #8f3f00;
  font-weight: 700;
}
pre.tree-sitter.javascript .ts-string .ts-property,
pre.tree-sitter.javascript .ts-string .ts-function,
pre.tree-sitter.javascript .ts-string .ts-variable,
pre.tree-sitter.javascript .ts-string .ts-string-special {
  color: #7a3e9d;
}
