:root {
  color-scheme: dark;
  --background: #090c10;
  --surface: #11171e;
  --field: #0b1118;
  --line: #293440;
  --text: #f2f6f8;
  --body: #c5d0d9;
  --muted: #a9bac6;
  --accent: #69f2d4;
  --focus: #9bffe8;
  --error: #ffb8af;
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 24% 4%, #112321 0, transparent 37rem), var(--background);
  color: var(--text);
  font: 1rem/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .21em; }
a:hover { color: #a4ffe9; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.wrap { width: min(100% - 3rem, 71rem); margin-inline: auto; }
.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header { min-height: 4.75rem; border-bottom: 1px solid var(--line); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--text);
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-decoration: none;
}
.brand-mark {
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: relative;
  flex: none;
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: .44rem;
  height: 2px;
  right: -.22rem;
  bottom: -.04rem;
  background: var(--accent);
  transform: rotate(43deg);
}
nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
nav a { color: var(--body); text-decoration: none; font-size: .875rem; }
nav a:hover { text-decoration: underline; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 5.5rem);
  padding-block: clamp(2.5rem, 6vw, 5.5rem) 2.9rem;
}
.intro { padding-block: .7rem; }
.network {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.15rem;
  color: var(--accent);
  font-weight: 650;
  font-size: .875rem;
}
.network span { width: .46rem; height: .46rem; border-radius: 50%; background: #b8a3fc; }
h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 1.35rem;
  font-size: clamp(2.45rem, 4.65vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -.06em;
  font-weight: 750;
}
h2 { font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.23; letter-spacing: -.025em; margin-bottom: .6rem; }
p { margin-bottom: .9rem; color: var(--body); }
.lede { max-width: 31rem; font-size: clamp(1.03rem, 1.6vw, 1.22rem); margin-bottom: 1.35rem; }
.boundary {
  max-width: 31rem;
  padding-left: 1rem;
  border-left: 2px solid #487f78;
  margin-bottom: 1.25rem;
}
.contract-address { margin: .45rem 0 0; overflow-wrap: anywhere; }
.contract-address code { color: var(--muted); }
strong { color: var(--text); }
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.15rem, 3vw, 1.65rem);
  background: var(--surface);
}
.request-panel { border-top-color: #53867d; box-shadow: 0 18px 42px #0004; }
.panel-intro { margin-bottom: 1.15rem; }
.connection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1rem;
  flex-wrap: wrap;
  padding-block: .95rem;
  margin-bottom: .85rem;
  border-block: 1px solid var(--line);
}
.connection > div { flex: 1 1 8rem; min-width: 0; }
.field-label, label { display: block; font-size: .9rem; font-weight: 650; color: var(--text); }
.wallet {
  display: block;
  font: .875rem/1.45 ui-monospace, "Cascadia Code", Consolas, monospace;
  margin-top: .25rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(9.7rem, .62fr); gap: .7rem; }
input, select {
  width: 100%;
  min-height: 3.05rem;
  margin-top: .36rem;
  padding: .66rem .8rem;
  border: 1px solid #374655;
  border-radius: .62rem;
  background: var(--field);
  color: var(--text);
}
input::placeholder { color: #a0b0bd; opacity: 1; }
select {
  appearance: none;
  padding-right: 1.95rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.form-note, .status { font-size: .875rem; color: var(--muted); }
.fields + .form-note { margin-block: .7rem 1rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  padding: .55rem .9rem;
  font-size: .875rem;
  font-weight: 720;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { background: #19242c; border-color: #374b56; color: #ebf5f8; }
.button.secondary:hover { background: #243641; }
.button.primary { width: 100%; min-height: 3rem; background: var(--accent); color: #082420; font-size: .95rem; }
.button.primary:hover { background: #a0fbe7; }
.button:disabled { opacity: .53; cursor: default; }
.status { margin: .85rem 0 0; overflow-wrap: anywhere; }
.status[data-kind="error"] { color: var(--error); }
.status[data-kind="success"] { color: var(--accent); }
.receipt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; margin-top: .8rem; font-size: .875rem; }
.details { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 1.25rem; padding-bottom: 2.35rem; }
.proof-steps { margin: 1rem 0; padding-left: 1.3rem; color: var(--body); }
.proof-steps li { padding-left: .22rem; margin-bottom: .8rem; }
.proof-steps li::marker { color: var(--accent); font-weight: 700; }
.references { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: 0; font-size: .875rem; }
code { color: #c8f7ee; font: .875em ui-monospace, "Cascadia Code", Consolas, monospace; }
pre {
  margin: .8rem 0 .45rem;
  padding: .85rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--field);
  line-height: 1.55;
}
.script-panel p:last-child { margin-bottom: 0; }
.site-footer {
  min-height: 4.7rem;
  padding-block: .85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .875rem;
}
@media (max-width: 50rem) {
  .hero, .details { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: 1.6rem; padding-bottom: 1.25rem; }
  .intro { padding-block: 0; }
  .lede, .boundary { max-width: 42rem; }
}
@media (max-width: 31rem) {
  .wrap { width: min(100% - 2rem, 71rem); }
  .site-header { flex-wrap: wrap; padding-block: .8rem; gap: .5rem 1rem; }
  .site-footer { display: block; }
  .site-footer span { display: block; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
