/* LEVER v2 — shared tokens and components (home + app). Dark only. */
:root {
  --night: #03050a;
  --ink: #e9eef8;
  --ink-2: #b7c0d3;
  --muted: #7d889e;
  --faint: #4f5a70;
  --s1: #0a0f19;
  --s2: #101726;
  --s3: #172034;
  --line: #1a2335;
  --line-2: #243049;
  --brand: #2cedb0;
  --brand-2: #5ff5b2;
  --brand-deep: #02bd8f;
  --brand-soft: rgba(44, 237, 176, 0.12);
  --ion: #6f8dff;
  --ion-2: #9db2ff;
  --ion-soft: rgba(111, 141, 255, 0.12);
  --long: #2bd49a;
  --short: #ff5d73;
  --long-soft: rgba(43, 212, 154, 0.12);
  --short-soft: rgba(255, 93, 115, 0.12);
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, canvas { display: block; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- wordmark */
.mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.04em; }
.mark svg, .mark img { width: 26px; height: 26px; display: block; }
::selection { background: rgba(44, 237, 176, 0.32); color: #fff; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; white-space: nowrap; transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ion { background: var(--brand); color: #02150f; }
.btn-ion:hover:not(:disabled) { background: var(--brand-2); }
.btn-line { border-color: var(--line-2); background: transparent; }
.btn-line:hover:not(:disabled) { border-color: var(--brand); }
.btn-quiet { background: var(--s2); border-color: var(--line); }
.btn-quiet:hover:not(:disabled) { background: var(--s3); }
.btn-block { width: 100%; height: 52px; font-size: 15px; border-radius: var(--r-md); }
.btn[hidden] { display: none; }

/* ---------- language switch */
.lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--s2); border: 1px solid var(--line); }
.lang button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--s3); color: var(--ink); }

/* ---------- asset coin (letter glyph, no brand logos) */
.coin { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 800; font-size: 17px; color: #fff; }
.coin.sm { width: 28px; height: 28px; font-size: 14px; }
.coin[data-a="BTC"] { background: #f7931a; }
.coin[data-a="ETH"] { background: #627eea; }
.coin[data-a="SOL"] { background: linear-gradient(135deg, #9945ff, #14f195); }

.dir { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 800; }
.dir.long { color: var(--long); background: var(--long-soft); }
.dir.short { color: var(--short); background: var(--short-soft); }
.up { color: var(--long); }
.down { color: var(--short); }

/* ---------- toast + pending + modal (app) */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: none; z-index: 80;
  max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: var(--r-md);
  background: var(--s3); border: 1px solid var(--line-2); color: var(--ink); font-size: 14px; font-weight: 600;
}
.toast.show { display: block; }
.toast.err { background: #3a1019; border-color: #6b1d2c; color: #ffd6dc; }
.pending {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 10px; z-index: 80;
  max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 999px; background: var(--brand); color: #02150f; font-size: 14px; font-weight: 700;
}
.pending.show { display: flex; }
.spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(6, 10, 24, 0.25); border-top-color: currentColor; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(2, 4, 9, 0.7); backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: 100%; max-width: 420px; padding: 24px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line-2); }
.modal-card h3 { margin: 0 0 6px; font-family: var(--display); font-size: 17px; font-weight: 600; }
.modal-x { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); }
.wstack { display: flex; flex-direction: column; gap: 10px; }
.wstack[hidden] { display: none; }
.wopt { position: relative; display: grid; gap: 4px; width: 100%; padding: 16px; text-align: left; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s2); }
.wopt:hover { border-color: var(--ion); }
.wopt b { font-size: 15px; }
.wopt span { font-size: 13px; color: var(--muted); padding-right: 8px; }
.wopt em { position: absolute; top: 15px; right: 14px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--ion-2); background: var(--ion-soft); padding: 2px 8px; border-radius: 999px; }
.wnote { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.waddr { padding: 10px 12px; border-radius: var(--r-sm); background: var(--s2); font-size: 13px; word-break: break-all; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
