/* LurkChain Discover pages: Top Tokens, Daily Movers, Crowd Tokens, Launch Radar, Perps Pulse, Chains.
   Builds on lc.css tokens and components; everything here is prefixed d- so it never collides with the shared sheet. */

/* ---------- section heads inside a page ---------- */
.d-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 32px var(--gutter) 14px; }
.d-hd h2 { font-size: 18px; line-height: 24px; font-weight: 500; letter-spacing: -0.0025em; }
.d-hd p { font-size: 14px; line-height: 20px; color: var(--ink-2); margin-top: 4px; }
.d-hd .micro { color: var(--ink-3); }
.d-sec-title { font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -0.02em; }

/* the KPI row's secondary line */
.kpi dd small { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: -0.0125em; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.kpi dd .skel { width: 60%; height: 20px; vertical-align: middle; }

/* ---------- toolbars ---------- */
.d-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.d-sep { width: 1px; height: 22px; background: var(--line-2); flex: none; }
.chip .d-cnt { font-size: 12px; color: var(--ink-3); }
.chip[aria-selected="true"] .d-cnt { color: #6b6b6b; }
.d-search { width: 260px; max-width: 100%; }
.d-search svg { color: var(--ink-3); flex: none; }
.d-search input::placeholder { color: var(--ink-3); }

/* ---------- tables ---------- */
.d-wrap { padding: 0 var(--gutter); }
.d-tbl th, .d-tbl td { padding-left: 10px; padding-right: 10px; }
.d-tbl th:first-child, .d-tbl td:first-child { padding-left: 0; }
.d-tbl th:last-child, .d-tbl td:last-child { padding-right: 0; }
.d-tbl td { height: 56px; }
.d-tbl tbody tr[data-href] { cursor: pointer; }
.d-tbl .rk { width: 32px; color: var(--ink-3); font-size: 13px; }
.d-tbl .tok b { max-width: 150px; }
.d-tbl .tok small { max-width: 170px; }
.d-tl { display: inline-flex; max-width: 100%; }
.d-tl:hover b { text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 3px; }
.d-tbl th button { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 14.5px; color: var(--ink-2); }
.d-tbl th button:hover, .d-tbl th[aria-sort] button { color: var(--ink); }
.d-tbl th button svg { width: 11px; height: 11px; opacity: 0; transition: transform .15s var(--ease), opacity .15s; }
.d-tbl th[aria-sort] button svg { opacity: 1; }
.d-tbl th[aria-sort="ascending"] button svg { transform: rotate(180deg); }
.d-tbl .r button { flex-direction: row-reverse; }
.d-coin { display: inline-flex; align-items: baseline; gap: 8px; }
.d-coin b { font-weight: 500; }
.d-coin small { font-size: 12px; color: var(--ink-3); }

/* buys against sells: a small two-colour bar with counts */
.d-split { display: inline-flex; flex-direction: column; gap: 6px; width: 104px; vertical-align: middle; }
.d-split .bar { display: flex; gap: 2px; height: 4px; }
.d-split .bar i { display: block; height: 100%; border-radius: 2px; min-width: 2px; }
.d-split .bar i:first-child { background: var(--up); }
.d-split .bar i:last-child { background: var(--down); }
.d-split .cnt { display: flex; justify-content: space-between; font-size: 12px; line-height: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* neutral outline badge (first hour, sample rows) */
.d-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-left: 8px; border-radius: 999px; border: 1px solid var(--line-3); font-size: 11px; line-height: 14px; color: var(--ink); white-space: nowrap; vertical-align: 1px; }
.d-age { white-space: nowrap; }
.d-tbl .d-agec { width: 168px; white-space: nowrap; }

.d-more { display: flex; justify-content: center; padding: 20px var(--gutter) 28px; }
.d-more[hidden] { display: none; }
.d-empty { padding: 40px 0; text-align: center; color: var(--ink-2); font-size: 14px; }

/* ---------- daily movers: two ranked lists ---------- */
.d-movers { display: grid; grid-template-columns: 1fr 1fr; }
.d-movers > * + * { border-left: 1px solid var(--line); }
.d-list-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px var(--gutter) 14px; }
.d-list-hd h2 { font-size: 18px; line-height: 24px; font-weight: 500; }
.d-list-hd span { font-size: 12px; color: var(--ink-3); }
.d-list li > a, .d-list li > .d-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px var(--gutter); border-top: 1px solid var(--line); transition: background-color .12s; }
.d-list li > a:hover { background: rgba(255, 255, 255, .025); }
.d-list .rk { font-size: 13px; color: var(--ink-3); }
.d-chg { display: grid; justify-items: end; gap: 5px; min-width: 96px; }
.d-chg b { font-size: 16px; line-height: 20px; font-weight: 500; }
.d-chg small { font-size: 12px; line-height: 14px; color: var(--ink-3); }
.d-mag { display: block; width: 96px; height: 3px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.d-mag i { display: block; height: 100%; border-radius: 2px; }
.d-mag i.up { background: var(--up); margin-left: auto; }
.d-mag i.down { background: var(--down); margin-left: auto; }
.d-list .d-empty { border-top: 1px solid var(--line); }

/* dark dashboard panel holding a table */
.d-panel { margin: 0 var(--gutter); padding: 6px 20px; background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.d-panel .d-tbl td { height: 52px; }
.d-panel-sec { padding-bottom: 40px; }

/* ---------- crowd tokens: card grid with rules ---------- */
.d-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.d-card { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 24px var(--gutter); border-bottom: 1px solid var(--line); }
.d-card:not(:nth-child(3n + 1)) { border-left: 1px solid var(--line); }
.d-card-hd { display: flex; align-items: center; gap: 12px; min-width: 0; }
.d-ic { position: relative; flex: none; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--panel-3); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.d-ic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-nm { min-width: 0; flex: 1; }
.d-nm b { display: block; font-size: 16px; line-height: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-nm small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-card-hd .tag { flex: none; }
.d-desc { font-size: 14px; line-height: 20px; color: var(--ink-2); min-height: 60px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.d-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.d-stats dt { font-size: 12px; line-height: 14.5px; color: var(--ink-3); }
.d-stats dd { margin-top: 4px; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-card-ft { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.d-card-ft .tag svg { width: 13px; height: 13px; }
.d-card-ft .link-arrow { font-size: 14px; }
.d-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; line-height: 16px; }
.d-links a { color: var(--ink-3); transition: color .15s; }
.d-links a:hover { color: var(--ink); }
.d-card .skel { display: block; }

/* ---------- perps: open-interest bars ---------- */
.d-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; padding: 0 var(--gutter) 8px; }
.d-bar { display: grid; grid-template-columns: 64px minmax(0, 1fr) 76px 48px; align-items: center; gap: 12px; height: 40px; border-top: 1px solid var(--line); font-size: 14px; }
.d-bar b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-bar .trk { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.d-bar .trk i { display: block; height: 100%; border-radius: 3px; background: var(--ink); }
.d-bar .v { text-align: right; font-variant-numeric: tabular-nums; }
.d-bar .s { text-align: right; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- chains: sticky index + sections ---------- */
.d-chains { display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.d-index-col { border-right: 1px solid var(--line); }
.d-index { position: sticky; top: calc(var(--header-h) + var(--banner-h) + 8px); padding: 32px var(--gutter) 32px; }
.d-index h4 { font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-3); margin-bottom: 6px; }
.d-index h4 + ul + h4 { margin-top: 22px; }
.d-index a { display: flex; align-items: center; height: 32px; padding: 0 10px; margin: 0 -10px; border-radius: 7px; font-size: 14px; color: var(--ink-2); transition: color .15s, background-color .15s; }
.d-index a:hover { color: var(--ink); background: rgba(255, 255, 255, .04); }
.d-index a[aria-current="true"] { color: var(--ink); background: var(--panel-2); }
.d-jump { display: none; }
.d-chain { padding: 56px var(--gutter); border-bottom: 1px solid var(--line); }
.d-chain:last-child { border-bottom: 0; }
.d-chain-k { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 14px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.d-chain-k .tag { flex: none; white-space: nowrap; }
.d-chain .lead { margin-top: 14px; max-width: 640px; }
.d-cover { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin-top: 28px; }
.d-cover li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.d-cover li b { display: block; margin-bottom: 2px; font-weight: 500; color: var(--ink); }
.d-live { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 28px; padding: 14px 16px; min-height: 62px; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.d-live-k { font-size: 12px; color: var(--ink-3); flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.d-live .tok b { max-width: 180px; }
.d-live-v { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.d-live-v span.faint { font-size: 12px; }
.d-live .link-arrow { font-size: 14px; margin-left: auto; }
.d-live p { color: var(--ink-2); }
.d-live p b { color: var(--ink); font-weight: 500; }
.d-sources-intro { padding: 56px var(--gutter) 0; }
.d-src { padding: 36px var(--gutter) 40px; border-bottom: 1px solid var(--line); }
.d-src h3 { font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -0.015em; }
.d-src .body { margin-top: 8px; max-width: 640px; }
.d-src .d-live { margin-top: 20px; }
.d-src:last-child { border-bottom: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .d-hm { display: none; }
  .d-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-card:not(:nth-child(3n + 1)) { border-left: 0; }
  .d-card:nth-child(2n) { border-left: 1px solid var(--line); }
  .d-chains { grid-template-columns: minmax(0, 1fr); }
  .d-index-col { display: none; }
  .d-jump { display: flex; }
  .d-bars { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .d-movers { grid-template-columns: minmax(0, 1fr); }
  .d-movers > * + * { border-left: 0; border-top: 1px solid var(--line); }
  .d-cover { grid-template-columns: minmax(0, 1fr); }
  .d-chain { padding: 44px var(--gutter); }
  .d-sec-title { font-size: 28px; line-height: 34px; }
  .toolbar .chips.d-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); max-width: calc(100% + 2 * var(--gutter)); flex: 1 1 100%; }
  .toolbar .chips.d-scroll::-webkit-scrollbar { display: none; }
  .toolbar .chips.d-scroll .chip { flex: none; }
  .d-search { width: 100%; }
  .d-panel { padding: 4px 14px; }
}
@media (max-width: 600px) {
  .d-hs { display: none; }
  .d-cards { grid-template-columns: minmax(0, 1fr); }
  .d-card:nth-child(2n) { border-left: 0; }
  .d-tbl th, .d-tbl td { padding-left: 6px; padding-right: 6px; }
  .d-tbl .tok { gap: 8px; }
  .d-tbl .tok b { max-width: 92px; }
  .d-tbl .tok small { max-width: 100px; }
  .d-tbl .d-agec { width: auto; }
  .d-tbl .d-agec .d-badge { display: flex; width: max-content; margin: 4px 0 0; }
  .d-desc { min-height: 0; }
  .d-bar { grid-template-columns: 52px minmax(0, 1fr) 70px 40px; gap: 10px; }
  .d-live .link-arrow { margin-left: 0; }
  .d-chg { min-width: 76px; }
  .d-mag { width: 76px; }
}
