:root {
  color-scheme: dark;
  --bg: #05070a;
  --panel: rgba(7, 13, 21, 0.44);
  --panel-strong: rgba(8, 15, 24, 0.52);
  --panel-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.115), rgba(255, 255, 255, 0.026));
  --panel-depth: linear-gradient(135deg, rgba(77, 220, 226, 0.072), rgba(184, 156, 255, 0.04) 48%, rgba(255, 209, 102, 0.034));
  --line: rgba(190, 229, 239, 0.22);
  --line-bright: rgba(94, 234, 212, 0.38);
  --text: #edf7f6;
  --muted: #93a6ad;
  --faint: #5f737a;
  --cyan: #4ddce2;
  --green: #87f2a1;
  --gold: #ffd166;
  --rose: #ff6b8a;
  --violet: #b89cff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 12%, rgba(77, 220, 226, 0.13), transparent 32rem),
    radial-gradient(circle at 82% 8%, rgba(255, 209, 102, 0.075), transparent 26rem),
    radial-gradient(circle at 52% 76%, rgba(184, 156, 255, 0.07), transparent 31rem),
    linear-gradient(135deg, #030507 0%, #071014 44%, #010203 100%);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.shell:not(.features-view) {
  padding-top: 16px;
}

.shell:not(.features-view) .topbar {
  display: none;
}

.topbar,
.panel-head,
.summary-grid,
.workbench,
.map-panel,
.error-panel {
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 16px 0 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 2.4rem;
  line-height: 1.02;
}

h2 {
  font-size: 1.06rem;
  line-height: 1.2;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
}

.meta-strip span,
.rank-badge,
.pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 999px;
  padding: 8px 11px;
  white-space: nowrap;
}

.rank-badge.live {
  color: var(--cyan);
  border-color: rgba(77, 220, 226, 0.42);
  background: rgba(77, 220, 226, 0.1);
  animation: status-pulse 1.35s ease-in-out infinite;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric-tile {
  min-height: 122px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    var(--panel-sheen),
    var(--panel-depth),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(132%);
  overflow: hidden;
}

.metric-tile::before {
  content: "";
  display: block;
  width: 58px;
  height: 2px;
  margin-bottom: 20px;
  background: var(--cyan);
}

.metric-tile.accent-green::before {
  background: var(--green);
}

.metric-tile.accent-gold::before {
  background: var(--gold);
}

.metric-tile.accent-cyan::before {
  background: var(--cyan);
}

.metric-label,
.metric-tile small,
.detail-list dt,
.bar-label,
.section-kicker,
.tree-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-tile strong {
  display: block;
  min-width: 0;
  margin-bottom: 7px;
  font-size: 1.82rem;
  line-height: 1;
}

.metric-tile small {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.metric-tile small > span:not(.source-line) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-line {
  display: block;
  max-width: 100%;
  color: rgba(117, 245, 236, 0.88);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-tabs {
  position: relative;
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  overflow-x: auto;
}

.workspace-tab,
.option-chip,
.icon-command {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  white-space: nowrap;
}

.workspace-tab {
  min-height: 40px;
  padding: 9px 15px;
  font-weight: 700;
}

.workspace-tab:hover,
.workspace-tab.active,
.option-chip:hover,
.option-chip.active,
.icon-command:hover {
  color: var(--text);
  border-color: var(--line-bright);
  background: rgba(77, 220, 226, 0.12);
}

.view-stack {
  position: relative;
}

.dashboard-view {
  display: none;
}

.dashboard-view.active {
  display: block;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.public-static-mode .local-command-panel,
.public-static-mode .ingest-stage-command {
  display: none;
}

.ops-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    var(--panel-sheen),
    var(--panel-depth),
    var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(132%);
  overflow: hidden;
}

.ops-panel.span-2 {
  grid-column: 1 / -1;
}

.option-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  padding: 0 18px 18px;
}

.option-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-chip {
  min-height: 34px;
  padding: 7px 12px;
}

.command-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.command-line code {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(77, 220, 226, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.18);
  overflow-wrap: anywhere;
}

.icon-command {
  min-height: 38px;
  padding: 8px 12px;
}

.icon-command.primary {
  color: var(--bg);
  border-color: rgba(135, 242, 161, 0.58);
  background: var(--green);
  font-weight: 800;
}

.icon-command.danger {
  color: var(--text);
  border-color: rgba(255, 107, 138, 0.46);
  background: rgba(255, 107, 138, 0.14);
}

.icon-command:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.terminal-panel {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.terminal-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.terminal-meta span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.terminal-meta code {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(165, 214, 230, 0.12);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.18);
  overflow-wrap: anywhere;
}

.terminal-output {
  min-height: 320px;
  max-height: min(54vh, 560px);
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(165, 214, 230, 0.14);
  border-radius: 8px;
  color: #d8f7ef;
  background: rgba(0, 0, 0, 0.38);
  font-family: "Cascadia Mono", "Consolas", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.rank-badge.terminal-failed {
  color: var(--rose);
  border-color: rgba(255, 107, 138, 0.4);
  background: rgba(255, 107, 138, 0.1);
}

.stage-list,
.event-list,
.compact-list,
.fact-grid,
.health-grid,
.issue-cloud {
  padding: 0 18px 18px;
}

.stage-list,
.event-list,
.compact-list {
  display: grid;
  gap: 9px;
}

.stage-row,
.compact-row,
.event-item,
.health-card,
.fact-item {
  min-width: 0;
  border: 1px solid rgba(165, 214, 230, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.11);
}

.stage-row,
.compact-row {
  display: grid;
  align-items: center;
  gap: 10px;
}

.stage-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 10px;
}

.stage-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--bg);
  background: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
}

.stage-row strong,
.health-card strong,
.compact-row strong,
.fact-item strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.stage-row small,
.health-card span,
.health-card small,
.event-item span,
.fact-item span,
.compact-row em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  font-weight: 800;
}

.status-badge.ok {
  color: var(--green);
  border-color: rgba(135, 242, 161, 0.35);
  background: rgba(135, 242, 161, 0.08);
}

.status-badge.running {
  color: var(--cyan);
  border-color: rgba(77, 220, 226, 0.42);
  background: rgba(77, 220, 226, 0.1);
  animation: status-pulse 1.35s ease-in-out infinite;
}

.status-badge.fail,
.status-badge.warn,
.status-badge.stale {
  color: var(--gold);
  border-color: rgba(255, 209, 102, 0.38);
  background: rgba(255, 209, 102, 0.08);
}

.status-badge.sparse {
  color: var(--cyan);
  border-color: rgba(77, 220, 226, 0.34);
  background: rgba(77, 220, 226, 0.08);
}

.status-badge.skipped {
  color: var(--muted);
  border-color: rgba(147, 166, 173, 0.28);
  background: rgba(147, 166, 173, 0.07);
}

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(77, 220, 226, 0);
  }

  50% {
    box-shadow: 0 0 20px rgba(77, 220, 226, 0.2);
  }
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#ingestHealthGrid.health-grid {
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 0 12px 12px;
}

#ingestHealthGrid .status-badge {
  min-height: 23px;
  min-width: 66px;
  padding: 3px 8px;
  font-size: 0.68rem;
}

.ingest-bar-row {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(190px, 0.7fr) minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 38px;
  padding: 5px 9px;
  border: 1px solid rgba(165, 214, 230, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.11);
}

.ingest-bar-row.ok {
  border-color: rgba(135, 242, 161, 0.18);
}

.ingest-bar-row.running {
  border-color: rgba(77, 220, 226, 0.58);
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.12) 0 1px, transparent 2px),
    radial-gradient(circle at 45% 78%, rgba(255, 209, 102, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 73% 28%, rgba(135, 242, 161, 0.18) 0 1px, transparent 2px),
    linear-gradient(90deg, rgba(77, 220, 226, 0.12), rgba(135, 242, 161, 0.07), rgba(0, 0, 0, 0.08));
  box-shadow:
    inset 0 0 18px rgba(77, 220, 226, 0.08),
    0 0 20px rgba(77, 220, 226, 0.12);
}

.ingest-bar-row.running::before,
.ingest-bar-row.running::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.ingest-bar-row.running::before {
  inset: -1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 10% 50%, rgba(255, 255, 255, 0.88) 0 1px, transparent 2px),
    radial-gradient(circle at 32% 18%, rgba(255, 209, 102, 0.82) 0 1px, transparent 2px),
    radial-gradient(circle at 63% 82%, rgba(135, 242, 161, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 35%, rgba(77, 220, 226, 0.78) 0 1px, transparent 2px);
  opacity: 0.42;
  animation: active-stars 1.9s ease-in-out infinite;
}

.ingest-bar-row.running::after {
  top: 50%;
  right: 148px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 18px rgba(77, 220, 226, 0.72),
    -9px -7px 0 -3px rgba(255, 209, 102, 0.9),
    12px 6px 0 -3px rgba(135, 242, 161, 0.8);
  transform: translateY(-50%);
  animation: active-comet 1.35s ease-in-out infinite;
}

.ingest-bar-row.warn,
.ingest-bar-row.fail,
.ingest-bar-row.stale {
  border-color: rgba(255, 209, 102, 0.22);
}

.ingest-bar-row.sparse {
  border-color: rgba(77, 220, 226, 0.18);
}

.ingest-bar-row .health-order {
  width: 24px;
  height: 24px;
  font-size: 0.62rem;
}

.ingest-bar-name {
  min-width: 0;
}

.ingest-bar-name strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingest-bar-name small {
  display: block;
  min-width: 0;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingest-progress {
  height: 8px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(165, 214, 230, 0.1);
  border-radius: 999px;
  background: rgba(147, 166, 173, 0.13);
}

.ingest-progress span {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 12px rgba(77, 220, 226, 0.22);
}

.ingest-bar-row.running .ingest-progress span {
  position: relative;
  animation: bar-pulse 1.05s ease-in-out infinite;
  background: linear-gradient(90deg, var(--cyan), #ffffff 48%, var(--green));
  box-shadow:
    0 0 12px rgba(77, 220, 226, 0.54),
    0 0 22px rgba(135, 242, 161, 0.2);
}

.ingest-bar-row.running .ingest-progress {
  border-color: rgba(77, 220, 226, 0.34);
  background:
    linear-gradient(90deg, rgba(77, 220, 226, 0.1), rgba(255, 255, 255, 0.12)),
    rgba(147, 166, 173, 0.16);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.08);
}

.ingest-bar-row.warn .ingest-progress span,
.ingest-bar-row.fail .ingest-progress span {
  background: linear-gradient(90deg, var(--gold), #fff0b7);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.18);
}

.ingest-bar-row.sparse .ingest-progress span {
  background: linear-gradient(90deg, var(--cyan), rgba(135, 242, 161, 0.78));
  box-shadow: 0 0 12px rgba(77, 220, 226, 0.16);
}

.ingest-bar-row.unknown .ingest-progress span {
  background: rgba(147, 166, 173, 0.24);
  box-shadow: none;
}

.ingest-stage-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 27px;
  padding: 4px 10px;
  border: 1px solid rgba(77, 220, 226, 0.24);
  border-radius: 999px;
  color: var(--text);
  background: rgba(77, 220, 226, 0.08);
  font-size: 0.68rem;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.ingest-stage-command.primary {
  color: var(--bg);
  border-color: rgba(135, 242, 161, 0.58);
  background: var(--green);
}

.ingest-stage-command.danger {
  color: var(--text);
  border-color: rgba(255, 107, 138, 0.5);
  background: rgba(255, 107, 138, 0.16);
}

.ingest-stage-command:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

@keyframes bar-pulse {
  0%,
  100% {
    filter: brightness(0.9);
  }

  50% {
    filter: brightness(1.35);
  }
}

@keyframes active-stars {
  0%,
  100% {
    opacity: 0.26;
  }

  50% {
    opacity: 0.68;
  }
}

@keyframes active-comet {
  0%,
  100% {
    opacity: 0.52;
    transform: translateY(-50%) scale(0.78);
  }

  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.12);
  }
}

