:root {
  --bg: #0a0b0f;
  --panel: #12141b;
  --line: #22262f;
  --line-2: #333944;
  --ink: #e6e9ef;
  --ink-dim: #949bab;
  --ink-faint: #626a7a;
  --accent: #7dd3a0;
  --warn: #f0b45c;
  --bad: #ef6b60;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(800px 480px at 50% -10%, #171a24 0%, transparent 60%), var(--bg);
  color: var(--ink);
  font: 400 15px/1.65 ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 660px; margin: 0 auto; padding: 56px 20px 72px; }

header h1 { font-size: 22px; margin: 0 0 8px; letter-spacing: -.01em; }
.sub { color: var(--ink-dim); margin: 0 0 28px; font-size: 13.5px; }

.banner {
  border: 1px solid var(--bad); background: #2a1210; color: #ffd9d5;
  border-radius: 5px; padding: 11px 14px; margin-bottom: 22px; font-size: 13px;
}
.banner[hidden] { display: none; }
.banner.ok { border-color: var(--accent); background: #10241a; color: #d6f5e4; }
.banner.warn { border-color: var(--warn); background: #2a2110; color: #ffeccd; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.step {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--panel), #0d0f14);
  padding: 18px 20px;
  transition: border-color .2s, opacity .2s;
}
.step[data-state="todo"] { opacity: .55; }
.step[data-state="active"] { opacity: 1; border-color: var(--line-2); }
.step[data-state="done"] { opacity: 1; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.head { display: flex; gap: 14px; align-items: flex-start; }
.num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--ink-dim);
  display: grid; place-items: center; font-size: 12px; margin-top: 2px;
}
.step[data-state="done"] .num { border-color: var(--accent); color: var(--accent); }
.step[data-state="done"] .num::after { content: '✓'; }
.step[data-state="done"] .num { font-size: 0; }
.step[data-state="done"] .num::after { font-size: 13px; }

.head h2 { font-size: 14px; margin: 0 0 6px; font-weight: 700; }
.head p { margin: 0; font-size: 12.5px; color: var(--ink-dim); line-height: 1.7; }

