/* Open Design System – color tokens
 * ───────────────────────────────────────────────────────────────────────
 * THEME ARCHITECTURE
 *
 *  The design system is "semantic primitives": the primitive token NAMES
 *  (`--ods-*`) are stable across themes — only their VALUES change between
 *  light and dark (sourced 1:1 from `dark theme.tokens.json` /
 *  `light theme.tokens.json`).
 *
 *  Tier 1 — Primitives (`--ods-*`), THEME-SCOPED
 *    • `:root, [data-theme="dark"], .theme-dark`  → dark values (default)
 *    • `[data-theme="light"], .theme-light`        → light values
 *    A handful of explicitly-named fixed shades (…-dark / …-light) and the
 *    third-party social brand colors are theme-stable.
 *
 *  Tier 2 — Semantic aliases (`--color-*`), THEME-AGNOSTIC (single source)
 *    They reference `--ods-*`, so they resolve to the correct theme
 *    automatically — no per-theme duplication. Only a few alpha-based
 *    tokens get a light tweak.
 *
 *  Platform overrides (`[data-app-type="…"]`) set ONLY brand/accent and
 *  reference `--ods-*`, so they too follow the active theme. They never
 *  touch bg/text/border, so theme (on <html>) and platform (on <body>)
 *  compose cleanly even though they live on different elements.
 *
 *  Theme is selected via `data-theme="light|dark"` on <html> (set by the
 *  ThemeProvider + the no-flash ThemeScript). Default: dark.
 * ─────────────────────────────────────────────────────────────────────── */

