* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  /* Positive realized-PnL distribution bars only (`--positive`). */
  --token-pnl-positive-from: #16a34a;
  --token-pnl-positive-to: #4ade80;
}

html {
  overflow-x: auto;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  padding: 1rem;
  background: #0f0f12;
  color: #e4e4e7;
  min-height: 100vh;
  /* Lock desktop-style layouts site-wide; narrow viewports scroll horizontally. */
  min-width: 1100px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

header {
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.subtitle {
  margin: 0 0 13px 0;
  font-size: 0.74rem;
  line-height: 1.4;
  color: #71717a;
  font-weight: 400;
}

.inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.inputs.panel {
  gap: 0.75rem;
  align-items: flex-end;
}

.candles-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}

.candles-controls .field-switch {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.field-switch-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: default;
  font-size: 0.8rem;
  color: #a1a1aa;
}

.field-switch-title {
  flex: 0 0 auto;
}

.candles-mint-resolution-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
}

.token-only-controls[hidden] {
  display: none !important;
}

#mint {
  min-width: 420px;
}

#walletLabel,
#walletSortDirection,
#walletPnlSortField,
#tokenTopPnlResolution,
#tokenTopPnlSortField,
#tokenTopPnlSortDirection {
  min-width: 180px;
}

#tokenTopPnlResolution {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

#walletPage,
#tokenTopPnlPage {
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
  box-sizing: border-box;
}

#walletLimit,
#tokenTopPnlLimit {
  width: 102px;
  min-width: 102px;
  max-width: 102px;
}

#walletPnlSortField,
#tokenTopPnlSortField {
  width: 172px;
  min-width: 172px;
  max-width: 172px;
}

#walletSortDirection,
#tokenTopPnlSortDirection {
  width: 142px;
  min-width: 142px;
  max-width: 142px;
}

#walletLabel {
  width: 136px;
  min-width: 136px;
  max-width: 136px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-switch {
  min-width: 220px;
}

.field label {
  font-size: 0.8rem;
  color: #a1a1aa;
}

.remote-filters-help {
  margin: 0 0 13px 0;
  flex-basis: 100%;
  font-size: 0.74rem;
  line-height: 1.4;
  color: #71717a;
  font-weight: 400;
}

.field-control {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  opacity: 0.85;
  background: #a1a1aa;
  border-radius: 4px;
}

.field-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #a1a1aa;
}

.field-icon.icon-tag::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 5a2 2 0 0 1 2-2h6.2a2 2 0 0 1 1.4.6l8.8 8.8a2 2 0 0 1 0 2.8l-6 6a2 2 0 0 1-2.8 0L3.6 12.2A2 2 0 0 1 3 10.8V5Zm2 0v5.8l9 9L20 13.8l-8.8-8.8H5Zm2.5 1.5A1.5 1.5 0 1 0 7.5 9a1.5 1.5 0 0 0 0-3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 5a2 2 0 0 1 2-2h6.2a2 2 0 0 1 1.4.6l8.8 8.8a2 2 0 0 1 0 2.8l-6 6a2 2 0 0 1-2.8 0L3.6 12.2A2 2 0 0 1 3 10.8V5Zm2 0v5.8l9 9L20 13.8l-8.8-8.8H5Zm2.5 1.5A1.5 1.5 0 1 0 7.5 9a1.5 1.5 0 0 0 0-3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.field-icon.icon-grid::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.field-icon.icon-user::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4.5 4.5 0 1 0-4.5-4.5A4.5 4.5 0 0 0 12 12Zm0-2a2.5 2.5 0 1 1 2.5-2.5A2.5 2.5 0 0 1 12 10Zm0 4c-4.4 0-8 2.2-8 5a1 1 0 0 0 2 0c0-1.4 2.5-3 6-3s6 1.6 6 3a1 1 0 0 0 2 0c0-2.8-3.6-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4.5 4.5 0 1 0-4.5-4.5A4.5 4.5 0 0 0 12 12Zm0-2a2.5 2.5 0 1 1 2.5-2.5A2.5 2.5 0 0 1 12 10Zm0 4c-4.4 0-8 2.2-8 5a1 1 0 0 0 2 0c0-1.4 2.5-3 6-3s6 1.6 6 3a1 1 0 0 0 2 0c0-2.8-3.6-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.field-icon.icon-sort::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 3a1 1 0 0 1 1 1v14.6l1.3-1.3a1 1 0 0 1 1.4 1.4l-3 3a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L6 18.6V4a1 1 0 0 1 1-1Zm10 18a1 1 0 0 1-1-1V5.4l-1.3 1.3a1 1 0 1 1-1.4-1.4l3-3a1 1 0 0 1 1.4 0l3 3a1 1 0 1 1-1.4 1.4L18 5.4V20a1 1 0 0 1-1 1Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 3a1 1 0 0 1 1 1v14.6l1.3-1.3a1 1 0 0 1 1.4 1.4l-3 3a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L6 18.6V4a1 1 0 0 1 1-1Zm10 18a1 1 0 0 1-1-1V5.4l-1.3 1.3a1 1 0 1 1-1.4-1.4l3-3a1 1 0 0 1 1.4 0l3 3a1 1 0 1 1-1.4 1.4L18 5.4V20a1 1 0 0 1-1 1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.field-icon.icon-pages::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 3h9a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm0 2v12h9V5H7Zm12 3h1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9a1 1 0 1 1 0-2h11V10h-1a1 1 0 1 1 0-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 3h9a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm0 2v12h9V5H7Zm12 3h1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9a1 1 0 1 1 0-2h11V10h-1a1 1 0 1 1 0-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.field-icon.icon-hash::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 3a1 1 0 0 1 1 1v3h6V4a1 1 0 1 1 2 0v3h3a1 1 0 1 1 0 2h-3v6h3a1 1 0 1 1 0 2h-3v3a1 1 0 1 1-2 0v-3H9v3a1 1 0 1 1-2 0v-3H4a1 1 0 1 1 0-2h3V9H4a1 1 0 1 1 0-2h3V4a1 1 0 0 1 1-1Zm1 6v6h6V9H9Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 3a1 1 0 0 1 1 1v3h6V4a1 1 0 1 1 2 0v3h3a1 1 0 1 1 0 2h-3v6h3a1 1 0 1 1 0 2h-3v3a1 1 0 1 1-2 0v-3H9v3a1 1 0 1 1-2 0v-3H4a1 1 0 1 1 0-2h3V9H4a1 1 0 1 1 0-2h3V4a1 1 0 0 1 1-1Zm1 6v6h6V9H9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.field input,
.field select {
  padding-left: 34px;
}

.field label .label-icon.field-icon,
.field-switch-header .label-icon.field-icon {
  display: inline-block;
  position: relative;
  left: 0;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  background: none;
  opacity: 1;
}

.field label .label-icon.field-icon::after,
.field-switch-header .label-icon.field-icon::after {
  inset: 0;
  position: absolute;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.field input,
.field select {
  padding: 0.5rem 0.75rem;
  padding-left: 34px;
  font-size: 0.9rem;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  background: #18181b;
  color: #e4e4e7;
  min-width: 290px;
}

.field select {
  min-width: 290px;
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.inline-row-actions {
  margin-top: 0;
  align-self: flex-end;
}

.inline-actions-target {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
}

#tokenLoadingSlot,
#walletLoadingSlot {
  align-items: flex-end;
}

#tokenLoadingSlot .loading,
#walletLoadingSlot .loading {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}

.actions-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #a1a1aa;
}

.loading[hidden] {
  display: none !important;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-height: 1.5em;
}

.section-header h2 {
  margin: 0;
  line-height: 1.5;
}

.section-header--trades {
  justify-content: space-between;
  width: 100%;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.trades-fetch-control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0;
}

.remote-top-row {
  flex-wrap: nowrap;
}

.remote-top-row .top-mode-switch {
  flex: 0 0 auto;
  min-width: 0;
}

.remote-top-row .mint-query-field {
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
}

.remote-top-row .wallet-resolution-field {
  flex: 0 0 auto;
  min-width: 0;
}

.remote-top-row .mint-query-field .field-control,
.remote-top-row .mint-query-field input {
  width: 420px;
  min-width: 420px;
}

.remote-top-row .wallet-resolution-field select {
  width: 88px;
  min-width: 88px;
}

