/*
 * 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; }
@font-face { font-family: "JTS Source Serif"; src: url("fonts/SourceSerif4-Variable.0bd24190790a.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

/* tokens:light */
.jts {
  color-scheme: light;
  /* surfaces: cool paper page, white sheets, hairline rules (structure comes from rules, not boxes) */
  --page: #f4f5f7;
  --card: #ffffff;
  --raised: #eef0f3;
  --line: #d4d9e0;
  --line-soft: #e6e9ee;
  --rule: #18202b; /* the strong rule under table headers and section titles */
  --shadow: none;
  --shadow-pop: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 28px rgba(16, 24, 40, .14);
  /* text */
  --text: #111821;
  --text-2: #364151;
  --text-3: #586373;
  --text-4: #9aa3af; /* blanks only: a cell with no value */
  /* app bar: a white sheet with a hairline, like the page */
  --bar: #ffffff;
  --bar-text: #111821;
  --bar-text-2: #364151;
  --bar-hover: #eef0f3;
  --bar-line: #d4d9e0;
  /* interaction: one accent (deep teal) for the primary action, the current place and the focus ring;
     blue and orange are kept for data (up / down) */
  --accent: #0d6e6e;
  --accent-text: #0b5e5e;
  --accent-soft: #e3f1f0;
  --on-accent: #ffffff;
  --focus: #0d6e6e;
  --primary: #0d6e6e;
  --on-primary: #ffffff;
  --link: #111821;
  --zebra: #ffffff;
  --row-hover: #f3f7f7;
  /* 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: #111821;
  --c-ink-2: #364151;
  --c-ink-3: #586373;
  --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: #111821;
  --heat-ink-dark: #ffffff;
  /* type: Instrument Sans for interface and figures (tabular), Source Serif 4 for titles */
  --font: "JTS Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "JTS Source Serif", "Source Serif 4", Charter, Georgia, serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-body: 15px;
  --fs-lg: 17px;
  --fs-xl: 21px;
  --fs-2xl: 30px;
  --fs-kpi: 27px;
  --lh: 1.45;
  /* space and shape */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --radius: 8px;
  --radius-sm: 5px;
  --max: 1400px;
  --bar-h: 60px;
  --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: #0f1318; --card: #161b22; --raised: #1d232c; --line: #323b47; --line-soft: #242b35; --rule: #c9d1db;
    --shadow: none; --shadow-pop: 0 14px 36px rgba(0, 0, 0, .55);
    --text: #eef1f5; --text-2: #c8d0da; --text-3: #a1acba; --text-4: #5d6875;
    --bar: #161b22; --bar-text: #eef1f5; --bar-text-2: #c8d0da; --bar-hover: #222a34; --bar-line: #2a323d;
    --accent: #4fc1bd; --accent-text: #6fd0cc; --accent-soft: #15302f; --on-accent: #071615; --focus: #6fd0cc;
    --primary: #4fc1bd; --on-primary: #071615; --link: #eef1f5; --zebra: #161b22; --row-hover: #1b2a2b;
    --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: #eef1f5;
    --c-ink-2: #c8d0da; --c-ink-3: #a1acba; --c-grid: #223042; --c-surface: #161b22;
    --heat-1: #1a2a46; --heat-2: #213d6d; --heat-3: #2c5aa5; --heat-4: #4479d8; --heat-5: #6b9cf3;
    --heat-ink-light: #eef1f5; --heat-ink-dark: #06101f;
  }
}
.jobtrends[data-jt-theme="dark"] .jts,
.jobtrends.jts[data-jt-theme="dark"],
[data-jts-dark] {
  color-scheme: dark;
  --page: #0f1318; --card: #161b22; --raised: #1d232c; --line: #323b47; --line-soft: #242b35; --rule: #c9d1db;
  --shadow: none; --shadow-pop: 0 14px 36px rgba(0, 0, 0, .55);
  --text: #eef1f5; --text-2: #c8d0da; --text-3: #a1acba; --text-4: #5d6875;
  --bar: #161b22; --bar-text: #eef1f5; --bar-text-2: #c8d0da; --bar-hover: #222a34; --bar-line: #2a323d;
  --accent: #4fc1bd; --accent-text: #6fd0cc; --accent-soft: #15302f; --on-accent: #071615; --focus: #6fd0cc;
  --primary: #4fc1bd; --on-primary: #071615; --link: #eef1f5; --zebra: #161b22; --row-hover: #1b2a2b;
  --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: #eef1f5;
  --c-ink-2: #c8d0da; --c-ink-3: #a1acba; --c-grid: #223042; --c-surface: #161b22;
  --heat-1: #1a2a46; --heat-2: #213d6d; --heat-3: #2c5aa5; --heat-4: #4479d8; --heat-5: #6b9cf3;
  --heat-ink-light: #eef1f5; --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: #f4f5f7; }
.jts-host .jobtrends:not(.jts) {
  --jt-font: "JTS Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --jt-bg: #f4f5f7; --jt-layer: #ffffff; --jt-layer-head: #f6f8fb; --jt-layer-hover: #f6f8fb; --jt-field: #ffffff;
  --jt-text: #111821; --jt-text-2: #2e3b4e; --jt-text-3: #4f5d70; --jt-border: #e2e7ee; --jt-border-strong: #c9d1dc;
  --jt-accent: #0d6e6e; --jt-accent-hover: #0a5a5a; --jt-on-accent: #ffffff; --jt-focus: #0d6e6e;
  --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: #0f1318; }
  .jts-host .jobtrends:not(.jts):not([data-jt-theme="light"]) {
    --jt-bg: #0f1318; --jt-layer: #161b22; --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: #4fc1bd; --jt-accent-hover: #6fd0cc; --jt-on-accent: #071615; --jt-focus: #6fd0cc;
    --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: #0f1318; --jt-layer: #161b22; --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: #4fc1bd; --jt-accent-hover: #6fd0cc; --jt-on-accent: #071615; --jt-focus: #6fd0cc;
  --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: #0f1318; }
html[data-jt-theme="light"] body.jts-host { background: #f4f5f7; }

/* 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: 23px; --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;
}
