/* ==========================================================================
   VIEW — app.css
   Every component the shell and the five pages draw, against tokens.css.

   Layout rules of the house:
     - a fixed left rail holds the destinations; the main column gets a slim
       sticky top bar, and the page inside it is a centred column
     - actions are pills, surfaces are rounded rectangles
     - figures, mints, handles and signatures are mono
     - a value the site does not know renders as an em dash (the formatter's
       job); nothing here invents a zero
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

::selection { background: rgba(255, 255, 255, 0.9); color: #09090b; }

.mono { font-family: var(--mono); font-variant-ligatures: none; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }

.ico { vertical-align: -0.16em; flex: none; }

/* --------------------------------------------------------------------------
   Shell — left rail + main column
   --------------------------------------------------------------------------
   usepaid.app's shape, in VIEW's palette: a fixed left rail holds the mark and
   the destinations, the main column gets a slim sticky top bar with the tagline,
   the Launch pill and the wallet. Under 1000px the rail becomes a slide-over
   behind a scrim, because a permanent rail on a phone is a rail nobody can read
   around. */

.shell {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
}

.shell-main { min-width: 0; display: flex; flex-direction: column; }

.side {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 14px 16px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  scrollbar-width: none;
}
.side::-webkit-scrollbar { display: none; }

.side-brand { padding: 2px 8px 16px; }

.side-nav { display: flex; flex-direction: column; gap: 3px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: var(--fs-md);
  font-weight: 600;
  transition: color .15s, background .15s, border-color .15s;
}
.nav-link:hover { color: var(--ink); background: var(--panel-2); }
.nav-link.on {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.nav-link.on:hover { background: #e6e6e6; }
.nav-ic { display: grid; place-items: center; width: 20px; flex: none; }
.nav-tx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 18px; }

.side-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: background .15s, border-color .15s;
}
.side-cta:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--accent); }

