:root {
  color-scheme: dark;
  --bg: #f2eee5;
  --ink: #120f0b;
  --surface: #12151d;
  --surface-2: #1a1d25;
  --line: rgba(255, 255, 255, 0.14);
  --text: #f5f6f8;
  --muted: #8b8176;
  --green: #12a66a;
  --red: #d63f3f;
  --amber: #b9852e;
  --gold: #c99b49;
  --stone: #d8c9ad;
  --blue: #58a8ff;
  --cyan: #00d9ff;
  --magenta: #ff3ed7;
  --paper: #ffffff;
  --panel-shadow: 0 24px 64px rgba(36, 25, 12, 0.15);
}

/* Final theme overrides: keep these last so the space-nebula style wins. */
body {
  background:
    radial-gradient(circle at 14% 4%, rgba(255, 43, 231, 0.26), transparent 300px),
    radial-gradient(circle at 82% 0%, rgba(25, 216, 255, 0.18), transparent 360px),
    radial-gradient(circle at 50% 78%, rgba(107, 39, 180, 0.22), transparent 520px),
    linear-gradient(180deg, #12001f 0%, #090012 44%, #05000b 100%);
  color: var(--text);
}

.cyber-canvas {
  opacity: 0.38;
}

.topbar {
  color: var(--text);
  border-bottom-color: rgba(255, 43, 231, 0.18);
}

.eyebrow,
.status-strip,
.panel-head p,
.metric,
.stat-list span,
.month-cell span,
.holding-card p,
.asset-card span,
.asset-card small,
.risk-item span,
.risk-item small,
.risk-note,
.expiry-row span,
.empty-state,
.section-head p,
.benchmark-card span,
.concentration-card span,
.concentration-card small,
.leader-card p,
.leader-card small {
  color: var(--muted);
}

.profile-avatar {
  border-color: rgba(255, 43, 231, 0.82);
  box-shadow:
    0 0 0 1px rgba(25, 216, 255, 0.42),
    0 0 22px rgba(255, 43, 231, 0.32),
    0 8px 24px rgba(0, 0, 0, 0.34);
}

.sheet-tabs,
.panel,
.asset-strip {
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(35, 13, 55, 0.82), rgba(14, 8, 30, 0.82));
  border-color: rgba(255, 43, 231, 0.2);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(25, 216, 255, 0.05);
}

.sheet-tabs button {
  color: rgba(251, 245, 255, 0.66);
}

.sheet-tabs button.active,
.return-controls button.active,
.return-scope button.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 43, 231, 0.46), rgba(25, 216, 255, 0.18));
  border-color: rgba(255, 43, 231, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(255, 43, 231, 0.28);
}

.ibkr-hero,
.positions-hero {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 43, 231, 0.18), transparent 34%),
    radial-gradient(circle at 78% 32%, rgba(25, 216, 255, 0.13), transparent 34%),
    repeating-linear-gradient(90deg, rgba(25, 216, 255, 0.045) 0 1px, transparent 1px 92px),
    linear-gradient(145deg, #1b0630 0%, #0b0821 48%, #04000a 100%);
  border-color: rgba(255, 43, 231, 0.26);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.34),
    inset 0 0 70px rgba(25, 216, 255, 0.05);
}

.ibkr-hero::before {
  border-top-color: rgba(255, 43, 231, 0.34);
  border-right-color: rgba(25, 216, 255, 0.3);
}

.ibkr-hero::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 46px rgba(255, 43, 231, 0.06),
    inset 0 0 86px rgba(25, 216, 255, 0.04);
}

.mode-tabs {
  border-bottom-color: rgba(255, 43, 231, 0.22);
}

.mode-tab.active {
  background: rgba(255, 43, 231, 0.18);
  border-color: rgba(255, 43, 231, 0.72);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.56),
    0 0 16px rgba(25, 216, 255, 0.18);
}

.currency-toggle button,
.range-tabs button,
.benchmark-controls button,
.return-controls button,
.return-scope button {
  color: rgba(251, 245, 255, 0.72);
  background: rgba(251, 245, 255, 0.07);
  border: 1px solid rgba(255, 43, 231, 0.22);
}

.currency-toggle button.active,
.range-tabs button.active {
  color: #15051f;
  background: #fbf5ff;
  border-color: #fbf5ff;
}

.panel-head {
  background:
    linear-gradient(90deg, rgba(255, 43, 231, 0.1), rgba(25, 216, 255, 0.045), transparent);
  border-bottom-color: rgba(255, 43, 231, 0.16);
}

.asset-card,
.stat-list div,
.risk-item,
.expiry-row,
.concentration-card,
.leader-card,
.benchmark-card,
.month-cell {
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(43, 17, 65, 0.88), rgba(20, 10, 38, 0.9));
  border: 1px solid rgba(255, 43, 231, 0.16);
}

.asset-card strong,
.section-head strong,
.stat-list strong,
.risk-item strong,
.leader-card strong {
  color: var(--text);
}

.risk-item span,
.risk-item small {
  color: rgba(251, 245, 255, 0.68);
}

.risk-item.missing strong,
.risk-item.unknown strong {
  color: rgba(251, 245, 255, 0.62);
}

th {
  background: #150a25;
  color: var(--muted);
}

th,
td {
  border-bottom-color: rgba(255, 43, 231, 0.12);
}

.bar {
  background: rgba(251, 245, 255, 0.08);
}

.bar span {
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--magenta));
}

.insights-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 154px;
  margin: 16px 0 12px;
  padding: 24px 28px;
  overflow: hidden;
  color: #f8fafc;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 43, 231, 0.18), transparent 34%),
    radial-gradient(circle at 78% 32%, rgba(25, 216, 255, 0.13), transparent 34%),
    repeating-linear-gradient(90deg, rgba(25, 216, 255, 0.045) 0 1px, transparent 1px 92px),
    linear-gradient(145deg, #1b0630 0%, #0b0821 48%, #04000a 100%);
  border: 1px solid rgba(255, 43, 231, 0.26);
  border-radius: 8px;
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.34),
    inset 0 0 70px rgba(25, 216, 255, 0.05);
}

.insights-hero h2 {
  margin-bottom: 10px;
  font-size: 34px;
}

.insights-hero p:not(.eyebrow) {
  max-width: 650px;
  color: rgba(251, 245, 255, 0.64);
  font-size: 14px;
}

.insights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.research-report-panel,
.report-section-panel {
  min-width: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 43, 231, 0.11), transparent 28%),
    linear-gradient(145deg, rgba(28, 9, 48, 0.92), rgba(9, 2, 22, 0.97));
}

.research-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 12px;
  padding: 14px;
}

.research-lead-copy,
.research-summary-stack article,
.research-metric,
.conviction-card,
.strategy-card,
.watch-card,
.question-card {
  min-width: 0;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(48, 18, 70, 0.86), rgba(17, 8, 32, 0.94));
  border: 1px solid rgba(255, 43, 231, 0.16);
  border-radius: 8px;
}

.research-lead-copy {
  padding: 20px;
  border-color: rgba(25, 216, 255, 0.22);
  box-shadow: inset 3px 0 0 rgba(25, 216, 255, 0.55);
}

.research-lead-copy.high {
  border-color: rgba(255, 92, 122, 0.34);
  box-shadow: inset 3px 0 0 rgba(255, 92, 122, 0.62);
}

.research-lead-copy.medium {
  border-color: rgba(255, 79, 227, 0.28);
  box-shadow: inset 3px 0 0 rgba(255, 79, 227, 0.55);
}

