/* ==========================================================================
   多空局 · 股友实战论坛 v4 (Modern A-Share Investor Community)
   红涨绿跌基因 · 盖楼追帖外露 · 秒搜个股专吧 · 月份切片 · 标准/紧凑双密度盯盘
   ========================================================================== */

:root {
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-hover: #f8faff;
  --surface-muted: #f1f5f9;

  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --ink-4: #94a3b8;

  --line: #e2e8f0;
  --line-soft: #edf1f7;
  --line-strong: #cbd5e1;

  /* A-Share Bull Red (多头红 / 社区主色) & Bear Green (空头/避雷绿) */
  --bull: #d92d20;
  --bull-deep: #b42318;
  --bull-soft: #fef3f2;
  --bull-border: #fecdca;

  --bear: #067647;
  --bear-soft: #ecfdf3;
  --bear-border: #abefc6;

  /* Stock Cashtag Blue ($股票$) */
  --stock: #155eef;
  --stock-soft: #eff4ff;
  --stock-border: #d1e0ff;

  /* Hot / Pinned Gold-Orange */
  --hot: #c2410c;
  --hot-soft: #fff7ed;
  --hot-border: #fed7aa;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.035);
  --shadow-pop: 0 12px 32px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  --radius: 12px;
  --radius-sm: 8px;

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  background: rgba(217, 45, 32, 0.14);
  color: var(--ink);
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  color: var(--ink);
  letter-spacing: -0.01em;
}

a { color: inherit; }
button, input, select { font-family: inherit; }
[hidden] { display: none !important; }

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

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--bull); color: #fff;
  padding: 8px 14px; z-index: 200; text-decoration: none;
  border-radius: 6px; font-size: 13px; font-weight: 600;
}
.skip-link:focus { left: 12px; }

:focus-visible {
  outline: 2px solid var(--bull);
  outline-offset: 2px;
  border-radius: 5px;
}

#reader-test-mode {
  margin: 0 !important;
  padding: 4px 14px !important;
  border: none !important;
  background: #0f172a !important;
  color: #cbd5e1 !important;
  font: 500 12px/18px var(--sans) !important;
  text-align: center !important;
}

/* --------------------------------------------------------------------------
   Forum Top Navigation Bar (红白顶栏)
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-top: 3px solid var(--bull);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.brand-seal {
  width: 35px;
  height: 35px;
  display: block;
  flex: none;
  filter: drop-shadow(0 2px 4px rgba(217, 45, 32, 0.22));
}
.brand-text b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
}
.brand-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bull-soft);
  color: var(--bull);
  border: 1px solid var(--bull-border);
}
.brand-text small {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 1px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 3px;
}
.top-nav a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 13px;
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.top-nav a:hover {
  background: var(--surface-muted);
  color: var(--bull);
}
.top-nav a[aria-current="page"] {
  color: var(--bull);
  background: var(--bull-soft);
  font-weight: 750;
}

.top-search {
  margin-left: auto;
  position: relative;
  flex: 0 1 310px;
  min-width: 170px;
}
.top-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14.5px;
  height: 14.5px;
  transform: translateY(-50%);
  color: var(--ink-4);
  pointer-events: none;
}
.top-search input {
  width: 100%;
  height: 35px;
  padding: 6px 32px 6px 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 13px;
  transition: all 0.15s ease;
}
.top-search input::placeholder { color: var(--ink-4); }
.top-search input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--bull);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.1);
}
.top-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-kbd {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 11px;
  padding: 0 5px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink-4);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Hot Ticker Tape & Main Layout
   -------------------------------------------------------------------------- */

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px 48px;
}

