/*
 * ModelRiver code colours: "River Ink"
 *
 * One palette for code on the landing page, docs, blog and console.
 * Keys and strings sit on opposite sides of the wheel (river indigo vs reed
 * green) so a JSON line reads at a glance. No teal: the brand primary stays
 * for UI, not for code. Every role is told apart by colour alone, so editors
 * that cannot change font weight still work.
 *
 * Contrast (WCAG): light roles 4.6–7.5:1 on #fafaf9; dark roles 5–11:1 on
 * #1c1917, #1f1d1b and #2a2622.
 *
 * Use: wrap code in .mr-code-body or .mr-ink and mark tokens with
 *   .k keyword   .p property/key   .s string   .n number/literal
 *   .f function  .u url/path       .c comment  .o punctuation
 * or read the variables directly, e.g. color: var(--mr-ink-string).
 */
:root {
  --mr-ink-text: #292524;        /* plain code */
  --mr-ink-keyword: #b3261e;     /* madder: POST, const, return */
  --mr-ink-property: #2f4cb3;    /* river indigo: JSON keys, fields */
  --mr-ink-string: #3d7317;      /* reed green: string values */
  --mr-ink-number: #9a5b00;      /* ochre: numbers, true, false, null */
  --mr-ink-function: #8a2e9e;    /* plum: function and method names */
  --mr-ink-url: #2f4cb3;         /* paths and URLs read like keys */
  --mr-ink-comment: #776e62;     /* silt: comments */
  --mr-ink-punctuation: #78716c; /* stone: braces, commas, operators */
}

.landing-dark,
.dark,
[data-theme="dark"] {
  --mr-ink-text: #e7e5e4;
  --mr-ink-keyword: #ff8f80;
  --mr-ink-property: #9db5ff;
  --mr-ink-string: #aed67e;
  --mr-ink-number: #f2b55e;
  --mr-ink-function: #dda6ee;
  --mr-ink-url: #9db5ff;
  --mr-ink-comment: #9c9488;
  --mr-ink-punctuation: #a8a29e;
}

:is(.mr-code-body, .mr-ink) { color: var(--mr-ink-text); }
:is(.mr-code-body, .mr-ink) .k { color: var(--mr-ink-keyword); }
:is(.mr-code-body, .mr-ink) .p { color: var(--mr-ink-property); }
:is(.mr-code-body, .mr-ink) .s { color: var(--mr-ink-string); }
:is(.mr-code-body, .mr-ink) .n { color: var(--mr-ink-number); }
:is(.mr-code-body, .mr-ink) .f { color: var(--mr-ink-function); }
:is(.mr-code-body, .mr-ink) .u { color: var(--mr-ink-url); }
:is(.mr-code-body, .mr-ink) .o { color: var(--mr-ink-punctuation); }
:is(.mr-code-body, .mr-ink) .c { color: var(--mr-ink-comment); font-style: italic; }