/* ===================================================================== */
/* TIER 1 — PRIMITIVES · DARK (default, lives in :root)                   */
/* Removing the theme attribute reverts here automatically.              */
/* ===================================================================== */
:root,
:root[data-theme="dark"],
.theme-dark {
  /* Declared color scheme — MUST track the active theme scope.
   * Two jobs:
   * 1. Native UA surfaces (scrollbars, form controls, date/month pickers,
   *    <select> popups) render dark instead of default-light on the dark UI.
   * 2. Chromium's "Auto Dark Mode for Web Contents" (WebContentsForceDark,
   *    chrome://flags#enable-force-dark) force-processes any page that does
   *    NOT declare a dark color-scheme. On this already-dark UI its
   *    per-element lightness-inversion heuristics can repaint late-mounted
   *    composited popups (Radix Select/Popover portals) with light
   *    backgrounds and dark text while the rest of the page stays dark.
   *    Declaring `color-scheme: dark` is the documented opt-out — Blink
   *    skips pages whose root declares dark support. Root-cause shield for
   *    the intermittent "light dropdown on dark admin" reports; author CSS
   *    could never produce that state (light tokens are reachable only via
   *    [data-theme="light"] / .theme-light, which nothing in the apps sets).
   */
  color-scheme: dark;

  /* Attention – Success */
  --ods-attention-green-success: #5ea62e;
  --ods-attention-green-success-hover: #549c24;
  --ods-attention-green-success-action: #4a921a;
  --ods-attention-green-success-secondary: #2e461f;
  --ods-attention-green-success-secondary-hover: #385029;
  --ods-attention-green-success-secondary-action: #425a33;

  /* Attention – Error */
  --ods-attention-red-error: #f36666;
  --ods-attention-red-error-hover: #e95c5c;
  --ods-attention-red-error-action: #df5252;
  --ods-attention-red-error-secondary: #4a2121;
  --ods-attention-red-error-secondary-hover: #542b2b;
  --ods-attention-red-error-secondary-action: #5e3535;

  /* Attention – Warning */
  --ods-attention-yellow-warning: #e1b32f;
  --ods-attention-yellow-warning-hover: #d7a925;
  --ods-attention-yellow-warning-action: #cd9f1b;
  --ods-attention-yellow-warning-secondary: #5a4d25;
  --ods-attention-yellow-warning-secondary-hover: #64572f;
  --ods-attention-yellow-warning-secondary-action: #6e6139;

  /* Flamingo Cyan */
  --ods-flamingo-cyan-base: #5efaf0;
  --ods-flamingo-cyan-hover: #54f0e6;
  --ods-flamingo-cyan-action: #4ae6dc;
  --ods-flamingo-cyan-secondary: #058c83;
  --ods-flamingo-cyan-secondary-hover: #008279;
  --ods-flamingo-cyan-secondary-action: #00786f;

  /* Flamingo Pink */
  --ods-flamingo-pink-base: #f357bb;
  --ods-flamingo-pink-hover: #e94db1;
  --ods-flamingo-pink-action: #df43a7;
  --ods-flamingo-pink-secondary: #792b5d;
  --ods-flamingo-pink-secondary-hover: #6f2153;
  --ods-flamingo-pink-secondary-action: #651749;

  /* Open Yellow */
  --ods-open-yellow-base: #ffc008;
  --ods-open-yellow-hover: #f5b600;
  --ods-open-yellow-action: #ebac00;
  --ods-open-yellow-secondary: #7f6004;
  --ods-open-yellow-secondary-hover: #755600;
  --ods-open-yellow-secondary-action: #6b4c00;

  /* System Greys */
  --ods-system-greys-background: #161616;
  --ods-system-greys-background-hover: #202020;
  --ods-system-greys-background-action: #2a2a2a;
  --ods-system-greys-black: #212121;
  --ods-system-greys-black-hover: #2b2b2b;
  --ods-system-greys-black-action: #353535;
  --ods-system-greys-grey: #888888;
  --ods-system-greys-grey-hover: #7e7e7e;
  --ods-system-greys-grey-action: #747474;
  --ods-system-greys-soft-grey: #3a3a3a;
  --ods-system-greys-soft-grey-hover: #444444;
  --ods-system-greys-soft-grey-action: #4e4e4e;
  --ods-system-greys-white: #fafafa;
  --ods-system-greys-white-hover: #f5f5f5;
  --ods-system-greys-white-action: #f0f0f0;

  /* Shadcn/ui HSL bridge — DARK (mirrors app-globals.css :root).
   * Re-declared here so toggling data-theme also flips shadcn-mapped
   * Tailwind utilities (bg-background, bg-card, text-foreground, …). */
  --background: 0 0% 8.6%;
  --foreground: 0 0% 98%;
  --card: 0 0% 13.1%;
  --card-foreground: 0 0% 98%;
  --popover: 0 0% 13.1%;
  --popover-foreground: 0 0% 98%;
  --secondary: 0 0% 22.7%;
  --secondary-foreground: 0 0% 98%;
  --muted: 0 0% 22.7%;
  --muted-foreground: 0 0% 53.3%;
  --border: 0 0% 22.7%;
  --input: 0 0% 22.7%;
}

