:root {
  --bg: #f6f5f1;
  --ink: #111;
  --muted: #66615b;
  --line: #171717;
  --soft-line: #d9d5cd;
  --panel: #fffdfa;
  --accent: #ff5a3d;
  --green: #087f5b;
  --red: #c92a2a;
  --amber: #b7791f;
  --brand-black: #080a0c;
  --brand-paper: #f5f6f3;
  --brand-green: #08785f;
  --brand-red: #b9453d;
}

@media (max-width: 720px) {
  body {
    min-width: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }

  .overview-page,
  .dashboard-page,
  .hyper-page {
    min-height: 100dvh;
  }

  .overview-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 10px;
    min-height: 58px;
    padding: 9px 12px;
  }

  .company-brand {
    width: min(180px, 50vw);
  }

  .overview-nav-actions {
    gap: 10px;
    justify-content: flex-end;
  }

  .overview-nav-actions .text-action {
    min-height: 34px;
    font-size: 11px;
    white-space: nowrap;
  }

  .overview-main {
    padding: 18px 12px 28px;
  }

  .overview-main > *,
  .overview-story,
  .portfolio-showcase {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .overview-story h1 {
    margin: 0;
    font-size: clamp(46px, 15vw, 64px);
    line-height: 0.92;
  }

  .overview-copy,
  .overview-lede,
  .research-note {
    max-width: none;
  }

  .strategy-guardrails,
  .showcase-actions,
  .portfolio-mark-controls,
  .trade-log-heading,
  .latest-portfolio-heading {
    width: 100%;
  }

  .strategy-guardrails,
  .portfolio-mark-controls,
  .latest-portfolio-tabs,
  .risk-comparison-tabs,
  .hyper-range-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .portfolio-showcase {
    margin-top: 28px;
    padding: 12px;
  }

  .showcase-header {
    grid-template-columns: 1fr;
  }

  .showcase-summary {
    width: 100%;
    align-items: flex-start;
    text-align: left;
  }

  .equity-pnl-horizons {
    white-space: normal;
  }

  .algo-stat-strip,
  .mini-return-grid,
  .mini-mc-stats,
  .portfolio-totals {
    grid-template-columns: 1fr 1fr;
  }

  .portfolio-totals div {
    min-height: 76px;
    padding: 11px 10px;
  }

  .portfolio-totals strong {
    font-size: 15px;
  }

  .portfolio-visual-grid,
  .strategy-analytics-column,
  .hyper-flow-columns,
  .hyper-flow-totals {
    grid-template-columns: 1fr;
  }

  .treemap-shell {
    display: block;
  }

  .snapshot-rail {
    width: 100%;
    min-height: 42px;
    margin-top: 8px;
    writing-mode: horizontal-tb;
  }

  .portfolio-treemap {
    min-height: 520px;
    border: 1px solid #d6dad7;
  }

  .tile-topline b {
    font-size: 24px;
  }

  .tile-direction,
  .tile-trade {
    display: block;
  }

  .tile-trade {
    margin-top: 14px;
    font-size: 10px;
  }

  .overview-trade-log-wrap,
  .overview-candidate-wrap,
  .table-wrap,
  .sector-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .overview-trade-log-table,
  .overview-candidate-table,
  .table-wrap table,
  .sector-table-wrap table {
    min-width: 760px;
  }

  .overview-modal-card,
  .refresh-log-card,
  .detail-drawer {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    margin: 10px;
  }

  .overview-modal-card header,
  .detail-drawer-header {
    gap: 10px;
  }

  .overview-modal-body,
  .detail-drawer-body {
    max-height: calc(100dvh - 130px);
    overflow: auto;
  }

  .hyper-flow-shell {
    padding: 20px 12px 34px;
  }

  .hyper-flow-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dashboard-page {
    display: block;
  }

  .app-header,
  .panel,
  .center-stage,
  .backtest-panel {
    width: 100%;
    max-width: 100vw;
  }

  canvas {
    max-width: 100%;
  }
}

/* Hyperliquid collective flow view */
.hyper-flow-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.hyper-flow-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #cfd5d1;
}

.hyper-flow-hero h1 {
  margin: 7px 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
}

.hyper-flow-hero > div > p:last-child {
  max-width: 720px;
  margin: 0;
  color: #5d6661;
  font-size: 14px;
  line-height: 1.5;
}

.hyper-flow-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5d6661;
  font-size: 11px;
  font-weight: 700;
}

.hyper-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #08785f;
  box-shadow: 0 0 0 4px rgba(8, 120, 95, 0.12);
}

.hyper-flow-toolbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
}

.hyper-flow-toolbar > div:first-child strong,
.hyper-flow-toolbar > div:first-child span {
  display: block;
}

.hyper-flow-toolbar > div:first-child strong {
  font-size: 12px;
  text-transform: uppercase;
}

.hyper-flow-toolbar > div:first-child span {
  margin-top: 3px;
  color: #6a726e;
  font-size: 11px;
}

.hyper-flow-toolbar .hyper-range-tabs {
  width: auto;
  border-color: #cfd5d1;
  background: #e9edeb;
}

.hyper-flow-toolbar .hyper-range-tabs button {
  min-width: 62px;
  padding: 9px 14px;
}

.hyper-flow-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #cfd5d1;
  background: #cfd5d1;
  gap: 1px;
}

.hyper-flow-totals article {
  min-width: 0;
  padding: 18px 20px;
  background: #fff;
}

.hyper-flow-totals span,
.hyper-flow-totals strong {
  display: block;
}

.hyper-flow-totals span {
  color: #67706b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.hyper-flow-totals strong {
  margin-top: 8px;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.hyper-flow-totals .inbound strong,
.hyper-flow-totals strong.bullish {
  color: #08785f;
}

.hyper-flow-totals .outbound strong,
.hyper-flow-totals strong.bearish {
  color: #b6382f;
}

.hyper-flow-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.hyper-direction-panel,
.hyper-sector-panel {
  min-width: 0;
  background: #fff;
  border: 1px solid #cfd5d1;
}

.hyper-direction-panel {
  border-top-width: 4px;
}

.hyper-direction-panel.inbound {
  border-top-color: #08785f;
}

.hyper-direction-panel.outbound {
  border-top-color: #b6382f;
}

.hyper-direction-panel > header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-bottom: 1px solid #e1e5e2;
}

.hyper-direction-panel h2,
.hyper-sector-panel h2 {
  margin: 3px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0;
}

.hyper-direction-panel > header > span {
  color: #68706c;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.hyper-direction-list {
  min-height: 400px;
}

.hyper-direction-row {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 30px 86px minmax(120px, 1fr) 72px;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border: 0;
  border-bottom: 1px solid #e7ebe8;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hyper-direction-row:hover {
  background: #f5f8f6;
}

.hyper-direction-row:last-child {
  border-bottom: 0;
}

.hyper-flow-rank {
  color: #9aa29e;
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.hyper-flow-symbol strong,
.hyper-flow-symbol span,
.hyper-flow-measure strong {
  display: block;
}

.hyper-flow-symbol strong {
  font-size: 15px;
}

.hyper-flow-symbol span,
.hyper-flow-observations {
  margin-top: 2px;
  color: #737b77;
  font-size: 9px;
  line-height: 1.35;
}

.hyper-flow-measure strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.hyper-flow-measure > div {
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  background: #e7ebe8;
}

.hyper-flow-measure i {
  display: block;
  height: 100%;
  background: #08785f;
}

.hyper-direction-panel.outbound .hyper-flow-measure i {
  background: #b6382f;
}

.hyper-flow-observations {
  text-align: right;
  white-space: nowrap;
}

.hyper-flow-empty {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px;
  color: #6c7570;
  text-align: center;
}

.hyper-flow-empty strong {
  color: #232825;
  font-size: 14px;
}

.hyper-flow-empty span {
  max-width: 360px;
  font-size: 11px;
  line-height: 1.5;
}

.hyper-sector-panel {
  margin-top: 16px;
}

.hyper-sector-panel > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px;
  border-bottom: 1px solid #dfe4e0;
}

.hyper-sector-panel > header p:last-child {
  margin: 5px 0 0;
  color: #6b746f;
  font-size: 11px;
}

.hyper-sector-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: #68706c;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.hyper-sector-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hyper-sector-legend i {
  width: 9px;
  height: 9px;
  display: inline-block;
}

.hyper-sector-legend i.inbound {
  background: #08785f;
}

.hyper-sector-legend i.balanced {
  background: #aab2ae;
}

.hyper-sector-legend i.outbound {
  background: #b6382f;
}

.hyper-sector-treemap {
  min-height: 430px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(142px, auto);
  grid-auto-flow: dense;
  gap: 6px;
  padding: 6px;
  background: #e3e7e4;
}

.hyper-sector-treemap.populated {
  position: relative;
  display: block;
  height: 430px;
  padding: 0;
  overflow: hidden;
}

.hyper-sector-treemap > article {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  border-left: 5px solid #aab2ae;
  background: #f8faf9;
}

.hyper-sector-treemap.populated > article {
  position: absolute;
  box-sizing: border-box;
  outline: 3px solid #e3e7e4;
  outline-offset: -3px;
}

.hyper-sector-treemap > article.bullish {
  border-left-color: #08785f;
  background: #eef7f3;
}

.hyper-sector-treemap > article.bearish {
  border-left-color: #b6382f;
  background: #fbf1f0;
}

.hyper-sector-treemap > article.bullish.medium-intensity {
  background: #dcefe7;
}

.hyper-sector-treemap > article.bullish.high-intensity {
  background: #c5e5d8;
}

.hyper-sector-treemap > article.bearish.medium-intensity {
  background: #f4deda;
}

.hyper-sector-treemap > article.bearish.high-intensity {
  background: #ecc7c2;
}

.hyper-sector-treemap article > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hyper-sector-treemap article > div:first-child span {
  font-size: 13px;
  font-weight: 900;
}

.hyper-sector-treemap article > div:first-child strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hyper-sector-treemap article p {
  margin: 7px 0 12px;
  color: #5e6762;
  font-size: 10px;
}

.hyper-sector-balance {
  height: 7px;
  display: flex;
  overflow: hidden;
  background: #d9dfdb;
}

.hyper-sector-balance i,
.hyper-sector-balance b {
  display: block;
  min-width: 1px;
}

.hyper-sector-balance i {
  background: #08785f;
}

.hyper-sector-balance b {
  background: #b6382f;
}

.hyper-sector-treemap article small {
  display: block;
  margin-top: 7px;
  color: #5f6863;
  font-size: 9px;
}

.hyper-sector-treemap article.compact p,
.hyper-sector-treemap article.compact small,
.hyper-sector-treemap article.micro p,
.hyper-sector-treemap article.micro small,
.hyper-sector-treemap article.micro .hyper-sector-balance {
  display: none;
}

.hyper-sector-treemap article.compact .hyper-sector-balance {
  margin-top: 8px;
}

.hyper-sector-treemap article.micro {
  justify-content: center;
  padding-block: 8px;
}

.hyper-sector-treemap > .hyper-flow-empty {
  grid-column: 1 / -1;
  min-height: 420px;
  background: #fff;
}

.hyper-wallet-drilldown .notice,
.hyper-wallet-profile .notice {
  margin: 0;
}

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

.hyper-wallet-flow-table-wrap {
  max-height: min(62vh, 680px);
}

.hyper-wallet-flow-table {
  min-width: 1060px;
}

.hyper-wallet-flow-table tbody tr {
  --flow-intensity: 0.1;
  cursor: pointer;
}

.hyper-wallet-flow-table tbody tr:hover {
  background: #f6f9f7;
}

