/* Mason Ventures — Obsidian v2 Design System (Option A: Titanium Silver + Ice Sky + Surgical Mint)
   Layered as the final cascade on top of app.css / eclipse.css / eclipse-m.css / style.css.
   Zero JS route, API, auth, or layout functionality is altered. */

html:root[data-theme="eclipse"],
html:root[data-theme="eclipse"][data-bright],
html:root[data-theme="eclipse"][data-bright][data-style] {
  --bg: #000000;
  --bg-0: #000000;
  --bg-1: #08080b;
  --bg-2: #0f0f14;
  --bg-elevated: #0a0a0e;
  --black: #000000;

  --text-1: #ffffff;
  --text-2: #c4c4cc;
  --text-3: #7c7c8a;
  --ink-1: #ffffff;
  --ink-2: #c4c4cc;
  --ink-3: #7c7c8a;
  --ink-h: #ffffff;
  --ink-stat: #ffffff;
  --ink-white: #ffffff;
  --ink-nav-on: #000000;
  --muted: #8a8a98;
  --nav-idle: #8a8a98;

  /* Option A: Ice Sky primary focus + Titanium Silver governance/warning (zero orange) */
  --accent: #38bdf8;
  --accent-2: #34d399;
  --blue: #38bdf8;
  --blue-bright: #38bdf8;
  --ecl-blue: #38bdf8;
  --ecl-blue-soft: #38bdf8;
  --focus: #38bdf8;
  --glow-blue: rgba(56, 189, 248, 0.24);
  --accent-glow: rgba(56, 189, 248, 0.22);
  --ui-glow: 0 0 18px rgba(56, 189, 248, 0.16);

  --good: #34d399;
  --ok-text: #34d399;
  --success: #34d399;
  --st-online: #34d399;
  --warning: #e4e4ec;
  --warn-text: #e4e4ec;
  --warn-s: #e4e4ec;
  --info-text: #38bdf8;
  --bad: #fb7185;
  --bad-text: #fb7185;
  --neutral-text: #a1a1aa;

  --border: rgba(255, 255, 255, 0.10);
  --border-card: rgba(255, 255, 255, 0.11);
  --border-quiet: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.22);
  --border-active: rgba(255, 255, 255, 0.34);

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-lg: 14px;
  --r-md: 10px;
}

/* Pure #000000 obsidian ground + keep #app interactive layers above Vortex canvas */
html,
body {
  background: #000000 !important;
  color: #ffffff;
  overflow-x: clip;
}

#app,
.shell,
.auth,
.boot {
  position: relative;
  z-index: 1;
}

/* Remove old planet orb / radial earth gradients so pure black + Vortex canvas stay crisp */
html:root[data-theme="eclipse"] .shell,
html:root[data-theme="eclipse"] .shell.earth-app,
html:root[data-theme="eclipse"] .boot {
  background: transparent;
}

html:root[data-theme="eclipse"] .shell.earth-app::before,
html:root[data-theme="eclipse"] .shell.earth-app.earth-detail::before,
html:root[data-theme="eclipse"] body:has(.home-page) .shell.earth-app::before,
html:root[data-theme="eclipse"][data-bright][data-style] body:has(.home-page) .shell.earth-app::before,
html:root[data-theme="eclipse"] .auth::before {
  background-image: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.84) 100%) !important;
  background-color: transparent !important;
}

html:root[data-theme="eclipse"] .moon-hero .orb,
html:root[data-theme="eclipse"] .mk-orb {
  background: radial-gradient(ellipse at 50% 0%, rgba(56, 189, 248, 0.10) 0%, #050507 70%) !important;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

/* Desktop Sidebar — Obsidian Hairline Architecture */
html:root[data-theme="eclipse"] .sidebar {
  background: rgba(5, 5, 7, 0.90) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.10) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html:root[data-theme="eclipse"] .sidebar a.nav {
  color: #a1a1aa;
  border: 1px solid transparent;
  border-radius: 9px;
}

html:root[data-theme="eclipse"] .sidebar a.nav:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

html:root[data-theme="eclipse"] .sidebar a.nav[aria-current="page"] {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0.05)), rgba(10, 12, 18, 0.88) !important;
  color: #eef6ff !important;
  border: 1px solid rgba(56, 189, 248, 0.42) !important;
  box-shadow: inset 2px 0 0 #38bdf8, 0 0 16px -5px rgba(56, 189, 248, 0.45) !important;
}

html:root[data-theme="eclipse"] .sidebar .count {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #e4e4ec !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: var(--font-mono);
}

