.exchange-workspace {
  width: min(100%, 1200px);
  line-height: 1.5;
}
.exchange-heading { margin-bottom: clamp(20px, 3vw, 36px); }
.exchange-heading h1 {
  font: 400 clamp(27px, 3.8vw, 48px)/1.15 Unbounded, Manrope, sans-serif;
  letter-spacing: -.05em;
}
.exchange-heading p {
  max-width: 45ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}
.exchange-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, .42fr);
  gap: clamp(18px, 3vw, 39px);
  align-items: start;
}
.exchange-panel {
  min-width: 0;
  padding: clamp(21px, 3.2vw, 43px);
  border: 1px solid #353d49;
  border-radius: 15px;
  background: #1b1e24;
}
.exchange-panel h2 {
  font: 400 clamp(17px, 2.3vw, 25px)/1.25 Unbounded, Manrope, sans-serif;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.exchange-panel h2:focus { outline: none; }
.exchange-panel form { margin-top: 24px; }
.exchange-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.currency-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
}
.currency-picker { position: relative; min-width: 0; }
.currency-label, .exchange-amount-label {
  display: block;
  margin: 0 0 8px;
  color: #c6cbd3;
  font-size: 13px;
  font-weight: 750;
}
.currency-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  min-height: 65px;
  padding: 9px 14px;
  border: 1px solid #424e61;
  border-radius: 11px;
  color: var(--ink);
  background: #15181e;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.currency-chevron { display: block; flex: 0 0 16px; width: 16px; height: 16px; color: var(--muted); }