.forum-hotbar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 8px 14px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.hotbar-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 750;
  color: var(--bull);
  margin-right: 2px;
  white-space: nowrap;
}
.cashtag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--stock-soft);
  border: 1px solid var(--stock-border);
  color: var(--stock);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.cashtag-pill em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(21, 94, 239, 0.11);
  color: var(--stock);
}
.cashtag-pill:hover {
  background: var(--stock);
  border-color: var(--stock);
  color: #ffffff;
}
.cashtag-pill:hover em {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.topic-pill {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.topic-pill:hover {
  background: var(--bull-soft);
  border-color: var(--bull-border);
  color: var(--bull);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 15px;
  align-items: start;
  min-width: 0;
}
#view-list, #view-topic, .layout > *, .side-stack, .side-panel {
  min-width: 0;
  max-width: 100%;
}

.masthead {
  padding: 4px 2px 12px;
}
.masthead-text h1 { margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.masthead-text p { margin: 0; color: var(--ink-3); font-size: 13px; }

/* --------------------------------------------------------------------------
   Forum Board Tabs, Density Switch & Filter Controls
   -------------------------------------------------------------------------- */

.list-panel {
  min-width: 0;
  overflow: visible;
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 14px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 1px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 9px;
  border: none;
  background: none;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2.5px solid transparent;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.tabs button:hover { color: var(--bull); }
.tabs button[aria-pressed="true"] {
  color: var(--bull);
  font-weight: 800;
  border-bottom-color: var(--bull);
}
.tab-n {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-3);
}
.tabs button[aria-pressed="true"] .tab-n {
  background: var(--bull-soft);
  color: var(--bull);
  font-weight: 750;
}
.tabs button.tab-quant {
  color: #3730a3;
}
.tabs button.tab-quant .tab-n {
  background: #eef2ff;
  color: #3730a3;
}
.tabs button.tab-quant:hover,
.tabs button.tab-quant[aria-pressed="true"] {
  color: #312e81;
  border-bottom-color: #4338ca;
}
.tabs button.tab-quant[aria-pressed="true"] .tab-n {
  background: #4338ca;
  color: #ffffff;
}
.top-nav a.nav-quant[aria-current="page"] {
  color: #3730a3;
  background: #eef2ff;
}

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  margin-left: auto;
}
.list-panel:not(.is-filtered) .board-header {
  flex-wrap: nowrap;
}
.list-panel:not(.is-filtered) .tabs {
  flex: 1 1 auto;
}
.list-panel:not(.is-filtered) .list-toolbar {
  flex: none;
}
.list-panel:not(.is-filtered) #list-heading,
.list-panel:not(.is-filtered) #result-count {
  display: none;
}
#list-heading {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  margin: 0;
}
#result-count {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-4);
  white-space: nowrap;
}

