/* ================================================================== *
 *  TalentRally theme layer                                            *
 *                                                                     *
 *  Three looks, picked by <html data-tr-theme> (set by js/theme.js):  *
 *    light  default. The warm paper + ink + lime look of the landing. *
 *    dark   the same, inverted.                                       *
 *    old    the previous look. Nothing in this file or in             *
 *           theme.gen.css matches it, so `?theme=old` is an exact     *
 *           rollback.                                                 *
 *                                                                     *
 *  Tokens are declared on html[data-tr-theme=…] rather than :root on  *
 *  purpose: that out-ranks every page's own :root palette (tokens.css,*
 *  assessment.css, jobs.css) without touching those files.            *
 *  Hard-coded hexes in the older sheets are re-pointed at these       *
 *  tokens by theme.gen.css (generated: scripts/build_theme_css.py).   *
 *  Load this file and theme.gen.css LAST, after every other sheet.    *
 * ================================================================== */

@font-face{font-family:'Inter';font-style:normal;font-weight:300 800;font-display:swap;src:url(/static/fonts/inter-latin.woff2) format('woff2')}

html[data-tr-theme=light],
html[data-tr-theme=dark]{
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font: var(--font-sans);
  --radius-lg: 10px;
  --radius-xl: 16px;
  --lime: #d6f06a;
  --onlime: #14171f;
}

html[data-tr-theme=light]{
  color-scheme: light;
  --background: #f5f3ee;
  --foreground: #14171f;
  --fg-strong: #14171f;
  --text: #2e333d;
  --text-soft: #4b515d;
  --muted-foreground: #555a63;
  --muted: #5e636c;
  --surface: #efece5;
  --surface-2: #e9e5dc;
  --card: #ffffff;
  --border: #e3dfd5;
  --border-strong: #cfc9bc;
  --input: #d6d0c4;
  --ring: #14171f;

  --primary: #14171f;
  --primary-hover: #000000;
  --primary-foreground: #f5f3ee;
  --primary-soft: #f2f7dc;
  --primary-soft-2: #e5f1b3;
  --primary-line: #c9de6a;

  --accent: #2a52c0;
  --accent-soft: #e8eefc;

  --success: #146c44;
  --success-strong: #0f5a38;
  --success-soft: #e6f3ec;
  --success-line: #a9d8bf;
  --success-foreground: #ffffff;

  --warning: #855a0b;
  --warning-strong: #744e09;
  --warning-ink: #6b4808;
  --warning-soft: #f8efd9;
  --warning-line: #e6cf96;
  --warning-foreground: #ffffff;

  --destructive: #a8382f;
  --destructive-strong: #8f2e26;
  --destructive-soft: #f9e9e6;
  --destructive-line: #ecb9b2;
  --destructive-foreground: #ffffff;

  --sidebar: #ffffff;
  --sidebar-foreground: #4b515d;
  --sidebar-accent: #efece5;
  --sidebar-border: #e3dfd5;

  --shadow-sm: 0 1px 2px rgb(30 35 50 / .05);
  --shadow-md: 0 1px 2px rgb(30 35 50 / .04), 0 6px 16px rgb(30 35 50 / .06);
  --shadow-lg: 0 1px 2px rgb(30 35 50 / .05), 0 18px 40px -12px rgb(30 35 50 / .16);
}

html[data-tr-theme=dark]{
  color-scheme: dark;
  --background: #07090e;
  --foreground: #ece8df;
  --fg-strong: #f3efe6;
  --text: #d2cec5;
  --text-soft: #b3afa6;
  --muted-foreground: #9a9fa8;
  --muted: #898e97;
  --surface: #0c1018;
  --surface-2: #131a27;
  --card: #0e1421;
  --border: #1e2635;
  --border-strong: #2c3647;
  --input: #2c3647;
  --ring: #d6f06a;

  --primary: #ece8df;
  --primary-hover: #ffffff;
  --primary-foreground: #0b0d12;
  --primary-soft: rgba(214,240,106,.10);
  --primary-soft-2: rgba(214,240,106,.18);
  --primary-line: rgba(214,240,106,.42);

  --accent: #8fb4ff;
  --accent-soft: rgba(143,180,255,.12);

  --success: #74d3a4;
  --success-strong: #8fe0b8;
  --success-soft: rgba(116,211,164,.12);
  --success-line: rgba(116,211,164,.35);
  --success-foreground: #06110b;

  --warning: #efc36a;
  --warning-strong: #f3d08a;
  --warning-ink: #f3d08a;
  --warning-soft: rgba(239,195,106,.12);
  --warning-line: rgba(239,195,106,.35);
  --warning-foreground: #1a1205;

  --destructive: #ff8f80;
  --destructive-strong: #ffa699;
  --destructive-soft: rgba(255,143,128,.12);
  --destructive-line: rgba(255,143,128,.35);
  --destructive-foreground: #1a0705;

  --sidebar: #0e1421;
  --sidebar-foreground: #b3afa6;
  --sidebar-accent: #131a27;
  --sidebar-border: #1e2635;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-md: 0 1px 2px rgb(0 0 0 / .4), 0 6px 16px rgb(0 0 0 / .35);
  --shadow-lg: 0 1px 2px rgb(0 0 0 / .4), 0 18px 40px -12px rgb(0 0 0 / .6);
}

/* Legacy aliases that tokens.css (and the exam / jobs pages) hard-code. */
html[data-tr-theme=light],
html[data-tr-theme=dark]{
  --bg: var(--background);
  --bg-alt: var(--surface);
  --bg-section: var(--surface-2);
  --border-focus: var(--ring);
  --blue-200: var(--primary-line);
  --blue-500: var(--primary);
  --green-500: var(--success);
  --red-500: var(--destructive);
  --amber-500: var(--warning);
  /* assessment.css names */
  --ok: var(--success-strong);
  --ok-soft: var(--success-soft);
  --bad: var(--destructive-strong);
  --bad-soft: var(--destructive-soft);
  --warn: var(--warning-ink);
  --warn-soft: var(--warning-soft);
}

:where(html[data-tr-theme=light] body, html[data-tr-theme=dark] body){
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--text);
}
:where(html[data-tr-theme=light], html[data-tr-theme=dark]) :is(input, select, textarea, button){font-family: inherit}
/* Wordmark: shown instead of the text/icon brand in the new themes; ?theme=old keeps the old markup. */
.tr-wm{display:none}
:where(html[data-tr-theme=light], html[data-tr-theme=dark]) .tr-wm{display:block;height:40px;width:auto}
:where(html[data-tr-theme=light], html[data-tr-theme=dark]) .logo > :not(.tr-wm){display:none}
:where(html[data-tr-theme=light], html[data-tr-theme=dark]) .tr-wm-d{display:inline-block;height:30px;vertical-align:middle}
:where(html[data-tr-theme=light], html[data-tr-theme=dark]) header .brand{display:none}

/* Contrast fixes found by the audit (scripts in the 2026-10-24 session). */
:where(html[data-tr-theme=light], html[data-tr-theme=dark]) :is(.eval-table th .sort-arrow, th[data-sort] .sort-arrow){color:var(--muted)}