/* ===================================================================== */
/* TIER 1 — PRIMITIVES · LIGHT                                            */
/* Values sourced 1:1 from `light theme.tokens.json`. Token NAMES are     */
/* identical to dark — only the values differ (semantic primitives).      */
/* ===================================================================== */
:root[data-theme="light"],
.theme-light {
  /* Mirror of the dark scope's declaration — see the comment there. */
  color-scheme: light;

  /* Attention – Success */
  --ods-attention-green-success: #4c8924;
  --ods-attention-green-success-hover: #427f1a;
  --ods-attention-green-success-action: #387510;
  --ods-attention-green-success-secondary: #cbe1bd;
  --ods-attention-green-success-secondary-hover: #c1d7b8;
  --ods-attention-green-success-secondary-action: #b7cdae;

  /* Attention – Error */
  --ods-attention-red-error: #cf4e4e;
  --ods-attention-red-error-hover: #c54444;
  --ods-attention-red-error-action: #bb3a3a;
  --ods-attention-red-error-secondary: #f8cece;
  --ods-attention-red-error-secondary-hover: #eec4c4;
  --ods-attention-red-error-secondary-action: #e4baba;

  /* Attention – Warning */
  --ods-attention-yellow-warning: #cd9e18;
  --ods-attention-yellow-warning-hover: #c3940e;
  --ods-attention-yellow-warning-action: #b98a04;
  --ods-attention-yellow-warning-secondary: #ebdfbb;
  --ods-attention-yellow-warning-secondary-hover: #e1d5b1;
  --ods-attention-yellow-warning-secondary-action: #d7cba7;

  /* Flamingo Cyan */
  --ods-flamingo-cyan-base: #058c83;
  --ods-flamingo-cyan-hover: #008279;
  --ods-flamingo-cyan-action: #00786f;
  --ods-flamingo-cyan-secondary: #a1fbf5;
  --ods-flamingo-cyan-secondary-hover: #97f1eb;
  --ods-flamingo-cyan-secondary-action: #8de7e1;

  /* Flamingo Pink */
  --ods-flamingo-pink-base: #f357bb;
  --ods-flamingo-pink-hover: #e94db1;
  --ods-flamingo-pink-action: #df43a7;
  --ods-flamingo-pink-secondary: #ffc4ea;
  --ods-flamingo-pink-secondary-hover: #f5bae0;
  --ods-flamingo-pink-secondary-action: #ebb0d6;

  /* Open Yellow */
  --ods-open-yellow-base: #e4aa00;
  --ods-open-yellow-hover: #f5b600;
  --ods-open-yellow-action: #ebac00;
  --ods-open-yellow-secondary: #fafafa;
  --ods-open-yellow-secondary-hover: #f5f5f5;
  --ods-open-yellow-secondary-action: #f0f0f0;

  /* System Greys */
  --ods-system-greys-background: #fafafa;
  --ods-system-greys-background-hover: #f5f5f5;
  --ods-system-greys-background-action: #f0f0f0;
  --ods-system-greys-black: #ffffff;
  --ods-system-greys-black-hover: #fafafa;
  --ods-system-greys-black-action: #f5f5f5;
  --ods-system-greys-grey: #767676;
  --ods-system-greys-grey-hover: #6c6c6c;
  --ods-system-greys-grey-action: #626262;
  --ods-system-greys-soft-grey: #e7e7e7;
  --ods-system-greys-soft-grey-hover: #dddddd;
  --ods-system-greys-soft-grey-action: #d3d3d3;
  --ods-system-greys-white: #1a1a1a;
  --ods-system-greys-white-hover: #424242;
  --ods-system-greys-white-action: #6a6a6a;

  /* Shadcn/ui HSL bridge — LIGHT */
  --background: 0 0% 98%;          /* #fafafa */
  --foreground: 0 0% 10.2%;        /* #1a1a1a */
  --card: 0 0% 100%;               /* #ffffff */
  --card-foreground: 0 0% 10.2%;
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 10.2%;
  --secondary: 0 0% 90.6%;         /* #e7e7e7 */
  --secondary-foreground: 0 0% 10.2%;
  --muted: 0 0% 94.1%;             /* #f0f0f0 */
  --muted-foreground: 0 0% 46.3%;  /* #767676 */
  --border: 0 0% 90.6%;            /* #e7e7e7 */
  --input: 0 0% 90.6%;
}

/* ===================================================================== */
/* TIER 1 — THEME-STABLE PRIMITIVES                                       */
/* Explicitly-named fixed shades (…-dark / …-light) and third-party       */
/* social brand colors do NOT flip with the theme.                       */
/* ===================================================================== */
:root {
  --ods-flamingo-cyan-dark: #058c83;
  --ods-flamingo-cyan-dark-action: #00786f;
  --ods-flamingo-cyan-dark-hover: #008279;
  --ods-flamingo-cyan-light: #a1fbf5;
  --ods-flamingo-cyan-light-action: #8de7e1;
  --ods-flamingo-cyan-light-hover: #97f1eb;

  --ods-flamingo-pink-dark: #792b5d;
  --ods-flamingo-pink-dark-action: #651749;
  --ods-flamingo-pink-dark-hover: #6f2153;
  --ods-flamingo-pink-light: #f9abdd;
  --ods-flamingo-pink-light-action: #e597c9;
  --ods-flamingo-pink-light-hover: #efa1d3;

  --ods-open-yellow-dark: #ffe084;
  --ods-open-yellow-dark-action: #ebcc70;
  --ods-open-yellow-dark-hover: #f5d67a;
  --ods-open-yellow-light: #7f6004;
  --ods-open-yellow-light-action: #6b4c00;
  --ods-open-yellow-light-hover: #755600;

  /* Social Platform Brand Colors
     Official third-party brand colors — must remain exact for proper
     brand recognition per platform guidelines. */
  --social-slack: #4A154B;
  --social-linkedin: #0A66C2;
  --social-facebook: #1877F2;
  --social-instagram-orange: #F58529;
  --social-instagram-pink: #DD2A7B;
  --social-instagram-purple: #8134AF;
  --social-youtube: #FF0000;
  --social-twitter: #1DA1F2;
}