.hyper-wallet-flow-table tbody tr.bullish {
  background: linear-gradient(90deg, rgba(8, 120, 95, calc(0.05 + var(--flow-intensity) * 0.11)), rgba(8, 120, 95, calc(var(--flow-intensity) * 0.035)) 34%, #fff 72%);
}

.hyper-wallet-flow-table tbody tr.bearish {
  background: linear-gradient(90deg, rgba(182, 56, 47, calc(0.05 + var(--flow-intensity) * 0.11)), rgba(182, 56, 47, calc(var(--flow-intensity) * 0.035)) 34%, #fff 72%);
}

.hyper-wallet-flow-table tbody tr.bullish:hover {
  background: linear-gradient(90deg, rgba(8, 120, 95, calc(0.08 + var(--flow-intensity) * 0.14)), rgba(8, 120, 95, calc(var(--flow-intensity) * 0.055)) 38%, #f8fbf9 76%);
}

.hyper-wallet-flow-table tbody tr.bearish:hover {
  background: linear-gradient(90deg, rgba(182, 56, 47, calc(0.08 + var(--flow-intensity) * 0.14)), rgba(182, 56, 47, calc(var(--flow-intensity) * 0.055)) 38%, #fff9f8 76%);
}

.hyper-wallet-flow-table tr.bullish td:first-child {
  border-left: 4px solid #08785f;
}

.hyper-wallet-flow-table tr.bearish td:first-child {
  border-left: 4px solid #b6382f;
}

.hyper-wallet-flow-table td {
  font-variant-numeric: tabular-nums;
}

.hyper-wallet-flow-table td:nth-child(2) {
  white-space: normal;
}

.hyper-wallet-flow-table td strong,
.hyper-wallet-holdings td strong {
  display: block;
}

.hyper-row-flowbar {
  width: 96px;
  height: 5px;
  display: flex;
  margin-top: 6px;
  overflow: hidden;
  background: #e3e8e5;
}

.hyper-row-flowbar i,
.hyper-row-flowbar b {
  display: block;
  min-width: 1px;
}

.hyper-row-flowbar i {
  background: linear-gradient(90deg, #0a8a6c, #46c09c);
}

.hyper-row-flowbar b {
  background: linear-gradient(90deg, #e26b61, #b6382f);
}

.hyper-wallet-flow-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #dde3df;
  border-left: 4px solid #aab2ae;
  background: #fff;
  color: #101316;
  text-align: left;
  cursor: pointer;
}

.hyper-wallet-flow-card:hover {
  background: #f7faf8;
}

.hyper-wallet-flow-card.bullish {
  border-left-color: #08785f;
}

.hyper-wallet-flow-card.bearish {
  border-left-color: #b6382f;
}

.hyper-wallet-flow-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hyper-wallet-flow-card strong,
.hyper-wallet-flow-card small {
  display: block;
}

.hyper-wallet-flow-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.hyper-wallet-flow-card dt {
  color: #68706c;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.hyper-wallet-flow-card dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.hyper-wallet-flow-card small {
  color: #68706c;
  font-size: 10px;
}

.hyper-wallet-tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid #d7ddd9;
  background: #f2f5f3;
  color: #35403a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.hyper-wallet-flow-table .hyper-wallet-tag {
  background: rgba(248, 250, 248, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.hyper-wallet-profile-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 16px;
  border: 1px solid #dde3df;
  background: #f8faf8;
}

.hyper-wallet-profile-head p {
  margin: 9px 0 0;
  color: #4f5a54;
  font-size: 12px;
  line-height: 1.5;
}

.hyper-wallet-profile-head > strong {
  font-size: 44px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hyper-back-button {
  justify-self: start;
}

.hyper-wallet-profile h3 {
  margin: 4px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

.hyper-marker-chart {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e1e5e2;
  background: #fbfcfb;
}

.hyper-marker-chart.empty {
  display: block;
  color: #68706c;
  font-size: 12px;
}

.hyper-marker-chart span {
  color: #68706c;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.hyper-marker-chart div {
  position: relative;
  height: 42px;
  border-top: 1px solid #d7ddd9;
  border-bottom: 1px solid #d7ddd9;
  background: linear-gradient(90deg, rgba(16, 19, 22, 0.04), rgba(16, 19, 22, 0.01));
}

.hyper-marker-chart i {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #9aa29e;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(16, 19, 22, 0.14);
}

.hyper-marker-chart i.bullish {
  background: #08785f;
}

.hyper-marker-chart i.bearish {
  background: #b6382f;
}

.hyper-wallet-trades tr.bullish td:first-child {
  border-left: 4px solid #08785f;
}

.hyper-wallet-trades tr.bearish td:first-child {
  border-left: 4px solid #b6382f;
}

.hyper-wallet-holdings-wrap {
  max-height: 320px;
}

.hyper-wallet-holdings {
  min-width: 900px;
}

.hyper-wallet-holdings tr.bullish td:first-child {
  border-left: 4px solid #08785f;
}

.hyper-wallet-holdings tr.bearish td:first-child {
  border-left: 4px solid #b6382f;
}

.hyper-wallet-holdings tr.selected {
  background: #f2f6f4;
}

.hyper-wallet-holdings small {
  display: block;
  margin-top: 2px;
  color: #68706c;
  font-size: 10px;
}

.hyper-ledger-loading {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #e1e5e2;
  background: #fbfcfb;
  color: #4f5a54;
  font-size: 12px;
  font-weight: 800;
}

.hyper-ledger-loading i {
  width: 18px;
  height: 18px;
  display: block;
  border: 2px solid #d7ddd9;
  border-top-color: #08785f;
  border-radius: 50%;
  animation: hyper-spin 0.8s linear infinite;
}

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

.hyper-ledger-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.hyper-ledger-toolbar.compact {
  margin: 16px 0 10px;
}

.hyper-ledger-toolbar strong,
.hyper-ledger-toolbar span {
  display: block;
}

.hyper-ledger-toolbar span {
  margin-top: 2px;
  color: #68706c;
  font-size: 10px;
}

.hyper-ledger-toolbar form,
.hyper-ledger-pages {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hyper-ledger-toolbar input {
  width: 170px;
  height: 34px;
  border: 1px solid #d7ddd9;
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
}

.hyper-ledger-toolbar button,
.hyper-ledger-pages button {
  min-height: 34px;
  border: 1px solid #101316;
  background: #fff;
  padding: 0 10px;
  color: #101316;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.hyper-ledger-toolbar button:hover,
.hyper-ledger-pages button:hover {
  background: #101316;
  color: #fff;
}

.hyper-ledger-pages button:disabled {
  border-color: #d7ddd9;
  color: #a0a8a4;
  cursor: not-allowed;
}

.hyper-ledger-grid {
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(460px, 1.1fr);
  gap: 12px;
  align-items: stretch;
}

.hyper-pnl-breakdown-wrap {
  max-height: 300px;
}

.hyper-pnl-breakdown {
  min-width: 680px;
}

.hyper-pnl-breakdown tbody tr {
  cursor: pointer;
}

.hyper-pnl-breakdown tr.bullish td:first-child {
  border-left: 4px solid #08785f;
}

.hyper-pnl-breakdown tr.bearish td:first-child {
  border-left: 4px solid #b6382f;
}

.hyper-pnl-breakdown tr.selected {
  background: #f2f6f4;
}

.hyper-trade-chart {
  height: 100%;
  min-height: 300px;
  padding: 12px;
  border: 1px solid #e1e5e2;
  background: #fbfcfb;
}

.hyper-trade-chart header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.hyper-trade-chart header span {
  color: #68706c;
  font-size: 10px;
}

.hyper-trade-chart svg {
  width: 100%;
  height: 250px;
  display: block;
}

.hyper-trade-chart line {
  stroke: #d7ddd9;
  stroke-width: 1;
}

.hyper-trade-chart path {
  fill: none;
  stroke: #101316;
  stroke-width: 2;
}

.hyper-trade-chart text {
  fill: #68706c;
  font-size: 10px;
}

.hyper-trade-chart circle {
  stroke: #fff;
  stroke-width: 2;
}

.hyper-trade-chart circle.buy {
  fill: #08785f;
}

.hyper-trade-chart circle.sell {
  fill: #b6382f;
}

.hyper-trade-chart circle.neutral {
  fill: #9aa29e;
}

.hyper-flow-disclosure {
  margin: 14px 0 0;
  color: #7a827e;
  font-size: 9px;
  line-height: 1.5;
  text-align: right;
}

@media (max-width: 900px) {
  .hyper-flow-shell {
    width: min(100% - 28px, 1440px);
    padding-top: 24px;
  }

  .hyper-flow-hero,
  .hyper-sector-panel > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hyper-flow-hero h1 {
    font-size: 38px;
  }

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

  .hyper-flow-columns {
    grid-template-columns: 1fr;
  }

  .hyper-sector-legend {
    justify-content: flex-start;
  }

  .hyper-wallet-flow-grid {
    grid-template-columns: 1fr;
  }

  .hyper-ledger-grid {
    grid-template-columns: 1fr;
  }

  .hyper-ledger-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hyper-flow-shell {
    width: calc(100% - 20px);
    padding: 18px 0 36px;
  }

  .hyper-flow-hero {
    gap: 18px;
    padding-bottom: 18px;
  }

  .hyper-flow-hero h1 {
    font-size: 34px;
  }

  .hyper-flow-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .hyper-flow-toolbar .hyper-range-tabs {
    width: 100%;
  }

  .hyper-flow-toolbar .hyper-range-tabs button {
    min-width: 0;
    flex: 1 1 25%;
    padding-inline: 7px;
  }

  .hyper-flow-totals article {
    padding: 14px;
  }

  .hyper-flow-totals strong {
    font-size: 22px;
  }

  .hyper-direction-row {
    grid-template-columns: 24px 68px minmax(100px, 1fr);
    gap: 8px;
    padding-inline: 10px;
  }

  .hyper-flow-observations {
    display: none;
  }

  .hyper-wallet-flow-card > div:first-child,
  .hyper-wallet-profile-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hyper-wallet-flow-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hyper-marker-chart {
    grid-template-columns: 1fr;
  }

  .hyper-ledger-toolbar form {
    align-items: stretch;
    flex-direction: column;
  }

  .hyper-ledger-toolbar input,
  .hyper-ledger-toolbar button {
    width: 100%;
  }

  .hyper-sector-treemap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(154px, auto);
  }

  .hyper-sector-treemap.populated {
    height: auto;
    display: grid;
    overflow: visible;
  }

  .hyper-sector-treemap > article,
  .hyper-sector-treemap.populated > article {
    position: static;
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    width: auto !important;
    height: auto !important;
    padding: 12px;
  }

  .hyper-sector-treemap article.compact p,
  .hyper-sector-treemap article.compact small,
  .hyper-sector-treemap article.micro p,
  .hyper-sector-treemap article.micro small {
    display: block;
  }

  .hyper-sector-treemap article.micro .hyper-sector-balance {
    display: flex;
  }

  .hyper-sector-treemap article > div:first-child {
    display: block;
  }

  .hyper-sector-treemap article > div:first-child strong {
    display: block;
    margin-top: 5px;
    font-size: 17px;
  }

  .hyper-sector-treemap > .hyper-flow-empty {
    grid-column: 1 / -1 !important;
  }
}

[hidden] {
  display: none !important;
}

.overview-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--brand-paper);
  color: #101316;
  font-family: Arial, Helvetica, sans-serif;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.overview-nav {
  min-height: 68px;
  padding: 11px clamp(24px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #fff;
  border-bottom: 1px solid #d9ddda;
}

.company-brand {
  display: block;
  width: min(260px, 42vw);
  line-height: 0;
}

.company-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.overview-nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #525a56;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.nav-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 0 4px rgba(8, 120, 95, 0.11);
}

.text-action,
.return-overview {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid #101316;
  background: transparent;
  color: inherit;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.overview-main {
  width: 100%;
  max-width: 1900px;
  margin: 0 auto;
  padding: clamp(34px, 5vh, 64px) clamp(24px, 4vw, 64px) clamp(32px, 5vh, 56px);
  display: grid;
  grid-template-columns: minmax(330px, 0.52fr) minmax(720px, 1.55fr);
  align-items: start;
  gap: clamp(36px, 4vw, 72px);
}

.overview-story {
  max-width: 540px;
  padding-top: 10px;
}

.product-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  color: #59605c;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.product-index {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--brand-black);
  color: #fff;
}

.overview-story h1 {
  max-width: 520px;
  margin: 0 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 4.6vw, 76px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: 0;
}

.overview-lede {
  max-width: 540px;
  margin: 0 0 16px;
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1.15;
  font-weight: 600;
}

.overview-copy {
  max-width: 550px;
  color: #555c58;
  font-size: 15px;
  line-height: 1.58;
}

.research-note {
  margin: 22px 0 0;
  padding: 13px 15px;
  border-left: 3px solid var(--brand-black);
  background: #fff;
  color: #4f5753;
  font-size: 13px;
  line-height: 1.5;
}

.research-note strong {
  color: #111;
}

.academic-disclaimer {
  margin: 16px 0 0;
  color: #69716d;
  font-family: "Courier New", monospace;
  font-size: 10px;
  line-height: 1.5;
  text-transform: uppercase;
}

.connect-link {
  display: inline-flex;
  align-items: center;
  margin-top: 9px;
  padding-bottom: 2px;
  border-bottom: 1px solid #111514;
  color: #111514;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  gap: 6px;
}

.connect-link:hover,
.connect-link:focus-visible {
  color: #00866a;
  border-bottom-color: #00866a;
}

.linkedin-mark {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  background: #0a66c2;
  color: #fff;
  font: 700 11px/1 Arial, Helvetica, sans-serif;
}

.strategy-sequence {
  margin-top: 24px;
  border-top: 1px solid #bdc3bf;
}

.strategy-sequence article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #d4d9d5;
}

.strategy-sequence article > span {
  color: var(--brand-green);
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
}

.strategy-sequence strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.strategy-sequence p {
  color: #656c68;
  font-size: 13px;
  line-height: 1.45;
}

.strategy-guardrails {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.strategy-guardrails span {
  padding: 6px 9px;
  border: 1px solid #c8cdca;
  background: #fff;
  color: #3c433f;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.portfolio-showcase {
  min-width: 0;
  padding: clamp(22px, 2.5vw, 38px);
  background: #fff;
  border: 1px solid #cbd0cd;
  box-shadow: 0 18px 46px rgba(18, 27, 23, 0.08);
}

.algo-suite {
  margin: calc(clamp(22px, 2.5vw, 38px) * -1) calc(clamp(22px, 2.5vw, 38px) * -1) 24px;
  border-bottom: 1px solid #d6dad7;
}

.algo-suite-heading {
  padding: 13px clamp(22px, 2.5vw, 38px) 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #5e6863;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.algo-suite-heading small {
  font-size: 9px;
  font-weight: 400;
}

.study-window-tabs {
  display: flex;
  gap: 8px;
  padding: 0 clamp(22px, 2.5vw, 38px) 10px;
}

.study-window-tabs button {
  min-width: 54px;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid #cfd4d0;
  background: #fff;
  color: #3f4743;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
}

.study-window-tabs button.active {
  border-color: #101316;
  background: #101316;
  color: #fff;
}

.long-window-status {
  display: block;
  margin-top: 10px;
  color: #68706c;
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.long-window-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.long-window-charts canvas {
  width: 100%;
  height: auto;
  border: 1px solid #d6dad7;
  background: #fbfaf7;
}

.algo-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 clamp(22px, 2.5vw, 38px);
}

.algo-tabs button,
.algo-tabs .algo-tab {
  min-width: 0;
  min-height: 55px;
  padding: 9px 12px;
  display: block;
  border: 0;
  border-top: 2px solid transparent;
  border-right: 1px solid #e0e3e1;
  background: #f5f6f4;
  color: #737b77;
  text-align: left;
  font-family: Arial, Helvetica, sans-serif;
  text-decoration: none;
}

.algo-tabs button:last-child,
.algo-tabs .algo-tab:last-child {
  border-right: 0;
}

.algo-tabs button.active {
  position: relative;
  border-top-color: var(--brand-green);
  background: #101316;
  color: #fff;
}

.algo-tabs .context-graph-tab {
  position: relative;
  border-top-color: #1c806b;
  background: #edf7f3;
  color: #243c34;
  cursor: pointer;
}

.algo-tabs .context-graph-tab:hover,
.algo-tabs .context-graph-tab:focus-visible {
  background: #dff2eb;
  color: #0d5a49;
  outline: 2px solid rgba(28, 128, 107, 0.25);
  outline-offset: -2px;
}

.algo-tabs .context-graph-tab .algo-tab-details {
  color: #0d6a56;
  border-bottom-color: #0d6a56;
}

.algo-tabs .algo-tab-details {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: auto;
  padding: 2px 0;
  overflow: visible;
  border-bottom: 1px solid #fff;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.algo-tabs button.active:hover .algo-tab-details,
.algo-tabs button.active:focus-visible .algo-tab-details {
  color: #65d5b8;
  border-bottom-color: #65d5b8;
}

.algo-tabs button:disabled {
  cursor: default;
  opacity: 1;
}

.algo-tabs strong,
.algo-tabs span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.algo-tabs strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.algo-tabs > :nth-child(2) strong {
  font-size: 11px;
}

.algo-tabs > :nth-child(2) span {
  font-size: 8px;
}

.algo-tabs span {
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
}

.showcase-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-kicker {
  margin: 0 0 7px;
  color: #65706a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.showcase-header h2 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 2.6vw, 40px);
  font-weight: 500;
}

.showcase-header p:not(.section-kicker) {
  color: #69716d;
  font-size: 13px;
}

.study-abstract {
  display: grid;
  max-width: 780px;
  margin-top: 7px;
  gap: 3px;
}

.showcase-header .study-abstract p {
  margin: 0;
  color: #66706b;
  font-size: 11px;
  line-height: 1.45;
}

.study-abstract strong {
  color: #222825;
}

.study-method-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.study-details-button {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0 0 1px;
  border: 0;
  border-bottom: 1px solid #111514;
  background: transparent;
  color: #111514;
  font: 700 9px/1.2 Arial, Helvetica, sans-serif;
  text-transform: uppercase;
}

.study-details-button:hover,
.study-details-button:focus-visible {
  color: #00866a;
  border-bottom-color: #00866a;
}

.showcase-summary {
  text-align: right;
  white-space: nowrap;
}

.showcase-summary strong {
  display: block;
  font-size: clamp(24px, 2vw, 34px);
}

.showcase-summary span {
  color: #69716d;
  font-size: 11px;
  text-transform: uppercase;
}

.showcase-summary small {
  display: block;
  margin-top: 3px;
  color: #737a76;
  font-size: 10px;
  line-height: 1.25;
  text-transform: none;
}

.equity-pnl-horizons b {
  font-weight: 800;
}

.equity-pnl-horizons button {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-height: 20px;
  padding: 2px 5px;
  border: 1px solid #cfd6d1;
  border-radius: 4px;
  background: #f7f8f6;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.equity-pnl-horizons button:hover,
.equity-pnl-horizons button:focus-visible {
  border-color: #101316;
  background: #ffffff;
  outline: none;
}

.equity-last-ref {
  display: block;
  margin: 3px 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #737a76;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 600;
  text-align: right;
  text-transform: none;
  cursor: pointer;
}

.equity-last-ref:hover,
.equity-last-ref:focus-visible {
  color: #101316;
  text-decoration: underline;
  outline: none;
}

.algo-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid #d5dad6;
  background: #d5dad6;
  gap: 1px;
}

.algo-stat-strip div {
  min-width: 0;
  padding: 11px 13px;
  background: #f7f8f6;
}

.algo-stat-strip span,
.algo-stat-strip strong,
.algo-stat-strip small {
  display: block;
}

.algo-stat-strip span {
  margin-bottom: 5px;
  color: #6a726e;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.algo-stat-strip strong {
  margin-bottom: 3px;
  font-family: "Courier New", monospace;
  font-size: 18px;
}

.algo-stat-strip small {
  overflow: hidden;
  color: #7a817d;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-portfolio-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 17px 0 10px;
  padding-top: 13px;
  border-top: 1px solid #d7dcd8;
  gap: 18px;
}

.latest-portfolio-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
}

.latest-portfolio-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  border-bottom: 1px solid #cfd5d1;
}

.latest-portfolio-tabs button {
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid #cfd5d1;
  border-bottom: 0;
  background: #f3f5f2;
  color: #636b67;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.latest-portfolio-tabs button.active {
  border-color: #101316;
  background: #101316;
  color: #fff;
}

.latest-portfolio-tabs span {
  display: inline-flex;
  min-width: 18px;
  height: 16px;
  margin-left: 5px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.latest-portfolio-pane {
  display: none;
}

.latest-portfolio-pane.active {
  display: block;
}

.trade-log-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 10px;
}

.trade-log-heading h3,
.trade-log-heading p {
  margin: 0;
}

.trade-log-heading h3 {
  font-size: 16px;
}

.trade-log-heading > p {
  color: #69716d;
  font-size: 9px;
  text-align: right;
}

.overview-trade-log-wrap {
  max-height: 565px;
  overflow: auto;
  border: 1px solid #cfd5d1;
}

.overview-trade-log-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9px;
}

.overview-trade-log-table th,
.overview-trade-log-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #dfe3e0;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}

.overview-trade-log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef1ee;
  color: #5f6863;
  font-size: 7px;
  text-transform: uppercase;
}

.overview-trade-log-table th:nth-child(1) { width: 82px; }
.overview-trade-log-table th:nth-child(2) { width: 68px; }
.overview-trade-log-table th:nth-child(3) { width: 78px; }
.overview-trade-log-table th:nth-child(4) { width: 330px; }
.overview-trade-log-table th:nth-child(5) { width: 185px; }
.overview-trade-log-table th:nth-child(6) { width: 70px; }
.overview-trade-log-table th:nth-child(7),
.overview-trade-log-table th:nth-child(8) { width: 105px; }
.overview-trade-log-table th:nth-child(9) { width: 70px; }
.overview-trade-log-table th:nth-child(10) { width: 145px; }

.overview-trade-log-table small {
  display: block;
  margin-top: 3px;
  color: #77807b;
  font-size: 7px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.overview-trade-log-table .trade-rationale-cell {
  color: #424946;
  line-height: 1.35;
}

.overview-trade-log-table .trade-rationale-cell span {
  display: -webkit-box;
  max-height: 34px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

.overview-trade-log-table td:nth-child(1),
.overview-trade-log-table td:nth-child(2),
.overview-trade-log-table td:nth-child(3),
.overview-trade-log-table td:nth-child(6),
.overview-trade-log-table td:nth-child(7),
.overview-trade-log-table td:nth-child(8),
.overview-trade-log-table td:nth-child(9) {
  white-space: nowrap;
}

.overview-trade-log-table .trade-trigger {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
}

.overview-trade-log-table .trade-trigger.warning {
  color: #b45309;
}

.overview-candidate-wrap {
  max-height: 430px;
  overflow: auto;
  border: 1px solid #cfd5d1;
  background: #fbfcfb;
}

.overview-candidate-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10px;
}

.overview-candidate-table th,
.overview-candidate-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e5e1;
  text-align: left;
  vertical-align: middle;
}

.overview-candidate-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef1ee;
  color: #5f6863;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-candidate-table tr {
  background:
    linear-gradient(90deg, rgba(8, 120, 95, 0.09), rgba(255, 255, 255, 0) 23%),
    #fff;
}

.overview-candidate-table tr.candidate-bearish {
  background:
    linear-gradient(90deg, rgba(182, 56, 47, 0.1), rgba(255, 255, 255, 0) 23%),
    #fff;
}

.overview-candidate-table tr.candidate-bullish td:first-child {
  border-left: 3px solid #08785f;
}

.overview-candidate-table tr.candidate-bearish td:first-child {
  border-left: 3px solid #b6382f;
}

.overview-candidate-table strong,
.overview-candidate-table small {
  display: block;
}

.overview-candidate-table small {
  margin-top: 3px;
  color: #747c78;
  font-family: "Courier New", monospace;
  font-size: 8px;
  line-height: 1.35;
}

.overview-candidate-table td:nth-child(6),
.overview-candidate-table td:nth-child(7),
.overview-candidate-table td:nth-child(8),
.overview-candidate-table td:nth-child(9),
.overview-candidate-table td:nth-child(10),
.overview-candidate-table td:nth-child(11) {
  font-family: "Courier New", monospace;
  white-space: nowrap;
}

.portfolio-mark-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.portfolio-mark-controls > span {
  color: #69716d;
  font-size: 10px;
  text-align: right;
}

.portfolio-mark-controls > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.refresh-pnl-button {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #101316;
  border-radius: 3px;
  background: #101316;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.refresh-pnl-button:hover:not(:disabled) {
  background: var(--brand-green);
  border-color: var(--brand-green);
}

.refresh-pnl-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

#liveMarkStatus {
  max-width: 235px;
  color: #69716d;
  font-size: 9px;
  text-align: right;
}

#liveMarkStatus.live {
  color: var(--brand-green);
  font-weight: 700;
}

#liveMarkStatus.error {
  color: var(--negative);
}

