/* Owner App Style: re-tints the Eclipse look with CSS variables only (Settings > Appearance > Style).
   data-style="eclipse" (default) has no rules here, so Eclipse is exactly what it was. Nebula and Ember only change colours:
   no layout, size or type changes. Values come from ui_concepts/style.css (.concept.nebula / .concept.ember). */
:root[data-style="nebula"] {
  --acc: #7fb0ff; --acc2: #b08cff; --glow: #4a6dff; --orb1: #33449a; --orb2: #05060e; --hz: #7d9cff;
  --btnbg: linear-gradient(#4472f0, #2d5bd6); --btnfg: #ffffff;
  --acc-rgb: 127,176,255; --acc2-rgb: 176,140,255; --glow-rgb: 74,109,255; --hz-rgb: 125,156,255;
  --warn-s: #e0b36a;
}
:root[data-style="ember"] {
  --acc: #ffb35c; --acc2: #ff7a59; --glow: #ff8a3d; --orb1: #6a3a1c; --orb2: #080504; --hz: #ffa45c;
  --btnbg: linear-gradient(#ffc27a, #f08a3a); --btnfg: #1b0e03;
  --acc-rgb: 255,179,92; --acc2-rgb: 255,122,89; --glow-rgb: 255,138,61; --hz-rgb: 255,164,92;
  --warn-s: #ff9a80;
}
/* P = :root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) {
  --blue: var(--acc); --blue-bright: var(--acc); --focus: var(--acc); --ecl-blue: var(--glow); --ecl-blue-soft: var(--acc);
  --warn-text: var(--warn-s); --warning: var(--warn-s);
}
/* focus ring, input focus */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) :focus-visible { outline-color: var(--acc); }
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .searchbar:focus-within,
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) input:focus-visible { box-shadow: 0 0 0 2px rgba(var(--acc-rgb), .35); border-color: rgba(var(--acc-rgb), .5); }
/* links inside running text and section headers */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) :is(.link, p a, .small a, .section-head a) { color: var(--acc); }
/* tile warn */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .stat .sub.tone-warn { color: var(--warn-s); }
/* active nav bar */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .bottom-nav a[aria-current="page"]::before { background: var(--acc); box-shadow: 0 0 10px rgba(var(--acc-rgb), .5); }
/* primary buttons */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .btn.primary,
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .btn.accent,
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .btn.truth-cta {
  background: var(--btnbg); border: 1px solid rgba(255,255,255,.22); color: var(--btnfg); text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 0 16px -6px rgba(var(--glow-rgb), .65), 0 8px 20px -14px rgba(0,0,0,.9); }
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .btn.primary svg,
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .btn.accent svg,
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .btn.truth-cta svg { color: var(--btnfg); }
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .btn.primary:hover,
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .btn.accent:hover { background: var(--btnbg); filter: brightness(1.08); }
/* agent ring + avatar glow */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .avatar::after { background: conic-gradient(from 200deg, var(--acc), #ffffff10 40%, var(--acc2) 70%, var(--acc)); border-color: rgba(var(--acc-rgb), .36); box-shadow: none; }
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .avatar { filter: drop-shadow(0 0 8px rgba(var(--glow-rgb), .35)); }
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .avatar::before { background: radial-gradient(circle, rgba(var(--acc-rgb), .20), rgba(var(--acc-rgb), 0) 68%); }
/* Director halo */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .director-page.is-idle .director-hero::before {
  background: radial-gradient(circle, rgba(var(--glow-rgb), .30) 0%, rgba(var(--glow-rgb), .14) 52%, rgba(var(--glow-rgb), 0) 74%);
  border-color: rgba(var(--acc-rgb), .40); box-shadow: 0 0 40px 4px rgba(var(--glow-rgb), .26), inset 0 0 40px rgba(var(--glow-rgb), .18); }
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .director-page.is-idle .director-hero .av-stage { filter: drop-shadow(0 0 16px rgba(var(--glow-rgb), .55)) !important; }
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .director-page.is-idle .director-greet { border-color: rgba(var(--acc-rgb), .24); }
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .director-page.has-msgs .director-hero::before {
  border-color: rgba(var(--acc-rgb), .42); background: radial-gradient(circle, rgba(var(--glow-rgb), .22), rgba(var(--glow-rgb), 0) 70%); box-shadow: 0 0 12px 1px rgba(var(--glow-rgb), .30); }
/* Home orb + horizon glow (no thin line) */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) body:has(.home-page) .shell.earth-app::before {
  background-image:
    radial-gradient(ellipse 85% 150px at 50% 150px, rgba(var(--hz-rgb), .10), transparent 72%),
    radial-gradient(circle 210px at 50% 30px, color-mix(in srgb, var(--orb1) 80%, #000) 0%, color-mix(in srgb, var(--orb1) 38%, var(--orb2)) 45%, color-mix(in srgb, var(--orb1) 12%, var(--orb2)) 68%, rgba(6,7,10,0) 76%),
    linear-gradient(180deg, #0a0b0f 0%, #06070a 60%); }
@media (min-width: 1024px) {
  :root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) body:has(.home-page) .shell.earth-app::before {
    background-image:
      radial-gradient(ellipse 60% 150px at 46% 150px, rgba(var(--hz-rgb), .10), transparent 72%),
      radial-gradient(circle 300px at 46% 0px, color-mix(in srgb, var(--orb1) 80%, #000) 0%, color-mix(in srgb, var(--orb1) 38%, var(--orb2)) 45%, color-mix(in srgb, var(--orb1) 12%, var(--orb2)) 68%, rgba(6,7,10,0) 76%),
      linear-gradient(180deg, #0a0b0f 0%, #06070a 60%); }
}
/* More moon hero */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .moon-hero .orb {
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--orb1) 70%, #000) 0%, var(--orb2) 68%);
  box-shadow: 0 -6px 90px -10px rgba(var(--glow-rgb), .5), inset 0 2px 0 rgba(var(--hz-rgb), .35); }
/* other orb surfaces (mk) */
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .mk-orb { background: radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--orb1) 60%, #000), var(--orb2) 62%); box-shadow: 0 0 80px -14px rgba(var(--glow-rgb), .4); }
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .mk-orb.big { box-shadow: 0 0 110px -10px rgba(var(--glow-rgb), .5); }
:root[data-theme="eclipse"][data-bright]:is([data-style="nebula"], [data-style="ember"]) .mk-ring { background: conic-gradient(from 200deg, var(--acc), #ffffff10 40%, var(--acc2) 70%, var(--acc)); box-shadow: 0 0 16px -8px var(--glow); }

/* ---------- interaction audit 2026-10-12: one shared dialog/sheet fix ----------
   Sheets are drawn in their own host under <body> (ui.js Sheet) and sit above the top bar, bottom nav, banners and the
   pull-to-refresh pill. Solid scrim (nothing bleeds through), full-height inner scrolling, background scroll locked. */
html .sheet-host { position: relative; z-index: 300; }
html .scrim, html:root[data-theme] .scrim {
  position: fixed; inset: 0; z-index: 300; background: rgba(2, 3, 5, .93);
  backdrop-filter: none; -webkit-backdrop-filter: none; display: flex; align-items: flex-end; justify-content: center;
  overscroll-behavior: contain; padding: var(--safe-t, 0px) 0 0;
}
html .sheet, html:root[data-theme] .sheet {
  width: 100%; max-width: 640px; box-sizing: border-box; min-height: 0; height: auto;
  max-height: calc(100dvh - var(--safe-t, 0px) - 6px); display: flex; flex-direction: column;
  padding: 8px 16px calc(14px + var(--safe-b, 0px)); border-radius: 22px 22px 0 0; background: #0b0c0e;
  border: 1px solid rgba(210, 213, 216, .17); border-bottom: 0; overflow: hidden;
}
html .sheet .sheet-head { display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0 -6px 6px 0; flex: none; }
html .sheet .sheet-head .h-sec { flex: 1; min-width: 0; margin: 0; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
html .sheet .sheet-close { flex: none; width: 44px; height: 44px; }
html .sheet .sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
html .sheet .sheet-body .btn, html .sheet .sheet-body button.btn { min-height: 48px; height: auto; white-space: normal; text-align: center; line-height: 1.25; padding-top: 10px; padding-bottom: 10px; }
html .sheet input:not([type=checkbox]):not([type=radio]), html .sheet textarea, html .sheet select, html .sheet .auth-input, html .sheet .cn-login .auth-input { font-size: 16px; min-height: 48px; }
html .sheet textarea { min-height: 150px; padding: 12px 14px; line-height: 1.4; resize: vertical; width: 100%; box-sizing: border-box; border-radius: var(--r-md, 14px);
  border: 1px solid rgba(206, 208, 212, .18); background: rgba(17, 18, 20, .92); color: inherit; outline: 0; }
html .sheet textarea.secret-text { -webkit-text-security: disc; }
html .sheet .auth-field span { overflow-wrap: anywhere; line-height: 1.35; }
html.has-sheet, html.has-sheet body { overflow: hidden; overscroll-behavior: none; }
@media (min-width: 1024px) { html .scrim { align-items: center; padding: 0; } html .sheet { border-radius: 18px; max-height: 80vh; border-bottom: 1px solid rgba(210, 213, 216, .17); } }
details.ia-more { margin-top: 6px; } details.ia-more > summary { min-height: 44px; display: flex; align-items: center; color: var(--text-2); cursor: pointer; }
html .sheet .composer textarea { min-height: 110px; font-size: 16px; }
html .sheet textarea.auth-input { height: auto; min-height: 150px; }
html:root[data-theme] .sheet .composer textarea { min-height: 110px; font-size: 16px; padding: 10px 6px; }
html:root[data-theme="classic"] .sheet { background: #090e15; border-color: rgba(175, 205, 240, .17); }
html:root[data-theme="classic"] .scrim { background: rgba(0, 3, 7, .93); }

/* Owner screens share the same title family. The Eclipse artwork and color tokens stay in their theme. */
html:root[data-theme="eclipse"] .page h1:is(.display, .h-title),
html:root[data-theme="eclipse"] .director-page .director-id h1.display {
  --font-display: var(--font-ui);
  font-family: var(--font-ui);
  font-weight: 650;
  letter-spacing: -.025em;
  text-wrap: balance;
}
html:root[data-theme="eclipse"] .home-greet h1.display.xl { font-size: clamp(28px, 4vw, 40px); line-height: 1.14; }
html[data-theme="eclipse"] .director-page.has-msgs .director-id h1.display { font-size: 18px; line-height: 1.2; }

.home-priority {
  display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: center; gap: 16px;
  border: 1px solid var(--border-strong); border-radius: var(--r-lg); padding: 16px 18px;
  background: var(--surface-1); margin-block: 2px;
}
.home-priority-copy { min-width: 0; display: grid; gap: 5px; }
.home-priority-label { font: 600 13px/1.3 var(--font-ui); color: var(--text-2); }
.home-priority h2 { margin: 0; color: var(--text-1); font: 600 19px/1.3 var(--font-ui); overflow-wrap: anywhere; }
html[data-theme] .home-priority .home-priority-button.btn { min-height: 48px; max-inline-size: 18rem; text-align: center; white-space: normal; }
.home-loading { color: var(--text-2); }
.home-loading-link.btn { min-height: 44px; width: fit-content; }
@media (min-width: 1280px) {
  .home-sky > .home-priority { grid-column: 1 / -1; grid-row: 2; }
  .home-sky:has(> .home-priority) > .home-stats { grid-row: 3; }
}
@media (min-width: 1024px) {
  .home-page .home-rail .home-agents { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 6px; }
  .home-rail .home-agents .agent-tile .faint { display: none; }
}
html[data-mk="home"] .home-priority { background: #0e1118d0; border-color: var(--mk-line); box-shadow: inset 0 0 32px -24px var(--glow); }
html[data-mk="home"] .home-priority .home-priority-button.btn {
  background: var(--btnbg); color: var(--btnfg); font: 600 15px/1.3 var(--mk-sans);
}
@media (max-width: 640px) {
  .home-priority { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; }
  html[data-theme] .home-priority .home-priority-button.btn { width: 100%; max-inline-size: none; }
  .home-priority h2 { font-size: 17px; }
}
@media (max-width: 350px) {
  html[data-mk] .topbar .mobile-only .wordmark { display: none; }
}

.hero.intel, .hero.more-header { min-height: 0; }
@media (max-width: 1023px) {
  html[data-theme="eclipse"] .director-page .director-id h1.display { font-size: 18px; line-height: 1.2; }

  html[data-theme] .director-compose .composer textarea { font-size: max(16px, var(--fs-md)); }
  body.kb-open .director-compose .composer textarea { max-height: clamp(40px, calc(var(--vvh, 100dvh) - 200px), 120px); }
  .director-head .icon-btn { width: 44px; height: 44px; }
  .director-welcome.mobile-only { display: grid; justify-items: center; padding: 8px 0; }
  .director-welcome img { display: block; width: 112px; height: 112px; object-fit: contain; border-radius: 50%; box-shadow: 0 0 34px rgba(79,139,255,.22); }
  body.kb-open .director-welcome { display: none; }
  .director-page .msg .bubble { overflow-wrap: anywhere; }
}

/* ---------- responsive, iPad & 12px typography polish (2026-11-26) ---------- */
html, body { overflow-x: clip; }
.main, .page, .card, .grid-2 > *, .grid-3 > *, .split > *,
.mk-tile, .mk-ag, .mk-li > * { min-width: 0; max-width: 100%; }

/* Enforce 12px floor across Classic & Eclipse micro-labels */
:root .logo-subtitle,
:root[data-theme] .logo-subtitle,
:root .tiny,
:root .eyebrow,
:root .t-when,
:root .freshness,
:root .msg-meta,
:root .sidebar .count,
:root .sidebar .brand .wordmark.sm,
:root .bottom-nav a,
:root .home-stats .stat .l,
:root .home-stats .stat .sub,
:root .reality-l,
:root .reality-v,
:root .auth-field span,
:root .mk-card2 small,
:root .brief-step em,
:root .lr-chip,
:root .act-count,
:root .ip-count,
:root .ip-chip,
:root .ow-chip,
:root .sy-mod,
:root .x-funnel .x-fbasis {
  font-size: max(12px, var(--fs-xs, 12px));
  line-height: 1.35;
}

/* Input 16px floor to prevent iOS Safari focus zoom + 44px touch targets */
.auth-input,
.cn-login .auth-input,
:root[data-theme] .auth-input,
:root[data-theme] .cn-login .auth-input {
  font-size: max(16px, 1rem);
  min-height: 44px;
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
}

@media (max-width: 1023px) {
  .composer textarea,
  .search-input input,
  .page input:not([type=checkbox]):not([type=radio]),
  .page select,
  .page textarea {
    font-size: max(16px, 1rem);
  }
  .bottom-nav a,
  .tab,
  .auth .btn,
  .page .btn {
    min-height: 44px;
  }
}

/* Dedicated iPad / Tablet layout (640px - 1023px) */
@media (min-width: 640px) and (max-width: 1023px) {
  .page {
    max-width: 860px;
    padding-inline: 24px;
  }
  .director-page .msgs,
  .director-compose {
    max-width: 760px;
    width: 100%;
    margin-inline: auto;
  }
  .bottom-nav {
    padding-inline: max(16px, calc((100% - 640px) / 2));
  }
  .bottom-nav a {
    min-height: 54px;
    font-size: 12px;
  }
  .auth .card {
    max-width: 440px;
    padding: 32px;
  }
  :root[data-theme] .home-small .home-stats,
  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* Small mobile safety (<= 390px) */
@media (max-width: 390px) {
  .mk-agents { gap: 4px; }
  .mk-ring { width: 54px; height: 54px; }
  .mk-ag b, .mk-st { overflow-wrap: break-word; }
  .auth .card { padding: 20px; }
}

/* ---------- live visual audit pass-2 fixes (2026-11-26) ---------- */
.auth .card {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  padding: 28px;
}
@media (min-width: 640px) {
  .auth .card { max-width: 440px; padding: 32px; }
}
@media (max-width: 390px) {
  .auth .card { padding: 20px; }
}
.auth .btn.accent,
:root[data-theme="eclipse"] .auth .btn.accent {
  background: #f2f4f8;
  color: #07080a;
  border-color: rgba(255, 255, 255, .35);
  font-weight: 600;
}
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .auth .btn.accent {
  background: var(--btnbg);
  color: var(--btnfg);
  border-color: rgba(255, 255, 255, .28);
}

.la-when { font-size: 12px !important; }
@media (pointer: coarse), (max-width: 1023px) {
  .la-toggle {
    min-height: 40px;
    padding: 6px 4px;
    font-size: 12px;
  }
}

@media (pointer: coarse), (max-width: 1180px) {
  html[data-theme] .director-compose .composer textarea,
  .director-compose .composer textarea,
  .composer textarea {
    font-size: max(16px, 1rem) !important;
  }
}

/* ---------- mobile chat & dark-mode elevation polish (2026-11-26) ---------- */
/* 1. Layered surface elevation & refined dark-mode depth (replaces flat wireframe black boxes) */
:root[data-theme="eclipse"] .card,
:root[data-theme="eclipse"] .card.quiet,
:root[data-theme="eclipse"] .home-stats .stat,
:root[data-theme="eclipse"] .mk-tile,
:root[data-theme="eclipse"] .mk-list,
:root[data-theme="eclipse"] .mk-card2,
.home-priority {
  background: #10141d !important;
  border: 1px solid rgba(255, 255, 255, .07) !important;
  box-shadow: 0 8px 24px -14px rgba(0, 0, 0, .7) !important;
}
.search-input,
.searchbar,
:root[data-theme="eclipse"] .searchbar,
.auth-input,
:root[data-theme="eclipse"] .auth-input {
  background: #151a26 !important;
  border: 1px solid rgba(255, 255, 255, .09) !important;
}

/* 2. High-contrast Primary CTA buttons & crisp Home stats */
.home-priority .home-priority-button.btn,
:root[data-theme="eclipse"] .btn.primary,
:root[data-theme="eclipse"] .btn.accent {
  background: #f4f6fb !important;
  color: #07080a !important;
  border: 0 !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 18px -6px rgba(244, 246, 251, .28) !important;
}
.home-priority .home-priority-button.btn svg,
:root[data-theme="eclipse"] .btn.primary svg,
:root[data-theme="eclipse"] .btn.accent svg {
  color: #07080a !important;
}
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .home-priority .home-priority-button.btn,
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .btn.primary,
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .btn.accent {
  background: var(--btnbg) !important;
  color: var(--btnfg) !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
}
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .btn.primary svg,
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .btn.accent svg {
  color: var(--btnfg) !important;
}
.mk-tile b,
:root[data-theme="eclipse"] .home-small .home-stats .stat .v {
  color: #f5f7fb !important;
}

/* 3. Refined semantic status pills (clean dark-glass tints instead of muddy brown/maroon) */
:root[data-theme="eclipse"] .pill {
  text-transform: none !important;
  letter-spacing: .01em !important;
  font-weight: 500 !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  color: #cbd5e1;
}
:root[data-theme="eclipse"] .pill.tone-warn {
  background: rgba(245, 180, 76, .13) !important;
  color: #f6c970 !important;
  border-color: rgba(245, 180, 76, .24) !important;
}
:root[data-theme="eclipse"] .pill.tone-bad {
  background: rgba(255, 96, 114, .13) !important;
  color: #ff8a98 !important;
  border-color: rgba(255, 96, 114, .24) !important;
}
:root[data-theme="eclipse"] .pill.tone-good {
  background: rgba(63, 217, 154, .13) !important;
  color: #5ee6ad !important;
  border-color: rgba(63, 217, 154, .24) !important;
}

/* 4. Mobile & Tablet best-practice layout, bottom-nav glass, Ventures tabs, and Full-Screen Director Chat */
.auth {
  align-content: center;
}

@media (max-width: 1023px) {
  .main {
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 36px);
  }
  .bottom-nav,
  :root[data-theme="eclipse"] .bottom-nav {
    background: rgba(9, 12, 18, .93) !important;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, .08) !important;
  }

  /* Ventures single-row scrollable pill tabs */
  .tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 2px 0 4px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: none;
    white-space: nowrap;
    border-radius: 999px !important;
    min-height: 38px;
    height: auto;
    padding: 6px 14px;
    background: #121620;
    border: 1px solid rgba(255, 255, 255, .07);
    color: #9ea7b8;
  }
  :root[data-theme="eclipse"] .tab[aria-selected="true"],
  .tab[aria-selected="true"] {
    background: #f4f6fb !important;
    color: #07080a !important;
    border-color: transparent !important;
    box-shadow: none !important;
    font-weight: 600 !important;
  }
  :root[data-theme="eclipse"] .tab[aria-selected="true"] .n,
  .tab[aria-selected="true"] .n {
    background: rgba(7, 8, 10, .14) !important;
    color: #07080a !important;
  }

  /* (Where every product stands uses .ps-grid below) */

  /* Full-screen Mobile Director Chat (Grok / ChatGPT / iMessage ergonomics) */
  html.dir-lock {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    overscroll-behavior: none;
  }
  html.dir-lock body {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: clip !important;
    overscroll-behavior: none;
    margin: 0;
  }
  html.is-app.dir-lock,
  html.is-app.dir-lock body {
    min-height: 100vh !important;
    min-height: 100lvh !important;
  }
  .shell.is-director {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  html.is-app .shell.is-director {
    height: 100vh !important;
    height: 100lvh !important;
  }
  html.is-app body.kb-open .shell.is-director,
  body.kb-open .shell.is-director {
    top: var(--vv-top, 0px) !important;
    bottom: auto !important;
    height: var(--vvh, 100dvh) !important;
  }
  .shell.is-director .bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: absolute !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 40;
  }
  body.kb-open .shell.is-director .bottom-nav {
    display: none !important;
  }
  .shell.is-director .main {
    padding: var(--safe-t, 0px) 0 calc(var(--bottom-nav-h) + var(--safe-b, 0px)) !important;
  }
  body.kb-open .shell.is-director .main {
    padding-bottom: 0 !important;
  }
  :root[data-theme="eclipse"] .director-page.has-msgs .director-col::before {
    display: none !important;
  }
  .director-col.glass,
  :root[data-theme="eclipse"] .director-col.glass {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .director-head,
  .director-page .director-head {
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    background: rgba(6, 7, 10, .92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    padding: 8px max(12px, var(--safe-r)) 8px max(12px, var(--safe-l));
  }
  .director-log,
  .director-page .director-log,
  :root[data-theme="eclipse"] .director-log {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    scrollbar-width: none;
    padding: 12px max(14px, var(--safe-r)) 16px max(14px, var(--safe-l));
    gap: 12px;
  }
  .director-log::-webkit-scrollbar { display: none; }

  /* Modern scannable chat bubbles */
  .msg.owner .bubble,
  :root[data-theme="eclipse"] .msg.owner .bubble {
    background: #2563eb !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 20px 20px 6px 20px !important;
    padding: 10px 14px !important;
    box-shadow: 0 2px 10px rgba(37, 99, 235, .22) !important;
  }
  .msg.director .bubble,
  :root[data-theme="eclipse"] .msg.director .bubble {
    background: #121620 !important;
    color: #eef1f7 !important;
    border: 1px solid rgba(255, 255, 255, .07) !important;
    border-radius: 20px 20px 20px 6px !important;
    padding: 12px 15px !important;
    line-height: 1.5 !important;
  }
  .msg-meta .pill,
  :root[data-theme="eclipse"] .msg-meta .pill {
    background: rgba(255, 255, 255, .05) !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    color: #8c96a8 !important;
    font-size: 12px !important;
    text-transform: none !important;
    letter-spacing: .01em !important;
  }

  /* Single-row horizontal quick-reply suggestions */
  .director-followups,
  :root[data-theme="eclipse"] .director-followups {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 2px 0 4px;
  }
  .director-followups::-webkit-scrollbar { display: none; }
  .director-followups .pill-btn,
  :root[data-theme="eclipse"] .director-followups .pill-btn {
    flex: none !important;
    white-space: nowrap !important;
    min-height: 38px !important;
    padding: 6px 14px !important;
    font-size: 13.5px !important;
    background: #141822 !important;
    border: 1px solid rgba(255, 255, 255, .09) !important;
    color: #dce2ee !important;
    border-radius: 999px !important;
  }

  /* Sleek docked bottom composer */
  .director-compose,
  :root[data-theme="eclipse"] .director-compose {
    background: linear-gradient(180deg, rgba(6, 7, 10, 0), rgba(6, 7, 10, .98) 22%) !important;
    border: 0 !important;
    padding: 8px max(12px, var(--safe-r)) 10px max(12px, var(--safe-l)) !important;
  }
  body.kb-open .shell.is-director .director-compose,
  :root[data-theme="eclipse"] body.kb-open .shell.is-director .director-compose {
    padding-bottom: 8px !important;
  }
  .composer,
  :root[data-theme="eclipse"] .composer {
    background: #141822 !important;
    border: 1px solid rgba(255, 255, 255, .10) !important;
    border-radius: 24px !important;
    padding: 6px 8px 6px 14px !important;
    gap: 4px !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .45) !important;
  }
  .composer textarea,
  :root[data-theme="eclipse"] .composer textarea {
    min-height: 36px !important;
    padding: 6px 2px !important;
    color: #f2f5fb !important;
  }
  .composer .cmp-btn,
  :root[data-theme="eclipse"] .composer .cmp-btn {
    width: 36px !important;
    height: 36px !important;
    border: 0 !important;
    background: transparent !important;
    color: #94a0b4 !important;
  }
  .composer .cmp-btn:active,
  .composer .cmp-btn.is-on,
  :root[data-theme="eclipse"] .composer .cmp-btn:active,
  :root[data-theme="eclipse"] .composer .cmp-btn.is-on {
    background: rgba(255, 255, 255, .08) !important;
    color: #f2f5fb !important;
  }
  .composer .send,
  :root[data-theme="eclipse"] .composer .send {
    width: 36px !important;
    height: 36px !important;
    background: #f4f6fb !important;
    color: #07080a !important;
    box-shadow: none !important;
  }
  .composer .send svg,
  :root[data-theme="eclipse"] .composer .send svg {
    color: #07080a !important;
  }
  .composer .send.is-idle,
  .composer .send[disabled],
  :root[data-theme="eclipse"] .composer .send.is-idle,
  :root[data-theme="eclipse"] .composer .send[disabled] {
    background: rgba(255, 255, 255, .08) !important;
    color: #687385 !important;
  }
  .composer .send.is-idle svg,
  .composer .send[disabled] svg,
  :root[data-theme="eclipse"] .composer .send.is-idle svg,
  :root[data-theme="eclipse"] .composer .send[disabled] svg {
    color: #687385 !important;
  }
}

@media (max-width: 1023px) and (display-mode: standalone) {
  html.dir-lock,
  html.dir-lock body {
    min-height: 100vh !important;
    min-height: 100lvh !important;
  }
  .shell.is-director {
    height: 100vh !important;
    height: 100lvh !important;
  }
  body.kb-open .shell.is-director {
    top: var(--vv-top, 0px) !important;
    bottom: auto !important;
    height: var(--vvh, 100dvh) !important;
  }
}

/* ---------- mobile branding & semantic pill harmony (2026-11-26) ---------- */
/* 1. Fix Mobile Home Topbar: remove stray left vertical bar & restore crisp bell icon */
@media (max-width: 560px) {
  html[data-mk] .topbar .mobile-only.row {
    border-left: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    gap: 10px !important;
  }
  html[data-mk] .topbar a.icon-btn svg {
    display: block !important;
  }
  html[data-mk] .topbar a.icon-btn::before {
    display: none !important;
  }
}

/* 2. Cohesive dark-glass Mobile Home 2x2 Snapshot icon tiles (.mk-tic) */
.mk-tic {
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 10px !important;
}
.mk-tic.a { color: #6b9aff !important; }
.mk-tic.b { color: #cbd5e1 !important; }
.mk-tic.c { color: #4ade9a !important; }
.mk-tic.d { color: #f5c469 !important; }

/* 3. Clean Linear/HIG dark-glass semantic status pills with crisp single 6px status dot */
.pill[class*="tone-"] .pdot,
:root[data-theme="eclipse"] .pill[class*="tone-"] .pdot {
  display: none !important;
}
.pill,
:root[data-theme="eclipse"] .pill,
.pill[class*="tone-"],
:root[data-theme="eclipse"] .pill[class*="tone-"] {
  background: #141822 !important;
  border: 1px solid rgba(255, 255, 255, .09) !important;
  color: #dce2ec !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill[class*="tone-"]::before,
:root[data-theme="eclipse"] .pill[class*="tone-"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: #7b879c;
}
.pill:is(.tone-good, .tone-online)::before,
:root[data-theme="eclipse"] .pill:is(.tone-good, .tone-online)::before {
  background: #3fd99a;
  box-shadow: 0 0 8px rgba(63, 217, 154, .45);
}
.pill:is(.tone-info, .tone-running, .tone-building, .tone-measuring, .tone-cyan)::before,
:root[data-theme="eclipse"] .pill:is(.tone-info, .tone-running, .tone-building, .tone-measuring, .tone-cyan)::before {
  background: #5f8dff;
  box-shadow: 0 0 8px rgba(95, 141, 255, .45);
}
.pill:is(.tone-warn, .tone-warning, .tone-working)::before,
:root[data-theme="eclipse"] .pill:is(.tone-warn, .tone-warning, .tone-working)::before {
  background: #e6b355;
  box-shadow: 0 0 8px rgba(230, 179, 85, .45);
}
.pill:is(.tone-bad, .tone-blocked)::before,
:root[data-theme="eclipse"] .pill:is(.tone-bad, .tone-blocked)::before {
  background: #e86a78;
  box-shadow: 0 0 8px rgba(232, 106, 120, .45);
}
.pill:is(.tone-violet, .tone-validating)::before,
:root[data-theme="eclipse"] .pill:is(.tone-violet, .tone-validating)::before {
  background: #909ce0;
}
.pill:is(.tone-neutral, .tone-offline, .tone-idle)::before,
:root[data-theme="eclipse"] .pill:is(.tone-neutral, .tone-offline, .tone-idle)::before {
  background: #7b879c;
}

/* 4. Align Mobile Chat user bubble to Mason Ventures brand electric blue */
@media (max-width: 1023px) {
  .msg.owner .bubble,
  :root[data-theme="eclipse"] .msg.owner .bubble {
    background: linear-gradient(135deg, #3b7bff, #2862e0) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 14px -4px rgba(59, 123, 255, .42) !important;
  }
}

/* ---------- eye-comfort soft-dark refinement (2026-11-26) ---------- */
/* 1. Calm Primary CTAs (replace bright white buttons with muted brand indigo-blue) */
.home-priority .home-priority-button.btn,
:root[data-theme="eclipse"] .btn.primary,
:root[data-theme="eclipse"] .btn.accent,
.auth .btn.accent,
:root[data-theme="eclipse"] .auth .btn.accent {
  background: linear-gradient(180deg, #345ec4, #264ba5) !important;
  color: #edf2ff !important;
  border: 1px solid rgba(125, 168, 255, .36) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 18px -8px rgba(38, 75, 165, .55) !important;
}
.home-priority .home-priority-button.btn svg,
:root[data-theme="eclipse"] .btn.primary svg,
:root[data-theme="eclipse"] .btn.accent svg,
.auth .btn.accent svg,
:root[data-theme="eclipse"] .auth .btn.accent svg {
  color: #edf2ff !important;
}
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .home-priority .home-priority-button.btn,
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .btn.primary,
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .btn.accent,
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .auth .btn.accent {
  background: var(--btnbg) !important;
  color: var(--btnfg) !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
}
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .btn.primary svg,
:root[data-theme="eclipse"]:is([data-style="nebula"], [data-style="ember"]) .btn.accent svg {
  color: var(--btnfg) !important;
}

/* 2. Eye-friendly off-white headings & stat numbers (eliminates OLED halation) */
.mk-tile b,
:root[data-theme="eclipse"] .home-small .home-stats .stat .v,
.mk-greet,
:root[data-theme="eclipse"] .page h1,
:root[data-theme="eclipse"] .h-title,
:root[data-theme="eclipse"] .display {
  color: #dce2ec !important;
}

/* 3. Calm active tabs, Director send pill & user bubble on Mobile/Tablet */
@media (max-width: 1023px) {
  :root[data-theme="eclipse"] .tab[aria-selected="true"],
  .tab[aria-selected="true"] {
    background: rgba(95, 141, 255, .18) !important;
    color: #dbe7ff !important;
    border-color: rgba(115, 158, 255, .42) !important;
  }
  :root[data-theme="eclipse"] .tab[aria-selected="true"] .n,
  .tab[aria-selected="true"] .n {
    background: rgba(95, 141, 255, .28) !important;
    color: #edf2ff !important;
  }
  .composer .send,
  :root[data-theme="eclipse"] .composer .send {
    background: #3362cc !important;
    color: #edf2ff !important;
  }
  .composer .send svg,
  :root[data-theme="eclipse"] .composer .send svg {
    color: #edf2ff !important;
  }
  .msg.owner .bubble,
  :root[data-theme="eclipse"] .msg.owner .bubble {
    background: linear-gradient(135deg, #2f5fd0, #2349a8) !important;
    color: #eef3ff !important;
  }
}

/* ---------- cohesive "What the team is saying" bubbles (no rainbow fills) ---------- */
.says-bubble,
.says-bubble.says-inline,
:root[data-theme="eclipse"] .says-bubble,
:root[data-theme="eclipse"] .says-bubble.says-inline {
  background: #121621 !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 14px !important;
  padding: 11px 14px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04) !important;
  transition: background 150ms ease, border-color 150ms ease;
}
a.says:hover .says-bubble,
a.says:active .says-bubble {
  background: #171c29 !important;
  border-color: rgba(255, 255, 255, .14) !important;
}
.says-name,
:root[data-theme="eclipse"] .says-name {
  color: #dce2ec !important;
  font-weight: 600 !important;
  filter: none !important;
  letter-spacing: -0.01em;
}
.says-text,
:root[data-theme="eclipse"] .says-text {
  color: #a9b3c4 !important;
  line-height: 1.45 !important;
}

/* ---------- Home UI cleanup: working-on rows & pipeline status grid (2026-11-26) ---------- */
.list-row.wip-small,
:root[data-theme="eclipse"] .home-small .wip-small {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 2px !important;
  min-height: 60px;
}
.list-row.wip-small .wip-small-body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.list-row.wip-small .wip-name,
:root[data-theme="eclipse"] .home-small .wip-small .wip-name {
  flex: none !important;
  width: 100%;
  font-size: 14.5px !important;
  font-weight: 500;
  color: #dce2ec;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row.wip-small .wip-meta {
  display: flex;
  align-items: center;
  max-width: 100%;
}
.list-row.wip-small .pill,
:root[data-theme="eclipse"] .list-row:has(.pill).wip-small .pill,
:root[data-theme="eclipse"] .list-row.wip-small .pill {
  margin-left: 0 !important;
  max-width: 100%;
}
.list-row.wip-small .chev {
  flex: none !important;
  margin-left: auto;
  color: var(--text-3);
}

.ps-card {
  gap: 10px !important;
}
.ps-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.ps-title {
  font-size: 14px;
  font-weight: 600;
  color: #dce2ec;
}
.ps-total {
  font-size: 12.5px;
  color: #8c97ab;
  font-variant-numeric: tabular-nums;
}
.ps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 720px) {
  .ps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.ps-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid rgba(255, 255, 255, .06);
  min-width: 0;
}
.ps-k {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9aa5b8;
  min-width: 0;
}
.ps-k span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-v {
  font-size: 14px;
  font-weight: 600;
  color: #dce2ec;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.ps-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: #7b879c;
}
.ps-dot.tone-good { background: #3fd99a; box-shadow: 0 0 8px rgba(63, 217, 154, .45); }
.ps-dot.tone-info { background: #5f8dff; box-shadow: 0 0 8px rgba(95, 141, 255, .45); }
.ps-dot.tone-warn { background: #e6b355; box-shadow: 0 0 8px rgba(230, 179, 85, .45); }
.ps-dot.tone-bad  { background: #e86a78; box-shadow: 0 0 8px rgba(232, 106, 120, .45); }
.ps-dot.tone-neutral { background: #7b879c; }
.ps-reasons {
  gap: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.ps-reason {
  font-size: 12.5px;
  line-height: 1.45;
  color: #8c97ab;
}
.ps-reason b {
  color: #c9d2e3;
  font-weight: 600;
}
.prep-ahead-note a {
  color: #7ea6ff;
  font-weight: 500;
  text-decoration: none;
  margin-left: 4px;
}

/* ---------- Apple-style Director reply notification banner & unread badge (2026-11-26) ---------- */
@keyframes iosNotifDrop {
  from { opacity: 0; transform: translate(-50%, -18px) scale(.97); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.ios-notif {
  position: fixed;
  top: calc(var(--safe-t, 0px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(392px, calc(100vw - 20px));
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px 11px 11px;
  border-radius: 22px;
  background: rgba(20, 24, 34, .92);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .58), inset 0 1px 0 rgba(255, 255, 255, .08);
  cursor: pointer;
  animation: iosNotifDrop .26s cubic-bezier(.22, 1, .36, 1) both;
  -webkit-tap-highlight-color: transparent;
}
.ios-notif-av {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  flex: none;
  background: #0d121d;
  border: 1px solid rgba(95, 141, 255, .36);
}
.ios-notif-body {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}
.ios-notif-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.ios-notif-app {
  font-size: 13.5px;
  font-weight: 600;
  color: #edf1f8;
  letter-spacing: -.01em;
}
.ios-notif-time {
  font-size: 12px;
  color: #8c97ab;
}
.ios-notif-msg {
  font-size: 13.5px;
  line-height: 1.35;
  color: #cfd6e4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.ios-notif-x {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .07);
  color: #9aa5b8;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.ios-notif-x:hover {
  background: rgba(255, 255, 255, .13);
  color: #edf1f8;
}
.bottom-nav .nav-ic {
  position: relative;
}
.bottom-nav .nav-badge {
  position: absolute;
  top: -2px;
  right: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff453a;
  border: 2px solid #090b10;
  box-shadow: 0 0 8px rgba(255, 69, 58, .65);
  pointer-events: none;
}
.sidebar .nav .count.dir-badge {
  background: #ff453a;
  color: #fff;
}

/* ---------- List-row status tags, mobile bottom safety, Needs You categories & Drive wizard (2026-11-26) ---------- */
:root[data-theme="eclipse"] .list-row > .pill {
  border-radius: 6px;
  padding: 2px 8px;
  min-height: 22px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  background: rgba(255, 255, 255, .045);
  border-color: rgba(255, 255, 255, .10);
}
.page:has(> .topbar) {
  padding-bottom: 0 !important;
}
@media (max-width: 1023px) {
  .shell:not(.is-director) .page:not(:has(> .topbar)) {
    padding-bottom: calc(104px + var(--safe-b, 0px));
  }
}
:root[data-theme="eclipse"] .hero:not(.director-head):not(.v-archive),
:root[data-theme="eclipse"] .hero.quiet:not(.director-head) {
  min-height: 0;
  padding-top: 8px;
  padding-bottom: 14px;
}
@media (min-width: 1024px) {
  :root[data-theme="eclipse"] .hero:not(.director-head):not(.v-archive),
  :root[data-theme="eclipse"] .hero.quiet:not(.director-head) {
    min-height: 0;
    padding: 14px 20px 16px;
  }
}
.ny-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 0;
}
.ny-cat-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-2);
}
.ny-cat-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
}
.ow-auto-rules {
  padding: 0;
  overflow: hidden;
}
.ow-auto-rules > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  min-height: 46px;
  font-weight: 600;
  font-size: 14px;
}
.ow-auto-rules > summary::-webkit-details-marker { display: none; }
.ow-rule-list {
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, .06);
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.ow-rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #0d1018;
}
.ow-switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 4px 11px 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  color: var(--ink-2, #8f97a6);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.ow-switch.on {
  background: rgba(63, 217, 154, .14);
  border-color: rgba(63, 217, 154, .42);
  color: #7fcfa6;
}
.ow-switch-track {
  width: 26px;
  height: 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  position: relative;
  transition: background .15s;
}
.ow-switch.on .ow-switch-track { background: rgba(63, 217, 154, .65); }
.ow-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.ow-switch.on .ow-switch-track::after { transform: translateX(11px); }
.drive-wiz { display: grid; gap: 12px; }
.drive-step-bar { display: flex; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.drive-step-badge {
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
  background: rgba(95, 141, 255, .16); color: #8db3ff; border: 1px solid rgba(95, 141, 255, .32);
}
.drive-file-lbl {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px dashed rgba(255, 255, 255, .24);
  color: var(--ink-1, #d6dae2); font-size: 13.5px; font-weight: 500;
}
.drive-file-lbl input { display: none; }

/* ---------- Built & Live Business Preview Hub (2026-11-26) ---------- */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
@media (max-width: 639px) {
  .biz-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}
.biz-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease;
}
.biz-card:hover {
  transform: translateY(-2px);
  border-color: rgba(141, 179, 255, .36) !important;
}
.biz-shot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0a0e17;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  overflow: hidden;
}
.biz-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.biz-shot-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
}
.biz-shot-badges {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.biz-shot-badges .pill {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(8, 12, 20, .86) !important;
}
.biz-card-body {
  padding: 14px;
  gap: 8px;
}
.biz-kpis-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.biz-detail-shot {
  overflow: hidden;
}
.biz-detail-shot img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.biz-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  .biz-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.biz-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
@media (max-width: 780px) {
  .biz-two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}
.biz-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.biz-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.45;
}
.biz-list.done svg {
  color: #5ee6ad;
  flex: none;
  margin-top: 2px;
}
.biz-list.need svg {
  color: #8db3ff;
  flex: none;
  margin-top: 2px;
}

.section-head:has(.biz-refresh-btn) {
  flex-wrap: wrap;
  gap: 10px;
}
.biz-refresh-btn {
  flex: none !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
}
/* === Shopify-style Venture Analytics Panel === */
.an-panel { display: grid; gap: 14px; }
.an-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.an-seg { display: inline-flex; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; padding: 3px; gap: 3px; }
.an-seg button { background: transparent; border: 0; color: var(--muted, #9ba3b0); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; min-height: 36px; transition: background .15s, color .15s; }
.an-seg button.is-active { background: rgba(255, 255, 255, 0.12); color: var(--fg, #f3f5f7); }
.an-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .an-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.an-kpi { padding: 12px 14px; display: grid; gap: 4px; min-width: 0; }
.an-kpi-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.an-kpi-val { font-size: 22px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.an-delta { font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--muted, #9ba3b0); white-space: nowrap; }
.an-delta.up { background: rgba(94, 230, 173, 0.14); color: #5ee6ad; }
.an-delta.down { background: rgba(255, 118, 118, 0.14); color: #ff8a8a; }
.an-chart-card { padding: 14px; display: grid; gap: 10px; }
.an-chart { display: flex; align-items: flex-end; gap: 4px; height: 112px; padding-top: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.an-bar-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.an-bar { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #6ba4ff 0%, #3d7be6 100%); min-height: 2px; transition: height .2s ease; }
.an-bar.is-zero { background: rgba(255, 255, 255, 0.1); min-height: 2px; }
.an-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted, #9ba3b0); }
.an-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .an-split { grid-template-columns: 1fr; } }
.an-src-list { display: grid; gap: 9px; }
.an-src-row { display: grid; gap: 4px; }
.an-src-bar-bg { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.an-src-bar { height: 100%; border-radius: 999px; background: #6ba4ff; }
.an-dev-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.an-dev-mob { background: #5ee6ad; }
.an-dev-desk { background: #6ba4ff; }
/* === Social Posts Log === */
.sp-panel { display: grid; gap: 12px; }
.sp-list { display: grid; gap: 10px; }
.sp-row { padding: 12px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sp-main { display: grid; gap: 6px; min-width: 0; flex: 1 1 auto; }
.sp-title { font-weight: 600; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.sp-metrics { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 2px; }
.sp-elig-wrap { display: grid; gap: 4px; flex: 1 1 220px; max-width: 420px; }
.sp-prog-bg { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.sp-prog-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f5b942 0%, #5ee6ad 100%); }
.sp-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.sp-plat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
@media (max-width: 680px) {
  .sp-row { flex-direction: column; }
  .sp-actions { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}
