:root {
  --finchat-panel: #14161c;
  --finchat-border: #1f2129;
  --finchat-text: #f5f7ff;
  --finchat-muted: #9ea3b5;
  --finchat-accent: #4c6ef5;
  --finchat-accent-rgb: 76, 110, 245;
  --finchat-radius: 22px;
  --finchat-mobile-bottom-nav: 67px;
}

.finchat-root {
  --finchat-bottom-chrome: 0px;
  height: calc(100dvh - 68px - var(--finchat-bottom-chrome));
  min-height: calc(100dvh - 68px - var(--finchat-bottom-chrome));
  padding: 0;
  background: transparent;
  color: var(--finchat-text);
  overflow: hidden;
}

.finchat-shell,
.finchat-sidebar,
.finchat-main,
.finchat-chat-panel {
  min-height: 0;
}

/* Ensure every element respects the sidebar width without overflow */
.finchat-root,
.finchat-root * {
  box-sizing: border-box;
}

body.finchat-modal-open {
  overflow: hidden;
}

body.finchat-sidebar-open {
  overflow: hidden;
}

.finchat-root:not(.finchat-root--chat) .finchat-report-suggestions,
.finchat-root:not(.finchat-root--chat) .finchat-composer {
  display: none !important;
}

.finchat-report-suggestions {
  display: none;
  padding: 0 32px;
  margin-bottom: 12px;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rf-scrollbar-thumb, rgba(148, 163, 184, 0.35)) var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
}

.finchat-report-suggestions::-webkit-scrollbar {
  height: 6px;
}
.finchat-report-suggestions::-webkit-scrollbar-track {
  background: var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  border-radius: 999px;
}
.finchat-report-suggestions::-webkit-scrollbar-thumb {
  background: var(--rf-scrollbar-thumb, rgba(148, 163, 184, 0.35));
  border: 1px solid var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  border-radius: 999px;
  background-clip: padding-box;
}

.finchat-root--chat .finchat-report-suggestions {
  display: flex;
}

.finchat-report-suggestions button {
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: var(--finchat-text);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.finchat-report-suggestions button:hover {
  background: rgba(var(--finchat-accent-rgb),0.15);
  border-color: rgba(var(--finchat-accent-rgb),0.4);
}

.finchat-shell {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(12, 13, 18, 0.85);
  backdrop-filter: blur(24px);
}

@media (max-width: 768px) {
  .finchat-shell {
    backdrop-filter: none;
    background: #0f1118;
  }
}

.finchat-sidebar {
  background: rgba(14, 15, 23, 0.9);
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 260px;
  flex: 0 0 260px;
  border-right: 1px solid var(--finchat-border);
  height: 100%;
  transition: transform 0.3s ease;
}
.finchat-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
}

.finchat-sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.finchat-new-button {
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-weight: 600;
  font-size: 15px;
  background: rgba(var(--finchat-accent-rgb),0.25);
  color: var(--finchat-text);
  cursor: pointer;
}

.finchat-sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
}
.finchat-brand-title {
  margin: 0;
  font-weight: 600;
}
.finchat-brand-sub {
  margin: 0;
  color: var(--finchat-muted);
  font-size: 12px;
}

.finchat-sidebar-body {
  overflow-y: auto;
  padding-right: 6px;
  flex: 1;
  min-height: 0;
  max-height: none;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--rf-scrollbar-thumb, rgba(148, 163, 184, 0.35)) var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
}
.finchat-sidebar-body::-webkit-scrollbar {
  width: 6px;
}
.finchat-sidebar-body::-webkit-scrollbar-track {
  background: var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  border-radius: 999px;
}
.finchat-sidebar-body::-webkit-scrollbar-thumb {
  background: var(--rf-scrollbar-thumb, rgba(148, 163, 184, 0.35));
  border: 1px solid var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  border-radius: 999px;
  background-clip: padding-box;
}

.finchat-chat-item {
  width: 100%;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  text-align: left;
  background: rgba(255,255,255,0.02);
  color: var(--finchat-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}
.finchat-chat-item.is-active {
  border-color: var(--finchat-accent);
  background: rgba(var(--finchat-accent-rgb),0.12);
}
.finchat-chat-item__content {
  flex: 1;
  min-width: 0;
}
.finchat-chat-item__title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.finchat-chat-item__meta {
  font-size: 12px;
  color: var(--finchat-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.finchat-chat-delete {
  border: none;
  background: transparent;
  color: var(--finchat-muted);
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.finchat-chat-delete:hover {
  background: rgba(255,255,255,0.08);
  color: var(--finchat-accent);
}

.finchat-sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--finchat-muted);
}
.finchat-sidebar-footer small {
  display: block;
  color: var(--finchat-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.finchat-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--finchat-accent);
}
.finchat-status-dot.is-offline {
  background: #f5b74c;
}

.finchat-sidebar-nav {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.18rem;
}

.finchat-sidebar-nav-item,
.finchat-tools-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--finchat-text);
  cursor: pointer;
  display: flex;
  font-size: 16px;
  font-weight: 700;
  gap: 14px;
  justify-content: flex-start;
  min-height: 46px;
  padding: 0 13px;
  text-align: left;
  width: 100%;
}

.finchat-sidebar-nav-item:hover,
.finchat-tools-button:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.06);
}

.finchat-sidebar-nav-item[aria-disabled="true"] {
  color: rgba(219, 229, 245, 0.68);
  cursor: default;
}

.finchat-sidebar-nav-item[aria-disabled="true"]:hover {
  background: transparent;
  border-color: transparent;
}

.finchat-sidebar-nav-icon,
.finchat-tools-icon {
  color: var(--finchat-text);
  flex: 0 0 auto;
  height: 24px;
  width: 24px;
}

.finchat-sidebar-nav-item[aria-disabled="true"] .finchat-sidebar-nav-icon {
  color: rgba(219, 229, 245, 0.68);
}

.finchat-main {
  background: var(--finchat-panel);
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
  flex: 1;
  height: 100%;
  overflow: hidden;
  padding: 0;
}

.finchat-tool-panel {
  background: #000000;
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.finchat-tool-panel[hidden],
.finchat-chat-panel[hidden] {
  display: none !important;
}

.finchat-tool-panel-header {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  flex-shrink: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  height: 3.05rem;
  min-height: 3.05rem;
  padding: 0 1.25rem;
  background: #000000;
}

.finchat-tool-panel-left,
.finchat-tool-panel-center,
.finchat-tool-panel-right {
  align-items: center;
  display: flex;
  min-width: 0;
}

.finchat-tool-panel-left {
  gap: 0.65rem;
  justify-content: flex-start;
}

.finchat-tool-panel-center {
  justify-content: center;
  text-align: center;
}

.finchat-tool-panel-right {
  justify-content: flex-end;
}

.finchat-tool-sidebar-toggle {
  flex: 0 0 auto;
}

.finchat-tool-panel-kicker {
  display: none;
}

.finchat-tool-panel-header h2 {
  color: var(--finchat-text);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finchat-tool-panel-header p[data-role="tool-description"] {
  display: none;
}

.finchat-tool-back {
  background: transparent;
  border: 0;
  color: #dbe1ee;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  white-space: nowrap;
}

.finchat-tool-back:hover {
  color: var(--finchat-text);
}

.finchat-tool-back[hidden] {
  display: none !important;
}

.finchat-tool-close {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.025);
  color: var(--finchat-text);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.42rem;
  font-size: 0.76rem;
  font-weight: 750;
  min-height: 1.9rem;
  padding: 0 0.72rem;
}

.finchat-tool-close svg {
  height: 0.92rem;
  width: 0.92rem;
}

.finchat-tool-close:hover {
  background: rgba(255, 255, 255, 0.075);
}

.finchat-tool-frame-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.finchat-tool-frame {
  background: transparent;
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.finchat-tool-list-panel {
  background: #000000;
  height: 100%;
  overflow-y: auto;
  padding: 18px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--rf-scrollbar-thumb, rgba(148, 163, 184, 0.35)) transparent;
}

.finchat-tool-list-panel[hidden],
.finchat-tool-frame[hidden] {
  display: none !important;
}

.finchat-tools-filters {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(260px, 1.6fr) auto;
  padding-bottom: 22px;
}

.finchat-tools-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0 0 16px;
}

.finchat-tools-summary {
  align-items: center;
  color: #9ca6b8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.86rem;
}

.finchat-tools-summary span:first-child {
  color: #e5eaf4;
}

.finchat-tools-filter-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.7rem;
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.32em;
  padding: 0.55rem 0;
  text-transform: uppercase;
}

.finchat-tools-filter-trigger svg {
  height: 1rem;
  width: 1rem;
}

.finchat-tools-filter-backdrop {
  background: rgba(0, 0, 0, 0.62);
  border: 0;
  bottom: 0;
  cursor: default;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10030;
}

.finchat-tools-filter-backdrop[hidden],
.finchat-tools-filter-drawer[hidden] {
  display: none !important;
}

.finchat-tools-filter-drawer {
  background: #071018;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  bottom: 0;
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.35);
  color: #e5eaf4;
  max-width: min(380px, 92vw);
  padding: 20px;
  position: fixed;
  right: 0;
  top: 0;
  width: 380px;
  z-index: 10040;
}