.latest-portfolio-button {
  min-height: 26px;
  margin-top: 7px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid #101316;
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
}

.portfolio-visual-grid {
  display: grid;
  grid-template-columns: minmax(540px, 1fr) minmax(275px, 0.44fr);
  gap: 14px;
  align-items: stretch;
}

.treemap-shell {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  border: 1px solid #d1d6d2;
}

.portfolio-treemap {
  position: relative;
  width: 100%;
  min-height: 555px;
  aspect-ratio: auto;
  overflow: hidden;
  background: #e8ece9;
  border: 0;
}

.snapshot-rail {
  min-height: 555px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-left: 1px solid #d1d6d2;
  background: #101316;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.snapshot-rail span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.snapshot-rail b {
  font-size: 22px;
  line-height: 1;
}

.snapshot-rail:hover:not(:disabled) {
  background: var(--brand-green);
}

.snapshot-rail:disabled {
  cursor: default;
  opacity: 0.35;
}

.snapshot-rail.loading b {
  opacity: 0.35;
}

.mini-benchmark {
  min-width: 0;
  padding: 14px;
  background: #f7f8f6;
  border: 1px solid #d1d6d2;
}

.strategy-analytics-column {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr 0.88fr;
  gap: 12px;
}

.mini-benchmark-header {
  min-height: 46px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mini-benchmark-header span,
.mini-benchmark-header strong {
  display: block;
}

.mini-benchmark-header span {
  margin-bottom: 3px;
  color: #6b736f;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.mini-benchmark-header strong {
  font-size: 14px;
}

.mini-benchmark-header small {
  max-width: 95px;
  color: #747c78;
  font-family: "Courier New", monospace;
  font-size: 8px;
  line-height: 1.35;
  text-align: right;
}

#overviewBenchmarkChart {
  height: 185px;
  border: 0;
  background: #f7f8f6;
}

