.page {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero {
  margin: 36px 0 24px;
}

.hero h1 {
  margin: 0 0 10px;
  color: #fff;
}

.hero p,
.card p {
  color: #b7c3d9;
}

form {
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d4dcef;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.chips button {
  border: 1px solid rgba(245, 185, 66, 0.28);
  background: rgba(245, 185, 66, 0.08);
  color: #d4dcef;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

.chips button:hover,
.chips button:focus-visible {
  color: #f5b942;
}

.pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.swap {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(245, 185, 66, 0.35);
  background: transparent;
  color: #f5b942;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.15rem;
}

.swap:hover,
.swap:focus-visible {
  background: rgba(245, 185, 66, 0.1);
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: #f5b942;
  color: #1c1408;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: #ffd27a;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.ghost {
  width: auto;
  margin-top: 16px;
  background: transparent;
  color: #f5b942;
  border: 1px solid rgba(245, 185, 66, 0.35);
}

.status {
  margin: 14px 0 0;
  min-height: 1.4em;
  font-size: 0.95rem;
}

.status-error {
  color: #ff8fa0;
}

.card {
  margin-top: 18px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card.muted {
  opacity: 0.85;
}

.kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #f5b942;
  font-weight: 700;
}

.card h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 2rem;
}

.rate {
  color: #d5deee;
  font-size: 0.95rem;
}

.history {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.history-item {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(245, 185, 66, 0.28);
  background: rgba(245, 185, 66, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.history-item button {
  border: 0;
  background: transparent;
  color: #d4dcef;
  cursor: pointer;
  padding: 6px 10px 6px 12px;
}

.history-item button:hover,
.history-item button:focus-visible {
  color: #f5b942;
}

.history-remove {
  padding: 6px 10px;
  color: #8b97ad;
  border-left: 1px solid rgba(245, 185, 66, 0.2);
}

.history-remove:hover,
.history-remove:focus-visible {
  color: #ff8fa0;
}

.history-clear {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #8b97ad;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

.history-clear:hover,
.history-clear:focus-visible {
  color: #ff8fa0;
  border-color: rgba(255, 143, 160, 0.4);
}

@media (max-width: 640px) {
  .pair {
    grid-template-columns: 1fr;
  }

  .swap {
    width: 100%;
  }

  .card h2 {
    font-size: 1.55rem;
  }
}
