/* AI FMIT SCA — ChatGPT-like layout & typography */
body.nexus-auth-sca {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #fff;
}

/* Thanh menu SCA = font + màu guest đăng nhập (link muted, không nút viền) */
body.nexus-auth-sca .nexus-auth-topbar {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body.nexus-auth-sca .nexus-auth-nav > a.nexus-auth-nav-btn:not(.nexus-auth-nav-btn--primary) {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 6px 4px !important;
  font-size: 13px;
  font-weight: 600;
  color: var(--fmit-muted, #64748b) !important;
}
body.nexus-auth-sca .nexus-auth-nav > a.nexus-auth-nav-btn:not(.nexus-auth-nav-btn--primary):hover,
body.nexus-auth-sca .nexus-auth-nav > a.nexus-auth-nav-btn:not(.nexus-auth-nav-btn--primary):focus {
  border: 0;
  background: transparent;
  color: var(--fmit-red, #960000) !important;
}
body.nexus-auth-sca .nexus-auth-nav > a.nexus-auth-nav-btn.is-active:not(.nexus-auth-nav-btn--primary) {
  color: var(--fmit-red, #960000) !important;
  background: transparent;
}

/* Member chat mode: cố định viewport, chỉ vùng chat scroll — flush sát topbar (A) */
html.nexus-sca-html-chat,
body.nexus-auth-sca.nexus-sca-mode-chat {
  height: 100%;
  height: 100svh;
  height: var(--sca-vvh, 100svh);
  overflow: hidden;
}
body.nexus-auth-sca.nexus-sca-mode-chat {
  display: flex;
  flex-direction: column;
  background: #fff;
  position: relative;
}
body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-auth-topbar {
  flex: 0 0 auto;
  margin: 0;
  box-shadow: none;
}
body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-auth-topbar-inner {
  padding-top: 4px;
  padding-bottom: 4px;
  min-height: 48px;
  gap: 10px;
}
/* Flash không đẩy khung chat xuống — overlay dưới topbar */
body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-auth-flash-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(48px + env(safe-area-inset-top, 0px));
  z-index: 1050;
  width: min(960px, calc(100% - 24px));
  margin: 0 !important;
  max-width: none !important;
  pointer-events: none;
}
body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-auth-flash-wrap .nexus-auth-alert {
  pointer-events: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Impersonate banner trên AI FMIT (layout auth) */
body.nexus-auth-sca .nexus-impersonate-bar {
  flex: 0 0 auto;
  z-index: 1100;
}
body.nexus-auth-sca.nexus-sca-mode-chat .nexus-impersonate-bar {
  position: sticky;
  top: 0;
}
@media (max-width: 768px) {
  body.nexus-sca-vv-lock.nexus-impersonating .nexus-impersonate-bar {
    position: fixed;
    top: var(--sca-vv-top, 0px);
    left: var(--sca-vv-left, 0px);
    width: var(--sca-vvw, 100%);
    max-width: var(--sca-vvw, 100%);
    z-index: 1200;
    box-sizing: border-box;
  }
  body.nexus-sca-vv-lock.nexus-impersonating #nexus-sca-app {
    top: calc(var(--sca-vv-top, 0px) + var(--sca-impersonate-h, 48px));
    height: calc(var(--sca-vvh, 100svh) - var(--sca-impersonate-h, 48px));
    max-height: calc(var(--sca-vvh, 100svh) - var(--sca-impersonate-h, 48px));
  }
}

/* Mobile: ghim chat đúng khung nhìn thấy (Samsung / Chrome Android) */
@media (max-width: 768px) {
  html.nexus-sca-vv-lock {
    overflow: hidden;
    height: 100%;
    overscroll-behavior: none;
  }
  html.nexus-sca-vv-lock,
  body.nexus-sca-vv-lock {
    max-width: 100%;
    width: 100%;
  }
  body.nexus-sca-vv-lock {
    overflow: hidden;
    margin: 0;
    padding: 0;
    min-height: 0;
    height: var(--sca-vvh, 100svh);
    touch-action: manipulation;
  }
  body.nexus-sca-vv-lock:not(:has(.nexus-sca-page--marketing)) .nexus-auth-topbar {
    display: none !important;
  }
  body.nexus-sca-vv-lock .nexus-sca-guest-hero {
    display: none;
  }
  body.nexus-sca-vv-lock .nexus-auth-main,
  body.nexus-sca-vv-lock .nexus-auth-page,
  body.nexus-sca-vv-lock .nexus-sca-container,
  body.nexus-sca-vv-lock .nexus-sca-page--minimal {
    flex: none;
    height: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    overflow: visible;
  }
  body.nexus-sca-vv-lock #nexus-sca-app {
    position: fixed;
    z-index: 950;
    left: var(--sca-vv-left, 0px);
    right: auto;
    top: var(--sca-vv-top, 0px);
    width: var(--sca-vvw, 100%);
    max-width: var(--sca-vvw, 100%);
    height: var(--sca-vvh, 100svh);
    max-height: var(--sca-vvh, 100svh);
    min-height: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
    overflow: hidden;
    grid-template-rows: minmax(0, 1fr);
  }
  body.nexus-sca-vv-lock #nexus-sca-app > .nexus-sca-main {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }
  body.nexus-sca-vv-lock #nexus-sca-app .nexus-sca-chat {
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }
  body.nexus-sca-vv-lock.nexus-sca-mode-chat-guest .nexus-sca-marketing--minimal {
    display: none;
  }
  body.nexus-sca-vv-lock .nexus-sca-chat__head {
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-left: calc(12px + env(safe-area-inset-left, 0px));
    padding-right: calc(12px + env(safe-area-inset-right, 0px));
  }
  body.nexus-sca-vv-lock .nexus-sca-composer-wrap {
    /* Foot disclaimer nằm dưới — safe-area để ở foot, tránh cộng đôi */
    padding-bottom: 6px;
  }
  body.nexus-sca-vv-lock .nexus-sca-chat__foot {
    padding: 0 var(--sca-chat-col-pad, 12px) calc(6px + env(safe-area-inset-bottom, 0px));
    font-size: 10px;
    line-height: 1.35;
  }
  body.nexus-sca-vv-lock .nexus-sca-scrolldown {
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  }
}
body.nexus-sca-sidebar-open {
  overflow: hidden;
}
body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-footer {
  display: none;
}
body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none !important;
  padding: 0 !important;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  max-width: none !important;
  width: 100%;
  box-sizing: border-box;
}
body.nexus-auth-sca.nexus-sca-mode-chat .nexus-sca-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box;
}
body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-page > .container,
body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-page--sca > .container {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.nexus-auth-sca.nexus-sca-mode-chat .nexus-sca-page {
  flex: 1;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
body.nexus-auth-sca.nexus-sca-mode-chat .nexus-sca-marketing--hidden {
  display: none;
}

/* Marketing pages — luôn scroll được (kể cả member đăng nhập) */
body.nexus-auth-sca .nexus-sca-page--marketing,
body.nexus-auth-sca.nexus-sca-mode-chat .nexus-sca-page--marketing {
  flex: none;
  min-height: auto;
  height: auto;
  overflow: visible;
  padding: 16px 0 56px;
}
body.nexus-auth-sca.nexus-sca-mode-chat:has(.nexus-sca-page--marketing) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  display: block;
}
html:has(body .nexus-sca-page--marketing) {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}
body.nexus-auth-sca.nexus-sca-mode-chat:has(.nexus-sca-page--marketing) .nexus-auth-main {
  overflow: visible;
  min-height: auto;
  flex: none;
  display: block;
  padding: 12px 0 36px;
}
body.nexus-auth-sca.nexus-sca-mode-chat:has(.nexus-sca-page--marketing) .nexus-auth-footer {
  display: block;
}

/* Guest chat — panel cố định chiều cao, messages scroll; trang vẫn scroll xuống marketing/footer */
.nexus-sca-guest-top {
  padding: 0 16px 12px;
  max-width: 1320px;
}
.nexus-sca-guest-top__title {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 4px;
  color: #1a1a1a;
  font-weight: 600;
}
.nexus-sca-guest-top__lead {
  font-size: 13px;
  line-height: 1.55;
  color: #666;
  margin: 0;
}
.nexus-sca-guest-top__trust {
  font-size: 12.5px;
  line-height: 1.5;
  color: #8b2942;
  margin: 6px 0 0;
  font-weight: 500;
}
/* Guest landing: sát footer — không để rule :not(.mode-chat) / auth center ghi đè */
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-auth-main {
  flex: 0 1 auto !important;
  justify-content: flex-start !important;
  padding: 8px 0 0 !important;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--minimal {
  padding-top: 2px;
  padding-bottom: 0;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--minimal:not(.nexus-sca-page--marketing) .nexus-sca-app {
  margin-bottom: 12px;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-auth-footer {
  padding-top: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
}
.nexus-sca-guest-hero {
  text-align: center;
  padding: 0 16px 6px;
  max-width: 720px;
  margin: 0 auto;
}
.nexus-sca-guest-hero__title {
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.25;
  margin: 0 0 4px;
  color: #1a1a1a;
  font-weight: 700;
}
.nexus-sca-guest-hero__lead {
  font-size: 13px;
  line-height: 1.35;
  color: #666;
  margin: 0;
}
@media (min-width: 769px) {
  .nexus-sca-guest-hero__lead {
    font-size: 12.5px;
    white-space: nowrap;
  }
}
/* Guest landing: intro + FAQ visible (không ẩn clip 1px — Google/user cùng thấy) */
.nexus-sca-guest-intro {
  margin: 8px 0 20px;
  padding: 18px 16px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
}
.nexus-sca-guest-intro .nexus-sca-section-title {
  font-size: 17px;
  margin: 0 0 8px;
  color: #1a1a1a;
}
.nexus-sca-guest-intro p {
  font-size: 14px;
  line-height: 1.65;
  color: #444;
  margin: 0 0 10px;
}
.nexus-sca-guest-intro p:last-child {
  margin-bottom: 0;
}
.nexus-sca-guest-intro a {
  color: #8b2942;
  font-weight: 500;
}
.nexus-sca-marketing--minimal .nexus-sca-steps {
  margin: 8px 0 24px;
}
.nexus-sca-marketing--minimal .nexus-sca-faq {
  margin-top: 8px;
}
/* Situation guest: nội dung SEO dưới chat */
.nexus-sca-situation-body {
  flex-shrink: 0;
  margin: 12px 0 20px;
  padding: 16px 14px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fafafa;
}
.nexus-sca-situation-body > .nexus-sca-section-title {
  font-size: 15px;
  margin: 12px 0 8px;
  color: #1a1a1a;
}
.nexus-sca-situation-body__intro {
  font-size: 14px;
  line-height: 1.65;
  color: #444;
  margin: 0 0 4px;
}
.nexus-sca-situation-body__links {
  margin: 20px auto 8px;
  max-width: 960px;
  padding: 0 16px;
  box-sizing: border-box;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: #666;
}
.nexus-sca-situation-body__links a {
  color: #8b2942;
  font-weight: 500;
  text-decoration: none;
}
.nexus-sca-situation-body__links a:hover {
  text-decoration: underline;
}
.nexus-sca-situation-guest .nexus-sca-faq {
  flex-shrink: 0;
  margin: 0 0 8px;
}
/* Pillar DN */
.nexus-sca-pillar-block {
  margin: 32px 8px 28px;
  max-width: 720px;
}
.nexus-sca-pillar-block--panel {
  padding: 20px 18px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
}
.nexus-sca-pillar-block > .nexus-sca-section-title {
  font-size: 20px;
  margin: 0 0 12px;
  color: #1a1a1a;
}
.nexus-sca-pillar-block > p {
  font-size: 14.5px;
  line-height: 1.7;
  color: #444;
  margin: 0 0 12px;
  max-width: none;
}
.nexus-sca-pillar-block > p:last-child {
  margin-bottom: 0;
}
.nexus-sca-pillar-block#linh-vuc {
  max-width: 980px;
}
.nexus-sca-pillar-lead {
  font-size: 14.5px;
  line-height: 1.6;
  color: #555;
  margin: 0 0 16px;
}
.nexus-sca-about--examples {
  margin: 8px 8px 32px;
  max-width: 980px;
}
.nexus-sca-pillar-more {
  margin: 14px 0 0;
  font-size: 14px;
}
.nexus-sca-pillar-more--center {
  text-align: center;
  margin: 20px 0 0;
}
.nexus-sca-pillar-more a {
  color: #8b2942;
  font-weight: 600;
}
/* Topic grid — thay chip pill lộn xộn */
.nexus-sca-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  list-style: none;
  padding: 0;
}
@media (min-width: 700px) {
  .nexus-sca-topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.nexus-sca-topic-grid__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: #333;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.nexus-sca-topic-grid__item:hover {
  border-color: #d4a0ab;
  box-shadow: 0 2px 8px rgba(139, 41, 66, 0.06);
  color: #8b2942;
}
.nexus-sca-topic-grid__ico {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
}
.nexus-sca-topic-grid__label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.nexus-sca-sit-grid--featured {
  margin: 0;
}
.nexus-sca-audience {
  margin: 8px 8px 32px;
  max-width: 980px;
}
.nexus-sca-audience > .nexus-sca-section-title {
  margin-bottom: 8px;
}
.nexus-sca-audience__lead {
  margin: 0 0 16px;
  max-width: 48rem;
  color: #555;
  font-size: 14.5px;
  line-height: 1.6;
}
.nexus-sca-audience__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.nexus-sca-audience__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
}
.nexus-sca-audience__item > span {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1.2;
}
.nexus-sca-audience__item h3 {
  margin: 0 0 5px;
  color: #1a1a1a;
  font-size: 15px;
  line-height: 1.35;
}
.nexus-sca-audience__item p {
  margin: 0;
  color: #555;
  font-size: 13.5px;
  line-height: 1.55;
}
@media (max-width: 640px) {
  .nexus-sca-audience__grid {
    grid-template-columns: 1fr;
  }
}
.nexus-sca-deploy {
  margin: 8px 8px 32px;
  max-width: 980px;
}
.nexus-sca-deploy__list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  max-width: 720px;
  display: grid;
  gap: 12px;
}
.nexus-sca-deploy__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
}
.nexus-sca-deploy__num {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #8b2942;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.nexus-sca-deploy__item strong {
  display: block;
  font-size: 14.5px;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.nexus-sca-deploy__item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #555;
}
.nexus-sca-benefits .nexus-sca-section-title--center {
  margin-bottom: 18px;
}
/* Situation: H1 dưới chat */
.nexus-sca-situation-body__head {
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ececec;
}
.nexus-sca-situation-body__h1 {
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.3;
  margin: 0 0 4px;
  color: #1a1a1a;
  font-weight: 700;
}
.nexus-sca-situation-body__lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #666;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--minimal:not(.nexus-sca-page--marketing) .nexus-sca-app {
  max-height: min(80vh, 820px);
  min-height: 440px;
  height: min(80vh, 820px);
  border-color: #ececec;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page:not(.nexus-sca-page--marketing) .nexus-sca-app {
  max-height: min(84vh, 920px);
  min-height: 480px;
  height: min(84vh, 920px);
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  grid-template-rows: minmax(0, 1fr);
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-app > .nexus-sca-sidebar,
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-app > .nexus-sca-main {
  min-height: 0;
  max-height: 100%;
  height: 100%;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-situation-guest .nexus-sca-app {
  margin-top: 0;
  flex: 1 1 auto;
  min-height: min(560px, calc(100dvh - 108px));
  height: min(calc(100dvh - 108px), 980px);
  max-height: min(calc(100dvh - 108px), 980px);
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-situation-guest {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 108px);
  gap: 0;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-situation-guest .nexus-sca-breadcrumb--situation {
  flex-shrink: 0;
  margin: 0 0 8px;
  padding: 0;
  font-size: 12px;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page:has(.nexus-sca-situation-guest) {
  padding: 8px 0 20px;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page:has(.nexus-sca-situation-guest) .nexus-sca-container {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 108px);
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-main {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-chat {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-sidebar {
  max-height: 100%;
  overflow-y: auto;
}

body.nexus-auth-sca .nexus-sca-chat,
body.nexus-auth-sca .nexus-sca-main,
body.nexus-auth-sca .nexus-sca-sidebar {
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
}

/* Topbar SCA — full 2 bên mọi trang (landing, tình huống, gói, …) */
body.nexus-auth-sca .nexus-auth-topbar .container {
  max-width: none !important;
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}
body.nexus-auth-sca .nexus-auth-footer .container {
  max-width: 1320px !important;
  width: 100%;
}
body.nexus-auth-sca .nexus-auth-page > .container,
body.nexus-auth-sca .nexus-auth-page--sca > .container,
body.nexus-auth-sca .nexus-sca-container {
  max-width: 1320px !important;
  width: 100%;
  min-width: 0;
  overflow-x: clip;
  box-sizing: border-box;
}
/* Member marketing / non-chat SCA only — không áp guest chat (landing) */
body.nexus-auth-sca:not(.nexus-sca-mode-chat):not(.nexus-sca-mode-chat-guest) .nexus-auth-main {
  padding: 12px 0 36px;
}
.nexus-auth-sca .nexus-auth-main { max-width: none; }
.nexus-sca-container { max-width: 1320px; width: 100%; }
.nexus-sca-page { padding: 16px 0 48px; }

/* App shell — cột sidebar có thể animate mượt */
@property --sca-sidebar-w {
  syntax: '<length>';
  initial-value: 248px;
  inherits: false;
}
.nexus-sca-app {
  display: grid;
  --sca-sidebar-w: 248px;
  grid-template-columns: var(--sca-sidebar-w) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  position: relative;
  min-height: calc(100vh - 112px);
  transition: --sca-sidebar-w .3s cubic-bezier(.4, 0, .2, 1), grid-template-columns .3s cubic-bezier(.4, 0, .2, 1);
}
body.nexus-sca-mode-chat .nexus-sca-app {
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
}

/* Desktop chat + share — topbar full viewport (đồng bộ) */
@media (min-width: 1025px) {
  body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-auth-topbar .container,
  body.nexus-auth-sca:has(.nexus-sca-page--share) .nexus-auth-topbar .container {
    max-width: none !important;
    padding-left: 16px;
    padding-right: 16px;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-page--minimal {
    padding: 0;
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-app {
    width: 100%;
    max-width: none;
    min-height: 0;
    height: 100%;
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat {
    width: 100%;
    max-width: none;
    --sca-chat-col-pad: 14px;
    /* Desktop/laptop: ~97% panel, sàn 44rem, cap 90rem — thoải hơn cột hẹp cũ */
    --sca-chat-col-max: min(90rem, max(44rem, calc((100% - 2 * var(--sca-chat-col-pad)) * 0.97)));
    /* Chỉ khung nhập (+ disclaimer): hẹp hơn cột tin, căn giữa */
    --sca-composer-max: min(68rem, calc((100% - 2 * var(--sca-chat-col-pad)) * 0.82));
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-app.is-sidebar-collapsed .nexus-sca-chat {
    --sca-chat-col-max: min(94rem, max(44rem, calc((100% - 2 * var(--sca-chat-col-pad)) * 0.98)));
    --sca-composer-max: min(72rem, calc((100% - 2 * var(--sca-chat-col-pad)) * 0.84));
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat__head {
    width: 100%;
    /* A: cắt thanh brand — toolbar nổi, không chiếm hàng full */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 16;
    /* Phải khớp padding topbar (16px) — Xuất căn bằng margin riêng */
    padding: 8px 16px 8px 10px;
    border-bottom: none;
    background: transparent;
    box-sizing: border-box;
    pointer-events: none;
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat__head-left,
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat__head-right {
    pointer-events: auto;
  }
  /* Căn trái nút Xuất ≈ chữ N của «NEXUS HUB» (avatar 36 + gap 12 + nút HUB ~108 − bề rộng Xuất ~68) */
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat__export-wrap {
    margin-right: calc(36px + 12px + 108px - 68px - 14px);
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat__brand-mark {
    display: none !important;
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat__sidebar-btn {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat__export-btn {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  }
  /* Tin nhắn / starters: cột rộng panel; ô nhập + disclaimer hẹp hơn, căn giữa */
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-msg__wrap,
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat__starters {
    max-width: var(--sca-chat-col-max);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-composer-wrap,
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat__foot {
    max-width: var(--sca-composer-max, 68rem);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat__messages {
    width: 100%;
    max-width: none;
    padding-top: 44px;
  }
  /* Sticky báo cáo: kéo vào vùng padding-top 44px — sát topbar, không để khoảng trắng */
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-decision__cluster {
    top: -44px;
    z-index: 12;
  }
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-scrolldown {
    right: max(16px, calc((100% - var(--sca-chat-col-max)) / 2 + 8px));
  }
}

/* Shell chat member — luôn full width panel (tránh co như container 1320px) */
@media (min-width: 1025px) {
  body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-auth-main,
  body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-auth-page,
  body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-container,
  body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) #nexus-sca-app,
  body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-main,
  body.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-sca-chat {
    width: 100%;
    max-width: none;
  }
}

/* Guest desktop — đồng bộ UX trong khung chat (không full-bleed như member) */
@media (min-width: 1025px) {
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page:not(.nexus-sca-page--marketing) .nexus-sca-app {
    width: 100%;
    max-width: none;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-chat {
    --sca-chat-col-pad: 14px;
    --sca-chat-col-max: min(80rem, max(40rem, calc((100% - 2 * var(--sca-chat-col-pad)) * 0.96)));
    --sca-composer-max: min(68rem, calc((100% - 2 * var(--sca-chat-col-pad)) * 0.82));
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-app.is-sidebar-collapsed .nexus-sca-chat {
    --sca-chat-col-max: min(84rem, max(40rem, calc((100% - 2 * var(--sca-chat-col-pad)) * 0.97)));
    --sca-composer-max: min(72rem, calc((100% - 2 * var(--sca-chat-col-pad)) * 0.84));
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-chat__head {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 16;
    padding: 8px 16px 8px 10px;
    border-bottom: none;
    background: transparent;
    pointer-events: none;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-chat__head-left,
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-chat__head-right {
    pointer-events: auto;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-chat__brand-mark {
    display: none !important;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-chat__messages {
    padding-top: 44px;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-decision__cluster {
    top: -44px;
    z-index: 12;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-msg__wrap,
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-chat__starters {
    max-width: var(--sca-chat-col-max);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-composer-wrap,
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-chat__foot {
    max-width: var(--sca-composer-max, 68rem);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Mobile menu — trong header chat (ChatGPT style) */
.nexus-sca-chat__menu-btn {
  display: none;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-right: 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  align-items: center;
  justify-content: center;
}
.nexus-sca-chat__menu-btn:hover { background: #f0f0f0; }

.nexus-sca-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(0,0,0,.35);
}
.nexus-sca-sidebar-backdrop.is-open { display: block; }

.nexus-sca-sidebar {
  background: #fff;
  border-right: 1px solid #ececec;
  padding: 14px 12px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: opacity .3s cubic-bezier(.4, 0, .2, 1), padding .3s cubic-bezier(.4, 0, .2, 1), border-color .3s cubic-bezier(.4, 0, .2, 1);
}
body.nexus-sca-mode-chat .nexus-sca-sidebar {
  max-height: none;
  height: 100%;
}
.nexus-ui-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}
.nexus-ui-icon--sidebar { width: 16px; height: 16px; color: #960000; }
.nexus-ui-icon--nav { width: 15px; height: 15px; color: #960000; }
.nexus-ui-icon--chev { width: 14px; height: 14px; color: #bbb; }
.nexus-ui-icon--empty { width: 22px; height: 22px; color: #ccc; }
.nexus-ui-icon--settings { width: 16px; height: 16px; color: #888; }

.nexus-sca-sidebar__head {
  display: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 2px;
}
.nexus-sca-sidebar__brand,
.nexus-sca-sidebar__brand--desk {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.nexus-sca-sidebar__brand--desk { display: none; }
.nexus-sca-sidebar__brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.nexus-sca-sidebar__brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
  flex: 1;
}
.nexus-sca-sidebar__brand-text strong {
  font-size: 15px;
  color: #960000;
  letter-spacing: .01em;
}
.nexus-sca-sidebar__brand-text span {
  font-size: 11px;
  color: #777;
}
.nexus-sca-sidebar__close {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fafafa;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nexus-sca-sidebar__close:hover { background: #f0f0f0; }

.nexus-sca-sidebar__top { margin-bottom: 4px; }
.nexus-sca-sidebar-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #1a1a1a;
  font-size: 13px;
  line-height: 1.3;
  padding: 7px 10px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  margin-top: 6px;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.nexus-sca-sidebar-action:first-child { margin-top: 0; }
.nexus-sca-sidebar-action:hover {
  background: #fafafa;
  text-decoration: none;
  color: #1a1a1a;
}
.nexus-sca-sidebar-action--plans.is-active,
.nexus-sca-sidebar-action--plans:hover {
  border-color: #e5bcbc;
  background: #fff7f7;
  box-shadow: inset 0 0 0 1px rgba(150, 0, 0, .06);
}
.nexus-sca-sidebar-action--plans.is-active .nexus-sca-sidebar-action__body strong,
.nexus-sca-sidebar-action--plans.is-active .nexus-sca-sidebar-action__body .nexus-sca-sidebar-action__hint {
  color: #960000;
}
.nexus-sca-sidebar-action--plans.is-active .nexus-ui-icon--chev { color: #c07070; }
.nexus-sca-sidebar-action__icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff3f3;
}
.nexus-sca-sidebar-action__icon--plus { background: #fff3f3; }
.nexus-sca-sidebar-action__icon--plans { background: #fff3f3; }
.nexus-sca-sidebar-action__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.nexus-sca-sidebar-action__body strong {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.25;
}
.nexus-sca-sidebar-action__body .nexus-sca-sidebar-action__hint {
  font-size: 11px;
  color: #888;
  line-height: 1.3;
  text-wrap: balance;
}
/* Quota dưới «Gói & hạn mức» — luôn hiện (desktop từng ẩn hint chung). */
.nexus-sca-sidebar-action__body .nexus-sca-sidebar-action__hint--quota {
  display: block;
  font-weight: 500;
  color: #6b6b75;
  white-space: nowrap;
}
.nexus-sca-sidebar-action__body .nexus-sca-sidebar-action__hint--quota.is-low {
  color: #a34a16;
  font-weight: 600;
}
.nexus-sca-sidebar-action__body .nexus-sca-sidebar-action__hint--quota.is-empty {
  color: #9b1c2e;
  font-weight: 600;
}
.nexus-sca-sidebar-action--plans.is-active .nexus-sca-sidebar-action__body .nexus-sca-sidebar-action__hint--quota {
  color: #960000;
}
.nexus-sca-sidebar-action--plans.is-active .nexus-sca-sidebar-action__body .nexus-sca-sidebar-action__hint--quota.is-low {
  color: #a34a16;
}
.nexus-sca-sidebar-action--plans.is-active .nexus-sca-sidebar-action__body .nexus-sca-sidebar-action__hint--quota.is-empty {
  color: #9b1c2e;
}
@media (min-width: 1025px) {
  .nexus-sca-sidebar-action__body .nexus-sca-sidebar-action__hint:not(.nexus-sca-sidebar-action__hint--quota) {
    display: none;
  }
}
.nexus-sca-sidebar-action__chev {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}
/* Nút ẩn / hiện thanh bên trong header chat (desktop) */
.nexus-sca-chat__sidebar-btn {
  display: none;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin-right: 6px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  color: #555;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.nexus-sca-chat__sidebar-btn:hover { background: #f0f0f0; color: #1a1a1a; }
.nexus-sca-chat__sidebar-btn:not([hidden]) { display: inline-flex; }
/* Trạng thái thu gọn sidebar (desktop) */
.nexus-sca-app.is-sidebar-collapsed {
  --sca-sidebar-w: 0px;
  grid-template-columns: var(--sca-sidebar-w) minmax(0, 1fr);
}
body.nexus-sca-mode-chat .nexus-sca-app.is-sidebar-collapsed {
  --sca-sidebar-w: 0px;
  grid-template-columns: var(--sca-sidebar-w) minmax(0, 1fr);
}
.nexus-sca-app.is-sidebar-collapsed > .nexus-sca-sidebar {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  padding-left: 0;
  padding-right: 0;
  border-right-color: transparent;
  min-width: 0;
}
.nexus-sca-guest-note,
.nexus-sca-member-quota {
  font-size: 12px;
  line-height: 1.5;
  color: #666;
  margin: 10px 0 0;
}
.nexus-sca-member-quota { color: #555; font-weight: 500; }
.nexus-sca-quota-reset { display: block; font-weight: 400; color: #888; margin-top: 4px; }
.nexus-sca-quota-extend { font-size: 11px; margin: 6px 0 0; line-height: 1.4; }
.nexus-sca-quota-extend a { color: #8b2942; }

.nexus-sca-sidebar__block { margin-top: 14px; padding-top: 12px; border-top: 1px solid #ececec; }
.nexus-sca-sidebar__title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #8e8e8e;
  margin: 0 0 6px;
  padding: 0 8px;
}
.nexus-sca-session-list { list-style: none; padding: 0; margin: 0; }
.nexus-sca-session-load-more {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nexus-sca-session-load-more:hover {
  background: #f5f5f5;
  color: #960000;
}
.nexus-sca-session-load-more:disabled {
  opacity: .55;
  cursor: wait;
}
.nexus-sca-session-load-more[hidden] { display: none !important; }
.nexus-sca-session-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 1px;
}
.nexus-sca-session-item {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  padding: 7px 6px;
  border-radius: 8px;
  cursor: pointer;
}
.nexus-sca-session-menu {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: #666;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: background .15s, opacity .15s, flex-basis .12s ease, width .12s ease;
}
.nexus-sca-session-menu:hover,
.nexus-sca-session-row.is-menu-open .nexus-sca-session-menu { background: #e4e4e4; }
/* Desktop: ⋯ chiếm 0px → title full; hover mới nhường chỗ (ChatGPT) */
@media (min-width: 769px) {
  .nexus-sca-session-row { gap: 0; }
  .nexus-sca-session-menu {
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
  }
  .nexus-sca-session-row:hover .nexus-sca-session-menu,
  .nexus-sca-session-row:focus-within .nexus-sca-session-menu,
  .nexus-sca-session-row.is-menu-open .nexus-sca-session-menu {
    flex: 0 0 22px;
    width: 22px;
    min-width: 22px;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
  }
}
.nexus-sca-session-dropdown {
  position: absolute;
  top: 100%;
  right: 4px;
  z-index: 20;
  min-width: 120px;
  padding: 4px 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.nexus-sca-session-delete {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 14px;
  font-size: 13px;
  color: #c0392b;
  cursor: pointer;
}
.nexus-sca-session-rename,
.nexus-sca-session-pin,
.nexus-sca-session-guest-delete {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 14px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}
.nexus-sca-session-rename:hover,
.nexus-sca-session-pin:hover { background: #f5f5f5; }
.nexus-sca-session-delete,
.nexus-sca-session-guest-delete {
  border-top: 1px solid #eee;
  margin-top: 4px;
  padding-top: 10px;
}
.nexus-sca-session-delete:hover,
.nexus-sca-session-guest-delete:hover { background: #fef2f2; }
.nexus-sca-session-item__pin {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1;
}
.nexus-sca-guest-chats-empty,
.nexus-sca-session-empty {
  font-size: 12px;
  color: #999;
  padding: 2px 8px 0;
  margin: 0;
  line-height: 1.45;
  list-style: none;
}
.nexus-sca-session-item:hover,
.nexus-sca-session-item.is-active { background: #ececec; }
.nexus-sca-session-item__title {
  display: block;
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.3;
  color: #0d0d0d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* ChatGPT-style: chỉ 1 dòng tên — ẩn preview snippet */
.nexus-sca-session-item__preview {
  display: none !important;
}
.nexus-sca-session-row--pending .nexus-sca-session-item__title {
  color: #888;
  font-style: italic;
}
.nexus-sca-session-row--fresh {
  animation: nexus-sca-session-in 0.35s ease-out;
}
@keyframes nexus-sca-session-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.nexus-sca-sit-nav,
.nexus-sca-quick-links { list-style: none; padding: 0; margin: 0; }
.nexus-sca-sit-nav__link,
.nexus-sca-quick-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  border-radius: 10px;
}
.nexus-sca-nav-icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff3f3;
}
.nexus-sca-nav-icon--sit { background: #fff3f3; }
.nexus-sca-nav-icon--search { background: #eef5ff; }
.nexus-sca-nav-icon--pathway { background: #fff8eb; }
.nexus-sca-nav-icon--trial { background: #eef7ff; }
.nexus-sca-nav-icon--plans { background: #fff3f3; }
.nexus-sca-nav-icon--library { background: #f4f0ff; }
.nexus-sca-nav-icon--enterprise { background: #edf7ef; }
.nexus-sca-nav-icon--register { background: #fff3f3; }
.nexus-sca-nav-label { flex: 1; min-width: 0; line-height: 1.35; }
.nexus-sca-nav-arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  opacity: .85;
}
.nexus-sca-sit-nav__link:hover,
.nexus-sca-quick-links a:hover { background: #f5f5f5; text-decoration: none; color: #333; }
.nexus-sca-sit-nav__link.is-active,
.nexus-sca-quick-links a.is-active {
  background: #fff5f5;
  font-weight: 600;
  color: #1a1a1a;
}
.nexus-sca-sit-nav__more {
  display: block;
  padding: 10px 8px 4px 48px;
  font-size: 13px;
  font-weight: 600;
  color: #960000;
  text-decoration: none;
}
.nexus-sca-sit-nav__more:hover { text-decoration: none; color: #7a0000; }

.nexus-sca-main {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
}
body.nexus-sca-mode-chat .nexus-sca-main {
  height: 100%;
  flex: 1;
  width: 100%;
}

/* Hero — guest only */
.nexus-sca-hero { text-align: left; margin: 0 0 14px; padding: 0 16px; }
.nexus-sca-hero--compact h1 { font-size: 20px; margin: 0 0 4px; }
.nexus-sca-app--member .nexus-sca-hero { display: none; }
.nexus-sca-kicker { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #666; margin: 0 0 6px; }
.nexus-sca-hero h1 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; color: #1a1a1a; }
.nexus-sca-lead { font-size: 14px; line-height: 1.6; color: #555; margin: 0; }

/* Chat panel — cột co theo panel (desktop/laptop/tablet override bên dưới) */
.nexus-sca-chat {
  --sca-chat-col-pad: 14px;
  --sca-chat-col-max: calc(100% - 2 * var(--sca-chat-col-pad));
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  position: relative;
}
/* Nút cuộn xuống cuối — z-index trên composer (35) để không bị che trên iOS */
.nexus-sca-scrolldown {
  position: absolute;
  right: 18px;
  bottom: 96px;
  z-index: 40;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e2e2e2;
  background: #fff;
  color: #333;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease, background .15s;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.nexus-sca-scrolldown[hidden] {
  display: none !important;
}
.nexus-sca-scrolldown.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nexus-sca-scrolldown:hover { background: #f5f5f5; }
body.nexus-sca-mode-chat .nexus-sca-chat {
  min-height: 0;
  width: 100%;
}
.nexus-sca-chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid #ececec;
  background: #fff;
  flex-shrink: 0;
}
.nexus-sca-chat__head-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nexus-sca-chat__head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}
/* Avatar tài khoản — chỉ hiện trên mobile chat (topbar bị ẩn) */
.nexus-sca-chat__user {
  display: none;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  gap: 0;
}
.nexus-sca-chat__user-toggle {
  display: inline-flex !important;
}
.nexus-sca-chat__user .nexus-auth-user-avatar {
  width: 32px;
  height: 32px;
  font-size: 11px;
}
.nexus-sca-chat__user-menu {
  right: 0;
  left: auto;
  min-width: 220px;
  z-index: 40;
}
.nexus-sca-chat__export-wrap { position: relative; flex-shrink: 0; }
.nexus-sca-chat__export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  min-height: 28px;
  height: 28px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #fff;
  color: #1a1a1a;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  padding: 0 10px 0 12px;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.nexus-sca-chat__export-btn__label { letter-spacing: .01em; }
.nexus-sca-chat__export-btn__chev {
  font-size: 8px;
  line-height: 1;
  color: #666;
  transform: translateY(0.5px);
}
.nexus-sca-chat__export-btn:hover:not(:disabled) {
  background: #f5f5f5;
  color: #1a1a1a;
  border-color: #d4d4d4;
}
.nexus-sca-chat__export-btn:disabled { opacity: .4; cursor: not-allowed; }
.nexus-sca-chat__export-btn[aria-expanded="true"] {
  background: #f0f0f0;
  border-color: #ccc;
}
.nexus-sca-chat__export-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 232px;
  padding: 6px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.nexus-sca-chat__export-sep {
  height: 1px;
  margin: 5px 6px;
  background: #ececec;
}
.nexus-sca-chat__export-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #333;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.nexus-sca-chat__export-ico {
  flex: 0 0 1.25em;
  width: 1.25em;
  text-align: center;
  font-size: 14px;
  line-height: 1;
}
.nexus-sca-chat__export-label { min-width: 0; }
.nexus-sca-chat__export-item:hover { background: #f5f5f5; }
.nexus-sca-chat__head-left strong {
  font-size: 15px;
  color: var(--fmit-red, #960000);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nexus-sca-chat__member-tag {
  display: none !important; /* bỏ badge «Đã đăng nhập» — thừa khi đã có avatar topbar/chat */
  font-size: 11px;
  background: #f0f0f0;
  color: #555;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.nexus-sca-chat__learn-chip {
  font-size: 11px;
  font-weight: 600;
  color: #1a365d;
  background: #eef2ff;
  border: 1px solid #dbe3f5;
  padding: 2px 10px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nexus-sca-chat__learn-chip:hover,
.nexus-sca-chat__learn-chip:focus {
  background: #e2e8f8;
  color: #0f274d;
  text-decoration: none;
}
.nexus-sca-chat__learn-chip--muted {
  color: #64748b;
  background: #f8fafc;
  border-color: #e2e8f0;
  font-weight: 500;
}
.nexus-sca-chat__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #10a37f;
}
.nexus-sca-chat__quota { font-size: 12px; color: #888; white-space: nowrap; display: block; }
.nexus-sca-chat__quota-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}
.nexus-sca-chat__quota-bar {
  display: block;
  width: 72px;
  height: 4px;
  border-radius: 2px;
  background: #ececec;
  overflow: hidden;
}
.nexus-sca-chat__quota-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: #10a37f;
  border-radius: 2px;
  transition: width .25s ease;
}
.nexus-sca-chat__quota-bar--low span { background: #c45c26; }
.nexus-sca-quota-banner {
  margin: 0;
  padding: 8px 16px;
  font-size: 12px;
  line-height: 1.45;
  color: #7d4e00;
  background: #fff8e6;
  border-top: 1px solid #f0e4c8;
  text-align: center;
  flex-shrink: 0;
}
.nexus-sca-quota-banner a { color: #8b2942; font-weight: 500; }
.nexus-sca-quota-reset { display: block; margin-top: 6px; font-size: 12px; color: #888; }

/* Chỉ vùng messages scroll */
.nexus-sca-chat__messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  padding: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #b8b8b8 #f3f3f3;
}
.nexus-sca-chat__messages::-webkit-scrollbar {
  width: 11px;
}
.nexus-sca-chat__messages::-webkit-scrollbar-track {
  background: #f3f3f3;
  border-left: 1px solid #ececec;
}
.nexus-sca-chat__messages::-webkit-scrollbar-thumb {
  background: #c2c2c2;
  border-radius: 6px;
  border: 2px solid #f3f3f3;
  min-height: 48px;
}
.nexus-sca-chat__messages::-webkit-scrollbar-thumb:hover {
  background: #9a9a9a;
}
.nexus-sca-chat__messages::-webkit-scrollbar-thumb:active {
  background: #7a7a7a;
}

/* Message rows — full width alternating */
@keyframes nexusScaMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.nexus-sca-msg {
  display: block;
  width: 100%;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  animation: nexusScaMsgIn .18s ease;
}
.nexus-sca-no-anim .nexus-sca-msg { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .nexus-sca-msg { animation: none; }
  .nexus-sca-app,
  .nexus-sca-sidebar,
  .nexus-sca-scrolldown { transition: none; }
}
.nexus-sca-msg--user {
  background: transparent;
  padding: 4px 0;
}
.nexus-sca-msg--bot {
  background: #fff;
}
@media (min-width: 769px) and (max-width: 1024px) {
  .nexus-sca-chat {
    --sca-chat-col-pad: 12px;
    /* Tablet / laptop nhỏ: gần full panel, vẫn giữ sàn đọc */
    --sca-chat-col-max: min(72rem, max(36rem, calc((100% - 2 * var(--sca-chat-col-pad)) * 0.96)));
    --sca-composer-max: min(64rem, calc((100% - 2 * var(--sca-chat-col-pad)) * 0.86));
  }
  .nexus-sca-composer-wrap,
  .nexus-sca-chat__foot {
    max-width: var(--sca-composer-max, 64rem);
    margin-left: auto;
    margin-right: auto;
  }
}

.nexus-sca-msg--user .nexus-sca-msg__wrap {
  display: flex;
  justify-content: flex-end;
}
.nexus-sca-msg__wrap {
  max-width: var(--sca-chat-col-max, 48rem);
  margin: 0 auto;
  padding: 0 var(--sca-chat-col-pad, 16px);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.nexus-sca-msg__body {
  padding: 0;
  border-radius: 0;
  font-size: 15px;
  line-height: 1.55;
  word-wrap: break-word;
  font-family: inherit, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  color: #0d0d0d;
  background: transparent;
}
.nexus-sca-msg--user .nexus-sca-msg__body {
  max-width: min(85%, 42rem);
  width: fit-content;
  padding: 8px 14px;
  border-radius: 18px;
  background: #f4f4f4;
  color: #0d0d0d;
  line-height: 1.4;
  font-size: 15px;
}
/* Markdown trong bubble user — bỏ margin đoạn để không «phình» chiều cao */
.nexus-sca-msg--user .nexus-sca-msg__body > .nexus-sca-md-p,
.nexus-sca-msg--user .nexus-sca-msg__body .nexus-sca-md-p {
  margin: 0;
}
.nexus-sca-msg--user .nexus-sca-msg__body .nexus-sca-md-p + .nexus-sca-md-p {
  margin-top: 0.35em;
}
.nexus-sca-msg--bot .nexus-sca-msg__body {
  color: #0d0d0d;
  font-size: 14.5px;
  line-height: 1.58;
}
.nexus-sca-msg__wrap--tts-reading .nexus-sca-msg__body {
  opacity: 0.72;
  transition: opacity 0.2s ease;
}
.nexus-sca-tts-readalong {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.14);
}
.nexus-sca-tts-readalong__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 8px;
}
.nexus-sca-tts-readalong__scroll {
  max-height: 140px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nexus-sca-tts-seg {
  margin: 0 0 8px;
  padding: 6px 8px 6px 10px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #374151;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.nexus-sca-tts-seg:last-child {
  margin-bottom: 0;
}
.nexus-sca-tts-seg.is-active {
  background: rgba(37, 99, 235, 0.12);
  border-left-color: #2563eb;
  color: #0d0d0d;
  font-weight: 500;
}
.nexus-sca-msg--intro .nexus-sca-msg__body,
.nexus-sca-msg--intro .nexus-sca-msg__body .nexus-sca-md-p {
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.45;
  color: #1a1a1a;
}
/* Intro hero — icon bubble + lời chào (desktop + mobile) */
.nexus-sca-msg--intro {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
  min-height: 0;
}
.nexus-sca-msg--intro .nexus-sca-msg__wrap {
  width: 100%;
  max-width: 100%;
  padding: 0 var(--sca-chat-col-pad, 20px);
}
.nexus-sca-intro-hero {
  text-align: center;
  max-width: 340px;
  margin: 0 auto;
  padding: 20px 8px 28px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nexus-sca-intro-hero:focus {
  outline: 2px solid rgba(179, 36, 60, .35);
  outline-offset: 4px;
  border-radius: 8px;
}
.nexus-sca-intro-hero__bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 74px;
  height: 58px;
  margin: 0 auto 22px;
  background: #fff;
  border: 3px solid #b3243c;
  border-radius: 20px;
}
.nexus-sca-intro-hero__bubble::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: -11px;
  width: 15px;
  height: 15px;
  background: #fff;
  border-right: 3px solid #b3243c;
  border-bottom: 3px solid #b3243c;
  border-bottom-right-radius: 4px;
  transform: skewX(-12deg) rotate(20deg);
}
.nexus-sca-intro-hero__bubble span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b3243c;
}
.nexus-sca-intro-hero__hi {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  font-style: normal;
  line-height: 1.3;
  color: #1a1a1a;
}
.nexus-sca-intro-hero__challenge {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  font-style: normal;
  line-height: 1.5;
  color: #1a1a1a;
}
.nexus-sca-page--minimal .nexus-sca-chat__starters,
.nexus-sca-page--minimal .nexus-sca-starter {
  display: none !important;
}
.nexus-sca-msg__body h2,
.nexus-sca-msg__body h3,
.nexus-sca-msg__body h4,
.nexus-sca-msg__body h5,
.nexus-sca-msg__body .nexus-sca-md-h2,
.nexus-sca-msg__body .nexus-sca-md-h3,
.nexus-sca-msg__body .nexus-sca-md-h4,
.nexus-sca-msg__body .nexus-sca-md-h5 {
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}
.nexus-sca-msg__body h2,
.nexus-sca-msg__body .nexus-sca-md-h2 {
  font-size: 17px;
  margin: 12px 0 6px;
}
.nexus-sca-msg__body h3,
.nexus-sca-msg__body .nexus-sca-md-h3 {
  font-size: 16px;
  margin: 10px 0 5px;
}
.nexus-sca-msg__body h4,
.nexus-sca-msg__body .nexus-sca-md-h4 {
  font-size: 15px;
  margin: 10px 0 4px;
  padding-left: 10px;
  border-left: 3px solid #e0e0e0;
}
.nexus-sca-msg__body h5,
.nexus-sca-msg__body .nexus-sca-md-h5 {
  font-size: 14px;
  margin: 8px 0 3px;
  color: #333;
}
.nexus-sca-msg__body h2:first-child,
.nexus-sca-msg__body h3:first-child,
.nexus-sca-msg__body h4:first-child,
.nexus-sca-msg__body h5:first-child,
.nexus-sca-msg__body .nexus-sca-md-h2:first-child,
.nexus-sca-msg__body .nexus-sca-md-h3:first-child,
.nexus-sca-msg__body .nexus-sca-md-h4:first-child,
.nexus-sca-msg__body .nexus-sca-md-h5:first-child { margin-top: 0; }
.nexus-sca-msg__body ul,
.nexus-sca-msg__body ol,
.nexus-sca-msg__body .nexus-sca-md-ul,
.nexus-sca-msg__body .nexus-sca-md-ol {
  margin: 4px 0;
  padding: 0 0 0 20px;
}
.nexus-sca-msg__body ul,
.nexus-sca-msg__body .nexus-sca-md-ul { list-style: none; }
.nexus-sca-msg__body ol,
.nexus-sca-msg__body .nexus-sca-md-ol { list-style: decimal; }
.nexus-sca-msg__body li { margin-bottom: 2px; }
.nexus-sca-msg__body li:last-child { margin-bottom: 0; }
.nexus-sca-msg__body li > strong:first-child { color: #1a1a1a; }
.nexus-sca-msg__body .nexus-sca-md-p { margin: 6px 0; }
.nexus-sca-msg__body .nexus-sca-md-p:first-child { margin-top: 0; }
.nexus-sca-msg__body .nexus-sca-md-p:last-child { margin-bottom: 0; }
.nexus-sca-msg__body .nexus-sca-md-code {
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #1a1a1a;
  font-family: "Segoe UI", Arial, sans-serif;
  font-style: normal;
}
.nexus-sca-msg__body code.nexus-sca-md-code {
  color: #1a1a1a;
  background: #f3f4f6;
}
/* KaTeX trong bubble chat / share */
.nexus-sca-msg__body .katex,
.nexus-sca-share-msgs .katex {
  font-size: 1.05em;
  color: #1a1a1a;
}
.nexus-sca-msg__body .katex-display,
.nexus-sca-share-msgs .katex-display {
  margin: 10px 0;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
/* Không để chữ đỏ raw LaTeX (.katex-error) — JS đã fallback; lan can CSS thêm */
.nexus-sca-msg__body .katex-error,
.nexus-sca-share-msgs .katex-error {
  color: #1a1a1a !important;
  background: transparent !important;
  border: none !important;
  font-family: inherit !important;
  font-size: inherit !important;
}
.nexus-sca-msg__body .nexus-sca-md-math--display,
.nexus-sca-share-msgs .nexus-sca-md-math--display {
  display: block;
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.nexus-sca-msg__body .nexus-sca-md-math--fallback,
.nexus-sca-share-msgs .nexus-sca-md-math--fallback {
  color: #1a1a1a;
  background: transparent;
  padding: 0;
  white-space: normal;
}
.nexus-sca-msg__body .nexus-sca-md-hr,
.nexus-sca-msg__body hr {
  margin: 8px 0;
  border: none;
  border-top: 1px solid #e8e8e8;
  height: 0;
}
.nexus-sca-msg__body a { text-decoration: underline; color: #0969da; }
.nexus-sca-msg--user .nexus-sca-msg__body a { color: #0969da; }
/* Bảng markdown trong chat */
.nexus-sca-msg__body .nexus-sca-md-table-wrap {
  margin: 10px 0;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  position: relative;
}
.nexus-sca-msg__body .nexus-sca-md-table-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px 4px 10px;
  border-bottom: 1px solid #eaecef;
  background: #f7f7f8;
}
.nexus-sca-msg__body .nexus-sca-md-table-bar__hint {
  font-size: 11px;
  color: #6b7280;
  letter-spacing: 0.02em;
}
.nexus-sca-msg__body .nexus-sca-md-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nexus-sca-msg__body .nexus-sca-md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.5;
}
.nexus-sca-msg__body .nexus-sca-md-table th,
.nexus-sca-msg__body .nexus-sca-md-table td {
  border: 1px solid #ececec;
  padding: 7px 11px;
  text-align: left;
  vertical-align: top;
}
.nexus-sca-msg__body .nexus-sca-md-table thead th {
  background: #f7f7f8;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
}
.nexus-sca-msg__body .nexus-sca-md-table tbody tr:nth-child(even) { background: #fafafa; }
.nexus-sca-msg__body .nexus-sca-md-table__copy {
  flex-shrink: 0;
}
/* Code block */
.nexus-sca-msg__body .nexus-sca-codeblock {
  margin: 10px 0;
  border: 1px solid #eaecef;
  border-radius: 8px;
  overflow: hidden;
  background: #f6f8fa;
}
.nexus-sca-msg__body .nexus-sca-codeblock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid #eaecef;
  background: #eef1f4;
}
.nexus-sca-msg__body .nexus-sca-codeblock__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
  margin-left: auto;
}
.nexus-sca-msg__body .nexus-sca-codeblock__lang {
  font-size: 11px;
  color: #6b7280;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.nexus-sca-msg__body .nexus-sca-codeblock__copy {
  border: none;
  background: transparent;
  color: #374151;
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.nexus-sca-msg__body .nexus-sca-codeblock__copy--primary {
  font-weight: 600;
  color: #1a1a1a;
}
.nexus-sca-msg__body .nexus-sca-codeblock__copy--muted {
  color: #6b7280;
  font-size: 11px;
}
.nexus-sca-msg__body .nexus-sca-codeblock__copy:hover {
  background: #e5e7eb;
}
.nexus-sca-msg__body .nexus-sca-codeblock__copy.is-copied {
  color: #059669;
}
.nexus-sca-msg__body .nexus-sca-codeblock .nexus-sca-md-pre {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.nexus-sca-msg__body .nexus-sca-md-pre {
  margin: 10px 0;
  padding: 12px 14px;
  background: #f6f8fa;
  border: 1px solid #eaecef;
  border-radius: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nexus-sca-msg__body .nexus-sca-md-pre code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: #24292f;
  background: none;
  padding: 0;
  white-space: pre;
}
.nexus-sca-msg__body .nexus-sca-md-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border-radius: 8px;
}
.nexus-sca-msg__body .nexus-sca-mermaid {
  margin: 0;
  overflow: auto;
  padding: 12px 14px 16px;
  background: #fff;
}
.nexus-sca-msg__body .nexus-sca-codeblock--mermaid .nexus-sca-md-pre--mermaid {
  margin: 0;
  border: none;
  border-radius: 0;
}
.nexus-sca-msg__body .nexus-sca-mermaid__svg {
  display: block;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  text-align: center;
  padding-bottom: 4px;
}
.nexus-sca-msg__body .nexus-sca-mermaid__svg svg {
  max-width: 100%;
  width: auto;
  min-width: 0;
  height: auto;
  overflow: visible;
}
.nexus-sca-msg__body .nexus-sca-mermaid__fail {
  margin: 0 0 8px;
  font-size: 13px;
  color: #6b7280;
}
.nexus-sca-msg__body .nexus-sca-codeblock--math .nexus-sca-math-block {
  padding: 12px 14px;
  background: #fff;
  overflow-x: auto;
}
/* Mermaid bomb / Syntax error — không để tràn góc trái trang */
body > svg[id^="mermaid"],
body > svg[aria-roledescription="error"],
body > div[id^="dmermaid"],
body > div[id^="nexus-sca-mmd-"] {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.nexus-sca-msg__body .nexus-sca-chart {
  margin: 0;
  padding: 12px 14px 16px;
  background: #fff;
}
.nexus-sca-msg__body .nexus-sca-codeblock--chart .nexus-sca-md-pre--chart {
  margin: 0;
  border: none;
  border-radius: 0;
}
.nexus-sca-msg__body .nexus-sca-chart__canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 220px;
}
.nexus-sca-msg__body .nexus-sca-md-task {
  list-style: none;
  margin-left: -0.5em;
}
.nexus-sca-msg__body .nexus-sca-md-task__box {
  margin-right: 4px;
}
.nexus-sca-msg__body .nexus-sca-md-math--display {
  display: block;
  margin: 10px 0;
  overflow-x: auto;
  text-align: center;
}
/* Blockquote */
.nexus-sca-msg__body .nexus-sca-md-quote {
  margin: 8px 0;
  padding: 4px 0 4px 14px;
  border-left: 3px solid #d0d7de;
  color: #57606a;
}
.nexus-sca-msg__body del { color: #8a8f98; }
.nexus-sca-msg__actions {
  margin-top: 6px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nexus-sca-msg__copy {
  border: none;
  background: transparent;
  font-size: 12px;
  color: #888;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.nexus-sca-msg__copy:hover { color: #333; background: #f2f2f2; }
.nexus-sca-msg__act {
  border: none;
  background: transparent;
  font-size: 12px;
  color: #888;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
  transition: background .15s, color .15s;
}
.nexus-sca-msg__act:hover { color: #333; background: #f2f2f2; }
.nexus-sca-msg__stopped {
  margin: 0.65rem 0 0.35rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
}
.nexus-sca-msg__continue {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.nexus-sca-msg__continue-hint {
  margin: 0;
  flex: 1 1 180px;
  font-size: 13px;
  line-height: 1.4;
  color: #4b5563;
}
.nexus-sca-msg__continue-btn {
  border: none;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  line-height: 1.2;
}
.nexus-sca-msg__continue-btn:hover { background: #1f2937; }
.nexus-sca-msg__listen.is-speaking,
.nexus-sca-msg__listen.is-paused { color: #0b57d0; background: #e8f0fe; }
.nexus-sca-msg__listen.is-loading { opacity: 0.75; pointer-events: none; }
.nexus-sca-listen__icon { display: block; flex-shrink: 0; }
.nexus-sca-listen__spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #ccc;
  border-top-color: #0b57d0;
  border-radius: 50%;
  animation: nexus-sca-spin 0.7s linear infinite;
}
@keyframes nexus-sca-spin { to { transform: rotate(360deg); } }
.nexus-sca-msg__fb { display: inline-flex; align-items: center; gap: 2px; margin-left: 2px; }
.nexus-sca-msg__fb-btn { font-size: 13px; filter: grayscale(1); opacity: .65; }
.nexus-sca-msg__fb-btn:hover { opacity: 1; filter: none; }
.nexus-sca-msg__fb-btn.is-active { opacity: 1; filter: none; background: #eef4ff; }
.nexus-sca-msg__fb[data-vote] .nexus-sca-msg__fb-btn:not(.is-active) { opacity: .4; }
.nexus-sca-msg__fb.is-pending .nexus-sca-msg__fb-btn[data-rating="up"] { opacity: .4; }

.nexus-sca-fb-modal {
  position: fixed;
  inset: 0;
  z-index: 1210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nexus-sca-fb-modal[hidden] { display: none !important; }
.nexus-sca-fb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
}
.nexus-sca-fb-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  padding: 22px 22px 18px;
}
.nexus-sca-fb-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #666;
  cursor: pointer;
}
.nexus-sca-fb-modal__close:hover { background: #f2f2f2; }
.nexus-sca-fb-modal__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 36px 14px 0;
  color: #0d0d0d;
}
.nexus-sca-fb-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.nexus-sca-fb-chip {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.nexus-sca-fb-chip:hover { background: #f3f4f6; border-color: #d1d5db; }
.nexus-sca-fb-chip.is-selected {
  background: #eef4ff;
  border-color: #93c5fd;
  color: #0b57d0;
}
.nexus-sca-fb-modal__detail {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  color: #111827;
  margin-bottom: 10px;
}
.nexus-sca-fb-modal__detail:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(11,87,208,.12);
}
.nexus-sca-fb-modal__note {
  margin: 0 0 14px;
  font-size: 11px;
  line-height: 1.45;
  color: #9ca3af;
}
.nexus-sca-fb-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.nexus-sca-fb-modal__skip,
.nexus-sca-fb-modal__send {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.nexus-sca-fb-modal__skip {
  background: transparent;
  color: #6b7280;
}
.nexus-sca-fb-modal__skip:hover { background: #f3f4f6; color: #374151; }
.nexus-sca-fb-modal__send {
  background: #0b57d0;
  color: #fff;
  min-width: 88px;
}
.nexus-sca-fb-modal__send:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}
.nexus-sca-fb-modal__send:not(:disabled):hover { background: #0842a0; }
.nexus-sca-msg__terms {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #ececec;
  font-size: 12px;
  color: #666;
  line-height: 1.45;
}
.nexus-sca-msg__terms-label {
  font-weight: 600;
  color: #475569;
  margin-right: 4px;
}
.nexus-sca-msg__terms a { color: #0969da; margin-right: 8px; }
.nexus-sca-msg__term-plain { margin-right: 8px; }
.nexus-sca-rag-src { display: none; }
.nexus-sca-decision {
  margin-top: 14px;
  border: 1px solid #dde3ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 40%);
  /* không overflow:hidden — để sticky head hoạt động khi cuộn nội dung dài */
}
/* Desktop: cả cụm tiêu đề + CTA sticky. Mobile: chỉ thanh CTA sticky (xem @media). */
.nexus-sca-decision__cluster {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.nexus-sca-decision__lede {
  flex: 1 1 auto;
  min-width: 140px;
}
.nexus-sca-decision__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.nexus-sca-decision__title {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: #1a365d;
  line-height: 1.3;
}
.nexus-sca-decision__body { padding: 4px 14px 12px; }
/* Card head đã có tiêu đề — ẩn H2 trùng (markdown render = .nexus-sca-md-h2, không phải thẻ h2). */
.nexus-sca-decision__body > h2,
.nexus-sca-decision__body > .nexus-sca-md-h2:first-child {
  display: none;
}
.nexus-sca-decision__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: 0;
  flex: 0 0 auto;
}
.nexus-sca-decision__head .nexus-sca-decision__quota {
  width: 100%;
  margin: 0;
  order: 3;
}
.nexus-sca-decision__head .nexus-sca-decision__upgrade {
  width: 100%;
  margin: 0;
  order: 4;
}
.nexus-sca-decision__btn {
  border: 1px solid #d0d7e2;
  background: #fff;
  color: #1e293b;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.nexus-sca-decision__btn:hover { background: #f8fafc; }
.nexus-sca-decision__btn.is-copied {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
  box-shadow: 0 0 0 2px rgba(22, 101, 52, 0.08);
}
.nexus-sca-decision__btn--primary {
  background: #1a365d;
  border-color: #1a365d;
  color: #fff;
}
.nexus-sca-decision__btn--primary:hover { background: #142a4a; color: #fff; }
.nexus-sca-decision__upgrade {
  flex: 1 1 100%;
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}
.nexus-sca-decision__upgrade a {
  color: #960000;
  font-weight: 600;
  text-decoration: underline;
}
.nexus-sca-decision__upgrade-plain {
  color: #64748b;
  font-weight: 400;
  text-decoration: none;
}
.nexus-sca-decision__quota {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}
.nexus-sca-decision__btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.nexus-sca-quota-upgrade-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.nexus-sca-typing { font-style: normal; color: #64748b; display: inline-flex; align-items: center; gap: 7px; }
.nexus-sca-thinking-text {
  color: #64748b;
  -webkit-text-fill-color: #64748b;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .nexus-sca-thinking-text {
    background: linear-gradient(90deg, #94a3b8 0%, #334155 40%, #334155 60%, #94a3b8 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: nexus-sca-shimmer 1.8s linear infinite;
  }
}
.nexus-sca-msg__activity--live {
  margin-top: 8px;
  margin-left: 0;
}
.nexus-sca-msg__activity--live[hidden] {
  display: none !important;
}
.nexus-sca-thinking-dots { display: inline-flex; align-items: flex-end; gap: 3px; }
.nexus-sca-thinking-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: #9aa0aa;
  animation: nexus-sca-dot 1.2s ease-in-out infinite;
}
.nexus-sca-thinking-dots span:nth-child(2) { animation-delay: .18s; }
.nexus-sca-thinking-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes nexus-sca-shimmer { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } }
@keyframes nexus-sca-dot {
  0%, 80%, 100% { opacity: .3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .nexus-sca-thinking-text { animation: none; }
  .nexus-sca-thinking-dots span { animation-duration: 2.4s; }
}
.nexus-sca-stream-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: #0d0d0d;
  animation: nexus-sca-blink 1s step-end infinite;
}
@keyframes nexus-sca-blink { 50% { opacity: 0; } }

.nexus-sca-chat__starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px var(--sca-chat-col-pad, 20px) 10px;
  flex-shrink: 0;
  max-width: var(--sca-chat-col-max, 48rem);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}
.nexus-sca-chat__messages--has-starters {
  padding-bottom: 4px;
}
.nexus-sca-starter {
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  color: #333;
  cursor: pointer;
  text-align: left;
  line-height: 1.35;
  max-width: 100%;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease, color 220ms ease;
}
.nexus-sca-starter:hover {
  background: #fafafa;
  border-color: #c8c8c8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.nexus-sca-page--guest-seo .nexus-sca-composer {
  transition: border-color 220ms ease, box-shadow 220ms ease;
}
.nexus-sca-page--guest-seo .nexus-sca-composer:focus-within {
  border-color: #c4c4c4;
  box-shadow: 0 0 0 3px rgba(150, 0, 0, 0.08), 0 2px 8px rgba(15, 23, 42, 0.05);
}

/* Clarify gate — AskQuestion (Cursor-style single-select) */
.nexus-sca-clarify {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  background: #fafbfc;
  max-width: 100%;
  box-sizing: border-box;
}
.nexus-sca-clarify__options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nexus-sca-clarify-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.4;
  color: #1a1a1a;
  padding: 10px 12px;
  border: 1px solid #e2e5ea;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.nexus-sca-clarify-opt:hover {
  border-color: #c5ccd8;
  background: #fff;
}
.nexus-sca-clarify-opt.is-selected {
  border-color: #5b7aa8;
  background: #f3f7fc;
  box-shadow: inset 0 0 0 1px rgba(91, 122, 168, 0.25);
}
.nexus-sca-clarify-opt.is-muted {
  opacity: 0.45;
}
.nexus-sca-clarify-opt:disabled {
  cursor: default;
}
.nexus-sca-clarify.is-done .nexus-sca-clarify-opt:not(.is-selected) {
  opacity: 0.4;
}
.nexus-sca-clarify-opt__radio {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1.5px solid #9aa3b2;
  border-radius: 50%;
  box-sizing: border-box;
  position: relative;
  background: #fff;
}
.nexus-sca-clarify-opt.is-selected .nexus-sca-clarify-opt__radio {
  border-color: #3d5f8a;
}
.nexus-sca-clarify-opt.is-selected .nexus-sca-clarify-opt__radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #3d5f8a;
}
.nexus-sca-clarify-opt__label {
  flex: 1;
  min-width: 0;
}
.nexus-sca-clarify__text {
  display: none;
  margin-top: 8px;
}
.nexus-sca-clarify__text.is-open {
  display: block;
}
.nexus-sca-clarify__textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  resize: vertical;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 10px 12px;
  border: 1px solid #d5dae3;
  border-radius: 10px;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  box-sizing: border-box;
}
.nexus-sca-clarify__textarea:focus {
  border-color: #5b7aa8;
  box-shadow: 0 0 0 3px rgba(91, 122, 168, 0.15);
}
.nexus-sca-clarify__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}
.nexus-sca-clarify__continue {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: #1f3a5f;
  color: #fff;
  cursor: pointer;
}
.nexus-sca-clarify__continue:hover:not(:disabled) {
  background: #18304f;
}
.nexus-sca-clarify__continue:disabled {
  opacity: 0.45;
  cursor: default;
}
.nexus-sca-clarify__skip {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12.5px;
  color: #667085;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nexus-sca-clarify__skip:hover {
  color: #344054;
}
.nexus-sca-clarify.is-done {
  background: #f7f8fa;
}
.nexus-sca-clarify__picked {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e8eaee;
  font-size: 12.5px;
  line-height: 1.4;
  color: #3d5f8a;
  font-weight: 550;
}

/* ───────────── Composer (kiểu Gemini / ChatGPT) ───────────── */
.nexus-sca-composer-wrap {
  flex-shrink: 0;
  max-width: var(--sca-chat-col-max, 48rem);
  margin: 0 auto;
  width: 100%;
  padding: 6px var(--sca-chat-col-pad, 14px) calc(8px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  border-top: 1px solid #ececec;
  background: #fff;
}

/*
 * iOS Safari overlays the layout viewport with its keyboard and ignores
 * interactive-widget=resizes-content. Lift only the composer by the measured
 * overlap; never resize/move the whole chat shell (that caused stale half-screen
 * layouts after sending a message).
 */
@media (pointer: coarse) {
  /*
   * iOS: floor 30px (không 47) — lan can khi Safari trả safe-area=0 nhưng
   * layout vẫn đè status bar; nhẹ hơn 47 để giảm khoảng trắng thừa trên tab.
   * Khi safe-area báo đúng (>30) vẫn dùng giá trị thật.
   */
  html.nexus-sca-ios-platform,
  body.nexus-sca-ios-platform.nexus-sca-mode-chat {
    /* Bù nhẹ phần chênh giữa small/dynamic viewport, tối đa 18px. */
    height: calc(100svh + min(18px, max(0px, calc(100dvh - 100svh))));
    max-height: calc(100svh + min(18px, max(0px, calc(100dvh - 100svh))));
  }
  body.nexus-sca-ios-platform.nexus-sca-mode-chat .nexus-sca-chat__head {
    padding-top: calc(8px + max(env(safe-area-inset-top, 0px), 30px));
  }
  .nexus-sca-composer-wrap {
    transform: translate3d(0, calc(-1 * var(--sca-keyboard-inset, 0px)), 0);
    transition: transform 120ms ease-out;
    position: relative;
    z-index: 35;
  }
  body.nexus-sca-keyboard-open .nexus-sca-composer-wrap {
    box-shadow: 0 -1px 0 #ececec, 0 -8px 22px rgba(0, 0, 0, 0.04);
  }
  body.nexus-sca-keyboard-open .nexus-sca-chat__foot {
    display: none;
  }
  body.nexus-sca-keyboard-open .nexus-sca-scrolldown.is-visible {
    transform: translate3d(0, calc(-1 * var(--sca-keyboard-inset, 0px)), 0);
  }
}

.nexus-sca-composer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  width: 100%;
  min-height: 52px;
  padding: 6px 8px 6px 6px;
  border: 1px solid #e3e3e8;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06), 0 0 0 1px rgba(0, 0, 0, .02);
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.nexus-sca-composer:focus-within {
  border-color: #c8c8d0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08), 0 0 0 1px rgba(179, 36, 60, .12);
}

.nexus-sca-composer__plus,
.nexus-sca-composer__mic {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #5c5c66;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s, transform .1s;
}
.nexus-sca-composer__plus:hover,
.nexus-sca-composer__mic:hover {
  background: #f0f0f3;
  color: #1a1a1f;
}
.nexus-sca-composer__plus:active,
.nexus-sca-composer__mic:active { transform: scale(.92); }
.nexus-sca-composer__plus:disabled,
.nexus-sca-composer__mic:disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}
.nexus-sca-composer__plus svg,
.nexus-sca-composer__mic svg { display: block; }

.nexus-sca-composer__field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.nexus-sca-composer__field textarea {
  width: 100%;
  min-width: 0;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  padding: 8px 4px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.45;
  min-height: 36px;
  max-height: 140px;
  overflow-y: hidden;
  box-shadow: none;
}
.nexus-sca-composer__field textarea::placeholder {
  color: #9a9aa3;
  font-size: 14px;
}
.nexus-sca-composer.is-busy .nexus-sca-composer__field textarea::placeholder {
  color: transparent;
}

/* Chế độ Phổ thông / Chuyên gia — cạnh mic (kiểu Gemini) */
.nexus-sca-tier-picker {
  position: relative;
  flex-shrink: 0;
  margin: 0;
}
.nexus-sca-tier-picker__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f4f4f6;
  color: #3c3c43;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.15;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.nexus-sca-tier-picker__toggle:hover {
  background: #ececf0;
  border-color: #e0e0e6;
}
.nexus-sca-tier-picker.is-open .nexus-sca-tier-picker__toggle,
.nexus-sca-tier-picker__toggle:focus-visible {
  background: #fff;
  border-color: #d8d8e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  outline: none;
}
.nexus-sca-tier-picker__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b7280;
  flex-shrink: 0;
}
.nexus-sca-tier-picker.is-expert .nexus-sca-tier-picker__dot {
  background: linear-gradient(135deg, #8b2942 0%, #c45c26 100%);
}
.nexus-sca-tier-picker__chev {
  opacity: .5;
  flex-shrink: 0;
}
.nexus-sca-tier-picker__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  left: auto;
  z-index: 40;
  min-width: 232px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid #e8e8ee;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .12), 0 2px 8px rgba(15, 23, 42, .06);
}
.nexus-sca-tier-picker__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s;
}
.nexus-sca-tier-picker__item:hover:not(:disabled) {
  background: #f6f6f8;
}
.nexus-sca-tier-picker__item.is-active {
  background: #f3eef0;
}
.nexus-sca-tier-picker__item:disabled {
  opacity: .72;
  cursor: not-allowed;
}
.nexus-sca-tier-picker__item-main { flex: 1; min-width: 0; }
.nexus-sca-tier-picker__item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1f1f24;
}
.nexus-sca-tier-picker__item-desc {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: #6b7280;
}
.nexus-sca-tier-picker__item-meta {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 500;
  color: #8b2942;
}
.nexus-sca-tier-picker__item-check {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  color: #8b2942;
  opacity: 0;
}
.nexus-sca-tier-picker__item.is-active .nexus-sca-tier-picker__item-check { opacity: 1; }
.nexus-sca-tier-picker__item-lock {
  margin-top: 2px;
  font-size: 14px;
  opacity: .45;
  flex-shrink: 0;
}
.nexus-sca-chat__quota--tiers {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  font-size: 11px;
  line-height: 1.3;
}
.nexus-sca-chat__quota-tier {
  white-space: nowrap;
  color: #888;
}
.nexus-sca-chat__quota-tier.is-active {
  color: #5c3d48;
  font-weight: 600;
}
.nexus-sca-chat__quota-tier.is-low { color: #c45c26; }
.nexus-sca-chat__quota-wrap--hidden { display: none !important; }
.nexus-sca-sidebar-tier {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.35;
  color: #555;
}
.nexus-sca-sidebar-tier.is-default { color: #5c3d48; font-weight: 600; }
.nexus-sca-member-quota--guest { margin-bottom: 8px; }

/* Đang stream — ẩn caret + không focus ô nhập (iOS hiện sọc đen dọc) */
.nexus-sca-composer.is-busy .nexus-sca-composer__field textarea {
  caret-color: transparent;
  pointer-events: none;
}
.nexus-sca-composer.is-busy .nexus-sca-composer__mic {
  width: 0;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  padding: 0;
  margin: 0;
}
.nexus-sca-composer.is-busy:focus-within {
  border-color: #e3e3e8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06), 0 0 0 1px rgba(0, 0, 0, .02);
}

.nexus-sca-composer__trail {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nexus-sca-composer__send {
  flex-shrink: 0;
  width: 0;
  min-width: 0;
  height: 36px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 18px;
  background: #b3243c;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: width .2s ease, min-width .2s ease, opacity .2s ease, background .15s, transform .1s;
}
.nexus-sca-composer__send.is-ready,
.nexus-sca-composer__send.is-stop {
  width: 36px;
  min-width: 36px;
  opacity: 1;
  pointer-events: auto;
}
.nexus-sca-composer__send.is-ready:hover { background: #8f1d31; }
.nexus-sca-composer__send:active { transform: scale(.94); }
.nexus-sca-composer__send-icon { stroke: #fff; }
.nexus-sca-composer__send-stop,
.nexus-sca-composer__send-label { display: none; }

/* Đang stream — nút Dừng */
.nexus-sca-composer__send.is-stop {
  width: auto;
  min-width: 72px;
  padding: 0 14px;
  border-radius: 18px;
}
.nexus-sca-composer__send.is-stop .nexus-sca-composer__send-icon { display: none; }
.nexus-sca-composer__send.is-stop .nexus-sca-composer__send-stop,
.nexus-sca-composer__send.is-stop .nexus-sca-composer__send-label { display: inline; }
.nexus-sca-composer__send.is-stop .nexus-sca-composer__send-stop {
  font-size: 9px;
  line-height: 1;
}
.nexus-sca-composer__send.is-stop .nexus-sca-composer__send-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

/* Có nội dung → ẩn mic (giống Gemini) */
.nexus-sca-composer.has-text .nexus-sca-composer__mic,
.nexus-sca-composer.has-attach .nexus-sca-composer__mic {
  width: 0;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  padding: 0;
  margin: 0;
}

.nexus-sca-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.nexus-sca-composer__mic.is-recording {
  color: #b3243c;
  background: #fde8ec;
  animation: nexus-sca-mic-pulse 1.4s ease-out infinite;
}
@keyframes nexus-sca-mic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(179, 36, 60, .4); }
  70% { box-shadow: 0 0 0 8px rgba(179, 36, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(179, 36, 60, 0); }
}

/* Preview đính kèm — chip gọn trong composer */
.nexus-sca-attach-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 8px;
  margin: 0;
  scrollbar-width: none;
}
.nexus-sca-attach-strip::-webkit-scrollbar { display: none; }
.nexus-sca-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  max-width: 240px;
  padding: 4px 26px 4px 4px;
  border: 1px solid #e8e8ec;
  border-radius: 14px;
  background: #f7f7f9;
  position: relative;
  font-size: 11px;
  color: #333;
  animation: nexus-sca-chip-in .16s ease-out;
}
@keyframes nexus-sca-chip-in {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}
.nexus-sca-attach-chip.is-error { border-color: #e2a1ac; background: #fdf1f3; }
.nexus-sca-attach-chip.is-paste { max-width: 260px; }
.nexus-sca-attach-chip__thumb {
  width: 32px; height: 32px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.nexus-sca-attach-chip__ext {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: #b3243c;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nexus-sca-attach-chip__ext--paste {
  background: #2563eb;
}
.nexus-sca-attach-chip__meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.nexus-sca-attach-chip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
  font-weight: 600;
  line-height: 1.25;
}
.nexus-sca-attach-chip__sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
  font-size: 10px;
  color: #777;
  line-height: 1.2;
  font-weight: 400;
}
.nexus-sca-attach-chip__spin {
  width: 14px; height: 14px;
  border: 2px solid #d9d9d9;
  border-top-color: #b3243c;
  border-radius: 50%;
  animation: nexus-sca-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes nexus-sca-spin { to { transform: rotate(360deg); } }
.nexus-sca-attach-chip__err {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #b3243c;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nexus-sca-attach-chip__remove {
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  border: none;
  background: rgba(255, 255, 255, .9);
  color: #888;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
.nexus-sca-attach-chip__remove:hover { background: #fff; color: #333; }

.nexus-sca-voice-status {
  padding: 0 8px 6px;
  font-size: 12px;
  color: #b3243c;
  text-align: left;
  line-height: 1.35;
}
.nexus-sca-voice-status.is-active { font-weight: 600; }

.nexus-sca-attach-privacy {
  margin: 4px 8px 0;
  font-size: 11px;
  color: #999;
  line-height: 1.35;
}

/* Đính kèm trong bong bóng user */
.nexus-sca-msg__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.nexus-sca-msg__att--img {
  width: 96px; height: 96px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(0,0,0,.08);
  display: inline-block;
  text-decoration: none;
}
a.nexus-sca-msg__att--img:hover { border-color: rgba(0,0,0,.22); }
.nexus-sca-msg__att--file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 12px;
  text-decoration: none;
  color: inherit;
}
a.nexus-sca-msg__att--file:hover { background: rgba(255,255,255,.24); }
.nexus-sca-msg__att.is-expired { opacity: .65; cursor: default; pointer-events: none; }
.nexus-sca-msg__att.is-expiring { box-shadow: inset 0 0 0 1px rgba(180, 120, 0, .45); }
.nexus-sca-msg__att--img { position: relative; }
.nexus-sca-msg__att--img .nexus-sca-msg__att-expired,
.nexus-sca-msg__att--img .nexus-sca-msg__att-soon {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  text-align: center;
  font-size: 9px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(0,0,0,.65);
  color: #fff;
}
.nexus-sca-msg__att-ext {
  font-weight: 700;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(0,0,0,.25);
}
.nexus-sca-msg__att-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nexus-sca-msg__att-expired,
.nexus-sca-msg__att-soon,
.nexus-sca-msg__att-link {
  font-size: 10px;
  opacity: .9;
  white-space: nowrap;
}
.nexus-sca-msg__att-soon { color: #b45309; }
.nexus-sca-msg__att-link { color: #0f766e; }
.nexus-sca-msg__att.is-link:not(.is-expired) {
  opacity: 1;
}

/* File xuất từ bot */
.nexus-sca-msg__artifact { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
/* Activity steps — Cursor-style: 1 dòng tóm tắt, bấm để đóng/mở chi tiết */
.nexus-sca-msg__activity {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #64748b;
}
.nexus-sca-msg__activity-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  padding: 2px 0;
  font-weight: 500;
  color: #64748b;
  user-select: none;
}
.nexus-sca-msg__activity-summary:hover { color: #475569; }
.nexus-sca-msg__activity-summary::-webkit-details-marker { display: none; }
.nexus-sca-msg__activity-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  transform: rotate(-90deg);
  transition: transform 0.12s ease;
  flex: 0 0 auto;
}
.nexus-sca-msg__activity[open] > .nexus-sca-msg__activity-summary .nexus-sca-msg__activity-chevron {
  transform: rotate(0deg);
}
.nexus-sca-msg__activity-summary-text { flex: 1 1 auto; line-height: 1.35; }
.nexus-sca-msg__activity-list {
  margin: 4px 0 0 14px;
  padding: 0 0 2px 0;
  list-style: none;
  border-left: 1px solid #e2e8f0;
  padding-left: 12px;
}
.nexus-sca-msg__activity-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
  line-height: 1.35;
  color: #475569;
  font-size: 12.5px;
}
.nexus-sca-msg__activity-mark {
  flex: 0 0 1em;
  color: #16a34a;
  font-weight: 700;
}
.nexus-sca-msg__activity-item--partial .nexus-sca-msg__activity-mark { color: #d97706; }
.nexus-sca-msg__activity-item--failed .nexus-sca-msg__activity-mark { color: #dc2626; }
.nexus-sca-msg__activity-label { flex: 1 1 auto; }
.nexus-sca-msg__activity-meta { color: #94a3b8; font-size: 12px; white-space: nowrap; }
.nexus-sca-artifact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s;
}
.nexus-sca-artifact:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.nexus-sca-artifact__ext {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #1e3a5f;
  color: #fff;
  letter-spacing: .02em;
}
.nexus-sca-artifact__ext--pptx {
  background: #960000;
}
.nexus-sca-artifact--pptx {
  border-color: #e8d4d4;
  background: #fdf8f8;
}
.nexus-sca-artifact--pptx:hover {
  background: #f9f5f5;
  border-color: #d4b0b0;
}
.nexus-sca-artifact__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nexus-sca-artifact__name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nexus-sca-artifact__size { font-size: 11px; color: #64748b; }
.nexus-sca-artifact__dl {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #b3243c;
}

.nexus-sca-chat--dragover .nexus-sca-composer {
  border-color: #b3243c;
  box-shadow: 0 0 0 2px rgba(179, 36, 60, .15);
}

/* Kéo-thả tệp — overlay kiểu ChatGPT */
.nexus-sca-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}
.nexus-sca-drop-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nexus-sca-drop-overlay__panel {
  max-width: 420px;
  width: 100%;
  padding: 32px 28px;
  text-align: center;
  border: 2px dashed rgba(179, 36, 60, .35);
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 40px rgba(15, 23, 42, .08);
  transform: scale(.98);
  transition: transform .18s ease, border-color .18s ease;
}
.nexus-sca-drop-overlay.is-visible .nexus-sca-drop-overlay__panel {
  transform: scale(1);
  border-color: rgba(179, 36, 60, .55);
}
.nexus-sca-drop-overlay__icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}
.nexus-sca-drop-overlay__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.nexus-sca-drop-overlay__ico--img { color: #b3243c; background: #fdf2f4; border-color: #f5d0d8; }
.nexus-sca-drop-overlay__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}
.nexus-sca-drop-overlay__hint {
  margin: 0 0 10px;
  font-size: 14px;
  color: #475569;
  line-height: 1.45;
}
.nexus-sca-drop-overlay__meta {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}
.nexus-sca-drop-overlay.is-guest .nexus-sca-drop-overlay__hint {
  color: #b3243c;
  font-weight: 600;
}

.nexus-sca-chat__foot {
  margin: 0;
  padding: 0 var(--sca-chat-col-pad, 20px) 10px;
  font-size: 10.5px;
  color: #999;
  line-height: 1.4;
  flex-shrink: 0;
  text-align: center;
  max-width: var(--sca-chat-col-max, 48rem);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
/* Disclaimer luôn hiện (guest + đã đăng nhập); chỉ CTA «Đăng nhập» ẩn khi member (Blade). */
.nexus-sca-chat__foot a { color: #666; }

/* Marketing — guest scrollable page */
.nexus-sca-marketing { margin-top: 24px; padding: 0 16px; }
.nexus-sca-marketing--minimal {
  margin-top: 12px;
  margin-bottom: 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 0;
}
.nexus-sca-marketing--hidden { display: none; }
.nexus-sca-marketing__desktop { display: block; }
.nexus-sca-mobile-foot { display: none; }
.nexus-sca-quicklinks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.nexus-sca-quicklink {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  color: #1a1a1a;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.nexus-sca-quicklink:hover,
.nexus-sca-quicklink:focus {
  border-color: #d8d8d8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
  text-decoration: none;
}
.nexus-sca-quicklink__ico { font-size: 22px; line-height: 1; flex-shrink: 0; }
.nexus-sca-quicklink__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nexus-sca-quicklink__text strong { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.nexus-sca-quicklink__text small { font-size: 12px; color: #777; line-height: 1.35; }
.nexus-sca-cta--minimal { margin: 0; }
.nexus-sca-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.nexus-sca-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
}
.nexus-sca-features li > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.nexus-sca-features li strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  color: #1a1a1a;
}
.nexus-sca-features li small {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  color: #555;
}
.nexus-sca-feat-ico {
  flex-shrink: 0;
  color: #666;
  font-weight: 600;
  line-height: 1.35;
}
.nexus-sca-section-title { font-size: 20px; margin: 0 0 14px; }
.nexus-sca-about p { font-size: 14.5px; line-height: 1.7; color: #444; }
.nexus-sca-bullets { margin: 0 0 20px; padding-left: 20px; font-size: 14.5px; line-height: 1.7; color: #444; }
.nexus-sca-sit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.nexus-sca-sit-card {
  display: block;
  min-width: 0;
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.nexus-sca-sit-card strong { display: block; color: #1a1a1a; margin-bottom: 6px; font-size: 15px; line-height: 1.35; }
.nexus-sca-sit-card__summary {
  display: block;
  font-size: 13.5px;
  line-height: 1.55;
  color: #555;
}
.nexus-sca-chat__sit-tag {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  color: #8b2942;
  background: #fdf4f6;
  border: 1px solid #f0d9df;
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
}
.nexus-sca-cta {
  text-align: center;
  margin: 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}
.nexus-sca-faq { margin-bottom: 24px; }
.nexus-sca-breadcrumb { font-size: 13px; color: #888; margin: 0 0 12px; padding: 0 16px; }

/* Marketing landing pages */
body.nexus-auth-sca:has(.nexus-sca-page--marketing) {
  overflow-x: hidden;
  max-width: 100%;
}
.nexus-sca-page--marketing {
  padding-bottom: 56px;
  overflow-x: clip;
  max-width: 100%;
}
.nexus-sca-wrap--marketing {
  max-width: min(1080px, 100%);
  margin: 0 auto;
  padding: 0 8px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}
.nexus-sca-page--marketing .nexus-sca-breadcrumb {
  padding: 0 8px;
  margin-bottom: 16px;
}
.nexus-sca-hero--marketing {
  text-align: center;
  padding: 28px 20px 32px;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
}
.nexus-sca-hero--marketing .nexus-sca-kicker { color: #8b2942; }
.nexus-sca-hero--marketing h1 {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.nexus-sca-hero--marketing .nexus-sca-lead {
  font-size: 16px;
  max-width: 680px;
  margin: 0 auto 20px;
  color: #444;
}
.nexus-sca-hero--enterprise {
  text-align: left;
  padding: 8px 8px 28px;
  border-bottom: none;
  margin-bottom: 8px;
}
.nexus-sca-hero--enterprise__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  max-width: 980px;
  margin: 0;
}
@media (min-width: 769px) {
  .nexus-sca-hero--enterprise__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
    gap: 24px;
  }
}
.nexus-sca-hero--enterprise__main h1 {
  margin: 0 0 10px;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  font-size: clamp(26px, 3.2vw, 34px);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.nexus-sca-hero--enterprise .nexus-sca-kicker {
  margin: 0 0 8px;
  letter-spacing: 0.04em;
}
.nexus-sca-hero--enterprise .nexus-sca-lead {
  margin: 0 0 18px;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.65;
}
.nexus-sca-hero__actions--left {
  justify-content: flex-start;
  margin: 0;
  text-align: left;
}
.nexus-sca-hero--enterprise__aside {
  padding: 14px 14px 12px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fafafa;
  box-shadow: none;
  align-self: start;
  height: auto;
}
.nexus-sca-hero--enterprise__aside .nexus-sca-stats {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 420px) {
  .nexus-sca-hero--enterprise__aside .nexus-sca-stats {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 769px) {
  .nexus-sca-hero--enterprise__aside .nexus-sca-stats {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .nexus-sca-hero--enterprise__aside .nexus-sca-stats li {
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
  }
  .nexus-sca-hero--enterprise__aside .nexus-sca-stats li:last-child {
    border-bottom: none;
    padding-bottom: 2px;
  }
  .nexus-sca-hero--enterprise__aside .nexus-sca-stats li:first-child {
    padding-top: 2px;
  }
}
.nexus-sca-hero--enterprise__aside .nexus-sca-stats li {
  margin: 0;
  padding: 0;
  border: none;
  text-align: left;
}
.nexus-sca-hero--enterprise__aside .nexus-sca-stats strong {
  font-size: 20px;
  line-height: 1.2;
  display: block;
}
.nexus-sca-hero--enterprise__aside .nexus-sca-stats span {
  font-size: 12.5px;
  color: #666;
  display: block;
  margin-top: 2px;
}
.nexus-sca-benefits {
  margin: 20px 16px 32px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}
.nexus-sca-benefits__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.nexus-sca-benefit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 16px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
  transition: border-color .15s, box-shadow .15s;
  min-width: 0;
  overflow: hidden;
}
.nexus-sca-benefit:hover {
  border-color: #d8d8d8;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.nexus-sca-benefit__ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 10px;
  background: #f8f0f2;
}
.nexus-sca-benefit__body h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #1a1a1a;
  line-height: 1.35;
}
.nexus-sca-benefit__body p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #555;
}
.nexus-sca-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  max-width: 100%;
}
.nexus-sca-hero__actions .nexus-auth-btn,
.nexus-sca-cta--bottom .nexus-auth-btn {
  width: auto;
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}
.nexus-sca-section-title--center { text-align: center; }
.nexus-sca-section-title--center { text-align: center; }
.nexus-sca-section-lead {
  font-size: 15px;
  color: #555;
  line-height: 1.65;
  margin: -6px 0 18px;
  max-width: 640px;
}
.nexus-sca-about--panel {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 24px 22px;
  margin-bottom: 32px;
}
.nexus-sca-stats {
  list-style: none;
  padding: 0;
  margin: 0 auto 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  max-width: 720px;
}
.nexus-sca-stats li {
  text-align: center;
  font-size: 13px;
  color: #666;
}
.nexus-sca-stats strong {
  display: block;
  font-size: 22px;
  color: #1a1a1a;
  font-weight: 700;
  line-height: 1.2;
}
.nexus-sca-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 32px 16px;
}
.nexus-sca-feature-grid--compact { grid-template-columns: repeat(3, 1fr); }
.nexus-sca-feature-card {
  padding: 20px 18px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
}
.nexus-sca-feature-card__ico {
  display: block;
  font-size: 22px;
  color: #8b2942;
  margin-bottom: 10px;
}
.nexus-sca-feature-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: #1a1a1a;
}
.nexus-sca-feature-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #555;
}
.nexus-sca-feature-card--sm h3 { font-size: 15px; }
.nexus-sca-b2b-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.nexus-sca-b2b-item {
  padding: 14px 0;
  border-top: 1px solid #e8e8e8;
}
.nexus-sca-b2b-item strong { display: block; margin-bottom: 4px; color: #1a1a1a; }
.nexus-sca-b2b-item p { margin: 0; font-size: 14px; line-height: 1.6; color: #555; }
.nexus-sca-steps { margin: 36px 16px; }
.nexus-sca-steps__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.nexus-sca-step {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
}
.nexus-sca-step__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #8b2942;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nexus-sca-step strong { display: block; margin-bottom: 6px; font-size: 15px; }
.nexus-sca-step p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #555; }
.nexus-sca-trust-line {
  text-align: center;
  font-size: 13px;
  color: #8b2942;
  font-weight: 500;
  margin: -8px auto 16px;
  max-width: 560px;
  line-height: 1.5;
}
.nexus-sca-plans { margin: 40px 16px; }
.nexus-sca-plans__lead {
  text-align: center;
  font-size: 15px;
  color: #555;
  max-width: 560px;
  margin: -4px auto 24px;
  line-height: 1.6;
}
.nexus-sca-plans__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  max-width: 1080px;
  margin: 0 auto;
}
.nexus-sca-plans__grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1280px;
}
.nexus-sca-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 20px;
  min-height: 100%;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.nexus-sca-plan--highlight {
  border-color: #8b2942;
  box-shadow: 0 4px 20px rgba(139, 41, 66, .08);
}
.nexus-sca-plan--current {
  border-color: #2d6a4f;
  box-shadow: 0 4px 20px rgba(45, 106, 79, .1);
}
.nexus-sca-plan--renew-urgent {
  border-color: #b45309;
  box-shadow: 0 4px 20px rgba(180, 83, 9, .12);
}
.nexus-sca-plan--renew-grace {
  border-color: #b45309;
}
.nexus-sca-plan__status--warn {
  color: #b45309;
}
.nexus-sca-plan__status--muted {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 10px;
}
.nexus-sca-plan__renew-banner {
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0 0 10px;
  line-height: 1.45;
}
.nexus-sca-plan__checkout--urgent {
  margin-top: 0;
}
.nexus-sca-plan__btn--renew {
  margin-bottom: 8px;
}
.nexus-sca-usage-card__grace {
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 0 12px;
  line-height: 1.45;
}
.nexus-sca-usage-card__value--warn {
  color: #b45309;
  font-weight: 600;
}
.nexus-sca-usage-card__renew-hint {
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
  margin: 0;
  padding: 12px 18px 14px 20px;
  border-top: 1px solid #eef1f4;
}
.nexus-sca-usage-card__renew-hint a {
  color: #7a0000;
  font-weight: 600;
  text-decoration: none;
}
.nexus-sca-usage-card__renew-hint a:hover {
  text-decoration: underline;
}
.nexus-sca-usage-card--grace .nexus-sca-usage-card__row--last,
.nexus-sca-usage-card__row--last {
  margin-bottom: 0;
}
.nexus-sca-renew-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  padding: 10px 10px 10px 14px;
  margin: 0 0 8px;
  border-radius: 8px;
}
.nexus-sca-renew-banner[hidden] {
  display: none !important;
}
.nexus-sca-renew-banner__text {
  flex: 1;
  min-width: 0;
}
.nexus-sca-renew-banner__dismiss {
  flex: none;
  width: 28px;
  height: 28px;
  margin: -4px -2px 0 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
}
.nexus-sca-renew-banner__dismiss:hover,
.nexus-sca-renew-banner__dismiss:focus {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}
.nexus-sca-renew-banner a {
  color: inherit;
  text-decoration: underline;
  font-weight: 700;
}
.nexus-sca-renew-banner--urgent {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}
.nexus-sca-renew-banner--grace {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.nexus-sca-contact__select {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}
.nexus-sca-plan__badge--current {
  background: #2d6a4f;
}
.nexus-sca-plan__status {
  font-size: 13px;
  color: #2d6a4f;
  font-weight: 600;
  margin: 12px 0 10px;
  line-height: 1.45;
}
.nexus-sca-plan__badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #8b2942;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 10px;
}
.nexus-sca-plan__tier {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #888;
  margin: 0 0 6px;
}
.nexus-sca-plan__price {
  margin: 0 0 12px;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.nexus-sca-plan__num {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.15;
}
.nexus-sca-plan__desc {
  font-size: 13px;
  line-height: 1.55;
  color: #555;
  margin: 0 0 12px;
  flex: 1;
}
.nexus-sca-plan__features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #444;
  flex: 1 1 auto;
}
.nexus-sca-plan__features li {
  padding: 4px 0 4px 16px;
  position: relative;
}
.nexus-sca-plan__features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10a37f;
  font-size: 12px;
}
.nexus-sca-plan__btn {
  display: block;
  text-align: center;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: #1a1a1a;
  color: #fff;
  margin-top: auto;
}
.nexus-sca-plan__btn:hover { background: #333; color: #fff; text-decoration: none; }
.nexus-sca-plan__btn--ghost {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #d0d0d0;
}
.nexus-sca-plan__btn--ghost:hover { background: #f5f5f5; color: #1a1a1a; }
.nexus-sca-plans__note {
  text-align: center;
  font-size: 12px;
  color: #888;
  margin: 16px 0 0;
}
.nexus-sca-plans__topup {
  margin: 1.25rem auto 0;
  max-width: 520px;
  width: 100%;
}
.nexus-sca-plans__topup--compact {
  max-width: 720px;
}
.nexus-sca-plans__topup-card {
  margin: 0;
  padding: 18px 20px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  text-align: left;
}
.nexus-sca-plans__topup-card--compact {
  padding: 14px 16px;
}
.nexus-sca-plans__topup-row {
  display: flex;
  align-items: center;
  gap: 14px 18px;
  flex-wrap: wrap;
}
.nexus-sca-plans__topup-main {
  flex: 1 1 12rem;
  min-width: 0;
}
.nexus-sca-plans__topup-card--compact .nexus-sca-plans__topup-title {
  margin: 0 0 2px;
  font-size: 15px;
}
.nexus-sca-plans__topup-card--compact .nexus-sca-plans__topup-sub {
  font-size: 12px;
  line-height: 1.35;
}
.nexus-sca-plans__topup-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nexus-sca-plans__topup-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nexus-sca-plans__topup-price-inline {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nexus-sca-plans__topup-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.nexus-sca-plans__topup-btn.nexus-sca-plans__topup-btn--inline {
  width: auto;
  min-width: 8.5rem;
  max-width: 12rem;
  margin: 0;
  padding: 9px 22px;
  flex: 0 0 auto;
}
.nexus-sca-plans__topup-card--compact .nexus-sca-plans__topup-row {
  flex-wrap: nowrap;
}
@media (max-width: 640px) {
  .nexus-sca-plans__topup-card--compact .nexus-sca-plans__topup-row {
    flex-wrap: wrap;
  }
  .nexus-sca-plans__topup-meta {
    width: 100%;
    justify-content: flex-start;
  }
}
.nexus-sca-plans__topup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.nexus-sca-plans__topup-titles {
  min-width: 0;
}
.nexus-sca-plans__topup-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
  color: #111827;
}
.nexus-sca-plans__topup-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
}
.nexus-sca-plans__topup-price {
  flex-shrink: 0;
  text-align: right;
  line-height: 1.15;
}
.nexus-sca-plans__topup-price-num {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}
.nexus-sca-plans__topup-price-unit {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #9ca3af;
}
.nexus-sca-plans__topup-choose {
  border: 0;
  margin: 0 0 14px;
  padding: 0;
  min-width: 0;
}
.nexus-sca-plans__topup-legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nexus-sca-plans__topup-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.nexus-sca-plans__topup-opt {
  display: block;
  margin: 0;
  cursor: pointer;
}
.nexus-sca-plans__topup-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.nexus-sca-plans__topup-opt-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.nexus-sca-plans__topup-opt-qty {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111827;
  line-height: 1.1;
}
.nexus-sca-plans__topup-opt-label {
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}
.nexus-sca-plans__topup-opt input:focus-visible + .nexus-sca-plans__topup-opt-card {
  outline: 2px solid #111827;
  outline-offset: 2px;
}
.nexus-sca-plans__topup-opt input:checked + .nexus-sca-plans__topup-opt-card {
  border-color: #111827;
  background: #fff;
  box-shadow: inset 0 0 0 1px #111827;
}
.nexus-sca-plans__topup-opt:hover .nexus-sca-plans__topup-opt-card {
  border-color: #c7c7c7;
  background: #fff;
}
.nexus-sca-plans__topup-btn {
  width: 100%;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 16px;
  border: none;
  cursor: pointer;
}
.nexus-sca-plans__topup-foot {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: #9ca3af;
}
@media (max-width: 520px) {
  .nexus-sca-plans__topup-card { padding: 16px 14px 14px; }
  .nexus-sca-plans__topup-head { flex-direction: column; gap: 8px; }
  .nexus-sca-plans__topup-price { text-align: left; }
  .nexus-sca-plans__topup-price-num,
  .nexus-sca-plans__topup-price-unit { display: inline; }
  .nexus-sca-plans__topup-price-unit { margin-left: 4px; }
}
.nexus-sca-sit-grid--rich { gap: 16px; }
.nexus-sca-sit-card--rich {
  position: relative;
  padding: 20px 18px 44px;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}
.nexus-sca-sit-card--rich:hover {
  border-color: #ccc;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
  transform: translateY(-4px);
  text-decoration: none;
}
.nexus-sca-sit-card__ico {
  display: block;
  font-size: 20px;
  color: #8b2942;
  margin-bottom: 8px;
}
.nexus-sca-sit-card--rich em {
  display: block;
  font-style: italic;
  font-size: 13px;
  color: #666;
  margin-top: 10px;
  line-height: 1.45;
}
.nexus-sca-sit-card__summary { margin-top: 2px; }
.nexus-sca-sit-card__outline {
  font-size: 12.5px;
  color: #666;
  line-height: 1.5;
  margin: 10px 0 0;
}
.nexus-sca-sit-card__cta {
  position: absolute;
  bottom: 16px;
  left: 18px;
  font-size: 12px;
  font-weight: 600;
  color: #8b2942;
}
#sca-faq,
#sca-plans { scroll-margin-top: 72px; }
.nexus-sca-about--approach {
  margin: 0;
  padding: 12px 14px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
}
.nexus-sca-about--approach .nexus-sca-section-title {
  font-size: 14px;
  margin: 0 0 6px;
}
.nexus-sca-about--approach p {
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 8px;
}
.nexus-sca-situation-more {
  flex-shrink: 0;
  margin: 10px 0 0;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fafafa;
  overflow: hidden;
}
.nexus-sca-situation-more > summary {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.nexus-sca-situation-more > summary::-webkit-details-marker { display: none; }
.nexus-sca-situation-more > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  color: #888;
  transition: transform .15s ease;
}
.nexus-sca-situation-more[open] > summary::before {
  transform: rotate(90deg);
}
.nexus-sca-situation-more__inner {
  padding: 0 14px 14px;
  border-top: 1px solid #ececec;
}
.nexus-sca-lead--example {
  font-size: 13px;
  margin: 12px 0 10px;
  color: #555;
}
.nexus-sca-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 12px 0 0;
  font-size: 13px;
  color: #555;
}
.nexus-sca-keywords__label { margin-right: 4px; }
.nexus-sca-kw {
  display: inline-block;
  padding: 3px 10px;
  background: #efefef;
  border-radius: 999px;
  font-size: 12px;
  color: #333;
}
.nexus-sca-situation-guest .nexus-sca-hero--compact-page { margin-bottom: 12px; }

.nexus-sca-contact {
  margin: 40px auto;
  padding: 28px 24px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
  max-width: 640px;
}
.nexus-sca-contact__lead { font-size: 14px; color: #555; margin: -6px 0 20px; }
.nexus-sca-contact__form { max-width: 560px; margin: 0 auto; }
.nexus-sca-contact__row { margin-bottom: 14px; }
.nexus-sca-contact__row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  color: #333;
}
.nexus-sca-contact__row input,
.nexus-sca-contact__row textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.nexus-sca-contact__row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nexus-sca-contact__submit { margin-top: 8px; border: none; cursor: pointer; }
.nexus-sca-contact__optional { font-weight: 400; color: #888; font-size: 12px; }
.nexus-sca-contact .nexus-captcha-box { margin-top: 4px; }
.nexus-sca-contact__feedback {
  font-size: 13px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.45;
}
.nexus-sca-contact__feedback--ok {
  color: #1b5e3b;
  background: #edf7f0;
  border: 1px solid #c8e6d0;
}
.nexus-sca-contact__feedback--err {
  color: #8b2942;
  background: #fdf5f7;
  border: 1px solid #f0d4dc;
}
.nexus-sca-contact__alt { font-size: 13px; color: #666; margin: 14px 0 0; }
.nexus-sca-cta--bottom { margin: 40px 16px 0; padding-top: 24px; border-top: 1px solid #eee; }
.nexus-sca-about { margin: 32px 16px; }
.nexus-sca-plan__sub { display: block; font-size: 12px; color: #666; margin-top: 4px; font-weight: 400; }
.nexus-sca-plan__checkout { margin-top: auto; }
.nexus-sca-plan__checkout .nexus-sca-plan__btn { width: 100%; border: none; cursor: pointer; }
.nexus-sca-plan__checkout .nexus-sca-plans__topup-btn--inline {
  width: auto;
  max-width: 12rem;
  margin: 0;
}
.nexus-sca-plan__pay-off { font-size: 12px; color: #666; margin: 12px 0 0; line-height: 1.45; }
.nexus-sca-plan__pay-off a { color: #8b2942; }
.nexus-sca-tier-status { font-size: 14px; color: #444; margin: 12px 0 0; }
.nexus-sca-marketing__links { font-size: 14px; margin: 16px 0; text-align: center; }
.nexus-sca-marketing__links--center { margin: 24px 16px; }
.nexus-sca-compare { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.nexus-sca-compare__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nexus-sca-compare__table th,
.nexus-sca-compare__table td { border: 1px solid #ececec; padding: 10px 12px; text-align: center; }
.nexus-sca-compare__table th:first-child,
.nexus-sca-compare__table td:first-child { text-align: left; }
.nexus-sca-compare__table thead th { background: #fafafa; font-weight: 600; }
.nexus-sca-hero--compact-page { padding-bottom: 20px; }
.nexus-sca-hero--pricing {
  border-bottom: none;
  padding: 20px 16px 12px;
  margin-bottom: 0;
}
.nexus-sca-hero--pricing h1 {
  font-size: clamp(24px, 5vw, 32px);
  margin-bottom: 8px;
}
.nexus-sca-hero--pricing .nexus-sca-hero__lead {
  font-size: 14px;
  color: #64748b;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.55;
}
.nexus-sca-usage-card {
  max-width: 520px;
  margin: 0 16px 24px;
  padding: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
  overflow: hidden;
}
.nexus-sca-usage-card__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid #eef1f4;
}
.nexus-sca-usage-card__row--last { border-bottom: 0; }
.nexus-sca-usage-card__ico {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #fde8e8;
  color: #960000;
}
.nexus-ui-icon--sca-usage { width: 22px; height: 22px; display: block; }
.nexus-sca-usage-card__body { flex: 1; min-width: 0; }
.nexus-sca-usage-card__label {
  margin: 0 0 2px;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}
.nexus-sca-usage-card__value {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: #1a365d;
}
.nexus-sca-usage-card__value--accent { color: #960000; }
.nexus-sca-plans__renew-note {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin: -8px 16px 20px;
  line-height: 1.45;
}
.nexus-sca-plans--after-usage .nexus-sca-plans__lead {
  margin-top: 8px;
}
@media (min-width: 552px) {
  .nexus-sca-usage-card {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .nexus-sca-app,
  body.nexus-sca-mode-chat .nexus-sca-app { grid-template-columns: 1fr; }
  .nexus-sca-chat__menu-btn { display: inline-flex; }
  .nexus-sca-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    z-index: 1100;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.12);
    border-right: none;
  }
  .nexus-sca-sidebar.is-open { transform: translateX(0); }
  .nexus-sca-sidebar__head { display: flex; }
  /* Thu gọn là tính năng desktop — mobile dùng drawer */
  .nexus-sca-chat__sidebar-btn { display: none !important; }
  .nexus-sca-app.is-sidebar-collapsed,
  body.nexus-sca-mode-chat .nexus-sca-app.is-sidebar-collapsed { grid-template-columns: 1fr; }
  .nexus-sca-app.is-sidebar-collapsed > .nexus-sca-sidebar {
    opacity: 1;
    pointer-events: auto;
    padding: 12px 10px;
    overflow-y: auto;
  }
  .nexus-sca-features { grid-template-columns: 1fr; }
  .nexus-sca-sit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nexus-sca-plans__grid--4 { grid-template-columns: repeat(2, 1fr); }
  .nexus-sca-steps__list { grid-template-columns: 1fr; }
  .nexus-sca-feature-grid,
  .nexus-sca-feature-grid--compact { grid-template-columns: 1fr; }
  .nexus-sca-hero--enterprise__grid { grid-template-columns: 1fr; }
  .nexus-sca-benefits__grid { grid-template-columns: 1fr; }
  .nexus-sca-hero__actions--left { justify-content: center; }
  .nexus-sca-hero--enterprise { text-align: center; }
  .nexus-sca-hero--enterprise .nexus-sca-lead { margin-left: auto; margin-right: auto; }
  .nexus-sca-hero__actions--left {
    flex-direction: column;
    align-items: stretch;
  }
  .nexus-sca-hero__actions .nexus-auth-btn { width: 100%; }
  .nexus-sca-b2b-grid { grid-template-columns: 1fr; }
  .nexus-sca-contact__row--half { grid-template-columns: 1fr; }
}

/* Mobile — drawer sidebar, full-height chat */
@media (max-width: 768px) {
  body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-auth-topbar {
    display: none;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat:not(:has(.nexus-sca-page--marketing)) .nexus-auth-main {
    padding-top: 0;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page:not(.nexus-sca-page--marketing) .nexus-sca-app {
    max-height: min(68vh, 720px);
    height: min(68vh, 720px);
    min-height: 360px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
    grid-template-rows: minmax(0, 1fr);
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-situation-guest .nexus-sca-app {
    max-height: min(calc(100dvh - 120px), 720px);
    height: min(calc(100dvh - 120px), 720px);
    min-height: 300px;
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-topbar-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 54px;
    padding: 6px 0;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-brand {
    justify-content: flex-start;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-nav {
    width: auto;
    justify-content: flex-end;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-topbar {
    flex-shrink: 0;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-topbar .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat .nexus-brand-text small {
    display: none;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat .nexus-auth-nav-btn:not(.nexus-auth-nav-btn--primary) {
    padding: 6px 4px !important;
    font-size: 13px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    border: 0;
    background: transparent;
    color: var(--fmit-muted, #64748b) !important;
  }
  .nexus-sca-app {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  body.nexus-sca-mode-chat .nexus-sca-app {
    min-height: 0;
    height: 100%;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-app > .nexus-sca-main {
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page:has(.nexus-sca-situation-guest) {
    padding: 4px 0 16px;
  }
  .nexus-sca-msg { padding: 8px 0; }
  /* +2px so với 64px; cộng safe-area để không chìm dưới composer/home indicator */
  .nexus-sca-scrolldown {
    right: 12px;
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    width: 36px;
    height: 36px;
    z-index: 40;
  }
  body.nexus-sca-vv-lock .nexus-sca-scrolldown {
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  }
  /* iPhone: nhích cao hơn để khỏi đè mép khung chat (composer + disclaimer) */
  body.nexus-sca-ios-platform .nexus-sca-scrolldown {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  body.nexus-sca-ios-platform.nexus-sca-vv-lock .nexus-sca-scrolldown {
    bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }
  .nexus-sca-chat__menu-btn { display: inline-flex; }
  .nexus-sca-chat__user { display: inline-flex; align-items: center; margin-right: 4px; }
  .nexus-sca-chat__head { padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; gap: 8px; align-items: center; }
  .nexus-sca-chat__head-right { gap: 10px; }
  .nexus-sca-chat__quota {
    white-space: normal;
    text-align: right;
    line-height: 1.3;
    max-width: 120px;
    font-size: 11px;
  }
  .nexus-sca-chat__member-tag {
    display: none;
  }

  .nexus-sca-chat {
    --sca-chat-col-pad: 8px;
  }
  /* Báo cáo quyết định: tiêu đề cuộn đi; chỉ thanh CTA sticky gọn */
  .nexus-sca-decision__cluster {
    position: static;
    display: block;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
  }
  .nexus-sca-decision__lede {
    padding: 8px 12px 2px;
    min-width: 0;
  }
  .nexus-sca-decision__title {
    font-size: 13px;
    line-height: 1.25;
  }
  .nexus-sca-decision__head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px 10px;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
  }
  .nexus-sca-decision__actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .nexus-sca-decision__btn {
    flex: 1 1 calc(50% - 4px);
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1.2;
    border-radius: 6px;
    white-space: nowrap;
  }
  .nexus-sca-decision__head .nexus-sca-decision__quota,
  .nexus-sca-decision__head .nexus-sca-decision__upgrade {
    font-size: 10px;
    line-height: 1.3;
  }
  .nexus-sca-decision__body {
    padding: 2px 12px 10px;
  }
  .nexus-sca-msg--user .nexus-sca-msg__body {
    max-width: 92%;
    padding: 7px 12px;
  }
  .nexus-sca-msg--intro .nexus-sca-msg__body,
  .nexus-sca-msg--intro .nexus-sca-msg__body .nexus-sca-md-p {
    font-size: 16px;
  }
  .nexus-sca-composer-wrap { padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px)); }
  /* Idle: một hàng như cũ. Có chữ: textarea full width (tránh xuống dòng sớm). */
  .nexus-sca-composer {
    align-items: center;
    min-height: 48px;
    padding: 4px 6px 4px 4px;
    border-radius: 24px;
  }
  .nexus-sca-composer__field {
    align-self: center;
    min-height: 40px;
  }
  .nexus-sca-composer__field textarea {
    min-height: 40px;
    padding: 9px 4px;
    line-height: 1.35;
    font-size: 16px;
  }
  .nexus-sca-composer__field textarea::placeholder {
    font-size: 13px;
    line-height: 1.35;
    vertical-align: middle;
  }
  .nexus-sca-composer__plus,
  .nexus-sca-composer__mic { width: 40px; height: 40px; min-width: 40px; }
  .nexus-sca-composer__trail {
    align-self: center;
    min-height: 40px;
  }
  .nexus-sca-tier-picker__toggle {
    height: 28px;
    padding: 0 8px 0 6px;
    line-height: 1;
  }
  .nexus-sca-composer__send.is-ready,
  .nexus-sca-composer__send.is-stop { width: 40px; min-width: 40px; height: 40px; }
  .nexus-sca-composer__send.is-stop { min-width: 80px; padding: 0 16px; }

  .nexus-sca-composer.has-text,
  .nexus-sca-composer.has-attach {
    flex-wrap: wrap;
    align-items: flex-end;
    column-gap: 4px;
    row-gap: 2px;
    padding: 8px 8px 6px;
    border-radius: 22px;
  }
  .nexus-sca-composer.has-text .nexus-sca-composer__field,
  .nexus-sca-composer.has-attach .nexus-sca-composer__field {
    order: 1;
    flex: 1 1 100%;
    width: 100%;
    min-width: 100%;
    align-self: stretch;
    min-height: 0;
  }
  .nexus-sca-composer.has-text .nexus-sca-composer__plus,
  .nexus-sca-composer.has-attach .nexus-sca-composer__plus {
    order: 2;
    align-self: center;
  }
  .nexus-sca-composer.has-text .nexus-sca-composer__trail,
  .nexus-sca-composer.has-attach .nexus-sca-composer__trail {
    order: 3;
    margin-left: auto;
    align-self: center;
  }
  .nexus-sca-composer.has-text .nexus-sca-composer__field textarea,
  .nexus-sca-composer.has-attach .nexus-sca-composer__field textarea {
    min-height: 24px;
    max-height: 160px;
    padding: 4px 2px 6px;
    line-height: 1.4;
  }
  .nexus-sca-attach-chip__name,
  .nexus-sca-attach-chip__sub { max-width: 120px; }
  .nexus-sca-msg__att--img { width: 80px; height: 80px; }
  .nexus-sca-chat__head-left { gap: 6px; flex: 1 1 auto; min-width: 0; }
  .nexus-sca-chat__head-left strong { flex-shrink: 0; }
  .nexus-sca-chat__sit-tag { max-width: 120px; font-size: 10px; }
  .nexus-sca-chat__quota-wrap { flex-shrink: 0; }
  .nexus-sca-chat__starters { display: none !important; }
  .nexus-sca-starter { display: none !important; }
  .nexus-sca-quicklinks { grid-template-columns: 1fr; }
  .nexus-sca-guest-hero { padding: 2px 14px 6px; }
  .nexus-sca-guest-hero__title { font-size: 22px; margin-bottom: 2px; }
  .nexus-sca-guest-hero__lead { font-size: 12px; white-space: normal; }
  .nexus-sca-marketing--minimal {
    margin-top: 10px;
    padding: 0 14px 0;
    max-width: none;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--minimal:not(.nexus-sca-page--marketing) .nexus-sca-app {
    height: 56vh;
    min-height: 340px;
    max-height: 560px;
    margin: 0 0 16px;
    width: auto;
    border: 1px solid #ececec;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    flex: none;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-chat {
    --sca-chat-col-pad: 8px;
  }
  .nexus-sca-page { padding: 0; }
  body.nexus-auth-sca:not(.nexus-sca-mode-chat):not(.nexus-sca-mode-chat-guest) .nexus-auth-main { padding: 8px 0 24px; }
  .nexus-sca-sit-grid { grid-template-columns: 1fr; }
  .nexus-sca-plans__grid { grid-template-columns: 1fr; }
  .nexus-sca-hero__actions .nexus-auth-btn { width: 100%; min-width: 0; }
  .nexus-sca-cta--bottom .nexus-auth-btn { width: 100%; min-width: 0; }
}
@media (max-width: 480px) {
  .nexus-sca-chat__sit-tag { display: none; }
  .nexus-sca-chat__head-left strong { max-width: none; }
}
@media (max-width: 420px) {
  .nexus-sca-chat__quota {
    display: none;
  }
}

.nexus-sca-pdf-busy {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: rgba(255,255,255,.88);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #333;
}
.nexus-sca-pdf-iframe {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 794px;
  min-height: 1123px;
  border: 0;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  visibility: hidden;
}
.nexus-sca-pdf-clone-host {
  font-family: Segoe UI, Arial, sans-serif;
  line-height: 1.55;
  box-sizing: border-box;
}
.nexus-sca-share-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nexus-sca-share-modal[hidden] { display: none !important; }
.nexus-sca-share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}
.nexus-sca-share-modal__panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  padding: 22px 22px 20px;
}
.nexus-sca-share-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #666;
  cursor: pointer;
}
.nexus-sca-share-modal__close:hover { background: #f2f2f2; }
.nexus-sca-share-modal__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 36px 16px 0;
  color: #0d0d0d;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.nexus-sca-share-modal__card {
  position: relative;
  border: 1px solid #ececec;
  border-radius: 16px;
  background: #f7f7f8;
  overflow: hidden;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}
.nexus-sca-share-modal__preview {
  padding: 16px;
  max-height: 260px;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.55;
  color: #353740;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}
.nexus-sca-share-modal__card-foot {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid #ececec;
  background: #f0f0f1;
}
.nexus-sca-share-modal__brand {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #8e8ea0;
  text-transform: uppercase;
}
.nexus-sca-share-preview__turn { margin-bottom: 12px; }
.nexus-sca-share-preview__turn:last-child { margin-bottom: 0; }
.nexus-sca-share-preview__turn strong {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #8e8ea0;
  margin-bottom: 4px;
  font-weight: 600;
}
.nexus-sca-share-preview__turn .nexus-sca-share-preview__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #353740;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
}
.nexus-sca-share-preview__err { margin: 0; font-size: 13px; color: #b42318; }
.nexus-sca-share-modal__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: flex-start;
  justify-content: center;
}
.nexus-sca-share-action,
.nexus-sca-share-modal__social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 72px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: #0d0d0d;
  padding: 0;
}
.nexus-sca-share-action__icon,
.nexus-sca-share-modal__social-btn .nexus-sca-share-action__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0d0d0d;
  color: #fff;
}
.nexus-sca-share-action__icon svg { display: block; }
.nexus-sca-share-action__label,
.nexus-sca-share-modal__social-btn .nexus-sca-share-action__label {
  font-size: 11px;
  line-height: 1.3;
  color: #666;
  text-align: center;
  max-width: 80px;
}
.nexus-sca-share-action:disabled { opacity: .45; cursor: not-allowed; }
.nexus-sca-share-action:disabled .nexus-sca-share-action__icon { background: #bbb; }
.nexus-sca-share-modal__social {
  display: contents;
}
.nexus-sca-share-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1300;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.nexus-sca-share-toast[hidden] { display: none !important; }

/* Trang xem link chia sẻ */
.nexus-sca-page--share { padding: 20px 0 48px; }
.nexus-sca-share-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 4px;
}
.nexus-sca-share-head__brand {
  font-weight: 700;
  font-size: 15px;
  color: #1a1a1a;
  text-decoration: none;
}
.nexus-sca-share-head__tag {
  font-size: 11px;
  background: #f0f0f0;
  color: #555;
  padding: 3px 8px;
  border-radius: 10px;
}
.nexus-sca-share-card {
  max-width: 1120px;
  margin: 0 auto;
  border: 1px solid #ececec;
  border-radius: 14px;
  background: #fff;
  padding: 20px 18px 24px;
  box-sizing: border-box;
}
@media (min-width: 900px) {
  .nexus-sca-share-card {
    padding: 28px 36px 32px;
  }
  .nexus-sca-share-card__title {
    font-size: 22px;
  }
}
.nexus-sca-share-card__title {
  font-size: 20px;
  margin: 0 0 6px;
  color: #1a1a1a;
}
.nexus-sca-share-card__meta {
  font-size: 12px;
  color: #888;
  margin: 0 0 16px;
}
.nexus-sca-share-msgs { margin-bottom: 16px; }
/* Share đọc full bề ngang thẻ — không kế thừa cột chat 48rem */
.nexus-sca-page--share .nexus-sca-msg__wrap {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  margin: 0;
}
.nexus-sca-page--share .nexus-sca-msg--user .nexus-sca-msg__body {
  max-width: min(42rem, 100%);
}
.nexus-sca-share-card__foot {
  font-size: 11px;
  color: #999;
  margin: 16px 0 0;
  line-height: 1.45;
}
.nexus-sca-share-card__cta { margin: 16px 0 0; }
.nexus-sca-share-expired {
  max-width: 480px;
  margin: 40px auto;
  text-align: center;
  padding: 24px;
}
.nexus-sca-share-expired h1 { font-size: 20px; margin-bottom: 8px; }

/* Sidebar — Cài đặt */
.nexus-sca-sidebar__block--settings {
  margin-top: auto;
  padding-top: 14px;
}
.nexus-sca-settings-open {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #f7f7f7;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.nexus-sca-settings-open__icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #eee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nexus-sca-settings-open__label { flex: 1; min-width: 0; }
.nexus-sca-settings-open__chev {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}
.nexus-sca-settings-open:hover {
  background: #f0f0f0;
  border-color: #ddd;
}
.nexus-sca-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.nexus-sca-settings-modal[hidden] { display: none !important; }
.nexus-sca-settings-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.nexus-sca-settings-modal__panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 12px;
  padding: 20px 18px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.nexus-sca-settings-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #666;
  cursor: pointer;
}
.nexus-sca-settings-modal__title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
}
.nexus-sca-delete-all-chats {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #f0c4c4;
  border-radius: 8px;
  background: #fff;
  color: #b42318;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.nexus-sca-delete-all-chats:hover:not(:disabled) {
  background: #fef3f2;
  border-color: #f04438;
}
.nexus-sca-delete-all-chats:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.nexus-sca-share-msgs .nexus-sca-md-code,
.nexus-sca-share-preview .nexus-sca-md-code {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #1a1a1a;
  background: #f3f4f6;
}

/* ── SCA UX polish: modals, plans, intro, contact ── */
#lien-he { scroll-margin-top: 72px; }

.nexus-sca-intro-hero__bubble span {
  animation: sca-intro-dot 1.15s ease-in-out infinite;
}
.nexus-sca-intro-hero__bubble span:nth-child(1) { animation-delay: 0s; }
.nexus-sca-intro-hero__bubble span:nth-child(2) { animation-delay: .14s; }
.nexus-sca-intro-hero__bubble span:nth-child(3) { animation-delay: .28s; }

@keyframes sca-intro-dot {
  0%, 70%, 100% { opacity: .35; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

@media (hover: hover) {
  .nexus-sca-plan {
    transition: transform .22s var(--nexus-ease-out, ease),
      box-shadow .22s ease,
      border-color .22s ease;
  }
  .nexus-sca-plan:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
  }
  .nexus-sca-plan--highlight:hover {
    box-shadow: 0 12px 32px rgba(139, 41, 66, .14);
  }
}

.nexus-sca-share-modal__backdrop,
.nexus-sca-settings-modal__backdrop,
.nexus-sca-fb-modal__backdrop {
  opacity: 0;
  transition: opacity .25s ease;
}
.nexus-sca-share-modal__panel,
.nexus-sca-settings-modal__panel,
.nexus-sca-fb-modal__panel {
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transition: opacity .28s var(--nexus-ease-out, ease), transform .28s var(--nexus-ease-out, ease);
}
.nexus-sca-share-modal.is-visible .nexus-sca-share-modal__backdrop,
.nexus-sca-settings-modal.is-visible .nexus-sca-settings-modal__backdrop,
.nexus-sca-fb-modal.is-visible .nexus-sca-fb-modal__backdrop {
  opacity: 1;
}
.nexus-sca-share-modal.is-visible .nexus-sca-share-modal__panel,
.nexus-sca-settings-modal.is-visible .nexus-sca-settings-modal__panel,
.nexus-sca-fb-modal.is-visible .nexus-sca-fb-modal__panel {
  opacity: 1;
  transform: none;
}

.nexus-sca-contact__feedback {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
}
.nexus-sca-contact__feedback:not([hidden]) {
  opacity: 1;
  transform: none;
}

/* ── Guest SEO landing (không full chat) ── */
body.nexus-auth-sca.nexus-sca-mode-chat-guest {
  background: #fafafa;
}
.nexus-sca-page--guest-seo {
  padding-top: 8px;
  background-color: #fafafa;
  background-image: radial-gradient(
    ellipse 90% 55% at 50% -10%,
    rgba(150, 0, 0, 0.04),
    transparent 58%
  );
  background-repeat: no-repeat;
}
.nexus-sca-page--guest-seo .nexus-sca-wrap--marketing {
  padding-left: 16px;
  padding-right: 16px;
}
.nexus-sca-page--guest-seo .nexus-sca-cta--bottom .nexus-auth-btn {
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease, border-color 220ms ease;
}
.nexus-sca-page--guest-seo .nexus-sca-cta--bottom .nexus-auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Scroll fade-in (SaaS micro-motion) */
.nexus-sca-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.nexus-sca-reveal.is-in {
  opacity: 1;
  transform: none;
}
.nexus-sca-hero--guest.nexus-sca-reveal {
  transition-duration: 0.4s;
}
@media (prefers-reduced-motion: reduce) {
  .nexus-sca-reveal,
  .nexus-sca-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Guest hero — khớp hình mẫu: kicker + pill 1 dòng + nhãn đen + divider stats */
/* Specificity cao hơn .nexus-sca-hero--marketing (padding 28px đang phá layout) */
.nexus-sca-hero.nexus-sca-hero--marketing.nexus-sca-hero--guest {
  padding: 10px 4px 12px;
  margin-bottom: 0;
  text-align: center;
  border-bottom: 0;
  box-sizing: border-box;
  background: transparent;
}
.nexus-sca-hero--guest h1,
.nexus-sca-hero.nexus-sca-hero--marketing.nexus-sca-hero--guest h1 {
  max-width: none;
  width: 100%;
  margin: 0 auto 12px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 2.5rem; /* 40px */
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nexus-sca-hero__h1-line {
  display: block;
}
.nexus-sca-hero__h1-line--accent {
  color: #960000;
  font-weight: 700;
}
.nexus-sca-hero__h1-line--dark {
  color: #111;
  font-weight: 700;
  white-space: normal;
}
.nexus-sca-hero--guest .nexus-sca-hero__pill {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #960000;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}
@media (max-width: 359px) {
  .nexus-sca-hero--guest .nexus-sca-hero__pill {
    font-size: 11.5px;
    padding: 8px 10px;
  }
}
.nexus-sca-hero--guest .nexus-sca-hero__values {
  list-style: none;
  margin: 0 auto 8px;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  border: 0;
  background: transparent;
}
.nexus-sca-hero--guest .nexus-sca-hero__values li {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 11.5px;
  font-weight: 600;
  color: #333; /* mẫu: chữ xám đậm, icon đỏ */
  border-right: 1px solid #e5e5e5;
}
.nexus-sca-hero--guest .nexus-sca-hero__values li:last-child {
  border-right: 0;
}
.nexus-sca-hero--guest .nexus-sca-hero__value-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #960000;
  line-height: 0;
}
.nexus-sca-hero--guest .nexus-ui-icon--guest-value {
  width: 28px;
  height: 28px;
  display: block;
}
.nexus-sca-hero--guest .nexus-sca-stats {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 2px 4px;
  width: 100%;
  max-width: none;
  margin: 0 auto 12px;
  padding-top: 10px;
  border-top: 1px solid #ececec;
  flex-wrap: nowrap;
}
.nexus-sca-hero--guest .nexus-sca-stats li {
  min-width: 0;
  padding: 0;
  color: #444;
}
.nexus-sca-hero--guest .nexus-sca-stats strong {
  color: #960000;
  font-size: 20px;
  font-weight: 700;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.15;
}
.nexus-sca-hero--guest .nexus-sca-stats span {
  display: block;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.25;
  color: #333;
  letter-spacing: -0.02em;
}
.nexus-sca-hero--guest .nexus-sca-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  max-width: none;
  width: 100%;
  margin: 0 auto;
}
.nexus-sca-hero--guest .nexus-sca-hero__actions .nexus-auth-btn,
.nexus-sca-hero--guest .nexus-sca-hero__cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  min-height: 44px;
  border-radius: 8px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 14px;
  box-sizing: border-box;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease, border-color 220ms ease;
}
.nexus-sca-hero--guest .nexus-sca-hero__actions .nexus-auth-btn:hover,
.nexus-sca-hero--guest .nexus-sca-hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.nexus-sca-hero--guest .nexus-sca-hero__actions .nexus-auth-btn--ghost {
  background: #fff;
  color: #222;
  border: 1px solid #c8c8c8;
}
.nexus-sca-hero--guest .nexus-sca-hero__actions .nexus-auth-btn--ghost:hover {
  border-color: #a3a3a3;
  background: #fff;
}
.nexus-sca-hero--guest .nexus-sca-hero__cta-ico {
  display: inline-flex;
  flex: 0 0 auto;
  line-height: 0;
}
.nexus-sca-hero--guest .nexus-ui-icon--guest-cta {
  width: 18px;
  height: 18px;
  display: block;
}
.nexus-sca-hero--guest .nexus-auth-btn .nexus-ui-icon--guest-cta {
  color: #fff;
}
.nexus-sca-hero--guest .nexus-auth-btn--ghost .nexus-ui-icon--guest-cta {
  color: #222; /* mẫu: icon đen, không đỏ */
}
.nexus-sca-hero--guest .nexus-sca-hero__trust {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: #666;
}
.nexus-sca-hero--guest .nexus-sca-hero__motto {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #960000;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.nexus-sca-hero--guest + .nexus-sca-guest-diff {
  margin-top: 16px;
}
@media (min-width: 400px) {
  .nexus-sca-hero--guest .nexus-sca-hero__pill {
    font-size: 13.5px;
    padding: 10px 18px;
  }
  .nexus-sca-hero--guest .nexus-sca-stats span {
    font-size: 11.5px;
    letter-spacing: -0.01em;
  }
}
@media (min-width: 480px) {
  .nexus-sca-page--guest-seo .nexus-sca-wrap--marketing {
    padding-left: 20px;
    padding-right: 20px;
  }
  .nexus-sca-hero.nexus-sca-hero--marketing.nexus-sca-hero--guest {
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 8px;
    padding-right: 8px;
  }
  .nexus-sca-hero.nexus-sca-hero--marketing.nexus-sca-hero--guest h1 {
    font-size: 2.75rem; /* 44px */
  }
}
/* Desktop: cột giữa giữ tỉ lệ mẫu mobile */
@media (min-width: 768px) {
  .nexus-sca-page--guest-seo .nexus-sca-wrap--marketing {
    max-width: 960px;
    padding-left: 32px;
    padding-right: 32px;
  }
  .nexus-sca-hero.nexus-sca-hero--marketing.nexus-sca-hero--guest {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    padding: 24px 0 16px;
  }
  .nexus-sca-hero.nexus-sca-hero--marketing.nexus-sca-hero--guest h1 {
    font-size: 3.25rem; /* 52px */
    margin-bottom: 14px;
  }
  .nexus-sca-hero--guest .nexus-sca-hero__pill {
    margin-bottom: 14px;
    padding: 10px 20px;
    font-size: 14px;
  }
  .nexus-sca-hero--guest .nexus-sca-hero__values {
    margin-bottom: 10px;
  }
  .nexus-sca-hero--guest .nexus-sca-hero__values li {
    font-size: 12.5px;
    gap: 6px;
    color: #333;
  }
  .nexus-sca-hero--guest .nexus-ui-icon--guest-value {
    width: 30px;
    height: 30px;
  }
  .nexus-sca-hero--guest .nexus-sca-stats {
    margin-bottom: 14px;
    padding-top: 12px;
    gap: 6px;
  }
  .nexus-sca-hero--guest .nexus-sca-stats strong {
    font-size: 22px;
  }
  .nexus-sca-hero--guest .nexus-sca-stats span {
    font-size: 12px;
    letter-spacing: 0;
  }
  .nexus-sca-hero--guest .nexus-sca-hero__actions .nexus-auth-btn,
  .nexus-sca-hero--guest .nexus-sca-hero__cta {
    min-height: 46px;
    font-size: 15px;
  }
  .nexus-sca-hero--guest .nexus-sca-hero__trust {
    margin-top: 14px;
    font-size: 13px;
  }
  .nexus-sca-hero--guest .nexus-sca-hero__motto {
    font-size: 15px;
  }
  .nexus-sca-guest-diff {
    margin: 12px 0 40px;
    padding: 36px 32px 32px;
    border-radius: 14px;
  }
  .nexus-sca-hero--guest + .nexus-sca-guest-diff {
    margin-top: 10px;
  }
  .nexus-sca-guest-diff__lead {
    max-width: 40rem;
    font-size: 16px;
    margin-bottom: 28px;
  }
  .nexus-sca-guest-diff__list {
    gap: 20px;
  }
  .nexus-sca-guest-diff__list li {
    padding: 20px 18px 18px;
  }
  .nexus-sca-guest-diff__list strong {
    font-size: 16px;
    color: #1a1a1a;
  }
}
@media (min-width: 1100px) {
  .nexus-sca-page--guest-seo .nexus-sca-wrap--marketing {
    max-width: 1040px;
  }
  .nexus-sca-hero.nexus-sca-hero--marketing.nexus-sca-hero--guest {
    max-width: 560px;
    padding-top: 28px;
  }
  .nexus-sca-hero.nexus-sca-hero--marketing.nexus-sca-hero--guest h1 {
    font-size: 3.5rem; /* 56px */
  }
}
.nexus-sca-hero--situation {
  text-align: left;
  border-bottom: none;
  padding-bottom: 12px;
}
.nexus-sca-hero--situation h1 {
  margin-left: 0;
  margin-right: 0;
  max-width: 40rem;
}
.nexus-sca-hero--situation .nexus-sca-lead {
  margin-left: 0;
  text-align: left;
}
.nexus-sca-hero--situation .nexus-sca-hero__actions {
  justify-content: flex-start;
}
.nexus-sca-situation-seo {
  margin: 8px 0 28px;
}
.nexus-sca-situation-seo__intro {
  font-size: 15px;
  line-height: 1.65;
  color: #333;
  margin: 0 0 20px;
  max-width: 40rem;
}

.nexus-sca-guest-diff {
  margin: 16px 0 28px;
  padding: 28px 20px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
}
.nexus-sca-guest-diff__lead {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 22px;
  font-size: 15px;
  line-height: 1.6;
  color: #444;
}
.nexus-sca-guest-diff__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 769px) {
  .nexus-sca-guest-diff__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}
.nexus-sca-guest-diff__list li {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.nexus-sca-guest-diff__list li:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
  border-color: #e5e7eb;
}
.nexus-sca-guest-diff__list strong {
  display: block;
  font-size: 15px;
  color: #1a365d;
  margin-bottom: 6px;
}
.nexus-sca-guest-diff__list span {
  display: block;
  font-size: 13.5px;
  line-height: 1.55;
  color: #555;
}

.nexus-sca-guest-feats {
  margin: 36px 0 8px;
}
.nexus-sca-guest-feats__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}
@media (min-width: 640px) {
  .nexus-sca-guest-feats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.nexus-sca-guest-feat {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.nexus-sca-guest-feat:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}
.nexus-sca-guest-feat h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #1a365d;
}
.nexus-sca-guest-feat p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #555;
}

.nexus-sca-guest-audience {
  margin: 36px 0 28px;
}
.nexus-sca-guest-audience__list {
  list-style: none;
  margin: 12px auto 0;
  padding: 0;
  max-width: 40rem;
}
.nexus-sca-guest-audience__list li {
  position: relative;
  padding: 10px 12px 10px 28px;
  font-size: 14.5px;
  line-height: 1.5;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}
.nexus-sca-guest-audience__list li:before {
  content: '';
  position: absolute;
  left: 8px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8b2942;
}
.nexus-sca-guest-audience__list li:last-child {
  border-bottom: 0;
}

.nexus-sca-guest-pricing {
  margin: 40px 0 24px;
}
.nexus-sca-guest-pricing__lead {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 20px;
  font-size: 15px;
  color: #555;
}

/*
 * Guest marketing + chat: topbar/container full-bleed như member đã đăng nhập.
 * Không dùng margin 100vw (cắt mép trái). Hero giữ max-width hẹp sẵn có.
 */
body.nexus-auth-sca.nexus-sca-mode-chat-guest {
  overflow-x: hidden;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-auth-main {
  overflow-x: hidden;
  padding: 0 0 28px;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing {
  padding-left: 0;
  padding-right: 0;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing > .container.nexus-sca-container {
  max-width: none !important;
  width: 100%;
  padding-left: 12px;
  padding-right: 12px;
  overflow-x: hidden;
  box-sizing: border-box;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--guest-seo .nexus-sca-wrap--marketing {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
/* Section marketing (không phải chat): cột đọc ~960 — không đụng header.hero */
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-wrap--marketing > section:not(.nexus-sca-try-chat) {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-wrap--marketing > .nexus-sca-cta {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
.nexus-sca-try-chat {
  --sca-try-chat-h: min(90vh, 980px);
  width: 100%;
  max-width: none;
  margin: 20px 0 36px;
  padding: 0;
  position: relative;
  box-sizing: border-box;
}
.nexus-sca-try-chat__head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 12px;
}
.nexus-sca-try-chat__title {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}
.nexus-sca-try-chat__lead {
  display: none;
}
.nexus-sca-try-chat__shell {
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.06);
  scroll-margin-top: max(12px, calc((100vh - var(--sca-try-chat-h)) / 2));
  scroll-margin-bottom: max(12px, calc((100vh - var(--sca-try-chat-h)) / 2));
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing .nexus-sca-try-chat__shell .nexus-sca-app {
  min-height: 640px;
  height: var(--sca-try-chat-h);
  max-height: var(--sca-try-chat-h);
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing .nexus-sca-try-chat__shell .nexus-sca-app > .nexus-sca-sidebar,
body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing .nexus-sca-try-chat__shell .nexus-sca-app > .nexus-sca-main {
  min-height: 0;
  max-height: 100%;
  height: 100%;
}
@media (min-width: 1025px) {
  body.nexus-auth-sca .nexus-auth-topbar .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing > .container.nexus-sca-container {
    padding-left: 16px;
    padding-right: 16px;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing .nexus-sca-try-chat__shell .nexus-sca-chat__head {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: auto;
    padding: 8px 14px;
    border-bottom: 1px solid #ececec;
    background: #fff;
    pointer-events: auto;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing .nexus-sca-try-chat__shell .nexus-sca-chat__brand-mark {
    display: inline-flex !important;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing .nexus-sca-try-chat__shell strong.nexus-sca-chat__brand-mark {
    display: inline !important;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing .nexus-sca-try-chat__shell .nexus-sca-chat__messages {
    padding-top: 8px;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing .nexus-sca-try-chat__shell .nexus-sca-decision__cluster {
    top: 0;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing .nexus-sca-try-chat__shell .nexus-sca-chat {
    --sca-chat-col-pad: 16px;
    --sca-chat-col-max: min(96rem, calc(100% - 2 * var(--sca-chat-col-pad)));
    --sca-composer-max: min(80rem, calc(100% - 2 * var(--sca-chat-col-pad)));
  }
}
@media (max-width: 900px) {
  .nexus-sca-try-chat {
    --sca-try-chat-h: min(84vh, 820px);
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing .nexus-sca-try-chat__shell .nexus-sca-app {
    min-height: 480px;
  }
  body.nexus-auth-sca .nexus-auth-topbar .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  body.nexus-auth-sca.nexus-sca-mode-chat-guest .nexus-sca-page--marketing > .container.nexus-sca-container {
    padding-left: 10px;
    padding-right: 10px;
  }
}
.nexus-sca-guest-note {
  margin-top: 4px;
}
.nexus-sca-guest-note a {
  font-size: 13px;
  font-weight: 600;
  color: #8b2942;
  text-decoration: none;
}
.nexus-sca-guest-note a:hover {
  text-decoration: underline;
}

/* Soft-gate hỏi thử (legacy) */
.nexus-sca-try {
  margin: 36px 0 28px;
  scroll-margin-top: 72px;
}
.nexus-sca-try__card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 42%);
  padding: 22px 20px 20px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.04);
}
.nexus-sca-try__title {
  margin: 0 0 6px;
  font-size: 20px;
  color: #1a365d;
  text-align: center;
}
.nexus-sca-try__lead {
  margin: 0 auto 16px;
  max-width: 34rem;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
}
.nexus-sca-try__starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}
.nexus-sca-try__chip {
  border: 1px solid #d0d7e2;
  background: #fff;
  color: #1e293b;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  line-height: 1.35;
  cursor: pointer;
  max-width: 100%;
  text-align: left;
  transition: transform 220ms ease, border-color 220ms ease, color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}
.nexus-sca-try__chip:hover {
  border-color: #8b2942;
  color: #8b2942;
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.nexus-sca-try__form {
  max-width: 40rem;
  margin: 0 auto;
}
.nexus-sca-try__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 88px;
  resize: vertical;
  border: 1px solid #d0d7e2;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.45;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}
.nexus-sca-try__input:focus {
  outline: none;
  border-color: #8b2942;
  box-shadow: 0 0 0 3px rgba(139, 41, 66, 0.12);
}
.nexus-sca-try__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 12px;
}
.nexus-sca-try__hint {
  font-size: 12.5px;
  color: #64748b;
}
.nexus-sca-try__gate {
  margin-top: 18px;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}
.nexus-sca-try__preview {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 18px 56px;
  background: #fff;
  margin-bottom: 12px;
  text-align: left;
}
.nexus-sca-try__preview-kicker {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b2942;
}
.nexus-sca-try__preview-row {
  margin-bottom: 14px;
}
.nexus-sca-try__preview-label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 5px;
}
.nexus-sca-try__preview-topic {
  display: block;
  font-size: 17px;
  font-weight: 650;
  color: #1a365d;
  line-height: 1.35;
}
.nexus-sca-try__preview-focus {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #334155;
}
.nexus-sca-try__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nexus-sca-try__term {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 12px;
  color: #334155;
}
.nexus-sca-try__preview-outline {
  margin-top: 2px;
  margin-bottom: 14px;
}
.nexus-sca-try__steps {
  margin: 6px 0 0;
  padding: 0 0 0 1.2rem;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
}
.nexus-sca-try__steps li {
  margin-bottom: 7px;
}
.nexus-sca-try__steps li.is-locked {
  color: #94a3b8;
  list-style: none;
  margin-left: -1.2rem;
  padding-left: 1.2rem;
  position: relative;
  filter: blur(0.2px);
  opacity: 0.72;
}
.nexus-sca-try__steps li.is-locked:before {
  content: '···';
  position: absolute;
  left: 0;
  color: #94a3b8;
  letter-spacing: -1px;
}
.nexus-sca-try__preview-next {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}
.nexus-sca-try__next-list {
  margin: 6px 0 0;
  padding: 0 0 0 1.2rem;
  color: #475569;
  font-size: 13.5px;
  line-height: 1.5;
}
.nexus-sca-try__next-list li {
  margin-bottom: 5px;
}
.nexus-sca-try__preview-lock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 16px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 55%);
  text-align: center;
  pointer-events: none;
}
.nexus-sca-try__preview-lock p {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
}
.nexus-sca-try__gate-box {
  border: 1px solid #e8e8e8;
  background: #fafafa;
  border-radius: 12px;
  padding: 16px 18px;
  text-align: center;
}
.nexus-sca-try__gate-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 650;
  color: #1a365d;
}
.nexus-sca-try__gate-text {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #555;
}
.nexus-sca-try__gate-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

@media (max-width: 768px) {
  .nexus-sca-try__card {
    padding: 18px 14px 16px;
    border-radius: 12px;
  }
  .nexus-sca-try__chip {
    font-size: 12px;
  }
  .nexus-sca-guest-diff {
    padding: 20px 14px;