/* ───────────── Tokens ───────────── */
:root {
  --bg: #05060a;
  --surface: rgba(20, 22, 34, 0.55);
  --surface-solid: #10121b;
  --surface-2: rgba(255, 255, 255, 0.04);
  --surface-3: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f2f3f8;
  --muted: #8b91a7;
  --accent: #7c5cff;
  --on-accent: #ffffff;
  --cyan: #22d3ee;
  --pink: #ff3d81;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 22px;
  --r-sm: 12px;
  --blob-o: 0.5;
  --blob-blend: screen;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.85);
  --display: "Sora", "Manrope", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  --bg: #f3f3fa;
  --surface: rgba(255, 255, 255, 0.66);
  --surface-solid: #ffffff;
  --surface-2: rgba(15, 18, 40, 0.04);
  --surface-3: rgba(15, 18, 40, 0.07);
  --line: rgba(15, 18, 40, 0.09);
  --line-2: rgba(15, 18, 40, 0.18);
  --text: #0f1222;
  --muted: #5b6180;
  --good: #059669;
  --warn: #b45309;
  --bad: #dc2626;
  --blob-o: 0.3;
  --blob-blend: multiply;
  --shadow: 0 30px 70px -40px rgba(30, 30, 80, 0.4);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f3fa;
    --surface: rgba(255, 255, 255, 0.66);
    --surface-solid: #ffffff;
    --surface-2: rgba(15, 18, 40, 0.04);
    --surface-3: rgba(15, 18, 40, 0.07);
    --line: rgba(15, 18, 40, 0.09);
    --line-2: rgba(15, 18, 40, 0.18);
    --text: #0f1222;
    --muted: #5b6180;
    --good: #059669;
    --warn: #b45309;
    --bad: #dc2626;
    --blob-o: 0.3;
    --blob-blend: multiply;
    --shadow: 0 30px 70px -40px rgba(30, 30, 80, 0.4);
    color-scheme: light;
  }
}

body[data-radius="sharp"] { --radius: 6px; --r-sm: 4px; }
body[data-radius="round"] { --radius: 32px; --r-sm: 999px; }

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }

/* ───────────── Aurora background ───────────── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(100px); opacity: var(--blob-o); mix-blend-mode: var(--blob-blend);
  animation: drift 26s ease-in-out infinite alternate;
}
.b1 { background: var(--accent); top: -28vmax; left: -18vmax; }
.b2 { background: var(--cyan); top: -22vmax; right: -26vmax; animation-duration: 34s; animation-delay: -8s; }
.b3 { background: var(--pink); top: 45vh; left: 25vw; opacity: calc(var(--blob-o) * 0.45); animation-duration: 42s; }
@keyframes drift {
  50% { transform: translate(6vmax, 8vmax) scale(1.1); }
  100% { transform: translate(-4vmax, 4vmax) scale(0.95); }
}
.gridlines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 70%);
}
.noise {
  position: absolute; inset: 0; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────────── Controls ───────────── */
input, select, textarea {
  font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; min-width: 0; outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
select option { background: var(--surface-solid); color: var(--text); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
input[type="color"] { padding: 3px; height: 42px; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); margin: 0; width: 16px; height: 16px; }

.btn {
  position: relative; appearance: none; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--cyan)));
  color: var(--on-accent); font: inherit; font-weight: 600; font-size: 0.9rem;
  padding: 10px 16px;
  transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.25s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.ghost { background: var(--surface-3); color: var(--text); border-color: var(--line); }
