/*!*******************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/tokens.css ***!
  \*******************************************************************************************************************************/
/* Design tokens - the single source of truth for color, type, spacing,
 * radius, shadow, and motion across the app. Components should consume
 * the semantic layer (--surface-*, --text-*, --accent, etc.), not the
 * raw ramps, so a theme change only has to override this file.
 *
 * Palette: the novaluna.ai editorial system - ink on warm paper with the
 * logo's amber as the single accent (see the EDITORIAL SYSTEM block).
 * Legacy indigo and teal ramps are kept so straggler references still
 * resolve, but the semantic layer no longer points at them.
 *
 * Spec mirrored in docs/design-tokens.md (kept in sync manually).
 */

:root {
  /* --- Legacy indigo ramp (no longer consumed by the semantic layer;
     kept so stray var(--indigo-*) references don't break) --- */
  --indigo-50: #EEF2FF;
  --indigo-100: #E0E7FF;
  --indigo-200: #C7D2FE;
  --indigo-300: #A5B4FC;
  --indigo-400: #818CF8;
  --indigo-500: #6366F1;
  --indigo-600: #4F46E5;
  --indigo-700: #4338CA;
  --indigo-800: #3730A3;
  --indigo-900: #312E81;
  --indigo-950: #1E1B4B;

  /* --- Cool slate neutral ramp ---
     Crisp, high-contrast surfaces (not washed warm beige). White canvas,
     cool-gray sidebar, clear borders — reads like a polished research tool. */
  --neutral-0: #FFFFFF;
  --neutral-50: #F5F6F8;   /* cool canvas */
  --neutral-100: #ECEEF2;  /* inset / hover */
  --neutral-200: #E0E3E8;  /* subtle borders */
  --neutral-300: #C8CDD6;  /* strong borders */
  --neutral-400: #9AA3B2;
  --neutral-500: #6B7380;  /* muted text */
  --neutral-600: #4A5160;  /* secondary text */
  --neutral-700: #323845;
  --neutral-800: #1E2430;
  --neutral-900: #11151C;

  /* --- Indigo brand ramp (the single accent) ---
     Ties the app to novaluna.ai, whose hero is electric indigo (~#4318E0),
     but at markedly lower chroma: a landing page has seconds to persuade,
     a workspace is stared at for hours, so the product takes the brand HUE
     and leaves the saturation behind. --indigo-500 is 7.7:1 on white, so it
     carries white button text and body-size links.
     (Supersedes the earlier teal accent; the teal ramp below is kept only
     so any stray reference still resolves.) */
  --indigo-50: #EEEBFB;
  --indigo-100: #DCD6F7;
  --indigo-200: #BCB2EF;
  --indigo-300: #9084E0;   /* primary accent (dark theme) */
  --indigo-400: #6B5AD6;
  --indigo-500: #4B3BD1;   /* primary accent (light) */
  --indigo-600: #3D2FB0;   /* hover (light) */
  --indigo-700: #2F2489;
  --indigo-800: #1E1759;

  --teal-50: #DDF0F4;
  --teal-100: #B5DCE5;
  --teal-200: #7CC0D0;
  --teal-300: #3A9BB0;
  --teal-400: #187A90;
  --teal-500: #0C5C6E;   /* primary accent (light) */
  --teal-600: #084A59;   /* hover (light) */
  --teal-700: #053742;
  --teal-800: #03242C;

  /* --- Status colors --- */
  --status-success: #1D6B38;
  --status-success-bg: #EAF4EC;
  --status-warning: #8A5700;
  --status-warning-bg: #FDF3D3;
  --status-danger: #B3261E;
  --status-danger-bg: #FBECEA;
  --status-info: #1F5FD6;
  --status-info-bg: #EAF0FC;

  /* =====================================================================
   * EDITORIAL SYSTEM (2026-11) - shared with novaluna.ai
   * Mirrors novaluna-website/src/styles/tokens.css: ink on warm paper, and
   * ONE accent - the logo's amber - used the way a reader uses a
   * highlighter, to mark where an answer came from (citations, the open
   * source, the passage). Primary actions are ink (cream in dark), never
   * amber, so the highlighter keeps its meaning.
   * ===================================================================== */
  --brand-amber: #FFBA08;
  --paper: #FBFAF7;
  --paper-2: #F4F2EC;
  --ink: #15171C;
  --ink-2: #474C56;
  --ink-3: #696E78;
  --rule: #E4E1D9;
  --rule-strong: #CDC9BE;
  --mark: #FDE7A6;          /* passage highlight */
  --mark-strong: #FCDC85;
  --mark-ink: #15171C;
  --accent-text: #8A5700;   /* amber that passes AA on paper (5.8:1) */
  --focus: #1F5FD6;

  /* --- Semantic surfaces (light) --- */
  --surface-app: var(--paper);
  --surface-sidebar: var(--paper-2);
  --surface-card: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-inset: #EFECE4;
  --surface-bot-bubble: transparent;
  --surface-user-bubble: #EFECE4;

  --border-subtle: var(--rule);
  --border-strong: var(--rule-strong);

  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);
  --text-on-accent: #1A1405;

  /* --accent is the "interactive ink" colour (links, active icons, the
     selected row's marker). Amber text only where it is legible. */
  --accent: var(--accent-text);
  --accent-hover: #6E4500;
  --accent-subtle: #FBF1D4;

  /* Filled primary actions: ink in light, cream in dark (as the website's
     "Request a working session" button). */
  --accent-solid: var(--ink);
  --on-accent-solid: var(--paper);

  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent);

  /* --- Shadows (warm, from the website's frame/pop shadows) --- */
  --shadow-sm: 0 1px 0 rgb(21 23 28 / 0.04), 0 1px 2px rgb(21 23 28 / 0.06);
  --shadow-md: 0 1px 0 rgb(21 23 28 / 0.04), 0 8px 24px -10px rgb(21 23 28 / 0.20);
  --shadow-lg: 0 1px 0 rgb(21 23 28 / 0.04), 0 12px 32px -12px rgb(21 23 28 / 0.18), 0 40px 80px -40px rgb(21 23 28 / 0.22);

  /* --- Spacing scale (4px base) --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-11: 44px;
  --space-12: 48px;
  --space-13: 52px;
  --space-14: 56px;
  --space-15: 60px;
  --space-16: 64px;

  /* --- Radius (the website's: 3/6/10/14) --- */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;   /* message bubbles */
  --radius-2xl: 16px;  /* composer surface */
  --radius-full: 999px;

  /* --- Type --- */
  --font-display: "Newsreader", "Newsreader Fallback", Georgia, serif;
  --font-sans: "IBM Plex Sans", "IBM Plex Sans Fallback", "IBM Plex Sans Arabic", "IBM Plex Sans Arabic Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  /* Financial figures (OAS, spreads, prices), tickers, ISINs and citation
     IDs render with tabular mono so columns of numbers align. */
  --font-tabular: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --font-feature-tabular: "tnum" 1, "lnum" 1;
  --tracking-caps: 0.08em;
  --tracking-display: -0.018em;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 22px;
  --text-3xl: 28px;

  /* --- Motion (the website's) --- */
  --dur-fast: 120ms;
  --dur-med: 220ms;
  --dur-slow: 480ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  /* Drives bc_style.css's global scrollbar thumb. */
  --color-accent-primary: var(--rule-strong);
  --color-accent-secondary: #B8B3A6;
  --color-bg-secondary: transparent;
}

/* Dark theme - the website's dark palette: near-black paper, cream ink,
 * the same amber. The sidebar sits one step deeper than the canvas so the
 * shell has depth without borders doing all the work. */
[data-theme="dark"] {
  --paper: #0E1013;
  --paper-2: #14171C;
  --ink: #ECEAE4;
  --ink-2: #B6B4AD;
  --ink-3: #94928B;
  --rule: #262A31;
  --rule-strong: #3A3F48;
  --mark: #3A2E10;
  --mark-strong: #4D3C12;
  --mark-ink: #FFD36B;
  --accent-text: #FFC53D;
  --focus: #7FB0FF;

  --surface-app: var(--paper);
  --surface-sidebar: #0A0B0E;
  --surface-card: #15181D;
  --surface-raised: #1A1D23;
  --surface-inset: #20242B;
  --surface-bot-bubble: transparent;
  --surface-user-bubble: #1A1D23;

  --border-subtle: var(--rule);
  --border-strong: var(--rule-strong);

  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);
  --text-on-accent: #1A1405;

  --accent: var(--accent-text);
  --accent-hover: #FFD36B;
  --accent-subtle: #2A2210;

  --accent-solid: #ECEAE4;
  --on-accent-solid: #15171C;

  --status-success: #7DD69B;
  --status-success-bg: #12261A;
  --status-warning: #FFC53D;
  --status-warning-bg: #2A2210;
  --status-danger: #FF8A80;
  --status-danger-bg: #2B1513;
  --status-info: #7FB0FF;
  --status-info-bg: #142036;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 1px 0 rgb(255 255 255 / 0.03), 0 12px 30px -10px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 1px 0 rgb(255 255 255 / 0.03), 0 24px 60px -24px rgb(0 0 0 / 0.7);

  --color-accent-primary: #3A3F48;
  --color-accent-secondary: #4A505A;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-med: 0ms; --dur-slow: 0ms; }
}

/* ---------- Theme swap ----------
 * setTheStyleMode() adds this class for one frame while it flips
 * data-theme. Changing the theme repaints nearly every element, and several
 * legacy rules use `transition: all !important` (sidebar rows, .dx-button,
 * sliders), so without this the browser animates thousands of property
 * changes at once and the toggle visibly stalls. A theme change should be
 * instantaneous, never animated. */
html.theme-switching,
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
    transition: none !important;
    animation: none !important;
}

/*!*****************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/base.css ***!
  \*****************************************************************************************************************************/
/* Minimal global styles layered on top of tokens.css. Deliberately NOT an
 * aggressive reset (no global box-sizing/margin reset) - this loads ahead
 * of ~2,500 lines of legacy bc_style.css/custom.css written assuming
 * default browser box-model behavior, and a broad reset would silently
 * break dozens of existing layouts. Scope resets to new Phase 3+
 * components locally instead.
 *
 * Font-face sources: Inter (UI), JetBrains Mono (code), IBM Plex Sans
 * Arabic (RTL locales) - self-hosted, subsetted to latin+arabic only via
 * Google Fonts' own per-script split (see docs/design-tokens.md).
 */

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-arabic-arabic-400.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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-arabic-latin-400.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 Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-arabic-arabic-500.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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-arabic-latin-500.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 Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-arabic-arabic-600.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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-arabic-latin-600.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 Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-arabic-arabic-700.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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-arabic-latin-700.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: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin-100-900.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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(../fonts/jetbrains-mono-latin-100-800.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;
}

/* ---- Brand faces (shared with novaluna.ai) --------------------------------
 * The marketing site and the product now share one type system:
 *   Newsreader      display serif - headlines, the empty-state hero
 *   IBM Plex Sans   UI and reading text
 *   IBM Plex Mono   labels, citation chips, figures
 * Files are copied verbatim from novaluna-website/public/fonts (SIL OFL 1.1;
 * licence texts sit beside them in fonts/). Plex Sans ships 400/500/600 there;
 * weight 700 maps to the Latin subset of IBM Plex Sans Arabic, which is the
 * same Plex Latin design, so bold text never falls back to faux-bold. */
@font-face {
  font-family: 'Newsreader';
  src: url(../fonts/newsreader-latin-wght-normal.woff2) format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url(../fonts/newsreader-latin-wght-italic.woff2) format('woff2-variations');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url(../fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url(../fonts/ibm-plex-sans-latin-400-italic.woff2) format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url(../fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url(../fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url(../fonts/ibm-plex-sans-arabic-latin-700.woff2) format('woff2');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url(../fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url(../fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched local fallbacks, measured by the website
   (scripts/measure-font-fallbacks.mjs there): text keeps its size and line
   breaks while the web fonts load, so the swap causes no layout shift. */
@font-face {
  font-family: 'Newsreader Fallback';
  src: local('Georgia');
  size-adjust: 95.85%;
  ascent-override: 77.2%;
  descent-override: 28.17%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'IBM Plex Sans Fallback';
  src: local('Arial');
  size-adjust: 100.98%;
  ascent-override: 102%;
  descent-override: 27.73%;
  line-gap-override: 0%;
}

/* Fallback metric overrides (CLS fix). While Inter/JetBrains Mono/IBM
 * Plex Sans Arabic are downloading (font-display: swap gives an
 * invisible period then swaps in), the browser was rendering with the
 * raw -apple-system/Segoe UI/Roboto/Consolas fallback at ITS OWN
 * metrics - different average glyph width, ascent and descent than the
 * real webfont - so the swap-in reflowed text and shifted layout
 * (measurable as CLS). These synthetic @font-face entries render using
 * the same local system fonts but rescaled (size-adjust) and remapped
 * (ascent/descent/line-gap-override) to match each real webfont's own
 * metrics, so the fallback period already occupies the exact box the
 * real font will end up in - the later swap becomes a pure style
 * change, not a layout change.
 *
 * ascent/descent/line-gap-override values were extracted directly from
 * each woff2 file's head/hhea/OS-2 tables (unitsPerEm, sTypoAscender/
 * Descender/LineGap) via a one-off binary parser - not estimated.
 * size-adjust was measured empirically in a real Chromium instance
 * (Canvas TextMetrics, representative sample text, avg char width
 * ratio of the loaded webfont vs the same page's actual resolved
 * fallback stack) rather than taken from a published table, since the
 * two font-loading mechanisms landed on different numbers historically
 * and only a live measurement is verifiably correct for the fonts as
 * actually served here. Measured on Windows/Chromium, where the
 * fallback stacks below resolve to Segoe UI (sans) and Consolas
 * (mono); size-adjust will be close but not pixel-identical on macOS/
 * Android, where the stacks resolve to different system fonts this
 * session couldn't measure against.
 */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Segoe UI'), local('Roboto'), local('Helvetica Neue'), local('Arial');
  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;
  ascent-override: 96.88%;
  descent-override: 24.12%;
  line-gap-override: 0%;
  size-adjust: 107.29%;
}

@font-face {
  font-family: 'IBM Plex Sans Arabic Fallback';
  src: local('Segoe UI'), local('Roboto'), local('Helvetica Neue'), local('Arial');
  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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-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;
  ascent-override: 108.5%;
  descent-override: 41.5%;
  line-gap-override: 0%;
  size-adjust: 98.63%;
}

@font-face {
  font-family: 'JetBrains Mono Fallback';
  src: local('Consolas'), local('Menlo'), local('Monaco');
  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;
  ascent-override: 102%;
  descent-override: 30%;
  line-gap-override: 0%;
  size-adjust: 109.13%;
}

/* Intended defaults. These don't win the cascade yet against the legacy
 * `body { font-family: Arial; ... }` rule in bc_style.css, which loads
 * after this file - that rule gets re-pointed to tokens in a later step.
 * This establishes what body *should* resolve to once that happens. */
body {
  background: var(--surface-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* No custom ::selection - with the near-black accent, an accent-tinted
   selection was invisible (light) or read as inverted text (dark).
   Browser-default blue selection is what ChatGPT uses too. */

/*!*********************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/bc_style.css ***!
  \*********************************************************************************************************************************/
@viewport { width: auto; }

#chartdiv {
  width: 100%;
  height: 500px;
}

body {
/*padding: 2px 4px 4px;*/
font-family: var(--font-sans);
font-size: 16px;
}

#map-container {
padding: 6px;
border-width: 1px;
border-style: solid;
border-color: #ccc #ccc #999 #ccc;
-webkit-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
-moz-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
box-shadow: rgba(64, 64, 64, 0.1) 0 2px 5px;
width: 800px;
}

#map {
width: 800px;
height: 400px;
}

#actions {
list-style: none;
padding: 0;
}

#inline-actions {
padding-top: 10px;
}

.item {
margin-left: 20px;
}


.custom-clustericon {
background: var(--cluster-color);
color: #FFF;
border-radius: 100%;
font-weight: bold;
font-size: 15px;
display: flex;
align-items: center;
}

.custom-clustericon::before, .custom-clustericon::after {
content: '';
display: block;
position: absolute;
width: 100%;
height: 100%;

transform: translate(-50%, -50%);
top: 50%;
left: 50%;
background: var(--cluster-color);
opacity: 0.2;
border-radius: 100%;
}

.custom-clustericon::before {
padding: 7px;
}

.custom-clustericon::after {
padding: 14px;
}


.custom-clustericon-1 {
--cluster-color: #fbe682;
}

.custom-clustericon-2 {
--cluster-color: #f6da63;
}

.custom-clustericon-3 {
--cluster-color: #eb8242;
}

.custom-clustericon-4 {
--cluster-color: #d97575;
}

.custom-clustericon-5 {
--cluster-color: #E76900; /* #da2d2d; */
}

.custom-clustericon-6 {
--cluster-color: #bf4a00; /* #9d0b0b; */
}





.options {
    padding: 20px;
    margin-top: 20px;
    background-color: rgba(191, 191, 191, 0.15);
}

.message-time-caption {
    font-size: 18px;
    font-weight: 500;
}

/* backward compatibility */
.caption {
    font-size: 18px;
    font-weight: 500;
}


.option {
    margin-top: 10px;
}

.option > span {
    width: 50px;
    display: inline-block;
    margin-right: 10px;
}

.option > .dx-selectbox {
    display: inline-block;
    vertical-align: middle;
}



h1 {
    display: inline-block;
    vertical-align: middle;
    padding: 10px;
    margin: 0;
}

#employee {
    margin: 20px 0;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border-top: 1px solid lightgray;
    border-bottom: 1px solid lightgray;
}

#employee > p {
    padding: 10px 20px;
    margin: 0;
}

.options {
    padding: 20px;
    background-color: rgba(191, 191, 191, 0.15);
    margin-top: 20px;
}

.message-time-caption {
    font-size: 18px;
    font-weight: 500;
}

/* backward compatibility */
.caption {
    font-size: 18px;
    font-weight: 500;
}

.option {
    margin-top: 10px;
}

.toolbar-label,
.toolbar-label > b {
    font-size: 16px;
}


#searchBox {
    font-size: 25px !important;
}

.demo3 {
    font-family: Arial, sans-serif;
    border: 0px solid #C20;
    margin: 0px 0;
    font-style: italic;
    position: relative;
    padding: 0 0 0 120px;
    /* box-shadow: 0 2px 5px -3px #000; */
    /* border-radius: 2px; */
    height: 30px;
}
.demo3:before {
    content: "News Update";
    display: inline-block;
    font-style: normal;
    background: #C20;
    padding: 2px;
    color: #FFF;
    font-weight: bold;
    position: absolute;
    top: 0;
    left: 0;
}
.demo3:after {
    content: '';
    display: block;
    top: 0;
    left: 80px;
    /* background: linear-gradient(#FFF, rgba(255, 255, 255, 0)); */
    height: 25px;
}
.demo3 ul li {
    list-style: none;
    padding: 10px 0;
}
.copyright {
    color: #FFF;
    /* font-weight: bold; */
}



.form {
    padding: 20% 0;
    text-align: center;
}

#progress-button{
    margin-bottom: 20px;
}

#progressBarStatus {
    display: inline-block;
}

.complete .dx-progressbar-range {
    background-color: green;
}


/* demo styling */
* {
  /* resetting the box model for all elements */
  box-sizing: border-box;
}

.demo-frame {
  /* making a nice frame/layout for examples */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: -1rem;
  padding: 3rem;
  min-height: 100vh;
  color: rgb(52, 58, 64);
}

.demo-example {
  /* individual demo example styling */
  max-width: 60rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

.demo-icon-list {
  list-style: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.demo-icon {
  margin: 0;
  padding: 1.5rem 1rem;
}


.dx-toolbar .dx-button-text {
    font-size: 22px;
}





/* text button */


.dx-color-scheme-light .base-color, .dx-color-scheme-carmine .base-color, .dx-color-scheme-softblue .base-color {
    fill: #333;
}

.dx-color-scheme-contrast .base-color, .dx-color-scheme-darkmoon .base-color {
    fill: #fff;
}

.dx-color-scheme-dark .base-color {
    fill: #dedede;
}

.dx-color-scheme-darkviolet .base-color {
    fill: #f5f6f7;
}

.dx-color-scheme-greenmist .base-color {
    fill: #28484f;
}



.dx-viewport:not(.dx-theme-ios7) .dx-fieldset {
    width: 520px;
    margin: 30px auto;
}

.dx-viewport:not(.dx-theme-ios7) .dx-fieldset:first-child {
    margin-top: 120px;
}

.dx-viewport:not(.dx-theme-ios7) .dx-fieldset-header {
    font-size: 16px;
}

.dx-viewport:not(.dx-theme-ios7) .dx-field {
    display: inline-block;
    margin-right: 20px;
}

.dx-viewport:not(.dx-theme-ios7) .dx-field-value:not(.dx-widget) > .dx-button {
    float: none;
}

.dx-viewport:not(.dx-theme-ios7) .dx-field-value:not(.dx-switch):not(.dx-checkbox):not(.dx-button),
.dx-viewport:not(.dx-theme-ios7) .dx-field-label {
    float: none;
    width: 100%;
}

.dx-viewport:not(.dx-theme-ios7) .dx-field-label {
    padding-left: 0;
}

.send .dx-button-content .dx-icon {
    font-size: 18px;
}



#question-textarea {
    width: 100%;
}

/* text button end*/

/* side nav start */

.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 10;
  top: 0;
  right: 0;
  background-color: #faf4f4;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

.sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.sidenav a:hover {
  color: #f1f1f1;
}

.sidenav .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

.sidenav .maximizebtn {
  position: absolute;
  top: 0;
  right: 65px;
  font-size: 36px;
  margin-left: 50px;
}


@media screen and (max-height: 450px) {
  .sidenav {padding-top: 15px;}
  .sidenav a {font-size: 18px;}
}

/* side nav end */


/* tab panel for chat - start */
.tabpanel-item {
    height: 200px;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    padding-left: 25px;
    padding-top: 55px;
}

.mobile .tabpanel-item {
    padding-top: 10px;
}

.tabpanel-item  > div {
    float: left;
    padding: 0 85px 10px 10px
}

.tabpanel-item  p {
    font-size: 16px;
    margin: 0;
}

.item-box {
    font-size: 16px;
    margin: 15px 0 45px 10px;
}

.options {
    padding: 20px;
    background-color: rgba(191, 191, 191, 0.15);
    margin-top: 20px;
}

.message-time-caption {
    font-size: 18px;
    font-weight: 500;
}

/* backward compatibility */
.caption {
    font-size: 18px;
    font-weight: 500;
}

.option {
    margin-top: 10px;
}
/* tab panel for chat - end*/


/* water mark start */
.watermarked {
  position: relative;
}

.watermarked:after {
  content: "";
  display: block;
  width: 100%;
  height: 70%;
  position: absolute;
  top: 10px;
  left: 20px;
  /*background-image: url("images/CoronaLogoWM.png");*/
  background-size: 300px 100px;
  background-position: 40px 50px;
  background-repeat: no-repeat;
  opacity: 0.7;
}
/* water mark end*/


.dx-list-item {
  border-bottom: none !important;
  border-top: none !important;
}

/* Target the dxList container when it has no items */
.dx-list-empty-container {
  width: 100%;
}

/* progress bar colors */
.progress-red::-webkit-progress-value {
  background-color: red;
}
.progress-green::-webkit-progress-value {
  background-color: green;
}
.progress-blue::-webkit-progress-value {
  background-color: blue;
}

/* Firefox support */
.progress-red::-moz-progress-bar {
  background-color: #5B2C3E;
}
.progress-green::-moz-progress-bar {
  background-color: #2C5B3E;
}
.progress-blue::-moz-progress-bar {
  background-color: #2C3E5B;
}

/* CSS for highlighting the upload file name*/
.highlight {
  background-color: #2C3E5B;  /* Or any other style for highlighting */
  border-radius: 8px;
  color: white;
}

pre code {
    text-wrap: pretty !important;
}

#pdfContainer, #textContainer, #excelContainer, #wordContainer {
    top: 10px !important;
    width: 100% !important;
    height: 100% !important;
    overflow-y: auto;
    /* border: 1px solid #ccc; */
    display: none;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    background: var(--surface-inset) !important;
    /*text-align-last: center !important;*/
}

#textContainer, #wordContainer {
    white-space: pre-wrap;
    padding: 20px;
    text-align: justify;
}

.dx-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch !important; /* Enables smooth scrolling on iOS */
}

/* Following is needed for Safari browser to scroll the dxList, dxTreeView */
.dx-scrollable-container {
    overflow-y: auto !important;  /* changing this to hidden makes scrolling on iphone a bit sticky*/
}

/* Show the scrollbar on hover */
.dx-scrollable-container:hover {
  overflow-y: auto !important;
}

div#collectionTreeView {
    background:white
}

.dx-treeview {
  min-width: 200px; /* Set your desired minimum width */
}

.popup-button {
  margin-bottom: 20px;
}

.source-popup-content {
    max-height: 80vh; /* Set a max height for the content */
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 10px; /* Optional: add some padding */
    box-sizing: border-box; /* Include padding in height calculations */
}

/****quick tips****/

.quick-tips-container {
    position: absolute;
    /* top: 60px; */
    left: -250px; /* Hidden off-screen */
    width: 250px;
    height: 100%;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.quick-tips-panel ul {
    padding-left: 1rem;
}

.quick-tips-panel li {
    margin-bottom: 5px;
}

.quick-tips-panel li:last-child {
    margin-bottom: 0;
}

.quick-tips-panel p {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 5px !important;
    margin-top: 5px !important;
}

.quick-tips-panel h3 h6 {
    margin-bottom: 5px !important;
    margin-top: 5px !important;
}

.quick-tips-button {
    position: absolute;
    top: 190px; /* Adjust as needed */
    left: 250px;
    padding: 6px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 0 0 5px 5px;
    transform: rotate(-90deg);
    transform-origin: left top;
    white-space: nowrap;
}

.quick-tips-panel {
    position: absolute;
    top: 30px;
    left: 0;
    width: 250px;
    height: 100%;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    z-index: 999;
    padding: 20px;
    display: none; /* Initially hidden */
    font-size: 12px;
    font-family: Lato, Roboto, arial, sans-serif;
    border-top-right-radius: 10px;
}

.quick-tips-panel.visible {
    display: block;
}
/*
.quick-tips-panel.hidden {
    left: -250px;
}

.quick-tips-panel.visible {
    left: 0;
}
*/

/****end of quick tips****/


/****quick tips tours****/
.prompt-chain-tour-button-style {
  position: inherit;
  top: 15px;
  /*right: 90px;*/
  font-size: 15px;
  /* margin-left: 30px; */
  padding: 0;
  color: #ffffff !important;
  opacity: 0.75;
}


.prompt-chain-tour-button-style .dx-button-content .dx-icon {
    color: #0d9be3;
}


.collection-tour-button-style {
  position: inherit;
  top: 15px;
  /*right: 90px;*/
  font-size: 15px;
  /* margin-left: 30px; */
  padding: 0;
  color: #ffffff !important;
  opacity: 0.75;
}


.collection-tour-button-style .dx-button-content .dx-icon {
    color: #0d9be3;
}



.filter-tour-button-style {
  position: inherit;
  top: 15px;
  /*right: 90px;*/
  font-size: 15px;
  /* margin-left: 30px; */
  padding: 0;
  color: #ffffff !important;
  opacity: 0.75;
}


.filter-tour-button-style .dx-button-content .dx-icon {
    color: #0d9be3;
}
/****end of quick tips tours****/


.resizable2 {
    position: relative;
}

.control-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 10px; /* Adjust as needed */
}

.control-container label {
    margin-bottom: 5px; /* Space between label and control */
    font-size: 8px; /* Adjust font size as needed */
    text-align: center; /* Center the label text */
    margin-bottom: 0px !important;
}

.top-settings-toolbar-style {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align items to the start */
}

#export-to-pdf, #export-to-word, #settings-container {
    margin-left: 10px; /* Consistent spacing between icons */
}

/* Style for the dxPopup */
.custom-popup {
    border-radius: 15px; /* Rounded corners */
}

/* Style for the title bar */
.custom-popup .dx-popup-title {
    background-color: #007bff; /* Title bar background color */
    color: white; /* Title text color */
    padding: 10px; /* Padding for the title */
    border-top-left-radius: 15px; /* Rounded corners for the top */
    border-top-right-radius: 15px; /* Rounded corners for the top */
}

/* Style for the content area */
#image-container {
    max-height: 70vh; /* Set a maximum height */
    overflow-y: auto; /* Enable vertical scrolling */
}

.fa-file-alt:before {
    cursor: pointer !important;
}

.fa-file-pdf:before {
    cursor: pointer !important;
}

.disabled {
    pointer-events: none;
    opacity: 0.5; /* Optional: to visually indicate it's disabled */
}

.message-text p {
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    margin-top: 0.1em;
    margin-bottom: 0.1em;
}

.message-text h3 {
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    margin-top: 0.1em;
    margin-bottom: 0.1em;
}

.message-text h4 {
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    margin-top: 0.1em;
    margin-bottom: 0.1em;
}

.message-text ul {
    white-space: initial !important;
    padding-top: 0.1em;
    padding-bottom: 0.1em;
    margin-top: 0.1em;
    margin-bottom: 0.1em;
}

.message-text ol {
    white-space: initial !important;
    padding-top: 0.1em;
    padding-bottom: 0.1em;
    margin-top: 0.1em;
    margin-bottom: 0.1em;
}

/* topic list sizing */
#treeview {
  font-size: 13px;
}

#treeview .dx-treeview-item-with-checkbox .dx-treeview-item {
  padding-left: 26px !important;
}

#treeview .dx-treeview-item {
    line-height: 16px;
}

#treeview .dx-treeview-item-with-checkbox .dx-checkbox {
    top: 5.5px;
    left: 23px;
}

#treeview .dx-treeview-item {
    line-height: 16px;
    min-height: 20px;
    padding: 6px;
    text-wrap: nowrap;
}

/* topic list sizing */

/* title bar button and other size */

.novaluna-title {
    height:50px;
    padding: 9px;
 }

.dx-list-item-content {
    font-size: 13px;
    padding: 5px 6px 4px;
}

/*** blurring the chatMessageList didnt work ***/
.blurred-div {
    filter: blur(1px);
    transition: filter 0.5s ease;
}


/***** this is new loading image with 3 jumping dots  *****/
        .loading-dots {
            position: fixed;
            top: 50%;
            left: 59%;
            transform: translate(-50%, -50%);
            display: flex;
            gap: 5px;
            z-index: 1000;
            pointer-events: none; /* Allows clicks to pass through */
        }

        .dot {
            width: 10px;
            height: 10px;
            background-color: var(--neutral-400, #B4B4B4);
            border-radius: 50%;
            animation: jump 0.6s infinite alternate;
        }

        .dot:nth-child(2) {
            animation-delay: 0.2s;
        }

        .dot:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes jump {
            from {
                transform: translateY(0);
            }
            to {
                transform: translateY(-10px);
            }
        }
/***** this is new loading image with 3 jumping dots  *****/



/*** Bilal Styles ***/
/*
    .chat-body-container {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-content: space-around;
      height: calc(100vh - 60px);
      border: 3px solid red;
    }

    .input-container {
      padding: 20px;
    }

    .right-side-chatboard-area {
      padding: 20px !important;
    }

    div#chatListParent {
      display: flex;
      flex: 1;
      overflow-y: hidden;
      position: relative;
    }


    div#chatMessageList {
      overflow: visible !important;
      overflow-x: hidden !important;  
      padding-top: 60px;
    }

    .dx-list-search {
      position: absolute;
      top: 0px;
      width: 100%;
    }


    .right-side-chatboard-area {
      position: relative;
    }

    .top-settings-toolbar-style {
      position: absolute;
      top: -10px;
      width: 100%;
      left: 0px;
      padding: 0px 20px;
    }
*/

div#chatListParent {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;  /* Prevent horizontal scroll */
    position: relative;
}
/*** end of Bilal Styles ***/



/* Mobile layout */
@media (max-width: 785px) {
    .horizontal-scrollable-div {
        width: 300px;
        height: 100%;
        overflow-x: auto;
        white-space: nowrap;
        border: 1px solid #ccc;
    }

    .question-description {
        display: none;
    }

    #question-textarea {
        height: 90px;
    }

}

/* Small Height Screen */
@media (max-height: 700px) {
    .question-description {
        display: none;
    }

    #question-textarea {
        height: 40px;
    }

}


/* Desktop layout */
@media (min-width: 786px) {

    .horizontal-scrollable-div {
        width: 700px;
        height: 100%;
        overflow-x: auto;
        white-space: nowrap;
        border: 1px solid #ccc;
    }

    .question-description {
        display: block;
    }

    #question-textarea {
        height: 70px;
    }
}

/* Large Height Screen */
@media (min-height: 700px) {
    .question-description {
        display: block;
    }

    #question-textarea {
        height: 70px;
    }

}

.record-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    position: absolute;
    left: -60px;
    top: 20px;
}

.record-button.recording {
    background-color: #ff4d4d; /* Change color when recording */
}

.icon-microphone {
    font-size: 24px;
    color: #333;
}

.chat-inputs-container {
    z-index:1;
}

.language-dropdown-style {
    font-size: 13px;
    opacity: .85;
    position: absolute;
    top: 13px;
    width: 80px;
    display: flex;
    align-items: baseline;
    color: white;
}



.dx-overlay-wrapper {
	z-index: 9999!important;
}

:dir(rtl) .question-tool-strip-style {
  right: 113px;
}

:dir(ltr) .question-tool-strip-style {
  left: -113px;
}

.question-toolbar-style {
    text-align: -webkit-center;
}

/* only if canvas is a child of a div with id pdfContainer */
canvas {
    position: absolute;
    background: transparent;
    top: 120px;
}

#pdfContainer canvas {
    /* Your styles here */
    position: sticky;
}



/*** download button style  ***/
.download-button-style {
  position: absolute;
  top: 10px;
  right: 140px;
  font-size: 18px;
  opacity: 0.75;
  background: #212e45;
}

.download-button-style .dx-button-content .dx-icon {
    color: rgb(5 166 240);
}


.grid-title {
    padding-bottom: 10px;
}


/* Mobile layout */
@media (max-width: 785px) {
    .language-dropdown-style {
        right: 28px;
    }

    .mode-toggle-button-style {
        left: 55px;
    }

    .grid-content {
        gap: 2px;
    }

    .question-title {
        font-size: 11px;
        font-weight: 900;
        padding-left: 2px;
    }
    .question-button {
        font-size: 16px;
        padding: 10px;
    }
    canvas {
        right: 20px;
    }

    .grid-title {
        font-size: smaller;
    }

    .message-novaluna-bot, .message-user {
        overflow: unset;
    }

}

/* Desktop layout */
@media (min-width: 786px) {
    .language-dropdown-style {
        left: 100px;
    }
    .mode-toggle-button-style {
        right: 240px;
    }
    .grid-content {
        gap: 10px;
    }
    .question-title {
        font-size: 14px;
        font-weight: 700;
        padding-left: 5px;
    }
    .question-button {
        font-size: 16px;
        padding: 10px;
    }

    canvas {
        right: 0px;
    }

    .message-novaluna-bot, .message-user {
        overflow: auto;
    }

    #treeview-sources-container{
        left: 45%;
    }

    .message-text {
        margin-left: 10px;
        white-space: normal; /* pre-line */
        overflow-x: hidden;  /* Prevent horizontal scroll */
        word-wrap: break-word;  /* Ensure long words wrap */
        max-width: 100%;  /* Ensure it doesn't exceed container width */
    }
}


/* Thinking styles while writing message text */
/* CSS for the thinking state */
.message-reasoning-text{
    color: #888; /* Lighter color for thinking text */
    font-style: italic; /* Optional: make text italic */
    white-space: pre-wrap;
    margin-top: 0.5em;
    margin-left: 55px;
    /* display: none; */ /* Initially hide the content */
}

.collapsible-reasoning-button {
    background-color: transparent;
    border: none;
    color: #007BFF;
    cursor: pointer;
    font-size: 1em;
    margin-left: 55px;
    text-align: left;
    display: none;
}

.collapsible-reasoning-button:focus {
    outline: none;
}

.collapsible-reasoning-container {
    margin-top: 1em;
}

.thinking {
    color: #888; /* Lighter color for thinking text */
    font-style: italic; /* Optional: make text italic */
    position: relative; /* For positioning the icon */
}

.thinking::before {
    content: '🤔'; /* Thinking emoji/icon */
    /* position: absolute; */
    left: -20px; /* Adjust as needed */
    top: 0;
}

/* CSS for the writing state */
.writing {
    position: relative; /* For positioning the icon */
}

.writing-marker {
    display: inline-block;
    position: relative;
}

.writing-marker::after {
    content: '✍️'; /* Pen icon */
    display: inline-block;
    margin-left: 4px;
    animation: blink 1s step-start infinite; /* Optional: blinking effect */
    vertical-align: middle;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}
/*  end thinking styles */

.model-button-group-style .dx-button-has-text .dx-button-content .dx-button-text {
    text-transform: none !important;
}


.message-novaluna-bot, .message-user {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    overflow-x: hidden;  /* Prevent horizontal scroll */
    max-width: 100%;  /* Ensure it doesn't exceed container width */
}
.message-novaluna-bot .message-text {
    margin-left: 3em;
    margin-top: 2.5em;
    overflow-x: hidden;  /* Prevent horizontal scroll */
    word-wrap: break-word;  /* Ensure long words wrap */
    max-width: 100%;  /* Ensure it doesn't exceed container width */
}

/* Width owned by settings.css (compact card). Legacy 600px caused
   horizontal scrollbars inside the model picker. */
div#dropdown-content {
    width: auto;
}

.right-side-chatboard-area {
  padding: 1px 1px;
  height: calc(100% - 1px);
  /*overflow-x: hidden;*/  /* Prevent horizontal scroll */
  max-width: 100%;  /* Ensure it doesn't exceed container width */
}

/****** toolbar sliding ******/

/* Already existing styles (same as above) */

/* Already existing styles (same as above) */

.top-settings-toolbar-style {
  position: absolute; /* relative to parent container */
  top: 0;
  left: 0;
  right: 0;
  padding-left: 10%;
  padding-right: 10%;
  z-index: 10;
  /* background-color: white; */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: top 0.4s ease;
  animation: bounceInDown 0.4s ease;
  opacity: 1;
}

.hidden { opacity: 0; transition: top 0.4s ease, opacity 0.4s ease; }

/* Hidden state is owned by shell.css (full slide-away + clip).
   Keep this rule inert so a partial top:-60px peek can't resurface. */
.top-settings-toolbar-style.hidden {
  top: 0;
}

.toolbar-pin-button {
  position: absolute;
  right: 10px;
  top: 7px;
  background: #eee;
  padding: 3px 5px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: darkgrey;
}

.toolbar-pin-button:hover {
  background: #ddd;
}

#pin-toast {
  position: fixed;
  top: 70px;
  right: 20px;
  background: #444;
  color: white;
  padding: 8px 14px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

#pin-toast.show {
  opacity: 1;
}

#hover-zone {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  z-index: 5;
}


/****** toolbar sliding ******/

/* Container positioning */
.nova-log-status-container {
  display: flex;
  justify-content: flex-start;   /* left align horizontally */
  margin: 8px 0;             /* spacing above/below */
  position: relative;
  top: 5px;                  /* shift slightly down from logo */
  left: 70px;
}

/* "Thinking ..." text styling */
.message-nova-log-style {
  font-style: italic;
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
}

/* Add blinking dots animation */
/* Default: no dots */
.message-nova-log-style::after {
  content: '';   /* nothing by default */
}

/* When blinking is active */
.message-nova-log-style.blink::after {
  content: '...';
  animation: blink 1.5s infinite steps(1, start);
}

@keyframes blink {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}

/*
.message-nova-log-style.no-blink::after {
  animation: none !important;    stop blinking
  opacity: 1;                    keep dots visible
  content: '...';                optional: keep the dots
}
*/


/* ============================================
   MODERN UI: SHARED ANIMATIONS & UTILITIES
   ============================================ */

/* Slide-in animation for messages */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Smooth hover lift effect */
@keyframes lift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-2px);
  }
}

/* Utility classes for modern interactions */
.modern-card {
  transition: all 0.3s ease;
}

.modern-card:hover {
  transform: translateY(-2px);
}



/* ============================================
   MODERN UI: SCROLLBAR STYLING
   ============================================ */

/* Modern scrollbar for WebKit browsers */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-secondary, #f6f6f6);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--color-accent-primary, #05a6f0) 0%, var(--color-accent-secondary, #81bc06) 100%);
  border-radius: 8px;
  border: 2px solid var(--color-bg-secondary, #f6f6f6);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--color-accent-secondary, #81bc06) 0%, var(--color-accent-primary, #05a6f0) 100%);
}

/* Modern scrollbar for Firefox */
* {
  scrollbar-color: var(--color-accent-primary, #05a6f0) var(--color-bg-secondary, #f6f6f6);
  scrollbar-width: thin;
}

/* ============================================
   COMMON UTILITIES (Theme-agnostic)
   ============================================ */
/* Note: All theme-specific styling is in toggle_mode/styles_dark_grey.css and styles_day.css */
/* This file should only contain shared utilities that work for both themes */

#customTopicTreeSearch {
    margin-bottom: 10px; margin-top: 10px; border-width: 1px; width: 100%; display:none;
}
/*!******************************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/subscription_page.css ***!
  \******************************************************************************************************************************************/
/*
#subscription-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.subscription-container {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow-y: auto;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #333;
}

.subscription-comparison table {
  margin: 20px auto;
  border-collapse: collapse;
  width: 100%;
}

.subscription-comparison th, .subscription-comparison td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

.subscription-comparison th {
  background-color: #2c3e5b;
  color: white;
}

.subscription-comparison td button {
  background-color: #2c3e5b;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.subscription-comparison td button:hover {
  background-color: #05a6f0;
}

*/

.upgrade-button-style {
  position: absolute;
  top: 10px;
  right: 90px;
  font-size: 18px;
  opacity: 0.75;
  background: transparent;
}

.upgrade-button-style .dx-button-content .dx-icon {
    color: var(--accent);
}

.upgrade-plan-header-style {
    font-weight: 650;
    font-size: var(--text-3xl);
    letter-spacing: -0.02em;
    background-color: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.25;
}

/**purchase cancel**/
.success-message {
    color: green;
    font-size: 24px;
}
.cancel-message {
    color: red;
    font-size: 24px;
}
.details {
    margin-top: 20px;
    font-size: 18px;
}

/**** subscription overlay (Phase 4.3) ****/

        .subscription-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgb(0 0 0 / 55%);
            justify-content: center;
            align-items: center;
            z-index: 9999;
            overflow-y: auto;
            font-family: var(--font-sans);
            margin: 0;
            padding: var(--space-4);
        }
        .subscription-modal[style*="flex"] {
            animation: modal-backdrop-in var(--dur-med) var(--ease-out);
        }
        .subscription-modal-content {
            background-color: var(--surface-card);
            color: var(--text-primary);
            padding: var(--space-6);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-lg);
            max-width: 1200px;
            position: relative;
			width: 90%;
			height: 90%;
			overflow-y: auto;
			animation: modal-content-in var(--dur-med) var(--ease-out);
        }
        @keyframes modal-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
        @keyframes modal-content-in {
            from { opacity: 0; transform: translateY(8px) scale(0.98); }
            to   { opacity: 1; transform: translateY(0) scale(1); }
        }
        .close {
            position: absolute;
            top: var(--space-3);
            right: var(--space-3);
            width: 32px;
            height: 32px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: var(--radius-full);
            font-size: 20px;
            color: var(--text-muted);
            cursor: pointer;
            transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
        }
        .close:hover {
            background: var(--surface-inset);
            color: var(--text-primary);
        }
        .header {
            text-align: center;
            margin-bottom: var(--space-5);
        }
        .subscription-tabs {
            display: flex;
            justify-content: center;
            gap: var(--space-2);
            margin-bottom: var(--space-5);
            font-size: var(--text-sm);
        }
        .subscription-tab {
            padding: var(--space-2) var(--space-5);
            cursor: pointer;
            border-radius: var(--radius-full);
            border: 1px solid var(--border-subtle);
            background-color: var(--surface-card);
            color: var(--text-secondary);
            min-width: 100px;
            text-align: center;
            font-weight: 600;
            transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
        }
        .subscription-tab.active {
            background-color: var(--accent);
            border-color: var(--accent);
            color: var(--text-on-accent);
        }
        .plans {
            display: flex;
            justify-content: space-evenly;
            flex-wrap: nowrap;
            gap: var(--space-4);
        }
        .plan {
            background-color: var(--surface-card);
            border: 1px solid var(--border-subtle);
            border-radius: var(--radius-lg);
            padding: var(--space-5);
            width: 25%;
            margin-bottom: var(--space-4);
            position: relative;
            font-weight: 500;
            font-size: var(--text-sm);
            color: var(--text-secondary);
        }
        .plan.popular {
            border: 2px solid var(--accent);
            box-shadow: var(--shadow-md);
        }
        .plan h3 {
            margin-top: 0;
            color: var(--text-primary);
        }
        .plan .price {
            font-size: var(--text-2xl);
            margin: var(--space-2) 0;
            color: var(--text-primary);
        }
        .plan .features {
            list-style: none;
            padding: 0;
        }
        .plan .features li {
            margin: var(--space-1) 0;
        }
        .plan .features li::before {
            content: '✓';
            margin-right: var(--space-1);
            color: var(--status-success);
        }
        .plan.popular button {
            width: 100%;
            padding: var(--space-2);
            border: none;
            border-radius: var(--radius-md);
            cursor: pointer;
            background-color: var(--accent);
            color: var(--text-on-accent);
            font-weight: 600;
			margin-top: var(--space-4);
			transition: background-color var(--dur-fast) var(--ease-out);
        }
        .plan.popular button:hover { background-color: var(--accent-hover); }
        .plan button {
            width: 100%;
            padding: var(--space-2);
            border: 1px solid var(--border-strong);
            border-radius: var(--radius-md);
            cursor: pointer;
            background-color: var(--surface-card);
            color: var(--text-primary);
            font-weight: 600;
			margin-top: var(--space-4);
			transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
        }
        .plan button:hover { border-color: var(--accent); background-color: var(--accent-subtle); }
        .plan button.disabled {
            background-color: var(--surface-inset);
            border-color: var(--border-subtle);
            color: var(--text-muted);
            cursor: not-allowed;
        }
        .plan button.disabled:hover { background-color: var(--surface-inset); }
        .plan-title {
            font-weight: 700;
        }
        @media (max-width: 768px) {
            .plans {
                flex-wrap: wrap;
            }
            .plan {
                width: 100%;
            }
        }

		.dollar-sign {
			color: var(--text-muted);
			font-size: var(--text-sm);
		}

		.price-per-month {
			color: var(--text-muted);
			font-size: var(--text-xs);
		}

		.dollar-amount {
			font-size: var(--text-lg);
			padding-left: var(--space-1);
			padding-right: var(--space-1);
			color: var(--text-primary);
		}

		.dollar-amount-strike-through {
			font-size: var(--text-lg);
			padding-left: var(--space-1);
			padding-right: var(--space-1);
			text-decoration: line-through;
			color: var(--text-muted);
		}

        /* ---------- Dark theme ---------- */

        [data-theme="dark"] .subscription-modal-content {
            background-color: var(--surface-app);
        }

        [data-theme="dark"] .subscription-tab {
            background-color: var(--surface-raised);
            border-color: var(--border-strong);
            color: var(--text-secondary);
        }

        [data-theme="dark"] .plan {
            background-color: var(--surface-raised);
            border-color: var(--border-strong);
            color: var(--text-secondary);
        }

        [data-theme="dark"] .plan h3,
        [data-theme="dark"] .plan .price {
            color: var(--text-primary);
        }

        [data-theme="dark"] .plan button {
            background-color: var(--surface-raised);
            border-color: #4B4B4B;
            color: var(--text-primary);
        }

        [data-theme="dark"] .plan button.disabled {
            background-color: var(--surface-app);
            color: var(--text-muted);
        }

        [data-theme="dark"] .upgrade-plan-header-style {
            color: #F3F3F3;
        }

        [data-theme="dark"] .dollar-amount {
            color: var(--text-primary);
        }

        [data-theme="dark"] .close {
            color: var(--text-secondary);
        }

        [data-theme="dark"] .close:hover {
            background: var(--surface-raised);
            color: var(--text-primary);
        }

/*!*******************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/custom.css ***!
  \*******************************************************************************************************************************/
/* ==========================================================================
   Semantic Query Engine – UI Styles
   ========================================================================== */

/* ---- Toggle Button in Toolbar ---- */
.sq-toggle-button-style {
  display: inline-block;
  cursor: pointer;
  margin-right: 6px;
}

/* ---- Panel Layout ---- */
.sq-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  max-height: 100%;
  min-height: 0;
  background: #fafbfc;
  overflow: hidden;
}

/* ---- Header ---- */
.sq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e4e8ee;
  flex-shrink: 0;
  gap: 8px;
}

.sq-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sq-header-left i {
  color: #1976d2;
  font-size: 16px;
}

.sq-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
}

.sq-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* ---- Connection Selector ---- */
.sq-connection-select {
  font-size: 13px;
  padding: 5px 28px 5px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%276%27%3E%3Cpath d=%27M0 0l5 6 5-6z%27 fill=%27%23667085%27/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  color: #344054;
  max-width: 200px;
  cursor: pointer;
  transition: border-color .15s;
}

.sq-connection-select:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 2px rgba(25,118,210,.12);
}

/* ---- Status Badge ---- */
.sq-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.sq-status-badge.ready {
  background: #e8f5e9;
  color: #2e7d32;
}

.sq-status-badge.stale {
  background: #fff8e1;
  color: #f57f17;
}

.sq-status-badge.analyzing {
  background: #e3f2fd;
  color: #1565c0;
}

.sq-status-badge.error {
  background: #fce4ec;
  color: #c62828;
}

/* ---- Buttons ---- */
.sq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 10px;
  transition: background .15s, opacity .15s;
}

.sq-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.sq-btn-primary {
  background: #1976d2;
  color: #fff;
}

.sq-btn-primary:hover:not(:disabled) {
  background: #1565c0;
}

.sq-btn-secondary {
  background: #f0f4f8;
  color: #344054;
}

.sq-btn-secondary:hover:not(:disabled) {
  background: #e2e8f0;
}

.sq-btn-close {
  background: transparent;
  color: #667085;
  padding: 6px 8px;
}

.sq-btn-close:hover {
  color: #344054;
  background: #f0f0f0;
}

.sq-btn-icon {
  background: transparent;
  color: #667085;
  padding: 4px 6px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.sq-btn-icon:hover {
  color: #1976d2;
  background: #e3f2fd;
}

/* ---- Status Area (analyzing) ---- */
.sq-status-area {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 20px;
}

.sq-status-content {
  text-align: center;
  max-width: 320px;
}

.sq-status-content p {
  color: #667085;
  font-size: 14px;
  margin-top: 16px;
  line-height: 1.5;
}

/* ---- Spinner ---- */
.sq-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e3f2fd;
  border-top-color: #1976d2;
  border-radius: 50%;
  animation: sq-spin .8s linear infinite;
  margin: 0 auto;
}

@keyframes sq-spin {
  to { transform: rotate(360deg); }
}

/* ---- Error Area ---- */
.sq-error-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 20px;
  text-align: center;
}

.sq-error-area > i {
  font-size: 32px;
  color: #ef5350;
  margin-bottom: 12px;
}

.sq-error-area p {
  color: #667085;
  font-size: 14px;
  margin-bottom: 16px;
  max-width: 300px;
  line-height: 1.5;
}

/* ---- Results / Conversation Area ---- */
.sq-results-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  scroll-behavior: smooth;
}

/* ---- Empty State ---- */
.sq-empty-state {
  text-align: center;
  padding: 60px 20px 20px;
}

.sq-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.sq-empty-icon i {
  font-size: 24px;
  color: #1976d2;
}

.sq-empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 6px;
}

.sq-empty-state > p {
  font-size: 13px;
  color: #667085;
  margin: 0 0 24px;
}

/* ---- Suggested Questions ---- */
.sq-suggested-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}

.sq-suggestion-chip {
  font-size: 12px;
  padding: 7px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 18px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
  line-height: 1.35;
}

.sq-suggestion-chip:hover {
  border-color: #1976d2;
  color: #1976d2;
  background: #f0f7ff;
}

/* ---- Conversation Items ---- */
.sq-conversation {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- User Message Bubble ---- */
.sq-user-msg {
  align-self: flex-end;
  background: #1976d2;
  color: #fff;
  padding: 10px 16px;
  border-radius: 16px 16px 4px 16px;
  font-size: 14px;
  max-width: 85%;
  word-wrap: break-word;
  line-height: 1.4;
}

/* ---- Result Card ---- */
.sq-result-card {
  background: #ffffff;
  border: 1px solid #e4e8ee;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  max-width: 100%;
}

.sq-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.sq-result-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sq-result-header-left i {
  color: #1976d2;
  font-size: 14px;
  flex-shrink: 0;
}

.sq-result-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sq-result-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ---- Data Table ---- */
.sq-table-wrapper {
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

.sq-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sq-data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.sq-data-table th {
  background: #f8f9fb;
  color: #344054;
  font-weight: 600;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 2px solid #e4e8ee;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background .1s;
}

.sq-data-table th:hover {
  background: #eef1f6;
}

.sq-data-table th.numeric {
  text-align: right;
}

.sq-data-table th .sq-sort-icon {
  margin-left: 4px;
  font-size: 10px;
  color: #98a2b3;
}

.sq-data-table th.sorted .sq-sort-icon {
  color: #1976d2;
}

.sq-data-table td {
  padding: 8px 14px;
  border-bottom: 1px solid #f0f2f5;
  color: #344054;
}

.sq-data-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sq-data-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.sq-data-table tbody tr:hover {
  background: #f0f7ff;
}

/* ---- Transparency Bar ---- */
.sq-transparency-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 10px 16px;
  border-top: 1px solid #f0f0f0;
  background: #f8f9fb;
  font-size: 12px;
  color: #667085;
}

.sq-transparency-bar .sq-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sq-transparency-bar .sq-tag-label {
  color: #98a2b3;
}

.sq-transparency-bar .sq-tag-value {
  color: #344054;
  font-weight: 500;
}

.sq-transparency-bar .sq-spacer {
  flex: 1;
}

.sq-row-info {
  font-size: 11px;
  color: #98a2b3;
  padding: 4px 16px 8px;
}

/* ---- SQL Drawer ---- */
.sq-sql-drawer {
  border-top: 1px solid #f0f0f0;
  background: #f8f9fb;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}

.sq-sql-drawer.open {
  max-height: 400px;
}

.sq-sql-drawer-inner {
  padding: 12px 16px;
}

.sq-sql-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sq-sql-drawer-header span {
  font-size: 12px;
  font-weight: 600;
  color: #344054;
}

.sq-sql-code {
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 12px 14px;
  border-radius: 8px;
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.sq-sql-params {
  margin-top: 8px;
  font-size: 11px;
  color: #667085;
}

.sq-sql-params strong {
  color: #344054;
}

/* ---- Clarification Card ---- */
.sq-clarification-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 16px;
}

.sq-clarification-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.sq-clarification-header i {
  color: #d97706;
  font-size: 16px;
}

.sq-clarification-header span {
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
}

.sq-clarification-text {
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
  margin-bottom: 12px;
}

.sq-clarification-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sq-clarification-chip {
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid #fbbf24;
  border-radius: 16px;
  background: #fff;
  color: #92400e;
  cursor: pointer;
  transition: all .15s;
}

.sq-clarification-chip:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

/* ---- Warning Card ---- */
.sq-warning-card {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 16px;
}

.sq-warning-card .sq-warning-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sq-warning-card .sq-warning-header i {
  color: #dc2626;
  font-size: 15px;
}

.sq-warning-card .sq-warning-header span {
  font-size: 14px;
  font-weight: 600;
  color: #991b1b;
}

.sq-warning-card .sq-warning-text {
  font-size: 13px;
  color: #7f1d1d;
  line-height: 1.5;
}

/* ---- No Results Card ---- */
.sq-no-results-card {
  text-align: center;
  padding: 24px 16px;
  background: #f8f9fb;
  border: 1px solid #e4e8ee;
  border-radius: 12px;
}

.sq-no-results-card i {
  font-size: 28px;
  color: #98a2b3;
  margin-bottom: 8px;
}

.sq-no-results-card p {
  font-size: 13px;
  color: #667085;
  margin: 0;
}

/* ---- Loading Card ---- */
.sq-loading-card {
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sq-loading-card .sq-spinner {
  width: 24px;
  height: 24px;
  border-width: 2.5px;
  flex-shrink: 0;
}

.sq-loading-card .sq-loading-text {
  font-size: 13px;
  color: #667085;
}

.sq-loading-card .sq-loading-slow {
  font-size: 12px;
  color: #98a2b3;
  margin-top: 4px;
}

/* ---- Input Area ---- */
.sq-input-area {
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid #e4e8ee;
  flex-shrink: 0;
  min-height: 56px;
}

.sq-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fb;
  border: 1px solid #d0d5dd;
  border-radius: 24px;
  padding: 4px 4px 4px 16px;
  transition: border-color .15s, box-shadow .15s;
}

.sq-input-container:focus-within {
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25,118,210,.1);
  background: #fff;
}

.sq-question-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #1a1a2e;
  outline: none;
  padding: 8px 0;
  min-width: 0;
}

.sq-question-input::placeholder {
  color: #98a2b3;
}

.sq-ask-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #1976d2;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, transform .1s;
}

.sq-ask-btn:hover:not(:disabled) {
  background: #1565c0;
  transform: scale(1.05);
}

.sq-ask-btn:disabled {
  background: #b0bec5;
  cursor: not-allowed;
  transform: none;
}

.sq-ask-btn i {
  font-size: 14px;
}

/* ---- Voice mic button ---- */
.sq-mic-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #43a047;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, transform .1s;
}
.sq-mic-btn:hover:not(:disabled) {
  background: #388e3c;
  transform: scale(1.05);
}
.sq-mic-btn:disabled {
  background: #b0bec5;
  cursor: not-allowed;
  transform: none;
}
.sq-mic-btn.recording {
  background: #e53935;
  animation: sq-mic-pulse 1s ease-in-out infinite;
}
@keyframes sq-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,57,53,.4); }
  50%       { box-shadow: 0 0 0 8px rgba(229,57,53,0); }
}
.sq-voice-status {
  font-size: 12px;
  color: #667085;
  min-height: 18px;
  padding: 2px 4px;
  font-style: italic;
}

/* ---- Stale Warning Banner ---- */
.sq-stale-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  font-size: 12px;
  color: #92400e;
  flex-shrink: 0;
}

.sq-stale-banner i {
  color: #d97706;
  font-size: 13px;
}

/* ---- Metric Explorer ---- */
.sq-metric-explorer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 90%;
  background: #fff;
  border-left: 1px solid #e4e8ee;
  box-shadow: -4px 0 16px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(100%);
  transition: transform .25s ease;
}

.sq-metric-explorer.open {
  transform: translateX(0);
}

.sq-explorer-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e4e8ee;
  flex-shrink: 0;
}

.sq-explorer-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sq-explorer-header h3 .sq-btn-close {
  font-size: 14px;
}

.sq-explorer-search {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 13px;
  color: #344054;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}

.sq-explorer-search:focus {
  border-color: #1976d2;
}

.sq-explorer-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.sq-explorer-section {
  margin-bottom: 8px;
}

.sq-explorer-section h4 {
  font-size: 11px;
  font-weight: 700;
  color: #98a2b3;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 0 16px;
  margin: 8px 0 6px;
}

.sq-explorer-list {
  display: flex;
  flex-direction: column;
}

/* ---- Metric Card (in explorer) ---- */
.sq-metric-card {
  padding: 10px 16px;
  cursor: pointer;
  transition: background .1s;
  border-bottom: 1px solid #f5f5f5;
}

.sq-metric-card:hover {
  background: #f0f7ff;
}

.sq-metric-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.sq-metric-card-desc {
  font-size: 12px;
  color: #667085;
  margin-bottom: 4px;
  line-height: 1.4;
}

.sq-metric-card-dims {
  font-size: 11px;
  color: #98a2b3;
}

.sq-metric-card-dims span {
  color: #667085;
}

/* ---- Dimension Chips (in explorer) ---- */
.sq-dim-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 16px;
}

.sq-dim-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  background: #f0f4f8;
  color: #344054;
}

/* ---- Glossary (in explorer) ---- */
.sq-glossary-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 12px;
  color: #667085;
}

.sq-glossary-term {
  font-weight: 600;
  color: #344054;
}

.sq-glossary-arrow {
  color: #98a2b3;
}

.sq-glossary-canonical {
  color: #1976d2;
}

/* ---- Copy toast ---- */
.sq-copy-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a2e;
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
}

.sq-copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .sq-header {
    flex-wrap: wrap;
    padding: 8px 12px;
  }

  .sq-connection-select {
    max-width: 100%;
    flex: 1;
  }

  .sq-metric-explorer {
    width: 100%;
    max-width: 100%;
  }

  .sq-result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .sq-result-actions {
    align-self: flex-end;
  }

  .sq-transparency-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/*!********************************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/file_uploader_style.css ***!
  \********************************************************************************************************************************************/
/* File upload (Phase 4.2): the composer's upload chip + file-name list
 * (#multiFileUploader, .file-list, .file-item) and the upload/ingest
 * progress UI that renders inside chat messages for template_id=4
 * ("progress-bar-<message_id>" / "progress-status-text-<message_id>",
 * server-templated markup - matched via attribute selectors since the
 * exact ids are generated at runtime).
 *
 * CSS-only: js/file_upload.js logic, ids and classList calls untouched.
 */

/* ---------- Upload trigger + file chip list (composer) ---------- */

#multiFileUploader.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    width: 100%;
}

.file-item {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    padding: var(--space-1) var(--space-3);
    background: var(--surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Upload / ingest progress (rendered inside chat messages) ---------- */

/* The composer's idle #progress-bar placeholder is hidden until JS shows
   it. The pre-Phase-4.2 stylesheet hid it via the base .progress-bar rule;
   the 4.2 rewrite dropped that, leaving an empty 6px track permanently
   visible under the composer disclaimer (the unexplained gray bar in
   every screenshot since). The per-message bars are #progress-bar-<id> -
   different ids, unaffected by this. */
#progress-bar {
    visibility: hidden;
    display: none;
}

progress.progress-bar,
[id^="progress-bar-"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border: none;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--surface-inset);
}

[id^="progress-bar-"]::-webkit-progress-bar { background: var(--surface-inset); }
[id^="progress-bar-"]::-webkit-progress-value {
    border-radius: var(--radius-full);
    background: var(--accent);
    transition: width var(--dur-fast) var(--ease-out);
}
[id^="progress-bar-"]::-moz-progress-bar {
    border-radius: var(--radius-full);
    background: var(--accent);
}

[id^="progress-bar-"].green::-webkit-progress-value { background: var(--status-success); }
[id^="progress-bar-"].green::-moz-progress-bar { background: var(--status-success); }
[id^="progress-bar-"].blue::-webkit-progress-value { background: var(--accent); }
[id^="progress-bar-"].blue::-moz-progress-bar { background: var(--accent); }

[id^="progress-status-text-"] {
    display: block;
    margin-block-start: var(--space-1);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

[id^="progress-status-text-"] ul,
[id^="progress-status-text-"] li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Overrides the generic navy `.highlight` box (bc_style.css) - here it
   just marks the file currently being processed, not a filled chip. */
[id^="progress-status-text-"] li.highlight {
    background: transparent;
    border-radius: 0;
    color: var(--accent);
    font-weight: 600;
}

/* Drag-over state on the upload trigger (file_upload_script.js toggles
   `.highlight` on dragenter/dragleave) - same class, different context. */
.drop-container.highlight {
    background-color: var(--accent-subtle);
    border-radius: var(--radius-full);
    color: var(--accent);
}

/* ---------- Dark theme ---------- */

[data-theme="dark"] .file-item {
    background: var(--surface-app);
    border-color: var(--border-strong);
    color: var(--text-secondary);
}

[data-theme="dark"] [id^="progress-bar-"],
[data-theme="dark"] [id^="progress-bar-"]::-webkit-progress-bar {
    background: var(--border-strong);
}

[data-theme="dark"] [id^="progress-status-text-"] {
    color: var(--text-muted);
}

/*!******************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/prism.css ***!
  \******************************************************************************************************************************/
/* PrismJS 1.29.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+c+cpp+csv+diff+docker+fsharp+go+http+java+json+markup-templating+matlab+mongodb+objectivec+perl+plsql+python+r+sql+swift+typescript+wolfram+yaml&plugins=line-numbers+command-line+unescaped-markup+toolbar+copy-to-clipboard+download-button+match-braces+diff-highlight */
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}
pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}
.command-line-prompt{border-right:1px solid #999;display:block;float:left;font-size:100%;letter-spacing:-1px;margin-right:1em;pointer-events:none;text-align:right;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.command-line-prompt>span:before{opacity:.7;content:' ';display:block;padding-right:.8em}.command-line-prompt>span[data-user]:before{content:"[" attr(data-user) "@" attr(data-host) "] $"}.command-line-prompt>span[data-user=root]:before{content:"[" attr(data-user) "@" attr(data-host) "] #"}.command-line-prompt>span[data-prompt]:before{content:attr(data-prompt)}.command-line-prompt>span[data-continuation-prompt]:before{content:attr(data-continuation-prompt)}.command-line span.token.output{opacity:.7}
[class*=lang-] script[type='text/plain'],[class*=language-] script[type='text/plain'],script[type='text/plain'][class*=lang-],script[type='text/plain'][class*=language-]{display:block;font:100% Consolas,Monaco,monospace;white-space:pre;overflow:auto}
div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;z-index:10;top:.3em;right:.2em;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);border-radius:.5em}div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{color:inherit;text-decoration:none}
.token.punctuation.brace-hover,.token.punctuation.brace-selected{outline:solid 1px}.rainbow-braces .token.punctuation.brace-level-1,.rainbow-braces .token.punctuation.brace-level-5,.rainbow-braces .token.punctuation.brace-level-9{color:#e50;opacity:1}.rainbow-braces .token.punctuation.brace-level-10,.rainbow-braces .token.punctuation.brace-level-2,.rainbow-braces .token.punctuation.brace-level-6{color:#0b3;opacity:1}.rainbow-braces .token.punctuation.brace-level-11,.rainbow-braces .token.punctuation.brace-level-3,.rainbow-braces .token.punctuation.brace-level-7{color:#26f;opacity:1}.rainbow-braces .token.punctuation.brace-level-12,.rainbow-braces .token.punctuation.brace-level-4,.rainbow-braces .token.punctuation.brace-level-8{color:#e0e;opacity:1}
pre.diff-highlight>code .token.deleted:not(.prefix),pre>code.diff-highlight .token.deleted:not(.prefix){background-color:rgba(255,0,0,.1);color:inherit;display:block}pre.diff-highlight>code .token.inserted:not(.prefix),pre>code.diff-highlight .token.inserted:not(.prefix){background-color:rgba(0,255,128,.1);color:inherit;display:block}

/*!************************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/prompt_menu.css ***!
  \************************************************************************************************************************************/
/* Prompt menu checkbox styling */
.icon-menu-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.icon-menu-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.prompt-checkbox {
    margin-right: 4px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.icon-menu-button .icon {
    flex-shrink: 0;
}

.icon-menu-button > div:not(.prompt-checkbox):not(.icon) {
    flex: 1;
}

/*!**********************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/app-shell.css ***!
  \**********************************************************************************************************************************/
/* Structural app shell CSS - the single, token-driven replacement for the
 * previous styles_day.css / styles_dark_grey.css fork (~80% identical
 * full-file forks toggled via <link> swapping). This is the light-theme
 * (day) structural content verbatim; dark-specific value overrides live
 * in the [data-theme="dark"] block at the end of this file, derived by
 * a selector-aware diff against the retired dark fork (not a naive line
 * diff - see the collapse method in the Phase 2.3 commit).
 *
 * The two files each had a :root block (dead custom-property scaffolding,
 * zero actual var() consumers in either file - confirmed by search) that
 * was dropped entirely rather than carried forward. Three of those unused
 * names (--color-accent-primary/-secondary, --color-bg-secondary) were
 * also declared there with different literal values than the bridge
 * aliases for the same names in tokens.css; since this file loaded after
 * tokens.css, its declarations were silently winning the cascade, meaning
 * the Phase 2.1 bridge was never actually taking effect for the
 * bc_style.css scrollbar styling. Dropping them here fixes that. */

body, html {padding:0;margin:0;background:#ffffff;height:100%;}
.wrap {
    width: 100%;
    float:left;
    overflow:hidden;
    height:100%;
}

.resizable {
    width: 18%;   /*this controls the width of the left pane of splitter*/
    height:100%;
    padding: 0;
    display: block;
    float:left;
    color:#000;
    position:relative;

}

.resizable1 {
    float:left;
    background-color: #f6f6f6; /* #1D1320; */
    z-index: 9999;

}



.resizable2 {
    background-color: #eaeaea;
    float:right;
    background-color: #fff; /* #222f44; #355;*/
    /* width:82%;  this should = 100 - .resizable.width*/
}

.resizable .inner { 
  padding-left: 0px; 
  overflow:hidden;
  overflow-y:auto; 
  height:100%;
  top:0;
  left:0;
  -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;

  overflow: hidden; /* Hide the scrollbar but allow scrolling */
}

/* Add a pseudo-element to create a scrollbar with no width */
.resizable .inner::-webkit-scrollbar {
  width: 0.1em;
}

/* Style the scrollbar track */
.resizable .inner::-webkit-scrollbar-track {
  background: transparent;
}


.resizable1 .inner {
  margin-right:7px;
  max-width: 100%;  /*350px*/
  width: 100%;
  padding: 20px 15px 10px 15px;
}
.chatbox-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 50px) !important;
    justify-content: space-between;
}
.ui-resizable-e {
    cursor: e-resize;
    display:block !important;
    width: 5px !important;
    right: 0px !important;
    top: 0;
    bottom: 0;
    background: #e6e6e6;
}

/* tree_view */

#treeview {
  /* height: 300px; */
  color: white;
  /* background-color: #996633; */
  font-family: 'Roboto','sands-serif';
}

/* Assuming "dxTreeView" is the class applied to the treeview */
.dxTreeView .dx-treeview-node:hover {
  background-color: #1f2c41;
  border-radius: 5px; /* Add rounded corners */
  color: red !important;
}
#treeview  .dx-texteditor-input-container {
    background: #ffffff22;
    border-bottom: 2px solid #ffffff55;
}
#treeview .dx-texteditor-input-container .dx-icon:before {
    color: #ffffffcc !important;
    margin-left: -10px;
}

#treeview .dx-texteditor-container {
    padding: 15px 0px;
}
#treeview .dx-treeview-node {
    color: #636363 !important;
    padding: 0px;
    margin-top: 0px;
    margin-bottom: 2px;
}
#treeview .dx-treeview-node:hover,
#treeview .dx-state-hover {
    color: #fff !important;
}

#treeview .dx-treeview-node:hover, #treeview .dx-state-hover {
    color: #fff !important;
}


div#button-newtopic.dx-state-hover {
    background: #1e2a3e !important;
}
/* Assuming "dxTreeView" is the class applied to the treeview */
.dxTreeView .dx-state-selected {
    /*background-color: #141c29;*/
    color: white;
}

.dx-datagrid-borders > .dx-datagrid-headers {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}
.dx-datagrid-borders > .dx-datagrid-total-footer,
.dx-datagrid-borders > .dx-datagrid-rowsview {
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

.dx-button-mode-contained.dx-button-danger {
    background-color: #3d70c100;
    color: #FFFFFF55 !important;
}


/* ****  Collections tree styles   ***   */
#treeBox {
  position: absolute;
  color: white;
  /*background-color: #5c95c5;*/
  font-family: 'Roboto','sands-serif';
  font-size: 17px;
  border-radius: 8px;
  /*width: 300px;
  right: 0;*/
  width: 250px;
  z-index: 100;
  left: 12%;
}

#treeview-sources-container {
    /*display: grid;*/
    position: inline-block;
    /*right: 0;*/
    margin-left: 4px;
    border-radius: 8px;
    z-index: 100;
}

.treeview-container {
    display: flex;
}

/* Assuming "dxTreeView" is the class applied to the treeview */
.collections-view .dx-treeview-node:hover {
  background-color: #336699;
  border-radius: 5px; /* Add rounded corners */
  color: red !important;
}

/* Assuming "dxTreeView" is the class applied to the treeview */
.collections-view .dx-state-selected {
  background-color: green; /* Change to the desired background color */
  color: white; /* Change the text color for better contrast */
}
/* ****  Collections tree styles   ***   */





.options {
  padding: 20px;
  position: absolute;
  bottom: 0;
  right: 0;
  width: 260px;
  top: 0;
  background-color: #f5f5f5;
}

.message-time-caption {
  font-size: 18px;
  font-weight: 500;
  font-family: 'Roboto',sans-serif;
  color:rgb(68, 68, 68);
  background-color:#141C29; /* #281A2D; */
  background-color: #fff;/* #222f44    #244; */
}

/* backward compatibility */
.caption {
  font-size: 18px;
  font-weight: 500;
  font-family: 'Roboto',sans-serif;
  color:white;
  background-color:#141C29; /* #281A2D; */
}


.option {
  margin-top: 10px;
}

.option > .dx-selectbox {
  display: inline-block;
  vertical-align: middle;
  max-width: 350px;
  width: 100%;
  margin-top: 5px;
}

/* home */

.homepage {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;
}

/* Nova Luna Text center*/
.home-text {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #FFF;
    text-align: center;
    margin-top: 0px;
    margin-bottom: 0px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-weight: 500;
}


/*
Chat list - start
*/

/*  right-side-chatboard-area is style class for the output text dxList for chatMessages */
    .right-side-chatboard-area {  
        margin: 0 auto; /* Center the container */
        font-family: 'Roboto',sans-serif;
        color: white;
    }


    .right-side-chatboard-area .list .dx-list-group-header {
        color: #f05b41;
        font-weight: normal;
        font-size: 18px;
    }

    .right-side-chatboard-area .list .hotel {
        float: none !important; /* Override float to use flexbox */
    }

    .address {
        white-space: normal; /* Allow text to wrap */
        width: 100%;
    }

    .right-side-chatboard-area .list .hotel .name {
      font-weight: bold;
      display: inline-block;
      width: 40px; /* Adjust width as needed */
      vertical-align: top; /* Align with first line of text */
      margin-right: 12px; /* Add spacing between logo and text */
    }

    .right-side-chatboard-area .list .hotel .name img{
      font-weight: bold;
      float: none; /* Remove float */
      vertical-align: top; /* Align with first line of text */
      display: block; /* Make it a block element */
      width: 32px; /* Consistent size */
      height: 32px; /* Consistent size */
      border-radius: 50%; /* Circular logo */
    }

    .list {
        position: relative; 
    }


    .type {
        margin: 3px 0 5px 0;
        height: 14px;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2218px%22%20height%3D%2214px%22%20%3E%3Cpolyline%20fill%3D%22%23F05B41%22%20points%3D%227.5%2C0%209.972%2C4.399%2014.999%2C5.348%2011.5%2C9.015%2012.135%2C14%207.5%2C11.866%202.865%2C14%203.5%2C9.015%200.001%2C5.348%205.028%2C4.399%207.5%2C0%20%22%2F%3E%3C%2Fsvg%3E");
        background-size: 18px 14px;
    }

    .type.gold {
        width: 54px;
    }

    .type.platinum {
        width: 72px;
    }

    .type.diamond {
        width: 90px;
    }

    .message-datetime {
        text-align: right;
        padding-top: 0px;
        /* position: absolute; */
        /* bottom: 86px; */
        right: 30px;
    }

    .message-datetime > div {
        display: inline-block;
    }

    .message-datetime .price {
        font-size: 25px;
    }


    .message-datetime .message-time-caption {
        font-size: 11px;
        line-height: 12px;
        padding-left: 2px;
        opacity: 0.7;
    }

    /* backward compatibility */
    .price-container .caption {
        font-size: 11px;
        line-height: 12px;
        padding-left: 2px;
        opacity: 0.7;
    }
    .price-container  .price {
        font-size: 25px;
    }
    .price-container > div {
        display: inline-block;
    }
    .price-container {
        float: right;
        padding-top: 13px;
    }




/*
Chat list - end
*/

/* backward compatibility */
.hotel{
    /* Use the web font in your CSS */
    font-family: 'Roboto', sans-serif;
    font-size: 17px;
    line-height: 1.5;
    /* background-color: #333333;  Dark gray background */
    /* background-color: #2D2330; */
    color: #FFFFFF; /* White text */
    width: 100%;
}

.message-user{
    /* Use the web font in your CSS */
    font-family: 'Roboto', sans-serif;
    background-color: #f1f1f1; /* #281A2D; */
     /* #244; */
    color: black; /* White text */
    border: 1px solid #e6e6e61f;
    font-family: Lato,Roboto,arial,sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;

    cursor: auto;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.message-novaluna-bot{
    /* Use the web font in your CSS */
    font-family: Lato, ui-sans-serif, 'Roboto';
    font-size: 16px;
    line-height: 1.25;
     /*#355;*/
    color: black; /* White text */
    border: 1px solid #e1e1f1;
    border-radius: 8px;
    margin: 0;
    font-stretch:ultra-expanded;
    line-height: 1.6;
    /* color: #202124; */
    font-family: Lato,Roboto,arial,sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.75;
    /* display: inline-block; */
    /* transform: scaleY(0.5); */
    /* transform-origin: 0 0; */
    /* margin-bottom: -50%; */
    padding: 16px;
    display: flex;
    align-items: flex-start;
    width: calc(100% - 0px);
}

.chat-title {
     /*#355;*/
     font-size: 16px;
     font-weight: 600;
     font-family: Arial, Roboto, sans-serif;
     line-height: 34px;
     padding: 0;
     width: 100%;
     color: #2b3e5d;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
}

.message-name {
    font-weight: bold;
    color: #969696; /* White text */
    /* width: 50px;
    margin-right: 25px; */
}

.message-text {
    /* white-space: normal;  */
    white-space: normal;
    /* flex: 1; */
}

.message-text p {
    padding-top: 0.1em;
    padding-bottom: 0.1em;
    margin-top: 0px;
    margin-bottom: 0px;

}

.message-text ul {
    white-space: initial !important;
}

.message-text ol {
    white-space: initial !important;
}

.message-image {
    width: 50px;
    margin-right: 10px;
    position: absolute;
    /* top: 21px; */
}

.message-image img {
  width: 40px;
  height: 40px;
}

.message-sources{
    font-weight: bold;
    white-space: normal;
    color: #192334; /* White text */
     /*#355;*/
    /* margin-left: 120px; */
    padding: 5px 0px;
}

.dx-empty-message {
    font-family: 'Roboto', sans-serif !important;
    font-size: 17px !important;
    color: #FFFFFF !important; /* White text */
}

.button-indicator {
    height: 22px !important;
    width: 22px !important;
    /* Inherit the host button's own color (e.g. --text-on-accent on the
       teal send button) so the spinner it mounts (js/ui/load-indicator.js,
       via currentColor) reads correctly instead of an unrelated red -
       DevExtreme's own dxLoadIndicator never consumed this `color`, so it
       was silently inert before. */
    color: inherit;
}

.right-centered-div {

    position: absolute;
    top: 53px;
    right: 18%;
    left: 12%;
    /* transform: translateX(-50%); */
    height: 68%;
    visibility: hidden;
    /* transition: visibility 0.3s ease-in-out; */
    /* background: #4675be; */
    /* color: white; */
}

.right-centered-div-close-button-style {
    background: #304f80;
    color: white;
    border: 1px;
    position: relative;
    z-index: 10;
    font-weight: 600;
    text-align: right;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.document-card{
    font-family: Tahoma, Trebuchet MS, sans-serif;
    /* background-color: #0d192d; */
    color: #FFFFFF;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 8px;
}

.document-title{
    white-space: normal;
    padding: 5px;
    background: #fefefe;
    color: black;
}

.document-author{
    white-space: normal;
}

#documentList
{
    background: #f8f8f8;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.document-content{
    font-family: Arial, Verdana, Tahoma, Trebuchet MS, sans-serif;
    /* background-color: #FFFFFF; */
    background-color: #fefefe;
    color: #000;
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
    /* margin-top: 5px; */
    /* margin-bottom: 5px; */
    padding: 10px;
}

/*
.document-footer{
}
*/

.document-page-number{
    background-color: #e2e2e2;
    color: #373636;
    right: 0px;
    padding: 5px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.document-page-header {
    background-color: #e2e2e2;
    color: #000000;
    right: 0px;
    padding: 5px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.fa-books {
  font-size: 24px; /* Adjust the size as needed */
  color: white;  /* Change the color to white */
}

/*
.document-file-path-list {
}

.document-file-path-list-item {
}*/

.right-side-chatboard-container { 
    width:100%;
    height: 100%; 
    padding: 0;
    margin: 0; 
}

.novaluna-title {
    background-color:#2c3e5b; /* #281A2D; */
 }

 .full-height-width {
    /* height: 100vh; 100% of viewport height */
    /* width: 100vh;  100% of viewport width */
    height: calc(100vh - 150px); /* Adjust the height based on your design */
    overflow: auto;
    border: 1px solid #2D2330; /* Red border with a 1px width */
    background-color: #2F4766; /*#355;*/
}

/* input-box-area is a style class for the text area for input boxes for questions */
.question-box-area {
    position: relative; 
    left: 0; 
    width: 75%;
    height: 95px;
    margin: 0 auto; 
    padding: 5px;
}

/*
.dx-textarea .dx-placeholder {
    padding-left: 45px;
}


.dx-textarea .dx-texteditor-input {
    padding-left: 48px;
}
*/

.dx-textarea .dx-texteditor-input-container {
    margin-left: 40px;
}

.dx-texteditor.dx-editor-filled .dx-placeholder::before, .dx-texteditor.dx-editor-filled .dx-texteditor-input, .dx-texteditor.dx-editor-outlined .dx-placeholder::before, .dx-texteditor.dx-editor-outlined .dx-texteditor-input {
    padding: 8px 38px 8px;
    color: #000000;
}
.dx-dropdowneditor-input-wrapper {
    background: #f5f5f5;
    border-radius: 6px;
}

div#question-textarea {
    /*background: #2b3e5d;*/
    border-radius: 8px;
}
.dx-popup-content {
    padding: 0;
}
.dx-popup-content li {
    /* padding: 0px !important; */
}
.dx-popup-content li div {
    padding: 3px 5px;
}
div#chatMessageList .dx-texteditor-input-container input {
    background: #f0f0f0;
    padding: 13px;
    border-radius: 6px;
}
.dx-treeview-item-without-checkbox.dx-state-focused > .dx-treeview-item {
    color: rgb(200 200 200);
}

.dx-treeview-item-without-checkbox.dx-state-selected > .dx-treeview-item {
    background-color: #2c3e5b;
    border-radius: 6px;
    color: #e1e1e0;
}

.dx-checkbox-icon {
    border-radius: 10px;
    left: -20px;
    border-color: #ebebeb;
}

.dx-checkbox-icon:hover {
    border-color: white;
}

.dx-checkbox-checked .dx-checkbox-icon {
    border-color: #e1e1e0!important; /* Example color for the selected checkbox border */
}

.question-toolbar-style {
    position: relative; 
    width: 100%; 
}

.question-tool-strip-style {
    /* width: 75%;
    left: 7% */
    max-width: 1024px;
    position: relative;
    height: 30px;
}

.model-warning {
    color: black;
    font-size: smaller;
    float: right;
}

.topic-custom-selected-item {

    background-color: #2c3e5b;
    border-radius: 6px;
    color: #e1e1e0!important;

}

.topic-custom-checkbox-selected .dx-checkbox-checked .dx-checkbox-icon {
    border-color: #e1e1e0!important; /* Example color for the selected checkbox border */
}

.input-box-area {
    position: absolute;
    /* display:inline-block; */
    top: 15%;
    left: 35%;
    /* margin-top: -50%; */
    /* margin-left: -50%; */
    /* bottom: 160px; */
    /* left: 0;*/
    /* right: 130px; */
    /* width: 59%; */
    /* margin: 0 auto;*/ /* Center the container */
    /* padding-right:200px; */
    /* padding-left: 200px; */
    background-color: #fff; /* Set a background color for the floating div */
    /* padding: 10px; Add padding for spacing */
    /* box-shadow: 0px -5px 10px rgba(0, 0, 0, 0.2);  Optional: Add a shadow effect */
    background-color: #2D2330;
    background-color: #2F4766; /*#355;*/
    /* background-color: #1D1320; */
    padding: 2px;

  border-radius: 25px;
  background: #fff;
  padding: 20px;
  /* width: 200px; */
  /* height: 150px; */
  z-index: 10;

  visibility:hidden;
  display: none;
}

.input-button-area {
    display: inline-block;
}

/*
.input-entry-box{
  float:left;
  margin-right:5px;
  display: block;
  width: 100%;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
*/

/*************   sign up form ***************/

.form-container {
  max-width: 300px;
  margin: 0 auto;
    padding:10px;
}

/*
.input-field {
  margin-bottom: 15px;

}*/

label {
  display: block;
  margin-bottom: 5px;
}


.button-container {
  text-align: center;
}

.signup-button,
.cancel-button {
  /*padding: 10px 20px;*/
  margin-right: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.signup-button {
  background-color: #4CAF50;
  width: 250px;
  height:35px;
  color: white;
}

.cancel-button {
  background-color: #f44336;
  color: white;
  visibility: hidden;
}

/*************  end of sign up form ***************/


/** logo **/

.logo {
    /* Frame 39 */

    position: absolute;
    width: 101px;
    height: 101px;
    left: 1013px;
    top: 353px;

    background: #000000;
    border-radius: 12px;


    /* Group 36 */

    position: absolute;
    width: 54.18px;
    height: 54.89px;
    left: calc(50% - 54.18px/2 - 0px);
    top: calc(50% - 54.89px/2 + 0px);



    /* Subtract */

    position: absolute;
    width: 52.85px;
    height: 47.08px;
    left: 23.41px;
    top: 30.87px;

    background: linear-gradient(138.44deg, #FFBA08 7.85%, #FFBA08 84.76%);


    /* Subtract */

    position: absolute;
    width: 29.33px;
    height: 44.33px;
    left: 29.65px;
    top: 24.1px;

    background: #05A6F0;


    /* Subtract */

    position: absolute;
    width: 38.13px;
    height: 28.98px;
    left: 33.61px;
    top: 32.22px;

    background: #F35325;
    transform: rotate(-13.91deg);


    /* Subtract */

    position: absolute;
    width: 32.5px;
    height: 24.7px;
    left: 73.14px;
    top: 31.89px;

    background: #81BC06;
    transform: rotate(82.55deg);

}
/** end logo **/

:dir(rtl) #button-wrapper {
  left: 10px;
}

:dir(ltr) #button-wrapper {
  right: 10px;
}

#button-wrapper {
  position: absolute;
  top: 22px;
  /* width: 80px; */
  /* transform: translateX(-50%); */
  /* height: 100px; */
  padding: 1px;
  /* background-color: lightblue;  Just for visualization */
  visibility: visible;
  transition: visibility 0.3s ease-in-out; /* Add a smooth transition effect */
}

/* Set a background color and width for the child divs for visibility */
.question-send-button-style {
    /* width: fit-content; */ /* Adjust the width as needed */
    display: inline-block; /* Display the child divs inline */
}

.send {
    display: inline-block;
}
#icon-ctrl-enter {
  display: none;
}
#icon-send .dx-button-content {
    display: flex;
}
div#icon-send {
    background: transparent;
    color: #6085c1;
    border: none !important;
    box-shadow: none;
}

/*
#sign-in-form-title {

}*/

.login-display-text-area {
    color:white;
    font-family: 'Roboto';
}

.centered {
    position:absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
}

.sign-in-button-style {
  position: absolute;
  top: 10px;
  right: 85px;
  font-size: 18px;
  margin-left: 50px;
}

.basic-help-button-style {
  position: absolute;
  top: 10px;
  /*right: 90px;*/
  font-size: 15px;
  /* margin-left: 30px; */
  padding: 0;
  color: #ffffff !important;
  opacity: 0.75;
  background: #212e45;
  left: 10px;
}


.basic-help-button-style .dx-button-content .dx-icon {
    color: #0d9be3;
}


.detailed-tour-button-style {
  position: absolute;
  top: -1px;
  /*right: -40px;*/
  right: -18%;
  font-size: 15px;
  margin-left: 70px;
  padding: 0;
  color: #ffffff !important;
  opacity: 0.75;
  /*background: #314463;*/
}

.detailed-tour-button-style .dx-button-content .dx-icon {
    color: #0d9be3;
}


.prev-chat-message-button-style {
  position: absolute;
  top: 7px;
  /*right: -40px;*/
  right: -7%;
  font-size: 15px;
  margin-left: 70px;
  padding: 0;
  color: #ffffff !important;
  opacity: 0.75;
  /*background: #314463;*/
}

.prev-chat-message-button-style .dx-button-content .dx-icon {
    color: #0d9be3;
}

.next-chat-message-button-style {
  position: absolute;
  top: 40px;
  /*right: -40px;*/
  right: -7%;
  font-size: 15px;
  margin-left: 70px;
  padding: 0;
  color: #ffffff !important;
  opacity: 0.75;
  /*background: #314463;*/
}

.next-chat-message-button-style .dx-button-content .dx-icon {
    color: #0d9be3;
}

.settings-url-button-style {
  position: absolute;
  top: 10px;
  right: 190px;
  font-size: 18px;
  /*margin-left: 50px;
  padding: 0;
  color: #ffffff !important;*/
  opacity: 0.75;
  background: #212e45;
}

.settings-url-button-style .dx-button-content .dx-icon {
    color: #72ab03;
}

.mode-toggle-button-style {
  position: absolute;
  top: 10px;
  font-size: 18px;
  opacity: 0.85;
  background: #212e45;
}

.mode-toggle-button-style .dx-button-content .dx-icon {
    color: #e7a906;
}

.sign-out-button-style {
  position: absolute;
  top: 10px;
  right: 40px;
  font-size: 18px;
  margin-left: 50px;
}

.sign-out-button-style i {
  color: #ffffff !important;
  opacity: 0.5;
}

.register-button-style {
  position: absolute;
  top: 10px;
  right: 85px;
  font-size: 18px;
  margin-left: 50px;
}

.breadcrumb-menu-style {
  position: absolute;
  top: 10px;
  left: 5px;
  font-size: 18px;
  margin-left: 10px;
  visibility: visible;
}


/* Mobile layout */
@media (max-width: 785px) {
    .demo-container {
        flex-direction: column-reverse; /* Stack right section below left section */
    }

    .resizable1 {
        display: none; /* Hide left section by default */
    }

    .resizable2 {
        width: 100% !important; /* Right section takes full width */
    }

    .show-left-section .resizable1 {
        display: block; /* Show left section when the class is applied */
        visibility: visible;
    }

    .show-right-section .resizable1 {
        display: none; /* Show right section when the class is applied */
        visibility: hidden;
    }

    /* Set the width to 100% on mobile */
    .right-side-chatboard-area {
        width: 100%;
    }

    .breadcrumb-menu-style {
      visibility: visible;
    }

    .basic-help-button-style {
      margin-left: 50px;
    }

    .question-box-area {
        width: 100%;
        height: 95px;
    }

    .sign-in-button-style {
      right: 15px;
      font-size: 0;
      padding: 0;
    }

    .sign-out-button-style {
      right: 15px;
      font-size: 0;
      padding: 0;
    }

    .register-button-style {
      right: 15px;
      font-size: 0;
      padding: 0;
    }

    .input-box-area {
        left: 15%;
    }
 


    .question-toolbar-style { 
        visibility:hidden;
        left: 23%;
        height: 30px;
    }

    .selected-text {
        padding: 5px;
        font-size: 12px;
    }

    .message-user{
        display: block;
    }

    .message-novaluna-bot{
        display: block;
    }

    /*
    .message-text{
        white-space: normal;
    }
    */


    .message-image {
        position: static;
    }
    /* end spacing for mobile */

    .newtopic-button-style {
        left: 60px;
    }

    #treeBox {
        left: 0%;
    }

    #promptButton {
        /* right: 25%; */
        right: 5%;
    }

    #treeview-sources-container{
        width: 41%;
        left: 38%;
        border-radius: 8px;
        display: none;
    }

    #suggested-questions {
        width: 90%;
    }

    .centered {
        position:absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -30%);
    }

    .grid-content {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Desktop layout */
@media (min-width: 786px) {
    /* Set the width to 65% on desktop */

    .resizable1 {
        display: block;
    }

    .resizable2 {
        display: block;
        width:82%;  /* this should = 100 - .resizable.width*/
    }

    .right-side-chatboard-area {
        max-width: 1024px;
    }

    .breadcrumb-menu-style {
      visibility: hidden;
    }

    .basic-help-button-style {
      margin-left: 30px;
    }

    .question-box-area {
        max-width: 1024px;
        height: 95px;
    }

    .sign-in-button-style {
      right: 85px;
      font-size: 17px;
    }

    .sign-out-button-style {
      right: 40px;
      font-size: 17px;
    }

    .register-button-style {
      right: 85px;
      font-size: 17px;
    }

    .input-box-area {
        left: 35%;
    }
  
    .question-toolbar-style { 
        height: 30px;
    }

    .selected-text {
        padding: 10px;
        font-size: 14px;
    }

    .message-user{
        display: flex;
    }

    .message-novaluna-bot{
        display: flex;
    }

    .message-text p {
      margin:0px;
      text-wrap: pretty;
    }

    .message-image {
        position: absolute;
    }

    #treeBox {
        left: 12%;
    }

    #promptButton {
        right: -10%;
    }

    #treeview-sources-container{
        width: 24%;
        border-radius: 8px;
        display: block;
        position: absolute;
    }

    .centered {
        position:absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -30%);
    }

    /* end spacing for desktop */

    .grid-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

.newtopic-button-style {
    background-color: #354b6f; /* #333366; */
    border-color: #ddd;
    border-radius: 16px;  /* remove later */
    border: 1px solid #ffffff33;
}

.source-document-button-style {
    border-radius: 12px;
    background: #486799;
    color: #ffffff;
    height: 23px;
    margin: 4px;
    max-width: 220px;
}

.source-document-button-style.dx-state-focused{
  background: #101620;
}


.source-document-button-style.dx-state-hover{
  background: #101620;
}

.source-document-button-style .dx-button-text{
  text-transform: unset !important;
  font-weight: 400;
  font-style:italic;

}

.source-document-chunks-display-style {
    visibility : hidden;
    position: absolute;
    display: none;

    background: #f6f6f6;
    padding: 5px;
    /* border: 1px solid rgb(204, 204, 204); */
    border-radius: 12px;
}

.button-clipboard-copy-url-style {
    position: relative;
    border-radius: 16px;  /* remove later */
    background: transparent;
    color: #0f8ccb;
    border: 0px;
}

.message-thumbs-up-button-style {
    position: relative;
    border-radius: 16px;  /* remove later */
    background: transparent;
    color: #0f8ccb;
    border: 0px;
}

.message-thumbs-down-button-style {
    position: relative;
    border-radius: 16px;  /* remove later */
    background: transparent;
    color: #0f8ccb;
    border: 0px;
}

.button-open-document-style {
    position: relative;
    border-radius: 16px;  /* remove later */
    background: transparent;
    color: #0f8ccb;
    border: 0px;
}

/* Style tabs */
.tab-list {
  /* list-style: none; */
  padding: 0;
  /* display: flex; */
  border-width: 0px;
  /* background: #29415f; */
}

.tab {
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 4px;
  margin: 0 5px;
  letter-spacing: 0.5px;
  font: small-caption;
  font-weight: normal;
}

.document-chunks-page-content-style {
  white-space: pre-wrap;
  font-family: 'Noto Kufi Arabic';
}

.document-chunks-page-number-style {
    white-space: normal;
    text-align: center;
}

.top-settings-toolbar-style {
    visibility:visible;
    display: flex;
    z-index: 5;
}

/*
.button-search-chunks-style {

}*/

/* Set the active tab's style */
.tab.active {
  background-color: #007BFF;
  color: #fff;
}


.model-switch-style .dx-button-text {
    color: #FEFCFF; /* Replace #ff0000 with the desired color code for the text */
}

.custom-height-slider {
  height: 75px;
}

.dx-field .dx-slider {
  flex: 1;
}

#icon-logout .dx-button.dx-button-danger .dx-icon {
    color: #ffffff66;
}

#basic-help .dx-button.dx-button-danger .dx-icon {
    color: #ffffff66;
}

.dx-list.dx-list-with-search .dx-scrollable-wrapper {
    height: calc(100% - 111px);
}

.dx-treeview-node {
    /* border-bottom: 1px solid #ccc3;*/
    padding-bottom: 5px;
    margin-bottom: 5px;
}


.dx-treeview-node:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.dx-button.dx-button-success {
    background-color: #5c95c5;
}

.message-text h1 {
  font-size: 30px; /* Set your desired font size */
}

.message-text h2 {
  font-size: 26px; /* Set your desired font size */
}

.message-text h3 {
  font-size: 22px; /* Set your desired font size */
}

.message-text h4 {
  font-size: 20px; /* Set your desired font size */
}

.message-text h5 {
  font-size: 18px; /* Set your desired font size */
}

.message-text h6 {
  font-size: 16px; /* Set your desired font size */
}


.accuracy-creativity-style {
    color: #513333;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #bdc3cd;
}

.dx-slider-handle::after {
    background: #2e405d;
}

.internet-switch-label-style {
    color:white;
    visibility:hidden;
    display: none;
}

.internet-switch-style {
    /* margin-right: 10px; */
}

.model-switch-style {
    color: inherit;
    background: transparent;
    border-radius: 0;
}

.remember-context-style {
    position:absolute;
    right:27%;
    top:8px;
    visibility:hidden;
    display: none;
}

.remember-context-label-style {
    color:white;
}

.ctrl-enter-text-style {
    display: inline-block;
    color:white;
    font-size:12px;
}

.document-search-close-button-style {
    color: #0a0000;
    text-align: right;
    background: transparent;
    border: 0px;
    color: white;
}

div#dropdown-content {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 6px;
    position: fixed;
    z-index: 140;
    box-shadow: 0px 5px 10px -5px #000;
}

/* Placement owned by settings.css + positionSettingsPanel() in index.js.
   Legacy right/left % offsets pushed the panel off-screen once the toolbar
   used CSS transform (fixed descendants resolve against that ancestor). */
:dir(ltr) div#dropdown-content,
:dir(rtl) div#dropdown-content {
    left: auto;
    right: auto;
}

.hide {
    display: none;
}

div#settings-container {
    position: relative;
}

div#settings-dropdown-toggle i {
    color: #374d6f;
}

.dx-list-item {
    cursor: auto !important;
    user-select: text !important;
    -moz-user-select: text !important;
    -webkit-user-select: text !important;
}



.rotate-infinite {
  /* Set initial rotation (optional) */
  transform: rotate(0deg);
  /* Animation properties */
  animation: spin 8s linear; /* Modify the duration or animation-timing-function as needed */
}

@keyframes spin {
  /* Define the animation keyframes */
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

.dx-slider-tooltip-position-bottom {
    padding-bottom: 5px !important;
}

.question-textarea-style {
      max-height: 50vh; /* Set the maximum height (e.g., half of the viewport height) */
      resize: vertical; /* Allow vertical resizing */
      overflow-y: auto; /* Show a vertical scrollbar when content exceeds the height */
      position: absolute; /* Set the position to absolute */
}

.dx-textarea .dx-texteditor-input-auto-resize {
    overflow-y: auto !important;
}

/** prompt styles **/

#promptButton {
  /* padding: 10px;
  font-size: 14px;*/
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  position: absolute;
  height: 30px;
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  color: #030303;
  font-family: Roboto,RobotoFallback,"Noto Kufi Arabic",Helvetica,Arial,sans-serif;

}

#promptButton .selected-icon {
  margin-right: 10px;
}

#icon-menu {
  display: none;
  position: absolute;
  background-color: #f7f7f7;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgb(0 0 0 / 38%);
  z-index: 999;
}

.grid-menu {
  display: grid;
  grid-template-columns: repeat(8, 1fr); /* Adjust the number of columns as needed */
  gap: 10px;
  bottom: 35px;
  right: 7%;
  display: grid;
}

.icon-menu-button {
  padding: 3px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  background-color: #fff;
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon {
  font-size: 24px;
  margin-bottom: 5px;
}

.icon-menu-button:hover {
  background-color: #f0f0f0;
}
/** prompt styles **/

/** down arrow button to move to end of message list **/
.down-arrow-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: none;
  border-radius: 50%;
  background-color: #d6d6d6;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
}

.down-arrow-button:hover {
  background-color: #0056b3;
}

/** down arrow button to move to end of message list **/

/** Copy to clipboard on the code blocks in the message **/

.code-container {
  position: relative;
  margin-top: -5px; /* Adjust top margin to overlap with the header */
  padding-top: 5px; /* Add padding to compensate for margin adjustment */
}

.code-header {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  background-color: #666666; /* Darker background color */
  padding: 5px 10px; /* Add padding for better spacing */
  border-top-left-radius: 10px; /* Round top left corner */
  border-top-right-radius: 10px; /* Round top right corner */
  margin: 0; /* Remove default margin */
  height: 40px;
  width: 100%;
}

.language {
  font-size: 14px;
  font-weight: bold;
  color: #f0f0f0; /* Light grey color */
}

.copy-link {
  font-size: 14px;
  text-decoration: none;
  color: #f0f0f0; /* Light grey color */
  display: flex;
  align-items: center;
}


.copy-icon {
  margin-right: 5px;
  color: #f0f0f0;
  pointer-events: visible;
}

pre {
  margin-bottom: 0; /* Remove margin bottom for the code block */
}

pre[class*=language-] {
    padding: 1em;
    margin: .0em 0;
    overflow: auto;
}

code[class*=language-], pre[class*=language-] {
    text-wrap: wrap;
}
/** Copy to clipboard on the code blocks in the message **/

/**image**/

.message-image {
    /* width: 100%; */
    /* Ensure the parent div takes up full width */
    max-width: 100%;
    /* Prevent parent from exceeding the container size */
}

.message-image-content {
    max-width: 80%;
    height: auto;
    /* Scale down if necessary, maintaining aspect ratio */
    display: block;
    /* Removes any extra space below the image */
}

/**image**/

.dx-treeview-item-with-checkbox .dx-treeview-item {
    /*color: black !important;*/
}

.top-icon-color .dx-icon {
    color: #6a6a6a; /* Replace with your desired color */
}

/** suggested questions **/

    .no-questions {
        display: block;
        margin: 10px 0;
        padding: 10px;
        background-color: #f0f0f0;
        border: 1px solid #ccc;
        cursor: pointer;
        width: 300px;
        text-align: left;
    }
    #suggested-questions-container {
        display: grid;
        /* grid-template-columns: repeat(2, 1fr); */
        grid-template-areas:
            "title"
            "content";
        gap: 10px;
    }
    .grid-title {
        grid-area: title;
        text-align: center;
        font-weight: bold;
        color: #000;
    }
    .grid-content {
        grid-area: content;
        display: grid;
        /* gap: 10px; */
        /* grid-template-columns: repeat(2, 1fr); */
    }
    .question-button {
        display: block;
        /*margin: 10px 0;*/
        /* padding: 10px; */
        background-color: #f6f6f6;
        border: 1px solid #d3d3d3;
        cursor: pointer;
        width: 100%;
        text-align: left;
        border-radius: 8px;
        font-family: 'Roboto', sans-serif;
        font-size: 16px;
        padding-left: 10px;
        /* text-wrap: nowrap; */
    }
    .question-icon {
        font-weight: bold;
        font-size: 18px;
    }
    .question-title {
        font-family: 'Roboto', sans-serif;
        font-weight: bold;
        /* font-size: 14px; */
        /* padding-left: 5px; */
    }
    .question-description {
        font-family: 'Roboto', sans-serif;
        font-style: italic;
        font-size: 10px;
    }

    /*modification*/
    .question-button {
        display: block;
    }

    .question-content {
        display: flex;
        align-items: center;
    }

    .question-description {
        margin-top: 8px;
        padding-left: 29px; /* Adjust this value to match the width of the icon */
    }
    /*modification*/

/** end of suggested questions **/


/* Target the specific div */
.dx-scrollable-container {
  /* scrollbar-color: #ff0000 #000000; */ /* thumb color and track color */
  scrollbar-width: thin; /* optional: thin, auto, or none */
}

/* For WebKit browsers */
.dx-scrollable-container::-webkit-scrollbar {
  width: 12px; /* width of the scrollbar */
}

.dx-scrollable-container::-webkit-scrollbar-track {
  /* background: #000000; */ /* color of the track */
}

.dx-scrollable-container::-webkit-scrollbar-thumb {
  /* background-color: #ff0000; */ /* color of the thumb */
  border-radius: 10px; /* roundness of the thumb */
  /* border: 3px solid #000000;*/  /* creates padding around thumb */
}


/** welecome message **/

    .welcome_title {
        font-size: 34px;
    }

    .left-section {
        width: 30%;
        background-color: #f8f9fa;
        padding: 20px;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .right-section {
        width: 70%;
        padding: 20px;
    }

    .welcome-para {
        font-size: 16px;
        color: #495057;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    .signup-highlight {
        color: #05a6f0;
        font-weight: bold;
        padding: 2px;
    }

    .signup-cta {
        background-color: #05a6f0;
        color: #fff !important;
        padding: 10px 20px;
        text-align: center;
        border-radius: 5px;
        text-decoration: none;
        display: inline-block;
        margin-bottom: 20px;
    }

    .signup-cta:hover {
        background-color: #0056b3;
    }

    .contact-info {
        font-size: 14px;
        color: #6c757d;
    }

    .contact-info a {
        color: #007bff;
        text-decoration: none;
    }

    .contact-info a:hover {
        text-decoration: underline;
    }

/** end of welecome message **/

/** mark highlighting **/
/* Default style for <mark> tags */
.highlight-switch-style {
    /* margin-right: 10px; */
}

.highlighted mark {
    background-color: rgb(255 244 0 / 48%); /* Default highlighted color #81d4f9 */
}

/* Unhighlighted state */
.unhighlighted mark {
    background-color: transparent; /* Removes highlight */
}

mark {
    color: #000033;
}
/** mark highlighting **/


.highlighted mark {
    /* background-color: #a83919; */
}

.quick-tips-panel {
    background-color: var(--surface-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.quick-tips-button {
    background-color: var(--surface-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-inline-start: none;
}

.source-popup-content {
    background-color: var(--surface-card);
    color: var(--text-primary);
}

.control-container label {
    color: var(--text-primary);
}

/* #languageDropdown styling lives in shell.css (token-based, both themes). */


/* ============================================
   MODERN UI: SAFE ENHANCEMENTS (Non-breaking - Day Theme)
   Higher specificity to ensure they apply
   ============================================ */

/* Enhance message bubbles - with higher specificity */
.message-user {
    border-radius: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    animation: slideIn 0.3s ease !important;
}

.message-user:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.message-novaluna-bot {
    border-radius: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    animation: slideIn 0.3s ease !important;
}

.message-novaluna-bot:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Enhance NEW CHAT button - hover only */
div#button-newtopic:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(5, 166, 240, 0.3) !important;
    transition: all 0.3s ease !important;
}

/* Enhance input area - subtle improvements */
div#question-textarea {
    border-radius: 12px !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

div#question-textarea:focus {
    box-shadow: 0 0 0 4px rgba(5, 166, 240, 0.15) !important;
    border-color: rgba(5, 166, 240, 0.4) !important;
}

/* Enhance sidebar tree nodes */
#treeview .dx-treeview-node {
    /* Was `all`: with ~40 rows on screen that animates every changed
       property of every row on any repaint (notably the theme swap). */
    transition: background-color 0.2s ease, color 0.2s ease !important;
    border-radius: 6px !important;
}

#treeview .dx-treeview-node:hover {
    transform: translateX(3px) !important;
    background-color: rgba(0, 0, 0, 0.03) !important;
}

/* ============================================
   CHATGPT-LIKE DAY MODE STYLING
   ============================================ */

/* Font stack for maximum readability - now the design-system font (Inter,
   see tokens.css) rather than a hardcoded system-font fallback list */
body, html,
.message-text,
.message-novaluna-bot,
.message-user,
#treeview,
.right-side-chatboard-area {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Day mode background - warm off-white (tokens.css --surface-app) */
body, html {
    background: var(--surface-app) !important;
}

.resizable1 {
    background-color: #f7f7f8 !important;
    border-right: 1px solid #e5e5e6;
}

.resizable2 {
    background-color: #ffffff !important;
}

/* ChatGPT-like message styling - day mode */
.message-novaluna-bot {
    background-color: #f7f7f8 !important;
    color: #353740 !important;
    border: 1px solid #e5e5e6 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin: 16px 0 !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
    font-weight: 400 !important;
    max-width: 100%;
    /* Ensure proper alignment - override flex alignment from bc_style.css */
    display: block !important;
    align-items: flex-start !important;
}

.message-user {
    background-color: #ffffff !important;
    color: #353740 !important;
    border: 1px solid #e5e5e6 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin: 16px 0 !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
    font-weight: 400 !important;
    /* Ensure proper alignment - override flex alignment from bc_style.css */
    display: block !important;
    align-items: flex-start !important;
}

/* ChatGPT-like text styling - highly readable */
.message-text {
    color: #353740 !important;
    /* font-size: 15px; */ /* Removed !important to allow JavaScript font size controls to work */
    line-height: 1.75 !important;
    font-weight: 400 !important;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Fix excessive left margin during streaming */
.message-novaluna-bot .message-text,
.message-user .message-text {
    margin-left: 0 !important;
    margin-top: 0 !important;
}

/* Fix logo/avatar alignment with first line of text - prevent overlap */
.right-side-chatboard-area .list .hotel {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    position: relative !important; /* Override any absolute positioning */
}

.right-side-chatboard-area .list .hotel .name {
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 40px !important;
    min-width: 40px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    position: relative !important; /* Override absolute positioning */
}

.right-side-chatboard-area .list .hotel .name img {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    position: relative !important; /* Override absolute positioning */
    /* Ensure logo aligns with top of first line, not overlapping */
    margin-top: 0 !important;
    vertical-align: top !important;
}

.right-side-chatboard-area .list .hotel .address {
    flex: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    /* Ensure text starts after logo with proper spacing */
    padding-left: 0 !important;
    position: relative !important;
}

/* Override message-image absolute positioning that causes overlap */
.message-image {
    position: relative !important; /* Override absolute positioning */
    width: 40px !important;
    margin-right: 12px !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
}

.message-image img {
    width: 32px !important;
    height: 32px !important;
    display: block !important;
    border-radius: 50% !important;
}

.message-text p {
    margin: 0.75em 0 !important;
    padding: 0 !important;
    line-height: 1.75 !important;
}

.message-text p:first-child {
    margin-top: 0 !important;
}

.message-text p:last-child {
    margin-bottom: 0 !important;
}

.message-text ul,
.message-text ol {
    margin: 0.75em 0 !important;
    padding-left: 1.5em !important;
    line-height: 1.75 !important;
}

.message-text li {
    margin: 0.5em 0 !important;
    line-height: 1.75 !important;
}

.message-text h1,
.message-text h2,
.message-text h3,
.message-text h4 {
    color: #202123 !important;
    font-weight: 600 !important;
    margin: 1em 0 0.5em 0 !important;
    line-height: 1.4 !important;
}

.message-text h1 { font-size: 1.5em !important; }
.message-text h2 { font-size: 1.3em !important; }
.message-text h3 { font-size: 1.1em !important; }
.message-text h4 { font-size: 1em !important; }

.message-text code {
    background-color: #f4f4f4 !important;
    color: #d73a49 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace !important;
    font-size: 14px !important;
}

.message-text pre {
    background-color: #f4f4f4 !important;
    color: #24292e !important;
    padding: 16px !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    line-height: 1.6 !important;
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace !important;
    font-size: 14px !important;
}

.message-text pre code {
    background: none !important;
    padding: 0 !important;
    color: #24292e !important;
}

/* Sidebar tree view - day mode */
#treeview {
    color: #353740 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

#treeview .dx-treeview-node {
    color: #353740 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    transition: background-color 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    margin: 2px 0 !important;
}

#treeview .dx-treeview-node:hover {
    background-color: #f0f0f0 !important;
    color: #202123 !important;
}

#treeview .dx-state-selected > .dx-treeview-item {
    background-color: transparent !important;
    color: #202123 !important;
}

/* Fix checkbox alignment with text */
#treeview .dx-treeview-item-with-checkbox {
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    width: 100% !important;
    padding: 8px 12px !important;
    margin: 2px 0 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    overflow: visible !important; /* Ensure checkbox is not clipped */
}

#treeview .dx-treeview-item-with-checkbox .dx-checkbox {
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: 16px !important; /* Position more to the right to ensure full visibility */
    margin: 0 !important;
    z-index: 2 !important; /* Ensure checkbox is above background */
    position: absolute !important;
    width: 18px !important; /* Ensure checkbox has proper width */
    height: 18px !important; /* Ensure checkbox has proper height */
    overflow: visible !important;
}

/* Override general checkbox icon positioning for treeview */
#treeview .dx-treeview-item-with-checkbox .dx-checkbox-icon {
    left: 0 !important; /* Reset the left: -20px from general styles */
    position: relative !important;
    width: 18px !important;
    height: 18px !important;
}

#treeview .dx-treeview-item-with-checkbox .dx-treeview-item {
    padding-left: 40px !important; /* Increased to accommodate checkbox fully */
    display: flex !important;
    align-items: center !important;
    min-height: 24px !important;
    width: 100% !important;
    flex: 1 !important;
}

/* Make selection background span full width including checkbox area */
#treeview .dx-treeview-item-with-checkbox.dx-state-selected {
    background-color: #e5e5e6 !important;
    border-radius: 6px !important;
    margin: 2px 0 !important;
    padding: 8px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#treeview .dx-treeview-item-with-checkbox.dx-state-selected .dx-treeview-item {
    background-color: transparent !important;
    width: 100% !important;
    padding-left: 40px !important; /* Match the padding-left above */
}

/* Ensure checkbox is visible and styled when selected */
#treeview .dx-treeview-item-with-checkbox.dx-state-selected .dx-checkbox {
    background-color: transparent !important;
    z-index: 2 !important;
    left: 16px !important; /* Ensure consistent positioning when selected */
    width: 18px !important;
    height: 18px !important;
    overflow: visible !important;
}

/* Style checkbox icon to be visible on light background */
#treeview .dx-treeview-item-with-checkbox.dx-state-selected .dx-checkbox-icon {
    border-color: rgba(0, 0, 0, 0.3) !important;
}

#treeview .dx-treeview-item-with-checkbox.dx-state-selected .dx-checkbox-checked .dx-checkbox-icon {
    border-color: #202123 !important;
    background-color: #202123 !important;
}

/* Input area - day mode */
.chat-inputs-container {
    background-color: #ffffff !important;
    border-top: 1px solid #e5e5e6 !important;
    padding: 5px 10px 3px 10px !important;
}

#question-textarea {
    background-color: #ffffff !important;
    color: #353740 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
    padding: 12px 56px 12px 16px !important;
}

#question-textarea:focus {
    border-color: var(--accent) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2) !important;
}

#question-textarea::placeholder {
    color: #8e8ea0 !important;
}

/* Header strip - day mode */
#blue-strip {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e5e6 !important;
}

.novaluna-title .home-text {
    color: #ffffff !important;
}

/* Welcome message - day mode */
.welcome_title {
    color: #202123 !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
}

.welcome-para {
    color: #565869 !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
}

/* Scrollbar - day mode */
.right-side-chatboard-area::-webkit-scrollbar,
#chatMessageList::-webkit-scrollbar {
    width: 10px;
}

.right-side-chatboard-area::-webkit-scrollbar-track,
#chatMessageList::-webkit-scrollbar-track {
    background: #f7f7f8;
}

.right-side-chatboard-area::-webkit-scrollbar-thumb,
#chatMessageList::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 5px;
}

.right-side-chatboard-area::-webkit-scrollbar-thumb:hover,
#chatMessageList::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Remove animations from existing messages for performance */
.message-novaluna-bot.message-new,
.message-user.message-new {
    animation: slideIn 0.3s ease-out;
}

#customTopicTreeSearch {
    background: #ffffff;
    border-color: rgb(215 215 215);
}

/* ============================================
   MODERN UI/UX ENHANCEMENTS - DAY MODE
   Following best practices for phenomenal, modern, stunning design
   ============================================ */

/* Smooth transitions for all interactive elements */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Enhanced message cards with subtle shadows and hover effects */
.message-novaluna-bot,
.message-user {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(10px) !important;
}

.message-novaluna-bot:hover,
.message-user:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}

/* Modern input field styling */
#question-textarea {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

#question-textarea:focus {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

/* Enhanced buttons with modern styling */
.dx-button {
    /* Narrowed from `all` - every button in the app matches this. */
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
}

.dx-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.dx-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

/* Enhanced slider styling */
.dx-slider-handle {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

.dx-slider-handle:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Modern sidebar tree view items */
#treeview .dx-treeview-item-with-checkbox {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
}

#treeview .dx-treeview-item-with-checkbox:hover {
    background-color: rgba(0, 0, 0, 0.03) !important;
    transform: translateX(2px) !important;
}

#treeview .dx-treeview-item-with-checkbox.dx-state-selected {
    background: linear-gradient(90deg, #e5e5e6 0%, #d8d9da 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Enhanced header with subtle gradient */
#blue-strip {
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Modern input container */
.chat-inputs-container {
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%) !important;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Enhanced scrollbar with modern styling */
.right-side-chatboard-area::-webkit-scrollbar,
#chatMessageList::-webkit-scrollbar {
    width: 8px !important;
}

.right-side-chatboard-area::-webkit-scrollbar-thumb,
#chatMessageList::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d1d5db 0%, #c4c8cd 100%) !important;
    border-radius: 10px !important;
    border: 2px solid transparent !important;
    background-clip: padding-box !important;
}

.right-side-chatboard-area::-webkit-scrollbar-thumb:hover,
#chatMessageList::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9ca3af 0%, #8b92a0 100%) !important;
}

/* Smooth fade-in animation for new messages */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-novaluna-bot.message-new,
.message-user.message-new {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Enhanced focus states for accessibility */
*:focus-visible {
    outline: 2px solid var(--accent) !important;
    outline-offset: 2px !important;
    border-radius: 4px !important;
}

/* Modern button group styling */
.dx-button-group .dx-button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dx-button-group .dx-button.dx-state-selected {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    transform: scale(1.02) !important;
}

/* Enhanced dropdown/popup styling */
.dx-popup-wrapper .dx-popup {
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    backdrop-filter: blur(20px) !important;
}

/* Smooth sidebar transitions */
.resizable1 {
    transition: background-color 0.3s ease !important;
}

/* Modern code block styling */
.message-text pre {
    border-radius: 8px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Enhanced link styling */
.message-text a {
    color: var(--accent) !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent !important;
    transition: all 0.2s ease !important;
}

.message-text a:hover {
    color: var(--accent-hover) !important;
    border-bottom-color: var(--accent-hover) !important;
}

/* Modern list styling */
.message-text ul,
.message-text ol {
    padding-left: 1.75em !important;
}

.message-text li {
    margin: 0.5em 0 !important;
    position: relative !important;
}

.message-text ul li::marker {
    color: var(--accent) !important;
}

/* Table styling now lives in chat.css (.nv-table-scroll wrapper). The old
   rules here (border-radius + overflow:hidden + shadow at !important) fought
   the scroll wrapper and painted the detached-header "pill" look. */

/* Smooth loading states */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
}

/* Dark theme overrides, derived from diffing the legacy styles_day.css
 * vs styles_dark_grey.css forks against a common structural base (see
 * app-shell.css). Not currently reachable by users - the theme toggle
 * sets [data-theme] but dark mode is not yet exposed/polished (deferred);
 * this exists so the mechanism keeps working end-to-end. Selector-level
 * overrides, not design tokens - the abstract --surface-* and --text-*
 * dark values belong in the tokens.css [data-theme="dark"] block separately,
 * once Phase 3+ components actually consume those tokens. */

[data-theme="dark"] body,
[data-theme="dark"] html {
  background: #000;
}

[data-theme="dark"] .resizable {
  color: #bababa;
}

[data-theme="dark"] .resizable1 {
  background-color: var(--surface-sidebar);
  color: #FFFFFF;
}

[data-theme="dark"] .resizable2 {
  background-color: #1f2020;
}

/* Sidebar padding is theme-independent - see the .dx-treeview-node note
   below. This used to set 16px 12px in dark only, against the base rule's
   20px 15px 10px 15px, so the two themes framed the project list
   differently for no reason. */

[data-theme="dark"] .ui-resizable-e {
  right: 0px;
  background: #2b2b2b;
}

[data-theme="dark"] #treeview .dx-treeview-node {
  color: #fff !important;
}

[data-theme="dark"] .dxTreeView .dx-state-selected {
  background-color: #141c29;
}

[data-theme="dark"] .message-time-caption {
  color: #7d7c7c;
  background-color: #1f2020;
}

[data-theme="dark"] .message-user {
  background-color: var(--surface-raised);
  color: #FFffff;
}

[data-theme="dark"] .message-novaluna-bot {
  color: #dfdfdf;
  border: 1px solid #3d3d3d;
}

[data-theme="dark"] .chat-title {
  color: #dfdfdf;
}

[data-theme="dark"] .message-name {
  color: #FFffaa;
}

[data-theme="dark"] .message-sources {
  color: #FFFFFF;
}

[data-theme="dark"] .right-centered-div {
  color: white;
}

[data-theme="dark"] .document-page-number {
  color: #FFFFFF;
}

[data-theme="dark"] .novaluna-title {
  background-color: var(--surface-sidebar);
}

[data-theme="dark"] .dx-texteditor.dx-editor-filled .dx-placeholder::before,
[data-theme="dark"] .dx-texteditor.dx-editor-filled .dx-texteditor-input,
[data-theme="dark"] .dx-texteditor.dx-editor-outlined .dx-placeholder::before,
[data-theme="dark"] .dx-texteditor.dx-editor-outlined .dx-texteditor-input {
  color: #d0d0d0;
}

[data-theme="dark"] .dx-dropdowneditor-input-wrapper {
  background: var(--surface-sidebar);
}

[data-theme="dark"] div#question-textarea {
  background: #363636;
}

[data-theme="dark"] .dx-popup-content {
  padding: 12px !important;
}

[data-theme="dark"] .dx-popup-content li {
  padding: 8px 12px !important;
  margin: 2px 0 !important;
  border-radius: 6px !important;
  transition: background-color 0.15s ease !important;
}

[data-theme="dark"] .dx-popup-content li div {
  padding: 4px 8px !important;
}

[data-theme="dark"] div#chatMessageList .dx-texteditor-input-container input {
  background: #2b3e5d;
}

[data-theme="dark"] .dx-treeview-item-without-checkbox.dx-state-selected > .dx-treeview-item {
  background-color: #374d6f;
}

[data-theme="dark"] .dx-checkbox-icon {
  border-color: #1e2a3e;
}

[data-theme="dark"] .model-warning {
  color: #8e8ea0 !important;
  font-size: 12px !important;
  float: right !important;
}

[data-theme="dark"] .topic-custom-selected-item {
  background-color: #2b2b2b;
}

[data-theme="dark"] div#icon-send {
  color: #f0f0f0;
}

[data-theme="dark"] .basic-help-button-style {
  opacity: 0.65;
}

[data-theme="dark"] .basic-help-button-style .dx-button-content .dx-icon {
  color: #ffffff;
}

[data-theme="dark"] .detailed-tour-button-style {
  opacity: 0.45;
  background: var(--surface-sidebar);
}

[data-theme="dark"] .detailed-tour-button-style .dx-button-content .dx-icon {
  color: #ffffff;
}

[data-theme="dark"] .prev-chat-message-button-style {
  opacity: 0.45;
  background: var(--surface-sidebar);
}

[data-theme="dark"] .prev-chat-message-button-style .dx-button-content .dx-icon {
  color: #ffffff;
}

[data-theme="dark"] .next-chat-message-button-style {
  opacity: 0.45;
  background: var(--surface-sidebar);
}

[data-theme="dark"] .next-chat-message-button-style .dx-button-content .dx-icon {
  color: #ffffff;
}

[data-theme="dark"] #treeview-sources-container {
  z-index: 100;
}

[data-theme="dark"] .newtopic-button-style {
  background-color: var(--surface-sidebar);
}

[data-theme="dark"] .source-document-button-style {
  background: #1b2535;
}

[data-theme="dark"] .source-document-chunks-display-style {
  background: #273d5a;
}

[data-theme="dark"] .button-clipboard-copy-url-style {
  color: orange;
}

[data-theme="dark"] .message-thumbs-up-button-style {
  color: orange;
}

[data-theme="dark"] .message-thumbs-down-button-style {
  color: orange;
}

[data-theme="dark"] .button-open-document-style {
  color: orange;
}

[data-theme="dark"] .accuracy-creativity-style {
  color: white;
  border-top: 1px solid #6e6e6e;
}

[data-theme="dark"] .model-switch-style {
  background: #606060;
}

[data-theme="dark"] div#dropdown-content {
  background-color: var(--surface-raised);
}

[data-theme="dark"] div#settings-dropdown-toggle i {
  color: white;
}

[data-theme="dark"] #promptButton {
  border: 1px solid #1f2020;
  background-color: var(--surface-sidebar);
  color: #d7d7d7;
}

[data-theme="dark"] #icon-menu {
  background-color: var(--surface-raised);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .icon-menu-button {
  border: 1px solid #585757;
  background-color: #2c2c2c;
}

[data-theme="dark"] .down-arrow-button {
  background-color: var(--surface-sidebar);
}

[data-theme="dark"] .code-header {
  background-color: #3b3b3b;
}

[data-theme="dark"] pre[class*=language-] {
  background: #c9c9c9;
}

[data-theme="dark"] .dx-treeview-item-with-checkbox .dx-treeview-item {
  color: #e1e1e0 !important;
}

[data-theme="dark"] .top-icon-color .dx-icon {
  color: #f3f3f3;
}

[data-theme="dark"] .grid-title {
  color: #fff;
}

[data-theme="dark"] .question-button {
  background-color: #1c1c1c;
  border: .5px solid #565656;
}

[data-theme="dark"] .question-title {
  color: #e3e3e3;
}

[data-theme="dark"] .question-description {
  color: #e3e3e3;
}

[data-theme="dark"] .dx-scrollable-container {
  scrollbar-color: #535354 #151515;
}

[data-theme="dark"] .dx-scrollable-container::-webkit-scrollbar-track {
  background: #1e2739;
}

[data-theme="dark"] .dx-scrollable-container::-webkit-scrollbar-thumb {
  background-color: #336699;
  border: 3px solid #1e2739;
}

[data-theme="dark"] .welcome-para {
  color: #ffffff;
}

[data-theme="dark"] mark {
  color: #ffffff;
  background-color: #a83919;
}

[data-theme="dark"] .quick-tips-panel {
  background-color: var(--surface-card);
  color: var(--text-secondary);
}

[data-theme="dark"] .quick-tips-button {
  background-color: var(--surface-card);
  color: var(--text-secondary);
}

[data-theme="dark"] .source-popup-content {
  background-color: var(--surface-card);
  color: var(--text-primary);
}

[data-theme="dark"] .control-container label {
  color: var(--text-primary);
}

[data-theme="dark"] .message-user:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .message-novaluna-bot:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] div#button-newtopic:hover {
  box-shadow: 0 4px 12px rgba(5, 166, 240, 0.4) !important;
}

[data-theme="dark"] div#question-textarea:focus {
  box-shadow: 0 0 0 4px rgba(5, 166, 240, 0.2) !important;
  border-color: rgba(5, 166, 240, 0.5) !important;
}

[data-theme="dark"] #treeview .dx-treeview-node:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] body,
[data-theme="dark"] html {
  background: var(--surface-app) !important;
}

[data-theme="dark"] .resizable1 {
  background-color: var(--surface-sidebar) !important;
  border-right: 1px solid var(--surface-inset);
}

[data-theme="dark"] .resizable2 {
  background-color: var(--surface-app) !important;
}

[data-theme="dark"] .message-novaluna-bot {
  background-color: var(--surface-inset) !important;
  color: var(--text-primary) !important;
  border: 1px solid #3d3d3d !important;
  padding: 20px 24px !important;
  margin: 20px 0 !important;
}

[data-theme="dark"] .message-user {
  background-color: #343541 !important;
  color: var(--text-primary) !important;
  border: 1px solid #40414f !important;
  padding: 20px 24px !important;
  margin: 20px 0 !important;
}

[data-theme="dark"] .message-text {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .message-text h1,
[data-theme="dark"] .message-text h2,
[data-theme="dark"] .message-text h3,
[data-theme="dark"] .message-text h4 {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .message-text code {
  background-color: var(--surface-card) !important;
  color: #d4d4d4 !important;
}

[data-theme="dark"] .message-text pre {
  background-color: var(--surface-card) !important;
  color: #d4d4d4 !important;
}

[data-theme="dark"] .message-text pre code {
  color: #dddddd !important;
}

[data-theme="dark"] #treeview {
  color: #d1d5db !important;
}

/* Colour only. The padding/margin that used to live here applied in dark
   theme alone, and because [data-theme="dark"] #treeview .x outranks
   #treeview .x it beat the shared row geometry in shell.css - so dark rows
   were ~58px tall against ~36px in light, and the whole sidebar looked
   spread out. A theme should change colour, not layout. */
[data-theme="dark"] #treeview .dx-treeview-node {
  color: #d1d5db !important;
}

[data-theme="dark"] #treeview .dx-treeview-node:hover {
  background-color: var(--surface-inset) !important;
  color: #ffffff !important;
}

[data-theme="dark"] #treeview .dx-state-selected > .dx-treeview-item {
  color: #ffffff !important;
}

/* Geometry for these rows comes from shell.css in both themes - see the
   note above. The selected background is also shell.css's job (it uses the
   JS-applied .topic-custom-selected-item and deliberately neutralises
   dx-state-selected, which is repurposed for the multi-select checkboxes). */

[data-theme="dark"] #treeview .dx-treeview-item-with-checkbox.dx-state-selected .dx-checkbox-icon {
  border-color: rgba(255, 255, 255, 0.5) !important;
}

[data-theme="dark"] #treeview .dx-treeview-item-with-checkbox.dx-state-selected .dx-checkbox-checked .dx-checkbox-icon {
  border-color: #ffffff !important;
  background-color: #000000 !important;
}

[data-theme="dark"] .chat-inputs-container {
  background-color: var(--surface-app) !important;
  border-top: 1px solid var(--surface-inset) !important;
}

[data-theme="dark"] #question-textarea {
  background-color: #40414f !important;
  color: var(--text-primary) !important;
  border: 1px solid #565869 !important;
}

[data-theme="dark"] #blue-strip {
  background-color: var(--surface-app) !important;
  border-bottom: 1px solid var(--surface-inset) !important;
}

[data-theme="dark"] .novaluna-title .home-text {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .welcome_title {
  color: var(--text-primary) !important;
  font-size: 22px !important;
  font-weight: 500 !important;
  margin-bottom: 12px !important;
  line-height: 1.4 !important;
}

[data-theme="dark"] .welcome-para {
  color: #8e8ea0 !important;
}

[data-theme="dark"] .right-side-chatboard-area::-webkit-scrollbar-track,
[data-theme="dark"] #chatMessageList::-webkit-scrollbar-track {
  background: var(--surface-sidebar);
}

[data-theme="dark"] .right-side-chatboard-area::-webkit-scrollbar-thumb,
[data-theme="dark"] #chatMessageList::-webkit-scrollbar-thumb {
  background: #565869;
}

[data-theme="dark"] .right-side-chatboard-area::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] #chatMessageList::-webkit-scrollbar-thumb:hover {
  background: #6e6e80;
}

[data-theme="dark"] #customTopicTreeSearch {
  background: #000000;
  border-color: rgb(73 73 73);
}

[data-theme="dark"] .message-novaluna-bot,
[data-theme="dark"] .message-user {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24) !important;
}

[data-theme="dark"] .message-novaluna-bot:hover,
[data-theme="dark"] .message-user:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="dark"] #question-textarea {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] #question-textarea:focus {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .dx-button:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="dark"] .dx-button:active {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .dx-slider-handle {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .dx-slider-handle:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] #treeview .dx-treeview-item-with-checkbox:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] #treeview .dx-treeview-item-with-checkbox.dx-state-selected {
  background: linear-gradient(90deg, #343541 0%, #3d3f4e 100%) !important;
  box-shadow: 0 2px 8px rgba(52, 53, 65, 0.3) !important;
}

[data-theme="dark"] #blue-strip {
  background: linear-gradient(180deg, var(--surface-app) 0%, #1a1a1a 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .chat-inputs-container {
  background: linear-gradient(180deg, var(--surface-app) 0%, #1f1f1f 100%) !important;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .right-side-chatboard-area::-webkit-scrollbar-thumb,
[data-theme="dark"] #chatMessageList::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #565869 0%, #4a4b5a 100%) !important;
}

[data-theme="dark"] .right-side-chatboard-area::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] #chatMessageList::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6e6e80 0%, #5f6070 100%) !important;
}

[data-theme="dark"] .dx-button-group .dx-button.dx-state-selected {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .dx-popup-wrapper .dx-popup {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .message-text pre {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* dark table styling: chat.css owns it now */

[data-theme="dark"] .dx-popup-content li:hover {
  background-color: var(--surface-inset) !important;
}

[data-theme="dark"] .bottom-connect-drive {
  color: #e3e3e3;
}

[data-theme="dark"] .file-uploader-area {
  color: #c9c9c9;
}

[data-theme="dark"] .dx-slider-bar {
  position: relative;
  margin-right: 15px;
  margin-left: 15px;
  background: rgb(102 102 102 / 24%);
}

[data-theme="dark"] .dx-slider-range.dx-slider-range-visible {
  background: #f0f0f0;
}

[data-theme="dark"] div#collectionTreeView {
  background: #9b9b9b;
}

[data-theme="dark"] .dx-button-mode-outlined {
  background-color: var(--surface-sidebar);
}

/*!*****************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/chat.css ***!
  \*****************************************************************************************************************************/
/* Chat surface - the authoritative styling for chat messages.
 *
 * ChatGPT visual language (owner direction): assistant messages are
 * borderless prose sitting directly on the canvas - no card, no border,
 * no shadow, no avatar, no name row, no timestamps. User messages are
 * plain gray bubbles (light #F4F4F4 / dark #303030), right-aligned,
 * uniformly rounded (radius-xl), max ~70% width. Column is a narrow
 * centered 768px.
 *
 * Styles the shared class/id contract emitted by BOTH rendering paths:
 * js/chat/message-view.js (locally-generated messages) and the DB-stored
 * message templates (history). Loads after app-shell.css; several older
 * "enhancement" blocks in app-shell.css style the same selectors with
 * !important, so rules here match that weight where needed. The dark
 * block at the bottom re-asserts the no-chrome look against app-shell's
 * legacy dark rules (which add card borders/backgrounds at !important).
 *
 * Uses CSS logical properties throughout (RTL locales flip automatically).
 */

/* ---------- Chat column ---------- */

#chatMessageList .dx-list-item {
    background: transparent !important;
    border: none !important;
    max-width: 768px;
    margin-inline: auto;
    padding-inline: var(--space-5);
}

#chatMessageList .dx-list-item-content {
    padding: var(--space-2) 0 !important;
}

/* ---------- Turn separation ----------
   Without this, one turn's Sources sat flush against the next turn's
   question, so the eye couldn't tell where an exchange ended. A user
   message starts a new turn, so it carries the gap. Notices are excluded -
   they are not turns. */
#chatMessageList .dx-list-item:has(.message-user):not(:has(.chat-msg--notice)) {
    margin-block-start: var(--space-9);   /* 36px - roughly 3x the intra-turn gap */
}

#chatMessageList .dx-list-item:first-child:has(.message-user) {
    margin-block-start: 0;
}

/* ---------- Turn action row (copy / regenerate / vote) ----------
   Moved out of the answer body by arrangeMessageActions() so it ends the
   turn rather than separating the answer from its Sources. */
.nv-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-block-start: var(--space-2);
}

/* ---------- Assistant message: borderless prose ---------- */

.message-novaluna-bot {
    position: relative;
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: var(--space-2) 0 !important;
    margin: var(--space-2) 0 !important;
    font-size: var(--text-md);
    line-height: 1.75;
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

.message-novaluna-bot:hover {
    transform: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* ChatGPT shows no avatar and no name on assistant messages */
.message-novaluna-bot .message-image {
    display: none !important;
}

.message-novaluna-bot .message-name {
    display: none !important;
}

/* ---------- User message bubble ---------- */

.message-user {
    background-color: var(--surface-user-bubble) !important;
    color: var(--text-primary) !important;
    border: none !important;
    border-radius: var(--radius-xl) !important;
    border-end-end-radius: var(--radius-xl) !important;
    box-shadow: none !important;
    padding: var(--space-2) var(--space-5) !important;
    margin: var(--space-2) 0 var(--space-2) auto !important;
    margin-inline-start: auto !important;
    max-width: 70%;
    width: fit-content;
    font-size: var(--text-md) !important;
    line-height: 1.75 !important;
    font-style: normal !important;
    display: block !important;
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

.message-user:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* No sender label, no avatar on user bubbles (ChatGPT shows neither) */
.message-user .message-name {
    display: none !important;
}

.message-user .message-image {
    display: none !important;
}

/* ---------- System notices (postMessage) ---------- */

.chat-msg--notice .message-user {
    background-color: transparent !important;
    color: var(--text-muted) !important;
    border: none !important;
    border-radius: var(--radius-full) !important;
    margin-inline: auto !important;
    max-width: 80%;
    text-align: center;
    font-size: var(--text-sm) !important;
    padding: var(--space-1) var(--space-4) !important;
}

.chat-msg--notice .message-name {
    display: none;
}

/* ---------- Message text & markdown ---------- */

.message-text {
    color: inherit !important;
    line-height: 1.75 !important;
    font-weight: 400 !important;
    word-wrap: break-word;
    white-space: pre-wrap;
    margin: 0 !important;
}

.message-text p { margin: 0.75em 0 !important; line-height: 1.75 !important; }
.message-text p:first-child { margin-top: 0 !important; }
.message-text p:last-child { margin-bottom: 0 !important; }

.message-text ul,
.message-text ol {
    margin: 0.75em 0 !important;
    padding-inline-start: 1.5em !important;
    line-height: 1.75 !important;
}

.message-text li { margin: 0.4em 0 !important; }

.message-text h1,
.message-text h2,
.message-text h3,
.message-text h4 {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    margin: 1.2em 0 0.5em !important;
    line-height: 1.35 !important;
}

.message-text h1 { font-size: var(--text-2xl) !important; }
.message-text h2 { font-size: 19px !important; }
.message-text h3 { font-size: var(--text-md) !important; }
.message-text h4 { font-size: var(--text-md) !important; }

/* Links stay blue in prose (ChatGPT keeps blue links even though the
   action accent is black) */
.message-text a {
    color: #2964AA;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.message-text a:hover { color: #1D4E85; }

/* Markdown section rules: quiet hairlines, tight rhythm. The default <hr>
   (full-width groove with large margins) stretched compact answers into
   long scrolls of near-empty bands. */
.message-text hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 1.1em 0;
}

.message-text blockquote {
    border-inline-start: 2px solid var(--border-strong);
    margin: 0.8em 0;
    padding: 2px 0 2px var(--space-4);
    color: var(--text-secondary);
}

/* Wide tables scroll inside this wrapper (added by wrapTablesForScroll in
   index.js). Never display:block the <table> itself - that splits thead and
   tbody into separate anonymous table boxes with independently-sized columns,
   detaching the header row from the columns it labels. */
.nv-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    margin: 0.9em 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.message-text table {
    border-collapse: collapse;
    margin: 0;
    width: 100%;
    font-size: var(--text-base);
}

/* Legacy/unwrapped fallback keeps its own frame */
.message-text > table,
.message-text :not(.nv-table-scroll) > table {
    margin: 0.9em 0;
    max-width: 100%;
}

.message-text th,
.message-text td {
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 14px;
    text-align: start;
    vertical-align: top;
}

.message-text thead th {
    background: var(--surface-inset);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    white-space: nowrap;
}

.message-text tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- Inline source citations ----------
   Built by renderInlineCitations() from the model's [filing: …] / [source: …]
   / [Bloomberg: …] tags, which previously landed in the prose as raw text.
   Quiet chip so a sentence with three citations still reads as a sentence;
   the full reference (incl. the verifying quote) is in the tooltip. */
.nv-citation {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    margin-inline: 2px;
    padding: 1px 6px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full, 999px);
    background: var(--surface-inset);
    color: var(--text-secondary);
    font-size: 0.78em;
    line-height: 1.5;
    white-space: nowrap;
    vertical-align: baseline;
    cursor: help;
    transition: background-color var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
}

.nv-citation:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--text-primary);
}

.nv-citation-mark {
    color: var(--accent);
    font-weight: 700;
}

[data-theme="dark"] .nv-citation {
    background: #2A2A2A;
    border-color: #4A4A4A;
    /* Was var(--text-secondary) - too close to the chip fill to read at this size. */
    color: #D4D7DC;
}

[data-theme="dark"] .nv-citation:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--text-primary);
}

/* Numbered reference tied to a Sources card below. */
.nv-citation--linked {
    padding: 0 6px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}

.nv-citation--linked:hover,
.nv-citation--linked:focus-visible {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

/* ---------- Sources ---------- */

.nv-sources-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-block-end: var(--space-2);
}

.nv-sources-heading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-block-end: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none !important;
    cursor: pointer;
}

.nv-sources-heading:hover { color: var(--text-primary); }

.nv-sources-caret {
    color: var(--text-muted);
    font-size: 11px;
    transition: transform var(--dur-fast) var(--ease-out);
}

.message-sources.is-open .nv-sources-caret { transform: rotate(180deg); }

.nv-sources-header .nv-sources-heading { margin-block-end: 0; }

/* Search sits with the section heading now, not among the source rows. */
.nv-sources-search {
    margin-inline-start: auto;
    flex: 0 0 auto;
}

/* Verification tick from verifyCitationQuote(): the quoted sentence was
   found in (or is missing from) the retrieved passage it points at. */
.nv-citation-tick {
    margin-inline-start: 3px;
    font-size: 0.9em;
    font-weight: 700;
    color: var(--status-success, #15803D);
}

.nv-citation-tick--warn { color: var(--status-warning, #B45309); }

.nv-citation--linked.is-unverified {
    border-style: dashed;
}

/* Retrieved but never cited: present for transparency, visually secondary. */
.nv-sources-more {
    list-style: none;
    margin-block-start: 2px;
}

.nv-sources-more-toggle {
    appearance: none;
    border: none;
    background: transparent;
    padding: 4px 2px;
    font-size: var(--text-xs);
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nv-sources-more-toggle:hover { color: var(--text-secondary); }

.nv-sources--nested {
    display: none;
    margin-block-start: 6px;
}

.nv-sources-more.is-open .nv-sources--nested { display: flex; }

.nv-source--uncited { opacity: 0.72; }

.nv-source--uncited .nv-source-badge {
    background: var(--surface-inset);
    color: var(--text-muted);
}

/* No `display` here: the base rule sits after .nv-sources--nested in this
   file, so declaring display:flex on it overrode the nested list's
   display:none at equal specificity and "Also retrieved" was always open. */
.nv-sources {
    list-style: none;
    margin: 0 0 var(--space-2);
    padding: 0;
    flex-direction: column;
    gap: 6px;
}

/* Sources are supporting evidence, not the answer - collapsed until asked
   for, so a two-line answer isn't buried under source chrome. */
.nv-sources-root { display: none; }
.message-sources.is-open .nv-sources-root { display: flex; }

.nv-source {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
    overflow: hidden;
    transition: border-color var(--dur-fast) var(--ease-out),
                background-color var(--dur-fast) var(--ease-out);
}

/* Highlighted while hovering the matching [n] marker in the prose. */
.nv-source.is-cited-hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.nv-source-head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 10px;
    cursor: pointer;
    min-width: 0;
}

.nv-source-head:hover {
    background: var(--surface-inset);
}

.nv-source-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: var(--radius-full, 999px);
    background: var(--accent-subtle);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.nv-source-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-sm);
    font-weight: 500;
    font-style: normal;   /* the legacy chips were italic - harder to scan */
    color: var(--text-primary);
}

.nv-source-meta {
    flex: 0 0 auto;
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.nv-source-toggle {
    flex: 0 0 auto;
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out);
}

.nv-source-toggle:hover { color: var(--text-primary); }
.nv-source.is-open .nv-source-toggle { transform: rotate(180deg); }

.nv-source-body {
    display: none;
    padding: 0 10px 10px;
    border-block-start: 1px solid var(--border-subtle);
}

.nv-source.is-open .nv-source-body { display: block; }

/* The template's own chip row. The legacy "Sources" link toggles its inline
   display, so this needs !important to stay hidden behind the cards. */
.nv-legacy-sources { display: none !important; }

/* Passages are rendered from the chunk data (see buildMessageSourcesUI). */
.nv-passage { padding-block-start: 8px; }
.nv-passage + .nv-passage {
    margin-block-start: 8px;
    border-block-start: 1px solid var(--border-subtle);
}

.nv-passage-page {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-block-end: 2px;
}

.nv-passage-text {
    margin: 0 !important;
    font-size: var(--text-sm);
    line-height: 1.6 !important;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

[data-theme="dark"] .nv-source {
    background: var(--surface-inset);
    border-color: var(--border-strong);
}

[data-theme="dark"] .nv-source-head:hover { background: var(--surface-raised); }
[data-theme="dark"] .nv-source-title { color: var(--text-primary); }

[data-theme="dark"] .nv-source.is-cited-hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

/* ---------- Proposed edits (edit_suggestions payload) ----------
   Collapsed by default: these payloads are long, and in this app they are
   read-only - the edits apply to a Workbench document. */
.nv-edits {
    margin-block-start: var(--space-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
    /* .message-text is white-space: pre-wrap; this block is real markup. */
    white-space: normal;
    overflow: hidden;
}

.nv-edits--pending {
    padding: 8px 12px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-style: italic;
}

.nv-edits-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    appearance: none;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-family: inherit;
    font-size: var(--text-sm);
    color: var(--text-primary);
    text-align: start;
    cursor: pointer;
}

.nv-edits-toggle:hover { background: var(--surface-inset); }

.nv-edits-caret {
    color: var(--text-muted);
    transition: transform var(--dur-fast) var(--ease-out);
}

.nv-edits.is-open .nv-edits-caret { transform: rotate(180deg); }

.nv-edits-title { font-weight: 600; }

.nv-edits-target {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.nv-edits-note {
    display: none;
    margin: 0 !important;
    padding: 0 12px 6px;
    font-size: var(--text-xs) !important;
    color: var(--text-muted);
}

.nv-edits-list {
    display: none;
    list-style: none;
    margin: 0 !important;
    padding: 0 12px 12px !important;
}

.nv-edits.is-open .nv-edits-note,
.nv-edits.is-open .nv-edits-list { display: block; }

.nv-edit {
    padding-block: 8px;
    margin: 0 !important;
}

.nv-edit + .nv-edit { border-block-start: 1px solid var(--border-subtle); }

.nv-edit-head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-block-end: 4px;
}

.nv-edit-badge {
    flex: 0 0 auto;
    padding: 1px 7px;
    border: 1px solid;
    border-radius: var(--radius-full, 999px);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nv-edit-badge--insert { border-color: var(--status-success); color: var(--status-success); }
.nv-edit-badge--delete { border-color: var(--status-danger);  color: var(--status-danger); }
.nv-edit-badge--replace { border-color: var(--accent);        color: var(--accent); }

.nv-edit-explanation {
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-style: italic;
}

.nv-edit-copy {
    flex: 0 0 auto;
    appearance: none;
    border: 1px solid var(--border-subtle);
    background: transparent;
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    cursor: pointer;
}

.nv-edit-copy:hover { background: var(--surface-inset); color: var(--text-primary); }

.nv-edit-line {
    display: flex;
    gap: var(--space-2);
    align-items: baseline;
    margin-block-start: 3px;
    font-size: var(--text-sm);
}

.nv-edit-label {
    flex: 0 0 auto;
    min-width: 84px;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.nv-edit-line code {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    white-space: pre-wrap;
    background: var(--surface-inset) !important;
    border-radius: var(--radius-sm) !important;
    padding: 4px 8px !important;
    font-size: 0.85em !important;
    color: var(--text-secondary) !important;
}

.nv-edit-line--new code { color: var(--text-primary) !important; }

[data-theme="dark"] .nv-edits {
    background: var(--surface-inset);
    border-color: var(--border-strong);
}

[data-theme="dark"] .nv-edits-toggle:hover { background: var(--surface-raised); }
[data-theme="dark"] .nv-edit + .nv-edit { border-block-start-color: var(--border-strong); }
[data-theme="dark"] .nv-edit-line code { background: var(--surface-card) !important; }

/* Inline code - quiet mono, no alarm color */
.message-text code {
    background-color: var(--surface-inset) !important;
    color: var(--text-primary) !important;
    padding: 2px 5px !important;
    border-radius: 6px !important;
    font-family: var(--font-mono) !important;
    font-size: 0.875em !important;
}

/* ---------- Code blocks ---------- */

.code-container {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: var(--space-3) 0;
}

.code-container .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-inset) !important;
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-1) var(--space-3) !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.code-container .code-header .language {
    color: var(--text-muted) !important;
    font-size: var(--text-xs);
    font-family: var(--font-sans);
    text-transform: lowercase;
    letter-spacing: 0;
}

.code-container .code-header .copy-link {
    color: var(--text-secondary) !important;
    font-size: var(--text-xs);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out);
}

.code-container .code-header .copy-link:hover { color: var(--text-primary) !important; }

.message-text pre,
.code-container pre {
    background-color: var(--neutral-50) !important;
    color: var(--text-primary) !important;
    padding: var(--space-4) !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-x: auto !important;
    line-height: 1.6 !important;
    font-family: var(--font-mono) !important;
    font-size: 13px !important;
}

.message-text pre code,
.code-container pre code {
    background: none !important;
    padding: 0 !important;
    color: inherit !important;
    font-family: var(--font-mono) !important;
    font-size: inherit !important;
}

/* ---------- Reasoning ("thinking") text ---------- */

.message-reasoning-text {
    font-size: var(--text-base);
    color: var(--text-muted) !important;
    border-inline-start: 2px solid var(--border-strong);
    padding-inline-start: var(--space-3);
    margin-block: var(--space-2);
    line-height: 1.6;
}

.message-reasoning-text:empty { display: none; }

/* ---------- Streaming cursor (ChatGPT-style filled dot) ---------- */

.message-text.writing::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-inline-start: 4px;
    vertical-align: baseline;
    border-radius: 50%;
    background: var(--text-primary);
    animation: chat-caret-blink 1s steps(2, start) infinite;
}

@keyframes chat-caret-blink {
    to { visibility: hidden; }
}

/* ---------- Timestamps ---------- */
/* ChatGPT shows none. The elements stay in the DOM (JS writes into
   them) - they're just not displayed. */

.message-datetime {
    display: none !important;
}

/* ---------- Sources / citation chips ---------- */

.message-sources {
    color: var(--text-secondary) !important;
    margin-block-start: var(--space-1);
    font-size: var(--text-sm);
}

.message-sources > a[id^="document-link-"] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary) !important;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    padding: var(--space-1) 0;
}

.message-sources > a[id^="document-link-"]:hover {
    color: var(--text-primary) !important;
    text-decoration: underline;
}

/* Per-source chips (history template renders these into the file list) -
   quiet bordered pills; hover lifts to the ink-teal accent so citations
   read as first-class research artifacts rather than throwaway links. */
.source-document-button-style {
    display: inline-flex !important;
    align-items: center;
    background: var(--surface-card) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full) !important;
    font-size: var(--text-xs) !important;
    font-weight: 500;
    font-feature-settings: var(--font-feature-tabular); /* align IDs/tickers */
    padding: 3px 12px !important;
    margin: 3px 4px 3px 0 !important;
    margin-inline-end: 4px !important;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
}

.source-document-button-style:hover {
    background: var(--accent-subtle) !important;
    border-color: var(--accent) !important;
    color: var(--text-primary) !important;
}

/* ---------- Research-native answer components ----------
 * Utility classes the answer renderer can emit inside .message-text to
 * present market data the way an analyst expects. Beating a generalist
 * chat app happens here: metrics and citations as structured chips, not
 * blue underlines and bare prose.
 */

/* Citation pill: e.g. "Bloomberg · BJ928949". Preferred over the legacy
   underlined inline link. Add class "cite-pill" to the emitted anchor. */
.message-text a.cite-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: baseline;
    padding: 1px 8px;
    margin-inline: 1px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    background: var(--surface-inset);
    color: var(--text-secondary);
    font-size: 0.8125em;
    font-weight: 500;
    font-feature-settings: var(--font-feature-tabular);
    text-decoration: none;
    line-height: 1.4;
    transition: background var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
}

.message-text a.cite-pill::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.message-text a.cite-pill:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--text-primary);
    text-decoration: none;
}

/* Metric chip: ticker / OAS / maturity etc. Structure:
   <span class="metric-chip"><span class="metric-chip__label">OAS</span>
   <span class="metric-chip__value">412</span></span> */
.metric-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 1px 8px;
    margin-inline: 1px;
    border-radius: var(--radius-sm);
    background: var(--accent-subtle);
    line-height: 1.4;
    white-space: nowrap;
}

.metric-chip__label {
    font-size: 0.6875em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.metric-chip__value {
    font-family: var(--font-tabular);
    font-feature-settings: var(--font-feature-tabular);
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
}

/* Chart / table slot: full-width viz above the narrative for scatter,
   curve, or table asks. Renderer wraps the visualization in .answer-viz. */
.answer-viz {
    margin: var(--space-3) 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    padding: var(--space-3);
    overflow: hidden;
}

.answer-viz__caption {
    margin-block-start: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.button-clipboard-copy-url-style,
.button-open-document-style {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    margin-inline-end: var(--space-2);
    transition: color var(--dur-fast) var(--ease-out);
}

.button-clipboard-copy-url-style:hover,
.button-open-document-style:hover {
    color: var(--text-primary);
}

/* Expanded chunk panel */
.source-document-chunks-display-style {
    background: var(--surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    margin-block: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ---------- Nova log (status line during streaming) ---------- */

.message-nova-log-style {
    color: var(--text-muted) !important;
    font-size: var(--text-xs) !important;
}

/* ---------- Message actions (thumbs / copy) ----------
 * Quiet by default, full-strength on message hover/focus. Never fully
 * hidden (min opacity keeps them discoverable and accessible). */
.message-thumbs-up-button-style,
.message-thumbs-down-button-style,
.message-copy-clipboard-button-style {
    color: var(--text-secondary) !important;
    /* ChatGPT's action icons sit at a solid mid-grey at rest; 0.6 on muted
       read as disabled. */
    opacity: 0.85;
    font-size: var(--text-base);
    padding: 4px;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out),
                opacity var(--dur-fast) var(--ease-out),
                background-color var(--dur-fast) var(--ease-out);
    border-radius: var(--radius-sm);
}

.chat-msg--bot:hover .message-thumbs-up-button-style,
.chat-msg--bot:hover .message-thumbs-down-button-style,
.chat-msg--bot:hover .message-copy-clipboard-button-style,
.message-novaluna-bot:hover ~ * .message-copy-clipboard-button-style {
    opacity: 1;
}

.message-thumbs-up-button-style:hover,
.message-thumbs-down-button-style:hover,
.message-copy-clipboard-button-style:hover {
    color: var(--text-primary) !important;
    opacity: 1;
}

/* ---------- Conversation branching (edit / regenerate / sibling nav) ----------
 * User-bubble action row sits under the bubble, right-aligned; quiet by
 * default, revealed on row hover/focus (the bot-only reveal above doesn't
 * cover user bubbles). */
.message-user-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-1);
    margin: var(--space-1) 0 var(--space-2) auto;
    width: fit-content;
    /* Same rest visibility as the assistant-row icons - 0.15 combined with
       the buttons' own 0.7 left these effectively invisible until hover. */
    opacity: 0.85;
    transition: opacity var(--dur-fast) var(--ease-out);
}

.dx-list-item:hover .message-user-actions,
.message-user-actions:focus-within {
    opacity: 1;
}

.message-action-icon-button {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-sm);
    line-height: 1;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 1; /* the container carries the rest-state fade */
    transition: color var(--dur-fast) var(--ease-out),
                opacity var(--dur-fast) var(--ease-out);
}

.message-action-icon-button:hover:not(:disabled) {
    color: var(--text-primary);
    opacity: 1;
}

.message-action-icon-button:disabled {
    opacity: 0.25;
    cursor: default;
}

.thread-sibling-nav,
.thread-assistant-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

.thread-sibling-pos {
    color: var(--text-muted);
    font-size: var(--text-xs);
    min-width: 2.2em;
    text-align: center;
    user-select: none;
}

.chat-msg--bot:hover .thread-assistant-actions .message-action-icon-button,
.thread-assistant-actions:focus-within .message-action-icon-button {
    opacity: 1;
}

/* Inline edit inside the user bubble */
.message-user--editing {
    max-width: 100%;
    width: 100%;
}

.edit-message-textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 4.5em;
    resize: vertical;
    border: none;
    outline: none;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
}

.edit-message-controls {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.edit-message-cancel,
.edit-message-send {
    appearance: none;
    font-size: var(--text-sm);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full, 999px);
    cursor: pointer;
    transition: opacity var(--dur-fast) var(--ease-out);
}

.edit-message-cancel {
    border: 1px solid var(--border-default, var(--text-muted));
    background: var(--surface-primary, transparent);
    color: var(--text-primary);
}

.edit-message-send {
    border: 1px solid transparent;
    background: var(--text-primary);
    color: var(--surface-primary, #fff);
}

.edit-message-cancel:hover,
.edit-message-send:hover {
    opacity: 0.85;
}

/* ---------- Motion budget #3: new assistant message settles in ----------
 * Completed/streaming-in messages fade + rise slightly once, no bounce. */
.message-novaluna-bot.message-new {
    animation: nova-msg-settle var(--dur-slow) var(--ease-out);
}

@keyframes nova-msg-settle {
    from { opacity: 0.4; transform: translateY(4px); }
    to   { opacity: 1;   transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .message-novaluna-bot.message-new,
    #treeview .dx-state-selected > .dx-treeview-item::before,
    .topic-custom-selected-item::before,
    .question-box-area {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Dark theme ---------- */
/* ChatGPT dark: #212121 canvas, #303030 user bubble, #0D0D0D code body.
   Re-asserts the no-chrome assistant look against app-shell's legacy
   dark rules, which add card borders/backgrounds at !important. */

[data-theme="dark"] .message-novaluna-bot {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border: none !important;
    box-shadow: none !important;
    padding: var(--space-2) 0 !important;
    margin: var(--space-2) 0 !important;
}

[data-theme="dark"] .message-user {
    background-color: var(--surface-user-bubble) !important;
    color: var(--text-primary) !important;
    border: none !important;
    /* re-assert layout vs app-shell's legacy dark block */
    padding: var(--space-2) var(--space-5) !important;
    margin: var(--space-2) 0 var(--space-2) auto !important;
    margin-inline-start: auto !important;
}

[data-theme="dark"] .chat-msg--notice .message-user {
    background-color: transparent !important;
    color: var(--text-muted) !important;
    border: none !important;
    /* keep notices centered - the dark .message-user rule above sets
       margin-inline-start auto at equal weight and later position */
    margin-inline: auto !important;
}

[data-theme="dark"] .message-text { color: inherit !important; }

[data-theme="dark"] .message-text h1,
[data-theme="dark"] .message-text h2,
[data-theme="dark"] .message-text h3,
[data-theme="dark"] .message-text h4 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .message-text a { color: #7AB7FF; }
[data-theme="dark"] .message-text a:hover { color: #A3CCFF; }

[data-theme="dark"] .message-text code {
    background-color: var(--surface-inset) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .message-text pre,
[data-theme="dark"] .code-container pre {
    background-color: #0B0D0F !important;
    color: var(--text-primary) !important;
}

/* Prism's light theme stamps `text-shadow: 0 1px #fff` on code and a
   translucent white background on some token classes - on the near-black
   dark code body those render as boxy white halos behind tokens. */
[data-theme="dark"] .message-text pre code,
[data-theme="dark"] .code-container pre code,
[data-theme="dark"] .message-text pre .token,
[data-theme="dark"] .code-container pre .token {
    text-shadow: none !important;
    background: none !important;
}

[data-theme="dark"] .code-container { border-color: var(--border-subtle); }

[data-theme="dark"] .code-container .code-header {
    background: var(--surface-card) !important;
    border-bottom-color: var(--border-subtle);
}

[data-theme="dark"] .message-text th { background: var(--surface-inset); }
[data-theme="dark"] .message-text th,
[data-theme="dark"] .message-text td { border-color: var(--border-subtle); }

/* Prism ships a light theme (dark tokens on light bg); on the new
   near-black dark code body those token colors are illegible. Minimal
   dark syntax palette, ChatGPT-ish. */
[data-theme="dark"] .message-text pre .token.comment,
[data-theme="dark"] .message-text pre .token.prolog,
[data-theme="dark"] .message-text pre .token.cdata { color: var(--text-muted); }
[data-theme="dark"] .message-text pre .token.punctuation { color: var(--text-secondary); }
[data-theme="dark"] .message-text pre .token.keyword,
[data-theme="dark"] .message-text pre .token.atrule,
[data-theme="dark"] .message-text pre .token.attr-value { color: #7AB7FF; }
[data-theme="dark"] .message-text pre .token.function,
[data-theme="dark"] .message-text pre .token.class-name { color: #E5C07B; }
[data-theme="dark"] .message-text pre .token.string,
[data-theme="dark"] .message-text pre .token.char,
[data-theme="dark"] .message-text pre .token.inserted { color: #98C379; }
[data-theme="dark"] .message-text pre .token.number,
[data-theme="dark"] .message-text pre .token.boolean,
[data-theme="dark"] .message-text pre .token.constant { color: #D19A66; }
[data-theme="dark"] .message-text pre .token.operator,
[data-theme="dark"] .message-text pre .token.entity,
[data-theme="dark"] .message-text pre .token.url { color: var(--text-secondary); background: none; }
[data-theme="dark"] .message-text pre .token.deleted,
[data-theme="dark"] .message-text pre .token.important { color: #E06C75; }

[data-theme="dark"] .message-text.writing::after {
    background: var(--text-primary);
}

[data-theme="dark"] .message-sources { color: var(--text-secondary) !important; }

[data-theme="dark"] .message-sources > a[id^="document-link-"] {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .message-sources > a[id^="document-link-"]:hover {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .source-document-button-style {
    background: var(--surface-card) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-subtle);
}

[data-theme="dark"] .source-document-button-style:hover {
    background: var(--accent-subtle) !important;
    border-color: var(--accent) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .source-document-chunks-display-style {
    background: var(--surface-card);
    border-color: var(--border-subtle);
    color: var(--text-secondary);
}

[data-theme="dark"] .message-reasoning-text {
    color: var(--text-muted) !important;
    border-inline-start-color: var(--border-strong);
}

/* ---------- History-load skeleton rows ----------
 * Shown at the top of #chatMessageList while onPageLoading (index.js)
 * fetches older messages for the current topic - that fetch previously
 * had zero visual feedback since the list is populated by hand
 * (listWidget.option("items", ...)) rather than through DevExtreme's
 * own data-loading hooks, which is what normally drives its built-in
 * load indicator. */

.chat-skeleton-row {
    max-width: 768px;
    margin-inline: auto;
    padding-inline: var(--space-5);
    padding-block: var(--space-2);
}

.chat-skeleton-row .chat-skeleton-card {
    height: 64px;
    border-radius: var(--radius-lg);
    background: linear-gradient(
        100deg,
        var(--surface-inset) 30%,
        var(--surface-app) 50%,
        var(--surface-inset) 70%
    );
    background-size: 200% 100%;
    animation: chat-skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes chat-skeleton-shimmer {
    from { background-position: 150% 0; }
    to   { background-position: -50% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .chat-skeleton-row .chat-skeleton-card {
        animation: none;
        background: var(--surface-inset);
    }
}

[data-theme="dark"] .chat-skeleton-row .chat-skeleton-card {
    background: linear-gradient(
        100deg,
        var(--surface-inset) 30%,
        var(--surface-app) 50%,
        var(--surface-inset) 70%
    );
    background-size: 200% 100%;
}

/* ---------- Custom list: rendering perf ----------
   Off-screen messages skip layout and paint entirely; the intrinsic
   size keeps the native scrollbar geometry stable. Long histories go
   from full-document layout cost to near-zero for everything outside
   the viewport. */
#chatMessageList .dx-list-item {
    content-visibility: auto;
    contain-intrinsic-size: auto 90px;
}

/*!*********************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/composer.css ***!
  \*********************************************************************************************************************************/
/* Composer - ChatGPT-style single pill: one rounded (28px) gray container
 * (light #F4F4F4 / dark #303030, no border, no focus ring) holding mic,
 * textarea, upload, and a circular black (dark: white) send button.
 * Control chips (prompt chain, collection, filter) sit in a quiet ghost
 * row above the pill. Disclaimer centered below, 12px gray.
 *
 * CSS-only restructure: every element id and the JS wiring stay exactly
 * as they are in index.html - this file re-lays-out the existing DOM with
 * flexbox and overrides the legacy absolute-positioning offsets
 * (:dir(ltr) left:-113px etc.) and prior "enhancement" styling at equal
 * !important weight. The position fixes for #question-textarea (its own
 * class sets position:absolute), .record-button (legacy left:-60px), and
 * the DevExtreme Material underline suppression are load-bearing - do
 * not remove them when restyling. Logical properties throughout for RTL.
 */

/* ---------- Container: center on the chat column ---------- */

.chat-inputs-container {
    background: transparent !important;
    border-top: none !important;
    box-shadow: none !important;
    padding: 0 var(--space-5) var(--space-2) !important;
    max-width: 808px; /* 768px column + gutters */
    margin-inline: auto;
}

/* ---------- Controls row (ghost chips above the pill) ---------- */

.question-toolbar-style {
    position: static !important;
    width: 100% !important;
    height: auto !important; /* media queries set 30px, overflowing onto the card */
    text-align: start !important;
}

.question-tool-strip-style {
    position: relative !important; /* anchor for the prompt-menu popover */
    inset-inline: auto !important; /* kill left:-113px / right:113px legacy offsets */
    left: auto !important;
    right: auto !important;
    max-width: none !important;
    height: auto !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding-block: var(--space-2) var(--space-1);
}

/* Prompt-chain selector - previously position:absolute at the viewport
   edge (clipped at 1280px). Now a quiet ghost chip. */
#promptButton {
    position: static !important;
    display: inline-flex !important;
    align-items: center;
    gap: var(--space-2);
    height: 32px !important;
    padding: 0 var(--space-3) !important;
    background: transparent !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-full) !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-sans) !important;
    font-size: var(--text-sm) !important;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out);
}

#promptButton:hover {
    background: var(--surface-inset) !important;
    border-color: var(--border-subtle) !important;
    box-shadow: none;
}

#promptButton .selected-icon { margin-inline-end: 0 !important; }

/* Prompt menu popover (opened by toggleMenu(); JS sets inline
   display:flex and right:-10% - the !important below outweighs the
   inline right so the menu stays inside the viewport) */
#icon-menu.grid-menu {
    position: absolute;
    inset-inline-end: 0 !important;
    right: auto !important;
    bottom: calc(100% + 8px);
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    width: min(420px, calc(100vw - 24px));
    max-height: 400px;
    overflow-y: auto;
}

/* Prompt-chain search: sticky at the top of the scrolling menu so it
   stays reachable while filtering long grouped lists. */
.prompt-menu-search {
    position: sticky;
    top: calc(-1 * var(--space-2));
    /* No negative top margin: the header row now sits above this, and the
       old value pulled the search bar up over it. */
    margin: 0 calc(-1 * var(--space-2)) var(--space-1);
    padding: var(--space-2);
    background: var(--surface-raised);
    z-index: 1;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.prompt-menu-search input {
    width: 100%;
    height: 32px;
    padding: 0 var(--space-3);
    background: var(--surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--text-primary);
    outline: none;
    box-sizing: border-box;
}

.prompt-menu-search input:focus {
    border-color: var(--border-strong);
}

.prompt-menu-search input::placeholder { color: var(--text-muted); }

.prompt-menu-empty {
    padding: var(--space-3);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Prompt Groups: collapsible sections matching admin "Prompt Groups" */
.prompt-group-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.prompt-group-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    margin: 0;
    padding: var(--space-1) var(--space-2);
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: start;
    cursor: pointer;
}

.prompt-group-header:hover {
    background: var(--surface-inset);
}

.prompt-group-chevron {
    flex-shrink: 0;
    width: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.15s ease;
}

.prompt-group-section.is-collapsed .prompt-group-chevron {
    transform: rotate(-90deg);
}

.prompt-group-section.is-collapsed .prompt-group-items {
    display: none;
}

.prompt-group-icon {
    flex-shrink: 0;
    font-size: var(--text-sm);
    line-height: 1;
}

.prompt-group-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prompt-group-count {
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.prompt-group-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-1);
}

/* Header above the search field: names the popup and states the mechanics
   ("choose one or more") that the old checkbox row implied but never said. */
.prompt-menu-header {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2) 0;
}

.prompt-menu-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.prompt-menu-subtitle {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Prompt cards. The whole card is the button; selection is worn as an
   accent border + check badge instead of a raw checkbox (the checkbox
   stays in the DOM, hidden, purely for the change plumbing). Specificity
   note: #icon-menu prefix outweighs the legacy .icon-menu-button rules in
   app-shell.css and prompt_menu.css, which disagree on flex-direction. */
#icon-menu .icon-menu-button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--space-3) var(--space-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface-primary, transparent);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    transition: border-color var(--dur-fast) var(--ease-out),
                background-color var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
}

#icon-menu .icon-menu-button:hover {
    background-color: var(--surface-inset);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

#icon-menu .icon-menu-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

#icon-menu .icon-menu-button .prompt-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

#icon-menu .icon-menu-button .icon {
    font-size: 22px;
    line-height: 1;
    margin: 0;
}

#icon-menu .icon-menu-button > div:last-child {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#icon-menu .icon-menu-button.is-selected {
    border-color: var(--accent);
    background: var(--accent-subtle);
    color: var(--text-primary);
}

#icon-menu .icon-menu-button.is-selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    inset-inline-end: 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

/* Collection / filter selectors as compact quiet controls */
.treeview-container {
    display: flex !important;
    align-items: center;
    gap: var(--space-2);
    position: static !important;
}

.collections-view,
.filter-view {
    position: static !important;
    inset-inline: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
    width: auto !important;
    min-width: 180px;
    max-width: 300px;
}

/* ---------- The pill ---------- */

.question-box-area {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 52px;
    margin: 0 !important;
    padding: var(--space-2) var(--space-3) !important;
    display: flex !important;
    align-items: flex-end;
    flex-wrap: wrap; /* full-width children (disclaimer, progress, file list) drop to their own row */
    gap: var(--space-2);
    background: var(--surface-raised) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow-sm) !important;
    /* Motion budget #2: composer lifts + rings on focus */
    transition: transform var(--dur-med) var(--ease-out),
                box-shadow var(--dur-med) var(--ease-out),
                border-color var(--dur-med) var(--ease-out) !important;
}

/* Research desk: the composer is a raised command surface that lifts and
   picks up an ink-teal focus ring when active. */
/* Quiet focus: a full accent ring plus a lift around the whole composer
   made an idle input the loudest thing on the screen. A border shift is
   enough to show focus. */
.question-box-area:focus-within {
    border-color: var(--border-strong) !important;
    box-shadow: var(--shadow-sm) !important;
}

#emptyTextAreaSpacingDiv { display: none !important; }

/* Mic - legacy rule floats it outside the card (absolute, left:-60px) */
.record-button {
    position: static !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    order: 1;
    flex-shrink: 0;
    width: 36px !important;
    height: 36px !important;
    border-radius: var(--radius-full) !important;
    border: none !important;
    background-color: transparent !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.record-button:hover {
    background-color: var(--neutral-200) !important;
    color: var(--text-primary) !important;
}

.record-button.recording {
    background-color: var(--status-danger) !important;
    color: #FFFFFF !important;
}

/* Textarea - the pill provides the boundary; the editor itself goes
   naked (no inner border, no Material underline, no focus ring).
   position override: the widget's own .question-textarea-style class
   sets position:absolute, yanking it out of the flex row entirely. */
#question-textarea {
    flex: 1 1 auto;
    min-width: 0; /* allow shrink so upload+send never wrap below the pill */
    order: 2;
    position: relative !important;
    width: auto !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Full-width trailing rows (disclaimer / files) always drop below the controls */
.model-warning,
#progress-bar,
.file-list,
#file-list {
    order: 10;
}

/* js/ui/textarea.js's native replacement for dxTextArea. Its whole DOM is
 * one plain <textarea class="nv-textarea-input">, so this needs none of
 * the old DevExtreme editor-chrome/underline/corner-wedge suppression -
 * those rules existed only to fight dxTextArea's own inner markup. */
#question-textarea .nv-textarea-input {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
    resize: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-md);
    line-height: 1.5;
    padding: var(--space-2) var(--space-2);
}

#question-textarea .nv-textarea-input::placeholder {
    color: var(--text-muted);
}

/* ChatGPT draws no focus ring on the composer; the pill itself is the
   focus affordance (app-shell's global *:focus-visible outline would
   otherwise peek out from behind the pill's rounded corners, since the
   composer autofocuses on init). */
#question-textarea .nv-textarea-input:focus,
#question-textarea .nv-textarea-input:focus-visible {
    outline: none;
}

/* Upload — keep in the same flex row as Send (app-shell used to absolute-
   position the send wrapper, which shoved upload onto a second line). */
#multiFileUploader.file-uploader-area,
.file-uploader-area {
    position: static !important;
    flex-shrink: 0;
    align-self: flex-end;
    margin: 0 !important;
    order: 3;
}

.drop-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.drop-container:hover {
    background-color: var(--surface-inset);
    color: var(--text-primary);
}

/* Icon-only upload — the "upload" text label was crowding the row */
#span-upload {
    display: none !important;
}

#upload-tooltip {
    font-size: 16px !important;
    line-height: 1;
}

/* Kill app-shell's absolute offset on the send cluster so it stays in-flow
   next to the upload icon inside the composer pill. */
#button-wrapper {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    flex-shrink: 0;
    align-self: flex-end;
    display: inline-flex !important;
    align-items: center;
    order: 4;
    padding: 0 !important;
}

div#icon-send {
    background: var(--accent-solid) !important;
    color: var(--on-accent-solid) !important;
    border: none !important;
    border-radius: var(--radius-full) !important;
    box-shadow: none !important;
    width: 36px;
    height: 36px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

div#icon-send:hover { background: var(--accent-hover) !important; }

div#icon-send.dx-state-disabled {
    opacity: 0.35;
}

div#icon-send .dx-icon,
div#icon-send .dx-button-content .dx-icon {
    color: var(--text-on-accent) !important;
}

div#icon-cancel {
    border-radius: var(--radius-full) !important;
    color: var(--status-danger) !important;
}

/* Prev/next message nav — stay outside the pill, don't steal flex space */
.prev-chat-message-button-style,
.next-chat-message-button-style {
    position: absolute !important;
    inset-inline-end: -40px !important;
    right: -40px !important;
    margin: 0 !important;
    opacity: 0.45;
    z-index: 2;
}

.prev-chat-message-button-style:hover,
.next-chat-message-button-style:hover {
    opacity: 1;
}

/* Disclaimer. Sits BELOW the composer pill rather than inside it (the pill
   is `flex-wrap: wrap`, and as a full-width child the disclaimer took a row
   of its own inside the input card - ChatGPT keeps it outside, underneath).
   A negative bottom margin on the pill's own row is not needed: moving it
   out of the pill's flex flow is enough. */
.model-warning {
    float: none !important;
    position: static !important;
    display: block;
    width: 100%;
    text-align: center;
    color: var(--text-muted) !important;
    font-size: 11px !important;
    margin-block-start: var(--space-2);
    /* Escape the pill's padding and border so it reads as a page-level note. */
    order: 20;
    margin-inline: calc(-1 * var(--space-3));
    padding-block-start: var(--space-1);
    border-block-start: none !important;
    background: transparent !important;
}

/* ---------- Dark theme ---------- */

[data-theme="dark"] .chat-inputs-container {
    background: transparent !important;
    border-top: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .question-box-area {
    background: var(--surface-raised) !important;
    border: 1px solid var(--border-subtle) !important;
}

[data-theme="dark"] .question-box-area:focus-within {
    border-color: var(--border-strong) !important;
    box-shadow: var(--shadow-sm) !important;
}

[data-theme="dark"] #question-textarea .dx-texteditor-input {
    color: var(--text-primary) !important;
    background: transparent !important;
}

[data-theme="dark"] #question-textarea {
    background: transparent !important;
    border: none !important;
}

[data-theme="dark"] #question-textarea .dx-placeholder,
[data-theme="dark"] #question-textarea .dx-placeholder::before {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .record-button {
    background-color: transparent !important;
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .record-button:hover {
    background-color: var(--surface-inset) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .drop-container {
    color: var(--text-secondary);
}

[data-theme="dark"] .drop-container:hover {
    background-color: var(--surface-inset);
    color: var(--text-primary);
}

[data-theme="dark"] #promptButton {
    background: transparent !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-secondary) !important;
}

[data-theme="dark"] #promptButton:hover {
    background: var(--surface-inset) !important;
}

[data-theme="dark"] #icon-menu.grid-menu {
    background: var(--surface-raised);
    border-color: var(--border-subtle);
}

[data-theme="dark"] .prompt-menu-search {
    background: var(--surface-raised);
    border-bottom-color: var(--border-subtle);
}

[data-theme="dark"] .prompt-menu-search input {
    background: var(--surface-inset);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

[data-theme="dark"] .prompt-group-header {
    color: var(--text-primary);
}

[data-theme="dark"] .prompt-group-header:hover {
    background: var(--surface-inset);
}

[data-theme="dark"] .prompt-group-chevron,
[data-theme="dark"] .prompt-group-count {
    color: var(--text-muted);
}

[data-theme="dark"] #icon-menu .icon-menu-button {
    color: var(--text-secondary);
    background: var(--surface-app);
    border-color: var(--border-strong);
}

[data-theme="dark"] #icon-menu .icon-menu-button:hover {
    background: var(--surface-raised);
    border-color: #5B5B5B;
    color: var(--text-primary);
}

[data-theme="dark"] #icon-menu .icon-menu-button.is-selected {
    border-color: var(--accent);
    background: #17313A;
    color: var(--text-primary);
}

[data-theme="dark"] .prompt-menu-title { color: var(--text-primary); }
[data-theme="dark"] .prompt-menu-subtitle { color: var(--text-muted); }

[data-theme="dark"] .icon-menu-button:hover {
    background-color: var(--surface-inset);
    color: var(--text-primary);
}

[data-theme="dark"] .model-warning {
    color: var(--text-muted) !important;
}

/* Send stays the single filled brand action in dark too (asserted over a
   legacy app-shell dark rule that paints it mid-gray). --accent-solid, not
   --accent: the dark-theme accent is a light lavender that glares as a fill. */
[data-theme="dark"] div#icon-send {
    background: var(--accent-solid) !important;
    color: var(--on-accent-solid) !important;
}

[data-theme="dark"] div#icon-send:hover {
    filter: brightness(1.12);
}

[data-theme="dark"] div#icon-send .dx-icon,
[data-theme="dark"] div#icon-send .dx-button-content .dx-icon {
    color: var(--text-on-accent) !important;
}

/*!******************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/shell.css ***!
  \******************************************************************************************************************************/
/* App shell chrome - ChatGPT language: the header is a near-invisible
 * white bar (dark: #212121) with ghost icon buttons; the sidebar is a
 * flat #F9F9F9 panel (dark: #171717) with rounded hover rows and no
 * border; the settings toolbar blends into the canvas. CSS-only - ids
 * and JS wiring untouched. Logical properties for RTL.
 */

/* ---------- Top header (#blue-strip) ----------
   Brand left; functional groups right:
     [help] | [appearance] | [plan] | [config] | [account]
   Groups are real DOM wrappers (.header-group) so spacing stays tight
   even when individual dxButtons toggle visibility. */

#blue-strip {
    background: var(--surface-app) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 52px;
    padding-inline: var(--space-3);
    /* Sit above the sliding conversation toolbar */
    position: relative;
    z-index: 30;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0;
    margin-inline-start: auto;
    min-width: 0;
}

.header-group {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-inline: var(--space-2);
    border-inline-start: 1px solid var(--border-subtle);
}

.header-group:first-child {
    border-inline-start: none;
    padding-inline-start: 0;
}

.header-group[data-group="account"] {
    padding-inline-end: 0;
}

/* Collapse a group when every direct child is hidden (display:none or
   DevExtreme's invisible state) so leftover dividers don't leave gaps. */
.header-group:not(:has(> :not(.dx-state-invisible):not([style*="display: none"]):not([style*="display:none"]))) {
    display: none !important;
}

/* Kill every legacy absolute offset on header controls (ids stay the same). */
#blue-strip .basic-help-button-style,
#blue-strip .settings-url-button-style,
#blue-strip .mode-toggle-button-style,
#blue-strip .upgrade-button-style,
#blue-strip .download-button-style,
#blue-strip .sign-in-button-style,
#blue-strip .sign-out-button-style,
#blue-strip .register-button-style,
#blue-strip .breadcrumb-menu-style,
#blue-strip .language-dropdown-style,
#blue-strip .novaluna-title {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    border-radius: var(--radius-md);
}

#blue-strip .dx-button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: var(--radius-md) !important;
    min-width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: background-color var(--dur-fast) var(--ease-out) !important;
}

#blue-strip .dx-button .dx-button-content {
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

#blue-strip .dx-button:hover {
    background: var(--surface-inset) !important;
}

#blue-strip .dx-button-content .dx-icon,
#blue-strip .dx-button-content i,
#blue-strip .sign-out-button-style i,
#blue-strip .sign-in-button-style i,
#blue-strip .register-button-style i {
    color: var(--text-secondary) !important;
    opacity: 1 !important;
    font-size: 16px !important;
}

/* Hide empty dx wrappers so auth group stays tight when only one shows */
#blue-strip .dx-state-invisible,
#blue-strip .dx-button.dx-state-invisible {
    display: none !important;
}

.novaluna-title {
    background: transparent !important;
}

.novaluna-title .home-text {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-primary) !important;
    font-weight: 600;
    margin: 0;
}

.language-dropdown-style {
    position: static !important;
    color: var(--text-secondary);
    width: auto !important;
    display: inline-flex !important;
    align-items: center;
}

.language-dropdown-style select,
#languageDropdown {
    /* Explicit surface + color-scheme so the native select never falls back
       to UA colors (it rendered as a white box on the dark theme). */
    background: var(--surface-card);
    color-scheme: light;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    width: auto;
    min-width: 96px;
    height: 32px;
    padding: 0 8px;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    cursor: pointer;
}

/* ---------- Conversation toolbar (title + chat controls) ----------
   [conversation title] ....... [toggles] | [model] | [export] | [pin]
   Always readable; when unpinned it slides fully away (clipped by parent). */

.top-settings-toolbar-style {
    display: flex !important;
    align-items: center;
    gap: var(--space-3);
    background: var(--surface-app) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
    padding: 6px var(--space-4) !important;
    min-height: 48px;
    position: absolute;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 20;
    transition: transform 0.28s var(--ease-out), opacity 0.28s var(--ease-out);
    transform: translateY(0);
    opacity: 1;
}

.top-settings-toolbar-style.hidden {
    top: 0 !important; /* override bc_style top:-60px peek */
    transform: translateY(calc(-100% - 8px));
    opacity: 0;
    pointer-events: none;
}

.chat-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    line-height: 1.4 !important;
    font-size: var(--text-base) !important;
    font-weight: 600;
    color: var(--text-primary) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Disconnected/reconnecting state rendered into #chatTitle (js/index.js
   renderReconnectBanner). Quiet warning text + a real secondary button
   instead of the browser-default input it used to inject. */
.reconnect-banner {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.reconnect-text {
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--status-warning);
    overflow: hidden;
    text-overflow: ellipsis;
}

.reconnect-btn {
    flex: none;
    height: 28px;
    padding: 0 var(--space-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background: var(--surface-card);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out);
}

.reconnect-btn:hover {
    background: var(--surface-inset);
}

.reconnect-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0;
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-inline: var(--space-2);
    border-inline-start: 1px solid var(--border-subtle);
}

.toolbar-group:first-child {
    border-inline-start: none;
}

.toolbar-group[data-group="pin"] {
    padding-inline-end: 0;
}

/* Chat toggles: compact label above a clearly-visible switch */
.control-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 52px;
}

.control-container label {
    font-size: 10px !important;
    letter-spacing: 0.02em;
    font-weight: 500;
    color: var(--text-secondary) !important;
    margin: 0 !important;
    line-height: 1;
    white-space: nowrap;
}

.top-settings-toolbar-style .dx-button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: var(--radius-md) !important;
    min-width: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: background-color var(--dur-fast) var(--ease-out) !important;
}

.top-settings-toolbar-style .dx-button .dx-button-content { padding: 0 !important; }

.top-settings-toolbar-style .dx-button:hover {
    background: var(--surface-inset) !important;
}

.top-settings-toolbar-style .dx-button .dx-icon,
.top-settings-toolbar-style .dx-button .dx-button-content i {
    color: var(--text-secondary) !important;
    opacity: 1 !important;
    font-size: 15px !important;
}

.toolbar-pin-button {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    min-width: 52px;
    padding-inline: 10px !important;
    background: var(--surface-inset) !important;
    color: var(--text-secondary) !important;
    font-size: var(--text-xs) !important;
    font-weight: 500;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer;
    user-select: none;
    transition: background-color var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out) !important;
}

.toolbar-pin-button:hover {
    background: var(--neutral-200) !important;
    color: var(--text-primary) !important;
}

.toolbar-pin-button.is-pinned {
    background: var(--accent-subtle) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-strong) !important;
}

/* ---------- Sidebar ---------- */

.resizable1 {
    background-color: var(--surface-sidebar) !important;
    border-inline-end: 1px solid var(--border-subtle) !important;
}

/* jQuery-UI resize handle: invisible until hovered */
.ui-resizable-e {
    background: transparent !important;
}

.ui-resizable-e:hover {
    background: var(--border-subtle) !important;
}

#customTopicTreeSearch {
    width: calc(100% - var(--space-4));
    height: 36px;
    margin: var(--space-2);
    padding: 0 var(--space-3);
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--text-primary);
    transition: border-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}

#customTopicTreeSearch:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

#customTopicTreeSearch::placeholder { color: var(--text-muted); }

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: 0 var(--space-2);
}

.sidebar-actions #button-newtopic,
.sidebar-actions #button-newproject {
    width: 100%;
}

/* New Chat: solid accent — the one loud primary action in the rail.
   Uses --accent-solid, not --accent: on dark the accent is a light lavender
   (needed for legible text/icons), and as a full-width fill that made this
   the brightest object on the screen. */
.newtopic-button-style {
    background-color: var(--accent-solid) !important;
    color: var(--on-accent-solid) !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-md) !important;
    min-height: 40px;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    box-shadow: none !important;
    transition: background-color var(--dur-fast) var(--ease-out) !important;
}

.newtopic-button-style:hover {
    filter: brightness(1.12);
}

.newtopic-button-style .dx-icon,
.newtopic-button-style i,
.newtopic-button-style .dx-button-text {
    color: var(--on-accent-solid) !important;
}

/* New Project: quieter secondary action under New Chat */
.newproject-button-style {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    min-height: 36px;
    font-weight: 500 !important;
    box-shadow: none !important;
    transition: background-color var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out) !important;
}

.newproject-button-style:hover {
    background-color: var(--surface-inset) !important;
    border-color: var(--border-strong) !important;
}

.newproject-button-style .dx-icon,
.newproject-button-style i,
.newproject-button-style .dx-button-text {
    color: var(--text-primary) !important;
}

/* ========== Topic / project sidebar tree (ChatGPT-like) ========== */

#treeview {
    font-size: 13.5px;
    line-height: 1.3;
}

#treeview .topic-tree-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#treeview .topic-tree-icon {
    flex: 0 0 auto;
    width: 14px;
    text-align: center;
    margin-right: 8px;
    font-size: 12px;
    line-height: 1;
}

#treeview .topic-tree-icon-project {
    color: var(--accent) !important;
}

/* On dark the accent is a light lavender; five saturated folder glyphs at
   that brightness pulled the eye away from the conversation list, so they
   sit back to a neutral here. The selection rail still carries the accent. */
[data-theme="dark"] #treeview .topic-tree-icon-project {
    color: var(--text-secondary) !important;
}

#treeview .topic-tree-project {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

#treeview .dx-treeview-item {
    display: flex !important;
    align-items: center !important;
    gap: 0;
    min-width: 0;
    overflow: hidden;
    min-height: 32px !important;
    padding: 6px 8px !important;
    border-radius: var(--radius-md) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/*
 * DX lays toggle + checkbox + item + children as siblings. Legacy flex row
 * put children beside the project — wrap so children always go underneath.
 */
#treeview .dx-treeview-node,
#treeview .dx-treeview-item-with-checkbox {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    align-content: flex-start !important;
    padding: 0 !important;
    margin: 1px 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#treeview .dx-treeview-node > .dx-treeview-item {
    flex: 1 1 auto;
    min-width: 0;
}

/*
 * Nested child list under a project. Do NOT force display:block — DevExtreme
 * hides collapsed containers with display:none; !important was keeping
 * children visible so collapse looked broken.
 */
#treeview .dx-treeview-node > .dx-treeview-node-container {
    flex: 1 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    order: 99;
    position: static !important;
    float: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 0 4px !important;
    padding: 1px 0 2px 14px !important;
    box-sizing: border-box !important;
}

/* Root list of projects/chats — stack as a vertical block list (no flex row) */
#treeview .dx-scrollable-content > .dx-treeview-node-container {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: none !important;
    width: 100% !important;
}

#treeview .dx-scrollable-content > .dx-treeview-node-container > .dx-treeview-node {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both;
}

/* First uncategorized chat after project folders — visual break so the flat
   list is not mistaken for children of the last project */
#treeview .topic-tree-uncategorized-start {
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}

/* ---------- Date section headers (Today / Yesterday / …) ---------- */
#treeview .topic-tree-group-header-node {
    margin: 0 !important;
}

#treeview .topic-tree-group-header {
    min-height: 0 !important;
    padding: 14px 8px 4px !important;
    cursor: default !important;
    background: transparent !important;
    pointer-events: none;
    opacity: 1 !important; /* dx dims disabled items - headers aren't "disabled UI" */
}

#treeview .topic-tree-group-header-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted, #8a8a8a);
    white-space: nowrap;
}

/* No hover highlight, no multi-select checkbox on a section label */
#treeview .topic-tree-group-header-node > .dx-checkbox {
    display: none !important;
}

#treeview .topic-tree-group-header:hover {
    background: transparent !important;
}

/* Small time hint that distinguishes identically-titled conversations */
#treeview .topic-tree-time-hint {
    flex: 0 0 auto;
    margin-inline-start: auto;
    padding-inline-start: 8px;
    font-size: 11px;
    color: var(--text-muted, #8a8a8a);
    font-variant-numeric: tabular-nums;
}

#treeview .dx-treeview-node > .dx-treeview-node-container .dx-scrollable-scrollbar {
    display: none !important;
}

/* Native DX toggle is unreliable with our layout — use custom .topic-tree-chevron */
#treeview .dx-treeview-toggle-item-visibility {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

#treeview .topic-tree-project-node {
    align-items: flex-start !important;
    margin: 2px 0 !important;
}

#treeview .topic-tree-project-node > .dx-treeview-item {
    margin-inline-start: 0 !important;
    padding-inline-start: 4px !important;
    padding-left: 4px !important;
    gap: 2px;
}

#treeview .topic-tree-project-node > .dx-checkbox {
    display: none !important;
}

#treeview .topic-tree-chevron {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0 4px 0 0;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 11px;
    position: relative;
    z-index: 3;
    transition: background-color var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
}

#treeview .topic-tree-chevron:hover {
    background: color-mix(in srgb, var(--surface-inset) 85%, var(--accent) 8%);
    color: var(--text-primary);
}

#treeview .topic-tree-chevron:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

#treeview .topic-tree-chevron-spacer {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-right: 2px;
    display: inline-block;
}

/* Nested chats: plain indented text — no circles, no bubble icons */
#treeview .topic-tree-nested-node,
#treeview .topic-tree-nested-node.dx-treeview-item-with-checkbox {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

#treeview .topic-tree-nested-node > .dx-checkbox {
    display: none !important;
}

#treeview .topic-tree-nested-node > .dx-treeview-item,
#treeview .topic-tree-nested-node > .dx-treeview-item.topic-tree-nested-item {
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
    padding: 6px 8px 6px 16px !important;
    min-height: 30px !important;
}

#treeview .topic-tree-nested-node > .dx-treeview-item:hover {
    color: var(--text-primary) !important;
    background: var(--surface-inset) !important;
}

#treeview .topic-tree-load-more-node > .dx-checkbox,
#treeview .topic-tree-load-more-node > .dx-treeview-toggle-item-visibility {
    display: none !important;
}

#treeview .topic-tree-load-more .topic-tree-label,
#treeview .topic-tree-load-more-node .topic-tree-label {
    color: var(--accent) !important;
    font-size: 12.5px;
    font-weight: 500;
}

#treeview .topic-tree-load-more-node > .dx-treeview-item {
    padding-inline-start: 16px !important;
    padding-left: 16px !important;
    min-height: 28px !important;
}

#treeview .topic-tree-load-more-node > .dx-treeview-item:hover {
    background: var(--accent-subtle) !important;
}

/* Top-level chats: text-first; checkbox only on hover / bulk select */
#treeview .topic-tree-topic-node {
    position: relative !important;
}

#treeview .topic-tree-topic-node > .dx-treeview-item {
    padding-inline-start: 10px !important;
    padding-left: 10px !important;
}

#treeview .topic-tree-topic-node > .dx-checkbox {
    position: absolute !important;
    top: 50% !important;
    left: 8px !important;
    inset-inline-start: 8px !important;
    transform: translateY(-50%) !important;
    width: 15px !important;
    height: 15px !important;
    margin: 0 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease-out);
    z-index: 2;
}

#treeview .topic-tree-topic-node:hover > .dx-checkbox,
#treeview.topic-tree-bulk .topic-tree-topic-node > .dx-checkbox,
#treeview .topic-tree-topic-node > .dx-checkbox.dx-checkbox-checked {
    opacity: 1;
    pointer-events: auto;
}

#treeview .topic-tree-topic-node:hover > .dx-treeview-item,
#treeview.topic-tree-bulk .topic-tree-topic-node > .dx-treeview-item,
#treeview .topic-tree-topic-node > .dx-checkbox.dx-checkbox-checked + .dx-treeview-item,
#treeview .topic-tree-topic-node.dx-state-selected > .dx-treeview-item {
    padding-inline-start: 28px !important;
    padding-left: 28px !important;
}

#treeview .topic-tree-topic-node > .dx-checkbox .dx-checkbox-icon {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    border: 1.5px solid var(--border-strong) !important;
    background: var(--surface-card) !important;
    left: 0 !important;
    box-sizing: border-box !important;
}

#treeview .topic-tree-topic-node > .dx-checkbox.dx-checkbox-checked .dx-checkbox-icon {
    border-color: var(--accent) !important;
    background: var(--accent) !important;
    color: var(--text-on-accent) !important;
}

/* Hover / selected: paint the item row only, never the whole project block */
#treeview .dx-treeview-node:hover,
#treeview .dx-treeview-item-with-checkbox:hover,
#treeview .topic-tree-project-node:hover,
#treeview .topic-tree-project-node.dx-state-hover,
#treeview .topic-tree-nested-node:hover {
    background: transparent !important;
    transform: none !important;
}

#treeview .dx-treeview-node > .dx-treeview-item:hover {
    background: var(--surface-inset) !important;
}

#treeview .topic-draggable {
    cursor: grab;
}

#treeview .topic-dragging {
    opacity: 0.45;
    cursor: grabbing;
}

#treeview .topic-drop-target.topic-drop-hover {
    background-color: var(--accent-subtle) !important;
    outline: none;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
}

.project-dialog-body {
    padding: var(--space-3) var(--space-2);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.project-dialog-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.project-dialog-message {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: 1.45;
}

/* ---------- Project home (main pane) ---------- */

.project-home {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--space-7) var(--space-6) var(--space-8);
    min-height: 0;
    background:
        radial-gradient(120% 70% at 12% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
        var(--surface-page, var(--surface-card));
}

.project-home[hidden] {
    display: none !important;
}

.project-home-inner {
    max-width: 40rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.project-home-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.project-home-icon {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--accent) 14%, var(--surface-card));
    color: var(--accent);
    font-size: 1.1rem;
    margin-top: 0.15rem;
}

.project-home-heading {
    min-width: 0;
    flex: 1 1 auto;
}

.project-home-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.project-home-title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 650;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-home-meta {
    margin: 0.35rem 0 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.project-home-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.project-home-about {
    padding: var(--space-3) var(--space-3) var(--space-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface-card) 88%, transparent);
}

.project-home-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    margin-block-end: var(--space-1);
}

.project-home-description {
    width: 100%;
    min-height: 3.25rem;
    resize: vertical;
    padding: var(--space-2) 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    line-height: 1.5;
    margin: 0;
}

.project-home-description:focus {
    outline: none;
}

.project-home-description::placeholder {
    color: var(--text-muted);
}

.project-home-about-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: var(--space-1);
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-1);
}

.project-home-primary-btn {
    background-color: var(--accent) !important;
    color: var(--text-on-accent) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    min-height: 38px;
    padding-inline: 1rem !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.project-home-primary-btn .dx-button-text,
.project-home-primary-btn i {
    color: var(--text-on-accent) !important;
}

.project-home-secondary-btn {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    min-height: 32px;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

.project-home-secondary-btn:hover {
    color: var(--text-primary) !important;
    background: var(--surface-inset) !important;
}

.project-home-conversations {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-height: 8rem;
}

.project-home-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.project-home-topics {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.project-home-topic {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    text-align: start;
    padding: 0.65rem 0.7rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out);
}

.project-home-topic span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-home-topic i {
    color: var(--text-muted);
    width: 1rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.project-home-topic:hover {
    background: var(--surface-inset);
}

.project-home-topic:hover i {
    color: var(--accent);
    opacity: 1;
}

.project-home-empty {
    padding: var(--space-5) var(--space-3);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--surface-inset) 55%, transparent);
    line-height: 1.45;
}

[data-theme="dark"] .project-home-about {
    background: color-mix(in srgb, var(--surface-card) 92%, transparent);
}

[data-theme="dark"] .project-home-description {
    background: transparent;
    color: var(--text-primary);
}

/* --accent-solid, not --accent: the dark accent is a light lavender, which
   as a full-width fill made this the brightest object on the screen. */
[data-theme="dark"] .newtopic-button-style {
    background-color: var(--accent-solid) !important;
    color: var(--on-accent-solid) !important;
}

[data-theme="dark"] .newtopic-button-style:hover {
    filter: brightness(1.12);
}

[data-theme="dark"] .newproject-button-style {
    border-color: var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

/* Topics tree selection states:
   1) Multi-select checkboxes appear on hover / bulk mode (see topic-tree-topic-node)
   2) Currently open chat → teal rail + fill on .topic-custom-selected-item only */
#treeview .dx-treeview-node {
    color: var(--text-primary) !important;
}

#treeview .dx-treeview-item-with-checkbox.dx-state-selected,
#treeview .dx-state-selected > .dx-treeview-item {
    background: transparent !important;
    box-shadow: none !important;
    font-weight: inherit;
}

#treeview .dx-treeview-item-with-checkbox.dx-state-selected::before,
#treeview .dx-state-selected > .dx-treeview-item::before {
    content: none !important;
    display: none !important;
}

.topic-custom-selected-item {
    position: relative !important;
    background-color: var(--accent-subtle) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 500 !important;
}

.topic-custom-selected-item::before {
    content: "";
    position: absolute;
    inset-block: 5px;
    inset-inline-start: 0;
    width: 3px;
    border-radius: var(--radius-full);
    background: var(--accent);
    animation: nova-rail-in var(--dur-fast) var(--ease-out);
}

@keyframes nova-rail-in {
    from { transform: scaleY(0); opacity: 0; }
    to   { transform: scaleY(1); opacity: 1; }
}

/* ---------- Welcome panel ---------- */

.welcome_title {
    font-size: var(--text-2xl) !important;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary) !important;
    line-height: 1.25;
}

.welcome-para {
    font-size: var(--text-sm) !important;
    color: var(--text-secondary) !important;
    line-height: 1.65;
}

ul.welcome-para {
    padding-inline-start: 1.1em;
}

ul.welcome-para li {
    margin-block: var(--space-2);
}

ul.welcome-para li::marker {
    color: var(--neutral-400);
}

.signup-highlight {
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Primary CTA: black pill (dark: white pill) via accent tokens */
.signup-cta {
    display: inline-block;
    background: var(--accent) !important;
    color: var(--text-on-accent) !important;
    border: none !important;
    border-radius: var(--radius-full) !important;
    padding: var(--space-2) var(--space-5) !important;
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none !important;
    transition: background var(--dur-fast) var(--ease-out);
}

.signup-cta:hover {
    background: var(--accent-hover) !important;
    box-shadow: none;
}

.contact-info {
    font-size: var(--text-xs) !important;
    color: var(--text-muted) !important;
}

.contact-info a { color: var(--text-secondary); }

/* ---------- Suggested-question cards ---------- */

.grid-title {
    font-size: var(--text-sm) !important;
    font-weight: 400 !important;
    color: var(--text-muted) !important;
    margin-block-end: var(--space-3);
    text-align: center;
}

.question-button {
    background: var(--surface-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    padding: var(--space-3) var(--space-4) !important;
    text-align: start !important;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background-color var(--dur-fast) var(--ease-out);
}

.question-button:hover {
    background: var(--neutral-50) !important;
    border-color: var(--border-subtle) !important;
    box-shadow: none !important;
    transform: none;
}

.question-content {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.question-icon { font-size: var(--text-lg); }

.question-title {
    font-size: var(--text-sm) !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
}

.question-description {
    font-size: var(--text-xs) !important;
    font-style: normal !important;
    color: var(--text-muted) !important;
    margin-block-start: var(--space-1);
    line-height: 1.5;
}

/* ---------- Scroll-to-bottom floating button (ChatGPT: small white
   circle with a gray arrow, hairline border) ---------- */

.down-arrow-button {
    background: var(--surface-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-full) !important;
    box-shadow: var(--shadow-sm) !important;
    width: 32px !important;
    height: 32px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.down-arrow-button svg {
    stroke: var(--text-secondary) !important;
}

/* ---------- Thin neutral scrollbars ---------- */

#chatMessageList ::-webkit-scrollbar,
.resizable1 ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#chatMessageList ::-webkit-scrollbar-thumb,
.resizable1 ::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 999px;
}

#chatMessageList ::-webkit-scrollbar-track,
.resizable1 ::-webkit-scrollbar-track {
    background: transparent;
}

/* ---------- Dark theme ---------- */

/* Dark blocks repoint to the semantic tokens (which now carry the layered
   research-desk dark palette) instead of the old hardcoded ChatGPT grays,
   so the chrome stays consistent with tokens.css. !important is retained to
   keep beating app-shell.css legacy dark rules. */
[data-theme="dark"] #blue-strip {
    background: var(--surface-app) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .header-group,
[data-theme="dark"] .toolbar-group {
    border-inline-start-color: var(--border-subtle);
}

[data-theme="dark"] #blue-strip .dx-button:hover {
    background: var(--surface-inset) !important;
}

[data-theme="dark"] #blue-strip .dx-button-content .dx-icon,
[data-theme="dark"] #blue-strip .dx-button-content i,
[data-theme="dark"] #blue-strip .sign-out-button-style i,
[data-theme="dark"] #blue-strip .sign-in-button-style i,
[data-theme="dark"] #blue-strip .register-button-style i {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .novaluna-title .home-text { color: var(--text-primary) !important; }

[data-theme="dark"] .language-dropdown-style select,
[data-theme="dark"] #languageDropdown {
    background: var(--surface-card);
    color-scheme: dark;
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}

[data-theme="dark"] .top-settings-toolbar-style {
    background: var(--surface-app) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

[data-theme="dark"] .top-settings-toolbar-style .dx-button:hover {
    background: var(--surface-inset) !important;
}

[data-theme="dark"] .top-settings-toolbar-style .dx-button .dx-icon,
[data-theme="dark"] .top-settings-toolbar-style .dx-button .dx-button-content i {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .toolbar-pin-button {
    color: var(--text-secondary) !important;
    background: var(--surface-card) !important;
    border-color: var(--border-subtle) !important;
}
[data-theme="dark"] .toolbar-pin-button:hover {
    background: var(--surface-inset) !important;
    color: var(--text-primary) !important;
}
[data-theme="dark"] .toolbar-pin-button.is-pinned {
    background: var(--accent-subtle) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .chat-title { color: var(--text-primary) !important; }

[data-theme="dark"] .control-container label { color: var(--text-secondary) !important; }

[data-theme="dark"] .resizable1 {
    background-color: var(--surface-sidebar) !important;
    border-inline-end: 1px solid var(--border-subtle) !important;
}

[data-theme="dark"] #customTopicTreeSearch {
    background: transparent;
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

[data-theme="dark"] .welcome_title { color: var(--text-primary) !important; }
[data-theme="dark"] .welcome-para { color: var(--text-secondary) !important; }

[data-theme="dark"] #treeview .dx-treeview-node { color: var(--text-primary) !important; }

[data-theme="dark"] #treeview .dx-treeview-node:hover,
[data-theme="dark"] #treeview .dx-treeview-item-with-checkbox:hover {
    background: transparent !important;
    transform: none !important;
}

[data-theme="dark"] #treeview .dx-treeview-node > .dx-treeview-item:hover {
    background-color: var(--surface-inset) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .topic-custom-selected-item {
    background-color: var(--accent-subtle) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] #treeview .dx-treeview-item-with-checkbox.dx-state-selected {
    background: transparent !important;
    box-shadow: none !important;
}

[data-theme="dark"] #treeview .topic-tree-topic-node > .dx-checkbox .dx-checkbox-icon {
    border-color: var(--border-strong) !important;
    background: var(--surface-card) !important;
}

[data-theme="dark"] #treeview .topic-tree-topic-node > .dx-checkbox.dx-checkbox-checked .dx-checkbox-icon {
    border-color: var(--accent) !important;
    background: var(--accent) !important;
    color: var(--text-on-accent) !important;
}

[data-theme="dark"] #treeview .topic-tree-group-header-label,
[data-theme="dark"] #treeview .topic-tree-time-hint {
    color: var(--text-muted);
}

[data-theme="dark"] #treeview .topic-tree-group-header,
[data-theme="dark"] #treeview .topic-tree-group-header:hover {
    background: transparent !important;
}

[data-theme="dark"] .grid-title { color: var(--text-muted) !important; }

[data-theme="dark"] .question-button {
    background: var(--surface-card) !important;
    border-color: var(--border-subtle) !important;
}

[data-theme="dark"] .question-button:hover {
    background: var(--surface-inset) !important;
    border-color: var(--border-subtle) !important;
}

[data-theme="dark"] .question-title { color: var(--text-primary) !important; }
[data-theme="dark"] .question-description { color: var(--text-muted) !important; }

[data-theme="dark"] .down-arrow-button {
    background: var(--surface-card) !important;
    border-color: var(--border-subtle) !important;
}

[data-theme="dark"] .down-arrow-button svg {
    stroke: var(--text-secondary) !important;
}

[data-theme="dark"] #chatMessageList ::-webkit-scrollbar-thumb,
[data-theme="dark"] .resizable1 ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
}

/* ---------- Single-scroll frame (custom message list) ----------
   The page itself never scrolls: the chat column scrolls inside the
   custom list's native container, the sidebar scrolls in its own
   .inner. This removes the doubled scrollbars (body + #chatListParent
   + DX's simulated scrollbar all coexisted before). */

body:has(#chatListParent) {
    overflow: hidden;
    height: 100dvh;
}

div#chatListParent {
    overflow: hidden; /* was overflow-y:auto in bc_style - the frame must not scroll */
    display: flex;
    flex: 1;
    position: relative;
    min-height: 0;
}

/* Fill the whole content pane. app-shell caps this at max-width:1024px
   (a legacy centering hack); with the ChatGPT layout the message column
   is centered at the ITEM level (.dx-list-item max-width:768px, margin
   auto), so the outer area must span full width - otherwise the native
   scroll container (and the top-right toolbar controls anchored to it)
   sit at the 1024px edge, ~mid-pane, instead of the true window edge.
   That mid-screen scrollbar was the report. */
.right-side-chatboard-area {
    width: 100%;
    max-width: none !important;
    height: 100% !important;
    position: relative;
    overflow: hidden; /* clip the sliding conversation toolbar when hidden */
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Root of the custom list: fills the area; only its inner
   .dx-scrollable-container scrolls (kills the inline overflow-y:auto
   on the element itself). */
#chatMessageList {
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden !important;
}

#chatMessageList .ml-native-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    /* clear the overlay toolbar at the top; breathing room at bottom */
    padding-top: 56px;
    /* Clears the floating scroll-to-bottom button (z-index'd over the last
       ~40px of content) and gives the last answer's Sources chips room to
       breathe above the composer instead of butting against it. */
    padding-bottom: 72px;
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-300) transparent;
}

[data-theme="dark"] #chatMessageList .ml-native-scroll {
    scrollbar-color: var(--border-strong) transparent;
}

/* ---------- Speaker 3D avatar canvas ----------
   Overrides the global `canvas { position:absolute; top:120px }` rule in
   bc_style so the avatar sits as a fixed corner companion. */
canvas.nova-avatar-canvas {
    position: fixed !important;
    right: 16px;
    bottom: 110px;
    top: auto !important;
    left: auto !important;
    z-index: 40;
    width: 180px;
    height: 430px;
    pointer-events: none;
    background: transparent !important;
    display: none;
}

/* Live speech caption — sits just above the composer, not on top of it */
.voice-interim-caption {
    position: fixed;
    left: 50%;
    bottom: 168px;
    transform: translateX(-50%) translateY(8px);
    z-index: 45;
    max-width: min(560px, calc(100vw - 48px));
    padding: 8px 14px;
    border-radius: 999px;
    background: rgb(13 13 13 / 0.82);
    color: #fff;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    box-shadow: var(--shadow-md);
}

.voice-interim-caption.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.voice-interim-caption.is-listening {
    background: rgb(13 13 13 / 0.72);
}

.voice-interim-caption.is-finalizing {
    background: rgb(13 13 13 / 0.9);
}

[data-theme="dark"] .voice-interim-caption {
    background: rgb(47 47 47 / 0.92);
    color: var(--text-primary);
}

/*!*********************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/settings.css ***!
  \*********************************************************************************************************************************/
/* Settings drawer: model/provider picker + response sliders.
 * Anchored near the ⋯ toggle; sectioned layout with token styling.
 */

div#dropdown-content {
    width: min(380px, calc(100vw - 2 * var(--space-4))) !important;
    max-width: calc(100vw - 2 * var(--space-4)) !important;
    max-height: min(70vh, 640px);
    overflow-x: hidden !important;
    overflow-y: auto;
    background-color: var(--surface-raised) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: var(--space-4) !important;
    /* left/top are set in JS (positionSettingsPanel). Do NOT set right: —
       the toolbar's transform would make fixed coords resolve wrongly and
       shove the panel off-screen. */
    position: fixed !important;
    z-index: 1000;
    left: auto !important;
    right: auto !important;
    top: 0;
    box-sizing: border-box;
    animation: settings-panel-in var(--dur-med) var(--ease-out);
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-300) transparent;
}

/* Kill legacy app-shell / bc_style right:% offsets that fight JS placement */
:dir(ltr) div#dropdown-content,
:dir(rtl) div#dropdown-content {
    left: auto !important;
    right: auto !important;
}

@keyframes settings-panel-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

div#dropdown-content::-webkit-scrollbar {
    width: 6px;
}

div#dropdown-content::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 999px;
}

div#dropdown-content::-webkit-scrollbar-track {
    background: transparent;
}

div#settings-container {
    position: relative;
}

/* Toggle button (⋯) */
#settings-dropdown-toggle.dx-button {
    border-radius: var(--radius-md) !important;
    border: none !important;
    background: transparent !important;
    min-width: 34px !important;
    height: 34px !important;
}

div#settings-dropdown-toggle i,
#settings-dropdown-toggle .dx-icon {
    color: var(--text-secondary) !important;
}

#settings-dropdown-toggle.dx-button:hover {
    background: var(--surface-inset) !important;
}

.internet-switch-label-style {
    display: none !important;
}

/* ---------- Sections ---------- */

.settings-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.settings-section + .settings-section {
    margin-block-start: var(--space-4);
    padding-block-start: var(--space-4);
    border-block-start: 1px solid var(--border-subtle);
}

.settings-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0;
}

.settings-section--sliders {
    gap: var(--space-3);
}

/* Kill legacy model-switch chrome from app-shell */
#dropdown-content .model-switch-style {
    color: inherit !important;
    background: transparent !important;
    border-radius: 0 !important;
    width: 100%;
}

#dropdown-content .model-switch-style .dx-button-text {
    color: inherit;
}

/* ---------- Slider rows ---------- */

#dropdown-content .accuracy-creativity-style {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    color: var(--text-secondary);
}

#dropdown-content .accuracy-creativity-style + .accuracy-creativity-style {
    margin-block-start: var(--space-3) !important;
}

#dropdown-content .settings-option-row {
    margin-block-start: var(--space-2) !important;
}

.settings-slider-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-block-end: 6px;
}

.settings-slider-labels > span {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
}

#dropdown-content .dx-slider {
    width: 100% !important;
    margin: 0 !important;
    padding-inline: 2px;
}

.remember-context-style {
    display: none !important;
}

.remember-context-label-style {
    color: var(--text-secondary);
}

/* ---------- Dark theme ---------- */

[data-theme="dark"] div#dropdown-content {
    background-color: var(--surface-raised) !important;
    border-color: var(--border-strong) !important;
}

[data-theme="dark"] div#settings-dropdown-toggle i,
[data-theme="dark"] #settings-dropdown-toggle .dx-icon {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] #settings-dropdown-toggle.dx-button:hover {
    background: var(--surface-raised) !important;
}

[data-theme="dark"] .settings-section + .settings-section {
    border-block-start-color: var(--border-strong);
}

[data-theme="dark"] .settings-section-label {
    color: var(--text-muted);
}

[data-theme="dark"] .settings-slider-labels > span {
    color: var(--text-muted);
}

[data-theme="dark"] .accuracy-creativity-style {
    color: var(--text-secondary);
}

[data-theme="dark"] .remember-context-label-style {
    color: var(--text-secondary);
}

/*!*******************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/modals.css ***!
  \*******************************************************************************************************************************/
/* Popups/modals (Phase 4.3): the source/PDF/text/excel viewer panel
 * (#documentSearch, .right-centered-div) and the content rendered
 * inside it or inside dxPopup instances (citation.js) - search result
 * highlighting, source text items. The dxPopup chrome itself (title
 * bar, content wrapper, backdrop) is re-themed in dx-overrides.css
 * since those are DevExtreme-stamped classes.
 *
 * CSS-only: ids, classList toggles (citation.js/index.js) untouched.
 */

/* ---------- Document/source/PDF viewer panel ---------- */

.right-centered-div {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.right-centered-div-close-button-style {
    background: var(--surface-raised);
    color: var(--text-secondary);
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 600;
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out);
}

.right-centered-div-close-button-style:hover {
    color: var(--status-danger);
}

#documentList {
    background: var(--surface-card);
}

.document-title {
    background: var(--surface-raised);
    color: var(--text-primary);
    font-family: var(--font-sans);
    padding: var(--space-2) var(--space-3);
}

.document-content {
    background: var(--surface-card);
    color: var(--text-primary);
    font-family: var(--font-sans);
}

#pdfContainer, #textContainer, #excelContainer, #wordContainer {
    background: var(--surface-card) !important;
}

/* ---------- Source popup content (citation.js) ---------- */

.source-popup-content {
    background: var(--surface-card);
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.text-item {
    padding-block-end: var(--space-3);
    margin-block-end: var(--space-3);
    border-block-end: 1px solid var(--border-subtle);
}

.text-item:last-child {
    border-block-end: none;
}

.text-item h3 {
    font-size: var(--text-md);
    color: var(--text-primary);
    margin-block-end: var(--space-1);
}

.text-item h4 {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    margin-block-end: var(--space-2);
}

/* Matched-segment highlight (referenceSource() wraps hits in <mark>) -
   classic soft-yellow highlight; the accent is near-black now, so an
   accent-tinted highlight would read as selected/inverted text. */
mark {
    background: #FFF8C5;
    color: inherit;
    border-radius: 3px;
    padding: 0 2px;
}

/* ---------- Dark theme ---------- */

[data-theme="dark"] .right-centered-div {
    background: var(--surface-app);
    border-color: var(--border-strong);
}

[data-theme="dark"] .right-centered-div-close-button-style {
    background: var(--surface-raised);
    color: var(--text-secondary);
    border-bottom-color: var(--border-strong);
}

[data-theme="dark"] #documentList,
[data-theme="dark"] .document-content,
[data-theme="dark"] #pdfContainer,
[data-theme="dark"] #textContainer,
[data-theme="dark"] #excelContainer,
[data-theme="dark"] #wordContainer {
    background: var(--surface-app) !important;
    color: var(--text-primary);
}

[data-theme="dark"] .document-title {
    background: var(--surface-raised);
    color: var(--text-primary);
}

[data-theme="dark"] .source-popup-content {
    background: var(--surface-app);
    color: var(--text-primary);
}

[data-theme="dark"] .text-item {
    border-block-end-color: var(--border-strong);
}

[data-theme="dark"] .text-item h3 { color: var(--text-primary); }
[data-theme="dark"] .text-item h4 { color: var(--text-muted); }

[data-theme="dark"] mark {
    background: #574D1D;
    color: #F3F3F3;
}

/*!***********************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/onboarding.css ***!
  \***********************************************************************************************************************************/
/* Onboarding (Phase 4.4): the Quick Tips slide-out panel and its edge
 * tab (#quickTipsContainer). The driver.js tour popovers used by
 * basic_tour.js / collection_tour.js / filter_tour.js / prompt_chain_
 * tour.js / detailed_tour.js are themed separately in
 * vendor/driver/driver_popover_style.css - that file is already the
 * dedicated, loaded-later stylesheet for `popoverClass: 'driverjs-
 * theme'`, so duplicating those rules here would just be dead weight
 * shadowed by the real one.
 *
 * CSS-only: ids, the visible/hidden class toggles untouched.
 */

.quick-tips-button {
    background-color: var(--accent-solid);
    color: var(--on-accent-solid);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: var(--text-xs);
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--dur-fast) var(--ease-out);
}

.quick-tips-button:hover {
    background-color: var(--accent-hover);
}

.quick-tips-panel {
    background-color: var(--surface-card);
    color: var(--text-primary);
    border-inline-end: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-sans);
}

.quick-tips-panel h3 {
    color: var(--text-primary);
    font-size: var(--text-lg);
    font-weight: 650;
}

.quick-tips-panel p {
    color: var(--text-secondary);
    font-weight: 600;
}

.quick-tips-panel ul {
    color: var(--text-secondary);
}

.quick-tips-panel li b {
    color: var(--text-primary);
}

/* ---------- Dark theme ---------- */

[data-theme="dark"] .quick-tips-panel {
    background-color: var(--surface-app);
    color: var(--text-primary);
    border-inline-end-color: var(--border-strong);
}

[data-theme="dark"] .quick-tips-panel h3 { color: #F3F3F3; }
[data-theme="dark"] .quick-tips-panel p { color: var(--text-secondary); }
[data-theme="dark"] .quick-tips-panel ul { color: var(--text-secondary); }
[data-theme="dark"] .quick-tips-panel li b { color: var(--text-primary); }

/*!*************************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/dx-overrides.css ***!
  \*************************************************************************************************************************************/
/* DevExtreme visual-patch quarantine.
 *
 * All CSS overrides needed to make DevExtreme widgets match the app's
 * design (rather than the stock Material theme) belong in this file,
 * loaded after the DevExtreme theme stylesheet. Keeping DX patches out
 * of bc_style.css/custom.css/chat.css etc. means a future DevExtreme
 * version bump only requires re-checking this one file.
 *
 * Populated starting in the token/theme phase (Phase 2.5).
 */

/* DevExtreme stamps `.dx-theme-material-typography` onto <body> at init
 * time and its own theme CSS sets font-family there. A class selector
 * always outranks the plain `body, html` type selector in app-shell.css
 * on specificity, regardless of load order, so the design-system font
 * (tokens.css --font-sans) was never actually winning. Matching the
 * class here, rather than reaching for !important, keeps this fix
 * exactly as specific as it needs to be and no more. */
body.dx-theme-material-typography,
html.dx-theme-material-typography {
  font-family: var(--font-sans);
}

/* ---------- Settings drawer ---------- */

/* Provider / model / font / search pickers: wrapping chip group, no
   horizontal scroll. Selected = filled accent; idle = quiet outline. */
#dropdown-content .dx-buttongroup {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  gap: 6px;
}

#dropdown-content .dx-buttongroup-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  gap: 6px !important;
  white-space: normal !important;
}

#dropdown-content .dx-buttongroup .dx-button {
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-inset) !important;
  color: var(--text-secondary) !important;
  margin: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  box-shadow: none !important;
  flex: 0 1 auto;
  max-width: 100%;
}

#dropdown-content .dx-buttongroup .dx-button .dx-button-content {
  padding: 0 10px !important;
}

#dropdown-content .dx-buttongroup .dx-button .dx-button-text {
  font-size: var(--text-xs) !important;
  font-weight: 500 !important;
  text-transform: none !important;
  color: var(--text-secondary) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

#dropdown-content .dx-buttongroup .dx-button:hover {
  border-color: var(--border-strong) !important;
  background: var(--neutral-200) !important;
}

#dropdown-content .dx-buttongroup .dx-button.dx-button-selected,
#dropdown-content .dx-buttongroup .dx-button.dx-state-active {
  background: var(--accent-solid) !important;
  border-color: var(--accent-solid) !important;
}

#dropdown-content .dx-buttongroup .dx-button.dx-button-selected .dx-button-text,
#dropdown-content .dx-buttongroup .dx-button.dx-state-active .dx-button-text {
  color: var(--on-accent-solid) !important;
}

/* Search-type radio-looking items inside the button group */
#dropdown-content .dx-radiobutton-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

#dropdown-content .dx-radiobutton-container input {
  accent-color: var(--accent);
}

/* Sliders: quiet track, accent fill, crisp handle */
#dropdown-content .dx-slider {
  height: 28px !important;
}

#dropdown-content .dx-slider-bar {
  background: var(--neutral-200) !important;
  height: 4px !important;
  border-radius: 999px !important;
}

#dropdown-content .dx-slider-range.dx-slider-range-visible {
  background: var(--accent) !important;
  border-radius: 999px !important;
}

#dropdown-content .dx-slider-handle {
  width: 16px !important;
  height: 16px !important;
  margin-top: -6px !important;
  background: var(--neutral-0) !important;
  border: 2px solid var(--accent) !important;
  border-radius: 50% !important;
  box-shadow: var(--shadow-sm) !important;
}

#dropdown-content .dx-slider-handle::after {
  display: none !important;
}

#dropdown-content .dx-slider-tooltip .dx-tooltip-content,
#dropdown-content .dx-slider-label {
  font-family: var(--font-sans) !important;
  font-size: var(--text-xs) !important;
  color: var(--text-secondary) !important;
}

[data-theme="dark"] #dropdown-content .dx-buttongroup .dx-button {
  background: var(--surface-app) !important;
  border-color: var(--border-strong) !important;
  color: var(--text-secondary) !important;
}

[data-theme="dark"] #dropdown-content .dx-buttongroup .dx-button .dx-button-text {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] #dropdown-content .dx-buttongroup .dx-button:hover {
  background: var(--border-strong) !important;
  border-color: #5B5B5B !important;
}

/* The selected pill is now a solid mid-indigo (--accent-solid) rather than
   the light lavender accent, so its label must be light, not near-black. */
[data-theme="dark"] #dropdown-content .dx-buttongroup .dx-button.dx-button-selected .dx-button-text,
[data-theme="dark"] #dropdown-content .dx-buttongroup .dx-button.dx-state-active .dx-button-text {
  color: var(--on-accent-solid) !important;
}

[data-theme="dark"] #dropdown-content .dx-slider-bar {
  background: var(--border-strong) !important;
}

[data-theme="dark"] #dropdown-content .dx-slider-handle {
  background: var(--surface-app) !important;
  border-color: var(--text-primary) !important;
}

/* ---------- dxPopup chrome (Phase 4.3) ----------
   Shared by every dxPopup instance in the app: source viewer, PDF
   viewer, collection-choice/link-ingestion confirmation (citation.js,
   file_upload.js). .custom-popup is an extra class citation.js adds
   to the source/PDF viewers specifically; the plain .dx-popup rules
   below cover the confirmation dialogs too. */

.dx-overlay-wrapper.dx-popup-wrapper .dx-overlay-shader {
  background: rgb(0 0 0 / 50%);
}

.dx-popup-normal {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border-subtle) !important;
  overflow: hidden;
}

/* Material theme draws a green focus ring around the popup container
   itself (dxPopup grabs focus on show) - token shadow above already
   reads as "raised"; the buttons/inputs inside keep their own
   :focus-visible ring, so the container doesn't need one too. */
.dx-popup-normal.dx-state-focused {
  box-shadow: var(--shadow-lg) !important;
  outline: none !important;
  border-color: var(--border-subtle) !important;
}

.dx-popup-title {
  background: var(--surface-raised) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  font-weight: 600 !important;
  padding: var(--space-3) var(--space-4) !important;
}

.dx-popup-title .dx-closebutton .dx-icon {
  color: var(--text-muted) !important;
}

.dx-popup-content {
  background: var(--surface-card) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  padding: var(--space-4) !important;
}

.dx-popup-bottom.dx-toolbar {
  background: var(--surface-raised) !important;
  border-top: 1px solid var(--border-subtle) !important;
}

/* Confirmation dialog buttons (popup-for-choosing-collection etc.) */
.dx-popup-bottom .dx-button.popup-button {
  border-radius: var(--radius-md) !important;
}

[data-theme="dark"] .dx-popup-normal {
  border-color: var(--border-strong) !important;
}

[data-theme="dark"] .dx-popup-title,
[data-theme="dark"] .dx-popup-bottom.dx-toolbar {
  background: var(--surface-raised) !important;
  border-color: var(--border-strong) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .dx-popup-content {
  background: var(--surface-app) !important;
  color: var(--text-primary) !important;
}

/* ---------- Dropdown-editor popups (filter + collections) ----------
   The "Select a filter" control (#treeview-sources-container) and the
   collections picker (#treeBox) are dxDropDownBox widgets whose popups
   render a searchable dxTreeView of document/collection names in a
   .dx-dropdowneditor-overlay. The legacy dark rules darkened the popup
   background but left the item text and the search field low-contrast
   ("hard to see content in dark theme"). These give the popup, its list
   items, and its search box proper contrast in both themes. */

.dx-dropdowneditor-overlay .dx-overlay-content,
.dx-dropdowneditor-overlay .dx-popup-content,
.dx-dropdowneditor-overlay .dx-list,
.dx-dropdowneditor-overlay .dx-treeview {
  background: var(--surface-raised) !important;
  color: var(--text-primary) !important;
}

/* One popover recipe for the whole app (settings panel, prompt menu, these
   dropdowns): radius-lg, subtle border, shadow-lg, bounded height. */
.dx-dropdowneditor-overlay .dx-overlay-content {
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  overflow: hidden;
}

.dx-dropdowneditor-overlay .dx-popup-content {
  max-height: min(60vh, 520px) !important;
}

/* Pinned non-collection rows in the collections picker (classes applied in
   the treeview's onItemRendered): id 1 = the none-selected state, id 2 = the
   Internet mode. Muted / labeled so they read apart from real collections,
   with a hairline closing the pinned block. */
.collection-row-placeholder .dx-treeview-item {
  color: var(--text-muted) !important;
  font-style: italic;
}

.collection-row-internet {
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
  padding-bottom: 4px;
}

.collection-row-internet .dx-treeview-item::before {
  content: '🌐';
  margin-inline-end: 6px;
  font-size: 12px;
}

.dx-dropdowneditor-overlay .dx-treeview-item,
.dx-dropdowneditor-overlay .dx-treeview-item-content,
.dx-dropdowneditor-overlay .dx-list-item,
.dx-dropdowneditor-overlay .dx-list-item-content {
  color: var(--text-primary) !important;
}

.dx-dropdowneditor-overlay .dx-treeview-item:hover,
.dx-dropdowneditor-overlay .dx-list-item:hover {
  background: var(--surface-inset) !important;
}

/* Selected item (e.g. currently-chosen collection) — DevExtreme's default
   theme paints this with its own accent background, which combined with
   our text-primary override above left the label nearly unreadable
   ("almost same color as background"). Force both halves of the pairing. */
.dx-dropdowneditor-overlay .dx-list-item-selected,
.dx-dropdowneditor-overlay .dx-list-item-selected .dx-list-item-content,
.dx-dropdowneditor-overlay .dx-treeview-item-selected,
.dx-dropdowneditor-overlay .dx-treeview-item-selected .dx-treeview-item-content,
.dx-dropdowneditor-overlay .dx-state-focused.dx-list-item,
.dx-dropdowneditor-overlay .dx-state-focused .dx-list-item-content {
  background: var(--accent-subtle) !important;
  color: var(--text-primary) !important;
}

/* Search field inside the dropdown */
.dx-dropdowneditor-overlay .dx-texteditor-input {
  color: var(--text-primary) !important;
}
.dx-dropdowneditor-overlay .dx-placeholder,
.dx-dropdowneditor-overlay .dx-placeholder::before {
  color: var(--text-muted) !important;
}
.dx-dropdowneditor-overlay .dx-texteditor.dx-editor-filled,
.dx-dropdowneditor-overlay .dx-treeview-search .dx-texteditor {
  background: var(--surface-inset) !important;
}

/* Dark theme */
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-overlay-content,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-popup-content,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-list,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-treeview {
  background: var(--surface-raised) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-strong) !important;
}

[data-theme="dark"] .dx-dropdowneditor-overlay .dx-treeview-item,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-treeview-item-content,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-list-item,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-list-item-content {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .dx-dropdowneditor-overlay .dx-treeview-item:hover,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-list-item:hover {
  background: #424242 !important;
}

[data-theme="dark"] .dx-dropdowneditor-overlay .dx-list-item-selected,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-list-item-selected .dx-list-item-content,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-treeview-item-selected,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-treeview-item-selected .dx-treeview-item-content,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-state-focused.dx-list-item,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-state-focused .dx-list-item-content {
  background: #17313A !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .dx-dropdowneditor-overlay .dx-texteditor-input {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .dx-dropdowneditor-overlay .dx-texteditor.dx-editor-filled,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-texteditor-input-container,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-treeview-search .dx-texteditor {
  background: var(--surface-app) !important;
}

[data-theme="dark"] .dx-dropdowneditor-overlay .dx-placeholder,
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-placeholder::before {
  color: var(--text-muted) !important;
}

/* Checkbox glyphs in the tree (if the picker uses them) */
[data-theme="dark"] .dx-dropdowneditor-overlay .dx-checkbox-icon {
  border-color: #5B5B5B !important;
}

/*!***********************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/responsive.css ***!
  \***********************************************************************************************************************************/
/* Responsive breakpoints (Phase 5). Loads last so it wins the cascade
 * cleanly at each width. Logical properties throughout so the sidebar
 * drawer and every offset flip correctly for RTL locales.
 *
 * Breakpoints:
 *   >=1200px  desktop - sidebar always visible, resizable, no drawer.
 *   <1200px   sidebar becomes an off-canvas drawer (js/index.js's two
 *             hamburger buttons already toggle `.show-left-section` on
 *             .resizable1 - only the CSS backing it was missing/broken;
 *             see the Phase 5 JS note below).
 *   <768px    additional mobile-only treatment: composer chip wrap,
 *             settings drawer becomes a full-screen sheet, dvh-based
 *             chat height for mobile keyboard/URL-bar chrome resize.
 *
 * Phase 5 JS change (js/index.js): the two hamburger onClick handlers
 * (#left-breadcrumb-menu, #breadcrumb-menu) previously toggled inline
 * style.display/width by hand, which can't be transitioned and fought
 * the drawer's slide animation. Simplified to a single classList.toggle
 * so CSS fully owns the visual state; a new outside-click handler closes
 * the drawer when tapping the scrim. Both are additive/isolated - no
 * RPC, auth, or streaming logic touched.
 */

/* ---------- <1200px: sidebar becomes an off-canvas drawer ---------- */

@media (max-width: 1199.98px) {
    .wrap {
        overflow: visible; /* let the fixed-position drawer paint outside the float flow */
    }

    /* app-shell.css still carries a legacy `.resizable1 { display:none }`
       rule scoped to its own old max-width:785px breakpoint - it has no
       !important and normally loses to a later stylesheet, but with no
       competing `display` declaration of ours in the 768-1199px gap it
       was winning by default and collapsing the drawer to 0x0 there.
       Forcing display here removes the ambiguity at every width this
       block covers. */
    .resizable1 {
        display: block !important;
        position: fixed !important;
        inset-block: 0;
        inset-inline-start: 0;
        width: min(320px, 85vw) !important;
        max-width: none;
        height: 100dvh;
        z-index: 1200;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform var(--dur-med) var(--ease-out);
    }

    /* inset-inline-start:0 above already resolves to the correct physical
       edge for both directions (left in LTR, right in RTL - that's the
       whole point of the logical property). Only the hide-transform needs
       a dir-specific flip: translateX is a physical axis, not a logical
       one, so "push it off toward the start edge" means negative X in
       LTR but positive X in RTL. Using inset-inline-end here instead -
       the earlier draft's actual bug - repositioned the resting drawer
       to the wrong physical edge and left ~70px of it visibly bleeding
       onto screen in RTL; caught via computed-style inspection in the
       Playwright gate. */
    :dir(rtl) .resizable1 {
        transform: translateX(100%);
    }

    .resizable1.show-left-section {
        transform: translateX(0);
    }

    .resizable2 {
        width: 100% !important;
        float: none;
    }

    /* Splitter disabled below the desktop breakpoint - the drawer has a
       fixed width, dragging it no longer makes sense. */
    .ui-resizable-e {
        display: none !important;
        pointer-events: none;
    }

    /* Scrim behind the open drawer (:has() - evergreen browser baseline,
       already relied on elsewhere via color-mix() in tokens.css). */
    body:has(.resizable1.show-left-section)::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgb(0 0 0 / 50%);
        z-index: 1190; /* just under the drawer's 1200 */
    }

    .breadcrumb-menu-style {
        visibility: visible !important;
    }
}

@media (min-width: 1200px) {
    .breadcrumb-menu-style {
        visibility: hidden !important;
    }
}

/* ---------- <768px: mobile-only treatment ---------- */

@media (max-width: 767.98px) {
    #blue-strip {
        min-height: 48px;
        gap: var(--space-1);
        padding-inline: var(--space-2);
    }

    /* Composer control row already wraps (composer.css); just tighten
       gutters so the wrapped chips don't crowd the edges. */
    .chat-inputs-container {
        padding-inline: var(--space-2) !important;
    }

    .question-box-area {
        padding: var(--space-2) !important;
    }

    /* Chat cards run closer to the edges - the 880px cap already makes
       them full-width below that, this just trims the gutter and the
       avatar reservation isn't worth the width on a narrow phone. */
    #chatMessageList .dx-list-item {
        padding-inline: var(--space-2);
    }

    .message-novaluna-bot {
        padding-inline-start: var(--space-4) !important;
    }

    .message-image {
        display: none;
    }

    /* Settings drawer becomes a full-screen sheet instead of a floating
       420px card - there's no good place to float it on a phone. */
    div#dropdown-content {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        max-height: none !important;
        border-radius: 0 !important;
        animation: none !important;
    }

    /* dvh accounts for mobile browser chrome (URL bar) and the
       on-screen keyboard resizing the viewport while the composer is
       focused - vh alone leaves dead space or clips the last message. */
    .chatbox-container {
        height: calc(100dvh - 50px) !important;
    }
}

/*!******************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/toast.css ***!
  \******************************************************************************************************************************/
/* Toast notifications (js/ui/toast.js) - replaces DevExpress.ui.notify.
 * Stacked, dismissible, anchored top-center to match every existing call
 * site's `position: { my: 'center top', at: 'center top' }`. Consumes the
 * shared status tokens from tokens.css so dark mode needs no separate rules.
 */

#toast-container {
    position: fixed;
    top: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1300;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    max-width: min(420px, calc(100vw - var(--space-8)));
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}

.toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    font-size: 12px;
    line-height: 1;
}

.toast-message {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.toast-success .toast-icon {
    background: var(--status-success-bg);
    color: var(--status-success);
}

.toast-error .toast-icon {
    background: var(--status-danger-bg);
    color: var(--status-danger);
}

.toast-warning .toast-icon {
    background: var(--status-warning-bg);
    color: var(--status-warning);
}

.toast-info .toast-icon {
    background: var(--status-info-bg);
    color: var(--status-info);
}

/*!*******************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/switch.css ***!
  \*******************************************************************************************************************************/
/* Native toggle switch (js/ui/switch.js) - replaces DevExtreme's dxSwitch.
 * Spec carried over unchanged from the dx-overrides.css rules it replaces:
 * light-gray track + white knob OFF, accent track + on-accent knob ON,
 * 36x20 toolbar sizing. Native markup means no more fighting dxSwitch's own
 * pseudo-elements with !important.
 */

.nv-switch {
    display: inline-flex;
    align-items: center;
}

.nv-switch-track {
    position: relative;
    width: 32px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: var(--radius-full);
    background: var(--neutral-300);
    cursor: pointer;
    transition: background-color var(--dur-med) var(--ease-out);
}

.nv-switch-track:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.nv-switch-handle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.35), 0 0 0 0.5px rgb(0 0 0 / 0.12);
    transition: transform var(--dur-med) var(--ease-out);
}

.nv-switch-track.nv-switch-on {
    background: var(--accent);
}

.nv-switch-track.nv-switch-on .nv-switch-handle {
    background: var(--text-on-accent);
    transform: translateX(14px);
    box-shadow: none;
}

[data-theme="dark"] .nv-switch-track {
    background: #565656;
}

[data-theme="dark"] .nv-switch-handle {
    background: var(--text-primary);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
}

/* Toolbar hit-target sizing (matches the prior .top-settings-toolbar-style
   .dx-switch override). */
.top-settings-toolbar-style .nv-switch-track {
    width: 36px;
    height: 20px;
}

.top-settings-toolbar-style .nv-switch-handle {
    width: 16px;
    height: 16px;
}

.top-settings-toolbar-style .nv-switch-track.nv-switch-on .nv-switch-handle {
    transform: translateX(16px);
}

/*!***************************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/load-indicator.css ***!
  \***************************************************************************************************************************************/
/* Send-button spinner (js/ui/load-indicator.js) - replaces DevExtreme's
 * dxLoadIndicator. Renders into the existing 22x22 .button-indicator slot
 * (app-shell.css) via currentColor, so it automatically matches whatever
 * button it sits in - white on the teal send button, no separate dark-theme
 * rule needed.
 */

.nv-load-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nv-load-indicator-ring {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    border: 2px solid currentColor;
    border-top-color: transparent;
    opacity: 0.85;
    animation: nv-spin 0.7s linear infinite;
}

@keyframes nv-spin {
    to {
        transform: rotate(360deg);
    }
}

/*!*******************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/slider.css ***!
  \*******************************************************************************************************************************/
/* Native slider (js/ui/slider.js) - replaces DevExtreme's dxSlider.
 * Color/sizing for .dx-slider/.dx-slider-bar/.dx-slider-range/
 * .dx-slider-handle/.dx-tooltip-content already comes from
 * dx-overrides.css (kept identical class names deliberately - see that
 * file and slider.js's own header comment). This file only adds the
 * interaction/positioning mechanics DevExtreme's real widget handled
 * internally that dx-overrides.css never needed to touch: track hit
 * target, handle centering, and the tooltip's floating position + show/
 * hide toggle (DevExtreme's version used a full popover/overlay component
 * for this; a plain absolutely-positioned bubble is simpler and doesn't
 * need one).
 */

.dx-slider {
    position: relative;
    width: 100%;
}

.dx-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    /* Taller than the visible 4px track so the draggable hit area is
       comfortable, matching the .dx-slider height:28px already set by
       dx-overrides.css. */
    height: 28px;
    cursor: pointer;
}

.dx-slider-bar {
    position: relative;
    width: 100%;
}

.dx-slider-range {
    position: relative;
    height: 100%;
}

.dx-slider-handle {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
    cursor: grab;
}

.dx-slider-handle:active {
    cursor: grabbing;
}

.dx-slider-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
    opacity: 1;
    transition: opacity var(--dur-fast) var(--ease-out);
}

.dx-slider-tooltip-hidden {
    opacity: 0;
}

.dx-slider-tooltip .dx-tooltip-content {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    box-shadow: var(--shadow-sm);
}

/*!***********************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/select-box.css ***!
  \***********************************************************************************************************************************/
/* Native <select> (js/ui/select-box.js) - replaces DevExtreme's
 * dxSelectBox. Styling matches the established native-select pattern
 * already used for #languageDropdown (css/shell.css) - explicit surface +
 * color-scheme so it doesn't fall back to OS chrome in dark mode.
 */

.nv-select-box {
    display: inline-block;
}

.nv-select-box-input {
    background: var(--surface-card);
    color-scheme: light;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    width: auto;
    height: 32px;
    padding: 0 var(--space-2);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    cursor: pointer;
}

[data-theme="dark"] .nv-select-box-input {
    color-scheme: dark;
    color: var(--text-secondary);
}

/*!******************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/popup.css ***!
  \******************************************************************************************************************************/
/* Dialogs (js/ui/popup.js) - replaces DevExtreme's dxPopup.
 *
 * Built on a real <dialog> element, which buys correct behavior for free
 * rather than reimplementing it: top-layer stacking (no z-index fights with
 * the composer/sidebar), a genuine focus trap, inert background content, and
 * a native ::backdrop to style.
 *
 * Design intent - deliberately a visual upgrade, not a like-for-like port of
 * DevExtreme's Material chrome (Phases 1-5a were faithful reproductions; this
 * is the first phase asked to modernise what it touches). The look: a soft
 * blurred scrim, a single lifted card with generous breathing room, one clear
 * type hierarchy (title > body > actions), quiet secondary actions with a
 * single filled primary, and a short spring-less entrance so dialogs feel
 * placed rather than thrown. Everything is token-driven, so light/dark both
 * work with no theme-specific rules.
 */

.nv-dialog {
    /* Reset the UA's dialog chrome so .nv-dialog-panel is the only surface. */
    padding: 0;
    border: none;
    background: transparent;
    max-width: none;
    max-height: none;
    overflow: visible;
    margin: auto;
}

.nv-dialog::backdrop {
    background: rgb(15 20 25 / 0.45);
    backdrop-filter: blur(4px);
    animation: nv-backdrop-in var(--dur-med) var(--ease-out);
}

.nv-dialog-panel {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: min(420px, calc(100vw - var(--space-8)));
    max-width: calc(100vw - var(--space-8));
    max-height: min(85vh, calc(100vh - var(--space-10)));
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* fill-mode intentionally left at `none`: the end state matches the
   element's normal style, so once the animation finishes the panel is free
   of animation-controlled transforms and dragging (which writes an inline
   transform) isn't overridden by the still-winning animation. */
.nv-dialog[open] .nv-dialog-panel {
    animation: nv-dialog-in var(--dur-med) var(--ease-out);
}

@keyframes nv-dialog-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
}

@keyframes nv-backdrop-in {
    from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .nv-dialog[open] .nv-dialog-panel,
    .nv-dialog::backdrop {
        animation: none;
    }
}

/* Source/PDF viewers anchor to the right edge so the conversation stays
   readable alongside them. */
.nv-dialog--right {
    margin-inline-end: var(--space-4);
    margin-inline-start: auto;
}

/* ---------- Header ---------- */

.nv-dialog-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    flex: none;
}

.nv-dialog-header--draggable {
    cursor: move;
    user-select: none;
}

/* Scoped under .nv-dialog deliberately: DevExtreme's Material theme stamps
   `.dx-theme-material-typography` on <body> and styles bare headings
   globally (its h2 is 42px/300), which at (0,1,1) outranks a lone
   `.nv-dialog-title` class. Matching specificity rather than reaching for
   !important - same approach dx-overrides.css already uses where the
   Material typography rules collide with the design system. */
.nv-dialog .nv-dialog-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nv-dialog-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: none;
}

.nv-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-base);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
}

.nv-dialog-close:hover {
    background: var(--surface-inset);
    color: var(--text-primary);
}

.nv-dialog-close:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* ---------- Body ---------- */

.nv-dialog-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* dx-overrides.css styles .dx-popup-content with !important (the content
   element keeps that class for citation.js's own .custom-popup /
   #source-popup-content styling), so matching weight is required here. */
.nv-dialog .dx-popup-content {
    background: transparent !important;
    padding: var(--space-5) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-sans) !important;
    font-size: var(--text-md) !important;
    line-height: 1.55 !important;
}

/* Also scoped under .nv-dialog - see the note on .nv-dialog-title; the
   Material typography rules cover p/label too. */
.nv-dialog .nv-dialog-body p {
    margin: 0 0 var(--space-3);
    color: var(--text-secondary);
}

.nv-dialog .nv-dialog-body p:last-child {
    margin-bottom: 0;
}

.nv-dialog .nv-dialog-body label,
.nv-dialog .nv-dialog-body .project-dialog-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

/* ---------- Footer ---------- */

.nv-dialog-footer {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-raised);
    flex: none;
}

.nv-dialog-footer-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nv-dialog-footer-group--before { margin-inline-end: auto; }
.nv-dialog-footer-group--center { margin-inline: auto; }
.nv-dialog-footer-group--after  { margin-inline-start: auto; }

/* An empty group must not consume the auto-margin slot, or a single
   `location:'after'` button would be pushed off-centre by a phantom one. */
.nv-dialog-footer-group:empty { display: none; }

/* ---------- Footer buttons ----------
   Rendered through the Phase 4 $.fn.dxButton shim, so they arrive as
   .dx-button. Quiet by default, one filled primary. The !important weight
   matches app-shell.css's global .dx-button rules (including a hover
   translateY that would make dialog actions bounce). */

.nv-dialog-footer .dx-button {
    min-height: 36px;
    padding: 0 var(--space-4) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface-card) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out) !important;
    cursor: pointer;
}

.nv-dialog-footer .dx-button .dx-button-text {
    font-family: var(--font-sans) !important;
    font-size: var(--text-base) !important;
    font-weight: 500 !important;
    text-transform: none !important;
    color: inherit !important;
}

.nv-dialog-footer .dx-button:hover {
    background: var(--surface-inset) !important;
    border-color: var(--border-strong) !important;
}

.nv-dialog-footer .dx-button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring) !important;
}

.nv-dialog-footer .dx-button.dx-button-default {
    background: var(--accent-solid) !important;
    color: var(--on-accent-solid) !important;
    border-color: var(--accent) !important;
    color: var(--text-on-accent) !important;
}

.nv-dialog-footer .dx-button.dx-button-default:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
}

.nv-dialog-footer .dx-button.dx-button-danger {
    background: var(--status-danger) !important;
    border-color: var(--status-danger) !important;
    color: #FFFFFF !important;
}

.nv-dialog-footer .dx-button.dx-button-danger:hover {
    filter: brightness(0.94);
}

.nv-dialog-footer .dx-button .dx-icon {
    color: inherit !important;
    font-size: var(--text-base) !important;
}

/* Quiet header action (a `toolbar:'top'` / `locateInMenu:'always'` item,
   e.g. "More info") - informational, so it reads as a link, not a button. */
/* Compound, not descendant: popup.js adds .nv-dialog-header-action to the
   same element the dxButton shim then turns into .dx-button, so they land
   on one node rather than nesting. */
.nv-dialog-header-action.dx-button {
    min-height: 28px;
    padding: 0 var(--space-2) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    color: var(--text-secondary) !important;
}

.nv-dialog-header-action.dx-button:hover {
    background: var(--surface-inset) !important;
    color: var(--text-primary) !important;
}

.nv-dialog-header-action .dx-button .dx-button-text {
    font-size: var(--text-sm) !important;
    font-weight: 500 !important;
    text-transform: none !important;
    color: inherit !important;
}

/*!***********************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/pdf-viewer.css ***!
  \***********************************************************************************************************************************/
/* PDF viewer (js/document_viewer.js).
 *
 * Continuous-scroll page list + a toolbar with page navigation, zoom,
 * in-document search, print and download. Pages render lazily via an
 * IntersectionObserver so a large PDF doesn't rasterize every page up
 * front - it pairs with the Range-request streaming in displayPDF(), where
 * pdf.js only fetches the byte ranges for pages actually being looked at.
 */

/* ---------- Toolbar ---------- */

#pdfToolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* As a flex item of the panel column this would otherwise inherit
       flex-shrink:1, so a toolbar that wrapped to a second row got squashed
       and - because the panel is overflow:hidden - that row (Reset, Maximize,
       Close) was clipped out of sight entirely. */
    flex: 0 0 auto;
    /* Last-resort safety: if the controls still can't fit, scroll them
       rather than clipping any out of reach. */
    overflow-x: auto;
    gap: var(--space-2);
    padding: var(--space-2);
    background: var(--surface-raised, #fff);
    border: 1px solid var(--border-subtle, #ccc);
    border-block-end: none;
    border-start-start-radius: var(--radius-md, 6px);
    border-start-end-radius: var(--radius-md, 6px);
    font-size: var(--text-sm, 13px);
}

#pdfToolbar .pdf-toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Pushes the trailing group right WITHOUT being a flex item of its own.
   As a `flex: 1 1 auto` spacer it greedily consumed the leftover space on
   the first line, which in a wrapping toolbar shoved the trailing group
   (Print/Download/Reset/Maximize/Close) onto a second row - and that row is
   what disappeared inside the panel's overflow:hidden. */
#pdfToolbar .pdf-toolbar-spacer {
    display: none;
}

#pdfToolbar .pdf-toolbar-group:last-child {
    margin-inline-start: auto;
}

#pdfToolbar button {
    appearance: none;
    border: 1px solid var(--border-subtle, #ccc);
    background: var(--surface-primary, #fff);
    color: var(--text-primary, #222);
    border-radius: var(--radius-sm, 4px);
    padding: 4px 8px;
    cursor: pointer;
    line-height: 1.2;
    transition: background var(--dur-fast, .15s) var(--ease-out, ease);
}

#pdfToolbar button:hover:not(:disabled) {
    background: var(--surface-inset, #f2f2f2);
}

#pdfToolbar button:disabled {
    opacity: 0.4;
    cursor: default;
}

#pdfToolbar input[type="text"],
#pdfToolbar input[type="number"] {
    border: 1px solid var(--border-subtle, #ccc);
    border-radius: var(--radius-sm, 4px);
    background: var(--surface-primary, #fff);
    color: var(--text-primary, #222);
    padding: 4px 6px;
    font: inherit;
}

#pdfToolbar input[type="number"] {
    width: 4.5em;
    text-align: center;
}

#pdfToolbar .pdf-search-input {
    width: 14em;
}

#pdfToolbar .pdf-page-count,
#pdfToolbar .pdf-search-status {
    color: var(--text-muted, #666);
    white-space: nowrap;
}

/* ---------- Draggable / resizable panel ----------
 * The panel was pinned by hardcoded percentages (left:12%; right:18%;
 * height:68%) with no way to move or resize it, so it always covered the
 * same slice of the conversation. Dragging switches it to explicit px
 * left/top/width/height (set from JS), and `resize: both` gives a native
 * corner grip - it needs a non-visible overflow, which the panel already has.
 */
#documentSearch.right-centered-div {
    display: flex;
    flex-direction: column;
    resize: both;
    min-width: 380px;
    min-height: 260px;
    max-width: 100vw;
    max-height: 100vh;
}

/* Once dragged/resized, JS sets explicit geometry; these must win over the
   percentage rules in app-shell.css without needing !important there. */
#documentSearch.viewer-floating {
    right: auto;
}

#documentSearch.viewer-maximized {
    inset: 8px !important;
    width: auto !important;
    height: auto !important;
    resize: none;
}

/* The panel is a flex column, so the page list takes the remaining height
   instead of the fixed 500px from index.html's inline <style> - that fixed
   height is why most of the document sat off-screen. */
#pdfContainer {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
    overflow: auto !important;
    background: var(--surface-inset, #f2f2f2);
    padding: var(--space-3, 12px);
    box-sizing: border-box;
    /* Makes this the offsetParent for .pdf-page. Without it the pages
       resolve to #documentSearch (the panel), so their offsetTop included
       the toolbar height while scrollTop is measured from this container -
       page navigation scrolled to the wrong place and the scroll handler
       then snapped the page counter back, so Next appeared to do nothing. */
    position: relative;
}

/* The container is focusable (tabindex) so keyboard scrolling works, but a
   focus ring around the whole document reads as a selected form field.
   Keyboard users still get it via :focus-visible. */
#pdfContainer:focus {
    outline: none;
}

#pdfContainer:focus-visible {
    outline: 2px solid var(--accent, #06c);
    outline-offset: -2px;
}

/* ---------- Title bar ----------
   Was an almost-empty strip holding only a close button, duplicating the
   toolbar's. Now it names the open document and carries the window controls,
   which also makes the drag handle self-explanatory. */
.viewer-title-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.viewer-title {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    font-size: var(--text-sm);
    /* Long filenames truncate instead of pushing the controls off the edge. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: start;
}

.viewer-window-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.viewer-window-controls button {
    appearance: none;
    border: 1px solid var(--border-subtle, #ccc);
    background: var(--surface-primary, #fff);
    color: var(--text-primary, #222);
    border-radius: var(--radius-sm, 4px);
    padding: 2px 8px;
    line-height: 1.3;
    cursor: pointer;
}

.viewer-window-controls button:hover {
    background: var(--surface-inset, #f2f2f2);
}

[data-theme="dark"] .viewer-window-controls button {
    background: var(--surface-app);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

[data-theme="dark"] .viewer-window-controls button:hover {
    background: var(--border-strong);
}

/* The panel's header bar and the (usually empty) document list must not be
   shrunk or stretched by the flex column either - only the page list flexes. */
#documentSearch > .right-centered-div-close-button-style,
#documentSearch > #documentList {
    flex: 0 0 auto;
}

/* Grab area: the toolbar's empty space and the header bar. Interactive
   controls inside keep their own cursor and are excluded in JS. */
#pdfToolbar,
.right-centered-div-close-button-style {
    cursor: grab;
    user-select: none;
}

#documentSearch.viewer-dragging,
#documentSearch.viewer-dragging #pdfToolbar {
    cursor: grabbing;
}

/* Nothing inside should inherit the grab cursor. */
#pdfToolbar button,
#pdfToolbar input {
    cursor: pointer;
}

#pdfToolbar input[type="text"],
#pdfToolbar input[type="number"] {
    cursor: text;
}

.pdf-page {
    position: relative;
    margin: 0 auto var(--space-3, 12px);
    background: #fff;
    box-shadow: var(--shadow-sm, 0 1px 3px rgb(0 0 0 / 20%));
    /* Width/height are set per page in JS from the pdf.js viewport so the
       scroll height is correct before a page has actually rendered. */
}

.pdf-page canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ---------- Text layer (selection, native Ctrl+F, search highlight) ---------- */

.pdf-page .textLayer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.25;
    line-height: 1;
    /* Sits above the canvas so text is selectable; transparent because the
       canvas already paints the glyphs. */
}

.pdf-page .textLayer > span {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

.pdf-page .textLayer ::selection {
    background: rgb(0 100 255 / 40%);
}

.pdf-page .textLayer > span.pdf-search-hit {
    background: rgb(255 220 0 / 60%);
    border-radius: 2px;
}

.pdf-page .textLayer > span.pdf-search-hit-active {
    background: rgb(255 140 0 / 70%);
}

/* ---------- Dark theme ---------- */

[data-theme="dark"] #pdfToolbar {
    background: var(--surface-raised);
    border-color: var(--border-strong);
}

[data-theme="dark"] #pdfToolbar button,
[data-theme="dark"] #pdfToolbar input[type="text"],
[data-theme="dark"] #pdfToolbar input[type="number"] {
    background: var(--surface-app);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

[data-theme="dark"] #pdfToolbar button:hover:not(:disabled) {
    background: var(--border-strong);
}

[data-theme="dark"] #pdfContainer {
    background: #1B1B1B;
}

@media print {
    /* The print path renders the real PDF in a hidden iframe, so nothing
       from the app shell should end up on the page. */
    body > *:not(#pdfPrintFrame) {
        display: none !important;
    }
}

/*!***********************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/experience.css ***!
  \***********************************************************************************************************************************/
/* Simplified app shell - loads last (see the import in js/index.js).
 *
 * Goal: someone who has never used an AI tool can open the app and know
 * what to do. One quiet top bar; every rarely-used control grouped behind
 * a labelled menu; the composer holds everything about "asking"; the empty
 * screen greets you and offers one-click questions.
 *
 * Markup: index.html (nv-* elements). Behaviour: js/ui/shell.js.
 * The older layers (app-shell.css, shell.css, composer.css, responsive.css)
 * still load first; rules here override them where the structure changed,
 * using !important only where those files already do.
 * Colours come from tokens.css only, so both themes follow automatically.
 */

/* ===================================================================
   1. Frame: no second header bar
   =================================================================== */

#blue-strip {
    display: none !important;
}

#hover-zone,
#pin-toggle,
#pin-toast,
#quickTipsContainer,
#quickTipsButton {
    display: none !important;
}

/* #blue-strip used to take 50px off the top; the chat column now owns the
   full viewport height. */
.chatbox-container {
    height: 100vh !important;
    height: 100dvh !important;
}

/* ===================================================================
   2. Sidebar
   =================================================================== */

.resizable1 {
    background: var(--surface-sidebar) !important;
    border-inline-end: 1px solid var(--border-subtle) !important;
}

.resizable1 > .inner {
    height: 100%;
    padding: 0 !important;
}

.resizable1 > .inner > .demo-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0 var(--space-2);
    box-sizing: border-box;
}

.resizable1 > .inner > .demo-container > div[style*="padding: 3px"] {
    display: none;
}

.nv-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    flex: none;
    height: 56px;
    padding-inline: var(--space-2);
}

.nv-sidebar-brand .novaluna-title {
    min-width: 0;
}

.nv-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text-primary) !important;
    text-decoration: none !important;
}

.nv-brand-link img {
    width: 28px;
    height: 28px;
    flex: none;
}

.nv-brand-name {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 650;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nv-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.nv-icon-btn:hover {
    background: var(--surface-inset);
    color: var(--text-primary);
}

.nv-icon-btn:focus-visible,
.nv-account-button:focus-visible,
.nv-toolbar-btn:focus-visible,
.nv-menu-item:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Only needed when the sidebar is a drawer. */
.nv-sidebar-close {
    display: none;
}

/* New chat / New project: plain rows, like every other list item, rather
   than two loud full-width slabs. "New chat" keeps a little more weight
   because it's the most common action. */
.sidebar-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2px !important;
    flex: none;
    padding: 0 0 var(--space-2) !important;
    margin: 0 !important;
}

.sidebar-actions #left-breadcrumb-menu {
    display: none !important;
}

/* Not built yet (guest mode / before sign-in): don't paint an empty box */
.sidebar-actions > #button-newtopic:not(.dx-button),
.sidebar-actions > #button-newproject:not(.dx-button) {
    display: none !important;
}

.sidebar-actions #button-newtopic,
.sidebar-actions #button-newproject {
    position: static !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    width: 100% !important;
    height: 38px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 var(--space-2) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    font-family: var(--font-sans) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out) !important;
}

.sidebar-actions #button-newtopic.dx-state-invisible,
.sidebar-actions #button-newproject.dx-state-invisible {
    display: none !important;
}

.sidebar-actions #button-newtopic:hover,
.sidebar-actions #button-newproject:hover {
    background: var(--surface-inset) !important;
}

.sidebar-actions #button-newtopic .dx-button-content,
.sidebar-actions #button-newproject .dx-button-content {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0 !important;
    justify-content: flex-start !important;
    width: 100%;
}

.sidebar-actions #button-newtopic .dx-button-text,
.sidebar-actions #button-newproject .dx-button-text {
    color: var(--text-primary) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.sidebar-actions #button-newtopic i,
.sidebar-actions #button-newproject i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    font-size: 14px !important;
    color: var(--text-secondary) !important;
}

/* "New chat" gets an outlined pencil-style affordance so it reads as the
   primary thing to do in the sidebar. */
.sidebar-actions #button-newtopic {
    border: 1px solid var(--border-subtle) !important;
    background: var(--surface-card) !important;
    font-weight: 600 !important;
}

.sidebar-actions #button-newtopic:hover {
    background: var(--surface-inset) !important;
}

/* Conversation search */
#topic-tree-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
}

#customTopicTreeSearch {
    flex: none;
    width: 100% !important;
    height: 36px !important;
    margin: 0 0 var(--space-2) !important;
    padding: 0 var(--space-3) 0 34px !important;
    box-sizing: border-box;
    border: 1px solid transparent !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface-inset) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2714%27 height=%2714%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%238A919C%27 stroke-width=%272.4%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2711%27 cy=%2711%27 r=%277%27/%3E%3Cline x1=%2721%27 y1=%2721%27 x2=%2716.65%27 y2=%2716.65%27/%3E%3C/svg%3E") no-repeat 12px center !important;
    color: var(--text-primary) !important;
    font-family: var(--font-sans) !important;
    font-size: 13.5px !important;
    box-shadow: none !important;
}

#customTopicTreeSearch::placeholder {
    color: var(--text-muted);
}

#customTopicTreeSearch:focus {
    outline: none;
    border-color: var(--border-strong) !important;
    background-color: var(--surface-card) !important;
}

#treeview {
    flex: 1 1 auto;
    min-height: 0;
}

/* Conversation rows: one left edge for section labels, folders and chats,
   and long titles end in an ellipsis instead of running under the edge. */
#treeview .dx-treeview-node {
    max-width: 100%;
}

#treeview .dx-treeview-item {
    display: flex !important;
    align-items: center;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 34px;
    overflow: hidden;
    padding-inline-end: 8px !important;
    border-radius: var(--radius-md) !important;
}

#treeview .topic-tree-group-header-node > .dx-treeview-item,
#treeview .topic-tree-project-node > .dx-treeview-item {
    padding-inline-start: 10px !important;
    padding-left: 10px !important;
    margin-inline-start: 0 !important;
}

#treeview .topic-tree-group-header-node > .dx-treeview-item {
    min-height: 0;
}

#treeview .topic-tree-project-node > .dx-checkbox {
    display: none !important;
}

/* dxTreeView renders the template into .dx-treeview-item-content, which
   was display:block with min-width:auto, so it grew to the title's full
   width and the label's ellipsis never triggered. */
#treeview .dx-treeview-item-content {
    display: flex !important;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

#treeview .topic-tree-label {
    display: block;
    flex: 1 1 auto;
}

#treeview .topic-tree-chevron-spacer {
    display: none;
}

/* Guest welcome copy in the sidebar: calmer, smaller. */
#welcome_message {
    margin-top: var(--space-4) !important;
    padding: var(--space-4) var(--space-2);
    overflow-y: auto;
    min-height: 0;
}

#welcome_message .welcome_title {
    font-size: 17px !important;
    line-height: 1.35 !important;
    font-weight: 650 !important;
    color: var(--text-primary) !important;
    margin-bottom: var(--space-2) !important;
}

#welcome_message .welcome-para,
#welcome_message .contact-info {
    font-size: 13px !important;
    line-height: 1.55 !important;
    color: var(--text-secondary) !important;
}

#welcome_message .signup-cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 var(--space-4) !important;
    border-radius: var(--radius-full) !important;
    background: var(--accent-solid) !important;
    color: var(--on-accent-solid) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* Sidebar footer: the single account / settings entry point */
.nv-sidebar-footer {
    flex: none;
    padding: var(--space-2) 0 var(--space-3);
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-2);
}

.nv-account-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    padding: 0 var(--space-2);
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    text-align: start;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out);
}

.nv-account-button:hover,
.nv-account-button[aria-expanded="true"] {
    background: var(--surface-inset);
}

.nv-avatar {
    font-weight: 650;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: var(--radius-full);
    background: var(--accent-subtle);
    color: var(--accent);
    font-size: 12px;
}

.nv-account-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nv-account-more {
    color: var(--text-muted);
    font-size: 13px;
}

/* ===================================================================
   3. Menus (account, export)
   =================================================================== */

.nv-menu {
    position: fixed;
    /* The sidebar is z-index 9999 (app-shell.css); menus open over it. */
    z-index: 10050;
    min-width: 220px;
    padding: 6px;
    box-sizing: border-box;
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-sans);
    animation: nv-menu-in var(--dur-fast) var(--ease-out);
}

.nv-menu[hidden] {
    display: none !important;
}

@keyframes nv-menu-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

.nv-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    box-sizing: border-box;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-primary) !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    text-align: start;
    text-decoration: none !important;
    cursor: pointer;
}

.nv-menu-item[hidden] {
    display: none !important;
}

.nv-menu-item:hover {
    background: var(--surface-inset);
}

.nv-menu-item > i:first-child {
    width: 18px;
    flex: none;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.nv-menu-text {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-weight: 400;
    color: inherit;
    cursor: inherit;
}

.nv-menu-meta {
    margin-inline-start: auto;
    color: var(--text-muted);
    font-size: 13px;
}

i.nv-menu-meta {
    font-size: 11px;
}

.nv-menu-sep {
    height: 1px;
    margin: 6px 4px;
    background: var(--border-subtle);
}

.nv-menu-sep[hidden] {
    display: none;
}

/* Language picker as a menu row */
.nv-menu-item--select {
    cursor: default;
}

.nv-menu-item--select:hover {
    background: transparent;
}

.nv-menu-item--select .language-dropdown-style {
    margin-inline-start: auto;
}

.nv-account-menu #languageDropdown {
    height: 30px !important;
    max-width: 120px;
    padding: 0 var(--space-2) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
    background: var(--surface-card) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-sans) !important;
    font-size: 13px !important;
    cursor: pointer;
}

[data-theme="dark"] .nv-account-menu #languageDropdown {
    color-scheme: dark;
}

/* Export menu: the two original dxButtons rendered as menu rows */
.nv-export {
    position: relative;
}

.nv-export-menu {
    min-width: 210px;
}

.nv-export-menu .dx-button {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    width: 100% !important;
    height: 38px !important;
    min-width: 0 !important;
    padding: 0 10px !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
}

.nv-export-menu .dx-button:hover {
    background: var(--surface-inset) !important;
}

.nv-export-menu .dx-button .dx-button-content {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 12px;
    width: 100%;
    padding: 0 !important;
}

.nv-export-menu .dx-button .dx-icon {
    width: 18px !important;
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.nv-export-menu .dx-button .dx-button-text {
    color: var(--text-primary) !important;
    font-family: var(--font-sans) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* ===================================================================
   4. Top bar (conversation title + Export + Settings)
   =================================================================== */

.top-settings-toolbar-style,
.top-settings-toolbar-style.hidden {
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.top-settings-toolbar-style {
    height: 56px;
    min-height: 56px !important;
    padding: 0 var(--space-4) !important;
    justify-content: space-between;
    border-bottom: 1px solid transparent !important;
    background: var(--surface-app) !important;
    box-sizing: border-box;
}

[data-theme="dark"] .top-settings-toolbar-style {
    border-bottom-color: transparent !important;
    background: var(--surface-app) !important;
}

.top-settings-toolbar-style #sq-toggle-btn.dx-button {
    width: auto !important;
    padding: 0 12px !important;
    gap: 7px;
    color: var(--text-secondary) !important;
}

.top-settings-toolbar-style #sq-toggle-btn .dx-button-content {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
}

.top-settings-toolbar-style #sq-toggle-btn .dx-icon {
    font-size: 13px !important;
    margin: 0 !important;
    color: inherit !important;
}

.top-settings-toolbar-style #sq-toggle-btn .dx-button-text {
    color: inherit !important;
    font-family: var(--font-sans) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.nv-toolbar-start {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1;
    min-width: 0;
}

.nv-toolbar-start .chat-title {
    font-size: 15px !important;
    font-weight: 600;
}

/* Hamburger only when the sidebar is a drawer */
.nv-toolbar-start #breadcrumb-menu {
    display: none !important;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-1) !important;
    flex-wrap: nowrap !important;
}

.nv-toolbar-btn,
.top-settings-toolbar-style #settings-dropdown-toggle.dx-button {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    height: 34px !important;
    min-width: 0 !important;
    padding: 0 12px !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-md) !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-sans) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out) !important;
}

.nv-toolbar-btn:hover,
.nv-toolbar-btn[aria-expanded="true"],
.top-settings-toolbar-style #settings-dropdown-toggle.dx-button:hover {
    background: var(--surface-inset) !important;
    color: var(--text-primary) !important;
}

.nv-toolbar-btn i {
    font-size: 13px;
}

.top-settings-toolbar-style #settings-dropdown-toggle .dx-button-content {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 0 !important;
}

.top-settings-toolbar-style #settings-dropdown-toggle .dx-icon {
    font-size: 13px !important;
    margin: 0 !important;
    color: inherit !important;
}

.top-settings-toolbar-style #settings-dropdown-toggle .dx-button-text {
    color: inherit !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* Guests (shared ?open= links): nothing to export, no SQL connections, and
   no account to sign out of. index.js's first-message path flips the
   sign-out button on even for guests, so this is enforced here. */
.nv-guest .nv-export,
.nv-guest #sq-toggle-btn,
.nv-guest [data-nv-proxy="#icon-logout"] {
    display: none !important;
}

/* Connection state shown in the title slot */
.reconnect-banner {
    gap: var(--space-3) !important;
    padding: 4px 4px 4px 12px;
    border-radius: var(--radius-full);
    background: var(--status-warning-bg);
}

[data-theme="dark"] .reconnect-banner {
    background: color-mix(in srgb, var(--status-warning) 18%, transparent);
}

.reconnect-banner::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--status-warning);
    animation: nv-pulse 1.4s ease-in-out infinite;
}

@keyframes nv-pulse {
    50% { opacity: 0.35; }
}

.reconnect-text {
    color: var(--text-primary) !important;
    font-weight: 500 !important;
}

[data-theme="dark"] .reconnect-text {
    color: #F5D9A8 !important;
}

.reconnect-btn {
    height: 26px !important;
}

/* ===================================================================
   5. Settings panel: plain-language toggles first, the rest "Advanced"
   =================================================================== */

.nv-answer-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#dropdown-content .nv-toggle-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: var(--space-4);
    width: 100%;
    min-width: 0;
    padding: 8px 0;
}

.nv-toggle-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    flex: 1;
    text-align: start;
}

#dropdown-content .nv-toggle-row label {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    letter-spacing: 0 !important;
    white-space: normal;
    line-height: 1.3 !important;
    cursor: pointer;
    /* JS hides these for guests via inline display:none - the whole row
       goes instead, see the .nv-guest rule below. */
    display: block !important;
}

.nv-toggle-hint {
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--text-muted);
}

.nv-advanced {
    margin-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--space-2);
}

.nv-advanced > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.nv-advanced > summary::-webkit-details-marker {
    display: none;
}

.nv-advanced > summary::after {
    content: "\f078"; /* chevron-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
    color: var(--text-muted);
    transition: transform var(--dur-fast) var(--ease-out);
}

.nv-advanced[open] > summary::after {
    transform: rotate(180deg);
}

/* Guests: only "Read answers aloud" applies */
.nv-guest .nv-advanced,
.nv-guest #dropdown-content .remember-context-style,
.nv-guest #dropdown-content .nv-toggle-row:has(#internet-switch),
.nv-guest #dropdown-content .nv-toggle-row:has(#highlight-switch) {
    display: none !important;
}

/* ===================================================================
   6. Composer: text on top; tools, dataset and send on one row below
   =================================================================== */

.chat-inputs-container {
    max-width: 808px !important;
    width: 100% !important;
    box-sizing: border-box;
    padding: 0 var(--space-5) var(--space-3) !important;
}

.question-box-area {
    flex-wrap: wrap !important;
    align-items: center !important;
    row-gap: 2px !important;
    column-gap: var(--space-1) !important;
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3) !important;
    border-radius: 24px !important;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.04) !important;
}

[data-theme="dark"] .question-box-area {
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.3) !important;
}

#question-textarea {
    resize: none !important;
    order: 1 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
}

#question-textarea .nv-textarea-input {
    padding: var(--space-2) var(--space-1) !important;
    min-height: 44px;
}

#multiFileUploader.file-uploader-area,
.file-uploader-area {
    order: 2 !important;
    align-self: center !important;
}

.question-box-area > #question-toolbar {
    order: 3;
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    background: transparent !important;
    border: none !important;
}

.question-box-area > #question-toolbar .question-tool-strip-style {
    padding: 0 !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    min-width: 0;
}

.record-button {
    order: 4 !important;
    align-self: center !important;
}

#button-wrapper {
    order: 5 !important;
    align-self: center !important;
}

/* Visual noise with no everyday use: prev/next message arrows (keyboard
   history still works), the composer tour button (it's in the account
   menu), an empty spacer. */
#prev-chat-message,
#next-chat-message,
#question-tool-strip #detailed-tour,
#question-tool-strip > div[style*="padding"] {
    display: none !important;
}

/* Chips inside the composer: same height, same quiet treatment */
.question-box-area #promptButton {
    height: 32px !important;
    padding: 0 12px 0 10px !important;
    max-width: 180px;
    flex: none;
    border-color: var(--border-subtle) !important;
    font-size: 13px !important;
    font-weight: 500;
    color: var(--text-secondary) !important;
    white-space: nowrap;
}

.question-box-area #promptButton .selected-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.question-box-area .treeview-container {
    min-width: 0;
    flex: 0 1 auto;
    gap: 6px !important;
}

/* Placeholder not built yet (guests have a fixed dataset) */
.question-box-area .collections-view:not(.dx-widget),
.question-box-area .filter-view:not(.dx-widget) {
    display: none !important;
}

/* Dataset + filter pickers (DevExtreme drop-down boxes) drawn as chips.
   They were position:static, so Material's absolutely-positioned underline
   stretched across the whole composer; give them their own box and drop
   the underline. */
.question-box-area .collections-view.dx-widget,
.question-box-area .filter-view.dx-widget {
    position: relative !important;
    left: auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 240px !important;
    flex: 0 1 auto;
    height: 32px !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-full) !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden;
    transition: background-color var(--dur-fast) var(--ease-out);
}

.question-box-area .collections-view .dx-dropdowneditor-input-wrapper,
.question-box-area .filter-view .dx-dropdowneditor-input-wrapper,
.question-box-area .collections-view .dx-texteditor-container,
.question-box-area .filter-view .dx-texteditor-container {
    background: transparent !important;
}

.question-box-area .collections-view.dx-widget:hover,
.question-box-area .filter-view.dx-widget:hover {
    background: var(--surface-inset) !important;
}

.question-box-area .collections-view.dx-widget::before,
.question-box-area .collections-view.dx-widget::after,
.question-box-area .filter-view.dx-widget::before,
.question-box-area .filter-view.dx-widget::after {
    display: none !important;
}

.question-box-area .collections-view .dx-texteditor-input,
.question-box-area .filter-view .dx-texteditor-input,
.question-box-area .collections-view .dx-placeholder,
.question-box-area .filter-view .dx-placeholder {
    height: 30px !important;
    min-height: 0 !important;
    padding: 0 4px 0 12px !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-sans) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 30px !important;
}

.question-box-area .collections-view .dx-placeholder::before,
.question-box-area .filter-view .dx-placeholder::before {
    padding: 0 !important;
    color: var(--text-secondary) !important;
    line-height: 30px !important;
}

.question-box-area .collections-view .dx-texteditor-buttons-container,
.question-box-area .filter-view .dx-texteditor-buttons-container {
    height: 30px;
}

.question-box-area .collections-view .dx-dropdowneditor-button,
.question-box-area .filter-view .dx-dropdowneditor-button {
    width: 26px !important;
    min-width: 26px !important;
    background: transparent !important;
}

/* The prompt-tool popover opens above the whole composer, not inside it */
.question-box-area #icon-menu.grid-menu {
    bottom: calc(100% + 16px) !important;
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
}

/* Disclaimer sits under the composer, not inside it */
.question-box-area > .model-warning {
    position: absolute !important;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11.5px !important;
    line-height: 1.3;
    color: var(--text-muted) !important;
}

.chat-inputs-container {
    padding-bottom: 30px !important;
}

/* ===================================================================
   7. Empty conversation: a greeting and one-click questions
   =================================================================== */

/* Sit the greeting in the space between the top bar and the composer,
   centred, scrolling if a short window can't fit it, instead of an
   absolute 50%/50% point that let cards slide under the composer. The box
   is click-through so it can never block the conversation behind it. */
#suggested-question-container.centered {
    top: 56px !important;
    bottom: 190px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(640px, calc(100% - 32px)) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    pointer-events: none;
}

#suggested-question-container.centered > * {
    pointer-events: auto;
}

#suggested-question-container #suggested-questions {
    width: 100% !important;
    margin: 0 !important;
}

/* While the greeting is up, the list's one "Hello, ask any question on X"
   notice says the same thing twice (and collides with it on short
   windows). It returns as soon as the conversation has a second item. */
#mySidenav:has(#suggested-questions > .question-button) #chatMessageList .dx-list-item:only-child .chat-msg--notice {
    visibility: hidden;
}

#suggested-question-title {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6) !important;
    text-align: center;
    font-size: inherit !important;
    color: var(--text-secondary) !important;
}

#suggested-question-title:empty {
    display: none !important;
}

.nv-hero-title {
    font-family: var(--font-sans);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.nv-hero-sub {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.nv-hero-sub strong {
    font-weight: 600;
    color: var(--text-primary);
}

#suggested-questions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--space-3) !important;
}

#suggested-questions .question-button {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-height: 0 !important;
    height: auto !important;
    padding: 14px 16px !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--surface-card) !important;
    box-shadow: none !important;
    text-align: start;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out) !important;
}

#suggested-questions .question-button:hover {
    background: var(--surface-inset) !important;
    border-color: var(--border-strong) !important;
}

#suggested-questions .question-button:active {
    transform: scale(0.99);
}

#suggested-questions .question-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

#suggested-questions .question-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

#suggested-questions .question-description {
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: var(--text-secondary) !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* The Drive offer is a footnote, not a fifth question card */
#suggested-questions > div:has(> .bottom-connect-drive) {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 0 !important;
}

#suggested-questions .bottom-connect-drive {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    width: auto !important;
    min-height: 0 !important;
    padding: 6px 12px !important;
    border: none !important;
    border-radius: var(--radius-full) !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

#suggested-questions .bottom-connect-drive:hover {
    background: var(--surface-inset) !important;
    color: var(--text-primary) !important;
}

.nv-muted {
    color: var(--text-muted);
    font-weight: 400;
}

/* ===================================================================
   8. Tips dialog (replaces the vertical "Quick Tips" side tab)
   =================================================================== */

.nv-dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: min(80vh, 720px);
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background: var(--surface-raised);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-sans);
    overflow: hidden;
}

.nv-dialog[open] {
    display: flex;
    flex-direction: column;
}

.nv-dialog::backdrop {
    background: rgb(0 0 0 / 0.45);
}

.nv-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-4) var(--space-2) var(--space-6);
}

.nv-dialog-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
    color: var(--text-primary);
}

.nv-dialog-body {
    padding: 0 var(--space-6) var(--space-6);
    overflow-y: auto;
}

/* The moved Quick Tips panel: always shown inside the dialog */
.nv-dialog-body #quickTipsPanel {
    display: block !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    width: auto !important;
    max-height: none !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    font-size: 14px;
    line-height: 1.6;
}

.nv-dialog-body #quickTipsPanel > h3:first-child {
    display: none;
}

.nv-dialog-body #quickTipsPanel p {
    margin: var(--space-4) 0 var(--space-1);
    font-weight: 600;
    color: var(--text-primary);
}

.nv-dialog-body #quickTipsPanel ul {
    margin: 0;
    padding-inline-start: 20px;
}

.nv-dialog-body #quickTipsPanel li {
    margin: 4px 0;
    color: var(--text-secondary);
}

.nv-dialog-body #quickTipsPanel b {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===================================================================
   9. Narrow screens (sidebar is a drawer below 1200px)
   =================================================================== */

@media (max-width: 1199.98px) {
    .nv-sidebar-close {
        display: inline-flex;
    }

    .nv-toolbar-start #breadcrumb-menu {
        display: inline-flex !important;
    }

    .nv-toolbar-start #breadcrumb-menu.dx-button {
        position: static !important;
        width: 34px !important;
        height: 34px !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: var(--radius-md) !important;
        background: transparent !important;
        box-shadow: none !important;
        align-items: center;
        justify-content: center;
    }

    .nv-toolbar-start #breadcrumb-menu .dx-button-content {
        padding: 0 !important;
    }

    .nv-toolbar-start #breadcrumb-menu .dx-icon {
        color: var(--text-secondary) !important;
        font-size: 16px !important;
        margin: 0 !important;
    }

    .nv-toolbar-start #breadcrumb-menu:hover {
        background: var(--surface-inset) !important;
    }
}

@media (max-width: 767.98px) {
    .top-settings-toolbar-style {
        padding: 0 var(--space-2) !important;
    }

    /* Icons only in the top bar on phones */
    .nv-toolbar-btn span,
    .top-settings-toolbar-style #sq-toggle-btn .dx-button-text,
    .top-settings-toolbar-style #settings-dropdown-toggle .dx-button-text {
        display: none !important;
    }

    .nv-toolbar-btn,
    .top-settings-toolbar-style #settings-dropdown-toggle.dx-button {
        padding: 0 10px !important;
    }

    .chat-inputs-container {
        padding: 0 var(--space-2) 28px !important;
    }

    .question-box-area .collections-view.dx-widget,
    .question-box-area .filter-view.dx-widget {
        max-width: 150px !important;
        flex: none;
    }

    .question-box-area #promptButton {
        max-width: 130px;
    }

    #suggested-questions {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: var(--space-2) !important;
    }

    /* Phones: titles only, and at most three, so they fit above the composer */
    #suggested-questions .question-description {
        display: none !important;
    }

    #suggested-questions > .question-button:nth-of-type(n + 4) {
        display: none !important;
    }

    #suggested-questions .question-button {
        padding: 12px 14px !important;
    }

    #suggested-question-container.centered {
        bottom: 160px !important;
    }

    #suggested-question-title {
        margin-bottom: var(--space-4) !important;
    }

    /* Composer chips scroll sideways rather than stacking */
    .question-box-area > #question-toolbar .question-tool-strip-style,
    .question-box-area .treeview-container {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .question-box-area > #question-toolbar .question-tool-strip-style::-webkit-scrollbar {
        display: none;
    }

    .nv-hero-title {
        font-size: 22px;
    }

    .nv-hero-sub {
        font-size: 14px;
    }
}

/*!**********************************************************************************************************************************!*\
  !*** css ../../../../../../../../../../Projects/novaluna-pilot/novaluna/node_modules/css-loader/dist/cjs.js!./css/editorial.css ***!
  \**********************************************************************************************************************************/
/* =========================================================================
 * NovaLuna editorial layer (2026-11)
 *
 * Brings the chat app into the same visual language as novaluna.ai and the
 * Workbench: ink on warm paper, IBM Plex for reading, Newsreader for
 * display, Plex Mono for labels and figures, and the logo's amber used
 * ONLY as a highlighter - to mark where an answer came from (citation
 * chips, the open source, the quoted passage). Primary actions are ink.
 *
 * Loaded last (js/index.js) so it can restyle without touching the 17k-line
 * controller: every element ID and class the JS queries is unchanged. The
 * palette itself lives in tokens.css; this file is shape, type and detail.
 * ========================================================================= */

/* ---------- 0. Type ---------------------------------------------------- */
body,
.dx-widget,
.dx-widget input,
.dx-widget textarea,
.dx-button-text,
.dx-texteditor-input,
.dx-treeview-item,
.dx-list-item-content {
    font-family: var(--font-sans) !important;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1;
}

/* Plex ships 400/500/600 for Latin; 600 reads as bold and stays crisp. */
.message-text b,
.message-text strong,
#chatMessageList b,
#chatMessageList strong {
    font-weight: 600;
}

::selection {
    background: var(--mark);
    color: var(--mark-ink);
}

/* ---------- 1. Canvas ---------------------------------------------------- */
#resizable2,
#resizable2.resizable2 {
    background: var(--surface-app) !important;
}

/* ---------- 2. Sidebar ------------------------------------------------------ */
#resizable1,
.resizable1 {
    border-inline-end: 1px solid var(--border-subtle) !important;
}

/* Wordmark as on novaluna.ai: the four-crescent mark beside NOVALUNA set in
   caps with a little air, not a mixed-case product name. */
.nv-brand-name,
#brand-name-span {
    font-family: var(--font-sans) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
    color: var(--text-primary) !important;
}

.nv-brand-link img,
#brand-name-logo-img {
    width: 26px !important;
    height: 26px !important;
}

/* New chat: a quiet outlined row, ink on paper. */
#button-newtopic.dx-button {
    border: 1px solid var(--border-strong) !important;
    background: var(--surface-card) !important;
    box-shadow: var(--shadow-sm) !important;
    border-radius: var(--radius-md) !important;
}

#button-newtopic.dx-button:hover {
    border-color: var(--text-secondary) !important;
}

#button-newtopic .dx-button-text,
#button-newproject .dx-button-text {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    text-transform: none !important;
}

#button-newtopic i,
#button-newproject i {
    color: var(--text-secondary) !important;
}

/* Section labels (Today / Previous 7 days / Older): the website's mono caps. */
#treeview .topic-tree-group-header-label,
#treeview .topic-tree-group-header,
.nv-sidebar-section-label {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: var(--tracking-caps) !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
}

#treeview .topic-tree-label {
    font-size: 14px;
    color: var(--text-primary);
}

#treeview .topic-tree-topic-node > .dx-treeview-item {
    border-radius: var(--radius-sm) !important;
}

#treeview .topic-tree-topic-node > .dx-treeview-item:hover {
    background: color-mix(in srgb, var(--text-primary) 5%, transparent) !important;
}

/* The open conversation carries the highlighter: a 2px amber rule, the same
   mark the website uses for "this is where it came from". */
#treeview .topic-tree-selected > .dx-treeview-item,
#treeview .dx-treeview-node.topic-tree-selected > .dx-treeview-item {
    background: var(--surface-card) !important;
    box-shadow: inset 2px 0 0 var(--brand-amber), var(--shadow-sm) !important;
}

[dir="rtl"] #treeview .topic-tree-selected > .dx-treeview-item {
    box-shadow: inset -2px 0 0 var(--brand-amber), var(--shadow-sm) !important;
}

#treeview .topic-tree-icon-project {
    color: var(--text-muted) !important;
}

#treeview .topic-tree-project-node .topic-tree-label {
    font-weight: 500;
}

/* Account footer */
.nv-account-button {
    border-radius: var(--radius-md) !important;
}

.nv-avatar {
    background: var(--ink) !important;
    color: var(--paper) !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
}

/* Guest sidebar (prospects on a shared link): the collection's welcome copy,
   set like an editorial sidebar note rather than a wall of text. */
#welcome_message {
    font-size: 14px !important;
    line-height: 1.55 !important;
    color: var(--text-secondary) !important;
}

#welcome_message .welcome_title {
    font-family: var(--font-display) !important;
    font-size: 24px !important;
    line-height: 1.15 !important;
    font-weight: 500 !important;
    letter-spacing: var(--tracking-display);
    color: var(--text-primary) !important;
}

#welcome_message ul {
    padding-inline-start: 0 !important;
    list-style: none !important;
}

#welcome_message li {
    position: relative;
    padding-inline-start: 16px;
    margin-block: 6px;
}

#welcome_message li::before {
    content: "→";
    position: absolute;
    inset-inline-start: 0;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
}

#welcome_message a:not(.signup-cta) {
    color: var(--text-primary) !important;
    text-decoration-color: var(--brand-amber) !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
}

#welcome_message .signup-cta,
#welcome_message button,
#welcome_message .dx-button {
    background: var(--accent-solid) !important;
    color: var(--on-accent-solid) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-weight: 500 !important;
    box-shadow: var(--shadow-sm) !important;
}

/* ---------- 3. Top bar ------------------------------------------------------ */
.top-settings-toolbar-style {
    background: color-mix(in srgb, var(--surface-app) 88%, transparent) !important;
    backdrop-filter: saturate(1.2) blur(8px);
    -webkit-backdrop-filter: saturate(1.2) blur(8px);
    border-bottom: 1px solid var(--border-subtle) !important;
}

#chatTitle {
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    color: var(--text-primary) !important;
}

.top-settings-toolbar-style #sq-toggle-btn.dx-button,
.top-settings-toolbar-style #settings-dropdown-toggle.dx-button,
.top-settings-toolbar-style .nv-toolbar-btn {
    border: 1px solid transparent !important;
    border-radius: var(--radius-md) !important;
}

.top-settings-toolbar-style #sq-toggle-btn.dx-button:hover,
.top-settings-toolbar-style #settings-dropdown-toggle.dx-button:hover,
.top-settings-toolbar-style .nv-toolbar-btn:hover {
    border-color: var(--border-subtle) !important;
    background: var(--surface-card) !important;
}

.top-settings-toolbar-style .dx-button-text {
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* ---------- 4. Empty conversation: the editorial hero ---------------------- */
#suggested-question-container.centered {
    width: min(720px, calc(100% - 32px)) !important;
}

#suggested-question-title {
    gap: 10px !important;
    margin-bottom: var(--space-6) !important;
}

.nv-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--text-muted);
}

/* The website's eyebrow rule: a short line before the label. */
.nv-hero-eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
}

.nv-hero-title {
    font-family: var(--font-display) !important;
    font-size: clamp(34px, 2.2vw + 18px, 48px) !important;
    line-height: 1.06 !important;
    font-weight: 450 !important;
    letter-spacing: var(--tracking-display) !important;
    color: var(--text-primary) !important;
    text-wrap: balance;
}

/* One word gets the highlighter, as "trace to the source" does on the site. */
.nv-hero-title em {
    font-style: italic;
    color: var(--text-primary);
    background-image: linear-gradient(transparent 62%, var(--mark-strong) 62%, var(--mark-strong) 92%, transparent 92%);
    background-repeat: no-repeat;
    padding-inline: 0.06em;
}

[data-theme="dark"] .nv-hero-title em {
    background: none;
    color: var(--brand-amber);
}

.nv-hero-sub {
    max-width: 34rem;
    font-size: 15.5px !important;
    line-height: 1.55 !important;
    color: var(--text-secondary) !important;
    text-wrap: pretty;
}

/* Suggestion cards: index cards, numbered in mono like the website's
   figures, with an arrow that leans in on hover. The collection's own emoji
   icons are hidden - four unrelated pictograms read as clip-art. */
#suggested-questions {
    counter-reset: nv-card;
    gap: 10px !important;
}

#suggested-questions .question-button:not(.bottom-connect-drive) {
    position: relative;
    counter-increment: nv-card;
    gap: 3px !important;
    padding: 13px 42px 14px 16px !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface-card) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out) !important;
}

/* 01 / 02 / 03 / 04 - inline before the title, in mono. */
#suggested-questions .question-button:not(.bottom-connect-drive) .question-title::before {
    content: counter(nv-card, decimal-leading-zero);
    margin-inline-end: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    vertical-align: 0.08em;
}

#suggested-questions .question-button:not(.bottom-connect-drive)::after {
    content: "→";
    position: absolute;
    inset-inline-end: 16px;
    top: 50%;
    translate: 0 -50%;
    font-size: 15px;
    color: var(--text-muted);
    transition: translate var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

[dir="rtl"] #suggested-questions .question-button:not(.bottom-connect-drive)::after {
    content: "←";
}

#suggested-questions .question-button:not(.bottom-connect-drive):hover {
    border-color: var(--border-strong) !important;
    background: var(--surface-card) !important;
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-1px);
}

#suggested-questions .question-button:not(.bottom-connect-drive):hover::after {
    translate: 4px -50%;
    color: var(--text-primary);
}

#suggested-questions .question-icon {
    display: none !important;
}

#suggested-questions .question-content {
    gap: 0 !important;
}

#suggested-questions .question-title {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

#suggested-questions .question-description {
    font-size: 13.5px !important;
    line-height: 1.45 !important;
}

/* Drive offer: a footnote link, not a fifth card. */
#suggested-questions .bottom-connect-drive {
    font-size: 12.5px !important;
    padding: 4px 10px !important;
    color: var(--text-muted) !important;
}

#suggested-questions .bottom-connect-drive:hover {
    color: var(--text-primary) !important;
}

/* ---------- 5. "How NovaLuna answers" (guests) ----------------------------- */
.nv-trace {
    display: none;
    flex: 0 0 auto;
    margin: var(--space-4) 0 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Room for the frame's shadow inside the scrolling greeting box. */
body.nv-guest #suggested-question-container.centered {
    padding-bottom: 12px;
}

/* Prospects only, and only while the greeting is up. */
body.nv-guest #suggested-question-container:has(#suggested-questions > .question-button) .nv-trace {
    display: block;
}

.nv-trace__label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--paper-2);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--text-muted);
}

.nv-trace__dots {
    display: inline-flex;
    gap: 5px;
}

.nv-trace__dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
}

.nv-trace__steps {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
}

.nv-trace__step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 12px 16px 14px;
    text-align: start;
}

.nv-trace__step + .nv-trace__step {
    border-inline-start: 1px solid var(--border-subtle);
}

.nv-trace__n {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--text-muted);
}

.nv-trace__bubble {
    align-self: flex-start;
    padding: 8px 11px;
    border-radius: 12px 12px 4px 12px;
    background: var(--surface-user-bubble);
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-primary);
}

.nv-trace__caret {
    display: inline-block;
    width: 1.5px;
    height: 1em;
    margin-inline-start: 2px;
    vertical-align: -0.15em;
    background: var(--text-primary);
    animation: nv-blink 1s steps(1) infinite;
}

.nv-trace__answer {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.nv-trace__answer b {
    color: var(--text-primary);
    font-weight: 600;
}

.nv-trace__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35em;
    height: 1.25em;
    padding-inline: 0.25em;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xs);
    background: var(--surface-card);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    vertical-align: 0.1em;
    color: var(--text-primary);
    animation: nv-chip 6s var(--ease-in-out) infinite;
}

.nv-trace__page {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 11px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--paper);
    box-shadow: 0 1px 0 var(--border-subtle);
}

.nv-trace__doc {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}

.nv-trace__line {
    display: block;
    height: 4px;
    border-radius: 2px;
    background: var(--border-subtle);
}

.nv-trace__line--short { width: 62%; }
.nv-trace__line--mid { width: 80%; }

/* The highlighter sweep: the passage the chip points at gets marked. */
.nv-trace__hl {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 12.5px;
    line-height: 1.3;
    color: var(--text-primary);
    background-image: linear-gradient(var(--mark-strong), var(--mark-strong));
    background-repeat: no-repeat;
    background-size: 0% 100%;
    padding: 1px 2px;
    animation: nv-mark 6s var(--ease-in-out) infinite;
}

[data-theme="dark"] .nv-trace__hl {
    color: var(--mark-ink);
}

@keyframes nv-blink { 50% { opacity: 0; } }

@keyframes nv-chip {
    0%, 30%  { background: var(--surface-card); border-color: var(--border-strong); box-shadow: none; color: var(--text-primary); }
    40%, 85% { background: var(--brand-amber); border-color: color-mix(in srgb, var(--brand-amber) 65%, #000); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-amber) 28%, transparent); color: #1A1405; }
    100%     { background: var(--surface-card); border-color: var(--border-strong); box-shadow: none; color: var(--text-primary); }
}

@keyframes nv-mark {
    0%, 42%  { background-size: 0% 100%; }
    58%, 88% { background-size: 100% 100%; }
    100%     { background-size: 0% 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .nv-trace__caret { animation: none; }
    .nv-trace__chip {
        animation: none;
        background: var(--brand-amber);
        color: #1A1405;
    }
    .nv-trace__hl { animation: none; background-size: 100% 100%; }
}

/* Short windows: the cards matter more than the illustration. */
@media (max-height: 820px), (max-width: 900px) {
    body.nv-guest #suggested-question-container:has(#suggested-questions > .question-button) .nv-trace {
        display: none;
    }
}

/* ---------- 6. Composer ------------------------------------------------------ */
.question-box-area {
    background: var(--surface-card) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.question-box-area:focus-within {
    border-color: var(--text-secondary) !important;
    box-shadow: var(--shadow-md), 0 0 0 3px color-mix(in srgb, var(--text-primary) 8%, transparent) !important;
}

#question-textarea .nv-textarea-input,
#question-textarea textarea {
    font-size: 15.5px !important;
    line-height: 1.5 !important;
    color: var(--text-primary) !important;
}

#question-textarea textarea::placeholder,
#question-textarea .dx-placeholder::before {
    color: var(--text-muted) !important;
}

/* Dataset + filter chips: small, square-ish, hairline - tools, not toys. */
.question-box-area #promptButton,
.question-box-area .filter-view.dx-widget {
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border-subtle) !important;
    background: var(--surface-app) !important;
}

.question-box-area #promptButton:hover,
.question-box-area .filter-view.dx-widget:hover {
    border-color: var(--border-strong) !important;
}

.question-box-area #promptButton .selected-text,
.question-box-area .filter-view .dx-texteditor-input,
.question-box-area .filter-view .dx-placeholder::before {
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* Send: an ink square-circle, like the website's primary button. */
#icon-send.dx-button {
    background: var(--accent-solid) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm) !important;
}

#icon-send.dx-button .dx-icon,
#icon-send.dx-button i {
    color: var(--on-accent-solid) !important;
}

#icon-send.dx-button.dx-state-disabled {
    opacity: 0.35 !important;
}

/* Disclaimer under the composer */
.chat-inputs-container .llm-can-make-mistake,
#llm_can_make_mistake,
.nv-disclaimer {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
}

/* ---------- 7. Conversation ---------------------------------------------- */
/* The question: a quiet paper card, right-aligned, square tail corner. */
#chatMessageList .message-user:not(.message-notice) {
    background: var(--surface-user-bubble) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-xl) var(--radius-xl) 4px var(--radius-xl) !important;
    box-shadow: none !important;
    font-size: 15.5px !important;
    line-height: 1.5 !important;
    color: var(--text-primary) !important;
}

/* The answer: reading text on the page, no card. Tight rhythm - the old
   template stacked margins and left whole blank lines between paragraphs. */
.message-novaluna-bot .message-text {
    font-size: 16px !important;
    line-height: 1.68 !important;
    color: var(--text-primary) !important;
}

/* .message-text is white-space: pre-wrap (chat.css) so plain-text messages
   keep their line breaks. But marked() emits a newline between every block,
   so on a rendered answer each of those became a visible blank line - the
   big gaps between paragraphs, list items and tables. Once the text holds
   real block markup, collapse whitespace and let margins set the rhythm.
   (<pre> keeps its own white-space, so code is unaffected.) */
.message-text:has(> p, > ul, > ol, > table, > div, > h1, > h2, > h3, > h4, > blockquote, > pre) {
    white-space: normal !important;
}

.message-novaluna-bot .message-text > :is(p, ul, ol, div, table, h1, h2, h3, h4, blockquote, pre) {
    margin-block: 0 !important;
}

.message-novaluna-bot .message-text > * + :is(p, ul, ol, div, table, blockquote, pre) {
    margin-block-start: 0.9em !important;
}

.message-novaluna-bot .message-text ul,
.message-novaluna-bot .message-text ol {
    padding-inline-start: 1.25em !important;
}

.message-novaluna-bot .message-text li + li {
    margin-block-start: 0.35em;
}

.message-novaluna-bot .message-text ul > li::marker {
    color: var(--text-muted);
}

.message-novaluna-bot .message-text h1,
.message-novaluna-bot .message-text h2,
.message-novaluna-bot .message-text h3 {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    letter-spacing: var(--tracking-display);
    line-height: 1.2 !important;
    color: var(--text-primary) !important;
}

.message-novaluna-bot .message-text > * + :is(h1, h2, h3, h4) {
    margin-block-start: 1.3em !important;
}

.message-novaluna-bot .message-text > :is(h1, h2, h3, h4) + * {
    margin-block-start: 0.35em !important;
}

.message-novaluna-bot .message-text h1 { font-size: 26px !important; }
.message-novaluna-bot .message-text h2 { font-size: 22px !important; }
.message-novaluna-bot .message-text h3 { font-size: 18.5px !important; }

.message-novaluna-bot .message-text a {
    color: var(--text-primary) !important;
    text-decoration-color: var(--brand-amber) !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
}

/* Tables: the website's ledger - hairline rules, mono caps header, tabular
   figures so columns of numbers line up. */
.message-novaluna-bot .nv-table-scroll {
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface-card) !important;
    box-shadow: none !important;
}

.message-novaluna-bot .message-text table {
    font-size: 14px !important;
    border-collapse: collapse !important;
    font-variant-numeric: tabular-nums;
}

.message-novaluna-bot .message-text th {
    background: transparent !important;
    font-family: var(--font-mono) !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    letter-spacing: var(--tracking-caps) !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
    border-bottom: 1px solid var(--border-strong) !important;
    padding: 10px 14px !important;
}

.message-novaluna-bot .message-text td {
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 10px 14px !important;
    color: var(--text-primary) !important;
}

.message-novaluna-bot .message-text tr:last-child td {
    border-bottom: none !important;
}

/* Citation chips: the website's .cite - a small mono box that turns amber
   when it is the one being looked at. */
.nv-citation {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    min-width: 1.5rem;
    height: 1.3rem;
    padding: 0 0.32rem !important;
    margin-inline: 0.12rem !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius-xs) !important;
    background: var(--surface-card) !important;
    font-family: var(--font-mono) !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    vertical-align: 0.12em;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    font-variant-numeric: tabular-nums;
    transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.nv-citation--linked {
    cursor: pointer;
}

.nv-citation--linked:hover,
.nv-citation--linked:focus-visible,
.nv-citation--linked.is-active {
    background: var(--brand-amber) !important;
    border-color: color-mix(in srgb, var(--brand-amber) 65%, #000) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-amber) 28%, transparent) !important;
    color: #1A1405 !important;
}

.nv-citation-tick {
    margin-inline-start: 1px !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    color: var(--status-success) !important;
}

.nv-citation--linked:hover .nv-citation-tick { color: #1A1405 !important; }

.nv-citation-mark {
    color: var(--text-muted);
}

/* Sources: the evidence block, as on the website's trace demo. */
.message-sources {
    margin-top: var(--space-4) !important;
}

.nv-sources-heading {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--text-muted) !important;
}

.nv-sources-heading:hover { color: var(--text-primary) !important; }

.nv-source {
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface-card) !important;
    box-shadow: none !important;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.nv-source:hover {
    border-color: var(--border-strong) !important;
}

.nv-source.is-open,
.nv-source.is-cited-hover {
    border-color: var(--border-strong) !important;
    box-shadow: var(--shadow-sm) !important;
}

.nv-source-head {
    gap: 10px !important;
}

/* Same chip as the inline [n], so the eye matches them instantly. */
.nv-source-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem !important;
    height: 1.3rem !important;
    padding: 0 0.32rem !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius-xs) !important;
    background: var(--surface-card) !important;
    font-family: var(--font-mono) !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
}

.nv-source.is-open .nv-source-badge,
.nv-source.is-cited-hover .nv-source-badge {
    background: var(--brand-amber) !important;
    border-color: color-mix(in srgb, var(--brand-amber) 65%, #000) !important;
    color: #1A1405 !important;
}

.nv-source-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
}

.nv-source-meta {
    font-family: var(--font-mono) !important;
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
}

/* The passage: the quoted text in the display serif with the highlighter
   down its edge - this is the moment the product exists for. */
.nv-source-body {
    border-top: 1px solid var(--border-subtle) !important;
    background: var(--paper-2) !important;
}

.nv-passage-page {
    font-family: var(--font-mono) !important;
    font-size: 10.5px !important;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--text-muted) !important;
}

.nv-passage-text {
    font-family: var(--font-display) !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    color: var(--text-primary) !important;
    border-inline-start: 3px solid var(--brand-amber) !important;
    padding-inline-start: 12px !important;
}

.nv-sources-more-toggle {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    letter-spacing: 0.02em;
}

/* ---------- 8. Popovers, menus, dialogs --------------------------------- */
.nv-menu,
#dropdown-content,
.dx-popup-wrapper > .dx-overlay-content,
.dx-dropdowneditor-overlay > .dx-overlay-content {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-lg) !important;
}

.nv-menu-item {
    border-radius: var(--radius-sm) !important;
    font-size: 14px !important;
}

#dropdown-content .nv-answer-options h3,
#dropdown-content .settings-section-title,
.nv-settings-label {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: var(--tracking-caps) !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
}

/* ---------- 9. Focus ------------------------------------------------------- */
:focus-visible {
    box-shadow: var(--focus-ring);
}

/* Copy keeps "[1]"; the eye sees a clean numbered chip. */
.nv-cite-br {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------- 10. Conversation rhythm & live progress ---------------------- */
/* Question -> answer reads as one exchange: no stacked top margins, and the
   empty progress/reasoning slots take no space until they have content. */
.chat-msg--bot .message-novaluna-bot {
    margin-top: 0 !important;
    padding-top: 2px !important;
}

.chat-msg--bot .nova-log-status-container:has(> #message-nova-log:empty),
.chat-msg--bot .message-reasoning-text:empty,
.chat-msg--bot .message-name:empty {
    display: none !important;
}

/* "Reading 12 passages..." while an answer is being prepared: mono, quiet,
   with a breathing amber dot - the one place amber means "working". */
.message-nova-log-style,
#message-nova-log {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono) !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
}

#message-nova-log:not(:empty)::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-amber);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-amber) 50%, transparent);
    animation: nv-breathe 1.6s var(--ease-in-out) infinite;
}

@keyframes nv-breathe {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-amber) 55%, transparent); }
    70%  { box-shadow: 0 0 0 7px color-mix(in srgb, var(--brand-amber) 0%, transparent); }
    100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-amber) 0%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
    #message-nova-log:not(:empty)::before { animation: none; }
}

/* Text scrolling up under the composer fades out instead of being cut.
   Hung off the composer card (position: relative) rather than its static
   container, so nothing else re-anchors. */
.question-box-area::before {
    content: "";
    position: absolute;
    inset-inline: -24px;
    bottom: calc(100% + 1px);
    height: 32px;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--surface-app) 0%, transparent), var(--surface-app));
    pointer-events: none;
}

/* ---------- 11. "Ask your data" panel -------------------------------------
 * custom.css styled this panel with a hard-coded Material-blue light palette
 * and no dark variant, so in dark mode it was a bright white/blue island.
 * Everything here is tokens, so it follows the theme and matches the chat:
 * ledger tables, mono tags, ink primary actions. Loaded after custom.css, so
 * equal-specificity rules win without !important. */
.sq-panel { background: var(--surface-app); color: var(--text-primary); }

.sq-header {
    background: color-mix(in srgb, var(--surface-app) 88%, transparent);
    border-bottom: 1px solid var(--border-subtle);
    min-height: 56px;
}
.sq-header-left i { color: var(--text-secondary); }
.sq-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }

.sq-connection-select,
.sq-explorer-search {
    background: var(--surface-card);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
}
.sq-connection-select:focus,
.sq-explorer-search:focus { border-color: var(--text-secondary); box-shadow: var(--focus-ring); outline: none; }

.sq-btn { border-radius: var(--radius-sm); font-family: var(--font-sans); font-weight: 500; }
.sq-btn-primary { background: var(--accent-solid); color: var(--on-accent-solid); }
.sq-btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-solid) 86%, var(--surface-app)); }
.sq-btn-secondary { background: var(--surface-card); color: var(--text-primary); border: 1px solid var(--border-subtle); }
.sq-btn-secondary:hover:not(:disabled) { border-color: var(--border-strong); }
.sq-btn-close, .sq-btn-icon { color: var(--text-muted); background: transparent; }
.sq-btn-close:hover, .sq-btn-icon:hover { color: var(--text-primary); background: var(--surface-inset); }

.sq-status-badge {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--radius-xs);
    background: var(--surface-inset);
    color: var(--text-secondary);
}
.sq-status-badge.ready { background: var(--status-success-bg); color: var(--status-success); }
.sq-status-badge.stale,
.sq-status-badge.analyzing { background: var(--status-warning-bg); color: var(--status-warning); }
.sq-status-badge.error { background: var(--status-danger-bg); color: var(--status-danger); }

.sq-status-content p, .sq-error-area p { color: var(--text-secondary); }
.sq-error-area > i { color: var(--status-danger); }
.sq-spinner { border-color: var(--border-subtle); border-top-color: var(--text-primary); }

/* Empty state: same voice as the chat hero. */
.sq-empty-icon {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
}
.sq-empty-icon i { color: var(--text-primary); }
.sq-empty-state h3 {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 450;
    letter-spacing: var(--tracking-display);
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.sq-empty-state > p { font-size: 14.5px; color: var(--text-secondary); }

.sq-suggestion-chip,
.sq-clarification-chip,
.sq-dim-chip {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    box-shadow: var(--shadow-sm);
}
.sq-suggestion-chip:hover,
.sq-clarification-chip:hover { border-color: var(--border-strong); background: var(--surface-card); color: var(--text-primary); }

.sq-user-msg {
    background: var(--surface-user-bubble);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 4px var(--radius-xl);
}

.sq-result-card,
.sq-clarification-card,
.sq-warning-card,
.sq-no-results-card,
.sq-loading-card,
.sq-metric-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: none;
    color: var(--text-primary);
}
.sq-result-header { background: transparent; border-bottom: 1px solid var(--border-subtle); }
.sq-result-header-left i { color: var(--text-muted); }
.sq-result-title { font-weight: 600; color: var(--text-primary); }

/* Results: the same ledger as answer tables. */
.sq-data-table { font-variant-numeric: tabular-nums; color: var(--text-primary); }
.sq-data-table thead { background: transparent; }
.sq-data-table th {
    background: transparent;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-strong);
}
.sq-data-table th:hover { color: var(--text-primary); }
.sq-data-table td { border-bottom: 1px solid var(--border-subtle); color: var(--text-primary); }
.sq-data-table td.numeric { font-family: var(--font-tabular); font-size: 13px; }
.sq-data-table tbody tr:nth-child(even) { background: transparent; }
.sq-data-table tbody tr:hover { background: color-mix(in srgb, var(--text-primary) 4%, transparent); }

.sq-transparency-bar { background: var(--paper-2); border-top: 1px solid var(--border-subtle); color: var(--text-muted); }
.sq-transparency-bar .sq-tag { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-xs); }
.sq-transparency-bar .sq-tag-label { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.sq-transparency-bar .sq-tag-value { color: var(--text-primary); }
.sq-row-info { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }

.sq-sql-drawer { background: var(--paper-2); border-top: 1px solid var(--border-subtle); }
.sq-sql-drawer-header span { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--text-muted); }
.sq-sql-code { background: var(--surface-card); border: 1px solid var(--border-subtle); color: var(--text-primary); font-family: var(--font-mono); border-radius: var(--radius-sm); }
.sq-sql-params, .sq-sql-params strong { color: var(--text-secondary); }

.sq-clarification-header i, .sq-clarification-header span { color: var(--text-primary); }
.sq-clarification-text, .sq-warning-card .sq-warning-text, .sq-no-results-card p { color: var(--text-secondary); }
.sq-warning-card { border-inline-start: 3px solid var(--status-warning); }
.sq-warning-card .sq-warning-header i, .sq-warning-card .sq-warning-header span { color: var(--status-warning); }
.sq-no-results-card i { color: var(--text-muted); }
.sq-loading-card .sq-loading-text { color: var(--text-secondary); font-family: var(--font-mono); font-size: 12px; }
.sq-loading-card .sq-loading-slow { color: var(--text-muted); }

/* The panel's own composer matches the chat composer. */
.sq-input-area { background: transparent; border-top: none; }
.sq-input-container {
    background: var(--surface-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.sq-input-container:focus-within { border-color: var(--text-secondary); box-shadow: var(--shadow-md), 0 0 0 3px color-mix(in srgb, var(--text-primary) 8%, transparent); }
.sq-question-input { background: transparent; color: var(--text-primary); font-family: var(--font-sans); font-size: 15px; }
.sq-question-input::placeholder { color: var(--text-muted); }
.sq-ask-btn { background: var(--accent-solid); color: var(--on-accent-solid); border-radius: var(--radius-md); }
.sq-ask-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-solid) 86%, var(--surface-app)); }
.sq-ask-btn i { color: var(--on-accent-solid); }
.sq-mic-btn { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.sq-mic-btn:hover:not(:disabled) { color: var(--text-primary); border-color: var(--border-strong); background: transparent; }
.sq-voice-status { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }

.sq-stale-banner { background: var(--status-warning-bg); color: var(--status-warning); border-bottom: 1px solid var(--border-subtle); }
.sq-stale-banner i { color: var(--status-warning); }

.sq-metric-explorer { background: var(--surface-raised); border-inline-start: 1px solid var(--border-subtle); box-shadow: var(--shadow-lg); }
.sq-explorer-header { border-bottom: 1px solid var(--border-subtle); }
.sq-explorer-header h3 { font-family: var(--font-display); font-weight: 500; color: var(--text-primary); }
.sq-explorer-section h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted); }
.sq-metric-card:hover { border-color: var(--border-strong); }
.sq-metric-card-name { color: var(--text-primary); font-weight: 600; }
.sq-metric-card-desc, .sq-metric-card-dims, .sq-metric-card-dims span { color: var(--text-secondary); }

/* ---------- 11b. Ask your data: answer-first conversation ------------------
 * One reading column, like the chat. While the assistant works it shows a
 * plain-language checklist (amber dot = working, per the system's one use of
 * amber besides citations); the answer leads with a sentence, then the data
 * shaped to fit (big figures / label-value list / ledger table), then the
 * collapsed "How I worked this out" trail and one-click follow-ups. */
.sq-results-area { padding: var(--space-6) var(--space-5) var(--space-4); }
.sq-conversation,
.sq-empty-state,
.sq-input-area > * { max-width: 760px; margin-inline: auto; }
.sq-conversation { gap: var(--space-6); }

/* Header: database picker reads as a labelled control, not a bare select. */
.sq-db-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 2px 4px 2px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
}
.sq-db-picker:focus-within { border-color: var(--text-secondary); box-shadow: var(--focus-ring); }
.sq-db-picker-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--text-muted);
}
.sq-db-picker .sq-connection-select {
    border: none;
    background-color: transparent;
    box-shadow: none;
    font-weight: 500;
    max-width: 240px;
}
.sq-db-picker .sq-connection-select:focus { box-shadow: none; }
#sq-metric-explorer-toggle span { font-size: 12.5px; margin-inline-start: 4px; }

/* Empty state */
.sq-empty-state { padding: 9vh var(--space-2) var(--space-4); }
.sq-empty-state h3 { font-size: 34px; margin-bottom: 12px; }
.sq-empty-state > p { max-width: 520px; margin: 0 auto 28px; line-height: 1.55; font-size: 15px; }
.sq-suggested-questions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    max-width: 640px;
}
.sq-starter {
    display: grid;
    grid-template-columns: 22px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    align-items: start;
    text-align: start;
    padding: 14px 16px;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.sq-starter:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.sq-starter:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sq-starter i { grid-row: 1 / span 2; color: var(--text-muted); font-size: 14px; padding-top: 3px; }
.sq-starter-q { font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.sq-starter-hint { font-size: 12.5px; color: var(--text-muted); }

/* The user's question */
.sq-user-msg { font-size: 15px; padding: 10px 16px; max-width: 80%; }

/* Live run */
.sq-run {
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface-card);
}
.sq-run-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sq-run-title { font-weight: 500; font-size: 14px; color: var(--text-primary); }
.sq-run-time { margin-inline-start: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.sq-working-dot,
.sq-step-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand-amber);   /* the system's "working" amber, both themes */
    flex: none;
    animation: sq-pulse 1.4s var(--ease-in-out) infinite;
}
@keyframes sq-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .sq-working-dot, .sq-step-dot { animation: none; } }

.sq-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sq-step { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; font-size: 13.5px; }
.sq-step-icon { display: flex; justify-content: center; padding-top: 4px; color: var(--text-muted); font-size: 11px; }
.sq-step.is-done .sq-step-icon { color: var(--status-success); }
.sq-step.is-retry .sq-step-icon { color: var(--status-warning); }
.sq-step-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; line-height: 1.45; }
.sq-step-label { color: var(--text-secondary); }
.sq-step.is-active .sq-step-label { color: var(--text-primary); }
.sq-step-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.sq-step-sql-toggle {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    padding: 1px 6px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}
.sq-step-sql-toggle:hover, .sq-step-sql-toggle[aria-expanded="true"] { color: var(--text-primary); border-color: var(--border-strong); }
.sq-step-sql {
    margin: 6px 0 2px;
    padding: 10px 12px;
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--paper-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

/* Answer */
.sq-answer { display: flex; flex-direction: column; gap: var(--space-4); }
.sq-answer-text { font-size: 16px; line-height: 1.65; color: var(--text-primary); }
.sq-answer-text p { margin: 0 0 .6em; }
.sq-answer-text p:last-child { margin-bottom: 0; }
.sq-answer-text ul { margin: .2em 0 .6em; padding-inline-start: 1.2em; }
.sq-answer-text strong { font-weight: 600; }
.sq-answer-title { font-family: var(--font-display); font-weight: 450; font-size: 22px; margin: 0; color: var(--text-primary); }

.sq-stats { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.sq-stat {
    flex: 1 1 160px;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface-card);
}
.sq-stat-value { font-family: var(--font-display); font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.sq-stat-label { margin-top: 4px; font-size: 13px; color: var(--text-secondary); }

.sq-kv {
    margin: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    overflow: hidden;
}
.sq-kv-row { display: grid; grid-template-columns: minmax(140px, 40%) 1fr; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--border-subtle); }
.sq-kv-row:last-child { border-bottom: none; }
.sq-kv dt { color: var(--text-secondary); font-size: 13.5px; }
.sq-kv dd { margin: 0; color: var(--text-primary); font-variant-numeric: tabular-nums; font-size: 14px; word-break: break-word; }

.sq-answer .sq-table-wrapper {
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface-card);
}
.sq-answer .sq-data-table th { position: sticky; top: 0; background: var(--surface-card); text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.sq-answer .sq-sort-icon { opacity: 0; font-size: 8px; transition: opacity var(--dur-fast) var(--ease-out); }
.sq-answer .sq-data-table th:hover .sq-sort-icon,
.sq-answer .sq-data-table th.sorted .sq-sort-icon { opacity: .7; }
.sq-rowcount { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.sq-null { color: var(--text-muted); }
.sq-nodata { margin: 0; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); color: var(--text-secondary); font-size: 14px; }

.sq-answer-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.sq-answer-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.sq-answer-actions { display: inline-flex; gap: 6px; }
.sq-action {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 12.5px;
    cursor: pointer;
}
.sq-action:hover { color: var(--text-primary); border-color: var(--border-strong); }
.sq-action:focus-visible, .sq-followup:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sq-action-primary { background: var(--accent-solid); color: var(--on-accent-solid); border-color: transparent; }
.sq-action-primary:hover { color: var(--on-accent-solid); background: color-mix(in srgb, var(--accent-solid) 86%, var(--surface-app)); }

.sq-how { border-top: 1px solid var(--border-subtle); padding-top: 10px; }
.sq-how summary { cursor: pointer; font-size: 13px; color: var(--text-secondary); list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.sq-how summary::-webkit-details-marker { display: none; }
.sq-how summary::before { content: "›"; display: inline-block; transition: transform var(--dur-fast) var(--ease-out); color: var(--text-muted); }
.sq-how[open] summary::before { transform: rotate(90deg); }
.sq-how summary:hover { color: var(--text-primary); }
.sq-how-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.sq-how .sq-steps { margin-top: 10px; }

.sq-followups { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sq-followups-label { width: 100%; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted); }
.sq-followup {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    background: var(--surface-card);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13.5px;
    text-align: start;
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out);
}
.sq-followup i { font-size: 10px; color: var(--text-muted); }
.sq-followup:hover { border-color: var(--border-strong); }

/* Clarification, errors */
.sq-clarification-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sq-clarification-header { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.sq-warning-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.sq-warning-header { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.sq-warning-card .sq-warning-header span { color: var(--text-primary); }
.sq-warning-card .sq-warning-text { font-size: 14.5px; line-height: 1.55; }
.sq-warning-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.sq-tech summary { cursor: pointer; font-size: 12.5px; color: var(--text-muted); }
.sq-tech pre {
    margin: 8px 0 0; padding: 10px 12px; max-height: 160px; overflow: auto;
    white-space: pre-wrap; word-break: break-word;
    font-family: var(--font-mono); font-size: 11.5px; color: var(--text-secondary);
    background: var(--paper-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
}
.sq-error-area { gap: 6px; }
.sq-error-area > i { font-size: 26px; margin-bottom: 6px; }
.sq-error-title { font-family: var(--font-display); font-weight: 450; font-size: 24px; margin: 0; color: var(--text-primary); text-align: center; }
.sq-error-area p { max-width: 440px; text-align: center; line-height: 1.55; }
.sq-error-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.sq-error-actions .sq-btn { padding: 8px 14px; font-size: 13.5px; }
#sq-error-tech { max-width: 520px; width: 100%; }

/* Composer */
.sq-input-area { padding: 0 var(--space-5) var(--space-4); }
.sq-input-container { padding: 6px 6px 6px 16px; gap: 6px; }
.sq-question-input { padding: 10px 0; }
/* The container already shows focus (:focus-within ring above), so the
   global `:focus-visible { outline … !important }` accessibility rule would
   draw a second ring inside it. Only an !important can override that rule;
   focus stays visible via the container. */
.sq-input-container .sq-question-input:focus,
.sq-input-container .sq-question-input:focus-visible { outline: none !important; box-shadow: none; border: none; }
.sq-ask-btn, .sq-mic-btn { width: 38px; height: 38px; }
.sq-trust {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}
.sq-trust i { font-size: 10px; margin-inline-end: 4px; }

@media (max-width: 640px) {
    .sq-suggested-questions { grid-template-columns: 1fr; }
    .sq-empty-state h3 { font-size: 26px; }
    .sq-db-picker-label { display: none; }
    #sq-metric-explorer-toggle span { display: none; }
    .sq-kv-row { grid-template-columns: 1fr; gap: 2px; }
}

