/* Hanna themes adapter for the CRM: feeds the shared --ht-* colours into the CRM's own variable names.
 * Loaded after the CRM's stylesheet. Only in Visual · v2 (data-hanna-look="hanna"); Classic · v1 keeps the
 * CRM's own Hanna, Dark, Light and Classic looks untouched. Colours only, never sizes or positions. */
:root[data-hanna-look="hanna"],
:root[data-hanna-look="hanna"][data-theme],
:root[data-hanna-look="classic"][data-theme="dark"],
:root[data-hanna-look="classic"][data-theme="light"],
:root[data-hanna-look="classic"][data-theme="classic"] {
  --bg: var(--ht-bg);
  --rail: color-mix(in srgb, var(--ht-chrome) 92%, transparent);
  --panel: color-mix(in srgb, var(--ht-panel) 72%, transparent);
  --tile: color-mix(in srgb, var(--ht-panel) 90%, transparent);
  --glaze: color-mix(in srgb, var(--ht-text) 5%, transparent);
  --line: var(--ht-line);
  --line-strong: color-mix(in srgb, var(--ht-line) 70%, var(--ht-muted));
  --text: var(--ht-text);
  --muted: var(--ht-muted);
  --accent: var(--ht-accent);
  --accent-ink: color-mix(in srgb, var(--ht-accent) 80%, var(--ht-text));
  --button: color-mix(in srgb, var(--ht-accent) 26%, var(--ht-panel));
  --active: color-mix(in srgb, var(--ht-accent) 20%, transparent);
  --hover: var(--ht-hover, color-mix(in srgb, var(--ht-text) 7%, transparent));
  --shine: color-mix(in srgb, #fff 9%, transparent);
  --shadow: color-mix(in srgb, #000 24%, transparent);
  --good: color-mix(in srgb, var(--ht-good) 72%, var(--ht-text));
  --good-soft: color-mix(in srgb, var(--ht-good) 14%, transparent);
  --warn: color-mix(in srgb, var(--ht-pending) 72%, var(--ht-text));
  --warn-soft: color-mix(in srgb, var(--ht-pending) 14%, transparent);
  --bad: color-mix(in srgb, var(--ht-bad) 78%, var(--ht-text));
  --bad-soft: color-mix(in srgb, var(--ht-bad) 14%, transparent);
  /* the room light: the theme's key colours, as in the main app */
  --backdrop:
    radial-gradient(ellipse at 85% 5%, color-mix(in srgb, var(--ht-bank-a) 18%, transparent), transparent 55%),
    radial-gradient(ellipse at 15% 95%, color-mix(in srgb, var(--ht-bank-c) 13%, transparent), transparent 60%);
}
/* light modes: filled buttons carry white text, so they take the theme's deep brand colour */
:root[data-hanna-mode="light"],
:root[data-hanna-mode="light"][data-theme] {
  --button: var(--ht-brand-print);
  --accent-ink: var(--ht-brand-print);
}
/* solid surfaces behind what people read row by row */
:root[data-hanna-look] table { background: color-mix(in srgb, var(--ht-raised) 60%, transparent); }
/* the Workspace seal in place of the CRM's "h" mark (every look) */
.brand-mark.has-seal { font-size: 0; background: none; border: 0; box-shadow: none; padding: 0; display: inline-grid; place-items: center; }
.sidebar .brand > hanna-seal { margin-right: 2px; }
