/* 牛股专用排版，保持站内配色与原有养牛内容。 */
.stock-module { width: 100%; min-width: 0; }
.stock-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 10px 0 26px; }
.stock-heading h1 { font-size: 28px; line-height: 1.4; font-weight: 650; margin: 0 0 8px; }
.stock-heading p { margin: 0; color: #65758a; font-size: 14px; }
.stock-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border: 1px solid #dfe6ee; border-radius: 10px; background: #fff; }
.stock-nav a { padding: 10px 16px; border-radius: 7px; font-size: 14px; color: #526174; white-space: nowrap; }
.stock-nav a[aria-current="page"] { background: #edf4ff; color: #2459a7; font-weight: 600; }
.stock-page .stock-panel { padding: 28px 30px; margin-bottom: 24px; }
.stock-panel h2 { font-size: 20px; font-weight: 600; line-height: 1.5; margin: 0 0 18px; }
.stock-panel h2 a { color: inherit; }
.stock-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-bottom: 24px; }
.stock-overview-card { display: block; padding: 22px 28px; background: #fff; border: 1px solid #e3e9f0; border-radius: 12px; color: #26374d; }
.stock-overview-card:hover { border-color: #a9c3e8; }
.stock-overview-card > span, .stock-overview-card small { display: block; font-size: 13px; color: #65758a; }
.stock-overview-card strong { display: block; font-size: 28px; line-height: 1.5; min-height: 42px; margin: 8px 0 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stock-query-form > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.stock-query-form > label span { font-size: 12px; color: #65758a; font-weight: 400; margin-left: 10px; }
.stock-query-form textarea { resize: vertical; min-height: 148px; padding: 14px 16px; }
.stock-form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px 0 14px; }
.stock-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0; }
.stock-sources legend { float: left; width: auto; margin: 0; padding: 0; font-size: 13px; color: #65758a; }
.stock-sources label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; min-height: 34px; cursor: pointer; }
.stock-sources input { accent-color: #2563eb; }
.stock-form-bottom > .btn { flex-shrink: 0; }
.stock-form-help { color: #65758a; font-size: 12px; line-height: 1.8; margin: 0; overflow-wrap: anywhere; }
.stock-form-help code { color: #526174; }
.stock-section-heading, .stock-market-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.stock-section-heading > span, .stock-section-heading p { font-size: 13px; color: #65758a; margin: 3px 0 0; }
.stock-section-heading h2 { margin-bottom: 4px; }
.stock-section-total { text-align: right; }
.stock-section-total span { display: block; color: #65758a; font-size: 12px; }
.stock-section-total strong { display: block; font-size: 24px; min-width: 10ch; line-height: 1.5; font-weight: 600; font-variant-numeric: tabular-nums; }
.stock-subtle-link { color: #416b9f; font-size: 13px; background: none; border: 0; padding: 0; cursor: pointer; }
.stock-refresh-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; margin: 12px 0 6px; }
.stock-refresh-info { min-width: 0; font-size: 12px; line-height: 1.8; }
.stock-status { display: block; color: #526174; }
.stock-status::before { content: ''; display: inline-block; width: 6px; height: 6px; background: #809bbd; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.stock-status.is-error { color: #97601c; }
.stock-status.is-error::before { background: #b98b39; }
.stock-update-time { display: block; min-height: 21px; color: #65758a; font-variant-numeric: tabular-nums; }
.stock-refresh-actions { display: flex; flex-shrink: 0; gap: 8px; }
.stock-page .stock-button { padding: 7px 12px; min-height: 36px; font-size: 12px; color: #526174; background: #f7f9fc; border: 1px solid #dfe6ee; white-space: nowrap; }
.stock-button:hover { background: #edf4ff; }
.stock-button:disabled { opacity: .65; }
.stock-page .stock-table-scroll { margin: 16px 0 0; max-width: 100%; border: 1px solid #e6ebf2; border-radius: 8px; }
.stock-page .stock-table { width: 100%; min-width: 760px; table-layout: auto; font-size: 13px; margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stock-page .stock-table th, .stock-page .stock-table td { padding: 14px 16px; vertical-align: middle; text-align: right; border-top: 0; border-bottom: 1px solid #e8edf3; line-height: 1.6; }
.stock-page .stock-table thead th { color: #65758a; font-weight: 500; background: #f7f9fc; }
.stock-page .stock-table th:first-child { text-align: left; position: sticky; left: 0; z-index: 1; background: #fff; min-width: 124px; }
.stock-page .stock-table thead th:first-child { background: #f7f9fc; }
.stock-table th > strong { display: block; color: #26374d; font-size: 14px; font-weight: 500; }
.stock-code { display: block; font-size: 12px; color: #65758a; font-weight: 400; line-height: 1.7; margin: 3px 0 0; }
.stock-table tbody tr:last-child > * { border-bottom: 0; }
.stock-table tbody tr.is-stale [data-value] { color: #8793a2; }
.stock-page .stock-empty { padding: 30px 18px; text-align: center; white-space: normal; color: #65758a; font-size: 14px; }
.stock-record-tools { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 20px; font-size: 12px; color: #65758a; }
.stock-record-tools > span { margin-right: auto; }
.stock-notice { margin: 12px 0; color: #65758a; font-size: 13px; }
.stock-error { padding: 12px 16px; border-radius: 6px; color: #975f1b; background: #fff8ea; }
.stock-indices { display: flex; flex-wrap: wrap; gap: 12px 30px; color: #65758a; font-size: 13px; }
.stock-indices strong { display: inline-block; min-width: 8ch; margin-left: 8px; font-size: 16px; font-variant-numeric: tabular-nums; }
.stock-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid #e8edf3; }
.stock-totals dt { font-size: 13px; color: #65758a; font-weight: 400; }
.stock-totals dd { margin: 6px 0 0; font-size: 26px; min-height: 39px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stock-quote-heading { display: flex; align-items: center; gap: 16px; min-height: 68px; margin-bottom: 20px; }
.stock-quote-heading > div { min-width: 0; flex: 1; }
.stock-quote-heading h2 { margin: 0; }
.stock-quote-heading a { cursor: pointer; }
.stock-quote-time { margin: 3px 0 0; font-size: 11px; color: #65758a; font-variant-numeric: tabular-nums; }
.stock-row-state { margin-left: auto; color: #97601c; font-size: 12px; }
.stock-puppy { flex: 0 0 64px; width: 64px; height: 64px; object-fit: contain; opacity: 0; transition: opacity .2s; }
.stock-puppy.is-profitable { opacity: 1; }
.stock-quote-overview { display: grid; grid-template-columns: 180px minmax(0,1fr); align-items: start; gap: 32px; }
.stock-current-price { padding-top: 6px; font-variant-numeric: tabular-nums; }
.stock-current-price > strong { font-size: 38px; line-height: 1.3; font-weight: 600; display: block; min-height: 50px; }
.stock-current-price p { display: flex; gap: 12px; margin: 10px 0 0; font-size: 13px; }
.stock-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px 24px; margin: 0; }
.stock-facts dt { color: #65758a; font-size: 12px; font-weight: 400; white-space: nowrap; }
.stock-facts dd { margin: 5px 0 0; min-height: 22px; font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stock-page .stock-price-scroll { margin-top: 24px; }
.stock-page .stock-price-scroll > .stock-price-table { table-layout: auto; min-width: 900px; }
.stock-page .stock-price-table th, .stock-page .stock-price-table td { padding: 12px; font-size: 12px; }
.stock-page .stock-price-table th:first-child { width: 85px; min-width: 85px; }
.stock-details { margin-top: 20px; border-top: 1px solid #e8edf3; }
.stock-details > summary { padding: 16px 0 0; cursor: pointer; color: #526174; font-size: 13px; }
.stock-details-body { padding-top: 22px; }
.stock-chips { border-top: 1px solid #edf1f5; margin-top: 24px; padding-top: 20px; min-height: 144px; }
.stock-chips h3 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.stock-chips p { color: #65758a; font-size: 13px; line-height: 1.9; margin: 10px 0; }
@media (max-width: 992px) {
    .stock-quote-overview { grid-template-columns: 150px minmax(0,1fr); gap: 24px; }
    .stock-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .stock-form-bottom { align-items: flex-end; }
}
@media (max-width: 600px) {
    .stock-heading { display: block; margin: 4px 0 18px; }
    .stock-heading h1 { font-size: 24px; }
    .stock-heading p { font-size: 12px; }
    .stock-nav { margin-top: 18px; width: fit-content; }
    .stock-nav a { padding: 8px 14px; font-size: 13px; }
    .stock-page .stock-panel { padding: 20px 16px; margin-bottom: 18px; }
    .stock-panel h2 { font-size: 18px; }
    .stock-overview { gap: 12px; margin-bottom: 18px; }
    .stock-overview-card { padding: 16px; }
    .stock-overview-card strong { font-size: 21px; min-height: 32px; overflow-wrap: anywhere; }
    .stock-overview-card > span, .stock-overview-card small { font-size: 11px; }
    .stock-query-form > label span { display: block; margin: 6px 0 0; }
    .stock-form-bottom { display: block; }
    .stock-form-bottom > .btn { width: 100%; margin-top: 14px; }
    .stock-sources { gap: 6px 16px; }
    .stock-sources legend { width: 100%; }
    .stock-refresh-bar { align-items: flex-start; flex-direction: column; min-height: 120px; gap: 6px; margin-bottom: 4px; }
    .stock-refresh-info { min-height: 66px; }
    .stock-refresh-actions { align-self: flex-end; }
    .stock-section-total strong { font-size: 20px; min-width: 8ch; }
    .stock-record-tools > span { width: 100%; }
    .stock-totals { grid-template-columns: 1fr; gap: 12px; }
    .stock-totals > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
    .stock-totals dd { margin: 0; font-size: 20px; line-height: 1.5; min-height: 30px; text-align: right; }
    .stock-totals dt { flex-shrink: 0; }
    .stock-indices { gap: 10px 16px; font-size: 12px; }
    .stock-indices strong { font-size: 14px; margin-left: 4px; }
    .stock-quote-overview { grid-template-columns: 1fr; gap: 22px; }
    .stock-current-price { padding: 0; }
    .stock-current-price > strong { font-size: 34px; }
    .stock-facts { gap: 16px 14px; }
    .stock-facts dt { font-size: 11px; }
    .stock-facts dd { font-size: 12px; }
    .stock-puppy { flex-basis: 48px; width: 48px; height: 48px; }
    .stock-quote-heading { gap: 8px; }
    .stock-quote-heading h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .stock-puppy { transition: none; } }

/* ---------- 大盘热力图（大盘云图 / 大盘星图） ---------- */
/* 撑满整个布局：本页打破站内 1140px 容器与两栏限制 */
.stock-heatmap-page main.coolwj-page-container .container { max-width: 100%; padding-left: 18px; padding-right: 18px; }
.stock-heatmap-page main.coolwj-page-container .row { margin-left: -12px; margin-right: -12px; }
.stock-heatmap-wrap { width: 100%; }
.stock-heatmap-panel { padding: 20px 22px 18px; }
.stock-heatmap-panel .stock-section-heading span { font-size: 12px; }
.stock-heatmap-indexes { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 14px 0 4px; font-size: 13px; color: #526174; }
.hm-index strong { margin-left: 8px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; color: #26374d; }
.hm-index b { margin-left: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.hm-index b.up { color: #c5342b; }
.hm-index b.down { color: #108442; }
.stock-heatmap-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 22px; margin: 8px 0 14px; }
.stock-heatmap-stats { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 13px; color: #65758a; }
.stock-heatmap-stats strong { font-size: 16px; margin-left: 6px; font-variant-numeric: tabular-nums; color: #26374d; }
.stock-heatmap-stats .heatmap-up { color: #c5342b; }
.stock-heatmap-stats .heatmap-down { color: #108442; }
.stock-heatmap-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.heatmap-metrics { display: inline-flex; padding: 3px; border: 1px solid #dfe6ee; border-radius: 8px; background: #f7f9fc; }
.hm-metric { padding: 5px 12px; font-size: 12px; color: #526174; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.hm-metric:hover { color: #2459a7; }
.hm-metric.is-active { background: #fff; color: #2459a7; font-weight: 600; box-shadow: 0 1px 3px rgba(36,89,167,.18); }
.heatmap-legend { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #65758a; }
.heatmap-legend-bar { display: inline-block; width: 120px; height: 10px; border-radius: 2px;
    background: linear-gradient(to right, rgb(12,94,45), rgb(40,160,74), rgb(206,231,204), rgb(244,200,196), rgb(224,60,48), rgb(158,12,26)); }
.stock-heatmap { position: relative; width: 100%; height: max(480px, calc(100vh - 350px)); border: 1px solid #dfe6ee; border-radius: 10px; overflow: hidden; background: #eef2f7; }
.stock-heatmap .stock-empty { display: flex; align-items: center; justify-content: center; height: 100%; margin: 0; }
.hm-industry, .hm-cell { position: absolute; overflow: hidden; box-sizing: border-box; }
.hm-industry { background: #eef2f7; border-radius: 4px; }
.hm-tiny, .hm-collapsed { cursor: pointer; }
.hm-collapsed { display: flex; align-items: center; justify-content: center; }
.hm-collapsed-pct { font-size: 11px; font-weight: 600; }
.hm-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 1px; text-align: center; }
.hm-cell .hm-pct { font-size: 11px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hm-cell .hm-name { display: none; font-size: 10px; line-height: 1.25; opacity: .9; max-width: 100%; }
.hm-industry-label { position: absolute; top: 0; left: 0; right: 0; height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; background: rgba(38,55,77,.92); cursor: pointer; }
.hm-industry-label .hm-industry-name { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-industry-label b { font-size: 11px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.hm-industry-strip { position: absolute; top: 0; left: 0; right: 0; height: 42px; display: flex; align-items: center; gap: 14px; padding: 0 12px; background: rgba(38,55,77,.96); color: #fff; font-size: 13px; z-index: 2; }
.hm-industry-strip strong { font-size: 15px; }
.hm-industry-strip span { color: #b8c7da; }
.hm-back { padding: 5px 12px; font-size: 12px; color: #fff; background: rgba(255,255,255,.14); border: 0; border-radius: 6px; cursor: pointer; }
.hm-back:hover { background: rgba(255,255,255,.24); }
.hm-tooltip { position: fixed; z-index: 1990; max-width: 280px; padding: 8px 12px; background: #26374d; color: #fff; border-radius: 8px; font-size: 12px; line-height: 1.7; pointer-events: none; box-shadow: 0 6px 18px rgba(20,32,46,.28); }
.hm-tooltip strong { display: block; font-size: 13px; }
.hm-tooltip span { display: block; color: #c6d4e4; }
/* 全屏盯盘 */
.stock-heatmap-panel:fullscreen { background: #fff; padding: 14px 18px; overflow: auto; }
.stock-heatmap-panel:fullscreen .stock-heatmap { height: calc(100vh - 190px); }
@media (max-width: 767px) {
    .stock-heatmap-page main.coolwj-page-container .container { padding-left: 10px; padding-right: 10px; }
    .stock-heatmap-page main.coolwj-page-container .row { margin-left: -6px; margin-right: -6px; }
    .stock-heatmap-panel { padding: 14px 12px; }
    .stock-heatmap { height: max(400px, calc(100vh - 380px)); }
    .stock-heatmap-meta { flex-direction: column; align-items: flex-start; }
    .hm-cell .hm-name { display: none !important; }
    .hm-cell .hm-pct { font-size: 10px; }
    .hm-index strong { font-size: 15px; }
}
