/* 沿用暖白、红涨绿跌，以独立栅格和紧凑数据行整理首页层级。 */
#viewHome, #viewHome .section, #viewHome .panel { min-width: 0; }
#dashStatus { margin: 0 0 18px; font-size: 12px; }
#dashIndexes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line, #e4e0d6);
}
#dashIndexes .stat { min-width: 0; display: flex; flex-direction: column-reverse; gap: 6px; }
#dashIndexes .stat .num { font-family: var(--mono, monospace); font-size: clamp(22px, 2.5vw, 30px); line-height: 1.25; font-variant-numeric: tabular-nums; }
#dashIndexes .stat .lbl { margin: 0; color: #545b64; font-size: 12px; }
#dashStats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 0;
  margin-top: 12px;
}
#dashStats .stat { min-width: 0; display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: baseline; gap: 8px; padding: 9px 0; }
#dashStats .stat .num { font-family: var(--mono, monospace); font-size: 17px; line-height: 1.35; font-weight: 600; font-variant-numeric: tabular-nums; }
#dashStats .stat .lbl { margin: 0; color: #545b64; font-size: 12px; white-space: nowrap; }
.market-home { margin-top: 16px; padding: 0; min-width: 0; }
.market-home-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding: 18px 20px 10px; }
.market-home-head h2 { margin: 0; font-family: var(--serif, serif); font-size: 18px; }
.market-home-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 10px; margin-left: auto; }
.market-home-tools label { color: #545b64; font-size: 12px; }
.market-home-tools select, .market-home-tools input { max-width: 100%; min-height: 36px; border: 1px solid var(--line, #e4e0d6); border-radius: 4px; padding: 6px 9px; background: var(--panel, #fff); color: var(--ink, #1c1e22); font: inherit; font-size: 12px; caret-color: var(--red, #d62b40); }
.market-home-date-tools { display: inline-flex; align-items: center; gap: 8px; }
.market-home-date-tools[hidden] { display: none; }
.market-home-tools button { min-height: 36px; }
.market-home-tools select:hover, .market-home-tools input:hover { border-color: #a09b91; }
.market-home-tools :focus-visible, .market-home-scroll:focus-visible { outline: 2px solid var(--red, #d62b40); outline-offset: 3px; }
.market-home-status { padding: 0 20px 14px; margin: 0; color: #545b64; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.market-home-source { margin: 0 20px 14px; color: #626871; font-size: 12px; line-height: 1.8; }
.market-home-source summary { cursor: pointer; }
.market-home-scroll { width: 100%; max-width: 100%; max-height: 580px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b8b1a4 #f6f4ef; border-top: 1px solid var(--line, #e4e0d6); }
.market-home-scroll::-webkit-scrollbar { height: 9px; width: 9px; }
.market-home-scroll::-webkit-scrollbar-track { background: #f6f4ef; }
.market-home-scroll::-webkit-scrollbar-thumb { border: 2px solid #f6f4ef; border-radius: 8px; background: #b8b1a4; }
.market-home-table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: var(--sans, sans-serif); font-size: 12px; font-variant-numeric: tabular-nums; }
.market-home-table th, .market-home-table td { padding: 11px 12px; max-width: none; white-space: nowrap; vertical-align: middle; border-bottom: 1px solid var(--line, #e4e0d6); text-align: right; }
.market-home-table thead th { position: sticky; top: 0; z-index: 2; background: #f6f4ef; color: #545b64; font-size: 12px; font-weight: 600; }
.market-home-table tbody th { position: static; background: #fff; color: var(--ink, #1c1e22); font-size: 12px; font-weight: 500; }
.market-home-table tr > :first-child { text-align: left; }
.market-home-table tbody tr:hover > * { background: #faf8f3; }
.market-home-table .up { color: #bd2136; }
.market-home-table .down { color: #086f63; }
.market-home-sentiment { min-width: 1120px; }
.market-home-table.market-home-sentiment th:first-child { min-width: 112px; }
.market-home-table.market-home-sentiment th:nth-child(3), .market-home-table.market-home-sentiment td:nth-child(3), .market-home-table.market-home-sentiment th:nth-child(9), .market-home-table.market-home-sentiment td:nth-child(9) { text-align: right; max-width: none; white-space: nowrap; }
.market-home-table.market-home-sentiment td:last-child, .market-home-table.market-home-sentiment th:last-child { min-width: 340px; max-width: 540px; text-align: left; white-space: normal; }
.market-home-hotspots { min-width: 1040px; }
.market-home-table.market-home-hotspots th, .market-home-table.market-home-hotspots td { text-align: left; }
.market-home-table.market-home-hotspots th:nth-child(1) { min-width: 100px; }
.market-home-table.market-home-hotspots .market-home-hotspot-stock { min-width: 210px; white-space: normal; }
.market-home-hotspots .market-home-stock { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; white-space: normal; }
.market-home-hotspots .market-home-stock small, .market-home-hotspots .market-home-stock b { white-space: nowrap; }
.market-home-table.market-home-hotspots .market-home-industry-total { background: #faf8f3; font-weight: 600; vertical-align: top; }
.market-home-hotspots tbody + tbody tr:first-child > * { border-top: 1px solid #c9c2b5; }
.market-home-hotspots tbody th[scope="rowgroup"] { vertical-align: top; font-weight: 600; background: #faf8f3; }
.market-home-days { color: #bd2136; font-weight: 600; }
.market-home-stocks { display: flex; flex-wrap: wrap; gap: 5px 16px; line-height: 1.8; }
.market-home-stock { white-space: nowrap; }
.market-home-stock small { color: #545b64; font-family: var(--mono, monospace); font-size: 11px; }
.market-home-stock b { color: #bd2136; font-weight: 500; font-size: 11px; }
.market-home-row-note { display: block; color: #765314; font-size: 10px; margin-top: 3px; }
.market-home-missing, .market-home-muted { color: #626871; }
.market-home-empty { padding: 32px 20px; font-size: 13px; color: #545b64; line-height: 1.8; }
.market-home-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.market-home ::selection { color: #1c1e22; background: #f0cbd0; }
.research-history-row { width: 100%; color: inherit; text-align: left; font: inherit; }
.research-history-row:focus-visible { outline: 2px solid var(--red, #d62b40); outline-offset: 3px; }
@media (max-width: 760px) {
  #dashIndexes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  #dashStats { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 22px; }
  .market-home-head { align-items: flex-start; }
  .market-home-tools { gap: 8px; }
}
@media (max-width: 520px) {
  #dashIndexes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dashStats { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .market-home-head { padding: 16px 14px 10px; }
  .market-home-tools { width: 100%; justify-content: flex-start; margin-left: 0; }
  .market-home-status { padding-right: 14px; padding-left: 14px; }
  .market-home-tools select, .market-home-tools input, .market-home-tools button { min-height: 42px; }
}