/* ===================================================================== */
/* TIER 2 — SEMANTIC ALIASES (theme-agnostic, single source)             */
/* Reference `--ods-*`, so they resolve to the active theme on their own. */
/* ===================================================================== */
:root {
  /* Backgrounds */
  --color-bg: var(--ods-system-greys-background);
  --color-bg-card: var(--ods-system-greys-black);
  --color-bg-hover: var(--ods-system-greys-black-hover);
  --color-bg-active: var(--ods-system-greys-black-action);
  --color-bg-overlay: rgba(33, 33, 33, 0.8);
  /* Skeletons must CONTRAST with the surface they load on. `greys-black` here
     was byte-identical to --color-bg-card, so every `bg-ods-skeleton` pulse
     sitting on a card was invisible — it only appeared while the row's hover
     tint lightened the ground beneath it (people-hub score table, 2026-08).
     `soft-grey` is what `ui/Skeleton` (bg-ods-border) already pulses with, so
     the two skeleton primitives now read as one, in both themes. */
  --color-bg-skeleton: var(--ods-system-greys-soft-grey);
  --color-bg-surface: var(--ods-system-greys-soft-grey);
  --color-bg-surface-hover: var(--ods-system-greys-soft-grey-hover);
  --color-bg-surface-active: var(--ods-system-greys-soft-grey-action);
  --color-bg-inverted: var(--ods-system-greys-white);
  --color-bg-backdrop: rgba(0, 0, 0, 0.6);
  /* Card layers (consumed by platform blocks; theme owns the value) */
  --color-bg-card-primary: var(--ods-system-greys-black);
  --color-bg-card-secondary: var(--ods-system-greys-background);

  /* Borders */
  --color-border-default: var(--ods-system-greys-soft-grey);
  --color-border-hover: var(--ods-system-greys-soft-grey-hover);
  --color-border-active: var(--ods-system-greys-soft-grey-action);
  --color-border-focus: var(--ods-open-yellow-base);
  --color-divider: var(--ods-system-greys-soft-grey);
  --color-border-subtle: rgba(58, 58, 58, 0.5);
  --color-border-strong: var(--ods-system-greys-grey);

  /* Text Hierarchy */
  --color-text-primary: var(--ods-system-greys-white);
  --color-text-secondary: var(--ods-system-greys-grey);
  --color-text-tertiary: var(--ods-system-greys-soft-grey-hover);
  --color-text-muted: var(--ods-system-greys-grey-action);
  --color-text-subtle: rgba(250, 250, 250, 0.6);
  --color-text-disabled: var(--ods-system-greys-soft-grey);
  --color-text-on-accent: #1a1a1a;
  --color-text-on-dark: var(--ods-system-greys-white);
  --color-text-inverted: var(--ods-system-greys-background);
  --color-text-placeholder: rgba(136, 136, 136, 0.6);

  /* Accent Colors (brand default — yellow; overridden per platform) */
  --color-accent-primary: var(--ods-open-yellow-base);
  --color-accent-hover: var(--ods-open-yellow-hover);
  --color-accent-active: var(--ods-open-yellow-action);
  --color-accent-focus: var(--ods-open-yellow-base);
  --color-accent-disabled: var(--ods-system-greys-soft-grey);

  /* Status Colors */
  --color-success: var(--ods-attention-green-success);
  --color-success-hover: var(--ods-attention-green-success-hover);
  --color-success-active: var(--ods-attention-green-success-action);
  --color-success-secondary: var(--ods-attention-green-success-secondary);
  --color-success-secondary-hover: var(--ods-attention-green-success-secondary-hover);
  --color-success-secondary-active: var(--ods-attention-green-success-secondary-action);
  --color-error: var(--ods-attention-red-error);
  --color-error-hover: var(--ods-attention-red-error-hover);
  --color-error-active: var(--ods-attention-red-error-action);
  --color-error-secondary: var(--ods-attention-red-error-secondary);
  --color-error-secondary-hover: var(--ods-attention-red-error-secondary-hover);
  --color-error-secondary-active: var(--ods-attention-red-error-secondary-action);
  --color-warning: var(--ods-attention-yellow-warning);
  --color-warning-hover: var(--ods-attention-yellow-warning-hover);
  --color-warning-active: var(--ods-attention-yellow-warning-action);
  --color-warning-secondary: var(--ods-attention-yellow-warning-secondary);
  --color-warning-secondary-hover: var(--ods-attention-yellow-warning-secondary-hover);
  --color-warning-secondary-active: var(--ods-attention-yellow-warning-secondary-action);
  --color-info: var(--ods-flamingo-cyan-base);
  --color-info-hover: var(--ods-flamingo-cyan-hover);
  --color-info-active: var(--ods-flamingo-cyan-action);

  /* Interactive States */
  --color-disabled: var(--ods-system-greys-soft-grey);
  --color-focus-ring: var(--ods-open-yellow-base);
  --color-focus-visible: var(--ods-open-yellow-base);

  /* Links */
  --color-link: var(--ods-open-yellow-base);
  --color-link-hover: var(--ods-open-yellow-hover);
  --color-link-visited: #b794f6;

  /* Adaptive Current Color (Platform-Specific) */
  --ods-current: var(--color-text-primary);

  /* Adaptive Accent Color (Platform-Specific).
   * Defaults to yellow — matches OpenMSP / OpenFrame brand. Every
   * `[data-app-type="X"]` block below overrides this for its platform.
   * Critical: MuxPlayer reads this via `accentColor="var(--ods-accent)"`
   * and falls back to its built-in `#fa50b5` (pink) if undefined. */
  --ods-accent: var(--ods-open-yellow-base);
}

