/* BitClac v255: exact market-pulse treatment and real data charts. */

/* Keep the active sort arrow directly beside its header label. */
html body[data-page="home"] .crypto-market-table th button[data-pulse-sort] {
  width: auto !important;
  justify-content: flex-end !important;
}

html body[data-page="home"] .crypto-market-table th.is-rank button[data-pulse-sort],
html body[data-page="home"] .crypto-market-table th.is-coin button[data-pulse-sort],
html body[data-page="home"] .crypto-market-table th.is-category button[data-pulse-sort] {
  justify-content: flex-start !important;
}

html body[data-page="home"] .crypto-market-table th button[data-pulse-sort]::after {
  width: 0 !important;
  height: 0 !important;
  margin-left: 1px;
  border: 0 !important;
  border-right: 4px solid transparent !important;
  border-left: 4px solid transparent !important;
  color: transparent !important;
  content: "" !important;
  opacity: 0 !important;
}

html body[data-page="home"] .crypto-market-table th button[data-pulse-sort].is-active[data-direction="asc"]::after {
  border-bottom: 6px solid #53dda0 !important;
  opacity: 1 !important;
}

html body[data-page="home"] .crypto-market-table th button[data-pulse-sort].is-active[data-direction="desc"]::after {
  border-top: 6px solid #53dda0 !important;
  opacity: 1 !important;
}

/* White rank numbers; the green/red rail remains the directional indicator. */
html body[data-page="home"] .market-rank,
html body[data-page="home"] .market-rank > span {
  color: #f4f7fb !important;
}

/* Left navigation labels stay white across the desktop shell. */
@media (min-width: 1024px) {
  html body .platform-header .bitclac-main-nav a,
  html body .platform-header .navlinks a,
  html body .bitclac-sidebar-account-copy strong,
  html body .bitclac-sidebar-account-copy small {
    color: #f4f7fb !important;
  }
}

/* Show only the token artwork: no graphite square, outline or substitute surface. */
html body[data-page="home"] .market-pulse-coin-v254 .crypto-rates-logo,
html body[data-page="home"] .market-pulse-coin-v254 .crypto-rates-logo:hover,
html body[data-page="home"] .crypto-market-table tbody tr:hover .crypto-rates-logo,
html body[data-page="home"] .crypto-market-table tbody tr:focus-visible .crypto-rates-logo {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  flex: 0 0 42px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

html body[data-page="home"] .market-pulse-coin-v254 .crypto-rates-logo img {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
}

html body[data-page="home"] .market-pulse-coin-v254 .crypto-rates-logo.is-fallback {
  display: grid;
  place-items: center;
}

html body[data-page="home"] .market-pulse-coin-v254 .crypto-rates-logo-text {
  inset: 0 !important;
  display: grid;
  place-items: center;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* Curved momentum uses real percentage values for vertical marker position. */
html body[data-page="home"] .market-pulse-curve-v255 {
  position: relative;
  width: 100%;
  height: 58px;
}

html body[data-page="home"] .market-pulse-curve-values-v255 {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  pointer-events: none;
}

html body[data-page="home"] .market-pulse-curve-value-v255 {
  display: grid;
  align-content: space-between;
  justify-items: center;
  color: #aeb8c5;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

html body[data-page="home"] .market-pulse-curve-value-v255 small {
  color: #8793a2;
  font-size: 10px;
  font-weight: 800;
}

html body[data-page="home"] .market-pulse-curve-value-v255.is-positive {
  color: #53dda0;
}

html body[data-page="home"] .market-pulse-curve-value-v255.is-negative {
  color: #f17d87;
}

html body[data-page="home"] .market-pulse-curve-v255 svg {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

html body[data-page="home"] .market-pulse-curve-v255 path {
  fill: none;
  stroke: #99a5b3;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

html body[data-page="home"] .market-pulse-curve-v255 path.tone-positive {
  stroke: #53dda0;
}

html body[data-page="home"] .market-pulse-curve-v255 path.tone-negative {
  stroke: #f17d87;
}

html body[data-page="home"] .market-pulse-curve-v255 circle {
  fill: #99a5b3;
  stroke: #12171d;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

html body[data-page="home"] .market-pulse-curve-v255 circle.is-positive {
  fill: #53dda0;
}

html body[data-page="home"] .market-pulse-curve-v255 circle.is-negative {
  fill: #f17d87;
}

/* Real seven-day price/capitalisation graph. */
html body[data-page="home"] .market-pulse-chart-v255 {
  position: relative;
  width: 100%;
  min-width: 220px;
  display: grid;
  gap: 2px;
}

html body[data-page="home"] .market-pulse-chart-head-v255 {
  min-height: 20px;
  display: grid;
  align-items: center;
}

html body[data-page="home"] .market-pulse-chart-range-v255 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
}

html body[data-page="home"] .market-pulse-chart-range-v255 small {
  overflow: hidden;
  color: #8592a1;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body[data-page="home"] .market-pulse-chart-range-v255 small:last-child {
  text-align: right;
}

html body[data-page="home"] .market-pulse-chart-range-v255 b {
  color: #f4f7fb;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

html body[data-page="home"] .market-pulse-chart-v255 svg {
  width: 100%;
  height: 44px;
  display: block;
  overflow: visible;
}

html body[data-page="home"] .market-pulse-chart-v255 polygon {
  fill: rgba(83, 221, 160, .14);
}

html body[data-page="home"] .market-pulse-chart-v255 polyline {
  fill: none;
  stroke: #53dda0;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

html body[data-page="home"] .market-pulse-chart-v255 circle {
  fill: #53dda0;
  stroke: #12171d;
  stroke-width: 1.5;
}

html body[data-page="home"] .market-pulse-chart-v255.is-negative polygon {
  fill: rgba(241, 125, 135, .13);
}

html body[data-page="home"] .market-pulse-chart-v255.is-negative polyline {
  stroke: #f17d87;
}

html body[data-page="home"] .market-pulse-chart-v255.is-negative circle {
  fill: #f17d87;
}

html body[data-page="home"] .market-pulse-chart-source-v255 {
  overflow: hidden;
  color: #6f7d8d;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body[data-page="home"] .market-pulse-chart-v255.is-loading,
html body[data-page="home"] .market-pulse-chart-v255.is-unavailable {
  min-height: 66px;
  place-content: center;
  justify-items: center;
  gap: 6px;
  color: #8794a3;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

html body[data-page="home"] .market-pulse-chart-v255.is-loading::before {
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: #53dda0;
  content: "";
  animation: market-real-loading-v255 1s ease-in-out infinite alternate;
}

html body[data-page="home"] .market-pulse-chart-v255.is-unavailable button {
  padding: 4px 7px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 5px;
  color: #dce3ec;
  background: #242a32;
  font-size: 9px;
  font-weight: 800;
}

@keyframes market-real-loading-v255 {
  from { opacity: .32; transform: scaleX(.5); }
  to { opacity: 1; transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  html body[data-page="home"] .market-pulse-chart-v255.is-loading::before {
    animation: none;
  }
}
