/* PulseDeck feed alignment lock.
   Loaded after the dashboard reference CSS so feed card controls cannot
   intrude into body copy even when older override blocks are present. */
@media (min-width: 901px) {
  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-card {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 60px minmax(0, 1fr) 158px !important;
    column-gap: 22px !important;
    align-items: center !important;
    min-height: 114px !important;
    height: 114px !important;
    max-height: 114px !important;
    padding: 18px !important;
    overflow: hidden !important;
    border-radius: 16px !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-avatar {
    width: 56px !important;
    height: 56px !important;
    align-self: center !important;
    justify-self: center !important;
    flex: 0 0 56px !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-copy,
  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-card > div:not(.hud-feed-avatar):not(.hud-feed-side) {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: center !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-copy > *,
  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-card h3,
  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-card p {
    max-width: 100% !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-card h3 {
    margin: 2px 0 5px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-card p:not(.hud-feed-author) {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-side {
    box-sizing: border-box !important;
    grid-column: 3 !important;
    width: 158px !important;
    min-width: 158px !important;
    max-width: 158px !important;
    height: 78px !important;
    align-self: center !important;
    justify-self: stretch !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 42px !important;
    align-items: center !important;
    justify-items: end !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 0 0 18px !important;
    border-left: 1px solid #d9e6f3 !important;
    overflow: hidden !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-chip {
    display: none !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-side strong {
    grid-column: 1 !important;
    justify-self: end !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: right !important;
    font-size: clamp(18px, 1.35vw, 21px) !important;
    line-height: 1 !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-side small {
    grid-column: 2 !important;
    justify-self: end !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 1320px) and (min-width: 901px) {
  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-card {
    grid-template-columns: 58px minmax(0, 1fr) 152px !important;
    column-gap: 20px !important;
    padding-inline: 16px !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-side {
    width: 152px !important;
    min-width: 152px !important;
    max-width: 152px !important;
    padding-left: 16px !important;
  }
}

@media (max-width: 900px) {
  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-card {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 12px 14px !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 16px !important;
    overflow: hidden !important;
    border-radius: 16px !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-copy,
  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-card > div:not(.hud-feed-avatar):not(.hud-feed-side) {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-side {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 42px !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 0 !important;
    border-left: 0 !important;
    overflow: hidden !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-side strong {
    justify-self: start !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: left !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-side small {
    justify-self: end !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
  }
}

/* v41: move AI return ranking into the left rail and give the strategy feed
   the vertical space previously occupied by the main ranking panel. */
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail {
  box-sizing: border-box !important;
  display: block !important;
  min-height: calc(100svh - 126px) !important;
  padding: 14px !important;
  overflow: hidden auto !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail::before,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail::after,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail-group,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail-item {
  display: none !important;
  content: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail-ranking {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "rank-head"
    "rank-tabs"
    "rank-list" !important;
  grid-template-rows: auto auto auto !important;
  align-content: start !important;
  gap: 12px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head {
  grid-area: rank-head !important;
  display: grid !important;
  gap: 5px !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 2px 2px !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head h2 {
  grid-area: auto !important;
  justify-self: start !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  color: var(--pd-text) !important;
  font-size: 20px !important;
  line-height: 1.12 !important;
  letter-spacing: -0.055em !important;
  white-space: normal !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head h2::after,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head p::after {
  content: none !important;
  display: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head p {
  grid-area: auto !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  justify-self: start !important;
  color: var(--pd-muted) !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-tabs {
  grid-area: rank-tabs !important;
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 36px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  margin: 0 !important;
  padding: 3px !important;
  border-radius: 12px !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-tabs button {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 6px !important;
  border-radius: 9px !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-radar-strip {
  display: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: start !important;
  justify-items: stretch !important;
  gap: 6px !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head h2,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head p {
  grid-area: auto !important;
  position: static !important;
  inset: auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  justify-self: stretch !important;
  align-self: auto !important;
  transform: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head h2 {
  display: block !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  color: var(--pd-text) !important;
  font-size: 18px !important;
  line-height: 1.22 !important;
  letter-spacing: -0.06em !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head p {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--pd-blue) !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  letter-spacing: 0.08em !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-list {
  grid-area: rank-list !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  margin: 0 !important;
  align-items: stretch !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-row,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-row.is-signal-moving {
  width: 100% !important;
  min-width: 0 !important;
  height: 88px !important;
  min-height: 88px !important;
  max-height: 88px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 13px 14px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-row::before,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-row::after,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-logo,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-mini-chart,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-intel {
  display: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-name,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-row.is-signal-moving .hud-rank-name {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: grid !important;
  gap: 4px !important;
  align-self: end !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-name strong {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--pd-text) !important;
  font-size: 14px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-name em {
  display: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-name small {
  max-width: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--pd-muted) !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-score,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-row.is-signal-moving .hud-rank-score {
  grid-column: 1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-score strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--pd-green) !important;
  font-size: 22px !important;
  line-height: 1 !important;
  letter-spacing: -0.06em !important;
  font-weight: 950 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-score em {
  flex: 0 0 auto !important;
  color: var(--pd-muted) !important;
  font-size: 10px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-score small {
  display: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-workspace {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-workspace > .hud-ranking {
  display: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-panel {
  min-height: calc(100svh - 126px) !important;
  height: calc(100svh - 126px) !important;
  max-height: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-scroll {
  height: calc(100svh - 236px) !important;
  min-height: 620px !important;
  max-height: none !important;
}

@media (max-width: 1240px) {
  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-row {
    height: 82px !important;
    min-height: 82px !important;
  }
}

@media (max-width: 900px) {
  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail {
    position: static !important;
    min-height: 0 !important;
    padding: 12px !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-rank-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-panel {
    min-height: auto !important;
    height: auto !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-feed-scroll {
    height: auto !important;
    min-height: 520px !important;
    max-height: none !important;
  }
}

/* v43: final rail-ranking header lock. Earlier ranking rules were authored
   for the wide top panel, so the moved-left title must not shrink to min-content. */
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  gap: 6px !important;
  min-width: 0 !important;
  width: 100% !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head h2,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head p {
  grid-area: auto !important;
  justify-self: stretch !important;
  align-self: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-rail .hud-ranking .hud-panel-head h2 {
  font-size: 18px !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* v44: turn AI Partner into a pure messenger surface. */
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 12px !important;
  min-height: 260px !important;
  padding: 22px !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-desk-image,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-desk-broadcast,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-status,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-disclaimer {
  display: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-live-chat {
  grid-column: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: minmax(132px, 1fr) 54px !important;
  gap: 12px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-log {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 132px !important;
  max-height: 280px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  overflow-y: auto !important;
  padding: 14px !important;
  border: 1px solid rgba(190, 210, 235, 0.78) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.86)) !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-log:empty::before {
  content: "" !important;
  display: block !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-message {
  width: min(92%, 300px) !important;
  max-width: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  padding: 12px 14px !important;
  border-radius: 18px !important;
  display: grid !important;
  grid-template-rows: auto auto !important;
  gap: 6px !important;
  background: #ffffff !important;
  border: 1px solid rgba(203, 216, 232, 0.92) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-message.is-user-message {
  align-self: flex-end !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #1477ff, #00b5d8) !important;
  border-color: rgba(20, 119, 255, 0.42) !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-message.is-assistant-message {
  align-self: flex-start !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-meta {
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  color: inherit !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-meta span {
  opacity: 0.62 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-text {
  margin: 0 !important;
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  color: inherit !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  letter-spacing: -0.035em !important;
  white-space: pre-line !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-partner-input {
  width: 100% !important;
  height: 54px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 48px !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-partner-input input {
  width: 100% !important;
  min-width: 0 !important;
  height: 54px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(190, 210, 235, 0.88) !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  color: var(--pd-text) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: -0.035em !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-partner-input button {
  width: 48px !important;
  height: 54px !important;
  min-width: 48px !important;
  padding: 0 !important;
  border-radius: 18px !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  color: transparent !important;
  font-size: 0 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-partner-input button::before {
  content: "›" !important;
  color: #ffffff !important;
  font-size: 28px !important;
  line-height: 1 !important;
  transform: translateX(1px) !important;
}

/* v46: make the legal links a slim utility cluster instead of four oversized ticker cards. */
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-replica-bottom {
  grid-template-columns: 126px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  padding-right: 14px !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-replica-bottom nav {
  width: auto !important;
  min-width: 286px !important;
  height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  padding: 0 6px !important;
  border: 1px solid rgba(205, 218, 234, 0.72) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-replica-bottom nav a {
  width: auto !important;
  min-width: 0 !important;
  height: 30px !important;
  padding: 0 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #536277 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.035em !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-replica-bottom nav a:hover,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-replica-bottom nav a:focus-visible {
  color: #1477ff !important;
  background: rgba(20, 119, 255, 0.08) !important;
}

/* v47: remove the top-left HUD brand icon while keeping the text lockup aligned. */
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-logo {
  gap: 0 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-logo-wave {
  display: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-logo-copy {
  margin-left: 0 !important;
}

/* v48: lock market news to signal badges so live RSS thumbnails cannot revive the old card treatment. */
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-news {
  gap: 10px !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead.has-news-thumb {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  min-height: 96px !important;
  height: auto !important;
  gap: 8px 12px !important;
  margin: 0 0 8px !important;
  padding: 14px !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%) !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead::before {
  display: none !important;
  content: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead i,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead i.has-news-image {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  width: 44px !important;
  height: 44px !important;
  display: grid !important;
  place-items: center !important;
  align-self: center !important;
  border: 1px solid rgba(20, 119, 255, 0.22) !important;
  border-radius: 14px !important;
  background: #eef6ff !important;
  color: #1477ff !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  overflow: hidden !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead i img,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list i img {
  display: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead i.has-news-image::before,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list i.has-news-image::before {
  content: "AI" !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead strong,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead em {
  grid-column: 2 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead strong {
  font-size: 15px !important;
  line-height: 1.35 !important;
  -webkit-line-clamp: 2 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead em {
  margin-top: 0 !important;
  color: #008e80 !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list {
  gap: 7px !important;
  grid-template-rows: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list button,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list button.has-news-thumb {
  min-height: 64px !important;
  height: auto !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.84) !important;
  box-shadow: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list i,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list i.has-news-image {
  width: 30px !important;
  height: 30px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(0, 142, 128, 0.2) !important;
  border-radius: 10px !important;
  background: #effdfb !important;
  color: #008e80 !important;
  font-size: 9px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  overflow: hidden !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead i[data-news-accent="teal"],
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list i[data-news-accent="teal"] {
  border-color: rgba(0, 174, 158, 0.24) !important;
  background: #effdfb !important;
  color: #008e80 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead i[data-news-accent="slate"],
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list i[data-news-accent="slate"] {
  border-color: rgba(83, 98, 119, 0.2) !important;
  background: #f4f7fb !important;
  color: #536277 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-market-lead i[data-news-accent="violet"],
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list i[data-news-accent="violet"] {
  border-color: rgba(118, 91, 255, 0.22) !important;
  background: #f4f1ff !important;
  color: #5f49dc !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list strong {
  font-size: 12px !important;
  line-height: 1.32 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-news-list small {
  color: #008e80 !important;
  font-size: 10.5px !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news #hud-news-lead i,
body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news #hud-news-lead i.has-news-image {
  display: grid !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news .hud-news-list button i,
body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news .hud-news-list button i.has-news-image {
  display: grid !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news #hud-news-lead,
body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news #hud-news-lead.has-news-thumb {
  grid-template-columns: 48px minmax(0, 1fr) !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news #hud-news-lead i,
body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news .hud-news-list button i {
  border: 1px solid rgba(20, 119, 255, 0.2) !important;
  background: #eef6ff !important;
  color: #1477ff !important;
  text-indent: 0 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news #hud-news-lead i[data-news-accent="teal"],
body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news .hud-news-list button i[data-news-accent="teal"] {
  border-color: rgba(0, 174, 158, 0.24) !important;
  background: #effdfb !important;
  color: #008e80 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news #hud-news-lead i[data-news-accent="slate"],
body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news .hud-news-list button i[data-news-accent="slate"] {
  border-color: rgba(83, 98, 119, 0.2) !important;
  background: #f4f7fb !important;
  color: #536277 !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news #hud-news-lead i[data-news-accent="violet"],
body[data-pulse-dashboard="light"][data-active-tab="feed"] #hud-market-news .hud-news-list button i[data-news-accent="violet"] {
  border-color: rgba(118, 91, 255, 0.22) !important;
  background: #f4f1ff !important;
  color: #5f49dc !important;
}

/* v51: keep AI Partner long live summaries inside the messenger card. */
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-live-chat {
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-live-chat {
  grid-template-rows: minmax(0, 1fr) 54px !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-log {
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: 132px !important;
  overflow: hidden !important;
  scrollbar-width: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-log::-webkit-scrollbar {
  display: none !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-message {
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-message.is-user-message {
  max-width: min(82%, 260px) !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-meta,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-meta strong,
body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-meta span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-my-desk .hud-chat-text {
  min-width: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: keep-all !important;
  white-space: normal !important;
  letter-spacing: 0 !important;
}

@media (max-width: 900px) {
  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-replica-bottom {
    grid-template-columns: 112px minmax(0, 1fr) !important;
  }

  body[data-pulse-dashboard="light"][data-active-tab="feed"] .hud-replica-bottom nav {
    grid-column: 1 / -1 !important;
    justify-content: center !important;
    min-width: 0 !important;
    width: 100% !important;
  }
}
