/* OJN-2026-327: identity «نموذج» (namoothaj) for an installation that declares OJN_INSTANCE_IDENTITY=namoothaj.
 * Linked by the root layout only for such an installation; Ojn, PREM and every other installation never load it.
 * Source: Elixar identity library, clients/namoothaj/project (tokens.json, color/CONTRAST.md, fonts/, licenses/).
 * It overrides the variables the app already reads (src/app/globals.css @theme, src/app/brand.css .ojn-platform) and the
 * few hard-coded Ojn values in those two files, light, dark and print. It adds no rule that Ojn's files do not already have a slot for.
 *
 * Slot map (the app keeps its token names; the values are the identity's):
 *   cream-50 → bg · cream-100 → surface-soft · cream-200 → line · white → surface
 *   cocoa-700 → muted · cocoa-800 → ink-soft · cocoa-900 → ink
 *   caramel-500 → brand-accent (fills and borders; never text under 24px) · caramel-600 → link (text)
 *   --ojn-selection → surface-tint · --ojn-focus → focus
 * Values marked «derived» are not in the library tokens (it ships one status colour per kind, no dark set, no info, no borders);
 * they are chosen here and checked ≥ 4.5:1 for text by scripts/installation-identity-test.ts.
 * Fonts (OJN-2026-329): Almarai 400/700/800 and Lalezar 400 (OFL 1.1) are vendored in fonts/ with their licences beside them;
 * the stack falls back to the platform's Arabic system faces, never to Ojn's Alexandria or Skolar. */

