/*
 * Theme: every colour the web UI uses. The rest of style.css and the charts
 * (report.js) only refer to these variables, so a new theme is a new copy of
 * this file.
 */

:root {
  /* Surfaces */
  --bg: #f7f7f5;
  --panel: #ffffff;
  --border: #e5e7eb;

  /* Text */
  --text: #1f2328;
  --muted: #6b7280;
  /* Text on an accent background, like primary buttons. */
  --on-accent: #ffffff;

  /* Accent: links, selected items, primary buttons. */
  --accent: #2563eb;
  /* Tinted background behind selected items. */
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);

  /* Status: under target, between target and maintenance, over maintenance.
     Also the plan lines in the charts (target green, maintenance red). */
  --green: #2f8a5b;
  --amber: #d99a2b;
  --red: #c9524f;

  /* Single-series charts: the weight line and the food log's total bars. */
  --chart-primary: var(--chart-1);

  /* Chart series, one per food in the stacked daily calories chart. */
  /* Muted mid-tones, so they read on both the light and dark panels. */
  --chart-1: #5b84d6;
  --chart-2: #4fa37a;
  --chart-3: #e0a84a;
  --chart-4: #d4706c;
  --chart-5: #9877c9;
  --chart-6: #4ea3b5;
  --chart-7: #cf7aa6;
  --chart-8: #8fae5a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --panel: #1d2024;
    --border: #30343a;
    --text: #e6e6e6;
    --muted: #9ca3af;
    --accent: #60a5fa;
    --green: #5bb98a;
    --amber: #e3b25c;
    --red: #e07a76;
  }
}
