/*
 * ٩ نسب — the white-label look of the `nisab` instance (team.9nisab.com, ADR 0021 / 0036; brand/9nisab.json →
 * look.stylesheet). Loaded after the product's tokens, so it redefines them; nothing else in the app changes.
 * Palette and type are 9nisab.com's own («لوحة نِسَب» tokens):
 *   ink #141210 · surfaces #1B1815 / #231F1B / #2D2823 · line #3A332C · text #F6F2EA / #CFC6B6 / #958B7C
 *   gold #C8902E (hi #E3B15A) · light theme gold #B07A20 · Readex Pro (headings) · IBM Plex Sans Arabic (text).
 * Text tokens keep at least 4.5:1 on their surfaces in both themes. Fonts are served from here (CSP font-src 'self').
 */

@font-face { font-family: 'Readex Pro'; src: url('./fonts/readex-pro-arabic-wght-normal.woff2') format('woff2-variations'), url('./fonts/readex-pro-arabic-wght-normal.woff2') format('woff2'); font-weight: 160 700; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Readex Pro'; src: url('./fonts/readex-pro-latin-wght-normal.woff2') format('woff2-variations'), url('./fonts/readex-pro-latin-wght-normal.woff2') format('woff2'); font-weight: 160 700; font-style: normal; font-display: swap; 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 Sans Arabic'; src: url('./fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('./fonts/ibm-plex-sans-arabic-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; 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 Sans Arabic'; src: url('./fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('./fonts/ibm-plex-sans-arabic-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; 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 Sans Arabic'; src: url('./fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('./fonts/ibm-plex-sans-arabic-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; 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 {
  --font-latin: 'IBM Plex Sans Arabic', 'Inter Variable', 'Inter', system-ui, sans-serif;
  --font-arabic: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'IBM Plex Sans Arabic', ui-monospace, monospace;
  /* 9nisab.com's display face, for headings. */
  --font-display: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;

  /* Corners as on 9nisab.com (cards 16px, buttons 8px). */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 13px;
  --r-xl: 18px;

  /* The top bar, rail and floating panels stay ink in both themes. */
  --railIcon: #cfc6b6;
  --railHover: rgba(246, 242, 234, 0.07);
  --unread: #e0675f;
  --panelFg: #cfc6b6;
  --panelFgStrong: #f6f2ea;
  --panelLabel: #958b7c;
  --panelIcon: #cfc6b6;
  --panelLine: rgba(246, 242, 234, 0.07);
  --panelHover: rgba(246, 242, 234, 0.05);
  --panelCard: rgba(246, 242, 234, 0.045);
  --panelCardLine: rgba(246, 242, 234, 0.08);
  --panelTrack: rgba(246, 242, 234, 0.1);
  --panelSoft: #d6d0c5;
  --panelInput: #f6f2ea;
  --toastFg: #f6f2ea;
  --toastGood: #5fb19a;
  --toastAcc: #c8902e;
  --toastWarn: #d9a441;
  --toastBad: #f6dcd9;
  --copilotFg: #f6f2ea;
  --copilotMuted: #cfc6b6;
  --copilotLine: rgba(246, 242, 234, 0.09);
  --copilotRaise: rgba(246, 242, 234, 0.05);
  --copilotAccent: #c8902e;
  --copilotGood: #5fb19a;
  --copilotGoodBg: rgba(95, 177, 154, 0.14);
  --copilotWarnBg: rgba(217, 164, 65, 0.16);

  --goodSolid: #1f6b4e;
  --warnSolid: #8a5a0b;
  --badSolid: #a3302b;
  --offline: #958b7c;
  --knob: #fffdf8;
  --series-main: #3e8c76;
  --series-support: #8f6e3a;
  --series-sales: #c8902e;
  --series-vip: #d9a441;
  --series-delivery: #7a5c2e;
  --series-warranty: #a3302b;
  --series-billing: #2c4e7a;
  --series-returns: #5fb19a;
  --series-concierge: #8a5a0b;
  --series-breach: #e0675f;

  /* Single accent, no gradient: 9nisab.com uses flat gold. */
  --accGrad: var(--acc);
  --accShadowBtn: 0 3px 10px color-mix(in srgb, var(--acc) 22%, transparent);
  --accShadowRail: 0 4px 14px color-mix(in srgb, var(--acc) 35%, transparent);
  --accShadowNav: 0 2px 10px color-mix(in srgb, var(--acc) 30%, transparent);
  --accShadowCompose: 0 4px 14px color-mix(in srgb, var(--acc) 26%, transparent);
  --shadow-chip: 0 1px 3px rgba(20, 18, 16, 0.1);
  --shadow-knob: 0 1px 3px rgba(20, 18, 16, 0.3);
  --shadow-toast: 0 14px 40px rgba(20, 18, 16, 0.34);
  --shadow-pop: 0 24px 64px -24px rgba(20, 18, 16, 0.28);
}

:root,
:root[data-theme='light'],
[data-theme='light'] {
  --ink: #141210;
  --muted: #3a3631;
  --faint: #5c564e;
  --breachText: #a3302b;
  --dim: #6b6660;
  --ghost: #a39b8e;
  --sep: #c9bca6;
  --surface: #fffdf8;
  --surface2: #f7f2e8;
  --surface3: #f1ebdf;
  --canvas: #f6f2ea;
  --chrome: #fffdf8;
  --shell: #eae3d6;
  --field: #f1ebdf;
  --track: #e8e0d1;
  --rail: #141210;
  --panel: #1b1815;
  --toast: #1b1815;
  --border: #ddd3c2;
  --borderHi: #c9bca6;
  --line: #e8e0d1;
  --acc: #b07a20;
  --acc2: #b07a20;
  --onAcc: #141210;
  --accSoft: #f6ecd8;
  --accSoft2: #faf4e8;
  --accSoft3: #f0e2c5;
  --accSoft4: #e8d5b0;
  --accLine: #e3cfa6;
  --accText: #8c5f18;
  --ai: #8c5f18;
  --goodBg: #e5f0ea;
  --goodFg: #1f6b4e;
  --goodLine: #a9cdbb;
  --goodSoft: #f3f8f5;
  --warnBg: #f6ebd6;
  --warnFg: #7a5209;
  --warnLine: #dcc08a;
  --warnSoft: #fbf5ea;
  --badBg: #f8e7e5;
  --badFg: #a3302b;
  --badLine: #e3b1ac;
  --alertBg: #fcf4f3;
  --infoBg: #e6edf6;
  --infoFg: #2c4e7a;
  --violetBg: #f1e8d8;
  --violetFg: #7a5c2e;
  --noteBg: #fdf9f0;
  --noteLine: #dcc08a;
  --inverse: #141210;
  --onInverse: #fffdf8;
  --switchOff: #c9bca6;
  --chartBar: #e3cfa6;
  --scroll: #d6cec0;
  --scrollHi: #c9bca6;
  --overlay: rgba(20, 18, 16, 0.45);
  /* The sign-in field (features/auth/ModuleField) and the motto's marked letters. */
  --fieldModule: #141210;
  --brandGold: #8c5f18;
  /* Avatars carry their initials in --onAcc (ivory here), so their faces are the deep brand tones. */
  --avatar-1: #8c5f18;
  --avatar-2: #7a5c2e;
  --avatar-3: #2c4e7a;
  --avatar-4: #1f6b4e;
  --avatar-5: #5a4626;
  --avatarOffline: #6b6660;
}

:root[data-theme='dark'],
[data-theme='dark'] {
  --ink: #f6f2ea;
  --muted: #cfc6b6;
  --faint: #a89e8e;
  --breachText: #e0675f;
  --dim: #a09a91;
  --ghost: #5a5650;
  --sep: #4a4238;
  --surface: #1b1815;
  --surface2: #231f1b;
  --surface3: #2d2823;
  --canvas: #141210;
  --chrome: #171512;
  --shell: #0f0e0c;
  --field: #2d2823;
  --track: #332d27;
  --rail: #0f0e0c;
  --panel: #171512;
  --toast: #2d2823;
  --border: #3a332c;
  --borderHi: #4a4238;
  --line: #2a2520;
  /* 9nisab gold: ink text on it stays above 4.5:1. */
  --acc: #c8902e;
  --acc2: #c8902e;
  --onAcc: #141210;
  --accSoft: #2a2117;
  --accSoft2: #241d15;
  --accSoft3: #33281a;
  --accSoft4: #3c2f1e;
  --accLine: #5a4522;
  --accText: #e3b15a;
  --ai: #e3b15a;
  --goodBg: #13241d;
  --goodFg: #4fae86;
  --goodLine: #24493a;
  --goodSoft: #101c17;
  --warnBg: #241c0e;
  --warnFg: #d9a441;
  --warnLine: #5a4417;
  --warnSoft: #1b150a;
  --badBg: #2a1515;
  --badFg: #e0675f;
  --badLine: #6b2d2a;
  --alertBg: #1f1111;
  --infoBg: #172231;
  --infoFg: #7fa6da;
  --violetBg: #2a241a;
  --violetFg: #c8902e;
  --noteBg: #1f1a10;
  --noteLine: #5a4417;
  --inverse: #f6f2ea;
  --onInverse: #141210;
  --switchOff: #4a4238;
  --chartBar: #5a4522;
  --scroll: #3a332c;
  --scrollHi: #4a4238;
  --overlay: rgba(0, 0, 0, 0.6);
  --fieldModule: #f6f2ea;
  --brandGold: #e3b15a;
  /* Initials are ink (--onAcc) in this theme, so the faces are the light brand tones. */
  --avatar-1: #e3b15a;
  --avatar-2: #c8902e;
  --avatar-3: #7fa6da;
  --avatar-4: #4fae86;
  --avatar-5: #d6bc86;
  --avatarOffline: #958b7c;
}

/*
 * A workspace that picked its own accent (or ink) keeps it: the product's override blocks, repeated after this
 * look's palette so they still win. Copied verbatim from packages/tokens/src/tokens.css.
 */
/* Non-default workspace accent: derive the tints instead of using the tuned defaults. */
:root[data-accent='custom'] {
  --accSoft: color-mix(in srgb, var(--acc) 9%, var(--surface));
  --accSoft2: color-mix(in srgb, var(--acc) 6%, var(--surface));
  --accSoft3: color-mix(in srgb, var(--acc) 13%, var(--surface));
  --accSoft4: color-mix(in srgb, var(--acc) 19%, var(--surface));
  --accLine: color-mix(in srgb, var(--acc) 20%, var(--surface));
  --accText: color-mix(in srgb, var(--acc) 80%, var(--ink));
  --acc2: color-mix(in srgb, var(--acc) 78%, #ffffff);
}
:root[data-accent='ink'] {
  --acc: var(--ink);
  --onAcc: var(--surface);
  --accSoft: color-mix(in srgb, var(--ink) 7%, var(--surface));
  --accSoft2: color-mix(in srgb, var(--ink) 4%, var(--surface));
  --accSoft3: color-mix(in srgb, var(--ink) 10%, var(--surface));
  --accSoft4: color-mix(in srgb, var(--ink) 15%, var(--surface));
  --accLine: color-mix(in srgb, var(--ink) 18%, var(--surface));
  --accText: var(--ink);
  --acc2: color-mix(in srgb, var(--ink) 78%, var(--surface));
}
:root[data-accent='ink'][data-theme='dark'] {
  --accSoft: color-mix(in srgb, var(--ink) 12%, var(--surface));
  --accSoft2: color-mix(in srgb, var(--ink) 8%, var(--surface));
  --accSoft3: color-mix(in srgb, var(--ink) 16%, var(--surface));
  --accSoft4: color-mix(in srgb, var(--ink) 22%, var(--surface));
  --accLine: color-mix(in srgb, var(--ink) 30%, var(--surface));
}
:root[data-accent='custom'][data-theme='dark'],
[data-accent='custom'] [data-theme='dark'] {
  --accSoft: color-mix(in srgb, var(--acc) 22%, var(--surface));
  --accSoft2: color-mix(in srgb, var(--acc) 18%, var(--surface));
  --accSoft3: color-mix(in srgb, var(--acc) 28%, var(--surface));
  --accSoft4: color-mix(in srgb, var(--acc) 33%, var(--surface));
  --accLine: color-mix(in srgb, var(--acc) 45%, var(--surface));
  --accText: color-mix(in srgb, var(--acc) 45%, #ffffff);
}

/* Headings in 9nisab.com's display face. */
h1, h2, h3 { font-family: var(--font-display); }
