/* ── Dolfin syntax highlighting for mdBook ─────────────────────────── */

/* Latte accents darkened to >= 4.5:1 on the code background (#e6e9ef);
   raw Latte peach/yellow/green/sky sit at ~2.2:1. */
:root, .latte {
    --dhl-text: #4c4f69;
    --dhl-keyword: #8538ea;
    --dhl-type: #af4508;
    --dhl-quantifier: #915c13;
    --dhl-name: #1c5ee1;
    --dhl-variable: #ce0f38;
    --dhl-string: #2f7620;
    --dhl-iri: #036f99;
    --dhl-punctuation: #646777;
    --dhl-comment: #63667a;
}

/* Catppuccin Macchiato, as-is. */
.macchiato {
    --dhl-text: #cad3f5;
    --dhl-keyword: #c6a0f6;
    --dhl-type: #f5a97f;
    --dhl-quantifier: #eed49f;
    --dhl-name: #8aadf4;
    --dhl-variable: #ed8796;
    --dhl-string: #a6da95;
    --dhl-iri: #91d7e3;
    --dhl-punctuation: #939ab7;
    --dhl-comment: #8087a2;
}

/* Background comes from the book theme (catppuccin.css `code`). */
.dolfin-code-block {
    color: var(--dhl-text);
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    line-height: 1.4;
    overflow-x: auto;
    tab-size: 2;
}

.dolfin-code-block code {
    white-space: pre;
}

/* ── Token colours ──────────────────────────────────────────────────── */

.dolfin-hl--keyword {
    color: var(--dhl-keyword);
    font-weight: 600;
}

.dolfin-hl--type {
    color: var(--dhl-type);
}

.dolfin-hl--quantifier {
    color: var(--dhl-quantifier);
    font-style: italic;
}

.dolfin-hl--name {
    color: var(--dhl-name);
}

.dolfin-hl--variable {
    color: var(--dhl-variable);
}

.dolfin-hl--string {
    color: var(--dhl-string);
}

.dolfin-hl--number {
    color: var(--dhl-type);
}

.dolfin-hl--boolean {
    color: var(--dhl-type);
    font-weight: 600;
}

.dolfin-hl--iri {
    color: var(--dhl-iri);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.dolfin-hl--punctuation {
    color: var(--dhl-punctuation);
}

.dolfin-hl--comment {
    color: var(--dhl-comment);
    font-style: italic;
}

.dolfin-hl--unknown {
    color: var(--dhl-variable);
    text-decoration: wavy underline;
}