.side-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.side-row { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.side-k {
  color: var(--dim);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.side-v { color: var(--ink-2); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-note { color: var(--faint); font-size: var(--fs-xs); line-height: 1.5; padding: 0 2px; }

.side-collapse {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--faint);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.side-collapse:hover { color: var(--ink); background: var(--panel-2); }
.side-collapse .ico { transition: transform .2s ease; }

/* The retractable rail. Collapsed, it keeps the mark, the four destinations,
   the launch pill and this toggle, and drops every label, so a wide screen
   gives the width back to the board. The grid track eases between the two
   widths; a browser that cannot animate a track just jumps. Scoped above
   1000px on purpose: below it the rail is a slide-over, which has its own
   open/close and must never collapse to icons over the page. */
@media (min-width: 1001px) {
  .shell { transition: grid-template-columns .2s ease; }
  .shell.side-collapsed { grid-template-columns: var(--side-w-mini) minmax(0, 1fr); }
  .side-collapsed .side { padding-left: 10px; padding-right: 10px; }
  .side-collapsed .side-brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .side-collapsed .nav-link { justify-content: center; gap: 0; padding-left: 0; padding-right: 0; }
  .side-collapsed .nav-tx,
  .side-collapsed .brand-name,
  .side-collapsed .side-card,
  .side-collapsed .side-note,
  .side-collapsed .side-cta span,
  .side-collapsed .side-collapse span { display: none; }
  .side-collapsed .side-cta { padding-left: 0; padding-right: 0; }
  .side-collapsed .side-collapse .ico { transform: rotate(180deg); }
}

.side-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.side-scrim[hidden] { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  height: 100%;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  display: none;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--ink); }

.side-toggle { margin-right: -4px; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-mark {
  width: 30px; height: 30px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: #000;
  border: 1px solid var(--line-2);
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.14);
}

.brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.14em;
}

.topbar-brand .brand-mark { width: 26px; height: 26px; border-radius: 8px; }
.topbar-brand .brand-name { font-size: 15px; }
/* the sidebar carries the logo on desktop; the top bar shows it only on mobile */
.topbar-brand { display: none; }
.topbar-brand + .brand-tag { border-left: 0; padding-left: 0; }

.brand-tag {
  color: var(--dim);
  font-size: var(--fs-sm);
  border-left: 1px solid var(--line-2);
  padding-left: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

@media (max-width: 1000px) {
  .shell { display: block; }
  .side {
    position: fixed;
    z-index: 60;
    top: 0; left: 0; bottom: 0;
    width: 268px;
    height: auto;
    border-right: 1px solid var(--line-2);
    box-shadow: var(--shadow-float);
    transform: translateX(-102%);
    transition: transform .18s ease;
  }
  .side.open { transform: none; }
  .side-collapse { display: none; }
  .icon-btn { display: grid; }
  .topbar-brand { display: flex; }
  .topbar-in { padding: 0 14px; gap: 12px; }
}

@media (max-width: 720px) {
  .brand-tag { display: none; }
  .topbar-launch span { display: none; }
  .topbar-launch { padding: 8px 11px; }
}

@media (max-width: 480px) {
  .topbar-brand .brand-name { display: none; }
  #walletLabel { max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   Main + footer
   -------------------------------------------------------------------------- */

.main { flex: 1; min-height: calc(100vh - var(--topbar-h)); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 22px; }

.section { padding: 44px 0; }
.section-tight { padding: 26px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-title { font-size: var(--fs-xl); }
.section-sub { color: var(--muted); font-size: var(--fs-sm); margin-top: 6px; max-width: 62ch; }

.foot { border-top: 1px solid var(--line); margin-top: 40px; background: var(--bg-2); }
.foot-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 34px 22px 44px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 32px;
}
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-col b { font-size: var(--fs-sm); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.foot-col p { color: var(--dim); font-size: var(--fs-sm); }
.foot-col a { color: var(--muted); font-size: var(--fs-sm); width: fit-content; }
.foot-col a:hover { color: var(--ink); }

@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; gap: 22px; } }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  padding: 10px 20px;
  font-size: var(--fs-md);
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, opacity .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: #e6e6e6; }

.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { background: var(--accent-soft); color: var(--ink); }
.btn-ghost.on { background: var(--panel-2); color: var(--ink); border-color: var(--line-2); }

.btn-quiet { background: var(--panel-2); color: var(--ink-2); border-color: var(--line); }
.btn-quiet:hover:not(:disabled) { background: var(--panel-3); color: var(--ink); }

.btn-sm { padding: 6px 13px; font-size: var(--fs-sm); }
.btn-lg { padding: 13px 28px; font-size: var(--fs-lg); }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Chips + banners
   -------------------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.chip-ok { color: var(--ok); border-color: rgba(74, 222, 128, 0.35); background: var(--ok-bg); }
.chip-warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); background: var(--warn-bg); }
.chip-err { color: var(--err); border-color: rgba(248, 113, 113, 0.35); background: var(--err-bg); }
.chip-mute { color: var(--dim); }
.chip-white { color: var(--ink); border-color: var(--accent-line); background: var(--accent-soft); }

.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--panel);
  padding: 12px 14px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.banner b { color: var(--ink); }
