/* NaijaMix theme: the single source for the pilot's palette and type.
 *
 * Loaded by every server-rendered shell (base.html, simple.html, the sign-in pages and the
 * manager pages), so the React app, the labelling editor and the Django templates all read
 * the same values. Label Studio's own token files are generated and left untouched; the
 * overrides below sit on top of them for the light theme only.
 *
 * Fonts are self-hosted because the CSP only allows 'self' for styles and fonts.
 * IBM Plex and Source Serif 4 are under the SIL Open Font License (see fonts/naijamix/OFL.txt).
 */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/naijamix/plex-sans-latin-ext.d313794bd9fd.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/naijamix/plex-sans-latin.d28498895ed7.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/naijamix/source-serif-4-latin-ext.8c3174bab6d6.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/naijamix/source-serif-4-latin.6a682eb0234e.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/naijamix/plex-mono-400-latin-ext.17a5b2a15bf5.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/naijamix/plex-mono-400-latin.814fe1615d4d.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/naijamix/plex-mono-500-latin-ext.216ee1a35b06.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/naijamix/plex-mono-500-latin.6708425c446b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/naijamix/plex-mono-600-latin-ext.6041b3192dc3.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/naijamix/plex-mono-600-latin.e71a597e376e.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --nm-font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --nm-font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --nm-font-serif: "Source Serif 4", Georgia, serif;

  --nm-ink: #16181c;
  --nm-body: #24272c;
  --nm-muted: #616770;
  --nm-green: #0b5d4e;
  --nm-green-hover: #083f35;
  --nm-green-soft: #3e7f72;
  --nm-green-tint: #eaf2ef;
  --nm-green-tint-2: #e4f0ec;
  --nm-green-pale: #cfe3dc;
  --nm-green-mist: #d6ebdd;
  --nm-green-deep: #12332c;
  --nm-green-text: #3f5a52;
  --nm-yellow: #f7c948;
  --nm-yellow-soft: #f7de8e;
  --nm-page: #faf8f4;
  --nm-panel: #f3f1ec;
  --nm-canvas: #efece6;
  --nm-surface: #ffffff;
  --nm-border: #dfdbd4;
  --nm-hairline: #edeae4;
  --nm-radio: #c9c4bb;
  --nm-neutral-badge: #eeedea;
  --nm-neutral-badge-text: #5a6068;
  --nm-evidence: #fbeae7;
  --nm-evidence-line: #a8382b;
  --nm-avatar: #f1e9f3;
  --nm-avatar-text: #77468a;

  --nm-lid-pidgin: #0b5d4e;
  --nm-lid-pidgin-bg: #e4f0ec;
  --nm-lid-english: #1b4e8a;
  --nm-lid-english-bg: #e6edf7;
  --nm-lid-other: #6b5b45;
  --nm-lid-ambiguous: #77468a;
  --nm-lid-ambiguous-bg: #f1e9f3;

  --nm-radius: 6px;
  --nm-hero-gradient: linear-gradient(100deg, #e8f5ee 0%, #f3f6e6 55%, #fbe7a6 100%);
  --nm-login-gradient: linear-gradient(165deg, #e5f3eb 0%, #f2f6e6 50%, #fbefc6 100%);

  --font-family-base: "IBM Plex Sans";
  --font-family-mono: "IBM Plex Mono", monospace;
}

/* Label Studio pins its body fonts (`--font-family` in the UI library, `--font-sans` in the
   app theme) to Figtree with !important, so the override needs both !important and a more
   specific selector. The labelling view applies `--font-sans` to every element. */
html body {
  --font-family: var(--nm-font-sans) !important;
  --font-sans: var(--nm-font-sans) !important;
}

/* Label Studio token overrides. The doubled selector outranks the generated `:root` rules
   whatever order the stylesheets load in, and stepping aside for dark mode leaves the
   upstream dark palette intact. */
:root:not([data-color-scheme="dark"]) {
  /* White app chrome (header, side panels) in the light theme only. */
  --nm-chrome: #ffffff;

  --color-neutral-background: var(--nm-page);
  --color-neutral-background-raw: 250 248 244;
  --color-neutral-background-bold: var(--nm-page);
  --color-neutral-background-bold-raw: 250 248 244;
  --color-neutral-border: var(--nm-border);
  --color-neutral-border-subtle: var(--nm-border);
  --color-neutral-content: var(--nm-ink);
  --color-neutral-content-subtle: var(--nm-body);
  --color-neutral-content-subtler: var(--nm-muted);

  --color-primary-surface: var(--nm-green);
  --color-primary-surface-raw: 11 93 78;
  --color-primary-surface-hover: #094c40;
  --color-primary-surface-hover-raw: 9 76 64;
  --color-primary-surface-active: var(--nm-green-hover);
  --color-primary-surface-active-raw: 8 63 53;
  --color-primary-surface-content: #ffffff;
  --color-primary-surface-content-raw: 255 255 255;
  --color-primary-surface-content-subtle: var(--nm-green-pale);
  --color-primary-surface-content-subtle-raw: 207 227 220;
  --color-primary-surface-icon: var(--nm-green-pale);
  --color-primary-surface-icon-raw: 207 227 220;
  --color-primary-content: var(--nm-green);
  --color-primary-content-raw: 11 93 78;
  --color-primary-content-hover: var(--nm-green-hover);
  --color-primary-content-hover-raw: 8 63 53;
  --color-primary-content-subtle: var(--nm-green-soft);
  --color-primary-content-subtle-raw: 62 127 114;
  --color-primary-icon: var(--nm-green-soft);
  --color-primary-icon-raw: 62 127 114;
  --color-primary-background: var(--nm-green-tint);
  --color-primary-background-raw: 234 242 239;
  --color-primary-emphasis: var(--nm-green-pale);
  --color-primary-emphasis-raw: 207 227 220;
  --color-primary-emphasis-subtle: var(--nm-green-tint);
  --color-primary-emphasis-subtle-raw: 234 242 239;
  --color-primary-border: var(--nm-green);
  --color-primary-border-raw: 11 93 78;
  --color-primary-border-subtle: var(--nm-green-soft);
  --color-primary-border-subtle-raw: 62 127 114;
  --color-primary-border-subtler: #9cc4b8;
  --color-primary-border-subtler-raw: 156 196 184;
  --color-primary-border-subtlest: var(--nm-green-pale);
  --color-primary-border-subtlest-raw: 207 227 220;
  --color-primary-border-bold: var(--nm-green-hover);
  --color-primary-border-bold-raw: 8 63 53;
  --color-primary-focus-outline: var(--nm-green-pale);
  --color-primary-focus-outline-raw: 207 227 220;
  --color-primary-shadow: var(--nm-green-hover);
  --color-primary-shadow-raw: 8 63 53;
}
