/* Trang Tín hiệu — chỉ bố cục riêng của trang.
   Đầu trang, tiêu đề khối, ô chỉ số, nhãn, % thay đổi, bảng, dòng bấm mở: dùng components.css */

/* Thẻ bối cảnh Nhiệt kế */
.th-context { color: var(--text); }
.th-context-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.th-context-score { font-family: var(--font-serif); font-size: 24px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.th-context-weight { font-size: 14px; color: var(--text-2); }
.th-context-weight strong { color: var(--text); }
.th-context-more { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink); }
.th-context-more svg { width: 16px; height: 16px; }

/* Khoảng cách thanh lọc (dùng .card.toolbar chung) với bảng bên dưới */
.th-filter { margin-bottom: var(--s3); }

/* Bảng tín hiệu */
.th-table td { vertical-align: top; }
.th-ticker { display: block; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.th-ticker:hover { text-decoration: underline; }
.th-name { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.th-reason { font-size: 13px; color: var(--text-2); min-width: 240px; }

/* Điện thoại: mỗi dòng thành một thẻ xếp chồng */
@media (max-width: 639px) {
  .th-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .th-table, .th-table tbody, .th-table tr, .th-table td { display: block; width: 100%; }
  .th-table tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3);
    padding: var(--s3) 0; border-bottom: 1px solid var(--border);
  }
  .th-table tbody tr:hover td { background: none; }
  .th-table { display: flex; flex-direction: column; }
  .th-table caption { display: block; order: 2; width: 100%; }
  .th-table td { padding: 0; border: 0; text-align: left; }
  .th-table td.r { text-align: left; }
  .th-table td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--text-2); }
  .th-table td:first-child { grid-column: 1; }
  .th-table td:first-child::before, .th-table td:nth-child(4)::before { display: none; }
  .th-table td:nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; }
  .th-reason { grid-column: 1 / -1; min-width: 0; }
  .th-name { white-space: normal; }
}

/* Cách đọc (khối "Hiệu quả tín hiệu đã đóng" tạm ẩn vì nguồn dữ liệu chưa có lệnh đã đóng) */
.th-layout { display: grid; }
.th-layout > * { min-width: 0; }
.th-layout .disclosure:last-child { border-bottom: 0; }

/* Vùng bảng khi đang tải / trống / lỗi */
#th-list[aria-busy="true"] { min-height: 160px; }
