:root {
  color-scheme: dark;
  --bg: #080806;
  --panel: rgba(20, 22, 18, 0.86);
  --panel-solid: #141612;
  --line: rgba(239, 231, 203, 0.16);
  --text: #f5f0df;
  --muted: #b6ae99;
  --green: #3ee88f;
  --gold: #f5be4f;
  --coral: #ff6b57;
  --ink: #0f100d;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

#protocolScene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: #080806;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 8, 6, 0.92), rgba(8, 8, 6, 0.62) 48%, rgba(8, 8, 6, 0.84)),
    repeating-linear-gradient(0deg, rgba(245, 240, 223, 0.035), rgba(245, 240, 223, 0.035) 1px, transparent 1px, transparent 54px);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease;
}

.topbar[data-elevated="true"] {
  background: rgba(8, 8, 6, 0.9);
  border-color: var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.nav-links,
.hero-actions,
.signal-strip,
.contract-tabs,
.console-bar,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(62, 232, 143, 0.6);
  color: var(--green);
  background: rgba(62, 232, 143, 0.08);
  border-radius: 7px;
  font-size: 13px;
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.nav-action:hover,
.site-footer a:hover {
  color: var(--green);
}

.nav-action,
.button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 700;
}

.nav-action {
  color: var(--text);
  background: rgba(245, 190, 79, 0.08);
}

.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: end;
  gap: clamp(32px, 7vw, 96px);
  padding: 130px clamp(18px, 5vw, 72px) 70px;
}

.hero-copy {
  max-width: 850px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(58px, 11vw, 142px);
  line-height: 0.88;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(32px, 5vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

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

.hero-lede,
.section-heading p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.hero-lede {
  max-width: 680px;
  margin-bottom: 30px;
}

.hero-support {
  max-width: 720px;
  margin: -14px 0 30px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.button.primary {
  background: var(--green);
  color: #07100b;
  border-color: var(--green);
}

.button.secondary {
  color: var(--text);
  background: rgba(245, 240, 223, 0.06);
}

.signal-strip {
  align-self: end;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--line);
  background: rgba(8, 8, 6, 0.72);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
}

.signal-strip div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.signal-strip div:last-child {
  border-bottom: 0;
}

.signal-strip span,
.metric span,
.contract-facts dt {
  color: var(--muted);
  font-size: 13px;
}

.signal-strip strong {
  color: var(--text);
}

.section {
  padding: 92px clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 900px;
  margin-bottom: 34px;
}

.section-heading.compact {
  max-width: 760px;
}

.pipeline,
.launch-grid,
.simulator-grid,
.contract-layout,
.quickstart-layout,
.directory-layout,
.roadmap-grid,
.reason-grid,
.signer-grid {
  display: grid;
  gap: 18px;
}

.roadmap-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.roadmap-item,
.reason-block {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}

.roadmap-item {
  min-height: 250px;
  padding: 22px;
}

.roadmap-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 26px;
  padding: 0 10px;
  border: 1px solid rgba(245, 190, 79, 0.42);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(245, 190, 79, 0.1);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.roadmap-item p,
.reason-block p {
  color: var(--muted);
  line-height: 1.55;
}

.reason-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.reason-block {
  padding: 22px;
}

.pipeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pipeline-step,
.launch-card,
.contract-panel,
.sim-output,
.sim-form,
.dev-console,
.quickstart-card,
.wallet-note,
.directory-card,
.agent-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}

.pipeline-step,
.launch-card {
  min-height: 230px;
  padding: 24px;
}

.step-index {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--gold);
  font-weight: 900;
}

.pipeline-step p,
.launch-card p,
.contract-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.contract-layout {
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
}

.contract-tabs {
  flex-direction: column;
  gap: 8px;
}

.contract-tab {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(245, 240, 223, 0.05);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  padding: 11px 13px;
}