.research-lead-copy > span,
.research-summary-stack span,
.research-metric span,
.conviction-card-head span,
.conviction-facts span,
.strategy-card span,
.watch-card span,
.question-card span,
.report-table small {
  color: rgba(251, 245, 255, 0.58);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.research-lead-copy h3 {
  margin: 11px 0 12px;
  color: #fff;
  font-size: 28px;
  line-height: 1.12;
}

.research-lead-copy p,
.research-summary-stack p,
.strategy-card p,
.watch-card p,
.question-card p,
.conviction-card p {
  color: rgba(251, 245, 255, 0.72);
  font-size: 13px;
  line-height: 1.68;
}

.research-summary-stack {
  display: grid;
  gap: 10px;
}

.research-summary-stack article {
  padding: 14px;
}

.research-summary-stack p {
  margin-top: 8px;
}

.research-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.research-metric {
  min-height: 112px;
  padding: 13px;
}

.research-metric strong,
.strategy-card strong,
.watch-card strong,
.question-card strong {
  display: block;
  margin: 10px 0 8px;
  color: #fff;
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.research-metric small {
  color: rgba(251, 245, 255, 0.55);
  font-size: 11px;
  line-height: 1.42;
}

.research-metric.high,
.conviction-card.high,
.strategy-card.high,
.watch-card.high,
.question-card.high {
  border-color: rgba(255, 92, 122, 0.36);
  box-shadow: inset 0 -3px 0 rgba(255, 92, 122, 0.54);
}

.research-metric.medium,
.conviction-card.medium,
.strategy-card.medium,
.watch-card.medium,
.question-card.medium {
  border-color: rgba(255, 79, 227, 0.28);
  box-shadow: inset 0 -3px 0 rgba(255, 79, 227, 0.42);
}

.research-metric.low,
.conviction-card.low,
.strategy-card.low,
.watch-card.low,
.question-card.low {
  border-color: rgba(42, 255, 174, 0.24);
  box-shadow: inset 0 -3px 0 rgba(42, 255, 174, 0.44);
}

.research-metric.info,
.conviction-card.info,
.strategy-card.info,
.watch-card.info,
.question-card.info {
  border-color: rgba(25, 216, 255, 0.26);
  box-shadow: inset 0 -3px 0 rgba(25, 216, 255, 0.42);
}

.report-table-wrap {
  max-width: 100%;
  min-width: 0;
  padding: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.report-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.report-table.compact {
  min-width: 820px;
}

.report-table th,
.report-table td {
  padding: 13px 12px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid rgba(255, 43, 231, 0.1);
}

.report-table th {
  color: rgba(251, 245, 255, 0.54);
  background: rgba(251, 245, 255, 0.035);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-table td {
  color: rgba(251, 245, 255, 0.78);
  font-size: 13px;
  line-height: 1.55;
}

.report-table td strong {
  display: block;
  color: #fff;
  font-size: 13px;
}

.report-table td small {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  letter-spacing: 0;
  text-transform: none;
}

.report-priority,
.report-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 8px;
  color: rgba(251, 245, 255, 0.78);
  background: rgba(251, 245, 255, 0.06);
  border: 1px solid rgba(251, 245, 255, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.report-priority.high {
  color: #ff9aae;
  border-color: rgba(255, 92, 122, 0.4);
}

.report-priority.medium {
  color: #ff99ef;
  border-color: rgba(255, 79, 227, 0.38);
}

.report-priority.low {
  color: #75ffd1;
  border-color: rgba(42, 255, 174, 0.36);
}

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

.conviction-card {
  min-height: 248px;
  padding: 16px;
}

.conviction-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.conviction-card-head h3 {
  margin-top: 5px;
  color: #fff;
  font-size: 15px;
  line-height: 1.25;
}

.conviction-card-head > strong {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #06111a;
  background: linear-gradient(135deg, #35e8ad, #19d8ff);
  border-radius: 999px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.conviction-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.conviction-facts div {
  min-height: 58px;
  padding: 9px;
  background: rgba(251, 245, 255, 0.055);
  border: 1px solid rgba(251, 245, 255, 0.08);
  border-radius: 8px;
}

.conviction-facts strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 13px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.strategy-matrix,
.watch-action-grid,
.question-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.strategy-card,
.watch-card,
.question-card {
  min-height: 146px;
  padding: 14px;
}

.strategy-card strong {
  font-size: 19px;
}

@media (max-width: 1120px) {
  .research-summary,
  .conviction-grid {
    grid-template-columns: 1fr;
  }

  .research-metric-grid,
  .strategy-matrix,
  .watch-action-grid,
  .question-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .insights-hero {
    align-items: stretch;
    flex-direction: column;
    min-height: 150px;
    padding: 22px 18px;
  }

  .insights-hero h2 {
    font-size: 30px;
  }

  .research-summary,
  .research-metric-grid,
  .strategy-matrix,
  .watch-action-grid,
  .question-grid {
    grid-template-columns: 1fr;
  }

  .research-lead-copy h3 {
    font-size: 24px;
  }
}

/* Pink-black nebula theme adapted from the provided presentation reference. */
:root {
  --bg: #090012;
  --ink: #fbf5ff;
  --text: #fbf5ff;
  --muted: #b9a8c9;
  --green: #35e8ad;
  --red: #ff5c7a;
  --amber: #ff4fe3;
  --gold: #ff4fe3;
  --cyan: #19d8ff;
  --magenta: #ff2be7;
  --panel-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

body {
  background:
    radial-gradient(circle at 14% 4%, rgba(255, 43, 231, 0.26), transparent 300px),
    radial-gradient(circle at 82% 0%, rgba(25, 216, 255, 0.18), transparent 360px),
    radial-gradient(circle at 50% 78%, rgba(107, 39, 180, 0.22), transparent 520px),
    linear-gradient(180deg, #12001f 0%, #090012 44%, #05000b 100%);
}

.cyber-canvas {
  opacity: 0.38;
}

.topbar {
  color: var(--text);
  border-bottom-color: rgba(255, 43, 231, 0.18);
}

.eyebrow,
.status-strip,
.panel-head p,
.metric,
.stat-list span,
.month-cell span,
.holding-card p {
  color: var(--muted);
}

.profile-avatar {
  border-color: rgba(255, 43, 231, 0.82);
  box-shadow:
    0 0 0 1px rgba(25, 216, 255, 0.42),
    0 0 22px rgba(255, 43, 231, 0.32),
    0 8px 24px rgba(0, 0, 0, 0.34);
}

.sheet-tabs,
.panel,
.asset-strip {
  background:
    linear-gradient(145deg, rgba(35, 13, 55, 0.82), rgba(14, 8, 30, 0.82));
  border-color: rgba(255, 43, 231, 0.2);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(25, 216, 255, 0.05);
  color: var(--text);
}

.sheet-tabs button {
  color: rgba(251, 245, 255, 0.66);
}

.sheet-tabs button.active,
.return-controls button.active,
.return-scope button.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 43, 231, 0.46), rgba(25, 216, 255, 0.18));
  border-color: rgba(255, 43, 231, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(255, 43, 231, 0.28);
}

.ibkr-hero,
.positions-hero {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 43, 231, 0.18), transparent 34%),
    radial-gradient(circle at 78% 32%, rgba(25, 216, 255, 0.13), transparent 34%),
    repeating-linear-gradient(90deg, rgba(25, 216, 255, 0.045) 0 1px, transparent 1px 92px),
    linear-gradient(145deg, #1b0630 0%, #0b0821 48%, #04000a 100%);
  border-color: rgba(255, 43, 231, 0.26);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.34),
    inset 0 0 70px rgba(25, 216, 255, 0.05);
}

.ibkr-hero::before {
  border-top-color: rgba(255, 43, 231, 0.34);
  border-right-color: rgba(25, 216, 255, 0.3);
}

.ibkr-hero::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 46px rgba(255, 43, 231, 0.06),
    inset 0 0 86px rgba(25, 216, 255, 0.04);
}

.mode-tabs {
  border-bottom-color: rgba(255, 43, 231, 0.22);
}

.mode-tab.active {
  background: rgba(255, 43, 231, 0.18);
  border-color: rgba(255, 43, 231, 0.72);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.56),
    0 0 16px rgba(25, 216, 255, 0.18);
}

.currency-toggle button,
.range-tabs button,
.benchmark-controls button,
.return-controls button,
.return-scope button {
  color: rgba(251, 245, 255, 0.72);
  background: rgba(251, 245, 255, 0.07);
  border: 1px solid rgba(255, 43, 231, 0.22);
}

.currency-toggle button.active,
.range-tabs button.active {
  color: #15051f;
  background: #fbf5ff;
  border-color: #fbf5ff;
}

.panel-head {
  background:
    linear-gradient(90deg, rgba(255, 43, 231, 0.1), rgba(25, 216, 255, 0.045), transparent);
  border-bottom-color: rgba(255, 43, 231, 0.16);
}

.asset-card,
.stat-list div,
.risk-item,
.expiry-row,
.concentration-card,
.leader-card,
.benchmark-card,
.month-cell {
  background:
    linear-gradient(145deg, rgba(43, 17, 65, 0.88), rgba(20, 10, 38, 0.9));
  border: 1px solid rgba(255, 43, 231, 0.16);
  color: var(--text);
}

.asset-card span,
.asset-card small,
.risk-item span,
.risk-item small,
.risk-note,
.expiry-row span,
.empty-state,
.section-head p,
.benchmark-card span,
.concentration-card span,
.concentration-card small,
.leader-card p,
.leader-card small {
  color: var(--muted);
}

.asset-card strong,
.section-head strong,
.stat-list strong,
.risk-item strong,
.leader-card strong {
  color: var(--text);
}

th {
  background: #150a25;
  color: var(--muted);
}

th,
td {
  border-bottom-color: rgba(255, 43, 231, 0.12);
}

.bar {
  background: rgba(251, 245, 255, 0.08);
}

.bar span {
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--magenta));
}

.return-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 0;
}

