/* Home page (index.html) styles - King of the Pill widget, home tables and share graphics.
   Loaded after styles.css, so rules here win on equal specificity. */
/* ── King of the Pill widget ────────────────────────── */
.kotp-widget {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  color: inherit;
  position: relative;
  overflow: visible;
}
.kotp-widget:hover {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--brand-a) 45%, transparent);
  text-decoration: none;
}
.kotp-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.kotp-divider {
  width: 1px;
  height: 1.1rem;
  background: var(--border-color);
  flex-shrink: 0;
}
.kotp-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.kotp-info {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}
.kotp-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.kotp-symbol {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.kotp-change {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.kotp-change.pos { color: var(--good-ink); }
.kotp-change.neg { color: var(--bad-ink); }
.kotp-change.na  { color: var(--text-dim); }
.kotp-tooltip-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 0.35rem;
}
.kotp-tooltip-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}
.kotp-tooltip-box {
  display: none;
  position: fixed;
  width: 240px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-2);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  white-space: normal;
}
.kotp-widget:hover .kotp-tooltip-box,
.kotp-widget.kotp-tt-open .kotp-tooltip-box {
  display: block;
}

/* Share button beside the banner, and the share dialog (kotp.js, kotpShot.js) */
.kotp-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.kotp-row .kotp-widget {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.kotp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.95rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-s);
  color: #fde68a;
  font: 600 0.8rem var(--font);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.kotp-share-btn:hover,
.kotp-share-btn:focus-visible {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.75);
}
@media (max-width: 520px) {
  .kotp-share-btn { padding: 0 0.75rem; }
  .kotp-share-btn span { display: none; }
}
body.kotp-share-open { overflow: hidden; }
.kotp-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 4, 8, 0.78);
  backdrop-filter: blur(4px);
}
.kotp-share-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  padding: 1rem 1.1rem 1.1rem;
}
.kotp-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.kotp-share-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.kotp-share-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink-2);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.kotp-share-close:hover { background: var(--surface-2); color: var(--ink); }
.kotp-share-toggle {
  display: inline-flex;
  padding: 3px;
  margin-bottom: 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.kotp-share-toggle button {
  padding: 0.4rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 600 0.8rem var(--font);
  cursor: pointer;
}
.kotp-share-toggle button[aria-pressed="true"] {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.55);
}
.kotp-share-preview {
  position: relative;
  aspect-ratio: 1200 / 675;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--page);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kotp-share-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.kotp-share-loading { color: var(--muted); font-size: 0.85rem; }
.kotp-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.kotp-share-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--ink);
  font: 600 0.82rem var(--font);
  cursor: pointer;
}
.kotp-share-action:hover { background: var(--surface-3); }
.kotp-share-action.primary {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
}
.kotp-share-action.primary:hover { filter: brightness(1.1); }
@media (max-width: 520px) {
  .kotp-share-action { flex: 1 1 calc(50% - 0.25rem); justify-content: center; }
}

/* ── View Tab Switcher ──────────────────────────────── */
/* ── Page hero ─────────────────────────────────────── */
.home-hero {
  margin: 0.75rem 0 1.25rem;
}
.home-hero .page-title {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
}

/* ── View Tab Switcher: TrenchScanner's segmented tabs ── */
.main-view-tabs {
  display: inline-flex;
  max-width: 100%;
  gap: 2px;
  padding: 4px;
  margin-bottom: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.main-view-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.main-view-tab:hover {
  color: var(--ink);
}
.main-view-tab.active {
  background: var(--surface-solid);
  border-color: var(--border-strong);
  color: var(--ink);
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.5);
}
.main-view-tab.active svg {
  color: var(--brand-ink);
}
/* Sliding highlight (js/mainViewTabs.js); the active tab drops its own background then. */
.main-view-tabs.has-indicator { position: relative; }
.main-view-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 9px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.5);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
  pointer-events: none;
}
.has-indicator .main-view-tab { position: relative; z-index: 1; }
.has-indicator .main-view-tab.active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.main-view-tab:focus-visible { outline: 2px solid var(--brand-b); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
  .main-view-indicator { transition: none; }
}

