/*
 * Semantic contract
 * -----------------
 * This is the only palette API components may use. Theme files provide the
 * --theme-* values; the rest of the site consumes the roles below.
 */

html[data-design-system="halde"]{
  --bg-page:var(--theme-page);
  --bg-field:var(--theme-field);
  --bg-paper:var(--theme-paper);
  --bg-surface:var(--theme-surface);
  --bg-surface-muted:var(--theme-surface-muted);
  --bg-elevated:var(--theme-elevated);
  --bg-inverse:var(--theme-inverse-bg);

  --text-primary:var(--theme-text);
  --text-secondary:var(--theme-text-muted);
  --text-tertiary:var(--theme-text-faint);
  --text-inverse:var(--theme-inverse-text);
  --text-on-accent:var(--theme-on-accent);

  --border-subtle:var(--theme-rule-subtle);
  --border-default:var(--theme-rule);
  --border-strong:var(--theme-rule-strong);

  --accent:var(--theme-accent);
  --accent-fill:var(--theme-accent-fill,var(--theme-accent));
  --accent-soft:var(--theme-accent-soft);
  --editorial-highlight:var(--theme-editorial-highlight);
  --brand:var(--theme-brand);
  --brand-ink:var(--theme-brand-ink);
  --brand-soft:var(--theme-brand-soft);
  --text-on-brand:var(--theme-on-brand);
  --positive:var(--theme-positive);
  --warning:var(--theme-warning);
  --danger:var(--theme-danger);

  --control-bg:var(--theme-control);
  --control-bg-strong:var(--theme-control-strong);
  --control-text:var(--text-primary);
  --control-border:var(--border-strong);

  --command-bg:var(--theme-command-bg);
  --command-text:var(--theme-command-text);
  --command-action-bg:var(--theme-command-action-bg);
  --command-action-text:var(--theme-command-action-text);

  --artifact-bg:var(--theme-artifact-bg);
  --artifact-bg-raised:var(--theme-artifact-bg-raised);
  --artifact-text:var(--theme-artifact-text);
  --artifact-muted:var(--theme-artifact-muted);
  --artifact-faint:var(--theme-artifact-faint);
  --artifact-rule:var(--theme-artifact-rule);

  /* Fixed printed matter remains a light, ink-on-paper artifact in every UI theme. */
  --document-bg:var(--theme-document-bg);
  --document-text:var(--theme-document-text);
  --document-muted:var(--theme-document-muted);
  --document-rule:var(--theme-document-rule);

  --shadow-soft:var(--theme-shadow-soft);
  --shadow-strong:var(--theme-shadow-strong);
  --texture-image:var(--theme-texture-image);
  --texture-opacity:var(--theme-texture-opacity);
  --texture-blend:var(--theme-texture-blend);
  --logo-filter:var(--theme-logo-filter);
}
