:root {
  color-scheme: dark;
  --bg: #11120e;
  --panel: #1a1c16;
  --panel-2: #22251d;
  --line: #2f3328;
  --text: #f2f0e4;
  --muted: #a6a491;
  --faint: #6f6e60;
  --acid: #c6f23f;      /* gregarious-phase green */
  --acid-ink: #11130c;
  --sand: #e7c77c;
  --rust: #e0703a;
  --good: #9fe36b;
  --bad: #f07a6a;
  --radius: 14px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--sans);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--acid); text-underline-offset: 3px; }
a:hover { color: #e3ff8a; }
img, svg { max-width: 100%; }
code, pre { font-family: var(--mono); font-size: 14px; }
pre { background: #0b0c09; border: 1px solid var(--line); border-radius: 10px; padding: 16px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--acid); color: var(--acid-ink); padding: 6px 10px; z-index: 10; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(17, 18, 14, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .in { max-width: 1180px; margin: auto; display: flex; align-items: center; gap: 22px; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 21px/1 var(--display); letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 8px; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; }
.nav a:hover, .nav a[aria-current] { color: var(--text); background: var(--panel-2); }
.header-cta { margin-left: auto; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--acid); color: var(--acid-ink); border: 0; border-radius: 10px; padding: 11px 18px; font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: #d8ff5f; color: var(--acid-ink); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--acid); color: var(--acid); }
.btn.sm { padding: 7px 12px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: default; }
@media (max-width: 860px) {
  .site-header .in { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; }
}

/* ---------- layout ---------- */
main { display: block; }
.wrap { max-width: 1180px; margin: auto; padding: 0 20px; }
.narrow { max-width: 820px; margin: auto; padding: 0 20px; }
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.eyebrow { font: 600 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--acid); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.03em; line-height: 1.05; margin: 0 0 .5em; }
h1 { font-size: clamp(44px, 8vw, 96px); }
h2 { font-size: clamp(30px, 4.5vw, 52px); }
h3 { font-size: 22px; letter-spacing: -.015em; }
.lede { font-size: 20px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; }
.page-head { padding: 56px 0 28px; }
.page-head p { color: var(--muted); font-size: 18px; margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.pill { display: inline-block; font: 600 12px/1 var(--mono); padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pill.acid { border-color: var(--acid); color: var(--acid); }
.pill.good { border-color: var(--good); color: var(--good); }
.pill.bad { border-color: var(--bad); color: var(--bad); }
.pill.sand { border-color: var(--sand); color: var(--sand); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; height: clamp(620px, calc(100vh - 62px), 860px); }
.hero-copy { padding: 64px 48px 64px max(20px, calc((100vw - 1180px) / 2 + 20px)); display: flex; flex-direction: column; justify-content: center;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
.hero-copy h1 { margin-bottom: 22px; }
.hero-copy h1 em { font-style: normal; color: var(--acid); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-art { background: var(--acid); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero-art .locust { width: 88%; max-width: 620px; filter: drop-shadow(0 26px 30px rgba(17, 19, 12, .35)); animation: hop 5.5s ease-in-out infinite; }
.hero-art .chatter { position: absolute; font: 600 13px/1.2 var(--mono); background: var(--acid-ink); color: var(--acid); padding: 8px 10px; border-radius: 6px; }
.hero-art .scribble { position: absolute; font: 700 22px/1.05 var(--display); color: var(--acid-ink); letter-spacing: -.02em; }
.hero-art .swarm-dots { position: absolute; inset: 0; pointer-events: none; }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(0); } 44% { transform: translateY(0) rotate(0); } 52% { transform: translateY(-22px) rotate(-3deg); } 60% { transform: translateY(0) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .hero-art .locust { animation: none; } }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; height: auto; }
  .hero-copy { padding: 48px 20px; }
  .hero-art { min-height: 380px; }
}

/* ---------- phase change ---------- */
.phases { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: stretch; margin-top: 36px; }
.phase { border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.phase.solo { background: var(--panel); }
.phase.greg { background: var(--acid); color: var(--acid-ink); border-color: var(--acid); }
.phase.greg .muted { color: #3b4520; }
.phase h3 { margin-top: 10px; }
.phase-arrow { display: flex; align-items: center; justify-content: center; font: 700 30px var(--display); color: var(--acid); }
@media (max-width: 860px) { .phases { grid-template-columns: 1fr; } .phase-arrow { transform: rotate(90deg); } }

/* ---------- lore ---------- */
.lore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.lore a { color: inherit; text-decoration: none; }
.lore .card { height: 100%; transition: border-color .15s; }
.lore .card:hover { border-color: var(--acid); }
.lore .when { font: 600 12px/1 var(--mono); color: var(--sand); letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 860px) { .lore { grid-template-columns: 1fr; } }

/* ---------- flow ---------- */
.flow { display: grid; grid-template-columns: repeat(5, auto); align-items: center; gap: 14px; margin: 34px 0; }
.flow .node { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-align: center; }
.flow .node b { display: block; font-family: var(--display); font-size: 18px; }
.flow .node span { color: var(--muted); font-size: 13px; }
.flow .arrow { color: var(--acid); font: 700 22px var(--mono); text-align: center; }
@media (max-width: 860px) { .flow { grid-template-columns: 1fr; } .flow .arrow { transform: rotate(90deg); } }

/* ---------- treasury ---------- */
.treasury-card { background: #0c0d0a; border: 1px solid var(--acid); border-radius: 18px; padding: 30px; position: relative; overflow: hidden; }
.treasury-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(198, 242, 63, .18), transparent 70%); }
.big-number { font: 700 clamp(44px, 7vw, 76px)/1 var(--display); letter-spacing: -.04em; }
.big-number small { font-size: 18px; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.gain { color: var(--good); font: 700 30px/1 var(--display); }
.treasury-row { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-end; margin: 14px 0 18px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(159, 227, 107, .18); margin-right: 6px; }
.live-dot.off { background: var(--faint); box-shadow: none; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; }
.steps .n { width: 30px; height: 30px; border-radius: 50%; background: var(--acid); color: var(--acid-ink); display: flex; align-items: center; justify-content: center; font: 700 14px var(--mono); }

/* ---------- token ---------- */
.token-card { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.token-card .coin { width: 120px; height: 120px; border-radius: 50%; background: var(--acid); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -8px 0 rgba(0,0,0,.18); }
.token-card .coin img { width: 86%; }
.contract { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #0b0c09; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 13px var(--mono); overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 600px) { .token-card { grid-template-columns: 1fr; } }

/* ---------- invitation ---------- */
.invite pre { max-height: 360px; }
.copy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--line); padding: 20px 0; }
.list > li:first-child { border-top: 1px solid var(--line); }
.list h3 { margin: 6px 0 6px; font-size: 21px; }
.list h3 a { color: var(--text); text-decoration: none; }
.list h3 a:hover { color: var(--acid); }
.meta { font: 13px/1.6 var(--mono); color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.meta a { color: var(--muted); }
.excerpt { color: #cfcdbd; margin: 6px 0 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 24px; }
.tabs a { color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.tabs a[aria-current] { background: var(--acid); color: var(--acid-ink); border-color: var(--acid); }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 36px; text-align: center; color: var(--muted); }

/* ---------- posts ---------- */
.post { padding: 22px 0; border-top: 1px solid var(--line); }
.post .body { overflow-wrap: anywhere; }
.post .body p { margin: .6em 0; }
.post.reply { margin-left: 22px; padding-left: 18px; border-left: 2px solid var(--line); border-top: 0; }
.avatar { width: 28px; height: 28px; border-radius: 8px; background: var(--panel-2); object-fit: cover; vertical-align: middle; }
.author { color: var(--text); font-weight: 600; text-decoration: none; }
.prose { font-size: 18px; line-height: 1.75; }
.prose p, .prose li { overflow-wrap: anywhere; }
.prose blockquote { border-left: 3px solid var(--acid); margin: 1em 0; padding-left: 18px; color: var(--muted); }
.untrusted { font: 12px var(--mono); color: var(--faint); }

/* ---------- votes bar ---------- */
.votebar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--panel-2); margin: 10px 0; }
.votebar .s { background: var(--good); } .votebar .o { background: var(--bad); } .votebar .a { background: var(--faint); }
.tally { display: flex; gap: 18px; font: 13px var(--mono); color: var(--muted); }
.tally b { color: var(--text); }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--panel-2); }
.tile .cap { padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tile .cap b { font-size: 15px; display: block; }
.like { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 5px 10px; cursor: pointer; font: 13px var(--mono); white-space: nowrap; }
.like[aria-pressed="true"] { border-color: var(--acid); color: var(--acid); }

/* ---------- forms ---------- */
.form { display: grid; gap: 10px; max-width: 640px; }
.form input, .form textarea, .form select { font: inherit; background: #0b0c09; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.form textarea { min-height: 110px; }
.notice { border: 1px solid var(--sand); color: var(--sand); border-radius: 10px; padding: 12px 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 36px 0 60px; color: var(--muted); font-size: 14px; }
.site-footer .in { display: flex; gap: 28px; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.disclaimer { max-width: 620px; font-size: 13px; color: var(--faint); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--acid); color: var(--acid-ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }
.form .btn { justify-self: start; }
.lang { display: flex; gap: 2px; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.lang a { color: var(--muted); text-decoration: none; font: 600 12px/1 var(--mono); padding: 6px 8px; border-radius: 6px; }
.lang a[aria-current] { background: var(--panel-2); color: var(--text); }
.lang + .header-cta { margin-left: 0; }
html[lang="zh-Hans"] body { font-family: var(--sans), "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2, html[lang="zh-Hans"] h3 { letter-spacing: 0; font-family: var(--display), "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
@media (max-width: 860px) { .lang { margin-left: auto; } }
html[lang="zh-Hans"] .hero-copy h1 { font-size: clamp(40px, 6vw, 80px); line-height: 1.12; }
html[lang="zh-Hans"] .eyebrow { letter-spacing: .06em; }

/* Interactive illustrations: the runtime iframe sits exactly over the poster. */
.illustration-stage { position: relative; }
.illustration-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 14px; background: #15170f; }
.illustration figcaption { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
