/* ========== BRAND TOKENS (sampled from logo) ========== */
:root {
  --bg:           #060a18;
  --bg-2:         #0a1230;
  --bg-3:         #0e1a44;
  --panel:        rgba(255,255,255,0.04);
  --panel-2:      rgba(255,255,255,0.06);
  --panel-3:      rgba(255,255,255,0.09);
  --line:         rgba(255,255,255,0.08);
  --line-2:       rgba(255,255,255,0.14);

  --brand:        #2f6bff;
  --brand-2:      #1a3fd9;
  --brand-3:      #6d8bff;
  --brand-grad:   linear-gradient(135deg, #6d8bff 0%, #2f6bff 50%, #1a3fd9 100%);

  --text:         #eef1ff;
  --text-dim:     #a9b3d6;
  --text-muted:   #6f7aa3;
  --success:      #22d39a;
  --danger:       #ff5a6e;

  --radius-lg:    20px;
  --radius-md:    14px;
  --radius-sm:    10px;

  --shadow-card:  0 30px 80px -20px rgba(8, 16, 56, 0.7), 0 8px 30px -12px rgba(47, 107, 255, 0.25);
  --shadow-pop:   0 18px 50px -10px rgba(47, 107, 255, 0.45);

  --header-h:     64px;
  --container:    980px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
input, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.02em; margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.muted { color: var(--text-muted); }
.center { text-align: center; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: transform .15s ease, background .2s ease, box-shadow .25s ease, border-color .2s ease;
  border: 1px solid transparent;
  user-select: none;
}
.btn-lg  { padding: 16px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--brand-grad);
  color: white;
  box-shadow: var(--shadow-pop);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 22px 60px -10px rgba(47, 107, 255, .6); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: var(--panel-2); }

/* Pill buttons in header */
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: background .15s, border-color .15s;
}
.pill-btn:hover { background: var(--panel-2); border-color: var(--line-2); }
.lang-pill .flag { font-size: 16px; line-height: 1; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: background .15s;
}
.icon-btn:hover { background: var(--panel-2); }

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(6, 10, 24, 0.72);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 6px 20px -6px rgba(47, 107, 255, 0.5);
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-mark.spinning { animation: brandSpin 14s linear infinite; }
@keyframes brandSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-mark.spinning { animation: none; }
}
.brand-mark-fallback {
  display: none;
  width: 100%; height: 100%;
  align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(135deg, #fff, #c9d4ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}
.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #eef1ff 0%, #b8c7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Header gets a wider container so the brand and the action pills
   breathe further apart than the body content does. */
.site-header .container,
.terms-header .container {
  max-width: 1180px;
  padding-left: 28px;
  padding-right: 28px;
}

.hamburger {
  flex-direction: column;
  gap: 4px;
}
.hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ========== MENU PANEL (slide-in side drawer) ========== */
.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(360px, 90vw);
  background: linear-gradient(180deg, #0a1230 0%, #060a18 100%);
  border-left: 1px solid var(--line-2);
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translate3d(100%, 0, 0);
  transition: transform .36s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -20px 0 60px -20px rgba(0,0,0,0.5);
  backface-visibility: hidden;
}
.menu-panel.open { transform: translate3d(0, 0, 0); }
.menu-panel .menu-nav > *,
.menu-panel .menu-section { opacity: 0; transform: translateX(20px); transition: opacity .35s ease, transform .35s cubic-bezier(0.22, 1, 0.36, 1); }
.menu-panel.open .menu-nav > * { opacity: 1; transform: translateX(0); }
.menu-panel.open .menu-section { opacity: 1; transform: translateX(0); transition-delay: .12s; }
.menu-panel.open .menu-nav > *:nth-child(1) { transition-delay: .04s; }
.menu-panel.open .menu-nav > *:nth-child(2) { transition-delay: .07s; }
.menu-panel.open .menu-nav > *:nth-child(3) { transition-delay: .10s; }

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.menu-head strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.menu-nav {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}
.menu-nav a,
.menu-nav button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  transition: background .12s;
}
.menu-nav a:hover,
.menu-nav button:hover { background: var(--panel-2); }
.menu-ico {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--panel-3);
  color: var(--brand-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.menu-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 10px;
}
.menu-section-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.link-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-3);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .12s;
}
.link-btn:hover { background: var(--panel-2); }