.mini-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: #646c68;
  font-size: 9px;
}

.mini-chart-legend i {
  display: inline-block;
  width: 18px;
  margin-right: 5px;
  vertical-align: middle;
  border-top: 2px solid var(--brand-green);
}

.mini-chart-legend i.spy {
  border-top: 2px dashed #315c9b;
}

.mini-return-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #d8dcda;
  border: 1px solid #d8dcda;
}

.mini-return-grid div {
  padding: 9px;
  background: #fff;
}

.mini-return-grid span,
.mini-return-grid strong {
  display: block;
}

.mini-return-grid span {
  margin-bottom: 4px;
  color: #68706c;
  font-size: 8px;
  text-transform: uppercase;
}

.mini-return-grid strong {
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.mini-return-grid .benchmark-value {
  color: #315c9b;
}

.mini-monte-carlo {
  min-width: 0;
  padding: 14px;
  background: #f7f8f6;
  border: 1px solid #d1d6d2;
}

#overviewMonteCarloChart {
  height: 135px;
  border: 0;
  background: #f7f8f6;
}

.mini-mc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 5px;
  border: 1px solid #d8dcda;
  background: #d8dcda;
}

.mini-mc-stats div {
  min-width: 0;
  padding: 7px 8px;
  background: #fff;
}

.mini-mc-stats span,
.mini-mc-stats strong {
  display: block;
}

.mini-mc-stats span {
  margin-bottom: 3px;
  color: #727a76;
  font-size: 7px;
  text-transform: uppercase;
}

.mini-mc-stats strong {
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.allocation-basis {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid #d6dad7;
  border-bottom: 0;
  background: #f3f5f2;
  color: #626b66;
  font-family: "Courier New", monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.allocation-basis strong {
  color: #101316;
}

.allocation-basis span {
  padding-left: 9px;
  border-left: 1px solid #c8cdca;
}

.treemap-loading,
.treemap-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 36px;
  text-align: center;
  color: #68706c;
}

.treemap-empty strong {
  max-width: 420px;
  color: #202622;
  font-size: 18px;
}

.treemap-tile {
  position: absolute;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(12px, 1.3vw, 20px);
  border: 3px solid #fff;
  color: #fff;
  text-decoration: none;
  text-align: left;
  font-family: Arial, Helvetica, sans-serif;
  transition: filter 160ms ease, transform 160ms ease;
}

.treemap-tile.bullish {
  background: #176f5b;
}

.treemap-tile.bearish {
  background: #a94640;
}

.treemap-tile:hover,
.treemap-tile:focus-visible {
  z-index: 6;
  filter: brightness(1.08);
  outline: 2px solid #101316;
  outline-offset: -5px;
}

.treemap-tile.compact .tile-strategy,
.treemap-tile.compact .tile-trade,
.treemap-tile.compact .tile-underlying,
.treemap-tile.compact .tile-risk {
  display: none;
}

.treemap-tile.compact .tile-topline em {
  display: inline-block;
  padding: 3px 5px;
  font-size: 9px;
}

.tile-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.tile-topline b {
  font-size: clamp(23px, 2vw, 36px);
  line-height: 1;
}

.tile-topline em {
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.16);
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.tile-topline em.loss {
  background: rgba(54, 0, 0, 0.28);
}

.tile-direction,
.tile-strategy,
.tile-trade,
.tile-underlying,
.tile-risk {
  display: block;
}

.tile-direction {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.78;
}

.tile-strategy {
  margin-top: 3px;
  font-size: clamp(12px, 1vw, 16px);
  font-weight: 700;
}

.tile-trade {
  margin-top: 22px;
  font-family: "Courier New", monospace;
  font-size: clamp(10px, 0.8vw, 12px);
  line-height: 1.45;
  opacity: 0.9;
}

.tile-underlying {
  margin-top: 8px;
  font-family: "Courier New", monospace;
  font-size: clamp(10px, 0.75vw, 11px);
  line-height: 1.35;
  opacity: 0.86;
}

.tile-risk {
  position: absolute;
  left: clamp(12px, 1.3vw, 20px);
  bottom: clamp(12px, 1.3vw, 20px);
  font-family: "Courier New", monospace;
  font-size: 10px;
  opacity: 0.78;
}

.tile-finviz-preview {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: min(360px, calc(100% - 20px));
  max-width: calc(100% - 20px);
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 32px rgba(16, 19, 22, 0.24);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.tile-finviz-preview img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 120px;
  background: #f2f4f2;
}

.tile-finviz-preview small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #303934;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treemap-tile:hover .tile-finviz-preview,
.treemap-tile:focus-visible .tile-finviz-preview {
  opacity: 1;
  transform: translateY(0);
}

.treemap-tile.compact .tile-finviz-preview {
  display: none;
}

.portfolio-totals {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-right: 1px solid #d6dad7;
  border-bottom: 1px solid #d6dad7;
}

.portfolio-totals div {
  padding: 13px 14px;
  border-left: 1px solid #d6dad7;
}

.portfolio-totals span,
.portfolio-totals strong,
.portfolio-totals small {
  display: block;
}

.sector-comparison {
  margin-top: 18px;
  border-top: 1px solid #cfd4d0;
  border-bottom: 1px solid #cfd4d0;
  padding: 16px 0 13px;
}

.sector-comparison-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.sector-comparison-header h3 {
  margin: 0;
  font-size: 17px;
}

.sector-comparison-header > span {
  color: #727a76;
  font-family: "Courier New", monospace;
  font-size: 8px;
  text-align: right;
}

.risk-comparison-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #cfd4d0;
}

.risk-comparison-tabs button {
  min-width: 105px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid #d6dad7;
  background: #f2f4f1;
  color: #5d6661;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

.risk-comparison-tabs button.active {
  background: #101514;
  color: #fff;
}

.sector-table-wrap {
  max-height: 245px;
  overflow: auto;
  border: 1px solid #d6dad7;
}

.sector-comparison table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
}

.sector-comparison th,
.sector-comparison td {
  padding: 7px 9px;
  border-bottom: 1px solid #e0e4e1;
  text-align: right;
}

.sector-comparison th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2f4f1;
  color: #68706c;
  font-size: 8px;
  text-transform: uppercase;
}

.sector-comparison th:first-child,
.sector-comparison td:first-child {
  text-align: left;
}

.sector-comparison > p {
  margin-top: 8px;
  color: #737b77;
  font-size: 9px;
  line-height: 1.4;
}

.sector-exposure {
  position: relative;
  min-width: 90px;
  height: 18px;
  overflow: hidden;
  background: #e8ece9;
}

.sector-exposure i {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(8, 120, 95, 0.25);
}

.sector-exposure span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 3px 5px;
  color: #16392f;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
}

.factor-tilt {
  position: relative;
  min-width: 100px;
  height: 18px;
  overflow: hidden;
  background: #e8ece9;
}

.factor-tilt i {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(8, 120, 95, 0.28);
}

.factor-tilt.negative-tilt i {
  background: rgba(185, 69, 61, 0.28);
}

.factor-tilt span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 3px 5px;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
}

.sector-comparison .overweight {
  color: #955029;
  font-weight: 700;
}

.sector-comparison .underweight {
  color: #315c9b;
}

.portfolio-totals span {
  margin-bottom: 5px;
  color: #69716d;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.portfolio-totals strong {
  font-family: "Courier New", monospace;
  font-size: 16px;
}

.portfolio-totals small {
  margin-top: 4px;
  color: #747c78;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.showcase-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
}

.showcase-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.secondary-overview-action {
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #aeb5b1;
  background: #fff;
  color: #252a27;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
}

.showcase-footer p {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #69716d;
  font-size: 11px;
  text-transform: uppercase;
}

.legend-dot {
  width: 9px;
  height: 9px;
  margin-left: 8px;
}

.legend-dot:first-child {
  margin-left: 0;
}

.legend-dot.bullish {
  background: #176f5b;
}

.legend-dot.bearish {
  background: #a94640;
}

.primary-action {
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--brand-black);
  background: var(--brand-black);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

.primary-action span {
  display: inline-block;
  margin-left: 12px;
}

.overview-footer {
  min-height: 54px;
  padding: 14px clamp(24px, 4vw, 72px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-top: 1px solid #d9ddda;
  color: #68706c;
  font-size: 10px;
  text-transform: uppercase;
}

.overview-footer span:last-child {
  text-align: right;
}

.hyper-page {
  min-height: 100vh;
  background: #f4f6f5;
  color: #101316;
  font-family: Arial, Helvetica, sans-serif;
}

.hyper-nav {
  position: sticky;
  top: 0;
  z-index: 15;
}

.hyper-shell {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.hyper-hero,
.hyper-panel-head,
.hyper-signal-grid,
.hyper-return-grid,
.hyper-market-grid {
  display: grid;
  gap: 16px;
}

.hyper-hero {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  margin-bottom: 16px;
}

.hyper-hero h1 {
  margin: 6px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3.3vw, 48px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: 0;
  max-width: 980px;
}

.hyper-lede {
  max-width: 780px;
  margin: 0;
  color: #4f5753;
  font-size: 16px;
  line-height: 1.55;
}

.hyper-asset-tabs,
.hyper-range-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid #d8ddd9;
  background: #fff;
}

.hyper-asset-tabs {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.hyper-asset-tabs button,
.hyper-range-tabs button {
  min-width: 56px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #4f5753;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.hyper-asset-tabs button.active,
.hyper-range-tabs button.active {
  background: #101316;
  color: #fff;
}

.hyper-signal-grid {
  grid-template-columns: minmax(240px, 0.85fr) repeat(2, minmax(190px, 1fr));
  margin-bottom: 16px;
}

.hyper-score-card,
.hyper-flow-card,
.hyper-panel {
  background: #fff;
  border: 1px solid #d9ddda;
}

.hyper-score-card,
.hyper-flow-card {
  min-height: 164px;
  padding: 18px;
}

.hyper-score-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(56px, 6vw, 94px);
  line-height: 0.9;
  font-weight: 800;
}

.hyper-score-card b {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  text-transform: uppercase;
}

.hyper-score-card small,
.hyper-flow-card small,
.hyper-note {
  color: #646c68;
  font-size: 12px;
  line-height: 1.45;
}

.hyper-flow-card span,
.hyper-return-grid span {
  display: block;
  color: #646c68;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hyper-flow-card strong {
  display: block;
  margin: 18px 0 8px;
  font-size: 38px;
}

.hyper-panel {
  padding: 18px;
  margin-top: 16px;
}

.hyper-panel-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 16px;
}

.hyper-panel-head h2,
.hyper-methodology h2 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
}

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

.hyper-market-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.hyper-research-grid {
  margin-top: 10px;
}

.hyper-return-grid div,
.hyper-market-grid div {
  border: 1px solid #e1e5e2;
  background: #f8faf8;
  padding: 16px;
}

.hyper-return-grid strong,
.hyper-market-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.hyper-market-grid strong {
  font-size: 24px;
}

.hyper-research-grid strong {
  font-size: 20px;
  line-height: 1.2;
}

.hyper-chart {
  width: 100%;
  height: 320px;
  display: block;
  border: 1px solid #e1e5e2;
  background: #fbfcfb;
}

.hyper-table-wrap {
  overflow: auto;
  border: 1px solid #e1e5e2;
}

.hyper-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #fff;
}

.hyper-table th,
.hyper-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e7ebe8;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}

.hyper-table th {
  color: #68706c;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 10px;
}

.hyper-table button {
  border: 0;
  background: transparent;
  border-bottom: 1px solid #101316;
  padding: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.hyper-market-table-wrap .hyper-table {
  min-width: 760px;
}

.hyper-quality-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.1fr);
  gap: 16px;
  align-items: stretch;
}

.hyper-score-histogram {
  min-height: 230px;
  display: grid;
  grid-template-columns: repeat(10, minmax(34px, 1fr));
  gap: 8px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid #e1e5e2;
  background: #f8faf8;
}

