/* ── Tokens XYZ — Frontend Styles ─────────────────────────────────────────── */

:root {
  --txyz-bg:          #0d0d15;
  --txyz-surface:     #13131f;
  --txyz-surface-2:   #1a1a2e;
  --txyz-border:      rgba(255,255,255,0.08);
  --txyz-row-hover:   var(--txyz-surface-2);
  --txyz-row-hover-text: var(--txyz-text);
  --txyz-accent:      #9945ff;
  --txyz-accent-dim:  rgba(153,69,255,0.15);
  --txyz-accent-tint: rgba(153,69,255,0.50);
  --txyz-green:       #19fb9b;
  --txyz-green-dim:   rgba(25,251,155,0.12);
  --txyz-red:         #ff4757;
  --txyz-red-dim:     rgba(255,71,87,0.12);
  --txyz-yellow:      #ffd32a;
  --txyz-text:        #e2e8f0;
  --txyz-muted:       #8892a4;
  --txyz-radius:      14px;
  --txyz-radius-sm:   8px;
  --txyz-shadow:      0 4px 32px rgba(0,0,0,0.4);
  --txyz-transition:  0.2s ease;
  --txyz-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --txyz-mono:        'SF Mono', 'Fira Code', 'Fira Mono', monospace;
}

.txyz * { box-sizing: border-box; margin: 0; padding: 0; }
.txyz { font-family: var(--txyz-font); color: var(--txyz-text); }
.txyz-hidden { display: none !important; }
.txyz-error { color: var(--txyz-red); font-size: 0.85rem; padding: 8px 12px; background: var(--txyz-red-dim); border-radius: var(--txyz-radius-sm); }

/* ── Skeletons ─────────────────────────────────────────────────────────────── */
@keyframes txyz-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.txyz-skeleton {
  background: linear-gradient(90deg, var(--txyz-surface-2) 25%, rgba(255,255,255,0.04) 50%, var(--txyz-surface-2) 75%);
  background-size: 800px 100%;
  animation: txyz-shimmer 1.5s infinite;
  border-radius: 6px;
}
.txyz-skeleton-sm  { height: 14px; width: 80px; }
.txyz-skeleton-md  { height: 16px; width: 120px; }
.txyz-skeleton-lg  { height: 22px; width: 160px; }
.txyz-skeleton-circle { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }

/* ── Spinner ───────────────────────────────────────────────────────────────── */
@keyframes txyz-spin { to { transform: rotate(360deg); } }
.txyz-spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--txyz-accent);
  border-radius: 50%;
  animation: txyz-spin 0.8s linear infinite;
  margin: auto;
}
.txyz-spinner-xs {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--txyz-text);
  border-radius: 50%;
  animation: txyz-spin 0.7s linear infinite;
  vertical-align: middle;
}

/* ── Search ────────────────────────────────────────────────────────────────── */
.txyz-search-wrap { position: relative; }

.txyz-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--txyz-surface);
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius);
  padding: 10px 16px;
  transition: border-color var(--txyz-transition), box-shadow var(--txyz-transition);
}
.txyz-search-bar:focus-within {
  border-color: var(--txyz-accent);
  box-shadow: 0 0 0 3px var(--txyz-accent-dim);
}
.txyz-search-bar-lg { padding: 14px 20px; border-radius: 20px; }

.txyz-search-icon {
  width: 18px; height: 18px;
  color: var(--txyz-muted);
  flex-shrink: 0;
}
.txyz-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--txyz-text);
  font-size: 0.95rem;
  font-family: var(--txyz-font);
}
.txyz-search-input::placeholder { color: var(--txyz-muted); }
.txyz-search-spinner { flex-shrink: 0; }

.txyz-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  /* surface var may be configured semi-transparent for the glass search bar;
     the dropdown must be opaque so content behind it doesn't bleed through. */
  background: var(--txyz-surface-2);
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius);
  box-shadow: var(--txyz-shadow);
  z-index: 9999;
  overflow: hidden;
  max-height: 360px;
  overflow-y: auto;
}
.txyz-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--txyz-transition);
  border-bottom: 1px solid var(--txyz-border);
}
.txyz-search-result-item:last-child { border-bottom: none; }
.txyz-search-result-item:hover { background: var(--txyz-accent-dim); }