.health-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
}

.ordered-health-card {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
}

.health-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(77, 220, 226, 0.24);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(77, 220, 226, 0.07);
  font-size: 0.66rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.health-card small {
  grid-column: 1 / -1;
}

.ordered-health-card small,
.ordered-health-card .stage-metrics {
  grid-column: 2 / -1;
}

.ingest-stage-card {
  grid-template-rows: auto auto auto;
}

.health-card.ok {
  border-color: rgba(135, 242, 161, 0.22);
}

.health-card.running {
  border-color: rgba(77, 220, 226, 0.28);
}

.health-card.stale {
  border-color: rgba(255, 209, 102, 0.24);
}

.health-card.fail,
.health-card.warn {
  border-color: rgba(255, 209, 102, 0.24);
}

.health-card.skipped {
  border-color: rgba(147, 166, 173, 0.16);
}

.stage-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding-top: 2px;
}

.stage-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.68rem;
}

.stage-metrics strong {
  color: var(--text);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.fact-item {
  padding: 10px;
}

.fact-item strong {
  margin-top: 4px;
  font-size: 0.86rem;
}

.event-item {
  padding: 10px;
}

.event-item p {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.event-item.error {
  border-color: rgba(255, 107, 138, 0.22);
}

.event-item.warning {
  border-color: rgba(255, 209, 102, 0.24);
}

.issue-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  max-height: 278px;
  overflow: auto;
}

.issue-chip {
  padding: 6px 9px;
  border: 1px solid rgba(255, 209, 102, 0.32);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 209, 102, 0.07);
  font-size: 0.74rem;
  font-weight: 700;
}

.issue-chip.info {
  border-color: rgba(77, 220, 226, 0.3);
  color: var(--cyan);
  background: rgba(77, 220, 226, 0.07);
}

.issue-chip.fail {
  border-color: rgba(255, 107, 138, 0.34);
  color: var(--rose);
  background: rgba(255, 107, 138, 0.08);
}

.issue-chip.warn {
  border-color: rgba(255, 209, 102, 0.34);
  color: var(--gold);
  background: rgba(255, 209, 102, 0.08);
}

.market-read-panel {
  background:
    linear-gradient(135deg, rgba(77, 220, 226, 0.12), rgba(255, 209, 102, 0.07) 46%, rgba(255, 107, 138, 0.06)),
    var(--panel-depth),
    var(--panel-strong);
}

.market-read-narrative {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
  padding: 0 18px 14px;
}

.market-read-narrative .empty-state {
  grid-column: 1 / -1;
}

.market-read-lede {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(153, 246, 228, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(2, 18, 22, 0.42);
}

.market-read-lede h3 {
  margin: 10px 0 8px;
  color: var(--text);
  font-size: clamp(1.1rem, 2vw, 1.52rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.market-read-lede p {
  margin: 0;
  color: rgba(219, 234, 241, 0.8);
  font-size: 0.88rem;
  line-height: 1.5;
}

.market-read-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(77, 220, 226, 0.32);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(77, 220, 226, 0.09);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.market-read-tag.warn {
  color: var(--gold);
  border-color: rgba(255, 209, 102, 0.34);
  background: rgba(255, 209, 102, 0.09);
}

.market-read-tag.ok {
  color: var(--green);
  border-color: rgba(135, 242, 161, 0.34);
  background: rgba(135, 242, 161, 0.09);
}

.market-read-scoreboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.market-read-stat {
  position: relative;
  min-width: 0;
  min-height: 118px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(5, 18, 24, 0.42);
  overflow: hidden;
}

.market-read-stat::before {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(77, 220, 226, 0.5);
}

.market-read-stat.ok::before {
  background: var(--green);
  box-shadow: 0 0 18px rgba(135, 242, 161, 0.48);
}

.market-read-stat.warn::before {
  background: var(--gold);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.45);
}

.market-read-stat.violet::before {
  background: var(--violet);
  box-shadow: 0 0 18px rgba(184, 156, 255, 0.44);
}

.market-read-stat span,
.market-read-stat small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.market-read-stat span {
  text-transform: uppercase;
}

.market-read-stat strong {
  display: block;
  min-width: 0;
  margin: 8px 0 5px;
  color: var(--text);
  font-size: clamp(1.06rem, 1.7vw, 1.46rem);
  font-weight: 930;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.market-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 14px;
}

.market-theme-column {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(153, 246, 228, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.market-theme-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.market-theme-head span {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.market-theme-head strong {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.market-theme-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(90px, 0.52fr) minmax(54px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.market-theme-row strong,
.market-theme-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.market-theme-row strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
}

.market-theme-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.3;
}

.market-theme-row em {
  justify-self: end;
  color: var(--text);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 930;
  font-variant-numeric: tabular-nums;
}

.market-theme-meter {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.market-theme-meter span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(77, 220, 226, 0.4);
}

.market-theme-row.hot .market-theme-meter span {
  background: var(--rose);
  box-shadow: 0 0 14px rgba(255, 107, 138, 0.46);
}

.market-theme-row.warm .market-theme-meter span {
  background: var(--gold);
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.4);
}

.market-theme-row.cool .market-theme-meter span {
  background: var(--violet);
  box-shadow: 0 0 14px rgba(184, 156, 255, 0.36);
}

.market-theme-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 18px;
}

.market-note {
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(77, 220, 226, 0.3);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(77, 220, 226, 0.07);
  font-size: 0.72rem;
  font-weight: 820;
}

.market-note.warn {
  color: var(--gold);
  border-color: rgba(255, 209, 102, 0.34);
  background: rgba(255, 209, 102, 0.08);
}

.market-note.ok {
  color: var(--green);
  border-color: rgba(135, 242, 161, 0.34);
  background: rgba(135, 242, 161, 0.08);
}

.portfolio-home {
  align-items: start;
}

.portfolio-hero-panel {
  background:
    radial-gradient(circle at 12% 10%, rgba(77, 220, 226, 0.16), transparent 28%),
    radial-gradient(circle at 86% 22%, rgba(135, 242, 161, 0.11), transparent 26%),
    radial-gradient(circle at 54% 100%, rgba(255, 209, 102, 0.09), transparent 34%),
    var(--panel-depth),
    var(--panel-strong);
}

.portfolio-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.portfolio-value-control {
  display: grid;
  gap: 5px;
  min-width: 190px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.portfolio-value-control input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(153, 246, 228, 0.24);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.18);
  font-size: 0.9rem;
  font-weight: 780;
  outline: none;
}

.portfolio-value-control input::placeholder {
  color: rgba(237, 247, 246, 0.44);
}

.portfolio-value-control input:focus {
  border-color: rgba(153, 246, 228, 0.62);
  box-shadow: 0 0 0 3px rgba(77, 220, 226, 0.12);
}

.portfolio-rebalance-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.52fr) minmax(0, 1.48fr);
  gap: 12px;
  align-items: stretch;
  margin: 0 18px 16px;
  padding: 12px;
  border: 1px solid rgba(153, 246, 228, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(77, 220, 226, 0.11), rgba(255, 255, 255, 0.03)),
    rgba(1, 13, 18, 0.36);
}

.portfolio-rebalance-panel:empty {
  display: none;
}

.rebalance-countdown {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.rebalance-countdown span,
.rebalance-details span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.rebalance-countdown small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.rebalance-countdown strong {
  color: var(--text);
  font-size: clamp(1.42rem, 2.3vw, 2.08rem);
  font-weight: 930;
  font-variant-numeric: tabular-nums;
}

.rebalance-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.rebalance-details div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.rebalance-details strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.portfolio-hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 16px;
  padding: 0 18px 18px;
}

.portfolio-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portfolio-metric {
  position: relative;
  min-width: 0;
  padding: 13px 13px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(3, 16, 21, 0.44);
  overflow: hidden;
}

.portfolio-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(77, 220, 226, 0.6);
}

.portfolio-metric.green::before {
  background: var(--green);
  box-shadow: 0 0 16px rgba(135, 242, 161, 0.58);
}

.portfolio-metric.gold::before {
  background: var(--gold);
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.54);
}

.portfolio-metric.rose::before {
  background: var(--rose);
  box-shadow: 0 0 16px rgba(255, 107, 138, 0.54);
}

.portfolio-metric.violet::before {
  background: var(--violet);
  box-shadow: 0 0 16px rgba(184, 156, 255, 0.54);
}

.portfolio-metric span,
.portfolio-metric small {
  display: block;
  color: var(--muted);
  font-size: 0.69rem;
}

.portfolio-metric span {
  font-weight: 850;
  text-transform: uppercase;
}

.portfolio-metric strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--text);
  font-size: clamp(1.08rem, 1.7vw, 1.72rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.portfolio-orbit {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.portfolio-orbit-visual {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(3, 16, 21, 0.94) 0 28%, transparent 29%),
    conic-gradient(from -90deg, rgba(135, 242, 161, 0.82) 0deg var(--long-deg), rgba(255, 107, 138, 0.78) var(--long-deg) 360deg);
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.32),
    0 0 42px rgba(77, 220, 226, 0.16);
  overflow: hidden;
}

.portfolio-orbit-visual::after {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07), transparent 64%);
  animation: portfolio-orbit-pulse 4.6s ease-in-out infinite;
}

.portfolio-orbit-ring {
  position: absolute;
  inset: 16%;
  border: 1px solid rgba(77, 220, 226, 0.24);
  border-radius: 50%;
}

.portfolio-orbit-ring.two {
  inset: 26%;
  border-color: rgba(255, 209, 102, 0.2);
  transform: rotate(28deg) scaleX(1.24);
}