.menu-recent {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.menu-recent-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .1s;
}
.menu-recent-item:hover { background: var(--panel-2); border-color: var(--line-2); }
.menu-recent-item:active { transform: scale(0.99); }
.menu-recent-item .mr-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--panel-3);
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-recent-item .mr-icon img { width: 100%; height: 100%; object-fit: contain; }
.menu-recent-item .mr-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}
.menu-recent-item .mr-flow .arrow { color: var(--text-muted); flex-shrink: 0; }
.menu-recent-item .mr-flow .amount {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-recent-item .mr-flow .amount small {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 2px;
}
.menu-recent-item .mr-track {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--panel-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.menu-recent-empty {
  padding: 18px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px dashed var(--line-2);
  border-radius: 12px;
}

.menu-scrim {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 12, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 55;
}
.menu-scrim.show { opacity: 1; pointer-events: auto; }
.hamburger span { transition: transform .35s cubic-bezier(0.22, 1, 0.36, 1), opacity .25s ease; }

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 36px 0 60px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .45;
}
.orb-1 {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #2f6bff 0%, transparent 70%);
  top: -180px; left: -120px;
}
.orb-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #1a3fd9 0%, transparent 70%);
  top: 120px; right: -160px;
  opacity: .35;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.hero-copy {
  text-align: center;
  max-width: 640px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 18px;
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(34, 211, 154, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 154, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(34, 211, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 154, 0); }
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.gradient-text {
  background: linear-gradient(135deg, #6d8bff 0%, #2f6bff 45%, #b8c7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ========== EXCHANGE CARD ========== */
.exchange-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--line-2);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.ex-row {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  transition: border-color .15s, background .15s;
}
.ex-row:hover, .ex-row:focus-within {
  border-color: var(--line-2);
  background: rgba(255,255,255,0.04);
}
.ex-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 8px;
  gap: 12px;
}
.ex-row-top label {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}
.fiat-flip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-3);
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .12s;
}
.fiat-flip:not(.readonly):hover { background: var(--panel-2); }
.fiat-flip.readonly { cursor: default; color: var(--text-muted); }
.fiat-flip .muted-prefix { color: var(--text-muted); font-weight: 500; }

.ex-row-body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.amount-prefix {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  transition: opacity .14s ease;
}
.ex-row.flipping .amount-prefix,
.ex-row.flipping .ex-amount {
  opacity: 0;
  transition: opacity .14s ease;
}
.ex-amount { transition: opacity .14s ease; }
.ex-amount {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  width: 100%;
  min-width: 0;
  padding: 2px 0;
  text-overflow: ellipsis;
}
.ex-amount::placeholder { color: var(--text-muted); }
.ex-amount[readonly] { color: var(--text); }

.coin-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  transition: background .15s, transform .1s;
  flex-shrink: 0;
  max-width: 180px;
}
.coin-picker:hover { background: rgba(255,255,255,0.12); }
.coin-picker:active { transform: scale(0.98); }
.coin-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #1a1f3a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
}
.coin-icon img { width: 100%; height: 100%; object-fit: contain; }
.coin-icon .ci-bg {
  width: 100%; height: 100%;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  overflow: hidden;
}
.coin-icon .ci-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
}
.coin-icon .ci-letter {
  position: relative;
  z-index: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 10px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  letter-spacing: -0.02em;
}
.coin-list .coin-icon .ci-letter { font-size: 12px; }

/* Colored network pill — shown under the coin name in the picker and dropdown */
.network-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.4;
}
.cp-symbol .network-pill { font-size: 10px; padding: 1px 7px; }
.coin-list .meta .network-pill { margin-top: 4px; }
.meta-sym { color: var(--text-muted); font-weight: 500; font-size: 13px; }
.mr-nets { display: inline-flex; gap: 6px; align-items: center; color: var(--text-muted); font-size: 10.5px; margin-left: 6px; }
.order-summary .network-pill { margin: 0 4px; vertical-align: middle; }
.cp-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}
.cp-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.cp-symbol {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.2;
  margin-top: 2px;
}

.ex-swap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  margin: -9px auto;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--text);
  z-index: 2;
  transition: transform .25s ease, background .15s;
}
.ex-swap:hover { background: var(--panel-3); transform: rotate(180deg); }

.ex-quote {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 14px 0 14px;
}

.ex-field {
  margin-top: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.ex-field label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.ex-field label .opt { color: var(--text-muted); font-weight: 400; }
.ex-field input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
  padding: 2px 0;
}
.ex-field input::placeholder { color: var(--text-muted); opacity: .8; }

#exchangeBtn { margin-top: 14px; }

