:root {
  color-scheme: light;
  --ink: #101417;
  --muted: #5a646d;
  --line: #d9dee3;
  --paper: #f7f8f7;
  --panel: #ffffff;
  --wash: #edf1f2;
  --accent: #0b6f5f;
  --accent-strong: #064f44;
  --dark: #171b1c;
  --dark-muted: #9fb3b8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 28px;
  background: rgba(247, 248, 247, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  text-decoration: none;
}

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

.hero {
  position: relative;
  min-height: calc(100svh - 64px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
  color: white;
}

#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(23, 27, 28, 0.58);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 40px));
  margin-left: clamp(20px, 8vw, 112px);
  padding: 80px 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #8ee0cb;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: 112px;
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 48px;
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.lede {
  max-width: 620px;
  color: #d7e1e4;
  font-size: 22px;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.primary:hover {
  background: var(--accent-strong);
}

.secondary {
  background: transparent;
}

.band,
.cta {
  padding: clamp(56px, 8vw, 110px) clamp(20px, 6vw, 96px);
}

.compact {
  padding-top: clamp(40px, 6vw, 76px);
  padding-bottom: clamp(40px, 6vw, 76px);
}

.muted {
  background: var(--wash);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.2fr);
  gap: clamp(28px, 8vw, 110px);
  max-width: 1180px;
  margin: 0 auto;
}

.copy,
.steps {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.copy p:last-child,
.steps li:last-child {
  margin-bottom: 0;
}

.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--line);
}

.process > div {
  min-height: 260px;
  padding: 28px;
  background: var(--panel);
}

.process p {
  color: var(--muted);
  line-height: 1.6;
}

.step {
  display: block;
  margin-bottom: 42px;
  color: var(--accent);
  font-weight: 900;
}

.cta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  background: var(--dark);
  color: white;
}

.cta p {
  max-width: 760px;
  color: var(--dark-muted);
  line-height: 1.6;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer a {
  font-weight: 700;
  text-decoration: none;
}

.page,
.policy {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) 20px;
}

.page-head,
.policy {
  max-width: 880px;
}

.button:disabled,
.button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.protocol-page {
  max-width: none;
  padding: 0;
}

.protocol-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  max-width: 1180px;
  padding: 72px 20px 48px;
  margin: 0 auto;
}

.protocol-head > div {
  max-width: 780px;
}

.protocol-status {
  flex: 0 0 auto;
  min-width: 190px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.protocol-status[data-tone="success"] {
  border-left-color: var(--accent);
  color: var(--accent-strong);
}

.protocol-status[data-tone="pending"] {
  border-left-color: #a36400;
  color: #754800;
}

.page-head h1,
.policy h1 {
  font-size: 64px;
  line-height: 0.95;
}

.page-head p,
.policy p,
.policy li {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.policy h2 {
  margin-top: 42px;
  margin-bottom: 12px;
  font-size: 28px;
}

.funding-form {
  display: grid;
  gap: 16px;
}

.protocol-workspace {
  padding-top: 0;
}

.protocol-form {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px 72px;
}

.narrow-form {
  max-width: 680px;
}

.form-section {
  display: grid;
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.form-section:last-of-type {
  border-bottom: 1px solid var(--line);
}

.form-section .eyebrow {
  margin-bottom: 0;
}

.advanced {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.advanced summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.advanced[open] summary {
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 14px;
}

.form-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check-line input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  background: rgba(247, 248, 247, 0.96);
  backdrop-filter: blur(12px);
}

.wallet-picker {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 320px;
}

.readiness-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--wash);
}

.readiness-panel h3 {
  margin-bottom: 6px;
}

.readiness-panel .button {
  justify-self: start;
}

.fine {
  color: var(--muted);
  line-height: 1.7;
}

.output {
  min-height: 44px;
  padding: 12px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

.output[data-tone="success"] {
  border-left-color: var(--accent);
  color: var(--accent-strong);
}

.output[data-tone="pending"] {
  border-left-color: #a36400;
  color: #754800;
}

.output[data-tone="error"] {
  border-left-color: #b42318;
  color: #8d1b13;
}

.compact-output {
  margin-top: 16px;
  font-size: 14px;
}

.feed-layout {
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
}

.bounty-feed {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.bounty-row {
  min-width: 0;
  padding: 22px;
  background: var(--panel);
}

.bounty-row h3,
.bounty-row p {
  overflow-wrap: anywhere;
}

.bounty-row > p:nth-of-type(1) {
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
}

.endpoint-list p {
  margin-bottom: 10px;
}

.readiness-output {
  max-height: 260px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.62);
}

.recovery-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.recovery-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 16px;
  background: var(--panel);
}

.recovery-row div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.recovery-row code {
  width: fit-content;
}

.recovery-row output {
  color: var(--muted);
  text-align: right;
}

.recovery-row[data-state="ready"] output {
  color: #754800;
}

.recovery-row[data-state="recovered"] output {
  color: var(--accent-strong);
}

.recovery-row[data-state="error"] output {
  color: #8d1b13;
}

.prefill-output {
  background: rgba(255, 255, 255, 0.62);
}

code {
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: rgba(16, 20, 23, 0.08);
  overflow-wrap: anywhere;
}

.prompt-block {
  margin: 0 0 18px;
  padding: 16px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  overflow: auto;
  white-space: pre-wrap;
}

.prompt-block code {
  padding: 0;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.6;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: enter 640ms ease forwards;
}

@keyframes enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 20px;
  }

  nav {
    flex-wrap: wrap;
  }

  .hero {
    min-height: 720px;
  }

  .hero-copy {
    margin-left: 20px;
    padding: 64px 0;
  }

  h1 {
    font-size: 64px;
  }

  h2 {
    font-size: 38px;
  }

  .page-head h1,
  .policy h1 {
    font-size: 52px;
  }

  .protocol-head {
    display: grid;
    padding-top: 48px;
  }

  .protocol-status {
    min-width: 0;
    width: 100%;
  }

  .section-grid,
  .process,
  .cta,
  .form-row,
  .form-row.three,
  .feed-layout {
    grid-template-columns: 1fr;
  }

  .recovery-row {
    grid-template-columns: 1fr;
  }

  .recovery-row output {
    text-align: left;
  }

  .cta {
    display: grid;
  }

  .process > div {
    min-height: auto;
  }

  .readiness-output {
    max-height: none;
  }

  .sticky-actions {
    position: static;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 32px;
  }

  .page-head h1,
  .policy h1 {
    font-size: 44px;
  }

  .button {
    width: 100%;
  }
}
