:root {
  --bg: #060607;
  --fg: #e8e8e4;
  --accent: #3aff8e;
  --muted: #8a8b90;
  --dim: #57585e;
  --line: #17171a;
  --line-soft: #101013;
  --line-row: #121215;
  --panel: #0a0b0d;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; background: var(--bg); }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

@keyframes pulse402 { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* ---- nav ---- */
nav {
  position: sticky; top: 0; z-index: 20; height: 60px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 6, 7, .88);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: .12em; }
.brand .glyph { font-family: var(--mono); color: #55565c; font-size: 13px; }
.ticker { font-family: var(--mono); font-size: 12.5px; color: var(--accent); display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.ticker .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse402 2.2s infinite; }
.navlinks { display: flex; justify-content: flex-end; align-items: center; gap: 22px; font-family: var(--mono); font-size: 12px; }
.cta { color: var(--accent); border: 1px solid var(--accent); padding: 6px 12px; letter-spacing: .08em; }
.cta:hover { background: var(--accent); color: var(--bg); }
.navlink { color: var(--muted); letter-spacing: .08em; }
.navlink:hover { color: var(--fg); }

/* ---- hero strip ---- */
header {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px;
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--line-soft);
  max-width: 1600px; margin: 0 auto;
}
header h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: .02em; }
header .tag { font-size: 24px; font-weight: 400; color: #6c6d73; }
header .meta { margin-left: auto; font-family: var(--mono); font-size: 12px; color: #77787e; }

/* ---- the wall ---- */
main { padding: 14px 24px 6px; }
.wall {
  position: relative;
  margin: 0 auto;
  width: min(1600px, 100%, calc((100vh - 205px) * 1.7778));
}
#wall-canvas {
  display: block; width: 100%; height: auto;
  border: 1px solid #1d1d21;
  image-rendering: pixelated;
  background: var(--bg);
  cursor: crosshair;
}
#wall-canvas.linked { cursor: pointer; }
.wall-status {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; letter-spacing: .3em; color: var(--dim);
  text-align: center; padding: 0 24px;
  pointer-events: none;
}
.wall-status[hidden] { display: none; }
.wallfoot {
  max-width: 1600px; margin: 8px auto 0;
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--mono); font-size: 11px; color: #55565c;
}

/* ---- hover tooltip ---- */
.tip {
  position: absolute; left: 0; top: 0; z-index: 6;
  pointer-events: none;
  width: 252px;
  background: #0b0c0e;
  border: 1px solid #26262b;
  padding: 11px 13px;
  font-family: var(--mono);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .7);
}
.tip-title { font-size: 12.5px; font-weight: 600; color: #f2f2ee; margin-bottom: 3px; }
.tip-sub { font-size: 10.5px; color: #6f7076; margin-bottom: 7px; }
.tip-msg { font-size: 11px; color: #b9bab6; line-height: 1.5; margin-bottom: 7px; }
.tip-msg:empty { display: none; }
.tip-meta { font-size: 10px; color: #57585e; display: flex; justify-content: space-between; gap: 8px; }

/* ---- sections ---- */
.section { max-width: 1240px; margin: 0 auto; padding: 0 24px 84px; }
.section-protocol { padding-top: 84px; }
.section h2 { margin: 0 0 8px; font-size: 32px; font-weight: 700; }
.lede { margin: 0 0 34px; color: var(--muted); font-size: 15px; max-width: 62ch; }

/* ---- protocol: terminal + cards ---- */
.protocol-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.terminal { border: 1px solid #202024; background: var(--panel); }
.terminal-bar {
  display: flex; justify-content: space-between; padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: #6f7076;
}
.terminal-body {
  margin: 0; padding: 18px 16px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75; color: #b9bab6;
  overflow-x: auto;
}
.terminal-note {
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; color: var(--dim); line-height: 1.6;
}
.t-dim { color: #57585e; }
.t-fg { color: #f2f2ee; }
.t-402 { color: var(--accent); font-weight: 600; }
.t-key { color: #6f7076; }
.t-cmt { color: #57585e; font-style: italic; }
.t-accent { color: var(--accent); }
.cards { display: flex; flex-direction: column; gap: 14px; }
.card { border: 1px solid var(--line); padding: 16px 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.card-name { font-family: var(--mono); font-size: 13px; font-weight: 600; color: #f2f2ee; }
.badge { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--dim); border: 1px solid #232327; padding: 2px 7px; }
.badge-live { color: var(--accent); border-color: var(--accent); }
.card-body { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.card-body a { color: #b9bab6; border-bottom: 1px dotted #3a3b40; }
.card-body a:hover { color: var(--accent); }
.cards-note { font-family: var(--mono); font-size: 11.5px; color: var(--dim); line-height: 1.7; padding: 2px 2px 0; }

/* ---- founding machines ---- */
.founders { display: grid; grid-template-columns: repeat(auto-fill, minmax(370px, 1fr)); gap: 0 40px; }
.founder {
  display: flex; align-items: baseline; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid var(--line-row);
  font-family: var(--mono); font-size: 11.5px; min-width: 0;
}
.founder .rank { color: #4a4b51; flex-shrink: 0; }
.founder .name { color: var(--fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.founder a.name { text-decoration: none; }
.founder a.name:hover { color: var(--accent); text-decoration: underline; }
.founder .fw { color: var(--dim); margin-left: auto; flex-shrink: 0; }
.founder .wallet { color: #45464c; flex-shrink: 0; }
.founder .blocks { color: var(--muted); flex-shrink: 0; min-width: 5ch; text-align: right; }
.founders-empty { grid-column: 1 / -1; font-family: var(--mono); font-size: 12px; color: var(--dim); padding: 14px 0; border-top: 1px solid var(--line-row); }

/* ---- faq ---- */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); border-top: 1px solid #1b1b1f; }
.faq-q { padding: 20px 24px 20px 0; border-bottom: 1px solid var(--line-row); font-size: 18px; font-weight: 500; }
.faq-a { padding: 21px 0; border-bottom: 1px solid var(--line-row); color: var(--muted); font-size: 15px; line-height: 1.6; }
.faq-last { border-bottom: none; }

/* ---- footer ---- */
footer {
  border-top: 1px solid #141417;
  padding: 26px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px;
  max-width: 1600px; margin: 0 auto;
  font-family: var(--mono); font-size: 11px; color: var(--dim);
}
.badges { display: flex; gap: 10px; margin-left: auto; font-size: 10.5px; }
.badges span { border: 1px solid #232327; color: var(--muted); padding: 4px 10px; letter-spacing: .1em; }

@media (max-width: 900px) {
  nav { grid-template-columns: 1fr; height: auto; padding: 12px 16px; gap: 8px; justify-items: start; }
  .navlinks { justify-content: flex-start; }
  header .meta { margin-left: 0; }
  .protocol-grid { grid-template-columns: minmax(0, 1fr); }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .faq-q { padding: 18px 0 4px; border-bottom: none; }
  .faq-a { padding: 4px 0 18px; }
  .faq-last { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker .dot { animation: none; }
  html { scroll-behavior: auto; }
}

.mono-inline { font-family: var(--mono); font-size: .92em; color: #b9bab6; }