.return-scope[hidden] {
  display: none;
}

.return-scope button {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(201, 155, 73, 0.18), transparent 260px),
    radial-gradient(circle at 88% 12%, rgba(0, 217, 255, 0.1), transparent 320px),
    linear-gradient(180deg, rgba(255, 248, 232, 0.86), rgba(242, 238, 229, 0.94) 360px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.cyber-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: min(1360px, calc(100% - 80px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4px 16px;
  margin-bottom: 16px;
  color: var(--ink);
  border-bottom: 1px solid rgba(105, 72, 27, 0.18);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: cover;
  border: 2px solid rgba(201, 155, 73, 0.86);
  border-radius: 50%;
  background: #0a0b0f;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.74),
    0 0 18px rgba(0, 217, 255, 0.18),
    0 8px 22px rgba(36, 25, 12, 0.18);
}

.eyebrow {
  margin: 0 0 6px;
  color: #7b6f62;
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 27px;
  line-height: 1.05;
}

h2 {
  font-size: 17px;
}

h3 {
  font-size: 16px;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sheet-tabs {
  display: inline-flex;
  padding: 4px;
  background:
    linear-gradient(145deg, rgba(255, 252, 244, 0.92), rgba(238, 226, 205, 0.86));
  border: 1px solid rgba(105, 72, 27, 0.2);
  border-radius: 8px;
  box-shadow:
    0 10px 24px rgba(36, 25, 12, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.sheet-tabs button {
  min-width: 74px;
  min-height: 34px;
  padding: 0 14px;
  color: #6e6255;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.sheet-tabs button.active {
  color: #16120e;
  background: linear-gradient(135deg, rgba(236, 216, 174, 0.92), rgba(219, 197, 153, 0.78));
  border-color: rgba(159, 113, 38, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.58),
    0 0 16px rgba(201, 155, 73, 0.22);
}

.status-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 4px 6px;
  color: #766a5c;
  font-size: 12px;
  background:
    linear-gradient(145deg, rgba(25, 9, 43, 0.92), rgba(10, 7, 24, 0.9));
  border: 1px solid rgba(255, 43, 231, 0.24);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 1px rgba(25, 216, 255, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.18);
}

.status-strip > span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 0;
  border-radius: 0;
  padding: 0 8px;
  background: transparent;
  white-space: nowrap;
  overflow: visible;
}

.status-strip > span + span::before,
.status-strip > span + .version-chip::before {
  content: none;
}

.status-pill-copy small {
  display: none;
}

.status-pill-copy strong {
  color: rgba(251, 245, 255, 0.92);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: 0;
}

.status-pill-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.status-pill-goal {
  min-width: auto;
}

.coin-cluster {
  width: 18px;
  height: 18px;
}

.coin {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: rgba(88, 44, 0, 0.88);
  font-size: 9px;
  font-weight: 900;
  background: linear-gradient(180deg, #ffe58f 0%, #ffcb47 46%, #f2a81f 100%);
  border: 1px solid rgba(255, 221, 128, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 225, 0.88),
    0 6px 18px rgba(242, 168, 31, 0.24);
}

.coin::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  border: 1px solid rgba(170, 105, 0, 0.18);
}

.coin-back {
  display: none;
}

.coin-mid {
  display: none;
}

.coin-front {
  width: 18px;
  height: 18px;
  left: 0;
  top: 0;
  animation: coinFloatFront 3.2s ease-in-out infinite;
}

.coin-front::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 214, 100, 0.24), transparent 64%);
  animation: coinGlow 2.8s ease-in-out infinite;
  z-index: -1;
}

.pace-icon,
.signal-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(251, 245, 255, 0.07);
  border: 1px solid rgba(251, 245, 255, 0.1);
}

.pace-icon {
  display: grid;
  place-items: center;
  padding: 0;
}

.pace-icon i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(112, 238, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(112, 238, 255, 0.12), 0 0 12px rgba(112, 238, 255, 0.22);
}

.pace-icon i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 1px;
  height: 16px;
  background: rgba(112, 238, 255, 0.28);
  transform: translateX(-50%);
}

.signal-icon {
  display: grid;
  place-items: center;
}

.signal-icon i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #79f6b6;
  box-shadow: 0 0 0 4px rgba(121, 246, 182, 0.12), 0 0 12px rgba(121, 246, 182, 0.28);
  animation: pulseSignal 2.4s ease-in-out infinite;
}

.version-chip {
  position: relative;
  min-height: 30px;
  padding: 0 12px;
  white-space: nowrap;
  color: rgba(251, 245, 255, 0.9);
  background: rgba(251, 245, 255, 0.055);
  border: 1px solid rgba(255, 43, 231, 0.24);
  border-radius: 6px;
  box-shadow: none;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.version-chip:hover {
  border-color: rgba(25, 216, 255, 0.72);
  color: #fff;
  background: rgba(25, 216, 255, 0.08);
  box-shadow: none;
}

@keyframes coinFloatFront {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(6deg); }
}

@keyframes coinFloatMid {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(-5deg); }
}

@keyframes coinFloatBack {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-1px) rotate(4deg); }
}

@keyframes coinGlow {
  0%, 100% { opacity: 0.42; transform: scale(0.96); }
  50% { opacity: 0.82; transform: scale(1.08); }
}

@keyframes pulseSignal {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.78; }
}

.view-sheet {
  display: none;
}

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

