/* mnemo · Xeme theme layer v4 (mnemo4-ui, 30 Oct 2026). Monochrome reskin after dokeo.co, OpenBot, Turnstone.
   Loaded after the app CSS; overrides CSS variables, fonts, the logo mark and a few surfaces. No JS, no data.
   Spec: design_spec.md. Fonts: Geist, Geist Mono, Newsreader (SIL OFL 1.1, licences in /brand/fonts). */
@font-face{font-family:"Geist";font-style:normal;font-weight:100 900;font-display:swap;src:url(/brand/fonts/Geist-Variable.woff2) format("woff2")}
@font-face{font-family:"Geist Mono";font-style:normal;font-weight:100 900;font-display:swap;src:url(/brand/fonts/GeistMono-Variable.woff2) format("woff2")}
@font-face{font-family:"Newsreader";font-style:normal;font-weight:200 800;font-display:swap;src:url(/brand/fonts/Newsreader-latin-wght.woff2) format("woff2")}
@font-face{font-family:"Archivo";font-style:normal;font-weight:100 900;font-display:swap;src:url(/brand/fonts/Archivo-100-900-latin.woff2) format("woff2")}

:root{
  --xeme-font:"Geist","Archivo",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --xeme-mono:"Geist Mono","JetBrains Mono",ui-monospace,"SF Mono",Menlo,monospace;
  --xeme-display:"Newsreader","Iowan Old Style",Georgia,serif;
  --xeme-ease:cubic-bezier(0.16,1,0.3,1);
  --font-sans:var(--xeme-font) !important;
  --font-mono:var(--xeme-mono) !important;
  --r-sm:6px;--r-card:12px;--r-dialog:16px;
}

/* Dark = graphite (default). Paper text, paper buttons, color only for status. */
:root,[data-theme="dark"]{
  color-scheme:dark;
  --background:#0e1116 !important;
  --dialog:#141921 !important;
  --foreground:#f7f7f5 !important;
  --card:#141921 !important;
  --card-foreground:#f7f7f5 !important;
  --popover:#141921 !important;
  --popover-foreground:#f7f7f5 !important;
  --glass-fill:#1a2029 !important;
  --glass-stroke:#ffffff1f !important;
  --primary:#f7f7f5 !important;
  --primary-foreground:#0e1116 !important;
  --primary-hover:#d9dde3 !important;
  --primary-disabled:#f7f7f521 !important;
  --secondary:#ffffff0a !important;
  --secondary-foreground:#f7f7f5 !important;
  --chat-user:#1a2029 !important;
  --chat-user-foreground:#f7f7f5 !important;
  --muted:#141921 !important;
  --muted-foreground:#a1a9b5 !important;
  --faint-foreground:#6f7886 !important;
  --accent:#ffffff0f !important;
  --accent-foreground:#f7f7f5 !important;
  --destructive:#f87171 !important;
  --destructive-fill:#dc2626 !important;
  --destructive-foreground:#ffffff !important;
  --border:#252c37 !important;
  --input:#323a47 !important;
  --ring:#c0c7d1 !important;
  --sidebar:#0b0d11 !important;
  --sidebar-foreground:#f7f7f5 !important;
  --sidebar-border:#1d232c !important;
  --sidebar-accent:#ffffff12 !important;
  --sidebar-accent-foreground:#f7f7f5 !important;
  --link:#c7cdf9 !important;
  --favicon-plate:#f7f7f5 !important;
  --success:#2bd47d !important;
  --warning:#f5a524 !important;
  --status-working:#c7cdf9 !important;
  --unread:#c7cdf9 !important;
  --working-dot:#2bd47d !important;
  --overlay:rgba(5,7,10,.72) !important;
  --scrollbar:#2a313c !important;
  --scrollbar-hover:#3a4350 !important;
  --radius:8px !important;
  --shadow-sm:0 0 0 1px #ffffff0f;
  --shadow-md:0 0 0 1px #ffffff0f,0 16px 40px -16px #000000b3;
}

