/* ============================================================
   jargan-reskin-vibes.css  —  SP-506 SPA reskin vibes  (SP-510 decoupled)

   These blocks no longer hold raw hex. Each vibe is defined ONCE in the
   canonical jargan-vibe-palette.css (--v vars, loaded FIRST); here we only
   MAP the SPA's instrument-paper scheme (ip-gray / bg / text / accent / chart)
   onto those canonical vars. The Blazor admin maps its color scheme onto the
   same --v vars, so a vibe + the brand colour can't drift. (Token name globs
   are written without slashes so a comment can never contain a comment-closer.)

   SP-510 — the mapping is now SLUG-AGNOSTIC. It used to be authored per theme
   name (a sepia-ledger block + a carbon-lime/harbor-night block + 21 per-slug
   .cal-event rules), so a brand-new vibe had to be hand-grafted in here — the
   PM-010 anti-pattern. It is now keyed on a single GENERIC VIBE SELECTOR that
   matches any non-legacy [data-theme]. A new vibe needs NOTHING in this file:
   its --v-* block in jargan-vibe-palette.css carries every value, and this one
   mapping repaints the SPA from it. The light/dark split that used to justify
   two blocks lived entirely in the --v-* VALUES (a light vibe has light
   --v-surface, a dark vibe has dark --v-surface); the MAPPING is identical.

   GENERIC VIBE SELECTOR: every [data-theme] that is NOT one of the legacy,
   non-token SPA themes (default / dark / pastel-mondrian / instrument-paper /
   textured-geometric / light alias). Those keep their own token maps from
   themes-canonical.css / styles-instrument-paper.css and must NOT inherit the
   --v-* mapping (they define no --v-* block). Add a future legacy theme to the
   :not() list; add a future VIBE and it is matched automatically, zero edits.

   Specificity: :root + [data-theme] + 6×:not([data-theme=…]) = (0,8,0), which
   wins over instrument-paper.css's :root/[data-theme] token maps (0,1,0)
   regardless of load order (the same reason the old per-slug (0,2,0) blocks won).
   ============================================================ */

/* NOTE: the dark-theme --text-muted leak (#4d4d4d) is fixed at its source in
   styles-instrument-paper.css's [data-theme="dark"] block (the app re-injects
   that sheet after this one). Vibe blocks below win because instrument-paper.css
   defines no block for these new theme names. */

/* ============================================================
   The one vibe mapping — instrument-paper scheme -> canonical --v vars.
   Works for light vibes (sepia-ledger) and dark vibes (carbon-lime,
   harbor-night) alike: the orientation lives in the --v-* values, not here.
   ============================================================ */
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) {
  /* raw ip-gray ramp (white=surface end, black=text end) */
  --ip-black:    var(--v-ink);
  --ip-gray-900: var(--v-surface);
  --ip-gray-800: var(--v-surface-raised);
  --ip-gray-700: var(--v-border-strong);
  --ip-gray-600: var(--v-ink-dim);
  --ip-gray-500: var(--v-ink-muted);
  --ip-gray-400: var(--v-ink-muted);
  --ip-gray-300: var(--v-border);
  --ip-gray-200: var(--v-surface-raised);
  --ip-gray-100: var(--v-surface-raised);
  --ip-gray-50:  var(--v-surface);
  --ip-white:    var(--v-canvas);

  --ip-signal-alert:   var(--v-error);
  --ip-signal-warn:    var(--v-warning);
  --ip-signal-active:  var(--v-accent-2);
  --ip-signal-success: var(--v-success);

  --bg-primary:   var(--v-canvas);
  --bg-secondary: var(--v-surface);
  --bg-tertiary:  var(--v-surface-raised);
  --bg-input:     var(--v-surface-raised);
  --bg-hover:     var(--v-hover);
  --bg-active:    var(--v-surface-sunken);
  --text-primary:   var(--v-ink);
  --text-secondary: var(--v-ink-dim);
  --text-muted:     var(--v-ink-muted);
  --border-default: var(--v-border);
  --border-heavy:   var(--v-border-strong);

  /* BRAND signal = JARGAN orange (canonical). Secondary = the vibe's --v-accent-2. */
  --accent-primary:   var(--v-accent-brand--spa, var(--v-accent-brand));
  --accent-secondary: var(--v-accent-2);
  --accent-jargan:    var(--v-accent-brand--spa, var(--v-accent-brand));
  --success: var(--v-success);
  --warning: var(--v-warning);
  --error:   var(--v-error);
  --instagram: var(--v-chart-1);
  --facebook:  var(--v-chart-2);
  --chart-1: var(--v-chart-1);
  --chart-2: var(--v-chart-2);
  --chart-3: var(--v-chart-3);
  --chart-4: var(--v-chart-4);

  /* data-viz chart marks + labels (SP-509) */
  --chart-stage-awareness:     var(--v-stage-awareness);
  --chart-stage-consideration: var(--v-stage-consideration);
  --chart-stage-decision:      var(--v-stage-decision);
  --chart-stage-retention:     var(--v-stage-retention);
  --chart-stage-label-awareness:     var(--v-stage-label-awareness);
  --chart-stage-label-consideration: var(--v-stage-label-consideration);
  --chart-stage-label-decision:      var(--v-stage-label-decision);
  --chart-stage-label-retention:     var(--v-stage-label-retention);
  --chart-donut-awareness:     var(--v-stage-awareness);
  --chart-donut-consideration: var(--v-stage-consideration);
  --chart-donut-decision:      var(--v-stage-decision);
  --chart-donut-retention:     var(--v-stage-retention);
  --chart-funnel-awareness:     var(--v-stage-awareness);
  --chart-funnel-consideration: var(--v-stage-consideration);
  --chart-funnel-decision:      var(--v-stage-decision);
  --chart-funnel-retention:     var(--v-stage-retention);
  --chart-cat-1: var(--v-chart-1); --chart-cat-2: var(--v-chart-2);
  --chart-cat-3: var(--v-chart-3); --chart-cat-4: var(--v-chart-4);
  --chart-cat-5: var(--v-chart-5); --chart-cat-6: var(--v-chart-6);
  --chart-cat-7: var(--v-chart-7); --chart-cat-8: var(--v-chart-8);
  --chart-voice:   var(--v-chart-1);
  --chart-channel: var(--v-chart-2);

  --success-bg: color-mix(in srgb, var(--v-success) 14%, transparent);
  --success-border: color-mix(in srgb, var(--v-success) 50%, transparent);
  --success-color: var(--v-success);
  --error-bg: color-mix(in srgb, var(--v-error) 14%, transparent);
  --error-border: color-mix(in srgb, var(--v-error) 40%, transparent);
  --error-color: var(--v-error);
  --warning-bg: color-mix(in srgb, var(--v-warning) 14%, transparent);
  --warning-border: color-mix(in srgb, var(--v-warning) 40%, transparent);
  --warning-color: var(--v-warning);
}