.ibkr-hero {
  position: relative;
  min-height: 430px;
  margin: 16px 0 22px;
  padding: 26px 34px 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 32% -12%, rgba(201, 155, 73, 0.22), transparent 42%),
    radial-gradient(ellipse at 86% 92%, rgba(0, 217, 255, 0.08), transparent 36%),
    repeating-linear-gradient(90deg, rgba(0, 217, 255, 0.032) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(201, 155, 73, 0.035) 0 1px, transparent 1px 78px),
    linear-gradient(145deg, #2c2419 0%, #181715 36%, #11161a 76%, #1c2528 100%);
  border: 1px solid rgba(151, 112, 48, 0.38);
  border-radius: 8px;
  box-shadow:
    0 22px 58px rgba(36, 25, 12, 0.14),
    inset 0 0 0 1px rgba(255, 252, 244, 0.06);
}

.ibkr-hero::before {
  position: absolute;
  inset: 16px 22px auto auto;
  width: 220px;
  height: 120px;
  content: "";
  pointer-events: none;
  border-top: 1px solid rgba(201, 155, 73, 0.38);
  border-right: 1px solid rgba(0, 217, 255, 0.24);
  border-radius: 0 46px 0 0;
  opacity: 0.7;
}

.ibkr-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 42px rgba(0, 217, 255, 0.07),
    inset 0 0 80px rgba(201, 155, 73, 0.08);
}

.panel,
.holding-card,
.month-cell {
  background: rgba(18, 21, 29, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mode-tabs {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: end;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201, 155, 73, 0.22);
}

.mode-tab {
  min-width: 68px;
  min-height: 44px;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.56);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.mode-tab.active {
  color: #fff;
  background: rgba(201, 155, 73, 0.18);
  border-color: rgba(201, 155, 73, 0.78);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.62),
    0 0 16px rgba(0, 217, 255, 0.16);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 286px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(560px, 41vw);
  padding-top: 18px;
}

.hero-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.currency-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.currency-toggle button,
.range-tabs button {
  min-height: 34px;
  padding: 0 15px;
  color: rgba(255, 252, 244, 0.78);
  background: rgba(255, 252, 244, 0.075);
  border: 1px solid rgba(201, 155, 73, 0.32);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.currency-toggle button.active,
.range-tabs button.active {
  color: #16120e;
  background: #f7f1e4;
  border-color: #f7f1e4;
}

.hero-value {
  color: #f8f9fb;
  font-size: clamp(40px, 3.8vw, 60px);
  line-height: 0.95;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.hero-value.negative {
  color: var(--red);
}

.hero-subline {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

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

.hero-subline .negative {
  color: var(--red);
}

.hero-note {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
  font-weight: 700;
}

.hero-chart-wrap {
  position: absolute;
  top: 76px;
  right: 0;
  bottom: 38px;
  left: min(600px, 44%);
  z-index: 1;
}

#heroChart {
  display: block;
  width: 100%;
  height: 100%;
}

.range-tabs {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.range-tabs button {
  min-width: 56px;
}

.panel-head p,
.metric,
.stat-list span,
.holding-card p,
.month-cell span {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: 12px;
}

.overview-grid {
  align-items: start;
}

.positions-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.85fr);
  gap: 12px;
}

.panel {
  min-width: 0;
  overflow: hidden;
  color: #15120e;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.96), rgba(250, 247, 239, 0.93));
  border-color: rgba(105, 72, 27, 0.16);
  box-shadow: 0 14px 36px rgba(36, 25, 12, 0.1);
  backdrop-filter: blur(10px);
}

.wide {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 13px 16px;
  background:
    linear-gradient(90deg, rgba(201, 155, 73, 0.08), rgba(0, 217, 255, 0.035), transparent);
  border-bottom: 1px solid rgba(105, 72, 27, 0.14);
}

.panel-head p {
  margin-top: 5px;
  font-size: 13px;
}

.metric {
  font-size: 13px;
  white-space: nowrap;
}

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

.stat-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 12px 13px;
  background: rgba(255, 252, 244, 0.74);
  border: 1px solid rgba(105, 72, 27, 0.08);
  border-radius: 7px;
}

.stat-list strong {
  font-size: 18px;
}

.allocation {
  padding: 16px;
}

.alloc-row + .alloc-row {
  margin-top: 18px;
}

.alloc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.alloc-top span {
  color: var(--text);
  font-weight: 800;
}

.alloc-top strong {
  color: var(--green);
  font-size: 16px;
}

.alloc-row.negative .alloc-top strong {
  color: var(--red);
}

.alloc-row.neutral .alloc-top strong {
  color: var(--muted);
}

.alloc-detail {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.bar {
  height: 9px;
  margin-top: 9px;
  background: #ebe2d0;
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--cyan));
  border-radius: inherit;
}

.alloc-row[data-kind="option"] .bar span,
.alloc-row.negative .bar span {
  background: linear-gradient(90deg, var(--red), #ff7a90, var(--magenta));
}

.alloc-row[data-kind="cash"] .bar span {
  background: linear-gradient(90deg, var(--gold), var(--cyan));
}

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

.holding-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 128px;
  padding: 14px;
}

