/* Cloud Pavilion console — the safety areas and the platform's own surfaces (docs/THEMES.md §5).
   Locked in look and words (owner, 14 Nov 2026): approval and step-up prompts, key and secret warnings, "an agent
   wants to…" requests, sign-in, costs and limits; and the platform's surfaces (sign-in, joining, the not-a-member
   page). They draw with this fixed, built-in palette, which ignores every company theme: custom properties set here
   on the area's own element win over anything a theme set on <html>. Only the member's own light/dark and high
   contrast reach them, and those pick between fixed palettes below. The values are gate/src/themes.ts SAFETY_PALETTE;
   a unit test holds the two together. No theme token is named "safety", and no proposal can reach this file. */

.entry, .toasts, #bell, #inbox, #tdWaiting, .approval, #overlay,
.page:has(#vaultTable), .page:has(#usCards), .page:has(#blView), .page:has(#memTable), .page:has(#budForm) {
  --ink-0: #07090d; --ink-1: #121821; --ink-2: #18202a; --ink-3: #1f2833; --ink-4: #2a3542;
  --line: #212a35; --line-2: #2c3846; --control: #66727f;
  --text: #e9e6df; --text-2: #a7adb6; --text-3: #8d949e;
  --canopy: #ff5a36; --canopy-2: #ff7a5c; --canopy-fill: #c93a18; --canopy-ink: #2a0f08; --on-fill: #ffffff;
  --sky: #8cc8ff; --ok: #3ddc97; --warn: #ffb020; --bad: #ff4d6a; --bad-2: #ff8a9c; --info: #a59cff; --focus: #ff7a5c;
  --chrome-bg: #07090d; --chrome-fg: #e9e6df; --chrome-fg-2: #8d949e; --chrome-hover: #11161d; --chrome-active: #18202a; --chrome-line: #161d26; --content-bg: #121821; --panel-divider: #212a35; --pop-bg: #1a222d;
  --rail-bg: #0d1117; --rail-edge: #161d26;
  --radius: 4px; --radius-s: 3px; --focus-w: 2px; --content-radius: 10px;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  /* the derived values, worked out again from the fixed tokens (tokens.css) */
  --line-3: color-mix(in srgb, var(--control) 55%, var(--line-2));
  --canopy-fill-2: color-mix(in srgb, var(--canopy-fill) 88%, var(--text));
  --code-text: color-mix(in srgb, var(--text) 88%, var(--sky));
  --paper: var(--text); --idle: var(--text-3); --hair: 1px solid var(--line);
  /* elevation (tokens.css): made again from the fixed palette, so a toast's shadow is never tinted by a company theme;
     the scheme's knobs (--elev-a1, --elev-a2, --elev-edge-a, --elev-lit-a) are plain numbers inherited from <html> */
  --elev-ink: var(--ink-0);
  --elev-edge: color-mix(in srgb, var(--text) var(--elev-edge-a), transparent);
  --elev-lit: color-mix(in srgb, var(--text) var(--elev-lit-a), transparent);
  --elev-1: inset 0 1px 0 var(--elev-lit), 0 0 0 1px var(--elev-edge), 0 1px 2px color-mix(in srgb, var(--elev-ink) var(--elev-a1), transparent),
    0 3px 8px -2px color-mix(in srgb, var(--elev-ink) var(--elev-a2), transparent);
  --elev-2: inset 0 1px 0 var(--elev-lit), 0 0 0 1px var(--elev-edge), 0 1px 2px color-mix(in srgb, var(--elev-ink) var(--elev-a1), transparent),
    0 4px 8px -2px color-mix(in srgb, var(--elev-ink) var(--elev-a1), transparent), 0 14px 28px -8px color-mix(in srgb, var(--elev-ink) var(--elev-a2), transparent);
  --elev-3: inset 0 1px 0 var(--elev-lit), 0 0 0 1px var(--elev-edge), 0 2px 4px color-mix(in srgb, var(--elev-ink) var(--elev-a1), transparent),
    0 10px 20px -6px color-mix(in srgb, var(--elev-ink) var(--elev-a1), transparent), 0 28px 56px -14px color-mix(in srgb, var(--elev-ink) var(--elev-a2), transparent);
  --pop-shadow: var(--elev-2); --shadow: var(--elev-3);
  font-family: var(--sans);
}
:root[data-scheme="light"] :is(.entry, .toasts, #bell, #inbox, #tdWaiting, .approval, #overlay,
.page:has(#vaultTable), .page:has(#usCards), .page:has(#blView), .page:has(#memTable), .page:has(#budForm)) {
  --ink-0: #efece5; --ink-1: #fcfbf9; --ink-2: #ffffff; --ink-3: #ebe6dc; --ink-4: #dcd6ca;
  --line: #e4e0d7; --line-2: #d4cdc0; --control: #8a8378;
  --text: #1b1a17; --text-2: #4a4741; --text-3: #66625a;
  --canopy: #cf3f16; --canopy-2: #b5310f; --canopy-fill: #c4380f; --canopy-ink: #ffffff; --on-fill: #ffffff;
  --sky: #1d5fb0; --ok: #024e26; --warn: #8a5800; --bad: #eb5258; --bad-2: #b01f37; --info: #4b59b7; --focus: #c4380f;
  --chrome-bg: #e6e3dc; --chrome-fg: #24231f; --chrome-fg-2: #625e56; --chrome-hover: #dcd8d0; --chrome-active: #d1ccc2; --chrome-line: #d3cec4; --content-bg: #fcfbf9; --panel-divider: #e4e0d7; --pop-bg: #ffffff;
  --rail-bg: #efede8; --rail-edge: #d3cec4;
  --elev-ink: var(--text);
}
:root[data-contrast="more"] :is(.entry, .toasts, #bell, #inbox, #tdWaiting, .approval, #overlay,
.page:has(#vaultTable), .page:has(#usCards), .page:has(#blView), .page:has(#memTable), .page:has(#budForm)) {
  --ink-0: #000000; --ink-1: #0a0a0a; --ink-2: #141414; --ink-3: #1a1a1a; --ink-4: #333333;
  --line: #5c5c5c; --line-2: #7a7a7a; --control: #b3b3b3;
  --text: #ffffff; --text-2: #e6e6e6; --text-3: #cccccc;
  --canopy: #ffd500; --canopy-2: #ffe14d; --canopy-fill: #ffd500; --canopy-ink: #000000; --on-fill: #000000;
  --sky: #80d4ff; --ok: #65ebc6; --warn: #f9b42f; --bad: #c95347; --bad-2: #ff9eaa; --info: #7c73d2; --focus: #ffe14d;
  --chrome-bg: #000000; --chrome-fg: #ffffff; --chrome-fg-2: #cccccc; --chrome-hover: #141414; --chrome-active: #1a1a1a; --chrome-line: #5c5c5c; --content-bg: #0a0a0a; --panel-divider: #7a7a7a; --pop-bg: #1a1a1a;
  --rail-bg: #050505; --rail-edge: #5c5c5c;
  --focus-w: 3px;
}
:root[data-contrast="more"][data-scheme="light"] :is(.entry, .toasts, #bell, #inbox, #tdWaiting, .approval, #overlay,
.page:has(#vaultTable), .page:has(#usCards), .page:has(#blView), .page:has(#memTable), .page:has(#budForm)) {
  --ink-0: #f0f0f0; --ink-1: #ffffff; --ink-2: #f5f5f5; --ink-3: #e6e6e6; --ink-4: #cccccc;
  --line: #8c8c8c; --line-2: #6b6b6b; --control: #4d4d4d;
  --text: #000000; --text-2: #1a1a1a; --text-3: #333333;
  --canopy: #0038a8; --canopy-2: #00297a; --canopy-fill: #00297a; --canopy-ink: #ffffff; --on-fill: #ffffff;
  --sky: #00297a; --ok: #00735a; --warn: #965311; --bad: #8b020b; --bad-2: #8f0018; --info: #1e379f; --focus: #00297a;
  --chrome-bg: #f0f0f0; --chrome-fg: #000000; --chrome-fg-2: #333333; --chrome-hover: #e6e6e6; --chrome-active: #cccccc; --chrome-line: #6b6b6b; --content-bg: #ffffff; --panel-divider: #6b6b6b; --pop-bg: #ffffff;
  --rail-bg: #f6f6f6; --rail-edge: #6b6b6b;
}
/* The areas paint their own ground, so a themed page around them never shows through. */
#inbox, #tdWaiting, .approval, .page:has(#vaultTable), .page:has(#usCards), .page:has(#blView), .page:has(#memTable), .page:has(#budForm) { color: var(--text); }
#inbox, #tdWaiting, .page:has(#vaultTable), .page:has(#usCards), .page:has(#blView), .page:has(#memTable), .page:has(#budForm) { background: var(--ink-1); }
