/* #744 - design tokens. The ONE place a colour, a font or a radius is decided.
 *
 * Two layers, on purpose:
 *
 * 1. --qm-*  THE APPROVED LOOK, copied value for value from the signed-off mockup
 *    (design_mockups/backtesting/option-b-v1.html, "B - v2"). Nothing in the app reads
 *    these yet; components move onto them family by family (build step 6).
 *
 * 2. --qm-legacy-*  what v2/config.py's colour constants (BG, PANEL, TEXT ...) resolve to.
 *    In DARK they are today's exact hex values, so moving the constants onto them changes
 *    no pixel in dark mode - that is checkable, and it is the point: mechanism first, look second.
 *    In LIGHT they take the approved light palette. Light mode never worked (its override sheet
 *    targeted #_pages_content, which only exists with Dash Pages), so there is no light look
 *    to preserve. Retiring the legacy layer = pointing each line at its --qm-* twin.
 *
 * Theme switch: the hub posts `qm-theme` to the Dash iframe and theme_toggle.js toggles
 * `.light-mode` on <html> and <body>. `[data-theme]` is accepted too, for the unified shell later.
 * Canvas cannot read CSS variables: the chart and the JS painters read these through
 * getComputedStyle on theme change (build step 5), so chart tokens stay plain hex / rgba.
 */

/* Geist 1.800 and Geist Mono 1.701, the builds Google Fonts serves (its latin, latin-ext and, for Mono,
 * symbols2 subsets with its unicode ranges). The approved mockup was drawn and judged in exactly these
 * builds. Until 22 Sep 2026 this sheet shipped Geist 1.200, whose vertical metrics differ (ascent 920
 * against 1005), so block text sat 1 px off the mockup: found by v2/tools/hub_shell_v2_check.py. */
