:root {
  color-scheme: dark;
  --bg: #0b0b0e;
  --raised: #141419;
  --line: #26262e;
  --text: #ecebf2;
  --muted: #a4a2b2;
  --faint: #6e6c7c;
  --accent: #8c6bf2;
  --accent-hover: #a48af6;
  --accent-ink: #ffffff;
  --green: #8fd19e;
  --red: #f08a8a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "DejaVu Sans Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}

a { color: var(--accent-hover); text-underline-offset: 3px; }
a:hover { color: #c4b2fa; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.4rem; }
.measure { max-width: 40rem; }

/* header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.2rem;
}
.mark img { width: 26px; height: 24px; display: block; }
.site-head nav { display: flex; gap: 1.4rem; font-size: 0.95rem; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--text); }

/* type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.08; margin: 0 0 1rem; }
h2 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 0.8rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.35rem; }
p { margin: 0 0 1rem; }
.muted, li { color: var(--muted); }
strong { color: var(--text); font-weight: 600; }
small { color: var(--faint); }

/* sections */
.hero { padding: 4.5rem 0 3.5rem; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 36rem; }
.section { padding: 3.2rem 0; border-top: 1px solid var(--line); }
.page-top { padding: 3.5rem 0 1rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; align-items: center; margin-top: 1.8rem; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.15rem;
  border-radius: 6px;
}
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-plain { color: var(--text); }
.meta { font-size: 0.9rem; color: var(--faint); }

/* two-column split used on the home page */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }

/* relay example */
.wire {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.wire .row { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
.wire .row:last-child { border-bottom: 0; }
.wire .label { display: block; color: var(--faint); font-size: 0.75rem; margin-bottom: 0.25rem; }
.wire .plain { color: var(--text); }
.wire .sealed { color: var(--muted); word-break: break-all; }

/* numbered steps */
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
ol.steps li { counter-increment: s; position: relative; padding: 0 0 1.3rem 2.6rem; }
ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  text-align: center;
  font: 600 0.85rem/1.65rem var(--mono);
  color: var(--accent);
}
ol.steps strong { display: block; }

/* feature list */
dl.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 2.5rem; margin: 0; }
dl.features dt { font-weight: 600; margin-bottom: 0.2rem; }
dl.features dd { margin: 0; color: var(--muted); }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-block; width: 1.3rem; color: var(--accent); font-family: var(--mono); }
details[open] summary::before { content: "\2212"; }
details p { margin: 0.6rem 0 0.2rem 1.3rem; color: var(--muted); }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0.4rem 0 1.4rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--line); }
th { color: var(--faint); font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { color: var(--muted); }
td:first-child { color: var(--text); white-space: nowrap; }

/* downloads */
.release { border: 1px solid var(--line); border-radius: 10px; padding: 1.6rem 1.6rem 1.2rem; margin-bottom: 1.4rem; background: var(--raised); }
.release-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: baseline; }
.release h2 { margin: 0; }
.release .file { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.release ol { padding-left: 1.2rem; }
.hash {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  margin: 0.3rem 0 1rem;
}

code { font-family: var(--mono); font-size: 0.88em; color: var(--text); }
pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  overflow-x: auto;
  margin: 0.3rem 0 1rem;
}

/* donate */
.address {
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-all;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin: 0.4rem 0 0.8rem;
  user-select: all;
}
.copy {
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}
.copy:hover { border-color: var(--accent); }
.copied { color: var(--green); margin-left: 0.7rem; font-size: 0.9rem; }

.note { border-left: 2px solid var(--accent); padding: 0.2rem 0 0.2rem 1rem; color: var(--muted); margin: 1.4rem 0; }

/* report form */
form.report { display: grid; gap: 1.15rem; margin-top: 0.5rem; }
form.report label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
form.report .hint { display: block; font-weight: 400; color: var(--faint); font-size: 0.88rem; margin-top: 0.1rem; }
form.report .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
form.report input, form.report select, form.report textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
}
form.report textarea { min-height: 11rem; resize: vertical; line-height: 1.5; }
form.report input:focus, form.report select:focus, form.report textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
form.report button { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.warn { color: var(--red); }

/* footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0 3rem; font-size: 0.9rem; color: var(--faint); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-foot a { color: var(--muted); }

@media (max-width: 760px) {
  .split, dl.features, form.report .pair { grid-template-columns: 1fr; }
  .split { gap: 1.8rem; }
  .site-head .wrap { flex-direction: column; align-items: flex-start; padding-top: 0.9rem; padding-bottom: 0.9rem; gap: 0.5rem; }
  .hero { padding: 3rem 0 2.5rem; }
  td:first-child { white-space: normal; }
}