.finchat-tools-filter-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.finchat-tools-filter-head span {
  color: #aeb8cc;
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.finchat-tools-filter-head button {
  background: transparent;
  border: 0;
  color: #dbe4f0;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.15rem;
}

.finchat-tools-filter-drawer .finchat-tools-filters {
  display: grid;
  grid-template-columns: 1fr;
  padding-bottom: 0;
}

.finchat-tools-filters select,
.finchat-tools-filters input {
  appearance: none;
  background: #03070d;
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #dce3ef;
  font-size: 15px;
  min-height: 46px;
  padding: 0 16px;
}

.finchat-tools-filters select {
  background-image:
    linear-gradient(45deg, transparent 50%, #98a2b8 50%),
    linear-gradient(135deg, #98a2b8 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 12px) 20px;
  background-repeat: no-repeat;
  background-size: 6px 6px;
  padding-right: 34px;
}

.finchat-tools-filters input::placeholder {
  color: #98a2b8;
  opacity: 1;
}

.finchat-tools-filters button {
  background: #160d3c;
  border: 1px solid rgba(120, 86, 255, 0.75);
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
  min-height: 46px;
  min-width: 72px;
  padding: 0 22px;
}

.finchat-tool-table {
  border-top: 0;
  margin-top: 0;
}

.finchat-tools-empty-row {
  color: #aeb8cc;
  padding: 24px 18px;
}

.finchat-tool-table__head,
.finchat-tool-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(160px, 0.55fr) minmax(320px, 2.2fr);
  gap: 28px;
}

.finchat-tool-table__head {
  color: #aeb8cc;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.28em;
  border-top: 0;
  padding: 28px 18px 22px;
  text-transform: uppercase;
}

.finchat-tool-row {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--finchat-text);
  cursor: pointer;
  padding: 24px 18px;
  text-align: left;
  width: 100%;
}

.finchat-tool-row:hover,
.finchat-tool-row.is-active {
  background: rgba(255, 255, 255, 0.035);
}

.finchat-tool-row__title {
  color: var(--finchat-text);
  font-size: 15px;
  font-weight: 700;
}

.finchat-tool-row__category,
.finchat-tool-row__info {
  color: #c3cad8;
  font-size: 15px;
  line-height: 1.45;
}

.finchat-tools-empty {
  color: var(--finchat-muted);
  margin: 0;
}

.finchat-home {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.finchat-hero {
  text-align: center;
  max-width: 900px;
}
.finchat-hero-icon {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  margin: 0 auto 18px;
  background: rgba(var(--finchat-accent-rgb),0.18);
  display: grid;
  place-items: center;
  font-size: 36px;
}
.finchat-hero h1 {
  margin: 0;
  font-size: 36px;
}
.finchat-hero p {
  color: var(--finchat-muted);
  margin: 12px auto 24px;
  max-width: 640px;
}
.finchat-hero-button {
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  background: var(--finchat-accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.finchat-hero-chips {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.finchat-hero-chips button,
.finchat-hero-chips span {
  border: 1px solid var(--finchat-border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  background: transparent;
  color: var(--finchat-text);
}
.finchat-hero-chips button {
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.finchat-hero-chips button:hover {
  border-color: var(--finchat-accent);
  background: rgba(var(--finchat-accent-rgb),0.12);
}

.finchat-chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  min-height: 0;
}

.finchat-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--finchat-border);
  flex-shrink: 0;
}
.finchat-panel-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}
.finchat-panel-heading {
  min-width: 0;
  overflow: hidden;
}
.finchat-panel-heading h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finchat-panel-heading p[data-role="chat-subtitle"] {
  margin: 6px 0 0;
  color: var(--finchat-muted);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finchat-panel-burger {
  width: 44px;
  height: 44px;
  border-radius: 0;
  border: 0;
  background: transparent;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  cursor: pointer;
}
.finchat-panel-burger span {
  width: 100%;
  height: 2px;
  background: var(--finchat-text);
  border-radius: 999px;
}
.finchat-panel-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}
.finchat-panel-header p[data-role="chat-subtitle"] {
  margin: 6px 0 0;
  color: var(--finchat-muted);
  font-size: 0.9rem;
}
.finchat-panel-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
  min-width: max-content;
  background: rgba(15,16,24,0.55);
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
}

.finchat-root--entity-workspace .finchat-panel-actions {
  position: relative;
  z-index: 4;
  isolation: isolate;
  background: rgba(10, 14, 24, 0.98);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.finchat-root--entity-workspace .finchat-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.5rem;
}

.finchat-live-pill {
  background: rgba(var(--finchat-accent-rgb),0.18);
  color: var(--finchat-accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}


.finchat-message-log {
  flex: 1;
  padding: 24px 48px 12px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--rf-scrollbar-thumb, rgba(148, 163, 184, 0.35)) var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  -webkit-overflow-scrolling: touch;
}

.finchat-message-log::-webkit-scrollbar {
  width: 6px;
}

.finchat-message-log::-webkit-scrollbar-track {
  background: var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  border-radius: 999px;
}

.finchat-message-log::-webkit-scrollbar-thumb {
  background: var(--rf-scrollbar-thumb, rgba(148, 163, 184, 0.35));
  border: 1px solid var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  border-radius: 999px;
  background-clip: padding-box;
}

.finchat-suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.finchat-suggestion-chips button {
  border: 1px solid var(--finchat-border);
  border-radius: 999px;
  padding: 6px 14px;
  background: transparent;
  color: var(--finchat-text);
  font-size: 13px;
}

.finchat-empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px 32px;
  gap: 4px;
}
.finchat-empty-copy {
  text-align: center;
  max-width: 460px;
  color: var(--finchat-text);
  line-height: 1.5;
  margin-bottom: 0;
}
.finchat-empty-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 2px;
}
.finchat-empty-text {
  margin: 4px 0;
  color: var(--finchat-muted);
}
.finchat-empty-button {
  margin-top: 2px;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--finchat-accent);
  color: #fff;
  cursor: pointer;
  align-self: center;
}
.finchat-empty-suggestions {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 12px;
  row-gap: 12px;
}
.finchat-suggestion-button {
  border: 1px solid var(--finchat-border);
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.04);
  color: var(--finchat-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.finchat-suggestion-button:hover {
  border-color: var(--finchat-accent);
  background: rgba(var(--finchat-accent-rgb),0.12);
}
.finchat-suggestion-emoji {
  font-size: 16px;
}
.finchat-suggestion-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finchat-report-suggestions {
  display: none;
  padding: 14px 48px 12px;
  margin-bottom: 6px;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rf-scrollbar-thumb, rgba(148, 163, 184, 0.35)) var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  position: relative;
  z-index: 2;
}

.finchat-report-suggestions::before {
  content: '';
  position: absolute;
  top: -26px;
  left: 48px;
  right: 48px;
  height: 30px;
  background: linear-gradient(180deg, rgba(8,9,12,0.95), rgba(8,9,12,0));
  pointer-events: none;
}
.finchat-report-suggestions::-webkit-scrollbar {
  height: 6px;
}
.finchat-report-suggestions::-webkit-scrollbar-track {
  background: var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  border-radius: 999px;
}
.finchat-report-suggestions::-webkit-scrollbar-thumb {
  background: var(--rf-scrollbar-thumb, rgba(148, 163, 184, 0.35));
  border: 1px solid var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  border-radius: 999px;
  background-clip: padding-box;
}
.finchat-root--chat .finchat-report-suggestions {
  display: flex;
}
.finchat-report-suggestions button {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(21,22,28,0.55);
  color: var(--finchat-text);
  padding: 8px 16px;
  border-radius: 18px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.35);
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.finchat-report-suggestions button:hover {
  background: rgba(var(--finchat-accent-rgb),0.22);
  border-color: rgba(var(--finchat-accent-rgb),0.45);
  transform: translateY(-1px);
}
.finchat-report-suggestions button:active {
  transform: translateY(0);
}

.finchat-composer {
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
  width: 100%;
  padding: 0 48px calc(20px + env(safe-area-inset-bottom, 0px));
}
.finchat-composer-input {
  flex: 1;
  max-width: 900px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(20,22,31,0.9);
  padding: 12px 18px 12px;
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.35);
  position: relative;
  padding-right: 74px;
}
.finchat-composer-label {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}
.finchat-composer textarea {
  width: 100%;
  border-radius: 18px;
  border: none;
  background: transparent;
  padding: 6px 0 2px;
  min-height: 40px;
  max-height: 160px;
  overflow-y: auto;
  color: var(--finchat-text);
  resize: none;
  line-height: 1.4;
}

.finchat-composer textarea::placeholder {
  color: rgba(245, 248, 255, 0.78);
  opacity: 1;
}

.finchat-composer textarea:focus {
  outline: none;
}
.finchat-char-counter {
  position: absolute;
  top: 14px;
  right: 74px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.finchat-send-button {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, rgba(111,139,255,0.98), rgba(76,110,245,0.98));
  color: #fff;
  box-shadow: 0 14px 30px rgba(76,110,245,0.35);
  position: absolute;
  bottom: 14px;
  right: 16px;
  display: grid;
  place-items: center;
}

.finchat-send-button svg {
  width: 22px;
  height: 22px;
}

.finchat-send-button:disabled {
  background: linear-gradient(135deg, rgba(111,139,255,0.45), rgba(76,110,245,0.45));
  box-shadow: none;
}
.finchat-send-button {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, #6f8bff, #4c6ef5);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 24px rgba(76,110,245,0.35);
  flex-shrink: 0;
}
.finchat-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.finchat-send-button:not(:disabled):hover {
  opacity: 0.95;
}
.finchat-send-button svg {
  width: 18px;
  height: 18px;
}

/* message + blocks */
.finchat-message {
  display: flex;
  margin-bottom: 16px;
}
.finchat-message--user {
  justify-content: flex-end;
}
.finchat-message--assistant {
  justify-content: flex-start;
}
.finchat-bubble {
  max-width: min(520px, 80%);
  border-radius: 18px;
  padding: 16px 18px;
  line-height: 1.5;
  background: rgba(255,255,255,0.08);
}
.finchat-message--user .finchat-bubble {
  background: var(--finchat-accent);
  color: #f5f7ff;
}
.finchat-bubble-text {
  white-space: pre-wrap;
}
.finchat-bubble-text--hidden {
  display: none;
}
.finchat-message--blocks-only .finchat-bubble,
.finchat-bubble--blocks-only {
  background: transparent;
  padding: 0;
}
.finchat-message--blocks-only .finchat-block-container,
.finchat-bubble--blocks-only .finchat-block-container {
  margin-top: 0;
}
.finchat-block-container {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.finchat-block-card {
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--finchat-border);
}

.finchat-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 17, 34, 0.28);
  backdrop-filter: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 55;
}

.finchat-sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.finchat-toast {
  position: fixed;
  right: 32px;
  bottom: 32px;
  background: rgba(12,14,18,0.95);
  border: 1px solid var(--finchat-border);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--finchat-text);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 90;
}
.finchat-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.finchat-toast[data-tone="success"] {
  border-color: #22c55e;
}
.finchat-toast[data-tone="error"] {
  border-color: #f5b74c;
}
.finchat-toast[data-tone="info"] {
  border-color: var(--finchat-accent);
}
.finchat-block-title {
  font-weight: 600;
  margin-bottom: 8px;
}
.finchat-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px,1fr));
  gap: 12px;
}
.finchat-kpi-card {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--finchat-border);
}
.finchat-chart {
  width: 100%;
  height: 220px;
  margin-top: 6px;
  position: relative;
}
.finchat-chart canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.finchat-chart-empty {
  font-size: 13px;
  color: var(--finchat-muted);
}
.finchat-kpi-label {
  font-size: 12px;
  color: var(--finchat-muted);
}
.finchat-kpi-value {
  font-size: 22px;
  margin: 6px 0;
}
.finchat-kpi-delta {
  color: var(--finchat-accent);
  font-size: 12px;
}
.finchat-data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.85rem;
  color: var(--finchat-secondary);
  font-size: 0.9rem;
}
.finchat-data-table th,
.finchat-data-table td {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0.65rem 0.55rem;
  text-align: left;
}
.finchat-data-table th {
  color: var(--finchat-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.finchat-profile-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.45rem 1rem;
  margin-top: 0.85rem;
  color: var(--finchat-muted);
}
.finchat-profile-grid strong {
  color: var(--finchat-primary);
}
.finchat-muted,
.finchat-report-text {
  color: var(--finchat-secondary);
}
.finchat-report-text {
  margin-top: 0.85rem;
  line-height: 1.65;
}
.finchat-news-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--finchat-border);
}
.finchat-news-title {
  margin: 0;
  font-weight: 600;
}
.finchat-news-meta {
  font-size: 12px;
  color: var(--finchat-muted);
}
.finchat-news-summary {
  font-size: 13px;
  color: #cdd0dd;
  margin: 6px 0 0;
}

.finchat-text-block {
  max-width: 58rem;
  color: #f5f7ff;
  font-size: 1rem;
  line-height: 1.68;
}

.finchat-financial-panel,
.finchat-chart-panel,
.finchat-trend-panel,
.finchat-trend-strip,
.finchat-notice-block {
  width: min(100%, 58rem);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.012);
}

.finchat-financial-panel,
.finchat-chart-panel {
  padding: 1rem 1.1rem;
}

.finchat-notice-block {
  padding: 0.85rem 1rem;
  color: #dbe4f4;
  font-size: 0.95rem;
  line-height: 1.55;
}

.finchat-kpi-grid {
  width: min(100%, 58rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.012);
}

.finchat-kpi-card {
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 0;
  background: transparent;
  padding: 0.95rem 1rem;
}

.finchat-kpi-card:last-child {
  border-right: 0;
}

.finchat-kpi-label {
  margin: 0;
  color: #9aa7bd;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.finchat-kpi-value {
  margin: 0.42rem 0 0;
  color: #ffffff;
  font-size: clamp(1.25rem, 2.2vw, 1.85rem);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.finchat-kpi-delta {
  margin-top: 0.55rem;
  color: #8fb2ff;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.finchat-trend-panel {
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) minmax(18rem, 1.55fr);
  align-items: stretch;
  min-height: 8rem;
}

.finchat-trend-strip {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(20rem, 1.6fr);
  align-items: stretch;
  max-width: 48rem;
}