.hyper-score-histogram article {
  min-width: 0;
  height: 196px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  align-items: stretch;
  text-align: center;
}

.hyper-score-histogram span {
  color: #68706c;
  font-size: 10px;
  font-weight: 800;
}

.hyper-score-histogram i {
  display: block;
  width: 100%;
  min-height: 4px;
  flex: 0 0 auto;
  background: #c7cfcb;
}

.hyper-score-histogram article.tracked i {
  background: #08785f;
}

.hyper-score-histogram article.untracked i {
  background: #c0392b;
}

.hyper-score-histogram strong {
  font-size: 13px;
}

.hyper-wallet-quality-table {
  min-width: 620px;
}

.hyper-wallet-quality-table strong,
.hyper-wallet-quality-table small {
  display: block;
}

.hyper-wallet-quality-table small {
  margin-top: 2px;
  color: #68706c;
  font-size: 10px;
}

.hyper-flow-board {
  margin-top: 0;
}

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

.hyper-signal-cards article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e1e5e2;
  background: #f8faf8;
}

.hyper-signal-cards article.bullish {
  border-left: 4px solid #08785f;
}

.hyper-signal-cards article.bearish {
  border-left: 4px solid #c0392b;
}

.hyper-signal-cards button {
  border: 0;
  border-bottom: 1px solid #101316;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.hyper-signal-cards strong {
  display: block;
  margin-top: 8px;
  font-size: 38px;
  line-height: 1;
}

.hyper-signal-cards span,
.hyper-signal-cards small {
  display: block;
}

.hyper-signal-cards span {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hyper-signal-cards small {
  margin-top: 8px;
  color: #646c68;
  font-size: 11px;
  line-height: 1.35;
}

.hyper-pressure-bars {
  display: flex;
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  background: #e5e9e6;
}

.hyper-pressure-bars i,
.hyper-pressure-bars b {
  display: block;
  min-width: 2px;
}

.hyper-pressure-bars i {
  background: #08785f;
}

.hyper-pressure-bars b {
  background: #c0392b;
}

.hyper-stream-table {
  min-width: 980px;
}

.hyper-flow-summary {
  display: grid;
  grid-template-columns: minmax(560px, 1.05fr) minmax(360px, 0.95fr);
  gap: 16px;
  margin-bottom: 18px;
}

.hyper-flow-summary section {
  min-width: 0;
}

.hyper-flow-summary h3,
.hyper-stream-heading h3 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

.hyper-flow-table {
  min-width: 720px;
}

.hyper-flow-row td:first-child {
  border-left: 4px solid transparent;
}

.hyper-flow-row.bullish td:first-child {
  border-left-color: #08785f;
}

.hyper-flow-row.bearish td:first-child {
  border-left-color: #c0392b;
}

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

.hyper-flow-row small {
  margin-top: 2px;
  color: #68706c;
  font-size: 10px;
}

.hyper-sector-tree {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 238px;
  align-content: stretch;
}

.hyper-sector-tree article {
  min-width: 150px;
  flex: 1 1 180px;
  padding: 12px;
  border: 1px solid #e1e5e2;
  background: #f8faf8;
}

.hyper-sector-tree article.bullish {
  border-top: 4px solid #08785f;
}

.hyper-sector-tree article.bearish {
  border-top: 4px solid #c0392b;
}

.hyper-sector-tree strong,
.hyper-sector-tree span,
.hyper-sector-tree small {
  display: block;
}

.hyper-sector-tree strong {
  font-size: 14px;
}

.hyper-sector-tree span {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
}

.hyper-sector-tree small {
  margin-top: 8px;
  color: #68706c;
  font-size: 10px;
  line-height: 1.35;
}

.hyper-stream-heading {
  margin-top: 4px;
}

.hyper-stream-row td:first-child {
  border-left: 4px solid transparent;
}

.hyper-stream-row.bullish td:first-child {
  border-left-color: #08785f;
}

.hyper-stream-row.bearish td:first-child {
  border-left-color: #c0392b;
}

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

.hyper-stream-row small {
  margin-top: 2px;
  color: #68706c;
  font-size: 10px;
}

.hyper-methodology p {
  max-width: 940px;
  color: #4f5753;
  line-height: 1.58;
}

.overview-trade-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 24px;
  font-family: Arial, Helvetica, sans-serif;
}

.overview-trade-modal.open {
  display: grid;
}

.portfolio-history-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: none;
  font-family: Arial, Helvetica, sans-serif;
}

.portfolio-history-modal.open {
  display: block;
}

.portfolio-history-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 11, 0.45);
}

.portfolio-history-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 35vw;
  min-width: 520px;
  max-width: 720px;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid #101316;
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.18);
}

.portfolio-history-drawer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid #d4d9d5;
}

.portfolio-history-drawer h2 {
  margin: 0;
  font-size: 26px;
}

.portfolio-history-body {
  padding: 18px 20px 30px;
  overflow: auto;
}

.history-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid #d8dcda;
  background: #d8dcda;
}

.history-summary-grid div {
  min-width: 0;
  padding: 12px;
  background: #f5f7f4;
}

.history-summary-grid span,
.history-summary-grid strong {
  display: block;
}

.history-summary-grid span {
  margin-bottom: 5px;
  color: #707873;
  font-size: 8px;
  text-transform: uppercase;
}

.history-summary-grid strong {
  font-family: "Courier New", monospace;
  font-size: 17px;
}

.history-drawer-section {
  margin-top: 24px;
}

.history-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.history-section-heading h3 {
  margin: 0;
  font-size: 15px;
}

.history-section-heading span {
  color: #747c78;
  font-size: 9px;
}

.history-table-wrap {
  overflow: auto;
  border: 1px solid #d8dcda;
}

.trade-ledger-wrap {
  max-height: 52vh;
}

.history-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.history-table-wrap th,
.history-table-wrap td {
  padding: 8px;
  border-bottom: 1px solid #e1e4e2;
  text-align: right;
  vertical-align: top;
}

.history-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2f4f1;
  color: #69716d;
  font-size: 7px;
  text-transform: uppercase;
}

.history-table-wrap th:first-child,
.history-table-wrap td:first-child {
  text-align: left;
}

.history-table-wrap small {
  display: block;
  margin-top: 3px;
  color: #777f7b;
  font-size: 7px;
}

.overview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 11, 0.62);
}

.overview-modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border: 1px solid #151918;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
}

.overview-modal-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid #d5d9d6;
}

.overview-modal-card h2 {
  margin: 0;
  font-size: 28px;
}

.overview-modal-close {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #101316;
  color: #fff;
  border: 0;
}

.overview-modal-body {
  padding: 24px;
}

.refresh-log-card {
  width: min(760px, 100%);
}

.refresh-log-tabs {
  display: inline-flex;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid #d7dbd6;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f8f6;
}

.refresh-log-tabs button {
  appearance: none;
  border: 0;
  border-right: 1px solid #d7dbd6;
  padding: 9px 13px;
  background: transparent;
  color: #58615c;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.refresh-log-tabs button:last-child {
  border-right: 0;
}

.refresh-log-tabs button.active {
  background: #101316;
  color: #fff;
}

.refresh-log-pane {
  display: none;
}

.refresh-log-pane.active {
  display: block;
}

.refresh-log-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.refresh-log-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.3fr) minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e0e3df;
}

.refresh-log-row:last-child {
  border-bottom: 0;
}

.refresh-log-row time {
  color: #101316;
  font-size: 12px;
  font-weight: 800;
}

.refresh-log-row strong {
  display: block;
  font-size: 13px;
}

.refresh-log-row small {
  display: block;
  margin-top: 3px;
  color: #69716d;
  font-size: 11px;
  line-height: 1.35;
}

.job-run-list {
  display: grid;
  gap: 0;
  border-top: 1px solid #e0e3df;
}

.job-run-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto minmax(112px, auto);
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #e0e3df;
}

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

.job-run-row strong {
  font-size: 13px;
}

.job-run-row small,
.job-run-row time {
  color: #69716d;
  font-size: 11px;
}

.job-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8a918d;
}

.job-status-dot.success {
  background: #0f8b6f;
}

.job-status-dot.fail {
  background: #c5322f;
}

.job-status-pill {
  min-width: 70px;
  padding: 5px 8px;
  border: 1px solid #cfd5d0;
  border-radius: 999px;
  color: #59625d;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.job-status-pill.success {
  border-color: #0f8b6f;
  color: #0f8b6f;
}

.job-status-pill.fail {
  border-color: #c5322f;
  color: #c5322f;
}

.study-method-intro {
  max-width: 580px;
  margin: 0 0 18px;
  color: #59625e;
  font-size: 13px;
  line-height: 1.55;
}

.study-method-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: method-step;
}

.study-method-steps li {
  display: grid;
  grid-template-columns: 28px 118px minmax(0, 1fr);
  align-items: baseline;
  padding: 9px 0;
  border-top: 1px solid #e1e4e2;
  counter-increment: method-step;
  gap: 8px;
}

.study-method-steps li::before {
  content: counter(method-step, decimal-leading-zero);
  color: #00866a;
  font: 700 10px/1 "Courier New", monospace;
}

.study-method-steps strong {
  color: #151918;
  font-size: 12px;
}

.study-method-steps span {
  color: #59625e;
  font-size: 11px;
  line-height: 1.45;
}

.overview-trade-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #d8dcda;
  border: 1px solid #d8dcda;
}

.overview-trade-stats div {
  min-width: 0;
  padding: 14px;
  background: #f7f8f6;
}

.overview-trade-stats span,
.overview-trade-stats strong,
.overview-trade-stats small {
  display: block;
}

.overview-trade-stats span {
  margin-bottom: 7px;
  color: #6b736f;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.overview-trade-stats strong {
  margin-bottom: 5px;
  font-size: 15px;
}

.overview-trade-stats small {
  overflow: hidden;
  color: #69716d;
  font-family: "Courier New", monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.underlying-trade-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) 22px minmax(0, 1fr);
  align-items: stretch;
  margin-top: 10px;
  border: 1px solid #d8dcda;
  background: #fff;
}

.underlying-trade-path > div {
  min-width: 0;
  padding: 11px 13px;
}

.underlying-trade-path > i {
  display: grid;
  place-items: center;
  color: #78807c;
  font-family: "Courier New", monospace;
  font-size: 15px;
  font-style: normal;
}

.underlying-trade-path span,
.underlying-trade-path strong,
.underlying-trade-path small {
  display: block;
}

.underlying-trade-path span {
  margin-bottom: 5px;
  color: #6b736f;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.underlying-trade-path strong {
  margin-bottom: 4px;
  font-family: "Courier New", monospace;
  font-size: 16px;
}

.underlying-trade-path small {
  color: #727a76;
  font-size: 9px;
  line-height: 1.35;
}

.overview-price-history {
  margin-top: 18px;
  padding: 16px;
  background: #f7f8f6;
  border: 1px solid #d5dad6;
}

.overview-price-history > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.overview-price-history h3 {
  margin: 0;
  font-size: 18px;
}

.overview-price-history > header > span {
  color: #737b77;
  font-family: "Courier New", monospace;
  font-size: 8px;
  text-align: right;
}

#overviewTradePriceChart {
  height: 250px;
  border: 0;
  background: #f7f8f6;
}

.overview-price-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  color: #68706c;
  font-size: 9px;
  text-transform: uppercase;
}

.overview-price-legend i {
  display: inline-grid;
  place-items: center;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
  background: #08785f;
}

.overview-price-legend i.exit {
  background: #b9453d;
}

.overview-price-legend i.strike {
  width: 17px;
  height: 0;
  border-radius: 0;
  border-top: 1px dashed #9b6b1f;
  background: transparent;
}

.overview-rationale {
  padding: 26px 0;
}

.overview-rationale h3 {
  max-width: 620px;
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 1.3;
}

.overview-rationale ul {
  margin: 0;
  padding-left: 19px;
  color: #525a56;
  font-size: 13px;
  line-height: 1.55;
}

.overview-rationale li + li {
  margin-top: 8px;
}

.raw-trend-score-button {
  padding: 0;
  border: 0;
  border-bottom: 1px dotted #176f5b;
  background: transparent;
  color: #176f5b;
  font: inherit;
  font-weight: 700;
}

.raw-trend-score-button:hover,
.raw-trend-score-button:focus-visible {
  border-bottom-style: solid;
  color: #0d4f41;
  outline: none;
}

.raw-trend-score-button::after {
  content: " +";
  font-family: "Courier New", monospace;
}

.raw-trend-score-button[aria-expanded="true"]::after {
  content: " -";
}

