/*
 * Design tokens of the company-activity product. Every colour, size and space used by signals.css and the
 * charts (signals.js reads the --c-* and text tokens) comes from here: swap the theme by replacing this file.
 *
 * Scope: `.jts` (the addon root and the shared app bar). Light by default; dark follows the system unless the
 * toggle forces a theme (`data-jt-theme="light" | "dark"` on the `.jobtrends` root, set by the core jobtrends.js).
 * Contrast (WCAG): body text >= 7:1 on page and card, secondary text >= 4.5:1; checked by a script (see
 * docs/signals/pages.md). The up/down pair passes the dataviz palette validator (CVD-safe) in both modes.
 */
@font-face { font-family: "JTS Instrument Sans"; src: url("fonts/InstrumentSans-Variable.1a10a9b26020.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }

/* tokens:light */
.jts {
  color-scheme: light;
  /* surfaces */
  --page: #f7f8fa;
  --card: #ffffff;
  --raised: #f2f4f7;
  --line: #d3d9e1;
  --line-soft: #e9ecf0;
  --shadow: none;
  --shadow-pop: 0 12px 32px rgba(11, 22, 38, .18);
  /* text */
  --text: #0b1626;
  --text-2: #2e3b4e;
  --text-3: #4f5d70;
  /* app bar */
  --bar: #0b1626;
  --bar-text: #f3f6fa;
  --bar-text-2: #b9c4d2;
  --bar-hover: #1c2b40;
  /* interaction */
  /* chrome is monochrome (ink on near-white); colour is kept for data. The one accent is the data blue,
     used for the primary action and the focus ring. */
  --accent: #0b1626;
  --accent-text: #0b1626;
  --accent-soft: #e9edf2;
  --on-accent: #ffffff;
  --focus: #1d5bd8;
  --primary: #1d5bd8;
  --on-primary: #ffffff;
  --zebra: #fafbfc;
  --row-hover: #f0f4fb;
  /* semantic: up / buying / expanding vs down / selling / contracting; neutral for context */
  --up: #1d5bd8;
  --up-text: #1a4fbd;
  --up-soft: #e3ecfc;
  --on-up: #ffffff;
  --down: #c2410c;
  --down-text: #a8380b;
  --down-soft: #fbe9e1;
  --neutral: #8592a3;
  --neutral-soft: #c8d0db;
  --grid: #e6eaf0;
  /* chart tokens read by signals.js */
  --c-accent: #1d5bd8;
  --c-neg: #c2410c;
  --c-neutral: #8592a3;
  --c-soft: #c8d0db;
  --c-ink: #0b1626;
  --c-ink-2: #2e3b4e;
  --c-ink-3: #4f5d70;
  --c-grid: #e6eaf0;
  --c-surface: #ffffff;
  /* heat-map ramp (one hue, light to dark) */
  --heat-1: #dbe6fb;
  --heat-2: #b4cbf5;
  --heat-3: #7ea6ec;
  --heat-4: #3369d4;
  --heat-5: #1d5bd8;
  --heat-ink-light: #0b1626;
  --heat-ink-dark: #ffffff;
  /* type */
  --font: "JTS Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-body: 15px;
  --fs-lg: 17px;
  --fs-xl: 21px;
  --fs-2xl: 26px;
  --fs-kpi: 34px;
  --lh: 1.45;
  /* space and shape */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --radius: 10px;
  --radius-sm: 6px;
  --max: 1400px;
  --bar-h: 56px;
  --filter-h: 52px;
}

/* tokens:dark */
@media (prefers-color-scheme: dark) {
  .jobtrends:not([data-jt-theme="light"]) .jts,
  .jobtrends.jts:not([data-jt-theme="light"]) {
    color-scheme: dark;
    --page: #0e131a; --card: #151b23; --raised: #1c232d; --line: #333f4e; --line-soft: #232c38;
    --shadow: none; --shadow-pop: 0 14px 36px rgba(0, 0, 0, .55);
    --text: #f2f5f9; --text-2: #cdd6e1; --text-3: #a7b3c2;
    --bar: #070c12; --bar-text: #f2f5f9; --bar-text-2: #a9b6c6; --bar-hover: #172334;
    --accent: #f2f5f9; --accent-text: #f2f5f9; --accent-soft: #252e3a; --on-accent: #0e131a; --focus: #8db2f6;
    --primary: #5a8ff0; --on-primary: #06101f; --zebra: #171e27; --row-hover: #1d2736;
    --up: #5a8ff0; --up-text: #8db2f6; --up-soft: #17284a; --on-up: #06101f;
    --down: #d66e2c; --down-text: #f0a06e; --down-soft: #3a2010;
    --neutral: #7b8899; --neutral-soft: #3b4859; --grid: #223042;
    --c-accent: #5a8ff0; --c-neg: #d66e2c; --c-neutral: #7b8899; --c-soft: #3b4859; --c-ink: #f2f5f9;
    --c-ink-2: #cdd6e1; --c-ink-3: #a7b3c2; --c-grid: #223042; --c-surface: #151b23;
    --heat-1: #1a2a46; --heat-2: #213d6d; --heat-3: #2c5aa5; --heat-4: #4479d8; --heat-5: #6b9cf3;
    --heat-ink-light: #f2f5f9; --heat-ink-dark: #06101f;
  }
}
.jobtrends[data-jt-theme="dark"] .jts,
.jobtrends.jts[data-jt-theme="dark"],
[data-jts-dark] {
  color-scheme: dark;
  --page: #0e131a; --card: #151b23; --raised: #1c232d; --line: #333f4e; --line-soft: #232c38;
  --shadow: none; --shadow-pop: 0 14px 36px rgba(0, 0, 0, .55);
  --text: #f2f5f9; --text-2: #cdd6e1; --text-3: #a7b3c2;
  --bar: #070c12; --bar-text: #f2f5f9; --bar-text-2: #a9b6c6; --bar-hover: #172334;
  --accent: #f2f5f9; --accent-text: #f2f5f9; --accent-soft: #252e3a; --on-accent: #0e131a; --focus: #8db2f6;
    --primary: #5a8ff0; --on-primary: #06101f; --zebra: #171e27; --row-hover: #1d2736;
  --up: #5a8ff0; --up-text: #8db2f6; --up-soft: #17284a; --on-up: #06101f;
  --down: #d66e2c; --down-text: #f0a06e; --down-soft: #3a2010;
  --neutral: #7b8899; --neutral-soft: #3b4859; --grid: #223042;
  --c-accent: #5a8ff0; --c-neg: #d66e2c; --c-neutral: #7b8899; --c-soft: #3b4859; --c-ink: #f2f5f9;
  --c-ink-2: #cdd6e1; --c-ink-3: #a7b3c2; --c-grid: #223042; --c-surface: #151b23;
  --heat-1: #1a2a46; --heat-2: #213d6d; --heat-3: #2c5aa5; --heat-4: #4479d8; --heat-5: #6b9cf3;
  --heat-ink-light: #f2f5f9; --heat-ink-dark: #06101f;
}

/* The job-postings portal (core templates) inside the demo's shared base template: same colours and type.
   The core design system exposes its tokens for re-tokening (src/jobtrends/static/jobtrends/jobtrends.css). */
body.jts-host { background: #f7f8fa; }
.jts-host .jobtrends:not(.jts) {
  --jt-font: "JTS Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --jt-bg: #eef1f5; --jt-layer: #ffffff; --jt-layer-head: #f6f8fb; --jt-layer-hover: #f6f8fb; --jt-field: #ffffff;
  --jt-text: #0b1626; --jt-text-2: #2e3b4e; --jt-text-3: #4f5d70; --jt-border: #e2e7ee; --jt-border-strong: #c9d1dc;
  --jt-accent: #0e7c86; --jt-accent-hover: #0a6670; --jt-on-accent: #ffffff; --jt-focus: #0e7c86;
  --jt-up: #1d5bd8; --jt-down: #c2410c; --jt-grid: #e6eaf0; --jt-cat-1: #1d5bd8; --jt-neutral: #4f5d70;
}
@media (prefers-color-scheme: dark) {
  body.jts-host { background: #0c131c; }
  .jts-host .jobtrends:not(.jts):not([data-jt-theme="light"]) {
    --jt-bg: #0c131c; --jt-layer: #151e29; --jt-layer-head: #1b2633; --jt-layer-hover: #1b2633; --jt-field: #151e29;
    --jt-text: #f2f5f9; --jt-text-2: #cdd6e1; --jt-text-3: #a7b3c2; --jt-border: #243243; --jt-border-strong: #34465a;
    --jt-accent: #5fd3db; --jt-accent-hover: #3cc6cf; --jt-on-accent: #06181a; --jt-focus: #5fd3db;
    --jt-up: #5a8ff0; --jt-down: #d66e2c; --jt-grid: #223042; --jt-cat-1: #5a8ff0; --jt-neutral: #a7b3c2;
  }
}
.jts-host .jobtrends:not(.jts)[data-jt-theme="dark"] {
  --jt-bg: #0c131c; --jt-layer: #151e29; --jt-layer-head: #1b2633; --jt-layer-hover: #1b2633; --jt-field: #151e29;
  --jt-text: #f2f5f9; --jt-text-2: #cdd6e1; --jt-text-3: #a7b3c2; --jt-border: #243243; --jt-border-strong: #34465a;
  --jt-accent: #5fd3db; --jt-accent-hover: #3cc6cf; --jt-on-accent: #06181a; --jt-focus: #5fd3db;
  --jt-up: #5a8ff0; --jt-down: #d66e2c; --jt-grid: #223042; --jt-cat-1: #5a8ff0; --jt-neutral: #a7b3c2;
}
/* the page behind the roots follows a theme forced by the Dark switch (prefs.js stamps <html>) */
html[data-jt-theme="dark"] body.jts-host { background: #0c131c; }
html[data-jt-theme="light"] body.jts-host { background: #f7f8fa; }

/* Compact mode (the "Compact" switch in the user menu; the core prefs.js sets data-jt-density="compact" on
   <html> and on every .jobtrends root before the first paint). The same scale, one step down: type, space,
   radius, the bar. signals.css tightens the blocks whose sizes are not tokens (cards, table rows, controls). */
html[data-jt-density="compact"] .jts {
  --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-body: 13.5px; --fs-lg: 15px; --fs-xl: 18px; --fs-2xl: 21px;
  --fs-kpi: 26px; --lh: 1.36;
  --s1: 3px; --s2: 6px; --s3: 8px; --s4: 12px; --s5: 16px; --s6: 22px; --s7: 32px;
  --radius: 7px; --radius-sm: 5px; --bar-h: 46px; --filter-h: 44px;
}
