/* Ninja Swap landing — custom layer on top of Tailwind.
   Vibe: Ethereal Glass — OLED base, emerald mesh, Vantablack double-bezel cards.
   Owns: brand-mark inline-svg, double-bezel utility, custom-spring transitions,
   grain texture, gradient text, scroll-reveal classes. */

:root {
  --ninja: #22c55e;
  --ninja2: #34f085;
  --ninja-deep: #0d8a3f;
  --ink: #040706;
  --panel: #0a0e0d;
  --border: #1a2624;
  /* Motion tokens.
     --spring is the iOS drawer curve we've been using; keeping it as
     the default for component-level transitions.
     --ease-out is a stronger out-curve than the built-in CSS keywords,
     ideal for entering elements (dropdowns, modals, fade-ups).
     --ease-in-out is for on-screen movement that needs both ends to
     decelerate naturally.
     The built-in CSS easings are too weak — using these custom curves
     everywhere is what makes good UIs feel "designed" instead of
     "default browser." */
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* Z-index scale — semantic, never magic numbers. */
  --z-dropdown: 30;
  --z-sticky:   40;
  --z-overlay:  50;
  --z-modal:    60;
  --z-toast:    70;
  --z-tooltip:  80;
}

/* Universal press feedback. Any interactive element gets a subtle scale
   on :active so the interface visibly responds to the press — Emil's
   "buttons must feel responsive" principle. Subtle enough that nobody
   consciously notices, sticky enough that it compounds. */
button:active,
a.cta-primary:active,
a.cta-secondary:active,
a.cta-pill:active,
.admin-action:active,
.method-chip:active {
  transform: scale(0.97);
}

/* Hover affordances are gated to actual hover-capable input devices.
   Touch devices fire :hover on tap, which causes flashing states
   between taps and feels broken. */
@media (hover: hover) and (pointer: fine) {
  a.cta-secondary:hover {
    transform: translateY(-1px);
  }
}

html, body { min-height: 100%; }
html { scroll-padding-top: 6rem; }
body {
  /* Tabular figures for tickers — prevents number-width jitter. */
  font-feature-settings: "ss01", "ss03", "cv11", "tnum";
}

/* ─── Brand mark ──────────────────────────────────────────────────
   Two contexts:
     .logo-mark       → small static icon (nav, footer, anon state).
                        Uses logo.png. Animation in tiny icons is
                        distracting; one frozen frame reads better.
     .logo-mark-large → hero. Uses the animated logo.gif.
   Both use mix-blend-mode: screen as a safety net — if either file
   carries any residual dark background (ezgif and friends often
   leave a few pixels of fringe), screen blend makes pure-black
   blend with the page background so it doesn't render as a dark
   tile. Genuinely-transparent pixels are unaffected.
   ──────────────────────────────────────────────────────────────── */
.logo-mark,
.logo-mark-large {
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  /* Zoom past the surrounding padding in the source files so the actual
     S fills the container instead of floating tiny in the middle. The
     containers are square, so the image's wider-than-tall aspect ratio
     gets its sides cropped automatically. */
  background-size: 200% auto;
  mix-blend-mode: screen;
  display: inline-block;
}
.logo-mark       { background-image: url(/static/logo.png); }
.logo-mark-large { background-image: url(/static/logo.gif); }

/* Mobile nav link inside the overlay — readable, tappable (>=44px),
   with a green hover wash. */
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: white;
  border-radius: 14px;
  transition: background 300ms var(--spring), padding 300ms var(--spring);
  letter-spacing: -0.005em;
}
.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: rgba(34, 197, 94, 0.08);
  padding-left: 1.4rem;
}
.mobile-nav-link i {
  color: rgba(255, 255, 255, 0.35);
}

/* The hero logo plate: outer-shell + inner-core (Double-Bezel) */
.logo-plate {
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.18), rgba(255, 255, 255, 0.03) 45%, rgba(34, 197, 94, 0.10));
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.10),
    0 30px 80px -30px rgba(34, 197, 94, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}
.logo-plate-inner {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(34, 197, 94, 0.18), transparent 60%),
    linear-gradient(180deg, #060a09 0%, #050807 100%);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06),
    inset 0 0 60px 0 rgba(34, 197, 94, 0.08);
}

/* ─── Floating glass nav pill ─────────────────────────────────── */
.nav-pill {
  background: rgba(10, 14, 13, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
          backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06),
    0 14px 40px -14px rgba(0, 0, 0, 0.5);
}

/* ─── Eyebrow tag (small pill above every H2) ─────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
  width: fit-content;
}
.eyebrow .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ninja);
  box-shadow: 0 0 8px var(--ninja);
}

/* ─── Gradient text accent (used on key words) ────────────────── */
.text-gradient-ninja {
  background: linear-gradient(180deg, #4fe09a 0%, #22c55e 65%, #0d8a3f 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ─── DOUBLE-BEZEL (Doppelrand) ──────────────────────────────────
   Outer shell with subtle hairline + inner core with own bg + inset
   highlight. Concentric radii calculated against shell padding.
   ──────────────────────────────────────────────────────────────── */
.bezel {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(34, 197, 94, 0.04) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 20px 60px -30px rgba(0, 0, 0, 0.6);
}
.bezel-inner {
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(34, 197, 94, 0.05), transparent 60%),
    linear-gradient(180deg, #080c0b 0%, #050807 100%);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.bezel-mini {
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
}

/* ─── Stat cells (inside the hero stats plate) ────────────────── */
.stat-cell {
  padding: 1.5rem 1.5rem 1.25rem;
}
@media (min-width: 640px) { .stat-cell { padding: 1.75rem 2rem 1.5rem; } }
.stat-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.stat-eyebrow .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ninja);
  box-shadow: 0 0 6px var(--ninja);
}
.stat-value {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: white;
}
.stat-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