.rank {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.holding-card h3 {
  overflow-wrap: anywhere;
}

.holding-card p {
  margin-top: 6px;
  font-size: 13px;
}

.holding-metrics {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.holding-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.holding-metrics strong {
  font-size: 18px;
}

.table-wrap {
  overflow: auto;
  max-height: 680px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(105, 72, 27, 0.1);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fffaf0;
  color: var(--muted);
  text-align: left;
  font-weight: 650;
}

td strong {
  display: block;
  font-weight: 750;
}

td small {
  display: block;
  max-width: 420px;
  margin-top: 5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.expiry-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.expiry-row span,
.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.trade-activity {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.75fr);
  gap: 12px;
  padding: 12px;
}

.trade-table-wrap {
  min-width: 0;
  overflow: auto;
  border: 1px solid rgba(255, 43, 231, 0.16);
  border-radius: 8px;
  background: rgba(17, 7, 33, 0.42);
}

.trade-table {
  min-width: 780px;
}

.trade-table th {
  background: rgba(37, 15, 58, 0.94);
  color: rgba(251, 245, 255, 0.68);
}

.trade-table td {
  border-bottom-color: rgba(255, 43, 231, 0.1);
}

.trade-side {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: rgba(251, 245, 255, 0.74);
  background: rgba(251, 245, 255, 0.08);
  border: 1px solid rgba(251, 245, 255, 0.12);
  font-size: 12px;
  font-weight: 850;
}

.trade-side.buy {
  color: #7bf0ad;
  background: rgba(53, 232, 173, 0.12);
  border-color: rgba(53, 232, 173, 0.24);
}

.trade-side.sell {
  color: #ff7a92;
  background: rgba(255, 92, 122, 0.13);
  border-color: rgba(255, 92, 122, 0.28);
}

.trade-summary {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.trade-summary-card,
.trade-summary-list {
  border: 1px solid rgba(255, 43, 231, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(45, 17, 68, 0.74), rgba(18, 6, 35, 0.74));
}

.trade-summary-card {
  padding: 16px;
}

.trade-summary-card span,
.trade-summary-card p,
.trade-summary-heading span,
.trade-summary-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.trade-summary-list {
  padding: 12px;
}

.trade-summary-heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.trade-summary-heading strong {
  color: rgba(251, 245, 255, 0.9);
}

.trade-summary-row {
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(150px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 43, 231, 0.14);
  border-radius: 8px;
  background: rgba(251, 245, 255, 0.05);
  text-align: left;
}

.trade-summary-row + .trade-summary-row {
  margin-top: 8px;
}

.trade-summary-row.active,
.trade-summary-row:hover {
  border-color: rgba(255, 43, 231, 0.42);
  background: rgba(255, 43, 231, 0.1);
}

.trade-summary-row strong {
  display: block;
  color: rgba(251, 245, 255, 0.9);
}

.trade-bars {
  display: grid;
  gap: 12px;
  margin: 14px 0 10px;
}

.trade-bar-line,
.trade-mini-bar {
  display: grid;
  grid-template-columns: 82px minmax(80px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.trade-bar-line small,
.trade-mini-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trade-bar-line i,
.trade-mini-bar i {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(251, 245, 255, 0.08);
}

.trade-bar-line b,
.trade-mini-bar b {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
}

.trade-bar-line b.positive,
.trade-mini-bar b.positive {
  background: linear-gradient(90deg, #23e6a8, #7cffc1);
}

.trade-bar-line b.negative,
.trade-mini-bar b.negative {
  background: linear-gradient(90deg, #ff4f7b, #ff8d72);
}

.trade-bar-line b.neutral,
.trade-mini-bar b.neutral {
  background: rgba(251, 245, 255, 0.36);
}

.trade-bar-line strong,
.trade-mini-bar strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trade-mini-bars {
  display: grid;
  gap: 7px;
}

.trade-pnl-chart {
  padding: 14px;
  border: 1px solid rgba(255, 43, 231, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 43, 231, 0.16), transparent 35%),
    linear-gradient(145deg, rgba(45, 17, 68, 0.72), rgba(18, 6, 35, 0.78));
}

.trade-pnl-chart-head,
.trade-pnl-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trade-pnl-chart-head strong {
  display: block;
  color: rgba(251, 245, 255, 0.92);
  font-size: 15px;
}

.trade-pnl-chart-head span,
.trade-pnl-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.trade-pnl-window {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  padding: 3px;
  border: 1px solid rgba(255, 43, 231, 0.16);
  border-radius: 8px;
  background: rgba(251, 245, 255, 0.06);
}

.trade-pnl-window button {
  min-height: 26px;
  padding: 0 9px;
  color: rgba(251, 245, 255, 0.72);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.trade-pnl-window button.active {
  color: #160a23;
  background: linear-gradient(135deg, #ff66e8, #7cffc1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 16px rgba(255, 43, 231, 0.24);
}

.trade-pnl-total {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(251, 245, 255, 0.09);
  border-radius: 8px;
  background: rgba(251, 245, 255, 0.05);
}

.trade-pnl-total strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.trade-pnl-bars {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(var(--pnl-rows, 1), 158px);
  column-gap: 8px;
  row-gap: 14px;
  min-height: auto;
  margin-top: 12px;
  padding: 4px 0 0;
}

.trade-pnl-bars::before {
  content: none;
}

.trade-pnl-month {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 26px 104px 18px;
  justify-items: center;
  gap: 5px;
  min-width: 0;
}

.trade-pnl-value {
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-pnl-month.positive .trade-pnl-value {
  color: #7cffc1;
}

.trade-pnl-month.negative .trade-pnl-value {
  color: #ff7a92;
}

.trade-pnl-track {
  position: relative;
  width: 100%;
  height: 104px;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(251, 245, 255, 0.07), rgba(251, 245, 255, 0.025));
  overflow: hidden;
}

.trade-pnl-track::before,
.trade-pnl-track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(251, 245, 255, 0.07);
}

.trade-pnl-track::before {
  top: 25%;
}

.trade-pnl-track::after {
  bottom: 25%;
}

.trade-pnl-bar {
  position: absolute;
  left: 50%;
  width: min(14px, 42%);
  transform: translateX(-50%);
  border-radius: 3px 3px 1px 1px;
  box-shadow: none;
}

.trade-pnl-bar.positive {
  background: linear-gradient(180deg, #7cffc1 0%, #23e6a8 48%, #12b878 100%);
}

.trade-pnl-bar.negative {
  border-radius: 1px 1px 3px 3px;
  background: linear-gradient(180deg, #ff9b7d 0%, #ff5f7f 50%, #f53662 100%);
  box-shadow: none;
}

.trade-pnl-bar.neutral {
  background: rgba(251, 245, 255, 0.4);
  box-shadow: none;
}

.trade-pnl-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.expiry-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 13px 14px;
  background: rgba(255, 252, 244, 0.74);
  border: 1px solid rgba(105, 72, 27, 0.1);
  border-radius: 8px;
}

.option-table-wrap {
  overflow: auto;
}

.option-table {
  min-width: 1100px;
}

.option-table tr.near,
.option-table tbody tr:hover {
  background: rgba(255, 43, 231, 0.08);
}

.option-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.option-pill.put {
  color: #ffbecb;
  background: rgba(255, 92, 122, 0.14);
  border: 1px solid rgba(255, 92, 122, 0.28);
}

.option-pill.call {
  color: #a7f7d3;
  background: rgba(53, 232, 173, 0.12);
  border: 1px solid rgba(53, 232, 173, 0.24);
}

.pnl-ranking {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.pnl-column {
  min-width: 0;
}

.pnl-column h3 {
  margin: 2px 0 10px;
  color: rgba(251, 245, 255, 0.82);
  font-size: 14px;
}

.pnl-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.7fr) minmax(120px, 1fr) minmax(96px, auto);
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px;
  background: rgba(251, 245, 255, 0.06);
  border: 1px solid rgba(255, 43, 231, 0.16);
  border-radius: 8px;
}

.pnl-row + .pnl-row {
  margin-top: 8px;
}

.pnl-row strong,
.pnl-row span {
  display: block;
}

.pnl-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pnl-bar {
  height: 8px;
  background: rgba(251, 245, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.pnl-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.pnl-column.gain .pnl-bar i {
  background: linear-gradient(90deg, rgba(53, 232, 173, 0.62), rgba(53, 232, 173, 1));
}

.pnl-column.loss .pnl-bar i {
  background: linear-gradient(90deg, rgba(255, 92, 122, 0.62), rgba(255, 92, 122, 1));
}

.asset-strip {
  margin-bottom: 12px;
  padding: 22px;
  color: #15120e;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.97), rgba(250, 247, 239, 0.94));
  border: 1px solid rgba(105, 72, 27, 0.16);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(36, 25, 12, 0.1);
  backdrop-filter: blur(10px);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head p {
  margin-top: 6px;
  color: #776b5e;
  font-size: 13px;
}

.section-head strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

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

.asset-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(105, 72, 27, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 252, 244, 0.96), rgba(246, 239, 225, 0.86));
}

.asset-card span,
.asset-card small {
  color: #776b5e;
  font-weight: 700;
}

.asset-card strong {
  display: block;
  margin-top: 10px;
  color: #101318;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.history-panel {
  margin-bottom: 12px;
}

.comparison-chart-wrap {
  position: relative;
}

#comparisonChart {
  display: block;
  width: 100%;
  height: clamp(360px, 32vw, 430px);
  cursor: crosshair;
  touch-action: none;
}

.chart-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 220px;
  max-width: 300px;
  padding: 12px 14px;
  color: #fbf5ff;
  background:
    linear-gradient(145deg, rgba(25, 10, 43, 0.94), rgba(9, 3, 24, 0.94));
  border: 1px solid rgba(255, 43, 231, 0.34);
  border-radius: 8px;
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(255, 43, 231, 0.15);
  pointer-events: none;
  backdrop-filter: blur(16px);
}

.chart-tooltip b {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 13px;
}

.chart-tooltip div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  font-size: 12px;
}

.chart-tooltip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(251, 245, 255, 0.72);
}

.chart-tooltip i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.chart-tooltip strong {
  color: #7bf0ad;
  font-variant-numeric: tabular-nums;
}

.benchmark-controls,
.return-controls,
.trade-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.trade-controls select {
  min-width: 132px;
  min-height: 32px;
  padding: 0 12px;
  color: #4f4539;
  background: rgba(255, 252, 244, 0.88);
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.benchmark-controls button,
.return-controls button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  color: #4f4539;
  background: rgba(255, 252, 244, 0.78);
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.benchmark-controls button:disabled {
  cursor: default;
  opacity: 0.5;
}

.trade-modal-open {
  margin-top: 12px;
  color: #f5edf8;
  background: linear-gradient(135deg, #1c1030, #30174f);
  border: 1px solid rgba(255, 43, 231, 0.28);
}

.trade-detail-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
}

.trade-detail-dialog[hidden] {
  display: none;
}

.trade-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 0, 15, 0.74);
  backdrop-filter: blur(2px);
}

.trade-detail-popup {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 24px));
  max-height: min(88vh, 840px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 43, 231, 0.28);
  border-radius: 12px;
  background: rgba(10, 2, 23, 0.95);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

.trade-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255, 43, 231, 0.2);
}