/* ── fonts: the identity's own faces (OFL, vendored) ── */
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 400; font-display: swap; src: url("/identities/namoothaj/fonts/almarai-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-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: "Almarai"; font-style: normal; font-weight: 700; font-display: swap; src: url("/identities/namoothaj/fonts/almarai-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-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: "Almarai"; font-style: normal; font-weight: 800; font-display: swap; src: url("/identities/namoothaj/fonts/almarai-arabic-800-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-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: "Lalezar"; font-style: normal; font-weight: 400; font-display: swap; src: url("/identities/namoothaj/fonts/lalezar-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-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: "Lalezar"; font-style: normal; font-weight: 400; font-display: swap; src: url("/identities/namoothaj/fonts/lalezar-latin-400-normal.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; }

/* ── light ── */
html[data-identity="namoothaj"],
html[data-identity="namoothaj"] .ojn-platform {
  --font-sans: "Almarai", "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, system-ui, sans-serif;
  --identity-font-display: "Lalezar", "Almarai", "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, system-ui, sans-serif;
  --color-cream-50: #f8f1e7;
  --color-cream-100: #f1e6d6;
  --color-cream-200: #e6d7c4;
  --color-cocoa-700: #6b5546;
  --color-cocoa-800: #4d372a;
  --color-cocoa-900: #2a1a12;
  --color-caramel-500: #57914a;
  --color-caramel-600: #436f2d;
  --color-white: #fffaf3;
  --ojn-silver: #e6d7c4;
  --ojn-black: #2a1a12;
  --ojn-cream: #f1e6d6;
  --ojn-surface: #fffaf3;
  --ojn-canvas: #f8f1e7;
  --ojn-border: #e6d7c4;
  --ojn-ink: #2a1a12;
  --ojn-muted: #6b5546;
  --ojn-selection: #e1efe3;
  --ojn-focus: #436f2d;
  /* semantic: danger/success/notice are the library's; borders and info are derived */
  --ojn-danger: #8f2a20; --ojn-danger-bg: #fbecea; --ojn-danger-border: #e8c3be;
  --ojn-success: #2d6236; --ojn-success-bg: #e5f1e3; --ojn-success-border: #c2dbc3;
  --ojn-warning: #5a3a12; --ojn-warning-bg: #f8ead2; --ojn-warning-border: #ecd5ae;
  --ojn-info: #4d372a; --ojn-info-bg: #f1e6d6; --ojn-info-border: #dccab2;
}

/* ── dark ── (derived: danger/success/warning/info have no dark values in the library) */
html[data-identity="namoothaj"][data-theme="dark"],
html[data-identity="namoothaj"][data-theme="dark"] .ojn-platform {
  --color-cream-50: #1a120d;
  --color-cream-100: #2d2018;
  --color-cream-200: #3a2b21;
  --color-cocoa-700: #bba493;
  --color-cocoa-800: #dfcfbf;
  --color-cocoa-900: #f6ece0;
  --color-caramel-500: #57914a;
  --color-caramel-600: #95c695;
  --color-white: #251a13;
  --ojn-silver: #3a2b21;
  --ojn-black: #f6ece0;
  --ojn-cream: #2d2018;
  --ojn-surface: #251a13;
  --ojn-canvas: #1a120d;
  --ojn-border: #3a2b21;
  --ojn-ink: #f6ece0;
  --ojn-muted: #bba493;
  --ojn-selection: #212e21;
  --ojn-focus: #95c695;
  --ojn-danger: #f2b8ae; --ojn-danger-bg: #3a1f1b; --ojn-danger-border: #6b3a33;
  --ojn-success: #95c695; --ojn-success-bg: #212e21; --ojn-success-border: #304730;
  --ojn-warning: #e6c98f; --ojn-warning-bg: #33270f; --ojn-warning-border: #6b5424;
  --ojn-info: #dfcfbf; --ojn-info-bg: #2d2018; --ojn-info-border: #4a382b;
}

/* ── print: always light, as Ojn's print blocks ── */
@media print {
  html[data-identity="namoothaj"],
  html[data-identity="namoothaj"] .ojn-platform,
  html[data-identity="namoothaj"][data-theme="dark"],
  html[data-identity="namoothaj"][data-theme="dark"] .ojn-platform {
    --color-cream-50: #f8f1e7;
    --color-cream-100: #f1e6d6;
    --color-cream-200: #e6d7c4;
    --color-cocoa-700: #6b5546;
    --color-cocoa-800: #4d372a;
    --color-cocoa-900: #2a1a12;
    --color-caramel-500: #57914a;
    --color-caramel-600: #436f2d;
    --color-white: #ffffff;
    --ojn-surface: #fff; --ojn-canvas: #fff; --ojn-border: #e6d7c4; --ojn-ink: #2a1a12; --ojn-muted: #6b5546; --ojn-selection: #e1efe3;
    --ojn-danger: #8f2a20; --ojn-danger-bg: #fff; --ojn-danger-border: #e8c3be;
    --ojn-success: #2d6236; --ojn-success-bg: #fff; --ojn-success-border: #c2dbc3;
    --ojn-warning: #5a3a12; --ojn-warning-bg: #fff; --ojn-warning-border: #ecd5ae;
    --ojn-info: #4d372a; --ojn-info-bg: #fff; --ojn-info-border: #dccab2;
  }
}

/* ── fonts: every place the app names Ojn's face ── */
html[data-identity="namoothaj"] .ojn-platform,
html[data-identity="namoothaj"] .ojn-platform .font-sans,
html[data-identity="namoothaj"] .quote-doc,
html[data-identity="namoothaj"] .ojn-platform .quote-doc {
  font-family: "Almarai", "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, system-ui, sans-serif;
}
html[data-identity="namoothaj"] .ojn-platform :where(h1, h2) { font-family: var(--identity-font-display); font-weight: 400; } /* Lalezar has one weight: never a synthetic bold */

/* ── hard-coded Ojn values in globals.css / brand.css ── */
/* text-cocoa-700/NN: Ojn forces #6e6d68 (light) and #a5a19a (dark) */
html[data-identity="namoothaj"] [class*="text-cocoa-700/"]:not(:hover) { color: #6b5546; }
html[data-identity="namoothaj"] [class*="bg-caramel-500/"][class*="text-caramel-600"] { color: #355a24; } /* derived: 6.1:1 on the 20% accent tint */
@media screen {
  html[data-identity="namoothaj"][data-theme="dark"] [class*="text-cocoa-700/"]:not(:hover),
  html[data-identity="namoothaj"][data-theme="dark"] [class*="text-cocoa-700/5"],
  html[data-identity="namoothaj"][data-theme="dark"] [class*="text-cocoa-700/6"] { color: #bba493 !important; }
  html[data-identity="namoothaj"][data-theme="dark"] [class*="bg-caramel-500/"][class*="text-caramel-600"] { color: var(--color-caramel-600); }
  /* tinted note boxes (bg-*-50, bg-*-50/NN): Ojn forces #26231f / #3a3631 / #ece9e4 */
  html[data-identity="namoothaj"][data-theme="dark"] :is(.bg-rose-50, .bg-emerald-50, .bg-amber-50, .bg-violet-50, .bg-teal-50, .bg-sky-50, .bg-indigo-50, .bg-orange-50),
  html[data-identity="namoothaj"][data-theme="dark"] :is([class*="bg-rose-50/"], [class*="bg-emerald-50/"], [class*="bg-amber-50/"], [class*="bg-violet-50/"], [class*="bg-teal-50/"], [class*="bg-sky-50/"], [class*="bg-indigo-50/"], [class*="bg-orange-50/"]) {
    background-color: #2d2018 !important;
    border-color: #3a2b21 !important;
  }
  html[data-identity="namoothaj"][data-theme="dark"] :is(.bg-rose-50, .bg-emerald-50, .bg-amber-50, .bg-violet-50, .bg-teal-50, .bg-sky-50, .bg-indigo-50, .bg-orange-50):not(.text-white),
  html[data-identity="namoothaj"][data-theme="dark"] :is([class*="bg-rose-50/"], [class*="bg-emerald-50/"], [class*="bg-amber-50/"], [class*="bg-violet-50/"], [class*="bg-teal-50/"], [class*="bg-sky-50/"], [class*="bg-indigo-50/"], [class*="bg-orange-50/"]) {
    color: #f6ece0;
  }
  html[data-identity="namoothaj"][data-theme="dark"] :is(.bg-rose-50, .bg-emerald-50, .bg-amber-50, .bg-violet-50, .bg-teal-50, .bg-sky-50, .bg-indigo-50, .bg-orange-50, [class*="bg-rose-50/"], [class*="bg-emerald-50/"], [class*="bg-amber-50/"], [class*="bg-violet-50/"], [class*="bg-teal-50/"], [class*="bg-sky-50/"], [class*="bg-indigo-50/"], [class*="bg-orange-50/"]) :is([class*="-900"], [class*="-800"]):not(.bg-cocoa-900):not(.bg-cocoa-800):not(.text-white) {
    color: #f6ece0 !important;
  }
}
/* quotation document: Ojn's cream band, silver rule and grey footer */
html[data-identity="namoothaj"] .ojn-platform .quote-doc .qd-band { background: #f1e6d6; }
html[data-identity="namoothaj"] .ojn-platform .quote-doc .qd-header { border-bottom-color: #e6d7c4; }
html[data-identity="namoothaj"] .ojn-platform .quote-doc .qd-footer { background: #f1e6d6; }