/* 标准 / 紧凑盯盘切换 */
.density-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 7px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}
.density-switch button {
  height: 23px;
  padding: 0 8px;
  border: none;
  border-radius: 5px;
  background: none;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.density-switch button[aria-pressed="true"] {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Filter Row: Searchable Stock Combobox + Sort + Month Pills */
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* Searchable Stock Combobox */
.stock-combobox {
  position: relative;
  flex: 0 1 258px;
  min-width: 195px;
}
.stock-combobox-box {
  position: relative;
  display: flex;
  align-items: center;
}
.stock-combobox-icon {
  position: absolute;
  left: 9px;
  width: 13.5px;
  height: 13.5px;
  color: var(--stock);
  pointer-events: none;
}
.stock-combobox input {
  width: 100%;
  height: 30px;
  padding: 0 26px 0 28px;
  border: 1px solid #bfd3ff;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.14s ease;
}
.stock-combobox.has-value input {
  background: var(--stock-soft);
  border-color: var(--stock-border);
  color: var(--stock);
  font-weight: 750;
}
.stock-combobox input::placeholder {
  color: var(--ink-3);
  font-weight: 500;
}
.stock-combobox input:focus {
  outline: none;
  background: #ffffff;
  color: var(--ink);
  border-color: var(--stock);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.12);
}
.stock-clear-btn {
  display: none;
  position: absolute;
  right: 5px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 999px;
  background: rgba(21, 94, 239, 0.12);
  color: var(--stock);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.stock-combobox.has-value .stock-clear-btn {
  display: inline-flex;
}
.stock-clear-btn:hover {
  background: var(--stock);
  color: #ffffff;
}

.stock-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 336px;
  max-width: calc(100vw - 32px);
  max-height: 330px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
  padding: 5px;
  z-index: 55;
}
.sp-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--ink);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.sp-item:hover, .sp-item.is-hl {
  background: var(--surface-muted);
}
.sp-item.is-selected {
  background: var(--stock-soft);
  color: var(--stock);
}
.sp-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.sp-left b {
  font-weight: 700;
  white-space: nowrap;
}
.sp-code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}
.sp-board {
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 3px;
  background: var(--stock-soft);
  color: var(--stock);
  white-space: nowrap;
}
.sp-board.is-star { background: #f5f3ff; color: #6d28d9; }
.sp-board.is-chinext { background: #e0f2fe; color: #0369a1; }
.sp-board.is-bse { background: #fffbeb; color: #b45309; }
.sp-board.is-st { background: #fef2f2; color: #b91c1c; }
.sp-cnt {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-4);
  white-space: nowrap;
}
.sp-empty, .sp-foot {
  padding: 10px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}
.sp-foot {
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-4);
  padding: 6px 8px 4px;
}

.filter-row select {
  height: 30px;
  padding: 0 22px 0 9px;
  max-width: 140px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background-color: #ffffff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.filter-row select:focus {
  outline: none;
  border-color: var(--bull);
}

/* Month Archive Quick Slice Bar */
.month-bar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}
.month-bar button {
  height: 26px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.month-bar button:hover {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}
.month-bar button[aria-pressed="true"] {
  background: var(--bull-soft);
  border-color: var(--bull-border);
  color: var(--bull);
  font-weight: 750;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 5px 0 9px;
  border-radius: 999px;
  background: var(--bull-soft);
  color: var(--bull);
  border: 1px solid var(--bull-border);
  font-size: 12px;
  font-weight: 650;
}
.active-filter button {
  border: none; background: none; cursor: pointer;
  color: var(--bull); font-size: 13.5px; padding: 0 4px;
}
.clear-filter {
  margin-left: auto;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.clear-filter:hover { color: var(--bull); border-color: var(--bull-border); }

/* --------------------------------------------------------------------------
   Dedicated Stock Bar Header Card & Trader Profile Banner (专吧头卡)
   -------------------------------------------------------------------------- */

.context-banner {
  border-bottom: 1px solid var(--line);
}
.stock-bar-card, .author-bar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 18px;
  background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
}
.stock-bar-card.is-st {
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}
.stock-bar-card.is-star {
  background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
}
.sbc-title-row, .abc-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sbc-board-tag {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  background: var(--stock);
  color: #ffffff;
}
.sbc-board-tag.is-star { background: #6d28d9; }
.sbc-board-tag.is-chinext { background: #0284c7; }
.sbc-board-tag.is-bse { background: #d97706; }
.sbc-board-tag.is-st { background: #dc2626; }
.sbc-name, .abc-title-row h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}
.sbc-code {
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--stock);
}
.sbc-floors {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink-3);
  background: var(--surface-muted);
  padding: 1px 7px;
  border-radius: 999px;
}
.sbc-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}
.sbc-sub a {
  color: var(--stock);
  font-weight: 650;
  text-decoration: none;
}
.sbc-sub a:hover { text-decoration: underline; }
.sbc-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sbc-pill {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.sbc-pill b {
  font-family: var(--mono);
  margin-left: 2px;
}
.sbc-pill.is-on {
  background: var(--bull-soft);
  border-color: var(--bull-border);
  color: var(--bull);
}
.sbc-back {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.sbc-back:hover {
  border-color: var(--bull-border);
  color: var(--bull);
}

.abc-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.abc-left > .avatar {
  width: 44px;
  height: 44px;
  font-size: 17px;
  border-radius: 12px;
}
.abc-stocks {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.abc-stocks-label {
  font-size: 12px;
  color: var(--ink-3);
}

.feed-note {
  margin: 0;
  padding: 7px 18px;
  font-size: 12.5px;
  color: var(--ink-3);
  background: var(--hot-soft);
  border-bottom: 1px solid var(--hot-border);
}

/* Forum Pinned Threads Block (论坛置顶热帖区) */
.pinned-box {
  padding: 6px 16px;
  background: linear-gradient(180deg, #fffcf7 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}
.pin-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  min-width: 0;
}
.pin-item + .pin-item {
  border-top: 1px dashed var(--line-soft);
}
.pin-badge {
  flex: none;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.4;
}
.pin-top {
  background: var(--bull);
  color: #ffffff;
}
.pin-hot {
  background: var(--hot-soft);
  color: var(--hot);
  border: 1px solid var(--hot-border);
}
.pin-risk {
  background: var(--bear-soft);
  color: var(--bear);
  border: 1px solid var(--bear-border);
}
.pin-stock {
  color: var(--stock);
  font-weight: 750;
}
.pin-link {
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.pin-link:hover { color: var(--bull); }
.pin-meta {
  flex: none;
  font-size: 11.5px;
  font-family: var(--mono);
  color: var(--ink-3);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Trader Faction Avatars & Prefix Tags (门派徽章头像体系)
   -------------------------------------------------------------------------- */

.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  flex: none;
  background: linear-gradient(145deg, #475569, #1e293b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 5px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
/* 高人气答主金星角标 */
.avatar.is-kol-av::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border: 1.5px solid #ffffff;
}
/* 官方核验印章 */
.av-editor {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.45);
}
/* 短线/龙头接力派：朱砂赤焰 */
.av-writer-d, .av-writer-i, .av-writer-n, .av-writer-s, .av-writer-x, .av-writer-ac, .av-writer-ah, .av-writer-am, .av-writer-ar {
  background: linear-gradient(145deg, #ef4444, #b91c1c);
}
/* 主线/趋势老兵派：深海钴蓝 */
.av-writer-c, .av-writer-h, .av-writer-m, .av-writer-r, .av-writer-w, .av-writer-ab, .av-writer-ag, .av-writer-al, .av-writer-aq, .av-writer-av {
  background: linear-gradient(145deg, #2563eb, #1e40af);
}
/* 周期/题材拆解派：流金琥珀 */
.av-writer-e, .av-writer-j, .av-writer-o, .av-writer-t, .av-writer-y, .av-writer-ad, .av-writer-ai, .av-writer-an, .av-writer-as {
  background: linear-gradient(145deg, #ea580c, #9a3412);
}
/* 风控/防守反击派：青松翡翠 */
.av-writer-l, .av-writer-b, .av-writer-g, .av-writer-q, .av-writer-v, .av-writer-aa, .av-writer-af, .av-writer-ak, .av-writer-ap, .av-writer-au {
  background: linear-gradient(145deg, #0d9488, #065f46);
}
/* 硬科技/芯片算力派：星云紫靛 */
.av-writer-a, .av-writer-f, .av-writer-k, .av-writer-p, .av-writer-u, .av-writer-z, .av-writer-ae, .av-writer-aj, .av-writer-ao, .av-writer-at {
  background: linear-gradient(145deg, #7c3aed, #4c1d95);
}

.kind {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  height: 19px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.k-view {
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
}
.k-notice {
  color: #175cd3;
  background: #eff8ff;
  border: 1px solid #b2ddff;
}
.k-risk {
  color: #067647;
  background: #ecfdf3;
  border: 1px solid #abefc6;
}
.k-note, .k-lib {
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fedf89;
}
.k-prod {
  color: var(--ink-2);
  background: var(--surface-muted);
  border: 1px solid var(--line);
}
.k-coll {
  color: #ffffff;
  background: var(--bull);
}
.k-quant {
  color: #3730a3;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

/* --------------------------------------------------------------------------
   Forum Thread Rows (<article class="row"> — 高信息密度 + 盖楼火药味外露)
   -------------------------------------------------------------------------- */

.row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 0.12s ease;
}
.row:last-child { border-bottom: none; }
.row:hover { background-color: var(--surface-hover); }

.row-avatar-link {
  display: inline-flex;
  text-decoration: none;
  margin-top: 2px;
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.row-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 12.5px;
}
.byline-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}
.byline-author:hover { color: var(--bull); }
.byline-author .avatar { display: none; }

.author-role {
  font-size: 11px;
  font-weight: 600;
  padding: 0 5px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  color: var(--ink-3);
  background: var(--surface-muted);
}
.author-role.is-kol {
  color: var(--hot);
  background: var(--hot-soft);
  border: 1px solid var(--hot-border);
}

.row-date {
  font-size: 11.5px;
  color: var(--ink-4);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.row-time { margin-left: 4px; color: var(--ink-3); }

/* Thread Title + Board-Aware Cashtag ($股票名 代码$) */
.row-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 750;
  line-height: 1.44;
  overflow-wrap: anywhere;
}
.row-title a {
  color: var(--ink);
  text-decoration: none;
}
.row-title a:hover {
  color: var(--bull);
}

.meta-company {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 6px;
  padding: 0 6px;
  height: 21px;
  border-radius: 4px;
  background: var(--stock-soft);
  border: 1px solid var(--stock-border);
  color: var(--stock);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  vertical-align: text-bottom;
  transition: all 0.12s ease;
}
.meta-company.is-chinext {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}
.meta-company.is-star {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}
.meta-company.is-bse {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.meta-company.is-st {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.meta-company:hover {
  background: var(--stock);
  border-color: var(--stock);
  color: #ffffff;
}
.meta-company .ticker-num {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.86;
}

.row-summary {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.56;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
/* 有追帖楼层预览时主摘要自动收束为单行精华，保证卡片紧凑不臃肿 */
.row-summary:has(+ .row-reply-preview) {
  -webkit-line-clamp: 1;
  color: var(--ink-3);
}

/* Latest Floor Reply Preview Strip (盖楼火药味外露条) */
.row-reply-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding: 5px 10px;
  border-radius: 0 6px 6px 0;
  border-left: 2.5px solid var(--bull);
  background: var(--surface-soft);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.4;
  text-decoration: none;
  min-width: 0;
  transition: background-color 0.12s ease;
}
.row-reply-preview:hover {
  background: var(--bull-soft);
}
.rp-badge {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  color: var(--bull);
  white-space: nowrap;
}
.rp-user {
  flex: none;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.rp-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-2);
}
.rp-time {
  flex: none;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
  white-space: nowrap;
}

.row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.row-meta:empty { display: none; }

.tag {
  color: var(--ink-3);
  background: var(--surface-muted);
  padding: 0 6px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.tag:hover { background: var(--stock-soft); color: var(--stock); }

/* Right-hand Forum Reply / Activity Bubble */
.row-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  margin-top: 2px;
  transition: all 0.14s ease;
}
.row-stat.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.row-stat.is-hot {
  background: var(--bull-soft);
  color: var(--bull);
  border: 1px solid var(--bull-border);
  font-weight: 750;
}
.row:hover .row-stat {
  background: var(--bull);
  color: #ffffff;
  border-color: var(--bull);
}

/* --------------------------------------------------------------------------
   Compact Ticker Stream Mode (紧凑盯盘高密度流: 10–12 帖/屏)
   -------------------------------------------------------------------------- */

body.is-compact .row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 15px;
  align-items: center;
}
body.is-compact .row-avatar-link { margin-top: 0; }
body.is-compact .row .avatar {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 12px;
}
body.is-compact .row-main { gap: 2px; }
body.is-compact .row-top { font-size: 11.5px; gap: 5px; }
body.is-compact .row-title {
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.is-compact .row-summary,
body.is-compact .row-meta {
  display: none;
}
body.is-compact .row-reply-preview {
  padding: 2px 8px;
  margin-top: 1px;
  font-size: 11.5px;
}
body.is-compact .row-stat { margin-top: 0; height: 22px; font-size: 11px; }

/* Pagination & Empty States */
.topic-loading { padding: 44px 20px; text-align: center; color: var(--ink-3); margin: 0; }
.empty-state { padding: 48px 24px; text-align: center; }
.empty-state h1, .empty-state h2 { margin: 0 0 8px; font-size: 17px; }
.empty-state p { margin: 0 auto 16px; color: var(--ink-3); font-size: 13.5px; }
.empty-state .reset-filter, .btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border: none; border-radius: 8px;
  background: var(--bull); color: #ffffff;
  font-size: 13px; font-weight: 650; cursor: pointer; text-decoration: none;
}
.empty-state .reset-filter:hover, .btn-primary:hover { background: var(--bull-deep); color: #fff; }

.load-more-wrap {
  padding: 14px 18px 18px;
  text-align: center;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-soft);
  border-radius: 0 0 var(--radius) var(--radius);
}
.load-more-btn {
  height: 34px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
.load-more-btn:hover {
  border-color: var(--bull);
  color: var(--bull);
}

/* --------------------------------------------------------------------------
   Forum Community Right Sidebar
   -------------------------------------------------------------------------- */

.side-stack {
  display: grid;
  gap: 13px;
  align-content: start;
  position: sticky;
  top: 62px;
}

.side-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  box-shadow: var(--shadow-sm);
}

.side-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.side-title-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-4);
}

.comm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  text-align: center;
}
.comm-stat-item {
  padding: 8px 5px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  transition: all 0.14s ease;
}
.comm-stat-item:hover {
  border-color: var(--bull-border);
  background: var(--bull-soft);
}
.comm-stat-item b {
  display: block;
  font-family: var(--mono);
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
}
.comm-stat-item.is-red b { color: var(--bull); }
.comm-stat-item.is-green b { color: var(--bear); }
.comm-stat-item span {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 650;
}

.kol-list {
  display: grid;
  gap: 4px;
}
.dir-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.14s ease;
}
.dir-row:hover {
  background: var(--surface-muted);
}
.rank-num {
  width: 17px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
  color: var(--ink-4);
  flex: none;
}
.rank-1 { color: #d92d20; }
.rank-2 { color: #ea580c; }
.rank-3 { color: #d97706; }

.dir-row > .avatar {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 12px;
}
.dir-text {
  min-width: 0;
  flex: 1;
}
.dir-text b {
  display: block;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dir-text small {
  display: block;
  font-size: 10.5px;
  color: var(--ink-4);
}
.dir-row em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-3);
  background: var(--surface-muted);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}
.dir-row:hover em {
  background: var(--bull-soft);
  color: var(--bull);
}

.toggle-authors-btn {
  margin-top: 7px;
  width: 100%;
  height: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: none;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
}
.toggle-authors-btn:hover {
  border-color: var(--bull);
  color: var(--bull);
}

.side-topic {
  display: block;
  padding: 7px 5px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.46;
}
.side-topic + .side-topic { border-top: 1px solid var(--line-soft); border-radius: 0; }
.side-topic:hover { color: var(--bull); }
.side-topic small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 450;
  color: var(--ink-4);
}
.more-link {
  display: inline-block;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bull);
  text-decoration: none;
}
.more-link:hover { text-decoration: underline; }
.side-note { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }

/* Right Sidebar Quant Spotlight Panel & Quant Matrix Banner */
.side-quant-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 56%);
}
.side-quant-panel .side-title {
  border-bottom-color: #e0e7ff;
}
.side-quant-panel .side-title-sub {
  color: #4338ca;
  background: #eef2ff;
  padding: 1px 6px;
  border-radius: 999px;
}
.side-quant-list {
  display: grid;
  gap: 2px;
}
.side-quant-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.42;
  border-bottom: 1px dashed var(--line-soft);
  transition: color 0.12s ease;
}
.side-quant-item:last-child { border-bottom: none; }
.side-quant-item:hover { color: #4338ca; }
.side-quant-item .sq-title {
  min-width: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
}
.side-quant-item .sq-title b {
  color: #3730a3;
  font-weight: 800;
}
.side-quant-item time {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
}
.more-link.is-quant-more {
  color: #3730a3;
}

.quant-matrix-card {
  padding: 14px 18px;
  background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 65%, #f8fafc 100%);
}
.qm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.qm-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.qm-badge {
  padding: 2px 8px;
  border-radius: 4px;
  background: #3730a3;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}
.qm-title-row h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
}
.qm-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}
.qm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 11px;
}
.qm-group {
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e0e7ff;
}
.qm-group-lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: #3730a3;
  margin-bottom: 6px;
}
.qm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.qm-chips a {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: none;
  transition: all 0.12s ease;
}
.qm-chips a:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3730a3;
}

/* --------------------------------------------------------------------------
   Forum Thread Detail Page ("楼主主帖 + 盖楼回帖" 详情页)
   -------------------------------------------------------------------------- */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.breadcrumbs a {
  display: inline-flex;
  align-items: center;
  height: 29px;
  padding: 0 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--bull); border-color: var(--bull-border); }

.article-shell {
  padding: 26px 30px;
}

.article-head h1 {
  margin: 0 0 15px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.42;
  color: var(--ink);
}

.op-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
}
.op-bar .byline-author .avatar {
  display: inline-flex;
  width: 38px;
  height: 38px;
}
.op-meta-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.op-top-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.op-badge {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bull);
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
}
.article-date {
  margin: 0;
  font-size: 12px;
  color: var(--ink-4);
  font-family: var(--mono);
}
.article-date .time-basis {
  margin-left: 6px;
  font-family: var(--sans);
}

