/* ==========================================================================
   Markets — live explorer
   ========================================================================== */

.hide-md, .hide-sm { }
@media (max-width: 1000px) { .hide-md { display: none !important; } }
@media (max-width: 560px) { .hide-sm { display: none !important; } }

.xp {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  box-shadow: 0 60px 160px rgba(0, 186, 124, 0.12);
}

.xp__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.xp__search {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 48px;
  border-radius: 14px;
  background: #0e1012;
  border: 1px solid #22262a;
  color: var(--muted);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.xp__search:focus-within { border-color: rgba(124, 255, 203, 0.6); box-shadow: 0 0 30px rgba(124, 255, 203, 0.15); }

.xp__search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  font: 500 16px var(--font-sans);
}

.xp__search input::placeholder { color: var(--subtle); }

.xp__tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #0e1012;
  overflow-x: auto;
  scrollbar-width: none;
}

.xp__tabs button {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s, background 0.3s;
}

.xp__tabs button small { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; opacity: 0.7; margin-left: 4px; }
.xp__tabs button:hover { color: var(--white); }
.xp__tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); }

.xp__dex { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.xp__dex[hidden] { display: none; }

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.chip:hover { color: var(--white); }
.chip[aria-pressed="true"] { color: var(--ink); background: var(--mint); border-color: var(--mint); }

.xp__table { max-height: min(70vh, 760px); overflow-y: auto; overscroll-behavior: contain; }

.xrow {
  display: grid;
  grid-template-columns: 1.7fr 1fr 0.8fr 0.9fr 1fr 1fr 0.7fr;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-variant-numeric: tabular-nums;
  transition: background 0.25s;
}

.xrow > :not(:first-child) { text-align: right; }
.xrow:not(.xrow--h):hover { background: rgba(124, 255, 203, 0.04); }
.xrow .mono { font-size: 13px; }

.xrow--h {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 12px;
  padding-bottom: 12px;
  background: #050607;
}

.xrow--h button {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: inherit;
}

.xrow--h button:hover { color: var(--white); }
.xrow--h [aria-sort] { color: var(--mint); }
.xrow--h [aria-sort="descending"]::after { content: " ↓"; }
.xrow--h [aria-sort="ascending"]::after { content: " ↑"; }

.xrow__name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.xrow__name b { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tag {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.tag--hip3_stock, .tag--hip3_index { background: rgba(29, 155, 240, 0.14); color: #7cc4f5; }
.tag--hip3_commodity { background: rgba(255, 212, 0, 0.12); color: var(--gold); }
.tag--hip3_crypto, .tag--hip3_other { background: rgba(152, 94, 255, 0.16); color: #c3a4ff; }
.tag--spot { background: rgba(255, 255, 255, 0.04); color: var(--subtle); }

.px { border-radius: 4px; padding: 2px 4px; }
.px.up { animation: up 0.9s; }
.px.down { animation: down 0.9s; }
@keyframes up { from { background: rgba(0, 186, 124, 0.4); } }
@keyframes down { from { background: rgba(244, 33, 46, 0.4); } }

.xp__empty { padding: 60px 20px; text-align: center; color: var(--muted); }

.xp__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; }
.xp__foot .btn[hidden] { display: none; }

@media (max-width: 1000px) {
  .xrow { grid-template-columns: 1.6fr 1fr 0.8fr 1fr 0.7fr; }
}

@media (max-width: 560px) {
  .xrow { grid-template-columns: 1.5fr 1fr 0.8fr 0.9fr; padding: 12px 14px; }
  .xrow__name { flex-direction: column; align-items: flex-start; gap: 4px; }
  .xrow__name b { font-size: 15px; max-width: 100%; }
  .xrow .mono { font-size: 12px; }
}

/* Keep the ticker warp from fighting the hero type. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0) 80%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 45%);
}
.hero { isolation: isolate; }
