:root {
  color-scheme: light;
  --paper: #f2eee2;
  --paper-deep: #e4ddcb;
  --ink: #161713;
  --muted: #5f6057;
  --orange: #f15a2a;
  --signal: #b8f23d;
  --line: rgba(22, 23, 19, 0.22);
  --display: "Bodoni 72", Didot, "Bodoni MT", Georgia, serif;
  --sans: Bahnschrift, "Arial Narrow", "Helvetica Neue", sans-serif;
  --mono: "Cascadia Mono", "IBM Plex Mono", "Lucida Console", monospace;
  font-family: var(--sans);
  background: var(--ink);
  color: var(--ink);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
pre:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  position: relative;
  overflow: hidden;
  max-width: 1600px;
  margin: 0 auto;
  background:
    linear-gradient(90deg, transparent 0 24px, var(--line) 25px, transparent 26px),
    linear-gradient(var(--paper) 0 0);
}

.page-shell::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0.2;
  pointer-events: none;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.23'/%3E%3C/svg%3E");
}

.page-shell > * {
  position: relative;
  z-index: 1;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  min-height: 82px;
  padding: 0 4vw;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.04em;
}

.wordmark-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--orange);
  font-family: var(--display);
  font-weight: 700;
}

.topbar-note {
  margin: 0;
  text-align: center;
}

.source-link {
  padding-bottom: 3px;
  border-bottom: 1px solid currentcolor;
  color: inherit;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(380px, 0.72fr);
  min-height: 710px;
  border-bottom: 1px solid var(--ink);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vw 6vw 7vw 7vw;
  border-right: 1px solid var(--ink);
}