.portfolio-orbit-moon {
  position: absolute;
  top: 12%;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform-origin: 0 88px;
  animation: portfolio-orbit-spin 9s linear infinite;
}

.portfolio-orbit-moon.long {
  background: var(--green);
  box-shadow: 0 0 18px rgba(135, 242, 161, 0.8);
}

.portfolio-orbit-moon.short {
  background: var(--rose);
  box-shadow: 0 0 18px rgba(255, 107, 138, 0.78);
  animation-duration: 13s;
  animation-direction: reverse;
}

.portfolio-orbit-core {
  position: absolute;
  inset: 34%;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(77, 220, 226, 0.32);
  border-radius: 50%;
  background: rgba(3, 16, 21, 0.88);
  box-shadow: 0 0 24px rgba(77, 220, 226, 0.2);
}

.portfolio-orbit-core strong {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
}

.portfolio-orbit-core span {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.portfolio-orbit-readout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.portfolio-orbit-readout div {
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.portfolio-orbit-readout dt,
.portfolio-orbit-readout dd {
  margin: 0;
}

.portfolio-orbit-readout dt {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portfolio-orbit-readout dd {
  margin-top: 4px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 850;
}

.portfolio-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 0 18px 12px;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-select {
  min-height: 38px;
  min-width: 180px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.portfolio-select option {
  color: #071014;
  background: #f7fbfb;
}

.portfolio-select option:checked,
.portfolio-select option:hover {
  color: #031014;
  background: #a9d2ff;
}

.portfolio-table-wrap {
  max-height: 590px;
  overflow: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-table {
  width: 100%;
  min-width: 1400px;
  border-collapse: collapse;
  table-layout: fixed;
}

.portfolio-table th:nth-child(1),
.portfolio-table td:nth-child(1) {
  width: 180px;
}

.portfolio-table th:nth-child(2),
.portfolio-table td:nth-child(2) {
  width: 70px;
}

.portfolio-table th:nth-child(3),
.portfolio-table td:nth-child(3) {
  width: 130px;
}

.portfolio-table th:nth-child(4),
.portfolio-table td:nth-child(4) {
  width: 165px;
}

.portfolio-table th:nth-child(5),
.portfolio-table td:nth-child(5) {
  width: 430px;
}

.portfolio-table th:nth-child(6),
.portfolio-table td:nth-child(6) {
  width: 130px;
}

.portfolio-table th:nth-child(7),
.portfolio-table td:nth-child(7) {
  width: 90px;
}

.portfolio-table th:nth-child(8),
.portfolio-table td:nth-child(8) {
  width: 80px;
}

.portfolio-table th:nth-child(9),
.portfolio-table td:nth-child(9) {
  width: 125px;
}

.portfolio-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 16, 21, 0.92);
  color: var(--muted);
  font-size: 0.68rem;
  text-align: left;
  text-transform: uppercase;
}

.portfolio-table td,
.portfolio-table th {
  padding: 10px 11px;
}

.portfolio-table td {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.portfolio-position-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-position-row:hover {
  background: rgba(77, 220, 226, 0.06);
}

.ticker-lockup,
.sector-lockup,
.weight-cell,
.portfolio-why-cell {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.ticker-lockup strong,
.sector-lockup strong,
.weight-cell strong {
  display: block;
  color: var(--text);
  font-weight: 850;
}

.ticker-lockup small,
.sector-lockup small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.position-dollar {
  display: block;
  margin-top: 2px;
  color: rgba(153, 246, 228, 0.86);
  font-size: 0.7rem;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.side-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 850;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-pill.long {
  border: 1px solid rgba(135, 242, 161, 0.32);
  color: var(--green);
  background: rgba(135, 242, 161, 0.09);
}

.side-pill.short {
  border: 1px solid rgba(255, 107, 138, 0.34);
  color: var(--rose);
  background: rgba(255, 107, 138, 0.09);
}

.side-pill.hedge {
  border: 1px solid rgba(184, 156, 255, 0.38);
  color: var(--violet);
  background: rgba(184, 156, 255, 0.11);
}

.weight-track,
.sleeve-bars {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.weight-track i,
.sleeve-bars span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.weight-track.long i {
  background: linear-gradient(90deg, rgba(135, 242, 161, 0.45), var(--green));
}

.weight-track.short i {
  background: linear-gradient(90deg, rgba(255, 107, 138, 0.42), var(--rose));
}

.weight-track.hedge i {
  background: linear-gradient(90deg, rgba(184, 156, 255, 0.38), var(--violet));
}

.portfolio-position-row.hedge {
  background:
    linear-gradient(90deg, rgba(184, 156, 255, 0.12), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.08);
}

.market-hedge-overlay {
  padding: 0 18px 18px;
}

.market-hedge-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(184, 156, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(184, 156, 255, 0.12), rgba(77, 220, 226, 0.045)),
    rgba(0, 0, 0, 0.14);
}

.market-hedge-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.market-hedge-main div {
  min-width: 0;
  text-align: right;
}

.market-hedge-main strong,
.market-hedge-main small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.market-hedge-main strong {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 900;
}

.market-hedge-main small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.market-hedge-meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.market-hedge-meter span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(184, 156, 255, 0.42), var(--violet), var(--rose));
  box-shadow: 0 0 18px rgba(184, 156, 255, 0.2);
}

.market-hedge-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.market-hedge-facts dt,
.market-hedge-facts dd {
  margin: 0;
}

.market-hedge-facts dt {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 860;
  text-transform: uppercase;
}

.market-hedge-facts dd {
  margin-top: 4px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.sleeve-bars {
  display: flex;
  gap: 2px;
}

.sleeve-bars .clean {
  background: var(--cyan);
}

.sleeve-bars .sec {
  background: var(--gold);
}

.sleeve-bars .econ {
  background: var(--green);
}

.sleeve-bars .hedge {
  background: var(--rose);
}

.portfolio-why-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.why-status {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 20px;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.64rem;
  font-weight: 850;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-why-cell.agree .why-status {
  border-color: rgba(135, 242, 161, 0.28);
  color: var(--green);
  background: rgba(135, 242, 161, 0.08);
}

.portfolio-why-cell.conflict .why-status {
  border-color: rgba(255, 209, 102, 0.32);
  color: var(--gold);
  background: rgba(255, 209, 102, 0.08);
}

.portfolio-why-cell.sec-only .why-status {
  border-color: rgba(255, 209, 102, 0.28);
  color: var(--gold);
  background: rgba(255, 209, 102, 0.07);
}

.portfolio-why-cell.hedge .why-status {
  border-color: rgba(184, 156, 255, 0.32);
  color: var(--violet);
  background: rgba(184, 156, 255, 0.08);
}

.why-status.muted {
  color: var(--muted);
}

.why-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.why-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 0.66rem;
  line-height: 1;
}

.why-chip b,
.why-chip em {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.why-chip b {
  max-width: 190px;
  font-weight: 820;
}

.why-chip em {
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
}

.why-chip.model {
  border-color: rgba(77, 220, 226, 0.24);
  background: rgba(77, 220, 226, 0.07);
}

.why-chip.sec {
  border-color: rgba(255, 209, 102, 0.25);
  background: rgba(255, 209, 102, 0.075);
}

.why-chip.econ {
  border-color: rgba(135, 242, 161, 0.24);
  background: rgba(135, 242, 161, 0.075);
}

.why-chip.hedge {
  border-color: rgba(184, 156, 255, 0.24);
  background: rgba(184, 156, 255, 0.075);
}

.why-chip.positive em {
  color: var(--green);
}

.why-chip.negative em {
  color: var(--rose);
}

.why-chip.empty {
  color: var(--muted);
}

.portfolio-rank-list,
.sleeve-mix,
.sector-exposure-grid {
  display: grid;
  gap: 9px;
  padding: 0 18px 18px;
}

.portfolio-rank-row,
.sector-exposure-row {
  display: grid;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
  cursor: pointer;
}

.portfolio-rank-row {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 9px 10px;
}

.portfolio-rank-row:hover,
.sector-exposure-row:hover {
  border-color: rgba(77, 220, 226, 0.28);
  background: rgba(77, 220, 226, 0.08);
}

.portfolio-rank-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.portfolio-rank-main strong,
.sector-copy strong {
  color: var(--text);
  font-weight: 850;
}

.portfolio-rank-main small,
.sector-copy small {
  color: var(--muted);
  font-size: 0.69rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-rank-main i {
  height: 4px;
  border-radius: 999px;
}

.portfolio-rank-row.long .portfolio-rank-main i {
  background: linear-gradient(90deg, rgba(135, 242, 161, 0.34), var(--green));
}

.portfolio-rank-row.short .portfolio-rank-main i {
  background: linear-gradient(90deg, rgba(255, 107, 138, 0.34), var(--rose));
}

.portfolio-rank-weight {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.portfolio-rank-weight strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1;
}

.portfolio-rank-weight small {
  color: rgba(153, 246, 228, 0.86);
  font-size: 0.68rem;
  font-weight: 780;
  line-height: 1.1;
  white-space: nowrap;
}

.sector-exposure-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sector-exposure-row {
  grid-template-columns: minmax(0, 0.8fr) minmax(160px, 1.2fr) 118px;
  gap: 12px;
  padding: 11px 12px;
}

.sector-copy {
  min-width: 0;
}

.sector-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sector-bar i {
  display: block;
  height: 100%;
}

.sector-bar .long {
  background: linear-gradient(90deg, rgba(135, 242, 161, 0.4), var(--green));
}

.sector-bar .short {
  background: linear-gradient(90deg, rgba(255, 107, 138, 0.38), var(--rose));
}

.sector-values {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sector-values strong,
.sector-values small {
  display: block;
}

.sector-values small {
  color: var(--muted);
  font-size: 0.67rem;
}

.sleeve-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.7fr) 72px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.sleeve-row strong,
.sleeve-row small {
  display: block;
}

.sleeve-row small {
  color: var(--muted);
  font-size: 0.68rem;
}

.sleeve-row i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sleeve-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.sleeve-row.clean b {
  background: linear-gradient(90deg, rgba(77, 220, 226, 0.34), var(--cyan));
}

.sleeve-row.sec b {
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.34), var(--gold));
}

.sleeve-row.econ b {
  background: linear-gradient(90deg, rgba(135, 242, 161, 0.34), var(--green));
}

.sleeve-row.formula b {
  background: linear-gradient(90deg, rgba(184, 156, 255, 0.34), var(--violet));
}

.sleeve-row em {
  color: var(--text);
  font-style: normal;
  font-weight: 850;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@keyframes portfolio-orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes portfolio-orbit-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.compact-row {
  grid-template-columns: 42px minmax(0, 1fr) 62px;
  padding: 9px 10px;
}

.compact-row span {
  color: var(--cyan);
  font-weight: 800;
}

.compact-row strong {
  font-size: 0.82rem;
}

.compact-row em {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.shap-lab {
  min-width: 0;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 18%, rgba(135, 242, 161, 0.1), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(255, 209, 102, 0.09), transparent 24%),
    linear-gradient(135deg, rgba(77, 220, 226, 0.08), rgba(184, 156, 255, 0.055) 48%, rgba(255, 107, 138, 0.04)),
    var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(146%);
  overflow: hidden;
}

.shap-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 14px;
}

.shap-stat {
  position: relative;
  min-width: 0;
  min-height: 96px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.13);
}

.shap-stat::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--violet);
  box-shadow: 0 0 18px rgba(184, 156, 255, 0.28);
}

.shap-stat.accent-cyan::before {
  background: var(--cyan);
}

.shap-stat.accent-green::before {
  background: var(--green);
}

.shap-stat.accent-gold::before {
  background: var(--gold);
}

.shap-stat span,
.shap-stat small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.shap-stat strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 1.9vw, 1.66rem);
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.shap-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 14px;
}

