:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-elevated: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.94);

  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;

  --brand-primary: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-border: #bfdbfe;

  --up-text: #059669;
  --up-bg: #ecfdf5;
  --up-border: #a7f3d0;

  --down-text: #dc2626;
  --down-bg: #fef2f2;
  --down-border: #fecaca;

  --warn-text: #475569;
  --warn-bg: #f8fafc;
  --warn-border: #e2e8f0;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 16px -3px rgba(15, 23, 42, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-theme="dark"] {
  --bg-page: #0b0f19;
  --bg-surface: #111827;
  --bg-subtle: #1e293b;
  --bg-elevated: #334155;
  --bg-glass: rgba(17, 24, 39, 0.94);

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --border-color: #1e293b;
  --border-strong: #334155;

  --brand-primary: #3b82f6;
  --brand-hover: #60a5fa;
  --brand-soft: rgba(59, 130, 246, 0.14);
  --brand-border: rgba(59, 130, 246, 0.32);

  --up-text: #34d399;
  --up-bg: rgba(16, 185, 129, 0.14);
  --up-border: rgba(16, 185, 129, 0.3);

  --down-text: #f87171;
  --down-bg: rgba(239, 68, 68, 0.14);
  --down-border: rgba(239, 68, 68, 0.3);

  --warn-text: #94a3b8;
  --warn-bg: rgba(30, 41, 59, 0.45);
  --warn-border: #1e293b;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 8px 20px -4px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================================================
   1. Sticky Header & Navigation (Single-Row, Zero Overflow)
   ============================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-main);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo:hover {
  color: var(--text-main);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.brand-text {
  white-space: nowrap;
}

.brand-dot {
  color: var(--brand-primary);
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.15s ease;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.nav-link.active {
  background: var(--brand-soft);
  color: var(--brand-primary);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.live-pulse-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--up-bg);
  border: 1px solid var(--up-border);
  color: var(--up-text);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up-text);
  box-shadow: 0 0 0 2px var(--up-border);
  flex-shrink: 0;
}

.header-saved-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.header-saved-pill:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.header-saved-pill strong {
  font-family: var(--font-mono);
  color: var(--brand-primary);
  font-weight: 700;
}

.theme-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.theme-btn:hover {
  border-color: var(--brand-primary);
  background: var(--brand-soft);
}

/* ============================================================================
   2. Top 10 Live Ticker Ribbon (Single-Line, Zero Wrap)
   ============================================================================ */
.ticker-ribbon {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  height: 36px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
}

.ticker-ribbon::-webkit-scrollbar {
  display: none;
}

.ticker-track {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: max-content;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: max-content;
  text-decoration: none;
}

.ticker-item:hover {
  color: var(--brand-primary);
}

.ticker-rank {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

.ticker-sym {
  font-weight: 700;
  color: var(--text-main);
}

.ticker-price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
  padding: 1px 4px;
  border-radius: 4px;
}

/* ============================================================================
   3. Main Container & Compact Page Headers
   ============================================================================ */
.main-container {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 20px 48px;
  flex: 1;
}

.page-compact-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-xs);
}

.page-compact-h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
}

.page-compact-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 3px 0 0;
}

.page-compact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================================
   4. Primary Directory Section & Filter Controls
   ============================================================================ */
.directory-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 22px;
  width: 100%;
  overflow: hidden;
}

.directory-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.directory-title-wrap {
  min-width: 0;
}

.directory-main-h1,
.directory-title-wrap h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 0;
  line-height: 1.25;
}

.directory-inline-sub,
.directory-title-wrap p {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.directory-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.search-input-wrap {
  position: relative;
  min-width: 220px;
  flex: 1 1 220px;
  max-width: 300px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12.5px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 36px;
  padding: 0 10px 0 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 12.5px;
  font-family: var(--font-sans);
  outline: none;
}

.search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px var(--brand-soft);
}

.filter-select {
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  max-width: 190px;
}

.filter-select:focus {
  border-color: var(--brand-primary);
}

.market-btn-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  gap: 2px;
}

.market-toggle-btn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.market-toggle-btn:hover {
  color: var(--text-main);
}

.market-toggle-btn.active {
  background: var(--bg-surface);
  color: var(--brand-primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-xs);
  font-weight: 700;
}

/* ============================================================================
   5. Single-Line Quick Filter Pills Bar (.scanner-preset-bar)
   ============================================================================ */