/* Topbar & Searchbar */
html:root[data-theme="eclipse"] .topbar .searchbar {
  background: rgba(10, 10, 14, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

html:root[data-theme="eclipse"] .topbar .dot {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

/* Typography & Surgical Editorial Underlines */
html:root[data-theme="eclipse"] .display,
html:root[data-theme="eclipse"] .h-title,
html:root[data-theme="eclipse"] .director-id .display {
  font-family: var(--font-sans) !important;
  font-weight: 700;
  letter-spacing: -0.03em;
}

html:root[data-theme="eclipse"] .home-greet .display,
html:root[data-theme="eclipse"] .h-title {
  text-decoration: none;
}

html:root[data-theme="eclipse"] .home-greet .display {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  box-shadow: inset 0 -3px 0 #34d399;
  padding-bottom: 3px;
}

html:root[data-theme="eclipse"] .director-id .display {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  box-shadow: none !important;
  text-decoration: none !important;
  padding-bottom: 0;
}

/* Swiss Hairline Cards & Borderless Nested Lists / Robot Agents */
html:root[data-theme="eclipse"] .card,
html:root[data-theme="eclipse"] .stat,
html:root[data-theme="eclipse"] .biz-card,
html:root[data-theme="eclipse"] .an-kpi,
html:root[data-theme="eclipse"] .an-chart-card,
html:root[data-theme="eclipse"] .sp-row,
html:root[data-theme="eclipse"] .wf-card,
html:root[data-theme="eclipse"] .agent-card,
html:root[data-theme="eclipse"] .auth .card {
  background: rgba(9, 9, 12, 0.90) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: none !important;
}

/* Remove double borders when a .card nests inside another .card (e.g. More on this screen, Ideas cards) */
html:root[data-theme="eclipse"] .card .card {
  background: rgba(255, 255, 255, 0.025) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Never put an outer box around .list since .list lives inside .card */
html:root[data-theme="eclipse"] .list {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
}

/* Borderless floating robot agents (no card boxes around portraits) */
html:root[data-theme="eclipse"] .agent-tile,
html:root[data-theme="eclipse"] .home-page .agent-tile {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html:root[data-theme="eclipse"] .list-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

html:root[data-theme="eclipse"] .list-row:last-child {
  border-bottom: 0;
}

/* Strict zero-clipping / zero horizontal overflow guards on grid/flex children */
.page,
.home-grid,
.grid-2,
.grid-3,
.grid-stats,
.biz-grid,
.agent-grid,
.list-row,
.biz-card,
.stat,
.card {
  min-width: 0;
}

/* Tabular Mono Telemetry Counters */
html:root[data-theme="eclipse"] .stat .val,
html:root[data-theme="eclipse"] .an-kpi-val,
html:root[data-theme="eclipse"] .home-ring-n,
html:root[data-theme="eclipse"] .biz-kpis-inline b {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Glowy Dark-Glass Primary Buttons + Hairline Secondary Buttons */
html:root[data-theme="eclipse"] .btn.primary,
html:root[data-theme="eclipse"] .btn.accent,
html:root[data-theme="eclipse"] .btn.truth-cta,
html:root[data-theme="eclipse"][data-bright][data-style] .btn.primary,
html:root[data-theme="eclipse"][data-bright][data-style] .btn.accent,
html:root[data-theme="eclipse"][data-bright][data-style] .btn.truth-cta {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04) 55%, rgba(255, 255, 255, 0.07)), rgba(10, 12, 18, 0.90) !important;
  color: #eef4ff !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 18px -4px rgba(56, 189, 248, 0.34), 0 8px 20px -12px rgba(0, 0, 0, 0.9) !important;
  text-shadow: none !important;
}

html:root[data-theme="eclipse"] .btn.primary:hover,
html:root[data-theme="eclipse"] .btn.accent:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.06) 55%, rgba(255, 255, 255, 0.10)), rgba(12, 16, 24, 0.94) !important;
  border-color: rgba(56, 189, 248, 0.52) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 22px -3px rgba(56, 189, 248, 0.48), 0 8px 22px -12px rgba(0, 0, 0, 0.9) !important;
}

html:root[data-theme="eclipse"] .btn.primary svg,
html:root[data-theme="eclipse"] .btn.accent svg,
html:root[data-theme="eclipse"] .btn.truth-cta svg {
  color: #eef4ff !important;
}

html:root[data-theme="eclipse"] .btn:not(.primary):not(.accent):not(.truth-cta):not(.danger) {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

html:root[data-theme="eclipse"] .btn:not(.primary):not(.accent):not(.truth-cta):not(.danger):hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

/* Borderless Robot Portraits (remove circular border/halo rings completely) */
html:root[data-theme="eclipse"] .avatar,
html:root[data-theme="eclipse"][data-bright][data-style] .avatar {
  filter: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

html:root[data-theme="eclipse"] .avatar::before,
html:root[data-theme="eclipse"][data-bright][data-style] .avatar::before,
html:root[data-theme="eclipse"] .avatar::after,
html:root[data-theme="eclipse"][data-bright] .avatar::after,
html:root[data-theme="eclipse"][data-bright][data-style] .avatar::after {
  display: none !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

html:root[data-theme="eclipse"] .avatar img {
  filter: contrast(1.05) saturate(0.95);
  border: 0 !important;
  box-shadow: none !important;
}

/* Director Chat Bubbles (Ice Sky sent bubble for .msg.owner, Obsidian matte for .msg.director) */
html:root[data-theme="eclipse"] .director-col::before,
html:root[data-theme="eclipse"] .director-page.is-idle .director-hero::before,
html:root[data-theme="eclipse"] .director-page.has-msgs .director-hero::before,
html:root[data-theme="eclipse"][data-bright][data-style] .director-page.is-idle .director-hero::before {
  display: none !important;
  box-shadow: none !important;
}

html:root[data-theme="eclipse"] .msg.director .bubble {
  background: rgba(18, 18, 22, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  color: #ffffff !important;
}

html:root[data-theme="eclipse"] .msg.owner .bubble,
html:root[data-theme="eclipse"] .msg.me .bubble,
html:root[data-theme="eclipse"] .bubble.me {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.55) !important;
  border-radius: 18px 18px 4px 18px !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.24) !important;
}

/* Clean Transparent Thread Bar & Follow-Up Pills */
html:root[data-theme="eclipse"] .thread-bar {
  background: transparent !important;
  border: 0 !important;
  padding: 4px 12px 10px !important;
  gap: 6px !important;
}

html:root[data-theme="eclipse"] .thread-tab {
  padding: 5px 12px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
  background: rgba(14, 14, 19, 0.82) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  color: #a1a1aa !important;
}

html:root[data-theme="eclipse"] .director-followups .pill-btn {
  background: rgba(14, 14, 19, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  color: #c4c4cc !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
}

html:root[data-theme="eclipse"] .director-followups .pill-btn:hover {
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

html:root[data-theme="eclipse"] .composer {
  background: rgba(14, 14, 19, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 22px !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
}

html:root[data-theme="eclipse"] .composer .send {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.28), rgba(56, 189, 248, 0.10)), rgba(10, 14, 22, 0.94) !important;
  color: #eef6ff !important;
  border: 1px solid rgba(56, 189, 248, 0.55) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 16px -4px rgba(56, 189, 248, 0.55) !important;
  border-radius: 50% !important;
}

/* Option A Governance / Warn tones -> Titanium Silver & Ice Sky */
html:root[data-theme="eclipse"] .tone-warn,
html:root[data-theme="eclipse"] .stat .sub.tone-warn,
html:root[data-theme="eclipse"] .chip.warn {
  color: #e4e4ec !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

/* Sheets, Inputs & Auth Form */
html:root[data-theme="eclipse"] .sheet {
  background: #070709 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

html:root[data-theme="eclipse"] .auth-input,
html:root[data-theme="eclipse"] .code-input,
html:root[data-theme="eclipse"] input,
html:root[data-theme="eclipse"] textarea,
html:root[data-theme="eclipse"] select {
  background: #000000 !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

html:root[data-theme="eclipse"] .search-input,
html:root[data-theme="eclipse"] .topbar .searchbar {
  background: rgba(10, 10, 14, 0.90) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 10px;
}

html:root[data-theme="eclipse"] .search-input input,
html:root[data-theme="eclipse"] .composer textarea,
html:root[data-theme="eclipse"] .composer input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Glowy dark-glass active filter / thread tabs */
html:root[data-theme="eclipse"] .tab[aria-selected="true"],
html:root[data-theme="eclipse"] .tabs button[aria-selected="true"],
html:root[data-theme="eclipse"] .thread-tab.is-active,
html:root[data-theme="eclipse"] .an-seg button.is-active,
html:root[data-theme="eclipse"] .chip[aria-pressed="true"],
html:root[data-theme="eclipse"] .chip.active {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.18), rgba(56, 189, 248, 0.06)), rgba(10, 12, 18, 0.92) !important;
  color: #eef6ff !important;
  border-color: rgba(56, 189, 248, 0.48) !important;
  font-weight: 650 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 14px -4px rgba(56, 189, 248, 0.38) !important;
}

html:root[data-theme="eclipse"] .tab[aria-selected="true"] .n {
  background: rgba(56, 189, 248, 0.24) !important;
  color: #eef6ff !important;
}

html:root[data-theme="eclipse"] .auth-input:focus,
html:root[data-theme="eclipse"] input:focus,
html:root[data-theme="eclipse"] textarea:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18) !important;
}

html:root[data-theme="eclipse"] .composer textarea:focus,
html:root[data-theme="eclipse"] .composer textarea:focus-visible,
html:root[data-theme="eclipse"] .composer input:focus,
html:root[data-theme="eclipse"] .composer input:focus-visible,
html:root[data-theme="eclipse"] .search-input input:focus,
html:root[data-theme="eclipse"] .search-input input:focus-visible {
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Mobile Floating Obsidian Pill Bottom Navigation (<= 1023px) */
@media (max-width: 1023px) {
  html:root[data-theme="eclipse"] .main {
    padding-bottom: calc(76px + var(--safe-b, 0px)) !important;
  }

  html:root[data-theme="eclipse"] .shell.is-director .main {
    padding-bottom: calc(68px + var(--safe-b, 0px)) !important;
  }

  html:root[data-theme="eclipse"] body.kb-open .shell.is-director .main {
    padding-bottom: 0 !important;
  }

  html:root[data-theme="eclipse"] .bottom-nav,
  html:root[data-theme="eclipse"][data-bright="normal"] .bottom-nav {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: max(10px, var(--safe-b, 0px)) !important;
    width: auto !important;
    height: auto !important;
    padding: 5px !important;
    gap: 2px !important;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.85fr) !important;
    border-radius: 999px !important;
    background: rgba(11, 11, 15, 0.94) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85) !important;
  }

  html:root[data-theme="eclipse"] .shell.is-director .bottom-nav {
    position: absolute !important;
  }

  html:root[data-theme="eclipse"] body.kb-open .shell.is-director .bottom-nav {
    display: none !important;
  }

  html:root[data-theme="eclipse"] .bottom-nav a {
    border-radius: 999px !important;
    min-height: 44px !important;
    min-width: 0 !important;
    padding: 5px 4px !important;
    color: #9ca3af !important;
    font-family: var(--font-sans) !important;
    font-size: clamp(9px, 2.55vw, 10.5px) !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }

  html:root[data-theme="eclipse"] .bottom-nav a::before,
  html:root[data-theme="eclipse"][data-bright="normal"] .bottom-nav a[aria-current="page"]::before {
    display: none !important;
  }

  html:root[data-theme="eclipse"] .bottom-nav a[aria-current="page"] {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0.07)), rgba(10, 13, 20, 0.94) !important;
    color: #eef6ff !important;
    border: 1px solid rgba(56, 189, 248, 0.52) !important;
    font-weight: 650 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 20px -4px rgba(56, 189, 248, 0.62) !important;
  }

  html:root[data-theme="eclipse"] .bottom-nav a[aria-current="page"] .nav-ic,
  html:root[data-theme="eclipse"] .bottom-nav a[aria-current="page"] svg {
    background: transparent !important;
    box-shadow: none !important;
    color: #eef6ff !important;
  }
}