.shap-sort-tabs {
  padding: 0;
}

.shap-model-tabs {
  padding: 0;
}

.shap-model-graphs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 14px;
}

.shap-model-graph {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.14);
}

.shap-model-graph.active {
  border-color: rgba(77, 220, 226, 0.46);
  box-shadow: inset 0 0 0 1px rgba(77, 220, 226, 0.12), 0 0 24px rgba(77, 220, 226, 0.08);
}

.shap-model-graph-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  width: 100%;
  padding: 11px 12px 9px;
  border: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(77, 220, 226, 0.1), rgba(255, 255, 255, 0.025)),
    transparent;
  cursor: pointer;
  text-align: left;
}

.shap-model-graph-head:hover {
  background:
    linear-gradient(90deg, rgba(77, 220, 226, 0.16), rgba(255, 255, 255, 0.04)),
    transparent;
}

.shap-model-graph-head span,
.shap-model-graph-head small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shap-model-graph-head span {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 900;
}

.shap-model-graph-head strong {
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 900;
}

.shap-model-graph-head small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 760;
}

.shap-graph-bars {
  display: grid;
  gap: 6px;
  padding: 10px 12px 12px;
}

.shap-graph-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, 0.5fr) 54px;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 25px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.shap-graph-bar:hover,
.shap-graph-bar.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.shap-graph-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 780;
}

.shap-graph-bar i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.shap-graph-bar b {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 12px rgba(77, 220, 226, 0.22);
}

.shap-graph-bar em {
  color: var(--text);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 840;
  text-align: right;
}

.shap-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 0 18px 18px;
}

.shap-feature-list {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding-right: 3px;
}

.shap-feature-row {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(92px, 0.34fr) 96px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.15);
  cursor: pointer;
  text-align: left;
}

.shap-feature-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, var(--shap-glow), transparent),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent);
  opacity: 0;
  transform: translateX(-55%);
  transition: opacity 180ms ease;
  animation: shap-scan 3.2s linear infinite;
  pointer-events: none;
}

.shap-feature-row:hover,
.shap-feature-row.active {
  border-color: color-mix(in srgb, var(--shap-color) 66%, white 16%);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--shap-color) 22%, transparent), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.12);
}

.shap-feature-row:hover::before,
.shap-feature-row.active::before {
  opacity: 0.85;
}

.shap-rank {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #061014;
  background: linear-gradient(135deg, #ffffff, var(--shap-color));
  font-size: 0.74rem;
  font-weight: 900;
  box-shadow: 0 0 20px var(--shap-glow);
}

.shap-main,
.shap-values {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.shap-main strong,
.shap-values strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.shap-main small,
.shap-values small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  overflow-wrap: anywhere;
}

.shap-meter {
  position: relative;
  z-index: 1;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.shap-meter span {
  display: block;
  width: var(--shap-pct);
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--shap-color), rgba(255, 255, 255, 0.88));
  box-shadow: 0 0 18px var(--shap-glow);
  animation: shap-meter-pulse 1.8s ease-in-out infinite;
}

.shap-detail-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.14);
}

.shap-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: start;
}

.shap-detail-head h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.62rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.shap-sparkline {
  width: 100%;
  max-width: 240px;
  min-height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    rgba(0, 0, 0, 0.13);
  background-size: 24px 24px;
}

.shap-spark-bar {
  fill: rgba(77, 220, 226, 0.62);
  filter: drop-shadow(0 0 8px rgba(77, 220, 226, 0.25));
}

.shap-spark-bar.active {
  fill: var(--gold);
  animation: shap-spark-active 1.1s ease-in-out infinite;
}

.shap-metric-bars {
  margin-top: 14px;
}

.formula-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.formula-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.formula-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.formula-card code {
  display: block;
  color: rgba(237, 247, 246, 0.95);
  font-family: "Cascadia Mono", "Consolas", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.shap-detail-tree {
  max-height: 320px;
  overflow: auto;
  padding: 0;
}

@keyframes shap-scan {
  0% {
    transform: translateX(-70%);
  }

  100% {
    transform: translateX(70%);
  }
}

@keyframes shap-meter-pulse {
  0%,
  100% {
    filter: brightness(0.92);
  }

  50% {
    filter: brightness(1.32);
  }
}

@keyframes shap-spark-active {
  0%,
  100% {
    opacity: 0.72;
  }

  50% {
    opacity: 1;
  }
}

@media (max-width: 1180px) {
  .shap-layout {
    grid-template-columns: 1fr;
  }

  .shap-feature-list {
    max-height: 430px;
  }
}

@media (max-width: 900px) {
  .shap-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shap-detail-head {
    grid-template-columns: 1fr;
  }

  .shap-model-graphs {
    grid-template-columns: 1fr;
  }

  .shap-sparkline {
    max-width: none;
  }

  .formula-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .shap-lab .panel-head,
  .shap-toolbar,
  .shap-layout,
  .shap-model-graphs,
  .shap-stat-grid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .shap-stat-grid {
    grid-template-columns: 1fr;
  }

  .shap-feature-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .shap-meter,
  .shap-values {
    grid-column: 2;
  }

  .shap-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
  }
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 14px;
  align-items: stretch;
}

.signal-panel-shell,
.detail-panel,
.map-panel,
.error-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    var(--panel-sheen),
    var(--panel-depth),
    var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(132%);
}

.signal-panel-shell,
.detail-panel {
  min-height: 640px;
}

.workbench > * {
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
}

.panel-head.compact {
  align-items: center;
  padding-bottom: 12px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.search-box {
  display: grid;
  gap: 6px;
  min-width: 220px;
  color: var(--muted);
  font-size: 0.76rem;
}

.search-box input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

.search-box input:focus {
  border-color: var(--line-bright);
  box-shadow: 0 0 0 3px rgba(77, 220, 226, 0.12);
}

.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  user-select: none;
}

.toggle-line input {
  accent-color: var(--green);
}

.sort-tabs {
  display: flex;
  gap: 8px;
  padding: 0 18px 16px;
  overflow-x: auto;
}

.sort-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
}

.sort-tab:hover,
.sort-tab.active {
  color: var(--text);
  border-color: var(--line-bright);
  background: rgba(77, 220, 226, 0.12);
}

.signal-atlas {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 392px);
  align-items: start;
}

.signal-panel {
  overflow: hidden;
}

.signal-control-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 18px 14px;
}

.signal-control-strip .sort-tabs {
  padding: 0;
}

.signal-limit-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.signal-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-height: 612px;
  padding: 0 18px 18px;
  overflow: auto;
}

.signal-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1.4fr) minmax(250px, 0.9fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(190, 229, 239, 0.16);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.02) 44%, rgba(77, 220, 226, 0.055)),
    rgba(4, 10, 16, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 34px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.signal-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--green));
  opacity: 0;
  transition: opacity 160ms ease;
}