/* Light = paper. Ink text, ink buttons, indigo links. */
[data-theme="light"]{
  color-scheme:light;
  --background:#f4f2eb !important;
  --dialog:#fffcf8 !important;
  --foreground:#14171c !important;
  --card:#fffcf8 !important;
  --card-foreground:#14171c !important;
  --popover:#fffcf8 !important;
  --popover-foreground:#14171c !important;
  --glass-fill:#fffcf8 !important;
  --glass-stroke:#14171c1a !important;
  --primary:#14171c !important;
  --primary-foreground:#ffffff !important;
  --primary-hover:#343b49 !important;
  --primary-disabled:#14171c26 !important;
  --secondary:#14171c0a !important;
  --secondary-foreground:#14171c !important;
  --chat-user:#efebe3 !important;
  --chat-user-foreground:#14171c !important;
  --muted:#efebe3 !important;
  --muted-foreground:#4e586a !important;
  --faint-foreground:#7a8394 !important;
  --accent:#14171c0d !important;
  --accent-foreground:#14171c !important;
  --destructive:#b91c1c !important;
  --destructive-fill:#b91c1c !important;
  --destructive-foreground:#ffffff !important;
  --border:#e3ddd2 !important;
  --input:#cfc6b6 !important;
  --ring:#14171c !important;
  --sidebar:#efebe3 !important;
  --sidebar-foreground:#14171c !important;
  --sidebar-border:#e3ddd2 !important;
  --sidebar-accent:#14171c0f !important;
  --sidebar-accent-foreground:#14171c !important;
  --link:#312e81 !important;
  --favicon-plate:#14171c !important;
  --success:#157a32 !important;
  --warning:#9a3412 !important;
  --status-working:#312e81 !important;
  --unread:#312e81 !important;
  --working-dot:#157a32 !important;
  --overlay:rgba(20,23,28,.42) !important;
  --scrollbar:#cfc6b6 !important;
  --scrollbar-hover:#a99f8e !important;
  --radius:8px !important;
  --shadow-sm:0 1px 2px #14171c0d;
  --shadow-md:0 1px 2px #14171c0d,0 8px 24px -12px #14171c2e;
}

html,body,button,input,textarea,select,h1,h2,h3,h4,p,label{font-family:var(--xeme-font) !important}
code,pre,kbd,samp,.font-mono,.font-mono *{font-family:var(--xeme-mono) !important}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-feature-settings:"ss01" 0}
::selection{background:#f7f7f5;color:#0e1116}
[data-theme="light"] ::selection{background:#14171c;color:#ffffff}
:focus-visible{outline-color:var(--ring)}
a{text-underline-offset:3px}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms !important;transition-duration:.01ms !important}}

/* Logo: the upstream "two bars" mark becomes the Koshra vault mark (violet, three shelf bars). mnemo19-ui. */
div.rounded-full:has(> span.rounded-full.bg-card + span.rounded-full.bg-card),
div.rounded-full.bg-muted:has(> span.rounded-full.bg-primary + span.rounded-full.bg-primary){
  background-color:transparent !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' role='img' aria-label='Koshra'%3E%3Ctitle%3EKoshra%3C/title%3E%3Crect width='64' height='64' rx='16' fill='%235b4bd6'/%3E%3Crect x='12' y='16' width='28' height='8' rx='4' fill='%23fff'/%3E%3Crect x='24' y='28' width='28' height='8' rx='4' fill='%23ff7847'/%3E%3Crect x='12' y='40' width='28' height='8' rx='4' fill='%23fff'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;background-position:center !important;background-size:100% 100% !important;
  border-radius:25% !important;
}
[data-theme="dark"] div.rounded-full:has(> span.rounded-full.bg-card + span.rounded-full.bg-card),
[data-theme="dark"] div.rounded-full.bg-muted:has(> span.rounded-full.bg-primary + span.rounded-full.bg-primary){
  box-shadow:none !important;
}
div.rounded-full:has(> span.rounded-full.bg-card + span.rounded-full.bg-card) > span,
div.rounded-full.bg-muted:has(> span.rounded-full.bg-primary + span.rounded-full.bg-primary) > span{display:none !important}
/* Auth mark at the guideline card size (56) */
div.rounded-full.bg-muted:has(> span.rounded-full.bg-primary + span.rounded-full.bg-primary){width:56px !important;height:56px !important}

