:root {
  --paper: #e9edf3;
  --paper-raised: #f7f9fc;
  --ink: #0b1426;
  --ink-soft: #4a5a73;
  --rule: #c3cddc;
  --blue: #22459b;
  --teal: #127a5f;
  --amber: #b5610a;
  --rail: 4.5rem;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1426;
    --paper-raised: #101c33;
    --ink: #e7edf6;
    --ink-soft: #93a3bd;
    --rule: #26344d;
    --blue: #82a4ff;
    --teal: #4cc9a2;
    --amber: #f0a250;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: 'wdth' 100;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 1.5rem 0 1.25rem;
}

@media (min-width: 60rem) {
  .wrap {
    padding-left: var(--rail);
    padding-right: 2.5rem;
  }
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

.mono,
code {
  font-family: 'Red Hat Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  letter-spacing: -0.01em;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h1 {
  font-variation-settings: 'wdth' 118;
  font-size: clamp(2.5rem, 5.6vw, 4.25rem);
  line-height: 0.98;
  max-width: 16ch;
}

h2 {
  font-variation-settings: 'wdth' 112;
  font-size: clamp(1.65rem, 3.4vw, 2.4rem);
  line-height: 1.08;
  max-width: 22ch;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  max-width: 62ch;
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.rail {
  display: none;
}

@media (min-width: 60rem) {
  .rail {
    display: block;
    position: fixed;
    top: 5.5rem;
    bottom: 3rem;
    left: max(1.5rem, calc(50vw - 39rem + 1.5rem));
    width: 1px;
    background: var(--rule);
    z-index: 3;
  }

  .rail ol {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 1.125rem;
  }

  .rail a {
    display: block;
    width: 1.25rem;
    margin-left: -0.5rem;
    padding: 0.25rem 0;
    text-decoration: none;
  }

  .rail i {
    display: block;
    height: 1px;
    width: 0.625rem;
    background: var(--rule);
    transition:
      width 0.2s ease,
      background-color 0.2s ease;
  }

  .rail a[aria-current='true'] i,
  .rail a:hover i {
    width: 1.25rem;
    background: var(--blue);
  }
}

header.top {
  position: sticky;
  top: 0;
  z-index: 4;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

header.top .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 3.75rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-variation-settings: 'wdth' 112;
  letter-spacing: -0.02em;
}

.wordmark svg {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
}

header.top nav {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

header.top nav a {
  text-decoration: none;
}

header.top nav a:hover {
  color: var(--ink);
}

@media (max-width: 40rem) {
  header.top nav a:not(.keep) {
    display: none;
  }
}

section {
  padding: 5rem 0;
  border-top: 1px solid var(--rule);
}

section:first-of-type {
  border-top: 0;
}

.hero {
  padding-top: 5.5rem;
  padding-bottom: 4rem;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: end;
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 4rem;
  }
}

h1 .go {
  color: var(--ink-soft);
}

.hero p {
  margin-top: 1.75rem;
}

.actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  font: inherit;
  font-weight: 650;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 0.25rem;
  background: var(--ink);
  color: var(--paper);
}

.btn:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}

.btn-quiet:hover {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.hero figure {
  margin: 0;
}

.hero figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: var(--paper-raised);
}

.hero figcaption {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  max-width: 30ch;
}

.scale {
  margin-top: 3.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}