.signal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(77, 220, 226, 0.11), transparent 38%),
    radial-gradient(circle at 82% 20%, rgba(255, 209, 102, 0.11), transparent 22%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.signal-card:hover,
.signal-card.active {
  border-color: rgba(117, 245, 236, 0.46);
  background:
    linear-gradient(135deg, rgba(117, 245, 236, 0.14), rgba(255, 255, 255, 0.035) 48%, rgba(184, 156, 255, 0.075)),
    rgba(4, 10, 16, 0.44);
  box-shadow:
    0 0 0 1px rgba(117, 245, 236, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.signal-card.active::before,
.signal-card.top-signal::before,
.signal-card:hover::after {
  opacity: 1;
}

.signal-rank {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(244, 251, 255, 0.95);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.signal-card.top-signal .signal-rank {
  color: #061015;
  border-color: rgba(255, 255, 255, 0.54);
  background: linear-gradient(135deg, #f6fffb, #75f5ec 52%, #ffd166);
  box-shadow:
    0 0 28px rgba(77, 220, 226, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.signal-card-main,
.signal-card-metrics,
.signal-card-foot {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.signal-card-main strong {
  display: block;
  min-width: 0;
  line-height: 1.22;
  overflow-wrap: anywhere;
  font-size: 0.97rem;
}

.signal-card-main small,
.signal-card-metrics em,
.signal-card-foot {
  color: var(--muted);
  font-size: 0.74rem;
}

.signal-card-main small {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.signal-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 8px;
}

.signal-card-metrics span {
  min-width: 0;
}

.signal-card-metrics em,
.signal-card-metrics strong {
  display: block;
  font-style: normal;
}

.signal-card-metrics strong {
  margin-top: 3px;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.signal-card-bars {
  position: relative;
  z-index: 1;
  grid-column: 2 / -1;
  display: grid;
  gap: 5px;
}

.signal-card-bars i {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.signal-card-bars i::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.signal-card-bars .grade::before {
  width: var(--signal-grade);
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 18px rgba(77, 220, 226, 0.32);
}

.signal-card-bars .stability::before {
  width: var(--signal-stability);
  background: linear-gradient(90deg, var(--violet), var(--gold));
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.24);
}

.signal-card-foot {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.signal-more-note {
  padding: 12px 14px;
  border: 1px dashed rgba(190, 229, 239, 0.2);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.82rem;
}

.model-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.model-card {
  position: relative;
  min-width: 0;
  min-height: 126px;
  padding: 14px;
  border: 1px solid rgba(190, 229, 239, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.025) 48%, rgba(77, 220, 226, 0.055)),
    rgba(4, 10, 16, 0.34);
  overflow: hidden;
}

.model-card::before {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(77, 220, 226, 0.28);
}

.model-card.green::before {
  background: var(--green);
}

.model-card.violet::before {
  background: var(--violet);
}

.model-card.gold::before {
  background: var(--gold);
}

.model-card span,
.model-card small {
  color: var(--muted);
  font-size: 0.74rem;
}

.model-card strong {
  display: block;
  min-width: 0;
  margin: 8px 0;
  overflow-wrap: anywhere;
  font-size: 1.02rem;
  line-height: 1.2;
}

.model-family-row {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) minmax(74px, 0.55fr) 58px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(190, 229, 239, 0.14);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.1);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.model-family-row:hover {
  border-color: var(--family-color);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)),
    var(--family-glow);
  transform: translateX(2px);
}

.family-marker {
  width: 6px;
  height: 100%;
  min-height: 38px;
  border-radius: 999px;
  background: var(--family-color);
  box-shadow: 0 0 16px var(--family-glow);
}

.family-copy {
  min-width: 0;
}

.family-copy strong,
.family-copy small,
.family-values strong,
.family-values small {
  display: block;
  min-width: 0;
}

.family-copy strong,
.family-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-copy small,
.family-values small {
  color: var(--muted);
  font-size: 0.72rem;
}

.family-meter {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.family-meter i {
  display: block;
  width: var(--family-pct);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--family-color), rgba(255, 255, 255, 0.82));
  box-shadow: 0 0 16px var(--family-glow);
}

.family-values {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  max-height: 548px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(165, 214, 230, 0.09);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  background: rgba(7, 12, 17, 0.96);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

th:nth-child(1),
td:nth-child(1) {
  width: 72px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 32%;
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4),
th:nth-child(5),
td:nth-child(5),
th:nth-child(6),
td:nth-child(6) {
  width: 116px;
}

th:nth-child(7),
td:nth-child(7) {
  width: 86px;
}

tbody tr {
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease;
}

tbody tr:hover,
tbody tr.active {
  background: rgba(77, 220, 226, 0.075);
}

.feature-name {
  display: block;
  min-width: 0;
  line-height: 1.22;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.feature-sub {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.75rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.score-cell {
  font-variant-numeric: tabular-nums;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--rose);
}

.neutral {
  color: var(--muted);
}

.train-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.train-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--faint);
  box-shadow: 0 0 0 4px rgba(95, 115, 122, 0.12);
}

.train-dot.on::before {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(135, 242, 161, 0.13);
}

.detail-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#detailFeature {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}

.pill {
  color: var(--muted);
  font-size: 0.75rem;
}

.pill.hot {
  color: var(--green);
  border-color: rgba(135, 242, 161, 0.38);
  background: rgba(135, 242, 161, 0.08);
}

.pill.warn {
  color: var(--gold);
  border-color: rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.08);
}

.orbital-card {
  position: relative;
  height: 220px;
  margin: 4px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at center, rgba(77, 220, 226, 0.16), transparent 28%),
    radial-gradient(circle at 22% 82%, rgba(135, 242, 161, 0.07), transparent 24%),
    rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.orbital-card::before,
.orbital-card::after {
  content: "";
  position: absolute;
  inset: 28px 52px;
  border: 1px solid rgba(77, 220, 226, 0.14);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.orbital-card::after {
  inset: 46px 32px;
  border-color: rgba(255, 209, 102, 0.14);
  transform: rotate(18deg);
}

.orbital-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(77, 220, 226, 0.58);
  border-radius: 50%;
  background: rgba(3, 8, 11, 0.86);
  box-shadow:
    0 0 40px rgba(77, 220, 226, 0.25),
    inset 0 0 28px rgba(77, 220, 226, 0.09);
}

.orbital-core span {
  font-size: 1.4rem;
  font-weight: 800;
}

.orbital-core small {
  margin-top: -18px;
  color: var(--muted);
  font-size: 0.68rem;
}

.orbit-node {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 0;
  border-radius: 50%;
  color: var(--node-text, var(--bg));
  background: transparent;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 var(--node-glow-size, 22px) var(--node-glow, rgba(77, 220, 226, 0.28));
  overflow: visible;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.orbit-node::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid var(--node-halo, rgba(77, 220, 226, 0.18));
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.72);
  pointer-events: none;
}

.planet-core {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(237, 247, 246, 0.5);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.95), transparent 19%),
    radial-gradient(circle at 72% 78%, rgba(0, 0, 0, 0.28), transparent 34%),
    radial-gradient(circle at 45% 44%, var(--node-bg, var(--cyan)), rgba(255, 255, 255, 0.16) 72%);
  box-shadow:
    inset -5px -6px 10px rgba(0, 0, 0, 0.22),
    inset 4px 4px 8px rgba(255, 255, 255, 0.2),
    0 0 var(--node-glow-size, 22px) var(--node-glow, rgba(77, 220, 226, 0.28));
  filter: saturate(var(--planet-saturation, 1.1)) brightness(var(--planet-brightness, 1));
}

.planet-ring,
.planet-star,
.planet-moon {
  position: absolute;
  pointer-events: none;
}

.planet-ring {
  left: 50%;
  top: 50%;
  z-index: 2;
  border: 1px solid var(--node-glow, rgba(77, 220, 226, 0.34));
  border-radius: 50%;
  box-shadow: 0 0 8px var(--node-halo, rgba(77, 220, 226, 0.15));
  opacity: 0.72;
}

.ring-1 {
  width: 42px;
  height: 15px;
  transform: translate(-50%, -50%) rotate(-18deg);
}

.ring-2 {
  width: 48px;
  height: 19px;
  transform: translate(-50%, -50%) rotate(18deg);
  opacity: 0.54;
}

.ring-3 {
  width: 54px;
  height: 24px;
  border-style: dashed;
  transform: translate(-50%, -50%) rotate(-38deg);
  opacity: 0.44;
}

.planet-star {
  z-index: 1;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(237, 247, 246, 0.95);
  box-shadow:
    0 0 5px rgba(237, 247, 246, 0.9),
    0 0 9px var(--node-glow, rgba(77, 220, 226, 0.42));
  animation: planet-star-twinkle 1.9s ease-in-out infinite;
}

.star-1 {
  left: -9px;
  top: -5px;
}

.star-2 {
  right: -11px;
  top: 1px;
  animation-delay: -0.45s;
}

.star-3 {
  left: -7px;
  bottom: -7px;
  animation-delay: -0.9s;
}

.star-4 {
  right: -6px;
  bottom: -10px;
  animation-delay: -1.2s;
}

.star-5 {
  left: 50%;
  top: -13px;
  animation-delay: -1.55s;
}

.planet-moon {
  z-index: 4;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #edf7f6;
  box-shadow:
    inset -1px -1px 2px rgba(0, 0, 0, 0.28),
    0 0 8px rgba(237, 247, 246, 0.74);
}

.moon-1 {
  right: -9px;
  top: -5px;
}

.moon-2 {
  left: -11px;
  top: 16px;
  width: 4px;
  height: 4px;
}

.moon-3 {
  right: -4px;
  bottom: -10px;
  width: 3px;
  height: 3px;
}

.orbit-node.training .planet-core {
  border-color: rgba(237, 247, 246, 0.58);
}

.orbit-node.excluded .planet-core {
  border-color: rgba(255, 209, 102, 0.72);
}

.orbit-node.active {
  outline: 3px solid rgba(237, 247, 246, 0.46);
}

.orbit-node:hover,
.orbit-node:focus-visible {
  z-index: 5;
  animation: orbit-node-pulse var(--node-pulse-duration, 0.95s) ease-in-out infinite;
  transform: scale(1.28);
}

.orbit-node:hover .planet-core,
.orbit-node:focus-visible .planet-core {
  border-color: rgba(255, 255, 255, 0.82);
}

.orbit-node:hover .planet-ring,
.orbit-node:focus-visible .planet-ring {
  animation: planet-ring-pulse var(--node-pulse-duration, 0.95s) ease-in-out infinite;
}

.orbit-node:hover::after,
.orbit-node:focus-visible::after {
  animation: orbit-node-halo var(--node-pulse-duration, 0.95s) ease-in-out infinite;
}

@keyframes orbit-node-pulse {
  0%,
  100% {
    box-shadow: 0 0 var(--node-glow-size, 22px) var(--node-glow, rgba(77, 220, 226, 0.28));
  }

  50% {
    box-shadow:
      0 0 var(--node-hover-glow-size, 40px) var(--node-glow, rgba(77, 220, 226, 0.42)),
      0 0 0 var(--node-hover-ring-size, 8px) var(--node-halo, rgba(77, 220, 226, 0.16));
  }
}

@keyframes orbit-node-halo {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.72);
  }

  50% {
    opacity: 1;
    transform: scale(1.14);
  }
}

@keyframes planet-ring-pulse {
  0%,
  100% {
    opacity: 0.52;
    box-shadow: 0 0 8px var(--node-halo, rgba(77, 220, 226, 0.15));
  }

  50% {
    opacity: 0.9;
    box-shadow:
      0 0 12px var(--node-glow, rgba(77, 220, 226, 0.34)),
      0 0 22px var(--node-halo, rgba(77, 220, 226, 0.18));
  }
}

@keyframes planet-star-twinkle {
  0%,
  100% {
    opacity: 0.44;
    transform: scale(0.76);
  }

  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

.metric-bars {
  display: grid;
  gap: 11px;
  padding: 0 18px 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 66px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-width);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bar-color, var(--cyan)), var(--bar-highlight, var(--bar-color, var(--cyan))));
  box-shadow: 0 0 var(--bar-glow-size, 8px) var(--bar-glow, rgba(77, 220, 226, 0.3));
  transform-origin: center;
}

.bar-fill::after {
  content: "";
  position: absolute;
  inset: -6px 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88), transparent);
  opacity: 0;
  transform: translateX(-80%);
  pointer-events: none;
}

.bar-fill.pulse {
  animation: metric-bar-pulse var(--bar-pulse-duration, 1.8s) ease-in-out infinite;
}

.bar-fill.pulse::after {
  animation: metric-bar-sheen var(--bar-pulse-duration, 1.8s) ease-in-out infinite;
}

@keyframes metric-bar-pulse {
  0%,
  100% {
    filter: saturate(1);
    box-shadow: 0 0 var(--bar-glow-size, 8px) var(--bar-glow, rgba(77, 220, 226, 0.3));
    transform: scaleY(1);
  }

  50% {
    filter: saturate(1.35);
    box-shadow:
      0 0 var(--bar-glow-size, 8px) var(--bar-glow, rgba(77, 220, 226, 0.3)),
      0 0 18px var(--bar-glow, rgba(77, 220, 226, 0.22));
    transform: scaleY(var(--bar-pulse-scale, 1.35));
  }
}

@keyframes metric-bar-sheen {
  0%,
  100% {
    opacity: 0;
    transform: translateX(-80%);
  }

  50% {
    opacity: var(--bar-pulse-alpha, 0.24);
    transform: translateX(90%);
  }
}

