/* ==========================================================================
   Features: notable launches (notable.js), share actions (share.js) and the
   watchlist page (watchlist.js / watchlist.html). Builds on app.css and uses
   only its tokens; colour comes from rank dots ([data-tier] → --c) and coin
   images, nothing else. Text never below 12px. Every class here is scoped to
   .ntb*, .shr*, .wl*; no shared class from app.css is changed.
   Motion: 420 ms fades with --ease; prefers-reduced-motion is handled by app.css.
   ========================================================================== */

/* ---------- 1. notable launches: .ntb (notable.js mountNotable) ----------
   <div class="ntb" style="--ntb-max:4"><ul class="ntb-l"><li class="ntb-i" data-tier>
   <a><i class="dot"></i><span class="ntb-t">Legend dev listed <b>$X</b></span><span class="ntb-a">2m</span></a> */
.ntb { --ntb-h: 34px; min-width: 0; }
.ntb-l { list-style: none; margin: 0; padding: 0; height: calc(var(--ntb-max, 4) * var(--ntb-h)); overflow: hidden; }
.ntb.fit .ntb-l { height: auto; }
.ntb-i, .ntb-e { height: var(--ntb-h); overflow: hidden; }
.ntb-i { animation: ntbIn 0.42s var(--ease) both; }
.ntb-i.out, .ntb-e.out { animation: ntbOut 0.42s var(--ease) both; pointer-events: none; }
@keyframes ntbIn { from { height: 0; opacity: 0; transform: translateY(-6px); } }
@keyframes ntbOut { to { height: 0; opacity: 0; } }
.ntb-i a {
  display: flex; align-items: center; gap: 10px; height: 100%; min-width: 0;
  color: var(--mute); font-size: 14px; transition: color 0.2s;
}
.ntb-i a:hover { color: var(--text); }
.ntb-i a:focus-visible { outline-offset: -2px; }
.ntb-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntb-t b { color: var(--text); font-weight: 600; }
.ntb-a { flex: none; color: var(--dim); font: 12px var(--mono); font-variant-numeric: tabular-nums; }
.ntb-e { display: flex; align-items: center; color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 2. share actions: .shr (share.js shareActions) ----------
   <div class="shr"><a class="btn ghost sm shr-x"> <button class="btn ghost sm shr-copy"> <button class="btn ghost sm shr-native"> */
.shr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.shr .btn svg { width: 15px; height: 15px; flex: none; }
.shr .shr-x svg { width: 13px; height: 13px; }
.shr .shr-native { width: 32px; padding: 0; }
.shr .shr-copy.done { border-color: var(--mute); }
.shr .shr-l { white-space: nowrap; }

/* ---------- 3. watchlist: .wl (watchlist.js mountWatchlist) + page head ---------- */
.wl-head { padding: 64px 0 40px; }
.wl-head .lede { max-width: 560px; }

.wl-sec { margin: 0 0 48px; }
.wl-bar { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; }
.wl-bar h2 { display: flex; align-items: baseline; gap: 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.wl-ct { font: 500 15px var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.wl-note { color: var(--mute); font-size: 14px; }

.wl-list { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }

/* row: dev | rank | record | last launch | actions (hidden rows have no last launch) */
.wl-row {
  display: grid; grid-template-columns: minmax(0, 230px) 150px minmax(0, 1fr) minmax(0, 190px) 150px;
  align-items: center; gap: 20px; min-height: 68px; padding: 12px 16px 12px 20px;
  border-bottom: 1px solid var(--row-line); transition: background 0.2s;
  animation: wlIn 0.42s var(--ease) both; animation-delay: calc(min(var(--i, 0), 12) * 40ms);
}
/* hidden rows keep the same columns (both lists line up); the record takes the last-launch slot */
.wl-row.hid .wl-rec { grid-column: 3 / span 2; }
.wl-row.hid .wl-acts { grid-column: 5; }
.wl-row:last-child { border-bottom: 0; }
.wl-row:hover { background: var(--raise); }
.wl-row.out { animation: wlOut 0.42s var(--ease) both; overflow: hidden; pointer-events: none; }
@keyframes wlIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes wlOut { to { opacity: 0; height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0; } }

.wl-dev { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wl-glyph { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--r); background: var(--raise); color: var(--mute); }
.wl-row:hover .wl-glyph { background: var(--line); }
.wl-glyph svg { width: 16px; height: 16px; }
.wl-id { min-width: 0; }
.wl-id b { display: block; font: 500 14px var(--mono); color: var(--text); white-space: nowrap; }
.wl-id small { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.wl-dev:hover b { text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; }

.wl-rank { min-width: 0; }
.wl-na { color: var(--mute); font-weight: 500; }
.wl-na .dot { background: var(--dim); }
.wl-rec { min-width: 0; color: var(--mute); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wl-coin { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wl-coin .av.sm { width: 30px; height: 30px; }
.wl-coin-t { min-width: 0; display: block; }
.wl-coin-t b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-coin-t small, .wl-coin.none small { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; }
.wl-coin.none { flex-direction: column; align-items: flex-start; gap: 2px; }
a.wl-coin:hover b { text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; }
.wl-coin .skel { display: block; }
.wl-coin .skel-av {
  background: linear-gradient(90deg, var(--row-line) 0%, var(--line-2) 40%, var(--row-line) 80%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}

.wl-acts { display: flex; justify-content: flex-end; gap: 6px; }

.wl-empty { padding: 44px 24px; text-align: center; color: var(--mute); font-size: 14px; }
.wl-empty b { display: block; color: var(--text); font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.wl-empty p { max-width: 460px; margin: 0 auto; }
.wl-empty .btn { margin-top: 18px; }

/* tablets: the record sits under the rank */
@media (max-width: 1100px) and (min-width: 761px) {
  .wl-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 170px) 150px; gap: 2px 18px; }
  .wl-dev { grid-column: 1; grid-row: 1 / span 2; }
  .wl-rank { grid-column: 2; grid-row: 1; align-self: end; }
  .wl-rec { grid-column: 2; grid-row: 2; align-self: start; font-size: 13px; }
  .wl-last { grid-column: 3; grid-row: 1 / span 2; }
  .wl-acts { grid-column: 4; grid-row: 1 / span 2; }
  .wl-row.hid .wl-rec { grid-column: 2 / span 2; }
  .wl-row.hid .wl-acts { grid-column: 4; }
}

@media (max-width: 760px) {
  .ntb { --ntb-h: 32px; }
  .ntb-i a { font-size: 13px; gap: 9px; }

  .shr .btn.sm { height: 36px; }
  .shr .shr-native { width: 36px; }

  .wl-head { padding: 36px 0 28px; }
  .wl-sec { margin-bottom: 36px; }
  .wl-bar h2 { font-size: 20px; }
  .wl-note { font-size: 13px; }
  .wl-list { margin: 0 calc(-1 * var(--gutter) + 6px); }
  /* dev + actions on top; rank and last launch under the address; the record line last */
  .wl-row, .wl-row.hid { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 14px 12px 15px 14px; }
  .wl-dev { grid-column: 1; grid-row: 1; }
  .wl-acts { grid-column: 2; grid-row: 1; }
  .wl-rank { grid-column: 1; grid-row: 2; padding-left: 48px; }
  .wl-last { grid-column: 2; grid-row: 2; justify-self: end; min-width: 0; max-width: 160px; }
  .wl-rec, .wl-row.hid .wl-rec { grid-column: 1 / -1; grid-row: 3; padding-left: 48px; margin-top: -4px; font-size: 13px; white-space: normal; }
  .wl-row.hid .wl-acts { grid-column: 2; }
  .wl-acts .btn.sm { height: 34px; padding: 0 11px; }
  .wl-empty { padding: 36px 20px; }
}
/* app.css drops .lede on small phones; here it carries a fact (the list lives in this browser) */
@media (max-width: 400px) {
  .wl-head .lede { display: block; font-size: var(--fs-15); margin-top: 14px; }
}

/* home hero: the notable list sits under the stats (desktop) or after them once the hero stacks */
.hero-notable { margin-top: 28px; }
@media (max-width: 960px) {
  .hero-notable { order: 6; margin-top: 20px; }
}
@media (max-width: 760px) {
  .hero-notable { margin-top: 14px; }
}
