/* Launchpads section of the Market tab. Every colour is a token of app.css,
   so both themes work. Tokens added after the first theme carry a fallback. */

.lp {
  --lp-up: var(--up, var(--volt));
  --lp-track: var(--hair, var(--line));
  --lp-hatch: var(--sheen, var(--line));
  min-width: 0;
}
.lp .lp-h4 { margin: 20px 0 4px; font-size: var(--t-small); font-weight: 500; color: var(--ink); }

/* ---------- ranked lines ---------- */
.lp-rank { display: grid; }
.lp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 96px; grid-template-areas: "name num vs" "bar bar trend"; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.lp-rank .lp-row:last-child { border-bottom: 0; }
.lp-name { grid-area: name; display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 0 8px; align-items: center; min-width: 0; }
.lp-name i { width: 9px; height: 9px; border-radius: 50%; }
.lp-name b { color: var(--ink); font-weight: 500; font-size: var(--t-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-name span { grid-column: 2; font-size: var(--t-label); color: var(--dim); }
.lp-bar { grid-area: bar; position: relative; height: 10px; background: var(--lp-track); border-radius: var(--pill); }
.lp-bar i { display: block; height: 100%; border-radius: var(--pill); }
.lp-bar u, .lp-tick { position: absolute; top: -4px; width: 2px; height: 18px; margin-left: -1px; background: var(--ink); border-radius: 1px; text-decoration: none; }
.legend .lp-tick { position: static; display: inline-block; height: 12px; margin: 0 2px 0 0; }
.lp-trend { grid-area: trend; justify-self: end; width: 64px; height: 18px; }
.lp-trend svg { display: block; width: 64px; height: 18px; overflow: visible; }
.lp-key { width: 22px; height: 10px; flex: none; color: var(--dim); }
.lp-num { display: grid; gap: 1px; min-width: 0; text-align: right; }
.lp-num b { color: var(--ink); font-weight: 500; font-size: var(--t-base); white-space: nowrap; }
.lp-num b.up { color: var(--lp-up); }
.lp-num b.dn { color: var(--down); }
.lp-num span { font-size: var(--t-label); color: var(--faint); white-space: nowrap; }
.lp-row > .lp-num.a { grid-area: num; }
.lp-row > .lp-num.b { grid-area: vs; min-width: 0; }
.lp-row.now { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "name top" "bar bar" "num vs"; }
.lp-row.now > .lp-num { text-align: left; }
.lp-row.now > .lp-num.b { min-width: 0; }
.lp-row.now .cr-top { grid-area: top; justify-self: end; max-width: 100%; }

/* ---------- graduations per hour ---------- */
.lp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-bottom: 16px; }
.lp-kpi { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: var(--bg); min-width: 0; display: grid; gap: 2px; align-content: start; }
.lp-kpi b { color: var(--ink); font-weight: 500; font-size: clamp(20px, 5.4vw, 26px); letter-spacing: -.02em; line-height: 1.15; }
.lp-kpi span { font-size: var(--t-label); color: var(--dim); line-height: 1.3; }
.lp-cols { position: relative; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; height: 120px; padding-top: 18px; border-top: 1px dashed var(--line-2); }
.lp-top { position: absolute; left: 0; top: 2px; font-size: var(--t-label); color: var(--faint); }
.lp-col { display: flex; align-items: flex-end; min-width: 0; height: 100%; border-radius: 3px; }
.lp-col i { display: block; width: 100%; border-radius: 3px 3px 0 0; min-height: 0; }
.lp-col.running i { opacity: .45; }
.lp-col.none { background: repeating-linear-gradient(135deg, var(--lp-hatch) 0 3px, transparent 3px 6px); }
.lp-ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--t-label); color: var(--faint); }

/* ---------- one hour later ---------- */
.lp-out { display: grid; gap: 6px; margin-top: 12px; }
.lp-out-name { display: grid; gap: 1px; }
.lp-out-name b { color: var(--text); font-weight: 500; font-size: var(--t-body); }
.lp-out-name span { font-size: var(--t-label); color: var(--dim); }
.lp-stack { display: flex; height: 24px; border-radius: 6px; overflow: hidden; background: var(--lp-track); }
.lp-stack i { display: grid; place-items: center; min-width: 0; font-style: normal; font-size: var(--t-label); font-weight: 600; white-space: nowrap; overflow: hidden; border-right: 1px solid var(--card); }
.lp-stack i:last-child { border-right: 0; }

