/* Cleveland Kitchen ops design tokens: the one source for every ops screen (docs/adr/0001-shared-design-tokens.md).
   Linked by the portal and the Efficiency pages, synced into ops_scorecards/web, written into the report by
   build_report.py. Change values here only. Chart series colours live in ck-colors.js. */
:root {
  color-scheme: light;
  /* surfaces */
  --ck-page: #f3f6f3;
  --ck-surface: #ffffff;
  --ck-surface-2: #f6f9f7;      /* table headers, quiet panels */
  --ck-raised: #eef3ee;         /* hover, segmented control track */
  --ck-line: #d7e2dc;           /* hairlines, card borders */
  --ck-line-2: #b9cbc0;         /* control borders, axis lines */
  --ck-head: #e4ebe7;           /* table header band */
  --ck-field: #eef3ee;          /* filled form field */
  /* text: all at least 4.5:1 on --ck-surface */
  --ck-ink: #213b38;
  --ck-ink-2: #4f615a;
  --ck-ink-3: #5f716a;
  --ck-ink-disabled: #8a9a94;   /* disabled labels and axis ticks only, never body text */
  /* brand */
  --ck-brand: #14312c;          /* logo green: primary button, strong ink */
  --ck-on-brand: #ffffff;
  --ck-accent: #30b4e7;         /* logo blue: where-you-are marks only (tab underline, selected segment) */
  --ck-accent-bg: #e6f6fd;      /* selected row */
  --ck-link: #0877a3;           /* accent as text */
  --ck-focus: #0877a3;
  /* status */
  --ck-good: #1f7a45;
  --ck-good-bg: #e7f4ec;
  --ck-bad: #b3412f;
  --ck-bad-bg: #fbeae6;
  --ck-warn: #7a5200;
  --ck-warn-bg: #fdf3dc;
  --ck-warn-line: #ecd9b5;
  /* charts (axes and grid; series colours come from ck-colors.js) */
  --ck-chart-axis: #8fa39a;
  --ck-chart-grid: #e6eee9;
  --ck-chart-label: #3b4a46;
  --ck-chart-select: rgba(48, 180, 231, 0.12);
  /* type */
  --ck-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ck-mono: "IBM Plex Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --ck-text-11: 11px;           /* captions, tags; the smallest size */
  --ck-text-12: 12px;           /* labels, hints */
  --ck-text-13: 13px;           /* tables, controls */
  --ck-text-14: 14px;           /* body */
  --ck-text-16: 16px;           /* card titles */
  --ck-text-20: 20px;           /* section titles */
  --ck-text-24: 24px;           /* page titles */
  --ck-text-32: 32px;           /* key figures */
  --ck-weight: 400;
  --ck-weight-strong: 500;
  --ck-weight-total: 600;       /* total rows only */
  --ck-leading: 1.45;
  /* spacing: 4px grid */
  --ck-space-1: 4px;
  --ck-space-2: 8px;
  --ck-space-3: 12px;
  --ck-space-4: 16px;
  --ck-space-5: 20px;
  --ck-space-6: 24px;
  --ck-space-8: 32px;
  --ck-space-10: 40px;
  --ck-space-12: 48px;
  /* radius */
  --ck-radius-control: 4px;
  --ck-radius-card: 4px;
  --ck-radius-panel: 4px;
  --ck-radius-pill: 4px;        /* toggle chips: same 4px corner as everything else */
  /* motion */
  --ck-ease: cubic-bezier(0.2, 0, 0, 1);
  --ck-fast: 120ms;
}

/* Logo: each page puts both <img class="ck-logo-light"> and <img class="ck-logo-dark">; the theme picks one.
   (A url() inside a custom property resolves against the page that uses it, so the logo cannot be a token.) */
.ck-logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ck-logo-light { display: none; } :root:not([data-theme="light"]) .ck-logo-dark { display: inline-block; } }
:root[data-theme="dark"] .ck-logo-light { display: none; }
:root[data-theme="dark"] .ck-logo-dark { display: inline-block; }
@media print { .ck-logo-light { display: inline-block !important; } .ck-logo-dark { display: none !important; } }

/* Dark: the OS setting unless the page says data-theme="light", or forced with data-theme="dark". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ck-page: #111715; --ck-surface: #18201e; --ck-surface-2: #1c2523; --ck-raised: #1f2927;
    --ck-line: #2c3835; --ck-line-2: #3d4b47;
    --ck-ink: #eef3f0; --ck-ink-2: #b9c6c0; --ck-ink-3: #93a39c; --ck-ink-disabled: #6b7a74;
    --ck-brand: #eef3f0; --ck-on-brand: #14312c;
    --ck-accent: #30b4e7; --ck-accent-bg: #123446; --ck-link: #5cc8f0; --ck-focus: #5cc8f0;
    --ck-good: #4cc27b; --ck-good-bg: #15301f; --ck-bad: #ef7a6b; --ck-bad-bg: #3a1a15;
    --ck-warn: #f3cd7a; --ck-warn-bg: #3a2e12; --ck-warn-line: #5a4720;
    --ck-chart-axis: #3d4b47; --ck-chart-grid: #26312e; --ck-chart-label: #93a39c; --ck-chart-select: rgba(48, 180, 231, 0.16); --ck-head: #25322f; --ck-field: #1f2927;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ck-page: #111715; --ck-surface: #18201e; --ck-surface-2: #1c2523; --ck-raised: #1f2927;
  --ck-line: #2c3835; --ck-line-2: #3d4b47;
  --ck-ink: #eef3f0; --ck-ink-2: #b9c6c0; --ck-ink-3: #93a39c; --ck-ink-disabled: #6b7a74;
  --ck-brand: #eef3f0; --ck-on-brand: #14312c;
  --ck-accent: #30b4e7; --ck-accent-bg: #123446; --ck-link: #5cc8f0; --ck-focus: #5cc8f0;
  --ck-good: #4cc27b; --ck-good-bg: #15301f; --ck-bad: #ef7a6b; --ck-bad-bg: #3a1a15;
  --ck-warn: #f3cd7a; --ck-warn-bg: #3a2e12; --ck-warn-line: #5a4720;
  --ck-chart-axis: #3d4b47; --ck-chart-grid: #26312e; --ck-chart-label: #93a39c; --ck-chart-select: rgba(48, 180, 231, 0.16); --ck-head: #25322f; --ck-field: #1f2927;
}

/* Printing is always light. */
@media print {
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --ck-page: #ffffff; --ck-surface: #ffffff; --ck-surface-2: #f6f9f7; --ck-raised: #eef3ee;
    --ck-line: #d7e2dc; --ck-line-2: #b9cbc0;
    --ck-ink: #213b38; --ck-ink-2: #4f615a; --ck-ink-3: #5f716a;
    --ck-brand: #14312c; --ck-on-brand: #ffffff; --ck-accent-bg: #e6f6fd; --ck-link: #0877a3;
    --ck-good: #1f7a45; --ck-good-bg: #e7f4ec; --ck-bad: #b3412f; --ck-bad-bg: #fbeae6;
    --ck-warn: #7a5200; --ck-warn-bg: #fdf3dc;
  }
}