.finchat-trend-strip-head {
  min-width: 0;
  padding: 0.85rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.finchat-trend-strip-head span,
.finchat-trend-strip-table th {
  color: #aab4c7;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.finchat-trend-strip-head strong {
  display: block;
  margin-top: 0.45rem;
  color: #ffffff;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.finchat-trend-strip-head em {
  display: block;
  margin-top: 0.45rem;
  color: #9fb9ff;
  font-size: 0.76rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.finchat-trend-strip-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.finchat-trend-strip-table tr + tr {
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.finchat-trend-strip-table th,
.finchat-trend-strip-table td {
  padding: 0.72rem 0.9rem;
  text-align: left;
}

.finchat-trend-strip-table th {
  width: 34%;
}

.finchat-trend-strip-table td {
  color: #f7f9ff;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.finchat-trend-strip-table td:last-child {
  color: #9fb9ff;
  font-size: 0.76rem;
}

.finchat-trend-strip-table .is-positive {
  color: #bdf6d2;
}

.finchat-trend-strip-table .is-negative {
  color: #ffb9b9;
}

.finchat-trend-primary {
  padding: 1rem 1.1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.finchat-trend-label {
  margin: 0;
  color: #9aa7bd;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.finchat-trend-value {
  margin: 0.5rem 0 0;
  color: #ffffff;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.finchat-trend-period,
.finchat-trend-secondary em {
  display: block;
  margin-top: 0.45rem;
  color: #8fb2ff;
  font-size: 0.78rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.finchat-trend-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finchat-trend-secondary div {
  padding: 1rem 1.1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.finchat-trend-secondary div:last-child {
  border-right: 0;
}

.finchat-trend-secondary span {
  display: block;
  color: #9aa7bd;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.finchat-trend-secondary strong {
  display: block;
  margin-top: 0.5rem;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.finchat-trend-secondary strong.is-positive {
  color: #b7f7d0;
}

.finchat-trend-secondary strong.is-negative {
  color: #ffb4b4;
}

.finchat-chart-panel .finchat-block-title,
.finchat-financial-panel .finchat-block-title {
  margin: 0 0 0.65rem;
  color: #dce6f8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.finchat-chart-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.012);
}

.finchat-chart-stat {
  min-width: 0;
  padding: 0.72rem 0.8rem;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.finchat-chart-stat:last-child {
  border-right: 0;
}

.finchat-chart-stat span,
.finchat-chart-stat em {
  display: block;
  color: #9aa7bd;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.finchat-chart-stat strong {
  display: block;
  margin-top: 0.32rem;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finchat-chart-stat em {
  margin-top: 0.28rem;
  color: #8fb2ff;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.finchat-chart-panel .finchat-chart {
  height: 17rem;
  margin-top: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 25%, 18% 100%;
}

.finchat-financial-panel .finchat-data-table {
  margin-top: 0;
  font-size: 0.88rem;
}

.finchat-financial-panel .finchat-data-table th,
.finchat-financial-panel .finchat-data-table td {
  padding: 0.72rem 0.45rem;
}

/* modal */
.finchat-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--rf-overlay-z, 10050);
  isolation: isolate;
}
.finchat-modal[hidden] { display: none; }
.finchat-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 8, 0.46);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.finchat-modal-card {
  position: relative;
  z-index: calc(var(--rf-overlay-backdrop-z, 10040) + 1);
  margin: auto;
  width: min(560px, 92vw);
  max-height: calc(100dvh - max(1rem, env(safe-area-inset-top)) - max(1rem, env(safe-area-inset-bottom)));
  overflow: hidden;
  background: #17191f;
  border-radius: 22px;
  padding: 32px;
  border: 1px solid var(--finchat-border);
  box-shadow: 0 25px 80px rgba(0,0,0,0.55);
}
.finchat-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.finchat-modal-head h3 {
  margin: 0;
}
.finchat-modal-head p {
  margin: 4px 0 0;
  color: var(--finchat-muted);
}
.finchat-modal-head button {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--finchat-muted);
  cursor: pointer;
}
.finchat-modal-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.finchat-modal-filters label {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: var(--finchat-text);
  font-size: 15px;
}
.finchat-modal-filters label span {
  color: var(--finchat-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.finchat-modal-filters select {
  appearance: none;
  min-width: 0;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--finchat-border);
  background:
    linear-gradient(45deg, transparent 50%, rgba(226,232,240,0.72) 50%) right 18px center / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(226,232,240,0.72) 50%, transparent 50%) right 12px center / 7px 7px no-repeat,
    rgba(255,255,255,0.045);
  color: var(--finchat-text);
  padding: 12px 42px 12px 14px;
  font: inherit;
}
.finchat-modal-filters select option {
  background: #17191f;
  color: #f8fafc;
}
.finchat-modal-filters select option:checked,
.finchat-modal-filters select option:hover {
  background: rgba(var(--finchat-accent-rgb), 0.24);
  color: #ffffff;
}
.finchat-modal-filters select:focus,
.finchat-modal-search input:focus {
  outline: none;
  border-color: rgba(var(--finchat-accent-rgb),0.55);
  box-shadow: 0 0 0 3px rgba(var(--finchat-accent-rgb),0.14);
}
.finchat-modal-search input {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--finchat-border);
  background: rgba(255,255,255,0.04);
  padding: 16px 18px;
  color: var(--finchat-text);
  font-size: 16px;
}
.finchat-modal-list {
  margin-top: 20px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--finchat-border);
  border-radius: 18px;
}
.finchat-modal-list::-webkit-scrollbar {
  width: 6px;
}
.finchat-modal-list::-webkit-scrollbar-track {
  background: var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  border-radius: 999px;
}
.finchat-modal-list::-webkit-scrollbar-thumb {
  background: var(--rf-scrollbar-thumb, rgba(148, 163, 184, 0.35));
  border: 1px solid var(--rf-scrollbar-track, rgba(15, 23, 42, 0.35));
  border-radius: 999px;
  background-clip: padding-box;
}
.finchat-modal-row {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  text-align: left;
}
.finchat-modal-row:last-child {
  border-bottom: none;
}
.finchat-modal-row:hover,
.finchat-modal-row.is-active {
  background: rgba(var(--finchat-accent-rgb),0.12);
}
.finchat-modal-flag {
  flex: 0 0 auto;
  width: 28px;
  height: 20px;
  margin-top: 2px;
}
.finchat-modal-flag--empty {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}
.finchat-modal-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.finchat-modal-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--finchat-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.finchat-modal-ticker {
  font-size: 13px;
  color: var(--finchat-muted);
  white-space: normal;
  overflow-wrap: anywhere;
}
.finchat-modal-empty {
  text-align: center;
  margin-top: 16px;
  color: var(--finchat-muted);
}

@media (max-width: 1023px) {
  .finchat-root {
    padding: 0;
  }
  .finchat-shell {
    border-radius: 0;
    border: none;
    height: 100%;
  }
  .finchat-sidebar {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 52px);
    left: 0;
    bottom: var(--finchat-bottom-chrome, 0px);
    width: min(320px, 85vw);
    transform: translateX(-100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    z-index: 60;
    border-right: 1px solid var(--finchat-border);
    border-radius: 0;
    background: #0f1118;
  }
  .finchat-sidebar.is-visible {
    transform: translateX(0);
  }
  .finchat-panel-header,
  .finchat-message-log,
  .finchat-composer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .finchat-panel-header {
    padding-top: 18px;
    padding-bottom: 18px;
  }
  .finchat-message-log {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .finchat-composer {
    padding-top: 16px;
  }
  .finchat-panel-burger {
    display: flex;
  }
  .finchat-panel-heading h2 {
    font-size: 1.05rem;
  }
  .finchat-panel-heading p {
    font-size: 0.85rem;
  }
  .finchat-panel-actions,
  [data-role="chat-timestamp"] {
    display: none;
  }
}

.richerai-intelligence-root .finchat-shell {
  background: #000;
}

.richerai-intelligence-root .finchat-sidebar-nav-item.is-active {
  color: #fff;
}

.richerai-intelligence-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.05rem;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 9, 16, 0.92);
}

.richerai-intelligence-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.richerai-intelligence-toolbar-copy {
  min-width: 0;
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .richerai-intelligence-toolbar {
    display: none;
  }
}

.finchat-static-company {
  display: grid;
  gap: 0.12rem;
  padding: 0.56rem 0.5rem;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  line-height: 1.25;
}

.finchat-static-company strong {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finchat-static-company span {
  color: rgba(203, 213, 225, 0.74);
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finchat-static-company + .finchat-static-company {
  border-top: 1px solid rgba(255, 255, 255, 0.035);
}

.finchat-static-company:hover {
  background: rgba(255, 255, 255, 0.022);
}

.richerai-intelligence-main {
  min-width: 0;
  height: 100%;
  overflow: auto;
  padding: 1.15rem 1.35rem 3rem;
  background: #000;
  color: #f8fafc;
}

.richerai-rating-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.richerai-kicker {
  margin: 0 0 0.45rem;
  color: rgba(148, 163, 184, 0.96);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.richerai-rating-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 3vw, 2.65rem);
  font-weight: 650;
  letter-spacing: 0;
}

.richerai-rating-header p:not(.richerai-kicker) {
  margin: 0.35rem 0 0;
  color: rgba(203, 213, 225, 0.78);
}

.richerai-line-button,
.richerai-rating-actions button,
.richerai-evidence button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  color: #f8fafc;
  padding: 0 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.richerai-rating-hero {
  display: grid;
  grid-template-columns: minmax(15rem, 0.42fr) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 1.1rem 0;
  border-block: 1px solid rgba(255, 255, 255, 0.11);
}

.richerai-rating-grade span {
  display: block;
  color: #fff;
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 680;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.richerai-rating-grade strong {
  display: block;
  margin-top: 0.45rem;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 650;
}

.richerai-rating-grade p {
  margin: 0.25rem 0 0;
  color: rgba(203, 213, 225, 0.84);
  font-size: 1.02rem;
}

.richerai-rating-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.richerai-rating-meta div {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.richerai-rating-meta span,
.richerai-method-grid span,
.richerai-evidence dt {
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.richerai-rating-meta strong,
.richerai-method-grid strong,
.richerai-evidence dd {
  margin: 0;
  color: #fff;
  font-size: 0.92rem;
}

.richerai-rating-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.richerai-rating-actions button:disabled,
.richerai-evidence button:disabled {
  color: rgba(148, 163, 184, 0.72);
  cursor: default;
}

.richerai-rating-section {
  padding: 1.05rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.richerai-rating-rationale {
  max-width: 74rem;
  margin: 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: clamp(1rem, 1.5vw, 1.24rem);
  line-height: 1.55;
}

.richerai-drivers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.richerai-drivers ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(226, 232, 240, 0.9);
}

.richerai-drivers li::before {
  content: "– ";
  color: rgba(148, 163, 184, 0.9);
}

.richerai-muted {
  margin: 0;
  color: rgba(203, 213, 225, 0.76);
  line-height: 1.55;
}

.richerai-method-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto;
  gap: 0.4rem 1rem;
  max-width: 44rem;
  margin-bottom: 0.8rem;
}

.richerai-evidence dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0 0 0.8rem;
}

.richerai-evidence div {
  display: grid;
  gap: 0.24rem;
}

.richerai-rating-detail {
  width: min(100%, 64rem);
  margin: 0 auto;
  color: #f8fafc;
}

.richerai-rating-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.1rem;
}

.richerai-rating-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  color: rgba(203, 213, 225, 0.62);
  font-size: 0.78rem;
}

.richerai-rating-breadcrumb a,
.richerai-rating-breadcrumb strong {
  color: rgba(248, 250, 252, 0.92);
  font-weight: 600;
  text-decoration: none;
}

.richerai-rating-detail-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 620;
  letter-spacing: -0.04em;
  line-height: 1;
}

.richerai-rating-detail-header .richerai-rating-entity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.48rem;
  margin: 0.72rem 0 0;
  color: rgba(226, 232, 240, 0.9);
  font-size: 1rem;
}

.richerai-rating-sector-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 0.24rem;
  padding: 0 0.55rem;
  color: rgba(226, 232, 240, 0.88);
}

.richerai-rating-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-top: 1.85rem;
  position: relative;
}

.richerai-rating-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.018);
  color: rgba(248, 250, 252, 0.9);
  font: inherit;
  font-size: 1.15rem;
}

.richerai-rating-overflow {
  position: relative;
}

.richerai-rating-overflow summary {
  list-style: none;
}

.richerai-rating-overflow summary::-webkit-details-marker {
  display: none;
}

.richerai-rating-overflow-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 30;
  min-width: 12rem;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 24, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

.richerai-rating-overflow:not([open]) .richerai-rating-overflow-menu {
  display: none;
}

.richerai-rating-overflow-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 0;
  background: transparent;
  color: rgba(248, 250, 252, 0.92);
  text-decoration: none;
  text-align: left;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 540;
  white-space: nowrap;
}

.richerai-rating-overflow-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.richerai-rating-overview {
  display: grid;
  grid-template-columns: minmax(12rem, 0.95fr) minmax(12rem, 0.95fr) minmax(14rem, 1.25fr);
  gap: 2rem;
  margin-bottom: 1.6rem;
}

