/* One instrument surface; the data producers and their DOM IDs stay unchanged. */
#live-impact { background: #15181b; padding-block: 56px; }
#live-impact .dashboard-header { margin-bottom: 22px; }
#live-impact .dashboard-title { font-size: 40px; line-height: 1.22; }
#live-impact .live-badge { margin-bottom: 10px; }
.terminal-console {
  --terminal-line: #35404a;
  border: 1px solid var(--terminal-line);
  border-radius: 8px;
  background: #15191d;
  box-shadow: 0 16px 48px #00000026;
  overflow: hidden;
}
.terminal-metrics {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 1.7fr);
  min-height: 84px;
  border-bottom: 1px solid var(--terminal-line);
  background: #20262b;
}
#live-impact .profit-counter-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  margin: 0;
  padding: 12px 20px;
  border: 0;
  border-right: 1px solid var(--terminal-line);
  position: relative;
}
#live-impact .profit-counter-wrap::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 2px;
  background: var(--accent);
}
#live-impact .profit-label { font-size: 10px; max-width: none; color: #b1bbc5; }
#live-impact .profit-value { margin: 0; font-size: 30px; line-height: 1.2; min-height: 36px; }
#live-impact .trades-pnl-bar { padding: 12px 20px; border: 0; gap: 20px; align-items: center; }
#live-impact .trades-pnl-item { gap: 4px; min-width: 0; }
#live-impact .trades-pnl-item:first-child { flex: 1.5; }
#live-impact .trades-pnl-label { font-size: 10px; }
#live-impact .trades-pnl-val { margin: 0; font-size: 24px; line-height: 1.5; font-variant-numeric: tabular-nums; }
#live-impact .trades-pnl-divider { align-self: center; height: 38px; width: 1px; background: #ffffff12; }
#live-impact .dashboard-terminal { height: 356px; border: 0; border-radius: 0; background: transparent; }
#live-impact .news-panel { border-color: var(--terminal-line); }
#live-impact .news-panel-header, #live-impact .trades-panel-header {
  min-height: 48px;
  padding: 10px 18px;
  gap: 10px;
  background: #1a1f24;
  border-bottom-color: var(--terminal-line);
  position: relative;
}
#live-impact .news-panel-header::before, #live-impact .trades-panel-header::before {
  content: "";
  width: 18px;
  height: 14px;
  flex: 0 0 18px;
  border-block: 1px solid var(--accent);
  background: linear-gradient(var(--accent),var(--accent)) left center / 12px 1px no-repeat;
  opacity: .8;
}
#live-impact .trades-panel-header::before {
  height: 16px;
  border: 0;
  background: linear-gradient(var(--accent),var(--accent)) 0 7px / 3px 9px no-repeat,
    linear-gradient(var(--accent),var(--accent)) 7px 3px / 3px 13px no-repeat,
    linear-gradient(var(--accent),var(--accent)) 14px 0 / 3px 16px no-repeat;
}
#live-impact .news-panel-header .panel-label, #live-impact .trades-panel-header .panel-label { margin-right: auto; }
#live-impact .panel-label { font-size: 10px; color: #d9e2eb; }
#live-impact .news-feed, #live-impact .trades-feed { scrollbar-gutter: stable; scrollbar-color: #53616c #171c20; }
#live-impact .news-feed:focus-visible, #live-impact .trades-feed:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
#live-impact .news-item {
  position: relative;
  grid-template-columns: 64px minmax(0,1fr);
  gap: 14px;
  padding: 12px 18px;
  min-height: 104px;
  border-bottom: 1px solid #ffffff0d;
  transition: background-color .2s;
}
#live-impact .news-item:nth-child(even), #live-impact .trade-card:nth-child(even) { background: #ffffff02; }
#live-impact .news-item:hover, #live-impact .news-item:focus-within, #live-impact .trade-card:hover { background: #96c8fa09; }
#live-impact .news-item:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--accent);
}
#live-impact .news-thumb-frame { width: 64px; height: 64px; border-radius: 4px; border: 1px solid #ffffff12; }
#live-impact .news-item-header { margin-bottom: 5px; }
#live-impact .news-source-name { color: #b5c2ce; }
#live-impact .news-source-name, #live-impact .news-time { font-size: 9px; }
#live-impact .news-headline, #live-impact .news-headline-link { font-size: 14px; line-height: 1.5; }
#live-impact .news-headline-link:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
#live-impact .news-impact { margin-top: 5px; font-size: 9px; }
#live-impact .trade-card { padding: 12px 18px; border-left: 0; position: relative; min-height: 114px; }
#live-impact .trade-card::before { content: ""; position: absolute; inset: 12px auto 12px 0; width: 2px; background: #88949e; opacity: .65; }
#live-impact .trade-card.buy::before { background: var(--success); }
#live-impact .trade-card.sell::before { background: var(--danger); }
#live-impact .trade-header { flex-wrap: nowrap; align-items: center; gap: 10px; }
#live-impact .trade-instrument { flex: 1; gap: 12px; flex-direction: row-reverse; justify-content: space-between; }
#live-impact .trade-ticker-wrap { gap: 10px; }
#live-impact .trade-logo, #live-impact .trade-logo-fallback { width: 34px; height: 34px; flex-basis: 34px; }
#live-impact .trade-logo svg { width: 28px; height: 28px; }
#live-impact .trade-ticker { font-size: 14px; color: #edf1f5; }
#live-impact .trade-company { font-size: 10px; max-width: 220px; margin-top: 3px; }
#live-impact .trade-action-badge { min-width: 54px; text-align: center; padding: 5px 7px; border-radius: 4px; background: #b1bbc509; border-color: #b1bbc528; }
#live-impact .trade-action-badge.buy { background: #80d6b20a; border-color: #80d6b238; }
#live-impact .trade-action-badge.sell { background: #f3939d0a; border-color: #f3939d38; }
#live-impact .trade-time { font-size: 8px; margin-left: 0; }
#live-impact .trade-news-link { margin: 8px 0 0 44px; padding-left: 10px; border-color: #96c8fa55; }
#live-impact .trade-news-snippet { font-size: 12px; }
#live-impact .trade-pnl-row { margin-top: 8px; gap: 12px; }
#live-impact .trade-pnl-row > div { flex-shrink: 0; }
#live-impact .trade-pnl { font-size: 14px; font-variant-numeric: tabular-nums; margin-left: 7px; }
#live-impact .trade-conf { font-size: 8px; max-width: 205px; }
#live-impact .cause-chain {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(24px,.5fr) minmax(0,1fr) minmax(24px,.5fr) minmax(0,1fr) minmax(24px,.5fr) minmax(0,1fr);
  min-height: 106px;
  padding: 24px 36px;
  gap: 14px;
  background: #1c2227;
  border-color: var(--terminal-line);
}
#live-impact .cause-node { display: flex; align-items: center; justify-content: center; gap: 14px; color: #97a6b4; }
#live-impact .cause-icon { width: 38px; height: 38px; flex: 0 0 38px; margin: 0; position: relative; }
#live-impact .cause-icon svg { width: 38px; height: 38px; overflow: visible; }
#live-impact .cause-label { font-size: 10px; white-space: nowrap; }
#live-impact .cause-node.active { color: var(--accent); }
#live-impact .cause-arrow { position: relative; width: 100%; color: #475665; }
#live-impact .cause-arrow-line { width: 100%; }
#live-impact .cause-arrow::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--accent); opacity: 0; }
#live-impact .cause-arrow.active { color: #7ca3c8; }
#live-impact .cause-arrow.active::after { animation: terminal-route .85s ease-in-out both; }
#live-impact .cause-node.active .cause-icon { animation: terminal-node .6s ease-out both; }
#live-impact .cause-node.active .cause-ai-core { animation: terminal-core .85s ease-in-out; transform-origin: 20px 20px; }
#live-impact .cause-node.active .cause-profit-chart { stroke-dasharray: 36; animation: terminal-trace .9s ease-out; }
#live-impact .cause-signal-ring, #live-impact .cause-profit-grid { stroke: currentColor; stroke-width: 1; opacity: .3; }
#live-impact .cause-signal-check, #live-impact .cause-profit-chart, #live-impact .cause-profit-arrow { stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#live-impact .cause-signal-check { opacity: 0; }
#live-impact .cause-node.active .cause-signal-check { opacity: 1; }
#live-impact .cause-node.active .cause-signal-wave { opacity: 0; }
#live-impact .cause-profit-fill { fill: currentColor; opacity: .07; }
#live-impact .chart-row { margin: 0; }
#live-impact .chart-panel { border: 0; border-top: 1px solid var(--terminal-line); border-radius: 0; background: #15191d; }
#live-impact .chart-panel-header { padding: 12px 18px; gap: 10px 16px; border-bottom-color: #ffffff0d; }
#live-impact .chart-badges { gap: 22px; }
#live-impact .chart-badge { font-size: 9px; }
#live-impact .chart-badge .val { color: #c8d8e7; }
#live-impact .chart-panel-body { padding: 14px 18px 16px 10px; grid-template-columns: 42px minmax(0,1fr); gap: 10px; }
#live-impact .chart-stage { height: 160px; }
#live-impact .chart-current-card { background: #20262bf5; border-color: #96c8fa; padding: 10px 14px; }
#live-impact .chart-current-value { font-size: 22px; }
#live-impact .sources-bar { padding-top: 14px; margin-top: 0; gap: 16px; }
#live-impact .sources-bar-list { row-gap: 4px; }
#live-impact .source-chip { color: #9dabb7; }
#live-impact .news-item.visible:first-child, #live-impact .trade-card.visible:first-child { animation: terminal-arrival .7s ease-out; }
@keyframes terminal-arrival { from { background-color: #96c8fa16; } to { background-color: transparent; } }
@keyframes terminal-route { 0% { left: 0; opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { left: calc(100% - 18px); opacity: 0; } }
@keyframes terminal-node { from { transform: translateY(2px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@keyframes terminal-core { 50% { transform: scale(1.35); opacity: .6; } }
@keyframes terminal-trace { from { stroke-dashoffset: 36; } to { stroke-dashoffset: 0; } }
@media (min-width: 1200px) {
  #live-impact .dashboard-title br { display: none; }
  #live-impact .terminal-console { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); }
  #live-impact .terminal-metrics, #live-impact .dashboard-terminal { grid-column: 1 / -1; }
  #live-impact .chart-row { min-width: 0; border-left: 1px solid var(--terminal-line); }
  #live-impact .chart-panel { display: flex; flex-direction: column; height: 100%; }
  #live-impact .chart-panel-header { min-height: 80px; align-content: center; }
  #live-impact .chart-panel-body { flex: 1; min-height: 0; }
  #live-impact .chart-stage { height: 100%; min-height: 160px; }
  #live-impact .chart-badges { width: 100%; gap: 18px; }
}
@media (max-width: 1100px) {
  #live-impact .trades-pnl-val { font-size: 22px; }
  #live-impact .news-panel-header, #live-impact .trades-panel-header { flex-wrap: wrap; gap: 4px 10px; padding: 10px 16px; min-height: 60px; }
  #live-impact .news-panel-header > div:last-child, #live-impact .trades-panel-header > div:last-child { margin-left: 28px; width: calc(100% - 28px); }
  #live-impact .news-item { padding: 12px 16px; grid-template-columns: 56px minmax(0,1fr); gap: 12px; }
  #live-impact .news-thumb-frame { width: 56px; height: 64px; }
  #live-impact .trade-card { padding: 12px 16px; }
  #live-impact .trade-time { text-align: right; }
  #live-impact .trade-company { max-width: 100%; }
  #live-impact .trade-news-link { margin-left: 0; }
  #live-impact .trade-pnl-row { flex-wrap: wrap; gap: 3px 12px; }
  #live-impact .trade-conf { text-align: left; max-width: none; }
  #live-impact .cause-node { gap: 6px; }
  #live-impact .cause-label { font-size: 9px; }
  #live-impact .cause-chain { padding: 22px; gap: 8px; }
}
@media (max-width: 700px) {
  #live-impact { padding-block: 40px; }
  #live-impact .dashboard-title { font-size: 30px; }
  #live-impact .dashboard-header { margin-bottom: 20px; }
  #live-impact .terminal-metrics { grid-template-columns: 1fr; }
  #live-impact .profit-counter-wrap { padding: 12px 16px; border: 0; border-bottom: 1px solid var(--terminal-line); flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  #live-impact .profit-value { font-size: 28px; min-height: 34px; white-space: nowrap; }
  #live-impact .profit-label { font-size: 9px; max-width: 110px; min-width: 0; }
  #live-impact .trades-pnl-bar { padding: 12px 16px; gap: 12px; }
  #live-impact .trades-pnl-val { font-size: 17px; }
  #live-impact .trades-pnl-label { font-size: 8px; }
  #live-impact .trades-pnl-item { gap: 4px; }
  #live-impact .trades-pnl-item:first-child { flex: 1.55; }
  #live-impact .trades-pnl-divider { height: 30px; }
  #live-impact .dashboard-terminal { height: auto; }
  #live-impact .news-panel { height: 292px; }
  #live-impact .trades-panel { height: 312px; }
  #live-impact .news-panel { border-right: 0; border-bottom: 1px solid var(--terminal-line); }
  #live-impact .news-panel-header, #live-impact .trades-panel-header { min-height: 58px; }
  #live-impact .news-item { min-height: 104px; }
  #live-impact .news-headline, #live-impact .news-headline-link { font-size: 14px; }
  #live-impact .news-source-name, #live-impact .news-time { font-size: 8px; }
  #live-impact .trade-card { min-height: 118px; }
  #live-impact .trade-pnl { font-size: 13px; }
  #live-impact .cause-chain { min-height: 115px; grid-template-columns: minmax(0,1fr) 12px minmax(0,1fr) 12px minmax(0,1fr) 12px minmax(0,1fr); padding: 20px 12px; gap: 2px; }
  #live-impact .cause-node { flex-direction: column; gap: 8px; }
  #live-impact .cause-icon, #live-impact .cause-icon svg { width: 32px; height: 32px; flex-basis: 32px; }
  #live-impact .cause-label { font-size: 8px; }
  #live-impact .cause-arrow { align-self: start; margin-top: 16px; }
  #live-impact .cause-arrow::after { display: none; }
  #live-impact .chart-panel-header { padding: 12px 14px; }
  #live-impact .chart-badges { gap: 16px; flex-wrap: wrap; }
  #live-impact .chart-badge { font-size: 8px; }
  #live-impact .chart-panel-body { padding: 12px 14px 14px 4px; grid-template-columns: 32px minmax(0,1fr); }
  #live-impact .chart-stage { height: 150px; }
  #live-impact .chart-current-value { font-size: 18px; }
  #live-impact .chart-current-card { padding: 7px 10px; }
  #live-impact .sources-bar-list { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, 20px); grid-auto-columns: max-content; gap: 4px 20px; max-width: 100%; margin-top: 6px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #53616c #171c20; overscroll-behavior-x: contain; }
  #live-impact .source-chip { white-space: nowrap; }
}
@media (max-width: 359px) {
  #live-impact .dashboard-title { font-size: 27px; }
  #live-impact .profit-value { font-size: 24px; }
  #live-impact .trades-pnl-bar { padding: 12px 14px; gap: 10px; }
  #live-impact .trades-pnl-val { font-size: 15px; }
  #live-impact .news-item { grid-template-columns: 44px minmax(0,1fr); gap: 10px; padding-inline: 14px; }
  #live-impact .news-thumb-frame { width: 44px; height: 64px; }
  #live-impact .cause-label { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  #live-impact *, #live-impact *::after { animation: none !important; transition: none !important; }
}