.ex-foot {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}
.ex-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ========== SECTIONS ========== */
.section { padding: 50px 0; position: relative; }
.section-tight { padding: 36px 0; }
.section-head { max-width: 680px; margin: 0 auto 24px; }
.section-head.left { margin: 0 0 16px; }
.section-head.compact h2 { font-size: 20px; font-weight: 600; }
.section-head h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  margin-bottom: 4px;
}
.section-head p { color: var(--text-muted); font-size: 13.5px; margin: 0; }

/* ========== RECENT SWAPS ========== */
.recent-list {
  display: grid;
  gap: 8px;
}
.recent-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s, background .15s;
  font-size: 14px;
}
.recent-item:hover { border-color: var(--line-2); background: var(--panel-2); }
.recent-pair { display: flex; align-items: center; gap: 6px; }
.recent-pair .coin-icon { width: 22px; height: 22px; }
.recent-pair .arrow { color: var(--text-muted); }
.recent-amounts { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.recent-amounts strong { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-amounts small { color: var(--text-muted); font-size: 11.5px; }
.recent-id {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--brand-3);
  background: rgba(47,107,255,0.1);
  border: 1px solid rgba(47,107,255,0.3);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.recent-time { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.recent-track {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: background .12s, color .12s;
}
.recent-track:hover { background: var(--brand); color: white; border-color: transparent; }

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px;
  background: var(--panel);
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ========== STEPS ========== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.step {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.step:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--panel-2); }
.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-3);
  margin-bottom: 8px;
}
.step h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.step p { color: var(--text-dim); font-size: 13px; margin: 0; line-height: 1.5; }

/* ========== TRACK ========== */
.track-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.track-input {
  display: flex;
  gap: 10px;
}
.track-input input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  outline: 0;
  transition: border-color .15s;
  min-width: 0;
}
.track-input input:focus { border-color: var(--brand); }
.track-result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 14px;
}
.track-result strong { color: var(--text); font-weight: 600; }
.track-result.error { border-color: rgba(255, 90, 110, 0.4); background: rgba(255, 90, 110, 0.08); }

/* ========== FOOTER ========== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  margin-top: 30px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-row .muted { font-size: 12.5px; }

/* Stacked / centered footer (screenshot match) */
.footer-stacked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 50px 0 24px;
  text-align: center;
}
.brand-lg { gap: 14px; }
.brand-lg .brand-mark { width: 44px; height: 44px; }
.brand-lg .brand-name { font-size: 26px; }
.footer-links { display: flex; gap: 32px; }
.footer-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s;
}
.footer-links a:hover { color: var(--text); }
.footer-copyright {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  margin-top: 8px;
}

/* ========== TERMS PAGE ========== */
.terms-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(6, 10, 24, 0.72);
  border-bottom: 1px solid var(--line);
}
.terms-header .header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: background .15s, border-color .15s;
}
.back-btn:hover { background: var(--panel-2); border-color: var(--line-2); }
.back-btn svg { color: var(--text-dim); }

.terms-page {
  position: relative;
  padding: 60px 0 40px;
  overflow: hidden;
}
.terms-page .hero-bg { position: absolute; inset: 0; pointer-events: none; }

.terms-hero {
  position: relative;
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.terms-hero .brand {
  justify-content: center;
  gap: 14px;
  margin: 0 auto 28px;
}
.terms-hero .brand-mark { width: 46px; height: 46px; }
.terms-hero .brand-name { font-size: 30px; }
.terms-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 16px;
}
.terms-hero p {
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 28px;
}
.terms-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.12);
  border: 1px solid rgba(47, 107, 255, 0.4);
  color: var(--brand-3);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.terms-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 880px;
  margin: 0 auto 40px;
}
.terms-card {
  padding: 26px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color .15s, background .15s, transform .15s;
}
.terms-card:hover {
  border-color: var(--line-2);
  background: var(--panel-2);
  transform: translateY(-1px);
}
.terms-card h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
}
.terms-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.65;
}

.terms-footnote {
  max-width: 880px;
  margin: 50px auto 0;
  padding: 22px 26px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.015);
}
.terms-footnote p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}
.footnote-link {
  color: var(--brand-3);
  font-weight: 600;
  margin-left: 6px;
  white-space: nowrap;
}
.footnote-link:hover { color: var(--text); }