.richerai-rating-overview > * {
  min-width: 0;
}

.richerai-rating-overview > * + * {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding-left: 2rem;
}

.richerai-rating-overview-grade span {
  display: block;
  color: rgba(248, 250, 252, 0.82);
  font-size: clamp(4.2rem, 8vw, 6.8rem);
  font-weight: 620;
  letter-spacing: -0.06em;
  line-height: 0.86;
}

.richerai-rating-overview-grade strong,
.richerai-rating-overview-score span {
  display: block;
  margin-top: 0.85rem;
  color: rgba(226, 232, 240, 0.86);
  font-size: 0.96rem;
  font-weight: 500;
}

.richerai-rating-overview-score strong {
  display: block;
  color: #86efac;
  font-size: clamp(3.1rem, 6vw, 5rem);
  font-weight: 680;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.richerai-rating-overview-score em {
  color: rgba(248, 250, 252, 0.64);
  font-size: 0.48em;
  font-style: normal;
  letter-spacing: -0.03em;
}

.richerai-rating-overview-meta {
  display: grid;
  gap: 0.62rem;
  margin: 0;
}

.richerai-rating-overview-meta div {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
}

.richerai-rating-overview-meta dt,
.richerai-score-head,
.richerai-rating-lines dt {
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.richerai-rating-overview-meta dd {
  margin: 0;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 650;
}

.richerai-rating-detail .richerai-rating-section {
  padding: 1.45rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.richerai-rating-detail .richerai-rating-section h3 {
  margin: 0 0 1.4rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.richerai-score-table {
  display: grid;
}

.richerai-score-head,
.richerai-score-row {
  display: grid;
  grid-template-columns: minmax(18rem, 1.7fr) minmax(10rem, 0.72fr) 5rem;
  gap: 1.3rem;
  align-items: center;
}

.richerai-score-head {
  padding-bottom: 0.65rem;
}

.richerai-score-row {
  min-height: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.richerai-score-row strong {
  display: block;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 600;
}

.richerai-score-row span {
  display: block;
  margin-top: 0.16rem;
  color: rgba(203, 213, 225, 0.66);
  font-size: 0.78rem;
  line-height: 1.4;
}

.richerai-score-row b {
  color: #fff;
  font-style: normal;
  font-weight: 600;
}

.richerai-score-bar {
  height: 0.3rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}

.richerai-score-bar span {
  display: block;
  height: 100%;
  margin: 0;
  background: rgba(226, 232, 240, 0.78);
}

.richerai-score-row-total {
  min-height: 3.2rem;
  text-transform: uppercase;
}

.richerai-rationale-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.95fr);
  gap: 2rem;
}

.richerai-rationale-grid h3 {
  grid-column: 1 / -1;
}

.richerai-driver-column {
  display: grid;
  gap: 1rem;
}

.richerai-driver-column h4 {
  margin: 0 0 0.38rem;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
}

.richerai-driver-column ul {
  margin: 0;
  padding-left: 1.05rem;
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.8rem;
  line-height: 1.55;
}

.richerai-rating-detail .richerai-rating-rationale {
  align-self: start;
  max-width: 34rem;
  padding-left: 1.65rem;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(226, 232, 240, 0.88);
  font-size: 1rem;
  line-height: 1.62;
}

.richerai-rating-lines {
  display: grid;
  margin: 0;
}

.richerai-rating-lines div {
  display: grid;
  grid-template-columns: minmax(12rem, 0.72fr) minmax(0, 1fr);
  gap: 1.2rem;
  padding: 0.48rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.richerai-rating-lines div:first-child {
  border-top: 0;
}

.richerai-rating-lines dd {
  margin: 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: 0.86rem;
  text-align: right;
}

.richerai-report-list {
  display: grid;
}

.richerai-report-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 2.25rem;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #f8fafc;
  padding: 0.42rem 0;
  font: inherit;
  text-align: left;
}

.richerai-report-list button:first-child {
  border-top: 0;
}

.richerai-report-list button:disabled {
  color: rgba(226, 232, 240, 0.82);
  cursor: default;
}

.richerai-report-list em {
  color: rgba(148, 163, 184, 0.72);
  font-size: 0.78rem;
  font-style: normal;
  text-align: right;
}

.richerai-index-section {
  margin-top: 1.35rem;
}

.richerai-intelligence-filters {
  display: grid;
  grid-template-columns: minmax(10rem, 0.7fr) minmax(10rem, 0.7fr) minmax(16rem, 1.4fr) auto;
  gap: 0.9rem;
  align-items: end;
  margin: 1.15rem 0 0.95rem;
}

.richerai-intelligence-filters label {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.richerai-intelligence-filters span {
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.richerai-intelligence-filters select,
.richerai-intelligence-filters input {
  width: 100%;
  min-height: 2.85rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0;
  background: #02060d;
  color: #f8fafc;
  padding: 0 0.95rem;
  font: inherit;
  outline: none;
}

.richerai-intelligence-filters select:focus,
.richerai-intelligence-filters input:focus {
  border-color: rgba(226, 232, 240, 0.48);
}

.richerai-intelligence-filters button {
  min-height: 2.85rem;
  border: 1px solid rgba(124, 58, 237, 0.75);
  background: rgba(46, 16, 101, 0.58);
  color: #fff;
  padding: 0 1.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.richerai-index-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.84rem;
}

.richerai-index-meta strong {
  color: #f8fafc;
  font-weight: 650;
}

.richerai-index-table {
  width: 100%;
  border-collapse: collapse;
  color: rgba(226, 232, 240, 0.9);
}

.richerai-index-table th {
  padding: 0.62rem 0.7rem;
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: left;
  text-transform: uppercase;
}

.richerai-index-table td {
  padding: 0.8rem 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.richerai-index-table tbody tr {
  cursor: pointer;
}

.richerai-index-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

.richerai-index-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 1rem;
  color: rgba(203, 213, 225, 0.72);
}

.richerai-index-pagination a,
.richerai-index-pagination span,
.richerai-index-pagination strong {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0 0.85rem;
  color: inherit;
  text-decoration: none;
}

.richerai-index-pagination a {
  color: #f8fafc;
}

.richerai-index-pagination span {
  opacity: 0.48;
}

@media (max-width: 1023px) {
  .richerai-intelligence-main {
    padding: 0.9rem 0.9rem calc(5.5rem + env(safe-area-inset-bottom));
  }

  .richerai-rating-header,
  .richerai-rating-hero,
  .richerai-drivers {
    display: block;
  }

  .richerai-line-button {
    margin-top: 0.7rem;
  }

  .richerai-rating-meta,
  .richerai-evidence dl {
    grid-template-columns: 1fr;
    margin-top: 0.9rem;
  }

  .richerai-index-section {
    overflow-x: auto;
  }

  .richerai-index-table {
    min-width: 46rem;
  }

  .richerai-intelligence-filters {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .richerai-intelligence-filters button {
    width: 100%;
  }

  .richerai-index-meta,
  .richerai-index-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .richerai-index-pagination a,
  .richerai-index-pagination span,
  .richerai-index-pagination strong {
    justify-content: center;
  }

  .richerai-rating-detail {
    width: 100%;
  }

  .richerai-rating-detail-header,
  .richerai-rating-overview,
  .richerai-rationale-grid {
    display: block;
  }

  .richerai-rating-detail-header {
    position: relative;
    margin-bottom: 1.25rem;
    padding-right: 6.2rem;
  }

  .richerai-rating-breadcrumb {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .richerai-rating-breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .richerai-rating-header-actions {
    position: absolute;
    top: 0.18rem;
    right: 0.18rem;
    gap: 0.4rem;
    padding-top: 0;
  }

  .richerai-rating-icon-button {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 0.98rem;
  }

  .richerai-rating-overflow-menu {
    min-width: 10.5rem;
  }

  .richerai-rating-overflow-item {
    padding: 0.68rem 0.75rem;
    font-size: 0.8rem;
  }

  .richerai-rating-overview > * + * {
    margin-top: 1rem;
    padding: 1rem 0 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .richerai-rating-overview-meta div,
  .richerai-rating-lines div {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }

  .richerai-rating-lines dd {
    text-align: left;
  }

  .richerai-score-head {
    display: none;
  }

  .richerai-score-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem 1rem;
    padding: 0.85rem 0;
  }

  .richerai-score-row > div:first-child {
    grid-column: 1 / -1;
  }

  .richerai-score-bar {
    grid-column: 1 / -1;
  }

  .richerai-rating-detail .richerai-rating-rationale {
    max-width: none;
    margin-top: 1.2rem;
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .finchat-modal-card {
    width: min(100vw - 24px, 560px);
    padding: 24px;
    border-radius: 18px;
  }
  .finchat-modal-filters label {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .finchat-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}


.finchat-char-counter {
  font-size: 12px;
  color: var(--finchat-muted);
  min-width: 36px;
  text-align: right;
  opacity: 0.8;
  padding-bottom: 6px;
}
.finchat-char-counter.is-warning {
  color: #f4c266;
}
.finchat-char-counter.is-blocked {
  color: #f0a959;
}

.finchat-report-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--finchat-border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finchat-report-card.has-watermark {
  position: relative;
  overflow: hidden;
}

.finchat-report-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.finchat-report-card__type {
  margin: 0 0 6px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--finchat-muted);
}

.finchat-report-card__title {
  margin: 0;
  font-size: 18px;
}

.finchat-report-card__progress {
  font-size: 12px;
  color: var(--finchat-muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.finchat-report-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.finchat-report-badge {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--finchat-muted);
  background: rgba(255, 255, 255, 0.03);
}

.finchat-report-link {
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.finchat-report-link--warning {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
}

.finchat-report-link a {
  color: var(--finchat-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.finchat-report-link p {
  margin: 0;
  color: var(--finchat-muted);
  font-size: 13px;
}

.finchat-report-stream {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.finchat-report-stream__item {
  color: rgba(255,255,255,0.68);
}

.finchat-report-fragment {
  background: #0f1118;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.report-metric {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
}

.report-metric-label {
  margin: 0 0 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--finchat-muted);
}

.report-metric-value {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.report-metric-period {
  font-size: 12px;
  color: var(--finchat-muted);
  margin-left: 6px;
}

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

.report-metric-table th,
.report-metric-table td {
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.report-metric-empty {
  margin: 0;
  color: var(--finchat-muted);
  font-size: 13px;
}

.finchat-report-commentary {
  background: rgba(var(--finchat-accent-rgb), 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.finchat-report-commentary h5 {
  margin: 12px 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--finchat-muted);
}

.finchat-report-commentary p {
  margin: 0;
  font-size: 14px;
}

.finchat-report-commentary ul {
  margin: 0 0 6px 18px;
  padding: 0;
  list-style: disc;
  font-size: 13px;
}

.finchat-report-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.finchat-report-card__meta {
  font-size: 12px;
  color: var(--finchat-muted);
}

.finchat-report-next {
  border: 1px solid var(--finchat-border);
  border-radius: 999px;
  padding: 6px 16px;
  background: transparent;
  color: var(--finchat-text);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.finchat-report-next:hover:not(.is-busy):not(.is-complete) {
  background: rgba(var(--finchat-accent-rgb), 0.18);
  border-color: rgba(var(--finchat-accent-rgb), 0.65);
}

.finchat-report-next.is-busy,
.finchat-report-next.is-complete {
  opacity: 0.7;
  cursor: default;
}

.finchat-report-open {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--finchat-text);
  text-decoration: none;
  font-size: 13px;
}

.finchat-report-open:hover {
  border-color: rgba(var(--finchat-accent-rgb), 0.7);
}

.finchat-report-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  transform: rotate(-24deg);
  white-space: nowrap;
}

@media print {
  .finchat-report-watermark {
    color: rgba(0, 0, 0, 0.15);
  }
}

/* RicherAI workspace refactor: company-first research canvas */
:root {
  --finchat-panel: rgba(8, 14, 27, 0.72);
  --finchat-border: rgba(255, 255, 255, 0.09);
  --finchat-text: #ffffff;
  --finchat-secondary: #f5f8ff;
  --finchat-muted: #dbe5f5;
  --finchat-accent: #5b85ff;
  --finchat-accent-rgb: 91, 133, 255;
  --finchat-gold: #facc15;
}

.finchat-root {
  height: calc(100dvh - var(--rf-nav-total-height, 68px) - var(--finchat-bottom-chrome, 0px));
  min-height: calc(100dvh - var(--rf-nav-total-height, 68px) - var(--finchat-bottom-chrome, 0px));
  background: transparent;
  color: var(--finchat-text);
}

.finchat-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.finchat-sidebar {
  width: auto;
  flex: initial;
  padding: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--rf-site-background);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.045);
}

.finchat-sidebar-inner {
  gap: 0;
}

.finchat-sidebar-top {
  gap: 1rem;
  padding: 1.15rem 1.15rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.034);
}

.finchat-sidebar-header {
  justify-content: space-between;
}

.finchat-brand-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--finchat-text);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.finchat-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}

.finchat-brand-logo img,
.finchat-mobile-brand img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.finchat-mobile-brand,
.finchat-sidebar-close {
  display: none;
}

.finchat-sidebar-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--finchat-secondary);
  font-size: 1.15rem;
  line-height: 1;
}

.finchat-brand-sub {
  margin-top: 0.2rem;
  color: var(--finchat-muted);
  font-size: 0.74rem;
}

.finchat-company-search,
.finchat-new-button {
  width: 100%;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.026);
  color: var(--finchat-text);
  padding: 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.finchat-company-search:hover,
.finchat-new-button:hover {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.038);
}

.finchat-sidebar-label {
  margin: 0;
  padding: 1.15rem 1.15rem 0.55rem;
  color: rgba(219, 229, 245, 0.88);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.finchat-sidebar-body {
  padding: 0 0.75rem 1rem;
}

.finchat-chat-item {
  min-height: 3.35rem;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0.65rem 0.55rem;
}

.finchat-chat-item + .finchat-chat-item {
  border-top: 1px solid rgba(255, 255, 255, 0.035);
}

.finchat-chat-item:hover {
  background: rgba(255, 255, 255, 0.018);
}

.finchat-chat-item.is-active {
  border-color: transparent;
  background: rgba(91, 133, 255, 0.055);
}

.finchat-chat-item__title {
  font-size: 0.88rem;
  font-weight: 620;
}

.finchat-chat-item__meta {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: rgba(219, 229, 245, 0.9);
}

.finchat-chat-delete {
  opacity: 0;
}

.finchat-chat-item:hover .finchat-chat-delete,
.finchat-chat-delete:focus-visible {
  opacity: 1;
}

.finchat-sidebar-footer {
  padding: 0.85rem 1.15rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.034);
}

.finchat-status-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--finchat-gold);
}

.finchat-main {
  background: transparent;
}

.finchat-chat-panel {
  background: transparent;
}

.finchat-panel-header {
  min-height: 3.35rem;
  padding: 0.45rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  backdrop-filter: blur(16px);
}

.finchat-panel-heading {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  white-space: nowrap;
}

.finchat-panel-heading::-webkit-scrollbar {
  display: none;
}

.finchat-panel-heading h2 {
  flex: 0 0 auto;
  color: var(--finchat-text);
  font-size: clamp(0.95rem, 1.45vw, 1.08rem);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
}

.finchat-panel-header {
  height: 2.85rem;
  min-height: 2.85rem;
  padding: 0.28rem 1.25rem;
}

.finchat-panel-title {
  min-height: 0;
}

.finchat-panel-heading p[data-role="chat-subtitle"] {
  line-height: 1;
  margin: 0;
}

.finchat-panel-heading h2:empty::before {
  content: "Select a company";
  color: #ffffff;
}

.finchat-panel-heading p[data-role="chat-subtitle"] {
  flex: 1 1 auto;
  margin: 0;
  color: rgba(245, 248, 255, 0.86);
  font-size: 0.75rem;
}

.finchat-panel-heading p[data-role="chat-subtitle"]::before {
  content: "· ";
  color: rgba(245, 248, 255, 0.72);
}

.finchat-panel-heading p[data-role="chat-subtitle"]:empty::before {
  content: "Company context will stay visible here";
}

.finchat-panel-actions {
  border: 0;
  background: transparent;
  padding: 0;
}

.finchat-live-pill {
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.04);
  color: var(--finchat-secondary);
}

.finchat-context-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--finchat-secondary);
  padding: 0;
  font-size: 0;
  text-decoration: none;
  cursor: pointer;
}

.finchat-mobile-entity-action,
.finchat-mobile-entity-overflow summary {
  display: none;
}

.finchat-toolbar-flag {
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.42rem;
  vertical-align: -0.08rem;
}

.finchat-mobile-entity-overflow {
  position: relative;
}

.finchat-mobile-entity-overflow summary {
  list-style: none;
}

.finchat-mobile-entity-overflow summary::-webkit-details-marker {
  display: none;
}

.finchat-mobile-entity-overflow-menu {
  position: absolute;
  top: calc(100% + 0.38rem);
  right: 0;
  z-index: 35;
  min-width: 10.75rem;
  padding: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 24, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

.finchat-mobile-entity-overflow:not([open]) .finchat-mobile-entity-overflow-menu {
  display: none;
}

.finchat-mobile-entity-overflow-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.68rem 0.78rem;
  color: rgba(248, 250, 252, 0.92);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 540;
  white-space: nowrap;
}

.finchat-root--entity-workspace .finchat-fi-view > .richerai-rating-detail-header {
  display: none;
}

.finchat-context-switch::before {
  content: "";
  width: 1.08rem;
  height: 1.08rem;
  opacity: 0.72;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 7V5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-2M15 12H3m0 0 4-4m-4 4 4 4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 7V5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-2M15 12H3m0 0 4-4m-4 4 4 4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.finchat-message-log {
  padding: 2rem clamp(1.25rem, 5vw, 4.5rem) 1.25rem;
  background: transparent;
}

.finchat-message {
  margin-bottom: 1.6rem;
}

.finchat-message--user {
  justify-content: flex-end;
}

.finchat-message--user .finchat-bubble {
  max-width: min(22rem, 72%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #16213d;
  padding: 0.72rem 0.95rem;
  font-size: 0.9rem;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.finchat-message--assistant {
  justify-content: flex-start;
}

.finchat-message--assistant .finchat-bubble {
  width: min(100%, 920px);
  max-width: 920px;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.finchat-research-content {
  width: min(100%, 920px);
  max-width: 920px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.finchat-message--assistant .finchat-bubble::before,
.finchat-research-content::before {
  content: "RicherAI";
  display: block;
  margin-bottom: 0.62rem;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.finchat-message--assistant .finchat-bubble-text {
  max-width: 46rem;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--finchat-secondary);
  font-size: 0.98rem;
  line-height: 1.72;
}

.finchat-research-content .finchat-bubble-text {
  max-width: 46rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: var(--finchat-secondary);
  font-size: 0.98rem;
  line-height: 1.72;
}

.finchat-message--blocks-only .finchat-bubble::before,
.finchat-bubble--blocks-only::before,
.finchat-message--blocks-only .finchat-research-content::before,
.finchat-research-content--blocks-only::before {
  margin-bottom: 0.85rem;
}

.finchat-block-container {
  gap: 1rem;
  margin-top: 1rem;
}

.finchat-block-card,
.finchat-report-card,
.finchat-report-fragment,
.report-metric {
  border-color: rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.024)),
    rgba(255, 255, 255, 0.024);
}

.finchat-report-suggestions {
  position: sticky;
  bottom: calc(6.7rem + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  display: none;
  padding: 0.75rem clamp(1.25rem, 5vw, 4.5rem);
  margin: 0;
  gap: 0.65rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  background: transparent;
}

.finchat-report-suggestions::before {
  display: none;
}

.finchat-root--chat .finchat-report-suggestions {
  display: flex;
}

.finchat-report-suggestions button {
  border-color: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
  color: var(--finchat-secondary);
  font-size: 0.82rem;
  font-weight: 500;
}

.finchat-report-suggestions button:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  transform: none;
}

.finchat-composer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 0.85rem clamp(1.25rem, 5vw, 4.5rem) calc(1rem + env(safe-area-inset-bottom, 0px));
  background: transparent;
}

.finchat-composer-input {
  max-width: none;
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.026)),
    rgba(255, 255, 255, 0.032);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.24);
}