@font-face { /* latin-ext */
  font-family: "Geist";
  src: url("fonts/Geist-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { /* latin */
  font-family: "Geist";
  src: url("fonts/Geist-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face { /* symbols2 */
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-symbols2.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}
@font-face { /* latin-ext */
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { /* latin */
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* #744 step 1c. The three dashboard roots (layout.py) ask for var(--qm-font). Until now they asked
 * for 'Inter', which the Dash iframe never loaded, so the text fell back to whatever sans the
 * machine had. Form controls do not inherit a font by default (buttons rendered in Arial). */
button, input, select, textarea { font-family: inherit; }

:root {
  --qm-font: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  --qm-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --qm-radius-card: 16px; --qm-radius-ctl: 9px; --qm-radius-sm: 8px;
}

/* ── dark: the default until the shell is unified ─────────────────────────── */
:root, [data-theme="dark"] {
  /* NO `color-scheme: dark` YET, on purpose. Dash 4 dropdowns are <button>s on a hard white
   * background whose text is the system colour ButtonText: under color-scheme dark that turns
   * white, and EURUSD / 15m / the model name vanished on staging (caught by the first before and
   * after, 2026-09-20). It comes back in the commit that gives the dropdown a dark surface
   * (build step 6), where white scrollbars and the white native select get fixed with it. */
  --qm-bg-app: #111110; --qm-bg-side: #161615; --qm-surface: #191918; --qm-control: #222221; --qm-hover: #222221; --qm-active: #2a2a28;
  --qm-line: #262624; --qm-line-strong: #3b3a37; --qm-line-hover: #62605b;
  --qm-fg: #eeeeec; --qm-fg-2: #b5b3ad; --qm-fg-3: #7c7b74;
  --qm-ink: #eeeeec; --qm-ink-fg: #111110; --qm-ink-hover: #ffffff;
  --qm-focus: #eeeeec;
  --qm-up: #3dd68c; --qm-up-wash: #132d21; --qm-down: #ff9592; --qm-down-wash: #3b1219;
  --qm-candle-up: #26a69a; --qm-candle-down: #ef5350;   /* option-b-v2.html:238, a judged change: dark candles keep trading teal and red */
  --qm-win-train-ink: #70b8ff; --qm-win-train: rgba(59,158,255,.08);
  --qm-win-valid-ink: #ffca16; --qm-win-valid: rgba(255,197,61,.08);
  --qm-win-oos-ink: #b5b3ad;
  --qm-ind-1: #bf7af0; --qm-ind-2: #ff8dcc; --qm-ind-3: #dbb594;   /* #919: the user's own lines (bt-details.css 233, B16 follow-up) */
  --qm-chart-bg: #191918; --qm-chart-grid: #222221; --qm-chart-axis: #b5b3ad;
  --qm-equity: #eeeeec; --qm-equity-ref: #62605b; --qm-equity-fill: rgba(238,238,236,.05);
  --qm-equity-compare: #9a99c4;   /* #919: Compare's baseline curve, the mockup's .legend span.cmp value (option-b-v2.src.html 99) */
  --qm-card-shadow: none;
  --qm-composer-shadow: 0 0 0 1px rgb(255 255 255/.02), 0 12px 32px -8px rgb(0 0 0/.5);

  /* legacy layer, dark = today's constants, byte for byte (v2/config.py) */
  --qm-legacy-bg: #131722; --qm-legacy-panel: #1e222d; --qm-legacy-grid: #2a2e39;
  --qm-legacy-up: #26a69a; --qm-legacy-down: #ef5350;
  --qm-legacy-grey: #787b86; --qm-legacy-dim: #4c525e; --qm-legacy-text: #d1d4dc;
  --qm-legacy-yel: #f6c40e; --qm-legacy-org: #ff9800; --qm-legacy-pur: #9c27b0; --qm-legacy-blue: #2962ff;

  /* #744 step 3: the colours the dashboard spelled as literals, one token per (role, hex) that a
   * config.lit() call names. dark = that same hex, so no pixel moved. */
  /* BEGIN legacy literals - GENERATED by v2/tools/hex_audit.py --emit-css, do not edit */
  --qm-legacy-bg-0288d1: #0288d1;
  --qm-legacy-bg-0a0c10: #0a0c10;
  --qm-legacy-bg-0a0d12: #0a0d12;
  --qm-legacy-bg-0a0d14: #0a0d14;
  --qm-legacy-bg-0d1117: #0d1117;
  --qm-legacy-bg-0d3b2e: #0d3b2e;
  --qm-legacy-bg-0f1219: #0f1219;
  --qm-legacy-bg-11161e: #11161e;
  --qm-legacy-bg-12331f: #12331f;
  --qm-legacy-bg-13161e: #13161e;
  --qm-legacy-bg-141824: #141824;
  --qm-legacy-bg-161b22: #161b22;
  --qm-legacy-bg-181c27: #181c27;
  --qm-legacy-bg-1a0a0a: #1a0a0a;
  --qm-legacy-bg-1a1d24: #1a1d24;
  --qm-legacy-bg-1a1f2c: #1a1f2c;
  --qm-legacy-bg-1a3a5c: #1a3a5c;
  --qm-legacy-bg-1c2128: #1c2128;
  --qm-legacy-bg-1e2235: #1e2235;
  --qm-legacy-bg-1e3a6e: #1e3a6e;
  --qm-legacy-bg-21262d: #21262d;
  --qm-legacy-bg-232838: #232838;
  --qm-legacy-bg-238636: #238636;
  --qm-legacy-bg-252a38: #252a38;
  --qm-legacy-bg-29b6f6: #29b6f6;
  --qm-legacy-bg-2a2408: #2a2408;
  --qm-legacy-bg-2a2e39: #2a2e39;
  --qm-legacy-bg-2a2f3d: #2a2f3d;
  --qm-legacy-bg-332712: #332712;
  --qm-legacy-bg-3a3f50: #3a3f50;
  --qm-legacy-bg-3a4060: #3a4060;
  --qm-legacy-bg-3a4458: #3a4458;
  --qm-legacy-bg-4cc9f0: #4cc9f0;
  --qm-legacy-bg-4fc3f7: #4fc3f7;
  --qm-legacy-bg-7c4dff: #7c4dff;
  --qm-legacy-bg-8892aa: #8892aa;
  --qm-legacy-bg-ff5722: #ff5722;
  --qm-legacy-bg-ff8c00: #ff8c00;
  --qm-legacy-ink-0a0c10: #0a0c10;
  --qm-legacy-ink-29b6f6: #29b6f6;
  --qm-legacy-ink-3a3f50: #3a3f50;
  --qm-legacy-ink-4361ee: #4361ee;
  --qm-legacy-ink-4ade80: #4ade80;
  --qm-legacy-ink-4c9ff0: #4c9ff0;
  --qm-legacy-ink-4caf50: #4caf50;
  --qm-legacy-ink-4caf82: #4caf82;
  --qm-legacy-ink-4cc9f0: #4cc9f0;
  --qm-legacy-ink-4fc3f7: #4fc3f7;
  --qm-legacy-ink-555555: #555555;
  --qm-legacy-ink-5865f2: #5865f2;
  --qm-legacy-ink-5a5e6b: #5a5e6b;
  --qm-legacy-ink-5b8b86: #5b8b86;
  --qm-legacy-ink-5c8ef5: #5c8ef5;
  --qm-legacy-ink-666666: #666666;
  --qm-legacy-ink-6a7080: #6a7080;
  --qm-legacy-ink-6b7585: #6b7585;
  --qm-legacy-ink-6dbf99: #6dbf99;
  --qm-legacy-ink-8a8a9a: #8a8a9a;
  --qm-legacy-ink-8b949e: #8b949e;
  --qm-legacy-ink-90be6d: #90be6d;
  --qm-legacy-ink-9198a1: #9198a1;
  --qm-legacy-ink-aaaaaa: #aaaaaa;
  --qm-legacy-ink-ab47bc: #ab47bc;
  --qm-legacy-ink-adb5bd: #adb5bd;
  --qm-legacy-ink-b07b58: #b07b58;
  --qm-legacy-ink-b5179e: #b5179e;
  --qm-legacy-ink-b5bbc4: #b5bbc4;
  --qm-legacy-ink-c8a070: #c8a070;
  --qm-legacy-ink-c8ccd4: #c8ccd4;
  --qm-legacy-ink-c9d1d9: #c9d1d9;
  --qm-legacy-ink-e0b020: #e0b020;
  --qm-legacy-ink-e6e9ef: #e6e9ef;
  --qm-legacy-ink-e8a045: #e8a045;
  --qm-legacy-ink-f4845f: #f4845f;
  --qm-legacy-ink-f5a623: #f5a623;
  --qm-legacy-ink-f9a825: #f9a825;
  --qm-legacy-ink-f9c40e: #f9c40e;
  --qm-legacy-ink-f9c74f: #f9c74f;
  --qm-legacy-ink-f9ca24: #f9ca24;
  --qm-legacy-ink-fbbc05: #fbbc05;
  --qm-legacy-ink-ff5722: #ff5722;
  --qm-legacy-ink-ff6b6b: #ff6b6b;
  --qm-legacy-ink-ff7043: #ff7043;
  --qm-legacy-ink-ff8c00: #ff8c00;
  --qm-legacy-ink-ffa726: #ffa726;
  --qm-legacy-ink-ffaa00: #ffaa00;
  --qm-legacy-line-0d1117: #0d1117;
  --qm-legacy-line-1e222d: #1e222d;
  --qm-legacy-line-21262d: #21262d;
  --qm-legacy-line-2a2f3a: #2a2f3a;
  --qm-legacy-line-2a2f3d: #2a2f3d;
  --qm-legacy-line-2ea043: #2ea043;
  --qm-legacy-line-30363d: #30363d;
  --qm-legacy-line-3a1010: #3a1010;
  --qm-legacy-line-3a3f50: #3a3f50;
  --qm-legacy-line-4a1a1a: #4a1a1a;
  --qm-legacy-line-4c525e: #4c525e;
  --qm-legacy-line-4fc3f7: #4fc3f7;
  --qm-legacy-line-515878: #515878;
  --qm-legacy-line-9e7b2a: #9e7b2a;
  --qm-legacy-line-f9c40e: #f9c40e;
  --qm-legacy-onfill-000000: #000000;
  --qm-legacy-onfill-1a1a1a: #1a1a1a;
  --qm-legacy-onfill-ffffff: #ffffff;
  /* END legacy literals */
}

/* ── light ───────────────────────────────────────────────────────────────── */
.light-mode, [data-theme="light"] {
  color-scheme: light;
  --qm-bg-app: #ffffff; --qm-bg-side: #f9f9f8; --qm-surface: #ffffff; --qm-control: #f1f0ef; --qm-hover: #efeeec; --qm-active: #e9e8e6;
  --qm-line: #ebeae7; --qm-line-strong: #dad9d6; --qm-line-hover: #bcbbb5;
  --qm-fg: #21201c; --qm-fg-2: #63635e; --qm-fg-3: #82827c;
  --qm-ink: #21201c; --qm-ink-fg: #ffffff; --qm-ink-hover: #36352f;
  --qm-focus: #21201c;
  --qm-up: #218358; --qm-up-wash: #e6f6eb; --qm-down: #ce2c31; --qm-down-wash: #feebec;
  --qm-candle-up: #218358; --qm-candle-down: #ce2c31;   /* light candles are --up / --down (the mockup sets no light override) */
  --qm-win-train-ink: #0d74ce; --qm-win-train: rgba(13,116,206,.05);
  --qm-win-valid-ink: #ab6400; --qm-win-valid: rgba(255,186,24,.085);
  --qm-win-oos-ink: #63635e;
  --qm-ind-1: #8e4ec6; --qm-ind-2: #c2298a; --qm-ind-3: #8a6a4a;   /* #919: bt-details.css 232 */
  --qm-chart-bg: #ffffff; --qm-chart-grid: #f4f3f1; --qm-chart-axis: #63635e;
  --qm-equity: #21201c; --qm-equity-ref: #bcbbb5; --qm-equity-fill: rgba(33,32,28,.04);
  --qm-equity-compare: #9a99c4;   /* #919: as dark: the mockup gives one value for both themes */
  --qm-card-shadow: 0 1px 2px rgb(0 0 0/.04);
  --qm-composer-shadow: 0 0 0 1px rgb(0 0 0/.03), 0 2px 4px rgb(0 0 0/.03), 0 12px 32px -12px rgb(0 0 0/.10);

  /* legacy layer, light = the approved light palette (a PROPOSAL until he has seen it on staging) */
  --qm-legacy-bg: #ffffff; --qm-legacy-panel: #f9f9f8; --qm-legacy-grid: #ebeae7;
  --qm-legacy-up: #218358; --qm-legacy-down: #ce2c31;
  --qm-legacy-grey: #63635e; --qm-legacy-dim: #82827c; --qm-legacy-text: #21201c;
  --qm-legacy-yel: #ab6400; --qm-legacy-org: #bd4b00; --qm-legacy-pur: #8145b5; --qm-legacy-blue: #0d74ce;

  /* literals, light: picked by hex_audit.light_of() from the approved light palette above, by
   * role (a PROPOSAL until he has seen light mode on staging) */
  /* BEGIN legacy literals - GENERATED by v2/tools/hex_audit.py --emit-css, do not edit */
  --qm-legacy-bg-0288d1: #0d74ce;
  --qm-legacy-bg-0a0c10: #f1f0ef;
  --qm-legacy-bg-0a0d12: #f1f0ef;
  --qm-legacy-bg-0a0d14: #f1f0ef;
  --qm-legacy-bg-0d1117: #f1f0ef;
  --qm-legacy-bg-0d3b2e: #e6f6eb;
  --qm-legacy-bg-0f1219: #f1f0ef;
  --qm-legacy-bg-11161e: #f1f0ef;
  --qm-legacy-bg-12331f: #e6f6eb;
  --qm-legacy-bg-13161e: #f1f0ef;
  --qm-legacy-bg-141824: #f9f9f8;
  --qm-legacy-bg-161b22: #f9f9f8;
  --qm-legacy-bg-181c27: #f9f9f8;
  --qm-legacy-bg-1a0a0a: #feebec;
  --qm-legacy-bg-1a1d24: #f9f9f8;
  --qm-legacy-bg-1a1f2c: #f9f9f8;
  --qm-legacy-bg-1a3a5c: rgba(13,116,206,.05);
  --qm-legacy-bg-1c2128: #f9f9f8;
  --qm-legacy-bg-1e2235: #efeeec;
  --qm-legacy-bg-1e3a6e: rgba(13,116,206,.05);
  --qm-legacy-bg-21262d: #f9f9f8;
  --qm-legacy-bg-232838: #efeeec;
  --qm-legacy-bg-238636: #218358;
  --qm-legacy-bg-252a38: #efeeec;
  --qm-legacy-bg-29b6f6: #0d74ce;
  --qm-legacy-bg-2a2408: rgba(255,186,24,.085);
  --qm-legacy-bg-2a2e39: #efeeec;
  --qm-legacy-bg-2a2f3d: #efeeec;
  --qm-legacy-bg-332712: rgba(255,186,24,.085);
  --qm-legacy-bg-3a3f50: #efeeec;
  --qm-legacy-bg-3a4060: #0d74ce;
  --qm-legacy-bg-3a4458: #efeeec;
  --qm-legacy-bg-4cc9f0: #0d74ce;
  --qm-legacy-bg-4fc3f7: #0d74ce;
  --qm-legacy-bg-7c4dff: #0d74ce;
  --qm-legacy-bg-8892aa: #ffffff;
  --qm-legacy-bg-ff5722: #ce2c31;
  --qm-legacy-bg-ff8c00: #bd4b00;
  --qm-legacy-ink-0a0c10: #82827c;
  --qm-legacy-ink-29b6f6: #0d74ce;
  --qm-legacy-ink-3a3f50: #82827c;
  --qm-legacy-ink-4361ee: #0d74ce;
  --qm-legacy-ink-4ade80: #218358;
  --qm-legacy-ink-4c9ff0: #0d74ce;
  --qm-legacy-ink-4caf50: #218358;
  --qm-legacy-ink-4caf82: #218358;
  --qm-legacy-ink-4cc9f0: #0d74ce;
  --qm-legacy-ink-4fc3f7: #0d74ce;
  --qm-legacy-ink-555555: #82827c;
  --qm-legacy-ink-5865f2: #5865f2;
  --qm-legacy-ink-5a5e6b: #82827c;
  --qm-legacy-ink-5b8b86: #0d74ce;
  --qm-legacy-ink-5c8ef5: #0d74ce;
  --qm-legacy-ink-666666: #63635e;
  --qm-legacy-ink-6a7080: #63635e;
  --qm-legacy-ink-6b7585: #63635e;
  --qm-legacy-ink-6dbf99: #218358;
  --qm-legacy-ink-8a8a9a: #63635e;
  --qm-legacy-ink-8b949e: #63635e;
  --qm-legacy-ink-90be6d: #218358;
  --qm-legacy-ink-9198a1: #63635e;
  --qm-legacy-ink-aaaaaa: #63635e;
  --qm-legacy-ink-ab47bc: #8145b5;
  --qm-legacy-ink-adb5bd: #21201c;
  --qm-legacy-ink-b07b58: #bd4b00;
  --qm-legacy-ink-b5179e: #8145b5;
  --qm-legacy-ink-b5bbc4: #21201c;
  --qm-legacy-ink-c8a070: #bd4b00;
  --qm-legacy-ink-c8ccd4: #21201c;
  --qm-legacy-ink-c9d1d9: #21201c;
  --qm-legacy-ink-e0b020: #ab6400;
  --qm-legacy-ink-e6e9ef: #0d74ce;
  --qm-legacy-ink-e8a045: #bd4b00;
  --qm-legacy-ink-f4845f: #ce2c31;
  --qm-legacy-ink-f5a623: #bd4b00;
  --qm-legacy-ink-f9a825: #bd4b00;
  --qm-legacy-ink-f9c40e: #ab6400;
  --qm-legacy-ink-f9c74f: #ab6400;
  --qm-legacy-ink-f9ca24: #ab6400;
  --qm-legacy-ink-fbbc05: #ab6400;
  --qm-legacy-ink-ff5722: #ce2c31;
  --qm-legacy-ink-ff6b6b: #ce2c31;
  --qm-legacy-ink-ff7043: #ce2c31;
  --qm-legacy-ink-ff8c00: #bd4b00;
  --qm-legacy-ink-ffa726: #bd4b00;
  --qm-legacy-ink-ffaa00: #ab6400;
  --qm-legacy-line-0d1117: #ebeae7;
  --qm-legacy-line-1e222d: #ebeae7;
  --qm-legacy-line-21262d: #ebeae7;
  --qm-legacy-line-2a2f3a: #ebeae7;
  --qm-legacy-line-2a2f3d: #ebeae7;
  --qm-legacy-line-2ea043: #218358;
  --qm-legacy-line-30363d: #ebeae7;
  --qm-legacy-line-3a1010: #ce2c31;
  --qm-legacy-line-3a3f50: #dad9d6;
  --qm-legacy-line-4a1a1a: #ce2c31;
  --qm-legacy-line-4c525e: #dad9d6;
  --qm-legacy-line-4fc3f7: #0d74ce;
  --qm-legacy-line-515878: #dad9d6;
  --qm-legacy-line-9e7b2a: #ab6400;
  --qm-legacy-line-f9c40e: #ab6400;
  --qm-legacy-onfill-000000: #ffffff;
  --qm-legacy-onfill-1a1a1a: #ffffff;
  --qm-legacy-onfill-ffffff: #ffffff;
  /* END legacy literals */
}

/* ── #744 step 6: the redesign switch (ui_version.py stamps <html data-ui="2">) ───────────────
 * He ruled on 22 Sep 2026: the new layout is built BESIDE the old page, behind `?ui=2`.
 * Under the switch the legacy layer stops meaning "today's colours" and points at the approved
 * palette, so everything steps 2 to 4 put on a token takes the approved look in BOTH themes
 * (each var() resolves against the theme block above). Without the attribute nothing here
 * applies, which is what keeps today's page pixel-identical.
 * `body` is named too: theme_toggle.js puts .light-mode on html AND body, and a value set on
 * body itself would beat the one inherited from html.
 * org / pur have no approved dark value yet and keep their legacy value under the switch until
 * they are ruled; the generated literal tokens are re-pointed below (step 5b, 23 Sep 2026). */
[data-ui="2"], [data-ui="2"] body {
  --qm-legacy-bg: var(--qm-bg-app); --qm-legacy-panel: var(--qm-surface); --qm-legacy-grid: var(--qm-line);
  --qm-legacy-up: var(--qm-up); --qm-legacy-down: var(--qm-down);
  --qm-legacy-grey: var(--qm-fg-2); --qm-legacy-dim: var(--qm-fg-3); --qm-legacy-text: var(--qm-fg);
  --qm-legacy-yel: var(--qm-win-valid-ink); --qm-legacy-blue: var(--qm-win-train-ink);

  /* #744 step 5b: the literal tokens of the two blocks above, re-pointed by the same rule read in the
   * dark direction (v2/tools/hex_audit.py dark_of(), by role and lightness). Each var() resolves per
   * THEME, so under the switch a literal takes the approved light palette in light mode too. A literal
   * with no approved dark value (orange, purple, Discord's brand blue) is not listed and keeps its
   * legacy hex, as org and pur do. v2/legacy_dark_literals.py is written from the same table. */
  /* BEGIN legacy literals - GENERATED by v2/tools/hex_audit.py --emit-css, do not edit */
  --qm-legacy-bg-0288d1: var(--qm-win-train-ink);
  --qm-legacy-bg-0a0c10: var(--qm-bg-app);
  --qm-legacy-bg-0a0d12: var(--qm-bg-app);
  --qm-legacy-bg-0a0d14: var(--qm-bg-app);
  --qm-legacy-bg-0d1117: var(--qm-bg-app);
  --qm-legacy-bg-0d3b2e: var(--qm-up-wash);
  --qm-legacy-bg-0f1219: var(--qm-bg-app);
  --qm-legacy-bg-11161e: var(--qm-bg-app);
  --qm-legacy-bg-12331f: var(--qm-up-wash);
  --qm-legacy-bg-13161e: var(--qm-bg-app);
  --qm-legacy-bg-141824: var(--qm-surface);
  --qm-legacy-bg-161b22: var(--qm-surface);
  --qm-legacy-bg-181c27: var(--qm-surface);
  --qm-legacy-bg-1a0a0a: var(--qm-down-wash);
  --qm-legacy-bg-1a1d24: var(--qm-surface);
  --qm-legacy-bg-1a1f2c: var(--qm-surface);
  --qm-legacy-bg-1a3a5c: var(--qm-win-train);
  --qm-legacy-bg-1c2128: var(--qm-surface);
  --qm-legacy-bg-1e2235: var(--qm-control);
  --qm-legacy-bg-1e3a6e: var(--qm-win-train);
  --qm-legacy-bg-21262d: var(--qm-surface);
  --qm-legacy-bg-232838: var(--qm-control);
  --qm-legacy-bg-238636: var(--qm-up);
  --qm-legacy-bg-252a38: var(--qm-control);
  --qm-legacy-bg-29b6f6: var(--qm-win-train-ink);
  --qm-legacy-bg-2a2408: var(--qm-win-valid);
  --qm-legacy-bg-2a2e39: var(--qm-control);
  --qm-legacy-bg-2a2f3d: var(--qm-control);
  --qm-legacy-bg-332712: var(--qm-win-valid);
  --qm-legacy-bg-3a3f50: var(--qm-control);
  --qm-legacy-bg-3a4060: var(--qm-win-train-ink);
  --qm-legacy-bg-3a4458: var(--qm-control);
  --qm-legacy-bg-4cc9f0: var(--qm-win-train-ink);
  --qm-legacy-bg-4fc3f7: var(--qm-win-train-ink);
  --qm-legacy-bg-7c4dff: var(--qm-win-train-ink);
  --qm-legacy-bg-8892aa: var(--qm-ink);
  --qm-legacy-bg-ff5722: var(--qm-down);
  --qm-legacy-ink-0a0c10: var(--qm-fg-3);
  --qm-legacy-ink-29b6f6: var(--qm-win-train-ink);
  --qm-legacy-ink-3a3f50: var(--qm-fg-3);
  --qm-legacy-ink-4361ee: var(--qm-win-train-ink);
  --qm-legacy-ink-4ade80: var(--qm-up);
  --qm-legacy-ink-4c9ff0: var(--qm-win-train-ink);
  --qm-legacy-ink-4caf50: var(--qm-up);
  --qm-legacy-ink-4caf82: var(--qm-up);
  --qm-legacy-ink-4cc9f0: var(--qm-win-train-ink);
  --qm-legacy-ink-4fc3f7: var(--qm-win-train-ink);
  --qm-legacy-ink-555555: var(--qm-fg-3);
  --qm-legacy-ink-5a5e6b: var(--qm-fg-3);
  --qm-legacy-ink-5b8b86: var(--qm-win-train-ink);
  --qm-legacy-ink-5c8ef5: var(--qm-win-train-ink);
  --qm-legacy-ink-666666: var(--qm-fg-2);
  --qm-legacy-ink-6a7080: var(--qm-fg-2);
  --qm-legacy-ink-6b7585: var(--qm-fg-2);
  --qm-legacy-ink-6dbf99: var(--qm-up);
  --qm-legacy-ink-8a8a9a: var(--qm-fg-2);
  --qm-legacy-ink-8b949e: var(--qm-fg-2);
  --qm-legacy-ink-90be6d: var(--qm-up);
  --qm-legacy-ink-9198a1: var(--qm-fg-2);
  --qm-legacy-ink-aaaaaa: var(--qm-fg-2);
  --qm-legacy-ink-adb5bd: var(--qm-fg);
  --qm-legacy-ink-b5bbc4: var(--qm-fg);
  --qm-legacy-ink-c8ccd4: var(--qm-fg);
  --qm-legacy-ink-c9d1d9: var(--qm-fg);
  --qm-legacy-ink-e0b020: var(--qm-win-valid-ink);
  --qm-legacy-ink-e6e9ef: var(--qm-win-train-ink);
  --qm-legacy-ink-f4845f: var(--qm-down);
  --qm-legacy-ink-f9c40e: var(--qm-win-valid-ink);
  --qm-legacy-ink-f9c74f: var(--qm-win-valid-ink);
  --qm-legacy-ink-f9ca24: var(--qm-win-valid-ink);
  --qm-legacy-ink-fbbc05: var(--qm-win-valid-ink);
  --qm-legacy-ink-ff5722: var(--qm-down);
  --qm-legacy-ink-ff6b6b: var(--qm-down);
  --qm-legacy-ink-ff7043: var(--qm-down);
  --qm-legacy-ink-ffaa00: var(--qm-win-valid-ink);
  --qm-legacy-line-0d1117: var(--qm-line);
  --qm-legacy-line-1e222d: var(--qm-line);
  --qm-legacy-line-21262d: var(--qm-line);
  --qm-legacy-line-2a2f3a: var(--qm-line);
  --qm-legacy-line-2a2f3d: var(--qm-line);
  --qm-legacy-line-2ea043: var(--qm-up);
  --qm-legacy-line-30363d: var(--qm-line);
  --qm-legacy-line-3a1010: var(--qm-down);
  --qm-legacy-line-3a3f50: var(--qm-line-strong);
  --qm-legacy-line-4a1a1a: var(--qm-down);
  --qm-legacy-line-4c525e: var(--qm-line-strong);
  --qm-legacy-line-4fc3f7: var(--qm-win-train-ink);
  --qm-legacy-line-515878: var(--qm-line-strong);
  --qm-legacy-line-9e7b2a: var(--qm-win-valid-ink);
  --qm-legacy-line-f9c40e: var(--qm-win-valid-ink);
  --qm-legacy-onfill-000000: var(--qm-ink-fg);
  --qm-legacy-onfill-1a1a1a: var(--qm-ink-fg);
  --qm-legacy-onfill-ffffff: var(--qm-ink-fg);
  /* END legacy literals */
}
