/* Only the treemap geometry and page composition live here; shared shell gutters
   and component colors, type, focus, and density remain toolkit owned. */
body.heatmap-redesign > main.stock-heatmap-page {
  padding-top: var(--cm-app-pad-y);
}

.heatmap-redesign .heatmap-hero > .dt-page-hero {
  display: block;
  padding-block: 1.5rem 1.25rem;
}

.heatmap-redesign .heatmap-hero .dt-page-hero__copy {
  max-width: 48rem;
}

.heatmap-redesign .heatmap-hero .dt-page-hero__copy h1 {
  margin: .5rem 0 0;
}

.heatmap-redesign .heatmap-hero .dt-page-hero__copy p {
  margin: .75rem 0 0;
}

.heatmap-redesign .hm-market-strip {
  margin-top: 1rem;
}

.heatmap-redesign .heatmap-workbench {
  min-width: 0;
  margin-block: calc(var(--cm-layout-section-gap) * .5) var(--cm-layout-section-gap);
}

.heatmap-redesign .heatmap-section-head.dt-section-heading {
  margin-bottom: 1rem;
}

.heatmap-redesign .heatmap-section-head.dt-section-heading h2 {
  margin: 0;
}

.heatmap-redesign .heatmap-section-head.dt-section-heading p {
  margin: .25rem 0 0;
}

.heatmap-redesign .heatmap-stage .hm-heatmap-tile.dt-heatmap-tile {
  position: absolute;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  gap: .25rem;
  padding: .7rem;
  text-decoration: none;
  background: color-mix(in srgb, var(--dt-heatmap-tone) calc(64% + var(--dt-heatmap-strength) * .3%), #17201f);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 0;
  color: #fff;
  container-type: size;
}

.heatmap-redesign .hm-heatmap-tile .dt-heatmap-tile__head,
.heatmap-redesign .hm-heatmap-tile .dt-heatmap-tile__foot,
.heatmap-redesign .hm-heatmap-tile .dt-heatmap-tile__identity {
  min-width: 0;
  flex-wrap: nowrap;
}

.heatmap-redesign .hm-heatmap-tile :is(strong, b, .hm-tile-cap) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-redesign .hm-heatmap-tile .dt-asset-logo {
  width: 1.5rem;
  height: 1.5rem;
}

.heatmap-redesign .hm-heatmap-tile .dt-asset-logo [hidden] {
  display: none !important;
}

.heatmap-redesign .hm-heatmap-tile .dt-heatmap-tile__value {
  font-size: clamp(.75rem, 1.4cqi, 1.35rem);
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='large'] {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='large'] .dt-heatmap-tile__head,
.heatmap-redesign .hm-heatmap-tile[data-tile-size='large'] .dt-heatmap-tile__foot {
  flex-direction: column;
  justify-content: center;
  gap: .3rem;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='large'] .dt-heatmap-tile__identity strong {
  font-size: clamp(1rem, 2cqi, 1.5rem);
  line-height: 1.1;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='large'] .dt-heatmap-tile__foot b {
  font-size: clamp(1.05rem, 2.4cqi, 2rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='large'] .dt-heatmap-tile__foot > span {
  display: none;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='medium'] .dt-asset-logo,
.heatmap-redesign .hm-heatmap-tile[data-tile-size='medium'] .hm-tile-cap,
.heatmap-redesign .hm-heatmap-tile[data-tile-size='medium'] .dt-heatmap-tile__value,
.heatmap-redesign .hm-heatmap-tile[data-tile-size='medium'] .dt-heatmap-tile__foot > span {
  display: none;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='medium'] {
  align-content: center;
  justify-items: center;
  padding: .25rem;
  gap: .15rem;
  text-align: center;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='medium'] .dt-heatmap-tile__head,
.heatmap-redesign .hm-heatmap-tile[data-tile-size='medium'] .dt-heatmap-tile__foot {
  justify-content: center;
  width: 100%;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='medium'] .dt-heatmap-tile__identity strong {
  font-size: clamp(.64rem, 1.35cqi, .9rem);
  line-height: 1.1;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='medium'] .dt-heatmap-tile__foot b {
  font-size: clamp(.7rem, 1.35cqi, .9rem);
  font-variant-numeric: tabular-nums;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='small'],
.heatmap-redesign .hm-heatmap-tile[data-tile-size='tiny'] {
  padding: 1px;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='small'] > *,
.heatmap-redesign .hm-heatmap-tile[data-tile-size='tiny'] > * {
  display: none;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='small'] {
  align-content: center;
  justify-items: center;
  padding: .1rem;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='small'] .dt-heatmap-tile__head,
.heatmap-redesign .hm-heatmap-tile[data-tile-size='small'] .dt-heatmap-tile__identity {
  display: flex;
  justify-content: center;
  width: 100%;
}

.heatmap-redesign .hm-heatmap-tile[data-tile-size='small'] .dt-heatmap-tile__identity strong {
  font-size: .56rem;
  line-height: 1;
}

.heatmap-redesign .hm-heatmap-tile:hover,
.heatmap-redesign .hm-heatmap-tile:focus-visible {
  z-index: 12;
  box-shadow: inset 0 0 0 2px #fff;
}

.heatmap-redesign .heatmap-canvas-scroll:has(.hm-list-stage) {
  height: auto;
  overflow: visible !important;
  overscroll-behavior: auto;
}

.heatmap-redesign .hm-market-table {
  min-width: 48rem;
}

.heatmap-redesign .hm-market-table tbody tr[data-hm-href] {
  cursor: pointer;
}

.heatmap-redesign .hm-market-table tbody tr[data-hm-href]:focus-visible {
  outline: 2px solid var(--dt-color-focus);
  outline-offset: -2px;
}

.heatmap-redesign .hm-table-company {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.heatmap-redesign .hm-table-company a {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.heatmap-redesign .hm-table-company a:hover,
.heatmap-redesign .hm-table-company a:focus-visible {
  color: var(--dt-color-brand);
  text-decoration: underline;
}

.heatmap-redesign .hm-table-company small,
.heatmap-redesign .hm-table-secondary {
  display: block;
  color: var(--dt-color-text-muted);
  font-size: var(--dt-text-sm);
  font-weight: var(--dt-weight-regular);
}

.heatmap-redesign .hm-table-move.is-up { color: var(--dt-color-success); }
.heatmap-redesign .hm-table-move.is-down { color: var(--dt-color-danger); }
.heatmap-redesign .hm-table-pagination { margin-top: var(--dt-space-panel); }

@media (max-width: 48rem) {
  .heatmap-redesign .heatmap-hero > .dt-page-hero {
    padding-block: 1rem;
  }
}