/* ─── Feature card (Bento tiles) ──────────────────────────────── */
.feature-card {
  position: relative;
  border-radius: 1.75rem;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(34, 197, 94, 0.02) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  transition: transform 700ms var(--spring), box-shadow 700ms var(--spring);
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.25),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
    0 30px 80px -40px rgba(34, 197, 94, 0.4);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.08));
  color: var(--ninja);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.3),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.08),
    0 10px 30px -10px rgba(34, 197, 94, 0.4);
}
.feature-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: white;
  font-size: 1.125rem;
  line-height: 1.25;
}
.feature-body {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ─── Step card (How It Works) ────────────────────────────────── */
.step-card {
  position: relative;
  padding: 2rem 1.5rem 1.75rem;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  transition: transform 700ms var(--spring);
}
.step-card:hover { transform: translateY(-2px); }
.step-num {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 3.25rem;
  line-height: 0.9;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.35), rgba(34, 197, 94, 0.05));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
  user-select: none;
  margin-bottom: 0.85rem;
}

/* ─── Method chip ─────────────────────────────────────────────── */
.method-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  font-weight: 500;
  color: #e6f7ee;
  transition: transform 500ms var(--spring), box-shadow 500ms var(--spring), background 500ms var(--spring);
  cursor: default;
  text-align: center;
}
.method-chip:hover {
  background: rgba(34, 197, 94, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.4),
    0 8px 24px -10px rgba(34, 197, 94, 0.5);
  transform: translateY(-1px);
}
.method-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ninja);
  box-shadow: 0 0 8px var(--ninja);
}

/* ─── Trades feed rows ────────────────────────────────────────── */
.trade-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  row-gap: 0.35rem;
  align-items: center;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
}
.trade-row .side {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.trade-row .amt {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.trade-row .method {
  color: #c7d7d0;
  font-size: 0.7rem;
  background: rgba(34, 197, 94, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.trade-row .arrow {
  color: var(--ninja);
  flex-shrink: 0;
}
.trade-row .recv .amt { color: var(--ninja); }

/* The Discord-profile pair (client → exchanger) under the amounts */
.trade-row-people {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.trade-who {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
}
.trade-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0a0e0d;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25);
  flex-shrink: 0;
}
.trade-name {
  font-weight: 500;
  color: white;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 8.5rem;
}
.trade-id {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.04em;
}
.trade-arrow {
  color: var(--ninja);
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ─── FAQ accordion ───────────────────────────────────────────── */
.faq-item details {
  background: rgba(255, 255, 255, 0.025);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: box-shadow 500ms var(--spring), background 500ms var(--spring);
}
.faq-item details[open] {
  background: rgba(34, 197, 94, 0.04);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.25),
    0 14px 36px -20px rgba(34, 197, 94, 0.3);
}
.faq-item summary {
  padding: 1.15rem 1.25rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 500;
  color: white;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
  position: relative;
  flex-shrink: 0;
  transition: transform 500ms var(--spring), background 500ms var(--spring);
  background-image:
    linear-gradient(to right, var(--ninja), var(--ninja)),
    linear-gradient(to bottom, var(--ninja), var(--ninja));
  background-position: center, center;
  background-repeat: no-repeat;
  background-size: 8px 1.5px, 1.5px 8px;
}
.faq-item details[open] summary::after {
  transform: rotate(135deg);
  background-color: rgba(34, 197, 94, 0.22);
}
.faq-item .body {
  padding: 0 1.25rem 1.25rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* ─── Founder badge ───────────────────────────────────────────────
   Renders next to the founder's name everywhere the profile shows.
   Two variants:
     - .founder-pill: full pill with "Founder" text + crown. Used in
       the profile page header, the user-menu dropdown header, and
       prominent surfaces.
     - .founder-mark: small inline crown icon only. Used in dense
       lists (leaderboard, history rows, exchanger cards) so the row
       layout doesn't break.
   Both use a gold-toward-emerald gradient so they read as "special"
   without competing with the brand green. */
.founder-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem 0.18rem 0.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(34, 197, 94, 0.16));
  box-shadow:
    inset 0 0 0 1px rgba(251, 191, 36, 0.45),
    0 0 12px -3px rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1;
}
.founder-pill svg,
.founder-pill i { color: #fbbf24; width: 0.85rem; height: 0.85rem; }
.founder-pill--lg {
  padding: 0.32rem 0.85rem 0.32rem 0.6rem;
  font-size: 0.7rem;
  gap: 0.45rem;
}
.founder-pill--lg svg,
.founder-pill--lg i { width: 1rem; height: 1rem; }

.founder-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a0e02;
  flex-shrink: 0;
  vertical-align: middle;
  box-shadow: 0 0 8px -2px rgba(251, 191, 36, 0.6);
}
.founder-mark svg,
.founder-mark i { width: 0.65rem; height: 0.65rem; stroke-width: 2.5; }

.founder-avatar-ring {
  position: relative;
}
.founder-avatar-ring::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  background: conic-gradient(from 0deg, #fbbf24, #22c55e, #fbbf24);
  z-index: -1;
  animation: founderRingSpin 6s linear infinite;
}
@keyframes founderRingSpin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .founder-avatar-ring::before { animation: none; }
}

/* ─── Founder profile (magazine-style cover, note, verify links) ──
   Renders ONLY on /u/<id> pages when the profile is a founder. The
   layout is intentionally different from the standard client /
   exchanger profile so it reads as "operator" at a glance. */

.founder-cover {
  position: relative;
  border-radius: 2rem;
  padding: 1.5px;
  background: linear-gradient(135deg,
    rgba(251, 191, 36, 0.55),
    rgba(34, 197, 94, 0.45),
    rgba(251, 191, 36, 0.55));
  overflow: hidden;
  isolation: isolate;
}
.founder-cover-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 600px 320px at 50% 0%, rgba(251, 191, 36, 0.18), transparent 70%),
    radial-gradient(ellipse 480px 280px at 50% 100%, rgba(34, 197, 94, 0.16), transparent 70%);
  z-index: 0;
}
.founder-cover-inner {
  position: relative;
  z-index: 1;
  background:
    radial-gradient(ellipse 800px 400px at 50% -10%, rgba(251, 191, 36, 0.08), transparent 60%),
    linear-gradient(180deg, #0c0f0e, #0a0e0d);
  border-radius: calc(2rem - 1.5px);
  padding: 3rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.founder-cover-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.founder-cover-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem 0.35rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(34, 197, 94, 0.14));
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.founder-cover-id {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.founder-cover-id span { color: rgba(255, 255, 255, 0.75); }

.founder-cover-avatar {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  margin-bottom: 1.5rem;
}
.founder-cover-avatar img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: block;
  box-shadow:
    0 0 0 4px #0a0e0d,
    0 20px 60px -20px rgba(251, 191, 36, 0.5);
}

.founder-cover-name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-size: clamp(2.25rem, 6vw, 4rem);
  background: linear-gradient(135deg, #ffffff 30%, #fde68a 70%, #fbbf24 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  margin: 0 0 0.85rem;
}
.founder-cover-tagline {
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 2.25rem;
}

.founder-cover-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  width: 100%;
  max-width: 32rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.founder-cover-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.25rem;
}
.founder-cover-stat + .founder-cover-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}
.founder-cover-stat-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #fbbf24, #22c55e);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
}
.founder-cover-stat-lbl {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.25rem;
  text-align: center;
}