.topic-lead {
  margin: 0 0 18px;
  padding: 11px 15px;
  background: #fffcf5;
  border: 1px solid var(--hot-border);
  border-left: 3.5px solid var(--hot);
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}

.article-body {
  max-width: 46em;
  overflow-wrap: anywhere;
}
.article-body > p {
  margin: 14px 0;
  font-size: 15.5px;
  line-height: 1.84;
  color: var(--ink);
}

.timeline-sec, .post-history, .sources-sec {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.post-history summary {
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  list-style: none;
  margin-bottom: 12px;
}
.timeline-sec h2, .sources-sec h2 {
  margin: 0 0 13px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.timeline li {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
}
.floor-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 12px;
}
.floor-tag {
  padding: 1px 6px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  color: var(--bull);
}
.timeline time {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-4);
  margin-left: auto;
}
.tl-writer {
  font-weight: 750;
  color: var(--ink-2);
}
.timeline p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-2);
}

/* Filing Source Attachments */
.source-list { display: grid; gap: 8px; }
.source-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  text-decoration: none;
  transition: all 0.14s ease;
}
.source-card:hover {
  border-color: var(--stock-border);
  background: var(--stock-soft);
}
.source-text { min-width: 0; flex: 1; }
.source-label { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.source-page {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid var(--stock-border);
  color: var(--stock);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
}
.source-date { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-4); }
.source-arrow { width: 15px; height: 15px; color: var(--ink-4); flex: none; }

