/* ==========================================================================
   wRelay — stylesheet

   Visual language ported from the fomo Perps front-end, retyped in a terminal
   monospace: Geist Mono everywhere, a deep-plum palette, glass panes, an
   animated ticker wall behind the page and a marquee strip of routable chains.

   Single file, no preprocessor, no build step.
   ========================================================================== */

/* ------------------------------------------------------------------ type */

/* Geist Mono — one variable file (22 KB, latin subset) covers 100–900, so the
   whole page is a single font request. No italic face ships with it; the
   browser synthesises an oblique for <em>, which is exactly what a terminal
   would do. Fallbacks are system monospace so the page still reads correctly
   if the font file is missing. */
@font-face {
  font-family: "Geist Mono";
  src: url(fonts/geist-mono-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- tokens */

:root {
  /* fomo Perps core tokens */
  --paper:       #150826;
  --ink:         #fff;
  --ink-60:      #ffffffa8;
  --ink-40:      #ffffff70;
  --ink-10:      #ffffff17;
  --purple:      #b98cff;
  --purple-soft: #2b1250;
  --surface:     #1b0d2e;
  --surface-hi:  #22133a;
  --line:        #ffffff12;
  --hair:        #ffffff12;
  --green:       #3ddc84;
  --red:         #ff6b6b;
  /* terminal type stack — all three roles are the same monospace */
  --mono:  "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans:  var(--mono);
  --serif: var(--mono);
  --pane-shadow: 0 1px 2px #0000002e, 0 18px 40px -32px #00000080;

  /* aliases — the component rules below read the same names they always did */
  --accent:      var(--purple);
  --accent-soft: #c9a6ff;
  --accent-dim:  var(--purple-soft);
  --bg:          var(--paper);
  --surface-2:   #1e1033;
  --surface-3:   var(--surface-hi);
  --line-2:      #ffffff22;
  --ink-2:       var(--ink-60);
  --muted:       var(--ink-40);
  --ok:          var(--green);
  --warn:        #f0c674;
  --err:         var(--red);
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --shadow: var(--pane-shadow);
  --font: var(--sans);
}

/* [hidden] must beat the display rules below — otherwise "hidden" panels show. */
[hidden] { display: none !important; }

* { box-sizing: border-box; margin: 0; padding: 0; }

a, button, input, textarea, select, [role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--purple); color: #150826; }

em, .it { font-style: italic; }

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--ink); }

code {
  font-family: var(--mono);
  font-size: .92em;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ ticker wall */

#wall {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

#wall .cell {
  position: absolute;
  font-family: var(--mono);
  color: var(--ink);
  opacity: .09;
  white-space: nowrap;
  contain: layout style paint;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1.5;
  transition: opacity .4s, background .4s;
}

#wall .cell .pixel {
  display: inline-block;
  vertical-align: middle;
  background: #ffffff47;
  border-radius: 2px;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  transition: background .35s, box-shadow .35s;
}

#wall .cell.lit  { opacity: .5; transition: opacity .15s; }
#wall .cell.hot  { opacity: 1; background: var(--purple); transition: opacity .1s, background .1s; }
#wall .cell.blip { opacity: .42; }
#wall .cell.hot .pixel { background: #150826; }

/* the pixel marks the native gas token (green) vs a bridged token (purple) */
#wall .cell.native  .pixel { background: var(--green); }
#wall .cell.bridged .pixel { background: var(--purple); }

#wall:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 0%, transparent 40%, var(--paper) 96%);
}

/* ------------------------------------------------------------- primitives */

.glass {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--pane-shadow);
}

.sheen { overflow: hidden; }

.wrap {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

main, footer { position: relative; z-index: 1; }

.mono-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-40);
}

/* Progressive enhancement: JS adds .rev-init so the page stays readable when
   the client script never runs. */
.reveal.rev-init {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .42s cubic-bezier(.2, .7, .2, 1), transform .42s cubic-bezier(.2, .7, .2, 1);
}

.reveal.rev-init.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- header */

.top {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 60;
  width: min(1200px, 100% - 28px);
  overflow: hidden;
  background: #1e1033;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px #0003, 0 20px 44px -34px #0009;
  transform: translate(-50%);
}

.bar {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 60px;
  padding: 0 8px 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: .01em;
}

.brand:hover { color: var(--ink); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--purple);
  border: 1px solid var(--ink);
  border-radius: 5px;
  transform: rotate(45deg) scale(.82);
  flex: 0 0 auto;
}