.txyz-result-logo {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--txyz-surface-2);
  flex-shrink: 0;
}
.txyz-result-logo-placeholder {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--txyz-accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  color: var(--txyz-accent);
  flex-shrink: 0;
}
.txyz-result-name { font-weight: 600; font-size: 0.9rem; }
.txyz-result-symbol {
  font-size: 0.75rem;
  color: var(--txyz-muted);
  font-family: var(--txyz-mono);
  text-transform: uppercase;
}
.txyz-result-meta { display: flex; flex-direction: column; gap: 2px; }
.txyz-search-no-results { padding: 24px; text-align: center; color: var(--txyz-muted); font-size: 0.9rem; }

/* ── Asset Panel (inline, after search) ───────────────────────────────────── */
.txyz-asset-panel {
  margin-top: 16px;
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius);
  overflow: hidden;
  background: var(--txyz-surface);
}

/* ── Asset Detail ──────────────────────────────────────────────────────────── */
.txyz-asset-detail {
  background: var(--txyz-surface);
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius);
  overflow: hidden;
}

.txyz-asset-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--txyz-accent-dim) 0%, transparent 70%), var(--txyz-surface);
  border-bottom: 1px solid var(--txyz-border);
  flex-wrap: wrap;
}
.txyz-asset-logo-wrap { flex-shrink: 0; }
.txyz-asset-logo {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
}
.txyz-asset-logo-placeholder {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--txyz-accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: var(--txyz-accent);
}
.txyz-asset-title-wrap { flex: 1; min-width: 0; }
.txyz-asset-name { font-size: 1.3rem; font-weight: 700; }
.txyz-asset-symbol {
  font-size: 0.8rem;
  color: var(--txyz-muted);
  font-family: var(--txyz-mono);
  text-transform: uppercase;
  margin-top: 2px;
}
.txyz-asset-price-wrap { text-align: right; }
.txyz-asset-price { font-size: 1.6rem; font-weight: 800; font-family: var(--txyz-mono); }
.txyz-asset-change {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 4px;
}
.txyz-change-pos { color: var(--txyz-green); background: var(--txyz-green-dim); }
.txyz-change-neg { color: var(--txyz-red);   background: var(--txyz-red-dim);   }
.txyz-change-neu { color: var(--txyz-muted); background: var(--txyz-surface-2); }

/* ── Tabs ──────────────────────────────────────────────────────────────────── */
.txyz-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 16px 0;
  border-bottom: 1px solid var(--txyz-border);
  background: var(--txyz-surface);
  overflow-x: auto;
}
.txyz-tabs::-webkit-scrollbar { height: 0; }

.txyz-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--txyz-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--txyz-transition), border-color var(--txyz-transition);
  font-family: var(--txyz-font);
}
.txyz-tab:hover { color: var(--txyz-text); }
.txyz-tab-active {
  color: var(--txyz-accent) !important;
  border-bottom-color: var(--txyz-accent) !important;
}

.txyz-tab-panel { display: none; padding: 24px; }
.txyz-tab-panel-active { display: block; }
.txyz-panel-loader { display: flex; align-items: center; justify-content: center; min-height: 120px; }

/* ── Overview Panel ────────────────────────────────────────────────────────── */
.txyz-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.txyz-stat-card {
  background: var(--txyz-surface-2);
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius-sm);
  padding: 14px 16px;
}
.txyz-stat-label { font-size: 0.75rem; color: var(--txyz-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.txyz-stat-value { font-size: 1rem; font-weight: 700; font-family: var(--txyz-mono); }
.txyz-description { font-size: 0.9rem; line-height: 1.6; color: var(--txyz-muted); }

/* ── Chart Panel ───────────────────────────────────────────────────────────── */
.txyz-chart-wrap {
  background: var(--txyz-surface);
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.txyz-chart-controls { display: flex; gap: 6px; }
.txyz-tf-btn {
  background: var(--txyz-surface-2);
  border: 1px solid var(--txyz-border);
  border-radius: 6px;
  color: var(--txyz-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  transition: all var(--txyz-transition);
  font-family: var(--txyz-font);
}
.txyz-tf-btn:hover { color: var(--txyz-text); border-color: rgba(255,255,255,0.15); }
.txyz-tf-active {
  background: var(--txyz-accent-dim) !important;
  border-color: var(--txyz-accent) !important;
  color: var(--txyz-accent) !important;
}
.txyz-chart-container { position: relative; flex: 1; min-height: 240px; }
.txyz-chart-canvas { width: 100% !important; height: 100% !important; }
.txyz-chart-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--txyz-surface);
  border-radius: var(--txyz-radius-sm);
  transition: opacity 0.3s;
}
.txyz-chart-overlay.txyz-hidden { display: none; }

/* ── Risk Panel ────────────────────────────────────────────────────────────── */
.txyz-risk-score-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.txyz-risk-score-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800;
  flex-shrink: 0;
  border: 3px solid;
}
.txyz-risk-high   { border-color: var(--txyz-red);    color: var(--txyz-red);    background: var(--txyz-red-dim); }
.txyz-risk-medium { border-color: var(--txyz-yellow);  color: var(--txyz-yellow); background: rgba(255,211,42,0.1); }
.txyz-risk-low    { border-color: var(--txyz-green);   color: var(--txyz-green);  background: var(--txyz-green-dim); }
.txyz-risk-unknown{ border-color: var(--txyz-muted);   color: var(--txyz-muted);  background: var(--txyz-surface-2); }

.txyz-risk-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
  line-height: 1.8;
}

