/* Launch on X (/launch/…): its own app inside the Kinepip shell. An X-black app bar with sub-tabs, glassy
   panels with crisp ink borders, mono figures. Uses the site's tokens, so Day and Night both work. */

.lx {
  --lx-ink: #0B0F10;
  --lx-on: #F4FFFC;
  --lx-accent: var(--pip);
  --lx-panel: var(--surface-2);
  --lx-soft: rgb(44 196 174 / 0.12);
  position: relative; z-index: 2; padding: clamp(14px, 2.6vw, 28px) 0 clamp(36px, 5vw, 64px);
}
:root[data-theme="dark"] .lx { --lx-ink: #020607; --lx-soft: rgb(99 224 204 / 0.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lx { --lx-ink: #020607; --lx-soft: rgb(99 224 204 / 0.12); } }
.lx .wrap { display: grid; gap: clamp(16px, 2.4vw, 24px); }
.lx h1, .lx h2 { color: var(--ink); }
.lx code { font-family: var(--mono); font-size: .9em; background: var(--lx-soft); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }

/* ---------- App bar ---------- */
/* The Launch app's own bar, drawn like the rest of Kinepip: a glass card with an ink border and an offset
   shadow, the sub-pages as a segmented pill track (the current one inked, with a seafoam drop), the main action on the right. On phones the track becomes four even icon tabs. */
.lx-bar {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(10px, 1.6vw, 18px);
  background: var(--hero-surface); color: var(--hero-ink); backdrop-filter: blur(16px);
  border: 2.5px solid var(--hero-border); border-radius: 26px; padding: 10px;
  box-shadow: 6px 6px 0 var(--hero-shadow); position: relative; z-index: 3;
}
.lx-mark { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; padding: 2px 6px 2px 2px; border-radius: 18px; }
.lx-mark:focus-visible { outline: 3px solid var(--pip); outline-offset: 2px; }
.lx-mark b { display: block; font-size: 1.08rem; line-height: 1.1; white-space: nowrap; }
.lx-mark small { display: block; font: 700 .7rem var(--mono); color: var(--hero-kicker); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.lx-x { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; background: var(--ink); color: var(--bg); box-shadow: 3px 3px 0 var(--pip); flex: none; transform: rotate(-4deg); transition: transform .2s; }
.lx-mark:hover .lx-x { transform: rotate(3deg) scale(1.04); }
.lx-x svg { width: 22px; height: 22px; }

.lx-tabs {
  justify-self: center; display: flex; gap: 4px; padding: 4px; min-width: 0; max-width: 100%;
  background: var(--bg-2); border: 2px solid var(--ink); border-radius: 999px;
  overflow-x: auto; scrollbar-width: none;
}
.lx-tabs::-webkit-scrollbar { display: none; }
.lx-tabs a {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 15px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s;
}
.lx-tabs a svg { width: 18px; height: 18px; flex: none; }
.lx-tabs a:hover { color: var(--ink); background: var(--surface); }
.lx-tabs a:focus-visible { outline: 3px solid var(--pip); outline-offset: 1px; }
.lx-tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); box-shadow: 2px 2px 0 var(--pip); }
.lx-tab-short { display: none; }

.lx-side { display: flex; align-items: center; gap: 8px; justify-self: end; }
.lx-post-btn svg { width: 17px; height: 17px; }

