:root {
  --ink-0: oklch(.17 .012 250);
  --ink: oklch(.25 .042 248);
  --ink-2: color-mix(in srgb, var(--ink) 70%, transparent);
  --ink-3: color-mix(in srgb, var(--ink) 48%, transparent);
  --ink-4: color-mix(in srgb, var(--ink) 30%, transparent);
  --line: color-mix(in srgb, var(--ink) 9%, transparent);
  --sheet: oklch(.985 .005 240);
  --card: oklch(.955 .012 240);
  --accent: oklch(.5 .085 245);
  --up: #1f8a5c;
  --down: #b0573c;
  --night: oklch(.22 .035 248);

  --display: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gut: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh;
  font: 400 15px/1.55 var(--sans); color: var(--ink);
  background: #b6cfe7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
b { font-weight: 500; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 999px; }

/* ——— the sea ——— */
.photo {
  position: fixed; inset: 0; z-index: 0;
  background: url(ocean.jpg) center top / auto max(106vh, 33.35vw) no-repeat, #b6cfe7;
}
#sea { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; opacity: 0; transition: opacity 1s var(--ease); }
.sea-on #sea { opacity: 1; }
.no-gl #sea { display: none; }

/* ——— top ——— */
.top { position: fixed; inset: 0 0 auto; z-index: 6; display: flex; align-items: center; justify-content: space-between; padding: 20px var(--gut); }
.brand { display: inline-flex; align-items: center; gap: 10px; height: 36px; border-radius: 999px; }
.brand svg { width: 15px; height: 18px; }
.brand span { font: 400 17px/1 var(--display); font-stretch: 125%; color: var(--ink-0); }
.top-r { display: flex; align-items: center; gap: 18px; }
.tick { display: flex; gap: 16px; font: 400 12px/1 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tick b { color: var(--ink); font-weight: 500; }
.acct b { font-weight: 500; color: var(--ink); }
.acct { height: 36px; padding: 0 14px 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 9px; background: color-mix(in srgb, var(--sheet) 72%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font: 400 12px var(--mono); transition: background .2s; }
.acct:hover { background: var(--sheet); }
.acct i { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 18%, transparent); }

/* ——— the gate ——— */
main { position: relative; z-index: 3; }
.gate {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(78px, 12.5svh, 128px) var(--gut) 0;
  transition: opacity .8s var(--ease), transform 1.1s var(--ease), filter .8s var(--ease);
}
.portal { position: relative; width: clamp(118px, 12vw, 158px); aspect-ratio: 1; transition: transform 1.2s var(--ease), opacity .9s var(--ease); }
.portal canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.portal-svg { display: none; position: absolute; inset: 14%; width: 72%; height: 72%; }
.no-portal .portal canvas { display: none; }
.no-portal .portal-svg { display: block; }

.word {
  margin: clamp(8px, 1.6svh, 16px) 0 0;
  font: 400 clamp(60px, 8.6vw, 124px)/1 var(--display);
  font-stretch: 125%;
  letter-spacing: -.005em;
  color: var(--ink-0);
}
.lede { margin: clamp(18px, 3svh, 28px) 0 0; max-width: 680px; font-size: clamp(15px, 1.25vw, 17px); line-height: 1.55; color: var(--ink-2); text-wrap: balance; }
.cta {
  margin-top: clamp(24px, 4svh, 36px);
  display: inline-flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 28px 0 32px; border-radius: 999px;
  background: color-mix(in srgb, var(--night) 90%, transparent);
  border: 1px solid rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #f1f5f9;
  font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  transition: transform .5s var(--ease), background .3s;
}
.cta svg { width: 16px; height: 16px; transition: transform .5s var(--ease); }
.cta:hover { background: var(--night); transform: translateY(-1px); }
.cta:hover svg, .cta:focus-visible svg { transform: translateX(3px); }
.cta:active { transform: scale(.985); }
.cta:disabled { cursor: default; }
.cta .spin { width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.note { margin: 20px 0 0; min-height: 20px; font: 400 12px/1.6 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.note b { color: var(--ink-2); font-weight: 500; }
.note a { color: var(--ink); }
.note .err { color: var(--down); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; margin-right: 9px; vertical-align: 1px; transition: background .4s, opacity .4s; }
.dot.live { background: var(--up); opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 18%, transparent); }

body.inside .gate { opacity: 0; transform: translateY(-24px) scale(.985); filter: blur(8px); pointer-events: none; }
body.inside .portal { transform: scale(1.5); opacity: 0; }
body.inside-done .gate { visibility: hidden; }

.foot {
  position: fixed; inset: auto 0 0; z-index: 2;
  padding: 16px var(--gut) max(16px, env(safe-area-inset-bottom));
  text-align: center; font: 400 11px/1.5 var(--mono); color: rgba(255, 255, 255, .62);
  transition: opacity .5s;
}

/* ——— the room ——— */
.card {
  position: relative; width: 100%;
  border-radius: 28px;
  background: color-mix(in srgb, var(--sheet) 88%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.1); backdrop-filter: blur(24px) saturate(1.1);
  overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.98);
  transition: opacity .8s var(--ease), transform 1s var(--ease);
}
.room.show .card { opacity: 1; transform: none; }
.pane { padding: 18px 18px 18px; }

.head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.tabs { display: flex; gap: 4px; }
.tabs button { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-3); transition: color .2s, background .3s var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); background: var(--card); }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); transition: background .2s, color .2s; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--card); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.slip { display: flex; justify-content: space-between; align-items: center; margin: -4px 2px 12px; font-size: 12.5px; color: var(--ink-3); animation: fade .4s var(--ease); }
.slip-b { display: inline-flex; gap: 2px; }
.slip-b button { height: 26px; padding: 0 10px; border-radius: 999px; font: 400 12px var(--mono); color: var(--ink-3); }
.slip-b button[aria-pressed="true"] { background: var(--card); color: var(--ink); }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; padding: 9px 9px 9px 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 10%, var(--sheet)); font-size: 13px; }
.banner button { flex: none; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: var(--sheet); font-size: 12.5px; font-weight: 500; }
.banner.warn { display: block; background: color-mix(in srgb, var(--down) 12%, var(--sheet)); }

