:root {
  color-scheme: light;
  /* 批次1（2026-09-26）：旧 token 全部收编为 design-system.css 语义 token 的消费别名，
     消除第二套颜色系统；值仅在 --wb-* 缺失时兜底。涨跌色同步交接方案 §3.3 起点值。 */
  --bg: var(--wb-canvas, #f3f5f7);
  --panel: var(--wb-surface, #ffffff);
  --text: var(--wb-ink, #111315);
  --muted: var(--wb-muted, #525961);
  --line: var(--wb-line, #dde1e5);
  /* 系统操作色：不与 A 股红涨绿跌混用。 */
  --accent: var(--wb-action, #155eef);
  --accent-dark: var(--wb-action-dark, #0f4acc);
  --accent-strong: #002d9c;
  --accent-soft: var(--wb-action-soft, #eef4ff);
  --blue: var(--wb-action, #155eef);
  --orange: #b26a00;
  --warn: var(--wb-warn, #8a5a00);
  --warn-soft: var(--wb-warn-soft, #fff4d6);
  --danger: var(--wb-danger, #b42318);
  --danger-soft: var(--wb-danger-soft, #fff4f3);
  --up: var(--wb-up, #c4322b);
  --down: var(--wb-down, #087a4b); /* 审计 F-6（2026-09-19）：对白对比度 ≥4.5:1 口径由 token 测试钉住 */
  --focus-ring: var(--wb-action, #155eef);
  --radius-control: 8px;
  --radius-panel: 10px;
  --radius-dialog: 16px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html { scroll-padding-top: 16px; }

:where(h1, h2, h3) { text-wrap: balance; }

:where(section[id], h1[id], h2[id], h3[id]) { scroll-margin-top: 16px; }

:where(a, button, input, select, textarea, summary, [tabindex]) {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(15, 98, 254, .16);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: max(8px, env(safe-area-inset-top));
  left: 8px;
  border-radius: 8px;
  background: #102a43;
  color: #fff;
  padding: 9px 12px;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(calc(-100% - 16px));
  transition: transform .14s ease;
}

.skip-link:focus-visible { transform: translateY(0); }

dialog { overscroll-behavior: contain; }

:where(table, .metric, .account-overview, .market-card, .market-breadth, .mutual-account-overview) {
  font-variant-numeric: tabular-nums;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 4px 0;
}

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

.strategy-picker {
  width: 220px;
  gap: 4px;
  margin-top: 0;
}

.strategy-picker select {
  min-height: 38px;
  padding: 7px 10px;
}

.button-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
  white-space: nowrap;
}

.button-link:hover,
button:hover {
  border-color: var(--accent);
}

.button-link:active,
button:active { transform: translateY(1px); }

.topbar-more { position: relative; }
.topbar-more > summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  white-space: nowrap;
}
.topbar-more > summary::-webkit-details-marker { display: none; }
.topbar-more > summary::after { content: "⌄"; margin-left: 7px; color: var(--muted); }
.topbar-more[open] > summary { border-color: var(--accent); }
.topbar-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #fff;
  padding: 5px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
}
.topbar-menu a { border-radius: 6px; color: var(--text); padding: 9px 10px; text-decoration: none; }
.topbar-menu a:hover { background: #f2f6f8; }
.topbar-menu .logout-link { color: #b42318; }

.notification-channel-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  border-block: 1px solid var(--line);
  background: #fff;
}
.notification-channel-strip > div { padding: 12px 16px; }
.notification-channel-strip > div + div { border-left: 1px solid var(--line); }
.notification-channel-strip span,
.notification-channel-strip strong { display: block; }
.notification-channel-strip span { font-size: 12px; }
.notification-channel-strip strong { margin-top: 2px; color: var(--text); font-size: 15px; }

.notification-control-panel,
.notification-subscriptions-panel,
.notification-ops-panel,
.notification-history-panel { margin-bottom: 14px; padding: 16px; }
.notification-control-head { align-items: flex-start; }
.notification-control-head .helper-text,
.notification-subscriptions-panel .helper-text { margin-top: 3px; }
.notification-save-actions { display: flex; align-items: center; gap: 10px; }
.notification-save-actions span { font-size: 12px; }
.notification-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.notification-channel-config { min-width: 0; padding: 16px 18px 0 0; }
.notification-channel-config + .notification-channel-config {
  border-left: 1px solid var(--line);
  padding-right: 0;
  padding-left: 18px;
}
.notification-channel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 10px;
}
.notification-channel-heading h3 { margin: 0; color: var(--text); font-size: 15px; }
.notification-channel-heading > span { font-size: 12px; }
.notification-channel-config > label + label { margin-top: 10px; }
.notification-channel-config > button { margin-top: 12px; }
.notification-inline-toggle { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.notification-inline-toggle input,
.notification-matrix-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.notification-help { margin: 9px 0 0; font-size: 12px; line-height: 1.55; }
.notification-smtp-settings { margin-top: 12px; padding: 10px 0 0; border-top: 1px solid var(--line); }
.notification-smtp-settings summary { cursor: pointer; color: var(--accent-dark); font-weight: 700; }
.notification-smtp-settings > .split,
.notification-smtp-settings > label { margin-top: 10px; }
.notification-event-matrix { margin-top: 12px; }
.notification-matrix-head,
.notification-matrix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 72px;
  align-items: center;
}
.notification-matrix-head {
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.notification-matrix-head span:not(:first-child) { text-align: center; }
.notification-matrix-row { min-height: 58px; border-top: 1px solid var(--line); }
.notification-matrix-row > span { padding: 9px 12px 9px 0; }
.notification-matrix-row strong,
.notification-matrix-row small { display: block; }
.notification-matrix-row strong { color: var(--text); font-size: 13px; }
.notification-matrix-row small { margin-top: 2px; font-size: 12px; }
.notification-matrix-row > label {
  display: grid;
  min-height: 58px;
  place-items: center;
  border-left: 1px solid var(--line);
  cursor: pointer;
}
.notification-matrix-row > label:hover { background: #f4f8fb; }
.notification-ops-panel > summary { cursor: pointer; color: var(--text); font-weight: 750; }
.notification-ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.notification-ops-grid > section { padding: 14px 18px 0 0; }
.notification-ops-grid > section + section { border-left: 1px solid var(--line); padding-right: 0; padding-left: 18px; }
.notification-ops-grid h3 { margin: 0 0 10px; color: var(--text); font-size: 14px; }
.notification-backup-status { display: grid; gap: 4px; }
.notification-backup-status span { font-size: 12px; }
.notification-backup-status strong { color: var(--text); }
.notification-backup-status small { color: var(--muted); }
.notification-history-panel { margin-top: 0; }
.notice-status { display: inline-block; font-size: 12px; font-weight: 700; }
.notice-status.sent,
.notice-status.sent_after_retry { color: var(--accent-dark); }
.notice-status.failed { color: #b42318; }
.notice-status.queued { color: #7a5c14; }
.notice-status.recorded { color: #667085; }
.notice-error { display: block; max-width: 210px; margin-top: 3px; color: #b42318; font-size: 11px; }
.notice-results { min-width: 170px; }
.notice-channel-result { display: grid; grid-template-columns: 40px 1fr; align-items: baseline; }
.notice-channel-result + .notice-channel-result { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); }
.notice-channel-result > span { font-size: 11px; }
.notice-channel-result .notice-error { grid-column: 1 / -1; }
.empty-cell { padding: 24px; color: var(--muted); text-align: center; }

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 28px;
  font-weight: 760;
}

h2 {
  font-size: 16px;
}

p, span, label {
  color: var(--muted);
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

button.small {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.small-link {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  padding: 0 10px;
  text-decoration: none;
}

.small-link:hover {
  border-color: var(--accent);
}

button.danger {
  color: #b42318;
  border-color: #fecdca;
  background: #fff5f5;
}

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

.metrics.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.metric, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

.metric {
  min-height: 92px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.metric span {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.metric strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.2;
}

.metric.compact-value strong {
  font-size: 14px;
  line-height: 1.35;
}

.account-overview {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
}

.overview-item {
  min-width: 0;
  min-height: 92px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.overview-item:last-child {
  border-right: 0;
}

.overview-item > span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}

.overview-item > strong,
.overview-value-row > strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.overview-today-pnl {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.overview-today-pnl.positive { color: var(--up); }
.overview-today-pnl.negative { color: var(--down); }

.overview-value-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.overview-value-row .overview-rate {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
}

.overview-item .positive,
.overview-value-row .positive {
  color: var(--up);
}

.overview-item .negative,
.overview-value-row .negative {
  color: var(--down);
}

.overview-meta {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 38px;
  padding: 8px 18px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
  font-size: 12px;
}

.overview-meta span {
  white-space: nowrap;
}

.overview-meta strong {
  margin-left: 5px;
  color: #344054;
  font-size: 12px;
}

.performance-meta {
  display: inline-flex;
  align-items: center;
}

.performance-meta[hidden] {
  display: none;
}

.performance-meta i {
  width: 1px;
  height: 12px;
  margin: 0 16px;
  background: var(--line);
}

.rotation-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.rotation-hint div {
  min-width: 230px;
}

.rotation-hint span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.rotation-hint strong {
  color: var(--text);
  font-size: 17px;
}

.rotation-hint p {
  color: #475467;
  text-align: right;
}

.rotation-hint.aligned {
  border-color: #b7dfd7;
  background: #f4fbf9;
}

.rotation-hint.deviated {
  border-color: #fed7aa;
  background: #fff7ed;
}

.rotation-hint.neutral {
  background: #f8fafc;
}

.module-data-status {
  margin: 0 0 14px;
  padding: 10px 13px;
  border: 1px solid #d9e3f0;
  border-radius: 8px;
  background: #f8fbff;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}

.risk-alert {
  display: grid;
  gap: 8px;
  border: 1px solid #fecdca;
  border-left: 5px solid #d92d20;
  border-radius: 8px;
  background: #fff5f5;
  color: #912018;
  padding: 13px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(217, 45, 32, .12);
}

.risk-alert[hidden] {
  display: none;
}

.risk-alert strong {
  display: block;
  color: #b42318;
  font-size: 16px;
  margin-bottom: 3px;
}

.risk-alert span {
  color: #912018;
  font-size: 13px;
}

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

/* 批次5（§6 批次5 窄屏一致化）：1fr 的自动最小值是 min-content，遗留网格项没有
   min-width:0 纪律时会把列撑出容器（实测 backtest 配置面板 375px 溢出 4px）。
   与 design-system.css 的 wb 网格同一纪律（2026-09-12 布局协调性修复先例）。 */
.grid > * {
  min-width: 0;
}

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

.panel {
  padding: 16px;
}

.panel.wide {
  grid-column: span 1;
}

.panel.full {
  grid-column: 1 / -1;
}

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

.panel-head span {
  font-size: 12px;
}

.panel-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.reliability-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .85fr);
  gap: 16px;
  align-items: start;
}

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

.health-item {
  display: grid;
  gap: 8px;
  min-height: 98px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.health-item.ok {
  border-left-color: var(--accent);
}

.health-item.warn {
  border-left-color: #f97316;
}

.health-item.error {
  border-left-color: #d92d20;
  background: #fff8f7;
}

.health-item div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.health-item strong {
  color: var(--text);
  font-size: 14px;
}

.health-item span,
.health-item p,
.helper-text {
  color: var(--muted);
  font-size: 12px;
}

.health-item p {
  margin: 0;
}

.helper-text {
  margin-top: 10px;
}

.reconcile-form {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.reconcile-form h3 {
  margin: 0;
  font-size: 15px;
}

.reconcile-form label {
  margin-top: 0;
}

.reconcile-diff {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.reconcile-diff strong {
  color: var(--text);
}

.reconcile-diff span {
  color: var(--muted);
}

label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
}

/* 审计 F-17（2026-09-19）：静态说明行不冒充表单 label（无关联控件时语义错误） */
.quick-trade-stock-note {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.settings-dialog {
  width: min(560px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.settings-dialog::backdrop {
  background: rgba(15, 23, 42, .42);
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(15, 23, 42, .22);
}

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

.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  color: #667085;
  font-size: 22px;
  line-height: 1;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.save-strategy-box {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  border-top: 1px solid #e9eef5;
  margin-top: 14px;
  padding-top: 14px;
}

.save-strategy-box label {
  margin-top: 0;
}

.save-strategy-box span {
  font-size: 12px;
  white-space: nowrap;
}

.cashflow-table {
  margin-top: 14px;
}

.cashflow-table table {
  min-width: 520px;
}

textarea {
  resize: vertical;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}
.table-wrap[tabindex]:focus-visible {
  outline: 2px solid var(--focus-ring, #1d4ed8);
  outline-offset: 2px;
}

.scores-wrap {
  overflow-x: auto;
}

.scores-wrap th,
.scores-wrap td {
  padding-left: 7px;
  padding-right: 7px;
  font-size: 12px;
}

.performance-card {
  padding: 18px;
}

.pool-move-card {
  padding: 18px;
}

.etf-shares-card { padding: 18px; }
/* 2026-09-24：全站 th,td 右对齐，于是本表 ETF 名被推到该格右缘；而份额列被全站
   `td:nth-child(2)` 规则改成左对齐，文字从该格左缘起排——宽屏实测两者只隔 14px
   （1440px 下 342.9 vs 356.9），读成一坨，改后 230px。名称列改左对齐即可，
   其余列不动（表头与数值同受列序规则，依旧一一对齐）。
   必须带 .etf-shares-card 前缀：裸写 th:first-child 会波及全站所有表格。 */
.etf-shares-card th:first-child,
.etf-shares-card td:first-child { text-align: left; }
.shares-summary { margin: 12px 14px; }
.share-detail-toggle { border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; padding: 0; text-align: left; }
.share-holding-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #2563eb; }
.share-warning td { background: #fff8eb; }
.share-detail td { background: #f8fafc; color: #667085; padding: 10px 14px; }
.share-detail .ticker-spark { width: 76px; vertical-align: middle; margin: 0 4px; }

.pool-holding-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #a6d8cf;
  border-radius: 6px;
  background: #effaf7;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.pool-holding-status.empty {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--muted);
}

.pool-chart {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  margin-bottom: 10px;
}

.pool-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.pool-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .9;
}

.pool-prelive-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .34;
}

.pool-line.current-holding-line {
  stroke-width: 4;
  opacity: 1;
}

.pool-line.personal-pool-line {
  stroke-width: 4.5;
  opacity: 1;
}

.current-holding-point {
  stroke: #ffffff;
  stroke-width: 2;
}

.pool-end-label {
  font-size: 10px;
  font-weight: 700;
}

.pool-end-label.current-holding-label {
  font-size: 10px;
  font-weight: 700;
}

.pool-end-label.personal-pool-label {
  font-size: 10px;
  font-weight: 700;
}

.live-start-line {
  stroke: #98a2b3;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.live-start-label {
  fill: #667085;
  font-size: 10px;
  font-weight: 700;
}

.rebalance-line {
  stroke: #344054;
  stroke-width: 1;
  stroke-dasharray: 3 5;
  opacity: .58;
}

.rebalance-label {
  fill: #344054;
  font-size: 10px;
  font-weight: 700;
}

.rebalance-marker {
  cursor: help;
}

.pool-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.pool-summary-card {
  min-width: 0;
  padding: 7px 10px;
  border-left: 3px solid #d0d5dd;
  background: transparent;
}

.pool-summary-card.is-held {
  border-left-color: var(--accent);
}

.pool-summary-card.is-personal {
  border-left-color: #0f766e;
  background: #f0fdf9;
}

.pool-summary-card > div:first-child span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #667085;
  font-size: 12px;
}

.pool-summary-card i {
  display: inline-block;
  width: 16px;
  height: 3px;
  border-radius: 999px;
}

.holding-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 4px;
  background: #dff4ef;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
}

.pool-summary-card > div:first-child strong {
  display: block;
  overflow: hidden;
  color: #1c2430;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.pool-summary-values {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 3px;
}

.pool-summary-values strong {
  font-size: 17px;
  line-height: 1.3;
}

.pool-summary-values span {
  overflow: hidden;
  color: #667085;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-stats-card {
  padding: 18px;
}

.trade-stats-metrics {
  margin-bottom: 12px;
}

.trade-stats-card .metric {
  min-height: 78px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.trade-stats-card .metric strong {
  font-size: 18px;
}

.trade-stats-card table {
  min-width: 760px;
}

.trade-stats-card th,
.trade-stats-card td {
  text-align: right;
}

.trade-stats-card th:first-child,
.trade-stats-card td:first-child {
  min-width: 180px;
  text-align: left;
}

.trade-stats-card tbody tr:hover td {
  background: #fbfcfe;
}

.performance-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.performance-title-row h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.performance-title-row p {
  color: #667085;
  font-size: 13px;
}

.data-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid #d9e1ea;
  border-radius: var(--radius-pill);
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
  white-space: nowrap;
}

.performance-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.performance-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.performance-stats div {
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 10px 12px;
}

.performance-stats span {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.performance-stats strong {
  font-size: 18px;
}

.metric-note {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.backup-restore {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}

.backup-restore .helper-text {
  grid-column: 1 / -1;
  margin: 0;
}

.performance-toolbar label {
  width: 160px;
  margin-top: 0;
}

.performance-toolbar select {
  padding: 7px 9px;
}

.period-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.period-tab {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
}

.period-tab.active {
  border-color: #1f7a6d;
  background: #e8f3f1;
  color: #155b51;
}

.performance-chart {
  border-top: 1px solid #edf1f6;
  background: #ffffff;
  overflow: hidden;
}

.performance-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-bg {
  fill: #ffffff;
}

.grid-line {
  stroke: #e7ecf3;
  stroke-width: 1;
}

.zero-line {
  stroke: #cbd5e1;
  stroke-width: 1;
}

.portfolio-area { fill: rgba(239, 68, 68, .075); }

.portfolio-line {
  fill: none;
  stroke: #d92d20;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benchmark-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 4 5;
  opacity: .86;
}

.drawdown-box {
  fill: rgba(251, 191, 36, .15);
  stroke: #f59e0b;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.dd-label,
.axis-label {
  fill: #667085;
  font-size: 12px;
}

.dd-label { fill: #1f2937; font-weight: 750; }
.chart-y-label { fill: #667085; font-size: 11px; }
.chart-date-label { fill: #667085; font-size: 11px; }
.svg-legend-label { fill: #667085; font-size: 11px; }
.legend-dot-strategy { fill: #fff; stroke: #d92d20; stroke-width: 2; }
.legend-dot-benchmark { fill: #fff; stroke: #2563eb; stroke-width: 2; }

.empty-chart {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--muted);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th, td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

td:nth-child(2), td:nth-child(3), th:nth-child(2), th:nth-child(3) {
  text-align: left;
}

td:nth-child(4), th:nth-child(4) {
  text-align: left;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.rank {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f3f1;
  color: var(--accent-dark);
  font-weight: 750;
  padding: 0 8px;
}

.rank-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.rank-delta {
  min-width: 18px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.rank-delta.up,
.rank-delta.new {
  color: var(--up);
}

.rank-delta.down {
  color: var(--down);
}

.rank-delta.flat {
  color: #667085;
}

.score-trend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 84px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.score-trend > span {
  color: currentColor;
}

.score-trend svg {
  width: 40px;
  height: 20px;
  overflow: visible;
}

.score-trend polyline {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.score-trend.up {
  color: var(--up);
}

.score-trend.down {
  color: var(--down);
}

.score-trend.stable,
.score-trend.new,
.score-trend.unavailable {
  color: #667085;
}

.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 750;
  padding: 0 8px;
  margin-right: 5px;
}

.status-badge.leader {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #b54708;
}

.status-badge.holding {
  border-color: #b7dfd7;
  background: #f4fbf9;
  color: #155b51;
}

.muted-text {
  color: #667085;
}

.holding-name-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-weight: 750;
  cursor: default;
}

.holding-name-tooltip::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  margin-left: 6px;
}

.holding-tooltip {
  position: absolute;
  z-index: 20;
  left: 0;
  top: calc(100% + 8px);
  display: grid;
  min-width: 220px;
  gap: 5px;
  border: 1px solid #cfd7e2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .18);
  opacity: 0;
  padding: 12px;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity .14s ease, transform .14s ease;
  white-space: nowrap;
}

.holding-tooltip strong {
  color: #1c2430;
  font-size: 13px;
  margin-bottom: 2px;
}

.holding-tooltip span {
  color: #667085;
  font-size: 12px;
}

.holding-tooltip em {
  font-style: normal;
  font-weight: 750;
}

.holding-name-tooltip:hover .holding-tooltip,
.holding-name-tooltip:focus-within .holding-tooltip {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

.leader-row {
  background: #fff7ed;
  box-shadow: inset 4px 0 0 #f97316;
}

.leader-row td {
  font-weight: 700;
}

.leader-row .rank {
  background: #f97316;
  color: #fff;
}

.holding-row {
  box-shadow: inset 0 -1px 0 #b7dfd7, inset 0 1px 0 #b7dfd7;
}

.holding-row:not(.leader-row) {
  background: #f4fbf9;
}

.holding-row td {
  font-weight: 650;
}

.holding-row.leader-row {
  background: linear-gradient(90deg, #fff7ed, #f4fbf9);
}

.holding-row.leader-row .status-badge.holding {
  background: #ffffff;
}

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

.portfolio-tables {
  display: grid;
  gap: 14px;
}

.live-record-card .panel-head {
  align-items: flex-start;
}

.record-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.holding-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.holding-card {
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 14px;
}

button.holding-card {
  display: block;
  width: 100%;
  color: inherit;
  text-align: left;
  white-space: normal;
}

button.holding-card:hover,
button.holding-card:focus-visible {
  border-color: #1677ff;
  background: #f4f9ff;
}

.holding-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.holding-main strong {
  display: block;
  color: #1c2430;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.holding-main span,
.holding-grid span,
.holding-value span {
  color: #667085;
  font-size: 12px;
}

.holding-value {
  text-align: right;
}

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

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

.holding-grid div {
  border-top: 1px solid #e9eef5;
  padding-top: 10px;
}

.holding-grid strong {
  display: block;
  margin-top: 3px;
}

.holding-grid small {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.holding-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}

.empty-holding {
  border: 1px dashed #cfd7e2;
  border-radius: 8px;
  color: #667085;
  padding: 18px;
  text-align: center;
}

.trade-collapse {
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.trade-collapse summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
}

.trade-collapse summary::-webkit-details-marker {
  display: none;
}

.trade-collapse summary span {
  color: #1c2430;
  font-size: 15px;
  font-weight: 750;
}

.trade-collapse summary strong {
  overflow: hidden;
  color: #667085;
  font-size: 13px;
  font-weight: 650;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-collapse summary::after {
  content: "展开";
  border: 1px solid #d9e1ea;
  border-radius: 999px;
  color: #475467;
  font-size: 12px;
  font-weight: 750;
  padding: 3px 9px;
}

.trade-collapse[open] summary {
  border-bottom: 1px solid #d9e1ea;
}

.trade-collapse[open] summary::after {
  content: "收起";
}

.trade-collapse .table-wrap {
  border: 0;
  border-radius: 0;
}

.portfolio-tables table {
  min-width: 820px;
}

.holding-card {
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.backtest-form {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: end;
}

.backtest-form label {
  margin-top: 0;
}

.span-2 {
  grid-column: span 2;
}

.smallcap-app {
  width: min(1320px, calc(100vw - 32px));
}

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

.ticker-loading { padding: 0 16px; font-size: 12px; }

.account-module-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.account-module-strip .smallcap-home-summary { margin-bottom: 0; }
.score-panel { margin-bottom: 14px; padding: 16px; }

.smallcap-home-summary {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #b7dfd7;
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-panel);
  background: #f4fbf9;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.smallcap-home-summary.danger { border-color: #fecdca; border-left-color: #d92d20; background: #fff5f5; }
.smallcap-home-summary > div > span,
.smallcap-home-summary > div > strong { display: block; }
.smallcap-home-summary > div > span { font-size: 12px; }
.smallcap-home-summary > div > strong { font-size: 15px; }
.smallcap-home-values { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 14px; }
.smallcap-home-values span { white-space: nowrap; }
.smallcap-home-values strong { color: #1c2430; margin-left: 3px; }
.smallcap-home-values em { margin-left: 5px; font-size: 12px; font-style: normal; font-weight: 700; }
.smallcap-home-values .positive { color: var(--up); }
.smallcap-home-values .negative { color: var(--down); }
.mutual-home-summary { border-color: #bfd7f5; border-left-color: #2d7fd3; background: #f5f9ff; }
.mutual-home-summary.warning { border-color: #fed7aa; border-left-color: #f97316; background: #fff7ed; }

.smallcap-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: #fff;
  padding: 13px 16px;
  margin-bottom: 10px;
}

.smallcap-status-banner > div:first-child { min-width: 220px; }
.smallcap-status-banner p { flex: 1; margin: 0; }

.smallcap-status-banner span,
.smallcap-status-banner strong {
  display: block;
}

.smallcap-status-banner strong {
  font-size: 17px;
}

.smallcap-status-banner.neutral { border-left-color: #667085; }
.smallcap-status-banner.warning { border-color: #fed7aa; border-left-color: #f97316; background: #fff7ed; }
.smallcap-status-banner.danger { border-color: #fecdca; border-left-color: #d92d20; background: #fff5f5; }
.smallcap-status-banner.danger strong,
.smallcap-status-banner.danger p { color: #b42318; }
.smallcap-status-banner.success { border-color: #abefc6; border-left-color: #12b76a; background: #ecfdf3; }
.smallcap-status-banner.success strong,
.smallcap-status-banner.success p { color: #067647; }

.smallcap-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.smallcap-status-actions > div { min-width: 0; }

.smallcap-status-actions span { color: #067647; font-size: 13px; font-weight: 700; }

.smallcap-operation-button {
  border: 1px solid #9cc5f5;
  border-radius: 6px;
  background: #eff6ff;
  color: #175ea8;
  font-weight: 700;
  padding: 8px 12px;
}

.smallcap-operation-button:hover { border-color: #2d7fd3; background: #dcecff; }

.section-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.section-nav a {
  border-bottom: 2px solid transparent;
  color: #475467;
  font-weight: 700;
  padding: 9px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.section-nav a:hover { border-color: var(--accent); color: var(--accent-dark); }

.smallcap-workspace {
  display: grid;
  grid-template-columns: minmax(360px, .85fr) minmax(0, 1.5fr);
  gap: 14px;
  align-items: start;
}

.smallcap-operation-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(900px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #f8fafc;
  box-shadow: 0 22px 70px rgba(15, 23, 42, .28);
}

.smallcap-operation-dialog::backdrop { background: rgba(15, 23, 42, .48); }

.smallcap-operation-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.smallcap-operation-dialog-head h2 { margin: 2px 0 0; }

.smallcap-chart-legend {
  display: flex;
  gap: 14px;
  padding: 10px 14px 0;
  color: var(--muted);
  font-size: 12px;
}

.smallcap-chart-legend span::before {
  display: inline-block;
  width: 16px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
  background: #1d77d4;
  content: "";
}

.smallcap-chart-legend .drawdown-line::before { background: #d92d20; }

.smallcap-drawdown-line {
  fill: none;
  stroke: #d92d20;
  stroke-dasharray: 6 4;
  stroke-width: 2.5;
}

.smallcap-section { margin-top: 14px; }
.signal-entry-panel textarea { min-height: 330px; }
.form-actions { display: flex; gap: 10px; margin-top: 12px; }

.recommendation-summary {
  display: block;
  margin-bottom: 12px;
}

.allocation-plan-switch {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wb-canvas, #f3f5f7);
}

.allocation-plan-switch[hidden],
.allocation-plan-note[hidden] {
  display: none;
}

.allocation-plan-button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 0 11px;
}

.allocation-plan-button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}

.allocation-plan-note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.allocation-plan-note strong {
  color: var(--text);
  white-space: nowrap;
}

.recommendation-summary > div {
  border: 1px solid #e6edf5;
  border-radius: 6px;
  background: #fbfcfe;
  padding: 10px;
}

.recommendation-summary span,
.recommendation-summary strong { display: block; }
.recommendation-summary span { font-size: 12px; }
.recommendation-summary strong { margin-top: 3px; }

.smallcap-quote-notice {
  margin-bottom: 10px;
  border-left: 3px solid #d0a400;
  padding: 7px 9px;
  background: #fffae8;
  color: #6d5500;
  font-size: 12px;
}

.ranked-candidate-selection { display: grid; gap: 6px; }
.ranked-candidate-row {
  display: grid;
  grid-template-columns: 18px 28px minmax(160px, 1fr) 108px 58px;
  align-items: center;
  gap: 10px;
  border: 1px solid #e6edf5;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}
.ranked-candidate-row.selected { border-color: #9cc5f5; background: #f4f9ff; }
.ranked-candidate-check { display: block; width: auto; margin: 0; }
.ranked-candidate-check input { width: auto; margin: 0; }
.ranked-candidate-row strong,
.ranked-candidate-row span { display: block; }
.ranked-candidate-row .rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #edf2f7;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}
.ranked-candidate-main { min-width: 0; }
.ranked-candidate-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranked-candidate-main span,
.ranked-candidate-quote span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.ranked-candidate-quote { text-align: right; }
.ranked-candidate-quote strong { font-variant-numeric: tabular-nums; }
.ranked-candidate-action { min-height: 1px; }
.ranked-candidate-row .small.active { border-color: #087f5b; background: #ecfdf3; color: #067647; }
.manual-selection-actions { display: flex; justify-content: flex-end; margin: 10px 0 12px; }
.recommendation-divider { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; color: var(--muted); font-size: 12px; }
.recommendation-divider::after { flex: 1; height: 1px; background: #e6edf5; content: ""; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.action-list { display: grid; gap: 8px; }
.action-item {
  display: grid;
  grid-template-columns: 58px minmax(170px, 1fr) 90px 110px auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #e6edf5;
  border-left: 4px solid #98a2b3;
  border-radius: 6px;
  padding: 10px 12px;
}
.action-item.buy { border-left-color: #d92d20; }
.action-item.sell, .action-item.sell_all { border-left-color: #079455; }
.action-item.sell_all { background: #fff5f5; }
.action-item > div > span,
.action-security span { display: block; font-size: 12px; }
.action-security strong { display: block; font-size: 15px; }
.action-badge { font-weight: 800; }
.action-item.buy .action-badge { color: #b42318; }
.action-item.sell .action-badge,
.action-item.sell_all .action-badge { color: #067647; }

.weight-track { height: 5px; overflow: hidden; border-radius: 999px; background: #e9eef5; margin-bottom: 10px; }
.weight-track span { display: block; height: 100%; background: var(--accent); }

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.ranking-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #e6edf5;
  border-radius: 6px;
  padding: 9px 10px;
}
.ranking-item.target { background: #f4fbf9; border-color: #b7dfd7; }
.ranking-item.entered { border-color: #f5b82e; background: #fff8df; box-shadow: inset 4px 0 #f0a600; }
.ranking-item.exited { border-color: #f3b8b8; background: #fff5f5; box-shadow: inset 4px 0 #d92d20; }
.ranking-item strong,
.ranking-item span { display: block; }
.ranking-item div span { font-size: 12px; }
.rank-number {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef2f6;
  color: #344054;
  font-weight: 800;
}
.ranking-item.target .rank-number { background: var(--accent); color: #fff; }
.rank-change { color: #667085; font-size: 12px; font-weight: 750; }
.rank-change.up, .rank-change.new { color: #d92d20; }
.rank-change.down { color: #079455; }
.rank-change.entered-target { color: #a46100; }
.rank-change.exited-target { color: #b42318; }
.rank-change.holding { color: #175cd3; }
.rank-change.limit-up { color: #d92d20; }
.rank-change.limit-down { color: #079455; }

.compare-top-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.compare-top-list .ranking-item {
  grid-template-columns: 32px minmax(0, 1fr) auto;
}
.compare-top-list .compare-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  justify-content: flex-end;
  align-items: center;
}
.compare-top-list .compare-badges .rank-change {
  display: inline-flex;
  white-space: nowrap;
}

.compare-topn-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}
.compare-topn-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #1c2430;
}
.compare-topn-row input {
  width: 56px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}
.compare-block { margin-bottom: 10px; }
.compare-block h4 { margin: 0 0 6px; font-size: 13px; color: #344054; }
.compare-list-title { margin: 12px 0 6px; font-size: 13px; color: #344054; }
.compare-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 5px 8px;
  border-bottom: 1px dashed #e6edf5;
  font-size: 13px;
}
.compare-row strong { min-width: 0; }
.compare-row span { color: var(--muted); }
.compare-row .rank-number { width: 22px; height: 22px; font-size: 12px; }

.compare-dropped-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 99px;
  background: #fee4e2;
  color: #b42318;
  font-size: 11px;
  font-weight: 700;
}

.signal-target-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.signal-target-changes span { border-radius: 6px; padding: 7px 10px; font-size: 13px; font-weight: 700; }
.target-change-entered { background: #fff1c7; color: #8b5b00; }
.target-change-exited { background: #fee4e2; color: #b42318; }

.smallcap-record-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.smallcap-record-grid form { margin-top: 12px; }
.form-edit-status { margin-top: 10px; color: #175cd3; font-size: 13px; }
.records-table-panel table { min-width: 620px; }

.mutual-app .topbar p {
  max-width: 760px;
}

.mutual-metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.mutual-account-overview {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(4, minmax(130px, .85fr));
  margin-top: 14px;
  border-top: 1px solid #dbe5ef;
  border-bottom: 1px solid #dbe5ef;
  background: #fff;
}

.mutual-account-overview > div { min-width: 0; padding: 16px 18px; border-right: 1px solid #e6edf5; }
.mutual-account-overview > div:last-child { border-right: 0; }
.mutual-account-overview span,
.mutual-account-overview small { display: block; color: var(--muted); font-size: 12px; }
.mutual-account-overview strong { display: block; margin: 5px 0 3px; font-size: 20px; }
.mutual-account-overview .mutual-account-value strong { font-size: 30px; }

.mutual-compact-status {
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid #e6edf5;
  border-radius: 6px;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.mutual-review-shortcut {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  border-color: #fedf89;
  background: #fffaeb;
  color: #7a2e0e;
  text-align: left;
}

.mutual-review-shortcut[hidden],
.mutual-choice-group[hidden],
#mfPlanCancelEditBtn[hidden] { display: none !important; }

.mutual-review-shortcut strong {
  min-width: 26px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #f79009;
  color: #fff;
  text-align: center;
}

.mutual-review-shortcut small { color: #b54708; font-weight: 700; }

.mutual-view-tabs {
  display: flex;
  gap: 22px;
  margin-top: 18px;
  border-bottom: 1px solid #dbe5ef;
}

.mutual-view-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 2px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.mutual-view-tabs button.active { border-bottom-color: #1677ff; color: #1677ff; }
.mutual-holdings-view { margin-top: 16px; }
.mutual-heading-actions { display: flex; align-items: center; gap: 10px; }
.mutual-heading-actions button { padding: 6px 10px; font-size: 13px; }

.mutual-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-top: 8px;
  border: 1px solid #e6edf5;
  border-radius: 6px;
  padding: 6px 8px;
  background: #f8fafc;
}

.mutual-bulk-toolbar > span { margin-left: auto; color: var(--muted); font-size: 12px; }
.mutual-bulk-toolbar button { padding: 5px 9px; }
.mutual-select-cell { width: 34px; min-width: 34px; text-align: center; }
.mutual-select-cell input { width: 18px; height: 18px; margin: 0; }

.mutual-holding-insights {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr);
  gap: 10px;
  margin-top: 10px;
}

.mutual-weight-card,
.mutual-contribution-card {
  min-width: 0;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.mutual-insight-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mutual-insight-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.mutual-insight-head strong {
  color: var(--text);
  font-size: 15px;
}

.mutual-valuation-card {
  grid-column: 1 / -1;
}

/* 15 行排成多列：每行只占 220px 出头，单列排下来横向会空掉一大半（1180px 里只用掉 200px），
   纵向还要堆 450px 高。列数交给 auto-fill，窄屏自然退回一列。 */
.mutual-valuation-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0 22px;
  margin: 6px 0 0;
  padding: 0;
}

.mutual-valuation-list li {
  min-width: 0;
  padding: 6px 0;
  border-top: 1px solid #f1f5f9;
}

.mv-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.mv-name {
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mv-pct {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* 条：填充宽度＝分位，竖线＝加码线。低于加码线的转橙——沿用"橙色＝有动作可做"，
   不用红/绿（那是涨跌色，用来表达"便宜"会被读成方向）。 */
.mv-bar {
  position: relative;
  height: 6px;
  margin: 5px 0 4px;
  border-radius: 3px;
  background: #eef2f7;
}

.mv-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--p);
  border-radius: 3px;
  background: #cbd5e1;
}

.mv-cheap .mv-bar i { background: #f59e0b; }

/* 加码线刻度加白描边：分位越高，线越落在填充里面，同色系会糊在一起。 */
.mv-bar b {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: var(--l);
  width: 2px;
  background: #475569;
  box-shadow: 0 0 0 1px #fff;
}

.mv-cheap .mv-pct { color: #b54708; }

.mv-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.mv-meta em { font-style: normal; }

.mv-count { color: #b54708; font-style: normal; }

.mutual-valuation-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

/* 2026-09-29 双池改造：池切换开关、30% 分组分隔、热门池展开、行内详情与悬停浮层 */
.mv-pool-switch {
  display: inline-flex;
  margin-left: 4px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.mv-pool-switch button {
  border: 0;
  background: transparent;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.mv-pool-switch button + button { border-left: 1px solid #e4e9f0; }

.mv-pool-switch button.active {
  background: #eef4ff;
  color: #1f4ed8;
  font-weight: 700;
}

.mutual-valuation-list li.mv-group-divider {
  grid-column: 1 / -1;
  padding: 3px 0 2px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  letter-spacing: .5px;
}

.mutual-valuation-list li.mv-expand {
  grid-column: 1 / -1;
  padding: 6px 0 2px;
  text-align: center;
}

.mutual-valuation-list li.mv-expand button {
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fff;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.mutual-valuation-list li.mv-expand button:hover { background: #f8fafc; color: var(--text); }

.mv-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.mutual-valuation-list li[data-vcode] { cursor: pointer; }

.mv-detail {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.mutual-valuation-card { position: relative; }

.mv-hover {
  position: absolute;
  top: 34px;
  left: 12px;
  z-index: 6;
  max-width: min(420px, 86%);
  padding: 6px 10px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 27, 45, .14);
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.6;
  pointer-events: none;
}

.mv-hover[hidden] { display: none; }

/* 加码提示：橙色作"有动作可做"，刻意不用红/绿——那是涨跌色（A 股红涨绿跌），
   拿来表达"便宜"会被读成方向。 */
.status-badge.plan-add {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #b54708;
  margin-right: 0;
}

.mutual-sip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mutual-sip-head .status-badge {
  min-height: 20px;
  font-size: 11px;
  padding: 0 6px;
}

.mutual-sip-note {
  color: var(--muted);
  font-size: 11px;
}

.mutual-weight-bar {
  display: flex;
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #eef2f6;
}

.mutual-weight-bar span {
  min-width: 2px;
}

.mutual-weight-list,
.mutual-contribution-columns ul {
  list-style: none;
  margin: 9px 0 0;
  padding: 0;
}

.mutual-weight-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 12px;
}

.mutual-weight-list li {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  color: #344054;
  font-size: 12px;
}

.mutual-weight-list i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.mutual-weight-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mutual-weight-list strong {
  font-size: 12px;
}

.mutual-weight-list em {
  display: none;
}

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

.mutual-contribution-columns h3 {
  margin: 0;
  color: #667085;
  font-size: 12px;
}

.mutual-contribution-columns li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding-top: 6px;
  border-bottom: 1px solid #f1f4f8;
  font-size: 12px;
}

.mutual-contribution-columns li div {
  min-width: 0;
}

.mutual-contribution-columns li span,
.mutual-contribution-columns li small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mutual-contribution-columns li small,
.mutual-contribution-columns li em {
  color: var(--muted);
  font-style: normal;
}

.mutual-contribution-columns li b {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
}

.mutual-contribution-columns li b.positive { background: var(--up); }
.mutual-contribution-columns li b.negative { background: var(--down); }

.mutual-empty-mini {
  display: block !important;
  color: var(--muted);
}

.mutual-holding-groups { border-top: 1px solid #dbe5ef; }
.mutual-platform-group { border-bottom: 1px solid #dbe5ef; }
.mutual-platform-group > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  background: #f8fafc;
}
.mutual-platform-group > header strong,
.mutual-platform-group > header span { display: block; }
.mutual-platform-group > header span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.mutual-platform-total { text-align: right; }
.mutual-platform-total strong { font-size: 15px; }

.mutual-holding-list { background: #fff; }
.mutual-holding-columns {
  display: grid;
  grid-template-columns: minmax(250px, 1.7fr) minmax(120px, .7fr) minmax(120px, .7fr) minmax(100px, .55fr);
  padding: 7px 10px;
  border-bottom: 1px solid #eef2f6;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.mutual-holding-columns span:first-child { text-align: left; }
.mutual-holding-row {
  display: grid;
  grid-template-columns: minmax(250px, 1.7fr) minmax(120px, .7fr) minmax(120px, .7fr) minmax(100px, .55fr);
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: right;
}
.mutual-holding-row:last-child { border-bottom: 0; }
.mutual-holding-row:hover,
.mutual-holding-row:focus-visible { background: #f5f9ff; }
.mutual-holding-row span { min-width: 0; }
.mutual-holding-row strong,
.mutual-holding-row small { display: block; }
.mutual-holding-row small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.mutual-holding-row .mutual-fund-name { text-align: left; }
.mutual-fund-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mutual-full-table { margin-top: 14px; }
.mutual-position-cards { display: none; }
.mutual-compact-holdings-table { width: 100%; min-width: 0; table-layout: fixed; }
.mutual-compact-holdings-table .mutual-col-select { width: 42px; }
.mutual-compact-holdings-table .mutual-col-fund { width: 20%; }
.mutual-compact-holdings-table .mutual-col-position { width: 12%; }
.mutual-compact-holdings-table .mutual-col-cost { width: 10%; }
.mutual-compact-holdings-table .mutual-col-nav { width: 11%; }
.mutual-compact-holdings-table .mutual-col-estimate { width: 15%; }
.mutual-compact-holdings-table .mutual-col-pnl { width: 15%; }
.mutual-compact-holdings-table .mutual-col-actions { width: 176px; }
.mutual-holdings-table .table-wrap { overflow-x: hidden; }
.mutual-compact-holdings-table th,
.mutual-compact-holdings-table td { min-width: 0; white-space: normal; }
.mutual-holding-fund-cell,
.mutual-holding-stack { min-width: 0; }
.mutual-holding-fund-cell { vertical-align: middle; overflow: hidden; }
.mutual-holding-fund-cell > * { display: block; }
.mutual-holding-fund-cell .link-button { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; max-width: 100%; margin: 3px 0; }
.mutual-holding-fund-cell .mutual-fund-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.mutual-holding-fund-cell .mutual-sip-badge { flex: 0 0 auto; margin-left: 0; }
.mutual-holding-fund-cell small,
.mutual-holding-stack small { color: var(--muted); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.mutual-holding-stack small.positive { color: var(--up); }
.mutual-holding-stack small.negative { color: var(--down); }
.mutual-holding-platform { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; max-width: 100%; overflow: hidden; white-space: nowrap; }
.mutual-holding-stack { vertical-align: middle; }
.mutual-holding-stack > strong,
.mutual-holding-stack > small { display: block; }
.mutual-holding-stack > strong { margin-bottom: 3px; }
.mutual-holding-stack > strong span { font-size: 11px; font-weight: 650; }
.mutual-actions-cell { vertical-align: middle; }
.mutual-compact-holdings-table .mutual-row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.mutual-compact-holdings-table .mutual-row-actions .small { min-width: 0; margin: 0; padding: 6px 7px; }
.mutual-compact-holdings-table .mutual-row-actions .small:first-child { grid-column: 1 / -1; }

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #175cd3;
  font: inherit;
  font-weight: 750;
  text-align: left;
}

.link-button:hover,
.link-button:focus-visible { text-decoration: underline; }

.mutual-compact-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f6;
  background: #fbfcfe;
}

.mutual-compact-filters label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mutual-compact-filters select,
.mutual-compact-filters input {
  min-height: 28px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.mutual-compact-filters input { width: 160px; }

.mutual-filter-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mutual-workspace {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr);
  gap: 14px;
  align-items: start;
}
.mutual-workspace[hidden],
.mutual-workspace-view[hidden] { display: none !important; }

.mutual-record-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mutual-section {
  margin-top: 14px;
}

.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 6px;
  margin-right: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.platform-icon-alipay {
  background: #1677ff !important;
  border-radius: 7px;
  font-size: 15px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.platform-icon-cmb {
  background: #d71920 !important;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-family: Arial, sans-serif;
  letter-spacing: -1px;
}

.platform-icon-jpm {
  width: 34px;
  min-width: 34px;
  background: #1f4e79 !important;
  border-radius: 4px;
  font-size: 9px;
  letter-spacing: 0;
}

.platform-icon-huaan {
  background: #fff !important;
  border: 2px solid #1f5f9e;
  color: #1f5f9e;
  border-radius: 4px;
  font-size: 15px;
  font-family: Arial, sans-serif;
}

.mutual-platform-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.mutual-platform-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #e6edf5;
  border-radius: 6px;
  padding: 2px 8px 2px 2px;
  background: #fbfcfe;
  color: var(--muted);
  font-size: 12px;
}

.mutual-sip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  border: 1px solid #82b7ff;
  border-radius: 50%;
  color: #1769d1;
  background: #eef6ff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: 1px;
}

.mutual-note,
.mutual-warning-list p {
  margin: 8px 0 0;
  border: 1px solid #fedf89;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  padding: 8px 10px;
  font-size: 12px;
}

.mutual-warning-list:empty {
  display: none;
}

.mutual-field-invalid { color: #b42318; }
.mutual-field-invalid input,
.mutual-field-invalid select,
.mutual-field-invalid textarea,
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #d92d20;
  background: #fff6f5;
}
.mutual-field-error {
  display: block;
  margin-top: 4px;
  color: #b42318;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.mutual-cost-suggestion {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: -4px 0 0;
  border: 1px solid #fecdca;
  border-left: 3px solid #d92d20;
  border-radius: 6px;
  background: #fff6f5;
  padding: 8px 10px;
  color: #7a271a;
  font-size: 12px;
  line-height: 1.45;
}
.mutual-cost-suggestion .small { min-height: 30px; padding: 4px 8px; }

.mutual-batch-preview {
  margin-bottom: 12px;
  border: 1px solid #dbe5ef;
  border-radius: 6px;
  overflow: hidden;
  background: #f8fafc;
}

.mutual-batch-head,
.mutual-batch-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.mutual-batch-head {
  padding: 9px 10px;
  border-bottom: 1px solid #dbe5ef;
  color: var(--muted);
  font-size: 12px;
}

.mutual-batch-list {
  max-height: 360px;
  overflow: auto;
}

.mutual-batch-list button {
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #e6edf5;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.mutual-batch-list button:hover,
.mutual-batch-list button:focus-visible {
  background: #eef6ff;
}

.mutual-batch-list button:last-child {
  border-bottom: 0;
}

.mutual-batch-list button:disabled {
  cursor: default;
  background: #f8fafc;
  color: #94a3b8;
}

.mutual-batch-list button span:last-child {
  text-align: right;
}

.mutual-batch-list strong,
.mutual-batch-list small {
  display: block;
}

.mutual-batch-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.mutual-edit-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(15, 23, 42, .28);
}

.mutual-edit-dialog::backdrop {
  background: rgba(15, 23, 42, .48);
}

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

.mutual-dialog-head h2 {
  margin: 2px 0 0;
}

.mutual-dialog-status {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.mutual-field-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.mutual-nav-state {
  display: inline-block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.mutual-nav-state.updated_today {
  color: #087f5b;
  font-weight: 700;
}

.mutual-nav-state.estimate {
  color: #b45309;
  font-weight: 700;
}

.mutual-data-tag,
.mutual-data-source {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.mutual-data-tag {
  width: fit-content;
  padding: 1px 5px;
  border-radius: 999px;
  background: #fff7e6;
  color: #9a6700;
  font-weight: 700;
}

.mutual-data-source.warning {
  color: #b54708;
  font-weight: 700;
}

.mutual-row-actions {
  white-space: nowrap;
}

.mutual-row-actions .small + .small {
  margin-left: 6px;
}

.mutual-adjustment {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.mutual-pending-records,
.mutual-transaction-records {
  margin-top: 10px;
}

.mutual-pending {
  color: #b54708;
  font-weight: 700;
}

.mutual-plan-terminated {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.mutual-fund-dialog {
  width: min(940px, calc(100vw - 28px));
}

.mutual-fund-summary {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) repeat(2, minmax(130px, .75fr));
  gap: 0;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  overflow: hidden;
  background: #fbfcfe;
}

.mutual-fund-summary > div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid #e6edf5;
}

.mutual-fund-summary > div:last-of-type { border-right: 0; }
.mutual-fund-summary span,
.mutual-fund-summary small,
.mutual-plan-list span { display: block; color: var(--muted); font-size: 12px; }
.mutual-fund-summary strong { display: block; margin-top: 4px; font-size: 20px; }
.mutual-fund-amount strong { font-size: 30px; }

.mutual-fund-performance-summary {
  margin-top: 14px;
  border-top: 1px solid #dbe5ef;
  border-bottom: 1px solid #dbe5ef;
}
.mutual-period-returns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mutual-period-returns div { padding: 10px 12px; border-right: 1px solid #e6edf5; }
.mutual-period-returns div:last-child { border-right: 0; }
.mutual-period-returns span { display: block; color: var(--muted); font-size: 12px; }
.mutual-period-returns strong { display: block; margin-top: 4px; font-size: 17px; }
.mutual-drawdown-note { margin: 0; padding: 9px 12px; border-top: 1px solid #e6edf5; color: var(--muted); font-size: 12px; }
.mutual-drawdown-note strong { margin: 0 3px; }
.chart-grid { stroke: #e9eef5; stroke-width: 1; }
.chart-grid.vertical { stroke-dasharray: 3 5; }
.chart-endpoint { fill: #d92d20; stroke: #fff; stroke-width: 2; }
.chart-value-label { font-weight: 700; fill: #344054; }
.chart-drawdown-marker { stroke: #1677ff; stroke-width: 1.4; stroke-dasharray: 5 5; }
.chart-drawdown-bracket { stroke: #175cd3; stroke-width: 2; }
.chart-drawdown-point { fill: #1677ff; stroke: #fff; stroke-width: 2; }
.chart-drawdown-label { fill: #175cd3; font-weight: 700; }
/* 收益曲线图例与端点：收益线用主题蓝，端点同步蓝（回测默认红色不适用于收益口径）。 */
.performance-chart .chart-endpoint { fill: var(--accent); }
.mf-legend-line { fill: none; stroke-width: 3; stroke-linecap: round; }
.mf-legend-return { stroke: var(--accent); }
.mf-legend-cost { stroke: #667085; stroke-dasharray: 4 5; opacity: .86; }
.mf-legend-return-text { fill: var(--accent); font-weight: 700; font-size: 12px; }
.mf-legend-cost-text { fill: #667085; font-size: 12px; }

.mutual-fund-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #e6edf5;
  background: #fff;
}

.mutual-fund-facts div { padding: 12px 14px; border-right: 1px solid #e6edf5; }
.mutual-fund-facts div:last-child { border-right: 0; }
.mutual-fund-facts dt { color: var(--muted); font-size: 12px; }
.mutual-fund-facts dd { margin: 5px 0 0; font-weight: 700; }
.mutual-fund-facts dd small { display: inline; margin-left: 4px; }

.mutual-detail-tabs {
  display: flex;
  gap: 22px;
  margin-top: 16px;
  border-bottom: 1px solid #dbe5ef;
}

.mutual-detail-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 2px;
  background: transparent;
  color: var(--muted);
}

.mutual-detail-tabs button.active { border-bottom-color: #1677ff; color: #1677ff; font-weight: 700; }
.mutual-chart-ranges { display: flex; gap: 4px; margin-left: auto; padding-bottom: 6px; }
.mutual-chart-ranges button {
  border: 1px solid #d0ddeb;
  border-bottom: 1px solid #d0ddeb;
  border-radius: 4px;
  padding: 5px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.mutual-chart-ranges button.active { border-color: #1677ff; background: #eef6ff; color: #175cd3; }
.mutual-fund-chart { min-height: 190px; margin-top: 10px; }
.mutual-detail-section { margin-top: 18px; }
.mutual-detail-section h3 { margin: 0; font-size: 16px; }

.mutual-plan-list { display: grid; gap: 8px; }
.mutual-plan-list article { border: 1px solid #e6edf5; border-radius: 6px; padding: 10px; background: #fbfcfe; }

.mutual-edit-dialog form {
  display: grid;
  gap: 12px;
}

.mutual-dialog-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.mutual-confirm-dialog { width: min(520px, calc(100vw - 28px)); }

.mutual-choice-group {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.mutual-choice-group legend { margin-bottom: 8px; font-weight: 750; }
.mutual-choice-group label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin: 0;
  border: 1px solid #dbe5ef;
  border-radius: 7px;
  padding: 10px;
  background: #fbfcfe;
}
.mutual-choice-group input { width: 18px; height: 18px; margin-top: 2px; }
.mutual-choice-group strong,
.mutual-choice-group small { display: block; }
.mutual-choice-group small { margin-top: 2px; color: var(--muted); line-height: 1.45; }
.mutual-warning-text { color: #b54708; font-size: 12px; line-height: 1.55; }
.mutual-choice-actions { display: grid; gap: 8px; }

.mutual-platform-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mutual-platform-breakdown article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #e6edf5;
  border-radius: 6px;
  padding: 10px;
  background: #fbfcfe;
}

.mutual-platform-breakdown strong,
.mutual-platform-breakdown span {
  display: block;
}

.mutual-platform-breakdown span {
  color: var(--muted);
  font-size: 12px;
}

.mutual-import-panel textarea {
  min-height: 190px;
}

.mutual-preview-panel form,
.mutual-record-grid form {
  margin-top: 8px;
}


.settings-subhead { display: flex; align-items: center; justify-content: space-between; }
.inline-check { display: inline-flex; align-items: center; width: auto; gap: 6px; margin: 0; }
.inline-check input { width: auto; }
.ticker-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.ticker-options label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 1px solid #e6edf5;
  border-radius: 6px;
  margin: 0;
  padding: 8px;
}
.ticker-options input { width: auto; }
.ticker-options small { color: #667085; }

@media (max-width: 900px) {
  .smallcap-metrics,
  .mutual-metrics,
  .smallcap-workspace,
  .mutual-workspace,
  .smallcap-record-grid,
  .mutual-record-grid,
  .ranking-grid,
  .recommendation-summary,
  .mutual-platform-breakdown { grid-template-columns: 1fr; }
  .action-item { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .action-item > div:not(.action-security):not(.action-badge) { display: none; }
  .smallcap-status-banner { display: grid; }
  .mutual-fund-summary,
  .mutual-fund-facts { grid-template-columns: 1fr 1fr; }
  .mutual-period-returns { grid-template-columns: 1fr 1fr; }
  .mutual-period-returns div:nth-child(2) { border-right: 0; }
  .mutual-period-returns div:nth-child(n+3) { border-top: 1px solid #e6edf5; }
  .mutual-fund-summary > div:nth-child(2) { border-right: 0; }
  .mutual-fund-summary > div:nth-child(3) { border-top: 1px solid #e6edf5; }
  .mutual-fund-facts div:nth-child(2) { border-right: 0; }
  .mutual-fund-facts div:nth-child(n+3) { border-top: 1px solid #e6edf5; }
  .smallcap-home-summary { grid-template-columns: 1fr auto; }
  .smallcap-home-values { grid-column: 1 / -1; order: 3; overflow-x: auto; }
}

@media (max-width: 900px) {
  .topbar, .two-tables, .backtest-form {
    display: grid;
  }

  .two-tables { grid-template-columns: minmax(0, 1fr); }

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

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

.overview-item:nth-child(2) {
  border-right: 0;
}

  .overview-item:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .overview-meta {
    flex-wrap: wrap;
    gap: 6px 18px;
  }

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

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

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

  .ranked-candidate-row {
    grid-template-columns: 18px 26px minmax(0, 1fr) 64px 54px;
    gap: 6px;
    padding: 8px;
  }
  .ranked-candidate-main span { font-size: 11px; }
  .ranked-candidate-quote span { display: none; }
  .ranked-candidate-row .small { min-width: 0; padding: 6px 7px; }

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

  .overview-item,
  .overview-item:nth-child(2) {
    min-height: 82px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .overview-item:last-child {
    border-bottom: 0;
  }

  .overview-meta {
    display: grid;
  }
}

@media (max-width: 900px) {
  .mutual-account-overview { grid-template-columns: 1fr 1fr; }
  .mutual-account-overview > div:nth-child(even) { border-right: 0; }
  .mutual-account-overview > div:nth-child(n+3) { border-top: 1px solid #e6edf5; }
  .mutual-holding-insights { grid-template-columns: 1fr; }
  /* 估值卡标题窄屏改上下堆叠：并排时左侧标题和右侧"低→高｜N 个低于…"各折两行，
     还断在词中间；堆叠后标题一行、摘要一行，读着顺。 */
  .mutual-valuation-card .mutual-insight-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    /* keep-all：不加这句「加码线」会被拆成「加」/「码线」两行。 */
    word-break: keep-all;
  }
  .mutual-holding-row { grid-template-columns: minmax(0, 1.3fr) minmax(84px, .7fr) minmax(84px, .7fr); gap: 8px; }
  .mutual-holding-columns { grid-template-columns: minmax(0, 1.3fr) minmax(84px, .7fr) minmax(84px, .7fr); gap: 8px; }
  .mutual-holding-columns span:last-child { display: none; }
  .mutual-holding-change { display: none; }
}

@media (max-width: 560px) {
  .mutual-app .topbar { align-items: flex-start; }
  .mutual-app .topbar .actions { justify-content: flex-start; }
  .mutual-app .topbar .actions .button-link { display: none; }
  .mutual-account-overview > div { padding: 13px 12px; }
  .mutual-account-overview .mutual-account-value strong { font-size: 24px; }
  .mutual-account-overview strong { font-size: 17px; }
  .mutual-view-tabs { gap: 18px; overflow-x: auto; }
  .mutual-view-tabs button { flex: 0 0 auto; }
  .mutual-heading-actions span { display: none; }
  .mutual-bulk-toolbar { position: sticky; top: 0; z-index: 3; margin-right: -4px; margin-left: -4px; box-shadow: 0 5px 14px rgba(15, 23, 42, .06); }
  .mutual-select-table th:first-child,
  .mutual-select-table td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; }
  .mutual-select-table th:last-child,
  .mutual-select-table td:last-child { position: sticky; right: 0; z-index: 2; min-width: 86px; background: #fff; box-shadow: -5px 0 10px rgba(15, 23, 42, .05); }
  .mutual-select-table thead th:first-child,
  .mutual-select-table thead th:last-child { z-index: 3; background: #f8fafc; }
  .mutual-row-actions { white-space: normal; }
  .mutual-row-actions .small { margin: 2px 3px 2px 0; }
  .mutual-row-actions .small + .small { margin-left: 0; }
  .mutual-holding-row { min-height: 64px; padding: 8px 4px; grid-template-columns: minmax(0, 1.15fr) minmax(76px, .65fr) minmax(76px, .65fr); }
  .mutual-holding-columns { padding: 7px 4px; grid-template-columns: minmax(0, 1.15fr) minmax(76px, .65fr) minmax(76px, .65fr); }
  .mutual-holding-row strong { font-size: 13px; }
  .mutual-holding-row small { font-size: 11px; }
  .mutual-platform-group > header { padding: 0 4px; }
  .mutual-detail-tabs { gap: 12px; flex-wrap: wrap; }
  .mutual-chart-ranges { width: 100%; margin-left: 0; }
}

/* Single-user access page. It remains intentionally compact so the tool, not a landing page, is the first real screen. */
.login-page {
  min-height: 100vh;
  background: #edf2f5;
}

.login-shell {
  width: min(900px, calc(100vw - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  align-items: center;
  gap: clamp(36px, 7vw, 96px);
}

.login-intro { max-width: 440px; }
.login-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #8fcac0;
  border-radius: 8px;
  background: #e8f5f2;
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 800;
}
.login-eyebrow { margin: 22px 0 8px; color: var(--accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.login-intro h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.12; }
.login-intro > p:not(.login-eyebrow) { max-width: 340px; margin-top: 12px; color: #526070; font-size: 15px; }

.login-card {
  display: grid;
  gap: 22px;
  border: 1px solid #d8e2e8;
  border-radius: 8px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 16px 48px rgba(28, 36, 48, .10);
}
.login-card-kicker { color: var(--accent-dark); font-size: 12px; font-weight: 750; }
.login-card h2 { margin-top: 5px; font-size: 22px; }
.login-card > div > p { margin-top: 5px; font-size: 13px; }
.login-card form { display: grid; gap: 9px; }
.login-card form > label { margin: 0; color: #475467; font-size: 13px; font-weight: 700; }
.login-password-row { position: relative; }
.login-password-row input { min-height: 46px; padding-right: 64px; }
.login-icon-button {
  position: absolute;
  top: 5px;
  right: 5px;
  min-height: 36px;
  border: 0;
  padding: 0 9px;
  color: var(--accent-dark);
  font-size: 12px;
}
.login-status { min-height: 18px; margin: 0; color: #b42318; font-size: 12px; }
.login-submit { width: 100%; min-height: 46px; margin-top: 2px; }
.login-footnote { margin: 0; color: #667085; font-size: 12px; }

.mobile-product-nav { display: none; }

@media (max-width: 680px) {
  .app {
    width: min(100% - 24px, 1220px);
    padding: 14px 0 28px;
  }

  .topbar {
    display: grid;
    align-items: start;
    gap: 12px;
    margin-bottom: 14px;
  }

  .topbar h1 { font-size: 22px; }
  .topbar p { font-size: 12px; }
  .actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .actions > * { width: 100%; min-width: 0; }
  .actions .strategy-picker { grid-column: 1 / -1; width: 100%; }
  .actions .logout-link { grid-column: auto; }
  .actions .topbar-more { width: 100%; }
  .actions .topbar-more > summary { width: 100%; min-height: 42px; }
  .topbar-menu { position: fixed; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); top: auto; width: min(220px, calc(100vw - 24px)); }
  .mutual-app .topbar .actions .button-link { display: inline-flex; }
  .button-link,
  button { min-height: 42px; padding: 0 10px; font-size: 13px; }
  input,
  textarea,
  select { min-height: 42px; font-size: 16px; }
  textarea { min-height: 120px; }

  .panel { padding: 12px; }
  .panel-head { align-items: flex-start; gap: 8px; }
  .panel-head > div:first-child { min-width: 0; }
  .panel-tools,
  .performance-toolbar,
  .record-actions { width: 100%; justify-content: flex-start; }
  .panel-head:has(.panel-tools),
  .performance-title-row { display: grid; }
  .backup-restore { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .backup-restore > button { width: 100%; }
  .performance-title-row > div { min-width: 0; }
  .performance-title-row .data-pill { justify-self: start; }
  .period-tabs {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .period-tabs::-webkit-scrollbar { display: none; }
  .period-tab { flex: 0 0 auto; min-height: 36px; }

  .rotation-hint { display: grid; padding: 12px; }
  .rotation-hint div { min-width: 0; }
  .rotation-hint p { text-align: left; font-size: 12px; }
  .overview-meta { padding: 9px 12px; }
  .account-module-strip { grid-template-columns: 1fr; gap: 8px; }
  .smallcap-home-summary { gap: 8px; padding: 10px; }
  .smallcap-home-values { gap: 8px 14px; }
  .smallcap-home-values span { min-width: 105px; }

  .performance-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .performance-stats > div { padding: 9px 7px; }
  .performance-stats strong { font-size: 15px; }
  .metric-note { font-size: 11px; }
  .performance-toolbar > #performanceStatus {
    flex: 1 0 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .pool-chart,
  .mutual-fund-chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pool-chart svg,
  .mutual-fund-chart svg { min-width: 620px; }
  .performance-chart { overflow: hidden; }
  .performance-chart svg { min-width: 0; }

  .table-wrap { margin-right: -12px; margin-left: -12px; padding: 0 12px; }
  th, td { padding: 9px 10px; }
  .table-wrap::after { content: "左右滑动查看完整数据"; display: block; padding: 6px 0 2px; color: #667085; font-size: 11px; text-align: right; }
  .holding-cards { grid-template-columns: 1fr; }
  .holding-card { padding: 12px; }

  .smallcap-operation-dialog,
  .mutual-edit-dialog,
  .settings-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 14px; }
  .smallcap-operation-dialog { padding: 14px; }
  .smallcap-operation-dialog-head,
  .mutual-dialog-head { position: sticky; top: -14px; z-index: 2; padding: 4px 0 10px; background: #fff; }
  .form-actions,
  .mutual-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .form-actions > * { width: 100%; }
  .mutual-fund-summary,
  .mutual-fund-facts { grid-template-columns: 1fr 1fr; }
  .mutual-fund-summary > div:nth-child(2),
  .mutual-fund-facts div:nth-child(2) { border-right: 0; }

  .login-shell {
    width: min(100% - 32px, 460px);
    min-height: 100svh;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 26px;
    padding: max(64px, 12svh) 0 28px;
  }
  .login-intro { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
  .login-mark { grid-row: span 2; width: 42px; height: 42px; }
  .login-eyebrow { margin: 0; }
  .login-intro h1 { font-size: 25px; }
  .login-intro > p:not(.login-eyebrow) { display: none; }
  .login-card { gap: 20px; padding: 22px; }
  .notification-channel-strip { grid-template-columns: 1fr; }
  .notification-channel-strip > div { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 12px; }
  .notification-channel-strip > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .notification-channel-strip strong { margin-top: 0; }
  .notification-control-panel,
  .notification-subscriptions-panel,
  .notification-ops-panel,
  .notification-history-panel { padding: 12px; }
  .notification-control-head { display: grid; gap: 10px; }
  .notification-save-actions { justify-content: space-between; }
  .notification-channel-grid { grid-template-columns: 1fr; }
  .notification-channel-config { padding: 14px 0; }
  .notification-channel-config + .notification-channel-config { border-top: 1px solid var(--line); border-left: 0; padding: 14px 0; }
  .notification-matrix-head,
  .notification-matrix-row { grid-template-columns: minmax(0, 1fr) 54px 54px; }
  .notification-matrix-row small { line-height: 1.35; }
  .notification-ops-grid { grid-template-columns: 1fr; }
  .notification-ops-grid > section { padding: 14px 0; }
  .notification-ops-grid > section + section { border-top: 1px solid var(--line); border-left: 0; padding: 14px 0 0; }
  .smallcap-app .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .smallcap-app .metric { min-height: 76px; padding: 10px; }
  .smallcap-app .metric strong { font-size: 17px; }
  .section-nav,
  .mutual-view-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .section-nav::-webkit-scrollbar,
  .mutual-view-tabs::-webkit-scrollbar { display: none; }
  .section-nav a,
  .mutual-view-tabs button { flex: 0 0 auto; }
  .mutual-account-overview { margin-right: -2px; margin-left: -2px; }
  .mutual-account-overview > div { min-height: 82px; padding: 11px 10px; }
  .mutual-account-overview strong { font-size: 18px; }

  .mutual-holdings-view { min-width: 0; }
  .mutual-holdings-view .mutual-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 10px;
  }
  .mutual-holdings-view .mutual-bulk-toolbar #mfDeleteSelectedPositions { margin-left: auto; }
  .mutual-holdings-table { display: none; }
  .mutual-position-cards {
    display: block;
    margin: 10px 0 16px;
    overflow: hidden;
    border: 1px solid #e6edf5;
    border-radius: 8px;
    background: #fff;
  }
  .mutual-position-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border-bottom: 1px solid #e6edf5;
  }
  .mutual-position-card:last-child { border-bottom: 0; }
  .mutual-position-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
  .mutual-position-card-select {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
  }
  .mutual-position-card-select input { flex: 0 0 auto; min-height: 0; }
  .mutual-position-card-select span { display: inline-flex; align-items: center; gap: 5px; }
  .mutual-position-card-fund {
    display: grid;
    gap: 2px;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
  }
  .mutual-position-card-fund strong,
  .mutual-position-card-fund small {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .mutual-position-card-fund strong { color: #101828; font-size: 15px; line-height: 1.35; }
  .mutual-position-card-fund small { color: #667085; font-size: 12px; font-weight: 500; }
  .mutual-position-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border: 1px solid #eef2f6;
    border-radius: 7px;
    background: #f8fafc;
  }
  .mutual-position-card-metrics > div { min-width: 0; padding: 8px 9px; }
  .mutual-position-card-metrics > div:nth-child(odd) { border-right: 1px solid #eef2f6; }
  .mutual-position-card-metrics > div:nth-child(n+3) { border-top: 1px solid #eef2f6; }
  .mutual-position-card-metrics dt { margin-bottom: 3px; color: #667085; font-size: 11px; }
  .mutual-position-card-metrics dd { display: grid; gap: 1px; min-width: 0; margin: 0; color: #101828; font-size: 13px; }
  .mutual-position-card-metrics dd strong { font-size: 14px; }
  .mutual-position-card-metrics dd small { min-width: 0; color: #667085; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
  .mutual-position-card-metrics dd small.positive,
  .mutual-position-card-metrics dd small.negative { color: inherit; }
  .mutual-position-card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .mutual-position-card-actions .small { width: 100%; min-width: 0; min-height: 42px; margin: 0; }
  .mutual-position-cards-empty { margin: 0; padding: 20px 12px; color: #667085; text-align: center; }

  body:not(.login-page) { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .mobile-product-nav {
    position: fixed;
    z-index: 90;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 3px;
    border: 1px solid rgba(16, 24, 40, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    padding: 5px;
    padding-bottom: max(5px, env(safe-area-inset-bottom));
    box-shadow: 0 12px 32px rgba(16, 24, 40, .16);
    backdrop-filter: blur(14px);
  }
  .mobile-product-nav a {
    display: grid;
    flex: 1 1 0;
    min-width: 0;
    min-height: 42px;
    place-items: center;
    border-radius: 9px;
    color: #667085;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
  }
  .mobile-product-nav a[aria-current="page"] { background: #e8f5f2; color: var(--accent-dark); }
}

/* Global market board: intentionally isolated from account and scoring screens. */
html[data-market-theme="dark"] {
  color-scheme: dark;
  --focus-ring: #d8b96b;
  --market-bg: #08111f;
  --market-panel: #111c2e;
  --market-panel-soft: #152238;
  --market-text: #edf3ff;
  --market-muted: #91a0b8;
  --market-line: #24324a;
  --market-gold: #d8b96b;
  --market-gold-soft: rgba(216, 185, 107, .14);
  --market-up: #f17678;
  --market-down: #48bea0;
  --market-flat: #9ba7ba;
  --market-shadow: rgba(0, 0, 0, .24);
}

html[data-market-theme="light"] {
  color-scheme: light;
  --market-bg: #eef2f7;
  --market-panel: #ffffff;
  --market-panel-soft: #f7f9fc;
  --market-text: #172033;
  --market-muted: #69758a;
  --market-line: #dce2eb;
  --market-gold: #9a7425;
  --market-gold-soft: rgba(154, 116, 37, .10);
  --market-up: #ef4d48;
  --market-down: #2caf57;
  --market-flat: #949aa4;
  --market-shadow: rgba(31, 42, 68, .08);
}

.market-page {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--market-bg);
  color: var(--market-text);
  transition: background-color .18s ease, color .18s ease;
}

.market-shell {
  width: min(820px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 30px 0 calc(46px + env(safe-area-inset-bottom));
}

.market-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  border: 1px solid color-mix(in srgb, var(--market-gold) 36%, var(--market-line));
  border-radius: 24px;
  background: linear-gradient(135deg, var(--market-panel-soft), var(--market-panel));
  padding: 24px;
  box-shadow: 0 18px 48px var(--market-shadow);
}

.market-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.market-brand-mark {
  display: grid;
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 18px;
  background: #0b1930;
  color: var(--market-gold);
  font-size: 42px;
  line-height: 1;
}
html[data-market-theme="light"] .market-brand-mark { background: #f0f4fa; }
.market-brand h1 { margin: 0; color: var(--market-text); font-size: clamp(25px, 5vw, 37px); line-height: 1.12; letter-spacing: -.03em; }
.market-brand p { margin: 7px 0 0; color: var(--market-muted); font-size: 15px; font-weight: 550; }
.market-hero-side { display: grid; align-content: start; justify-items: end; gap: 9px; }
.market-hero-side time { color: var(--market-gold); font-size: 14px; font-weight: 700; white-space: nowrap; }
.market-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--market-gold) 60%, transparent);
  border-radius: 999px;
  background: var(--market-gold-soft);
  color: var(--market-gold);
  padding: 0 13px;
  font-size: 13px;
  font-weight: 750;
}
.market-state-pill::before { content: ""; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--market-flat); }
.market-state-pill.open::before { background: var(--market-down); box-shadow: 0 0 0 4px color-mix(in srgb, var(--market-down) 18%, transparent); }
.market-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.market-action-button {
  min-height: 38px;
  border-color: var(--market-line);
  border-radius: 12px;
  background: var(--market-panel-soft);
  color: var(--market-text);
  padding: 0 13px;
  font-size: 13px;
  text-decoration: none;
}
.market-action-button:hover { border-color: var(--market-gold); }
.market-action-primary { border-color: var(--market-gold); background: var(--market-gold); color: #111827; }
.market-action-button:disabled { opacity: .55; cursor: wait; }

.market-notice {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 2px 0;
  color: var(--market-muted);
  font-size: 12px;
}
.market-notice small { text-align: right; }
.market-section { margin-top: 28px; }
.market-section-head { display: flex; align-items: center; justify-content: space-between; min-height: 42px; margin-bottom: 10px; }
.market-section-head > div { display: flex; align-items: center; gap: 10px; }
.market-section-head i { display: block; width: 6px; height: 26px; border-radius: 4px; background: var(--market-gold); }
.market-section-head h2 { margin: 0; color: var(--market-text); font-size: 21px; }
.market-info-button {
  width: 28px;
  min-height: 28px;
  border-color: var(--market-line);
  border-radius: 50%;
  background: transparent;
  color: var(--market-muted);
  padding: 0;
  font-family: Georgia, serif;
  font-size: 15px;
}

.market-macro-grid,
.market-industry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.market-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--market-line);
  background: var(--market-panel);
  color: var(--market-text);
  box-shadow: 0 8px 22px var(--market-shadow);
  text-align: left;
}
.market-card:hover { border-color: color-mix(in srgb, var(--market-gold) 62%, var(--market-line)); transform: translateY(-1px); }
.market-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--market-gold) 45%, transparent); outline-offset: 2px; }
.market-macro-card { display: grid; min-height: 118px; align-content: start; gap: 5px; border-radius: 16px; padding: 12px 14px; }
.market-industry-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 78px; align-items: center; gap: 8px; border-radius: 15px; padding: 10px 13px; }
.market-card-title { display: flex; align-items: center; min-width: 0; gap: 9px; }
.market-card-title b {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, var(--market-gold) 8%, transparent);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}
.market-card-title strong { min-width: 0; overflow: hidden; color: var(--market-text); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.market-macro-values { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.market-macro-values em { color: var(--market-text); font-size: 21px; font-style: normal; font-weight: 800; letter-spacing: -.02em; }
.market-macro-values strong,
.market-industry-change { font-size: 16px; font-weight: 800; white-space: nowrap; }
.market-card .up,
.market-breadth .up strong,
.market-detail-returns .up { color: var(--market-up); }
.market-card .down,
.market-breadth .down strong,
.market-detail-returns .down { color: var(--market-down); }
.market-card .flat,
.market-breadth .flat strong,
.market-detail-returns .flat { color: var(--market-flat); }
.market-card-status { display: inline-flex; align-items: center; justify-self: start; gap: 5px; color: var(--market-muted); font-size: 10px; font-weight: 650; }
.market-card-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.market-card-status.open { color: var(--market-down); }
.market-card-status.stale,
.market-card-status.cached { color: var(--market-gold); }
.market-card-meta { display: flex; align-items: center; justify-content: space-between; min-width: 0; gap: 8px; }
.market-card-time { overflow: hidden; color: var(--market-muted); font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.market-industry-card .market-card-meta { grid-column: 1 / -1; margin-top: -3px; }
.market-card.unavailable { opacity: .62; }
.market-skeleton { min-height: 98px; border-radius: 16px; overflow: hidden; }
.market-skeleton.compact { min-height: 60px; }
.market-skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, color-mix(in srgb, var(--market-text) 7%, transparent) 48%, transparent 72%); animation: market-shimmer 1.4s infinite; }
@keyframes market-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.market-breadth {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
  border: 1px solid color-mix(in srgb, var(--market-gold) 25%, var(--market-line));
  border-radius: 20px;
  background: var(--market-panel);
  box-shadow: 0 8px 22px var(--market-shadow);
  overflow: hidden;
}
.market-breadth > div { display: grid; justify-items: center; gap: 1px; padding: 12px 8px; }
.market-breadth > div + div { border-left: 1px solid var(--market-line); }
.market-breadth strong { font-size: 28px; line-height: 1.1; }
.market-breadth span { color: var(--market-muted); font-size: 13px; }
.market-footer { margin-top: 26px; border-top: 1px solid var(--market-line); padding-top: 17px; color: var(--market-muted); font-size: 11px; text-align: center; }
.market-footer p { margin: 3px 0; }

.market-detail-dialog,
.market-info-dialog,
.market-share-dialog {
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  border: 1px solid var(--market-line);
  border-radius: 24px;
  background: var(--market-panel);
  color: var(--market-text);
  padding: 0;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
}
.market-detail-dialog::backdrop,
.market-info-dialog::backdrop,
.market-share-dialog::backdrop { background: rgba(2, 7, 15, .72); backdrop-filter: blur(3px); }
.market-detail-dialog > article { padding: 22px; }
.market-detail-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.market-detail-dialog header > div { display: flex; align-items: center; min-width: 0; gap: 12px; }
.market-detail-icon { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: var(--market-panel-soft); font-size: 25px; }
.market-detail-dialog h2,
.market-info-dialog h2 { margin: 0; color: var(--market-text); font-size: 24px; }
.market-detail-dialog header p { margin: 3px 0 0; color: var(--market-muted); font-size: 12px; }
#marketDetailClose { width: 38px; min-height: 38px; border: 0; background: transparent; color: var(--market-muted); padding: 0; font-size: 28px; }
.market-detail-returns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; border: 1px solid var(--market-line); border-radius: 16px; overflow: hidden; }
.market-detail-returns div { display: grid; gap: 4px; padding: 13px; text-align: center; }
.market-detail-returns div + div { border-left: 1px solid var(--market-line); }
.market-detail-returns span { color: var(--market-muted); font-size: 11px; }
.market-detail-returns strong { font-size: 17px; }
.market-detail-facts { display: grid; margin: 18px 0 0; }
.market-detail-facts div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--market-line); padding: 10px 2px; }
.market-detail-facts dt { color: var(--market-muted); }
.market-detail-facts dd { margin: 0; overflow-wrap: anywhere; text-align: right; }
.market-methodology { margin-top: 14px; border-radius: 12px; background: var(--market-panel-soft); padding: 10px 12px; }
.market-methodology summary { color: var(--market-text); cursor: pointer; font-weight: 700; }
.market-methodology p { margin: 9px 0 2px; color: var(--market-muted); font-size: 12px; }
.market-info-dialog > article { display: grid; gap: 18px; padding: 28px; }
.market-info-dialog p { margin: 0; color: var(--market-muted); font-size: 16px; line-height: 1.75; }
.market-info-dialog button { width: 100%; min-height: 48px; }
.market-share-dialog > article { display: grid; gap: 14px; padding: 20px; }
.market-share-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.market-share-dialog h2 { margin: 0; color: var(--market-text); font-size: 21px; }
.market-share-dialog header p { margin: 4px 0 0; color: var(--market-muted); font-size: 12px; }
#marketShareClose { flex: 0 0 38px; width: 38px; min-height: 38px; border: 0; background: transparent; color: var(--market-muted); padding: 0; font-size: 28px; }
.market-share-preview { max-height: min(58svh, 620px); border: 1px solid var(--market-line); border-radius: 16px; background: #08111f; overflow: auto; overscroll-behavior: contain; }
.market-share-preview img { display: block; width: 100%; height: auto; -webkit-touch-callout: default; user-select: auto; }
.market-share-tip { margin: 0; color: var(--market-muted); font-size: 13px; line-height: 1.6; text-align: center; }
.market-share-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.market-share-actions .market-action-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; text-align: center; }
.market-share-actions [hidden] { display: none; }
.market-share-dialog.market-dialog-fallback { position: fixed; inset: 50% auto auto 50%; z-index: 1000; transform: translate(-50%, -50%); }
body.market-share-fallback-open::before { content: ""; position: fixed; inset: 0; z-index: 999; background: rgba(2, 7, 15, .72); }

@media (min-width: 1000px) {
  .market-shell { padding-top: 24px; }
  .market-section { margin-top: 24px; }
  .market-macro-grid,
  .market-industry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .market-macro-card { min-height: 110px; }
  .market-industry-card { min-height: 74px; }
  .market-breadth { margin-top: 20px; }
}

@media (min-width: 1200px) {
  .market-hero {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    border-radius: 18px;
    padding: 18px 20px;
  }
  .market-brand { gap: 12px; }
  .market-brand-mark { flex-basis: 52px; width: 52px; height: 52px; border-radius: 14px; font-size: 32px; }
  .market-brand h1 { font-size: 30px; }
  .market-brand p { margin-top: 4px; font-size: 13px; }
  .market-hero-side { align-content: center; gap: 6px; }
  .market-hero-side time { font-size: 12px; }
  .market-state-pill { min-height: 28px; padding-inline: 11px; font-size: 12px; }
  .market-actions { grid-column: auto; }
}

@media (min-width: 1280px) {
  .market-macro-grid,
  .market-industry-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .market-shell { width: min(100% - 12px, 820px); padding-top: max(6px, env(safe-area-inset-top)); }
  .market-hero { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; border-radius: 15px; padding: 10px; }
  .market-brand { gap: 8px; }
  .market-brand-mark { flex-basis: 38px; width: 38px; height: 38px; border-radius: 10px; font-size: 25px; }
  .market-brand h1 { font-size: clamp(18px, 5.2vw, 23px); }
  .market-brand p { margin-top: 2px; font-size: 10px; }
  .market-hero-side { gap: 4px; }
  .market-hero-side time { font-size: 9px; }
  .market-state-pill { min-height: 22px; padding: 0 7px; font-size: 9px; }
  .market-state-pill::before { width: 5px; height: 5px; margin-right: 5px; }
  .market-actions { gap: 5px; }
  .market-actions { justify-content: stretch; overflow-x: auto; padding-bottom: 1px; scrollbar-width: none; }
  .market-actions::-webkit-scrollbar { display: none; }
  .market-action-button { flex: 1 0 auto; min-height: 30px; border-radius: 9px; padding: 0 8px; font-size: 10px; }
  .market-notice { display: grid; gap: 0; margin: 5px 2px 0; font-size: 10px; line-height: 1.35; }
  .market-notice small { text-align: left; }
  .market-section { margin-top: 12px; }
  .market-section-head { min-height: 28px; margin-bottom: 5px; }
  .market-section-head > div { gap: 7px; }
  .market-section-head i { width: 4px; height: 18px; }
  .market-section-head h2 { font-size: 16px; }
  .market-info-button { width: 24px; min-height: 24px; font-size: 13px; }
  .market-macro-grid,
  .market-industry-grid { gap: 6px; }
  .market-macro-card { min-height: 94px; gap: 3px; border-radius: 11px; padding: 8px 9px; }
  .market-industry-card { min-height: 64px; gap: 5px; border-radius: 11px; padding: 7px 9px; }
  .market-card-title { gap: 5px; }
  .market-card-title b { flex-basis: 22px; width: 22px; height: 22px; border-radius: 6px; font-size: 14px; }
  .market-card-title strong { font-size: clamp(12px, 3.6vw, 14px); }
  .market-macro-values { gap: 4px; }
  .market-macro-values em { font-size: 16px; }
  .market-macro-values strong,
  .market-industry-change { font-size: clamp(11px, 3.3vw, 14px); }
  .market-card-status { gap: 3px; font-size: 8px; line-height: 1; }
  .market-card-status i { width: 4px; height: 4px; }
  .market-card-time { font-size: 8px; }
  .market-industry-card .market-card-meta { margin-top: -4px; }
  .market-skeleton { min-height: 94px; border-radius: 11px; }
  .market-skeleton.compact { min-height: 64px; }
  .market-breadth { margin-top: 10px; border-radius: 11px; }
  .market-breadth > div { padding: 6px 5px; }
  .market-breadth strong { font-size: 19px; }
  .market-breadth span { font-size: 10px; }
  .market-footer { margin-top: 16px; padding-top: 11px; font-size: 10px; }
  .market-detail-dialog { width: 100%; max-width: none; max-height: min(82svh, 720px); margin: auto 0 0; border-radius: 24px 24px 0 0; border-width: 1px 0 0; }
  .market-detail-dialog > article { padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); }
  .market-info-dialog { width: calc(100vw - 20px); border-radius: 20px; }
  .market-info-dialog > article { gap: 15px; padding: 22px 18px; }
  .market-info-dialog h2 { font-size: 22px; text-align: center; }
  .market-info-dialog p { font-size: 15px; }
  .market-share-dialog { width: 100%; max-width: none; max-height: 92svh; margin: auto 0 0; border-radius: 24px 24px 0 0; border-width: 1px 0 0; }
  .market-share-dialog.market-dialog-fallback { inset: auto 0 0; transform: none; }
  .market-share-dialog > article { gap: 11px; padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); }
  .market-share-preview { max-height: 60svh; border-radius: 13px; }
  .market-share-actions { grid-template-columns: 1fr; gap: 7px; }
  .market-product-nav { border-color: var(--market-line); background: color-mix(in srgb, var(--market-panel) 94%, transparent); }
  .market-product-nav a { color: var(--market-muted); }
  .market-product-nav a[aria-current="page"] { background: var(--market-gold-soft); color: var(--market-gold); }
}

@media (max-width: 365px) {
  .market-shell { width: min(100% - 14px, 820px); }
  .market-hero-side time { display: none; }
  .market-card-title strong { font-size: 13px; }
  .market-industry-change { font-size: 13px; }
  .market-industry-card { padding: 7px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .market-card:hover { transform: none; }
  .market-skeleton::after { animation: none; }
}

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

.mutual-review-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 12px;
  background: var(--surface, #fff);
}

.mutual-review-list article > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mutual-review-list article span {
  color: var(--muted, #667085);
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.mutual-item-excluded {
  opacity: .58;
}

@media (max-width: 700px) {
  .mutual-review-list article {
    align-items: stretch;
    flex-direction: column;
  }

  .mutual-review-list article > div:last-child {
    display: flex;
    gap: 8px;
  }

  .mutual-review-list button {
    min-height: 42px;
  }
}

/* ===== 策略研究 / 策略中心（strategy-lab-01） ===== */

.strategy-disclaimer {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid #f2c14e;
  border-left: 4px solid #e0a800;
  border-radius: 12px;
  background: #fff8e6;
  color: #7a5b00;
  font-size: 13px;
  line-height: 1.6;
}

.pool-chip {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
}

.pool-chip-bad {
  background: #fdecec;
  color: #b42318;
}

.pool-chip-warn { background: #fff6df; color: #8a5a00; }
.pool-chip small { display: block; font-size: 10px; line-height: 1.35; margin-top: 2px; color: inherit; opacity: .82; }

.strategy-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.strategy-pill-ok { background: #e5f6ec; color: #14713d; }
.strategy-pill-smallcap { background: #e5f6ec; color: #14713d; }
.strategy-pill-etf { background: #e8f0fe; color: #1a56db; }
.strategy-pill-blocked { background: #fdecec; color: #b42318; }
.strategy-pill-insufficient_data, .strategy-pill-not_computed { background: #eef2f7; color: #667085; }

/* 小市值当前排名：前 7 名是视觉重点；实际目标仍由模型持仓数决定。 */
tr.ranking-focus > td { background: #f2f7ff; }
tr.ranking-selected > td { background: #e8f7ee; font-weight: 650; }
tr.ranking-selected > td:first-child { box-shadow: inset 3px 0 0 #1f8f55; }

.scorer-params {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: end;
}

.lab-risk summary, .lab-sweep summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 0 6px;
}

.lab-risk-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 1.2fr);
  gap: 8px 18px;
  align-items: center;
}

.lab-risk-params {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.sweep-rows { display: grid; gap: 8px; }

.sweep-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.4fr);
  gap: 12px;
}

.lab-data-strip p { margin: 4px 0; }

.lab-chart { margin: 12px 0 4px; }
.lab-chart svg { width: 100%; height: auto; display: block; }

.lab-line-instrument { fill: none; stroke: #d97706; stroke-width: 2; }
.lab-line-dd { fill: none; stroke: #b42318; stroke-width: 2; }
.drawdown-area { fill: rgba(180, 35, 24, .12); }

.lab-batch-row { cursor: pointer; }
.lab-batch-row:hover { background: #f2f6fb; }

.sc-primary-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.sc-signal-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0;
}

.sc-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sc-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
/* 操作列里的状态胶囊（如「主页主策略」）改成与按钮同规格：白底描边，只靠描边/文字色区分状态 */
.sc-row-actions .strategy-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #14713d;
  border-radius: var(--radius-control);
  background: #fff;
  color: #14713d;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
}

@media (max-width: 700px) {
  .lab-risk-grid, .sweep-row {
    grid-template-columns: 1fr;
  }
}

/* 候选池搜索添加（strategy-lab-02） */
.pool-search { position: relative; }
.pool-search-results {
  position: absolute;
  z-index: 30;
  left: 0; right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  padding: 4px;
}
.pool-search-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}
.pool-search-item:hover { background: #f2f6fb; }
.pool-search-item small { display: block; color: #667085; font-size: 11px; }
.pool-search-item-active { opacity: .55; cursor: not-allowed; }
.pool-search-empty { padding: 8px 10px; font-size: 12px; color: #667085; }
.pool-chip-remove {
  border: 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
  font-size: 13px;
  padding: 0 0 0 4px;
  line-height: 1;
  min-height: 0;
  height: auto;
  float: right;
  margin: 0 0 0 5px;
}
.pool-chip-remove:hover { color: #b42318; }

.pool-health {
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  padding: 12px;
  background: #fbfcfe;
}
.pool-health-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pool-health-head strong, .pool-health-head small { display: block; }
.pool-health-head small { margin-top: 2px; color: #667085; font-size: 11px; line-height: 1.45; }
.pool-health-head .secondary { white-space: nowrap; }
.pool-health-tags { margin-top: 10px; }
.pool-health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.pool-health-grid > div { padding: 9px 10px; background: #fff; border: 1px solid #e4e9f0; border-radius: 8px; }
.pool-health-grid span, .pool-health-grid strong, .pool-health-grid small { display: block; }
.pool-health-grid span, .pool-health-grid small { color: #667085; font-size: 11px; }
.pool-health-grid strong { margin: 3px 0; font-size: 13px; color: #344054; }
.pool-health-windows { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pool-health-window { padding: 3px 7px; border-radius: 999px; background: #eef2f7; color: #475467; font-size: 11px; }
.pool-health-warning, .pool-health-directions { margin-top: 10px; padding: 9px 10px; border-radius: 8px; font-size: 12px; line-height: 1.55; }
.pool-health-warning { background: #fff6df; color: #7a5200; }
.pool-health-directions { background: #eef6ff; color: #175a8c; }
.pool-health-warning ul, .pool-health-directions ul { margin: 4px 0 0; padding-left: 18px; }
.pool-health-error { margin: 8px 0 0; color: #b42318; font-size: 12px; }

@media (max-width: 700px) {
  .pool-health-grid { grid-template-columns: 1fr; }
}

/* ===== 策略研究/策略中心 精修（strategy-lab-03）：层级与间距，不引入新色彩体系 ===== */

/* --- 配置表单分节 --- */
.lab-form { display: flex; flex-direction: column; gap: 18px; }

.lab-section {
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 14px 16px 16px;
  background: #fff;
}

.lab-section-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink, #102a43);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.lab-section-title span {
  font-size: 12px;
  font-weight: 500;
  color: #667085;
}

.lab-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px 16px;
  align-items: start;
}

.lab-subsection-title {
  margin: 20px 0 10px;
  font-size: 13px;
  color: var(--ink, #102a43);
}

.lab-choice-group {
  min-width: 0;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #d5dce6;
  border-radius: 8px;
}

.lab-choice-group legend { padding: 0 4px; font-size: 13px; font-weight: 600; }
.lab-choice-group .inline-check { margin-right: 14px; }
.lab-wide { grid-column: 1 / -1; }

.lab-span-all { grid-column: 1 / -1; }
.lab-self-end { align-self: end; }

/* --- 动作状态胶囊：与背景注释明确区分 --- */
.lab-status {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.lab-status--running { color: #175cd3; }
.lab-status--ok { color: #14713d; }
.lab-status--error { color: #b42318; }

button.is-busy {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

button.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  animation: lab-spin .8s linear infinite;
}

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

/* --- 结果一句话判决 --- */
.lab-verdict {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f4f7fb;
  border: 1px solid #e4e9f0;
  font-size: 14px;
  color: #344054;
}

.lab-verdict strong { font-variant-numeric: tabular-nums; }
.lab-up { color: #d92d20; }   /* A股口径：红涨 */
.lab-down { color: #079455; } /* A股口径：绿跌 */

/* --- 结果指标卡：自适应避免 4+4+2 孤行 --- */
#slMetrics.metrics { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* --- 移动端兜底：旧 backtest-form 及分节表单一律单列起 --- */
@media (max-width: 900px) {
  .backtest-form { grid-template-columns: repeat(2, 1fr); }
  .backtest-form .span-2 { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .backtest-form { grid-template-columns: 1fr; }
  .lab-section { padding: 12px; }
  .form-actions { flex-wrap: wrap; }
}

/* --- 策略中心：主策略 hero --- */
.sc-hero {
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fbfdff, #f4f7fb);
  margin-bottom: 8px;
}

.sc-hero-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.sc-hero-name { font-size: 20px; font-weight: 800; color: var(--ink, #102a43); }
.sc-hero-meta { font-size: 12px; color: #667085; }

.sc-hero-signal {
  font-size: 15px;
  margin: 6px 0 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.sc-hero-target {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 15px;
}

.sc-hero-target .pool-chip { font-size: 14px; padding: 5px 12px; }

.sc-hero-data { font-size: 12px; color: #667085; margin-top: 10px; }

/* --- 策略中心：站内对话框（替代原生 confirm） --- */
.lab-dialog {
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 0;
  max-width: 480px;
  width: calc(100vw - 48px);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .22);
}

.lab-dialog::backdrop { background: rgba(16, 42, 67, .45); }

.lab-dialog-head {
  padding: 16px 20px 0;
  font-size: 16px;
  font-weight: 800;
}

.lab-dialog-body {
  padding: 10px 20px 4px;
  font-size: 14px;
  color: #344054;
  line-height: 1.7;
}

.lab-dialog-body ul { margin: 8px 0; padding-left: 20px; }
.lab-dialog-body li { margin: 4px 0; }

.lab-dialog-error {
  margin: 8px 20px 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fdecec;
  color: #b42318;
  font-size: 13px;
}

.lab-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
}

/* --- 策略中心：空状态卡 --- */
.sc-empty {
  border: 1px dashed #c8d2de;
  border-radius: 12px;
  padding: 26px 20px;
  text-align: center;
  color: #667085;
  font-size: 14px;
}

.sc-empty a { color: #175cd3; font-weight: 700; }

/* --- 模型表：参数摘要 chip 串 --- */
.sc-spec-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sc-spec-chips .pool-chip { font-size: 11px; padding: 2px 8px; }
.sc-model-id { font-size: 11px; color: #667085; font-family: ui-monospace, monospace; }
/* 引擎印章：算出该快照的代码版本。与基准不同版时高亮，提示数字不可比。 */
.sc-engine-chip {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-family: ui-monospace, monospace;
  color: #475467;
  background: #f2f4f7;
}
.sc-engine-chip-warn { color: #b54708; background: #fef0c7; font-weight: 700; }
.sc-engine-chip-none { color: #98a2b3; background: none; padding: 0; }

/* --- P1 术语解释：统一 ⓘ 按钮与共享浮层 --- */
.term-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-height: 0;  /* 窄屏媒体查询的 button min-height:42px 会把圆点拉成椭圆 */
  margin-left: 4px;
  padding: 0;
  border: 1px solid #c3cfdb;
  border-radius: 50%;
  background: #f2f6fa;
  color: #51617a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: baseline;
  cursor: help;
}
.term-info:hover { border-color: var(--accent); color: var(--accent); }
@media (pointer: coarse) {
  .term-info { width: 28px; height: 28px; font-size: 13px; }
}
.term-info.is-open { background: var(--accent); border-color: var(--accent); color: #fff; }
.term-info.is-hidden { display: none; }
.term-info span { pointer-events: none; }

.term-popover {
  position: fixed;
  z-index: 9500;
  max-width: 380px;
  padding: 14px 16px;
  border: 1px solid #c8d2de;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 42, 67, .18);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.term-popover-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.term-popover-close:hover { background: #f2f4f7; color: var(--text); }
.term-popover-title { margin: 0 24px 6px 0; font-size: 14px; font-weight: 800; }
.term-popover-def { margin: 0; }
.term-popover-more {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: #175cd3;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.term-popover-extra { margin-top: 6px; padding-top: 8px; border-top: 1px dashed #dfe6ee; color: #475467; }

/* 配置旁的即时上下文说明 */
.lab-context-note {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: -6px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: #eef6f4;
  color: #2b544d;
  font-size: 12.5px;
  line-height: 1.5;
}
.lab-context-note .term-info { margin: 1px 0 0; flex: none; }

@media (max-width: 640px) {
  .term-popover { max-width: calc(100vw - 16px); font-size: 14px; }
}

/* --- P2 策略摘要 / 分享页 --- */
/* 2026-09-29 T3：历史快照选择条（目录驱动；选项格式「截止日 · 生成时间 · 来源」） */
.share-snapshot-bar { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-snapshot-select { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.share-snapshot-select select {
  max-width: min(360px, 72vw);
  padding: 3px 8px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
}
.share-head .share-disclaimer-strong {
  margin: 10px 0 0;
  padding: 10px 14px;
  border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0;
  background: #fdf3e7;
  color: #7c4a12;
  font-weight: 750;
}
.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 22px;
}
.share-row { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px dashed #e4e9f0; font-size: 13px; }
.share-row span { color: #667085; }
.share-row strong { font-weight: 650; }
.share-span-all { grid-column: 1 / -1; }
.share-notes { margin: 6px 0; padding-left: 22px; font-size: 13.5px; line-height: 1.7; }
.share-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-preview-dialog { max-width: min(560px, 92vw); }
.share-preview-dialog img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.sc-row-link { font-size: 13px; color: #175cd3; font-weight: 700; text-decoration: none; }
.sc-row-link:hover { text-decoration: underline; }

@media print {
  .topbar, .strategy-disclaimer, .no-print, .skip-link, dialog { display: none !important; }
  /* 审计 F-7（2026-09-19）：壳层（深色侧栏/上下文栏/移动底导）不得进打印。 */
  .wb-shell-sidebar, .wb-context-bar, .mobile-product-nav { display: none !important; }
  body.has-wb-shell .app, body.has-wb-shell .market-shell { margin-left: 0 !important; width: auto !important; max-width: 100% !important; }
  body { background: #fff; }
  .app { padding: 0; max-width: 100%; }
  .panel { border: none; box-shadow: none; break-inside: avoid; }
}

/* --- P3 结果诊断 --- */
.chart-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; }
.range-tabs, .diag-tabs { display: inline-flex; gap: 4px; border: 1px solid #d9e1ea; border-radius: 8px; padding: 3px; background: #f2f6fa; }
.range-tabs button, .diag-tabs button {
  min-width: 0;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #51617a;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.range-tabs button.active, .diag-tabs button.active { background: var(--accent); color: #fff; }
.diag-tabs { margin: 16px 0 8px; }
.diag-panel { min-height: 40px; }
.diag-subtitle { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 10px; font-size: 14px; font-weight: 800; }
.diag-subtitle small { font-size: 12px; font-weight: 500; color: #667085; }

/* 主图交互 */
.lab-chart { position: relative; }
.chart-tooltip {
  position: absolute;
  z-index: 20;
  min-width: 170px;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid #c8d2de;
  border-radius: 8px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 20px rgba(16, 42, 67, .16);
  font-size: 12px;
  line-height: 1.6;
  pointer-events: none;
}
.chart-tooltip .tt-date { font-weight: 800; margin-bottom: 2px; }
.chart-tooltip .tt-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
/* 旧研究配色（#1f7a6d/#8fa3bf）的图例圆点覆盖已废弃，统一走语义色块的 legend-dot-* 定义。 */
.crosshair { stroke: #9aa8bb; stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.marker-rebalance { fill: #f97316; stroke: #fff; stroke-width: 1.5; cursor: pointer; }
.marker-risk { fill: #d92d20; stroke: #fff; stroke-width: 1.5; cursor: pointer; }
.marker-rebalance:hover, .marker-risk:hover, .marker-rebalance:focus-visible, .marker-risk:focus-visible { r: 6; }
.legend-toggle { cursor: pointer; }
.legend-toggle:hover .svg-legend-label { fill: #102a43; }
.legend-toggle.off { opacity: .35; }

/* 回撤诊断 */
.dd-shade { fill: rgba(31, 122, 109, .10); cursor: pointer; }
.dd-shade:hover { fill: rgba(31, 122, 109, .22); }
.dd-episode {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 4px 16px;
  align-items: center;
  width: 100%;
  margin: 6px 0;
  padding: 10px 14px;
  border: 1px solid #d9e1ea;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.dd-episode strong { color: var(--down); font-size: 15px; }
.dd-episode-open { border-color: #e3b7b3; background: #fdf3f2; }
.dd-episode-open strong { color: var(--up); }
.dd-episode:hover { border-color: var(--accent); }
.lab-focus-summary {
  margin: 8px 0;
  padding: 10px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: #eef6f4;
  font-size: 13px;
}
.lab-focus-summary ul { margin: 6px 0 0; padding-left: 20px; }

/* 调仓时间线 */
.rb-item { border: 1px solid #e4e9f0; border-radius: 10px; margin: 8px 0; background: #fff; }
.rb-item summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
}
.rb-item summary::marker { color: #667085; }
.rb-top3 { color: #667085; margin-left: auto; }
.rb-body { padding: 4px 16px 12px; font-size: 13px; }
.rb-body p { margin: 8px 0 4px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rb-body strong { color: #475467; font-size: 12px; flex: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: #eef1f5;
  color: #475467;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.pill-warn { background: #fdf0e5; color: #8a4b10; }
.pill-info { background: #e8f1fb; color: #175cd3; }

/* 月度热力图 */
.hm-table { border-collapse: collapse; font-size: 12px; min-width: 0; }
.hm-table th, .hm-table td { border: 1px solid #e4e9f0; padding: 5px 8px; text-align: center; white-space: nowrap; }
.hm-cell span { display: block; font-weight: 700; }
.hm-pos { background: #fdecec; color: #b42318; }
.hm-neg2 { background: #e8f5f0; color: #067647; }
.hm-zero { background: #f2f4f7; color: #667085; }
.hm-nodata { background: #fafbfc; color: #b6c2d1; }
.hm-year { font-weight: 800; }

/* 研究提醒 */
.lab-reminders {
  margin: 10px 0;
  padding: 10px 14px;
  border: 1px solid #ecd9b6;
  border-radius: 10px;
  background: #fdf8ec;
  font-size: 13px;
  line-height: 1.7;
}
.lab-reminders ul { margin: 0; padding-left: 20px; }
.lab-reminders li { margin: 2px 0; }

@media (max-width: 720px) {
  .dd-episode { grid-template-columns: auto 1fr; }
  .rb-top3 { margin-left: 0; width: 100%; }
}

/* --- 参数实验组载入横幅 --- */
.lab-loaded-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 12px 16px;
  border: 1px solid #eccfad;
  border-left: 4px solid var(--orange);
  border-radius: 0 10px 10px 0;
  background: #fdf6e9;
  font-size: 14px;
}
.lab-loaded-banner strong { color: #7c4a12; }
.lab-loaded-banner span { color: #8a6a3b; font-size: 12.5px; }
.lab-loaded-banner button { margin-left: auto; }
.rb-load-btn { white-space: nowrap; }

/* ===== 语义色收口：操作蓝、A 股红涨绿跌、风险琥珀 ===== */
/* 完成、已选与可操作都使用蓝色；绿色仅保留给行情下跌/亏损。 */
.notice-intro,
.rotation-hint.aligned,
.holding-row:not(.leader-row),
.ranking-item.target {
  border-color: #b9d4ff;
  background: var(--accent-soft);
}
.notice-intro strong,
.notice-status.sent,
.status-badge.holding,
.strategy-pill-ok,
.lab-status--ok,
.smallcap-status-actions span { color: var(--accent-dark); }
.notice-intro { border-left-color: var(--accent); }
.strategy-pill-ok { background: var(--accent-soft); }
.status-badge.holding {
  border-color: #b9d4ff;
  background: var(--accent-soft);
}
.holding-row { box-shadow: inset 0 -1px 0 #b9d4ff, inset 0 1px 0 #b9d4ff; }
.holding-row.leader-row { background: linear-gradient(90deg, #fff7ed, var(--accent-soft)); }
.holding-name-tooltip::after { background: var(--accent); }
.period-tab.active,
.mobile-product-nav a[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.smallcap-status-banner.success {
  border-color: #b9d4ff;
  border-left-color: var(--accent);
  background: var(--accent-soft);
}
.smallcap-status-banner.success strong,
.smallcap-status-banner.success p { color: var(--accent-dark); }

/* 回测曲线用研究配色，而不是直接复用行情红绿。 */
.portfolio-line { stroke: var(--accent); }
.benchmark-line { stroke: #667085; }
.lab-line-instrument { stroke: #7a5af8; }
/* 图例圆点必须与所属曲线同色：基础主题的圆点描边（红/蓝圈）在本口径下不重置会与曲线冲突。 */
.legend-dot-strategy { fill: var(--accent); stroke: none; }
.legend-dot-benchmark { fill: #667085; stroke: none; }
.legend-dot-instrument { fill: #7a5af8; stroke: none; }
.portfolio-area { fill: rgba(15, 98, 254, .07); }
.dd-shade { fill: rgba(180, 35, 24, .10); }
.dd-shade:hover { fill: rgba(180, 35, 24, .22); }

/* 已载入的实验组是当前工作对象，不应被误读为风险提示。 */
.lab-loaded-banner {
  border-color: #b9d4ff;
  border-left-color: var(--accent);
  background: var(--accent-soft);
}
.lab-loaded-banner strong { color: var(--accent-dark); }
.lab-loaded-banner span { color: #3f5f99; }
.lab-batch-row.is-loaded {
  background: var(--accent-soft);
  box-shadow: inset 4px 0 0 var(--accent);
}
.lab-batch-row.is-loaded:hover { background: #e4efff; }
.batch-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 1px 4px 1px 0;
  border: 1px solid #d0d7e2;
  border-radius: var(--radius-pill);
  background: #fff;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
  padding: 0 7px;
  white-space: nowrap;
}
.batch-badge:hover,
.batch-badge:focus-visible { border-color: var(--accent); color: var(--accent-dark); }

/* 全球市场保留深色阅读氛围；操作/开市状态改为蓝色，金色只作时段提示。 */
html[data-market-theme="dark"] {
  --focus-ring: #78a9ff;
  --market-action: #78a9ff;
  --market-action-soft: rgba(120, 169, 255, .16);
}
html[data-market-theme="light"] {
  --market-action: #0f62fe;
  --market-action-soft: rgba(15, 98, 254, .10);
}
.market-state-pill.open::before {
  background: var(--market-action);
  box-shadow: 0 0 0 4px var(--market-action-soft);
}
.market-action-button:hover { border-color: var(--market-action); }
.market-action-primary { border-color: var(--market-action); background: var(--market-action); color: #fff; }
.market-section-head i { background: var(--market-action); }
.market-card:hover { border-color: color-mix(in srgb, var(--market-action) 62%, var(--market-line)); }
.market-card:focus-visible { outline-color: var(--market-action-soft); }
.market-card-title b { background: var(--market-action-soft); }
.market-card-status.open { color: var(--market-action); }

/* --- 小市值候选阶梯与保真标签 --- */
.sc-ladder-target td { background: #eef6f4; }
.sc-ladder-reserve td { color: #667085; }
.sc-fidelity-note {
  margin: 8px 0;
  padding: 10px 14px;
  border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0;
  background: #fdf6e9;
  color: #7c4a12;
  font-size: 13px;
  line-height: 1.6;
}


/* 小市值模拟卡分层与带数字净值图（2026-09-06 问题3 修复） */
.sc-sim-card { border-top: 1px solid var(--border, #e5e9f0); padding-top: 8px; }
.sc-sim-card-inner { display: flex; flex-direction: column; gap: 6px; }
.sc-sim-card-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.sc-sim-card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; align-items: baseline; }
.sc-chart-head { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; align-items: baseline; margin-top: 4px; }
.sc-chart-title { font-weight: 600; color: #445; }
.sc-chart-stat strong { font-size: 15px; }
.sc-sim-card svg { border: 1px solid #eef1f6; border-radius: 6px; background: #fcfdff; }

/* 复现验收：聚宽观察仓 vs 本地复现，共轴净值 + 独立偏差带。 */
.sc-comparison-chart {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--wb-line, #dde1e5);
  color: var(--wb-ink, #111315);
  font-size: 13px;
}
.sc-comparison-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sc-comparison-heading h3 { margin: 0; color: var(--wb-ink, #111315); font-size: 16px; line-height: 1.35; }
.sc-comparison-heading p { max-width: 68ch; margin: 4px 0 0; color: var(--wb-muted, #525961); line-height: 1.6; }
.sc-comparison-chips, .sc-comparison-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sc-comparison-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid var(--wb-line, #dde1e5);
  border-radius: var(--wb-radius-pill, 999px);
  background: var(--wb-surface, #fff);
  color: var(--wb-muted, #525961);
  font-size: 11.5px;
  white-space: nowrap;
}
.sc-comparison-chip.is-local { border-color: #a7d8cf; background: #eef8f6; color: #08685a; }
.sc-comparison-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border-top: 1px solid var(--wb-line, #dde1e5);
  border-bottom: 1px solid var(--wb-line, #dde1e5);
}
.sc-comparison-summary > span { min-width: 0; padding: 11px 14px; }
.sc-comparison-summary > span + span { border-left: 1px solid var(--wb-line, #dde1e5); }
.sc-comparison-summary small { display: block; margin-bottom: 3px; color: var(--wb-muted, #525961); font-size: 11px; }
.sc-comparison-summary strong { display: block; overflow: hidden; color: var(--wb-ink, #111315); font-size: 13.5px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.sc-comparison-summary .is-emphasis strong { color: var(--wb-warn, #8a5a00); }
.sc-comparison-legend { margin: 12px 0 8px; color: var(--wb-muted, #525961); font-size: 11.5px; }
.sc-comparison-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sc-comparison-legend i { display: inline-block; width: 22px; height: 3px; border-radius: 2px; background: #155eef; }
.sc-comparison-legend .is-local i { background: #087a6b; }
.sc-comparison-legend .is-gap i { height: 9px; border: 1px solid #d9b65c; background: var(--wb-warn-soft, #fff4d6); }
.sc-comparison-plot {
  overflow-x: auto;
  border: 1px solid var(--wb-line, #dde1e5);
  border-radius: var(--wb-radius-panel, 6px);
  background: var(--wb-surface, #fff);
  scrollbar-color: #b6c2d1 transparent;
  scrollbar-width: thin;
}
.sc-comparison-plot svg { display: block; width: 100%; min-width: 660px; height: auto; font-family: inherit; }
.sc-comparison-plot:focus-visible { outline: 2px solid var(--wb-action, #155eef); outline-offset: 2px; }
.sc-comparison-grid { stroke: #e7eaee; stroke-dasharray: 3 4; }
.sc-comparison-axis-label { fill: var(--wb-faint, #7d848c); font-size: 10px; font-variant-numeric: tabular-nums; }
.sc-comparison-section-label { fill: var(--wb-muted, #525961); font-size: 10.5px; font-weight: 650; letter-spacing: .02em; }
.sc-comparison-range { fill: var(--wb-warn-soft, #fff4d6); opacity: .72; }
.sc-comparison-gap { fill: #f4cf73; opacity: .24; }
.sc-comparison-line, .sc-comparison-diff-line { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sc-comparison-line { stroke-width: 2.25; }
.sc-comparison-line.is-jq { stroke: var(--wb-action, #155eef); }
.sc-comparison-line.is-local { stroke: #087a6b; }
.sc-comparison-line.is-local-tail { stroke: #087a6b; stroke-dasharray: 5 4; stroke-width: 2.25; }
.sc-comparison-cutoff { stroke: #98a2b3; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.sc-comparison-divider { stroke: var(--wb-line, #dde1e5); vector-effect: non-scaling-stroke; }
.sc-comparison-diff-area { fill: #f4cf73; opacity: .28; }
.sc-comparison-diff-line { stroke: var(--wb-warn, #8a5a00); stroke-width: 1.75; }
.sc-comparison-max-dot { fill: var(--wb-warn, #8a5a00); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.sc-comparison-max-label { fill: var(--wb-warn, #8a5a00); font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-comparison-note { margin: 9px 0 0; color: var(--wb-muted, #525961); font-size: 11.5px; line-height: 1.6; }
.sc-comparison-empty { margin-top: 12px; padding: 14px 16px; border: 1px dashed var(--wb-line, #dde1e5); border-radius: var(--wb-radius-panel, 6px); color: var(--wb-muted, #525961); }

@media (max-width: 700px) {
  .sc-comparison-heading { flex-direction: column; }
  .sc-comparison-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-comparison-summary > span:nth-child(3) { border-left: 0; }
  .sc-comparison-summary > span:nth-child(n + 3) { border-top: 1px solid var(--wb-line, #dde1e5); }
  .sc-comparison-summary > span { padding: 10px; }
  .sc-comparison-plot svg { min-width: 620px; }
}


/* 策略中心模型家族筛选（2026-09-06） */
.sc-family-filter { display: flex; gap: 8px; margin: 4px 0 10px; flex-wrap: wrap; }
.sc-family-filter button { border: 1px solid #d5dbe5; background: #fff; color: #445; border-radius: 999px;
  padding: 4px 14px; font-size: 13px; cursor: pointer; }
.sc-family-filter button.active { background: #1a56db; border-color: #1a56db; color: #fff; }

/* ETF 模拟仓曲线分段条（2026-09-06 方案A） */
.performance-segments { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 2px; font-size: 12px; }
.performance-segments-label { color: #667; }
.performance-segment-current { border-color: #1a56db; color: #1a56db; }