/* Signed founder note (below the cover). Reads like a letter, not
   a marketing card. The eyebrow and signature give it the
   personality. */
.founder-note {
  background:
    radial-gradient(ellipse 500px 240px at 0% 0%, rgba(251, 191, 36, 0.05), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border-radius: 1.75rem;
  padding: 2rem 1.75rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.founder-note-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(251, 191, 36, 0.85);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1.25rem;
}
.founder-note-body p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}
.founder-note-body p:last-of-type { margin-bottom: 0; }
.founder-note-sig {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}
.founder-note-sig-name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.founder-note-sig-role {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* Verify-me grid: 2 columns on tablet+, 1 on mobile. Each tile is a
   trust artifact link the visitor can independently verify. */
.founder-verify {
  background:
    radial-gradient(ellipse 480px 220px at 100% 0%, rgba(34, 197, 94, 0.05), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border-radius: 1.75rem;
  padding: 1.75rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.founder-verify-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(34, 197, 94, 0.85);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1.25rem;
}
.founder-verify-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .founder-verify-grid { grid-template-columns: 1fr 1fr; }
}
.founder-verify-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: background 350ms var(--spring), box-shadow 350ms var(--spring), transform 250ms var(--spring);
  min-width: 0;
}
.founder-verify-link:hover {
  background: rgba(34, 197, 94, 0.06);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}
.founder-verify-link > i:first-child { color: rgba(251, 191, 36, 0.85); flex-shrink: 0; }
.founder-verify-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.founder-verify-handle {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}

@media (max-width: 640px) {
  .founder-cover-inner { padding: 2.25rem 1.25rem 2rem; }
  .founder-cover-avatar,
  .founder-cover-avatar img { width: 128px; height: 128px; }
  .founder-cover-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .founder-cover-stat + .founder-cover-stat {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.75rem;
  }
  .founder-note { padding: 1.5rem 1.25rem; }
  .founder-verify { padding: 1.5rem 1.25rem; }
}

