/*
 * PARDORI internal instance themes (model v2 plan DD18, DD20; vault pardori/firma/pardori-identita.md):
 * token values only, served by the api at /theme.css. Two selector shapes and nothing else:
 *   html:root                 the default theme (the first entry of `themes` in config.ts)
 *   html[data-theme="<key>"]  every other configured theme, after the default block
 * Both are one element more specific than the app's :root / .dark, so they win whatever the load
 * order. Every block restates every colour token of apps/web/src/styles/theme.css :root (no
 * neutral leak); only the default block may set fonts or the radius (no relayout on a switch).
 * Rule 21 of the identity: dark ink for text, teal only as an accent; rule 23: one primary colour
 * per theme, every element (logo waves and trail, focus, links, drop line) follows it.
 */

/* 1 Smrek: warm paper, spruce teal, ink buttons with a teal hover (Q9 A) */
html:root {
  --background: #f3f0e8; /* paper */
  --foreground: #0f2e31; /* ink */
  --card: #faf8f2;
  --card-foreground: #0f2e31;
  --popover: #faf8f2;
  --popover-foreground: #0f2e31;

  --primary: #1f7f83; /* teal: focus, links, drop line, logo waves */
  --primary-foreground: #ffffff;
  --primary-text: #176b6f; /* the teal for small text: 5.47:1 on paper (#1f7f83 is 4.17) */
  --button: #0f2e31;
  --button-foreground: #f3f0e8;
  --button-hover: #1f7f83;
  --button-hover-foreground: #ffffff;
  --secondary: #e9e4d8; /* band */
  --secondary-foreground: #0f2e31;
  --muted: #e9e4d8;
  --muted-foreground: #4a5f61; /* soft */
  --accent: #e9e4d8;
  --accent-foreground: #0f2e31;
  --destructive: #b91c1c;
  --destructive-foreground: #ffffff;

  --border: #d8d2c3; /* rule, decorative */
  --input: #8a8170; /* form control borders, 3.6:1 on card */
  --ring: #1f7f83;

  --accent-brand: #d9962f; /* amber: logo and later use only (Q8 A) */
  --accent-brand-text: #8f5c0e;

  /* logo.svg (brand/build-logo.mjs): ink letters, waves and trail in the primary (rule 23) */
  --logo-ink: var(--foreground);
  --logo-accent: var(--primary);
  --logo-bg: var(--background);
  /* the viewBox width / height of the symbols #logo and #logo-small in logo.svg */
  --logo-ratio: 596 / 194;
  --logo-small-ratio: 574 / 80;

  /* labels are neutral pills since DD20; the tokens stay for LabelDef.color compatibility */
  --label-1: #2563eb;
  --label-2: #7c3aed;
  --label-3: #0891b2;
  --label-4: #d97706;
  --label-5: #64748b;
  --label-6: #db2777;
  --label-7: #16a34a;

  /* state ramp: grey through teal-grey to ink-green, darker with each step (DD20) */
  --state-1: #868c8c;
  --state-2: #6b8584;
  --state-3: #4d7977;
  --state-4: #336b66;
  --state-5: #1d5249;
  --state-muted: #8f8f88;

  /* priority icons (2026-11-27): urgent red, high orange, normal yellow, low green */
  --priority-low: #15803d;
  --priority-normal: #a16207;
  --priority-high: #a33a0b; /* 4.9:1 on its own 15 % tint */
  --priority-urgent: #b91c1c;

  /* card types: icon and strip only, each at least 3:1 on paper and card and 20 degrees of hue
     away from teal and amber (DD20, swatch approved by Filip 2026-10-26) */
  --type-epic: #6d4bc4;
  --type-idea: #78771a;
  --type-task: #2f62c9;
  --type-request: #963fa6;
  --type-question: #b8467e;
  --type-finding: #3f8a3a;
  --type-decision: #5b6670;
  color-scheme: light;
}

/* 2 Hlbina: the whole board dark in the blue of the blog, accent-filled buttons (as on the web) */
html[data-theme='hlbina'] {
  --background: #1f2a36; /* paper */
  --foreground: #e6edf2; /* ink */
  --card: #283544;
  --card-foreground: #e6edf2;
  --popover: #283544;
  --popover-foreground: #e6edf2;

  --primary: #4fb3c4;
  --primary-foreground: #0a0f14;
  --primary-text: #4fb3c4; /* 5.95:1 on paper, no darker shade needed */
  --button: #4fb3c4;
  --button-foreground: #0a0f14;
  --button-hover: #ffffff;
  --button-hover-foreground: #0a0f14;
  --secondary: #1a232d; /* band */
  --secondary-foreground: #e6edf2;
  --muted: #1a232d;
  --muted-foreground: #9fb0bd; /* soft */
  --accent: #1a232d;
  --accent-foreground: #e6edf2;
  --destructive: #ff9b9b;
  --destructive-foreground: #0a0f14;

  --border: #ffffff1a; /* rule, decorative */
  --input: #7f8f9c; /* form control borders, 3.75:1 on card */
  --ring: #4fb3c4;

  --accent-brand: #e6a06a;
  --accent-brand-text: #e6a06a;

  --logo-ink: var(--foreground);
  --logo-accent: var(--primary);
  --logo-bg: var(--background);

  --label-1: #7ea6ef;
  --label-2: #a48ce8;
  --label-3: #4fb3c4;
  --label-4: #e6a06a;
  --label-5: #9aa6b1;
  --label-6: #e58bb6;
  --label-7: #7cc275;

  /* state ramp: grey through teal-grey to pale green, lighter with each step (DD20) */
  --state-1: #7d8a95;
  --state-2: #7b9c9e;
  --state-3: #7fb3b0;
  --state-4: #82c7bf;
  --state-5: #a3dcc9;
  --state-muted: #6f7a84;

  --priority-low: #4ade80;
  --priority-normal: #facc15;
  --priority-high: #f8ab6b; /* 4.9:1 on its own 15 % tint over the card */
  --priority-urgent: #ff9b9b;

  --type-epic: #a48ce8;
  --type-idea: #c9bb4f;
  --type-task: #7ea6ef;
  --type-request: #cf8bdc;
  --type-question: #e58bb6;
  --type-finding: #7cc275;
  --type-decision: #9ea7b8;
  color-scheme: dark;
}
