/* =============================================== +\
|             SYNTAX HIGHLIGHTING & CODE            |
|    Styles for code blocks and inline code         |
\* =============================================== */

/* Styles the <pre> tag, which contains code blocks.*/
pre {
    border-radius: 5px;
    padding: 10px;
    color: lightgreen; /* Default text color for code. */
    background-color: #241f31; /* Dark purple/blue background. */
}

/* Sets the font and base styles for code. */
code[class*="language-"], pre[class*="language-"] {
    color: darkseagreen;
    font-family: "Dejavu Sans Mono", "Share Tech Mono", monospace;
    line-height: 1.2rem;
    font-size: 0.95rem;
}

/*
 * SYNTAX TOKENS USED IN BEE AND EVE PARSER
 * Defines colors for different parts of the code (keywords, strings, comments, etc.).
 */
.keyword { color: orange; }
.keytab { color: gold; }
.impera, .directive-hash { color: palevioletred; }
.control { color: deepskyblue; }
.interrupt, .operator { color: lightcoral; }
.type, .constant, .builtin { color: cyan; }
.title { color: springgreen; }
.subtitle { color: silver; }
.comment { color: lightseagreen; }
.comment-doc { color: #9cc7ff; }
.comment-block { color: lightseagreen; }
.comment-inline { color: #8f98a3; }
.string { color: yellow; }

/*
 * EVE LINE NUMBERS
 * The Eve parser wraps each source line in <span class="line"> and sets
 * --eve-start (from data-start) and --eve-digits on the <code> element.
 * Numbers are CSS-generated, so they are never selected or copied.
 */
pre.line-numbers > code.language-eve { counter-reset: eve-line var(--eve-start, 0); }
pre.line-numbers > code.language-eve .line::before {
    counter-increment: eve-line;
    content: counter(eve-line);
    display: inline-block;
    box-sizing: content-box;
    min-width: calc(var(--eve-digits, 2) * 1ch);
    margin-right: 1ch;
    padding-right: 1ch;
    border-right: 1px solid #4a4458;
    color: #7f7a8c;
    text-align: right;
    user-select: none;
}
