:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #dce1e8;
  --text: #1f2933;
  --muted: #647084;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --code-bg: #111827;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  margin: 0;
}

main {
  margin: 32px auto;
  max-width: 760px;
  padding: 0 20px 64px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1 {
  font-size: 26px;
  margin: 0 0 4px;
}

h2 {
  font-size: 16px;
  margin: 0 0 12px;
}

.banner {
  text-align: center;
  background: #fff4d6;
  border-bottom: 1px solid #e3c36a;
  color: #5f4700;
  font-weight: 700;
  padding: 10px 20px;
}

.breadcrumb {
  font-size: 14px;
  margin: 0 0 16px;
}

.breadcrumb a {
  color: var(--muted);
}

.subtitle {
  color: var(--muted);
  margin: 0 0 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  padding: 24px;
}

/* Summary panel ---------------------------------------------------------- */

.summary {
  display: grid;
  gap: 0;
  grid-template-columns: 140px 1fr;
}

.summary dt {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 0;
}

.summary dd {
  margin: 0;
  padding: 8px 0;
  word-break: break-all;
}

.summary dt:not(:first-child),
.summary dd:nth-of-type(n + 2) {
  border-top: 1px solid var(--border);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 14px;
}

.pill {
  background: #eef2ff;
  border-radius: 999px;
  color: var(--accent);
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
}

/* Form ------------------------------------------------------------------- */

.field {
  display: block;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.input,
input[type="text"],
.field input:not([type="checkbox"]) {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 9px 12px;
  width: 100%;
}

.input:focus,
.field input:not([type="checkbox"]):focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.input-group {
  position: relative;
}

.input-group .suffix {
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.input-group input {
  padding-right: 52px;
}

.amounts {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.rate {
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0 0;
}

.rate strong {
  color: var(--text);
}

/* Advanced --------------------------------------------------------------- */

details.advanced {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding-top: 16px;
}

details.advanced summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}

details.advanced summary::-webkit-details-marker {
  display: none;
}

details.advanced summary::before {
  content: "▸ ";
}

details.advanced[open] summary::before {
  content: "▾ ";
}

.advanced-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}

.checkbox {
  align-items: center;
  display: flex;
  font-size: 14px;
  gap: 8px;
  margin-bottom: 0;
}

.checkbox input {
  height: 16px;
  width: 16px;
}

/* Button ----------------------------------------------------------------- */

.actions {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
}

button,
.button {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 10px 20px;
}

button:hover,
.button:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

pre {
  background: var(--code-bg);
  border-radius: 8px;
  color: #f9fafb;
  font-size: 13px;
  overflow: auto;
  padding: 14px;
}

/* Section headings (top-level, equal weight) ----------------------------- */

.section-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 4px;
}

h2.section-title {
  margin-top: 40px;
}

/* Card entries (addresses + deposits) ------------------------------------ */

.entry {
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 4px;
  padding: 16px 0;
}

.entry:first-child {
  padding-top: 0;
}

.entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.entry-time {
  color: var(--muted);
  font-size: 13px;
}

/* Transaction id: the only bold-emphasised field, unique to deposits. */
.entry-txid {
  font-weight: 600;
  word-break: break-all;
}

/* Address: identical treatment wherever it appears (addresses + deposits). */
.entry-address {
  word-break: break-all;
}

.entry-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 12px;
  margin-top: 2px;
}

.entry-action {
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
}

.status {
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
}

.status-ok {
  background: #e7f6ec;
  color: #1a7f43;
}

.status-err {
  background: #fdecec;
  color: #c0392b;
}

.entry-response {
  margin-top: 4px;
}

.entry-response summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.entry-response summary::-webkit-details-marker {
  display: none;
}

.entry-response summary::before {
  content: "▸ ";
}

.entry-response[open] summary::before {
  content: "▾ ";
}

.entry-response pre {
  margin: 8px 0 0;
  max-height: 320px;
  white-space: pre-wrap;
  word-break: break-word;
}

.empty {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 560px) {
  .amounts,
  .advanced-grid {
    grid-template-columns: 1fr;
  }
  .summary {
    grid-template-columns: 110px 1fr;
  }
}