.finchat-composer-label {
  color: rgba(245, 248, 255, 0.9);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.finchat-send-button {
  border-radius: 999px;
  background: #ffffff;
  color: #16213d;
  box-shadow: none;
}

.finchat-send-button:disabled {
  background: rgba(255, 255, 255, 0.38);
}

.finchat-empty-state {
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 940px;
  margin: 0 auto;
  padding-top: min(12vh, 5rem);
}

.finchat-empty-copy {
  max-width: 42rem;
  text-align: left;
}

.finchat-empty-title {
  color: var(--finchat-text);
  font-size: clamp(1.7rem, 4vw, 3.35rem);
  font-weight: 560;
  letter-spacing: 0;
  line-height: 1;
}

.finchat-empty-text {
  max-width: 34rem;
  color: var(--finchat-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.finchat-empty-button {
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: #ffffff;
  color: #16213d;
  font-weight: 600;
}

.finchat-empty-suggestions {
  justify-content: flex-start;
}

.finchat-suggestion-button {
  border-color: rgba(255, 255, 255, 0.055);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.018);
}

@media (max-width: 1023px) {
  .finchat-root {
    --finchat-bottom-chrome: calc(var(--finchat-mobile-bottom-nav) + env(safe-area-inset-bottom, 0px));
    height: calc(100dvh - var(--rf-nav-total-height, 0px) - var(--finchat-bottom-chrome));
    min-height: calc(100dvh - var(--rf-nav-total-height, 0px) - var(--finchat-bottom-chrome));
  }

  .finchat-shell {
    display: flex;
    height: 100%;
    background: transparent;
  }

  .finchat-sidebar {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 52px);
    bottom: calc(var(--finchat-mobile-bottom-nav) + env(safe-area-inset-bottom, 0px));
    left: 0;
    width: min(320px, 86vw);
    height: auto;
    max-height: calc(100dvh - var(--rf-nav-total-height, 52px) - var(--finchat-mobile-bottom-nav) - env(safe-area-inset-bottom, 0px));
    transform: translateX(-100%);
    z-index: 80;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
      var(--rf-site-background);
    backdrop-filter: none;
    box-shadow: 18px 0 46px rgba(0, 0, 0, 0.26), inset -1px 0 0 rgba(255, 255, 255, 0.08);
  }

  .finchat-sidebar.is-visible {
    transform: translateX(0);
  }

  .finchat-sidebar-close {
    display: grid;
    place-items: center;
    cursor: pointer;
  }

  .finchat-panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.25rem;
    column-gap: 0.5rem;
    align-items: center;
    height: 2.85rem;
    min-height: 2.85rem;
    padding: 0.28rem 0.75rem;
  }

  .finchat-mobile-brand {
    display: none;
  }

  .finchat-panel-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
  }

  .finchat-panel-burger {
    flex: 0 0 auto;
    display: flex;
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 0;
  }

  .finchat-panel-heading {
    min-width: 0;
    padding-top: 0;
    border-top: 0;
  }

  .finchat-panel-heading h2 {
    flex: 0 1 auto;
    font-size: 0.86rem;
  }

  .finchat-panel-heading p[data-role="chat-subtitle"] {
    flex: 1 1 auto;
    font-size: 0.69rem;
  }

  .finchat-panel-actions {
    display: flex;
    justify-content: flex-end;
  }

  .finchat-live-pill {
    display: none;
  }

  .finchat-context-switch {
    width: 1.95rem;
    height: 1.95rem;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 999px;
  }

  .finchat-message-log {
    padding: 1.2rem 1rem 10rem;
  }

  .finchat-report-suggestions {
    bottom: calc(10.8rem + env(safe-area-inset-bottom, 0px));
    padding-inline: 1rem;
  }

  .finchat-composer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--finchat-bottom-chrome);
    z-index: 55;
    padding-inline: 1rem;
    padding-bottom: 0.75rem;
  }

  .finchat-composer-label {
    display: none;
  }

  .finchat-composer-input {
    min-height: 3.45rem;
    padding-top: 0.58rem;
    padding-bottom: 0.58rem;
  }

  .finchat-tool-panel-header {
    align-items: center;
    gap: 0.45rem;
    height: 3.05rem;
    min-height: 3.05rem;
    padding: 0 0.75rem;
  }

  .finchat-tool-sidebar-toggle {
    display: flex;
    width: 1.95rem;
    height: 1.95rem;
    padding: 0.38rem;
  }

  .finchat-tool-panel-kicker,
  .finchat-tool-panel-header p[data-role="tool-description"] {
    display: none;
  }

  .finchat-tool-panel-header h2 {
    font-size: 0.86rem;
    line-height: 1;
  }

  .finchat-tool-back {
    font-size: 0.78rem;
  }

  .finchat-tool-close {
    min-height: 1.9rem;
    padding: 0 9px;
    white-space: nowrap;
  }

  .finchat-tool-close span {
    display: none;
  }

  .finchat-tool-list-panel {
    padding: 12px;
  }

  .finchat-tools-filters {
    grid-template-columns: 1fr;
  }

  .finchat-tool-table__head {
    display: none;
  }

  .finchat-tool-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 0;
  }

  .finchat-tool-row__category {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .finchat-tool-row__info {
    font-size: 13px;
  }
}