.io { position: relative; border-radius: 22px; background: var(--card); }
.leg { padding: 14px 16px 12px 18px; }
.leg + .flip + .leg { border-top: 1px solid var(--line); }
.leg-top, .leg-bot { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 20px; font-size: 12.5px; color: var(--ink-3); }
.bal { font: 400 11.5px var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
button.bal:hover { color: var(--ink); }
.leg-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.leg-row input, .leg-row .out {
  flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: none; padding: 0;
  font: 400 34px/46px var(--mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.leg-row input::placeholder { color: var(--ink-4); }
.out.dim { color: var(--ink-4); }
.out.loading { color: var(--ink-3); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.flip { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--sheet); color: var(--ink-3); z-index: 1; }
.flip svg { width: 15px; height: 15px; }
.tok { flex: none; height: 40px; padding: 0 12px 0 6px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; background: var(--sheet); font-size: 14.5px; font-weight: 500; transition: box-shadow .2s; }
.tok:not(.fixed):hover { box-shadow: inset 0 0 0 1px var(--ink-4); }
.tok.fixed { cursor: default; }
.tok .chev { width: 10px; height: 10px; color: var(--ink-3); }
.logo { position: relative; width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--ink) 10%, var(--sheet)); font: 500 9.5px var(--mono); color: var(--ink-2); }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.logo.sol { background: linear-gradient(140deg, #9a4dff, #19e3a0); }
.logo.sol svg { width: 62%; height: 62%; }
.chips { display: inline-flex; gap: 4px; }
.chips button { height: 24px; padding: 0 9px; border-radius: 999px; font: 400 11.5px var(--mono); color: var(--ink-3); background: var(--sheet); transition: color .2s; }
.chips button:hover { color: var(--ink); }
.impact { font: 400 11.5px var(--mono); font-variant-numeric: tabular-nums; }
.impact.bad { color: var(--down); }

.btn {
  width: 100%; height: 54px; margin-top: 12px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--night); color: #f1f5f9; font-size: 15px; font-weight: 500; text-decoration: none;
  transition: transform .4s var(--ease), opacity .2s, background .2s;
}
.btn:active:not(:disabled) { transform: scale(.985); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.ghost { background: var(--card); color: var(--ink); }
.btn .spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.meta { margin: 12px 4px 2px; text-align: center; font: 400 11.5px/1.5 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; text-wrap: balance; }
.meta.err { color: var(--down); font-family: var(--sans); font-size: 12.5px; }

.hold { margin: 0 0 12px; padding: 12px 14px 12px 16px; border-radius: 20px; background: color-mix(in srgb, var(--up) 7%, var(--card)); animation: fade .5s var(--ease); }
.hold-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 12.5px; color: var(--ink-3); }
.hold-top b { font: 500 13px var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
#holdList { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
#holdList button { height: 32px; padding: 0 12px 0 4px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; background: var(--sheet); font: 400 12.5px var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums; transition: box-shadow .2s; }
#holdList button:hover { box-shadow: inset 0 0 0 1px var(--ink-4); }
#holdList .logo { width: 24px; height: 24px; }
.load-acct { display: block; margin: -2px auto 12px; font-size: 12.5px; color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 3px; }
.load-acct:hover { color: var(--ink); }
.result small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }

/* run */
.run-k { margin: 4px 2px 0; font: 400 11px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; }
.pane h3 { margin: 6px 2px 16px; font: 400 24px/1.15 var(--display); font-stretch: 110%; letter-spacing: -.01em; text-wrap: balance; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: start; padding: 12px 2px; border-top: 1px solid var(--line); }
.steps .st { width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--ink-4); position: relative; }
.steps li.active .st { border-color: var(--ink); border-right-color: transparent; animation: spin .9s linear infinite; }
.steps li.done .st { border-color: var(--up); background: var(--up); }
.steps li.done .st::after { content: ''; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.steps li.fail .st { border-color: var(--down); background: var(--down); }
.steps li.fail .st::after { content: '!'; position: absolute; inset: 0; color: #fff; font: 600 11px/15px var(--sans); text-align: center; }
.steps .lbl { font-size: 14.5px; }
.steps li.pending .lbl { color: var(--ink-3); }
.steps .det { display: block; margin-top: 2px; font: 400 11.5px/1.5 var(--mono); color: var(--ink-3); word-break: break-word; }
.steps .det a { color: var(--ink-2); }
.steps .time { font: 400 11.5px var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 3px; }
.result { margin: 16px 2px 0; }
.result b { display: block; font: 400 32px/1.1 var(--mono); letter-spacing: -.04em; color: var(--up); font-variant-numeric: tabular-nums; }
.result span { font-size: 13px; color: var(--ink-3); }
.run-msg { margin: 12px 2px 0; font-size: 13.5px; color: var(--ink-2); }
.run-msg:empty { display: none; }


/* ——— Pulse: the trading terminal ——— */
.room {
  /* the room runs on its own dark tokens; the trade card inherits them */
  --bg: oklch(.155 .014 245); --panel: oklch(.18 .016 245); --raise: oklch(.215 .018 245); --raise-2: oklch(.25 .02 245);
  --ink: #e8edf2; --ink-2: rgba(232, 237, 242, .68); --ink-3: rgba(232, 237, 242, .46); --ink-4: rgba(232, 237, 242, .26);
  --line: rgba(255, 255, 255, .075); --sheet: var(--panel); --card: var(--raise);
  --acc: #5fd3a6; --mc: #8cc4ff; --up: #45cf95; --down: #f06e5c; --accent: var(--acc);
  position: fixed; inset: 0; z-index: 4; display: block; padding: 0; overflow: hidden;
  background: var(--bg); color: var(--ink);
  opacity: 0; transition: opacity .5s var(--ease);
}
.room.show { opacity: 1; }
body.inside-done .top, body.inside-done .foot, body.inside-done .gate { visibility: hidden; }
.pad { position: absolute; inset: 0; display: grid; grid-template-rows: 56px auto minmax(0, 1fr); }
.pad-top { display: flex; align-items: center; gap: 14px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.pad-home { display: inline-flex; align-items: center; gap: 9px; height: 36px; color: var(--ink); }
.pad-home svg { width: 14px; height: 17px; }
.pad-home span { font: 400 17px/1 var(--display); font-stretch: 125%; }
.pad-nav { display: flex; gap: 2px; padding-left: 12px; border-left: 1px solid var(--line); }
.pad-nav button { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); transition: color .15s, background .15s; }
.pad-nav button:hover { color: var(--ink); }
.pad-nav button[aria-current="page"] { color: var(--ink); background: var(--raise); }
.mine { display: flex; flex-direction: column; min-height: 0; max-width: 980px; width: 100%; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.mine[hidden] { display: none; }
.mine-row { grid-template-columns: 66px minmax(0, 1fr) auto; }
.mine-row .av .logo { width: 100%; height: 100%; border-radius: 0; }
.mine-act { display: inline-flex; gap: 6px; }
.qbtn.sell { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--down) 32%, transparent); }
.col-tabs.off { display: none !important; }
.pad-search { flex: 0 1 420px; min-width: 0; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 10px; background: var(--raise); color: var(--ink-3); }
.pad-search svg { width: 15px; height: 15px; flex: none; }
.pad-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font-size: 13.5px; }
.pad-search:focus-within { box-shadow: inset 0 0 0 1px var(--ink-4); }
.pad-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.qb { height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 10px; border-radius: 10px; background: var(--raise); font: 400 13px var(--mono); color: var(--ink-3); }
.qb svg { width: 14px; height: 14px; color: var(--acc); }
.qb input { width: 52px; border: 0; outline: 0; background: none; color: var(--ink); font: 500 13.5px var(--mono); text-align: right; }
.qb:focus-within { box-shadow: inset 0 0 0 1px var(--ink-4); }
.pad-chip { height: 36px; padding: 0 12px; border-radius: 10px; background: var(--raise); font: 400 12.5px var(--mono); color: var(--ink-2); }
.pad-chip:hover { color: var(--ink); }
.pad-dep { height: 36px; padding: 0 16px; border-radius: 10px; background: var(--acc); color: #04140d; font-size: 13.5px; font-weight: 600; }
.pad-dep:hover { filter: brightness(1.06); }
.pad-wd { height: 36px; padding: 0 14px; border-radius: 10px; background: var(--raise); color: var(--ink); font-size: 13.5px; font-weight: 600; }
.pad-wd:hover { background: var(--raise-2); }
.wd-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 12px; background: var(--card); margin: 4px 0 14px; }
.wd-tabs button { height: 34px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.wd-tabs button[aria-selected="true"] { background: var(--raise-2); color: var(--ink); }
.wd { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.wd-l { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.wd-in { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: 14px; background: var(--card); }
.wd-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 400 22px var(--mono); color: var(--ink); }
.wd-in span { font: 400 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
.wd-sel { height: 46px; border-radius: 14px; border: 0; background: var(--card); color: var(--ink); padding: 0 12px; font: inherit; font-size: 14px; }
.wd .btn { margin-top: 6px; }
.wd-fine { margin: 2px 2px 0; font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.wd-ready { padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--acc) 10%, var(--raise)); }
.wd-ready p { margin: 0; font-size: 13.5px; }
.wd-list { list-style: none; margin: 8px 0 0; padding: 0; }
.wd-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); font: 400 12px var(--mono); color: var(--ink-2); }
.wd-list li b { color: var(--ink); font-weight: 500; }
.wd-list li .ok { color: var(--acc); }
.pad-acct { height: 36px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; background: var(--raise); font: 400 12.5px var(--mono); color: var(--ink); white-space: nowrap; }
.pad-acct i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.pad-acct.on i { background: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 20%, transparent); }
.pad-acct b { color: var(--acc); font-weight: 500; }

