:root {
  --max: none;
  --main: #222222;
  --blue: #1769ff;
  --surface: #292929;
  --surface-2: #303030;
  --line: rgba(255, 255, 255, 0.12);
}

body {
  background:
    radial-gradient(circle at 82% 8%, rgba(23, 105, 255, 0.12), transparent 24rem),
    var(--main);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.side-link.active {
  background: var(--blue-soft);
}

.app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #202020 0%, #1d1d1e 100%);
}

.brand-mark,
.user-avatar,
.coin-icon {
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

#connect-wallet {
  border-radius: 0;
}

.brand-mark img,
.user-avatar img,
.coin-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-mark img {
  padding: 4px;
}

.asset-button-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  vertical-align: middle;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
}

.asset-button-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.asset-choice-tusd,
.asset-choice-usdt {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #14231d;
  font-size: 10px;
  font-weight: 900;
}
.asset-choice-tusd { background: #63d6a0; }
.asset-choice-usdt { background: #26a17b; color: #fff; }

.user-avatar img,
.coin-icon img {
  padding: 3px;
}

.main-shell {
  width: 100%;
  padding-left: clamp(28px, 4vw, 72px);
  padding-right: clamp(28px, 4vw, 72px);
}

.topbar {
  max-width: none;
}

.notification-icon {
  display: grid;
  place-items: center;
}

.notification-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.exchange-card {
  width: min(100%, 540px);
  justify-self: end;
  padding: 20px;
  border-radius: 18px;
  border-color: rgba(23,105,255,.38);
}
.exchange-mode-tabs { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: #1b1b1c; }
.exchange-mode { border: 1px solid transparent; border-radius: 9px; padding: 9px 15px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.exchange-mode.active { border-color: var(--line); background: #252526; color: var(--text); }
.field-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.field-topline label { margin: 0; }
.balance-copy { color: var(--muted); font-size: 11px; }
.amount-actions { display: flex; gap: 4px; align-items: center; padding-right: 5px; background: #252526; }
.amount-actions button { border: 1px solid rgba(23,105,255,.3); border-radius: 6px; padding: 5px 8px; background: transparent; color: #78a9ff; font-size: 10px; font-weight: 800; }
.exchange-input input { border-radius: 8px 0 0 8px; }
.exchange-input > #pay-asset { min-width: 112px; border-radius: 0 8px 8px 0; }
.asset-menu { position: relative; display: flex; }
.asset-menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: 220px;
  padding: 6px;
  border: 1px solid rgba(23,105,255,.45);
  border-radius: 10px;
  background: #29292a;
  box-shadow: 0 18px 45px rgba(0,0,0,.42);
}
.asset-menu-pop[hidden] { display: none; }
.asset-menu-pop button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.asset-menu-pop button:hover { background: rgba(23,105,255,.14); }
.asset-menu-pop button > span:last-child { display: grid; gap: 2px; }
.asset-menu-pop strong { font-size: 12px; }
.asset-menu-pop small { color: var(--muted); font-size: 10px; }
.asset-menu-icon {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.asset-menu-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}
.asset-menu-icon.tbit { background: #444444; }
.asset-menu-icon.tusd { background: #63d6a0; color: #14231d; }
.asset-menu-icon.usdt { background: #26a17b; }
.panel-footnote { display: flex; align-items: center; justify-content: center; gap: 8px; }
.impact-warning { margin: 10px 0 0; padding: 10px 12px; border: 1px solid rgba(241,187,104,.35); border-radius: 8px; background: rgba(241,187,104,.08); color: #f1bb68; font-size: 11px; line-height: 1.4; }
.impact-warning.high { border-color: rgba(239,107,91,.55); background: rgba(239,107,91,.1); color: #ff9d91; }
.impact-warning[hidden] { display: none; }
.market-tabs { align-items: center; gap: 4px; }
.market-tabs span { border: 1px solid transparent; border-radius: 8px; padding: 10px 14px; }
.market-tabs span { cursor: pointer; }
.market-tabs span:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.market-tabs .active { border-color: var(--line); background: #29292a; }
.currency-table { overflow: hidden; }
.table-head, .market-row { grid-template-columns: 2fr 1fr 1fr 1.2fr 1.2fr 1.2fr auto; }
.market-chart-button { padding: 7px 10px; font-size: 10px; }
.chart-pool-list { display: grid; gap: 10px; margin-bottom: 18px; }
.chart-pool-button { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 15px 17px; border: 1px solid var(--line); border-radius: 10px; background: #29292a; color: var(--muted); text-align: left; cursor: pointer; }
.chart-pool-button:hover { border-color: rgba(0,99,255,.55); color: var(--text); }
.chart-pool-button strong, .chart-pool-button small { display: block; }
.chart-pool-button strong { color: var(--text); font-size: 13px; }
.chart-pool-button small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.chart-pool-button > span:last-child { color: #78a9ff; font-size: 11px; font-weight: 800; white-space: nowrap; }
.market-chart { margin-top: 18px; padding: 24px; border: 1px solid rgba(0,99,255,.25); border-radius: 14px; background: linear-gradient(145deg, #2b2b2c, #252526); box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.market-chart[hidden] { display: none; }
.market-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.market-chart-head h3 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.03em; }
.chart-kicker { display: flex; align-items: center; gap: 7px; color: #78a9ff; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.chart-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(99,214,160,.55); }
.market-chart-meta, .market-chart-note { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.market-chart-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0 14px; }
.market-chart-stats div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(37,37,38,.65); }
.market-chart-stats span, .market-chart-stats small { display: block; color: var(--muted); font-size: 10px; }
.market-chart-stats strong { display: block; margin: 4px 0 2px; color: var(--text); font-size: 15px; }
.market-chart-frame { margin-top: 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #252526; }
.market-chart-frame svg { display: block; width: 100%; min-width: 620px; height: 300px; }
.chart-grid line, .chart-horizontal { stroke: rgba(255,255,255,.1); stroke-width: 1; }
.chart-curve { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 7px rgba(0,99,255,.45)); }
.market-chart-frame circle { fill: #78a9ff; stroke: #252526; stroke-width: 2; }
.chart-labels { fill: var(--muted); font-size: 10px; }
.market-chart-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.market-chart-legend i { display: inline-block; width: 18px; height: 3px; margin-right: 7px; vertical-align: middle; border-radius: 2px; background: var(--blue); }
.market-empty-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.market-empty-action .button { border-color: rgba(23,105,255,.5); color: #78a9ff; }

.marketplace-badge,
.marketplace-muted { color: #f1bb68; font-size: 11px; font-weight: 800; }
.marketplace-warning { display: grid; gap: 5px; margin-bottom: 22px; padding: 15px 17px; border: 1px solid rgba(241,187,104,.32); border-radius: 10px; background: rgba(241,187,104,.07); color: #f1bb68; font-size: 12px; }
.marketplace-warning span, .marketplace-note, .marketplace-empty p { color: var(--muted); line-height: 1.5; }
.external-wallet-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #202020;
}
.external-wallet-panel .eyebrow { margin-bottom: 5px; }
.external-wallet-panel strong,
.external-wallet-panel small { display: block; }
.external-wallet-panel strong { font-size: 12px; }
.external-wallet-panel small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.marketplace-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.marketplace-tab { border: 1px solid var(--line); border-radius: 0; padding: 10px 13px; background: transparent; color: var(--muted); cursor: default; font-size: 11px; font-weight: 800; }
.marketplace-tab.active { border-color: rgba(0,99,255,.5); background: var(--blue-soft); color: #fff; }
.marketplace-grid { display: grid; grid-template-columns: minmax(320px,.9fr) minmax(0,1.1fr); gap: 18px; }
.marketplace-form h3, .marketplace-book h3 { margin: 0 0 18px; }
.marketplace-form label { display: grid; gap: 7px; margin-bottom: 13px; color: var(--muted); font-size: 11px; }
.marketplace-form input, .marketplace-form select { width: 100%; border: 1px solid var(--line); border-radius: 0; padding: 12px; background: #252526; color: var(--text); }
.marketplace-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.marketplace-note { margin: 14px 0 18px; font-size: 11px; }
.marketplace-empty { display: grid; place-items: center; min-height: 260px; text-align: center; }
.marketplace-empty .empty-icon { margin-bottom: 14px; }
.marketplace-empty p { max-width: 360px; margin: 0; font-size: 12px; }
.marketplace-offer-list { display: grid; gap: 10px; }
.marketplace-offer { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--line); background: rgba(37,37,38,.8); }
.marketplace-offer > div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.marketplace-offer .marketplace-offer-stats { justify-content: flex-start; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 10px; }
.marketplace-offer-stats b { color: var(--text); font-weight: 800; }
.marketplace-offer strong { color: var(--text); font-size: 13px; }
.marketplace-offer small { color: #f1bb68; font-size: 10px; }
.marketplace-action {
  justify-self: start;
  padding: 7px 10px;
  border: 1px solid rgba(239,107,91,.42);
  border-radius: 7px;
  background: transparent;
  color: #ff9d91;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.marketplace-action:hover { background: rgba(239,107,91,.1); }
.marketplace-match { border-color: rgba(23,105,255,.32); }

@media (max-width: 900px) { .marketplace-grid { grid-template-columns: 1fr; } }

.hero-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, 560px);
  gap: clamp(48px, 8vw, 140px);
}

.hero-copy {
  max-width: 760px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 420px;
}

.hero-logo {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: min(220px, 100%);
  min-height: 125px;
  color: var(--blue);
  filter: drop-shadow(0 0 26px rgba(23, 105, 255, 0.2));
}

.hero-logo-d {
  position: relative;
  z-index: 1;
  width: min(88px, 16vw);
  height: auto;
  display: block;
  transform: translateY(16px);
}

.hero-logo-blocks {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  width: min(88px, 16vw);
  height: 25px;
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 2px;
  padding-right: 2px;
  clip-path: polygon(0 0, 100% 0, 88% 24%, 78% 48%, 66% 72%, 52% 100%, 0 100%);
  opacity: .98;
}

.hero-logo-blocks i {
  display: block;
  min-width: 0;
  min-height: 0;
  border-radius: 1px;
  background: #e4b34f;
  opacity: 0;
  animation:
    hero-block-drop .72s cubic-bezier(.2,.9,.3,1.15) var(--drop) both,
    hero-block-wave 1.8s ease-in-out calc(var(--drop) + 1.45s) infinite;
}

.hero-logo-blocks i:nth-child(3n) { background: #f3cd7d; }
.hero-logo-blocks i:nth-child(5n) { background: #c4902b; }

@keyframes hero-block-drop {
  from { transform: translateY(-90px) rotate(var(--rotation)) scale(.35); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes hero-block-wave {
  0%, 100% { transform: none; filter: brightness(1); }
  45% { transform: translateY(-18%) scale(1.08); filter: brightness(1.45); }
}

.hero-logo-ex {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin: 0 0 4px -12px;
  color: #e4b34f;
  font-family: "Bricolage Grotesque", Inter, sans-serif;
  font-size: clamp(54px, 7vw, 92px);
  font-weight: 700;
  line-height: .78;
  letter-spacing: -.12em;
  text-shadow: 0 0 20px rgba(228, 179, 79, .18);
  opacity: 0;
  animation: hero-ex-in .9s cubic-bezier(.2,.9,.3,1.1) 2.55s forwards;
}

@keyframes hero-ex-in {
  from { opacity: 0; transform: translateX(-22px); }
  to { opacity: 1; transform: none; }
}

.hero-logo-ex span:first-child {
  position: relative;
}

.hero-logo-ex span:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  right: 5px;
  bottom: -7px;
  height: 13px;
  background: repeating-linear-gradient(90deg, #e4b34f 0 4px, transparent 4px 6px);
  opacity: .95;
  animation: hero-e-block-wave 1.8s ease-in-out 3.5s infinite;
}

@keyframes hero-e-block-wave {
  0%, 100% { filter: brightness(1); transform: translateY(0); }
  45% { filter: brightness(1.5); transform: translateY(-2px); }
}

.hero-logo-caption {
  margin-top: 18px;
  color: #78a9ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.hero-copy .hero-status {
  margin-top: 18px;
}

.hero-logo .torvyon-dex-logo {
  display: block;
  width: min(100%, 440px);
  height: auto;
  background: transparent;
}

.hero-logo .torvyon-dex-logo .draw {
  stroke-dasharray: 1 1;
  animation: torvyon-dex-draw var(--duration, 480ms) var(--delay, 0ms) cubic-bezier(.37, .08, .23, 1) both;
}

.hero-logo .torvyon-dex-logo .pixel {
  transform-box: fill-box;
  transform-origin: center;
  animation: torvyon-dex-pixel 620ms var(--delay, 0ms) cubic-bezier(.21, .8, .25, 1.2) both;
}

.hero-logo .torvyon-dex-logo .caption {
  animation: torvyon-dex-caption 460ms 950ms ease-out both;
}

@keyframes torvyon-dex-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes torvyon-dex-pixel {
  from { opacity: 0; transform: translate(var(--x), var(--y)) rotate(-45deg) scale(.3); }
  to { opacity: 1; transform: none; }
}

@keyframes torvyon-dex-caption {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo .torvyon-dex-logo * { animation: none !important; }
}

.exchange-card {
  background: linear-gradient(145deg, rgba(48, 48, 48, 0.96), rgba(38, 38, 38, 0.96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(23, 105, 255, 0.08);
}

.feature-strip,
.currency-table,
.pool-card,
.asset-card,
.activity-card,
.panel,
.empty-panel {
  background: rgba(42, 42, 42, 0.86);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

.feature-icon,
.empty-icon {
  border-color: rgba(23, 105, 255, 0.55);
  background: rgba(23, 105, 255, 0.08);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 300px;
  }

  .hero-logo {
    justify-content: center;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-blocks i,
  .hero-logo-ex,
  .hero-logo-ex span:first-child::after {
    animation: none;
    opacity: 1;
  }
}

/* Refresh intro: the D builds first, then EX enters and both run the gold wave. */
.dex-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  padding-left: clamp(28px, 8vw, 140px);
  background: var(--main);
  cursor: pointer;
  transition: opacity .65s ease;
}

.dex-intro.is-out { opacity: 0; pointer-events: none; }

.dex-intro-name {
  position: absolute;
  top: 26px;
  left: clamp(28px, 4vw, 70px);
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.dex-intro-stage {
  --intro-width: min(300px, 38vw, 46vh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: max-content;
  min-height: 100vh;
}

.dex-intro-row { display: flex; align-items: flex-end; }

.dex-intro-d {
  position: relative;
  width: var(--intro-width);
  aspect-ratio: 115 / 132;
}

.dex-intro-d > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--blue);
}

.dex-intro-d .intro-block-layer { position: absolute; inset: 0; }

.dex-intro-d .intro-block,
.dex-intro-ex .intro-block {
  position: absolute;
  display: block;
  background: var(--blue);
  border-radius: 2px;
  animation: intro-block-drop .75s cubic-bezier(.2,.9,.3,1.15) var(--delay) both;
}

.dex-intro-d .intro-block:nth-child(3n),
.dex-intro-ex .intro-block:nth-child(3n) { background: #f3cd7d; }
.dex-intro-d .intro-block:nth-child(5n),
.dex-intro-ex .intro-block:nth-child(5n) { background: #c4902b; }

.dex-intro-d.is-done,
.dex-intro-ex.is-done { filter: drop-shadow(0 0 26px rgba(228,179,79,.48)); }

.dex-intro-d.is-done .intro-block,
.dex-intro-ex.is-done .intro-block {
  animation: intro-block-wave 1.8s ease-in-out var(--wave) infinite;
}

.dex-intro-ex {
  position: relative;
  width: calc(var(--intro-width) * .62);
  height: calc(var(--intro-width) * .26);
  margin-left: calc(var(--intro-width) * -.08);
  opacity: 0;
  animation: intro-ex-in .9s cubic-bezier(.2,.9,.3,1.1) 2.25s forwards;
}

.dex-intro-ex > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: #e4b34f;
}

@keyframes intro-block-drop {
  from { transform: translate(var(--x), var(--y)) rotate(var(--rotation)) scale(.3); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes intro-block-wave {
  0%, 100% { transform: none; filter: brightness(1); }
  45% { transform: translateY(-14%) scale(1.1); filter: brightness(1.4); }
}

@keyframes intro-ex-in {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dex-intro { display: none; }
}

@media (max-width: 760px) {
  .dex-intro-name { left: 20px; }
  .dex-intro-stage { --intro-width: min(250px, 58vw, 42vh); }
}

/* Compact workspace shell: narrow application rail and dense content canvas. */
:root {
  --rail-width: 72px;
  --canvas: #171717;
  --canvas-raised: #1c1c1c;
  --line: rgba(255,255,255,.10);
}

html, body { background: var(--canvas); }
body { overflow-x: hidden; }
.app-shell {
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  background: var(--canvas);
}
.sidebar {
  width: var(--rail-width);
  overflow: visible;
  padding: 18px 10px 14px;
  background: #191919;
  border-right-color: rgba(255,255,255,.08);
}
.brand {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0;
}
.brand > span:last-child { display: block; }
.brand strong { display: none; }
.brand small {
  display: block;
  color: #78a9ff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
  line-height: 1;
}
.side-bottom { display: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #242424;
}
.brand-mark img { padding: 6px; }
.side-nav {
  gap: 8px;
  margin-top: 38px;
}
.side-link {
  position: relative;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 12px;
  font-size: 0;
}
.side-link::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 40;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  background: #252525;
  color: #f4f5f7;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity .16s ease, transform .16s ease;
}
.side-link:hover::after,
.side-link:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}
.side-link span {
  width: auto;
  color: #8b8d94;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}
.side-link .nav-icon {
  display: grid;
  place-items: center;
}
.side-link .nav-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-link.active {
  background: #282828;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.side-link.active span { color: #9aa0aa; }
.side-link.active span { transform: scale(1.04); }
.side-link:hover { background: #242424; }
.main-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 42px 28px;
}
.topbar {
  height: 64px;
  gap: 18px;
  border-bottom-color: rgba(255,255,255,.09);
}
.search-box {
  width: min(365px, 42%);
  padding: 9px 12px;
  border-radius: 10px;
  background: #1d1d1d;
}
.topbar-right { gap: 11px; }
.top-icon { color: #8c8e95; }
.user-avatar { width: 28px; height: 28px; background: #242424; }
.user-copy { margin-right: 4px; }
.button { border-radius: 9px; }
#connect-wallet { padding: 9px 14px; }
main { width: 100%; max-width: none; margin: 0; }
.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(410px, 520px);
  gap: clamp(36px, 6vw, 96px);
  padding: 52px 0 44px;
}
.hero-copy { min-height: 330px; }
.hero-logo { width: min(250px, 100%); }
.hero-status { margin-top: 12px !important; padding: 8px 11px; }
.exchange-card {
  padding: 18px;
  border-radius: 15px;
  background: linear-gradient(145deg, #242424, #1e1e1e);
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}
.exchange-head { margin-bottom: 18px; }
.exchange-field input { padding: 13px; font-size: 18px; }
.feature-strip { border-radius: 12px; }
.feature-strip article { padding: 17px 16px; }
.currency-section { padding-top: 50px; }
.section-heading { margin-bottom: 14px; }
.section-heading h2 { font-size: 30px; }
.currency-table { border-radius: 12px; }
.table-head, .market-row { padding: 13px 16px; }
.footer { margin-top: 52px; }

@media (max-width: 900px) {
  :root { --rail-width: 64px; }
  .main-shell { padding-inline: 25px; }
  .hero-grid { gap: 26px; padding-top: 38px; }
}

@media (max-width: 620px) {
  :root { --rail-width: 58px; }
  .sidebar { padding-inline: 7px; }
  .side-link { width: 44px; height: 44px; }
  .main-shell { padding-inline: 14px; }
  .topbar { height: auto; min-height: 64px; padding: 10px 0; }
  .search-box { width: 100%; }
  .topbar-right .button { padding: 9px 10px; }
  .hero-grid { padding: 30px 0 26px; }
}

/* The same block-built DEX sequence, embedded in the hero rather than a modal. */
.hero-logo-d {
  height: auto;
  aspect-ratio: 115 / 132;
}

.hero-logo-d > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--blue);
}

.hero-logo-d .hero-d-diagonal {
  transform-box: fill-box;
  transform-origin: center;
  animation: hero-diagonal-in .55s cubic-bezier(.2,.9,.3,1.15) both;
}

.hero-logo-d .hero-d-diagonal:nth-of-type(2) { animation-delay: .2s; }
.hero-logo-d .hero-d-diagonal:nth-of-type(3) { animation-delay: .4s; }

@keyframes hero-diagonal-in {
  from { opacity: 0; transform: translateY(-8px) rotate(-8deg); }
  to { opacity: 1; transform: none; }
}

.hero-logo-d .hero-logo-layer { position: absolute; inset: 0; }

.hero-logo-d .hero-logo-layer i,
.hero-logo-ex .hero-ex-block {
  position: absolute;
  display: block;
  background: var(--blue);
  border-radius: 2px;
  animation: hero-fly .75s cubic-bezier(.2,.9,.3,1.15) var(--delay) both;
}

.hero-logo-d .hero-logo-layer i:nth-child(3n),
.hero-logo-ex .hero-ex-block:nth-child(3n) { background: #5e9aff; }
.hero-logo-d .hero-logo-layer i:nth-child(5n),
.hero-logo-ex .hero-ex-block:nth-child(5n) { background: #0b48c8; }

.hero-logo-d.is-done,
.hero-logo-ex.is-done { filter: drop-shadow(0 0 24px rgba(23,105,255,.5)); }

.hero-logo-d.is-done .hero-logo-layer i,
.hero-logo-ex.is-done .hero-ex-block {
  animation: hero-wave 1.8s ease-in-out var(--wave) infinite;
}

.hero-logo-ex {
  display: block;
  width: min(58px, 10vw);
  height: min(39px, 7vw);
  margin: 0 0 0 12px;
  opacity: 1;
  animation: none;
}

.hero-logo-ex > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--blue);
  opacity: 1;
  animation: none;
}

@keyframes hero-fly {
  from { transform: translate(var(--x), var(--y)) rotate(var(--rotation)) scale(.3); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes hero-wave {
  0%, 100% { transform: none; filter: brightness(1); }
  45% { transform: translateY(-14%) scale(1.1); filter: brightness(1.4); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-d .hero-logo-layer i,
  .hero-logo-ex .hero-ex-block,
  .hero-logo-d .hero-d-diagonal,
  .hero-logo-ex > svg { animation: none; opacity: 1; }
}
.brand > span:last-child { display: flex; align-items: baseline; gap: 8px; }
.brand > span:last-child small { margin: 0; transform: translate(-3px, 7px); }

.app-shell { grid-template-columns: 190px 1fr; }
.side-link.active { background: transparent; color: #78a9ff; }
.side-link.active span { color: #78a9ff; }
@media (max-width: 900px) { .app-shell { grid-template-columns: 74px 1fr; } }

/* Final compact-shell overrides. */
.app-shell { grid-template-columns: var(--rail-width) minmax(0, 1fr); }
.brand { flex-direction: column; gap: 4px; }
.brand > span:last-child { display: block; }
.brand > span:last-child small { margin: 0; transform: none; }
.side-link.active { background: #282828; color: var(--text); }
.side-link.active span { color: #9aa0aa; }

/* Keep the identity block anchored to the upper-left of the content canvas. */
.hero-grid {
  align-items: start;
  padding-top: 34px;
}
.hero-copy {
  min-height: 0;
  justify-content: flex-start;
  padding-top: 0;
}
.hero-logo {
  margin: 0;
  justify-content: flex-start;
}
.hero-copy .hero-status {
  margin-top: 10px !important;
}