.topic-update-status {
  margin: 10px 0; padding: 8px 12px; border-radius: 8px;
  background: var(--surface-soft); color: var(--ink-3); font-size: 12.5px;
}
.topic-update-status-error { background: var(--bull-soft); color: var(--bull); }
.topic-update-retry {
  margin-left: 8px; border: 1px solid currentColor; border-radius: 4px;
  background: none; color: inherit; padding: 1px 7px; cursor: pointer;
}

@keyframes skeleton-shimmer { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.topic-load-skeleton { margin-top: 20px; display: grid; gap: 12px; }
.topic-skeleton-paragraph { display: grid; gap: 10px; }
.topic-skeleton-line { display: block; height: 12px; border-radius: 4px; background: var(--surface-muted); animation: skeleton-shimmer 1.4s infinite; }
.topic-skeleton-title { width: 70%; height: 20px; }
.topic-skeleton-meta { width: 28%; height: 12px; }
.topic-skeleton-short { width: 55%; }

.read-full { margin-top: 20px; }
.back-row {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 15px; border-top: 1px solid var(--line-soft);
}
.back-row a {
  font-size: 13px; font-weight: 650; color: var(--ink-2); text-decoration: none;
}
.back-row a:hover { color: var(--bull); }

.contribution { padding: 16px 0 6px; border-top: 1px solid var(--line-soft); }
.contribution:first-of-type { border-top: none; }
.contribution h2 { margin: 8px 0; font-size: 16px; }
.contribution h2 a { text-decoration: none; }
.contribution h2 a:hover { color: var(--bull); }

/* Footer */
.site-bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-4);
  font-size: 12px;
}
.site-bottom p { margin: 0; }
.feed-alert {
  max-width: 1160px; margin: 10px auto 0; padding: 8px 14px;
  background: var(--bull-soft); color: var(--bull); border: 1px solid var(--bull-border);
  border-radius: 8px; font-size: 12.5px;
}
.noscript-note, [data-web-analytics-notice] {
  max-width: 1200px; margin: 8px auto; padding: 0 20px 22px;
  text-align: center; color: var(--ink-4); font-size: 11.5px;
}

