/* Grammar Syntax Highlighting Colors */
/* Based on the Virdant color scheme */

/* Comments: // ... */
.highlight-grammar .c1 {
    color: #9CA892;
    font-style: italic;
}

/* String literals: "..." */
.highlight-grammar .s {
    color: #C65D3B;
}

/* Uppercase non-terminals: Nat, Word, Bit, etc. */
.highlight-grammar .nc {
    color: #B8851A;
    font-weight: 500;
}

/* Lowercase non-terminals: ident, nat, digit, etc. */
.highlight-grammar .n {
    color: #AE604F;
    font-weight: 500;
}

/* Operators: :=, | */
.highlight-grammar .o {
    color: #556B2F;
    font-weight: normal;
}

/* Punctuation: :, -, (, ), *, +, ? */
.highlight-grammar .p {
    color: #8B6E47;
}

/* Numbers: 0-9 in character ranges */
.highlight-grammar .m {
    color: #C65D3B;
}

/* ========================================== */
/* Inline Grammar Code Syntax Highlighting   */
/* ========================================== */

/* Comments: // ... */
.grammar-inline .c1 {
    color: #9CA892;
    font-style: italic;
}

/* String literals: "..." */
.grammar-inline .s {
    color: #C65D3B;
}

/* Uppercase non-terminals: Nat, Word, Bit, etc. */
.grammar-inline .nc {
    color: #B8851A;
    font-weight: 500;
}

/* Lowercase non-terminals: ident, nat, digit, etc. */
.grammar-inline .n {
    color: #AE604F;
    font-weight: 500;
}

/* Operators: :=, | */
.grammar-inline .o {
    color: #556B2F;
    font-weight: normal;
}

/* Punctuation: :, -, (, ), *, +, ? */
.grammar-inline .p {
    color: #8B6E47;
}

/* Numbers: 0-9 in character ranges */
.grammar-inline .m {
    color: #C65D3B;
}


/* Keywords: "let", "when", "with", etc. */
.highlight-grammar .k {
    color: #556B2F;
    font-weight: normal;
}

/* Boolean literals: "true", "false" */
.highlight-grammar .kc {
    color: #C65D3B;
}

/* Lexical token names: "DocComment", "Ident", "Nat", etc. */
.highlight-grammar .nb {
    color: #B8851A;
    font-weight: 500;
}

/* Keywords: "let", "when", "with", etc. */
.grammar-inline .k {
    color: #556B2F;
    font-weight: normal;
}

/* Boolean literals: "true", "false" */
.grammar-inline .kc {
    color: #C65D3B;
}

/* Lexical token names: "DocComment", "Ident", "Nat", etc. */
.grammar-inline .nb {
    color: #B8851A;
    font-weight: 500;
}

/* ----- Dark mode overrides ----- */
[data-theme="dark"] .highlight-grammar .c1 {
    color: #6a7a6a;
}

[data-theme="dark"] .highlight-grammar .s {
    color: #c89070;
}

[data-theme="dark"] .highlight-grammar .nc {
    color: #b8a060;
}

[data-theme="dark"] .highlight-grammar .n {
    color: #b89080;
}

[data-theme="dark"] .highlight-grammar .o {
    color: #8a9a7a;
}

[data-theme="dark"] .highlight-grammar .p {
    color: #a09080;
}

[data-theme="dark"] .highlight-grammar .m {
    color: #c89070;
}

[data-theme="dark"] .grammar-inline .c1 {
    color: #6a7a6a;
}

[data-theme="dark"] .grammar-inline .s {
    color: #c89070;
}

[data-theme="dark"] .grammar-inline .nc {
    color: #b8a060;
}

[data-theme="dark"] .grammar-inline .n {
    color: #b89080;
}

[data-theme="dark"] .grammar-inline .o {
    color: #8a9a7a;
}

[data-theme="dark"] .grammar-inline .p {
    color: #a09080;
}

[data-theme="dark"] .grammar-inline .m {
    color: #c89070;
}

[data-theme="dark"] .highlight-grammar .k {
    color: #8a9a7a;
}

[data-theme="dark"] .highlight-grammar .kc {
    color: #c89070;
}

[data-theme="dark"] .highlight-grammar .nb {
    color: #b8a060;
}

[data-theme="dark"] .grammar-inline .k {
    color: #8a9a7a;
}

[data-theme="dark"] .grammar-inline .kc {
    color: #c89070;
}

[data-theme="dark"] .grammar-inline .nb {
    color: #b8a060;
}
