/* Token layer for the app's redesign (flag new_ui, body.new-ui) and for the
   Prospect diagnosis view, which was the first page built this way. Signal
   Cobalt values, the same palette as css/tokens.css, scoped so that the app
   without the flag doesn't change: nothing here touches :root, so the app's
   own --page, --surface and --text tokens and its color-scheme stay as they
   are. Components read these variables, never raw hex. Dark values follow the
   app's theme rule: the OS preference unless Settings › Appearance forces one. */
:is(body.new-ui, #viewNewdiagnosis) {
  --ui-paper: #fff;
  --ui-paper-2: #f6f6f4;
  --ui-ink: #0e0f11;
  --ui-ink-2: #5a5d63;
  --ui-ink-3: #707379;
  --ui-line: #e4e5e2;
  --ui-accent: #1f4fff;
  --ui-accent-soft: #e8edff;
  --ui-on-accent: #fff;
  --ui-rival: #8e9298;
  --ui-grid: rgba(14, 15, 17, .045);
  --ui-bad: #d93a2b;
  /* Added with the app layout (mockup v6): page behind the cards, inner
     lines, row hover, card fill and shadow (in dark the card is lighter than
     the page; the diagnosis view keeps --ui-paper as its page), and the negative / accent variants. */
  --ui-bg: #fbfbfa;
  --ui-card: #fff;
  --ui-line-2: #ececea;
  --ui-hover: #f1f1ef;
  --ui-shadow: 0 1px 2px rgba(14, 15, 17, .04), 0 4px 16px rgba(14, 15, 17, .03);
  --ui-accent-ink: #1f4fff;
  --ui-accent-band: rgba(31, 79, 255, .09);
  --ui-rival-soft: #e6e7e4;
  --ui-neg: #b42318;
  --ui-neg-soft: #fdecea;
  /* A recommendation, not an error (a text over the usual length). */
  --ui-warn: #b54708;
  --ui-warn-soft: #fef3e6;
  /* A healthy status (the admin panel's "Working"). Not the accent: blue is the brand. */
  --ui-good: #15803d;
  /* One color per AI or rival on charts (s0 is --ui-accent): distinct in hue, each one readable on the card. */
  --ui-s1: #0f8a7e; --ui-s2: #b8730a; --ui-s3: #7a4fd6; --ui-s4: #d1495b; --ui-s5: #4f5b6b;
  /* Each AI's own color on charts and chips (Valentina, 2026-10-11): fixed per AI, never the accent, which is the brand. */
  --ui-ai-chatgpt: #0f8a6a; --ui-ai-gemini: #4f5b6b; --ui-ai-claude: #c8643f; --ui-ai-perplexity: #6a4bd8; --ui-ai-mistral: #8a7a12; --ui-ai-grok: #b0457f;
  --ui-font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-mono: "Geist Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(body.new-ui, #viewNewdiagnosis) {
    --ui-paper: #0b0c0e; --ui-paper-2: #121417; --ui-ink: #eeeeeb; --ui-ink-2: #a6aab0; --ui-ink-3: #8a8e95;
    --ui-line: #24272c; --ui-accent: #7088ff; --ui-accent-soft: rgba(112, 136, 255, .16); --ui-on-accent: #0e0f11;
    --ui-rival: #555a62; --ui-grid: rgba(238, 238, 235, .04); --ui-bad: #f06a5d;
    --ui-bg: #0b0c0e; --ui-card: #131417; --ui-line-2: #1e2023; --ui-hover: #1c1d21; --ui-shadow: none; --ui-accent-ink: #9aabff;
    --ui-accent-band: rgba(112, 136, 255, .14); --ui-rival-soft: #26282c; --ui-neg: #ff8a80; --ui-neg-soft: #2a1715; --ui-warn: #f5b25c; --ui-warn-soft: #2b1f0f; --ui-good: #4ade80;
    --ui-s1: #3cc4b4; --ui-s2: #f0a83c; --ui-s3: #a98bf0; --ui-s4: #ff7a8a; --ui-s5: #9aa6b6;
    --ui-ai-chatgpt: #1fa07c; --ui-ai-gemini: #9aa6b6; --ui-ai-claude: #d0704a; --ui-ai-perplexity: #8670e8; --ui-ai-mistral: #a8952a; --ui-ai-grok: #c45a93;
  }
}
:root[data-theme="dark"] :is(body.new-ui, #viewNewdiagnosis) {
  --ui-paper: #0b0c0e; --ui-paper-2: #121417; --ui-ink: #eeeeeb; --ui-ink-2: #a6aab0; --ui-ink-3: #8a8e95;
  --ui-line: #24272c; --ui-accent: #7088ff; --ui-accent-soft: rgba(112, 136, 255, .16); --ui-on-accent: #0e0f11;
  --ui-rival: #555a62; --ui-grid: rgba(238, 238, 235, .04); --ui-bad: #f06a5d;
  --ui-bg: #0b0c0e; --ui-card: #131417; --ui-line-2: #1e2023; --ui-hover: #1c1d21; --ui-shadow: none; --ui-accent-ink: #9aabff;
  --ui-accent-band: rgba(112, 136, 255, .14); --ui-rival-soft: #26282c; --ui-neg: #ff8a80; --ui-neg-soft: #2a1715; --ui-warn: #f5b25c; --ui-warn-soft: #2b1f0f; --ui-good: #4ade80;
    --ui-s1: #3cc4b4; --ui-s2: #f0a83c; --ui-s3: #a98bf0; --ui-s4: #ff7a8a; --ui-s5: #9aa6b6;
    --ui-ai-chatgpt: #1fa07c; --ui-ai-gemini: #9aa6b6; --ui-ai-claude: #d0704a; --ui-ai-perplexity: #8670e8; --ui-ai-mistral: #a8952a; --ui-ai-grok: #c45a93;
}
/* A document the client reads (the Action plan's client export): always the
   light values, whatever the app's theme, so the preview is the PDF. */
body.new-ui .ui-light {
  --ui-paper: #fff; --ui-paper-2: #f6f6f4; --ui-ink: #0e0f11; --ui-ink-2: #5a5d63; --ui-ink-3: #707379;
  --ui-line: #e4e5e2; --ui-accent: #1f4fff; --ui-accent-soft: #e8edff; --ui-on-accent: #fff;
  --ui-rival: #8e9298; --ui-grid: rgba(14, 15, 17, .045); --ui-bad: #d93a2b;
  --ui-bg: #fbfbfa; --ui-card: #fff; --ui-line-2: #ececea; --ui-hover: #f1f1ef; --ui-shadow: 0 1px 2px rgba(14, 15, 17, .04), 0 4px 16px rgba(14, 15, 17, .03);
  --ui-accent-ink: #1f4fff; --ui-accent-band: rgba(31, 79, 255, .09); --ui-rival-soft: #e6e7e4; --ui-neg: #b42318; --ui-neg-soft: #fdecea;
  --ui-s1: #0f8a7e; --ui-s2: #b8730a; --ui-s3: #7a4fd6; --ui-s4: #d1495b; --ui-s5: #4f5b6b;
  --ui-ai-chatgpt: #0f8a6a; --ui-ai-gemini: #4f5b6b; --ui-ai-claude: #c8643f; --ui-ai-perplexity: #6a4bd8; --ui-ai-mistral: #8a7a12; --ui-ai-grok: #b0457f;
  color-scheme: light;
}
