@font-face {
  font-family: Barlow;
  src: url("/assets/barlow-condensed-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/assets/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/assets/dm-mono-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #08090a;
  --surface: #0e1011;
  --raised: #141719;
  --line: rgba(233, 238, 230, 0.08);
  --line-strong: rgba(233, 238, 230, 0.16);
  --text: #eceee8;
  --muted: #8e948d;
  --faint: #5d635d;
  --mint: #00efad;
  --mint-soft: rgba(0, 239, 173, 0.1);
  --warn: #f3b94d;
  --danger: #ff7a6b;
  --info: #84c7ff;
  --radius: 14px;
  --side: 248px;
  --mono: "DM Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 15px/1.6 Manrope, sans-serif;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 78% -12%, rgba(0, 239, 173, 0.09), transparent 70%),
    radial-gradient(700px 420px at 20% 110%, rgba(0, 239, 173, 0.04), transparent 70%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(233, 238, 230, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 0%, #000 10%, transparent 75%);
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
code,
pre,
input,
textarea {
  font-family: var(--mono);
}
::selection {
  background: var(--mint);
  color: var(--bg);
}
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

/* ---------- layout ---------- */
.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side);
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  background: rgba(8, 9, 10, 0.72);
  backdrop-filter: blur(14px);
}
.shell {
  margin-left: var(--side);
  min-height: 100vh;
}
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 18px clamp(20px, 4vw, 56px);
}
main {
  max-width: 1040px;
  padding: 8px clamp(20px, 4vw, 56px) 96px;
}
section {
  animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- brand + nav ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 26px;
  font-family: Barlow, sans-serif;
  font-size: 21px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.brand b {
  color: var(--mint);
  margin-left: 4px;
}
.mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--bg) 34%, var(--mint) 36%, transparent 64%);
  box-shadow: 0 0 18px rgba(0, 239, 173, 0.45);
}
.brand.compact {
  display: none;
}
.nav {
  display: grid;
  gap: 2px;
}
.nav-label {
  display: flex;
  justify-content: space-between;
  margin: 18px 10px 6px;
  font: 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.nav-label:first-child {
  margin-top: 0;
}
.nav-label span {
  color: var(--faint);
  letter-spacing: 0.04em;
  text-transform: none;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover {
  color: var(--text);
  background: rgba(233, 238, 230, 0.04);
}
.nav a[aria-current] {
  color: var(--text);
  background: var(--mint-soft);
  box-shadow: inset 2px 0 0 var(--mint);
}
.nav a[aria-current] svg {
  color: var(--mint);
}
.side-foot {
  margin-top: auto;
  padding: 16px 10px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  font: 12px var(--mono);
  color: var(--faint);
}
.side-foot a:hover {
  color: var(--mint);
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(0, 239, 173, 0.15);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 6px rgba(0, 239, 173, 0);
  }
}

/* ---------- type ---------- */
.eyebrow {
  margin-top: 28px;
  font: 12px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
}
h1 {
  margin: 10px 0 10px;
  font: 700 clamp(38px, 5vw, 54px) / 1 Barlow, sans-serif;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
h1.display {
  font-size: clamp(46px, 7.4vw, 92px);
  line-height: 0.94;
}
h1 em {
  font-style: normal;
  color: var(--mint);
}
.lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: 16px;
}
.lead code,
.steps code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--raised);
  color: var(--text);
  font-size: 13px;
}
h3 {
  margin: 26px 0 10px;
  font: 12px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- panels + forms ---------- */
.panel {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 23, 25, 0.9), rgba(14, 16, 17, 0.9));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 50px -30px rgba(0, 0, 0, 0.8);
}
form.panel {
  display: grid;
  gap: 16px;
}
.panel.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
label small {
  font-weight: 400;
  color: var(--faint);
  margin-left: 6px;
}
input,
textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
input::placeholder,
textarea::placeholder {
  color: var(--faint);
}
input:hover,
textarea:hover {
  border-color: rgba(233, 238, 230, 0.26);
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(0, 239, 173, 0.12);
}
input[readonly] {
  color: var(--mint);
  background: transparent;
  border-style: dashed;
}
.inline {
  display: flex;
  gap: 10px;
}
.inline input {
  font-size: 16px;
  padding: 14px 16px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.actions {
  display: flex;
  gap: 10px;
}

button {
  font: 600 14px Manrope, sans-serif;
  cursor: pointer;
}
form button[type="submit"],
#multisend-send,
#keys-load {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  color: #04120d;
  background: var(--mint);
  box-shadow: 0 0 0 1px rgba(0, 239, 173, 0.4), 0 8px 26px -10px rgba(0, 239, 173, 0.7);
  white-space: nowrap;
  transition: transform 0.12s, filter 0.15s;
}
form button[type="submit"]:hover,
#multisend-send:hover,
#keys-load:hover {
  filter: brightness(1.08);
}
form button[type="submit"]:active,
#multisend-send:active {
  transform: translateY(1px);
}
button.secondary[type="submit"] {
  color: var(--text);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button.busy {
  color: transparent !important;
  position: relative;
}
button.busy::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #04120d;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
button.secondary.busy::after {
  border-color: var(--text);
  border-right-color: transparent;
}
@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}
.ghost {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(233, 238, 230, 0.3);
}
.ghost.danger:hover:not(:disabled) {
  color: var(--danger);
  border-color: rgba(255, 122, 107, 0.5);
  background: rgba(255, 122, 107, 0.06);
}

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--faint);
}
.examples button {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 12px var(--mono);
}
.examples button:hover {
  color: var(--mint);
  border-color: rgba(0, 239, 173, 0.4);
}