/* Option 3 · Swiss Editorial Hairline Stream for "What the team is saying" (no individual bubble boxes) */
html:root[data-theme="eclipse"] .says-list {
  background: rgba(9, 9, 12, 0.90) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-radius: 14px;
  gap: 0 !important;
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html:root[data-theme="eclipse"] .says-list a.says {
  padding: 13px 15px;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 150ms ease;
}

html:root[data-theme="eclipse"] .says-list a.says:last-child {
  border-bottom: 0;
}

html:root[data-theme="eclipse"] .says-list a.says:hover,
html:root[data-theme="eclipse"] .says-list a.says:active {
  background: rgba(255, 255, 255, 0.03);
}

@media (min-width: 900px) {
  html:root[data-theme="eclipse"] .says-list a.says:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }
  html:root[data-theme="eclipse"] .says-list a.says:nth-last-child(-n+2) {
    border-bottom: 0;
  }
}

html:root[data-theme="eclipse"] .says-list .says-bubble,
html:root[data-theme="eclipse"] .says-list a.says:hover .says-bubble,
html:root[data-theme="eclipse"] .says-list a.says:active .says-bubble {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

html:root[data-theme="eclipse"] .says-bubble.says-inline {
  background: rgba(10, 10, 14, 0.90) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: none !important;
}

html:root[data-theme="eclipse"] .says-name {
  color: #ffffff !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.01em;
}

html:root[data-theme="eclipse"] .says-name::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(var(--agent-rgb, 56 189 248));
  box-shadow: 0 0 8px rgb(var(--agent-rgb, 56 189 248));
  flex-shrink: 0;
}