@media (max-width: 1023px) {
  .finchat-root {
    --finchat-bottom-chrome: calc(var(--finchat-mobile-bottom-nav) + env(safe-area-inset-bottom, 0px));
    height: calc(100dvh - var(--rf-nav-total-height, 0px) - var(--finchat-bottom-chrome));
    min-height: calc(100dvh - var(--rf-nav-total-height, 0px) - var(--finchat-bottom-chrome));
  }

  .finchat-shell {
    height: 100%;
  }

  .finchat-main,
  .finchat-chat-panel {
    min-height: 0;
  }

  .finchat-sidebar {
    bottom: calc(var(--finchat-mobile-bottom-nav) + env(safe-area-inset-bottom, 0px));
    height: auto;
    max-height: calc(100dvh - var(--rf-nav-total-height, 52px) - var(--finchat-mobile-bottom-nav) - env(safe-area-inset-bottom, 0px));
  }

  .finchat-report-suggestions {
    bottom: calc(var(--finchat-bottom-chrome) + 5.75rem);
  }

  .finchat-composer {
    bottom: var(--finchat-bottom-chrome);
  }
}

@media (max-width: 560px) {
  .finchat-message--user .finchat-bubble {
    max-width: 86%;
  }

  .finchat-empty-title {
    font-size: 2rem;
  }
}

.finchat-message--assistant > .finchat-bubble,
.finchat-message--assistant > .finchat-bubble > .finchat-bubble-text,
.finchat-message--assistant > .finchat-research-content,
.finchat-message--assistant > .finchat-research-content > .finchat-bubble-text {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.finchat-message--assistant,
.finchat-message--assistant *,
.finchat-message--assistant *::before,
.finchat-message--assistant *::after {
  box-shadow: none !important;
}

.finchat-message--assistant > *,
.finchat-message--assistant .finchat-bubble-text {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

.finchat-empty-state {
  height: 100%;
  min-height: 0;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(2rem, 9vh, 5.5rem) clamp(1.25rem, 7vw, 5rem) 9rem;
}

.finchat-root--chat .finchat-empty-state {
  display: none !important;
}

.finchat-discovery {
  width: min(820px, 100%);
  color: #aeb7c8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.04em;
}

.finchat-discovery-title,
.finchat-discovery-group p {
  margin: 0;
  color: #b9c2d2;
  font-size: clamp(1rem, 1.4vw, 1.28rem);
  font-weight: 650;
}

.finchat-discovery-search {
  width: 100%;
  margin-top: 1.8rem;
  border: 1px solid rgba(226, 232, 240, 0.6);
  background: rgba(255, 255, 255, 0.018);
  color: #aeb7c8;
  min-height: 4rem;
  padding: 0 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: inherit;
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  cursor: pointer;
}

.finchat-discovery-search:hover,
.finchat-discovery-chip:hover {
  color: #fff;
  border-color: rgba(226, 232, 240, 0.86);
  background: rgba(255, 255, 255, 0.04);
}

.finchat-discovery-group {
  margin-top: clamp(2.5rem, 7vh, 5.6rem);
}

.finchat-discovery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.95rem;
  margin-top: 1.4rem;
}

.finchat-discovery-chip {
  border: 0;
  background: transparent;
  color: #aeb7c8;
  padding: 0;
  font: inherit;
  font-size: clamp(0.95rem, 1.25vw, 1.18rem);
  font-weight: 650;
  cursor: pointer;
}

.finchat-discovery-chip::before,
.finchat-discovery-chip::after {
  content: none;
}

.finchat-auth-modal[hidden] {
  display: none;
}

.finchat-auth-modal {
  position: fixed;
  inset: 0;
  z-index: var(--rf-overlay-z, 10050);
  isolation: isolate;
}

.finchat-auth-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.66);
  z-index: 0;
}

.finchat-auth-card {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: min(480px, calc(100vw - 2rem));
  max-height: calc(100dvh - max(1rem, env(safe-area-inset-top)) - max(1rem, env(safe-area-inset-bottom)));
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #020b1f;
  color: #fff;
  padding: 2rem;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.finchat-auth-close {
  position: absolute;
  z-index: 3;
  top: 0.9rem;
  right: 0.9rem;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 1.6rem;
  cursor: pointer;
}

.finchat-auth-kicker {
  margin: 0 0 1rem;
  color: #aeb7c8;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  font-weight: 700;
}

.finchat-auth-card h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.1;
  font-weight: 650;
}

.finchat-auth-card ul {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
  color: #dbe5f3;
}

.finchat-auth-card li::before {
  content: "•";
  color: #d4af37;
  margin-right: 0.65rem;
}

.finchat-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.7rem;
  position: relative;
  z-index: 3;
}

.finchat-auth-actions a {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
  padding: 0.8rem 1rem;
  font-weight: 700;
}

.finchat-auth-actions a:first-child {
  background: #fff;
  color: #020b1f;
}

body.finchat-auth-open {
  overflow: hidden;
}

@media (max-width: 1023px) {
  .finchat-empty-state {
    padding: 2rem 1.1rem 9rem;
    justify-content: flex-start;
  }

  .finchat-discovery-search {
    min-height: 3.5rem;
  }

  .finchat-discovery-group {
    margin-top: 2.4rem;
  }
}

.finchat-brand-title {
  text-decoration: none;
  cursor: pointer;
}

.finchat-panel-header {
  min-height: 2.65rem;
  padding: 0.28rem 1rem;
}

.finchat-panel-heading h2 {
  font-size: clamp(0.88rem, 1.25vw, 1rem);
  line-height: 1.1;
}