.banner-warn { border-color: rgba(251, 191, 36, 0.35); background: var(--warn-bg); color: #fde68a; }
.banner-err { border-color: rgba(248, 113, 113, 0.35); background: var(--err-bg); color: #fecaca; }
.banner-ok { border-color: rgba(74, 222, 128, 0.35); background: var(--ok-bg); color: #bbf7d0; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { padding: 84px 0 40px; text-align: center; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.hero-title {
  font-size: var(--fs-4xl);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0 auto;
  max-width: 16ch;
}
.hero-title .thin { color: var(--dim); }

.hero-sub {
  margin: 22px auto 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: var(--fs-lg);
  line-height: 1.6;
}

.hero-cta { margin-top: 32px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  margin: 56px auto 0;
  max-width: 860px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  overflow: hidden;
}
.stat { padding: 20px 16px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-v { font-family: var(--mono); font-size: var(--fs-2xl); font-weight: 500; letter-spacing: -0.02em; }
.stat-l { color: var(--dim); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }

@media (max-width: 760px) {
  .hero { padding: 52px 0 28px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* --------------------------------------------------------------------------
   Grids + cards
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 20px; }
.card-hover { transition: border-color .15s, transform .15s; }
.card-hover:hover { border-color: var(--line-2); transform: translateY(-1px); }

/* feature / step cards on the home + how pages */
.feature { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.feature-ico {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: #000;
  color: var(--ink);
}
.feature h3 { font-size: var(--fs-lg); }
.feature p { color: var(--muted); font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   Coin cards + board
   -------------------------------------------------------------------------- */

.coin-card { display: flex; flex-direction: column; overflow: hidden; }
.coin-img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.coin-img-missing {
  aspect-ratio: 1;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 50% 0%, #1c1c20 0%, #101013 70%);
  color: var(--faint);
  border-bottom: 1px solid var(--line);
}
.coin-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.coin-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.coin-name { font-weight: 700; font-size: var(--fs-lg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-tick { font-family: var(--mono); color: var(--dim); font-size: var(--fs-sm); }
.coin-desc {
  color: var(--muted); font-size: var(--fs-sm);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.coin-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.coin-views { font-family: var(--mono); font-size: var(--fs-md); color: var(--ink); }
.coin-views .lbl { color: var(--dim); font-family: var(--font); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; margin-left: 6px; }

.board { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
.board-head, .board-row {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) 110px 130px 120px 96px;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
}
.board-head {
  background: var(--bg-2);
  color: var(--dim);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--line);
}
.board-row { border-top: 1px solid var(--line); transition: background .12s; }
.board-row:first-child { border-top: 0; }
.board-row:hover { background: var(--panel-2); }
.board-coin { display: flex; align-items: center; gap: 12px; min-width: 0; }
.board-coin img, .board-coin .noimg {
  width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none;
  background: var(--panel-3);
}
.board-coin .noimg { display: grid; place-items: center; color: var(--faint); }
.board-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-sub { color: var(--dim); font-size: var(--fs-xs); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-num { font-family: var(--mono); font-size: var(--fs-sm); text-align: right; }
.board-act { text-align: right; }

@media (max-width: 860px) {
  .board-head { display: none; }
  .board-row { grid-template-columns: minmax(0, 1fr) auto; grid-auto-rows: auto; row-gap: 6px; }
  .board-num:nth-of-type(3), .board-num:nth-of-type(4) { display: none; }
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.form-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-title { font-size: var(--fs-lg); font-weight: 700; }
.form-body { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.form-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.label .opt { color: var(--dim); font-weight: 500; font-size: var(--fs-xs); }
.label .req { color: var(--warn); font-weight: 600; font-size: var(--fs-xs); }
.hint { color: var(--dim); font-size: var(--fs-xs); line-height: 1.5; }
.hint-err { color: var(--err); }

.input, .textarea, .select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-md);
  padding: 11px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input.mono, .textarea.mono { font-family: var(--mono); font-size: var(--fs-sm); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07); }
.input:disabled, .textarea:disabled { opacity: 0.6; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.select { appearance: none; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } }

.count { color: var(--faint); font-size: var(--fs-xs); font-family: var(--mono); }

/* image dropzone */
.drop {
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-2);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent-line); background: var(--panel-2); }
.drop-preview {
  width: 72px; height: 72px; border-radius: 12px; flex: none;
  object-fit: cover; background: var(--panel-3);
  display: grid; place-items: center; color: var(--faint);
  border: 1px solid var(--line);
}
.drop-txt b { display: block; font-size: var(--fs-md); }
.drop-txt span { color: var(--dim); font-size: var(--fs-xs); }

/* steps */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--dim);
  font-size: var(--fs-sm); font-weight: 600;
}
.step-n {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel-3); color: var(--muted);
  font-family: var(--mono); font-size: var(--fs-xs);
}
.step.on { color: var(--ink); border-color: var(--accent-line); background: var(--accent-soft); }
.step.on .step-n { background: var(--accent); color: var(--accent-ink); }
.step.done { color: var(--muted); }
.step.done .step-n { background: var(--ok-bg); color: var(--ok); }

/* --------------------------------------------------------------------------
   Panels, key-values, meters
   -------------------------------------------------------------------------- */

.panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
.panel-head { padding: 15px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg-2); }
.panel-title { font-size: var(--fs-md); font-weight: 700; display: flex; align-items: center; gap: 9px; }
.panel-sub { color: var(--dim); font-size: var(--fs-xs); margin-top: 3px; }
.panel-body { padding: 18px 20px; }
.panel-body.flush { padding: 0; }

.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; font-size: var(--fs-sm); }
.kv-k { color: var(--dim); }
.kv-v { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.kv-v.mono { font-family: var(--mono); font-size: var(--fs-xs); line-height: 1.7; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv-k { margin-top: 8px; } }

.meter { height: 8px; border-radius: var(--r-pill); background: var(--panel-3); overflow: hidden; border: 1px solid var(--line); }
.meter-fill { height: 100%; background: linear-gradient(90deg, #d4d4d8, #ffffff); border-radius: var(--r-pill); transition: width .4s ease; }

/* ledger / list rows */
.rows { display: flex; flex-direction: column; }
.rowline {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 20px; border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.rowline:first-child { border-top: 0; }
.rowline-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rowline-r { display: flex; align-items: center; gap: 12px; flex: none; }
.rowline .mono { font-size: var(--fs-xs); }

/* --------------------------------------------------------------------------
   Coin page head
   -------------------------------------------------------------------------- */

.coin-head { display: flex; gap: 22px; align-items: flex-start; padding: 34px 0 8px; }
.coin-head-img {
  width: 92px; height: 92px; border-radius: 20px; object-fit: cover; flex: none;
  border: 1px solid var(--line-2); background: var(--panel-2);
}
.coin-head-img.noimg { display: grid; place-items: center; color: var(--faint); }
.coin-head-main { min-width: 0; flex: 1; }
.coin-head-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.coin-head-title h1 { font-size: var(--fs-2xl); }
.coin-head-title .tick { font-family: var(--mono); color: var(--dim); font-size: var(--fs-lg); }
.coin-head-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 640px) { .coin-head { flex-direction: column; } }

/* --------------------------------------------------------------------------
   States
   -------------------------------------------------------------------------- */

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty-ico { font-size: 26px; color: var(--faint); }
.empty p { max-width: 46ch; font-size: var(--fs-sm); }

.errbox {
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: var(--err-bg);
  border-radius: var(--r-md);
  padding: 14px 16px;
  color: #fecaca;
  font-size: var(--fs-sm);
  display: flex; flex-direction: column; gap: 6px;
}
.errbox b { color: #fee2e2; }

.skel { border-radius: 6px; background: linear-gradient(90deg, var(--panel-2) 25%, var(--panel-3) 50%, var(--panel-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.skel-row { display: grid; grid-template-columns: 44px 1fr 90px; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.skel-row:first-child { border-top: 0; }
.skel-a { height: 38px; border-radius: 10px; }
.skel-b { height: 14px; }
.skel-c { height: 14px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toasts {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 90;
  display: flex; flex-direction: column; gap: 8px;
  max-width: min(380px, calc(100vw - 36px));
}
.toast {
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--ink);
  border-radius: var(--r-md);
  padding: 11px 15px;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-float);
  animation: toast-in .18s ease;
  transition: opacity .25s, transform .25s;
}
.toast.out { opacity: 0; transform: translateY(6px); }
.toast-ok { border-color: rgba(74, 222, 128, 0.4); }
.toast-err { border-color: rgba(248, 113, 113, 0.45); }
.toast-warn { border-color: rgba(251, 191, 36, 0.45); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Odds and ends
   -------------------------------------------------------------------------- */

.divider { height: 1px; background: var(--line); border: 0; margin: 26px 0; }

/* launch progress log */
.logbox {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #000;
  padding: 12px 14px;
  max-height: 150px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 5px;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.logbox:empty { display: none; }
.logline { overflow-wrap: anywhere; }
.log-ok { color: var(--ok); }
.log-warn { color: var(--warn); }
.log-err { color: var(--err); }

.link { color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.link:hover { color: var(--accent); border-color: var(--accent-line); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; min-width: 180px; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--panel); padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--muted);
  border-radius: var(--r-pill); padding: 6px 14px;
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.seg button.on { background: var(--panel-3); color: var(--ink); }
.seg button:hover:not(.on) { color: var(--ink); }

.prose { max-width: 68ch; color: var(--muted); font-size: var(--fs-md); line-height: 1.75; display: flex; flex-direction: column; gap: 14px; }
.prose b, .prose strong { color: var(--ink); }
.prose h2 { color: var(--ink); font-size: var(--fs-xl); margin-top: 18px; }
.prose code { font-family: var(--mono); font-size: 0.9em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink-2); }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

.page-head { padding: 40px 0 6px; }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 62ch; }


.top-ca { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--ink); font-size: var(--fs-sm); cursor: pointer; }
.top-ca:hover { border-color: var(--accent-line); }
.top-ca-k { color: var(--dim); font-weight: 600; }
.top-ca[hidden] { display: none; }
