/* ─────────────────────────────────────────────────────────────────────────
   On Energy — Color tokens
   Minimalist functionalism: a near-monochrome base (white / near-black / grey)
   with one signature brand accent — lime "On Energy green" (#edff8e) — and a
   tightly-scoped set of semantic status colors. Colour is used for meaning,
   never decoration.

   Values are the EFFECTIVE runtime values resolved from the product's
   Tailwind v4 theme (styles/index.css + styles/globals.css). Where the two
   layers collide, the winning declaration is reproduced here.
   ──────────────────────────────────────────────────────────────────────── */

:root {
  /* ── Base neutrals ─────────────────────────────────────────────────── */
  --background: #ffffff;
  --foreground: #171717;
  --card: #ffffff;
  --card-foreground: #171717;
  --popover: #ffffff;
  --popover-foreground: #171717;

  /* Neutral grey ramp (oklch, lightness only — pure achromatic) */
  --grey-50: oklch(0.985 0 0);
  --grey-100: oklch(0.97 0 0);
  --grey-200: oklch(0.922 0 0);
  --grey-300: oklch(0.862 0 0);
  --grey-400: oklch(0.708 0 0);
  --grey-500: oklch(0.556 0 0);
  --grey-600: oklch(0.486 0 0);
  --grey-700: oklch(0.371 0 0);
  --grey-800: oklch(0.269 0 0);
  --grey-900: oklch(0.205 0 0);
  --grey-950: oklch(0.145 0 0);

  /* ── shadcn semantic roles (effective winning values) ──────────────── */
  /* Primary is functional near-black — used for solid buttons, switches,
     checkboxes and emphasis. The lime accent lives in --brand-* below. */
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.486 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.985 0 0);
  --border: oklch(0.862 0 0);
  --input: oklch(0.862 0 0);
  --ring: oklch(0.8 0.1771 117.42); /* lime focus glow */

  /* ── Brand accent — "On Energy lime" ───────────────────────────────── */
  --brand-lime: #edff8e;          /* the signature pop */
  --brand-lime-hover: #c5d856;    /* pressed / hover deepen */
  --brand-navy: #101727;          /* deep ink, dark surfaces */

  /* Lime brand scale */
  --primary-50: oklch(0.996 0.013 115.71);
  --primary-100: oklch(0.992 0.026 113.75);
  --primary-200: oklch(0.983 0.06 114.52);
  --primary-300: oklch(0.976 0.085 115.68);
  --primary-400: oklch(0.968 0.116 116.16);
  --primary-500: oklch(0.963 0.139 116.51); /* ≈ #edff8e */
  --primary-600: oklch(0.946 0.205 118.7);
  --primary-700: oklch(0.896 0.214 120.58);
  --primary-800: oklch(0.656 0.156 120.3);
  --primary-900: oklch(0.413 0.098 119.64);
  --primary-950: oklch(0.265 0.062 119.1);

  /* Orange scale (secondary warm accent, energy / warning family) */
  --orange-50: oklch(0.98 0.03 86.36);
  --orange-100: oklch(0.95 0.06 86.36);
  --orange-200: oklch(0.91 0.1 86.36);
  --orange-300: oklch(0.86 0.14 86.36);
  --orange-400: oklch(0.81 0.17 86.36);
  --orange-500: oklch(0.75 0.19 50);
  --orange-600: oklch(0.69 0.2 50);
  --orange-700: oklch(0.62 0.18 50);
  --orange-800: oklch(0.55 0.15 50);
  --orange-900: oklch(0.48 0.12 50);
  --orange-950: oklch(0.41 0.1 50);

  /* ── Status / semantic (from badge + alert usage) ──────────────────── */
  --success: oklch(0.723 0.19 149.58);   /* green-500 */
  --success-foreground: oklch(0.393 0.095 152.54);
  --success-soft: oklch(0.962 0.044 156.74);
  --warning: oklch(0.769 0.188 70.08);   /* amber-500 */
  --warning-foreground: oklch(0.554 0.135 66.44);
  --warning-soft: oklch(0.973 0.071 103.19);
  --info: oklch(0.623 0.214 259.81);     /* blue-500 */
  --info-foreground: oklch(0.424 0.199 265.64);
  --info-soft: oklch(0.97 0.014 254.6);

  /* ── Chart palette ─────────────────────────────────────────────────── */
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);

  /* ── Domain: energy-system status (map + legend) ───────────────────── */
  /* SYSTEM_COLORS — the state of a heat/energy system on plans & maps. */
  --system-existing: #ff7200;  /* Bestand — orange */
  --system-new: #268241;       /* Neu — green */
  --system-district: #b63236;  /* Fernwärme / Netz — red */

  /* ── Domain: CO₂ cost & grid scenarios (index line charts) ─────────── */
  /* SCENARIO_COLORS — muted palette matching the feasibility-study PDF. */
  --scenario-conservative: #4e9d7c; /* Konservativ — muted green */
  --scenario-realistic: #5b7fb0;    /* Realistisch — muted blue */
  --scenario-progressive: #c56b67;  /* Progressiv — muted red */

  /* ── Sidebar surfaces ──────────────────────────────────────────────── */
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.862 0 0);
  --sidebar-ring: oklch(0.708 0 0);

  /* ── Semantic aliases (author against these) ───────────────────────── */
  --surface-page: var(--grey-100);      /* app canvas behind cards */
  --surface-card: var(--card);
  --surface-sunken: var(--grey-100);
  --text-body: var(--foreground);
  --text-muted: var(--muted-foreground);
  --text-on-dark: oklch(0.985 0 0);
  --hairline: var(--border);
  --focus-ring: var(--ring);
  --accent-highlight: var(--primary-50); /* faint lime wash — highlight cards */
}