.scanner-preset-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
  margin-bottom: 16px;
}

.scanner-preset-bar::-webkit-scrollbar {
  display: none;
}

.scanner-preset-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
  flex-shrink: 0;
}

.scanner-preset-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  text-decoration: none;
}

.scanner-preset-pill:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.scanner-preset-pill.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  font-weight: 700;
}

.scanner-link-pill {
  background: var(--brand-soft);
  color: var(--brand-primary);
  border-color: var(--brand-border);
}

/* ============================================================================
   6. Crisp Fintech Market Cards Grid (Zero Overflow, 4 Clean Rows)
   ============================================================================ */
.market-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  width: 100%;
}

.market-card,
.airdrop-hist-card,
.airdrop-spec-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.market-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Row 1: Identity & Watchlist Star */
.mc-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.mc-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.mc-logo-wrap {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  position: relative;
}

.mc-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  display: block;
}

.mc-fallback-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-title-group {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.mc-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.mc-badges-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.mc-rank-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.mc-sym {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.mc-eco-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.mc-airdrop-dot {
  font-size: 11px;
  flex-shrink: 0;
}

.mc-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mc-fav-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.mc-fav-btn:hover,
.mc-fav-btn.active {
  color: #f59e0b;
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

/* Row 2: Price + 24h/7d Change + 88x32 SVG Sparkline */
.mc-price-spark-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.mc-price-col {
  min-width: 0;
  flex: 1;
}

.mc-price-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
}

.mc-chg-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  white-space: nowrap;
}

.mc-chg-7d {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.mc-spark-wrap {
  width: 88px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-spark-svg {
  width: 88px;
  height: 32px;
  display: block;
  overflow: visible;
}

/* Row 3: 3-Column Metrics Strip (MCap | 24h Vol | Float) */
.mc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 9px 10px;
  background: var(--bg-subtle);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.mc-metric-box {
  min-width: 0;
  overflow: hidden;
}

.mc-metric-k {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-metric-v {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Row 4: Clean 2-Button Action Strip */
.mc-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-mc-primary,
.btn-mc-secondary {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-mc-primary {
  background: var(--brand-soft);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
}

.btn-mc-primary:hover {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.btn-mc-secondary {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-mc-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* ============================================================================
   7. Percentage Badges & Live Price Flash Animations
   ============================================================================ */
.pct-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.pct-up {
  background: var(--up-bg);
  color: var(--up-text);
}

.pct-down {
  background: var(--down-bg);
  color: var(--down-text);
}

.pct-flat {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

@keyframes flashPriceUp {
  0% { background-color: rgba(16, 185, 129, 0.28); }
  100% { background-color: transparent; }
}

@keyframes flashPriceDown {
  0% { background-color: rgba(239, 68, 68, 0.28); }
  100% { background-color: transparent; }
}

.price-tick-up {
  animation: flashPriceUp 1.1s ease-out;
}

.price-tick-down {
  animation: flashPriceDown 1.1s ease-out;
}

/* ============================================================================
   8. Airdrops Hub Specific Card & Calculator Styles
   ============================================================================ */
.airdrop-calc-strip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.airdrop-calc-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.airdrop-calc-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.airdrop-calc-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.airdrop-inline-calc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 11.5px;
}

.airdrop-inline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-secondary);
}

.airdrop-inline-input {
  width: 78px;
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
}

.airdrop-inline-out {
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.airdrop-activity-snippet {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spec-status-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

/* ============================================================================
   9. Compact Table View & Pagination Bar
   ============================================================================ */
.token-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.token-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.token-table th {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.token-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  white-space: nowrap;
}

.token-table tbody tr:hover {
  background: var(--bg-subtle);
}

.rank-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 12px;
}

.token-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.token-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.token-fallback-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.token-name-link {
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
}

.token-name-link:hover {
  color: var(--brand-primary);
}

.token-sym-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.token-sym-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: 4px;
}

.sector-mini-tag {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.num-cell {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
}

.action-btn-table {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  cursor: pointer;
}

.action-btn-table:hover {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.page-info-text {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.page-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

/* ============================================================================
   10. Interactive TradingView Chart Workspace (Zero Giant Logo Overflow)
   ============================================================================ */
.tv-workspace-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.tv-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.tv-active-token-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tv-active-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.tv-active-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.25;
}

.tv-active-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.tv-quick-tokens {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tv-token-btn {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.tv-token-btn:hover,
.tv-token-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.tv-chart-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: stretch;
}

.tv-main-chart-box {
  min-height: 460px;
  height: 460px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--bg-page);
  min-width: 0;
}

.tv-side-summary-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.neutral-fact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.neutral-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
  white-space: nowrap;
}

.legal-fine-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.fact-kv-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fact-kv {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-width: 0;
}

.fact-k {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fact-v {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================================
   11. Token Detail Pages, Portfolio Sandbox, Comparator & Calculators
   ============================================================================ */
.altcoin-module-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
  min-width: 0;
  overflow: hidden;
}

.altcoin-module-card h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.altcoin-module-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.altcoin-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
  min-width: 0;
}

.altcoin-grid-2col > * {
  min-width: 0;
}

.comparator-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.comparator-result-banner {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.comp-big-price {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-primary);
}

.comp-mult-badge {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.sandbox-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.sandbox-kpi-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.sandbox-kpi-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sandbox-kpi-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 3px;
}

.sandbox-add-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.form-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 13px;
  font-family: var(--font-sans);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: #ffffff;
}

.sector-hub-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sector-hub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  white-space: nowrap;
  text-decoration: none;
}

.sector-hub-link:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.matrix-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.matrix-mini-table th,
.matrix-mini-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.supply-meter-wrap {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.supply-bar-outer {
  width: 100%;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}

.supply-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), #10b981);
  border-radius: 999px;
}

/* ============================================================================
   12. Stats Leaderboards (/stats/)
   ============================================================================ */
.stats-list-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-main);
}

.stats-rank-row:hover {
  border-color: var(--brand-primary);
}

.stats-rank-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  width: 26px;
  flex-shrink: 0;
}

.stats-rank-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stats-rank-info {
  flex: 1;
  min-width: 0;
}

.stats-rank-title {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-bar-track {
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 999px;
  margin-top: 4px;
  overflow: hidden;
}

.stats-bar-fill {
  height: 100%;
  background: var(--brand-primary);
  border-radius: 999px;
}

.stats-rank-metric {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

/* ============================================================================
   13. Subtle Legal Disclosures & Footer (Zero Loud Yellow/Red Boxes)
   ============================================================================ */
.subtle-legal-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.legal-vault-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-top: 20px;
}

.legal-vault-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.legal-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.legal-clause-card {
  padding: 10px 12px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.legal-clause-card h4 {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.legal-clause-card p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
}

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 36px 0 28px;
  margin-top: 32px;
}

.footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-main);
  margin-bottom: 10px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.footer-legal-box {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ============================================================================
   14. Responsive Breakpoints (Tablet & Mobile Zero-Overflow)
   ============================================================================ */
@media (max-width: 1080px) {
  .tv-chart-grid,
  .altcoin-grid-2col {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 8px 14px;
    gap: 8px;
  }
  .main-nav {
    order: 3;
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
  }
  .main-container {
    padding: 12px 12px 36px;
  }
  .directory-card,
  .tv-workspace-card,
  .altcoin-module-card {
    padding: 14px;
  }
  .directory-controls {
    width: 100%;
  }
  .search-input-wrap {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .filter-select {
    flex: 1 1 calc(50% - 4px);
    max-width: none;
  }
  .market-cards-grid {
    grid-template-columns: 1fr;
  }
  .hide-mobile {
    display: none !important;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   15. Token Detail Page Helpers, Prose Cards & Secondary Page Classes
   ============================================================================ */
.footer-col,
.token-name-box,
.stats-leaderboards-grid {
  min-width: 0;
}

.footer-copy {
  font-size: 11.5px;
  color: var(--text-muted);
}

.view-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.float-progress-wrap {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.float-progress-track {
  width: 100%;
  height: 7px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}

.float-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), #10b981);
  border-radius: 999px;
}

.peer-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.peer-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
}

.peer-chip:hover {
  border-color: var(--brand-primary);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.faq-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.faq-item h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 5px;
}

.faq-item p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.muted-legal-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.muted-legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.prose-card,
.hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
  min-width: 0;
  overflow: hidden;
}

.prose-card h1,
.hero-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.25;
}

.prose-card h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin: 18px 0 6px;
}

.prose-card p,
.hero-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
  margin-bottom: 8px;
}