.eyebrow,
.section-number {
  margin: 0 0 28px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.eyebrow span {
  color: var(--orange);
}

.hero h1,
.process-heading h2,
.agent-section h2,
.disclosure h2 {
  max-width: 900px;
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.hero h1 {
  font-size: clamp(56px, 7.3vw, 116px);
}

.hero-deck {
  max-width: 680px;
  margin: 38px 0 0;
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-top: 48px;
}

.primary-action {
  display: inline-flex;
  gap: 42px;
  align-items: center;
  justify-content: space-between;
  min-width: 245px;
  padding: 18px 20px;
  border: 1px solid var(--ink);
  color: white;
  background: var(--ink);
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.primary-action:hover {
  color: var(--ink);
  background: var(--signal);
  transform: translateY(-3px);
}

.primary-action[disabled] {
  cursor: wait;
  opacity: 0.7;
}

.text-action {
  color: inherit;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-underline-offset: 5px;
}

.instrument {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 32px;
  color: #f7f3e8;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 38%), var(--ink);
}

.instrument::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 39px,
    rgba(255, 255, 255, 0.04) 40px
  );
}

.instrument-head,
.terminal-topline,
.terminal-footer,
.command-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.live-indicator {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.live-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
}

.amount-block {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  margin: auto 0;
}

.amount-block .currency {
  padding-top: 17px;
  color: var(--orange);
  font-family: var(--display);
  font-size: 44px;
}

.amount-block strong {
  font-family: var(--display);
  font-size: clamp(88px, 9vw, 154px);
  font-weight: 400;
  letter-spacing: -0.09em;
  line-height: 0.8;
}

.amount-block .asset {
  grid-column: 2;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.instrument-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 105px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.instrument-grid div {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.instrument-grid .wide {
  grid-column: 1 / -1;
}

.instrument-grid dt {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.instrument-grid dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.instrument-grid .wide dd {
  display: flex;
  gap: 12px;
  align-items: center;
}

.instrument-grid code {
  overflow: hidden;
  flex: 1;
  font-family: var(--mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button,
.terminal-copy,
.command-label button {
  padding: 5px 7px;
  border: 1px solid currentcolor;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
}

.copy-button:disabled,
.terminal-copy:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.testnet-seal {
  position: absolute;
  right: 28px;
  bottom: 26px;
  width: 150px;
  height: 150px;
  margin: 0;
  display: grid;
  place-content: center;
  border: 2px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.08em;
  transform: rotate(-9deg);
}

.testnet-seal span {
  font-size: 20px;
  line-height: 1.4;
}

.status-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--ink);
}

.status-rail article {
  display: flex;
  gap: 20px;
  min-width: 0;
  padding: 24px 4vw;
  border-right: 1px solid var(--ink);
}

.status-rail article:last-child {
  border-right: 0;
}

.rail-index,
.status-rail p,
.status-rail strong {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.rail-index {
  color: var(--orange);
}

.status-rail p {
  margin: 0 0 8px;
  color: var(--muted);
}

.status-rail strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.challenge-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 6vw;
  padding: 9vw 7vw;
  border-bottom: 1px solid var(--ink);
  background: var(--paper-deep);
}

.section-intro h2 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: clamp(48px, 5vw, 80px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.section-intro > p:last-child,
.agent-section > div:first-child > p:last-child {
  max-width: 520px;
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
}

.terminal-card {
  align-self: center;
  min-width: 0;
  border: 1px solid var(--ink);
  color: #f8f5eb;
  background: #10110e;
  box-shadow: 14px 14px 0 var(--orange);
}

.terminal-topline,
.terminal-footer {
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.terminal-topline span:last-child {
  color: var(--signal);
}

.terminal-card pre {
  overflow: auto;
  min-height: 330px;
  max-height: 520px;
  margin: 0;
  padding: 28px;
  color: #d8f5a2;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 0;
  color: rgba(255, 255, 255, 0.58);
}

.process-section {
  display: grid;
  grid-template-columns: minmax(310px, 0.9fr) 1.1fr;
  border-bottom: 1px solid var(--ink);
}

.process-heading {
  padding: 8vw 7vw;
  border-right: 1px solid var(--ink);
}

.process-heading h2,
.agent-section h2,
.disclosure h2 {
  font-size: clamp(52px, 6vw, 96px);
}

.process-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 38px 5vw;
  border-bottom: 1px solid var(--ink);
}

.process-list li:last-child {
  border-bottom: 0;
}

.process-list > li > span {
  color: var(--orange);
  font-family: var(--display);
  font-size: 34px;
}

.process-list h3 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.process-list p {
  max-width: 560px;
  margin: 0;
  line-height: 1.55;
}

.agent-section {
  display: grid;
  grid-template-columns: 1fr minmax(380px, 0.8fr);
  gap: 6vw;
  align-items: end;
  padding: 9vw 7vw;
  border-bottom: 1px solid var(--ink);
  color: white;
  background: var(--orange);
}

.agent-section h2 {
  margin-bottom: 32px;
}

.command-card {
  min-width: 0;
  border: 1px solid var(--ink);
  color: var(--signal);
  background: var(--ink);
}

.command-label {
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  color: white;
}

.command-card > code {
  display: block;
  overflow: auto;
  padding: 24px 20px 30px;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.disclosure {
  padding: 8vw 7vw;
  border-bottom: 1px solid var(--ink);
}

.disclosure h2 {
  max-width: none;
  margin-bottom: 54px;
}

.disclosure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.disclosure-grid p {
  min-height: 190px;
  margin: 0;
  padding: 24px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  line-height: 1.55;
}

.disclosure-grid strong {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 110px;
  padding: 0 7vw;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 14px 18px;
  border: 1px solid white;
  color: white;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar-note {
    display: none;
  }

  .hero,
  .challenge-section,
  .process-section,
  .agent-section {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .process-heading {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .hero {
    min-height: auto;
  }

  .instrument {
    min-height: 620px;
  }

  .status-rail {
    grid-template-columns: 1fr;
  }

  .status-rail article {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .status-rail article:last-child {
    border-bottom: 0;
  }

  .challenge-section {
    gap: 50px;
  }

  .disclosure-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .topbar {
    min-height: 68px;
    padding: 0 20px;
  }

  .source-link {
    font-size: 9px;
  }

  .hero-copy,
  .challenge-section,
  .process-heading,
  .agent-section,
  .disclosure {
    padding: 72px 24px;
  }

  .hero h1 {
    font-size: clamp(47px, 15vw, 68px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action {
    width: 100%;
  }

  .instrument {
    min-height: 580px;
    padding: 24px;
  }

  .amount-block strong {
    font-size: 26vw;
  }

  .instrument-grid {
    margin-bottom: 118px;
  }

  .testnet-seal {
    width: 125px;
    height: 125px;
  }

  .terminal-card {
    box-shadow: 8px 8px 0 var(--orange);
  }

  .terminal-card pre {
    min-height: 260px;
    padding: 20px;
    font-size: 10px;
  }

  .process-list li {
    grid-template-columns: 48px 1fr;
    padding: 30px 24px;
  }

  .agent-section {
    gap: 48px;
  }

  .disclosure-grid {
    grid-template-columns: 1fr;
  }

  .disclosure-grid p {
    min-height: 0;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 32px 24px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .instrument > * {
    animation: reveal 560ms both;
  }

  .hero-copy > :nth-child(2),
  .instrument > :nth-child(2) {
    animation-delay: 80ms;
  }

  .hero-copy > :nth-child(3),
  .instrument > :nth-child(3) {
    animation-delay: 160ms;
  }

  .hero-copy > :nth-child(4),
  .instrument > :nth-child(4) {
    animation-delay: 240ms;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
  }
}