.currency-trigger[aria-expanded="true"] .currency-chevron { transform: rotate(180deg); }
.currency-trigger:hover:not(:disabled), .currency-trigger[aria-expanded="true"] { border-color: #5b8fff; }
.currency-trigger:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.currency-trigger:disabled { opacity: .65; cursor: default; }
.currency-face { display: flex; min-width: 0; align-items: center; gap: 10px; }
.currency-token {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #dce5fc;
  background: #28334d;
  font: 700 20px/1 system-ui, sans-serif;
}
.currency-token[data-asset="USDT"] { color: #a5e7d2; background: #163d36; }
.currency-token[data-asset="SOL"] { color: #d1bcff; background: #392850; }
.currency-token[data-asset="BTC"] { color: #ffd49a; background: #4a321d; }
.currency-token:empty { display: none; }
.currency-name { display: block; min-width: 0; }
.currency-ticker, .currency-full-name { display: block; overflow-wrap: anywhere; }
.currency-ticker { color: var(--ink); font-size: 15px; font-weight: 800; line-height: 1.15; }
.currency-full-name { margin-top: 3px; color: #b4bcc8; font-size: 12px; line-height: 1.2; }
.currency-list {
  position: absolute;
  z-index: 3;
  top: calc(100% + 6px);
  inset-inline: 0;
  display: grid;
  gap: 2px;
  padding: 5px;
  border: 1px solid #44546c;
  border-radius: 11px;
  background: #20242c;
  box-shadow: 0 12px 30px #0007;
}
.currency-option {
  display: flex;
  min-height: 48px;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
}
.currency-option[aria-selected="true"] { background: #2e2c29; }
.currency-selected-icon { display: block; flex: 0 0 16px; width: 16px; height: 16px; color: var(--gold); }
.currency-option:hover, .currency-option:focus { background: #303847; outline: 0; }
.currency-option:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.exchange-button {
  display: inline-flex;
  max-width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid #4d5563;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font: 750 13px/1.35 Manrope, sans-serif;
  text-align: center;
  cursor: pointer;
}
.exchange-button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.exchange-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.exchange-button:disabled { opacity: .55; cursor: default; }
.exchange-button.exchange-swap { width: 46px; min-height: 46px; align-self: end; margin-bottom: 9px; padding: 0; color: #c6d4f4; }
.exchange-swap-icon { display: block; width: 22px; height: 22px; }
.exchange-button.exchange-swap:disabled { color: #a4abb5; }
.exchange-button.exchange-swap:hover:not(:disabled) { color: var(--gold); }
.exchange-primary { border-color: #3a63ce; color: #f4f5f6; background: #0035b6; }
.exchange-primary:hover:not(:disabled) { border-color: #5b8fff; color: #fff; background: #164aca; }
#estimate-submit { min-width: min(100%, 210px); margin-top: 20px; }

.exchange-amount {
  display: flex;
  width: 100%;
  min-height: 57px;
  align-items: center;
  gap: 10px;
  padding-inline: 13px;
  border: 1px solid #424e61;
  border-radius: 11px;
  color: var(--ink);
  background: #14171c;
}
.exchange-amount:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.exchange-amount:has(input[aria-invalid="true"]) { border-color: #e48d82; }
.exchange-amount input {
  width: 100%;
  min-width: 0;
  padding-block: 9px;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font: 750 clamp(22px, 3.25vw, 29px)/1.2 Manrope, sans-serif;
  font-variant-numeric: tabular-nums;
}
.exchange-amount input::placeholder { color: #8e98a8; }
.exchange-amount span { color: var(--muted); font-size: 13px; font-weight: 800; }
.exchange-message { margin-top: 10px; font-size: 13px; overflow-wrap: anywhere; }
.exchange-message.muted { color: var(--muted); }
.exchange-message.error { color: #ffc0b7; }
.exchange-load-error button { margin-top: 14px; }

.exchange-sidebar { min-width: 0; }
.exchange-side-section { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #181b20; }
.exchange-side-section + .exchange-side-section { margin-top: 12px; }
.exchange-side-section h2 {
  color: var(--ink);
  font: 800 17px/1.3 Manrope, sans-serif;
  overflow-wrap: anywhere;
}
.exchange-side-description { margin-top: 7px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.exchange-availability-indicator {
  display: block;
  width: 7px;
  height: 7px;
  margin-bottom: 11px;
  border-radius: 8px;
  background: var(--gold);
}
.exchange-documents { display: flex; flex-wrap: wrap; column-gap: 13px; margin-top: 6px; }
.exchange-inline-link, .exchange-documents a, .exchange-estimate-details a {
  color: #b7caff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .23em;
}
.exchange-inline-link, .exchange-documents a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}
.exchange-inline-link:hover, .exchange-documents a:hover, .exchange-estimate-details a:hover { color: var(--gold); }
.exchange-documents:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.exchange-review dd { margin: 0; }
.exchange-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 0;
  padding: clamp(12px, 2.4vw, 21px);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #15181e;
}
.exchange-review dt { color: var(--muted); font-size: 13px; }
.exchange-figures dd {
  margin-top: 4px;
  font: 800 clamp(20px, 3.45vw, 34px)/1.15 Manrope, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.estimate-output { color: var(--gold); }
.exchange-estimate-details { margin: 0; padding-top: 15px; }
.estimate-sources { display: flex; flex-wrap: wrap; gap: 5px 13px; }
.exchange-estimate-details > div {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding-block: 5px;
}
.exchange-estimate-details dd {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.estimate-disclosure {
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.exchange-partner-action {
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.exchange-partner-links { display: flex; flex-wrap: wrap; gap: 5px 15px; margin-top: 10px; }
.exchange-review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.exchange-button.exchange-quiet { border-color: transparent; color: #b7caff; }
.exchange-button.exchange-quiet:hover:not(:disabled) { color: var(--gold); }

@media (max-width: 1040px) {
  .currency-grid { grid-template-columns: minmax(0, 1fr) 46px; }
  .currency-from { grid-column: 1; grid-row: 1; }
  .currency-to { grid-column: 1; grid-row: 2; }
  .exchange-button.exchange-swap { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 13px 0 0; }
  .exchange-swap-icon { transform: rotate(90deg); }
}
@media (max-width: 800px) {
  .exchange-layout { grid-template-columns: minmax(0, 1fr); }
  .exchange-sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 16px; }
  .exchange-side-section + .exchange-side-section { margin-top: 0; }
}
@media (max-width: 535px) {
  .exchange-heading { margin-bottom: 16px; }
  .exchange-heading p { margin-top: 8px; }
  .exchange-panel { padding: 17px; }
  .exchange-panel form { margin-top: 19px; }
  .exchange-layout, .exchange-sidebar { gap: 15px; }
  .exchange-sidebar { grid-template-columns: minmax(0, 1fr); }
  .exchange-side-section { padding: 15px; }
  .currency-grid { gap: 10px; margin-bottom: 18px; }
  .currency-trigger { min-height: 58px; padding-inline: 9px; }
  .currency-face { gap: 8px; }
  .currency-token { flex-basis: 30px; width: 30px; height: 30px; font-size: 17px; }
  .exchange-amount { width: 100%; }
  #estimate-submit { width: 100%; }
  .exchange-figures { gap: 11px; }
  .exchange-review-actions .exchange-button { padding-inline: 10px; }
}

@media (max-width: 380px) {
  .exchange-shell .dashboard-nav.rail > .wordmark { min-width: 0; }
  .exchange-shell .dashboard-nav.rail > .wordmark img { width: min(34vw, 110px); min-width: 0; }
}