.finchat-panel-heading p[data-role="chat-subtitle"] {
  font-size: 0.72rem;
  line-height: 1.1;
}

  .finchat-context-switch {
    display: none;
  }

  .finchat-mobile-entity-action,
  .finchat-mobile-entity-overflow summary {
    display: inline-flex;
    width: 1.8rem;
    height: 1.8rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--finchat-secondary);
    font: inherit;
    font-size: 1rem;
    padding: 0;
  }

  .finchat-panel-actions {
    flex: 0 0 auto;
    gap: 0.52rem;
    min-width: max-content;
    padding: 0.2rem 0.62rem;
    background: rgba(10, 14, 24, 0.94);
    border-radius: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .finchat-root--entity-workspace .finchat-fi-view > .richerai-rating-detail-header {
    display: none;
  }

  .finchat-root--entity-workspace .finchat-panel-header {
    min-height: 2.75rem;
    align-items: center;
    padding-top: 0.34rem;
    padding-bottom: 0.34rem;
  }

  .finchat-root--entity-workspace .finchat-panel-heading h2,
  .finchat-root--entity-workspace .finchat-panel-heading p[data-role="chat-subtitle"] {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    word-break: normal;
  }

  .finchat-root--entity-workspace .finchat-panel-heading {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .finchat-root--entity-workspace .finchat-panel-heading::-webkit-scrollbar {
    display: none;
  }

  .finchat-root--entity-workspace .finchat-panel-heading h2,
  .finchat-root--entity-workspace .finchat-panel-heading p[data-role="chat-subtitle"] {
    flex: 0 0 auto;
  }

  .finchat-root--entity-workspace .finchat-panel-heading h2 {
    font-size: 0.92rem;
    line-height: 1.05;
  }

  .finchat-root--entity-workspace .finchat-panel-heading p[data-role="chat-subtitle"] {
    font-size: 0.68rem;
    line-height: 1.1;
    margin-top: 0;
  }

.finchat-message--assistant .finchat-research-content,
.finchat-message--assistant .finchat-block-card {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.finchat-message--assistant .finchat-block-card {
  padding: 0 !important;
}

.finchat-message--assistant .finchat-block-container {
  gap: 0.9rem;
}

.finchat-chart {
  height: clamp(190px, 30vw, 280px);
}

@media (max-width: 1023px) {
  .finchat-panel-header {
    min-height: 2.75rem;
    padding: 0.34rem 0.7rem;
  }

  .finchat-message-log {
    padding-bottom: 12.25rem;
  }

  .finchat-message--assistant .finchat-research-content {
    max-width: 100%;
  }

  .finchat-message--assistant .finchat-bubble-text {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .finchat-message--assistant .finchat-block-title {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
  }

  .finchat-chart {
    height: 260px;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
  }

  .finchat-chart canvas {
    min-height: 260px;
  }

  .finchat-report-suggestions {
    bottom: calc(8.35rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 1023px) {
  .finchat-text-block {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .finchat-kpi-grid {
    grid-template-columns: 1fr;
  }

  .finchat-kpi-card {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
    padding: 0.85rem 0.9rem;
  }

  .finchat-kpi-card:last-child {
    border-bottom: 0;
  }

  .finchat-trend-panel {
    grid-template-columns: 1fr;
  }

  .finchat-trend-strip {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .finchat-trend-strip-head {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.78rem 0.85rem;
  }

  .finchat-trend-strip-table th,
  .finchat-trend-strip-table td {
    padding: 0.62rem 0.85rem;
  }

  .finchat-trend-strip-table th {
    width: 42%;
  }

  .finchat-trend-primary {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.9rem;
  }

  .finchat-trend-secondary {
    grid-template-columns: 1fr;
  }

  .finchat-trend-secondary div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.85rem 0.9rem;
  }

  .finchat-trend-secondary div:last-child {
    border-bottom: 0;
  }

  .finchat-chart-panel,
  .finchat-financial-panel {
    padding: 0.85rem;
  }

  .finchat-chart-stats {
    grid-template-columns: 1fr;
    margin-bottom: 0.65rem;
  }

  .finchat-chart-stat {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    padding: 0.62rem 0.7rem;
  }

  .finchat-chart-stat:last-child {
    border-bottom: 0;
  }

  .finchat-chart-panel .finchat-chart {
    height: 14rem;
    margin-bottom: 0;
  }

  .finchat-chart-panel .finchat-chart canvas {
    min-height: 14rem;
  }

  .finchat-financial-panel {
    overflow-x: auto;
  }

  .finchat-financial-panel .finchat-data-table {
    min-width: 30rem;
  }
}

/* Mobile usability pass: keep RicherAI inside app chrome and use landing typography. */
.finchat-root,
.finchat-discovery,
.finchat-discovery-search,
.finchat-discovery-chip,
.finchat-composer,
.finchat-panel-header {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.finchat-discovery {
  letter-spacing: 0;
}

.finchat-discovery-title,
.finchat-discovery-group p {
  letter-spacing: 0;
}

.finchat-discovery-chips {
  align-items: center;
}

.finchat-discovery-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  white-space: nowrap;
  line-height: 1.15;
}

.finchat-discovery-chip::before,
.finchat-discovery-chip::after {
  flex: 0 0 auto;
}

@media (max-width: 1023px) {
  .finchat-root {
    --finchat-mobile-bottom-nav: 76px;
    --finchat-bottom-chrome: calc(var(--finchat-mobile-bottom-nav) + env(safe-area-inset-bottom, 0px));
    height: calc(100dvh - var(--rf-nav-total-height, 52px) - var(--finchat-bottom-chrome));
    min-height: 0;
    overflow: hidden;
  }

  .finchat-shell,
  .finchat-main,
  .finchat-chat-panel {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .finchat-chat-panel {
    display: flex;
    flex-direction: column;
  }

  .finchat-panel-header {
    flex: 0 0 auto;
  }

  .finchat-message-log {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.95rem 1rem calc(6.25rem + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
  }

  .finchat-empty-state {
    min-height: 100%;
    height: auto;
    justify-content: flex-start;
    padding: clamp(1.2rem, 4.5vh, 2rem) 0 1rem;
  }

  .finchat-discovery {
    width: 100%;
  }

  .finchat-discovery-title {
    font-size: clamp(1.05rem, 5vw, 1.45rem);
    line-height: 1.18;
  }

  .finchat-discovery-search {
    margin-top: 1rem;
    min-height: 3.15rem;
    padding: 0 1rem;
    font-size: clamp(0.96rem, 4.2vw, 1.1rem);
  }

  .finchat-discovery-group {
    margin-top: 1.35rem;
  }

  .finchat-discovery-group p {
    font-size: 0.78rem;
    font-weight: 800;
    color: rgba(226, 232, 240, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }

  .finchat-discovery-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.55rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.15rem 0 0.55rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .finchat-discovery-chips::-webkit-scrollbar {
    display: none;
  }

  .finchat-discovery-chip {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.025);
    padding: 0.62rem 0.72rem;
    color: #dbe5f5;
    font-size: clamp(0.74rem, 3.4vw, 0.86rem);
    font-weight: 700;
  }

  .finchat-composer {
    position: sticky;
    flex: 0 0 auto;
    left: auto;
    right: auto;
    bottom: 0;
    width: 100%;
    padding: 0.65rem 1rem calc(0.72rem + env(safe-area-inset-bottom, 0px));
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0), #000 28%),
      #000;
  }

  .finchat-composer-input {
    min-height: 3.25rem;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.026)),
      rgba(255, 255, 255, 0.032);
  }

  .finchat-report-suggestions {
    position: sticky;
    bottom: 4.55rem;
    padding: 0.55rem 1rem;
    background: rgba(2, 11, 31, 0.92);
  }
}

@media (max-width: 480px) {
  .finchat-message-log {
    padding-inline: 0.82rem;
  }

  .finchat-discovery-title {
    font-size: 1rem;
  }

  .finchat-discovery-search {
    min-height: 3rem;
  }
}

/* Final mobile composer override: no blue strip, no extra band, single-line input. */
@media (max-width: 1023px) {
  .finchat-composer {
    background: transparent;
    padding-top: 0.45rem;
  }

  .finchat-composer-input {
    min-height: 3.15rem;
    padding: 0.58rem 4.5rem 0.58rem 1rem;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.026)),
      rgba(255, 255, 255, 0.032);
  }

  .finchat-composer textarea {
    min-height: 1.65rem;
    height: 1.65rem;
    max-height: 1.65rem;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.65rem;
    font-size: clamp(0.95rem, 4.1vw, 1.05rem);
  }

  .finchat-char-counter {
    top: 50%;
    transform: translateY(-50%);
  }

  .finchat-send-button {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .finchat-report-suggestions {
    background: transparent;
  }
}

/* Mobile drawer must sit above global app chrome, not inside the content area. */
@media (max-width: 1023px) {
  .finchat-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100dvh;
    max-height: 100dvh;
    width: min(360px, 86vw);
    z-index: 10050;
    padding-top: calc(1.35rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-100%);
  }

  .finchat-sidebar.is-visible {
    transform: translateX(0);
  }

  .finchat-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 10040;
  }
}

/* Mobile instrument picker: equity-only and full usable height. */
@media (max-width: 640px) {
  .finchat-modal {
    align-items: flex-end;
    padding: 0;
  }

  .finchat-modal-card {
    width: 100vw;
    max-width: none;
    max-height: min(86dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 0.75rem));
    border-radius: 18px 18px 0 0;
    padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
  }

  .finchat-modal-head {
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.9rem;
  }

  .finchat-modal-head h3 {
    font-size: 1.08rem;
    line-height: 1.2;
  }

  .finchat-modal-head p {
    margin-top: 0.25rem;
    font-size: 0.92rem;
    line-height: 1.25;
  }

  .finchat-modal-head button {
    flex: 0 0 auto;
    line-height: 1;
  }

  .finchat-modal-filters {
    gap: 0.7rem;
    margin-bottom: 0.75rem;
  }

  .finchat-modal-filters label {
    gap: 0.38rem;
  }

  .finchat-modal-filters select,
  .finchat-modal-search input {
    border-radius: 12px;
    min-height: 3rem;
    padding-block: 0.72rem;
    font-size: 0.95rem;
  }

  .finchat-modal-list {
    flex: 1 1 auto;
    min-height: 14rem;
    max-height: none;
    margin-top: 0.85rem;
    border-radius: 14px;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .finchat-modal-row {
    min-height: 4.8rem;
    padding: 0.85rem 0.9rem;
  }

  .finchat-modal-name {
    font-size: 0.95rem;
    line-height: 1.2;
  }

  .finchat-modal-ticker {
    font-size: 0.82rem;
    line-height: 1.28;
  }
}

/* Compact mobile chat controls. */
@media (max-width: 1023px) {
  .finchat-message-log {
    padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  }

  .finchat-root--chat .finchat-report-suggestions {
    display: flex;
    gap: 0.45rem;
  }

  .finchat-report-suggestions {
    bottom: 4rem;
    padding: 0.28rem 0.82rem 0.22rem;
    background: transparent;
  }

  .finchat-report-suggestions button {
    min-height: 2rem;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.78);
    background: rgba(255, 255, 255, 0.018);
    border-color: rgba(255, 255, 255, 0.075);
    box-shadow: none;
  }

  .finchat-composer {
    padding: 0.38rem 0.82rem calc(0.46rem + env(safe-area-inset-bottom, 0px));
  }

  .finchat-composer-input {
    min-height: 2.95rem;
    border-radius: 12px;
    padding: 0.48rem 3.45rem 0.48rem 0.82rem;
  }

  .finchat-composer textarea {
    height: 1.5rem;
    min-height: 1.5rem;
    max-height: 1.5rem;
    line-height: 1.5rem;
    font-size: 0.95rem;
  }

  .finchat-char-counter {
    right: 3.18rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.72);
    z-index: 2;
  }

  .finchat-send-button {
    width: 2.42rem;
    height: 2.42rem;
    right: 0.34rem;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    border-radius: 999px;
  }

  .finchat-send-button svg {
    width: 1.08rem;
    height: 1.08rem;
  }
}

/* Compact mobile sidebar: use the full drawer height for recent companies. */
@media (max-width: 1023px) {
  .finchat-sidebar {
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
  }

  .finchat-sidebar-inner {
    min-height: 0;
  }

  .finchat-sidebar-top {
    gap: 0.68rem;
    padding: 0.35rem 1rem 0.78rem;
  }

  .finchat-sidebar-header {
    min-height: 2.25rem;
  }

  .finchat-brand-title {
    gap: 0.38rem;
    font-size: 0.92rem;
  }

  .finchat-brand-logo img,
  .finchat-mobile-brand img {
    width: 1.05rem;
    height: 1.05rem;
  }

  .finchat-brand-sub {
    margin-top: 0.1rem;
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .finchat-sidebar-close {
    width: 1.95rem;
    height: 1.95rem;
    font-size: 1.05rem;
  }

  .finchat-company-search,
  .finchat-sidebar-nav-item,
  .finchat-tools-button {
    min-height: 2.45rem;
    border-radius: 9px;
    padding-inline: 0.78rem;
    font-size: 0.84rem;
  }

  .finchat-sidebar-nav-icon,
  .finchat-tools-icon {
    width: 1.05rem;
    height: 1.05rem;
  }

  .finchat-sidebar-label {
    padding: 0.76rem 1rem 0.34rem;
    font-size: 0.61rem;
    letter-spacing: 0.16em;
  }

  .finchat-sidebar-body {
    padding: 0 0.65rem 0.5rem;
  }

  .finchat-chat-item {
    min-height: 3rem;
    padding: 0.52rem 0.5rem;
  }

  .finchat-chat-item__title {
    font-size: 0.82rem;
  }

  .finchat-chat-item__meta {
    font-size: 0.67rem;
  }

  .finchat-sidebar-footer {
    padding: 0.58rem 1rem 0.45rem;
    font-size: 0.76rem;
  }

  .finchat-sidebar-footer small {
    font-size: 0.68rem;
  }
}

/* Keep the mobile composer counter visible instead of overlaying the placeholder. */
@media (max-width: 1023px) {
  .finchat-composer-input {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.46rem 0.38rem 0.46rem 0.78rem;
  }

  .finchat-composer textarea {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
  }

  .finchat-char-counter {
    position: static;
    flex: 0 0 auto;
    min-width: 1.85rem;
    transform: none;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1;
    color: rgba(226, 232, 240, 0.84);
    pointer-events: none;
  }

  .finchat-send-button {
    position: static;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    transform: none;
  }
}

/* RicherAI P1 entity profile. */
.finchat-entity-profile {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.75rem) 0 calc(7rem + env(safe-area-inset-bottom, 0px));
  color: var(--finchat-text);
}

.finchat-entity-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.finchat-entity-kicker,
.finchat-entity-label {
  margin: 0 0 0.62rem;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.finchat-entity-hero h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 3.1vw, 3rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.finchat-entity-flag {
  flex: 0 0 auto;
  width: clamp(1.15rem, 1.8vw, 1.55rem);
  height: clamp(1.15rem, 1.8vw, 1.55rem);
}

.finchat-entity-sub {
  margin: 0.7rem 0 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.94rem;
  line-height: 1.45;
}

.finchat-entity-report-cta,
.finchat-entity-action {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.025);
  color: #f8fafc;
  min-height: 2.55rem;
  padding: 0 1rem;
  border-radius: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.finchat-entity-report-cta:hover,
.finchat-entity-action:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.055);
}

.finchat-entity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: 0;
  margin-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.finchat-entity-card {
  min-width: 0;
  padding: clamp(1rem, 1.8vw, 1.45rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.006));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.finchat-entity-card--wide {
  grid-row: span 2;
}

.finchat-entity-description {
  margin: 0;
  max-width: 72ch;
  color: rgba(241, 245, 249, 0.88);
  font-size: clamp(0.98rem, 1.35vw, 1.18rem);
  line-height: 1.68;
}

.finchat-entity-price {
  display: block;
  margin-bottom: 0.32rem;
  color: #fff;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}

.finchat-entity-muted {
  margin: 0;
  color: rgba(203, 213, 225, 0.74);
  font-size: 0.9rem;
  line-height: 1.45;
}

.finchat-entity-sparkline {
  display: block;
  width: 100%;
  height: 4.75rem;
  margin-top: 1rem;
  color: #f8fafc;
  opacity: 0.92;
  overflow: visible;
}

.finchat-entity-metric-row,
.finchat-entity-report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.finchat-entity-report-row {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.finchat-entity-metric-row span,
.finchat-entity-report-row span {
  min-width: 0;
  color: rgba(203, 213, 225, 0.76);
  font-size: 0.9rem;
}

.finchat-entity-metric-row strong,
.finchat-entity-report-row strong {
  color: #fff;
  font-weight: 650;
}

.finchat-entity-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.finchat-entity-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

@media (max-width: 1023px) {
  .finchat-entity-profile {
    width: 100%;
    padding: 0.75rem 0.85rem calc(9.25rem + env(safe-area-inset-bottom, 0px));
  }

  .finchat-entity-hero {
    align-items: stretch;
    flex-direction: column;
    gap: 0.82rem;
  }

  .finchat-entity-hero h3 {
    font-size: 1.45rem;
    line-height: 1.08;
  }

  .finchat-entity-sub {
    margin-top: 0.46rem;
    font-size: 0.82rem;
  }

  .finchat-entity-report-cta,
  .finchat-entity-action {
    min-height: 2.35rem;
    padding-inline: 0.82rem;
    font-size: 0.8rem;
  }

  .finchat-entity-grid {
    display: block;
    margin-top: 0.85rem;
  }

  .finchat-entity-card {
    padding: 0.92rem 0.85rem;
  }

  .finchat-entity-description {
    font-size: 0.93rem;
    line-height: 1.55;
  }

  .finchat-entity-price {
    font-size: 1.45rem;
  }

  .finchat-entity-sparkline {
    height: 4.1rem;
  }

  .finchat-entity-actions-row {
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }

  .finchat-entity-actions-row::-webkit-scrollbar {
    display: none;
  }

  .finchat-entity-action {
    flex: 0 0 auto;
  }
}

/* RicherAI P1 Financial Intelligence View. */
.finchat-root--intelligence .finchat-report-suggestions,
.finchat-root--intelligence .finchat-composer {
  display: none !important;
}

.finchat-root--chat-archived .finchat-report-suggestions,
.finchat-root--chat-archived .finchat-composer {
  display: none !important;
}

.finchat-root--intelligence .finchat-message-log {
  padding: 0.35rem 0.45rem max(0.65rem, env(safe-area-inset-bottom, 0px));
}

.finchat-fi-view {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.35rem 0.45rem 0.65rem;
  color: #f8fafc;
}

.finchat-fi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0 0 0.35rem;
}

.finchat-fi-kicker {
  margin: 0 0 0.18rem;
  color: rgba(203, 213, 225, 0.76);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.finchat-fi-header h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: #fff;
  font-size: clamp(1.1rem, 1.55vw, 1.55rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.finchat-fi-header p:not(.finchat-fi-kicker) {
  margin: 0.24rem 0 0;
  color: rgba(226, 232, 240, 0.74);
  font-size: 0.9rem;
}

.finchat-fi-invest-link,
.finchat-fi-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2rem;
  padding: 0 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #f8fafc;
  border-radius: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.finchat-fi-invest-link:hover,
.finchat-fi-action:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.035);
}

.finchat-fi-action--auth {
  border-color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.96);
  color: #050814;
}