.bar-value {
  color: var(--text);
  font-size: 0.78rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-tree-section {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  max-height: 430px;
  overflow: auto;
  scrollbar-color: rgba(77, 220, 226, 0.36) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.signal-tree-section {
  max-height: 360px;
  background:
    linear-gradient(180deg, rgba(77, 220, 226, 0.04), rgba(0, 0, 0, 0.026)),
    rgba(0, 0, 0, 0.045);
}

.signal-tree-section .data-tree {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  align-items: start;
}

.section-kicker {
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.data-tree,
.data-tree ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.data-tree ul {
  position: relative;
  margin: 7px 0 0 12px;
  padding-left: 12px;
}

.data-tree ul::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  bottom: 5px;
  width: 1px;
  background: linear-gradient(rgba(77, 220, 226, 0.24), rgba(135, 242, 161, 0.08));
}

.tree-item {
  min-width: 0;
}

.tree-node {
  display: grid;
  grid-template-columns: 10px minmax(82px, 0.58fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  font-size: 0.76rem;
  line-height: 1.28;
}

.tree-stem {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(77, 220, 226, 0.65);
  border-radius: 50%;
  background: rgba(77, 220, 226, 0.18);
  box-shadow: 0 0 10px rgba(77, 220, 226, 0.24);
}

.data-tree > .tree-item > .tree-node .tree-stem {
  border-color: rgba(135, 242, 161, 0.72);
  background: rgba(135, 242, 161, 0.2);
  box-shadow: 0 0 12px rgba(135, 242, 161, 0.26);
}

.tree-label,
.tree-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tree-label {
  font-weight: 700;
}

.tree-value {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin: 0;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.detail-list dd {
  margin: 4px 0 0;
  min-width: 0;
  color: var(--text);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.map-panel {
  margin-top: 14px;
  overflow: hidden;
}

.score-map {
  display: block;
  width: 100%;
  height: clamp(260px, 38vh, 430px);
  border-top: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(0, 0, 0, 0.075);
  background-size: 44px 44px;
}

.score-map text {
  fill: var(--muted);
  font-size: 12px;
}

.score-map .axis {
  stroke: rgba(165, 214, 230, 0.22);
  stroke-width: 1;
}

.score-point {
  cursor: pointer;
  stroke: rgba(237, 247, 246, 0.78);
  stroke-width: 1.2;
}

.score-point.active {
  stroke: #ffffff;
  stroke-width: 3;
}

.error-panel {
  margin-top: 14px;
  padding: 18px;
  border-color: rgba(255, 107, 138, 0.35);
}

.error-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

@media (max-width: 1120px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-grid,
  .option-builder {
    grid-template-columns: 1fr;
  }

  .health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workbench {
    grid-template-columns: 1fr;
  }

  .signal-panel-shell,
  .detail-panel {
    min-height: auto;
  }

  .detail-panel {
    display: block;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(calc(100% - 24px), 1480px);
    padding-top: 16px;
  }

  .topbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .meta-strip {
    justify-content: flex-start;
    width: 100%;
  }

  .meta-strip span {
    flex: 0 0 auto;
  }

  h1 {
    font-size: 2rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .health-grid,
  .fact-grid {
    grid-template-columns: 1fr;
  }

  .command-line {
    grid-template-columns: 1fr;
  }

  .terminal-meta {
    grid-template-columns: 1fr;
  }

  .ingest-bar-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .ingest-progress {
    grid-column: 2 / -1;
  }

  #ingestHealthGrid .status-badge {
    grid-column: 2;
    justify-self: start;
  }

  .ingest-stage-command {
    grid-column: 3;
    justify-self: end;
  }

  .toolbar,
  .search-box {
    width: 100%;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .toggle-line {
    width: 100%;
  }

  .orbit-node {
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
  }

  .table-wrap {
    max-height: 520px;
  }

  table {
    min-width: 760px;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .signal-tree-section .data-tree {
    grid-template-columns: 1fr;
  }
}

/* Observatory visual pass */
:root {
  --bg: #02040a;
  --panel: rgba(9, 19, 31, 0.38);
  --panel-strong: rgba(8, 14, 25, 0.5);
  --panel-sheen:
    linear-gradient(145deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.035) 42%, rgba(255, 255, 255, 0.085));
  --panel-depth:
    radial-gradient(circle at 14% 10%, rgba(237, 247, 246, 0.12), transparent 24rem),
    radial-gradient(circle at 82% 12%, rgba(255, 209, 102, 0.12), transparent 22rem),
    linear-gradient(135deg, rgba(77, 220, 226, 0.12), rgba(184, 156, 255, 0.055) 48%, rgba(135, 242, 161, 0.05));
  --line: rgba(209, 241, 245, 0.24);
  --line-bright: rgba(153, 246, 228, 0.64);
  --text: #f4fbff;
  --muted: #a8bac4;
  --faint: #71858f;
  --glass-edge: rgba(255, 255, 255, 0.24);
  --glass-shadow:
    0 32px 90px rgba(0, 0, 0, 0.42),
    0 12px 38px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.045);
  --parallax-x: 0px;
  --parallax-y: 0px;
}

html {
  background: #02040a;
}

body {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 7% -8%, rgba(77, 220, 226, 0.18), transparent 34rem),
    radial-gradient(ellipse at 94% 7%, rgba(255, 209, 102, 0.13), transparent 30rem),
    radial-gradient(ellipse at 58% 105%, rgba(184, 156, 255, 0.12), transparent 36rem),
    linear-gradient(145deg, #01020a 0%, #06131b 38%, #080712 68%, #010207 100%);
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255, 255, 255, 0.055) 28%, transparent 42% 100%),
    radial-gradient(ellipse at 50% 50%, transparent 0 42%, rgba(0, 0, 0, 0.44) 100%);
  mix-blend-mode: screen;
  opacity: 0.82;
}

body::after {
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent);
  opacity: 0.26;
}

.cosmic-atmosphere {
  position: fixed;
  inset: -8vmax;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  transform: none;
}

.cloud-field,
.data-current,
.glass-shard {
  position: absolute;
  display: block;
  pointer-events: none;
}

.cloud-field {
  width: 84vmax;
  height: 42vmax;
  border-radius: 46% 54% 58% 42%;
  filter: blur(28px) saturate(1.28);
  mix-blend-mode: screen;
  opacity: 0.48;
  mask-image:
    radial-gradient(ellipse at 18% 44%, #000 0 18%, transparent 42%),
    radial-gradient(ellipse at 48% 50%, #000 0 20%, transparent 52%),
    radial-gradient(ellipse at 76% 46%, #000 0 18%, transparent 46%);
  animation: cloud-drift 22s ease-in-out infinite alternate;
}

.cloud-field-a {
  left: -22vmax;
  top: -8vmax;
  background:
    radial-gradient(ellipse at 18% 42%, rgba(77, 220, 226, 0.5), transparent 45%),
    radial-gradient(ellipse at 52% 58%, rgba(237, 247, 246, 0.28), transparent 42%),
    radial-gradient(ellipse at 78% 35%, rgba(135, 242, 161, 0.22), transparent 48%);
  transform: rotate(-13deg);
}

.cloud-field-b {
  right: -26vmax;
  top: 12vmax;
  background:
    radial-gradient(ellipse at 26% 52%, rgba(255, 209, 102, 0.32), transparent 45%),
    radial-gradient(ellipse at 56% 45%, rgba(255, 107, 138, 0.28), transparent 45%),
    radial-gradient(ellipse at 78% 60%, rgba(237, 247, 246, 0.22), transparent 42%);
  transform: rotate(18deg);
  animation-delay: -8s;
}

.cloud-field-c {
  left: 14vmax;
  bottom: -22vmax;
  background:
    radial-gradient(ellipse at 22% 54%, rgba(184, 156, 255, 0.34), transparent 45%),
    radial-gradient(ellipse at 54% 42%, rgba(77, 220, 226, 0.24), transparent 47%),
    radial-gradient(ellipse at 80% 62%, rgba(135, 242, 161, 0.18), transparent 44%);
  transform: rotate(8deg);
  animation-delay: -14s;
}

.data-current {
  width: 78vmax;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237, 247, 246, 0.24), rgba(77, 220, 226, 0.2), transparent);
  box-shadow:
    0 0 22px rgba(77, 220, 226, 0.24),
    0 0 58px rgba(184, 156, 255, 0.12);
  opacity: 0.6;
  transform-origin: center;
  animation: data-flow 14s linear infinite;
}

.data-current::before {
  content: "";
  position: absolute;
  inset: -5px 0;
  background: repeating-linear-gradient(90deg, transparent 0 26px, rgba(255, 255, 255, 0.55) 26px 28px, transparent 28px 78px);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.data-current-a {
  left: -12vmax;
  top: 22vmax;
  transform: rotate(-18deg);
}

.data-current-b {
  right: -16vmax;
  top: 46vmax;
  transform: rotate(14deg);
  animation-delay: -5s;
}

.data-current-c {
  left: 8vmax;
  bottom: 8vmax;
  transform: rotate(-7deg);
  animation-delay: -10s;
}

.glass-shard {
  width: 24vmax;
  height: 11vmax;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 38%, rgba(77, 220, 226, 0.08)),
    rgba(255, 255, 255, 0.025);
  clip-path: polygon(8% 0, 100% 18%, 86% 100%, 0 72%);
  filter: blur(0.2px);
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: glass-float 18s ease-in-out infinite alternate;
}

.glass-shard-a {
  left: 58vmax;
  top: 4vmax;
  transform: rotate(-14deg);
}

.glass-shard-b {
  left: 8vmax;
  bottom: 12vmax;
  transform: rotate(18deg) scale(0.78);
  animation-delay: -7s;
}

.shell {
  width: min(1520px, calc(100% - 44px));
  padding: 26px 0 54px;
  transform: none;
}

.shell:not(.features-view) {
  padding-top: 26px;
}

.shell:not(.features-view) .topbar {
  display: flex;
}

.topbar {
  min-height: 112px;
  padding: 22px 24px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.035) 38%, rgba(77, 220, 226, 0.075)),
    rgba(4, 11, 18, 0.34);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(164%);
}

h1 {
  font-size: clamp(2rem, 4.4vw, 4.35rem);
  line-height: 0.95;
}

h2 {
  color: rgba(244, 251, 255, 0.96);
}

.eyebrow,
.section-kicker {
  color: #75f5ec;
  text-shadow: 0 0 18px rgba(77, 220, 226, 0.28);
}

.meta-strip span,
.rank-badge,
.pill {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(4, 12, 18, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(150%);
}

.summary-grid {
  gap: 14px;
  margin-bottom: 16px;
}

.metric-tile,
.ops-panel,
.signal-panel-shell,
.detail-panel,
.map-panel,
.error-panel {
  border-color: var(--glass-edge);
  background:
    var(--panel-sheen),
    var(--panel-depth),
    linear-gradient(180deg, rgba(4, 11, 18, 0.48), rgba(4, 8, 14, 0.28));
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(26px) saturate(164%) brightness(1.04);
}

.metric-tile {
  min-height: 132px;
}

.metric-tile strong {
  font-size: clamp(1.8rem, 2.6vw, 2.42rem);
  text-shadow: 0 0 26px rgba(237, 247, 246, 0.22);
}

.metric-tile::before {
  height: 3px;
  border-radius: 999px;
  box-shadow: 0 0 22px currentColor;
}

.workspace-tabs {
  position: sticky;
  top: 12px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(2, 8, 14, 0.62);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(168%);
}

.nav-tab-group,
.nav-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-tab-group {
  flex: 0 0 auto;
}

.nav-status {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  overflow: hidden;
}

.nav-status span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(219, 234, 241, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.085);
  font-size: 0.69rem;
  font-weight: 800;
  white-space: nowrap;
}

.workspace-tab,
.option-chip,
.icon-command,
.ingest-stage-command,
.sort-tab,
.toggle-line,
.search-box input {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.085);
  backdrop-filter: blur(14px) saturate(150%);
}