.trades-fetch-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  background: #18181b;
  color: #a1a1aa;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.trades-fetch-lock[aria-pressed="true"] {
  background: #ca8a04;
  color: #1c1917;
  border-color: #a16207;
}

.trades-fetch-lock[aria-pressed="false"] {
  background: #90ee90;
  color: #1e6b1e;
  border-color: #6bc96b;
}

.trades-fetch-lock[aria-pressed="false"]:not(.trades-fetch-lock--no-hover):hover {
  background: #ca8a04;
  color: #1c1917;
  border-color: #a16207;
}

.trades-fetch-lock[aria-pressed="false"]:not(.trades-fetch-lock--no-hover):hover .trades-fetch-lock-icon--locked {
  display: block !important;
}

.trades-fetch-lock[aria-pressed="false"]:not(.trades-fetch-lock--no-hover):hover .trades-fetch-lock-icon--unlocked {
  display: none !important;
}

.trades-fetch-lock[aria-pressed="true"]:not(.trades-fetch-lock--no-hover):hover {
  background: #90ee90;
  color: #1e6b1e;
  border-color: #6bc96b;
}

.trades-fetch-lock[aria-pressed="true"]:not(.trades-fetch-lock--no-hover):hover .trades-fetch-lock-icon--locked {
  display: none;
}

.trades-fetch-lock[aria-pressed="true"]:not(.trades-fetch-lock--no-hover):hover .trades-fetch-lock-icon--unlocked {
  display: block !important;
}

.trades-fetch-lock[aria-pressed="false"] .trades-fetch-lock-icon--locked {
  display: none;
}

.trades-fetch-lock[aria-pressed="false"] .trades-fetch-lock-icon--unlocked {
  display: block !important;
}

.trades-fetch-lock-icon--unlocked {
  display: none;
}

.trades-fetch-switch {
  display: inline-flex;
  cursor: pointer;
  user-select: none;
}

.trades-fetch-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.trades-fetch-switch-track {
  display: flex;
  align-items: center;
  height: 2rem;
  padding: 0 0.25rem;
  border-radius: 6px;
  background: #27272a;
  border: 1px solid #3f3f46;
  position: relative;
  min-width: 7.5rem;
}

.trades-fetch-switch-track::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.25rem;
  width: calc(50% - 0.35rem);
  height: calc(100% - 0.5rem);
  border-radius: 6px;
  background: #3b82f6;
  border: 1px solid #3f3f46;
  transition: transform 0.2s ease;
  z-index: 0;
}

.trades-fetch-switch-input:checked + .trades-fetch-switch-track::after {
  transform: translateX(100%);
}

.trades-fetch-switch-option {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: #71717a;
  z-index: 1;
  transition: color 0.2s;
}

.trades-fetch-switch-input:not(:checked) + .trades-fetch-switch-track .trades-fetch-switch-option[data-value="single"] {
  color: #e4e4e7;
}

.trades-fetch-switch-input:checked + .trades-fetch-switch-track .trades-fetch-switch-option[data-value="paged"] {
  color: #e4e4e7;
}

.trades-fetch-switch.trades-fetch-switch--locked {
  pointer-events: none;
  opacity: 0.85;
}

.section-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #a1a1aa;
  line-height: 1.5;
  margin-bottom: 13px;
  margin-left: 13px;
}

.section-loading[hidden] {
  display: none !important;
}

.section-error {
  display: inline-block;
  font-size: 0.9rem;
  color: #f87171;
  border: 3px solid #f87171;
  border-radius: 3px;
  padding: 0.25rem 0.5rem;
  margin-left: 13px;
  margin-bottom: 13px;
}

.section-error[hidden] {
  display: none !important;
}

.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #3f3f46;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: loading-spin 0.7s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  margin: 0;
}

button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  background: #3b82f6;
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: #2563eb;
}

button:active {
  transform: scale(0.98);
}

.fetch-btn-attention {
  border: 1px solid #22c55e;
  box-shadow: 0 0 0 1px #22c55e;
  animation: fetch-btn-pulse 1.2s ease-in-out infinite;
}

@keyframes fetch-btn-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.8);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.mode-switch {
  min-width: 220px;
  text-align: left;
  background: #27272a;
  border: 1px solid #3f3f46;
  color: #e4e4e7;
}

.mode-switch:hover {
  background: #3f3f46;
}

.panel {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.panel h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #a1a1aa;
}

.panel h2.token-stats-group-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 1rem 0;
}

.section-header h2.token-stats-group-title {
  margin-bottom: 0;
}

.inputs.panel .section-header h2.token-stats-group-title {
  margin-bottom: 0;
}

/* Override .panel h2 bottom margin inside token supply cards (section-header already wants tight stack). */
.token-supply-panel .section-header h2 {
  margin: 0;
}

.token-supply-panel .section-header h2.token-stats-group-title {
  margin: 0;
}

.token-section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.token-last-updated {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  overflow: hidden;
  padding: 0.5rem 0.85rem 0.55rem 1rem;
  text-align: right;
  min-width: min(11.75rem, 100%);
  border-radius: 10px;
  border: 1px solid rgba(129, 140, 248, 0.32);
  background: linear-gradient(165deg, rgba(99, 102, 241, 0.14) 0%, rgba(20, 20, 26, 0.98) 48%, #0c0c10 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 10px 28px rgba(0, 0, 0, 0.4);
}

.token-last-updated::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #c4b5fd, #6366f1 55%, #4f46e5);
  pointer-events: none;
}

.token-last-updated-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.token-last-updated-value {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #f4f4f5;
  font-variant-numeric: tabular-nums;
}

.token-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.token-section-content .token-header {
  margin-bottom: 0;
}

.token-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.token-header .symbol {
  font-weight: 700;
  font-size: 1.2rem;
  display: block;
  letter-spacing: -0.02em;
  color: #fafafa;
}

.token-header .name {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.12rem;
  letter-spacing: 0.02em;
}

