/* quotelinks.com — S&P 500 heatmap (/snp-heatmap.html), js/ql-heatmap.js */
.hm-wrap { padding-top: 20px; padding-bottom: 32px; }
.hm-card { padding: 18px 20px 14px; }
.hm-map { position: relative; min-height: 440px; }
.hm-map:empty::before { content: "Loading heatmap…"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); background: #f3f4f6; border-radius: 8px; }
.hm-ready .hm-map { min-height: 0; }
.hm-h { display: flex; gap: 5px; font: 600 15px/24px var(--font); color: var(--text); white-space: nowrap; }
.hm-hn { min-width: 0; overflow: hidden; text-overflow: clip; }
.hm-h a { color: inherit; }
.hm-h a:hover { color: var(--accent); }
.hm-abs { position: absolute; height: 24px; line-height: 20px; }
.hm-hp { flex: none; font-weight: 500; color: var(--muted); }
.hm-hp.up { color: #047857; }
.hm-hp.down { color: #c2410c; }
.hm-t { position: absolute; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; overflow: hidden;
  padding: 5px 7px; color: #fff; text-decoration: none; outline: 1px solid #fff; outline-offset: -1px;
  box-shadow: inset 0 0 0 1px #fff; transition: filter .1s; }
.hm-t:hover { text-decoration: none; filter: brightness(1.15); z-index: 1; }
.hm-s { font-weight: 700; line-height: 1.05; letter-spacing: -.01em; white-space: nowrap; }
.hm-p { font-weight: 500; line-height: 1.1; color: rgba(255,255,255,.92); white-space: nowrap; }
.hm-v { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; margin: auto 0 2px; font-weight: 600; }
.hm-legend { display: flex; align-items: center; gap: 4px; margin-top: 14px; font: 600 18px var(--font); color: var(--text); }
.hm-legend i { display: inline-block; width: 15px; height: 15px; border-radius: 3px; }
.hm-legend span:first-child { margin-right: 4px; }
.hm-legend span:last-child { margin-left: 4px; }
.hm-sec + .hm-sec { margin-top: 14px; }
.hm-sec .hm-h { margin-bottom: 4px; }
.hm-box { position: relative; }
.hm-err { margin: 0; padding: 40px 16px; text-align: center; color: var(--muted); background: #f3f4f6; border-radius: 8px; }
.hm-tip { position: fixed; z-index: 60; display: none; min-width: 200px; max-width: 280px; padding: 10px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.16); font-size: 13px; pointer-events: none; }
.hm-tip.hm-touch { pointer-events: auto; }
.hm-tt { margin-bottom: 6px; line-height: 1.3; }
.hm-tt b { font-size: 15px; }
.hm-tt span { color: var(--muted); }
.hm-tr { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; }
.hm-tr span { color: var(--muted); }
.hm-tr b.up { color: var(--up); }
.hm-tr b.down { color: var(--down); }
.hm-go { display: block; margin-top: 8px; font-weight: 600; }
.hm-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .hm-wrap { padding-top: 12px; }
  .hm-card { padding: 14px 12px 12px; }
  .hm-legend { font-size: 15px; }
  .hm-legend i { width: 13px; height: 13px; }
}
/* v2: full-width head, sector table */
.hm-head .wrap { max-width: 1200px; }
.hm-wrap > .card + .card, .hm-note + .card { margin-top: 20px; }
.hm-tbl-wrap { overflow-x: auto; padding: 0 18px; }
.hm-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.hm-tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hm-tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hm-tbl tr:last-child td { border-bottom: 0; }
.hm-tbl .hm-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hm-sn { font-weight: 600; }
.hm-top { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.hm-top a { color: var(--muted); }
.hm-top a:hover { color: var(--accent); }
.hm-tbl td.up { color: var(--up); font-weight: 600; }
.hm-tbl td.down { color: var(--down); font-weight: 600; }
.hm-ad { color: var(--muted); }
.hm-tnote { margin: 0; padding: 10px 18px 16px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .hm-tbl-wrap { padding: 0 8px; }
  .hm-tbl td, .hm-tbl th { padding: 8px 6px; }
  .hm-top { font-size: 12px; }
}