.trade-detail-head h3 {
  margin: 0;
  font-size: 15px;
  color: rgba(251, 245, 255, 0.94);
}

.trade-detail-head button {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid rgba(251, 245, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.14);
  color: #f9f2ff;
  cursor: pointer;
}

.trade-detail-body {
  padding: 4px 8px 10px;
  overflow: auto;
  max-height: calc(88vh - 58px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 43, 231, 0.48) transparent;
}

.trade-detail-body::-webkit-scrollbar {
  width: 9px;
}

.trade-detail-body::-webkit-scrollbar-thumb {
  background: rgba(255, 43, 231, 0.42);
  border-radius: 999px;
}

.trade-detail-body::-webkit-scrollbar-track {
  background: rgba(255, 252, 244, 0.08);
}

.trade-modal-wrap {
  width: 100%;
  padding: 8px;
}

.trade-modal-table {
  min-width: 880px;
}

.trade-modal-table th,
.trade-modal-table td,
.trade-modal-table .trade-side {
  white-space: nowrap;
}

.trade-modal-table th {
  background: rgba(37, 15, 58, 0.94);
  color: rgba(251, 245, 255, 0.68);
}

.trade-modal-table td {
  border-bottom-color: rgba(255, 43, 231, 0.1);
}

.trade-modal-table tr:hover td {
  background: rgba(255, 43, 231, 0.08);
}
.benchmark-controls button.active,
.return-controls button.active {
  color: #fff;
  background: linear-gradient(135deg, #15110d, #1b2430);
}

.benchmark-controls span,
.benchmark-card i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

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

.benchmark-card {
  padding: 12px 14px;
  border: 1px solid rgba(105, 72, 27, 0.1);
  border-radius: 8px;
}

.benchmark-card span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #695d50;
  font-size: 13px;
}

.benchmark-card strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.risk-item {
  min-height: 98px;
  padding: 13px;
  background: rgba(255, 252, 244, 0.74);
  border: 1px solid rgba(105, 72, 27, 0.08);
  border-radius: 8px;
}

.risk-item span,
.risk-item small {
  display: block;
  color: #776b5e;
  font-size: 12px;
  font-weight: 700;
}

.risk-item strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.risk-item em {
  display: block;
  margin-top: 8px;
  color: rgba(251, 245, 255, 0.58);
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}

.risk-item.missing strong,
.risk-item.unknown strong {
  color: rgba(251, 245, 255, 0.62);
}

.tooltip-dot {
  display: inline-grid;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  padding: 0;
  place-items: center;
  color: rgba(251, 245, 255, 0.76);
  font: inherit;
  font-size: 10px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 43, 231, 0.24);
  border-radius: 999px;
}

.risk-note {
  padding: 0 16px 16px;
  color: #776b5e;
  font-size: 13px;
}

.risk-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 14px 7px 16px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    border-color 180ms ease;
}

.risk-badge::after {
  content: "›";
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: currentColor;
  background: rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  transform: translateX(0);
  animation: riskBadgePulse 1.8s ease-in-out infinite;
}

.risk-badge:hover {
  transform: translateY(-1px);
}

.risk-badge:hover::after,
.risk-badge:focus-visible::after {
  transform: translateX(2px);
}

.risk-badge:focus-visible {
  outline: none;
}

.risk-badge.high {
  color: #b91c1c;
  background: #fee2e2;
  border-color: rgba(185, 28, 28, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 0 5px rgba(185, 28, 28, 0.08);
}

.risk-badge.medium {
  color: #92400e;
  background: #fef3c7;
  border-color: rgba(146, 64, 14, 0.18);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 0 5px rgba(217, 119, 6, 0.08);
}

.risk-badge.low {
  color: #166534;
  background: #dcfce7;
  border-color: rgba(22, 101, 52, 0.2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 0 5px rgba(22, 101, 52, 0.08);
}

@keyframes riskBadgePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.14);
    opacity: 0.88;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    opacity: 1;
  }
}

.risk-detail-popup {
  width: min(760px, calc(100vw - 24px));
}

.version-popup {
  width: min(780px, calc(100vw - 24px));
}

.version-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.version-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 43, 231, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 43, 231, 0.16), rgba(25, 216, 255, 0.08));
}

.version-summary span,
.version-summary small,
.version-entry span {
  color: rgba(251, 245, 255, 0.62);
  font-size: 12px;
}

.version-summary strong {
  color: #fff;
  font-size: 24px;
  letter-spacing: 0;
}

.version-list {
  display: grid;
  gap: 10px;
}

.version-entry {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 43, 231, 0.16);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(43, 17, 65, 0.88), rgba(20, 10, 38, 0.9));
}

.version-entry div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.version-entry strong {
  color: rgba(251, 245, 255, 0.96);
  font-size: 14px;
}

.version-entry ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: rgba(251, 245, 255, 0.78);
  font-size: 12px;
  line-height: 1.55;
}

.risk-rule-summary {
  display: grid;
  gap: 7px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255, 43, 231, 0.16);
}

.risk-rule-summary strong {
  color: #ffd6e8;
  font-size: 20px;
}

.risk-rule-summary span,
.risk-rule-note {
  color: rgba(251, 245, 255, 0.68);
  font-size: 12px;
  line-height: 1.6;
}

.risk-rule-list {
  display: grid;
  gap: 9px;
  padding: 10px 12px;
}

.risk-rule-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(255, 43, 231, 0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(42, 14, 67, 0.82), rgba(22, 7, 42, 0.9));
}

.risk-rule-card.triggered {
  border-color: rgba(255, 91, 151, 0.52);
  box-shadow: inset 3px 0 0 rgba(255, 91, 151, 0.86);
}

.risk-rule-card.medium.triggered {
  border-color: rgba(255, 205, 92, 0.48);
  box-shadow: inset 3px 0 0 rgba(255, 205, 92, 0.86);
}

.risk-rule-card.low {
  opacity: 0.78;
}

.risk-rule-card div {
  display: grid;
  gap: 4px;
}

.risk-rule-card strong {
  color: rgba(251, 245, 255, 0.94);
  font-size: 13px;
}

.risk-rule-card span {
  color: rgba(251, 245, 255, 0.56);
  font-size: 11px;
  line-height: 1.45;
}

.risk-rule-card dl {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 10px;
  margin: 0;
  color: rgba(251, 245, 255, 0.72);
  font-size: 11px;
  white-space: nowrap;
}