/* ─── Leaderboard ─────────────────────────────────────────────── */
.lb-row {
  display: grid;
  grid-template-columns: 28px 36px 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  transition: background 500ms var(--spring);
}
.lb-row:hover { background: rgba(34, 197, 94, 0.05); }
.lb-rank {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}
.lb-row:nth-child(1) .lb-rank { color: var(--ninja); text-shadow: 0 0 12px rgba(34, 197, 94, 0.6); }
.lb-row:nth-child(2) .lb-rank { color: var(--ninja2); }
.lb-row:nth-child(3) .lb-rank { color: rgba(34, 197, 94, 0.75); }
.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0a0e0d;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
}
.lb-meta { min-width: 0; }
.lb-handle {
  font-weight: 600;
  color: white;
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 9rem;
}
.lb-id {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.lb-stats { text-align: right; }
.lb-volume { font-family: "JetBrains Mono", monospace; font-weight: 700; color: var(--ninja); font-size: 0.9rem; }
.lb-trades { font-size: 0.65rem; color: rgba(255, 255, 255, 0.4); margin-top: 1px; }

/* ─── Wallet page primitives ──────────────────────────────────── */

/* Small status pills shown above the balance card. Green-tinted by
   default; the --on / --off modifiers change the dot + label color
   for the 2FA badge specifically. */
.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.security-badge i { color: rgba(255, 255, 255, 0.5); }
.security-badge--on {
  background: rgba(34, 197, 94, 0.08);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
  color: var(--ninja);
}
.security-badge--on i { color: var(--ninja); }
.security-badge--off {
  background: rgba(245, 158, 11, 0.08);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3);
  color: var(--warn, #f59e0b);
}
.security-badge--off i { color: var(--warn, #f59e0b); }

/* Mini balance tile inside the hero card. Same visual language as
   .bezel-mini but with a label slot, value slot, and optional sub. */
.balance-tile {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}
.balance-tile-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.5rem;
}
.balance-tile-label i { color: rgba(255, 255, 255, 0.4); }
.balance-tile-value {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: white;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.balance-tile-sub {
  margin-top: 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
}

/* QR display frame — sits on a white card so the QR has high contrast
   no matter how dark the surrounding glass card is. The skeleton overlay
   shows until the <img> onload fires. */
.qr-frame {
  position: relative;
  width: calc(var(--qr-size, 160px) + 16px);
  height: calc(var(--qr-size, 160px) + 16px);
  padding: 8px;
  border-radius: 14px;
  background: white;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 10px 30px -10px rgba(34, 197, 94, 0.3);
  display: grid;
  place-items: center;
}
.qr-frame img {
  width: var(--qr-size, 160px);
  height: var(--qr-size, 160px);
  display: block;
  transition: opacity 400ms var(--spring);
}
.qr-skeleton {
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  background: linear-gradient(110deg,
    rgba(225, 240, 230, 0.6) 30%,
    rgba(180, 220, 200, 0.9) 50%,
    rgba(225, 240, 230, 0.6) 70%);
  background-size: 220% 100%;
  animation: qrShimmer 1.4s ease-in-out infinite;
  color: #1a2624;
  font-size: 11px;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
}
@keyframes qrShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Address pill — monospaced full-width input-style box with a copy
   button glued to the right edge. */
.addr-box {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.addr-text {
  flex: 1;
  min-width: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  color: white;
  padding: 0.7rem 0.85rem;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.addr-copy {
  width: 44px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.6);
  box-shadow: inset 1px 0 0 0 rgba(255, 255, 255, 0.06);
  transition: background 400ms var(--spring), color 400ms var(--spring);
  cursor: pointer;
}
.addr-copy:hover {
  background: rgba(34, 197, 94, 0.12);
  color: var(--ninja);
}

/* Activity row — used in the wallet's Trades / Deposits / Withdrawals
   tabs. Three-column grid (icon · meta · time) with a colored icon
   chip on the left so the eye can scan the row type at a glance. */
.activity-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: start;
  gap: 0.85rem;
  padding: 0.9rem 1.25rem;
  transition: background 500ms var(--spring);
}
.activity-row:hover { background: rgba(34, 197, 94, 0.04); }

.activity-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}
.activity-icon--trade {
  background: rgba(34, 197, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25);
  color: var(--ninja);
}
.activity-icon--deposit {
  background: rgba(34, 197, 94, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
  color: var(--ninja);
}
.activity-icon--withdraw {
  background: rgba(245, 158, 11, 0.1);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3);
  color: var(--warn, #f59e0b);
}

.activity-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.activity-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.activity-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22rem;
}
.activity-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
  white-space: nowrap;
  align-self: center;
}

/* Send-form inputs — share styling with .addr-text for consistency.
   Focus ring uses the brand green so users know what's active. */
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: white;
  /* 16px floor so iOS Safari doesn't zoom in on focus. Anything
     under 16px triggers the auto-zoom on text inputs. */
  font-size: 1rem;
  padding: 0.85rem 1rem;
  outline: none;
  min-height: 44px;
  transition: box-shadow 400ms var(--spring), background 400ms var(--spring);
}
.form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.form-input:focus {
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.5),
    0 0 0 4px rgba(34, 197, 94, 0.1);
}
.form-error {
  margin-top: 0.5rem;
  color: var(--danger, #ef4444);
  font-size: 11px;
}

/* ─── Profile page primitives (/u/<id>) ──────────────────────────
   The /u/<id> page shows a public trader profile — avatar, name,
   stats grid, and a clickable trade list. */
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #0a0e0d;
  box-shadow:
    inset 0 0 0 2px rgba(34, 197, 94, 0.4),
    0 14px 36px -10px rgba(34, 197, 94, 0.4);
  flex-shrink: 0;
}
.profile-stat-card {
  padding: 1.4rem 1.5rem;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
}
.profile-stat-big {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 0.6rem;
}
.profile-stat-small {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}
.profile-trade-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: start;
  gap: 0.85rem;
  padding: 0.95rem 1.25rem;
  transition: background 300ms var(--spring);
  cursor: pointer;
}
.profile-trade-row:hover { background: rgba(34, 197, 94, 0.05); }
.profile-trade-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.profile-trade-title { display: flex; align-items: center; gap: 0.5rem; }
.profile-trade-flow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.profile-trade-counter {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.profile-trade-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  align-self: center;
}
.counterparty-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem 0.15rem 0.2rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
  color: white;
  font-size: 0.7rem;
  font-weight: 500;
  transition: background 300ms var(--spring);
}
.counterparty-pill:hover {
  background: rgba(34, 197, 94, 0.15);
}
.counterparty-pill img { border-radius: 50%; }

/* ─── Admin panel (/admin) ────────────────────────────────────── */
.admin-stat-cell { padding: 1.1rem 1.2rem; }
.admin-stat-cell .stat-value { font-size: 1.1rem; }

.admin-tab {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 300ms var(--spring), color 300ms var(--spring), box-shadow 300ms var(--spring);
  flex-shrink: 0;
  cursor: pointer;
}
.admin-tab:hover { color: white; }
.admin-tab--active {
  background: rgba(34, 197, 94, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.4);
  color: var(--ninja);
}