/* Tier-2 re-anchor for NESTED theme scopes. Tier-2 aliases declared at
 * `:root` compute there (custom properties substitute var() where the
 * property is declared), so descendants of a nested `.theme-light` /
 * `.theme-dark` island inherit the ROOT-theme value — the island's Tier-1
 * flips never reach them. Re-declaring an alias inside the scope classes
 * recomputes it against the scoped Tier-1 primitives, letting components
 * inside theme islands (e.g. AnnouncementBar) use semantic tokens instead
 * of reaching for Tier-1 directly. Values are identical to the `:root`
 * declarations above — keep them in sync. */
.theme-dark,
.theme-light {
  --color-text-primary: var(--ods-system-greys-white);
  --color-bg-hover: var(--ods-system-greys-black-hover);
  --color-bg-active: var(--ods-system-greys-black-action);
}

/* Alpha-based semantic tokens that need a light-theme tweak (the only
 * Tier-2 values not derived from a flipping primitive). */
:root[data-theme="light"],
.theme-light {
  --color-bg-overlay: rgba(250, 250, 250, 0.8);
  --color-bg-backdrop: rgba(0, 0, 0, 0.4);
  --color-text-subtle: rgba(26, 26, 26, 0.6);
  --color-text-placeholder: rgba(118, 118, 118, 0.6);
  --color-border-subtle: rgba(0, 0, 0, 0.08);
}

/* ===================================================================== */
/* HIGH CONTRAST (accessibility)                                         */
/* ===================================================================== */
.theme-high-contrast {
  color-scheme: dark;
  --color-bg: #000000;
  --color-bg-card: #000000;
  --color-text-primary: #ffffff;
  --color-text-secondary: #ffffff;
  --color-accent-primary: #00ff00;
  --color-border-default: #ffffff;
  --color-focus-ring: #00ff00;
}