.contract-tab.active,
.contract-tab:hover {
  border-color: rgba(62, 232, 143, 0.72);
  color: var(--text);
  background: rgba(62, 232, 143, 0.1);
}

.contract-panel {
  padding: clamp(22px, 4vw, 36px);
}

.panel-label {
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

.contract-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.contract-facts div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 98px;
}

.contract-facts dd {
  margin: 8px 0 0;
  line-height: 1.4;
}

.code-window,
.dev-console pre {
  margin: 0;
  overflow-x: auto;
  border-radius: var(--radius);
  background: #050604;
  color: #d8fadd;
  border: 1px solid rgba(62, 232, 143, 0.22);
  padding: 18px;
  line-height: 1.55;
}

.simulator-grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 1.1fr);
}

.sim-form,
.sim-output {
  padding: 26px;
}

.sim-form {
  display: grid;
  gap: 26px;
}

.sim-form label {
  color: var(--text);
  display: grid;
  gap: 12px;
  font-weight: 700;
}

.range-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.range-label-row strong {
  color: var(--gold);
  font-size: 14px;
  white-space: nowrap;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.sim-output {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(245, 240, 223, 0.04);
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
}

.receipt-line {
  grid-column: 1 / -1;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(245, 190, 79, 0.1);
  color: var(--gold);
  font-weight: 800;
}

.launch-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.launch-card code {
  display: block;
  margin-top: 18px;
  padding: 12px;
  border-radius: var(--radius);
  background: #050604;
  color: var(--green);
  overflow-wrap: anywhere;
}

.launch-card.locked {
  border-color: rgba(255, 107, 87, 0.45);
}

.launch-card.locked code {
  color: var(--coral);
}

.dev-console {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 560px;
  min-height: 0;
}

.quickstart-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.quickstart-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.signer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.directory-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.page-intro {
  padding-top: 126px;
  padding-bottom: 22px;
}

.page-intro h1 {
  margin-bottom: 20px;
  font-size: clamp(46px, 7vw, 92px);
}

.agents-page .agents-section {
  padding-top: 18px;
}

.agents-page .directory-card {
  padding: 18px;
}

.agents-page .directory-toolbar h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4.2vw, 52px);
}

.agents-page .directory-summary {
  margin-bottom: 0;
}

.directory-card {
  padding: 24px;
}

.directory-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.directory-toolbar h3 {
  margin-bottom: 0;
}

.directory-summary {
  color: var(--muted);
  line-height: 1.6;
}

.directory-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  align-items: stretch;
  gap: 12px;
  margin-top: 14px;
}

.directory-refresh:disabled {
  opacity: 0.62;
  cursor: wait;
}

.directory-status {
  margin-top: 0;
  display: flex;
  align-items: center;
  min-height: 68px;
}

.agents-page .directory-status {
  min-height: 58px;
  padding: 12px 14px;
}

.directory-result {
  display: inline-grid;
  gap: 8px;
  margin-top: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(245, 240, 223, 0.04);
}

.directory-result span,
.agent-row-label {
  color: var(--muted);
  font-size: 13px;
}

.directory-result strong {
  font-size: 18px;
}

.agent-directory-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.agent-card {
  padding: 14px;
}

.agent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.agent-card-header h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.agent-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(62, 232, 143, 0.4);
  background: rgba(62, 232, 143, 0.1);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.agent-row {
  display: grid;
  gap: 5px;
}

.agent-row + .agent-row {
  margin-top: 12px;
}

.agent-row a,
.agent-row strong,
.agent-row span:last-child {
  color: var(--text);
  line-height: 1.45;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.agent-row a:hover {
  color: var(--green);
}

.directory-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(245, 240, 223, 0.03);
}

.quickstart-layout-secondary,
.wallet-note {
  margin-top: 18px;
}

.quickstart-card {
  padding: 24px;
  height: 100%;
}

.signer-card {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}

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

.download-note {
  margin: 14px 0 0;
  font-size: 14px;
}

.wallet-note {
  padding: 24px;
}

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

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