.icon-command.primary {
  color: var(--bg);
  border-color: rgba(135, 242, 161, 0.58);
  background: var(--green);
}

.ingest-stage-command.primary {
  color: var(--bg);
  border-color: rgba(135, 242, 161, 0.58);
  background: var(--green);
}

.icon-command.danger {
  color: var(--text);
  border-color: rgba(255, 107, 138, 0.46);
  background: rgba(255, 107, 138, 0.14);
}

.ingest-stage-command.danger {
  color: var(--text);
  border-color: rgba(255, 107, 138, 0.5);
  background: rgba(255, 107, 138, 0.16);
}

.workspace-tab.active,
.workspace-tab:hover,
.option-chip.active,
.option-chip:hover,
.sort-tab.active,
.sort-tab:hover,
.icon-command:hover,
.ingest-stage-command:hover {
  color: #ffffff;
  border-color: rgba(153, 246, 228, 0.62);
  background:
    linear-gradient(180deg, rgba(77, 220, 226, 0.24), rgba(77, 220, 226, 0.08)),
    rgba(7, 24, 30, 0.42);
  box-shadow:
    0 0 0 1px rgba(153, 246, 228, 0.08),
    0 0 28px rgba(77, 220, 226, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.panel-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.panel-head.compact {
  border-bottom: 0;
}

.stage-row,
.compact-row,
.event-item,
.health-card,
.fact-item,
.ingest-bar-row,
.orbital-card {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 12px 32px rgba(0, 0, 0, 0.15);
}

.stage-number,
.health-order {
  box-shadow:
    0 0 20px rgba(77, 220, 226, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

th {
  background:
    linear-gradient(180deg, rgba(7, 15, 24, 0.96), rgba(7, 15, 24, 0.86)),
    rgba(7, 12, 17, 0.96);
  backdrop-filter: blur(18px);
}

tbody tr {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.018), transparent);
}

tbody tr:hover,
tbody tr.active {
  background:
    linear-gradient(90deg, rgba(77, 220, 226, 0.15), rgba(184, 156, 255, 0.06), transparent),
    rgba(77, 220, 226, 0.04);
}

.table-wrap,
.data-tree-section,
.score-map {
  scrollbar-color: rgba(77, 220, 226, 0.46) rgba(255, 255, 255, 0.07);
}

.orbital-card {
  background:
    radial-gradient(circle at center, rgba(237, 247, 246, 0.18), transparent 18%),
    radial-gradient(circle at 44% 52%, rgba(77, 220, 226, 0.2), transparent 35%),
    radial-gradient(circle at 18% 84%, rgba(135, 242, 161, 0.08), transparent 24%),
    rgba(0, 0, 0, 0.16);
}

.orbital-core {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.24), transparent 28%),
    rgba(3, 8, 11, 0.76);
  backdrop-filter: blur(10px) saturate(180%);
}

.score-map {
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 18% 20%, rgba(77, 220, 226, 0.09), transparent 30%),
    rgba(0, 0, 0, 0.12);
  background-size: 44px 44px, 44px 44px, auto, auto;
}

.score-point {
  filter: drop-shadow(0 0 10px rgba(77, 220, 226, 0.34));
}

@keyframes cloud-drift {
  0% {
    translate: 0 0;
    opacity: 0.38;
  }

  100% {
    translate: 4vmax -2vmax;
    opacity: 0.58;
  }
}

@keyframes data-flow {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 240px 0;
  }
}

@keyframes glass-float {
  0% {
    translate: 0 0;
    opacity: 0.32;
  }

  100% {
    translate: 2.6vmax -1.4vmax;
    opacity: 0.54;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud-field,
  .data-current,
  .glass-shard,
  .shap-feature-row::before,
  .shap-meter span,
  .shap-spark-bar.active {
    animation: none;
  }
}

@media (max-width: 1120px) {
  .workspace-tabs {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }

  .nav-status {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(calc(100% - 24px), 1480px);
    padding-top: 14px;
  }

  .topbar {
    min-height: auto;
    padding: 18px;
  }

  .workspace-tabs {
    top: 8px;
    gap: 6px;
    padding: 6px;
  }

  .nav-tab-group,
  .nav-status {
    width: 100%;
    overflow-x: auto;
  }

  .cloud-field {
    filter: blur(22px) saturate(1.18);
    opacity: 0.34;
  }
}

.hero-copy {
  min-width: 0;
}

.hero-subtitle {
  max-width: 780px;
  margin: 12px 0 0;
  color: rgba(219, 234, 241, 0.78);
  font-size: clamp(1rem, 1.6vw, 1.28rem);
  line-height: 1.45;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(244, 251, 255, 0.76);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-size: 0.74rem;
  font-weight: 800;
}

.summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.metric-tile.accent-violet::before {
  background: var(--violet);
}

.metric-tile.accent-rose::before {
  background: var(--rose);
}

.insight-ribbon {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 16px;
}

.insight-card {
  min-width: 0;
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.028) 44%, rgba(77, 220, 226, 0.06)),
    rgba(5, 12, 19, 0.36);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(22px) saturate(155%);
  overflow: hidden;
  animation: panel-enter 520ms ease both;
}

.insight-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), rgba(255, 255, 255, 0.45));
  box-shadow: 0 0 18px rgba(77, 220, 226, 0.28);
}

.insight-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.insight-card strong {
  display: block;
  min-width: 0;
  margin-top: 8px;
  color: var(--text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-card p {
  margin: 8px 0 0;
  color: rgba(219, 234, 241, 0.76);
  font-size: 0.78rem;
  line-height: 1.45;
}

.metric-tile,
.ops-panel,
.signal-panel-shell,
.detail-panel,
.map-panel {
  animation: panel-enter 520ms ease both;
}

.summary-grid > :nth-child(2),
.insight-ribbon > :nth-child(2) {
  animation-delay: 55ms;
}

.summary-grid > :nth-child(3),
.insight-ribbon > :nth-child(3) {
  animation-delay: 110ms;
}

.summary-grid > :nth-child(4),
.insight-ribbon > :nth-child(4) {
  animation-delay: 165ms;
}

.summary-grid > :nth-child(5) {
  animation-delay: 220ms;
}

.summary-grid > :nth-child(6) {
  animation-delay: 275ms;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(153, 246, 228, 0.78);
  outline-offset: 3px;
}

th:nth-child(1),
td:nth-child(1) {
  width: 82px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 34%;
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4),
th:nth-child(6),
td:nth-child(6) {
  width: 128px;
}

th:nth-child(5),
td:nth-child(5) {
  width: 176px;
}

th:nth-child(7),
td:nth-child(7) {
  width: 98px;
}

.table-wrap {
  overflow: auto;
}

table {
  min-width: 980px;
}

.feature-name {
  overflow-wrap: break-word;
  word-break: normal;
}

.rank-cell span {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(244, 251, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

tr.top-signal .rank-cell span {
  color: #071014;
  border-color: rgba(255, 255, 255, 0.54);
  background: linear-gradient(135deg, #f6fffb, #75f5ec 48%, #ffd166);
  box-shadow:
    0 0 28px rgba(77, 220, 226, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

tr.top-signal {
  box-shadow: inset 3px 0 0 rgba(117, 245, 236, 0.72);
}

.grade-cell strong,
td[data-label="OOF / BalOOF"] strong {
  display: block;
  color: var(--text);
  font-size: 0.94rem;
}

.grade-cell small,
td[data-label="OOF / BalOOF"] small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.row-badge-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.row-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(219, 234, 241, 0.82);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.66rem;
  font-weight: 800;
}

.row-badge.good {
  color: #bcffd1;
  border-color: rgba(135, 242, 161, 0.36);
  background: rgba(135, 242, 161, 0.085);
}

.row-badge.warn {
  color: #ffe6a3;
  border-color: rgba(255, 209, 102, 0.36);
  background: rgba(255, 209, 102, 0.085);
}

.row-badge.risk {
  color: #ffc1ce;
  border-color: rgba(255, 107, 138, 0.36);
  background: rgba(255, 107, 138, 0.085);
}

.row-badge.info,
.row-badge.prime {
  color: #bdfcff;
  border-color: rgba(77, 220, 226, 0.34);
  background: rgba(77, 220, 226, 0.08);
}

.fold-cell {
  min-width: 0;
}

.fold-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(5px, 1fr));
  align-items: end;
  gap: 4px;
  width: min(124px, 100%);
  height: 34px;
}

.fold-strip span {
  min-height: 4px;
  height: var(--fold-height, 50%);
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), var(--green));
  box-shadow: 0 0 12px rgba(135, 242, 161, 0.18);
}

.fold-strip span.watch {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), var(--gold));
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.16);
}

.fold-strip span.negative {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), var(--rose));
  box-shadow: 0 0 12px rgba(255, 107, 138, 0.16);
}