.brand-mark i {
  color: #150826;
  font-family: var(--serif);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-45deg);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 22px; font-weight: 400; letter-spacing: .01em; }

.brand-text small {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-40);
}

/* contract address, on its own row inside the fixed header */
.ca-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 24px;
  background: #170b28;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.ca-bar .ca-label { flex: 0 0 auto; color: var(--purple); }

.ca-bar code {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-bar .link { flex: 0 0 auto; padding: 0 0 0 4px; }

.bar nav { display: flex; align-items: center; gap: 6px; }

.bar nav a {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--ink-60);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background .14s, border-color .14s, color .14s, transform .1s;
}

.bar nav a:hover {
  color: var(--ink);
  background: #ffffff0d;
  border-color: var(--line);
}

.bar nav a:active { transform: scale(.97); }

/* Icon-only social link. Inherits the text links' hit area, so it lines up with
   them vertically, but drops the wide letter-spacing that would pad the glyph. */
.bar nav a.nav-x { padding: 10px 12px; }
.bar nav a.nav-x svg { display: block; width: 14px; height: 14px; }

/* status chips in the bar */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #ffffff08;
  color: var(--ink-60);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-40);
  flex: 0 0 auto;
}

.chip-ok   { color: #c8f7dd; border-color: #3ddc8459; }
.chip-ok::before   { background: var(--green); box-shadow: 0 0 8px var(--green); }

.chip-warn { color: #ffe9bd; border-color: #f0c67459; }
.chip-warn::before { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

/* --------------------------------------------------------------- buttons */

.btn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: 0 0;
  padding: 19px 34px;
  cursor: pointer;
  white-space: nowrap;
  appearance: none;
  transition: background .16s, border-color .16s, color .16s, transform .1s, opacity .16s;
}

.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

.btn-ghost {
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--ink-60);
  background: 0 0;
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--ink);
  background: #ffffff0d;
  border-color: var(--line);
}

/* the one solid call-to-action in the bar */
.launch {
  margin-left: 8px;
  color: #150826;
  background: var(--purple);
  border-color: var(--purple);
}

.launch:hover:not(:disabled) {
  color: #150826;
  background: #c9a6ff;
  border-color: #c9a6ff;
}

.btn-primary {
  width: 100%;
  margin-top: 20px;
  padding: 19px 34px;
  font-size: 12px;
  color: #150826;
  background: var(--purple);
  border-color: var(--purple);
  border-radius: 14px;
  box-shadow: 0 14px 34px -16px #b98cffa6;
}

.btn-primary:hover:not(:disabled) {
  color: #150826;
  background: #c9a6ff;
  border-color: #c9a6ff;
}

.link {
  font: inherit;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--purple);
  background: none;
  border: 0;
  padding: 0 0 0 8px;
  cursor: pointer;
  transition: color .15s;
}

.link:hover { color: #c9a6ff; }

/* ------------------------------------------------------------------ hero */

.hero { padding: 170px 0 90px; text-align: center; }

.hero h1 {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  /* monospace advance is ~0.6em/char vs Aeonik's ~0.5em, so the display sizes
     come down to keep the longest headline row on one line at 1280px+ and
     inside the viewport at 390px. */
  font-size: clamp(19px, 4.25vw, 54px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.03em;
}

.hero h1 .row { display: block; }

.hero h1 em { font-style: italic; color: var(--purple); }

.hero h1 .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(.4em);
  animation: rise .9s cubic-bezier(.16, .8, .2, 1) forwards;
}

@keyframes rise { to { opacity: 1; transform: none; } }

.hero .lede {
  max-width: 560px;
  margin: 40px auto 0;
  color: var(--ink-60);
  font-size: 17px;
  line-height: 1.7;
}

.hero .lede em { font-family: var(--serif); color: var(--ink); font-size: 1.1em; }

.hero-note {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--ink-40);
  font-size: 13.5px;
  line-height: 1.65;
}