/* Narrower: the track gets a row of its own under the mark. */
@media (max-width: 1100px) {
  .lx-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .lx-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: space-between; }
  .lx-tabs a { flex: 1 1 0; justify-content: center; }
}
@media (max-width: 640px) {
  .lx-post-btn span { display: none; }
  .lx-post-btn { width: 42px; padding: 0; }
  .lx-tabs { border-radius: 20px; padding: 4px; gap: 2px; }
  .lx-tabs a { flex-direction: column; gap: 2px; min-height: 52px; padding: 4px 2px; border-radius: 16px; font-size: .74rem; }
  .lx-tab-long { display: none; }
  .lx-tab-short { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .lx-x { transition: none; } }

/* ---------- Shared bits ---------- */
.lx-kicker { display: inline-flex; align-items: center; gap: 8px; font: 700 .76rem var(--mono); letter-spacing: .08em; color: var(--pip-ink); text-transform: uppercase; }
.lx-kicker svg { width: 16px; height: 16px; }
.lx-panel {
  background: var(--lx-panel); backdrop-filter: blur(14px); border: 2.5px solid var(--ink); border-radius: 22px;
  padding: clamp(16px, 2.6vw, 24px); box-shadow: 5px 5px 0 var(--ink); min-width: 0; display: grid; gap: 14px; align-content: start;
}
.lx-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lx-panel-head h2 { font-size: 1.3rem; }
.lx-chip { font: 600 .74rem var(--mono); padding: 4px 10px; border-radius: 999px; background: var(--lx-soft); color: var(--pip-ink); border: 1.5px solid var(--line); white-space: nowrap; }
.lx-chip.warn { color: var(--bad); border-color: currentColor; background: transparent; }
.lx-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.lx-cta .btn svg { width: 18px; height: 18px; }
.lx .btn svg { width: 18px; height: 18px; flex: none; }
.lx-empty { color: var(--muted); padding: 10px 2px; }
.lx-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 24px); }
.lx-grid-2 .lx-wide, .lx-dash .lx-wide { grid-column: 1 / -1; }
@media (max-width: 860px) { .lx-grid-2 { grid-template-columns: minmax(0, 1fr); } }
.lx-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 6px 4px; }
.lx-head h1, .lx-hero h1, .lx-connect h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.05; color: var(--hero-ink); text-shadow: 3px 3px 0 var(--hero-title-shadow); margin-top: 6px; }
.lx-head p { color: var(--hero-sub); margin-top: 6px; max-width: 60ch; }
.lx-head > div:first-child { background: var(--hero-surface); border: 2.5px solid var(--hero-border); border-radius: 22px; padding: clamp(16px, 2.6vw, 24px); box-shadow: 5px 5px 0 var(--hero-shadow); backdrop-filter: blur(14px); flex: 1 1 380px; }