/* Stock Bar X-Ray & Risk Radar Card (个股一秒排雷与家底体检卡) */
.sbc-xray {
  flex: 1 1 100%;
  margin-top: 4px;
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(30, 64, 175, 0.14);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.xr-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.xr-m {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
}
.xr-m small {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 600;
}
.xr-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 750;
  color: var(--ink);
}
.xr-val em {
  font-style: normal;
  font-size: 12px;
  margin-left: 2px;
}
.xr-val.is-up, .xr-fin-inline .is-up { color: #dc2626; }
.xr-val.is-down, .xr-fin-inline .is-down { color: #059669; }
.xr-m-fin {
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.xr-fin-inline {
  font-size: 12px;
  color: var(--ink-2);
}
.xr-fin-inline b {
  font-family: var(--mono);
  font-weight: 750;
}
.xr-bz {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
  padding-top: 5px;
  border-top: 1px dashed var(--line-soft);
}
.xr-bz-label {
  color: var(--ink-3);
  font-weight: 650;
}
.xr-bz-item b {
  color: var(--ink);
  font-weight: 700;
}
.xr-bz-item em {
  font-style: normal;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
}
.xr-sep {
  margin: 0 6px;
  color: var(--ink-4);
}
.xr-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.xr-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}
.xr-tag.is-safe {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.xr-tag.is-warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.xr-tag.is-danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.xr-tag.is-bull {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}
.xr-tag.is-gold {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}
.xr-tag.is-neutral {
  background: var(--surface-muted);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.xr-disclaimer {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-4);
}
[data-topic-xray][hidden] { display: none !important; }
.side-xray-panel {
  border-color: rgba(30, 64, 175, 0.22);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 48%);
}
.xr-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}
.xr-cell {
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.xr-cell span {
  font-size: 11px;
  color: var(--ink-3);
}
.xr-side-fin {
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.xr-fp {
  display: inline-block;
  margin-right: 6px;
  padding: 0 5px;
  border-radius: 4px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}
.side-xray-panel .xr-bz {
  margin-bottom: 7px;
}
.side-xray-panel .xr-tags {
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Market Sentiment Thermometer Bar (全站顶部盘后情绪冰沸点温度计)
   -------------------------------------------------------------------------- */
[data-market-pulse][hidden] { display: none !important; }
.market-pulse-bar {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid var(--line);
  border-left: 3.5px solid #1e40af;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
}
.mp-top-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 14px;
  min-width: 0;
}
.mp-mob-brief,
.mp-mob-toggle {
  display: none;
}
.mp-etf-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.mp-etf-block:empty {
  display: none;
}
.mp-head {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
}
.mp-head.is-ice { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.mp-head.is-cool { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.mp-head.is-mid { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.mp-head.is-warm { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.mp-head.is-hot { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }
.mp-thermo { font-weight: 650; opacity: 0.9; }
.mp-score { font-family: var(--mono); font-weight: 800; font-size: 12.5px; }
.mp-meter {
  width: 44px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.09);
  overflow: hidden;
}
.mp-meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: currentColor;
}
.mp-metrics {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.mp-metrics .mp-item + .mp-item {
  padding-left: 11px;
  border-left: 1px solid var(--line-soft);
}
.mp-item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}
.mp-item small {
  font-size: 11.5px;
  color: var(--ink-3);
}
.mp-item b {
  font-family: var(--mono);
  font-weight: 750;
  color: var(--ink);
}
.mp-item em { font-style: normal; }
.mp-item .is-up { color: #dc2626; }
.mp-item .is-down { color: #059669; }
.mp-stock-link {
  color: var(--bull);
  text-decoration: none;
  font-weight: 700;
}
.mp-stock-link:hover { text-decoration: underline; }
.mp-themes {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.mp-themes-label {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink-3);
}
.mp-theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: none;
}
.mp-theme-pill:hover {
  border-color: var(--bull-border);
  color: var(--bull);
  background: var(--bull-soft);
}
.mp-theme-pill em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--bull);
}
.mp-links {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mp-quick-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--bull);
  text-decoration: none;
  white-space: nowrap;
}
.mp-quick-link.is-quant {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
}
.mp-quick-link.is-quant:hover {
  background: #4338ca;
  border-color: #4338ca;
  color: #ffffff;
  text-decoration: none;
}
.mp-quick-link:hover { text-decoration: underline; }
.mp-delta {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
}
.mp-delta.is-up { color: #dc2626; }
.mp-delta.is-down { color: #059669; }
.mp-etf-strip {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 14px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
}
.mp-etf-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 11.5px;
  font-weight: 750;
}
.mp-etf-btn {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.mp-etf-btn:hover {
  border-color: var(--bull-border);
  color: var(--bull);
  background: var(--bull-soft);
}
.mp-etf-drawer {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) minmax(300px, 1.35fr);
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.mp-etf-subhd {
  font-size: 11.5px;
  font-weight: 750;
  color: var(--ink);
  margin-bottom: 4px;
}
.mp-etf-svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
}
.mp-etf-note {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-3);
}
.mp-etf-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.mp-etf-tbl th {
  text-align: left;
  color: var(--ink-3);
  font-weight: 650;
  padding: 3px 6px;
  border-bottom: 1px solid var(--line);
}
.mp-etf-tbl td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line-soft);
}
.mp-etf-tbl td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mp-etf-tbl td code {
  font-size: 10.5px;
  color: var(--ink-3);
}
.mp-etf-tbl td em {
  font-style: normal;
  color: var(--ink-3);
  font-size: 10.5px;
}
.mp-etf-tbl .is-up { color: #dc2626; }
.mp-etf-tbl .is-down { color: #059669; }
.mp-etf-sectors {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
@media (max-width: 820px) {
  .mp-etf-drawer { grid-template-columns: 1fr; }
  .mp-etf-btn { margin-left: 0; }
  .qm-grid { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side-stack { position: static; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
  .article-shell { padding: 20px 18px; }
}

@media (max-width: 640px) {
  .topbar-inner {
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 7px 12px 6px;
    min-width: 0;
  }
  .brand { order: 1; min-width: 0; gap: 8px; }
  .brand-seal { width: 30px; height: 30px; }
  .brand-text b { font-size: 16.5px; }
  .brand-text small, .search-kbd, #list-heading { display: none; }
  .top-search {
    order: 2;
    flex: 1 1 128px;
    min-width: 0;
    max-width: none;
    margin-left: auto;
  }
  .top-search input {
    height: 31px;
    padding: 4px 10px 4px 30px;
    font-size: 12.5px;
  }
  .top-search .search-icon { left: 10px; width: 13px; height: 13px; }
  .top-nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 2px;
    padding-top: 3px;
    border-top: 1px solid var(--line-soft);
  }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav a { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 6px; }

  .page-wrap { padding: 8px 10px 28px; }

  /* Mobile Compact Market Pulse Bar */
  .market-pulse-bar {
    padding: 8px 10px;
    margin-bottom: 8px;
    gap: 6px;
  }
  .mp-top-row { gap: 5px 8px; }
  .mp-head { order: 1; padding: 3px 8px; gap: 5px; font-size: 11.5px; }
  .mp-thermo { display: none; }
  .mp-meter { width: 28px; }
  .mp-mob-toggle {
    order: 2;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
  }
  .mp-mob-brief {
    order: 3;
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 11.5px;
    color: var(--ink-2);
    font-family: var(--mono);
    min-width: 0;
  }
  .mp-mob-brief .is-up { color: #dc2626; }
  .mp-mob-brief .is-down { color: #059669; }
  .mp-collapsible { order: 4; }
  .market-pulse-bar:not(.is-mp-expanded) .mp-collapsible {
    display: none !important;
  }
  .market-pulse-bar.is-mp-expanded .mp-mob-brief {
    display: none;
  }
  .mp-metrics .mp-item + .mp-item {
    padding-left: 0;
    border-left: none;
  }
  .mp-links {
    margin-left: 0;
    flex-wrap: wrap;
    gap: 6px;
  }
  .mp-etf-tbl {
    display: block;
    overflow-x: auto;
  }

  .forum-hotbar {
    padding: 6px 10px;
    margin-bottom: 8px;
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .forum-hotbar::-webkit-scrollbar { display: none; }

  .board-header { padding: 4px 10px 0; gap: 6px; }
  .tabs button { height: 34px; padding: 0 8px; font-size: 13px; }
  .tabs .tab-n { padding: 0 5px; font-size: 10.5px; }
  .list-panel:not(.is-filtered) .list-toolbar { width: auto; margin-left: auto; padding-bottom: 4px; }
  .list-panel.is-filtered .list-toolbar { width: 100%; justify-content: space-between; padding-bottom: 5px; }

  .filter-row { padding: 6px 10px; gap: 6px; }
  .stock-combobox { flex: 1 1 60%; min-width: 0; }
  .stock-combobox input { font-size: 12px; padding: 0 22px 0 26px; }
  .filter-row select { flex: 1 1 35%; min-width: 0; max-width: none; font-size: 12px; }
  .month-bar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    gap: 2px;
  }
  .month-bar::-webkit-scrollbar { display: none; }
  .month-bar button { height: 24px; padding: 0 7px; font-size: 11.5px; }

  .pinned-box { padding: 5px 10px; }
  .pin-item { padding: 3.5px 0; font-size: 12.5px; }
  .pin-meta { display: none; }

  .row {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 10px 11px;
    gap: 9px;
  }
  .avatar { width: 32px; height: 32px; font-size: 13px; border-radius: 8px; }
  .row-stat { display: none; }
  .row-title { font-size: 15px; line-height: 1.42; }
  .row-summary { font-size: 13px; line-height: 1.5; }
  .article-shell { padding: 16px 14px; }
  .article-head h1 { font-size: 19.5px; }
}