.raw-trend-disclosure {
  margin-top: 16px;
  padding: 16px 0 4px 16px;
  border-top: 1px solid #d8dcda;
  border-left: 3px solid #176f5b;
}

.raw-trend-disclosure[hidden] {
  display: none;
}

.raw-trend-disclosure-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.raw-trend-disclosure-header span,
.raw-trend-disclosure-header strong {
  display: block;
}

.raw-trend-disclosure-header span {
  margin-bottom: 3px;
  color: #68706c;
  font-size: 9px;
  text-transform: uppercase;
}

.raw-trend-disclosure-header strong {
  font-size: 15px;
}

.raw-trend-disclosure-header b {
  font-family: "Courier New", monospace;
  font-size: 16px;
}

.raw-trend-formula {
  margin: 12px 0;
  padding: 9px 10px;
  background: #eef3f0;
  font-family: "Courier New", monospace;
  font-size: 11px;
  line-height: 1.45;
}

.raw-trend-disclosure dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #d8dcda;
  border-left: 1px solid #d8dcda;
}

.raw-trend-disclosure dl > div {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid #d8dcda;
  border-bottom: 1px solid #d8dcda;
}

.raw-trend-disclosure dt {
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 700;
}

.raw-trend-disclosure dd {
  margin: 0;
  color: #5e6762;
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.raw-trend-gates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.raw-trend-gates p,
.raw-trend-note {
  margin: 0;
  color: #4f5753;
  font-size: 11px;
  line-height: 1.5;
}

.raw-trend-note {
  margin-top: 12px;
}

.overview-trade-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #d8dcda;
}

.overview-trade-footer span {
  padding: 6px 8px;
  background: #eff2ef;
  color: #4f5753;
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.return-overview {
  margin-right: 14px;
}

@media (max-width: 1240px) {
  .overview-main {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .overview-story {
    max-width: 900px;
  }

  .strategy-sequence {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #d4d9d5;
  }

  .strategy-sequence article {
    grid-template-columns: 28px 1fr;
    border-right: 1px solid #d4d9d5;
  }

  .strategy-sequence article:last-child {
    border-right: 0;
  }

  .portfolio-visual-grid {
    grid-template-columns: minmax(480px, 1fr) minmax(240px, 0.38fr);
  }
}

@media (max-width: 720px) {
  html,
  body,
  .overview-page {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .overview-nav {
    min-height: 64px;
    padding: 10px 16px;
  }

  .latest-portfolio-heading,
  .trade-log-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .trade-log-heading > p {
    text-align: left;
  }

  .overview-trade-log-wrap {
    max-height: 66vh;
  }

  .company-brand {
    width: 205px;
  }

  .nav-status,
  #openBacktestTopButton {
    display: none;
  }

  .text-action {
    font-size: 11px;
  }

  .overview-main {
    display: block;
    width: 100%;
    max-width: 100vw;
    padding: 34px 16px;
  }

  .overview-main > *,
  .overview-story,
  .portfolio-showcase {
    width: calc(100vw - 32px);
    min-width: 0;
    max-width: calc(100vw - 32px);
  }

  .portfolio-showcase {
    margin-top: 38px;
  }

  .overview-copy,
  .strategy-sequence p {
    overflow-wrap: anywhere;
  }

  .overview-story h1 {
    font-size: 64px;
  }

  .overview-lede {
    font-size: 24px;
  }

  .strategy-sequence {
    display: block;
  }

  .strategy-sequence article {
    border-right: 0;
  }

  .portfolio-showcase {
    padding: 14px;
  }

  .algo-suite {
    margin: -14px -14px 18px;
  }

  .algo-suite-heading {
    padding: 11px 14px 8px;
  }

  .algo-tabs {
    grid-template-columns: repeat(4, 132px);
    padding: 0 14px;
    overflow-x: auto;
  }

  .showcase-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
  }

  .showcase-summary strong {
    font-size: 20px;
  }

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

  .latest-portfolio-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .latest-portfolio-heading > span {
    text-align: left;
  }

  .study-method-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .study-method-steps li {
    grid-template-columns: 24px minmax(90px, 0.35fr) minmax(0, 1fr);
  }

  .portfolio-treemap {
    min-height: 420px;
    aspect-ratio: auto;
  }

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

  .treemap-shell {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .snapshot-rail {
    min-height: 460px;
  }

  #overviewBenchmarkChart {
    height: 220px;
  }

  .portfolio-treemap {
    min-height: 460px;
  }

  .allocation-basis {
    align-items: flex-start;
    flex-direction: column;
  }

  .allocation-basis span {
    padding: 0;
    border-left: 0;
  }

  .sector-comparison-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .showcase-actions {
    width: 100%;
    flex-direction: column;
  }

  .secondary-overview-action {
    width: 100%;
  }

  .portfolio-history-drawer {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .raw-trend-disclosure dl,
  .raw-trend-gates {
    grid-template-columns: 1fr;
  }

  .tile-strategy,
  .tile-risk {
    display: none;
  }

  .tile-topline {
    display: block;
  }

  .tile-topline em {
    display: inline-block;
    margin-top: 7px;
  }

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

  .showcase-footer,
  .overview-footer {
    align-items: stretch;
  }

  .showcase-footer {
    flex-direction: column;
  }

  .primary-action {
    width: 100%;
  }

  .overview-footer {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .overview-footer p,
  .overview-footer span:last-child {
    text-align: left;
  }

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

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

  .underlying-trade-path > i {
    min-height: 18px;
    transform: rotate(90deg);
  }

  .overview-price-history {
    padding: 10px;
  }

  #overviewTradePriceChart {
    height: 220px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.shell {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(620px, 1fr) minmax(320px, 480px);
  min-height: 100vh;
  gap: 10px;
  padding: 12px;
}

.panel,
.chart-panel,
.table-panel {
  background: var(--panel);
  border: 2px solid var(--line);
}

.panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.methodology-panel,
.backtest-panel {
  border-color: #e6a100;
}

.center-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topline,
.panel-header,
.section-title,
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-control {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

select,
button {
  font-family: inherit;
  border: 1px solid var(--line);
  background: #f4f1eb;
  color: var(--ink);
  padding: 7px 9px;
  min-height: 32px;
}

button {
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.topline {
  min-height: 72px;
  padding: 4px 8px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--line);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.badge.light {
  background: #f1eee8;
  color: var(--ink);
}

label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin: 14px 0;
}

input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--accent);
}

.compact-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.65;
  font-size: 14px;
}

.small-copy {
  font-size: 14px;
  line-height: 1.55;
  color: #2d2a27;
}

.build-flow {
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.35;
}

.tree-node {
  border-top: 1px solid var(--soft-line);
  padding-top: 7px;
}

.tree-node:first-child {
  border-top: 0;
  padding-top: 0;
}

.tree-node details {
  margin-top: 6px;
  margin-left: 14px;
  border-left: 1px solid var(--soft-line);
  padding-left: 10px;
}

.tree-title {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
  list-style: none;
}

.tree-title::-webkit-details-marker {
  display: none;
}

.tree-title::after {
  content: "+";
  order: 3;
  margin-left: auto;
  color: #fff;
  font-weight: 700;
  background: var(--line);
  border: 1px solid var(--line);
  width: 18px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  flex: 0 0 auto;
}

details[open] > .tree-title::after {
  content: "-";
}

.tree-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 20px;
  border: 1px solid var(--line);
  background: var(--line);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  flex: 0 0 auto;
}

.tree-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.tree-copy strong {
  display: inline;
  font-size: 13px;
  margin-right: 6px;
}

.tree-copy span {
  color: var(--muted);
  display: inline;
}

.tree-leaf {
  margin: 6px 0 0 44px;
  color: var(--muted);
}

.tree-leaf b {
  color: var(--ink);
}

.build-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.build-chips em {
  font-style: normal;
  border: 1px solid var(--soft-line);
  background: #f4f1eb;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 700;
}

.last-updated {
  text-align: right;
  font-size: 12px;
}

.last-updated span {
  display: block;
  color: var(--muted);
}

.chart-panel {
  padding: 14px;
}

.chart-header p {
  color: var(--muted);
  font-size: 13px;
}

.chart-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chart-stats span {
  border: 1px solid var(--soft-line);
  padding: 6px 8px;
  font-size: 12px;
  background: #f4f1eb;
}

canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  background: #fbfaf7;
  border: 1px solid var(--soft-line);
}

#equityChart {
  height: 380px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.legend-line {
  display: inline-block;
  width: 28px;
  height: 0;
  margin-right: 6px;
  vertical-align: middle;
  border-top: 3px solid var(--green);
}

.legend-line.base {
  border-top: 2px dashed #777;
}

.legend-line.spy {
  border-top: 2px dashed #345995;
}

.legend-line.sandbox {
  border-top-color: var(--accent);
}

.legend-line.mc-median {
  border-top-color: var(--green);
}

.legend-band {
  display: inline-block;
  width: 28px;
  height: 9px;
  margin-right: 6px;
  vertical-align: middle;
  background: rgba(12, 137, 106, 0.18);
  border: 1px solid rgba(12, 137, 106, 0.3);
}

.chart-legend.tight {
  margin-bottom: 10px;
}

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

.cumulative-grid {
  margin-top: -2px;
}

.cumulative-grid article {
  background: #fff8e8;
}

.metrics-grid.single {
  grid-template-columns: 1fr 1fr;
}

.risk-lab {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin: 12px 0;
}

.section-title.compact {
  margin-bottom: 8px;
}

.section-title.compact h2 {
  font-size: 22px;
}

.status-pill {
  border: 1px solid var(--line);
  background: #fff8e8;
  color: var(--muted);
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

#monteCarloChart {
  height: 215px;
}

.risk-grid {
  margin: 10px 0;
}

.risk-grid article {
  min-height: 60px;
  padding: 10px;
}

.risk-grid strong {
  font-size: 18px;
}

.stress-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
}

.stress-table th,
.stress-table td {
  border-bottom: 1px solid var(--soft-line);
  padding: 7px 4px;
  text-align: right;
}

.stress-table th:first-child,
.stress-table td:first-child {
  text-align: left;
}

.risk-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 8px;
}

.metrics-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px;
  min-height: 70px;
}

.metrics-grid span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.metrics-grid strong {
  font-size: 22px;
}

.metric-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  text-transform: uppercase;
  cursor: pointer;
}

.metric-link:hover {
  background: var(--ink);
  color: #fff;
}

.strike-attribution-panel {
  display: grid;
  gap: 12px;
}

.strike-analytics-tabs {
  margin-bottom: 0;
}

.strike-tab-pane.active {
  gap: 10px;
}

.panel-copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.strike-bridge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.strike-bridge-grid article {
  border: 1px solid var(--soft-line);
  background: #fbfaf7;
  padding: 10px;
  min-height: 62px;
}

.strike-bridge-grid span,
.strike-bucket-card th,
.strike-bucket-card td {
  font-size: 12px;
}

.strike-bridge-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  text-transform: uppercase;
}

.strike-bridge-grid strong {
  font-size: 21px;
}

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

.strike-flow-card,
.strike-bucket-card {
  border: 1px solid var(--soft-line);
  background: #fffdfa;
  padding: 10px;
}

.strike-flow-card h3,
.strike-bucket-card h3 {
  margin: 0 0 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.strike-flow-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(90px, 1fr) 78px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--soft-line);
}

.strike-flow-row:first-of-type {
  border-top: 0;
}

.strike-flow-label {
  min-width: 0;
}

.strike-flow-label strong {
  display: block;
  font-size: 12px;
}

.strike-flow-label span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.strike-flow-track {
  height: 10px;
  background: #ece7de;
  border: 1px solid #ddd5ca;
  overflow: hidden;
}

.strike-flow-track i {
  display: block;
  height: 100%;
}

.strike-flow-track i.gain {
  background: var(--green);
}

.strike-flow-track i.loss {
  background: var(--red);
}

.strike-flow-row > strong {
  text-align: right;
  font-size: 13px;
}

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

.strike-bucket-card table {
  width: 100%;
  border-collapse: collapse;
}

.strike-bucket-card th,
.strike-bucket-card td {
  border-top: 1px solid var(--soft-line);
  padding: 7px 4px;
  text-align: right;
}

.strike-bucket-card th:first-child,
.strike-bucket-card td:first-child {
  text-align: left;
}

.strike-path-panel {
  border: 1px solid var(--line);
  background: #fbfaf7;
  padding: 12px;
}

.strike-path-panel .section-title {
  margin-bottom: 10px;
}

.strike-path-panel .section-title h2 {
  font-size: 19px;
  margin-bottom: 4px;
}

.strike-path-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 10px;
}