.token-stats-groups {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Token stats inner cards: same surface language as .wallet-pnl-card, tighter rhythm */
.token-section-content .token-stats-groups {
  gap: 0.65rem;
}

.token-section-content .token-stats-row {
  gap: 0.65rem;
}

.token-section-content .token-stats-groups > .token-stats-group,
.token-section-content .token-stats-row .token-stats-group {
  padding: 0.65rem 0.72rem 0.72rem 0.92rem;
  border-radius: 12px;
  background: linear-gradient(165deg, #141418 0%, #0c0c0f 55%, #0a0a0c 100%);
  border: 1px solid #2a2a32;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 40px rgba(0, 0, 0, 0.35);
}

.token-section-content .token-stats-groups .token-stats-group::before {
  width: 3px;
  border-radius: 12px 0 0 12px;
}

.token-section-content .token-stats-group-title {
  flex-shrink: 0;
  margin: 0 0 0.5rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.token-section-content .token-stat-rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.token-section-content .token-stat-rows--2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.token-section-content .token-stat-row {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  padding: 0.42rem 0.48rem 0.42rem 0.42rem;
  border-radius: 8px;
  border: 1px solid #2e2e38;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.28));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.token-section-content .token-stat-row-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.38);
}

.token-section-content .token-stat-row-icon-svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.token-section-content .token-stat-row-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.token-section-content .token-stat-row-label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #71717a;
  line-height: 1.2;
}

.token-section-content .token-stat-row-value {
  font-size: 0.8125rem;
  font-weight: 450;
  line-height: 1.35;
  color: #d4d4d8;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

/* USD amounts in token stats (price, market cap, volumes, cohort row) */
.token-section-content .token-stat-usd-value {
  color: #4ade80;
  font-weight: 450;
}

.token-section-content .token-stat-usd-value .token-stat-row-price-num,
.token-section-content .token-stat-usd-value .token-stat-price-neg,
.token-section-content .token-stat-usd-value .token-stat-usd-dollar,
.token-section-content .token-stat-usd-value .token-stat-price-suffix,
.token-section-content .token-stat-usd-value .token-price-zero-run {
  color: inherit;
  font-weight: inherit;
}

.token-section-content .token-stat-usd-ratio-sep {
  color: #71717a;
  font-weight: 450;
}

.token-section-content .token-stat-cohort-vol-share {
  margin-left: 0.15em;
  font-size: 0.85em;
  font-weight: 450;
  color: #a1a1aa;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.token-section-content .token-stat-row-price-num {
  font-weight: 450;
  color: #d4d4d8;
}

.token-section-content .token-stat-row-price-num--compact {
  letter-spacing: 0.01em;
}

.token-section-content .token-price-zero-run {
  font-size: 0.62em;
  font-weight: 500;
  line-height: 0;
  vertical-align: super;
  margin-left: 0.03em;
  color: #a1a1aa;
}

.token-section-content .token-stat-price-suffix {
  margin-left: 0.28em;
  font-size: 0.72em;
  font-weight: 450;
  color: #94a3b8;
}

.token-section-content .token-stat-price-neg {
  margin-right: 0.06em;
  font-weight: 450;
  color: #d4d4d8;
}

.token-section-content .token-stat-row-value a {
  color: #38bdf8;
  font-weight: 450;
  text-decoration: none;
}

.token-section-content .token-stat-row-value a:hover {
  color: #7dd3fc;
}

/* Per-row accent (icon tile + tinted border like wallet metric chips) */
.token-section-content .token-stat-row--mint {
  border-color: rgba(56, 189, 248, 0.28);
  background: linear-gradient(165deg, rgba(14, 165, 233, 0.09), rgba(0, 0, 0, 0.28));
}

.token-section-content .token-stat-row--mint .token-stat-row-icon {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.12);
}

.token-section-content .token-stat-row--decimals {
  border-color: rgba(167, 139, 250, 0.28);
  background: linear-gradient(165deg, rgba(139, 92, 246, 0.08), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--decimals .token-stat-row-icon {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.38);
  background: rgba(139, 92, 246, 0.12);
}

.token-section-content .token-stat-row--category {
  border-color: rgba(249, 115, 22, 0.25);
  background: linear-gradient(165deg, rgba(249, 115, 22, 0.07), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--category .token-stat-row-icon {
  color: #fb923c;
  border-color: rgba(251, 146, 60, 0.35);
  background: rgba(249, 115, 22, 0.1);
}

.token-section-content .token-stat-price-pct {
  margin-left: 0.25em;
  font-weight: 600;
  white-space: nowrap;
}

.token-section-content .token-stat-price-pct-meta {
  margin-left: 0.35em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.22em;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.03em;
  vertical-align: baseline;
}

.token-section-content .token-stat-price-pct-arrow {
  font-size: 1.05em;
  line-height: 1;
}

.token-section-content .token-stat-price-pct-period {
  color: #94a3b8;
  font-weight: 550;
}

.token-section-content .token-stat-row--verified {
  border-color: rgba(52, 211, 153, 0.26);
  background: linear-gradient(165deg, rgba(16, 185, 129, 0.08), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--verified .token-stat-row-icon {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.38);
  background: rgba(16, 185, 129, 0.12);
}

.token-section-content .token-stat-row--priceUsd {
  border-color: rgba(56, 189, 248, 0.28);
  background: linear-gradient(165deg, rgba(14, 165, 233, 0.08), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--priceUsd .token-stat-row-icon {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(14, 165, 233, 0.12);
}

.token-section-content .token-stat-row--marketCap {
  border-color: rgba(96, 165, 250, 0.28);
  background: linear-gradient(165deg, rgba(59, 130, 246, 0.08), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--marketCap .token-stat-row-icon {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.38);
  background: rgba(37, 99, 235, 0.12);
}

.token-section-content .token-stat-row--price1d {
  border-color: rgba(148, 163, 184, 0.22);
  background: linear-gradient(165deg, rgba(148, 163, 184, 0.06), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--price1d .token-stat-row-icon {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(100, 116, 139, 0.12);
}

.token-section-content .token-stat-row--price7d {
  border-color: rgba(129, 140, 248, 0.28);
  background: linear-gradient(165deg, rgba(99, 102, 241, 0.08), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--price7d .token-stat-row-icon {
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.38);
  background: rgba(99, 102, 241, 0.12);
}

.token-section-content .token-stat-row--supply {
  border-color: rgba(52, 211, 153, 0.28);
  background: linear-gradient(165deg, rgba(16, 185, 129, 0.08), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--supply .token-stat-row-icon {
  color: #4ade80;
  border-color: rgba(52, 211, 153, 0.38);
  background: rgba(16, 185, 129, 0.12);
}

.token-section-content .token-stat-row--tokenVol24h {
  border-color: rgba(45, 212, 191, 0.28);
  background: linear-gradient(165deg, rgba(20, 184, 166, 0.08), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--tokenVol24h .token-stat-row-icon {
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(13, 148, 136, 0.12);
}

.token-section-content .token-stat-row--usdVol24h {
  border-color: rgba(74, 222, 128, 0.28);
  background: linear-gradient(165deg, rgba(34, 197, 94, 0.08), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--usdVol24h .token-stat-row-icon {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.38);
  background: rgba(22, 163, 74, 0.12);
}

.token-section-content .token-stat-row--topPnlCohortVol {
  border-color: rgba(52, 211, 153, 0.32);
  background: linear-gradient(165deg, rgba(16, 185, 129, 0.1), rgba(0, 0, 0, 0.26));
}

.token-section-content .token-stat-row--topPnlCohortVol .token-stat-row-icon {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(5, 150, 105, 0.14);
}

.token-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

/* Token stats: narrow overview | price + supply (pair column). */
.token-stats-row.token-stats-row--split-overview {
  grid-template-columns: minmax(0, 26%) minmax(0, 74%);
  align-items: stretch;
}

.token-stats-row--split-overview > .token-stats-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.token-stats-col--overview .token-stats-group {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.token-stats-col--overview .token-stat-rows--2col {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
}

.token-stats-pair-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 56%);
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
  align-items: start;
  align-self: stretch;
}

.token-stats-pair-grid > .token-stats-group {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.token-stats-pair-grid .token-stat-rows {
  flex: 0 1 auto;
}

.token-stats-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.token-stats-group {
  padding: 1rem;
  background: #0f0f12;
  border: 1px solid #27272a;
  border-radius: 6px;
}

/* Token metadata + top-PnL table: accent stripe host (includes row layout price/supply). */
.token-stats-groups .token-stats-group,
.token-top-pnl-table-card {
  position: relative;
  overflow: hidden;
}

.token-stats-group-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.token-stats-group-title .section-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.token-stats-group--overview .token-stats-group-title .section-icon {
  color: #f59e0b;
}

.token-stats-group--price .token-stats-group-title .section-icon {
  color: #38bdf8;
}

.token-stats-group--supply .token-stats-group-title .section-icon {
  color: #34d399;
}

.token-stats-group--meta .token-stats-group-title .section-icon {
  color: #a78bfa;
}

.token-stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.5rem;
  margin: 0;
  font-size: 0.9rem;
}

.token-stats dt {
  color: #a1a1aa;
  font-weight: 500;
}

.token-stats dd {
  margin: 0;
  word-break: break-all;
}

.token-section a {
  color: #3b82f6;
  text-decoration: none;
}

.token-section a:hover {
  text-decoration: none;
}

.token-supply-panel h2 {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.token-supply-subheader {
  margin-top: 0;
}

.token-supply-period-header {
  margin: 0;
}

.token-supply-period-title.token-stats-group-title {
  margin: 0;
}

.token-supply-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.token-supply-grid--trade-count-pie-row {
  grid-template-columns: 1fr;
  margin-bottom: 0.25rem;
}

.token-supply-grid--section-gap {
  margin-bottom: 1.15rem;
}

.token-trade-tier-dash__top--titles-only {
  grid-template-columns: 1fr;
}

.token-supply-card {
  position: relative;
  background: #0f0f12;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 1rem;
  overflow: hidden;
}

/* Left accent stripe (token supply cards + token stats + top PnL table). */
.token-supply-card::before,
.token-stats-groups .token-stats-group::before,
.token-top-pnl-table-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  opacity: 0.92;
  pointer-events: none;
}

.token-supply-card::before {
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, #60a5fa, #34d399);
}

.token-top-pnl-table-card::before {
  border-radius: 6px 0 0 6px;
  background: linear-gradient(180deg, #60a5fa, #34d399);
}

.token-stats-groups .token-stats-group::before {
  border-radius: 6px 0 0 6px;
}

.token-stats-group--overview::before {
  background: linear-gradient(180deg, #fbbf24, #d97706);
}

.token-stats-group--price::before {
  background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.token-stats-group--supply::before {
  background: linear-gradient(180deg, #34d399, #0d9488);
}

.token-stats-group--meta::before {
  background: linear-gradient(180deg, #a78bfa, #6366f1);
}

.token-supply-wrap {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

.token-supply-pie {
  position: relative;
  width: clamp(180px, 20vw, 240px);
  aspect-ratio: 1 / 1;
  height: auto;
  flex: 0 0 auto;
  border-radius: 50%;
  border: none;
  /* GPU layer + slight rim soften — reduces stair-stepping on conic slice edges in some browsers. */
  transform: translateZ(0);
  isolation: isolate;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 0 0.65px rgba(0, 0, 0, 0.45),
    0 10px 32px rgba(0, 0, 0, 0.5);
  /* Neutral until JS sets conic-gradient (avoids stale blue placeholder being mistaken for chart colors). */
  background: #1a1a1f;
}

.token-supply-pie::after {
  content: '';
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  z-index: 1;
  background: linear-gradient(165deg, #15151a 0%, #101014 50%, #0c0c10 100%);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.token-supply-pie--donut-labels {
  overflow: visible;
}

.token-supply-card:has(.token-supply-pie--donut-labels) {
  overflow: visible;
}

/* Volume-by-PnL dash card: extra top padding under the card rim (donut uses default .token-supply-pie sizing — same as trade-tier pie above). */
.token-supply-card--volume-pnl-pie {
  padding-top: calc(1rem + 6px);
}

.token-supply-pie__label-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.token-supply-pie__hub {
  position: absolute;
  inset: 27%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 0 6%;
  box-sizing: border-box;
}

.token-supply-pie__hub-pct {
  font-size: clamp(0.95rem, 2.8vw, 1.35rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fafafa;
  letter-spacing: -0.02em;
  text-shadow:
    0 0 1px rgba(0, 0, 0, 0.95),
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 0 6px rgba(0, 0, 0, 0.55);
}

.token-supply-pie__hub-sub {
  margin-top: 0.2em;
  font-size: clamp(0.62rem, 1.65vw, 0.72rem);
  font-weight: 500;
  line-height: 1.15;
  color: #a1a1aa;
  letter-spacing: 0.01em;
}

.token-supply-pie__label-line {
  stroke: rgba(244, 244, 245, 0.72);
  stroke-width: 0.4;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}

.token-supply-pie__label-text {
  fill: #f4f4f5;
  font-size: 4.55px;
  font-weight: 600;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  paint-order: stroke fill;
  stroke: rgba(0, 0, 0, 0.78);
  stroke-opacity: 1;
  stroke-width: 0.42px;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0.35px 0.55px rgba(0, 0, 0, 0.65));
}

.token-supply-pie__label-text--inside {
  font-size: 4.35px;
  font-weight: 700;
  stroke-width: 0.42px;
}

.token-supply-pie__label-text--inside-on-dark {
  stroke: rgba(0, 0, 0, 0.82);
  stroke-opacity: 1;
}

.token-supply-pie__label-text--inside-on-light {
  stroke: rgba(0, 0, 0, 0.72);
  stroke-opacity: 1;
}

.token-supply-legend {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 1.05rem;
  min-width: 240px;
  flex: 1 1 260px;
}

.token-supply-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.token-supply-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.token-supply-legend-content {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.token-supply-legend-label {
  color: #a1a1aa;
  font-weight: 500;
  line-height: 1.2;
}

.token-supply-legend-sublist {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.9rem;
  line-height: 1.2;
}

.token-supply-legend-sublist li {
  margin: 0.05rem 0;
  overflow-wrap: anywhere;
}

.token-supply-legend-pct {
  color: #a1a1aa;
}

.token-supply-legend-token {
  color: #a1a1aa;
}

.token-supply-legend-usd {
  color: #86efac;
}

/* Volume-by-PnL pie: two legend items per row, tighter type */
.token-supply-legend--compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.65rem;
  row-gap: 1rem;
  font-size: 0.72rem;
  min-width: 0;
  flex: 1 1 200px;
}

.token-supply-legend--compact-grid .token-supply-legend-item {
  gap: 0.45rem;
  align-items: flex-start;
}

.token-supply-legend--compact-grid .token-supply-legend-swatch {
  width: 9px;
  height: 9px;
  margin-top: 0.15em;
}

.token-supply-legend--compact-grid .token-supply-legend-label {
  font-size: 0.97em;
  line-height: 1.25;
}

.token-supply-legend--compact-grid .token-supply-legend-sublist {
  font-size: 0.92em;
  padding-left: 0.95rem;
  line-height: 1.15;
}

.token-supply-legend--compact-grid .token-supply-legend-sublist li {
  margin: 0;
}

.token-supply-legend--compact-grid.token-supply-legend--cols3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.token-supply-legend-sublist--tier {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.token-supply-legend-sublist--tier > li {
  margin: 0;
}

.token-supply-legend-sublist--tier > li:not(:first-child) {
  margin-left: 0.45rem;
}

.token-supply-legend-sublist--tier-inner {
  margin: 0.12rem 0 0;
  padding-left: 0.9rem;
  list-style: disc;
}

.token-supply-legend-sublist--tier-inner li {
  margin: 0;
}

.token-supply-legend--compact-grid .token-supply-legend-sublist--tier-inner {
  padding-left: 0.85rem;
}

/* Profitable trade-tier pie: dashboard-style tier cards (reference: activity tier tiles). */
.token-supply-legend--tier-dashboard.token-supply-legend--compact-grid {
  column-gap: 0.75rem;
  row-gap: 0.85rem;
  align-items: stretch;
}

.token-supply-legend--tier-dashboard .token-supply-legend-item--tier-dashboard {
  min-width: 0;
}

.token-supply-legend--tier-dashboard .token-supply-legend-item {
  align-items: stretch;
}

.token-tier-card {
  background: linear-gradient(165deg, rgba(22, 22, 28, 0.98) 0%, rgba(11, 11, 14, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 0.55rem 0.65rem 0.6rem;
  border-left: 3px solid var(--tier-accent, #38bdf8);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 10px 32px rgba(0, 0, 0, 0.5);
  width: 100%;
  box-sizing: border-box;
}

.token-tier-card--placeholder {
  opacity: 0.72;
}

.token-tier-card__title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #f4f4f5;
  margin: 0 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.25;
}

.token-tier-card__metrics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
}

.token-tier-metric {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.66rem;
  line-height: 1.35;
  margin: 0;
}

.token-tier-metric__ico {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
}

/* Tier-colored slice indicator: same footprint as other metric icons (not a floating dot). */
.token-tier-metric__ico--share-swatch {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.token-tier-metric__ico--share-swatch::before {
  content: '';
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--tier-swatch, #38bdf8);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.25);
}

.token-tier-metric__ico--pnl {
  background: rgba(74, 222, 128, 0.14);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.22);
}

/* Wallet pie avg row: ↑ / O / ↓ in icon box; mult color matches */
.wallet-pnl-pie-legend--tier-match .token-tier-metric__ico--wallet-avg {
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.wallet-pnl-pie-legend--tier-match .token-tier-metric__ico--wallet-avg--up {
  background: rgba(74, 222, 128, 0.16);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.38);
}

.wallet-pnl-pie-legend--tier-match .token-tier-metric__ico--wallet-avg--flat {
  background: rgba(234, 179, 8, 0.14);
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.35);
}

.wallet-pnl-pie-legend--tier-match .token-tier-metric__ico--wallet-avg--down {
  background: rgba(248, 113, 113, 0.14);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.38);
}

.wallet-pnl-pie-legend--tier-match .token-tier-metric__ico--wallet-avg--neutral {
  background: rgba(113, 113, 122, 0.12);
  color: #71717a;
  border-color: rgba(255, 255, 255, 0.08);
}

.wallet-pnl-pie-legend--tier-match .token-tier-wallet-avg-mult--up {
  color: #4ade80;
  font-weight: 600;
}

.wallet-pnl-pie-legend--tier-match .token-tier-wallet-avg-mult--flat {
  color: #eab308;
  font-weight: 600;
}

.wallet-pnl-pie-legend--tier-match .token-tier-wallet-avg-mult--down {
  color: #f87171;
  font-weight: 600;
}

.token-tier-metric__ico--usd {
  background: rgba(134, 239, 172, 0.1);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.18);
  font-size: 0.62rem;
}

.token-tier-metric__ico--volume {
  background: rgba(125, 211, 252, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(125, 211, 252, 0.22);
}

.token-tier-metric__ico--people {
  background: rgba(161, 161, 170, 0.12);
  color: #a1a1aa;
  border: 1px solid rgba(161, 161, 170, 0.15);
}

.token-tier-metric__ico--layers {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.token-tier-metric__svg {
  width: 13px;
  height: 13px;
  display: block;
}

.token-tier-metric__body {
  flex: 1;
  min-width: 0;
}

.token-tier-metric__slice-pct {
  color: #93c5fd;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.token-tier-metric__muted {
  color: #a1a1aa;
}

.token-tier-metric__accent-pnl {
  color: #4ade80;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.token-tier-metric__accent-usd {
  color: #86efac;
  font-weight: 600;
}

.token-tier-metric__accent-volume {
  color: #7dd3fc;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Volume-by-PnL cards: band trades only, smaller light purple. */
.token-tier-metric__vol-pnl-trades-val {
  font-size: 0.66rem;
  font-weight: 600;
  color: #c4b5fd;
  font-variant-numeric: tabular-nums;
}

/* Ratio split: primary value vs smaller grey “ / total” (volume-by-PnL total row + profitable tier Total trades). */
.token-tier-metric__ratio--vol-pnl-split {
  font-size: unset;
  font-weight: unset;
  color: unset;
  letter-spacing: unset;
}

.token-tier-metric__vol-pnl-slice-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e0f2fe;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.token-tier-metric__vol-pnl-totalvol-suffix {
  font-size: 0.58rem;
  font-weight: 500;
  color: #71717a;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.token-tier-metric__emph {
  color: #e4e4e7;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.token-tier-metric__body--stack {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.token-tier-metric__label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #71717a;
  font-weight: 600;
}

.token-tier-metric__ratio {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e0f2fe;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.token-tier-metric--total {
  margin-top: 0.12rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Total volume / Total trades: label + primary figure use the card’s tier accent (same as left rail). */
.token-tier-card .token-tier-metric--total .token-tier-metric__label {
  color: var(--tier-accent, #7dd3fc);
  font-weight: 700;
}

.token-tier-card .token-tier-metric--total .token-tier-metric__vol-pnl-slice-val {
  color: var(--tier-accent, #e0f2fe);
}

/* Allow donut % labels to extend past card bounds (base card uses overflow: hidden). */
.token-supply-card--trade-tier-dash {
  overflow: visible;
}

/* Profitable traders by activity — dashboard layout */
.token-trade-tier-dash__top {
  display: grid;
  grid-template-columns: 1fr minmax(188px, 380px);
  gap: 1rem 1.25rem;
  align-items: start;
  margin-bottom: 1rem;
}

.token-trade-tier-dash__titles h2.token-stats-group-title {
  margin: 0 0 0.45rem;
  line-height: 1.25;
}

.token-trade-tier-dash__lede.wallet-pnl-pnl-trading-lede {
  max-width: 52ch;
}

.token-trade-tier-dash__insight {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(96, 165, 250, 0.07);
  border: 1px solid rgba(96, 165, 250, 0.18);
}

.token-trade-tier-dash__insight-bulb {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1.2;
}

.token-trade-tier-dash__insight-text {
  margin: 0;
}

.token-trade-tier-dash__insight-text.wallet-pnl-pnl-trading-lede {
  line-height: 1.45;
}

.token-trade-tier-dash__main {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 1.25rem 1.5rem;
  align-items: start;
  margin-bottom: 1rem;
}

/* Profitable traders by volume: wider pie column only on this card (chart + legend). */
.token-supply-card--volume-pnl-pie .token-trade-tier-dash__main {
  grid-template-columns: minmax(200px, 440px) 1fr;
}

/* Trades-count & PnL distribution vertical bars: full-width rows inside dash cards. */
.token-trade-tier-dash__trades-dist,
.token-trade-tier-dash__pnl-dist {
  margin-top: 0.35rem;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.token-trade-tier-dash__trades-dist .token-trades-vertical-bars,
.token-trade-tier-dash__pnl-dist .token-trades-vertical-bars {
  margin-top: 0.15rem;
}

.token-trade-tier-dash__chart-title.token-stats-group-title {
  margin: 0 0 0.35rem;
}

.token-trade-tier-dash__chart-note {
  margin: 0 0 0.65rem;
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
}

.token-trade-tier-dash__chart-note--volume-share {
  margin-right: 40px !important;
}

.token-trade-tier-dash__note-ico {
  flex: 0 0 auto;
  opacity: 0.85;
}

.token-supply-wrap--trade-tier-pie {
  justify-content: center;
  flex-wrap: nowrap;
  margin-top: 1.75rem;
  padding: 0.45rem min(5.5vw, 22px);
  overflow: visible;
  box-sizing: border-box;
}

.token-trade-tier-dash__chart-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: visible;
  padding-top: 22px;
  padding-bottom: 12px;
}

.token-trade-tier-dash__legend-col {
  min-width: 0;
}

/* Tier dashboard cards: three columns (2×3 for six slices). */
.token-supply-legend--cols6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.token-supply-legend--tier-dashboard.token-supply-legend--cols6 {
  column-gap: 0.65rem;
}

.token-trade-tier-dash__footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem 0;
  column-gap: 0;
  align-items: start;
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.token-trade-tier-dash__footer-col {
  padding-right: 1.15rem;
}

.token-trade-tier-dash__footer-col + .token-trade-tier-dash__footer-col {
  padding-left: 1.15rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.token-trade-tier-dash__footer-col .token-trade-tier-dash__footer-p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.token-trade-tier-dash__footer-heading.token-stats-group-title {
  margin: 0 0 0.35rem;
}

.token-trade-tier-dash__footer-p.wallet-pnl-pnl-trading-lede {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
}

.token-trade-tier-dash__code {
  font-size: 0.62rem;
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #d4d4d8;
}

.token-trade-tier-dash__footer-aside {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-left: 0;
  padding: 0.5rem 0.65rem 0.5rem calc(1.15rem + 0.65rem);
  border-radius: 8px;
  background: rgba(15, 15, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 120px;
}

.token-trade-tier-dash__timeframe-label {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #71717a;
  font-weight: 600;
}

.token-trade-tier-dash__timeframe-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e4e4e7;
}

.token-pnl-bars {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.token-pnl-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.token-pnl-bar-label {
  font-size: 0.9rem;
  color: #d4d4d8;
}

.token-pnl-bar-track {
  position: relative;
  height: 20px;
  border-radius: 999px;
  background: #18181b;
  border: 1px solid #27272a;
  overflow: hidden;
}

.token-pnl-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.token-pnl-bar-fill--positive {
  background: linear-gradient(90deg, var(--token-pnl-positive-from), var(--token-pnl-positive-to));
}

.token-pnl-bar-fill--negative {
  background: linear-gradient(90deg, #dc2626, #f87171);
}

.token-pnl-bar-fill--neutral {
  background: linear-gradient(90deg, #6b7280, #9ca3af);
}

/* Hue sweep green → red; volume-by-PnL pie slices use tradeScaleBarSolidColor(t) in app.ts with same hue/L stops. */
.token-pnl-bar-fill--trade-scale {
  background: linear-gradient(
    90deg,
    hsl(calc(120 - (var(--trade-grad-t, 0) * 120)) 85% 42%),
    hsl(calc(120 - (var(--trade-grad-t, 0) * 120)) 92% 60%)
  );
}

/* PnL distribution bars only: green → yellow at low-positive-PnL end (hue 60°). Same saturation/lightness stops as trade-scale. */
.token-pnl-bar-fill--trade-scale-pnl-dist {
  background: linear-gradient(
    90deg,
    hsl(calc(120 - (var(--trade-grad-t, 0) * 60)) 85% 42%),
    hsl(calc(120 - (var(--trade-grad-t, 0) * 60)) 92% 60%)
  );
}

.token-trades-vertical-bars--cols9 {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.token-pnl-bar-count {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  color: #f4f4f5;
  font-weight: 600;
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.98),
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 -1px 1px rgba(0, 0, 0, 0.8);
}

.token-supply-card--fullwidth {
  grid-column: 1 / -1;
}

.token-trades-vertical-bars {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: start;
}

.token-trades-vertical-bars--cols8 {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.token-trades-vertical-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.token-trades-vertical-track {
  position: relative;
  height: 220px;
  border-radius: 10px;
  background: #18181b;
  border: 1px solid #27272a;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.token-trades-vertical-fill {
  width: 100%;
  border-radius: 8px 8px 0 0;
}

.token-trades-vertical-count {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  color: #f4f4f5;
  font-weight: 600;
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.98),
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 -1px 1px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.token-trades-vertical-label {
  font-size: 0.74rem;
  line-height: 1.2;
  color: #d4d4d8;
  text-align: center;
  word-break: break-word;
}

/* PnL distribution: label + count match bar hue (--trade-grad-t same as fill); black outline for contrast. */
.token-trades-vertical-label.token-pnl-dist-band-text {
  color: hsl(calc(120 - (var(--trade-grad-t, 0) * 60)) 88% 54%);
  text-shadow:
    -1px -1px 0 #0a0a0a,
    1px -1px 0 #0a0a0a,
    -1px 1px 0 #0a0a0a,
    1px 1px 0 #0a0a0a,
    0 -1px 0 #0a0a0a,
    0 1px 0 #0a0a0a,
    -1px 0 0 #0a0a0a,
    1px 0 0 #0a0a0a,
    0 0 3px rgba(0, 0, 0, 0.85);
}

.token-trades-vertical-label.token-pnl-dist-band-text--negative {
  color: #f87171;
  text-shadow:
    -1px -1px 0 #0a0a0a,
    1px -1px 0 #0a0a0a,
    -1px 1px 0 #0a0a0a,
    1px 1px 0 #0a0a0a,
    0 -1px 0 #0a0a0a,
    0 1px 0 #0a0a0a,
    -1px 0 0 #0a0a0a,
    1px 0 0 #0a0a0a,
    0 0 3px rgba(0, 0, 0, 0.85);
}

/* Trades-count vertical bars: same hue as .token-pnl-bar-fill--trade-scale (green → red span). */
.token-trades-vertical-label.token-trades-count-dist-band-text {
  color: hsl(calc(120 - (var(--trade-grad-t, 0) * 120)) 88% 53%);
  text-shadow:
    -1px -1px 0 #0a0a0a,
    1px -1px 0 #0a0a0a,
    -1px 1px 0 #0a0a0a,
    1px 1px 0 #0a0a0a,
    0 -1px 0 #0a0a0a,
    0 1px 0 #0a0a0a,
    -1px 0 0 #0a0a0a,
    1px 0 0 #0a0a0a,
    0 0 3px rgba(0, 0, 0, 0.85);
}

.meta {
  font-size: 0.85rem;
  color: #a1a1aa;
  margin: 0 0 0.75rem 0;
}

.token-supply-period-desc.wallet-pnl-pnl-trading-lede {
  margin: 0 0 26px 0;
}

.token-supply-card-desc.wallet-pnl-pnl-trading-lede {
  margin: 0 0 26px 0;
}

.trades-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.trades-summary-programs-fullrow {
  grid-column: 1 / -1;
}

.trades-summary-block {
  background: #0f0f12;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 1rem;
}

.trades-summary-programs {
  min-width: 0;
}

.trades-summary-programs table {
  table-layout: fixed;
  width: 100%;
}

.trades-summary-programs table col.col-label {
  width: 30%;
}

.trades-summary-programs table col.col-top-market {
  min-width: 12rem;
}

.trades-summary-programs table col.col-count {
  width: 4.5rem;
}

.trades-summary-programs table th:first-child,
.trades-summary-programs table td:first-child {
  width: 30%;
  box-sizing: border-box;
}

.trades-summary-programs table th:last-child,
.trades-summary-programs table td:last-child {
  width: 4.5rem;
  min-width: 4.5rem;
  max-width: 4.5rem;
  text-align: right;
  box-sizing: border-box;
}

.trades-summary-programs table td:nth-child(2) {
  min-width: 0;
}

.trades-summary-programs table td:nth-child(3) {
  white-space: nowrap;
}

.trades-summary-programs a {
  color: #3b82f6;
  text-decoration: none;
}

.trades-summary-programs a:hover {
  text-decoration: none;
}

.trades-summary-quotes a {
  color: #3b82f6;
  text-decoration: none;
}

.trades-summary-quotes a:hover {
  text-decoration: none;
}

.trades-summary-quotes {
  min-width: 0;
}

.trades-summary-block.trades-summary-quotes .trades-summary-table th:last-child,
.trades-summary-block.trades-summary-quotes .trades-summary-table td:last-child {
  text-align: right;
}

.trades-summary-block.trades-summary-markets .trades-summary-table th:last-child,
.trades-summary-block.trades-summary-markets .trades-summary-table td:last-child {
  text-align: right;
}

.trades-summary-markets .trades-summary-table th:first-child,
.trades-summary-markets .trades-summary-table td:first-child {
  width: 42%;
  box-sizing: border-box;
}

.trades-summary-markets a {
  color: #3b82f6;
  text-decoration: none;
}

.trades-summary-markets a:hover {
  text-decoration: none;
}

/* ~20 rows visible, then scroll */
.top-traders-section .table-wrap,
.holders-section .table-wrap {
  max-height: 45rem;
  overflow-y: auto;
}

/* Sticky header row for Top traders and Top holders */
.top-traders-section .table-wrap thead th,
.holders-section .table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #18181b;
  border-bottom: 1px solid #27272a;
  box-shadow: 0 1px 0 #27272a;
}

.top-traders-section a {
  color: #3b82f6;
  text-decoration: none;
}

.top-traders-section a:hover {
  text-decoration: none;
}

.token-top-pnl-section .top-traders-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.token-top-pnl-table-card .token-stats-group-title {
  margin: 0;
}

.token-top-pnl-table-card .table-wrap thead th {
  background: #0f0f12;
}

.token-top-pnl-table-card tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.wallet-top-traders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.wallet-top-trader-card .token-stats {
  gap: 0.45rem 1rem;
}

.wallet-top-trader-card .token-stats dt {
  white-space: nowrap;
}

.wallet-top-trader-card .token-stats dd {
  word-break: break-word;
}

.wallet-pnl-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.wallet-pnl-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.wallet-pnl-layout {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 400px);
  gap: 1.1rem;
  align-items: stretch;
}

.wallet-pnl-trend-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.wallet-pnl-trend-col > .wallet-pnl-card--pnl-trading {
  flex: 0 0 auto;
}

.wallet-pnl-trend-col > .wallet-pnl-card--trend {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.wallet-pnl-card {
  position: relative;
  border-radius: 10px;
  background: linear-gradient(165deg, #141418 0%, #0c0c0f 55%, #0a0a0c 100%);
  border: 1px solid #2a2a32;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.wallet-pnl-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
  opacity: 0.9;
}

.wallet-pnl-card--profile::before {
  background: linear-gradient(180deg, #60a5fa, #818cf8);
}

.wallet-pnl-card--pnl-trading::before {
  background: linear-gradient(180deg, #34d399, #2dd4bf 40%, #fbbf24 72%, #f97316);
}

.wallet-pnl-card--highlights::before {
  background: linear-gradient(180deg, #a78bfa, #ec4899 45%, #f43f5e);
}

.wallet-pnl-card--trend::before {
  background: linear-gradient(180deg, #22d3ee, #3b82f6);
}

.wallet-pnl-card--assets::before {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.wallet-pnl-sections > .wallet-pnl-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.wallet-pnl-sections > .wallet-pnl-card .token-stats-group-title {
  margin: 0;
}

.wallet-pnl-pie-stack {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  min-height: 0;
}

.wallet-pnl-pie-stack > .wallet-pnl-card--pie {
  min-height: 0;
}

.wallet-pnl-card--pie::before {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.wallet-pnl-card--pie.token-stats-group {
  padding: 1.05rem 1.15rem 1.2rem;
}

.wallet-pnl-card--pie .token-stats-group-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a1a1aa;
}

.wallet-pnl-card--pie .token-stats-group-title span {
  display: inline-block;
  margin-bottom: 13px;
}

.wallet-pnl-card--assets .token-stats-group-title span {
  display: inline-block;
  margin-bottom: 4px;
}

.wallet-pnl-card--profile .token-stats-group-title span,
.wallet-pnl-card--highlights .token-stats-group-title span {
  display: inline-block;
  margin-bottom: 8px;
}

.wallet-pnl-pie-wrap {
  display: grid;
  grid-template-columns: minmax(0, 94px) minmax(0, 1fr);
  gap: 1rem 1.2rem;
  align-items: center;
  padding-top: 0.1rem;
}

/* Donut: ring uses conic-gradient; center matches card surface */
.wallet-pnl-pie-chart {
  position: relative;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  border: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 10px 32px rgba(0, 0, 0, 0.5);
}

.wallet-pnl-pie-chart::after {
  content: '';
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  z-index: 1;
  background: linear-gradient(165deg, #15151a 0%, #101014 50%, #0c0c10 100%);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

/* Wallet donut legends: 1 row × 2 columns; each cell is a tier-card with stacked metrics */
.wallet-pnl-pie-legend.wallet-pnl-pie-legend--tier-match {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.65rem;
  row-gap: 0.55rem;
  align-items: stretch;
  min-width: 0;
  font-size: 0.72rem;
}

.wallet-pnl-pie-legend--tier-match .token-supply-legend-item {
  align-items: stretch;
}

.wallet-pnl-pie-legend--tier-match .token-tier-card--wallet-pie-legend {
  padding: 0.48rem 0.55rem 0.52rem;
  height: 100%;
}

.wallet-pnl-pie-legend--tier-match .token-tier-card__title--wallet-pie {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.68rem;
  font-weight: 600;
}

.wallet-pnl-pie-legend--tier-match .token-tier-card__metrics--wallet-pie-expanded {
  gap: 0.32rem;
}

@media (max-width: 520px) {
  .wallet-pnl-pie-legend.wallet-pnl-pie-legend--tier-match {
    grid-template-columns: 1fr;
  }
}

.wallet-pnl-pie-empty {
  margin: 0.25rem 0 0;
  color: #71717a;
  font-size: 0.78rem;
}

.wallet-pnl-kv {
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.wallet-pnl-kv dt {
  color: #71717a;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  align-self: center;
}

.wallet-pnl-kv dd {
  color: #e4e4e7;
  font-weight: 500;
}

.wallet-fetch-slot,
.token-fetch-slot {
  display: flex;
  align-items: flex-end;
}

.wallet-fetch-slot .inline-row-actions,
.token-fetch-slot .inline-row-actions {
  margin-bottom: 0;
}

.wallet-pnl-profile-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  margin-top: 0.15rem;
}

.wallet-pnl-profile-avatar-wrap {
  flex-shrink: 0;
  line-height: 0;
}

.wallet-pnl-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(96, 165, 250, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.wallet-pnl-profile-kv {
  align-self: center;
}

.wallet-pnl-profile-value-emphasis {
  font-size: 1.02rem;
  font-weight: 600;
}

.wallet-pnl-performance-body,
.wallet-pnl-trading-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wallet-pnl-pnl-trading-lede {
  margin: 0 0 13px 0;
  font-size: 0.74rem;
  line-height: 1.4;
  font-weight: 400;
  color: #71717a;
}

.wallet-pnl-trading-lede {
  margin: 0 0 13px 0;
  font-size: 0.74rem;
  line-height: 1.4;
  font-weight: 400;
  color: #71717a;
}

.wallet-pnl-pnl-trading-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wallet-pnl-metric-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.wallet-pnl-metric-hero-item {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid #2e2e38;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.wallet-pnl-metric-hero-item--realized {
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.06);
}

.wallet-pnl-metric-hero-item--unrealized {
  border-color: rgba(251, 191, 36, 0.25);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.05);
}

.wallet-pnl-metric-hero-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #71717a;
}

.wallet-pnl-metric-hero-value {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  word-break: break-word;
}

.wallet-pnl-metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.wallet-pnl-metric-row--tight {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wallet-pnl-metric-row--single {
  grid-template-columns: minmax(0, 11rem);
  justify-content: flex-start;
}

.wallet-pnl-metric-chip {
  padding: 0.5rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid #2c2c34;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.wallet-pnl-metric-chip-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #71717a;
}

.wallet-pnl-metric-chip-value {
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #e4e4e7;
  line-height: 1.25;
  word-break: break-word;
}

.wallet-pnl-metric-chip-value .wallet-pnl-trade-chip-count {
  font-weight: 600;
}

.wallet-pnl-metric-chip-value .wallet-pnl-trade-chip-avg {
  font-weight: 400;
}

.wallet-pnl-metric-chip--pos {
  border-color: rgba(52, 211, 153, 0.28);
  background: linear-gradient(165deg, rgba(16, 185, 129, 0.08), rgba(0, 0, 0, 0.2));
}

.wallet-pnl-metric-chip--neg {
  border-color: rgba(251, 113, 133, 0.28);
  background: linear-gradient(165deg, rgba(244, 63, 94, 0.08), rgba(0, 0, 0, 0.2));
}

.wallet-pnl-trend-lede {
  margin: 0 0 13px 0;
  font-size: 0.74rem;
  line-height: 1.4;
  color: #71717a;
  font-weight: 400;
  max-width: 52ch;
}

.wallet-pnl-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.wallet-pnl-highlight-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  padding: 0.65rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  min-height: 7.5rem;
  border: 1px solid transparent;
  background-clip: padding-box;
  overflow: hidden;
}

.wallet-pnl-highlight-card--best {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 78, 59, 0.35) 100%);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wallet-pnl-highlight-card--worst {
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.14) 0%, rgba(88, 28, 28, 0.38) 100%);
  border-color: rgba(251, 113, 133, 0.35);
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.wallet-pnl-highlight-card--empty {
  opacity: 1;
}

.wallet-pnl-highlight-ribbon {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.wallet-pnl-highlight-card--best .wallet-pnl-highlight-ribbon {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.wallet-pnl-highlight-card--worst .wallet-pnl-highlight-ribbon {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(251, 113, 133, 0.3);
}

.wallet-pnl-highlight-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: flex-end;
  min-height: 0;
}

.wallet-pnl-highlight-card--empty .wallet-pnl-highlight-body {
  justify-content: center;
}

.wallet-pnl-highlight-token {
  font-size: 0.95rem;
  font-weight: 600;
}

.wallet-pnl-highlight-token .wallet-token-ref {
  gap: 0.5rem;
}

.wallet-pnl-highlight-card .wallet-logo-avatar {
  width: 32px;
  height: 32px;
  border-width: 2px;
}

.wallet-pnl-highlight-mint {
  font-size: 0.65rem;
  color: #71717a;
}

.wallet-pnl-highlight-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: auto;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wallet-pnl-highlight-metric-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #71717a;
  font-weight: 600;
}

.wallet-pnl-highlight-metric-value {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.wallet-pnl-highlight-pnl--positive {
  color: #86efac;
  text-shadow: 0 0 24px rgba(52, 211, 153, 0.25);
}

.wallet-pnl-highlight-pnl--negative {
  color: #fda4af;
  text-shadow: 0 0 24px rgba(251, 113, 133, 0.2);
}

.wallet-pnl-highlight-empty {
  margin: 0;
  font-size: 0.78rem;
  color: #71717a;
  line-height: 1.4;
  font-style: italic;
}

.wallet-pnl-trend-table-wrap {
  flex: 1;
  min-height: 0;
  max-height: fit-content !important;
  overflow: auto;
  border-radius: 6px;
  border: 1px solid #27272a;
  background: rgba(0, 0, 0, 0.25);
}

.wallet-pnl-card--trend .wallet-pnl-trend-empty-msg {
  margin: 0;
  flex: 1;
  font-size: 0.82rem;
  color: #71717a;
  padding: 0.5rem 0 0.25rem;
}

.wallet-pnl-assets-empty-msg {
  margin: 0;
  font-size: 0.85rem;
  color: #a1a1aa;
  line-height: 1.45;
}

.wallet-trend-table {
  font-size: 0.78rem;
}

.wallet-trend-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #12121a;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  border-bottom: 1px solid #2e2e3a;
}

.wallet-trend-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.wallet-trend-table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.08);
}

.wallet-trend-table td {
  border-bottom-color: #23232b;
  padding: 0.42rem 0.65rem;
}

.wallet-pnl-token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.wallet-pnl-token-card .token-stats {
  gap: 0.4rem 1rem;
}

.wallet-pnl-empty {
  color: #a1a1aa;
  font-size: 0.9rem;
}

.wallet-logo-avatar {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  object-fit: cover;
  display: inline-block;
  border: 1px solid #3f3f46;
  vertical-align: middle;
}

.wallet-token-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.wallet-token-highlight-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.wallet-token-highlight-main {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.wallet-token-highlight-pnl {
  color: #e4e4e7;
  font-weight: 600;
}

.wallet-token-highlight-sublist {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.78rem;
  line-height: 1.3;
}

.wallet-token-highlight-sublist li {
  margin: 0.08rem 0;
  overflow-wrap: anywhere;
}

.wallet-token-highlight-sublist li > span {
  color: #a1a1aa;
}

.wallet-token-highlight-pnl--positive {
  color: #86efac;
}

.wallet-token-highlight-pnl--negative {
  color: #fca5a5;
}

.wallet-assets-table-wrap {
  max-height: 28rem;
  overflow-y: auto;
}

.wallet-assets-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #18181b;
  font-size: 0.56rem;
  line-height: 1.1;
}

.wallet-assets-table {
  min-width: 820px;
  table-layout: fixed;
}

.wallet-assets-table th,
.wallet-assets-table td {
  padding: 0.22rem 0.26rem;
  font-size: 0.66rem;
}

.wallet-assets-table th:nth-child(1),
.wallet-assets-table td:nth-child(1) {
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  padding-left: 0.05rem !important;
  padding-right: 0.15rem !important;
}

.wallet-assets-table th:nth-child(2),
.wallet-assets-table td:nth-child(2) {
  width: 92px;
  max-width: 92px;
}

.wallet-assets-table th:nth-child(3),
.wallet-assets-table td:nth-child(3) {
  width: 76px;
  text-align: center;
  vertical-align: middle;
}

.wallet-assets-table th:nth-child(4),
.wallet-assets-table td:nth-child(4) {
  width: 42px;
  text-align: center;
}

.wallet-assets-table th:nth-child(5),
.wallet-assets-table td:nth-child(5),
.wallet-assets-table th:nth-child(6),
.wallet-assets-table td:nth-child(6) {
  width: 62px;
  text-align: center;
}

.wallet-assets-table th:nth-child(7),
.wallet-assets-table td:nth-child(7),
.wallet-assets-table th:nth-child(8),
.wallet-assets-table td:nth-child(8) {
  width: 50px;
  text-align: center;
}

.wallet-assets-table th:nth-child(9),
.wallet-assets-table td:nth-child(9),
.wallet-assets-table th:nth-child(10),
.wallet-assets-table td:nth-child(10) {
  width: 64px;
  text-align: center;
}

.wallet-assets-table th:nth-child(11),
.wallet-assets-table td:nth-child(11) {
  width: 48px;
  text-align: center;
}

.wallet-assets-table th:nth-child(12),
.wallet-assets-table td:nth-child(12) {
  width: 86px;
  text-align: center;
}

.wallet-asset-gain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.08rem 0.42rem;
  border-radius: 4px;
  border: 2px solid currentColor;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wallet-asset-buysell-amt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  font-size: 0.62rem;
  line-height: 1.15;
}

.wallet-amt-stack-row {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  justify-content: center;
}

.wallet-amt-stack-value--buy {
  color: #22c55e;
}

.wallet-amt-stack-value--sell {
  color: #ef4444;
}

.wallet-amt-side-icon {
  display: inline-block;
  font-size: 0.52rem;
  line-height: 1;
  flex-shrink: 0;
}

.wallet-amt-side-icon--buy {
  color: #22c55e;
}

.wallet-amt-side-icon--sell {
  color: #ef4444;
}

.wallet-asset-icon-cell {
  width: 10px;
  min-width: 10px;
  max-width: 10px;
  padding-left: 0.1rem !important;
  padding-right: 0.1rem !important;
  text-align: center;
  overflow: hidden;
}

.wallet-asset-mint {
  color: #a1a1aa;
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

.wallet-asset-tx-col,
.wallet-asset-tx-cell {
  min-width: 72px;
}

.wallet-tx-datetime {
  font-size: 0.56rem;
  color: #d4d4d8;
  line-height: 1.2;
  white-space: nowrap;
}

.wallet-tx-link {
  color: #60a5fa;
  font-size: 0.62rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.wallet-tx-link:hover {
  text-decoration: underline;
}

.wallet-tx-sig {
  color: #a1a1aa;
  font-size: 0.36rem;
  white-space: normal;
  word-break: break-all;
  line-height: 1.05;
}

.wallet-tx-popup-icon {
  margin-left: 0.2rem;
  font-size: 0.62rem;
  line-height: 1;
}

.wallet-tx-link.wallet-tx-tone--buy,
.wallet-tx-sig.wallet-tx-tone--buy {
  color: #86efac;
}

.wallet-tx-link.wallet-tx-tone--sell,
.wallet-tx-sig.wallet-tx-tone--sell {
  color: #fca5a5;
}

.wallet-amt-vol-usd {
  color: #86efac;
}

.wallet-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.06rem 0.38rem;
  border-radius: 999px;
  border: 1px solid #52525b;
  color: #d4d4d8;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: capitalize;
  line-height: 1.1;
}

.wallet-status-badge--open {
  border-color: #22c55e;
  color: #86efac;
}

.wallet-status-badge--closed {
  border-color: #ef4444;
  color: #fca5a5;
}

.trades-summary-markets {
  min-width: 0;
}

.trades-summary-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem 0;
}

.trades-summary-table {
  font-size: 0.85rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #27272a;
}

th {
  color: #a1a1aa;
  font-weight: 500;
}

tr:hover td {
  background: #27272a;
}

.holders-section a {
  color: #3b82f6;
  text-decoration: none;
}

.holders-section a:hover {
  text-decoration: none;
}

td .mono {
  font-family: ui-monospace, monospace;
  font-size: 0.6rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.error.panel {
  border-color: #7f1d1d;
  background: #1c1917;
}

#errorText {
  margin: 0;
  font-size: 0.85rem;
  color: #fca5a5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Numeric columns: right-align header and cells so they line up (Top traders, Holders) */
#topTradersTable th:nth-child(4),
#topTradersTable td:nth-child(4),
#topTradersTable th:nth-child(5),
#topTradersTable td:nth-child(5),
#topTradersTable th:nth-child(6),
#topTradersTable td:nth-child(6) {
  text-align: right !important;
}

#holdersTable th:nth-child(3),
#holdersTable td:nth-child(3) {
  text-align: left !important;
}

#holdersTable th:nth-child(4),
#holdersTable td:nth-child(4),
#holdersTable th:nth-child(5),
#holdersTable td:nth-child(5) {
  text-align: right !important;
}

#tokenTopPnlTable th:nth-child(3),
#tokenTopPnlTable td:nth-child(3),
#tokenTopPnlTable th:nth-child(4),
#tokenTopPnlTable td:nth-child(4),
#tokenTopPnlTable th:nth-child(5),
#tokenTopPnlTable td:nth-child(5),
#tokenTopPnlTable th:nth-child(6),
#tokenTopPnlTable td:nth-child(6),
#tokenTopPnlTable th:nth-child(7),
#tokenTopPnlTable td:nth-child(7),
#tokenTopPnlTable th:nth-child(8),
#tokenTopPnlTable td:nth-child(8) {
  text-align: right !important;
}

.usd-tone {
  font-variant-numeric: tabular-nums;
}

.usd-tone--positive {
  color: #86efac;
}

.usd-tone--neutral {
  color: rgba(255, 255, 255, 0.5);
}

.usd-tone--negative {
  color: #fca5a5;
}

.trade-count-heat {
  color: hsl(calc(120 - (var(--trade-grad-t, 0) * 120)) 85% 66%);
  font-weight: 600;
}

/* Scrollbar: black track, grey thumb */
html {
  scrollbar-color: #71717a #000000; /* thumb, track */
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: #000000;
  border-radius: 999px;
  margin: 4px 0; /* let rounded ends show */
}

*::-webkit-scrollbar-thumb {
  background-color: #71717a;
  border-radius: 999px;
}