.status {
  font: 13px/1.6 var(--mono);
  color: var(--muted);
  white-space: pre-wrap;
}
.status:empty {
  display: none;
}
.status[data-tone="error"] {
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--danger);
  background: rgba(255, 122, 107, 0.07);
  border: 1px solid rgba(255, 122, 107, 0.2);
}
.status[data-tone="done"] {
  color: var(--mint);
}

/* ---------- reports ---------- */
.report {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 16, 17, 0.85);
  animation: rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.report-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.report-head img {
  border-radius: 50%;
  background: var(--raised);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.report-head h2 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.report-head p {
  font-size: 13px;
  color: var(--muted);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font: 11.5px var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--muted);
  background: rgba(233, 238, 230, 0.05);
  border: 1px solid var(--line);
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.ok {
  color: var(--mint);
  background: var(--mint-soft);
  border-color: rgba(0, 239, 173, 0.25);
}
.badge.warn {
  color: var(--warn);
  background: rgba(243, 185, 77, 0.08);
  border-color: rgba(243, 185, 77, 0.25);
}
.badge.info {
  color: var(--info);
  background: rgba(132, 199, 255, 0.07);
  border-color: rgba(132, 199, 255, 0.22);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
}
.stat {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
}
.stat span {
  font: 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.stat strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.stat small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.rows {
  display: grid;
  grid-template-columns: minmax(150px, max-content) 1fr;
  margin: 18px 0 0;
}
.rows dt,
.rows dd {
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.rows dt {
  padding-right: 24px;
  font-size: 13px;
  color: var(--muted);
}
.rows dd {
  margin: 0;
  font: 13px/1.6 var(--mono);
  overflow-wrap: anywhere;
}

.keys {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#keys-out {
  margin-top: 18px;
}
.key {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.key .badge {
  width: 118px;
  justify-content: center;
}
.key div {
  flex: 1;
  min-width: 0;
}
.key code {
  font-size: 13px;
}
.key p {
  font-size: 12.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.report.code {
  padding: 0;
  overflow: hidden;
}
.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid var(--line);
  font: 12px var(--mono);
  color: var(--muted);
}
pre {
  margin: 0;
  padding: 18px;
  max-height: 60vh;
  overflow: auto;
  font-size: 13px;
  line-height: 1.7;
  color: #cfe9df;
}

.steps {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  color: var(--muted);
  font-size: 14px;
}
.steps li {
  display: flex;
  gap: 12px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font: 12px/1.9 var(--mono);
  color: var(--mint);
}
.steps b {
  color: var(--text);
}

/* ---------- converter ---------- */
.convert {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.convert .panel {
  margin: 0;
  display: grid;
  gap: 14px;
  min-width: 0;
}
legend {
  float: left;
  font: 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
}

/* ---------- home ---------- */
.home .eyebrow {
  margin-top: 6vh;
}
.home .lead {
  margin-top: 18px;
  font-size: 17px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 44px;
}
.card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 22px;
  min-height: 176px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 16, 17, 0.8);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.card:nth-child(2) { animation-delay: 0.04s; }
.card:nth-child(3) { animation-delay: 0.08s; }
.card:nth-child(4) { animation-delay: 0.12s; }
.card:nth-child(5) { animation-delay: 0.16s; }
.card:nth-child(6) { animation-delay: 0.2s; }
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 239, 173, 0.35);
  background: linear-gradient(180deg, rgba(0, 239, 173, 0.05), rgba(14, 16, 17, 0.85) 60%);
}
.card svg {
  width: 36px;
  height: 36px;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 10px;
  color: var(--mint);
  background: var(--mint-soft);
}
.card h2 {
  font-size: 16px;
  font-weight: 700;
}
.card p {
  font-size: 13.5px;
  color: var(--muted);
}
.tag {
  position: absolute;
  top: 20px;
  right: 20px;
  font: 10.5px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.tag.act {
  color: var(--warn);
}
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 36px;
  margin: 40px 0 0;
  padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.trust b {
  margin-right: 6px;
  font: 700 22px Barlow, sans-serif;
  color: var(--text);
}

/* ---------- wallet ---------- */
#wallet {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 239, 173, 0.45);
  background: rgba(8, 9, 10, 0.7);
  backdrop-filter: blur(10px);
  color: var(--mint);
}
#wallet:hover {
  background: var(--mint-soft);
}
#wallet.connected {
  color: var(--text);
  border-color: var(--line-strong);
}
#wallet.connected::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
}
#wallet.connected svg {
  display: none;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .convert {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .side {
    position: sticky;
    top: 0;
    z-index: 6;
    inset: auto;
    width: auto;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .side .brand,
  .side-foot,
  .nav-label {
    display: none;
  }
  .nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 10px 14px;
    scrollbar-width: none;
  }
  .nav a {
    flex: none;
    padding: 7px 12px;
  }
  .nav a[aria-current] {
    box-shadow: none;
  }
  body {
    display: flex;
    flex-direction: column;
  }
  .shell {
    display: contents;
  }
  .top {
    order: -1;
    position: static;
    justify-content: space-between;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 12px 16px;
  }
  .stat strong {
    font-size: 17px;
    text-align: right;
  }
  .brand.compact {
    display: flex;
    padding: 0;
  }
  .cards,
  .grid2 {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: 0;
  }
  .inline,
  .panel.row,
  .key {
    flex-direction: column;
    align-items: stretch;
  }
  .rows {
    grid-template-columns: 1fr;
  }
  .rows dd {
    border-top: 0;
    padding-top: 0;
  }
  .badges {
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
.more {
  margin-top: 10px;
  width: 100%;
}
.methods {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  max-height: 320px;
  overflow: auto;
}
.methods-head {
  font: 12px var(--mono);
  color: var(--faint);
}
.examples button.write {
  color: var(--warn);
  border-color: rgba(243, 185, 77, 0.25);
}
.examples button.write:hover {
  color: var(--warn);
  border-color: rgba(243, 185, 77, 0.6);
}
.methods a {
  color: var(--mint);
}
.mode {
  display: flex;
  gap: 8px;
}
.mode label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
}
.mode input {
  width: auto;
  margin: 0;
  accent-color: var(--mint);
}
.mode label:has(input:checked) {
  border-color: var(--mint);
  background: var(--mint-soft);
}
.mode label:has(input[value="write"]:checked) {
  border-color: var(--warn);
  background: rgba(243, 185, 77, 0.08);
  accent-color: var(--warn);
}
.mode small {
  margin-left: auto;
}
#view-hint:empty {
  display: none;
}
.mode label:has(input[value="write"]:checked) input {
  accent-color: var(--warn);
}
#view-form:has(input[value="write"]:checked) #view-submit {
  background: var(--warn);
  box-shadow: 0 0 0 1px rgba(243, 185, 77, 0.4), 0 8px 26px -10px rgba(243, 185, 77, 0.7);
}
.human {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font: 13px var(--mono);
  color: var(--muted);
}
.human .badge {
  font-size: 13px;
  padding: 4px 12px;
}
