/* Design tokens — Sunlight brand palette, derived from the product logo
   (navy wordmark, blue accent) and the Web Portal screens (orange "solar"
   highlight panels); chart and status colours follow the Eniris portal.
   Light theme only. */
:root{
  /* Brand core */
  --slt-navy-900:#0f1b30;
  --slt-navy-800:#16233d;
  --slt-navy-700:#1b2a49;   /* primary navy — logo, primary buttons */
  --slt-navy-600:#2a3c60;   /* period bar, active tab */
  --slt-blue-500:#4e8fde;   /* logo blue accent — focus rings */
  --slt-blue-100:#eaf2fc;   /* "energy" panel background */
  --slt-blue-200:#cfe0f5;   /* its borders */
  --slt-blue-600:#1f5fb0;   /* its title */
  --slt-blue-700:#2b5687;   /* its KPI labels */
  --link-ink:#1f5fb0;       /* link-style text on white (tooltip hint) */
  --slt-orange-600:#c1720f; /* "solar production" highlight panel text */
  --slt-orange-700:#9a6a1f; /* its KPI labels */
  --slt-orange-bg:#fdf3e4;
  --slt-orange-border:#f3ddb3;

  /* Neutrals */
  --gray-25:#fbfbfc;
  --gray-50:#f6f7f9;
  --gray-100:#eef0f3;
  --gray-200:#e3e6ec;
  --gray-300:#cdd3dd;
  --gray-400:#9aa4b2;
  --gray-500:#6b7684;
  --gray-600:#4b5563;
  --gray-700:#364152;
  --gray-800:#1f2937;
  --gray-900:#101828;

  /* Semantic aliases */
  --bg-page:var(--gray-50);
  --bg-card:#ffffff;
  --border:var(--gray-200);
  --border-strong:var(--gray-300);
  --text-primary:var(--gray-900);
  --text-secondary:var(--gray-500);
  --text-muted:var(--gray-400);
  --accent:var(--slt-navy-700);
  --focus-ring:rgba(78,143,222,.25);

  /* Chart palette — hues close to the Eniris portal's, validated with the
   * dataviz checks against the white chart surface (lightness band, chroma,
   * colour-blind and normal-vision separation, contrast). Four rules:
   *  - an entity keeps ONE colour on every chart (PV, grid, battery);
   *  - "nothing / baseline / zero" data is one neutral grey;
   *  - polarity (good/bad, +/−) wears the status pair: green / red;
   *  - the summary result (actual PV+battery, totals) wears summary navy.
   * PV, grid and battery clear every check all-pairs, since their lines cross.
   * Orange, and the two status colours as marks, sit under 3:1 on white:
   * every chart they're in has a legend, hover labels and the Statistics table. */
  --series-production:#f0932b;  /* PV — Eniris "Production" orange */
  --series-grid:#3d7fd6;        /* grid — Eniris "Grid" blue */
  --series-battery:#16a394;     /* battery / storage — Eniris teal */
  --series-summary:#3a4a8c;     /* actual (PV+battery) and totals */
  --series-neutral:var(--gray-400); /* baseline, no control, no assets, zero */
  --status-good:#7cba3e;        /* positive: gains, battery discharge (the saving) */
  --status-bad:#cc4b3f;         /* negative: tariff (what you pay), peak import, losses */
  /* The same two for text (numbers, labels): >= 4.5:1 on white. */
  --status-good-text:#2f7d32;
  --status-bad-text:#b3382d;
  /* A total picked out among its parts' rows (the daily savings tooltip). */
  --total-highlight:#0b655d;

  /* What each chart series means, mapped onto the palette above. */
  --series-baseline:var(--series-neutral);
  --series-no-assets:var(--series-neutral);
  --series-pv-only:var(--series-production);
  --series-battery-only:var(--series-battery);
  --series-actual:var(--series-summary);
  --series-tariff:var(--status-bad);
  /* The BESS chart: its windows are washes of these under the tariff line —
   * charging (energy in) grid blue, discharging (the saving) good green; the
   * line is a near-black teal, >= 9:1 on either wash, so it reads over both. */
  --series-charge-window:var(--series-grid);
  --series-discharge-window:var(--status-good);
  --series-tariff-ink:#063a35;
  /* Daily savings statistics, all of the daily totals, so summary navy: a
   * faint band from the lowest to the highest day, its highest edge navy and its
   * lowest edge a lighter periwinkle — "less", never "bad" (a lowest day that
   * lost money switches to --status-bad). The average is a near-black dashed
   * line. Validated against PV orange and battery teal (CVD ΔE >= 12). */
  --series-stat-best:var(--series-summary);
  --series-stat-lowest:#6f82d9;
  --series-stat-avg:var(--text-primary);

  /* A one-hue ramp, light -> dark (monotone lightness, validated): one shade
   * per individual battery unit, so units read as "battery" and a colour
   * never repeats. */
  --ramp-battery-light:#4dbaad;
  --ramp-battery-dark:#0b655d;

  --font-sans:'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm:6px;
  --radius-md:10px;
  --radius-lg:14px;
  --shadow-sm:0 1px 2px rgba(16,24,40,.05);
  --shadow-md:0 4px 14px rgba(16,24,40,.08);
}