/* Welcome page */
[data-rakazo-surface="welcome"] main{gap:36px !important}
[data-rakazo-surface="welcome"] main > div:first-child{gap:16px !important}
[data-rakazo-surface="welcome"] main > div:first-child > div{width:56px !important;height:56px !important}
[data-rakazo-surface="welcome"] h1{font-family:"Archivo",var(--xeme-font) !important;font-weight:500 !important;letter-spacing:-0.04em !important;font-size:clamp(56px,9vw,84px) !important;line-height:1 !important}
[data-rakazo-surface="welcome"] main > p{font-size:clamp(17px,2vw,19px) !important;line-height:1.6 !important;color:var(--muted-foreground) !important;max-width:460px !important}
/* Only one account can register on this instance, so Sign in is the primary action; Sign up stays available as the secondary one. */
[data-rakazo-surface="welcome"] main > div:last-child{gap:10px !important}
[data-rakazo-surface="welcome"] main > div:last-child > a,
[data-rakazo-surface="welcome"] main > div:last-child > button{
  font-family:var(--xeme-font) !important;font-weight:500 !important;font-size:14px !important;letter-spacing:-0.005em !important;text-transform:none !important;
  border-radius:var(--r-sm) !important;padding:0 18px !important;height:40px !important;display:inline-flex !important;align-items:center !important;line-height:1 !important;transform:none !important;
  transition:background-color .2s var(--xeme-ease),color .2s var(--xeme-ease),box-shadow .2s var(--xeme-ease) !important;
}
[data-rakazo-surface="welcome"] main > div:last-child > a{order:-1;background:var(--primary) !important;color:var(--primary-foreground) !important}
[data-rakazo-surface="welcome"] main > div:last-child > a:hover{background:var(--primary-hover) !important}
[data-rakazo-surface="welcome"] main > div:last-child > button{background:transparent !important;color:var(--foreground) !important;box-shadow:inset 0 0 0 1px var(--input) !important}
[data-rakazo-surface="welcome"] main > div:last-child > button:hover{background:var(--accent) !important}
[data-rakazo-surface="welcome"]::after,
div.min-h-full:has(> form.w-\[460px\])::after{
  content:"Koshra\0000a0by\0000a0Xeme\0000a0AI\0000a0Lab \00b7  Rasul\0000a0Shaikh \00b7  rasul@xeme.co";white-space:normal;word-spacing:.15em;text-wrap:balance;
  display:block;text-align:center;padding:0 20px 28px;
  font:600 11px/1.4 var(--xeme-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--faint-foreground);
}
div.min-h-full:has(> form.w-\[460px\]){flex-direction:column !important;position:relative}
div.min-h-full:has(> form.w-\[460px\])::after{position:absolute;bottom:0;left:0;right:0}

/* Sign-in / sign-up / reset forms: raised card */
form.w-\[460px\]{max-width:calc(100% - 32px) !important;width:420px !important;background:var(--card) !important;border:1px solid var(--border) !important;border-radius:var(--r-card) !important;padding:32px !important;box-shadow:var(--shadow-md) !important}
form.w-\[460px\] h1{font-family:var(--xeme-display) !important;font-weight:500 !important;letter-spacing:-0.025em !important;font-size:clamp(28px,6vw,34px) !important;line-height:1.1 !important;text-align:center}
form.w-\[460px\] label{font:600 11px/1 var(--xeme-mono) !important;letter-spacing:.14em !important;text-transform:uppercase !important;color:var(--muted-foreground) !important}
form.w-\[460px\] input{background:var(--background) !important;border:1px solid var(--input) !important;border-radius:var(--r-sm) !important;min-height:40px}
form.w-\[460px\] input:focus{border-color:var(--ring) !important;box-shadow:0 0 0 3px color-mix(in srgb,var(--ring) 18%,transparent) !important;outline:none !important}
form.w-\[460px\] button[type="submit"]{border-radius:var(--r-sm) !important;font:500 14px/1 var(--xeme-font) !important;letter-spacing:-0.005em !important;text-transform:none !important;min-height:42px;background:var(--primary) !important;color:var(--primary-foreground) !important}
form.w-\[460px\] button[type="submit"]:hover{background:var(--primary-hover) !important}
@media (max-width:480px){form.w-\[460px\]{padding:24px 20px !important;border:0 !important;box-shadow:none !important;background:transparent !important}}

/* Sidebar */
[data-slot="sidebar"]{font-size:13.5px}
[data-testid="sidebar-search-trigger"]{border-radius:var(--r-sm) !important}

/* Chat */
[data-testid="composer-bar"]{border-radius:16px !important;background:var(--card) !important;border-color:var(--input) !important;box-shadow:var(--shadow-sm)}
[data-testid="composer-bar"]:focus-within{border-color:var(--ring) !important;box-shadow:0 0 0 3px color-mix(in srgb,var(--ring) 14%,transparent),var(--shadow-sm) !important}
[data-testid="message-user-bubble"]{border-radius:14px !important;box-shadow:inset 0 0 0 1px var(--border)}

/* Settings modal */
[role="dialog"]:has([data-testid="settings-nav"]){border-radius:var(--r-dialog) !important;border:1px solid var(--border) !important;box-shadow:var(--shadow-md) !important;background:var(--dialog) !important}
[data-testid="settings-nav"] button{border-radius:var(--r-sm) !important}
[data-testid="settings-nav"] button[aria-current="page"]{background:var(--accent) !important;color:var(--foreground) !important;font-weight:500}
[data-testid="settings-header"] h2{font-family:var(--xeme-display) !important;font-weight:500 !important;font-size:26px !important;letter-spacing:-0.02em !important;line-height:1.15 !important}

/* Popovers and menus */
[data-slot="popover-content"],[role="menu"]{border-radius:var(--r-card) !important;box-shadow:var(--shadow-md) !important}