/* ── vs SOL Section ─────────────────────────────────── */
.versus-benchmark-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.benchmark-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}
.benchmark-label {
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}
.benchmark-price {
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.benchmark-change { font-family: var(--font-mono); font-weight: 600; }
.benchmark-age {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.benchmark-divider {
  width: 1px;
  height: 1.2rem;
  background: var(--border-color);
  margin: 0 0.25rem;
}
.vs-pos { color: var(--green, #10b981); }
.vs-neg { color: var(--red, #ef4444); }
.vs-na  { color: var(--text-dim); }
.vs-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}
.vs-pos.vs-badge { background: var(--good-wash); }
.vs-neg.vs-badge { background: var(--bad-wash); }

/* Podium */
.versus-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 1.25rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 130px;
  transition: border-color var(--transition-fast), transform 0.15s ease;
  text-align: center;
}
.podium-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: 0 16px 32px -20px rgba(0, 0, 0, 0.6); }
.podium-gold   { border-color: rgba(255,215,0,0.35); padding-bottom: 1.25rem; }
.podium-silver { border-color: rgba(192,192,192,0.25); }
.podium-bronze { border-color: rgba(205,127,50,0.25); }
.podium-medal  { font-size: 1.5rem; line-height: 1; }
.podium-logo   { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--bg-tertiary); }
.podium-name   { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-vs     { font-size: 0.85rem; font-weight: 700; font-family: var(--font-mono); }
.podium-raw    { font-size: 0.72rem; font-family: var(--font-mono); color: var(--text-dim); }

/* Table column widths */
.cell-change  { width: 80px; text-align: right; white-space: nowrap; }
.cell-vs-sol  { width: 90px; text-align: right; white-space: nowrap; }
.cell-vs-btc  { width: 90px; text-align: right; white-space: nowrap; }

@media (max-width: 640px) {
  .versus-podium { flex-direction: column; align-items: center; }
  .podium-card { min-width: 200px; width: 100%; max-width: 260px; }
  .cell-vs-btc { display: none; }
}

/* ── Performance Section ────────────────────────────── */
.perf-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.perf-sort-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.perf-sort-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
}
/* Outline, not filled. This was the only solid-accent button on the view, which made sharing
   the loudest thing on a page whose primary action is reading the table. The filled accent is
   reserved for Connect Wallet. */
.perf-share-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.82rem;
  border-radius: var(--radius-s);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--transition-fast), color var(--transition-fast);
  font-family: var(--font-sans);
  margin-left: auto;
}
.perf-share-btn:hover { border-color: var(--border-strong); background: var(--surface-3); color: var(--ink); }
.perf-share-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Sort buttons */
.perf-sort-btn {
  padding: 0.3rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}
.perf-sort-btn:hover { border-color: var(--border-strong); color: var(--ink); }
.perf-sort-btn.active {
  background: var(--brand-wash);
  border-color: color-mix(in srgb, var(--brand-a) 45%, transparent);
  color: var(--brand-ink);
}