.col-tabs { display: none; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 0; }
.col { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--line); }
.col:last-child { border-right: 0; }
.col-h { flex: none; height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.col-h b { font-size: 14.5px; font-weight: 600; }
.col-n { font: 400 12px var(--mono); color: var(--ink-3); }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.live.on { background: var(--acc); animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc) 0%, transparent); } 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 45%, transparent); } }
.col-q { margin-left: auto; height: 26px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--acc) 16%, transparent); color: var(--acc); font: 500 12px var(--mono); }
.col-list { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 0; scrollbar-width: thin; scrollbar-color: var(--raise-2) transparent; }
.col-note { padding: 28px 18px; font-size: 13px; color: var(--ink-3); }

.row { position: relative; display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; gap: 14px; padding: 13px 14px 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.row:hover { background: rgba(255, 255, 255, .025); }
.row.sel { background: rgba(255, 255, 255, .045); }
.row.fresh { animation: rowIn 1.6s var(--ease); }
@keyframes rowIn { 0% { background: color-mix(in srgb, var(--acc) 16%, transparent); } 100% { background: transparent; } }
.row.tick .mc b { animation: tick .9s ease-out; }
@keyframes tick { 0% { color: var(--acc); } }
.av { position: relative; width: 66px; height: 66px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; font: 600 19px var(--mono); letter-spacing: -.02em; color: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mid { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.l1 { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.l1 .t { font-size: 15.5px; font-weight: 600; white-space: nowrap; }
.l1 .n { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cp { flex: none; width: 22px; height: 22px; margin: -4px 0; border-radius: 6px; display: grid; place-items: center; color: var(--ink-4); }
.cp:hover { color: var(--ink); background: var(--raise); }
.cp svg { width: 13px; height: 13px; }
.l2 { display: flex; align-items: center; gap: 12px; font: 400 12.5px var(--mono); color: var(--ink-2); white-space: nowrap; }
.l2 .age { color: var(--acc); font-weight: 500; }
.l2 .age.old { color: var(--ink-2); }
.l2 i { font-style: normal; color: var(--ink-3); }
.l2 .b { color: var(--up); } .l2 .s { color: var(--down); }
.l3 { font: 400 11.5px var(--mono); color: var(--ink-4); white-space: nowrap; }
.sos { display: inline-flex; align-items: center; gap: 7px; }
.so { width: 16px; height: 16px; display: inline-grid; place-items: center; color: var(--ink-3); transition: color .15s; }
.so:hover { color: var(--ink); }
.so svg { width: 14px; height: 14px; }
.coin-meta .so { width: auto; height: auto; }
.rt { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 4px; text-align: right; }
.mc { font: 400 11.5px var(--mono); color: var(--ink-3); white-space: nowrap; }
.mc b { margin-left: 5px; font: 500 16px var(--mono); color: var(--mc); }
.vv { font: 400 11.5px var(--mono); color: var(--ink-3); white-space: nowrap; }
.vv b { margin-left: 5px; font: 400 12.5px var(--mono); color: var(--ink); }
.vv .up, .vv .down { margin-left: 6px; }
.qbtn { height: 28px; padding: 0 10px 0 8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px; background: color-mix(in srgb, var(--acc) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 32%, transparent); color: var(--acc); font: 600 12px var(--mono); transition: background .15s; }
.qbtn:hover { background: color-mix(in srgb, var(--acc) 22%, transparent); }
.qbtn svg { width: 12px; height: 12px; }
.qbtn[disabled] { opacity: .5; cursor: progress; }


/* coin header, chart and pay toggle (used in the drawer) */
.coin { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.coin-nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.coin-nm b { font-size: 17px; font-weight: 600; }
.coin-nm span { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-px { margin-left: auto; text-align: right; display: flex; flex-direction: column; line-height: 1.3; }
.coin-px b { font: 500 16px var(--mono); font-variant-numeric: tabular-nums; }
.coin-px b sub, .mc b sub { font-size: .7em; vertical-align: -.2em; }
.coin-px span { font: 400 12px var(--mono); color: var(--ink-3); }
.coin-px .age { color: var(--acc); }
.spark { display: block; width: 100%; height: 64px; margin: 6px 0 12px; overflow: visible; }
.spark #sparkLine { fill: none; stroke: var(--up); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark #sparkFill { fill: color-mix(in srgb, var(--up) 12%, transparent); stroke: none; }
.spark.down #sparkLine { stroke: var(--down); }
.spark.down #sparkFill { fill: color-mix(in srgb, var(--down) 12%, transparent); }
.spark.empty { height: 0; margin: 0 0 6px; }
.pay { display: flex; justify-content: space-between; align-items: center; margin: -2px 2px 12px; font-size: 12.5px; color: var(--ink-3); }
.pay-b { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card); }
.pay-b button { height: 28px; padding: 0 12px; border-radius: 999px; font: 400 12px var(--mono); color: var(--ink-3); white-space: nowrap; transition: background .2s, color .2s; }
.pay-b button[aria-pressed="true"] { background: var(--sheet); color: var(--ink); }
.pay-b button:disabled { opacity: .4; cursor: default; }

/* the trade drawer */
.drawer { position: absolute; top: 56px; right: 0; bottom: 0; z-index: 6; width: 440px; max-width: 100%; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--line); transform: translateX(102%); transition: transform .45s var(--ease); }
.drawer.open { transform: none; }
.drawer .card { width: 100%; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; opacity: 1; transform: none; }
.drawer .pane { padding: 18px 18px 22px; }
.drawer .coin { gap: 12px; }
.drawer .coin .av { width: 48px; height: 48px; border-radius: 10px; font-size: 14px; }
.drawer .x { margin-left: 4px; }
.coin-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 2px 2px 8px; font: 400 12px var(--mono); color: var(--ink-3); }
.coin-meta a, .coin-meta button { color: var(--ink-2); text-decoration: none; font: inherit; }
.coin-meta a:hover, .coin-meta button:hover { color: var(--ink); }
.coin-meta b { color: var(--mc); font-weight: 500; }
.drawer .btn { background: var(--acc); color: #04140d; font-weight: 600; }
.drawer .btn.ghost { background: var(--raise); color: var(--ink); }
.drawer .hold { background: color-mix(in srgb, var(--acc) 8%, var(--raise)); }
.drawer .flip { background: var(--panel); }
.drawer .tok, .drawer .chips button, .drawer .pay-b button[aria-pressed="true"], .drawer .slip-b button[aria-pressed="true"], .drawer #holdList button { background: var(--raise-2); }
.drawer .sheet { background: var(--panel); }
.drawer .result b { color: var(--acc); }
.drawer .steps li.done .st { border-color: var(--acc); background: var(--acc); }
.drawer .banner { background: var(--raise); }
.drawer .keybox, .drawer .search { background: var(--raise); }

/* live trade notifications */
.tx-toasts { position: absolute; left: 16px; bottom: 16px; z-index: 8; display: flex; flex-direction: column-reverse; gap: 8px; list-style: none; margin: 0; padding: 0; width: min(360px, calc(100% - 32px)); pointer-events: none; }
.tx-toasts li { pointer-events: auto; display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 11px 14px; border-radius: 12px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px rgba(0, 0, 0, .35); font-size: 13px; animation: sheetIn .4s var(--ease); }
.tx-toasts li .st { width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; border: 1.6px solid var(--ink-3); border-right-color: transparent; animation: spin .8s linear infinite; }
.tx-toasts li.ok .st { animation: none; border: 0; background: var(--acc); }
.tx-toasts li.err .st { animation: none; border: 0; background: var(--down); }
.tx-toasts li small { display: block; margin-top: 2px; font: 400 11.5px var(--mono); color: var(--ink-3); }
.tx-toasts li a { color: var(--ink-2); }

@media (max-width: 1100px) {
  .pad-chip { display: none; }
  .row { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; }
  .av { width: 56px; height: 56px; }
}
@media (max-width: 860px) {
  .pad { grid-template-rows: auto auto minmax(0, 1fr); }
  .pad-top { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .pad-search { order: 3; flex: 1 1 100%; }
  .pad-dep { padding: 0 12px; }
  .pad-r { min-width: 0; gap: 6px; order: 2; flex: 1 1 100%; margin-left: 0; }
  .pad-acct { margin-left: auto; }
  .pad-nav { margin-left: auto; }
  .qb span { display: none; }
  .qb input { width: 44px; }
  .pad-acct { min-width: 0; max-width: 132px; }
  .pad-acct span { overflow: hidden; text-overflow: ellipsis; }
  .col-tabs { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .col-tabs button { flex: 1; height: 34px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
  .col-tabs button[aria-pressed="true"] { background: var(--raise); color: var(--ink); }
  .cols { grid-template-columns: 1fr; }
  .col { display: none; border-right: 0; }
  .col.on { display: flex; }
  .col-h { display: none; }
  .drawer { top: 0; width: 100%; border-left: 0; }
  .tx-toasts { left: 12px; right: 12px; width: auto; bottom: 12px; }
}

/* sheets */
.sheet { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: var(--sheet); padding: 12px 16px 16px; animation: sheetIn .45s var(--ease); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(10px); } }
.sheet-top { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.sheet h4 { margin: 0 0 0 4px; font-size: 15px; font-weight: 500; }
.search { height: 46px; border-radius: 16px; border: 0; background: var(--card); padding: 0 16px; outline: 0; font-size: 14px; }
.search:focus { box-shadow: inset 0 0 0 1px var(--ink-4); }
.pick-list { list-style: none; margin: 8px -6px 0; padding: 0; overflow-y: auto; flex: 1; }
.pick-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 14px; text-align: left; transition: background .15s; }
.pick-list button:hover, .pick-list button:focus-visible { background: var(--card); border-radius: 14px; }
.pick-list .nm { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pick-list .nm b { font-size: 14px; }
.pick-list .nm span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-list .amt { margin-left: auto; font: 400 12px var(--mono); color: var(--ink-2); }
.pick-list .note-li { padding: 14px 8px; font-size: 13px; color: var(--ink-3); }
.accts { margin: 6px 0 0; }
.accts div { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.accts dt { font-size: 12px; color: var(--ink-3); }
.accts dd { margin: 4px 0 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.accts code { font: 400 12.5px var(--mono); word-break: break-all; margin-right: auto; }
.link { font-size: 12.5px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.small { font-size: 13px; color: var(--ink-3); margin: 12px 2px 0; }
.export { margin-top: auto; }
.export .warn { font-size: 12.5px; color: var(--down); margin: 0 0 8px; }
.keybox { margin-top: 8px; padding: 12px 14px; border-radius: 14px; background: var(--card); font: 400 12px/1.6 var(--mono); word-break: break-all; }
.sheet .btn { margin-top: 10px; }

.toast { position: fixed; left: 50%; bottom: 60px; z-index: 9; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 999px; background: var(--night); color: #f1f5f9; font-size: 13px; transition: opacity .3s, transform .5s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .tick { display: none; }
  .gate { padding-top: clamp(90px, 13svh, 120px); }
  .word { font-size: min(16.5vw, 72px); }
  .lede { max-width: 330px; }
  .lede br { display: none; }
  .cta { height: 54px; padding: 0 24px 0 28px; }
  body.inside .foot { opacity: 0; }
  .pane { padding: 16px 14px 16px; }
  .leg-row input, .leg-row .out { font-size: 28px; }
}
@media (max-height: 680px) and (min-width: 641px) {
  .gate { padding-top: 70px; }
  .portal { width: 96px; }
  .word { font-size: clamp(54px, 7.4vw, 100px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