.txyz-risk-flags { list-style: none; }
.txyz-risk-flag {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--txyz-radius-sm);
  margin-bottom: 8px;
  font-size: 0.85rem;
  background: var(--txyz-surface-2);
  border: 1px solid var(--txyz-border);
}
.txyz-flag-icon { flex-shrink: 0; width: 18px; }
.txyz-flag-warn { border-left: 3px solid var(--txyz-yellow); }
.txyz-flag-danger { border-left: 3px solid var(--txyz-red); }
.txyz-flag-ok { border-left: 3px solid var(--txyz-green); }

/* ── Markets Panel ─────────────────────────────────────────────────────────── */
.txyz-table-wrap { overflow-x: auto; }
.txyz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.txyz-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--txyz-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--txyz-border);
  font-weight: 600;
}
.txyz-table td {
  padding: 12px;
  border-bottom: 1px solid var(--txyz-border);
  font-family: var(--txyz-mono);
}
.txyz-table tr:hover td { background: var(--txyz-row-hover); }
.txyz-table tr:last-child td { border-bottom: none; }

.txyz-markets-section-hdr {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--txyz-muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--txyz-border);
}

/* ── Variants Panel ────────────────────────────────────────────────────────── */
.txyz-variants-list { display: flex; flex-direction: column; gap: 8px; }
.txyz-variant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--txyz-surface-2);
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius-sm);
  gap: 12px;
  flex-wrap: wrap;
}
.txyz-variant-mint {
  font-family: var(--txyz-mono);
  font-size: 0.75rem;
  color: var(--txyz-muted);
  word-break: break-all;
}
.txyz-variant-kind {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--txyz-accent-dim);
  color: var(--txyz-accent);
  flex-shrink: 0;
}

/* ── Curated Grid ──────────────────────────────────────────────────────────── */
.txyz-curated-grid {
  display: grid;
  grid-template-columns: repeat(var(--txyz-cols, 3), 1fr);
  gap: 16px;
}
@media (max-width: 768px) { .txyz-curated-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .txyz-curated-grid { grid-template-columns: 1fr; } }

.txyz-token-card {
  background: var(--txyz-surface);
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius);
  padding: 20px;
  cursor: pointer;
  transition: border-color var(--txyz-transition), transform var(--txyz-transition), box-shadow var(--txyz-transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.txyz-token-card:hover {
  border-color: var(--txyz-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--txyz-accent-dim);
}
.txyz-skeleton-card { cursor: default; }
.txyz-skeleton-card:hover { transform: none; box-shadow: none; border-color: var(--txyz-border); }

.txyz-card-header { display: flex; align-items: center; gap: 12px; }
.txyz-card-logo {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--txyz-surface-2);
}
.txyz-card-logo-placeholder {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--txyz-accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: var(--txyz-accent);
  flex-shrink: 0;
}
.txyz-card-name { font-weight: 700; font-size: 0.95rem; }
.txyz-card-symbol { font-size: 0.75rem; color: var(--txyz-muted); font-family: var(--txyz-mono); }
.txyz-card-price { font-size: 1.2rem; font-weight: 800; font-family: var(--txyz-mono); }
.txyz-card-bottom { display: flex; align-items: center; justify-content: space-between; }
.txyz-card-mcap { font-size: 0.75rem; color: var(--txyz-muted); }
.txyz-card-change { font-size: 0.8rem; font-weight: 700; }