/* ===================================================================== */
/* PLATFORM OVERRIDES — brand/accent ONLY.                               */
/* Reference `--ods-*` so they follow the active theme; never touch      */
/* bg/text/border so theme (data-theme on <html>) and platform           */
/* (data-app-type on <body>) compose across different elements.          */
/* ===================================================================== */
[data-app-type="openframe"] {
  /* OpenFrame: yellow accents, cyan links */
  --color-accent-primary: var(--ods-open-yellow-base);
  --color-accent-hover: var(--ods-open-yellow-hover);
  --color-accent-active: var(--ods-open-yellow-action);
  --color-accent-focus: var(--ods-open-yellow-base);
  --color-focus-ring: var(--ods-open-yellow-base);
  --color-focus-visible: var(--ods-open-yellow-base);
  --color-link: var(--ods-flamingo-cyan-base);
  --color-link-hover: var(--ods-flamingo-cyan-hover);
  --ods-current: var(--ods-open-yellow-base);
  --ods-accent: var(--ods-open-yellow-base);
}

[data-app-type="openmsp"] {
  --color-accent-primary: var(--ods-open-yellow-base);
  --color-accent-hover: var(--ods-open-yellow-hover);
  --color-accent-active: var(--ods-open-yellow-action);
  --color-accent-focus: var(--ods-open-yellow-base);
  --color-focus-ring: var(--ods-open-yellow-base);
  --color-focus-visible: var(--ods-open-yellow-base);
  --color-link: var(--ods-open-yellow-base);
  --color-link-hover: var(--ods-open-yellow-hover);
  --ods-current: var(--ods-open-yellow-base);
  --ods-accent: var(--ods-open-yellow-base);
}

[data-app-type="flamingo-teaser"] {
  --color-accent-primary: var(--ods-flamingo-pink-base);
  --color-accent-hover: var(--ods-flamingo-pink-hover);
  --color-accent-active: var(--ods-flamingo-pink-action);
  --color-accent-focus: var(--ods-flamingo-pink-base);
  --color-focus-ring: var(--ods-flamingo-pink-base);
  --color-focus-visible: var(--ods-flamingo-pink-base);
  --color-link: var(--ods-flamingo-pink-base);
  --color-link-hover: var(--ods-flamingo-pink-hover);
  --ods-current: var(--ods-flamingo-pink-base);
  --ods-accent: var(--ods-flamingo-pink-base);
}

[data-app-type="flamingo"] {
  --color-accent-primary: var(--ods-flamingo-pink-base);
  --color-accent-hover: var(--ods-flamingo-pink-hover);
  --color-accent-active: var(--ods-flamingo-pink-action);
  --color-accent-focus: var(--ods-flamingo-pink-base);
  --color-focus-ring: var(--ods-flamingo-pink-base);
  --color-focus-visible: var(--ods-flamingo-pink-base);
  --color-link: var(--ods-flamingo-pink-base);
  --color-link-hover: var(--ods-flamingo-pink-hover);
  /* Intentional brand scrim (preserved from original) — a dark modal
   * backdrop is by-design for this platform in both themes. */
  --color-bg-overlay: rgba(0, 0, 0, 0.7);
  --ods-current: var(--ods-flamingo-pink-base);
  --ods-accent: var(--ods-flamingo-pink-base);
}

[data-app-type="tmcg"] {
  --color-accent-primary: var(--ods-flamingo-pink-base);
  --color-accent-hover: var(--ods-flamingo-pink-hover);
  --color-accent-active: var(--ods-flamingo-pink-action);
  --color-accent-focus: var(--ods-flamingo-pink-base);
  --color-focus-ring: var(--ods-flamingo-pink-base);
  --color-focus-visible: var(--ods-flamingo-pink-base);
  --color-link: var(--ods-flamingo-pink-base);
  --color-link-hover: var(--ods-flamingo-pink-hover);
  /* TMCG design: cards share the page background (references semantic
   * token, so it still follows the active theme). */
  --color-bg-card: var(--color-bg);
  --color-bg-card-primary: var(--color-bg);
  /* Intentional brand scrim (preserved from original). */
  --color-bg-overlay: rgba(0, 0, 0, 0.7);
  --ods-current: var(--ods-flamingo-pink-base);
  --ods-accent: var(--ods-flamingo-pink-base);
}

