@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/vendor/plex-400.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/vendor/plex-500.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/vendor/mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/vendor/mono-500.woff2") format("woff2");
}

:root {
  --bg: #0b0d14;
  --deep: #07080d;
  --card: #11141c;
  --raised: #1a1e28;
  --text: #eef0f5;
  --sec: #a3a9b8;
  --muted: #7a8296;
  --hair: rgba(238, 240, 245, 0.08);
  --hair-2: rgba(238, 240, 245, 0.14);
  --accent: #f0b429;
  --pos: #4cc38a;
  --neg: #e5484d;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Plex Sans", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
}

/* engineering grid, faded out toward the bottom */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(238, 240, 245, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(238, 240, 245, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 78% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.55) 42%, transparent 82%);
  mask-image: radial-gradient(120% 78% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.55) 42%, transparent 82%);
}

/* depth wash + edge darkening, no colour slop */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(90% 46% at 50% 0%, rgba(240, 180, 41, 0.07) 0%, transparent 62%),
    radial-gradient(140% 90% at 50% 100%, rgba(7, 8, 13, 0.9) 0%, transparent 58%);
}

.page { position: relative; z-index: 1; }

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
}

.num {
  font-family: "Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 440px;
  margin: 0 auto;
  padding: 0 20px calc(20px + env(safe-area-inset-bottom));
}

/* ---------- top bar ---------- */
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  margin: 0 -20px 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--hair);
}

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

.mark .logo {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}

.boot .mark .logo { width: 26px; height: 26px; border-radius: 7px; }

.mark b {
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.grow { flex: 1; }

.tag {
  padding: 3px 7px;
  font-family: "Plex Mono", monospace;
  font-size: 11px;
  color: var(--sec);
  border: 1px solid var(--hair-2);
  border-radius: 4px;
}

.iconbtn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 8px;
  cursor: pointer;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}

.iconbtn:hover { color: var(--text); border-color: var(--hair-2); }
.iconbtn:active { transform: scale(0.97); }
.iconbtn.spin svg { animation: turn 700ms var(--ease); }

@keyframes turn { to { transform: rotate(360deg); } }

/* ---------- balance ---------- */
.balance {
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--hair);
}

.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.eyebrow .who {
  margin-left: auto;
  font-family: "Plex Mono", monospace;
  font-size: 11px;
  color: var(--sec);
}

.figure {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: "Plex Mono", monospace;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.figure span {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-family: "Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- action ---------- */
.action {
  padding: 20px 0;
  border-bottom: 1px solid var(--hair);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #14161d;
  background: #eef0f5;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 150ms var(--ease), transform 150ms var(--ease);
}

.btn:hover { background: #ffffff; }
.btn:active { transform: scale(0.985); }
.btn:disabled { background: var(--raised); color: var(--muted); cursor: default; transform: none; }

.btn.ghost {
  color: var(--text);
  background: var(--raised);
  border-color: var(--hair-2);
}

.btn.ghost:hover { background: #21252f; }

.btn .amt {
  font-family: "Plex Mono", monospace;
  font-size: 12px;
  color: rgba(20, 22, 29, 0.62);
}

.note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.note a { color: var(--sec); text-decoration: none; border-bottom: 1px solid var(--hair-2); }

/* ---------- progress ---------- */
.progress { padding: 20px 0; border-bottom: 1px solid var(--hair); }

.prow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-family: "Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}

.prow b {
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.prow .right { margin-left: auto; color: var(--sec); }
.prow .right.done { color: var(--pos); }

.earn {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.earn b { color: var(--pos); font-weight: 500; }

.track {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--raised);
  overflow: hidden;
}

.track::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--bg) 0 1px,
    transparent 1px 10%
  );
  z-index: 2;
  pointer-events: none;
}

.fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 400ms var(--ease);
}

/* ---------- live feed ---------- */
.feedwrap { padding: 16px 0; border-bottom: 1px solid var(--hair); }

.feedhead {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.feedhead h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.feedhead .live { margin-left: auto; font-size: 11px; color: var(--muted); }

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pos);
  animation: blink 2.4s var(--ease) infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.feed { position: relative; height: 76px; }

.feed:empty::after {
  content: "Waiting for the network";
  font-size: 12px;
  color: var(--muted);
}

.dep {
  position: absolute;
  inset: 0 0 auto 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--hair-2);
  box-shadow: 0 12px 26px -18px rgba(0, 0, 0, 0.9);
  text-decoration: none;
  will-change: transform, opacity;
}

.dep.in { animation: slideIn 480ms var(--ease) both; }
.dep.out { animation: slideOut 480ms var(--ease) both; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-16px); }
}

.dep .amt {
  font-size: 15px;
  font-weight: 500;
  color: var(--pos);
  letter-spacing: -0.01em;
}

.dep .usd { font-size: 11px; color: var(--muted); }

.dep .meta {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- signal figures ---------- */
.figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 16px 0;
}

.fig { padding: 0 12px; }
.fig:first-child { padding-left: 0; }
.fig:last-child { padding-right: 0; }
.fig + .fig { border-left: 1px solid var(--hair); }

.fig dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.fig dd {
  margin: 0;
  font-family: "Plex Mono", monospace;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.figures dl { margin: 0; display: contents; }

/* ---------- pool ---------- */
.pool { padding: 18px 0 20px; border-bottom: 1px solid var(--hair); }

.poolhead {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.poolhead .up { margin-left: auto; color: var(--pos); font-size: 12px; }

.poolfig {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: "Plex Mono", monospace;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

.poolfig span { font-size: 12px; color: var(--muted); letter-spacing: 0; }

.poolusd { margin-top: 4px; font-size: 12px; color: var(--muted); }

.follows {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.follow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  font-size: 12px;
  border-top: 1px solid var(--hair);
  opacity: 0.85;
  transition: opacity 300ms var(--ease);
}

.follow.in { animation: slideIn 460ms var(--ease) both; opacity: 1; }
.follow .who { color: var(--sec); }
.follow .val { margin-left: auto; color: var(--pos); }

/* ---------- boot ---------- */
#boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 400ms var(--ease), visibility 400ms;
}

#boot.gone { opacity: 0; visibility: hidden; }

.boot { width: 220px; }

.boot .mark { margin-bottom: 16px; }

.boot p {
  margin: 0 0 12px;
  font-family: "Plex Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  min-height: 16px;
}

.boot .track { height: 2px; }

/* ---------- misc ---------- */
.enter { animation: rise 420ms var(--ease) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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