/* ==========================================================================
   OPFE brand layer. Loaded last on every page while the OPFE design is on (Brand::on()); the platform admin can undo it
   from Platform settings, which simply stops loading this file. The brand book is in design/brand/ (README.md first).

   Idea: one line holds everything. Karkadeh (hibiscus) is the brand and the one action; mint tea is the stem.
   This file only retunes the tokens of app.css and marketing.css, plus the handful of places that are the brand itself
   (logo, Kepi, the dark brand surfaces). Never put module styling here.
   Public pages still set --brand to the workspace's own colour inline: the customer's brand leads on client pages.
   ========================================================================== */
@font-face{font-family:"Alexandria";font-style:normal;font-weight:300 800;font-display:swap;src:url(../fonts/alexandria-arabic.woff2) format("woff2");unicode-range:U+0600-06FF, U+0750-077F, U+0870-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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1}
@font-face{font-family:"Alexandria";font-style:normal;font-weight:300 800;font-display:swap;src:url(../fonts/alexandria-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"Alexandria";font-style:normal;font-weight:300 800;font-display:swap;src:url(../fonts/alexandria-latin.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:"Reem Kufi";font-style:normal;font-weight:500 700;font-display:swap;src:url(../fonts/reem-kufi-arabic.woff2) format("woff2");unicode-range:U+0600-06FF, U+0750-077F, U+0870-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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1}
@font-face{font-family:"Reem Kufi";font-style:normal;font-weight:500 700;font-display:swap;src:url(../fonts/reem-kufi-latin.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:"Martian Mono";font-style:normal;font-weight:400 600;font-display:swap;src:url(../fonts/martian-mono-latin.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,.mk,.mk-auth,.su{
  /* neutrals: one family with a breath of karkadeh */
  --n-0:#fff;--n-25:#fffaf8;--n-50:#fbf4f2;--n-100:#f7eeeb;--n-150:#f0e3df;--n-200:#ecdcd8;--n-300:#dcc8c6;--n-400:#a3868d;--n-500:#866b72;--n-600:#6e545b;--n-700:#4a343b;--n-900:#1c0910;--n-950:#120509;
  --bg:var(--n-100);--surface:var(--n-0);--surface-sheet:var(--n-25);--surface-2:var(--n-50);--hover:var(--n-50);--press:var(--n-150);
  --line:var(--n-200);--line-2:var(--n-300);--control-line:var(--n-400);--placeholder:var(--n-500);--muted:var(--n-600);--ink-2:var(--n-700);--ink:var(--n-900);
  --scrim:rgba(28,9,16,.48);
  /* karkadeh: the brand ramp (600 is the brand) */
  --brand-50:#fbe4ea;--brand-100:#f7ccd8;--brand-200:#efa3b8;--brand-300:#e0708f;--brand-500:#cc1d4e;--brand-600:#b8123f;--brand-700:#8d0c30;--brand-800:#6f0926;--brand-900:#4f061b;
  --brand:var(--brand-600);--brand-ink:#fff4f2;--brand-soft:var(--brand-50);--brand-dark:var(--brand-700);
  /* mint tea: the second colour (the stem, counts, highlights). Only --accent-700 is text. */
  --accent-50:#eefaf3;--accent-100:#dff6e8;--accent-200:#c9f0d8;--accent-400:#a8e6c2;--accent-600:#1f8a5b;--accent-700:#1b7a50;
  --accent:var(--accent-400);--accent-ink:#0d3b27;
  /* status: danger is burnt orange so it never reads as the brand red */
  --green:#1b7a50;--green-bg:#e3f6eb;--green-ink:#0d3b27;--green-solid:#1f8a5b;--green-solid-dark:#1b7a50;
  --red:#b5380a;--red-bg:#fde7da;--red-ink:#6e2205;--red-600:#963006;
  --amber:#8f5400;--amber-bg:#fdf0d9;--amber-ink:#5c3600;
  --blue:#2f5d9e;--blue-bg:#e7eefa;--blue-ink:#1d3d6b;
  --purple:#6b3fa0;--purple-bg:#f0e9f8;
  --on-dark:#fff4f2;--on-dark-2:rgba(255,244,242,.7);--ok-on-dark:#a8e6c2;--err-on-dark:#ffb08a;
  --tint-0:#fbe4ea;--tint-0-ink:#8d0c30;--tint-1:#dff6e8;--tint-1-ink:#0d3b27;--tint-2:#fdf0d9;--tint-2-ink:#5c3600;
  --tint-3:#e7eefa;--tint-3-ink:#1d3d6b;--tint-4:#f0e3df;--tint-4-ink:#4a343b;--tint-5:#f0e9f8;--tint-5-ink:#4e2c7a;
  /* type: Alexandria speaks for the brand in both scripts; Inter and Plex Arabic do the reading */
  --font:"Inter","Plex Arabic",system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif;
  --font-display:"Alexandria","Plex Arabic","Inter",system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif;
  --font-kufi:"Reem Kufi","Alexandria","Plex Arabic",sans-serif;
  --font-mono:"Martian Mono",ui-monospace,Menlo,Consolas,monospace;
  /* shape: square-cut like the logo */
  --radius-xs:4px;--radius-sm:8px;--radius:12px;--radius-lg:20px;
  --shadow-xs:0 1px 0 rgba(28,9,16,.04);
  --shadow:0 1px 2px rgba(28,9,16,.07);
  --shadow-md:0 2px 4px rgba(28,9,16,.04),0 12px 28px -8px rgba(28,9,16,.16);
  --shadow-lg:0 4px 10px rgba(28,9,16,.05),0 30px 64px -18px rgba(28,9,16,.3);
  --shadow-sheet:0 0 0 1px var(--line),0 1px 3px rgba(28,9,16,.04);
  --shadow-primary:inset 0 1px 0 rgba(255,255,255,.12),0 1px 2px rgba(79,6,27,.3);
  /* the logo's stem: karkadeh on light grounds, mint on karkadeh or dark grounds */
  --opfe-stem:#b8123f;
  --brand-fill:#b8123f;
}

/* ---------- the brand itself ---------- */
.opfe-brand{display:inline-flex;align-items:center;gap:8px;color:var(--ink);text-decoration:none!important}
.opfe-brand svg{display:block;flex:none}
.opfe-wordmark,.opfe-symbol{color:inherit}
.opfe-ar{font:700 26px/1 var(--font-kufi);color:inherit;letter-spacing:0}
.opfe-ar b{font-weight:700;color:var(--opfe-stem)}
.on-brand,.auth-side,.mk-final-box,.ai-post{--opfe-stem:#c9f0d8}
.kepi{display:block;height:auto;max-width:100%}
[dir=rtl] .kepi{transform:scaleX(-1)}
::selection{background:var(--accent-200);color:var(--ink)}
.stars,.star-input input:checked~label,.star-input label:hover,.star-input label:hover~label{color:#b07800}

/* headings in the display face; big and light with the key words heavy belongs to marketing only */
h1,h2,h3{font-family:var(--font-display)}
h1{letter-spacing:-.025em}

/* the dark brand surfaces become the brand colour itself */
.auth-side,.auth-side.mk-auth{background:var(--brand-fill);color:#fff4f2}
.mk-final-box{background:var(--brand-fill)}
.thread li::before{background:var(--brand-fill)}

/* the sidebar: the logo sits on the desk; the open place is karkadeh-soft with karkadeh text */
.sidebar .brand .opfe-wordmark{height:20px;width:auto}

/* Kepi notes in the workspace (Home greeting, empty screens, the assistant): Kepi speaks to the owner only */
.kepi-note{display:flex;align-items:flex-end;gap:14px;margin:0 0 var(--gap)}
.kepi-note .kepi{width:84px;flex:none}
.kepi-note-body{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);border-end-start-radius:4px;box-shadow:var(--shadow-md);padding:12px 16px;max-width:560px}
.kepi-note-body b{display:block;font:500 11px/1.4 var(--font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--accent-700);margin-bottom:4px}
[dir=rtl] .kepi-note-body b{font:600 13px/1.4 var(--font);letter-spacing:0;text-transform:none}
.kepi-note-body p{margin:0}
.empty .kepi{width:132px;margin:0 auto 6px}
.empty.has-kepi .empty-icon{display:none}

@media (prefers-reduced-motion:reduce){.kepi{animation:none!important}}
.as-kepi{margin:0 auto 8px}

/* inputs: a calm focus (ink edge, a faint karkadeh glow), so a focused field never reads as an error */
.input:focus,.input:focus-visible{border-color:var(--ink);outline:0;box-shadow:0 0 0 4px rgba(184,18,63,.18)}

/* Arabic letters join; spacing them apart breaks the words */
[dir=rtl] *,[dir=rtl] *::before,[dir=rtl] *::after,:lang(ar) *{letter-spacing:0!important}
[dir=rtl] .lbl,[dir=rtl] .sc-hint,[dir=rtl] .disc-hint,[dir=rtl] .eyebrow,[dir=rtl] .ln-eyebrow{text-transform:none}
[dir=rtl] svg text{font-family:var(--font)!important}
[dir=rtl] .mono,[dir=rtl] .lbl{font-family:var(--font)}
