/*
 * The colours of code and data: the syntax of the text view, of the guide's declarations and of
 * the SQL editor, and the byte map's blocks. structure.fi's tokens are monotone, with no hue to
 * tell token kinds or neighbouring fields apart, so the tool keeps eight categorical hues of its
 * own for each theme (the data series of Structure's product palette) and mixes them toward the
 * site's ink (`--lp-*`). The app and the guide's pages both load this sheet, so a declaration
 * reads the same in both; the theme comes from `data-st-theme` on the root, as the tokens' does.
 */
:root,
[data-st-theme="light"] {
    --pv-series-1: #0078c7;
    --pv-series-2: #27a74b;
    --pv-series-3: #b2397c;
    --pv-series-4: #ca6800;
    --pv-series-5: #00a199;
    --pv-series-6: #998700;
    --pv-series-7: #8557c8;
    --pv-series-8: #d24d45;
}

[data-st-theme="dark"] {
    --pv-series-1: #1a97f4;
    --pv-series-2: #0e9a3f;
    --pv-series-3: #db5fa1;
    --pv-series-4: #dc7100;
    --pv-series-5: #00a89f;
    --pv-series-6: #9f8d00;
    --pv-series-7: #9769dc;
    --pv-series-8: #d9544b;
}

/*
 * Token kinds, each a series mixed toward the ink: 70% series is the most that keeps every kind
 * at 4.5:1 or more on the canvas in both themes. Comments are the secondary ink; punctuation is
 * dimmed, 60% of the tertiary ink toward the secondary, the dimmest that still keeps 4.5:1.
 */
:root {
    --pv-syntax-keyword: color-mix(in srgb, var(--pv-series-7) 70%, var(--lp-ink));
    --pv-syntax-presence: color-mix(in srgb, var(--pv-series-3) 70%, var(--lp-ink));
    --pv-syntax-type: color-mix(in srgb, var(--pv-series-1) 70%, var(--lp-ink));
    --pv-syntax-tag: color-mix(in srgb, var(--pv-series-4) 70%, var(--lp-ink));
    --pv-syntax-value: color-mix(in srgb, var(--pv-series-5) 70%, var(--lp-ink));
    --pv-syntax-punctuation: color-mix(in srgb, var(--lp-ink-3) 60%, var(--lp-ink-2));
    --pv-syntax-comment: var(--lp-ink-2);
}
