/* Intel Hub · Cross Asset — Triple Monitor */
#ih-panel-cross-asset {
  --ih-ca-z: 1.44;
}

body.ih-hub-full #ih-panel-cross-asset {
  --ih-ca-z: 1.54;
}

.ih-ca {
  --ih-ca-cyan: #4a9bb1;
  --ih-ca-green: #67E6C9;
  --ih-ca-red: #E77A7A;
  --ih-ca-amber: #e8b44a;
  --ih-ca-cream: #e8eef2;
  --ih-ca-dim: #7a8894;
  --ih-ca-mute: #5a6670;
  --ih-ca-border: #1a1f26;
  --ih-ca-panel: #0a0c10;
  --ih-ca-bg: #05070a;
  box-sizing: border-box;
  background: var(--ih-ca-bg);
  color: var(--ih-ca-cream);
  display: flex;
  flex-direction: column;
  font-family: var(--font-bloomberg, var(--mono), Consolas, monospace);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.ih-ca *,
.ih-ca *::before,
.ih-ca *::after { box-sizing: border-box; }

.ih-ca__toolbar {
  align-items: center;
  border-bottom: 1px solid var(--ih-ca-border);
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  padding: calc(10px * var(--ih-ca-z)) calc(14px * var(--ih-ca-z));
}

.ih-ca__title {
  color: var(--ih-ca-cyan);
  font-size: calc(13px * var(--ih-ca-z));
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ih-ca__meta {
  color: var(--ih-ca-dim);
  font-size: calc(12px * var(--ih-ca-z));
  margin-top: 3px;
}

.ih-ca__refresh {
  background: transparent;
  border: 1px solid var(--ih-ca-border);
  color: var(--ih-ca-cyan);
  cursor: pointer;
  font-size: calc(15px * var(--ih-ca-z));
  padding: 6px 10px;
}

.ih-ca__refresh:hover {
  border-color: var(--ih-ca-cyan);
  color: var(--ih-ca-cream);
}

.ih-ca__err {
  background: rgba(224, 134, 134, 0.12);
  border-bottom: 1px solid rgba(224, 134, 134, 0.35);
  color: #ffb0b0;
  flex-shrink: 0;
  font-size: calc(12px * var(--ih-ca-z));
  padding: 8px 14px;
}

.ih-ca__desk {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: calc(10px * var(--ih-ca-z));
  min-height: 0;
  overflow: auto;
  padding: calc(10px * var(--ih-ca-z)) calc(12px * var(--ih-ca-z));
  scrollbar-width: thin;
}

/* TOP BAND */
.ih-ca-band--top {
  display: grid;
  flex-shrink: 0;
  gap: calc(10px * var(--ih-ca-z));
  grid-template-columns: minmax(220px, 0.28fr) minmax(280px, 0.42fr) minmax(220px, 0.3fr);
}

.ih-ca-kpis-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ih-ca-kpis-hd {
  align-items: baseline;
  color: var(--ih-ca-cyan);
  display: flex;
  flex-wrap: wrap;
  font-size: calc(11px * var(--ih-ca-z));
  font-weight: 700;
  gap: 8px 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ih-ca-kpis-hd__meta {
  color: var(--ih-ca-mute);
  font-size: calc(11px * var(--ih-ca-z));
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}

.ih-ca-kpis {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ih-ca-kpi {
  border: 1px solid var(--ih-ca-border);
  background: var(--ih-ca-panel);
  padding: calc(8px * var(--ih-ca-z)) calc(10px * var(--ih-ca-z));
}

.ih-ca-kpi__lbl {
  color: var(--ih-ca-mute);
  font-size: calc(10px * var(--ih-ca-z));
  font-weight: 700;
  letter-spacing: 0.1em;
}

.ih-ca-kpi__val {
  font-size: calc(22px * var(--ih-ca-z));
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 4px;
}

.ih-ca-kpi__delta {
  display: block;
  font-size: calc(11px * var(--ih-ca-z));
  margin-top: 2px;
}

.ih-ca-regime {
  border: 1px solid var(--ih-ca-border);
  background: var(--ih-ca-panel);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(8px * var(--ih-ca-z)) calc(10px * var(--ih-ca-z));
}

.ih-ca-regime__lbl,
.ih-ca-focus__lbl,
.ih-ca-hm-title,
.ih-ca-tbl-hd {
  color: var(--ih-ca-cyan);
  font-size: calc(11px * var(--ih-ca-z));
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: calc(8px * var(--ih-ca-z));
  text-transform: uppercase;
}

.ih-ca-regime__track {
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ih-ca-regime__step {
  align-items: center;
  color: rgba(232, 238, 242, 0.55);
  display: flex;
  flex-direction: column;
  font-size: calc(10px * var(--ih-ca-z));
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.04em;
  min-height: calc(42px * var(--ih-ca-z));
  padding: 6px 4px;
  position: relative;
  text-align: center;
}

.ih-ca-regime__step--off { background: rgba(120, 30, 30, 0.85); }
.ih-ca-regime__step--down { background: rgba(110, 70, 40, 0.85); }
.ih-ca-regime__step--neutral { background: rgba(70, 78, 86, 0.9); }
.ih-ca-regime__step--up { background: rgba(116, 222, 198, 0.55); }
.ih-ca-regime__step--on { background: rgba(20, 110, 100, 0.9); }

.ih-ca-regime__step.is-active {
  box-shadow: inset 0 0 0 1px var(--ih-ca-cream);
  color: #fff;
}

.ih-ca-regime__ptr {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid #fff;
  height: 0;
  left: 50%;
  position: absolute;
  top: 3px;
  transform: translateX(-50%);
  width: 0;
}

.ih-ca-focus {
  border: 1px solid var(--ih-ca-border);
  background: var(--ih-ca-panel);
  padding: calc(8px * var(--ih-ca-z)) calc(10px * var(--ih-ca-z));
}

.ih-ca-focus__row + .ih-ca-focus__row {
  margin-top: 8px;
}

.ih-ca-focus__meta {
  align-items: baseline;
  display: flex;
  font-size: calc(12px * var(--ih-ca-z));
  justify-content: space-between;
  margin-bottom: 5px;
}

.ih-ca-focus__meta span { color: var(--ih-ca-dim); }
.ih-ca-focus__meta b { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Bilateral correlation bar (−1 … 0 … +1) */
.ih-ca-bilat {
  background: rgba(255, 255, 255, 0.06);
  height: 8px;
  overflow: hidden;
  position: relative;
}

.ih-ca-bilat__mid {
  background: rgba(232, 238, 242, 0.45);
  bottom: 0;
  left: 50%;
  position: absolute;
  top: 0;
  width: 1px;
  z-index: 2;
}

.ih-ca-bilat__fill {
  bottom: 0;
  position: absolute;
  top: 0;
  z-index: 1;
}

.ih-ca-bilat__fill--up { background: linear-gradient(90deg, rgba(116, 222, 198, 0.35), var(--ih-ca-green)); }
.ih-ca-bilat__fill--dn { background: linear-gradient(90deg, var(--ih-ca-red), rgba(224, 134, 134, 0.35)); }
.ih-ca-bilat__fill--flat { background: var(--ih-ca-dim); }

.ih-ca-bilat--empty {
  opacity: 0.35;
}

.ih-ca-chg-bg--up { background: var(--ih-ca-green); }
.ih-ca-chg-bg--dn { background: var(--ih-ca-red); }
.ih-ca-chg-bg--flat { background: var(--ih-ca-dim); }

/* HEATMAP */
.ih-ca-mid {
  flex: 1 1 auto;
  min-height: 220px;
}

.ih-ca-hm-wrap {
  border: 1px solid var(--ih-ca-border);
  background: var(--ih-ca-panel);
  overflow-x: auto;
  padding: calc(10px * var(--ih-ca-z));
}

.ih-ca-hm-head,
.ih-ca-hm-row {
  display: grid;
  gap: 2px;
  margin-bottom: 2px;
  min-width: calc(640px * var(--ih-ca-z));
}

.ih-ca-hm-corner { min-height: calc(22px * var(--ih-ca-z)); }

.ih-ca-hm-lbl {
  align-items: center;
  color: var(--ih-ca-dim);
  display: flex;
  font-size: calc(11px * var(--ih-ca-z));
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.04em;
  overflow: hidden;
  padding: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ih-ca-hm-lbl--row {
  justify-content: flex-end;
  padding-right: 6px;
}

.ih-ca-hm-cell {
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: center;
  min-height: calc(32px * var(--ih-ca-z));
}

.ih-ca-hm-cell--diag { outline: 1px solid rgba(255, 255, 255, 0.14); }

.ih-ca-hm-cell__val {
  color: #eef2f6;
  font-size: calc(11px * var(--ih-ca-z));
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.ih-ca-hm-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  max-width: 280px;
}

.ih-ca-hm-legend__bar {
  background: linear-gradient(90deg, var(--ih-ca-red), var(--ih-ca-dim) 50%, var(--ih-ca-green));
  height: 7px;
  width: 100%;
}

.ih-ca-hm-legend__marks {
  color: var(--ih-ca-dim);
  display: flex;
  font-size: calc(11px * var(--ih-ca-z));
  font-variant-numeric: tabular-nums;
  justify-content: space-between;
  letter-spacing: 0.04em;
}

/* BOTTOM TABLES */
.ih-ca-bot {
  display: grid;
  flex: 1 1 auto;
  gap: calc(10px * var(--ih-ca-z));
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  min-height: 260px;
}

.ih-ca-bot__pane {
  border: 1px solid var(--ih-ca-border);
  background: var(--ih-ca-panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: calc(10px * var(--ih-ca-z));
}

.ih-ca-tbl-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.ih-ca-tbl-ft {
  border-top: 1px solid var(--ih-ca-border);
  color: var(--ih-ca-mute);
  flex-shrink: 0;
  font-size: calc(11px * var(--ih-ca-z));
  letter-spacing: 0.06em;
  margin-top: 8px;
  padding-top: 8px;
  text-transform: uppercase;
}

.ih-ca-tbl {
  border-collapse: collapse;
  font-size: calc(12px * var(--ih-ca-z));
  width: 100%;
}

.ih-ca-tbl th {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--ih-ca-border);
  color: var(--ih-ca-mute);
  font-size: calc(10px * var(--ih-ca-z));
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 8px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.ih-ca-tbl td {
  border-bottom: 1px solid rgba(26, 31, 38, 0.95);
  padding: 7px 8px;
  white-space: nowrap;
}

.ih-ca-tbl td.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ih-ca-tbl--fx th:nth-child(n+3),
.ih-ca-tbl--comm th:nth-child(n+3) { text-align: right; }

.ih-ca-tbl td.name { color: var(--ih-ca-cream); font-weight: 700; }
.ih-ca-tbl td.mute { color: var(--ih-ca-mute); }
.ih-ca-tbl td.spark svg { display: block; height: 18px; width: 64px; }
.ih-ca-tbl--fx td.spark svg { width: 96px; height: 20px; }

.ih-ca-comm-row {
  cursor: pointer;
}

.ih-ca-comm-row:hover,
.ih-ca-comm-row:focus-visible {
  background: rgba(74, 155, 177, 0.08);
  outline: none;
}

.ih-ca-empty {
  color: var(--ih-ca-dim);
  font-size: calc(12px * var(--ih-ca-z));
  padding: 18px 8px;
  text-align: center;
}

.ih-ca-chg--up { color: var(--ih-ca-green) !important; }
.ih-ca-chg--dn { color: var(--ih-ca-red) !important; }
.ih-ca-chg--flat { color: var(--ih-ca-dim) !important; }

.ih-ca__foot {
  align-items: center;
  border-top: 1px solid var(--ih-ca-border);
  color: var(--ih-ca-mute);
  display: flex;
  flex-shrink: 0;
  font-size: calc(11px * var(--ih-ca-z));
  gap: 16px;
  justify-content: space-between;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  text-transform: uppercase;
}

.ih-ca__live {
  align-items: center;
  color: var(--ih-ca-green);
  display: inline-flex;
  gap: 6px;
}

.ih-ca__live i {
  background: var(--ih-ca-green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(116, 222, 198, 0.25);
  display: inline-block;
  height: 6px;
  width: 6px;
}

@media (max-width: 1200px) {
  .ih-ca-band--top {
    grid-template-columns: 1fr;
  }

  .ih-ca-bot {
    grid-template-columns: 1fr;
  }
}