.btn.outline { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--accent) 65%, transparent); }
.btn.small { padding: 7px 12px; font-size: 0.82rem; }
.btn.big { padding: 14px 20px; font-size: 0.98rem; }
.btn.danger { color: var(--bad); }
.btn.glow { box-shadow: 0 10px 30px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.glow:hover { box-shadow: 0 14px 40px -8px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; font-weight: 500; }
.link.danger { color: var(--bad); font-size: 0.85rem; align-self: flex-start; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  border: 1px solid var(--line); background: var(--surface-3); color: var(--text);
  font-size: 1.15rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.icon-btn.sm { width: 28px; height: 28px; font-size: 0.85rem; }
.icon-btn.close { position: absolute; top: 14px; right: 14px; z-index: 3; background: rgba(0, 0, 0, 0.35); color: #fff; border-color: rgba(255, 255, 255, 0.15); backdrop-filter: blur(8px); }

/* ───────────── Top bar + ticker ───────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 28px;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; color: var(--text); text-decoration: none; }
.logo {
  position: relative; width: 32px; height: 32px; border-radius: 10px; overflow: hidden;
  background: conic-gradient(from 210deg, var(--accent), var(--cyan), var(--pink), var(--accent));
  box-shadow: 0 6px 20px -6px var(--accent);
}
.logo span { position: absolute; inset: 8px; border-radius: 4px; background: var(--bg); transform: rotate(45deg); }
.search {
  flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 16px; color: var(--muted);
}
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; border: 0; background: transparent; padding: 10px 0; box-shadow: none !important; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.acting { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.8rem; }
.acting select { padding: 8px 10px; font-size: 0.85rem; max-width: 180px; }

.ticker {
  overflow: hidden; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 40%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tick { display: inline-flex; align-items: center; gap: 8px; padding: 9px 22px; font-size: 0.82rem; white-space: nowrap; font-family: var(--mono); }
.tick b { font-family: var(--display); }
.tick em { font-style: normal; font-size: 0.75rem; }
.tick .up, .up { color: var(--good); }
.tick .down, .down { color: var(--bad); }
.tick.tag-live { color: var(--muted); font-family: "Manrope", sans-serif; }

/* ───────────── Coin orbs + avatars ───────────── */
.orb {
  --s: 30px;
  width: var(--s); height: var(--s); flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.6), transparent 42%),
    linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff; font-family: var(--display); font-weight: 700; font-size: calc(var(--s) * 0.5); line-height: 1;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.25), 0 6px 18px -6px var(--c1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.orb.xs { --s: 18px; }
.orb.lg { --s: 60px; }
.avatar {
  --s: 34px;
  width: var(--s); height: var(--s); flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--h) 85% 62%), hsl(calc(var(--h) + 60) 85% 55%));
  color: #fff; font-family: var(--display); font-weight: 700; font-size: calc(var(--s) * 0.42);
}
.avatar.sm { --s: 24px; }
.avatar.xs { --s: 20px; }

/* ───────────── Hero ───────────── */
.hero {
  max-width: 1320px; margin: 0 auto; padding: 72px 28px 40px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(2.8rem, 6.4vw, 5.4rem); line-height: 0.95; margin: 0 0 22px; letter-spacing: -0.035em; word-spacing: 0.04em; }
.shine {
  background: linear-gradient(90deg, var(--accent), var(--cyan), var(--pink), var(--accent));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 8s linear infinite;
}
@keyframes shine { to { background-position: 300% 0; } }
.lede { color: var(--muted); max-width: 50ch; margin: 0 0 32px; font-size: 1.08rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; max-width: 620px; }
.stats > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.stats dt { font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.stats dd { margin: 4px 0 0; font: 600 1.55rem/1.1 var(--display); letter-spacing: -0.03em; }

/* Swap box with rotating conic border */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.swapbox {
  position: relative; padding: 1.5px; border-radius: calc(var(--radius) + 6px);
  background:
    conic-gradient(from var(--angle), transparent 0 55%, var(--accent) 70%, var(--cyan) 82%, transparent 95%),
    linear-gradient(var(--line-2), var(--line-2));
  animation: spin 7s linear infinite;
  box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--accent) 60%, transparent);
}
@keyframes spin { to { --angle: 360deg; } }
.swapbox-inner {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 22px; border-radius: calc(var(--radius) + 5px);
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  backdrop-filter: blur(20px);
}
.swap-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.leg {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line);
  transition: border-color 0.2s ease;
}
.leg:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.leg-label, .field-label { font-size: 0.78rem; color: var(--muted); }
.leg-row { display: flex; align-items: center; gap: 10px; }
.leg-row input, .leg-row output {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; box-shadow: none !important;
  font: 600 2rem/1.2 var(--display); letter-spacing: -0.03em; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.leg-row select { flex: none; border-radius: 999px; padding: 8px 12px; font-weight: 600; background: var(--surface-3); }
.leg-usd { font-size: 0.8rem; color: var(--muted); min-height: 1.2em; font-family: var(--mono); }
.flip {
  align-self: center; margin: -18px 0; z-index: 1;
  width: 42px; height: 42px; border-radius: 14px; cursor: pointer;
  border: 4px solid var(--surface-solid); background: var(--surface-3); color: var(--text);
  font-size: 1.1rem; transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
}
.flip:hover { transform: rotate(180deg); }
.quote {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  padding: 12px 4px 4px; font-size: 0.86rem; min-height: 54px;
}
.swap-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 8px; }