/* ---------- graduated and still trading ---------- */
.lp-mix { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.lp-mix-k { font-size: var(--t-label); color: var(--dim); flex-basis: 100%; }
.lp-mix .tag { font-weight: 500; }
.lp-mix .tag b { color: var(--ink); font-weight: 600; margin-left: 3px; }
.lp-grads { display: grid; }
.lp-grad { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-areas: "ico name since" "ico vol liq"; gap: 4px 12px; align-items: center; text-align: left; width: 100%; padding: 11px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.lp-grad:last-child { border-bottom: 0; }
.lp-grad:hover .lp-g-name b, .lp-grad:focus-visible .lp-g-name b { text-decoration: underline; text-underline-offset: 3px; }
.lp-grad .ico { grid-area: ico; grid-row: auto; align-self: start; }
.lp-g-name { grid-area: name; display: grid; gap: 1px; min-width: 0; }
.lp-g-name b { color: var(--ink); font-weight: 600; font-size: var(--t-lead); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-g-name > .dotline { font-size: var(--t-small); color: var(--dim); }
.lp-g-num { display: flex; gap: 5px; align-items: baseline; min-width: 0; white-space: nowrap; font-size: var(--t-small); color: var(--dim); }
.lp-g-num b { color: var(--text); font-weight: 500; }
.lp-g-num b.up { color: var(--lp-up); }
.lp-g-num b.dn { color: var(--down); }
.lp-g-num.since { grid-area: since; display: grid; gap: 1px; text-align: right; }
.lp-g-num.since b { font-size: var(--t-lead); }
.lp-g-num.since span { font-size: var(--t-label); color: var(--faint); }
.lp-g-num.vol { grid-area: vol; }
.lp-g-num.liq { grid-area: liq; justify-self: end; }

/* ---------- narrow ---------- */
/* On a phone the name has a line of its own: it is read whole, and the line under it does not break. */
@container (max-width: 400px) {
  .lp-row { grid-template-columns: minmax(0, 1fr) 96px; grid-template-areas: "name name" "num vs" "bar trend"; }
  .lp-row > .lp-num.a { text-align: left; }
  .lp-row.now { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "name name" "top top" "bar bar" "num vs"; }
  .lp-row.now .cr-top { justify-self: start; }
}

/* A narrow phone has no room for the volume and the liquidity of a graduate side by side. */
@container (max-width: 345px) {
  .lp-grad { grid-template-areas: "ico name since" "ico vol vol" "ico liq liq"; }
  .lp-g-num.liq { justify-self: start; }
}

/* ---------- wide ---------- */
@container (min-width: 760px) {
  /* Fixed widths, so the bars of every line start and end at the same place. */
  .lp-row { grid-template-columns: 220px minmax(120px, 1fr) 64px 96px 128px; grid-template-areas: "name bar trend num vs"; gap: 16px; padding: 11px 0; }
  /* 706px at its least, inside the 726px a card holds when the screen of the market is 760px wide. */
  .lp-row.now { grid-template-columns: 200px minmax(100px, 1fr) 96px 96px 150px; grid-template-areas: "name bar num vs top"; }
  .lp-row.now > .lp-num { text-align: right; }
  .lp-row.now .cr-top b { max-width: 84px; }
  .lp-kpis { grid-template-columns: repeat(auto-fit, minmax(92px, 220px)); }
  .lp-cols { height: 150px; gap: 4px; }
  .lp-grad { grid-template-columns: 38px minmax(0, 1fr) 130px 150px 120px; grid-template-areas: "ico name since vol liq"; gap: 16px; }
  .lp-g-num.vol, .lp-g-num.liq { display: grid; gap: 1px; text-align: right; justify-self: end; }
  .lp-g-num.vol b, .lp-g-num.liq b { font-size: var(--t-base); color: var(--ink); }
  .lp-g-num.vol span, .lp-g-num.liq span { font-size: var(--t-label); color: var(--faint); }
}