.scale ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.scale li.testnets {
  color: var(--ink-soft);
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (min-width: 60rem) {
  .section-head {
    grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
    gap: 3rem;
    align-items: baseline;
  }
}

.section-head p {
  color: var(--ink-soft);
}

.ledger {
  border-top: 1px solid var(--rule);
}

.ledger div {
  display: grid;
  gap: 0.25rem 3rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 48rem) {
  .ledger div {
    grid-template-columns: 14rem minmax(0, 1fr);
    align-items: baseline;
  }
}

.ledger p {
  color: var(--ink-soft);
  max-width: 58ch;
}

.shots {
  display: grid;
  gap: 3.5rem;
}

.shots figure {
  margin: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 60rem) {
  .shots figure {
    grid-template-columns: minmax(0, 1fr) 13rem;
    gap: 2rem;
    align-items: start;
  }

  .shots figcaption {
    padding-top: 0.5rem;
    border-top: 1px solid var(--rule);
  }
}

.shots .frame {
  position: relative;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: var(--paper-raised);
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
}

.shots .frame.narrow {
  max-width: 22rem;
}

@media (max-width: 48rem) {
  .shots .frame.wide img {
    width: 44rem;
    max-width: none;
  }
}

.shots figcaption {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.shots figcaption b {
  display: block;
  color: var(--ink);
  font-weight: 650;
}

.boundary {
  display: grid;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--paper-raised);
}

@media (min-width: 48rem) {
  .boundary {
    grid-template-columns: 1fr 1fr;
  }
}

.boundary > div {
  padding: 1.75rem;
}

.boundary > div + div {
  border-top: 1px solid var(--rule);
}

@media (min-width: 48rem) {
  .boundary > div + div {
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
}

.boundary h3 {
  margin-bottom: 1rem;
}

.boundary ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.875rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.boundary li {
  padding-left: 1.25rem;
  position: relative;
  max-width: 40ch;
}

.boundary li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.5rem;
  height: 1px;
  background: var(--teal);
}

.boundary .out li::before {
  background: var(--blue);
}

.boundary b {
  color: var(--ink);
  font-weight: 600;
}

.caveat {
  margin-top: 2rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--amber);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.picker {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 0.25rem;
  overflow: hidden;
}

.picker button {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.picker button + button {
  border-left: 1px solid var(--rule);
}

.picker button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
}

.detected {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.download {
  margin: 1.75rem 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.download-meta {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-top: 1px solid var(--rule);
  max-width: 46rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.steps li::before {
  content: counter(step);
  font-family: 'Red Hat Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  color: var(--ink);
  padding-top: 0.15rem;
}

.steps b {
  color: var(--ink);
  font-weight: 600;
}

pre {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  overflow-x: auto;
  max-width: 46rem;
}

pre code {
  font-size: 0.875rem;
  line-height: 1.8;
}

pre .c {
  color: var(--ink-soft);
}

.after-code {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.after-code a,
.caveat a,
.ledger a,
.boundary a {
  color: var(--blue);
}

footer {
  border-top: 1px solid var(--rule);
  padding: 3rem 0 4rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

footer .wrap {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  footer .wrap {
    grid-template-columns: minmax(0, 34rem) minmax(0, 1fr);
    gap: 3rem;
  }
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-content: start;
}

footer a {
  color: var(--blue);
}

[hidden] {
  display: none !important;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  font-family: 'Red Hat Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 0.25rem;
  background: var(--paper-raised);
  color: var(--ink-soft);
}

.ledger .sig {
  font-family: 'Red Hat Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.stack {
  display: grid;
  gap: 1.5rem;
}

.stack pre {
  margin-top: 0;
}

.method {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  margin-top: 3rem;
}

.method > h3 {
  font-family: 'Red Hat Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.method > p {
  margin-top: 0.75rem;
  color: var(--ink-soft);
}

.method pre {
  margin-top: 1.5rem;
}

.opts {
  margin: 1.75rem 0 0;
  display: grid;
  gap: 0;
}

.opts > div {
  display: grid;
  gap: 0.25rem 2rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--rule);
}

.opts > div:first-child {
  border-top: 1px solid var(--rule);
}

@media (min-width: 48rem) {
  .opts > div {
    grid-template-columns: 13rem minmax(0, 1fr);
    align-items: baseline;
  }
}

.opts dt,
.opts .name {
  font-family: 'Red Hat Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.opts dd,
.opts .what {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  max-width: 58ch;
}

.opts .req {
  color: var(--amber);
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.subhead {
  margin-top: 2rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-weight: 650;
}