/* ───────────── Categories ───────────── */
.cats {
  max-width: 1320px; margin: 0 auto; padding: 24px 28px 20px;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 8px 14px 8px 10px; border-radius: 999px; font: inherit; font-size: 0.88rem; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.chip:hover { border-color: var(--line-2); transform: translateY(-1px); }
.chip .count { color: var(--muted); font-size: 0.76rem; font-family: var(--mono); }
.chip.on {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, transparent), color-mix(in srgb, var(--cyan) 18%, transparent));
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
}
.chip .orbs { display: inline-flex; }
.chip .orbs .orb + .orb { margin-left: -6px; }

/* ───────────── Layout + filters ───────────── */
.layout {
  max-width: 1320px; margin: 0 auto; padding: 0 28px 80px;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start;
}
.filters {
  position: sticky; top: 84px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(16px);
}
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters h2 { font-size: 1.05rem; margin: 0; }
fieldset { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; padding: 0; }
.check { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 0.9rem; cursor: pointer; }
.check input { flex: none; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.field input, .field select, .field textarea { color: var(--text); font-size: 0.92rem; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters .row { flex-wrap: nowrap; }
.filters .row input { width: 100%; padding: 9px 10px; }
.checks-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: inline-block; padding: 7px 13px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); font-size: 0.85rem;
}
.seg input:checked + span { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }

.results-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.results-bar p { margin: 0; flex: 1; font-size: 0.9rem; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.88rem; }
.sort select { padding: 8px 10px; }
.filter-toggle { display: none; }

/* ───────────── Offer cards ───────────── */
.grid {
  display: grid;
  grid-template-columns: var(--grid-cols, repeat(auto-fill, minmax(300px, 1fr)));
  gap: 18px;
}
body[data-density="compact"] .grid { gap: 12px; }

.card {
  --g1: var(--accent); --g2: var(--cyan);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 16px;
  padding: 18px; border-radius: var(--radius); cursor: pointer; outline: none;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--g1) 18%, transparent), transparent 42%),
    var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1), box-shadow 0.4s ease;
  animation: rise 0.5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
/* cursor spotlight */
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, -30%), color-mix(in srgb, var(--g1) 28%, transparent), transparent 50%);
  opacity: 0; transition: opacity 0.3s ease;
}
/* gradient edge */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--g1), transparent 40%, transparent 60%, var(--g2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.45; transition: opacity 0.3s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--g1) 70%, transparent);
}
.card:hover::before, .card:focus-visible::before { opacity: 1; }
.card:hover::after, .card:focus-visible::after { opacity: 1; }
body[data-density="compact"] .card { padding: 14px; gap: 12px; }

.grid[data-look="solid"] .card { background: linear-gradient(160deg, color-mix(in srgb, var(--g1) 14%, transparent), transparent 42%), var(--surface-solid); backdrop-filter: none; }
.grid[data-look="outline"] .card { background: transparent; backdrop-filter: none; }
.grid[data-look="outline"] .card::after { opacity: 1; padding: 1.5px; background: linear-gradient(135deg, var(--g1), var(--g2)); }
.grid[data-look="outline"] .card:hover { box-shadow: 0 0 0 1px var(--g1), 0 0 40px -6px var(--g1); }