/* Status, loading, empty */
.perf-status {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.perf-loading-state {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}
.perf-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top-color: var(--fire-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.perf-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Table — fixed layout so token column doesn't crowd out data columns */
.perf-table {
  table-layout: fixed;
}
.perf-table th { white-space: nowrap; }
.perf-th-rank, td.perf-rank { width: 42px; text-align: center; }
th.perf-th-token { width: 220px; }
th.perf-th-ath, th.perf-th-current { width: auto; }
th.perf-th-mcap { width: 130px; }
.perf-rank {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
}
.perf-token-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow: hidden;
}
.perf-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}
.perf-token-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.perf-token-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.perf-token-symbol {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
td.perf-mcap {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}
td.perf-ath-pct {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
td.perf-current-pct {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.pct-positive { color: var(--green); }
.pct-negative { color: var(--red); }
.pct-na { color: var(--text-dim); }
.perf-row:hover { background: var(--highlight) !important; }

/* ATH % cell gets a subtle highlight when it's the active sort */
.perf-sort-ath-active td.perf-ath-pct,
.perf-sort-current-active td.perf-current-pct {
  background: color-mix(in srgb, var(--brand-a) 6%, transparent);
}

/* Share screenshot card — rendered off-screen then captured */
#perf-share-graphic {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 600px;
  background: #0d0e11;
  border: 1px solid #2a2b30;
  border-radius: 12px;
  overflow: hidden;
  font-family: 'Inter', -apple-system, sans-serif;
}
.psg-header {
  padding: 18px 20px 14px;
  background: linear-gradient(135deg, #111317, #0d0e11);
  border-bottom: 1px solid #1e2026;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.psg-brand { display: flex; align-items: center; gap: 8px; }
.psg-logo {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.psg-logo span { color: #9d7bff; }
.psg-subtitle { font-size: 0.72rem; color: #6b7280; margin-top: 2px; }
.psg-sort-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #b9a6ff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 4px;
  padding: 3px 8px;
}
.psg-table { width: 100%; border-collapse: collapse; }
.psg-table thead th {
  padding: 8px 14px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b5563;
  border-bottom: 1px solid #1e2026;
  text-align: left;
}
.psg-table thead th.right { text-align: right; }
.psg-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid #161820;
  font-size: 0.82rem;
  color: #9ca3af;
}
.psg-table tbody tr:last-child td { border-bottom: none; }
.psg-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.015); }
.psg-rank { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: #4b5563; width: 32px; }
.psg-token-cell { display: flex; align-items: center; gap: 9px; }
.psg-token-logo {
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: #1a1c22;
}
.psg-token-name { font-weight: 600; color: #f3f4f6; font-size: 0.84rem; }
.psg-token-symbol { font-size: 0.68rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; display: block; }
.psg-hammer { font-size: 0.78rem; line-height: 1; flex-shrink: 0; }
.psg-powered-by {
  font-size: 0.6rem; color: #4b5563; letter-spacing: 0.03em;
  margin-top: 4px; display: flex; align-items: center; gap: 3px;
}
.psg-powered-by strong { color: #b9a6ff; font-weight: 700; }
.psg-pct {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: right;
}
.psg-pct-current {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.8rem;
  text-align: right;
}
/* Higher specificity (0,2,0) beats the generic tbody td rule (0,1,1) */
.psg-table .psg-positive { color: #10b981; }
.psg-table .psg-negative { color: #ef4444; }
.psg-na { color: #374151; }
.psg-footer {
  padding: 10px 20px;
  border-top: 1px solid #1e2026;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.psg-url { font-size: 0.68rem; color: #4b5563; letter-spacing: 0.04em; }
.psg-ts { font-size: 0.65rem; color: #374151; }

/* Versus share screenshot card */
#versus-share-graphic {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 520px;
  background: #0d0e11;
  border: 1px solid #2a2b30;
  border-radius: 12px;
  overflow: hidden;
  font-family: Inter, system-ui, sans-serif;
  color: #f3f4f6;
}
.vsg-header {
  padding: 16px 20px 12px;
  background: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, transparent 70%);
  border-bottom: 1px solid #1f2028;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.vsg-logo { font-size: 1rem; font-weight: 700; color: #f3f4f6; letter-spacing: -0.02em; }
.vsg-logo span { color: #9d7bff; }
.vsg-subtitle { font-size: 0.72rem; color: #6b7280; margin-top: 2px; }
.vsg-powered-by { font-size: 0.6rem; color: #4b5563; letter-spacing: 0.03em; margin-top: 3px; }
.vsg-powered-by strong { color: #b9a6ff; font-weight: 700; }
.vsg-date { font-size: 0.65rem; color: #4b5563; text-align: right; white-space: nowrap; }
.vsg-benchmarks {
  display: flex;
  gap: 0;
  background: #111318;
  border-bottom: 1px solid #1f2028;
}
.vsg-bench-pill {
  flex: 1;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vsg-bench-pill + .vsg-bench-pill { border-left: 1px solid #1f2028; }
.vsg-bench-name { font-size: 0.68rem; font-weight: 700; color: #9ca3af; letter-spacing: 0.08em; }
.vsg-bench-price { font-size: 0.72rem; color: #d1d5db; font-family: 'JetBrains Mono', monospace; }
.vsg-bench-chg { font-size: 0.72rem; font-family: 'JetBrains Mono', monospace; margin-left: auto; }
.vsg-bench-chg.pos { color: #10b981; }
.vsg-bench-chg.neg { color: #ef4444; }
.vsg-podium-area {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  justify-content: center;
  align-items: flex-end;
  background: #0d0e11;
}
.vsg-card {
  flex: 1;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  border: 1px solid #2a2b30;
  background: #111318;
}
.vsg-card.gold { border-color: #f59e0b; background: rgba(245,158,11,0.06); }
.vsg-card.silver { border-color: #94a3b8; background: rgba(148,163,184,0.05); }
.vsg-card.bronze { border-color: #b45309; background: rgba(180,83,9,0.05); }
.vsg-medal { font-size: 1.3rem; margin-bottom: 6px; }
.vsg-logo-img { width: 36px; height: 36px; border-radius: 50%; display: block; margin: 0 auto 6px; }
.vsg-token-name { font-size: 0.78rem; font-weight: 600; color: #f3f4f6; display: block; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsg-token-symbol { font-size: 0.62rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 8px; }
.vsg-vs-sol { font-size: 0.9rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; display: block; margin-bottom: 3px; }
.vsg-vs-sol.pos { color: #10b981; }
.vsg-vs-sol.neg { color: #ef4444; }
.vsg-vs-sol-label { font-size: 0.58rem; color: #4b5563; letter-spacing: 0.04em; display: block; margin-bottom: 6px; }
.vsg-raw-chg { font-size: 0.68rem; font-family: 'JetBrains Mono', monospace; color: #9ca3af; display: block; }
.vsg-footer {
  padding: 8px 20px;
  background: #080910;
  border-top: 1px solid #1f2028;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vsg-url { font-size: 0.65rem; color: #4b5563; letter-spacing: 0.04em; }
.vsg-ts { font-size: 0.62rem; color: #374151; }

/* Tech and Emerging: the ATH pill under the price, only on phones where the ATH column is hidden */
.tt-ath-stack { display: none; }
@media (max-width: 768px) {
  .tt-ath-stack { display: block; margin-top: 2px; font-size: 0.7rem; line-height: 1.2; }
  .tt-ath-stack .tt-pct { font-weight: 500; }
}

@media (max-width: 640px) {
  td.perf-mcap, th.perf-th-mcap { display: none; }
  th.perf-th-token { width: 180px; }
}

@media (max-width: 480px) {
  /* ── Tab switcher — horizontal scroll so all 5 tabs are reachable ── */
  .main-view-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 0.75rem;
  }
  .main-view-tabs::-webkit-scrollbar { display: none; }
  .main-view-tab { flex-shrink: 0; padding: 6px 11px; font-size: 0.8rem; }
  .home-hero { margin: 0.25rem 0 0.9rem; }
  .home-hero .page-lede { font-size: 0.9rem; }

  /* ── Benchmark bar — compact single row, drop the age label ── */
  .versus-benchmark-bar { padding: 0.45rem 0.6rem; gap: 0.35rem; flex-wrap: nowrap; }
  .benchmark-pill { font-size: 0.76rem; gap: 0.3rem; }
  .benchmark-price { font-size: 0.76rem; }
  .benchmark-age { display: none; }

  /* ── vs SOL table — hide 24h % column (vs SOL already shows relative perf) ── */
  .cell-change { display: none; }
  /* Tighten rank on this table too */
  .cell-rank { width: 26px; min-width: 26px; }

  /* ── Podium — shrink cards a bit more ── */
  .podium-card { padding: 0.65rem 0.85rem 0.65rem; }
  .podium-logo { width: 32px; height: 32px; }
  .podium-name { font-size: 0.75rem; max-width: 100px; }
  .podium-medal { font-size: 1.2rem; }

  /* ── Performance table — one % column: the one the table is sorted by (performance.js sets
     data-sort on the table), so the row order always follows a value on screen ── */
  .perf-table[data-sort="ath"] td.perf-current-pct, .perf-table[data-sort="ath"] th.perf-th-current,
  .perf-table[data-sort="current"] td.perf-ath-pct, .perf-table[data-sort="current"] th.perf-th-ath { display: none; }
  th.perf-th-token { width: 150px; }
  td.perf-ath-pct, td.perf-current-pct { font-size: 0.82rem; }

  /* ── Performance share button — keep accessible but compact ── */
  .perf-share-btn { padding: 0.4rem 0.7rem; font-size: 0.72rem; }
}