/* How-it-works cards — same shell as .terms-card but with a numbered badge */
.how-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: flex-start;
}
.how-step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-3);
  background: rgba(47,107,255,0.12);
  border: 1px solid rgba(47,107,255,0.35);
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.how-step-body h2 { font-size: 20px; margin-bottom: 8px; }
.how-step-body p  { font-size: 14.5px; line-height: 1.7; }
@media (max-width: 640px) {
  .how-step { grid-template-columns: 1fr; gap: 14px; }
  .how-step-num { width: 44px; height: 44px; font-size: 18px; }
}

@media (max-width: 640px) {
  .terms-hero { margin-bottom: 36px; }
  .terms-card { padding: 20px 18px; }
  .terms-grid { gap: 12px; }
  .footer-stacked { padding: 36px 0 16px; gap: 18px; }
  .brand-lg .brand-name { font-size: 22px; }
  .footer-links { gap: 24px; }
  .footer-copyright { font-size: 10px; letter-spacing: 0.24em; }
  .back-btn { padding: 8px 12px; font-size: 11px; letter-spacing: 0.1em; }
}

/* ========== MODAL ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal[hidden] { display: none; }
.modal-scrim {
  position: absolute; inset: 0;
  background: rgba(2, 4, 12, .65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade .2s ease;
}
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, #0f1838, #0a1230);
  border: 1px solid var(--line-2);
  border-radius: 20px 20px 0 0;
  padding: 18px;
  margin: 0;
  animation: slideUp .25s cubic-bezier(.2,.8,.2,1);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.modal-panel-sm { max-width: 440px; }
@media (min-width: 720px) {
  .modal { align-items: center; padding: 24px; }
  .modal-panel { border-radius: 20px; }
}
/* Variant — always centered, even on mobile (used by Track Order, Confirm) */
.modal.modal-centered { align-items: center; padding: 16px; }
.modal.modal-centered .modal-panel { border-radius: 20px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 12px;
}
.modal-head h3 { font-size: 17px; font-weight: 600; }

.modal-search {
  position: relative;
  margin-bottom: 12px;
}
.modal-search svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.modal-search input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px 12px 38px;
  outline: 0;
  font-size: 14px;
  transition: border-color .15s;
}
.modal-search input:focus { border-color: var(--brand); }

.coin-list {
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  max-height: 60vh;
}
.coin-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .12s;
}
.coin-list li:hover, .coin-list li[aria-selected="true"] { background: var(--panel); }
.coin-list .coin-icon { width: 32px; height: 32px; }
.coin-list .meta { flex: 1; min-width: 0; }
.coin-list .meta strong { display: block; font-size: 14.5px; font-weight: 600; }
.coin-list .meta small { color: var(--text-muted); font-size: 12.5px; }
.coin-list .check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--brand);
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}
.coin-list li[aria-selected="true"] .check { display: inline-flex; }
.coin-list .empty {
  padding: 30px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Language list flag */
.lang-list .flag-icon, .curr-list .curr-symbol {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--panel-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.curr-list .curr-symbol {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--brand-3);
}

/* Tabs in lang/curr modal */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: background .12s, color .12s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel-3); color: var(--text); }
.tab svg { color: currentColor; }
.close-tab { margin-left: auto; }

.tab-panel[hidden] { display: none; }
.tab-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }

/* ========== HOW IT WORKS ========== */
.how-steps {
  list-style: none;
  padding: 4px 4px 4px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.how-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.how-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-3);
  background: rgba(47,107,255,0.1);
  border: 1px solid rgba(47,107,255,0.3);
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.how-steps strong { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }
.how-steps p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }

.field-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

/* ========== FIAT AMOUNT MODAL ========== */
.fiat-body { padding: 4px 6px; }
.fiat-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 16px;
  transition: border-color .15s;
}
.fiat-input-wrap:focus-within { border-color: var(--brand); }
.fiat-symbol {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 24px;
}
#fiatInput {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  width: 100%;
  min-width: 0;
}
.fiat-actions {
  display: flex;
  gap: 10px;
}
.fiat-actions .btn { flex: 1; }

/* ========== ACCOUNT MODAL ========== */
.account-body {
  padding: 8px 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.account-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-3);
}
.account-body p { font-size: 14px; margin: 0; line-height: 1.5; max-width: 320px; }
.account-body small { font-size: 12px; }

