/* Value changes */
.ch-filter button:disabled { opacity: 0.4; cursor: default; }
.ch-filter button:disabled:hover { color: var(--muted); }
.ch-filter .n { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.ch-filter button[aria-pressed='true'] .n { color: var(--text-2); }
.ch-filter .trend svg { width: 14px; height: 14px; display: block; }

/* Stat strip */
.ch-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; overflow: hidden; }
.ch-stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ch-stat + .ch-stat { border-left: 1px solid var(--line); }
.ch-stat .k { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ch-stat .v { font: 800 26px/1 var(--font-display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-stat.up .v { color: var(--win); }
.ch-stat.down .v { color: var(--lose); }

/* Table-like list */
.ch-table { overflow: hidden; }
.ch-head, .change { display: grid; grid-template-columns: 44px minmax(0, 1fr) 250px 92px; gap: 16px; align-items: center; }
.ch-head {
  grid-template-columns: minmax(0, 1fr) 250px 92px;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.ch-head span:nth-child(2) { text-align: right; }
.ch-head span:nth-child(3) { text-align: right; }
.ch-head .arr { opacity: 0.6; }
.changes-group + .changes-group { border-top: 1px solid var(--line); }
.changes-date {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 20px; margin: 0;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2);
}
.changes-date span { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.change {
  position: relative;
  padding: 10px 20px; text-decoration: none;
  transition: background 0.15s;
}
.change + .change { border-top: 1px solid var(--line); }
.change:hover { background: var(--surface-2); }
.change:focus-visible { outline-offset: -2px; border-radius: 0; }
.change .art { width: 44px; border-radius: 11px; }
.change .art-inner { border-radius: 10px; }
.ch-pet { min-width: 0; }
.change .nm { font-weight: 650; letter-spacing: -0.01em; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change .tags { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.change-vals { display: flex; align-items: center; gap: 10px; justify-content: flex-end; white-space: nowrap; }
.change-vals .from { color: var(--muted); }
.change-vals .from .val { font-weight: 600; font-size: 14px; }
.change-vals .to .val { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.change-vals .arrow { color: var(--faint); display: inline-flex; }
.change-vals .arrow svg { width: 15px; height: 15px; }
.change.up .change-vals .arrow { color: color-mix(in srgb, var(--win) 60%, var(--faint)); }
.change.down .change-vals .arrow { color: color-mix(in srgb, var(--lose) 60%, var(--faint)); }
.ch-pct { display: flex; justify-content: flex-end; }

.pct {
  display: inline-flex; align-items: center; gap: 2px;
  height: 26px; padding: 0 9px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pct svg { width: 14px; height: 14px; margin-left: -3px; }
.pct.up { color: var(--win); background: rgba(46, 230, 160, 0.1); box-shadow: inset 0 0 0 1px rgba(46, 230, 160, 0.18); }
.pct.down { color: var(--lose); background: rgba(255, 91, 110, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 91, 110, 0.2); }
.pct.flat { color: var(--text-2); background: var(--surface-3); }
.pct.new { color: var(--accent-ink); background: var(--accent); }

@media (max-width: 720px) {
  .ch-stats { grid-template-columns: repeat(2, 1fr); }
  .ch-stat { padding: 14px 16px; }
  .ch-stat .v { font-size: 22px; }
  .ch-stat:nth-child(3) { border-left: 0; }
  .ch-stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .ch-head { display: none; }
  .changes-date { padding: 10px 14px; }
  .change {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas: 'art pet pct' 'art vals vals';
    gap: 4px 12px; padding: 12px 14px;
  }
  .change .art { grid-area: art; width: 48px; align-self: start; }
  .ch-pet { grid-area: pet; }
  .ch-pct { grid-area: pct; align-self: start; }
  .change-vals { grid-area: vals; justify-content: flex-start; margin-top: 4px; }
  .change-vals .to .val { font-size: 16px; }
  .page-head .ch-filter { width: 100%; }
  .ch-filter button { flex: 1; justify-content: center; }
}

/* Empty state: a faded preview of the list with a message on top */
.ch-empty { position: relative; overflow: hidden; min-height: 360px; display: grid; place-items: center; padding: 48px 20px; }
.ch-ghost {
  position: absolute; inset: 0; padding: 20px; display: flex; flex-direction: column; gap: 0;
  -webkit-mask-image: radial-gradient(70% 80% at 50% 50%, rgba(0, 0, 0, 0.18), #000 90%);
  mask-image: radial-gradient(70% 80% at 50% 50%, rgba(0, 0, 0, 0.18), #000 90%);
  opacity: 0.55;
}
.ch-ghost .gr { display: grid; grid-template-columns: 44px 1fr 110px 64px; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ch-ghost i { display: block; height: 10px; border-radius: 6px; background: var(--surface-3); }
.ch-ghost .ga { height: 44px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.ch-ghost .gv { height: 14px; }
.ch-ghost .gp { height: 24px; border-radius: 8px; }
.ch-ghost .gp.u { background: rgba(46, 230, 160, 0.12); }
.ch-ghost .gp.d { background: rgba(255, 91, 110, 0.12); }
.ch-empty-body { position: relative; text-align: center; max-width: 420px; }
.ch-empty-icon {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 16px;
  display: grid; place-items: center; color: var(--accent);
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line-2);
  box-shadow: 0 0 40px -6px rgba(47, 140, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.ch-empty-icon svg { width: 26px; height: 26px; }
.ch-empty h3 { font-size: 22px; letter-spacing: -0.03em; }
.ch-empty p { color: var(--text-2); margin: 8px 0 0; }
.ch-empty-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .ch-ghost .gr { grid-template-columns: 44px 1fr 56px; }
  .ch-ghost .gv { display: none; }
}