/* ── User menu (avatar trigger + dropdown) ─────────────────────────────
   Drops into any nav as a sibling of the CTA pill. Trigger is a
   circular avatar; clicking opens a glass-card dropdown anchored to
   the right edge of the trigger. Visible on all viewports.
   ───────────────────────────────────────────────────────────────────── */

.user-menu-wrap { display: inline-flex; align-items: center; }

.user-menu-trigger {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 350ms var(--spring), box-shadow 350ms var(--spring), transform 200ms var(--spring);
}
@media (max-width: 640px) {
  .user-menu-trigger { width: 40px; height: 40px; }
  .user-menu-trigger img { width: 34px; height: 34px; }
}
.user-menu-trigger:hover {
  background: rgba(34, 197, 94, 0.08);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.35);
}
.user-menu-trigger[aria-expanded="true"] {
  background: rgba(34, 197, 94, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.55);
}
.user-menu-trigger:active { transform: scale(0.96); }
.user-menu-trigger img {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: rgba(10, 14, 13, 0.88);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border-radius: 20px;
  padding: 6px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 60px -16px rgba(0, 0, 0, 0.6),
    0 0 60px -20px rgba(34, 197, 94, 0.18);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 280ms var(--spring),
    transform 320ms var(--spring),
    visibility 0s linear 320ms;
  z-index: 60;
}
.user-menu-panel.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity 280ms var(--spring),
    transform 320ms var(--spring),
    visibility 0s linear 0s;
}

/* Header row: avatar + name + ID + chevron-right (links to /u/<id>) */
.user-menu-header {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: background 300ms var(--spring);
}
.user-menu-header:hover { background: rgba(255, 255, 255, 0.04); }
.user-menu-header img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25);
}
.user-menu-name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu-id {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--mute);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats strip: trades + vouches + (optional) exchanger pill */
.user-menu-stats {
  display: flex;
  gap: 4px;
  padding: 6px 6px 10px 6px;
  margin: 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.user-menu-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.user-menu-stat--badge {
  background: transparent;
  box-shadow: none;
  justify-content: center;
}
.user-menu-stat-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--ninja2);
}
.user-menu-stat-lbl {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 2px;
}
.user-menu-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.user-menu-pill--ninja {
  background: rgba(34, 197, 94, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.4);
  color: var(--ninja);
}

.user-menu-divider {
  height: 1px;
  margin: 6px 8px;
  background: rgba(255, 255, 255, 0.05);
}

/* Menu items: icon + label + right-side kbd-style hint */
.user-menu-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #d4dbd9;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 250ms var(--spring), color 250ms var(--spring);
}
.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.user-menu-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--mute);
  transition: background 250ms var(--spring), color 250ms var(--spring);
}
.user-menu-item:hover .user-menu-icon {
  background: rgba(34, 197, 94, 0.1);
  color: var(--ninja2);
}
.user-menu-label { min-width: 0; }
.user-menu-kbd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--mute);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.user-menu-item--accent {
  background: rgba(34, 197, 94, 0.08);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
}
.user-menu-item--accent .user-menu-icon {
  background: rgba(34, 197, 94, 0.15);
  color: var(--ninja2);
}
.user-menu-item--accent:hover {
  background: rgba(34, 197, 94, 0.14);
}

.user-menu-item--owner .user-menu-icon { color: var(--warn); }
.user-menu-item--owner .user-menu-kbd  { color: var(--warn); }

.user-menu-item--danger { color: #d4dbd9; }
.user-menu-item--danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
}
.user-menu-item--danger:hover .user-menu-icon {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

/* Mobile: dropdown becomes a centered fixed-position sheet anchored
   below the floating nav pill. Independent of where the avatar
   trigger lives inside the pill, so it always lands centered and
   never clips the right edge. */
@media (max-width: 640px) {
  .user-menu-panel {
    position: fixed;
    top: 76px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    transform-origin: top center;
    transform: translateY(-6px) scale(0.98);
  }
  .user-menu-panel.is-open {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .user-menu-trigger,
  .user-menu-panel,
  .user-menu-item,
  .user-menu-icon { transition: none; }
}

/* Pane reveal animation. Hidden panes are display:none (Tailwind .hidden).
   When a pane becomes visible, fade + lift it in so the tab switch reads
   as motion, not a hard cut. */
.admin-pane {
  animation: paneIn 360ms var(--spring) both;
}
@keyframes paneIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-pane { animation: none; }
}

.admin-row {
  display: grid;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1.25rem;
  transition: background 300ms var(--spring);
}
.admin-row:hover { background: rgba(34, 197, 94, 0.03); }

/* Variant-specific column templates. Each row type gets the columns
   it actually needs instead of a single universal grid that fits none. */
.admin-row--exchanger {
  grid-template-columns: 1fr 120px 100px 140px 220px;
}
.admin-row--ticket {
  grid-template-columns: 1fr auto;
}
.admin-row--bl {
  grid-template-columns: 1fr 1fr auto;
}

@media (max-width: 767px) {
  .admin-row--exchanger {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "profile action"
      "volume volume"
      "status status";
    gap: 0.5rem;
    row-gap: 0.55rem;
  }
  .admin-row--exchanger > :nth-child(1) { grid-area: profile; }
  .admin-row--exchanger > :nth-child(2) { grid-area: volume; text-align: left; }
  .admin-row--exchanger > :nth-child(3) { display: none; }
  .admin-row--exchanger > :nth-child(4) { grid-area: status; }
  .admin-row--exchanger > :nth-child(5) { grid-area: action; }
  .admin-row--bl { grid-template-columns: 1fr; gap: 0.6rem; }
}

/* Fee-row editor — single-line per flow with inline number inputs. */
.fee-row-edit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.fee-row-edit input {
  padding: 0.55rem 0.7rem !important;
}
@media (max-width: 640px) {
  .fee-row-edit { flex-direction: column; align-items: flex-start; }
}

/* Destructive admin action variant — same shape as the others, danger color. */
.admin-action--remove {
  background: rgba(239, 68, 68, 0.1);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.3);
  color: var(--danger);
}
.admin-action--remove:hover { background: rgba(239, 68, 68, 0.2); }
.admin-row-profile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.admin-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #d4dbd9;
  transition: background 300ms var(--spring), color 300ms var(--spring), box-shadow 300ms var(--spring);
  cursor: pointer;
  text-decoration: none;
}
.admin-action:hover {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: #ffffff;
}
.admin-action--suspend {
  background: rgba(239, 68, 68, 0.1);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.3);
  color: var(--danger);
}
.admin-action--suspend:hover {
  background: rgba(239, 68, 68, 0.2);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.4);
  color: var(--danger);
}
.admin-action--unsuspend {
  background: rgba(34, 197, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
  color: var(--ninja);
}
.admin-action--unsuspend:hover {
  background: rgba(34, 197, 94, 0.2);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.4);
  color: var(--ninja);
}
.admin-action--view {
  background: rgba(34, 197, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
  color: var(--ninja);
}
.admin-action--view:hover {
  background: rgba(34, 197, 94, 0.2);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.4);
  color: var(--ninja);
}
.admin-action--restore {
  background: rgba(245, 158, 11, 0.1);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3);
  color: var(--warn);
}
.admin-action--restore:hover {
  background: rgba(245, 158, 11, 0.2);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.4);
  color: var(--warn);
}