/* ========== CONFIRM SWAP MODAL ========== */
.modal-panel-confirm { max-width: 480px; padding: 24px; }
.confirm-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.confirm-warn-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: rgba(251, 191, 36, 0.12);
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.confirm-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.confirm-sub {
  color: var(--text-dim);
  font-size: 14.5px;
  margin: 0 0 20px;
  line-height: 1.5;
}
.confirm-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color .15s;
}
.confirm-card:hover { border-color: var(--line-2); }
.confirm-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.confirm-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.confirm-row .coin-icon { width: 40px; height: 40px; }
.confirm-flow { min-width: 0; flex: 1; }
.confirm-flow strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.confirm-net {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.confirm-actions .btn { flex: 1; padding: 14px 16px; }

/* ========== ORDER MODAL ========== */
.order-success { text-align: center; padding: 8px 4px 4px; }
.order-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.order-brand .brand-mark {
  width: 44px;
  height: 44px;
}
.order-success .check {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(34, 211, 154, 0.14);
  border: 1px solid rgba(34, 211, 154, 0.4);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-success h3 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.order-success p { margin: 0 0 18px; }
.order-id-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  margin-bottom: 16px;
}
.order-id {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand-3);
}
.order-summary {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 13.5px;
  text-align: left;
}
.order-summary .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  color: var(--text-dim);
  gap: 12px;
}
.order-summary .row strong { color: var(--text); font-weight: 600; text-align: right; }
.order-actions { display: flex; gap: 10px; }
.order-actions .btn { flex: 1; }

/* ========== ORDER PAGE ========== */
.back-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.back-pill svg { color: var(--text-dim); }

.order-page {
  position: relative;
  padding: 28px 0 60px;
  overflow: hidden;
}
.order-page .hero-bg { position: absolute; inset: 0; pointer-events: none; }
.order-page > .container { position: relative; }

.order-warning {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 18px;
  align-items: center;
  background: var(--panel);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 22px;
}
.warning-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.1);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.warning-label strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
}
.warning-label small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  font-weight: 500;
}
.warning-body {
  margin: 0;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.6;
}

/* Status bar */
.order-status-bar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}
.status-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 100%; }
.status-side.right { text-align: right; align-items: flex-end; }
.status-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.status-coin {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}
.status-side.right .status-coin { flex-direction: row-reverse; text-align: right; }
.status-coin .coin-icon { width: 34px; height: 34px; flex-shrink: 0; }
.status-coin-info { min-width: 0; max-width: 100%; overflow: hidden; }
.status-coin strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.status-coin strong small {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 4px;
}
.status-coin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
}
.status-side.right .status-coin-meta { justify-content: flex-end; }
.trunc-addr {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.status-track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  position: relative;
}
.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 70px;
  flex-shrink: 0;
}
.status-step .step-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all .25s ease;
}
.status-step.done .step-icon {
  background: var(--success);
  color: #00261a;
  border-color: var(--success);
}
.status-step.active .step-icon {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  animation: stepFlash 1.3s ease-in-out infinite;
}
.status-step.active .step-label {
  color: var(--text);
  animation: labelPulse 1.3s ease-in-out infinite;
}
.status-step .step-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  transition: color .2s;
}
.status-step.done .step-label { color: var(--text); }
.status-connector {
  flex: 0 0 28px;
  height: 2px;
  background: var(--line);
  margin-top: 18px;
}
.status-connector.done { background: var(--success); }
@keyframes stepFlash {
  0%, 100% {
    box-shadow: 0 0 0 5px rgba(47, 107, 255, 0.5), 0 0 22px rgba(47, 107, 255, 0.5);
    transform: scale(1);
    background: var(--brand);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(47, 107, 255, 0), 0 0 36px rgba(47, 107, 255, 0.85);
    transform: scale(1.12);
    background: #6d8bff;
  }
}
@keyframes labelPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

/* Two-column main */
.order-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  margin-bottom: 22px;
}

