/*
  Mar syntax theme for the book, matching the vscode-mar plugin colors
  (VS Code Dark+ applied to the source.mar scopes). Dark code blocks on the
  otherwise-light page, so listings look exactly like the editor.
*/

/* Only BLOCK code (inside <pre>) gets the dark editor background. mdbook also
   tags inline `code` with .hljs, so a bare `.hljs { background }` would paint
   inline snippets dark while their text stays the light-theme color — black
   boxes. Scoping to `pre code.hljs` leaves inline code on mdbook's defaults. */
pre code.hljs {
  display: block;
  overflow-x: auto;
  padding: 1em;
  background: #1e1e1e;
  color: #d4d4d4;
}

/* comments — green, italic (comment.line / comment.block) */
.hljs-comment,
.hljs-quote {
  color: #6a9955;
  font-style: italic;
}

/* control-flow keywords — purple (keyword.control: if/then/else/case/of/let/in) */
.hljs-keyword,
.hljs-selector-tag {
  color: #c586c0;
}

/* declaration keywords — blue (keyword.declaration: module/import/type/alias/...) */
.hljs-built_in,
.hljs-meta {
  color: #569cd6;
}

/* True / False and other language constants — blue (constant.language) */
.hljs-literal,
.hljs-symbol,
.hljs-bullet {
  color: #569cd6;
}

/* capitalized types, constructors, module qualifiers — teal
   (entity.name.type / support.type / entity.name.namespace) */
.hljs-type,
.hljs-title,
.hljs-class .hljs-title,
.hljs-title.class_ {
  color: #4ec9b0;
}

/* strings and char literals — salmon (string.quoted.double / .single) */
.hljs-string,
.hljs-char,
.hljs-attr,
.hljs-template-tag,
.hljs-template-variable {
  color: #ce9178;
}

/* numbers — pale green (constant.numeric.integer) */
.hljs-number {
  color: #b5cea8;
}

/* names / plain variables — default foreground (variable.other) */
.hljs-name,
.hljs-variable,
.hljs-params {
  color: #d4d4d4;
}

/* escapes inside strings — the same salmon, a touch brighter */
.hljs-subst {
  color: #d4d4d4;
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: bold;
}