.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 36px; }
.maker { display: flex; align-items: center; gap: 10px; min-width: 0; }
.maker strong { font-size: 0.92rem; display: flex; align-items: center; gap: 5px; }
.maker small { display: block; color: var(--muted); font-size: 0.74rem; }
.vf {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--cyan); color: #04212a; font-size: 0.62rem; font-weight: 800;
}
.fav {
  width: 34px; height: 34px; border-radius: 50%; flex: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  display: grid; place-items: center; font-size: 0.95rem; transition: transform 0.2s ease;
}
.fav:hover { transform: scale(1.1); }
.fav.on { color: var(--pink); border-color: color-mix(in srgb, var(--pink) 50%, transparent); }
.stamp {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: var(--surface-3); color: var(--muted);
}

.swap-line { container-type: inline-size; display: flex; flex-direction: column; gap: 6px; }
.sl-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.sl-labels small { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.amt { flex: 0 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.num {
  /* Each amount gets roughly half the row minus the arrow and its coin badge; shrink to fit. */
  font: 600 clamp(0.9rem, calc((50cqi - 64px) / (var(--len, 6) * 0.62)), 1.45rem)/1.1 var(--display);
  letter-spacing: -0.03em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
body[data-density="compact"] .num { font-size: clamp(0.85rem, calc((50cqi - 64px) / (var(--len, 6) * 0.62)), 1.2rem); }
.sym { font-size: 0.78rem; color: var(--muted); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.arrow {
  position: relative; flex: 1 1 auto; min-width: 28px; margin: 0 12px;
  height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--g1), var(--g2)); opacity: 0.6;
}
.arrow::before {
  content: ""; position: absolute; right: -1px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-top: 2px solid var(--g2); border-right: 2px solid var(--g2); transform: rotate(45deg);
}

.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.rate { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.mk {
  font-size: 0.74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid currentColor; background: color-mix(in srgb, currentColor 10%, transparent);
}
.mk.good { color: var(--good); }
.mk.warn { color: var(--warn); }
.mk.neutral { color: var(--muted); }
.note {
  margin: 0; font-size: 0.85rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--g1) 60%, transparent);
}
.card-foot {
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-2);
  font-size: 0.78rem; color: var(--muted);
}
.haggle { color: var(--text); }
.card.is-off { opacity: 0.6; }

.empty { text-align: center; padding: 70px 20px; }
.empty-title { font: 600 1.4rem var(--display); margin: 0 0 6px; }
.empty p { margin: 0; }