.deposit-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 30px;
}
.deposit-card > h2 {
  text-align: center;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.deposit-row { padding: 14px 0; }
.deposit-row label {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.deposit-value {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.deposit-value .coin-icon { width: 30px; height: 30px; flex-shrink: 0; }
.deposit-value strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.deposit-value .addr-full {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13.5px;
  word-break: break-all;
  flex: 1;
  color: var(--text);
  min-width: 0;
}
.deposit-value > span:not(.coin-icon):not(.placeholder-text) {
  font-size: 16px;
  color: var(--text);
}
.placeholder-text {
  font-style: italic;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif !important;
  font-size: 13.5px;
}
.copy-btn {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
}
.copy-btn:hover { background: var(--panel-3); color: var(--text); border-color: var(--line-2); }
.copy-btn.sm { width: 28px; height: 28px; border-radius: 7px; }
.deposit-divider {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 0;
}

/* Sidebar */
.order-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.side-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.side-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.side-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--text);
}
.side-value.status-text {
  color: var(--brand-3);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
}
.side-value .copy-btn { width: 28px; height: 28px; }

/* Full details grid */
.swap-details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 30px;
  margin-bottom: 24px;
}
.swap-details h3 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 22px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 28px;
}
.detail-cell label {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.detail-cell > span,
.detail-cell .with-copy > span {
  font-size: 13px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--text);
  word-break: break-all;
}
.detail-cell .with-copy {
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-cell .with-copy > span { flex: 1; min-width: 0; }
.detail-cell .placeholder-text { font-family: 'Inter', sans-serif; }

.create-new-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}
.btn-create-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 12px;
  background: #ffffff;
  color: #060a18;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: transform .15s, background .15s, box-shadow .25s;
  border: 1px solid rgba(255,255,255,0.2);
  width: 100%;
}
.btn-create-new:hover {
  background: #e5e7ff;
  transform: translateY(-1px);
  box-shadow: 0 16px 40px -10px rgba(255, 255, 255, 0.18);
}
.btn-create-new.side-cta {
  margin-top: 4px;
}
/* Variant inside the sidebar — full-width and primary brand color */
.btn-create-new.side-cta {
  width: 100%;
  padding: 14px 20px;
  margin-top: 4px;
  background: var(--brand-grad);
  color: white;
  border: none;
  box-shadow: var(--shadow-pop);
}
.btn-create-new.side-cta:hover {
  background: var(--brand-grad);
  box-shadow: 0 22px 60px -10px rgba(47, 107, 255, .55);
}

@media (max-width: 980px) {
  .order-grid { grid-template-columns: 1fr; }
  .order-status-bar { grid-template-columns: 1fr; gap: 22px; padding: 20px; }
  .status-side.right { align-items: flex-start; text-align: left; }
  .status-side.right .status-coin { flex-direction: row; }
  .status-side.right .status-coin-meta { justify-content: flex-start; }
  .status-track { max-width: 100%; overflow-x: auto; padding: 4px 0; justify-content: flex-start; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .order-warning {
    grid-template-columns: auto 1fr;
    padding: 16px;
    gap: 14px;
  }
  .order-warning .warning-body { grid-column: 1 / -1; }
  .deposit-card { padding: 20px; }
  .deposit-row label { font-size: 12px; }
  .swap-details { padding: 20px; }
  .detail-grid { grid-template-columns: 1fr; gap: 16px; }
  .status-connector { flex: 0 0 16px; }
  .status-step { width: 60px; }
  .status-step .step-label { font-size: 10.5px; }
  .status-step .step-icon { width: 32px; height: 32px; }
  .back-pill .hide-xs { display: none; }
  .back-pill { padding: 8px 11px; }
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0e1a44;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transition: opacity .2s ease, transform .25s ease;
  z-index: 200;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  /* Header: just the logo (no "Rotating" text) and just the flag (no "EN") */
  .brand-name { display: none; }
  .lang-pill #langCode { display: none; }
  .lang-pill > svg:last-of-type { display: none; }
  .lang-pill { padding: 7px 12px; gap: 0; }
  .lang-pill .flag { font-size: 18px; line-height: 1; }
  /* Tighter container padding on phone */
  .site-header .container,
  .terms-header .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .header-actions { gap: 8px; }

  .hero h1 { font-size: 28px; }
  .hero { padding: 24px 0 40px; }
  .exchange-card { padding: 14px; border-radius: 20px; }
  .ex-row { padding: 14px 14px; border-radius: 16px; }
  .amount-prefix { font-size: 22px; }
  .ex-amount { font-size: 24px; }
  .cp-name { max-width: 80px; font-size: 12.5px; }
  .coin-picker { padding: 5px 9px 5px 5px; }
  .coin-icon { width: 24px; height: 24px; }
  .steps { grid-template-columns: 1fr; }
  .section, .section-tight { padding: 30px 0; }
  .recent-item { grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px 12px; }
  .recent-id, .recent-time { display: none; }
  .order-actions { flex-direction: column; }
}

@media (max-width: 380px) {
  .pill-btn { padding: 7px 10px; font-size: 12px; }
  .hide-xs { display: none; }
  .brand-name { font-size: 15px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-actions { gap: 6px; }
  .icon-btn { width: 36px; height: 36px; }
}

/* iOS safe area */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

::selection { background: rgba(47, 107, 255, 0.4); color: white; }
