.profile-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip-list span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0d1711;
  color: var(--green-2);
  font-size: 12px;
}

.compact-empty {
  padding: 12px;
  text-align: left;
}

.command-filters {
  flex-wrap: wrap;
}

.command-filters label {
  min-width: 150px;
  flex: 1;
}

.command-filters label:nth-child(3) {
  min-width: 260px;
  flex: 2;
}

code {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  color: #c9f7d3;
  background: #0b120e;
  border: 1px solid rgba(98, 212, 126, .15);
  border-radius: 6px;
  padding: 3px 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.redacted {
  color: #e4c879 !important;
}

.economy-metrics strong {
  font-size: clamp(22px, 2.5vw, 31px);
}

.chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.buy-dot,
.buy-bar { background: #6db7ff; }
.sell-dot,
.sell-bar { background: var(--green); }

.market-day > div {
  height: calc(100% - 18px);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 3px;
}

.market-day > div i {
  width: min(16px, 38%);
  border-radius: 5px 5px 2px 2px;
  min-height: 3px;
}

.rank-list {
  display: grid;
  gap: 7px;
}

.rank-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px;
  color: var(--text);
  background: rgba(9, 15, 12, .36);
  border: 1px solid transparent;
  border-radius: 11px;
  transition: border-color .15s, transform .15s;
}

.rank-item:hover {
  border-color: var(--line);
  transform: translateY(-1px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--green-2);
  background: #0c1710;
  font-weight: 800;
}

.rank-main {
  min-width: 0;
}

.rank-main strong,
.rank-main small {
  display: block;
}

.rank-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main small {
  margin: 3px 0 7px;
  color: var(--muted);
  font-size: 10px;
}

.rank-main i {
  display: block;
  height: 4px;
  max-width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #359853, var(--green));
}

.rank-item b {
  font-size: 19px;
}

.trade-side {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.trade-side.buy {
  color: #bdddff;
  background: rgba(67, 139, 206, .2);
  border: 1px solid rgba(109, 183, 255, .25);
}

.trade-side.sell {
  color: var(--green-2);
  background: rgba(57, 152, 83, .2);
  border: 1px solid rgba(98, 212, 126, .25);
}

.trade-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 17px;
}

.trade-summary > div {
  padding: 13px;
  border-radius: 11px;
  background: rgba(9, 15, 12, .38);
}

.trade-summary span,
.trade-summary small,
.coverage-note {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.trade-summary strong {
  display: block;
  margin: 4px 0;
  font-size: 22px;
}

.coverage-note {
  margin: 15px 0 0;
  line-height: 1.55;
}

.transaction-explorer {
  margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.section-heading strong {
  color: var(--green-2);
}

.transaction-filters {
  flex-wrap: wrap;
}

.transaction-filters label {
  flex: 1;
  min-width: 145px;
}

.transaction-filters label:nth-child(1),
.transaction-filters label:nth-child(2) {
  min-width: 210px;
}

.clear-filters {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

@media (max-width: 1050px) {
  .profile-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .profile-metrics { grid-template-columns: 1fr; }
  .command-filters label,
  .command-filters label:nth-child(3) { min-width: 0; }
  .trade-summary { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .transaction-filters label,
  .transaction-filters label:nth-child(1),
  .transaction-filters label:nth-child(2) { min-width: 0; }
}