/* Card expanded state */
.txyz-token-card.txyz-card-expanded { cursor: default; }
.txyz-card-detail-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--txyz-border);
}

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.txyz-dashboard { display: flex; flex-direction: column; gap: 32px; }
/* Let flex children shrink so the table scrolls instead of widening the page */
.txyz-dashboard > * { min-width: 0; }
.txyz-dashboard-curated, .txyz-dashboard-curated-grid { min-width: 0; }
/* Elementor (and other flex-based page builders) wrap widgets in flex items
   that default to min-width:auto, so the nowrap table forces the whole widget
   wider than the viewport. Let the wrapping flex item shrink. */
.elementor-element:has(.txyz-dashboard),
.elementor-widget-container:has(> .txyz-dashboard) {
  min-width: 0;
  max-width: 100%;
}
.txyz-dashboard-search { position: relative; }
.txyz-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--txyz-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

/* ── Back button ────────────────────────────────────────────────────────────── */
.txyz-dashboard-featured {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.txyz-dashboard-featured .txyz-asset-detail { width: 100%; }
.txyz-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--txyz-muted);
  cursor: pointer;
  font-family: var(--txyz-font);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
  transition: color var(--txyz-transition);
}
.txyz-back-btn:hover {
  color: var(--txyz-accent);
}

/* ── List filter pills ──────────────────────────────────────────────────────── */
.txyz-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.txyz-list-filter-btn {
  background: var(--txyz-surface-2);
  border: 1px solid var(--txyz-border);
  border-radius: 20px;
  color: var(--txyz-muted);
  cursor: pointer;
  font-family: var(--txyz-font);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  transition: background var(--txyz-transition), color var(--txyz-transition), border-color var(--txyz-transition);
}
.txyz-list-filter-btn:hover {
  background: var(--txyz-accent-dim);
  border-color: var(--txyz-accent);
  color: var(--txyz-text);
}
.txyz-list-filter-active {
  background: var(--txyz-accent-dim) !important;
  border-color: var(--txyz-accent) !important;
  color: var(--txyz-accent) !important;
}

/* ── Tickers ────────────────────────────────────────────────────────────────── */
.txyz-ticker-row td:first-child { font-weight: 600; font-family: inherit; }

/* ── Misc ──────────────────────────────────────────────────────────────────── */
.txyz-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--txyz-surface-2);
  color: var(--txyz-muted);
  border: 1px solid var(--txyz-border);
}
.txyz .txyz-link,
.txyz a.txyz-link {
  color: var(--txyz-accent) !important;
  text-decoration: none;
  font-size: 0.85rem;
}
.txyz .txyz-link:hover,
.txyz a.txyz-link:hover { color: var(--txyz-accent) !important; text-decoration: underline; }
.txyz-empty { color: var(--txyz-muted); font-size: 0.9rem; text-align: center; padding: 32px; }
.txyz-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}
.txyz-badge-purple { background: var(--txyz-accent-dim); color: var(--txyz-accent); }
.txyz-badge-green  { background: var(--txyz-green-dim);  color: var(--txyz-green);  }
.txyz-badge-red    { background: var(--txyz-red-dim);    color: var(--txyz-red);    }

