/* 主线题材 */
.themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.theme {
  position: relative;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.theme:hover { border-color: #98a9b8; background: #fbfcfd; box-shadow: 0 5px 14px rgba(24, 38, 56, .06); }
.theme:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme.main {
  border-color: #b9c7d3;
  background: #fff;
  box-shadow: inset 2px 0 var(--accent);
}
.theme.main.is-open {
  border-color: #8fa3b6;
  background: #f8fafc;
  box-shadow: inset 3px 0 var(--accent), 0 5px 14px rgba(24, 38, 56, .07);
}
.theme h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
  color: #273547;
  font-size: 14px;
}
.theme-signal-strip {
  display: flex;
  min-height: 23px;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 5px 7px;
  border: 1px solid #dbe5e9;
  border-radius: 5px;
  background: #f6f9fa;
  color: #718194;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.theme-signal-strip .theme-hot-rank {
  color: #256c72;
  font-weight: 750;
}
.theme-signal-strip .up { color: var(--up); font-weight: 700; }
.theme-signal-strip .down { color: var(--down); font-weight: 700; }
.theme .meta { color: var(--muted); font-size: 11.5px; line-height: 1.75; }
.theme .money {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line-2);
  font-size: 11.5px;
  line-height: 1.65;
}
.theme .money b { font-size: 12.5px; }
.life { display: flex; gap: 3px; margin-top: 7px; }
.life i { height: 3px; flex: 1; border-radius: 2px; background: #dbe3e9; }
.life i.on { background: #6f7f91; }
.theme.main .life i.on { background: var(--accent); }
.life-label { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.theme-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}
.theme-kpis span {
  min-width: 0;
  padding: 6px 7px;
  border-radius: 5px;
  background: var(--surface-2);
}
.theme-kpis small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}
.theme-kpis b {
  display: block;
  overflow: hidden;
  color: #354457;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.theme-kpis b.up { color: var(--up); }
.theme-kpis b.down { color: var(--down); }
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid var(--line-2);
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}
.theme-toggle i {
  width: 7px;
  height: 7px;
  margin-right: 2px;
  transform: rotate(45deg);
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transition: transform .16s ease;
}
.theme.is-open .theme-toggle i { transform: rotate(225deg) translate(-2px, -2px); }
.theme-detail {
  margin-top: 9px;
  padding: 10px;
  border: 1px solid #b8c5d1;
  border-radius: 7px;
  background: #fff;
}
.theme-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.theme-detail-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.theme-detail-head b { color: #273547; font-size: 14px; }
.theme-stock-table .metric {
  width: 16%;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.theme-stock-table th.sortable {
  padding: 0;
}
.theme-stock-table th.sortable:last-child {
  padding-right: 0;
}
.sort-head {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: none;
  white-space: nowrap;
}
.sort-head:hover {
  border-color: transparent;
  background: #edf2f6;
  color: #345471;
  box-shadow: none;
}
.sort-head.is-active {
  background: #e6edf3;
  color: #284c6b;
}
.sort-head:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(40, 76, 107, .42);
}
.sort-indicator {
  width: 12px;
  color: #8291a1;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
}
.sort-head.is-active .sort-indicator {
  color: #284c6b;
}
.auction-sortable {
  padding: 0;
}
.auction-sortable .sort-head {
  min-height: 33px;
}
.auction-sortable .qmark {
  margin-left: 3px;
}
.theme-stock-table .stock-code {
  margin-left: 5px;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.section-count {
  margin-left: 7px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}

/* 校正、角色与笔记 */
.fix { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.fix .auto { opacity: .52; text-decoration: line-through; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.note-old {
  margin-bottom: 7px;
  padding: 8px 10px;
  border: 1px dashed #ccd7e0;
  border-radius: 6px;
  background: #f7f9fb;
  font-size: 12px;
}
.empty {
  padding: 26px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.stock-link {
  color: #273547;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: color .16s ease, text-decoration-color .16s ease;
}
.stock-link:hover {
  color: var(--teal);
  text-decoration-color: #9fc7c9;
}

/* 跟随式二级导航 */
#float-nav {
  position: fixed;
  left: 88px;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px;
  transform: translateX(-50%);
  border: 1px solid #d2dce5;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(24, 38, 56, .1);
  transition: top .2s cubic-bezier(.22, .61, .36, 1);
  will-change: top;
  backdrop-filter: blur(8px);
}
#float-nav .sl {
  padding: 4px 9px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
#float-nav .sl:hover { color: var(--accent); background: var(--surface); }
#float-nav .sl.on { color: var(--accent); background: var(--accent-bg); font-weight: 700; }
#anomaly-float-btn {
  position: fixed;
  z-index: 70;
  left: 88px;
  bottom: 24px;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  transform: translateX(-50%);
  border: 1px solid #243a52;
  border-radius: 50%;
  background: #17293d;
  box-shadow: 0 8px 22px rgba(23, 41, 61, .22);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: top .2s cubic-bezier(.22, .61, .36, 1),
    background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
#anomaly-float-btn:hover {
  border-color: #355876;
  background: #223d58;
  box-shadow: 0 10px 26px rgba(23, 41, 61, .28);
}
#anomaly-float-btn:active { background: #102134; }
#anomaly-float-btn:focus-visible {
  outline: 3px solid rgba(31, 132, 126, .42);
  outline-offset: 3px;
}


/* 子板块分支:主线卡下缩进一条代表子板块,与App"板块-精选"一致(2026-08-20) */
.theme-subboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding: 5px 8px;
  border-left: 2px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 5px 5px 0;
  font-size: 11px;
}
.theme-subboard-name { color: var(--text); font-weight: 600; }
.theme-subboard-metrics { color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