/* ---------- Overview ---------- */
.lx-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(16px, 2.6vw, 28px); align-items: stretch; }
.lx-hero-copy { background: var(--hero-surface); border: 2.5px solid var(--hero-border); border-radius: 26px; padding: clamp(20px, 3.4vw, 36px); box-shadow: 7px 7px 0 var(--hero-shadow); backdrop-filter: blur(14px); display: grid; gap: 16px; align-content: center; }
.lx-hero h1 em { font-style: normal; color: var(--pip-ink); }
.lx-hero p { color: var(--hero-sub); font-size: clamp(1rem, 1.8vw, 1.1rem); max-width: 56ch; }
.lx-hero p a { color: var(--pip-ink); font-weight: 600; }
.lx-facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0; }
.lx-facts li { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--lx-soft); min-width: 0; }
.lx-facts b { display: block; font: 700 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lx-facts span { display: block; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
@media (max-width: 960px) { .lx-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .lx-facts { grid-template-columns: minmax(0, 1fr); } }

.lx-feed { display: grid; gap: 14px; align-content: center; }
.lx-tweet { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; background: var(--lx-ink); color: var(--lx-on); border: 2.5px solid var(--lx-ink); border-radius: 20px; padding: 14px 16px; box-shadow: 5px 5px 0 var(--lx-accent); }
.lx-tweet.reply { margin-left: clamp(0px, 4vw, 34px); box-shadow: 5px 5px 0 var(--ink); }
.lx-tweet header { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.lx-tweet header span { color: rgb(244 255 252 / 0.55); font-size: .86rem; }
.lx-tweet p { margin-top: 4px; line-height: 1.45; overflow-wrap: anywhere; }
.lx-at { color: #4CC9F0; }
.lx-av { width: 46px; height: 46px; border-radius: 50%; background: #133f45; display: grid; place-items: center; overflow: hidden; }
.lx-av.bot { background: var(--lx-accent); }
.lx-av svg { width: 120%; height: 120%; }
.lx-caret { display: inline-block; width: 2px; height: 1.05em; background: var(--lx-accent); vertical-align: -2px; margin-left: 2px; animation: lx-blink 1s steps(1) infinite; }
@keyframes lx-blink { 50% { opacity: 0; } }
.lx-tweet-img { margin-top: 10px; border-radius: 14px; border: 1px solid rgb(255 255 255 / 0.14); background: radial-gradient(circle at 50% 40%, #1f6f70, #082a2e); height: 150px; display: grid; place-items: center; overflow: hidden; }
.lx-tweet-img svg { height: 130%; width: auto; }
.lx-linkcard { margin-top: 10px; border: 1px solid rgb(255 255 255 / 0.18); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; }
.lx-linkcard span { font-size: .8rem; color: rgb(244 255 252 / 0.55); }
@media (prefers-reduced-motion: reduce) { .lx-caret { animation: none; } }

.lx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 2.5px solid var(--ink); border-radius: 20px; overflow: hidden; background: var(--lx-panel); backdrop-filter: blur(12px); box-shadow: 5px 5px 0 var(--ink); }
.lx-stats > div { padding: 14px 16px; border-right: 1.5px solid var(--line); min-width: 0; }
.lx-stats > div:last-child { border-right: 0; }
.lx-stats span { display: block; font: 700 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lx-stats b { display: block; font: 600 clamp(1.05rem, 2vw, 1.3rem) var(--mono); margin-top: 6px; overflow-wrap: anywhere; }
.lx-stats small { display: block; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
@media (max-width: 760px) { .lx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lx-stats > div:nth-child(2) { border-right: 0; } .lx-stats > div:nth-child(-n+2) { border-bottom: 1.5px solid var(--line); } }

/* ---------- Forms ---------- */
.lx-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lx-form.one { grid-template-columns: minmax(0, 1fr); }
.lx-form label, .lx-form fieldset { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.lx-form .wide, .lx-form fieldset { grid-column: 1 / -1; }
.lx-form label > span, .lx-form legend { font-weight: 600; font-size: .9rem; padding: 0; }
.lx-form small { color: var(--muted); font-weight: 500; }
.lx-form input, .lx-tools input, .lx-tools select {
  width: 100%; min-height: 46px; border: 2px solid var(--ink); border-radius: 14px; background: var(--bg); color: var(--ink);
  padding: 0 14px; font: 500 1rem var(--display);
}
.lx-form input:focus-visible, .lx-tools input:focus-visible, .lx-tools select:focus-visible { outline: 3px solid var(--pip); outline-offset: 2px; }
.lx-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.lx-seg button { min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--bg); color: var(--ink); font: 600 .92rem var(--display); cursor: pointer; }
.lx-seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: 2px 2px 0 var(--pip); }
.lx-post { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 500 1.02rem/1.5 var(--display); background: var(--lx-ink); color: var(--lx-on); border-radius: 16px; padding: 16px; min-height: 96px; border: 2px solid var(--lx-ink); }
.lx-post .lx-at { color: #4CC9F0; }
.lx-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; color: var(--ink); }
.lx-steps li::marker { font-weight: 700; color: var(--pip-ink); }
.lx-bullets { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
@media (max-width: 520px) { .lx-form { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Token cards ---------- */
.lx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.lx-card { display: grid; gap: 10px; border: 2px solid var(--ink); border-radius: 18px; padding: 14px; background: var(--bg); color: var(--ink); text-decoration: none; min-width: 0; transition: transform .12s, box-shadow .12s; box-shadow: 3px 3px 0 var(--ink); }
.lx-card:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--pip); }
.lx-card.hl { outline: 3px solid var(--pip); outline-offset: 3px; }
.lx-card-top { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; }
.lx-card img, .lx-noimg { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; border: 1.5px solid var(--line); background: var(--lx-soft); display: grid; place-items: center; font-weight: 700; }
.lx-card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-card small { color: var(--muted); font-size: .82rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.lx-card dt { font: 700 .64rem var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.lx-card dd { margin: 0; font: 600 .9rem var(--mono); overflow-wrap: anywhere; }
.lx-bar-progress { height: 6px; border-radius: 999px; background: var(--lx-soft); overflow: hidden; }
.lx-bar-progress i { display: block; height: 100%; background: var(--pip); border-radius: inherit; }
.lx-card-links { display: flex; flex-wrap: wrap; gap: 6px; }
.lx-card-links a { font: 600 .78rem var(--mono); padding: 4px 9px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--pip-ink); text-decoration: none; }
.lx-card-links a:hover { border-color: var(--ink); }
.lx-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lx-tags span { font: 600 .7rem var(--mono); padding: 2px 8px; border-radius: 999px; background: var(--lx-soft); color: var(--pip-ink); }
.lx-tools { display: flex; gap: 10px; flex-wrap: wrap; flex: 1 1 320px; justify-content: flex-end; }
.lx-tools input { flex: 1 1 220px; width: auto; }
.lx-tools select { flex: 0 0 auto; width: auto; }

/* ---------- Dashboard ---------- */
.lx-banner { border: 2.5px dashed var(--pip-ink); border-radius: 18px; padding: 12px 16px; background: var(--surface); backdrop-filter: blur(12px); font-weight: 600; }
.lx-banner.warn { border-color: var(--bad); color: var(--bad); }
.lx-connect { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); align-items: center; background: var(--hero-surface); border: 2.5px solid var(--hero-border); border-radius: 26px; padding: clamp(20px, 4vw, 44px); box-shadow: 7px 7px 0 var(--hero-shadow); backdrop-filter: blur(14px); }
.lx-connect > div:last-child { display: grid; gap: 14px; justify-items: start; }
.lx-connect p { color: var(--hero-sub); max-width: 58ch; }
.lx-connect-art { background: var(--lx-ink); border-radius: 26px; aspect-ratio: 1; display: grid; place-items: center; box-shadow: 5px 5px 0 var(--pip); overflow: hidden; }
.lx-connect-art svg { width: 82%; height: auto; }
@media (max-width: 640px) { .lx-connect { grid-template-columns: minmax(0, 1fr); } .lx-connect-art { max-width: 140px; } }

.lx-dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 24px); }
@media (max-width: 860px) { .lx-dash { grid-template-columns: minmax(0, 1fr); } }
.lx-profile { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; }
.lx-profile img { width: 64px; height: 64px; border-radius: 50%; border: 2.5px solid var(--ink); object-fit: cover; background: var(--lx-soft); }
.lx-profile h1 { font-size: clamp(1.3rem, 3vw, 1.7rem); overflow-wrap: anywhere; }
@media (max-width: 420px) { .lx-profile { grid-template-columns: 52px minmax(0, 1fr); } .lx-profile .btn { grid-column: 1 / -1; } }
.lx-wallet { grid-row: span 2; }
.lx-balance { background: var(--lx-ink); color: var(--lx-on); border-radius: 18px; padding: 16px 18px; display: grid; gap: 2px; box-shadow: 4px 4px 0 var(--pip); }
.lx-balance span { font: 700 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--lx-accent); }
.lx-balance b { font: 600 clamp(1.6rem, 4vw, 2.3rem) var(--mono); overflow-wrap: anywhere; }
.lx-balance small { color: rgb(244 255 252 / 0.6); font-family: var(--mono); }
.lx-addr { display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 14px; padding: 8px 8px 8px 12px; background: var(--bg); }
.lx-addr code { flex: 1; background: none; padding: 0; font-size: .92rem; }
.lx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lx-list li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); }
.lx-list.plain li { background: transparent; }
.lx-list li span { color: var(--muted); }
.lx-table-wrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 14px; }
.lx-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.lx-table th, .lx-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lx-table th { font: 700 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--lx-soft); }
.lx-table tr:last-child td { border-bottom: 0; }
.lx-table td .lx-tok { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.lx-table td img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.lx-table.cmds td:first-child { width: 38%; }
.lx-table.cmds td:first-child code { white-space: normal; }
.lx-danger { border-style: dashed; }
.lx-key { display: block; padding: 12px; border-radius: 12px; border: 2px solid var(--bad); color: var(--bad); word-break: break-all; }

/* Panels set display:grid; keep the hidden attribute authoritative. */
.lx [hidden] { display: none !important; }
