/* Brand accent color for the DevExpress Fluent theme.
 *
 * The accent drives every primary surface in the DX UI: the Save & Close button, the active tab
 * indicator, focused editor underlines, selected rows, checkboxes, links, and so on.
 *
 * appsettings.json (DevExpress:ExpressApp:ThemeSwitcher) already sets the brand color as the Fluent
 * group's accent, but that only decides the *default* theme: XAF restores a per-browser theme from
 * the XAF_Theme cookie first (ThemeStateService.TryRestoreThemeFromCookies), so anyone who used the
 * app before the switch keeps the old accent until the cookie expires. These rules pin the accent
 * for every browser and every Fluent accent/mode.
 *
 * The seventeen --dxds-primary-* variables are the public Design System accent scale. The formulas
 * below are exactly what DevExpress generates for a custom accent color (SetCustomAccentColor):
 * shade 90 is the accent itself, 10-80 step towards white and 100-170 towards black in OKLCH, so
 * the derived shades stay consistent in both light and dark mode.
 *
 * `:root:root` (specificity 0,2,0) intentionally outranks the theme's own `:root` block — the DX
 * resource manager injects theme stylesheets dynamically, so source order alone is not reliable.
 */
:root:root {
    --dxds-primary-10: oklch(from #4147d5 calc(l + 8 * (0.95 - min(l, 0.95)) / 8) calc(c - 8 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-20: oklch(from #4147d5 calc(l + 7 * (0.95 - min(l, 0.95)) / 8) calc(c - 7 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-30: oklch(from #4147d5 calc(l + 6 * (0.95 - min(l, 0.95)) / 8) calc(c - 6 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-40: oklch(from #4147d5 calc(l + 5 * (0.95 - min(l, 0.95)) / 8) calc(c - 5 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-50: oklch(from #4147d5 calc(l + 4 * (0.95 - min(l, 0.95)) / 8) calc(c - 4 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-60: oklch(from #4147d5 calc(l + 3 * (0.95 - min(l, 0.95)) / 8) calc(c - 3 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-70: oklch(from #4147d5 calc(l + 2 * (0.95 - min(l, 0.95)) / 8) calc(c - 2 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-80: oklch(from #4147d5 calc(l + 1 * (0.95 - min(l, 0.95)) / 8) calc(c - 1 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-90: oklch(from #4147d5 l c h);
    --dxds-primary-100: oklch(from #4147d5 calc(l - 1 * (max(l, 0.15) - 0.15) / 8) calc(c - 1 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-110: oklch(from #4147d5 calc(l - 2 * (max(l, 0.15) - 0.15) / 8) calc(c - 2 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-120: oklch(from #4147d5 calc(l - 3 * (max(l, 0.15) - 0.15) / 8) calc(c - 3 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-130: oklch(from #4147d5 calc(l - 4 * (max(l, 0.15) - 0.15) / 8) calc(c - 4 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-140: oklch(from #4147d5 calc(l - 5 * (max(l, 0.15) - 0.15) / 8) calc(c - 5 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-150: oklch(from #4147d5 calc(l - 6 * (max(l, 0.15) - 0.15) / 8) calc(c - 6 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-160: oklch(from #4147d5 calc(l - 7 * (max(l, 0.15) - 0.15) / 8) calc(c - 7 * (max(c, 0.04) - 0.04) / 8) h);
    --dxds-primary-170: oklch(from #4147d5 calc(l - 8 * (max(l, 0.15) - 0.15) / 8) calc(c - 8 * (max(c, 0.04) - 0.04) / 8) h);
}