/* ── Dashboard: title + centered search ──────────────────────────────────────── */
.txyz-dashboard-title {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 28px;
}
.txyz-dashboard .txyz-dashboard-search {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.txyz-search-bar-lg .txyz-search-kbd {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.txyz-search-kbd kbd {
  font-family: var(--txyz-font);
  font-size: 0.72rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--txyz-surface-2);
  border: 1px solid var(--txyz-border);
  color: var(--txyz-muted);
}

/* ── Spotlight cards ─────────────────────────────────────────────────────────── */
.txyz-spotlight-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.txyz-spotlight-card {
  background: var(--txyz-surface);
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 150px;
}
.txyz-spot-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--txyz-muted);
}
.txyz-spot-spark { flex: 1; min-height: 56px; display: flex; align-items: center; }
.txyz-spot-spark .txyz-sparkline { width: 100%; height: 56px; }
.txyz-spot-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.txyz-spot-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.txyz-spot-logo, .txyz-spot-logo-placeholder {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
}
.txyz-spot-logo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--txyz-accent-dim); color: var(--txyz-accent);
  font-size: 0.7rem; font-weight: 700;
}
.txyz-spot-name { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txyz-spot-value { font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.txyz-spotlight-card.txyz-empty { opacity: 0.5; }

/* ── Category tabs ───────────────────────────────────────────────────────────── */
.txyz-cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: -16px;
  margin-bottom: 16px;
}
.txyz-cat-tabs .txyz-list-filter-btn {
  flex: 1;
  text-align: center;
  background: var(--txyz-surface);
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius);
  color: var(--txyz-muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 18px;
  cursor: pointer;
  transition: background var(--txyz-transition), color var(--txyz-transition), border-color var(--txyz-transition);
}
.txyz-cat-tabs .txyz-list-filter-btn:hover {
  background: var(--txyz-accent-tint);
  border-color: var(--txyz-border);
  color: var(--txyz-muted);
}
.txyz-cat-tabs .txyz-list-filter-active {
  background: var(--txyz-accent-tint);
  border-color: var(--txyz-border);
  color: var(--txyz-muted);
}

/* ── Token table ─────────────────────────────────────────────────────────────── */
.txyz-table-mode .txyz-curated-grid { display: block; }
.txyz-table-scroll { width: 100%; overflow-x: auto; }
.txyz-token-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--txyz-bg);
  border-radius: var(--txyz-radius);
  overflow: hidden;
}
.txyz-token-table .txyz-th {
  text-align: right;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--txyz-muted);
  padding: 12px 16px;
  white-space: nowrap;
  border-bottom: 1px solid var(--txyz-border);
}
.txyz-token-table .txyz-th-left { text-align: left; }
.txyz-th-sortable { cursor: pointer; user-select: none; }
.txyz-th-sortable:hover { color: var(--txyz-text); }
.txyz-th-active { color: var(--txyz-text); }
.txyz-th-arrow { margin-left: 8px; font-size: 0.7rem; opacity: 0.8; }
/* On right-aligned (numeric) headers, float the sort arrow out of flow so the
   label text aligns with the right-aligned values below it instead of being
   pushed left by the arrow's width. Reserve room on the right so the label
   doesn't butt up against the floated arrow. */
.txyz-token-table .txyz-th-right { position: relative; padding-right: 30px; }
.txyz-token-table .txyz-th-right .txyz-th-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0;
}
.txyz-token-row { cursor: pointer; transition: background var(--txyz-transition); }
.txyz-token-row:hover { background: var(--txyz-row-hover); color: var(--txyz-row-hover-text); }
.txyz-token-row:hover .txyz-row-symbol { color: var(--txyz-row-hover-text); opacity: 0.7; }
.txyz-token-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--txyz-border);
  white-space: nowrap;
}
.txyz-td-num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 30px; }
.txyz-td-token { max-width: 300px; }
.txyz-td-token-inner { display: flex; align-items: center; gap: 10px; min-width: 0; }
.txyz-td-token-inner .txyz-row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.txyz-row-symbol { flex-shrink: 0; }
.txyz-row-logo, .txyz-row-logo-placeholder {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
}
.txyz-row-logo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--txyz-accent-dim); color: var(--txyz-accent);
  font-size: 0.7rem; font-weight: 700;
}
.txyz-row-name { font-weight: 700; }
.txyz-row-symbol { color: var(--txyz-muted); font-size: 0.82rem; }
.txyz-change-pos { color: var(--txyz-green); }
.txyz-change-neg { color: var(--txyz-red); }
.txyz-change-neu { color: var(--txyz-muted); }

/* ── Sparklines ──────────────────────────────────────────────────────────────── */
.txyz-td-spark { width: 140px; }
.txyz-td-spark .txyz-sparkline { width: 120px; height: 32px; display: block; margin-left: auto; }
.txyz-sparkline.txyz-spark-up   { color: var(--txyz-green); }
.txyz-sparkline.txyz-spark-down { color: var(--txyz-red); }
.txyz-spark-na { color: var(--txyz-muted); }
.txyz-spark-skeleton {
  display: block; height: 32px; width: 120px; margin-left: auto;
  background: linear-gradient(90deg, var(--txyz-surface-2) 25%, rgba(255,255,255,0.04) 50%, var(--txyz-surface-2) 75%);
  background-size: 800px 100%;
  animation: txyz-shimmer 1.5s infinite;
  border-radius: 6px;
}
.txyz-spot-spark .txyz-spark-skeleton { width: 100%; height: 56px; }