.finchat-fi-action--auth:hover {
  border-color: #ffffff;
  background: #ffffff;
  color: #02040a;
}

.finchat-fi-action.is-locked {
  position: relative;
  color: rgba(203, 213, 225, 0.62);
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.015);
}

.finchat-fi-action.is-locked:hover {
  color: rgba(226, 232, 240, 0.78);
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.03);
}

.finchat-fi-action__lock {
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.8;
}

.finchat-fi-action.is-locked::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  transform: translateX(-50%);
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(5, 10, 18, 0.96);
  color: rgba(226, 232, 240, 0.86);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.finchat-fi-action.is-locked:hover::after,
.finchat-fi-action.is-locked:focus-visible::after {
  opacity: 1;
}

.finchat-fi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem 0;
}

.finchat-fi-actions--tools {
  padding: 0;
  border-bottom: 0;
}


.finchat-fi-section {
  padding: 0.45rem 0;
}

.finchat-fi-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.28rem;
}

.finchat-fi-section h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(0.9rem, 1.15vw, 1.05rem);
  font-weight: 680;
  letter-spacing: -0.01em;
}

.finchat-fi-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.finchat-fi-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: #f8fafc;
}

.finchat-fi-table--sources {
  min-width: 0;
  table-layout: fixed;
}

.finchat-fi-table--sources th:nth-child(1),
.finchat-fi-table--sources td:nth-child(1) {
  width: 74%;
}

.finchat-fi-table--sources th:nth-child(2),
.finchat-fi-table--sources td:nth-child(2) {
  width: 14%;
}

.finchat-fi-table--sources th:nth-child(3),
.finchat-fi-table--sources td:nth-child(3) {
  width: 12%;
}

.finchat-fi-table th,
.finchat-fi-table td {
  padding: 0.3rem 0.42rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.finchat-fi-table thead th {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.finchat-fi-table thead th.finchat-fi-locked-head {
  color: rgba(148, 163, 184, 0.48);
}

.finchat-fi-table tbody th {
  color: rgba(241, 245, 249, 0.9);
  font-weight: 650;
}

.finchat-fi-table tbody tr.is-total th,
.finchat-fi-table tbody tr.is-total td {
  color: #fff;
  font-weight: 760;
}

.finchat-fi-table tbody tr.is-subtotal th,
.finchat-fi-table tbody tr.is-subtotal td {
  color: rgba(241, 245, 249, 0.95);
  font-weight: 700;
}

.finchat-fi-table tbody tr.is-unmapped th {
  color: rgba(203, 213, 225, 0.82);
}

.finchat-fi-table td {
  color: rgba(226, 232, 240, 0.84);
}

.finchat-fi-source-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finchat-fi-table a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.finchat-fi-source-list {
  display: none;
}

.finchat-fi-source-card {
  padding: 0.72rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.finchat-fi-source-card h4 {
  margin: 0;
  overflow: hidden;
  color: rgba(241, 245, 249, 0.94);
  font-size: 0.92rem;
  font-weight: 620;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finchat-fi-source-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.26rem;
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finchat-fi-source-card--clickable {
  cursor: pointer;
}

.finchat-fi-source-card--clickable:hover h4 {
  color: #fff;
}

.finchat-fi-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  margin-bottom: 0.85rem;
  scrollbar-width: none;
}

.finchat-fi-tabs::-webkit-scrollbar {
  display: none;
}

.finchat-fi-tab {
  flex: 0 0 auto;
  min-height: 2.2rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: transparent;
  color: rgba(226, 232, 240, 0.72);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.finchat-fi-tab.is-active {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
}

.finchat-fi-tab-panel {
  display: none;
}

.finchat-fi-tab-panel.is-active {
  display: block;
}

.finchat-fi-cell {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
  text-decoration: none;
}

.finchat-fi-cell[data-evidence] {
  cursor: pointer;
}

.finchat-fi-cell[data-evidence]:hover,
.finchat-fi-cell[data-evidence]:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.finchat-fi-cell--locked {
  display: inline-flex;
  width: 4.4rem;
  height: 1.05rem;
  min-width: 4.4rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  cursor: default;
  user-select: none;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.finchat-fi-cell--locked:hover,
.finchat-fi-cell--locked:focus-visible {
  text-decoration: none;
}

.finchat-fi-cell--pending {
  display: inline-block;
  width: 100%;
  cursor: default;
  color: inherit;
  text-decoration: none;
}

.finchat-fi-source-row--clickable {
  cursor: pointer;
}

.finchat-fi-source-row--clickable:hover td {
  color: #fff;
  background: rgba(255, 255, 255, 0.025);
}

.finchat-fi-evidence-layer {
  position: fixed;
  inset: 0;
  z-index: 1250;
}

.finchat-fi-evidence-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(1, 6, 18, 0.62);
}

.finchat-fi-evidence-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(28rem, calc(100vw - 2rem));
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #060b16;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
  color: #f8fafc;
}

.finchat-fi-evidence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.finchat-fi-evidence-kicker {
  margin: 0 0 0.28rem;
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.finchat-fi-evidence-head h4 {
  margin: 0;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

.finchat-fi-evidence-close {
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: rgba(248, 250, 252, 0.8);
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.finchat-fi-evidence-list {
  margin: 0;
  padding: 0.1rem 1rem 0;
}

.finchat-fi-evidence-list div {
  display: grid;
  gap: 0.22rem;
  padding: 0.78rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.finchat-fi-evidence-list dt {
  color: rgba(148, 163, 184, 0.86);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.finchat-fi-evidence-list dd {
  margin: 0;
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.86rem;
  line-height: 1.45;
}

.finchat-fi-evidence-actions {
  padding: 1rem;
}

.finchat-fi-evidence-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: #f8fafc;
  padding: 0 0.9rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.finchat-fi-evidence-button:disabled {
  color: rgba(248, 250, 252, 0.36);
  cursor: not-allowed;
}

body.finchat-fi-evidence-open {
  overflow: hidden;
}

.finchat-source-audit-viewer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.finchat-source-audit-viewer.is-open {
  pointer-events: auto;
  opacity: 1;
}

body.finchat-source-audit-open {
  overflow: hidden;
}

.finchat-source-audit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.finchat-source-audit-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(78rem, calc(100vw - 6rem));
  height: min(86vh, 58rem);
  min-width: 42rem;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-rows: 3.25rem minmax(0, 1fr);
  background: #02040a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.finchat-source-audit-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.finchat-source-audit-panel header button {
  border: 0;
  background: transparent;
  color: #f8fafc;
  width: 2.2rem;
  height: 2.2rem;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.finchat-source-audit-panel iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #02040a;
}

.finchat-report-bubble {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1200;
  display: grid;
  gap: 0.22rem;
  min-width: 13rem;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 12, 19, 0.94);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  text-align: left;
  color: #f8fafc;
  cursor: pointer;
}

.finchat-report-bubble__kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 247, 255, 0.64);
}

.finchat-report-bubble__title {
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
}

.finchat-report-link__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: #f8fafc;
  padding: 0 0.95rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 768px) {
  .finchat-report-bubble {
    right: 0.9rem;
    bottom: calc(0.9rem + var(--finchat-mobile-bottom-nav, 0px));
    left: 0.9rem;
    max-width: none;
  }
}

.finchat-fi-signals {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.finchat-fi-signal {
  display: grid;
  gap: 0.68rem;
  padding: 0.9rem 0;
}

.finchat-fi-signal--empty {
  color: rgba(203, 213, 225, 0.78);
}

.finchat-fi-signal--locked {
  max-width: 42rem;
}

.finchat-fi-auth-cta {
  justify-self: start;
  min-height: 2.45rem;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #fff;
  color: #020b1f;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.finchat-fi-auth-cta:hover {
  background: rgba(255, 255, 255, 0.9);
}

.finchat-fi-signal-head {
  display: grid;
  gap: 0.22rem;
}

.finchat-fi-signal-label {
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.finchat-fi-signal-head strong {
  color: #fff;
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.35;
}

.finchat-fi-signal-table-wrap {
  overflow-x: auto;
}

.finchat-fi-signal-table {
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.finchat-fi-signal-table th,
.finchat-fi-signal-table td {
  padding: 0.62rem 0.85rem 0.62rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.finchat-fi-signal-table thead th {
  color: rgba(148, 163, 184, 0.94);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.finchat-fi-signal-table tbody th {
  color: #f8fafc;
  font-weight: 700;
}

.finchat-fi-signal-table td {
  color: rgba(226, 232, 240, 0.9);
}

.finchat-fi-signal-table td strong {
  display: block;
  color: #fff;
  font-weight: 650;
}

.finchat-fi-signal-table td span {
  display: block;
  margin-top: 0.14rem;
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.68rem;
}

.finchat-fi-signal-table tr:last-child th,
.finchat-fi-signal-table tr:last-child td {
  border-bottom: 0;
}

.finchat-fi-signal-block {
  display: grid;
  grid-template-columns: minmax(7.8rem, 0.22fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.finchat-fi-signal-block p {
  margin: 0;
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.finchat-fi-signal-block span,
.finchat-fi-muted {
  color: rgba(203, 213, 225, 0.78);
}

.finchat-fi-signal-list {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding: 0;
  color: rgba(226, 232, 240, 0.9);
  list-style: none;
}

.finchat-fi-signal-list li {
  border: 0;
  padding: 0;
}

.finchat-fi-signal-disclaimer {
  margin: 0.18rem 0 0;
  color: rgba(148, 163, 184, 0.86);
  font-size: 0.78rem;
}

@media (max-width: 1023px) {
  .finchat-source-audit-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(78vh, 44rem);
    min-width: 0;
    transform: none;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    box-shadow: 0 -24px 90px rgba(0, 0, 0, 0.75);
  }

  .finchat-fi-view {
    padding-inline: 0.9rem;
  }

  .finchat-fi-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .finchat-fi-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .finchat-fi-actions::-webkit-scrollbar {
    display: none;
  }

  .finchat-fi-action {
    flex: 0 0 auto;
  }

  .finchat-fi-evidence-card {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    transform: none;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55);
  }

  .finchat-fi-signal-block {
    display: block;
  }

  .finchat-fi-signal-block p {
    margin-bottom: 0.3rem;
  }

  .finchat-fi-table-wrap--sources {
    display: none;
  }

  .finchat-fi-source-list {
    display: block;
  }

  .finchat-fi-source-card {
    padding: 0.78rem 0;
  }

  .finchat-fi-source-card h4 {
    font-size: 0.9rem;
  }

  .finchat-fi-source-meta {
    gap: 0.5rem;
    font-size: 0.72rem;
  }
}
