/* Markets, System A: a living list. Token art, live price that ticks, 24h change, market cap and the last trade on every row;
   a band of live launches; filters as open fields, not boxes. */

.qa.mkm > .qhc-trigger { position: absolute; left: -9999px; }
.mkm-hero::before { content: ""; position: absolute; z-index: -1; inset: -60px -30% auto; height: 360px; pointer-events: none; background: radial-gradient(44% 50% at 76% 36%, var(--qa-gold-wash), transparent 70%); }

/* band of live launches */
.mkm-band { position: relative; height: 48px; margin: 22px calc(var(--qa-pad) * -1) 0; overflow: hidden; box-shadow: 0 -1px 0 var(--qa-rule), 0 1px 0 var(--qa-rule); background: var(--qa-glass-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.mkm-band__track { display: flex; width: max-content; height: 100%; animation: mkm-band 60s linear infinite; }
.mkm-band:hover .mkm-band__track, .mkm-band:focus-within .mkm-band__track { animation-play-state: paused; }
@keyframes mkm-band { to { transform: translateX(-33.333%); } }
.mkm-band__item { display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 20px; font-size: 14px; font-weight: 720; white-space: nowrap; box-shadow: 1px 0 0 var(--qa-rule); }
.mkm-band__item:hover { background: var(--qa-wash); }
.mkm-band__coin { width: 24px; height: 24px; font-size: 11px; }
.mkm-band__px { color: var(--qa-tx-2); font-weight: 620; }
.mkm-band__item small { font-size: 12px; font-weight: 560; color: var(--qa-tx-3); }

/* filters on the floor */
.mkm-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "search go" "chain chain"; gap: 0 14px; align-items: end; padding-top: 14px; }
.mkm-f { display: grid; gap: 4px; padding: 10px 0 8px; box-shadow: 0 1px 0 var(--qa-rule); }
.mkm-f:focus-within { box-shadow: 0 2px 0 var(--qa-gold); }
.mkm-f label { font-size: var(--qa-fs-small); font-weight: 600; color: var(--qa-tx-3); }
.mkm-f .qa-select { font-size: 18px; font-weight: 720; padding-right: 20px; }
.mkm-f .qa-select option { color: #111; }
.mkm-f--search { grid-area: search; }
.mkm-f:first-child { grid-area: chain; }
.mkm-go { grid-area: go; margin-bottom: 6px; }
.mkm-hero h1 { font-size: 40px; }
.mkm-hero .mk-hero__acts { margin-top: 16px; }
.mkm-hero .mk-hero__acts .qa-btn { height: 40px; font-size: 14px; }
.mk-card__id h2.is-same { display: none; }
.mk-card .qxo-official, .mk-card .qxo-fake { padding: 0; border: 0; border-radius: 0; background: none; font-size: 12px; font-weight: 680; gap: 6px; }
.mk-card .qxo-official { color: var(--qa-buy); }
.mk-card .qxo-fake { color: var(--qa-warn); }
.mk-card .qxo-official::before, .mk-card .qxo-fake::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mkm-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-top: var(--qa-section-gap); }
.mkm-summary p { font-size: var(--qa-fs-display-s); font-weight: 830; font-stretch: var(--qa-wd-head); letter-spacing: var(--qa-track-head); }
.mkm-summary p:empty { display: none; }
.mkm-summary .qa-link { font-size: 13.5px; }
.mkm-status { margin-top: 8px; font-size: 13.5px; color: var(--qa-tx-3); }
#qm-retry { margin-top: 10px; }

/* the rows */
.mkm-list { margin: 10px calc(var(--qa-pad) * -1) 0; }
.mkm-list[aria-busy="true"] { opacity: .6; }
.mk-card { position: relative; isolation: isolate; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "coin id live" "coin id live"; column-gap: 12px; align-items: center;
  min-height: 72px; padding: 12px var(--qa-pad); box-shadow: 0 1px 0 var(--qa-rule-row); transition: background-color var(--qa-t-quick) var(--qa-ease); }
.mk-card:hover { background: var(--qa-wash); }
.mk-card.is-off { opacity: .6; }
.mk-card__coin { grid-area: coin; width: 44px; height: 44px; font-size: 18px; }
.mk-card__id { grid-area: id; min-width: 0; display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); column-gap: 8px; align-items: baseline; }
.mk-card__id h2 { grid-column: 1 / -1; order: 2; font-size: 12.5px; font-weight: 560; color: var(--qa-tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-card .market-symbol { grid-column: 1 / -1; order: 1; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 16.5px; font-weight: 780; white-space: nowrap; overflow: hidden; }
.mk-card .market-symbol > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mk-card .market-address { overflow: hidden; text-overflow: ellipsis; }
.mk-card .market-chain { order: 3; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--qa-tx-3); white-space: nowrap; }
.mk-card .market-chain img { opacity: .85; }
.mk-card .market-address { order: 4; font-size: 12px; color: var(--qa-tx-3); white-space: nowrap; }
.mk-card .market-address::before { content: "· "; }
.mk-card__live { grid-area: live; display: grid; justify-items: end; gap: 1px; }
.mk-card__px { font-size: 16px; font-weight: 780; white-space: nowrap; }
.mk-card__chg { font-size: 12.5px; font-weight: 720; }
.mk-card__mc, .mk-card__age { display: none; font-size: 13px; color: var(--qa-tx-2); white-space: nowrap; }
.mk-card__px:empty::before { content: "—"; color: var(--qa-tx-3); }
.mk-card__status { display: none; }
.mk-card:not(.has-live) .mk-card__status { display: block; grid-area: live; justify-self: end; font-size: 12.5px; color: var(--qa-tx-3); }
.mk-card:not(.has-live) .mk-card__live { display: none; }
.mk-card__open { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: transparent; font-size: 0; cursor: pointer; }
.mk-card__open:disabled { cursor: not-allowed; }
.mk-card__open:focus-visible { outline: 2px solid var(--qa-gold-hi); outline-offset: -2px; border-radius: 6px; }
.mk-card .qxo-banner { grid-column: 1 / -1; position: relative; z-index: 2; margin-top: 8px; font-size: 13px; color: var(--qa-warn); }
.mk-card .qxo-banner a { color: var(--qa-gold-hi); }
.mk-card .market-symbol > :not(:first-child) { position: relative; z-index: 2; }

.mkm-pages { display: flex; justify-content: space-between; margin-top: 14px; }
.mkm-pages .qa-btn:disabled { opacity: .35; }
.mkm-note { margin-top: 18px; font-size: 13px; color: var(--qa-tx-3); }

/* outside tokens (qx-market-fallback.mjs) */
.mkm-outside { margin-top: var(--qa-section-gap); }
.mkm-outside h2 { font-size: var(--qa-fs-display-s); font-weight: 830; font-stretch: var(--qa-wd-head); letter-spacing: var(--qa-track-head); }
.mkm-outside > p { margin-top: 6px; font-size: 13.5px; color: var(--qa-tx-3); }
.qm-outside-tokens { margin: 10px calc(var(--qa-pad) * -1) 14px; }
.qm-outside-tokens a.qx-live-token { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; gap: 12px; align-items: center; min-height: 52px; padding: 0 var(--qa-pad); box-shadow: 0 1px 0 var(--qa-rule-row); font-size: 14.5px; font-weight: 680; }
.qm-outside-tokens a.qx-live-token:hover { background: var(--qa-wash); }
.qx-live-symbol { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qx-live-price { text-align: right; }
.qx-live-change { text-align: right; font-weight: 720; color: var(--qa-tx-3); }
.qx-live-change[data-direction="1"] { color: var(--qa-buy); }
.qx-live-change[data-direction="-1"] { color: var(--qa-sell); }
.mkm-outside > a, .mkm-outside > button { display: inline-flex; align-items: center; height: 40px; margin-right: 16px; font-weight: 680; color: var(--qa-gold-hi); }

@media (min-width: 1100px) {
  .mkm-band { margin: 34px 0 0; }
  .mkm-filters { grid-template-columns: 260px minmax(0, 1fr) auto; grid-template-areas: "chain search go"; column-gap: 28px; padding-top: 30px; }
  .mkm-hero h1 { font-size: 72px; }
  .mkm-list, .qm-outside-tokens { margin-left: 0; margin-right: 0; }
  .mk-card { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 560px); padding: 12px 6px; min-height: 78px; }
  .mk-card__coin { width: 48px; height: 48px; }
  .mk-card__live { grid-template-columns: 160px 90px 130px 100px; align-items: center; justify-items: end; }
  .mk-card__mc, .mk-card__age { display: block; }
  .qm-outside-tokens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; }
  .qm-outside-tokens a.qx-live-token { padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) { .mkm-band { overflow-x: auto; scrollbar-width: none; } .mkm-band__track { animation: none; } }