/* ── Table skeleton ──────────────────────────────────────────────────────────── */
.txyz-table-skeleton { display: flex; flex-direction: column; gap: 4px; }
.txyz-table-skeleton-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--txyz-border);
}

@media (max-width: 600px) {
  .txyz-row-symbol { display: none; }
  .txyz-td-spark { display: none; }
  .txyz-token-table { font-size: 0.85rem; }
  .txyz-token-table .txyz-th,
  .txyz-token-table td { padding: 12px 10px; }
  .txyz-token-table .txyz-th:nth-child(4),
  .txyz-token-table td:nth-child(4),
  .txyz-token-table .txyz-th:nth-child(5),
  .txyz-token-table td:nth-child(5),
  .txyz-token-table .txyz-th:nth-child(6),
  .txyz-token-table td:nth-child(6) { display: none; }
}

/* ── Single-page asset detail ───────────────────────────────────────────────── */
.txyz-asset-body { padding: 24px; display: flex; flex-direction: column; gap: 8px; }

.txyz-asset-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.txyz-verified-badge { display: inline-flex; color: var(--txyz-accent); }
.txyz-asset-symbol-chip {
  font-family: var(--txyz-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--txyz-muted);
  background: var(--txyz-surface-2);
  border: 1px solid var(--txyz-border);
  border-radius: 20px;
  padding: 2px 10px;
  text-transform: uppercase;
}

.txyz-detail-h {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 18px 0 4px;
}
.txyz-detail-section { margin: 0; }
.txyz-detail-section .txyz-panel-loader { min-height: 120px; }

.txyz-stats-grid {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 720px) { .txyz-stats-grid { grid-template-columns: repeat(2, 1fr); } }

.txyz-about-body { font-size: 0.9rem; line-height: 1.6; color: var(--txyz-muted); }
.txyz-desc-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.txyz-desc-clamp.txyz-desc-open { -webkit-line-clamp: unset; overflow: visible; }
.txyz-readmore {
  background: none; border: none; cursor: pointer;
  color: var(--txyz-accent);
  font-size: 0.85rem; font-weight: 600;
  font-family: var(--txyz-font);
  padding: 4px 0;
}

.txyz-collapse {
  border: 1px solid var(--txyz-border);
  border-radius: var(--txyz-radius-sm);
  margin-top: 8px;
  overflow: hidden;
}
.txyz-collapse > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--txyz-surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.txyz-collapse > summary::-webkit-details-marker { display: none; }
.txyz-collapse > summary::after { content: '▾'; color: var(--txyz-muted); transition: transform var(--txyz-transition); }
.txyz-collapse[open] > summary::after { transform: rotate(180deg); }
.txyz-collapse > summary:hover { color: var(--txyz-accent); }
.txyz-collapse .txyz-detail-section { padding: 16px; }

/* ── Theme-conflict resets ─────────────────────────────────────────────────────
   Production WP themes commonly style bare input/button/table elements with
   higher specificity (e.g. input[type], .entry-content td), which leaks white
   borders and transparent backgrounds into the plugin. Force our values. */
.txyz .txyz-search-input,
.txyz input.txyz-search-input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  -webkit-appearance: none;
  appearance: none;
}
.txyz .txyz-list-filter-btn {
  background: var(--txyz-surface) !important;
  background-image: none !important;
  box-shadow: none !important;
}
/* Force round icons — theme (Blocksy) applies its own img border-radius */
.txyz .txyz-asset-logo,
.txyz .txyz-result-logo,
.txyz .txyz-card-logo,
.txyz .txyz-spot-logo,
.txyz .txyz-row-logo,
.txyz .txyz-asset-logo-placeholder,
.txyz .txyz-result-logo-placeholder,
.txyz .txyz-card-logo-placeholder,
.txyz .txyz-spot-logo-placeholder,
.txyz .txyz-row-logo-placeholder {
  border-radius: 50% !important;
}
.txyz .txyz-cat-tabs .txyz-list-filter-btn:hover,
.txyz .txyz-cat-tabs .txyz-list-filter-active {
  background: var(--txyz-accent-tint) !important;
  color: var(--txyz-muted) !important;
}
.txyz .txyz-token-table th,
.txyz .txyz-token-table td {
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--txyz-border) !important;
}