.hero-note code { background: #ffffff14; padding: 2px 6px; border-radius: 5px; }

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 46px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.hero-foot span {
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.hero-foot span b { color: var(--ink); font-weight: 700; }

/* ---------------------------------------------------------------- strip */

.strip {
  position: relative;
  overflow: hidden;
  /* the bottom value is the gap to the route card below — the strip used to
     butt straight up against it. */
  margin: 0 clamp(16px, 3vw, 44px) clamp(72px, 8vw, 120px);
  padding: 34px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.strip-track {
  display: flex;
  width: max-content;
  animation: slide 30s linear infinite;
}

@keyframes slide { to { transform: translate(-50%); } }

.strip-item {
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0 34px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.strip-item:after {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--purple);
  border: 1px solid var(--ink);
  border-radius: 2px;
  transform: rotate(45deg);
}

.strip-item em { color: var(--ink-60); }

/* ---------------------------------------------------------- section head */

.sec-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin: 130px 0 56px;
}

.sec-title h2 {
  max-width: 100%;
  font-family: var(--serif);
  font-size: clamp(22px, 3.8vw, 48px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.sec-title h2 em { font-style: italic; color: var(--purple); }

/* ----------------------------------------------------------------- cards */

.card {
  position: relative;
  margin-bottom: 18px;
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--pane-shadow);
}

.card-main {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  padding: 18px 16px 22px;
}

.card-sm { padding: 36px 32px; }

.card-title {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.card-sub {
  margin: -8px 0 16px;
  font-size: 13px;
  color: var(--ink-60);
}

#stepsCard, #statusCard { max-width: 600px; margin-left: auto; margin-right: auto; }

.cols {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 26px;
  margin-top: 8px;
}

.cols .card {
  width: min(440px, 100%);
  margin-bottom: 0;
  transition: transform .32s cubic-bezier(.2, .8, .2, 1), background .18s;
}

.cols .card:first-child { z-index: 1; transform: rotate(-1.8deg) translateY(10px); }
.cols .card:last-child  { z-index: 2; transform: rotate(1.8deg) translateY(-6px); }

/* with a single card the two rules above would both apply — keep it upright */
.cols .card:only-child { transform: none; }

.cols .card:hover {
  z-index: 5;
  background: var(--surface-hi);
  transform: rotate(0) translateY(-8px);
}

/* ------------------------------------------------------------------ legs */

.leg {
  padding: 16px 16px 12px;
  background: var(--surface-hi);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .16s;
}

.leg:focus-within { border-color: #b98cff80; }

.leg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 18px;
  margin-bottom: 12px;
}

.leg-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.leg-side {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ink-40);
}

.balance { font-variant-numeric: tabular-nums; }

.leg-body { display: flex; align-items: center; gap: 12px; }

.leg-inputs { flex: 1; min-width: 0; text-align: right; }

.amt {
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(18px, 3.6vw, 28px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.03em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.amt::placeholder { color: #ffffff2e; }
.amt-out { color: var(--ink-60); }

.amt-sub {
  display: block;
  min-height: 16px;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--ink-40);
  font-variant-numeric: tabular-nums;
}

.leg-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }

.token-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 9px 14px 9px 9px;
  background: #ffffff0b;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .1s;
}

.token-btn:hover { background: #ffffff14; border-color: var(--line-2); }
.token-btn:active { transform: scale(.98); }

.token-btn .caret { font-size: 9px; color: var(--ink-40); }

.tok-logo {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff14;
  background-size: cover;
  background-position: center;
  color: var(--ink-60);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  flex: 0 0 auto;
}

.tok-sym { white-space: nowrap; }

.chain-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: 0 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink-60);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
}

.chain-btn:hover {
  color: var(--ink);
  background: #ffffff0d;
  border-color: var(--line-2);
}

.chain-btn .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
  flex: 0 0 auto;
}

.flip {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -8px auto;
  background: var(--purple);
  border: 1px solid var(--purple);
  border-radius: 14px;
  color: #150826;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 12px 28px -14px #b98cffb3;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), background .16s;
}

.flip:hover { background: #c9a6ff; transform: rotate(180deg); }

/* -------------------------------------------------------------- advanced */

.adv {
  margin-top: 16px;
  background: #ffffff08;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.adv > summary {
  padding: 13px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-40);
  cursor: pointer;
  list-style: none;
  transition: color .14s;
}

.adv > summary:hover { color: var(--ink); }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary::before { content: "▸ "; }
.adv[open] > summary::before { content: "▾ "; }

.adv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 16px 16px;
}

.field { display: block; }

.field > span {
  display: block;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.field em {
  font-style: italic;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--ink-40);
}

.field input,
.field select {
  width: 100%;
  padding: 11px 13px;
  background: #ffffff0b;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: background .16s, border-color .16s;
}