/* Active / Deleted view toggle on the Transcripts tab. Pill-shaped,
   matched in proportions to the admin-tab pills above it. */
.tr-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 300ms var(--spring), color 300ms var(--spring),
              box-shadow 300ms var(--spring);
}
.tr-view-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.tr-view-btn--active {
  background: rgba(34, 197, 94, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.4);
  color: var(--ninja);
}
.tr-view-btn--active.tr-view-btn--danger {
  background: rgba(245, 158, 11, 0.12);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.4);
  color: var(--warn);
}
.tr-view-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: var(--warn);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 0.15rem;
}
.tr-view-pill:empty { display: none; }

/* Soft-deleted row treatment: warn-tinted left bar, slightly muted
   content, countdown chip on the right. */
.admin-row--deleted {
  background: linear-gradient(90deg, rgba(245,158,11,0.06), transparent 30%);
  box-shadow: inset 3px 0 0 0 var(--warn);
}
.admin-row--deleted .hist-name,
.admin-row--deleted a { opacity: 0.85; }
.tr-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3);
  color: var(--warn);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tr-countdown--soon {
  background: rgba(239, 68, 68, 0.1);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

.audit-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  transition: background 300ms var(--spring);
}
.audit-row:hover { background: rgba(34, 197, 94, 0.03); }

/* ─── Settings card + switch (/settings) ─────────────────────── */
.setting-card {
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  padding: 1.25rem 1.25rem;
}
.setting-card-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 1rem;
  align-items: start;
}
.setting-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
  color: var(--ninja);
}
.setting-meta { min-width: 0; }
.setting-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  color: white;
  margin-bottom: 0.4rem;
}
.setting-body {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* iOS-style toggle switch. Animates the thumb sliding right + the
   track fading to brand green. Keyboard-accessible via the underlying
   <input type="checkbox"> which sr-only-style hides via opacity. */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background 300ms var(--spring), box-shadow 300ms var(--spring);
}
.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 300ms var(--spring);
}
.switch input:checked ~ .switch-track {
  background: var(--ninja);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.5),
    0 0 14px -2px rgba(34, 197, 94, 0.6);
}
.switch input:checked ~ .switch-track .switch-thumb {
  transform: translateX(20px);
}
.switch input:focus-visible ~ .switch-track {
  outline: 2px solid rgba(34, 197, 94, 0.4);
  outline-offset: 2px;
}
.switch input:disabled ~ .switch-track {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── Exchanger directory card (/exchangers) ─────────────────── */
.ex-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  color: white;
  transition: transform 400ms var(--spring), box-shadow 400ms var(--spring);
}
.ex-card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.3),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
    0 30px 60px -30px rgba(34, 197, 94, 0.4);
}
.ex-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ex-card-active {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
}
.ex-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ninja);
  box-shadow: 0 0 8px var(--ninja);
}
.ex-card-id {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.ex-card-id img {
  border-radius: 50%;
  background: #0a0e0d;
  box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.3);
  flex-shrink: 0;
}
.ex-card-name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ex-card-discord-id {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.ex-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.ex-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.3rem;
}
.ex-stat-value {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: white;
}
.ex-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-end;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ninja);
  transition: gap 300ms var(--spring);
}
.ex-card:hover .ex-card-cta { gap: 0.7rem; }

/* Podium-style rank badges — gold/silver/bronze for top 3. */
.rank-badge {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  padding: 0 0.5rem;
  height: 22px;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
}
.rank-badge--gold {
  background: linear-gradient(180deg, rgba(255, 204, 0, 0.2), rgba(255, 204, 0, 0.05));
  box-shadow: inset 0 0 0 1px rgba(255, 204, 0, 0.4);
  color: #ffd54f;
}
.rank-badge--silver {
  background: linear-gradient(180deg, rgba(200, 220, 230, 0.2), rgba(200, 220, 230, 0.05));
  box-shadow: inset 0 0 0 1px rgba(200, 220, 230, 0.4);
  color: #e0e8ee;
}
.rank-badge--bronze {
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.05));
  box-shadow: inset 0 0 0 1px rgba(205, 127, 50, 0.4);
  color: #e9a26e;
}