.wallet-onboarding {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.sponsorpay-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(245, 240, 223, 0.035);
}

.wallet-field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wallet-field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.wallet-field span {
  font-size: 14px;
}

.wallet-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 6, 4, 0.86);
  color: var(--text);
  padding: 12px 14px;
}

.wallet-input::placeholder {
  color: rgba(182, 174, 153, 0.72);
}

.wallet-input:focus {
  outline: 2px solid rgba(62, 232, 143, 0.24);
  border-color: rgba(62, 232, 143, 0.72);
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wallet-submit,
.wallet-install {
  justify-content: center;
}

.wallet-submit {
  cursor: pointer;
}

.wallet-submit:disabled {
  opacity: 0.62;
  cursor: wait;
}

.wallet-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 6, 4, 0.86);
  color: var(--text);
  font-weight: 700;
}

.wallet-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.wallet-caption {
  margin: 0;
  font-size: 14px;
}

.wallet-status {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(245, 240, 223, 0.04);
  color: var(--muted);
  line-height: 1.55;
}

.wallet-status[data-state="working"] {
  border-color: rgba(245, 190, 79, 0.35);
  color: var(--gold);
}

.wallet-status[data-state="success"] {
  border-color: rgba(62, 232, 143, 0.48);
  background: rgba(62, 232, 143, 0.08);
  color: var(--green);
}

.wallet-status[data-state="error"] {
  border-color: rgba(255, 107, 87, 0.52);
  background: rgba(255, 107, 87, 0.12);
  color: #ffd3cc;
}

.wallet-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.wallet-result[hidden] {
  display: none;
}

.wallet-result div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(245, 240, 223, 0.04);
}

.wallet-result span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.wallet-result strong {
  display: block;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.quickstart-card code,
.quickstart-list code {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(245, 190, 79, 0.12);
  color: var(--gold);
}

.quickstart-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--text);
}

.quickstart-list li + li {
  margin-top: 10px;
}

.copy-action {
  margin-left: auto;
  border: 1px solid rgba(62, 232, 143, 0.4);
  background: rgba(62, 232, 143, 0.1);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.copy-action:hover {
  border-color: rgba(62, 232, 143, 0.72);
  color: var(--green);
}

.console-bar {
  gap: 8px;
  padding: 12px 16px;
  background: #11120f;
  border-bottom: 1px solid var(--line);
}

.console-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
}

.console-bar span:nth-child(2) {
  background: var(--gold);
}

.console-bar span:nth-child(3) {
  background: var(--green);
}

.console-bar strong {
  margin-left: 10px;
  color: var(--muted);
  font-size: 13px;
}

.dev-console pre {
  border: 0;
  border-radius: 0;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1050px) {
  .hero,
  .contract-layout,
  .simulator-grid,
  .quickstart-layout,
  .directory-layout,
  .signer-grid {
    grid-template-columns: 1fr;
  }

  .pipeline,
  .launch-grid,
  .roadmap-grid,
  .reason-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contract-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    position: sticky;
    background: rgba(8, 8, 6, 0.94);
    padding: 14px 16px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 88vh;
    padding: 72px 16px 44px;
  }

  .section {
    padding: 64px 16px;
  }

  .wallet-actions,
  .wallet-result,
  .wallet-field-grid {
    grid-template-columns: 1fr;
  }

  .range-label-row {
    display: grid;
    gap: 6px;
  }

  .wallet-actions {
    display: grid;
  }

  .directory-toolbar,
  .agent-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-result {
    width: 100%;
  }

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

  .agent-directory-list,
  .roadmap-grid,
  .reason-grid {
    grid-template-columns: 1fr;
  }

  .dev-console {
    height: 430px;
  }

  h1 {
    font-size: 64px;
  }

  h2 {
    font-size: 34px;
  }

  .pipeline,
  .launch-grid,
  .contract-facts,
  .sim-output,
  .contract-tabs {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