html:root[data-theme="eclipse"] .says-text {
  color: #c4c4cc !important;
  line-height: 1.45 !important;
}

/* Duet-Style Floating Director Circular Head & Clean Header on Mobile */
@media (max-width: 1023px) {
  html:root[data-theme="eclipse"] .director-page .director-head {
    background: transparent !important;
    border: 0 !important;
    padding: 10px 12px 6px !important;
    align-items: center !important;
  }

  html:root[data-theme="eclipse"] .director-page .director-back,
  html:root[data-theme="eclipse"] .director-page .director-new-ic {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: rgba(16, 16, 22, 0.88) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
    color: #ffffff !important;
  }

  html:root[data-theme="eclipse"] .director-page .director-id {
    display: none !important;
  }

  html:root[data-theme="eclipse"] .director-page .director-focal {
    grid-template-columns: auto !important;
    justify-content: center !important;
    justify-items: center !important;
  }

  html:root[data-theme="eclipse"] .director-page .director-hero {
    position: relative !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    background: rgba(14, 14, 20, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.72) !important;
    display: grid !important;
    place-items: center !important;
    overflow: visible !important;
  }

  html:root[data-theme="eclipse"] .director-page .director-hero .avatar {
    width: 44px !important;
    height: 44px !important;
  }

  html:root[data-theme="eclipse"] .director-page .director-hero::after {
    content: '';
    display: block !important;
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #34d399;
    border: 2px solid #000000;
    box-shadow: 0 0 8px #34d399;
    z-index: 4;
  }
}

