/*
 * Maltazon Theme System — Phase 5A foundation.
 * The server-rendered data-mz-theme attribute on <html> is the only authority.
 * Both commercial themes share this cacheable token map; no OS dark-mode input.
 */
html[data-mz-theme="orange"] {
  --mz-page-bg: #f7f7f8;
  --mz-surface: #ffffff;
  --mz-surface-elevated: #ffffff;
  --mz-surface-muted: #f3f4f5;

  --mz-text-primary: #17191d;
  --mz-text-secondary: #68707c;
  --mz-text-muted: #8a9099;
  --mz-text-inverse: #ffffff;

  --mz-border: #e9eaed;
  --mz-border-strong: #d9dce1;

  --mz-primary: #fd641f;
  --mz-primary-hover: #fd641f;
  --mz-primary-active: #fd641f;
  --mz-primary-soft: #fff1e7;

  --mz-card-bg: #ffffff;
  --mz-card-border: #e9eaed;
  --mz-image-well-bg: #ffffff;

  --mz-header-bg: #fd641f;
  --mz-header-text: #191a1d;
  --mz-header-muted: rgba(25, 26, 29, .64);
  --mz-header-border: rgba(25, 26, 29, .14);
  --mz-header-elevation: 0 4px 18px rgba(22, 23, 27, .14);
  --mz-header-control-hover: rgba(25, 26, 29, .09);

  --mz-search-bg: #ffffff;
  --mz-search-text: #191a1d;
  --mz-search-icon: #52565e;
  --mz-search-placeholder: #777c84;
  --mz-search-border: rgba(25, 26, 29, .12);
  --mz-search-shadow: 0 2px 8px rgba(22, 23, 27, .12);

  --mz-footer-bg: #272729;
  --mz-footer-text: #f7f7f8;

  --mz-brand-section-bg: transparent;
  --mz-brand-tile-bg: #ffffff;
  --mz-brand-border: rgba(23, 25, 29, .11);
  --mz-brand-title: #17191d;
  --mz-brand-muted: #68707c;
  --mz-brand-logo-mode: light;

  /* Compatibility aliases; removed progressively as components migrate. */
  --mz-home-primary: var(--mz-primary);
  --mz-home-primary-strong: var(--mz-primary);
  --mz-home-primary-soft: var(--mz-primary-soft);
  --mz-home-ink: var(--mz-text-primary);
  --mz-home-muted: var(--mz-text-secondary);
  --mz-home-surface: var(--mz-surface);
  --mz-home-canvas: var(--mz-page-bg);
  --mz-home-line: var(--mz-border);
}

html[data-mz-theme="black"] {
  --mz-page-bg: #0f1011;
  --mz-surface: #151719;
  --mz-surface-elevated: #1b1d1f;
  --mz-surface-muted: #202326;

  --mz-text-primary: #ffffff;
  --mz-text-secondary: #aeb2b7;
  --mz-text-muted: #8f949b;
  --mz-text-inverse: #111214;

  --mz-border: rgba(255, 255, 255, .10);
  --mz-border-strong: rgba(255, 255, 255, .16);

  --mz-primary: #fd641f;
  --mz-primary-hover: #ff7a3d;
  --mz-primary-active: #e95717;
  --mz-primary-soft: rgba(253, 100, 31, .14);

  --mz-card-bg: #181a1c;
  --mz-card-border: rgba(255, 255, 255, .10);
  --mz-image-well-bg: #ffffff;

  --mz-header-bg: #151719;
  --mz-header-text: #ffffff;
  --mz-header-muted: rgba(255, 255, 255, .68);
  --mz-header-border: rgba(255, 255, 255, .10);
  --mz-header-elevation: 0 3px 18px rgba(0, 0, 0, .28);
  --mz-header-control-hover: rgba(255, 255, 255, .10);

  /* Search deliberately remains a light, high-contrast control. */
  --mz-search-bg: #ffffff;
  --mz-search-text: #191a1d;
  --mz-search-icon: #52565e;
  --mz-search-placeholder: #777c84;
  --mz-search-border: rgba(25, 26, 29, .12);
  --mz-search-shadow: 0 2px 8px rgba(0, 0, 0, .24);

  --mz-footer-bg: #272729;
  --mz-footer-text: #f7f7f8;

  --mz-brand-section-bg: transparent;
  --mz-brand-tile-bg: #181a1c;
  --mz-brand-border: rgba(255, 255, 255, .12);
  --mz-brand-title: #ffffff;
  --mz-brand-muted: #aeb2b7;
  --mz-brand-logo-mode: dark;

  /* Compatibility aliases; removed progressively as components migrate. */
  --mz-home-primary: var(--mz-primary);
  --mz-home-primary-strong: var(--mz-primary);
  --mz-home-primary-soft: var(--mz-primary-soft);
  --mz-home-ink: var(--mz-text-primary);
  --mz-home-muted: var(--mz-text-secondary);
  --mz-home-surface: var(--mz-surface);
  --mz-home-canvas: var(--mz-page-bg);
  --mz-home-line: var(--mz-border);
}