.body { margin: 14px 0 0 38px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.body:empty { display: none; }

.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: 700 12px/1 ui-monospace, monospace; letter-spacing: .04em;
  padding: 11px 16px; border-radius: 4px;
  border: 1px solid var(--line-2); background: #171a22; color: var(--ink);
  transition: .15s;
}
.btn:hover:not(:disabled) { border-color: var(--ink-dim); }
.btn.primary { border-color: var(--accent); color: var(--accent); background: #10241a; }
.btn.primary:hover:not(:disabled) { background: var(--accent); color: #08130d; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn[hidden] { display: none; }

.done-line { font-size: 13px; color: var(--ink-dim); }
.done-line b { color: var(--accent); }
.done-line[hidden] { display: none; }
.link { color: var(--ink-faint); font-size: 12px; margin-left: 10px; }

.addr {
  font-size: 12px; color: var(--ink-dim);
  background: #0b0d12; border: 1px solid var(--line); border-radius: 4px;
  padding: 8px 10px; word-break: break-all; width: 100%;
}
.addr[hidden] { display: none; }

.reveal { width: 100%; font-size: 12px; color: var(--ink-faint); }
.reveal[hidden] { display: none; }
.reveal summary { cursor: pointer; padding: 4px 0; }
.reveal pre {
  background: #0b0d12; border: 1px solid var(--line); border-radius: 4px;
  padding: 12px; font-size: 11.5px; line-height: 1.7; color: var(--ink-dim);
  white-space: pre-wrap; word-break: break-word; margin: 8px 0 0;
}

.payout {
  margin-top: 22px; border: 1px solid var(--accent); border-radius: 7px;
  background: #0e1a14; padding: 20px;
}
.payout[hidden] { display: none; }
.payout h2 { margin: 0 0 12px; font-size: 15px; color: var(--accent); }
.payout pre {
  background: #08120d; border: 1px solid #1d3a2a; border-radius: 4px;
  padding: 14px; font-size: 13px; line-height: 1.7; margin: 0 0 12px;
  white-space: pre-wrap; word-break: break-word;
}

footer { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 20px; }
footer p { font-size: 11.5px; line-height: 1.8; color: var(--ink-faint); margin: 0 0 10px; }
.count b { color: var(--ink-dim); }

/* ---------- claim by tweet ---------------------------------------------- */
.claim { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.claim[hidden] { display: none; }

.code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code-row code {
  font-size: 26px; letter-spacing: .22em; font-weight: 700;
  color: var(--accent); background: #0b120e;
  border: 1px solid #1d3a2a; border-radius: 5px; padding: 10px 16px;
}
.btn.small { padding: 8px 12px; font-size: 11px; }

.tweet-preview {
  margin: 0; font-size: 12.5px; color: var(--ink-dim);
  background: #0b0d12; border: 1px solid var(--line); border-radius: 4px;
  padding: 10px 12px; word-break: break-word;
}

.waiting {
  margin: 0; font-size: 12px; color: var(--ink-dim);
  display: flex; align-items: center; gap: 9px;
}
.waiting[hidden] { display: none; }
.spin {
  width: 11px; height: 11px; flex: 0 0 auto;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.expiry { margin: 0; font-size: 11px; color: var(--ink-faint); }
.step[hidden] { display: none; }

/* ---------- what a verified holder receives ----------------------------- */
.give { margin-bottom: 20px; }
.give:last-child { margin-bottom: 0; }
.give > label {
  display: block; font-size: 10px; letter-spacing: .14em;
  color: var(--ink-faint); text-transform: uppercase; margin-bottom: 8px;
}
.give[hidden] { display: none; }

.keyline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.keyline code {
  font-size: 17px; letter-spacing: .1em; font-weight: 700; color: var(--accent);
  background: #08120d; border: 1px solid #1d3a2a; border-radius: 5px; padding: 10px 14px;
}

.hint { margin: 8px 0 0; font-size: 11.5px; color: var(--ink-faint); line-height: 1.6; }

pre.cmd {
  background: #08120d; border: 1px solid #1d3a2a; border-radius: 4px;
  padding: 12px 14px; margin: 8px 0 0;
  font-size: 12.5px; line-height: 1.7; color: var(--ink-dim);
}



/* ---------- show everything before asking for anything ------------------ */
main { max-width: 760px; }

.hero { margin-bottom: 48px; }
.hero h1 { font-size: 26px; line-height: 1.45; margin: 0 0 16px; letter-spacing: -.01em; }
.lede { font-size: 15px; line-height: 1.75; color: var(--ink); margin: 0 0 12px; max-width: 56ch; }
.hero .sub { color: var(--ink-faint); font-size: 13px; margin: 0; }

.block { margin-bottom: 52px; }
.block h2 { font-size: 15px; margin: 0 0 10px; }
.block-lede { font-size: 13.5px; line-height: 1.75; color: var(--ink-dim); margin: 0 0 24px; max-width: 62ch; }

/* the four waves */
.wave { margin-bottom: 20px; }
.wave-label {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 10px;
}
.wave-label span { text-transform: none; letter-spacing: 0; color: var(--ink-faint); opacity: .7; }

.agents { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.agents li {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: baseline;
  border: 1px solid var(--line); border-left: 3px solid var(--c);
  border-radius: 5px; padding: 13px 16px; background: var(--panel);
}
.agents b { color: var(--c); font-size: 13px; }
.agents span { font-size: 12.5px; line-height: 1.65; color: var(--ink-dim); }
.agents code {
  font-size: 11px; color: var(--ink-faint);
  background: #0b0d12; border: 1px solid var(--line); border-radius: 3px; padding: 2px 7px;
  white-space: nowrap;
}

/* capability cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.cards article {
  border: 1px solid var(--line); border-radius: 7px; padding: 18px 20px;
  background: linear-gradient(180deg, var(--panel), #0d0f14);
}
.cards h3 { font-size: 13px; margin: 0 0 10px; }
.cards p { font-size: 12.5px; line-height: 1.75; color: var(--ink-dim); margin: 0; }
.cards b { color: var(--ink); font-weight: 700; }
.cards code, .hint code, .reqs code {
  background: #0b0d12; border: 1px solid var(--line); border-radius: 3px;
  padding: 1px 5px; font-size: 11.5px;
}

/* requirements */
.reqs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.reqs li { border-left: 2px solid var(--line-2); padding: 2px 0 2px 18px; }
.reqs b { display: block; font-size: 13px; margin-bottom: 5px; }
.reqs em { color: var(--warn); font-style: normal; font-weight: 400; font-size: 12px; }
.reqs span { font-size: 12.5px; line-height: 1.75; color: var(--ink-dim); }

.claim-section { border-top: 1px solid var(--line); padding-top: 40px; }
.claim-section h2 { font-size: 15px; margin: 0 0 8px; }
.claim-lede { font-size: 13px; color: var(--ink-dim); margin: 0 0 22px; }
.step .head h3 { font-size: 14px; margin: 0 0 6px; font-weight: 700; }

/* the install line */
.install { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.install pre {
  flex: 1; min-width: 0; margin: 0;
  background: #08120d; border: 1px solid #1d3a2a; border-radius: 5px;
  padding: 13px 14px; font-size: 12.5px; line-height: 1.6;
  color: var(--accent); overflow-x: auto; white-space: pre;
}
.hint a { color: var(--ink-dim); }

@media (max-width: 640px) {
  .agents li { grid-template-columns: 1fr; gap: 6px; }
  .agents code { justify-self: start; }
}

/* ------------------------------------------------------------------ *
 * The page is an essay with the product running inside it, so it needs
 * two widths: prose stays narrow enough to read, the stage goes wide.
 * ------------------------------------------------------------------ */

main { max-width: 780px; }

.eyebrow {
  font-size: 12px; color: var(--ink-faint); margin: 0 0 18px;
  letter-spacing: .04em; text-transform: uppercase;
}
.eyebrow a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.eyebrow a:hover { border-bottom-color: currentColor; }

.hero h1 { font-size: 30px; line-height: 1.35; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 15px; line-height: 1.8; color: var(--ink-dim); max-width: 60ch; margin: 0 0 14px; }
.hero .lede b { color: var(--ink); }

/* --- the stage: wider than the prose, because it is the point --- */

.stage-wrap { margin: 0 0 64px; }



@media (min-width: 1024px) {
  /* The run breaks out of the reading column: it needs to be wider than 700px
     for the village to show its stats and live feed alongside the map. */
  .stage-wrap {
    width: min(1180px, calc(100vw - 48px));
    margin-left: calc(50% - min(590px, calc(50vw - 24px)));
  }
}
@media (max-width: 620px) {
  .hero h1 { font-size: 24px; }
}

/* --- the essay --- */

.essay { margin: 0 0 60px; max-width: 64ch; }

.part {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 10px;
}
.essay h2 { font-size: 21px; line-height: 1.4; margin: 0 0 20px; letter-spacing: -.01em; }
.essay h2 em { font-style: normal; color: var(--accent); }
.essay p { font-size: 14.5px; line-height: 1.85; color: var(--ink-dim); margin: 0 0 18px; }
.essay p b { color: var(--ink); font-weight: 700; }
.essay p em { color: var(--ink); font-style: italic; }
.essay code {
  background: #0c0e13; border: 1px solid var(--line); border-radius: 3px;
  padding: 1px 5px; font-size: .9em; color: var(--ink);
}

.pull {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 20px;
  margin: 28px 0 !important;
  color: var(--ink) !important;
  font-size: 15px !important;
}

/* --- the seven-rung ladder --- */

.ladder { margin: 26px 0 30px; }
.ladder-lede { font-size: 13px !important; color: var(--ink-faint) !important; margin: 0 0 16px !important; }
.ladder ol { list-style: none; counter-reset: rung; margin: 0; padding: 0; display: grid; gap: 1px; }
.ladder li {
  counter-increment: rung;
  position: relative;
  padding: 12px 16px 12px 46px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.ladder li:first-child { border-radius: 7px 7px 0 0; }
.ladder li:last-child { border-radius: 0 0 7px 7px; }
.ladder li + li { border-top: 0; }
.ladder li::before {
  content: counter(rung);
  position: absolute; left: 16px; top: 13px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--ink-faint);
  display: grid; place-items: center; font-size: 10px;
}
.ladder li:last-child { background: linear-gradient(180deg, var(--panel), #101a15); }
.ladder li:last-child::before { border-color: var(--accent); color: var(--accent); }
.ladder b { display: block; font-size: 13px; margin-bottom: 4px; }
.ladder span { font-size: 12.5px; line-height: 1.7; color: var(--ink-dim); }

/* --- assign / inspect / approve --- */

.triple {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin: 26px 0 30px;
}
.triple > div {
  border: 1px solid var(--line); border-radius: 7px;
  background: linear-gradient(180deg, var(--panel), #0d0f14);
  padding: 16px 16px 18px;
}
.triple span {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--ink-faint);
  font-size: 10px; margin-bottom: 10px;
}
.triple b { display: block; font-size: 13px; margin-bottom: 6px; }
.triple p { font-size: 12.5px !important; line-height: 1.7; color: var(--ink-dim) !important; margin: 0 !important; }

/* ---------------- the way through to the live one ---------------- */

.stage-cta {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background:
    radial-gradient(600px 200px at 20% 0%, rgba(125, 211, 160, .09), transparent 70%),
    linear-gradient(180deg, var(--panel), #0b0d12);
  padding: 26px 28px 28px;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.stage-cta:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line-2));
  transform: translateY(-1px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .9);
}
.stage-cta h2 { font-size: 19px; margin: 12px 0 12px; letter-spacing: -.01em; }
.stage-cta p { font-size: 13.5px; line-height: 1.8; color: var(--ink-dim); margin: 0; max-width: 62ch; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 999px; padding: 4px 11px 4px 9px;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent);
  animation: livepulse 2s ease-out infinite;
}
@keyframes livepulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