.risk-rule-card dt {
  color: rgba(251, 245, 255, 0.48);
}

.risk-rule-card dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.risk-rule-note {
  margin: 0;
  padding: 0 12px 12px;
}

.return-summary {
  padding: 12px 16px 0;
}

.expiry-row strong,
.expiry-row span {
  display: block;
}

.empty-state {
  padding: 14px;
}

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

.month-cell {
  min-height: 68px;
  padding: 11px;
}

.month-cell span {
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
}

.month-cell strong {
  font-size: 17px;
}

.positions-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 150px;
  margin: 16px 0 12px;
  padding: 24px 28px;
  overflow: hidden;
  color: #f8fafc;
  background:
    radial-gradient(ellipse at 14% -18%, rgba(201, 155, 73, 0.25), transparent 44%),
    repeating-linear-gradient(90deg, rgba(0, 217, 255, 0.055) 0 1px, transparent 1px 84px),
    linear-gradient(135deg, #17110b, #111827 56%, #07080b);
  border: 1px solid rgba(201, 155, 73, 0.32);
  border-radius: 8px;
  box-shadow:
    0 18px 44px rgba(36, 25, 12, 0.16),
    inset 0 0 28px rgba(0, 217, 255, 0.06);
}

.positions-hero h2 {
  margin-bottom: 10px;
  font-size: 34px;
}

.positions-hero p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

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

.positions-meta span {
  min-height: 34px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.concentration-grid,
.leader-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
}

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

.concentration-card,
.leader-card {
  min-width: 0;
  padding: 13px;
  background: rgba(255, 252, 244, 0.74);
  border: 1px solid rgba(105, 72, 27, 0.08);
  border-radius: 8px;
}

.concentration-card span,
.concentration-card small,
.leader-card p,
.leader-card small {
  display: block;
  color: #776b5e;
  font-size: 12px;
  font-weight: 700;
}

.concentration-card strong {
  display: block;
  margin: 9px 0 7px;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.concentration-badge {
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 800;
}

.concentration-badge.high {
  color: #b91c1c;
  background: #fee2e2;
}

.concentration-badge.medium {
  color: #92400e;
  background: #fef3c7;
}

.concentration-badge.low {
  color: #166534;
  background: #dcfce7;
}

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

.leader-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
  gap: 4px 12px;
  min-height: 106px;
}

.leader-card .rank {
  grid-column: 1;
  grid-row: 1 / -1;
}

.leader-card > div {
  min-width: 0;
}

.leader-card h3,
.leader-card p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-card strong,
.leader-card small {
  grid-column: 2;
  font-variant-numeric: tabular-nums;
}

.leader-card strong {
  align-self: end;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1;
}

.leader-card small {
  line-height: 1.2;
}

.insight-lead-panel {
  color: #fbf5ff;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 43, 231, 0.18), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(25, 216, 255, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(24, 6, 42, 0.96), rgba(9, 2, 22, 0.98));
  border: 1px solid rgba(255, 43, 231, 0.24);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.34);
}

.insight-lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(340px, 0.72fr);
  gap: 14px;
  padding: 14px;
}

.lead-news-column,
.lead-macro-column {
  min-width: 0;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(251, 245, 255, 0.075), rgba(251, 245, 255, 0.035));
  border: 1px solid rgba(251, 245, 255, 0.1);
  border-radius: 8px;
}

.lead-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.lead-section-head.compact {
  gap: 12px;
}

.lead-section-head h2 {
  margin-top: 3px;
  color: #fff;
  font-size: 22px;
  line-height: 1.1;
}

.lead-section-head p:not(.eyebrow) {
  max-width: 560px;
  margin-top: 7px;
  color: rgba(251, 245, 255, 0.62);
  font-size: 12px;
  line-height: 1.55;
}

.lead-section-head .metric {
  flex: 0 0 auto;
  color: rgba(251, 245, 255, 0.78);
  background: rgba(251, 245, 255, 0.075);
  border: 1px solid rgba(255, 43, 231, 0.22);
}

.lead-news-feature-card,
.lead-news-row {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.lead-news-feature-card {
  display: block;
  min-height: 210px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(25, 216, 255, 0.14), transparent 32%),
    linear-gradient(160deg, rgba(43, 17, 65, 0.92), rgba(13, 8, 29, 0.96));
  border: 1px solid rgba(25, 216, 255, 0.18);
  border-radius: 8px;
}

.lead-news-feature-card:hover,
.lead-news-row:hover {
  transform: translateY(-1px);
  border-color: rgba(25, 216, 255, 0.42);
  background-color: rgba(25, 216, 255, 0.06);
}

.lead-news-meta,
.lead-news-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lead-news-meta span,
.lead-news-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
  padding: 0 9px;
  color: #060013;
  background: linear-gradient(135deg, #35e8ad, #19d8ff);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.lead-news-meta small,
.lead-news-row small,
.lead-news-feature-card p,
.lead-news-foot em,
.fed-policy-path p,
.fed-policy-head small {
  color: rgba(251, 245, 255, 0.58);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.lead-news-feature-card h3 {
  margin: 18px 0 12px;
  max-width: 820px;
  color: #fff;
  font-size: 25px;
  line-height: 1.22;
}

.lead-news-feature-card p {
  max-width: 680px;
}

.lead-news-foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(251, 245, 255, 0.08);
}

.lead-news-foot strong {
  color: #35e8ad;
  font-size: 12px;
  text-transform: uppercase;
}

.lead-news-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.lead-news-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 86px;
  padding: 12px;
  background: rgba(251, 245, 255, 0.045);
  border: 1px solid rgba(251, 245, 255, 0.08);
  border-radius: 8px;
}

.lead-news-row strong {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(251, 245, 255, 0.92);
  font-size: 13px;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lead-news-row small {
  display: block;
  margin-top: 7px;
}

.lead-empty-state,
.fed-policy-empty {
  min-height: 160px;
  padding: 18px;
  color: rgba(251, 245, 255, 0.7);
  background: rgba(251, 245, 255, 0.05);
  border: 1px dashed rgba(251, 245, 255, 0.14);
  border-radius: 8px;
}

.lead-empty-state strong,
.fed-policy-empty strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
}

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

.macro-pulse-card {
  min-height: 108px;
  padding: 13px;
  background: rgba(251, 245, 255, 0.052);
  border: 1px solid rgba(251, 245, 255, 0.09);
  border-radius: 8px;
}

.macro-pulse-card span,
.fed-policy-head span {
  color: rgba(251, 245, 255, 0.58);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.macro-pulse-card strong {
  display: block;
  margin: 13px 0 8px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.macro-pulse-card small {
  color: rgba(251, 245, 255, 0.56);
  font-size: 11px;
}

.macro-pulse-card.high {
  border-color: rgba(255, 92, 122, 0.35);
  box-shadow: inset 0 -3px 0 rgba(255, 92, 122, 0.56);
}

.macro-pulse-card.medium {
  border-color: rgba(255, 79, 227, 0.26);
  box-shadow: inset 0 -3px 0 rgba(255, 79, 227, 0.45);
}

.macro-pulse-card.low {
  border-color: rgba(42, 255, 174, 0.24);
  box-shadow: inset 0 -3px 0 rgba(42, 255, 174, 0.46);
}

.fed-policy-path {
  margin-top: 10px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 43, 231, 0.12), transparent 38%),
    rgba(251, 245, 255, 0.042);
  border: 1px solid rgba(255, 43, 231, 0.16);
  border-radius: 8px;
}

.fed-policy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.fed-policy-head strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 15px;
}

.fed-policy-bars {
  display: grid;
  gap: 9px;
}

.fed-policy-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 48px;
  gap: 9px;
  align-items: center;
}