/* ───────────── How it works ───────────── */
.how { max-width: 1320px; margin: 0 auto; padding: 0 28px 60px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how-card { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.how-n { font: 600 0.8rem var(--mono); color: var(--accent); }
.how-card h3 { margin: 10px 0 6px; font-size: 1.25rem; }
.how-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ───────────── Dialogs ───────────── */
dialog {
  position: fixed; inset: 0; margin: auto; padding: 0;
  width: min(580px, calc(100vw - 24px)); max-height: 90vh; overflow: auto;
  color: var(--text); background: var(--surface-solid);
  border: 1px solid var(--line-2); border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.8);
}
dialog.sheet { width: min(760px, calc(100vw - 24px)); }
dialog.wide { width: min(900px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(3, 4, 10, 0.65); backdrop-filter: blur(8px); }
dialog[open] { animation: pop 0.28s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }

.form { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.form fieldset { margin: 0; }
.form textarea { resize: vertical; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-size: 1.3rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.offer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.offer-fields { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pair-input { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.pair-input:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.pair-input .leg-row input { font-size: 1.6rem; }
.premium-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 28px; }
.premium-row > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.offer-preview { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; }
.offer-preview .card { pointer-events: none; animation: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches label { position: relative; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; }
.swatches span {
  display: block; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--s1), var(--s2));
  border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line-2);
  transition: transform 0.2s ease;
}
.swatches span.auto { background: conic-gradient(#f7931a, #627eea, #14f195, #2775ca, #f7931a); }
.swatches label:hover span { transform: scale(1.08); }
.swatches input:checked + span { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--accent); }
.swatches input:focus-visible + span { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--cyan); }

/* ───────────── Detail + deal room ───────────── */
.d-hero {
  position: relative; overflow: hidden; padding: 44px 28px 32px;
  background:
    radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--g1) 55%, transparent), transparent 60%),
    radial-gradient(80% 120% at 100% 100%, color-mix(in srgb, var(--g2) 45%, transparent), transparent 60%),
    var(--surface-solid);
  border-bottom: 1px solid var(--line);
}
.d-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.d-side { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.d-side small { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.d-amt { font: 700 clamp(1.6rem, 4.5vw, 2.5rem)/1 var(--display); letter-spacing: -0.04em; overflow-wrap: anywhere; }
.d-swap {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem;
  background: var(--surface-3); border: 1px solid var(--line-2); backdrop-filter: blur(10px);
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 50% { transform: rotate(180deg); } }
.d-body { padding: 22px 28px 30px; display: flex; flex-direction: column; gap: 16px; }
.d-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.d-meta > div { flex: 1 1 220px; min-width: 0; }
.d-meta strong { display: flex; align-items: center; gap: 6px; }
.d-meta small { display: block; color: var(--muted); font-size: 0.78rem; }
.spacer { flex: 1; }
.rate-big { font: 500 0.95rem var(--mono); color: var(--muted); }
blockquote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--g1); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--muted); font-size: 0.92rem; }
.take { display: flex; gap: 10px; flex-wrap: wrap; }
.take .btn.big { flex: 1; }
.section-title { margin: 10px 0 0; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.count { font: 500 0.75rem var(--mono); color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 2px 9px; }
.notice { padding: 13px 16px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

.propose, .deal {
  display: flex; flex-direction: column; gap: 12px; padding: 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.propose h3 { margin: 0; font-size: 1rem; }
.propose .row { align-items: flex-end; }
.propose .field.grow { flex: 1; min-width: 200px; }
.implied { display: flex; align-items: center; gap: 8px; min-height: 26px; }

.deal header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.who { display: flex; align-items: center; gap: 7px; font-size: 0.9rem; flex-wrap: wrap; }
.pill {
  font-size: 0.72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-3); color: var(--muted); border: 1px solid var(--line);
}
.pill.small { padding: 1px 8px; font-size: 0.68rem; }
.pill.open { color: var(--cyan); }
.pill.agreed, .pill.sent { color: var(--warn); }
.pill.done { color: var(--good); }
.pill.cancelled { color: var(--bad); }

.thread { list-style: none; margin: 0; padding: 2px; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.msg { align-self: flex-start; max-width: 86%; padding: 10px 13px; border-radius: 16px 16px 16px 4px; background: var(--surface-3); border: 1px solid var(--line); }
.msg.mine {
  align-self: flex-end; border-radius: 16px 16px 4px 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, var(--surface-solid)), color-mix(in srgb, var(--cyan) 12%, var(--surface-solid)));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.msg p { margin: 3px 0 0; font-size: 0.9rem; }
.msg-meta { font-size: 0.72rem; color: var(--muted); }
.msg-amount { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 3px; font-size: 0.92rem; }
.msg.system { align-self: center; max-width: 100%; padding: 2px 0; background: none; border: 0; color: var(--muted); font-size: 0.78rem; text-align: center; }
.neg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.reply { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; }

.settle {
  display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), color-mix(in srgb, var(--cyan) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.settle-head { display: flex; flex-direction: column; gap: 2px; }
.settle-head strong { font-family: var(--display); font-size: 1.05rem; }
.legs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.leg-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 14px; border-radius: var(--r-sm); background: var(--surface-solid); border: 1px solid var(--line); min-width: 0; }
.leg-card.done { border-color: color-mix(in srgb, var(--good) 50%, transparent); }
.leg-top { display: flex; gap: 10px; align-items: flex-start; }
.step {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font: 700 0.8rem var(--display); background: var(--surface-3); border: 1px solid var(--line-2);
}
.leg-card.sent .step { background: color-mix(in srgb, var(--warn) 25%, transparent); border-color: var(--warn); }
.leg-card.done .step { background: var(--good); color: #032; border-color: transparent; }
.leg-title { font-size: 0.9rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.addr { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 6px 6px 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.addr code { flex: 1; font: 0.8rem var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.inline-form { display: flex; gap: 6px; width: 100%; }
.inline-form input { flex: 1; padding: 8px 10px; font-size: 0.85rem; }
.tx { font-size: 0.82rem; color: var(--accent); text-decoration: none; }
.tx:hover { text-decoration: underline; }

/* ───────────── Footer, toast, confetti ───────────── */
.footer { max-width: 1320px; margin: 0 auto; padding: 24px 28px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.footer p { margin: 0; max-width: 90ch; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 180%); transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
  padding: 12px 20px; border-radius: 999px; font-size: 0.9rem; max-width: calc(100vw - 32px);
  color: var(--text); background: color-mix(in srgb, var(--surface-solid) 85%, transparent);
  border: 1px solid var(--line-2); backdrop-filter: blur(16px); box-shadow: var(--shadow);
}
.toast.show { transform: translate(-50%, 0); }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.cf {
  position: fixed; top: -16px; width: 8px; height: 14px; border-radius: 2px; pointer-events: none; z-index: 70;
  animation: fall var(--t, 2s) cubic-bezier(.25, .6, .4, 1) forwards;
}
@keyframes fall { to { transform: translate(var(--dx), 108vh) rotate(var(--rot)); } }

/* ───────────── Motion off ───────────── */
body[data-motion="off"] .blob,
body[data-motion="off"] .ticker-track,
body[data-motion="off"] .shine,
body[data-motion="off"] .swapbox,
body[data-motion="off"] .d-swap,
body[data-motion="off"] .pulse,
body[data-motion="off"] .card { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ───────────── Responsive ───────────── */
@media (max-width: 1060px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 48px; }
  .swapbox { max-width: 560px; }
  .layout { grid-template-columns: 1fr; }
  .filters { display: none; position: static; }
  .filters.open { display: block; }
  .filter-toggle { display: inline-flex; }
  .offer-layout { grid-template-columns: minmax(0, 1fr); }
  .offer-preview { position: static; }
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; padding: 12px 16px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .top-actions { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 8px; }
  .top-actions .btn { padding: 9px 12px; }
  .acting { flex: 1 1 auto; }
  .acting span { display: none; }
  .acting select { max-width: none; width: 100%; }
  #walletBtn { flex: 1 1 100%; }
  .hero, .cats, .layout, .how, .footer { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swap-actions { grid-template-columns: 1fr; }
  .leg-row input, .leg-row output { font-size: 1.6rem; }
  .grid { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
  .how { grid-template-columns: 1fr; }
  .legs { grid-template-columns: 1fr; }
  .reply { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .d-hero { padding: 48px 16px 24px; }
  .d-body { padding: 18px 16px 24px; }
  .d-pair { gap: 8px; }
  .d-swap { width: 40px; height: 40px; }
  .d-pair:has(.bundle) { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .d-pair:has(.bundle) .d-swap { transform: rotate(90deg); }
  .orb.lg { --s: 46px; }
  .form { padding: 18px; }
}

/* ───────────── Protected swaps + reputation ───────────── */
.mode { font-weight: 600; }
.mode.atomic { color: var(--good); }
.mode.direct { color: var(--muted); }
.notice.protect { border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 8%, transparent); color: var(--text); }
.notice.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); color: var(--text); }
#ofMode:empty { display: none; }
.settle.atomic { border-color: color-mix(in srgb, var(--good) 35%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--good) 8%, transparent), color-mix(in srgb, var(--cyan) 6%, transparent)); }
.asteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.astep { display: flex; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid transparent; }
.astep.active { background: var(--surface-solid); border-color: var(--line); }
.astep.done .step { background: var(--good); color: #032; border-color: transparent; }
.astep.active .step { border-color: var(--accent); color: var(--accent); }
.astep-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.astep-body .tx { margin-left: 2px; }
.astep-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; align-items: flex-start; }
.astep:not(.done):not(.active) { opacity: 0.6; }

/* ───────────── OTC pitch, bundles, swap links ───────────── */
.pitch { list-style: none; margin: -14px 0 26px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pitch li { font-size: 0.82rem; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.pitch b { color: var(--text); }

.nft-tile {
  --s: 30px;
  width: var(--s); height: var(--s); flex: none; border-radius: 8px; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--h) 75% 55%), hsl(calc(var(--h) + 70) 80% 45%));
  color: rgba(255, 255, 255, 0.9); font-size: calc(var(--s) * 0.45); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25), 0 6px 18px -8px hsl(var(--h) 75% 55%);
}
.nft-tile.xs { --s: 18px; border-radius: 5px; }
.nft-tile.lg { --s: 60px; border-radius: 14px; }

.card-tags { display: flex; gap: 6px; margin-top: -6px; }
.tag-otc, .tag-link { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.tag-otc { color: #0b0c12; background: linear-gradient(135deg, #ffd166, #f7931a); }
.tag-link { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 14%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); }

.swap-bundle { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 8px; align-items: center; }
.swap-bundle small { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.swap-bundle > div:last-child { text-align: right; }
.swap-bundle > div:last-child .bundle li { flex-direction: row-reverse; }
.bundle-arrow { color: var(--g2); font-size: 1.2rem; text-align: center; }
.bundle { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bundle li { display: flex; align-items: center; gap: 7px; font-size: 0.86rem; font-weight: 600; min-width: 0; }
.bundle li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bundle.big li { font-size: 0.95rem; }
.d-side .bundle { align-items: flex-start; max-width: 100%; }

.costs { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.costs th { text-align: left; font-weight: 500; color: var(--muted); padding: 7px 12px 7px 0; white-space: nowrap; vertical-align: top; width: 1%; }
.costs td { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.costs tr:last-child td { border-bottom: 0; }
.cost:empty { display: none; }
.dex { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--good) 8%, transparent); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); width: 100%; }
#dexCompare:empty { display: none; }

.linked-banner { position: relative; z-index: 1; margin: -20px auto 18px; width: fit-content; max-width: 100%; padding: 8px 14px; border-radius: 999px; font-size: 0.86rem; font-weight: 600; background: rgba(0, 0, 0, 0.35); color: #fff; backdrop-filter: blur(8px); }
.asset-notes { margin: 8px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.asset-notes li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.asset-notes code { font-size: 0.78rem; }

.builder { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.builder-side { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.builder-side .link { align-self: flex-start; font-size: 0.85rem; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.brow { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.brow.custom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.brow.custom > input { grid-column: 1 / -1; }
.brow select, .brow input { padding: 8px 9px; font-size: 0.86rem; }
.row-meta { grid-column: 1 / -1; font-size: 0.76rem; color: var(--muted); }
.row-meta.bad { color: var(--bad); }
.private-box { padding: 10px 12px; border-radius: var(--r-sm); border: 1px dashed color-mix(in srgb, var(--cyan) 40%, transparent); min-width: 0; }
#shareDialog { width: min(520px, calc(100vw - 32px)); }
#shareDialog .pad { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
#shareDialog .addr code { overflow-wrap: anywhere; }
.share-card { pointer-events: none; }
.share-card .card { animation: none; }
#shareLink { font-size: 0.78rem; word-break: break-all; white-space: normal; }

@media (max-width: 720px) {
  .builder { grid-template-columns: minmax(0, 1fr); }
  .pitch { margin-top: -10px; }
}

/* ───────────── Market-price offers ───────────── */
.card-tags { flex-wrap: wrap; }
.tag-market {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; color: var(--good);
  background: color-mix(in srgb, var(--good) 13%, transparent); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent);
}
.tag-market.off { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }
body[data-motion="off"] .live-dot { animation: none; }
.notice.market { border-color: color-mix(in srgb, var(--good) 35%, transparent); background: color-mix(in srgb, var(--good) 7%, transparent); color: var(--text); }

.pricing { display: flex; flex-direction: column; gap: 10px; min-width: 0; border: 0; padding: 0; }
.pricing legend { margin-bottom: 8px; padding: 0; }
.seg.wide { display: grid; grid-template-columns: 1fr 1fr; }
.seg.wide span { display: block; text-align: center; font-weight: 600; }
.seg input:disabled + span { opacity: 0.45; cursor: not-allowed; }
.market-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--good) 30%, var(--line)); background: color-mix(in srgb, var(--good) 5%, var(--surface-2)); }
.market-fields[hidden] { display: none; }
.market-fields p { grid-column: 1 / -1; margin: 0; }
.with-unit { display: flex; align-items: center; gap: 8px; }
.with-unit input { min-width: 0; flex: 1; }
.brow input[readonly] { opacity: 0.75; border-style: dashed; cursor: default; }

.slip { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.slip .seg button {
  padding: 6px 11px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 0.82rem; cursor: pointer;
}
.slip .seg button.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
@media (max-width: 560px) { .market-fields { grid-template-columns: minmax(0, 1fr); } }

/* ───────────── Grouped info without separator characters ───────────── */
.parts { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 2px; }
.parts > span { white-space: nowrap; }
.usd { margin-left: 10px; opacity: 0.8; }
.aside { margin-left: 8px; }
.due { display: block; margin-top: 3px; font-size: 0.8rem; color: var(--warn); }

/* ───────────── Pulse Desk (the site's own, labelled market maker) ───────────── */
.avatar.desk { border-radius: 28%; background: none; object-fit: cover; }
.mm-badge {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; white-space: nowrap;
  font: 700 0.62rem/1.5 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text); background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
}
.mm-badge.tag { margin-left: 0; vertical-align: 0; font-size: 0.66rem; padding: 3px 9px; }
.logo-img { width: 32px; height: 32px; border-radius: 10px; box-shadow: 0 6px 20px -6px var(--accent); flex: none; }

/* ───────────── Pulse Desk: panel, instant quotes ───────────── */
.desk-quote {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; margin-top: 12px; padding: 12px 14px;
  border-radius: var(--r-sm); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--surface-2));
}
.desk-quote.off { grid-template-columns: auto minmax(0, 1fr); border-color: var(--line); background: var(--surface-2); }
.desk-quote .dq-note { grid-column: 1 / -1; }
.desk-quote img.avatar { width: 20px; height: 20px; }
.desk-rfq { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
@media (max-width: 560px) { .desk-quote { grid-template-columns: auto minmax(0, 1fr); } .desk-quote .btn { grid-column: 1 / -1; } }

@media (min-width: 900px) { .cats { flex-wrap: wrap; overflow-x: visible; } }

.load-more { display: flex; justify-content: center; margin-top: 18px; }

/* Bitcoin, Litecoin, Solana: setup and pay-to-lock boxes in a protected swap */
.setup, .paybox { display: grid; gap: 10px; padding: 14px 16px; margin: 4px 0 12px; border-radius: var(--r-sm); border: 1px dashed color-mix(in srgb, var(--good) 45%, transparent); background: color-mix(in srgb, var(--good) 6%, transparent); }
.paybox { margin: 8px 0 0; }
.addr code.wrap { white-space: normal; overflow-wrap: anywhere; }

/* Test network banner */
.testnet-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 9px 16px; font-size: 0.88rem; text-align: center; color: var(--text); background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.testnet-bar[hidden] { display: none; }
.testnet-bar a { color: inherit; text-decoration: underline; }