.strike-path-card {
  border: 1px solid var(--soft-line);
  background: var(--panel);
  padding: 10px;
  min-width: 0;
}

.strike-path-card h3 {
  margin: 0 0 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.strike-path-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.85fr) minmax(90px, 0.55fr) 82px;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--soft-line);
}

.strike-path-row:first-of-type {
  border-top: 0;
}

.strike-path-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.strike-path-chain span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 7px;
  border: 1px solid var(--soft-line);
  background: #f4f1eb;
  font-size: 11px;
  font-weight: 700;
}

.strike-path-chain span:not(:last-child)::after {
  content: ">";
  margin-left: 7px;
  color: var(--muted);
}

.strike-path-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
}

.strike-path-metrics span {
  border: 1px solid var(--soft-line);
  background: #fffdfa;
  padding: 2px 5px;
}

.strike-path-track {
  height: 12px;
  background: #ece7de;
  border: 1px solid #ddd5ca;
  overflow: hidden;
}

.strike-path-track i {
  display: block;
  height: 100%;
}

.strike-path-track i.gain {
  background: var(--green);
}

.strike-path-track i.loss {
  background: var(--red);
}

.strike-path-row > strong {
  text-align: right;
  font-size: 13px;
}

.table-panel {
  padding: 14px;
}

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

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  white-space: nowrap;
}

th {
  font-size: 11px;
  text-transform: uppercase;
}

tfoot td {
  border-top: 2px solid var(--line);
  border-bottom: 0;
  background: #f4f1eb;
  font-weight: 700;
}

.table-footer-row .muted {
  font-weight: 400;
  font-size: 11px;
}

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

.negative {
  color: var(--red);
  font-weight: 700;
}

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

.log-list,
.event-list {
  display: grid;
  gap: 8px;
}

.log-item,
.event-item {
  border-top: 1px solid var(--soft-line);
  padding-top: 8px;
  font-size: 13px;
}

.log-item strong,
.event-item strong {
  display: block;
  margin-bottom: 4px;
}

.subsection-title {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--soft-line);
}

.ledger {
  margin: 0;
  display: grid;
  gap: 8px;
}

.ledger div,
.param-readout div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--soft-line);
  padding-bottom: 8px;
}

.ledger dt,
.param-readout dt {
  color: var(--muted);
}

.ledger dd,
.param-readout dd {
  margin: 0;
  font-weight: 700;
}

.param-readout {
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.notice {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--soft-line);
  background: #f4f1eb;
  color: var(--muted);
  font-size: 12px;
}

.detail-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
}

.detail-modal.open {
  display: block;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: #fbfaf7;
}

.detail-drawer {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background: #fbfaf7;
  border-left: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}

.detail-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 2px solid var(--line);
}

.detail-drawer-header h2 {
  margin: 4px 0 0;
  font-size: 28px;
}

.close-button {
  border: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
}

.detail-drawer-body {
  padding: 16px 20px 28px;
  overflow: auto;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.detail-summary-grid article {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.detail-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.detail-summary-grid strong {
  font-size: 18px;
}

.detail-table {
  min-width: 1320px;
}

.source-real {
  color: var(--green);
  font-weight: 700;
}

.source-mock {
  color: var(--red);
  font-weight: 700;
}

.ticker-detail-cell a,
td > a {
  color: inherit;
  text-decoration: none;
}

.ticker-detail-cell a:hover,
td > a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ticker-detail-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 118px;
}

.trade-details-button {
  opacity: 0;
  transform: translateY(2px);
  border: 1px solid var(--soft-line);
  background: #fff;
  color: var(--ink);
  border-radius: 5px;
  padding: 4px 7px;
  min-height: 24px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  transition: opacity 120ms ease, transform 120ms ease, background 120ms ease;
}

tr:hover .trade-details-button,
.trade-details-button:focus {
  opacity: 1;
  transform: translateY(0);
}

.trade-details-button:hover {
  background: var(--ink);
  color: #fff;
}

.detail-section {
  margin-top: 16px;
}

.detail-section h3 {
  margin: 0 0 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
}

.detail-kv {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 10px;
  margin: 0;
}

.detail-kv div {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.detail-kv dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.detail-kv dd {
  margin: 0;
  font-weight: 700;
}

.detail-table-wrap {
  overflow-x: auto;
}

.compact-detail-table {
  min-width: 1040px;
  font-size: 12px;
}

.trade-detail-formula {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
}

.trade-detail-formula span {
  border: 1px solid var(--soft-line);
  border-radius: 6px;
  background: #fff;
  padding: 7px 9px;
}

.trade-rationale-section {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

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

.trade-rationale-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 12px;
  align-items: stretch;
}

.trade-rationale-grid article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  min-height: 106px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
}

.trade-rationale-grid article.trade-rationale-feature {
  grid-column: 1 / -1;
  min-height: 210px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.trade-rationale-grid article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.trade-rationale-grid strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.trade-rationale-grid p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.trend-evidence-panel {
  margin-top: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.trend-evidence-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.trend-evidence-summary strong {
  font-size: 15px;
  margin: 0;
}

.trend-evidence-summary span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.trend-evidence-chart {
  display: grid;
  gap: 8px;
}

.trend-evidence-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(220px, 1fr) 54px;
  gap: 10px;
  align-items: center;
}

.trend-evidence-row div:first-child strong {
  display: block;
  margin: 0 0 2px;
  font-size: 12px;
}

.trend-evidence-row div:first-child span {
  color: var(--muted);
  font-size: 11px;
}

.trend-evidence-track {
  height: 13px;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #edf2f7;
}

.trend-evidence-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f5f9f 0%, #087f5b 100%);
}

.trend-evidence-row b {
  text-align: right;
  font-size: 12px;
}

.metric-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  border: 1px solid var(--soft-line);
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  padding: 0;
  min-height: 0;
}

.trend-evidence-help {
  grid-column: 1 / -1;
  margin-top: -2px;
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  background: #eef5ff;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.trade-chart-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  min-width: 0;
}

.trade-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.trade-chart-header h3 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
}

.trade-trend-chart {
  height: 320px;
  border-radius: 8px;
}

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

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

@media (max-width: 620px) {
  .shell {
    padding: 8px;
  }

  .panel {
    padding: 16px;
  }

  .metrics-grid,
  .metrics-grid.single {
    grid-template-columns: 1fr;
  }
}

/* Professional dashboard skin */
:root {
  --bg: #f3f5f7;
  --ink: #111827;
  --muted: #6b7280;
  --line: #cfd6df;
  --soft-line: #e6eaf0;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --accent: #ef6a4f;
  --green: #087f5b;
  --red: #c62828;
  --amber: #b7791f;
  --blue: #2f5f9f;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.045);
}