.fed-policy-row span,
.fed-policy-row strong {
  color: rgba(251, 245, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.fed-policy-row strong {
  color: #fff;
  text-align: right;
}

.fed-policy-row div {
  height: 9px;
  overflow: hidden;
  background: rgba(251, 245, 255, 0.08);
  border-radius: 999px;
}

.fed-policy-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff4fe3, #19d8ff);
  border-radius: inherit;
}

.fed-policy-path p {
  margin-top: 12px;
}

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

.negative {
  color: var(--red) !important;
}

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

.warning {
  color: var(--amber) !important;
}

@media (max-width: 1120px) {
  .dashboard-grid,
  .positions-grid,
  .holdings-grid,
  .asset-card-grid,
  .leader-grid,
  .benchmark-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .trade-activity {
    grid-template-columns: 1fr;
  }

  .insight-lead-grid,
  .lead-news-list {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: 1 / -1;
  }

  .ibkr-hero {
    min-height: 500px;
    padding: 26px;
  }

  .hero-copy {
    width: min(560px, 55vw);
  }

  .hero-chart-wrap {
    left: 48%;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 28px, 1360px);
    padding: 14px 0 36px;
  }

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

  .topbar-actions,
  .positions-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .sheet-tabs,
  .status-strip,
  .positions-meta {
    width: 100%;
  }

  .status-strip {
    flex-wrap: wrap;
  }

  .sheet-tabs button,
  .status-strip > span,
  .version-chip,
  .positions-meta span {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    text-align: center;
  }

  .status-pill-copy strong,
  .version-chip {
    white-space: normal;
  }

  h1 {
    font-size: 28px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .profile-avatar {
    width: 42px;
    height: 42px;
  }

  .dashboard-grid,
  .positions-grid,
  .holdings-grid,
  .monthly-grid,
  .leader-grid,
  .asset-card-grid,
  .benchmark-summary,
  .risk-grid,
  .trade-activity,
  .concentration-grid {
    grid-template-columns: 1fr;
  }

  .ibkr-hero {
    min-height: 510px;
    margin-top: 14px;
    padding: 22px 18px;
  }

  .mode-tabs {
    gap: 8px;
  }

  .mode-tab {
    min-width: 64px;
    min-height: 44px;
    font-size: 18px;
  }

  .hero-copy {
    width: 100%;
    padding-top: 18px;
  }

  .hero-label {
    font-size: 16px;
  }

  .hero-value {
    font-size: 36px;
    white-space: normal;
  }

  .hero-subline {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    margin-top: 18px;
    font-size: 18px;
  }

  .hero-note {
    font-size: 14px;
  }

  .hero-chart-wrap {
    inset: 244px 0 70px 0;
  }

  .positions-hero h2 {
    font-size: 30px;
  }

  .section-head,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head strong {
    font-size: 24px;
  }

  .benchmark-controls,
  .return-controls,
  .trade-controls {
    justify-content: flex-start;
  }

  #comparisonChart {
    height: 430px;
  }

  .range-tabs button,
  .currency-toggle button {
    min-height: 36px;
    padding: 0 13px;
    font-size: 14px;
  }

}

/* Final theme overrides: keep these last so the space-nebula style wins. */
body {
  background:
    radial-gradient(circle at 14% 4%, rgba(255, 43, 231, 0.26), transparent 300px),
    radial-gradient(circle at 82% 0%, rgba(25, 216, 255, 0.18), transparent 360px),
    radial-gradient(circle at 50% 78%, rgba(107, 39, 180, 0.22), transparent 520px),
    linear-gradient(180deg, #12001f 0%, #090012 44%, #05000b 100%);
  color: var(--text);
}

.cyber-canvas {
  opacity: 0.38;
}

.topbar {
  color: var(--text);
  border-bottom-color: rgba(255, 43, 231, 0.18);
}

.eyebrow,
.status-strip,
.panel-head p,
.metric,
.stat-list span,
.month-cell span,
.holding-card p,
.asset-card span,
.asset-card small,
.risk-item span,
.risk-item small,
.risk-note,
.expiry-row span,
.empty-state,
.section-head p,
.benchmark-card span,
.concentration-card span,
.concentration-card small,
.leader-card p,
.leader-card small {
  color: var(--muted);
}

.profile-avatar {
  border-color: rgba(255, 43, 231, 0.82);
  box-shadow:
    0 0 0 1px rgba(25, 216, 255, 0.42),
    0 0 22px rgba(255, 43, 231, 0.32),
    0 8px 24px rgba(0, 0, 0, 0.34);
}

.sheet-tabs,
.panel,
.asset-strip {
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(35, 13, 55, 0.82), rgba(14, 8, 30, 0.82));
  border-color: rgba(255, 43, 231, 0.2);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(25, 216, 255, 0.05);
}

.sheet-tabs button {
  color: rgba(251, 245, 255, 0.66);
}

.sheet-tabs button.active,
.return-controls button.active,
.return-scope button.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 43, 231, 0.46), rgba(25, 216, 255, 0.18));
  border-color: rgba(255, 43, 231, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(255, 43, 231, 0.28);
}

.ibkr-hero,
.positions-hero {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 43, 231, 0.18), transparent 34%),
    radial-gradient(circle at 78% 32%, rgba(25, 216, 255, 0.13), transparent 34%),
    repeating-linear-gradient(90deg, rgba(25, 216, 255, 0.045) 0 1px, transparent 1px 92px),
    linear-gradient(145deg, #1b0630 0%, #0b0821 48%, #04000a 100%);
  border-color: rgba(255, 43, 231, 0.26);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.34),
    inset 0 0 70px rgba(25, 216, 255, 0.05);
}

.ibkr-hero::before {
  border-top-color: rgba(255, 43, 231, 0.34);
  border-right-color: rgba(25, 216, 255, 0.3);
}

.ibkr-hero::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 46px rgba(255, 43, 231, 0.06),
    inset 0 0 86px rgba(25, 216, 255, 0.04);
}

.mode-tabs {
  border-bottom-color: rgba(255, 43, 231, 0.22);
}

.mode-tab.active {
  background: rgba(255, 43, 231, 0.18);
  border-color: rgba(255, 43, 231, 0.72);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.56),
    0 0 16px rgba(25, 216, 255, 0.18);
}

.currency-toggle button,
.range-tabs button,
.benchmark-controls button,
.return-controls button,
.return-scope button {
  color: rgba(251, 245, 255, 0.72);
  background: rgba(251, 245, 255, 0.07);
  border: 1px solid rgba(255, 43, 231, 0.22);
}

.currency-toggle button.active,
.range-tabs button.active {
  color: #15051f;
  background: #fbf5ff;
  border-color: #fbf5ff;
}

.panel-head {
  background:
    linear-gradient(90deg, rgba(255, 43, 231, 0.1), rgba(25, 216, 255, 0.045), transparent);
  border-bottom-color: rgba(255, 43, 231, 0.16);
}

.asset-card,
.stat-list div,
.risk-item,
.expiry-row,
.concentration-card,
.leader-card,
.benchmark-card,
.month-cell {
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(43, 17, 65, 0.88), rgba(20, 10, 38, 0.9));
  border: 1px solid rgba(255, 43, 231, 0.16);
}

.asset-card strong,
.section-head strong,
.stat-list strong,
.risk-item strong,
.leader-card strong {
  color: var(--text);
}

th {
  background: #150a25;
  color: var(--muted);
}

th,
td {
  border-bottom-color: rgba(255, 43, 231, 0.12);
}

.bar {
  background: rgba(251, 245, 255, 0.08);
}

.bar span {
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--magenta));
}