[data-app-type="marketing-hub"] {
  --color-accent-primary: var(--ods-flamingo-pink-base);
  --color-accent-hover: var(--ods-flamingo-pink-hover);
  --color-accent-active: var(--ods-flamingo-pink-action);
  --color-accent-focus: var(--ods-flamingo-pink-base);
  --color-focus-ring: var(--ods-flamingo-pink-base);
  --color-focus-visible: var(--ods-flamingo-pink-base);
  --color-link: var(--ods-flamingo-pink-base);
  --color-link-hover: var(--ods-flamingo-pink-hover);
  --ods-current: var(--ods-flamingo-pink-base);
  --ods-accent: var(--ods-flamingo-pink-base);
}

[data-app-type="product-hub"] {
  --color-accent-primary: var(--ods-attention-green-success);
  --color-accent-hover: var(--ods-attention-green-success-hover);
  --color-accent-active: var(--ods-attention-green-success-action);
  --color-accent-focus: var(--ods-attention-green-success);
  --color-focus-ring: var(--ods-attention-green-success);
  --color-focus-visible: var(--ods-attention-green-success);
  --color-link: var(--ods-attention-green-success);
  --color-link-hover: var(--ods-attention-green-success-hover);
  --ods-current: var(--ods-attention-green-success);
  --ods-accent: var(--ods-attention-green-success);
}

[data-app-type="revenue-hub"] {
  --color-accent-primary: var(--ods-attention-yellow-warning);
  --color-accent-hover: var(--ods-open-yellow-hover);
  --color-accent-active: var(--ods-open-yellow-action);
  --color-accent-focus: var(--ods-attention-yellow-warning);
  --color-focus-ring: var(--ods-attention-yellow-warning);
  --color-focus-visible: var(--ods-attention-yellow-warning);
  --color-link: var(--ods-attention-yellow-warning);
  --color-link-hover: var(--ods-open-yellow-hover);
  --ods-current: var(--ods-attention-yellow-warning);
  --ods-accent: var(--ods-attention-yellow-warning);
}

[data-app-type="people-hub"] {
  --color-accent-primary: var(--ods-flamingo-cyan-base);
  --color-accent-hover: var(--ods-flamingo-cyan-hover);
  --color-accent-active: var(--ods-flamingo-cyan-action);
  --color-accent-focus: var(--ods-flamingo-cyan-base);
  --color-focus-ring: var(--ods-flamingo-cyan-base);
  --color-focus-visible: var(--ods-flamingo-cyan-base);
  --color-link: var(--ods-flamingo-cyan-base);
  --color-link-hover: var(--ods-flamingo-cyan-hover);
  --ods-current: var(--ods-flamingo-cyan-base);
  --ods-accent: var(--ods-flamingo-cyan-base);
}

[data-app-type="company-hub"] {
  --color-accent-primary: var(--ods-attention-red-error);
  --color-accent-hover: var(--ods-attention-red-error-hover);
  --color-accent-active: var(--ods-attention-red-error-action);
  --color-accent-focus: var(--ods-attention-red-error);
  --color-focus-ring: var(--ods-attention-red-error);
  --color-focus-visible: var(--ods-attention-red-error);
  --color-link: var(--ods-attention-red-error);
  --color-link-hover: var(--ods-attention-red-error-hover);
  --ods-current: var(--ods-attention-red-error);
  --ods-accent: var(--ods-attention-red-error);
}

/* ===================================================================== */
/* TIER 3 — Convenience shorthand                                        */
/* ===================================================================== */
:root {
  --bg: var(--color-bg);
  --card: var(--color-bg-card);
  --border: var(--color-border-default);
  --text: var(--color-text-primary);
  --accent: var(--color-accent-primary);
  --success: var(--color-success);
  --success-sec: var(--color-success-secondary);
  --error: var(--color-error);
  --error-sec: var(--color-error-secondary);
  --warning: var(--color-warning);
  --warning-sec: var(--color-warning-secondary);
  --info: var(--color-info);
  --disabled: var(--color-disabled);
  --focus: var(--color-focus-ring);
}