body {
  background:
    linear-gradient(180deg, #f8fafc 0%, #f3f5f7 42%, #edf1f5 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
}

.shell {
  grid-template-columns: minmax(280px, 360px) minmax(680px, 1fr) minmax(340px, 430px);
  gap: 14px;
  padding: 16px;
}

.panel,
.chart-panel,
.table-panel {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 22px;
  gap: 28px;
}

.methodology-panel,
.backtest-panel {
  border-color: var(--soft-line);
}

.methodology-panel {
  border-left: 4px solid #243b53;
}

.backtest-panel {
  border-left: 4px solid var(--accent);
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.center-stage {
  gap: 12px;
}

.topline {
  min-height: 64px;
  padding: 2px 4px 4px;
  align-items: center;
}

h1 {
  font-size: clamp(26px, 2.35vw, 40px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: 0;
}

.backtest-panel h1,
.methodology-panel h1 {
  font-size: clamp(28px, 2vw, 38px);
}

h2 {
  font-size: 20px;
  font-weight: 750;
  margin-bottom: 10px;
}

.eyebrow {
  color: #667085;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.last-updated {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 8px 10px;
}

.last-updated strong {
  color: var(--ink);
}

select,
button,
.badge,
.metric-link,
.status-pill,
.build-chips em {
  border-radius: 6px;
}

select,
button {
  border-color: var(--line);
  background: #fff;
  min-height: 34px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

button:hover,
select:hover {
  border-color: #9aa8b7;
  box-shadow: 0 0 0 3px rgba(47, 95, 159, 0.08);
}

.badge {
  border: 0;
  background: #111827;
  color: #fff;
  border-radius: 999px;
  min-height: 28px;
}

.badge.light {
  background: #edf2f7;
  border: 1px solid #d9e1ea;
  color: #25364a;
}

input[type="range"] {
  accent-color: var(--accent);
}

.param-readout div,
.ledger div {
  border-bottom-color: var(--soft-line);
}

.compact-list {
  color: #374151;
  line-height: 1.55;
}

.tree-node {
  border-top-color: var(--soft-line);
}

.tree-node details {
  border-left-color: #dde5ee;
}

.tree-title {
  align-items: center;
}

.tree-title::after,
.tree-num {
  border: 0;
  background: #172033;
  border-radius: 5px;
}

.tree-title::after {
  background: #edf2f7;
  color: #24364b;
  border: 1px solid #d6dee8;
  line-height: 16px;
}

.tree-copy strong {
  color: #111827;
}

.tree-copy span,
.tree-leaf,
.risk-note {
  color: #667085;
}

.build-chips em {
  border-color: #d6dee8;
  background: #f8fafc;
  color: #334155;
}

.chart-panel {
  padding: 16px;
}

.chart-header {
  align-items: center;
  margin-bottom: 8px;
}

.chart-header p {
  color: #667085;
}

.chart-stats span {
  border: 1px solid #dbe3ec;
  background: #f8fafc;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
}

canvas {
  background: #fff;
  border: 1px solid #e0e6ee;
  border-radius: 6px;
}

#equityChart {
  height: 360px;
}

.chart-legend {
  color: #667085;
}

.metrics-grid {
  gap: 12px;
}

.metrics-grid article {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  min-height: 76px;
}

.cumulative-grid article {
  background: linear-gradient(180deg, #fff 0%, #fffaf1 100%);
}

.metrics-grid span {
  color: #667085;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.metrics-grid strong {
  font-size: 23px;
  letter-spacing: -0.01em;
}

.metric-link {
  border-color: #d8e0e9;
  background: #f8fafc;
  color: #24364b;
}

.metric-link:hover {
  background: #172033;
  color: #fff;
  box-shadow: none;
}

.table-panel {
  padding: 16px;
}

.section-title {
  align-items: center;
}

.notice {
  border: 1px solid #dbe3ec;
  background: #f8fafc;
  border-radius: 6px;
  color: #536274;
}

table {
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid #e5eaf0;
  padding: 11px 9px;
}

th {
  color: #667085;
  font-size: 11px;
  letter-spacing: 0.04em;
  background: #f8fafc;
}

tbody tr:hover {
  background: #fbfdff;
}

td:nth-last-child(-n + 5),
th:nth-last-child(-n + 5) {
  text-align: right;
}

tfoot td {
  border-top: 1px solid #ccd6e2;
  background: #f8fafc;
}

.positive {
  color: #008060;
}

.negative {
  color: #c62828;
}

.risk-lab {
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  padding: 16px 0;
  margin: 4px 0;
}

.section-title.compact h2 {
  font-size: 21px;
}

.status-pill {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #b45309;
}

.status-pill.negative {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

#monteCarloChart {
  height: 230px;
}

.stress-table th,
.stress-table td {
  border-bottom-color: #e5eaf0;
  padding: 8px 4px;
}

.stress-table th {
  background: transparent;
}

.ledger {
  gap: 0;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  overflow: hidden;
}

.ledger div {
  padding: 10px 12px;
  background: #fff;
}

.ledger div:nth-child(even) {
  background: #f8fafc;
}

.log-item,
.event-item {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.event-item span,
.log-item span {
  color: #667085;
  line-height: 1.45;
}

.detail-modal-backdrop,
.detail-drawer {
  background: #f8fafc;
}

.detail-drawer-header {
  border-bottom: 1px solid var(--soft-line);
  background: #fff;
}

.close-button {
  border: 0;
  border-radius: 6px;
  background: #172033;
}

.detail-summary-grid article {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
}

.source-real {
  color: #008060;
}

@media (max-width: 1180px) {
  .backtest-panel {
    position: static;
    max-height: none;
  }
}

/* Bot-console layout pass */
.shell {
  grid-template-columns: minmax(280px, 330px) minmax(720px, 1fr) minmax(360px, 430px);
  grid-template-areas:
    "header header header"
    "controls live risk";
  align-items: start;
  gap: 16px;
}

.app-header {
  grid-area: header;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.app-header .eyebrow {
  color: #64748b;
  margin-bottom: 2px;
}

.app-header h1 {
  color: #0f172a;
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1.05;
}

.header-subtitle {
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
}

.ops-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ops-pill,
.app-header .last-updated {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 700;
}

.app-header .last-updated {
  display: block;
  border-radius: 10px;
  text-align: right;
}

.app-header .last-updated span {
  color: #64748b;
}

.app-header .last-updated strong {
  color: #0f172a;
  font-size: 12px;
}

.methodology-panel {
  grid-area: controls;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.center-stage {
  grid-area: live;
}

.backtest-panel {
  grid-area: risk;
}

.methodology-panel,
.backtest-panel,
.chart-panel,
.table-panel {
  border-radius: 12px;
}

.methodology-panel {
  border-left: 0;
  border-top: 4px solid #243b53;
}

.backtest-panel {
  border-left: 0;
  border-top: 4px solid var(--accent);
}

.chart-panel {
  border-top: 4px solid #0f766e;
}

.chart-header h2 {
  font-size: 24px;
}

.chart-stats {
  min-width: 360px;
}

.metrics-grid article {
  position: relative;
  overflow: hidden;
}

.metrics-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #d7dee8;
}

.metrics-grid article:has(.positive)::before {
  background: var(--green);
}

.metrics-grid article:has(.negative)::before {
  background: var(--red);
}

.table-panel {
  border-top: 1px solid var(--soft-line);
}

.table-panel .section-title {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--soft-line);
  margin-bottom: 10px;
}

.backtest-panel .metrics-grid.single {
  margin-top: 4px;
}

.risk-lab {
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  padding: 14px;
}

.backtest-panel > section:not(.risk-lab) {
  border-top: 1px solid var(--soft-line);
  padding-top: 16px;
}

.methodology-panel section {
  border-top: 1px solid var(--soft-line);
  padding-top: 18px;
}

.methodology-panel section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.bot-selector-section {
  display: grid;
  gap: 12px;
}

.selector-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.select-card {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.select-card select {
  width: 100%;
  min-height: 38px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  background: #fff;
}

.secondary-action {
  width: 100%;
  min-height: 34px;
  justify-content: center;
  background: #f8fafc;
  color: #243b53;
  border-color: #cbd5e1;
}

.active-config {
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  color: #475467;
  font-size: 12px;
  line-height: 1.45;
}

.universe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.universe-chips span {
  border: 1px solid #d0d7de;
  border-radius: 999px;
  background: #fff;
  color: #243b53;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
}

.detail-rule-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #344054;
  line-height: 1.6;
}

.detail-kv {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.detail-kv div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--soft-line);
  padding-bottom: 8px;
}

.detail-kv dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-kv dd {
  margin: 0;
  color: #111827;
}

.panel-header {
  align-items: center;
}

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

.analysis-card {
  min-width: 0;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.analysis-card canvas {
  flex: 0 0 auto;
}

.analysis-grid .chart-header,
.analysis-grid .section-title {
  min-height: 96px;
  align-items: flex-start;
}

.analysis-grid .chart-stats {
  min-width: 0;
  justify-content: flex-start;
}

.analysis-grid .chart-stats span {
  font-size: 11px;
  padding: 5px 7px;
}

.backtest-window-card {
  border: 1px solid var(--line);
  background: #f8f7f3;
  margin: 8px 0 10px;
  padding: 8px 10px;
}

.backtest-window-card details {
  margin: 0;
}

.backtest-window-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0;
  cursor: pointer;
  list-style: none;
}

.backtest-window-title::-webkit-details-marker {
  display: none;
}

.backtest-window-card details[open] .backtest-window-title {
  margin-bottom: 6px;
}

.backtest-window-title strong {
  display: block;
  font-size: 13px;
}

.backtest-window-title span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.backtest-window-table {
  width: 100%;
  font-size: 11px;
}

.backtest-window-table th,
.backtest-window-table td {
  padding: 4px 6px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}

.backtest-window-table th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.legend-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 3px;
  vertical-align: middle;
}

.legend-arrow.up {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid #087f5b;
}

.legend-arrow.down {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 9px solid #c92a2a;
}

.analysis-grid .chart-legend {
  min-height: 44px;
}

.analysis-card .risk-grid {
  margin-top: auto;
}

.analysis-card.risk-lab {
  margin: 0;
  padding: 16px;
}

.analysis-card.risk-lab .section-title.compact {
  min-height: 96px;
}

.analysis-card.risk-lab .chart-legend {
  margin-bottom: 8px;
}

.analysis-grid #equityChart,
.analysis-grid #monteCarloChart {
  height: 320px;
}

.backtest-panel .stress-table {
  margin-top: 4px;
}

.kpi-strip {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.kpi-strip article {
  min-height: 62px;
  padding: 9px 10px 9px 12px;
}

.kpi-strip span {
  font-size: 10px;
  margin-bottom: 5px;
  gap: 4px;
}

.kpi-strip strong {
  font-size: 18px;
  line-height: 1.15;
}

.kpi-strip .metric-link {
  font-size: 9px;
  padding: 2px 5px;
  min-height: 22px;
}

.portfolio-table-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 0.8fr);
  gap: 12px;
  align-items: stretch;
}

.portfolio-table-grid .table-panel {
  min-width: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 330px;
}

.portfolio-table-grid .section-title {
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.portfolio-table-grid .section-title h2 {
  font-size: 16px;
  margin-bottom: 0;
}

.portfolio-table-grid .eyebrow {
  font-size: 9px;
  margin-bottom: 3px;
}

.portfolio-table-grid .section-actions {
  gap: 5px;
}

.portfolio-table-grid select,
.portfolio-table-grid button,
.portfolio-table-grid .badge {
  min-height: 28px;
  padding: 5px 7px;
  font-size: 11px;
}

.portfolio-table-grid .inline-control {
  font-size: 10px;
}

.portfolio-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.portfolio-tabs button {
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #f8f7f3;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
}

.portfolio-tabs button.active {
  background: var(--ink);
  color: #fff;
}

.portfolio-tab-pane {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
}

.portfolio-tab-pane.active {
  display: flex;
  flex-direction: column;
}

.tab-subtitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tab-subtitle h3 {
  font-size: 14px;
  margin: 0;
}

.portfolio-table-grid .table-wrap,
.portfolio-table-grid .log-list {
  flex: 1 1 auto;
  overflow: auto;
}

.portfolio-table-grid .notice {
  font-size: 10px;
  padding: 6px 7px;
}

.portfolio-table-grid table {
  font-size: 10.5px;
  min-width: 980px;
}

.portfolio-table-grid th,
.portfolio-table-grid td {
  padding: 7px 6px;
}

.portfolio-table-grid th {
  font-size: 9px;
}

.portfolio-table-grid tfoot td {
  font-size: 10px;
}

.portfolio-table-grid .muted,
.portfolio-table-grid .table-footer-row .muted {
  font-size: 9px;
}

.portfolio-table-grid .log-list {
  gap: 6px;
  max-height: 280px;
}

.portfolio-table-grid .log-item {
  padding: 8px;
  font-size: 11px;
}

.portfolio-table-grid .log-item strong {
  font-size: 12px;
}

.portfolio-table-grid .log-item span {
  font-size: 10px;
}

@media (max-width: 1380px) {
  .shell {
    grid-template-columns: minmax(260px, 310px) minmax(640px, 1fr);
    grid-template-areas:
      "header header"
      "controls live"
      "risk risk";
  }

  .backtest-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "live"
      "risk"
      "controls";
  }

  .methodology-panel {
    position: static;
    max-height: none;
  }

  .ops-strip,
  .chart-stats {
    justify-content: flex-start;
    min-width: 0;
  }

  .app-header {
    align-items: flex-start;
  }

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

  .analysis-card {
    min-height: 0;
  }

  .kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .strike-bridge-grid,
  .strike-flow-grid,
  .strike-bucket-grid,
  .strike-path-grid {
    grid-template-columns: 1fr;
  }

  .strike-path-row {
    grid-template-columns: 1fr;
  }

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

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

  .trend-evidence-row {
    grid-template-columns: 1fr;
  }

  .trend-evidence-summary {
    display: grid;
  }

  .trend-evidence-summary span {
    text-align: left;
  }

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

  .portfolio-table-grid table {
    font-size: 12px;
  }
}
.hyper-responsive-sentinel {
  display: contents;
}

@media (max-width: 720px) {
  .hyper-shell {
    width: min(100% - 28px, 1380px);
    padding-top: 18px;
  }

  .hyper-hero h1 {
    font-size: 35px;
  }

  .hyper-hero,
  .hyper-panel-head,
  .hyper-signal-grid,
  .hyper-quality-grid,
  .hyper-return-grid,
  .hyper-market-grid {
    grid-template-columns: 1fr;
  }

  .hyper-asset-tabs,
  .hyper-range-tabs {
    width: 100%;
  }

  .hyper-asset-tabs button,
  .hyper-range-tabs button {
    flex: 1;
  }

  .hyper-score-card,
  .hyper-flow-card,
  .hyper-panel {
    padding: 14px;
  }

  .hyper-chart {
    height: 250px;
  }

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

  .hyper-signal-cards strong {
    font-size: 32px;
  }

  .hyper-score-histogram {
    grid-template-columns: repeat(10, 46px);
    overflow-x: auto;
  }

  .hyper-stream-table {
    min-width: 840px;
  }

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

.hyper-sector-tree article {
    flex-basis: 100%;
  }
}

@media (max-width: 720px) {
  body {
    min-width: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overflow-x: hidden;
  }

  .overview-page,
  .dashboard-page,
  .hyper-page {
    min-height: 100dvh;
  }

  .overview-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 58px;
    gap: 10px;
    padding: 9px 12px;
  }

  .company-brand {
    width: min(180px, 50vw);
  }

  .overview-nav-actions {
    gap: 10px;
    justify-content: flex-end;
  }

  .overview-nav-actions .text-action {
    min-height: 34px;
    font-size: 11px;
    white-space: nowrap;
  }

  .overview-main {
    display: block;
    width: 100%;
    max-width: 100vw;
    padding: 18px 12px 28px;
  }

  .overview-main > *,
  .overview-story,
  .portfolio-showcase {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    min-width: 0;
  }

  .overview-story h1 {
    margin: 0;
    font-size: clamp(46px, 15vw, 64px);
    line-height: 0.92;
  }

  .overview-copy,
  .overview-lede,
  .research-note {
    max-width: none;
  }

  .portfolio-showcase {
    margin-top: 28px;
    padding: 12px;
  }

  .showcase-header,
  .portfolio-visual-grid,
  .strategy-analytics-column,
  .hyper-flow-columns,
  .hyper-flow-totals {
    grid-template-columns: 1fr;
  }

  .showcase-summary {
    width: 100%;
    align-items: flex-start;
    text-align: left;
  }

  .equity-pnl-horizons {
    white-space: normal;
  }

  .portfolio-mark-controls,
  .latest-portfolio-heading,
  .trade-log-heading,
  .showcase-actions {
    width: 100%;
  }

  .strategy-guardrails,
  .portfolio-mark-controls,
  .latest-portfolio-tabs,
  .risk-comparison-tabs,
  .hyper-range-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .algo-stat-strip,
  .mini-return-grid,
  .mini-mc-stats,
  .portfolio-totals {
    grid-template-columns: 1fr 1fr;
  }

  .portfolio-totals div {
    min-height: 76px;
    padding: 11px 10px;
  }

  .portfolio-totals strong {
    font-size: 15px;
  }

  .treemap-shell {
    display: block;
  }

  .snapshot-rail {
    width: 100%;
    min-height: 42px;
    margin-top: 8px;
    writing-mode: horizontal-tb;
  }

  .portfolio-treemap {
    min-height: 520px;
    border: 1px solid #d6dad7;
  }

  .tile-topline b {
    font-size: 24px;
  }

  .tile-direction,
  .tile-trade {
    display: block;
  }

  .tile-trade {
    margin-top: 14px;
    font-size: 10px;
  }

  .overview-trade-log-wrap,
  .overview-candidate-wrap,
  .table-wrap,
  .sector-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .overview-trade-log-table,
  .overview-candidate-table,
  .table-wrap table,
  .sector-table-wrap table {
    min-width: 760px;
  }

  .overview-modal-card,
  .refresh-log-card,
  .detail-drawer {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    margin: 10px;
  }

  .overview-modal-body,
  .detail-drawer-body {
    max-height: calc(100dvh - 130px);
    overflow: auto;
  }

  .hyper-flow-shell {
    padding: 20px 12px 34px;
  }

  .hyper-flow-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dashboard-page {
    display: block;
  }

  .app-header,
  .panel,
  .center-stage,
  .backtest-panel {
    width: 100%;
    max-width: 100vw;
  }

  canvas {
    max-width: 100%;
  }
}
