.fx-workbench,
.fx-fields,
.fx-summary {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.fx-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 0.5rem;
}

.fx-pair select {
  text-overflow: ellipsis;
}

.fx-swap.zt-button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.65rem;
  font-size: 1.25rem;
}

.fx-options {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 0.75rem 1rem;
}

.fx-options fieldset {
  flex: 1 1 13rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.fx-options legend {
  margin-bottom: 6px;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

#fx-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.375rem;
}

#fx-presets button {
  min-height: 44px;
  padding: 0.25rem;
  border: 1px solid var(--ws-line-strong);
  border-radius: var(--r-sm);
  background: transparent;
  font-size: 0.875rem;
}

#fx-presets button[aria-pressed='true'] {
  background: var(--ws-ink);
  color: var(--ws);
}

.fx-ledger {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--ws-line-strong);
  border-radius: var(--r-sm);
  background: var(--ws-2);
}

.fx-ledger p,
.fx-source p,
.fx-summary .zt-next-tool {
  margin: 0;
}

#fx-result-label {
  font-size: 0.875rem;
  font-weight: 600;
}

#fx-result {
  overflow-wrap: anywhere;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#fx-quote,
.fx-source {
  color: var(--ws-dim);
  font-size: 0.875rem;
}

#fx-copy {
  justify-self: start;
  margin-top: 0.25rem;
}

.fx-source {
  display: grid;
  justify-items: start;
  gap: 0.25rem;
}

#fx-refresh[aria-disabled='true'] {
  opacity: 0.65;
}

@media (min-width: 850px) {
  .fx-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
  }
}