.field input:focus,
.field select:focus { background: #ffffff12; border-color: #b98cff80; }

.field input::placeholder { color: #ffffff59; }

/* ----------------------------------------------------------------- quote */

.quote {
  margin-top: 16px;
  padding: 16px 16px 14px;
  background: #ffffff08;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.q-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.q-op {
  padding: 5px 11px;
  background: var(--purple);
  border: 1px solid var(--purple);
  border-radius: 12px;
  color: #150826;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.q-time {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.q-rows { display: grid; grid-template-columns: 1fr auto; gap: 9px 16px; }

.q-rows dt {
  min-width: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.q-rows dd {
  margin: 0;
  font-size: 13.5px;
  text-align: right;
  color: var(--ink);
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.q-rows dd.good { color: var(--green); }
.q-rows dd.bad  { color: var(--red); }
.q-rows dd.warn { color: var(--warn); }

.q-fees { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); }

.q-fees > summary {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-40);
  cursor: pointer;
  list-style: none;
  transition: color .14s;
}

.q-fees > summary:hover { color: var(--ink); }
.q-fees > summary::-webkit-details-marker { display: none; }
.q-fees > summary::before { content: "▸ "; }
.q-fees[open] > summary::before { content: "▾ "; }
.q-fees .q-rows { margin-top: 12px; }

/* -------------------------------------------------------------- messages */

.msg {
  margin: 16px 0 0;
  padding: 12px 15px;
  border: 1px solid;
  border-radius: var(--r-md);
  font-size: 13.5px;
  line-height: 1.6;
}

.msg-info { color: #e2d4ff; background: #b98cff1a; border-color: #b98cff59; }
.msg-err  { color: #ffd5d5; background: #ff6b6b1a; border-color: #ff6b6b59; }
.msg-ok   { color: #c8f7dd; background: #3ddc841a; border-color: #3ddc8459; }
.msg-warn { color: #ffe9bd; background: #f0c6741a; border-color: #f0c67459; }

.fine {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-40);
}

.fine code { background: #ffffff14; padding: 2px 6px; border-radius: 5px; color: var(--ink-60); }

/* ----------------------------------------------------------------- steps */

.steps { list-style: none; }

.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--hair);
}

.step:first-child { border-top: 0; }

.step-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #ffffff0f;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-40);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.step[data-state="active"] .step-mark {
  background: var(--purple);
  border-color: var(--purple);
  color: #150826;
}

.step[data-state="done"] .step-mark {
  background: #3ddc8426;
  border-color: #3ddc8480;
  color: var(--green);
}

.step[data-state="error"] .step-mark {
  background: #ff6b6b26;
  border-color: #ff6b6b80;
  color: var(--red);
}

.step-body { min-width: 0; }
.step-name { font-size: 14px; font-weight: 700; }
.step-desc { margin-top: 3px; font-size: 12.5px; line-height: 1.6; color: var(--ink-60); }

.step-meta {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--ink-40);
  word-break: break-all;
}

.step-meta a { color: var(--purple); }

.step-act { margin-top: 10px; }
.step-act .btn { padding: 9px 16px; font-size: 10.5px; }

/* ---------------------------------------------------------------- status */

.status-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.pill {
  padding: 6px 13px;
  background: #ffffff0b;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-60);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.pill[data-tone="pending"] { color: #ffe9bd; background: #f0c6741a; border-color: #f0c67473; }
.pill[data-tone="ok"]      { color: #c8f7dd; background: #3ddc841a; border-color: #3ddc8473; }
.pill[data-tone="bad"]     { color: #ffd5d5; background: #ff6b6b1a; border-color: #ff6b6b73; }

.rid {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--ink-40);
}

/* ------------------------------------------------------------------ misc */

.how { padding-left: 20px; font-size: 13.5px; line-height: 1.7; color: var(--ink-60); }
.how li { margin-bottom: 7px; }
.how b { color: var(--ink); font-weight: 700; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; font-size: 13px; }

.kv dt {
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.kv dd {
  margin: 0;
  font-size: 12.5px;
  text-align: right;
  color: var(--ink-60);
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- footer */

footer {
  margin-top: 110px;
  background: #180a2b;
  border-top: 1px solid var(--hair);
}

.foot {
  display: grid;
  grid-template-columns: 1.5fr auto auto;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.foot > div { padding: 48px 34px; border-left: 1px solid var(--hair); }
.foot > div:first-child { padding-left: 0; border-left: none; }

.foot h4 {
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.foot a {
  display: block;
  padding: 5px 0;
  color: var(--ink-60);
  font-size: 14px;
  transition: color .15s;
}

.foot a:hover { color: var(--ink); font-style: italic; }

.foot .fb { margin-bottom: 12px; font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.foot .fp { max-width: 300px; color: var(--ink-60); font-size: 13.5px; line-height: 1.65; }
.foot .fi { display: block; padding: 5px 0; color: var(--ink-60); font-size: 13.5px; }

.foot-base {
  border-top: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.foot-base .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 26px;
}

/* ----------------------------------------------------------------- modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-back {
  position: absolute;
  inset: 0;
  background: #0b0413bf;
  backdrop-filter: blur(8px);
}

.modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(480px, 100%);
  max-height: min(78vh, 660px);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px -20px #000000b3;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--hair);
}

.modal-head h3 { font-family: var(--serif); font-size: 16.5px; font-weight: 500; letter-spacing: -.02em; }

.modal-head .x {
  width: 34px;
  height: 34px;
  background: #ffffff0b;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-60);
  font-size: 12px;
  cursor: pointer;
  transition: background .14s, color .14s;
}

.modal-head .x:hover { background: #ffffff1a; color: var(--ink); }

.modal-body { padding: 18px 20px 22px; overflow: auto; min-height: 0; }

.search {
  width: 100%;
  margin-bottom: 14px;
  padding: 13px 15px;
  background: #ffffff0b;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: background .16s, border-color .16s;
}

.search:focus { background: #ffffff12; border-color: #b98cff80; }
.search::placeholder { color: #ffffff59; }
.search::-webkit-search-cancel-button { filter: invert(.6); }

.list { display: flex; flex-direction: column; gap: 2px; }

/* Scoped to .list: the hero headline also uses .row (see `.hero h1 .row`), and an
   unscoped rule leaked its 11px/12px padding + 1px border onto the h1, which
   squeezed the headline's line box and made it wrap one word early. */
.list .row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}

.list .row:hover,
.list .row:focus-visible { background: var(--surface-hi); border-color: var(--line); outline: none; }

.list .row[aria-selected="true"] { background: #b98cff26; border-color: #b98cff59; }

.row-logo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #ffffff14;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  color: var(--ink-60);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  flex: 0 0 auto;
}

.row-main { flex: 1; min-width: 0; }

.row-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--ink-40);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-tag {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-40);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.row-tag.native { color: #150826; background: var(--purple); border-color: var(--purple); }
.row-tag.same   { color: var(--ink-60); border-color: #ffffff3d; }

.empty { padding: 26px 8px; text-align: center; font-size: 13px; color: var(--ink-40); }

.spin {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border: 2px solid #ffffff4d;
  border-top-color: var(--purple);
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ responsive */

@media (max-width: 960px) {
  .cols { flex-direction: column; align-items: center; gap: 22px; }
  .cols .card { width: min(560px, 100%); }
  .cols .card:first-child { transform: rotate(-1.4deg); }
  .cols .card:last-child  { transform: rotate(1.4deg); }

  .foot { grid-template-columns: 1fr; }
  .foot > div { padding: 26px 0; border-left: none; border-top: 1px solid var(--hair); }
  .foot > div:first-child { border-top: none; }
  .foot .fp { max-width: none; }
}

@media (max-width: 860px) {
  .bar nav > a { display: none; }
  /* the social icon is compact enough to survive the mobile nav collapse */
  .bar nav > a.nav-x { display: flex; }
  .brand-text small { display: none; }
  .sec-title { margin-top: 96px; }
}

@media (max-width: 620px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 140px 0 60px; }
  .hero .lede { font-size: 15.5px; }
  .chip { padding: 8px 11px; font-size: 9px; letter-spacing: .12em; }
  .btn-ghost { padding: 8px 13px; font-size: 10px; }
  .brand-text strong { font-size: 18px; }
  .card { padding: 24px 18px; }
  .card-main { padding: 14px 12px 18px; }
  .card-sm { padding: 26px 20px; }
  .adv-grid { grid-template-columns: 1fr; }
  .sec-title h2 { font-size: clamp(20px, 7.5vw, 34px); }
  .leg-body { gap: 10px; }
  .token-btn { padding: 8px 11px 8px 8px; font-size: 11px; }
  .tok-logo { width: 23px; height: 23px; }
  .strip { padding: 24px 0; margin-bottom: 56px; }
  .strip-item { gap: 24px; padding: 0 24px; font-size: 17px; }
  .foot-base .wrap { flex-direction: column; gap: 8px; }
}

@media (max-width: 400px) {
  #chipNet, #chipKey { display: none; }
  .bar { padding: 0 6px 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, :before, :after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .hero h1 .w, .reveal.rev-init { opacity: 1; transform: none; }
}