.fold-strip.empty {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.fold-caption {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.positive {
  color: #bcffd1;
}

.negative {
  color: #ffb6c7;
}

.train-dot {
  font-weight: 800;
  font-size: 0.74rem;
}

.planet-star,
.planet-moon {
  display: none;
}

.planet-core {
  border-color: rgba(237, 247, 246, 0.46);
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.78), transparent 18%),
    linear-gradient(145deg, rgba(237, 247, 246, 0.22), rgba(77, 220, 226, 0.12)),
    rgba(5, 15, 22, 0.62);
  color: rgba(244, 251, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset -6px -8px 12px rgba(0, 0, 0, 0.2),
    0 0 var(--node-glow-size, 22px) var(--node-glow, rgba(77, 220, 226, 0.24));
}

.planet-ring {
  border-color: rgba(237, 247, 246, 0.16);
  opacity: 0.42;
}

.metric-tile,
.insight-card,
.ops-panel,
.signal-panel-shell,
.detail-panel,
.map-panel {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.metric-tile:hover,
.insight-card:hover,
.ops-panel:hover,
.signal-panel-shell:hover,
.detail-panel:hover,
.map-panel:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow:
    0 38px 96px rgba(0, 0, 0, 0.42),
    0 0 42px rgba(77, 220, 226, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

@media (max-width: 1280px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .insight-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .summary-grid,
  .dashboard-view[data-view-panel="features"] .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-atlas {
    grid-template-columns: 1fr;
  }

  .model-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .signal-control-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .signal-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .signal-card-metrics,
  .signal-card-bars,
  .signal-card-foot {
    grid-column: 2 / -1;
  }

  .signal-card-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .table-wrap {
    max-height: none;
    border-top: 0;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  table {
    min-width: 0;
  }

  tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
      rgba(0, 0, 0, 0.12);
    padding: 12px;
  }

  td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 0;
    padding: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .rank-cell span {
    width: max-content;
  }

  .fold-strip {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .summary-grid,
  .insight-ribbon,
  .dashboard-view[data-view-panel="features"] .summary-grid {
    grid-template-columns: 1fr;
  }

  .signal-card-grid {
    max-height: none;
    padding: 0 12px 14px;
  }

  .signal-control-strip {
    padding-inline: 12px;
  }

  .signal-card {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .signal-rank {
    width: max-content;
    min-width: 44px;
  }

  .signal-card-metrics,
  .signal-card-bars,
  .signal-card-foot {
    grid-column: 1;
  }

  .signal-card-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .model-card-grid {
    grid-template-columns: 1fr;
    padding-inline: 12px;
  }

  .model-family-row {
    grid-template-columns: 5px minmax(0, 1fr) 54px;
  }

  .family-meter {
    grid-column: 2 / -1;
    order: 4;
  }

  .hero-chips,
  .meta-strip {
    justify-content: flex-start;
  }

  .table-wrap {
    max-height: none;
    border-top: 0;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  table {
    min-width: 0;
  }

  tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
      rgba(0, 0, 0, 0.12);
    padding: 12px;
  }

  td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 0;
    padding: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .rank-cell span {
    width: max-content;
  }

  .fold-strip {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .metric-tile,
  .insight-card,
  .ops-panel,
  .signal-panel-shell,
  .detail-panel,
  .map-panel {
    animation: none;
    transition: none;
  }
}

/* Compact overview: nav first, smaller stats below */
.topbar {
  min-height: auto;
  align-items: center;
  padding: 14px 18px;
  margin: 12px 0 10px;
}

.topbar .eyebrow {
  margin-bottom: 5px;
  font-size: 0.66rem;
}

.topbar h1 {
  font-size: clamp(1.55rem, 2.7vw, 2.55rem);
  line-height: 1;
}

.hero-subtitle {
  display: none;
}

.hero-chips {
  margin-top: 10px;
}

.hero-chips span,
.meta-strip span {
  min-height: 26px;
  padding: 5px 9px;
  font-size: 0.68rem;
}

.summary-grid {
  gap: 10px;
  margin-bottom: 10px;
}

.metric-tile {
  min-height: 88px;
  padding: 12px;
}

.metric-tile::before {
  width: 44px;
  height: 2px;
  margin-bottom: 12px;
}

.metric-label,
.metric-tile small {
  font-size: 0.68rem;
}

.metric-tile strong {
  margin-bottom: 4px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.insight-ribbon {
  gap: 10px;
  margin-bottom: 14px;
}

.insight-card {
  min-height: 82px;
  padding: 12px;
}

.insight-card::before {
  width: 34px;
  height: 2px;
  margin-bottom: 10px;
}

.insight-kicker {
  font-size: 0.66rem;
}

.insight-card strong {
  margin-top: 6px;
  font-size: 0.86rem;
}

.insight-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 760px) {
  .topbar {
    padding: 12px;
  }

  .topbar h1 {
    font-size: 1.55rem;
  }

  .hero-chips {
    display: none;
  }

  .metric-tile,
  .insight-card {
    min-height: 74px;
  }
}

@media (max-width: 1120px) {
  .market-read-narrative,
  .market-theme-grid {
    grid-template-columns: 1fr;
  }

  .market-read-scoreboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-hero-body,
  .portfolio-orbit {
    grid-template-columns: 1fr;
  }

  .portfolio-rebalance-panel {
    grid-template-columns: 1fr;
  }

  .portfolio-stat-grid,
  .rebalance-details,
  .sector-exposure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .portfolio-table {
    min-width: 0;
  }

  .portfolio-table-wrap {
    max-height: none;
  }

  .portfolio-table td {
    min-width: 0;
    align-items: center;
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .portfolio-table td[data-label="Sector / Industry"],
  .portfolio-table td[data-label="Why Picked"],
  .portfolio-table td[data-label="Sleeves"] {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .portfolio-table td > * {
    min-width: 0;
    max-width: 100%;
  }

  .portfolio-table .ticker-lockup,
  .portfolio-table .sector-lockup,
  .portfolio-table .weight-cell,
  .portfolio-table .portfolio-why-cell,
  .portfolio-table .sleeve-bars {
    width: 100%;
  }

  .portfolio-table .ticker-lockup strong,
  .portfolio-table .sector-lockup strong,
  .portfolio-table .weight-cell strong {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .market-read-narrative,
  .market-theme-grid,
  .market-theme-notes {
    padding-inline: 12px;
  }

  .market-read-scoreboard {
    grid-template-columns: 1fr;
  }

  .market-theme-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .market-theme-row em {
    justify-self: start;
  }

  .portfolio-hero-body,
  .portfolio-rebalance-panel,
  .portfolio-rank-list,
  .market-hedge-overlay,
  .sleeve-mix,
  .sector-exposure-grid {
    padding-inline: 12px;
  }

  .portfolio-stat-grid,
  .rebalance-details,
  .sector-exposure-grid,
  .portfolio-orbit-readout {
    grid-template-columns: 1fr;
  }

  .portfolio-rebalance-panel {
    margin-inline: 12px;
  }

  .portfolio-orbit {
    justify-items: stretch;
  }

  .portfolio-orbit-visual {
    width: min(260px, 100%);
    justify-self: center;
  }

  .portfolio-control-row {
    align-items: stretch;
    flex-direction: column;
    padding-inline: 12px;
  }

  .portfolio-select,
  .portfolio-control-row .search-input {
    width: 100%;
  }

  .portfolio-rank-row,
  .sector-exposure-row,
  .sleeve-row {
    grid-template-columns: 1fr;
  }

  .market-hedge-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-hedge-main div {
    text-align: left;
  }

  .market-hedge-facts {
    grid-template-columns: 1fr;
  }

  .sector-values,
  .sleeve-row em {
    text-align: left;
  }
}

/* CPU-only visual refresh: static depth and no continuous compositing. */
:root {
  --panel: rgba(8, 15, 23, 0.86);
  --panel-strong: rgba(10, 18, 28, 0.9);
  --panel-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.024));
  --panel-depth: linear-gradient(135deg, rgba(77, 220, 226, 0.095), rgba(135, 242, 161, 0.035) 42%, rgba(255, 209, 102, 0.045));
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body {
  background:
    radial-gradient(circle at 12% 10%, rgba(77, 220, 226, 0.14), transparent 25rem),
    radial-gradient(circle at 84% 14%, rgba(255, 209, 102, 0.09), transparent 22rem),
    radial-gradient(circle at 64% 86%, rgba(135, 242, 161, 0.075), transparent 28rem),
    linear-gradient(135deg, #030609 0%, #081219 48%, #020304 100%);
}

body::before {
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.52) 0 1px, transparent 1.8px),
    radial-gradient(circle at 24% 72%, rgba(117, 245, 236, 0.42) 0 1px, transparent 1.7px),
    radial-gradient(circle at 48% 28%, rgba(255, 209, 102, 0.34) 0 1px, transparent 1.9px),
    radial-gradient(circle at 70% 64%, rgba(184, 156, 255, 0.34) 0 1px, transparent 1.9px),
    radial-gradient(circle at 88% 36%, rgba(255, 255, 255, 0.44) 0 1px, transparent 1.7px);
  background-size: 220px 180px, 280px 210px, 340px 240px, 260px 230px, 310px 260px;
  mix-blend-mode: normal;
  opacity: 0.32;
}

body::after {
  mask-image: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.2;
}

.cosmic-atmosphere {
  inset: 0;
  transform: none !important;
  contain: layout paint style;
}

.cloud-field,
.data-current,
.glass-shard {
  animation: none !important;
  filter: none !important;
  mix-blend-mode: normal;
}

.cloud-field {
  opacity: 0.16;
}

.data-current {
  opacity: 0.24;
  box-shadow: none;
}

.glass-shard {
  opacity: 0.22;
}

.shell {
  transform: none !important;
}

.topbar,
.metric-tile,
.insight-card,
.ops-panel,
.signal-panel-shell,
.detail-panel,
.map-panel,
.shap-lab {
  backdrop-filter: none !important;
  box-shadow: var(--shadow);
}

.ops-panel,
.metric-tile,
.insight-card,
.portfolio-position-row,
.signal-card,
.model-family-row,
.sector-exposure-row {
  contain: layout paint style;
}

.workspace-tabs {
  border: 1px solid rgba(117, 245, 236, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026)),
    rgba(3, 10, 15, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.workspace-tab.active,
.sort-tab.active,
.option-chip.active {
  background:
    linear-gradient(135deg, rgba(77, 220, 226, 0.18), rgba(135, 242, 161, 0.08)),
    rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 1px rgba(117, 245, 236, 0.18);
}

.panel-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.095);
  background: linear-gradient(90deg, rgba(77, 220, 226, 0.06), transparent 58%);
}

.portfolio-hero-panel {
  background:
    radial-gradient(circle at 16% 16%, rgba(77, 220, 226, 0.14), transparent 26rem),
    radial-gradient(circle at 84% 24%, rgba(255, 209, 102, 0.09), transparent 22rem),
    linear-gradient(135deg, rgba(10, 23, 31, 0.96), rgba(9, 16, 28, 0.94));
}

.portfolio-metric {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.028)),
    rgba(7, 15, 22, 0.9);
}

.portfolio-orbit-visual::after,
.portfolio-orbit-moon,
.rank-badge.live,
.active-comet,
.node-stars,
.metric-bar-fill::after,
.shap-sparkline .active,
.portfolio-rank-main i,
.sleeve-row b {
  animation: none !important;
}

.portfolio-orbit-moon.long {
  top: 18%;
  left: 76%;
}

.portfolio-orbit-moon.short {
  top: 74%;
  left: 22%;
}

.portfolio-table th {
  background: rgba(5, 13, 20, 0.98);
}

.portfolio-position-row:hover,
.portfolio-rank-row:hover,
.sector-exposure-row:hover {
  transform: none !important;
}