/* Mobile Anti-Clipping & Safe Text Wrapping Across Stat Cards, KPI Grids & Detail Lists */
html:root[data-theme="eclipse"] .stat,
html:root[data-theme="eclipse"] .an-kpi,
html:root[data-theme="eclipse"] .card,
html:root[data-theme="eclipse"] .biz-list li {
  min-width: 0;
  max-width: 100%;
}

html:root[data-theme="eclipse"] .biz-list li > span,
html:root[data-theme="eclipse"] .kv dd,
html:root[data-theme="eclipse"] .list-row .grow,
html:root[data-theme="eclipse"] .card-title,
html:root[data-theme="eclipse"] .h-title,
html:root[data-theme="eclipse"] .h-sec,
html:root[data-theme="eclipse"] .card p,
html:root[data-theme="eclipse"] .card .muted,
html:root[data-theme="eclipse"] .card .small,
html:root[data-theme="eclipse"] .card .dim,
html:root[data-theme="eclipse"] .says-text {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

html:root[data-theme="eclipse"] .stat .v,
html:root[data-theme="eclipse"] .stat .l,
html:root[data-theme="eclipse"] .stat .sub,
html:root[data-theme="eclipse"] .an-kpi-val {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

/* Protect compact buttons, pills, tabs, and chips from ever crushing vertically */
html:root[data-theme="eclipse"] .btn,
html:root[data-theme="eclipse"] .pill,
html:root[data-theme="eclipse"] .chip,
html:root[data-theme="eclipse"] .tab,
html:root[data-theme="eclipse"] .thread-tab,
html:root[data-theme="eclipse"] .pill-btn {
  flex-shrink: 0;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

html:root[data-theme="eclipse"] .btn.sm,
html:root[data-theme="eclipse"] .pill,
html:root[data-theme="eclipse"] .tab,
html:root[data-theme="eclipse"] .thread-tab,
html:root[data-theme="eclipse"] .pill-btn {
  white-space: nowrap !important;
}

@media (max-width: 768px) {
  html:root[data-theme="eclipse"] .card > .row.between {
    flex-wrap: wrap !important;
    row-gap: 10px !important;
    column-gap: 10px !important;
  }

  html:root[data-theme="eclipse"] .card > .row.between > div:first-child {
    min-width: 0;
    flex: 1 1 180px;
  }

  html:root[data-theme="eclipse"] .biz-kpi-grid .stat .v,
  html:root[data-theme="eclipse"] .grid-stats .stat .v,
  html:root[data-theme="eclipse"] .an-kpi-val {
    font-size: clamp(14px, 4vw, 18px) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em;
  }

  html:root[data-theme="eclipse"] .biz-kpi-grid .stat,
  html:root[data-theme="eclipse"] .an-kpi {
    padding: 12px !important;
  }

  html:root[data-theme="eclipse"] .biz-kpi-grid {
    gap: 8px !important;
  }

  html:root[data-theme="eclipse"] .card .pill,
  html:root[data-theme="eclipse"] .card .chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