/* ─── Vouches list (/u/<id> page) ─────────────────────────────── */
.vouch-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.vouch-from {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
}
.vouch-from img {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #0a0e0d;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25);
}
.vouch-from .name {
  font-weight: 500;
  color: white;
}
.vouch-from .id {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  margin-left: auto;
}
.vouch-flow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--ninja);
  font-weight: 600;
}
.vouch-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ─── Fee calculator widget (/#fees) ─────────────────────────── */
.fee-calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 640px) { .fee-calc { grid-template-columns: 1fr; } }
.fee-calc-result {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.fee-calc-cell {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.fee-calc-cell-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.4rem;
}
.fee-calc-cell-value {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.fee-calc input[type="number"] {
  appearance: none;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: white;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  outline: none;
  font-family: inherit;
  transition: box-shadow 400ms var(--spring), background 400ms var(--spring);
}
.fee-calc input[type="number"]:focus {
  background-color: rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.5),
    0 0 0 4px rgba(34, 197, 94, 0.1);
}

/* Custom dropdown for the fee calculator — native <select> couldn't
   style its option list reliably (was rendering white-on-white).
   Built as a div-based combobox so the open menu inherits the glass
   aesthetic from the rest of the site. */
.calc-dropdown { position: relative; }
.calc-dropdown-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: white;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.85rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: box-shadow 400ms var(--spring), background 400ms var(--spring);
}
.calc-dropdown-toggle:hover { background: rgba(255, 255, 255, 0.045); }
.calc-dropdown-toggle.is-open {
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.5),
    0 0 0 4px rgba(34, 197, 94, 0.1);
}
.calc-dropdown-toggle i {
  color: var(--ninja);
  flex-shrink: 0;
  transition: transform 300ms var(--spring);
}
.calc-dropdown-toggle.is-open i { transform: rotate(180deg); }
.calc-dropdown-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 30;
  background: rgba(10, 14, 13, 0.98);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 60px -20px rgba(0, 0, 0, 0.75);
  padding: 0.4rem;
  max-height: 320px;
  overflow-y: auto;
  animation: calcDropdownIn 220ms var(--spring);
}
@keyframes calcDropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.calc-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: white;
  font-size: 0.88rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 200ms var(--spring), color 200ms var(--spring);
}
.calc-dropdown-item:hover { background: rgba(34, 197, 94, 0.1); }
.calc-dropdown-item.is-active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--ninja);
  font-weight: 600;
}
.calc-dropdown-item-meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.calc-dropdown-item.is-active .calc-dropdown-item-meta {
  color: var(--ninja);
}

/* ─── History detail modal ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 7, 6, 0.8);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms var(--spring);
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  width: 100%;
  max-width: 540px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    inset 0 1px 0 0 rgba(255,255,255,0.1),
    0 40px 80px -20px rgba(0,0,0,0.7);
  padding: 1.5rem 1.5rem 1.25rem;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 380ms var(--spring);
}
.modal-overlay.is-open .modal-card { transform: translateY(0) scale(1); }

/* Trade-detail modal party row — links to that user's /u/<id> page. */
.td-party {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: background 300ms var(--spring), transform 300ms var(--spring);
  color: white;
}
.td-party:hover {
  background: rgba(34, 197, 94, 0.07);
  transform: translateX(2px);
}
.td-party img {
  border-radius: 50%;
  background: #0a0e0d;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25);
  flex-shrink: 0;
}

.td-timeline-cell {
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.td-timeline-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.2rem;
}
.td-timeline-val {
  font-size: 0.7rem;
  color: white;
}

/* ─── Search results dropdown (/history page) ────────────────── */
.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: rgba(10, 14, 13, 0.95);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 20px 50px -20px rgba(0, 0, 0, 0.7);
  max-height: 360px;
  overflow-y: auto;
  z-index: 30;
  padding: 0.4rem;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  color: white;
  font-size: 0.85rem;
  transition: background 200ms var(--spring);
}
.search-result:hover { background: rgba(34, 197, 94, 0.08); }
.search-result img {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #0a0e0d;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
}
.search-result .name { font-weight: 500; }
.search-result .id { font-family: "JetBrains Mono", monospace; font-size: 0.7rem; color: rgba(255,255,255,0.35); }

/* ─── ToS / Rules page sections ───────────────────────────────── */
.tos-section {
  padding: 1.75rem 1.5rem;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
}
.tos-h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  color: white;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}
.tos-num {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ninja);
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
}
.tos-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.tos-list > li {
  position: relative;
  padding-left: 1.4rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.92rem;
  line-height: 1.6;
}
.tos-list > li::before {
  content: "›";
  position: absolute;
  left: 0.3rem;
  top: 0;
  color: var(--ninja);
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

/* ─── History page row ────────────────────────────────────────── */
.hist-row {
  display: grid;
  grid-template-columns: 100px 1fr 140px 60px 1fr 140px;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.5rem;
  transition: background 500ms var(--spring);
}
.hist-row:hover { background: rgba(34, 197, 94, 0.04); }

@media (max-width: 767px) {
  .hist-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 0.5rem 1rem;
    row-gap: 0.65rem;
  }
  .hist-row .hist-ticket { grid-column: 1 / -1; }
  .hist-row .hist-arrow { display: none; }
  .hist-row .hist-amt-send,
  .hist-row .hist-amt-recv { text-align: left; }
}