/* ============================================================
   SP-509 cont. (SP-510 generic) — Calendar deliverable chips (.cal-event)
   recolored to the vibe categorical palette (via --chart-cat-*, which map to
   --v-chart-*). One generic-vibe block, not per-slug. Default + legacy themes
   are excluded by the same :not() chain, so they keep their platform brand
   colors; every vibe inherits these automatically.
   ============================================================ */
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-instagram { color: var(--chart-cat-1); border-left-color: var(--chart-cat-1); background: color-mix(in srgb, var(--chart-cat-1) 14%, transparent); }
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-facebook { color: var(--chart-cat-2); border-left-color: var(--chart-cat-2); background: color-mix(in srgb, var(--chart-cat-2) 14%, transparent); }
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-email { color: var(--chart-cat-3); border-left-color: var(--chart-cat-3); background: color-mix(in srgb, var(--chart-cat-3) 14%, transparent); }
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-linkedin { color: var(--chart-cat-4); border-left-color: var(--chart-cat-4); background: color-mix(in srgb, var(--chart-cat-4) 14%, transparent); }
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-tiktok { color: var(--chart-cat-5); border-left-color: var(--chart-cat-5); background: color-mix(in srgb, var(--chart-cat-5) 14%, transparent); }
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-youtube { color: var(--chart-cat-6); border-left-color: var(--chart-cat-6); background: color-mix(in srgb, var(--chart-cat-6) 14%, transparent); }
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-blog { color: var(--chart-cat-7); border-left-color: var(--chart-cat-7); background: color-mix(in srgb, var(--chart-cat-7) 14%, transparent); }
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-twitter { color: var(--chart-cat-8); border-left-color: var(--chart-cat-8); background: color-mix(in srgb, var(--chart-cat-8) 14%, transparent); }
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-sms { color: var(--chart-cat-2); border-left-color: var(--chart-cat-2); background: color-mix(in srgb, var(--chart-cat-2) 14%, transparent); }
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-spotify { color: var(--chart-cat-4); border-left-color: var(--chart-cat-4); background: color-mix(in srgb, var(--chart-cat-4) 14%, transparent); }
:root[data-theme]:not([data-theme="default"]):not([data-theme="dark"]):not([data-theme="pastel-mondrian"]):not([data-theme="instrument-paper"]):not([data-theme="textured-geometric"]):not([data-theme="light"]) .cal-event.platform-default { color: var(--text-secondary); border-left-color: var(--border-heavy); background: color-mix(in srgb, var(--text-muted) 12%, transparent); }
