:root {
  color-scheme: light;
  --jc-ink: #1d2725;
  --jc-graphite: #26312f;
  --jc-graphite-deep: #151c1a;
  --jc-mineral: #f2efe8;
  --jc-mineral-raised: #fffdf8;
  --jc-mineral-subtle: #f7f3eb;
  --jc-steel-50: #f4f5f3;
  --jc-steel-100: #e8e9e5;
  --jc-steel-200: #d3d5d0;
  --jc-steel-400: #8c9590;
  --jc-steel-600: #5d6864;
  --jc-signal: #d77b24;
  --jc-signal-strong: #a95312;
  --jc-signal-soft: #f5dfc8;
  --jc-success: #347255;
  --jc-success-soft: #dceadf;
  --jc-critical: #aa4038;
  --jc-critical-soft: #f4deda;
  --jc-info: #376888;
  --jc-info-soft: #dce8ee;
  --jc-shadow-1: 0 1px 2px rgba(21, 28, 26, 0.08);
  --jc-shadow-2: 0 12px 32px rgba(21, 28, 26, 0.13);
  --jc-radius-sm: 3px;
  --jc-radius-md: 6px;
  --jc-radius-lg: 10px;
  --jc-focus: 0 0 0 3px rgba(215, 123, 36, 0.34);
  --jc-font: Inter, Aptos, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Workspace theme contract. Semantic success/warning/error colors stay separate. */
  --theme-accent: var(--jc-signal);
  --theme-accent-strong: #dc8d42;
  --theme-accent-soft: var(--jc-signal-soft);
  --theme-accent-ink: var(--jc-ink);
  --theme-focus-color: var(--jc-signal-strong);
  --theme-focus: var(--jc-focus);
  --theme-sidebar-bg: var(--jc-graphite-deep);
  --theme-sidebar-ink: #f8f4eb;
  --theme-sidebar-muted: rgba(248, 244, 235, 0.68);
  --theme-sidebar-subtle: rgba(255, 255, 255, 0.1);
  --theme-sidebar-marker: var(--jc-signal);
  --theme-canvas: var(--jc-mineral);
  --theme-canvas-ink: var(--jc-ink);
  --theme-canvas-muted: var(--jc-steel-600);

  /* Map the existing application contract onto the canonical JobChief tokens. */
  --bg: var(--theme-canvas);
  --panel: var(--jc-mineral-raised);
  --panel-2: var(--jc-mineral-subtle);
  --ink: var(--jc-ink);
  --muted: var(--jc-steel-600);
  --line: #d6d1c7;
  --green: var(--jc-success);
  --green-strong: #285d45;
  --blue: var(--jc-info);
  --brand-accent: var(--theme-accent);
  --brand-accent-strong: var(--theme-accent-strong);
  --sidebar-bg: var(--theme-sidebar-bg);
  --sidebar-ink: var(--theme-sidebar-ink);
  --sidebar-muted: var(--theme-sidebar-muted);
  --sidebar-subtle: var(--theme-sidebar-subtle);
  --sidebar-marker: var(--theme-sidebar-marker);
  --teal: #2c746d;
  --amber: var(--jc-signal-strong);
  --red: var(--jc-critical);
  --shadow: var(--jc-shadow-2);
  --radius: var(--jc-radius-md);
  font-family: var(--jc-font);
}

::selection {
  color: var(--jc-ink);
  background: var(--theme-accent-soft);
}

:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--theme-focus-color) !important;
  outline-offset: 3px !important;
  box-shadow: var(--theme-focus);
}

:where(.stat-value, .money-pill, .amount, [data-money], td, input[type="number"]) {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-2: #ffffff;
    --ink: #111111;
    --muted: #454545;
    --line: #a8a8a8;
    --brand-accent: #7b4315;
    --shadow: none;
  }
}