.hist-ticket { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.hist-ticket-id {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ninja);
  letter-spacing: 0.02em;
}
.hist-time { font-size: 0.7rem; color: rgba(255, 255, 255, 0.4); }

.hist-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.hist-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0a0e0d;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25);
  flex-shrink: 0;
}
.hist-profile-meta { min-width: 0; }
.hist-name {
  font-weight: 600;
  color: white;
  font-size: 0.85rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 11rem;
}
.hist-id {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11rem;
}

.hist-amt-send { text-align: right; }
.hist-amt-recv { text-align: right; }
.hist-amt {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: white;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.hist-method {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.hist-arrow {
  color: var(--ninja);
  display: grid;
  place-items: center;
}

/* ─── Fee rows ────────────────────────────────────────────────── */
.fee-row { transition: background 500ms var(--spring); }
.fee-row:hover { background: rgba(34, 197, 94, 0.04); }

/* ─── Grid background (animated) ──────────────────────────────── */
.grid-bg {
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.1) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  animation: gridDrift 22s linear infinite;
}
@keyframes gridDrift {
  from { background-position: -1px -1px; }
  to   { background-position: -65px -65px; }
}

/* ─── Film-grain overlay (tactile depth) ──────────────────────── */
.grain {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.04;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ─── Scroll reveal ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 900ms var(--spring), transform 900ms var(--spring), filter 900ms var(--spring);
  will-change: opacity, transform, filter;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ─── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(34, 197, 94, 0.22); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(34, 197, 94, 0.45); }

/* ─── Stagger entrance for dynamically-painted lists ──────────────
   Used by JS-hydrated lists where the items pop in together. The
   cascade is decorative — it makes the list feel "alive" instead of
   appearing as one flat block. Delays cap at 8 items so a 100-row
   list doesn't take 8 seconds to finish; later items just fade in
   with no delay. Per Emil's stagger rule: 30-80ms between items;
   short total duration; don't block interaction. */
@keyframes listItemIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hist-row,
.ex-card,
.profile-trade-row,
.activity-row,
.lb-row,
.method-chip,
.trade-row,
.admin-row {
  animation: listItemIn 420ms var(--ease-out) backwards;
}

.hist-row:nth-child(1),  .ex-card:nth-child(1),  .profile-trade-row:nth-child(1),
.activity-row:nth-child(1), .lb-row:nth-child(1), .method-chip:nth-child(1),
.trade-row:nth-child(1), .admin-row:nth-child(1) { animation-delay: 0ms; }
.hist-row:nth-child(2),  .ex-card:nth-child(2),  .profile-trade-row:nth-child(2),
.activity-row:nth-child(2), .lb-row:nth-child(2), .method-chip:nth-child(2),
.trade-row:nth-child(2), .admin-row:nth-child(2) { animation-delay: 35ms; }
.hist-row:nth-child(3),  .ex-card:nth-child(3),  .profile-trade-row:nth-child(3),
.activity-row:nth-child(3), .lb-row:nth-child(3), .method-chip:nth-child(3),
.trade-row:nth-child(3), .admin-row:nth-child(3) { animation-delay: 70ms; }
.hist-row:nth-child(4),  .ex-card:nth-child(4),  .profile-trade-row:nth-child(4),
.activity-row:nth-child(4), .lb-row:nth-child(4), .method-chip:nth-child(4),
.trade-row:nth-child(4), .admin-row:nth-child(4) { animation-delay: 105ms; }
.hist-row:nth-child(5),  .ex-card:nth-child(5),  .profile-trade-row:nth-child(5),
.activity-row:nth-child(5), .lb-row:nth-child(5), .method-chip:nth-child(5),
.trade-row:nth-child(5), .admin-row:nth-child(5) { animation-delay: 140ms; }
.hist-row:nth-child(6),  .ex-card:nth-child(6),  .profile-trade-row:nth-child(6),
.activity-row:nth-child(6), .lb-row:nth-child(6), .method-chip:nth-child(6),
.trade-row:nth-child(6), .admin-row:nth-child(6) { animation-delay: 175ms; }
.hist-row:nth-child(7),  .ex-card:nth-child(7),  .profile-trade-row:nth-child(7),
.activity-row:nth-child(7), .lb-row:nth-child(7), .method-chip:nth-child(7),
.trade-row:nth-child(7), .admin-row:nth-child(7) { animation-delay: 210ms; }
.hist-row:nth-child(n+8),  .ex-card:nth-child(n+8),  .profile-trade-row:nth-child(n+8),
.activity-row:nth-child(n+8), .lb-row:nth-child(n+8), .method-chip:nth-child(n+8),
.trade-row:nth-child(n+8), .admin-row:nth-child(n+8) { animation-delay: 240ms; }

/* ─── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .grid-bg,
  .animate-pulseSlow,
  .animate-scrollUp,
  .animate-ping,
  .animate-swapLoop,
  .animate-floatOrb { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  #rain { display: none; }
  /* Stagger + scale-on-press get nuked for users who've asked for
     reduced motion. Press still gets a color change via the existing
     hover styles, just no transform. */
  .hist-row, .ex-card, .profile-trade-row, .activity-row, .lb-row,
  .method-chip, .trade-row, .admin-row {
    animation: none !important;
  }
  button:active, a:active, .admin-action:active { transform: none !important; }
  /* Modals: skip the scale-in, fade only. */
  .modal-card { transform: none !important; }
  .calc-dropdown-panel { animation: none !important; }
}
