*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #1a1a1a;
  background: #f5f5f7;
}

main {
  max-width: 640px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.lede {
  margin: 0 0 1.5rem;
  color: #555;
  font-size: 0.9rem;
}

fieldset {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem 1rem;
}

legend {
  padding: 0 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: #333;
}

label {
  display: block;
  margin: 0.5rem 0;
  font-size: 0.85rem;
  color: #333;
}

input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

button {
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: #0057ff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

section#log,
section#result {
  margin-top: 1.5rem;
}

pre {
  padding: 0.75rem;
  background: #f0f0f2;
  border-radius: 4px;
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.status {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status--pending,
.status--processing,
.status--awaiting_redirect,
.status--awaiting_match {
  background: #fff4d6;
  color: #7a5900;
}

.status--paid {
  background: #d3f4dd;
  color: #145a2c;
}

.status--failed,
.status--cancelled {
  background: #fbdada;
  color: #7a1717;
}

.status--refunded {
  background: #e0e0e6;
  color: #333;
}
